PluginProbe
Gutenberg / 24.1.0
Gutenberg v24.1.0
24.1.0 24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 All 404 releases
← All changes | build/scripts/blocks/index.js +1331 -1124 23.5.1 → 24.1.0 View file →
@@ -1,4 +1,5 @@
1 +(function() {
1 2 "use strict";
2 3 var wp;
3 4 (wp ||= {}).blocks = (() => {
4 5 var __create = Object.create;
@@ -569,8 +570,64 @@
569 570 module.exports.remove = removeAccents2;
570 571 }
571 572 });
572 573
574 + // node_modules/fast-deep-equal/es6/index.js
575 + var require_es6 = __commonJS({
576 + "node_modules/fast-deep-equal/es6/index.js"(exports, module) {
577 + "use strict";
578 + module.exports = function equal(a, b2) {
579 + if (a === b2) return true;
580 + if (a && b2 && typeof a == "object" && typeof b2 == "object") {
581 + if (a.constructor !== b2.constructor) return false;
582 + var length, i, keys;
583 + if (Array.isArray(a)) {
584 + length = a.length;
585 + if (length != b2.length) return false;
586 + for (i = length; i-- !== 0; )
587 + if (!equal(a[i], b2[i])) return false;
588 + return true;
589 + }
590 + if (a instanceof Map && b2 instanceof Map) {
591 + if (a.size !== b2.size) return false;
592 + for (i of a.entries())
593 + if (!b2.has(i[0])) return false;
594 + for (i of a.entries())
595 + if (!equal(i[1], b2.get(i[0]))) return false;
596 + return true;
597 + }
598 + if (a instanceof Set && b2 instanceof Set) {
599 + if (a.size !== b2.size) return false;
600 + for (i of a.entries())
601 + if (!b2.has(i[0])) return false;
602 + return true;
603 + }
604 + if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b2)) {
605 + length = a.length;
606 + if (length != b2.length) return false;
607 + for (i = length; i-- !== 0; )
608 + if (a[i] !== b2[i]) return false;
609 + return true;
610 + }
611 + if (a.constructor === RegExp) return a.source === b2.source && a.flags === b2.flags;
612 + if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b2.valueOf();
613 + if (a.toString !== Object.prototype.toString) return a.toString() === b2.toString();
614 + keys = Object.keys(a);
615 + length = keys.length;
616 + if (length !== Object.keys(b2).length) return false;
617 + for (i = length; i-- !== 0; )
618 + if (!Object.prototype.hasOwnProperty.call(b2, keys[i])) return false;
619 + for (i = length; i-- !== 0; ) {
620 + var key = keys[i];
621 + if (!equal(a[key], b2[key])) return false;
622 + }
623 + return true;
624 + }
625 + return a !== a && b2 !== b2;
626 + };
627 + }
628 + });
629 +
573 630 // packages/blocks/node_modules/react-is/cjs/react-is.development.js
574 631 var require_react_is_development = __commonJS({
575 632 "packages/blocks/node_modules/react-is/cjs/react-is.development.js"(exports) {
576 633 "use strict";
@@ -798,64 +855,8 @@
798 855 module.exports = window.ReactJSXRuntime;
799 856 }
800 857 });
801 858
802 - // node_modules/fast-deep-equal/es6/index.js
803 - var require_es6 = __commonJS({
804 - "node_modules/fast-deep-equal/es6/index.js"(exports, module) {
805 - "use strict";
806 - module.exports = function equal(a2, b3) {
807 - if (a2 === b3) return true;
808 - if (a2 && b3 && typeof a2 == "object" && typeof b3 == "object") {
809 - if (a2.constructor !== b3.constructor) return false;
810 - var length, i2, keys;
811 - if (Array.isArray(a2)) {
812 - length = a2.length;
813 - if (length != b3.length) return false;
814 - for (i2 = length; i2-- !== 0; )
815 - if (!equal(a2[i2], b3[i2])) return false;
816 - return true;
817 - }
818 - if (a2 instanceof Map && b3 instanceof Map) {
819 - if (a2.size !== b3.size) return false;
820 - for (i2 of a2.entries())
821 - if (!b3.has(i2[0])) return false;
822 - for (i2 of a2.entries())
823 - if (!equal(i2[1], b3.get(i2[0]))) return false;
824 - return true;
825 - }
826 - if (a2 instanceof Set && b3 instanceof Set) {
827 - if (a2.size !== b3.size) return false;
828 - for (i2 of a2.entries())
829 - if (!b3.has(i2[0])) return false;
830 - return true;
831 - }
832 - if (ArrayBuffer.isView(a2) && ArrayBuffer.isView(b3)) {
833 - length = a2.length;
834 - if (length != b3.length) return false;
835 - for (i2 = length; i2-- !== 0; )
836 - if (a2[i2] !== b3[i2]) return false;
837 - return true;
838 - }
839 - if (a2.constructor === RegExp) return a2.source === b3.source && a2.flags === b3.flags;
840 - if (a2.valueOf !== Object.prototype.valueOf) return a2.valueOf() === b3.valueOf();
841 - if (a2.toString !== Object.prototype.toString) return a2.toString() === b3.toString();
842 - keys = Object.keys(a2);
843 - length = keys.length;
844 - if (length !== Object.keys(b3).length) return false;
845 - for (i2 = length; i2-- !== 0; )
846 - if (!Object.prototype.hasOwnProperty.call(b3, keys[i2])) return false;
847 - for (i2 = length; i2-- !== 0; ) {
848 - var key = keys[i2];
849 - if (!equal(a2[key], b3[key])) return false;
850 - }
851 - return true;
852 - }
853 - return a2 !== a2 && b3 !== b3;
854 - };
855 - }
856 - });
857 -
858 859 // package-external:@wordpress/html-entities
859 860 var require_html_entities = __commonJS({
860 861 "package-external:@wordpress/html-entities"(exports, module) {
861 862 module.exports = window.wp.htmlEntities;
@@ -891,8 +892,9 @@
891 892 __unstableGetInnerBlocksProps: () => getInnerBlocksProps,
892 893 __unstableSerializeAndClean: () => __unstableSerializeAndClean,
893 894 children: () => children_default,
894 895 cloneBlock: () => cloneBlock,
896 + cloneSanitizedBlock: () => cloneSanitizedBlock,
895 897 createBlock: () => createBlock,
896 898 createBlocksFromInnerBlocksTemplate: () => createBlocksFromInnerBlocksTemplate,
897 899 doBlocksMatchTemplate: () => doBlocksMatchTemplate,
898 900 findTransform: () => findTransform,
@@ -939,8 +941,9 @@
939 941 registerBlockCollection: () => registerBlockCollection,
940 942 registerBlockStyle: () => registerBlockStyle,
941 943 registerBlockType: () => registerBlockType,
942 944 registerBlockVariation: () => registerBlockVariation,
945 + sanitizeBlockAttributes: () => sanitizeBlockAttributes,
943 946 serialize: () => serialize,
944 947 serializeRawBlock: () => serializeRawBlock,
945 948 setCategories: () => setCategories2,
946 949 setDefaultBlockName: () => setDefaultBlockName,
@@ -964,14 +967,14 @@
964 967 var import_data5 = __toESM(require_data(), 1);
965 968
966 969 // node_modules/tslib/tslib.es6.mjs
967 970 var __assign = function() {
968 - __assign = Object.assign || function __assign2(t3) {
969 - for (var s2, i2 = 1, n2 = arguments.length; i2 < n2; i2++) {
970 - s2 = arguments[i2];
971 - for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2)) t3[p2] = s2[p2];
971 + __assign = Object.assign || function __assign2(t2) {
972 + for (var s, i = 1, n = arguments.length; i < n; i++) {
973 + s = arguments[i];
974 + for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2)) t2[p2] = s[p2];
972 975 }
973 - return t3;
976 + return t2;
974 977 };
975 978 return __assign.apply(this, arguments);
976 979 };
977 980
@@ -996,13 +999,13 @@
996 999 while (result.charAt(end - 1) === "\0")
997 1000 end--;
998 1001 return result.slice(start, end).split("\0").map(transform).join(delimiter);
999 1002 }
1000 - function replace(input, re2, value) {
1001 - if (re2 instanceof RegExp)
1002 - return input.replace(re2, value);
1003 - return re2.reduce(function(input2, re3) {
1004 - return input2.replace(re3, value);
1003 + function replace(input, re, value) {
1004 + if (re instanceof RegExp)
1005 + return input.replace(re, value);
1006 + return re.reduce(function(input2, re2) {
1007 + return input2.replace(re2, value);
1005 1008 }, input);
1006 1009 }
1007 1010
1008 1011 // node_modules/pascal-case/dist.es2015/index.js
@@ -1038,217 +1041,230 @@
1038 1041 var import_data2 = __toESM(require_data(), 1);
1039 1042 var import_i18n3 = __toESM(require_i18n(), 1);
1040 1043
1041 1044 // node_modules/colord/index.mjs
1042 - var r = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) };
1043 - var t = function(r2) {
1044 - return "string" == typeof r2 ? r2.length > 0 : "number" == typeof r2;
1045 + for (r2 = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, t2 = function(r3) {
1046 + return "string" == typeof r3 ? r3.length > 0 : "number" == typeof r3;
1047 + }, n = function(r3, t3, n2) {
1048 + return void 0 === t3 && (t3 = 0), void 0 === n2 && (n2 = Math.pow(10, t3)), Math.round(n2 * r3) / n2 + 0;
1049 + }, u = function(r3, t3, n2) {
1050 + return void 0 === t3 && (t3 = 0), void 0 === n2 && (n2 = 1), r3 > n2 ? n2 : r3 > t3 ? r3 : t3;
1051 + }, e2 = function(r3) {
1052 + return (r3 = isFinite(r3) ? r3 % 360 : 0) < 0 ? r3 + 360 : r3;
1053 + }, o2 = function(r3, t3) {
1054 + return void 0 === t3 && (t3 = 0), n(r3, t3) % 360;
1055 + }, a = function(r3) {
1056 + return { r: u(r3.r, 0, 255), g: u(r3.g, 0, 255), b: u(r3.b, 0, 255), a: u(r3.a) };
1057 + }, i = function(r3) {
1058 + return { r: n(r3.r), g: n(r3.g), b: n(r3.b), a: n(r3.a, 3) };
1059 + }, s = /^#([0-9a-f]{3,8})$/i, d2 = function(r3, t3) {
1060 + var n2 = r3.charCodeAt(t3);
1061 + return (15 & n2) + 9 * (n2 >> 6);
1062 + }, h = function(r3, t3) {
1063 + return d2(r3, t3) << 4 | d2(r3, t3 + 1);
1064 + }, b2 = [], f2 = 0; f2 < 256; f2++) b2.push((f2 < 16 ? "0" : "") + f2.toString(16));
1065 + var r2;
1066 + var t2;
1067 + var n;
1068 + var u;
1069 + var e2;
1070 + var o2;
1071 + var a;
1072 + var i;
1073 + var s;
1074 + var d2;
1075 + var h;
1076 + var b2;
1077 + var f2;
1078 + var g = function(r2) {
1079 + return b2[u(r2, 0, 255)];
1045 1080 };
1046 - var n = function(r2, t3, n2) {
1047 - return void 0 === t3 && (t3 = 0), void 0 === n2 && (n2 = Math.pow(10, t3)), Math.round(n2 * r2) / n2 + 0;
1081 + var c = function(r2) {
1082 + var t2 = r2.r, n = r2.g, u = r2.b, e2 = r2.a, o2 = Math.max(t2, n, u), a = o2 - Math.min(t2, n, u), i = a ? o2 === t2 ? (n - u) / a : o2 === n ? 2 + (u - t2) / a : 4 + (t2 - n) / a : 0;
1083 + return { h: 60 * (i < 0 ? i + 6 : i), s: o2 ? a / o2 * 100 : 0, v: o2 / 255 * 100, a: e2 };
1048 1084 };
1049 - var e = function(r2, t3, n2) {
1050 - return void 0 === t3 && (t3 = 0), void 0 === n2 && (n2 = 1), r2 > n2 ? n2 : r2 > t3 ? r2 : t3;
1085 + var v = function(r2) {
1086 + var t2 = r2.h, n = r2.s, u = r2.v, e2 = r2.a;
1087 + t2 = t2 / 360 * 6, n /= 100, u /= 100;
1088 + var o2 = Math.floor(t2), a = u * (1 - n), i = u * (1 - (t2 - o2) * n), s = u * (1 - (1 - t2 + o2) * n), d2 = o2 % 6;
1089 + return { r: 255 * [u, i, a, a, s, u][d2], g: 255 * [s, u, u, i, a, a][d2], b: 255 * [a, a, s, u, u, i][d2], a: e2 };
1051 1090 };
1052 - var u = function(r2) {
1053 - return (r2 = isFinite(r2) ? r2 % 360 : 0) > 0 ? r2 : r2 + 360;
1091 + var l = function(r2) {
1092 + return { h: e2(r2.h), s: u(r2.s, 0, 100), l: u(r2.l, 0, 100), a: u(r2.a) };
1054 1093 };
1055 - var a = function(r2) {
1056 - return { r: e(r2.r, 0, 255), g: e(r2.g, 0, 255), b: e(r2.b, 0, 255), a: e(r2.a) };
1094 + var p = function(r2) {
1095 + return { h: o2(r2.h), s: n(r2.s), l: n(r2.l), a: n(r2.a, 3) };
1057 1096 };
1058 - var o = function(r2) {
1059 - return { r: n(r2.r), g: n(r2.g), b: n(r2.b), a: n(r2.a, 3) };
1097 + var m = function(r2) {
1098 + return v((n = (t2 = r2).s, { h: t2.h, s: (n *= ((u = t2.l) < 50 ? u : 100 - u) / 100) > 0 ? 2 * n / (u + n) * 100 : 0, v: u + n, a: t2.a }));
1099 + var t2, n, u;
1060 1100 };
1061 - var i = /^#([0-9a-f]{3,8})$/i;
1062 - var s = function(r2) {
1063 - var t3 = r2.toString(16);
1064 - return t3.length < 2 ? "0" + t3 : t3;
1101 + var y = function(r2) {
1102 + return { h: (t2 = c(r2)).h, s: (e2 = (200 - (n = t2.s)) * (u = t2.v) / 100) > 0 && e2 < 200 ? n * u / 100 / (e2 <= 100 ? e2 : 200 - e2) * 100 : 0, l: e2 / 2, a: t2.a };
1103 + var t2, n, u, e2;
1065 1104 };
1066 - var h = function(r2) {
1067 - var t3 = r2.r, n2 = r2.g, e2 = r2.b, u2 = r2.a, a2 = Math.max(t3, n2, e2), o3 = a2 - Math.min(t3, n2, e2), i2 = o3 ? a2 === t3 ? (n2 - e2) / o3 : a2 === n2 ? 2 + (e2 - t3) / o3 : 4 + (t3 - n2) / o3 : 0;
1068 - return { h: 60 * (i2 < 0 ? i2 + 6 : i2), s: a2 ? o3 / a2 * 100 : 0, v: a2 / 255 * 100, a: u2 };
1069 - };
1070 - var b = function(r2) {
1071 - var t3 = r2.h, n2 = r2.s, e2 = r2.v, u2 = r2.a;
1072 - t3 = t3 / 360 * 6, n2 /= 100, e2 /= 100;
1073 - var a2 = Math.floor(t3), o3 = e2 * (1 - n2), i2 = e2 * (1 - (t3 - a2) * n2), s2 = e2 * (1 - (1 - t3 + a2) * n2), h2 = a2 % 6;
1074 - return { r: 255 * [e2, i2, o3, o3, s2, e2][h2], g: 255 * [s2, e2, e2, i2, o3, o3][h2], b: 255 * [o3, o3, s2, e2, e2, i2][h2], a: u2 };
1075 - };
1076 - var g = function(r2) {
1077 - return { h: u(r2.h), s: e(r2.s, 0, 100), l: e(r2.l, 0, 100), a: e(r2.a) };
1078 - };
1079 - var d = function(r2) {
1080 - return { h: n(r2.h), s: n(r2.s), l: n(r2.l), a: n(r2.a, 3) };
1081 - };
1082 - var f = function(r2) {
1083 - return b((n2 = (t3 = r2).s, { h: t3.h, s: (n2 *= ((e2 = t3.l) < 50 ? e2 : 100 - e2) / 100) > 0 ? 2 * n2 / (e2 + n2) * 100 : 0, v: e2 + n2, a: t3.a }));
1084 - var t3, n2, e2;
1085 - };
1086 - var c = function(r2) {
1087 - return { h: (t3 = h(r2)).h, s: (u2 = (200 - (n2 = t3.s)) * (e2 = t3.v) / 100) > 0 && u2 < 200 ? n2 * e2 / 100 / (u2 <= 100 ? u2 : 200 - u2) * 100 : 0, l: u2 / 2, a: t3.a };
1088 - var t3, n2, e2, u2;
1089 - };
1090 - var l = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
1091 - var p = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
1092 - var v = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
1093 - var m = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
1094 - var y = { string: [[function(r2) {
1095 - var t3 = i.exec(r2);
1096 - return t3 ? (r2 = t3[1]).length <= 4 ? { r: parseInt(r2[0] + r2[0], 16), g: parseInt(r2[1] + r2[1], 16), b: parseInt(r2[2] + r2[2], 16), a: 4 === r2.length ? n(parseInt(r2[3] + r2[3], 16) / 255, 2) : 1 } : 6 === r2.length || 8 === r2.length ? { r: parseInt(r2.substr(0, 2), 16), g: parseInt(r2.substr(2, 2), 16), b: parseInt(r2.substr(4, 2), 16), a: 8 === r2.length ? n(parseInt(r2.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
1105 + var N = /^hsla?\(\s*([+-]?(?:\d*\.\d+|\d+))(deg|rad|grad|turn)?\s*,\s*([+-]?(?:\d*\.\d+|\d+))%\s*,\s*([+-]?(?:\d*\.\d+|\d+))%\s*(?:,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i;
1106 + var x = /^hsla?\(\s*([+-]?(?:\d*\.\d+|\d+))(deg|rad|grad|turn)?\s+([+-]?(?:\d*\.\d+|\d+))%\s+([+-]?(?:\d*\.\d+|\d+))%\s*(?:\/\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i;
1107 + var M = /^rgba?\(\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*(?:,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i;
1108 + var H = /^rgba?\(\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s+([+-]?(?:\d*\.\d+|\d+))(%)?\s+([+-]?(?:\d*\.\d+|\d+))(%)?\s*(?:\/\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i;
1109 + var $ = { string: [[function(r2) {
1110 + if (!s.test(r2)) return null;
1111 + var t2 = r2.length;
1112 + return t2 <= 5 ? { r: 17 * d2(r2, 1), g: 17 * d2(r2, 2), b: 17 * d2(r2, 3), a: 5 === t2 ? n(17 * d2(r2, 4) / 255, 2) : 1 } : 7 === t2 || 9 === t2 ? { r: h(r2, 1), g: h(r2, 3), b: h(r2, 5), a: 9 === t2 ? n(h(r2, 7) / 255, 2) : 1 } : null;
1097 1113 }, "hex"], [function(r2) {
1098 - var t3 = v.exec(r2) || m.exec(r2);
1099 - return t3 ? t3[2] !== t3[4] || t3[4] !== t3[6] ? null : a({ r: Number(t3[1]) / (t3[2] ? 100 / 255 : 1), g: Number(t3[3]) / (t3[4] ? 100 / 255 : 1), b: Number(t3[5]) / (t3[6] ? 100 / 255 : 1), a: void 0 === t3[7] ? 1 : Number(t3[7]) / (t3[8] ? 100 : 1) }) : null;
1100 - }, "rgb"], [function(t3) {
1101 - var n2 = l.exec(t3) || p.exec(t3);
1102 - if (!n2) return null;
1103 - var e2, u2, a2 = g({ h: (e2 = n2[1], u2 = n2[2], void 0 === u2 && (u2 = "deg"), Number(e2) * (r[u2] || 1)), s: Number(n2[3]), l: Number(n2[4]), a: void 0 === n2[5] ? 1 : Number(n2[5]) / (n2[6] ? 100 : 1) });
1104 - return f(a2);
1114 + var t2 = M.exec(r2) || H.exec(r2);
1115 + return t2 ? t2[2] !== t2[4] || t2[4] !== t2[6] ? null : a({ r: Number(t2[1]) / (t2[2] ? 100 / 255 : 1), g: Number(t2[3]) / (t2[4] ? 100 / 255 : 1), b: Number(t2[5]) / (t2[6] ? 100 / 255 : 1), a: void 0 === t2[7] ? 1 : Number(t2[7]) / (t2[8] ? 100 : 1) }) : null;
1116 + }, "rgb"], [function(t2) {
1117 + var n = N.exec(t2) || x.exec(t2);
1118 + if (!n) return null;
1119 + var u, e2, o2 = l({ h: (u = n[1], e2 = n[2], void 0 === e2 && (e2 = "deg"), Number(u) * (r2[e2] || 1)), s: Number(n[3]), l: Number(n[4]), a: void 0 === n[5] ? 1 : Number(n[5]) / (n[6] ? 100 : 1) });
1120 + return m(o2);
1105 1121 }, "hsl"]], object: [[function(r2) {
1106 - var n2 = r2.r, e2 = r2.g, u2 = r2.b, o3 = r2.a, i2 = void 0 === o3 ? 1 : o3;
1107 - return t(n2) && t(e2) && t(u2) ? a({ r: Number(n2), g: Number(e2), b: Number(u2), a: Number(i2) }) : null;
1122 + var n = r2.r, u = r2.g, e2 = r2.b, o2 = r2.a, i = void 0 === o2 ? 1 : o2;
1123 + return t2(n) && t2(u) && t2(e2) ? a({ r: Number(n), g: Number(u), b: Number(e2), a: Number(i) }) : null;
1108 1124 }, "rgb"], [function(r2) {
1109 - var n2 = r2.h, e2 = r2.s, u2 = r2.l, a2 = r2.a, o3 = void 0 === a2 ? 1 : a2;
1110 - if (!t(n2) || !t(e2) || !t(u2)) return null;
1111 - var i2 = g({ h: Number(n2), s: Number(e2), l: Number(u2), a: Number(o3) });
1112 - return f(i2);
1125 + var n = r2.h, u = r2.s, e2 = r2.l, o2 = r2.a, a = void 0 === o2 ? 1 : o2;
1126 + if (!t2(n) || !t2(u) || !t2(e2)) return null;
1127 + var i = l({ h: Number(n), s: Number(u), l: Number(e2), a: Number(a) });
1128 + return m(i);
1113 1129 }, "hsl"], [function(r2) {
1114 - var n2 = r2.h, a2 = r2.s, o3 = r2.v, i2 = r2.a, s2 = void 0 === i2 ? 1 : i2;
1115 - if (!t(n2) || !t(a2) || !t(o3)) return null;
1116 - var h2 = (function(r3) {
1117 - return { h: u(r3.h), s: e(r3.s, 0, 100), v: e(r3.v, 0, 100), a: e(r3.a) };
1118 - })({ h: Number(n2), s: Number(a2), v: Number(o3), a: Number(s2) });
1119 - return b(h2);
1130 + var n = r2.h, o2 = r2.s, a = r2.v, i = r2.a, s = void 0 === i ? 1 : i;
1131 + if (!t2(n) || !t2(o2) || !t2(a)) return null;
1132 + var d2 = (function(r3) {
1133 + return { h: e2(r3.h), s: u(r3.s, 0, 100), v: u(r3.v, 0, 100), a: u(r3.a) };
1134 + })({ h: Number(n), s: Number(o2), v: Number(a), a: Number(s) });
1135 + return v(d2);
1120 1136 }, "hsv"]] };
1121 - var N = function(r2, t3) {
1122 - for (var n2 = 0; n2 < t3.length; n2++) {
1123 - var e2 = t3[n2][0](r2);
1124 - if (e2) return [e2, t3[n2][1]];
1137 + var j = function(r2, t2) {
1138 + for (var n = 0; n < t2.length; n++) {
1139 + var u = t2[n][0](r2);
1140 + if (u) return [u, t2[n][1]];
1125 1141 }
1126 1142 return [null, void 0];
1127 1143 };
1128 - var x = function(r2) {
1129 - return "string" == typeof r2 ? N(r2.trim(), y.string) : "object" == typeof r2 && null !== r2 ? N(r2, y.object) : [null, void 0];
1144 + var w = function(r2) {
1145 + return "string" == typeof r2 ? j(r2.trim(), $.string) : "object" == typeof r2 && null !== r2 ? j(r2, $.object) : [null, void 0];
1130 1146 };
1131 - var M = function(r2, t3) {
1132 - var n2 = c(r2);
1133 - return { h: n2.h, s: e(n2.s + 100 * t3, 0, 100), l: n2.l, a: n2.a };
1147 + var k = function(r2, t2) {
1148 + var n = y(r2);
1149 + return { h: n.h, s: u(n.s + 100 * t2, 0, 100), l: n.l, a: n.a };
1134 1150 };
1135 - var H = function(r2) {
1151 + var E = function(r2) {
1136 1152 return (299 * r2.r + 587 * r2.g + 114 * r2.b) / 1e3 / 255;
1137 1153 };
1138 - var $ = function(r2, t3) {
1139 - var n2 = c(r2);
1140 - return { h: n2.h, s: n2.s, l: e(n2.l + 100 * t3, 0, 100), a: n2.a };
1154 + var R = function(r2, t2) {
1155 + var n = y(r2);
1156 + return { h: n.h, s: n.s, l: u(n.l + 100 * t2, 0, 100), a: n.a };
1141 1157 };
1142 - var j = (function() {
1158 + var q = (function() {
1143 1159 function r2(r3) {
1144 - this.parsed = x(r3)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
1160 + this.parsed = w(r3)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
1145 1161 }
1146 1162 return r2.prototype.isValid = function() {
1147 1163 return null !== this.parsed;
1148 1164 }, r2.prototype.brightness = function() {
1149 - return n(H(this.rgba), 2);
1165 + return n(E(this.rgba), 2);
1150 1166 }, r2.prototype.isDark = function() {
1151 - return H(this.rgba) < 0.5;
1167 + return E(this.rgba) < 0.5;
1152 1168 }, r2.prototype.isLight = function() {
1153 - return H(this.rgba) >= 0.5;
1169 + return E(this.rgba) >= 0.5;
1154 1170 }, r2.prototype.toHex = function() {
1155 - return r3 = o(this.rgba), t3 = r3.r, e2 = r3.g, u2 = r3.b, i2 = (a2 = r3.a) < 1 ? s(n(255 * a2)) : "", "#" + s(t3) + s(e2) + s(u2) + i2;
1156 - var r3, t3, e2, u2, a2, i2;
1171 + return r3 = i(this.rgba), t2 = r3.r, u = r3.g, e2 = r3.b, a = (o2 = r3.a) < 1 ? g(n(255 * o2)) : "", "#" + g(t2) + g(u) + g(e2) + a;
1172 + var r3, t2, u, e2, o2, a;
1157 1173 }, r2.prototype.toRgb = function() {
1158 - return o(this.rgba);
1174 + return i(this.rgba);
1159 1175 }, r2.prototype.toRgbString = function() {
1160 - return r3 = o(this.rgba), t3 = r3.r, n2 = r3.g, e2 = r3.b, (u2 = r3.a) < 1 ? "rgba(" + t3 + ", " + n2 + ", " + e2 + ", " + u2 + ")" : "rgb(" + t3 + ", " + n2 + ", " + e2 + ")";
1161 - var r3, t3, n2, e2, u2;
1176 + return r3 = i(this.rgba), t2 = r3.r, n = r3.g, u = r3.b, (e2 = r3.a) < 1 ? "rgba(" + t2 + ", " + n + ", " + u + ", " + e2 + ")" : "rgb(" + t2 + ", " + n + ", " + u + ")";
1177 + var r3, t2, n, u, e2;
1162 1178 }, r2.prototype.toHsl = function() {
1163 - return d(c(this.rgba));
1179 + return p(y(this.rgba));
1164 1180 }, r2.prototype.toHslString = function() {
1165 - return r3 = d(c(this.rgba)), t3 = r3.h, n2 = r3.s, e2 = r3.l, (u2 = r3.a) < 1 ? "hsla(" + t3 + ", " + n2 + "%, " + e2 + "%, " + u2 + ")" : "hsl(" + t3 + ", " + n2 + "%, " + e2 + "%)";
1166 - var r3, t3, n2, e2, u2;
1181 + return r3 = p(y(this.rgba)), t2 = r3.h, n = r3.s, u = r3.l, (e2 = r3.a) < 1 ? "hsla(" + t2 + ", " + n + "%, " + u + "%, " + e2 + ")" : "hsl(" + t2 + ", " + n + "%, " + u + "%)";
1182 + var r3, t2, n, u, e2;
1167 1183 }, r2.prototype.toHsv = function() {
1168 - return r3 = h(this.rgba), { h: n(r3.h), s: n(r3.s), v: n(r3.v), a: n(r3.a, 3) };
1184 + return r3 = c(this.rgba), { h: o2(r3.h), s: n(r3.s), v: n(r3.v), a: n(r3.a, 3) };
1169 1185 var r3;
1170 1186 }, r2.prototype.invert = function() {
1171 - return w({ r: 255 - (r3 = this.rgba).r, g: 255 - r3.g, b: 255 - r3.b, a: r3.a });
1187 + return A({ r: 255 - (r3 = this.rgba).r, g: 255 - r3.g, b: 255 - r3.b, a: r3.a });
1172 1188 var r3;
1173 1189 }, r2.prototype.saturate = function(r3) {
1174 - return void 0 === r3 && (r3 = 0.1), w(M(this.rgba, r3));
1190 + return void 0 === r3 && (r3 = 0.1), A(k(this.rgba, r3));
1175 1191 }, r2.prototype.desaturate = function(r3) {
1176 - return void 0 === r3 && (r3 = 0.1), w(M(this.rgba, -r3));
1192 + return void 0 === r3 && (r3 = 0.1), A(k(this.rgba, -r3));
1177 1193 }, r2.prototype.grayscale = function() {
1178 - return w(M(this.rgba, -1));
1194 + return A(k(this.rgba, -1));
1179 1195 }, r2.prototype.lighten = function(r3) {
1180 - return void 0 === r3 && (r3 = 0.1), w($(this.rgba, r3));
1196 + return void 0 === r3 && (r3 = 0.1), A(R(this.rgba, r3));
1181 1197 }, r2.prototype.darken = function(r3) {
1182 - return void 0 === r3 && (r3 = 0.1), w($(this.rgba, -r3));
1198 + return void 0 === r3 && (r3 = 0.1), A(R(this.rgba, -r3));
1183 1199 }, r2.prototype.rotate = function(r3) {
1184 - return void 0 === r3 && (r3 = 15), this.hue(this.hue() + r3);
1200 + return void 0 === r3 && (r3 = 15), this.hue(y(this.rgba).h + r3);
1185 1201 }, r2.prototype.alpha = function(r3) {
1186 - return "number" == typeof r3 ? w({ r: (t3 = this.rgba).r, g: t3.g, b: t3.b, a: r3 }) : n(this.rgba.a, 3);
1187 - var t3;
1202 + return "number" == typeof r3 ? A({ r: (t2 = this.rgba).r, g: t2.g, b: t2.b, a: r3 }) : n(this.rgba.a, 3);
1203 + var t2;
1188 1204 }, r2.prototype.hue = function(r3) {
1189 - var t3 = c(this.rgba);
1190 - return "number" == typeof r3 ? w({ h: r3, s: t3.s, l: t3.l, a: t3.a }) : n(t3.h);
1205 + var t2 = y(this.rgba);
1206 + return "number" == typeof r3 ? A({ h: r3, s: t2.s, l: t2.l, a: t2.a }) : o2(t2.h);
1191 1207 }, r2.prototype.isEqual = function(r3) {
1192 - return this.toHex() === w(r3).toHex();
1208 + return this.toHex() === A(r3).toHex();
1193 1209 }, r2;
1194 1210 })();
1195 - var w = function(r2) {
1196 - return r2 instanceof j ? r2 : new j(r2);
1211 + var A = function(r2) {
1212 + return r2 instanceof q ? r2 : new q(r2);
1197 1213 };
1198 - var S = [];
1199 - var k = function(r2) {
1214 + var C = [];
1215 + var D = function(r2) {
1200 1216 r2.forEach(function(r3) {
1201 - S.indexOf(r3) < 0 && (r3(j, y), S.push(r3));
1217 + C.indexOf(r3) < 0 && (r3(q, $), C.push(r3));
1202 1218 });
1203 1219 };
1204 1220
1205 1221 // node_modules/colord/plugins/names.mjs
1206 - function names_default(e2, f2) {
1207 - var a2 = { white: "#ffffff", bisque: "#ffe4c4", blue: "#0000ff", cadetblue: "#5f9ea0", chartreuse: "#7fff00", chocolate: "#d2691e", coral: "#ff7f50", antiquewhite: "#faebd7", aqua: "#00ffff", azure: "#f0ffff", whitesmoke: "#f5f5f5", papayawhip: "#ffefd5", plum: "#dda0dd", blanchedalmond: "#ffebcd", black: "#000000", gold: "#ffd700", goldenrod: "#daa520", gainsboro: "#dcdcdc", cornsilk: "#fff8dc", cornflowerblue: "#6495ed", burlywood: "#deb887", aquamarine: "#7fffd4", beige: "#f5f5dc", crimson: "#dc143c", cyan: "#00ffff", darkblue: "#00008b", darkcyan: "#008b8b", darkgoldenrod: "#b8860b", darkkhaki: "#bdb76b", darkgray: "#a9a9a9", darkgreen: "#006400", darkgrey: "#a9a9a9", peachpuff: "#ffdab9", darkmagenta: "#8b008b", darkred: "#8b0000", darkorchid: "#9932cc", darkorange: "#ff8c00", darkslateblue: "#483d8b", gray: "#808080", darkslategray: "#2f4f4f", darkslategrey: "#2f4f4f", deeppink: "#ff1493", deepskyblue: "#00bfff", wheat: "#f5deb3", firebrick: "#b22222", floralwhite: "#fffaf0", ghostwhite: "#f8f8ff", darkviolet: "#9400d3", magenta: "#ff00ff", green: "#008000", dodgerblue: "#1e90ff", grey: "#808080", honeydew: "#f0fff0", hotpink: "#ff69b4", blueviolet: "#8a2be2", forestgreen: "#228b22", lawngreen: "#7cfc00", indianred: "#cd5c5c", indigo: "#4b0082", fuchsia: "#ff00ff", brown: "#a52a2a", maroon: "#800000", mediumblue: "#0000cd", lightcoral: "#f08080", darkturquoise: "#00ced1", lightcyan: "#e0ffff", ivory: "#fffff0", lightyellow: "#ffffe0", lightsalmon: "#ffa07a", lightseagreen: "#20b2aa", linen: "#faf0e6", mediumaquamarine: "#66cdaa", lemonchiffon: "#fffacd", lime: "#00ff00", khaki: "#f0e68c", mediumseagreen: "#3cb371", limegreen: "#32cd32", mediumspringgreen: "#00fa9a", lightskyblue: "#87cefa", lightblue: "#add8e6", midnightblue: "#191970", lightpink: "#ffb6c1", mistyrose: "#ffe4e1", moccasin: "#ffe4b5", mintcream: "#f5fffa", lightslategray: "#778899", lightslategrey: "#778899", navajowhite: "#ffdead", navy: "#000080", mediumvioletred: "#c71585", powderblue: "#b0e0e6", palegoldenrod: "#eee8aa", oldlace: "#fdf5e6", paleturquoise: "#afeeee", mediumturquoise: "#48d1cc", mediumorchid: "#ba55d3", rebeccapurple: "#663399", lightsteelblue: "#b0c4de", mediumslateblue: "#7b68ee", thistle: "#d8bfd8", tan: "#d2b48c", orchid: "#da70d6", mediumpurple: "#9370db", purple: "#800080", pink: "#ffc0cb", skyblue: "#87ceeb", springgreen: "#00ff7f", palegreen: "#98fb98", red: "#ff0000", yellow: "#ffff00", slateblue: "#6a5acd", lavenderblush: "#fff0f5", peru: "#cd853f", palevioletred: "#db7093", violet: "#ee82ee", teal: "#008080", slategray: "#708090", slategrey: "#708090", aliceblue: "#f0f8ff", darkseagreen: "#8fbc8f", darkolivegreen: "#556b2f", greenyellow: "#adff2f", seagreen: "#2e8b57", seashell: "#fff5ee", tomato: "#ff6347", silver: "#c0c0c0", sienna: "#a0522d", lavender: "#e6e6fa", lightgreen: "#90ee90", orange: "#ffa500", orangered: "#ff4500", steelblue: "#4682b4", royalblue: "#4169e1", turquoise: "#40e0d0", yellowgreen: "#9acd32", salmon: "#fa8072", saddlebrown: "#8b4513", sandybrown: "#f4a460", rosybrown: "#bc8f8f", darksalmon: "#e9967a", lightgoldenrodyellow: "#fafad2", snow: "#fffafa", lightgrey: "#d3d3d3", lightgray: "#d3d3d3", dimgray: "#696969", dimgrey: "#696969", olivedrab: "#6b8e23", olive: "#808000" }, r2 = {};
1208 - for (var d3 in a2) r2[a2[d3]] = d3;
1222 + var e = function(e2, f2) {
1223 + var a = { white: "#ffffff", bisque: "#ffe4c4", blue: "#0000ff", cadetblue: "#5f9ea0", chartreuse: "#7fff00", chocolate: "#d2691e", coral: "#ff7f50", antiquewhite: "#faebd7", aqua: "#00ffff", azure: "#f0ffff", whitesmoke: "#f5f5f5", papayawhip: "#ffefd5", plum: "#dda0dd", blanchedalmond: "#ffebcd", black: "#000000", gold: "#ffd700", goldenrod: "#daa520", gainsboro: "#dcdcdc", cornsilk: "#fff8dc", cornflowerblue: "#6495ed", burlywood: "#deb887", aquamarine: "#7fffd4", beige: "#f5f5dc", crimson: "#dc143c", cyan: "#00ffff", darkblue: "#00008b", darkcyan: "#008b8b", darkgoldenrod: "#b8860b", darkkhaki: "#bdb76b", darkgray: "#a9a9a9", darkgreen: "#006400", darkgrey: "#a9a9a9", peachpuff: "#ffdab9", darkmagenta: "#8b008b", darkred: "#8b0000", darkorchid: "#9932cc", darkorange: "#ff8c00", darkslateblue: "#483d8b", gray: "#808080", darkslategray: "#2f4f4f", darkslategrey: "#2f4f4f", deeppink: "#ff1493", deepskyblue: "#00bfff", wheat: "#f5deb3", firebrick: "#b22222", floralwhite: "#fffaf0", ghostwhite: "#f8f8ff", darkviolet: "#9400d3", magenta: "#ff00ff", green: "#008000", dodgerblue: "#1e90ff", grey: "#808080", honeydew: "#f0fff0", hotpink: "#ff69b4", blueviolet: "#8a2be2", forestgreen: "#228b22", lawngreen: "#7cfc00", indianred: "#cd5c5c", indigo: "#4b0082", fuchsia: "#ff00ff", brown: "#a52a2a", maroon: "#800000", mediumblue: "#0000cd", lightcoral: "#f08080", darkturquoise: "#00ced1", lightcyan: "#e0ffff", ivory: "#fffff0", lightyellow: "#ffffe0", lightsalmon: "#ffa07a", lightseagreen: "#20b2aa", linen: "#faf0e6", mediumaquamarine: "#66cdaa", lemonchiffon: "#fffacd", lime: "#00ff00", khaki: "#f0e68c", mediumseagreen: "#3cb371", limegreen: "#32cd32", mediumspringgreen: "#00fa9a", lightskyblue: "#87cefa", lightblue: "#add8e6", midnightblue: "#191970", lightpink: "#ffb6c1", mistyrose: "#ffe4e1", moccasin: "#ffe4b5", mintcream: "#f5fffa", lightslategray: "#778899", lightslategrey: "#778899", navajowhite: "#ffdead", navy: "#000080", mediumvioletred: "#c71585", powderblue: "#b0e0e6", palegoldenrod: "#eee8aa", oldlace: "#fdf5e6", paleturquoise: "#afeeee", mediumturquoise: "#48d1cc", mediumorchid: "#ba55d3", rebeccapurple: "#663399", lightsteelblue: "#b0c4de", mediumslateblue: "#7b68ee", thistle: "#d8bfd8", tan: "#d2b48c", orchid: "#da70d6", mediumpurple: "#9370db", purple: "#800080", pink: "#ffc0cb", skyblue: "#87ceeb", springgreen: "#00ff7f", palegreen: "#98fb98", red: "#ff0000", yellow: "#ffff00", slateblue: "#6a5acd", lavenderblush: "#fff0f5", peru: "#cd853f", palevioletred: "#db7093", violet: "#ee82ee", teal: "#008080", slategray: "#708090", slategrey: "#708090", aliceblue: "#f0f8ff", darkseagreen: "#8fbc8f", darkolivegreen: "#556b2f", greenyellow: "#adff2f", seagreen: "#2e8b57", seashell: "#fff5ee", tomato: "#ff6347", silver: "#c0c0c0", sienna: "#a0522d", lavender: "#e6e6fa", lightgreen: "#90ee90", orange: "#ffa500", orangered: "#ff4500", steelblue: "#4682b4", royalblue: "#4169e1", turquoise: "#40e0d0", yellowgreen: "#9acd32", salmon: "#fa8072", saddlebrown: "#8b4513", sandybrown: "#f4a460", rosybrown: "#bc8f8f", darksalmon: "#e9967a", lightgoldenrodyellow: "#fafad2", snow: "#fffafa", lightgrey: "#d3d3d3", lightgray: "#d3d3d3", dimgray: "#696969", dimgrey: "#696969", olivedrab: "#6b8e23", olive: "#808000" }, r2 = {};
1224 + for (var d2 in a) r2[a[d2]] = d2;
1209 1225 var l4 = {};
1210 1226 e2.prototype.toName = function(f3) {
1211 1227 if (!(this.rgba.a || this.rgba.r || this.rgba.g || this.rgba.b)) return "transparent";
1212 - var d4, i2, n2 = r2[this.toHex()];
1213 - if (n2) return n2;
1228 + var d3, i, n = r2[this.toHex()];
1229 + if (n) return n;
1214 1230 if (null == f3 ? void 0 : f3.closest) {
1215 - var o3 = this.toRgb(), t3 = 1 / 0, b3 = "black";
1216 - if (!l4.length) for (var c2 in a2) l4[c2] = new e2(a2[c2]).toRgb();
1217 - for (var g3 in a2) {
1218 - var u2 = (d4 = o3, i2 = l4[g3], Math.pow(d4.r - i2.r, 2) + Math.pow(d4.g - i2.g, 2) + Math.pow(d4.b - i2.b, 2));
1219 - u2 < t3 && (t3 = u2, b3 = g3);
1231 + var o2 = this.toRgb(), t2 = 1 / 0, b2 = "black";
1232 + if (!l4.length) for (var c2 in a) l4[c2] = new e2(a[c2]).toRgb();
1233 + for (var g2 in a) {
1234 + var u = (d3 = o2, i = l4[g2], Math.pow(d3.r - i.r, 2) + Math.pow(d3.g - i.g, 2) + Math.pow(d3.b - i.b, 2));
1235 + u < t2 && (t2 = u, b2 = g2);
1220 1236 }
1221 - return b3;
1237 + return b2;
1222 1238 }
1223 1239 };
1224 1240 f2.string.push([function(f3) {
1225 - var r3 = f3.toLowerCase(), d4 = "transparent" === r3 ? "#0000" : a2[r3];
1226 - return d4 ? new e2(d4).toRgb() : null;
1241 + var r3 = f3.toLowerCase(), d3 = "transparent" === r3 ? "#0000" : a[r3];
1242 + return d3 ? new e2(d3).toRgb() : null;
1227 1243 }, "name"]);
1228 - }
1244 + };
1229 1245
1230 1246 // node_modules/colord/plugins/a11y.mjs
1231 - var o2 = function(o3) {
1232 - var t3 = o3 / 255;
1233 - return t3 < 0.04045 ? t3 / 12.92 : Math.pow((t3 + 0.055) / 1.055, 2.4);
1247 + var o = function(o2) {
1248 + var t2 = o2 / 255;
1249 + return t2 < 0.04045 ? t2 / 12.92 : Math.pow((t2 + 0.055) / 1.055, 2.4);
1234 1250 };
1235 - var t2 = function(t3) {
1236 - return 0.2126 * o2(t3.r) + 0.7152 * o2(t3.g) + 0.0722 * o2(t3.b);
1251 + var t = function(t2) {
1252 + return 0.2126 * o(t2.r) + 0.7152 * o(t2.g) + 0.0722 * o(t2.b);
1237 1253 };
1238 - function a11y_default(o3) {
1239 - o3.prototype.luminance = function() {
1240 - return o4 = t2(this.rgba), void 0 === (r2 = 2) && (r2 = 0), void 0 === n2 && (n2 = Math.pow(10, r2)), Math.round(n2 * o4) / n2 + 0;
1241 - var o4, r2, n2;
1242 - }, o3.prototype.contrast = function(r2) {
1254 + var r = function(o2) {
1255 + o2.prototype.luminance = function() {
1256 + return o3 = t(this.rgba), void 0 === (r2 = 2) && (r2 = 0), void 0 === n && (n = Math.pow(10, r2)), Math.round(n * o3) / n + 0;
1257 + var o3, r2, n;
1258 + }, o2.prototype.contrast = function(r2) {
1243 1259 void 0 === r2 && (r2 = "#FFF");
1244 - var n2, a2, i2, e2, v3, u2, d3, c2 = r2 instanceof o3 ? r2 : new o3(r2);
1245 - return e2 = this.rgba, v3 = c2.toRgb(), u2 = t2(e2), d3 = t2(v3), n2 = u2 > d3 ? (u2 + 0.05) / (d3 + 0.05) : (d3 + 0.05) / (u2 + 0.05), void 0 === (a2 = 2) && (a2 = 0), void 0 === i2 && (i2 = Math.pow(10, a2)), Math.floor(i2 * n2) / i2 + 0;
1246 - }, o3.prototype.isReadable = function(o4, t3) {
1247 - return void 0 === o4 && (o4 = "#FFF"), void 0 === t3 && (t3 = {}), this.contrast(o4) >= (e2 = void 0 === (i2 = (r2 = t3).size) ? "normal" : i2, "AAA" === (a2 = void 0 === (n2 = r2.level) ? "AA" : n2) && "normal" === e2 ? 7 : "AA" === a2 && "large" === e2 ? 3 : 4.5);
1248 - var r2, n2, a2, i2, e2;
1260 + var n, a, i, e2, v3, u, d2, c2 = r2 instanceof o2 ? r2 : new o2(r2);
1261 + return e2 = this.rgba, v3 = c2.toRgb(), u = t(e2), d2 = t(v3), n = u > d2 ? (u + 0.05) / (d2 + 0.05) : (d2 + 0.05) / (u + 0.05), void 0 === (a = 2) && (a = 0), void 0 === i && (i = Math.pow(10, a)), Math.floor(i * n) / i + 0;
1262 + }, o2.prototype.isReadable = function(o3, t2) {
1263 + return void 0 === o3 && (o3 = "#FFF"), void 0 === t2 && (t2 = {}), this.contrast(o3) >= (e2 = void 0 === (i = (r2 = t2).size) ? "normal" : i, "AAA" === (a = void 0 === (n = r2.level) ? "AA" : n) && "normal" === e2 ? 7 : "AA" === a && "large" === e2 ? 3 : 4.5);
1264 + var r2, n, a, i, e2;
1249 1265 };
1250 - }
1266 + };
1251 1267
1252 1268 // packages/blocks/build-module/api/utils.mjs
1253 1269 var import_element = __toESM(require_element(), 1);
1254 1270 var import_i18n2 = __toESM(require_i18n(), 1);
@@ -1529,8 +1545,13 @@
1529 1545 value: ["typography", "textIndent"],
1530 1546 support: ["typography", "textIndent"],
1531 1547 useEngine: true
1532 1548 },
1549 + textShadow: {
1550 + value: ["typography", "textShadow"],
1551 + support: ["typography", "textShadow"],
1552 + useEngine: true
1553 + },
1533 1554 writingMode: {
1534 1555 value: ["typography", "writingMode"],
1535 1556 support: ["typography", "__experimentalWritingMode"],
1536 1557 useEngine: true
@@ -1558,8 +1579,9 @@
1558 1579 h6: "h6",
1559 1580 button: ".wp-element-button, .wp-block-button__link",
1560 1581 caption: ".wp-element-caption, .wp-block-audio figcaption, .wp-block-embed figcaption, .wp-block-gallery figcaption, .wp-block-image figcaption, .wp-block-table figcaption, .wp-block-video figcaption",
1561 1582 cite: "cite",
1583 + label: "label",
1562 1584 select: "select",
1563 1585 textInput: "textarea, input:where([type=email],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=url])"
1564 1586 };
1565 1587 var __EXPERIMENTAL_PATHS_WITH_OVERRIDE = {
@@ -1904,9 +1926,9 @@
1904 1926 return unlock((0, import_data.select)(store)).getAllBlockBindingsSources();
1905 1927 }
1906 1928
1907 1929 // packages/blocks/build-module/api/utils.mjs
1908 - k([names_default, a11y_default]);
1930 + D([e, r]);
1909 1931 var ICON_COLORS = ["#191e23", "#f8f9f9"];
1910 1932 function isUnmodifiedBlock(block, role) {
1911 1933 const blockAttributes = getBlockType(block.name)?.attributes ?? {};
1912 1934 const attributesByRole = role ? Object.entries(blockAttributes).filter(([key, definition]) => {
@@ -1941,9 +1963,9 @@
1941 1963 return { src: resolvedIcon };
1942 1964 }
1943 1965 const iconDescriptor = resolvedIcon;
1944 1966 if ("background" in iconDescriptor) {
1945 - const colordBgColor = w(iconDescriptor.background);
1967 + const colordBgColor = A(iconDescriptor.background);
1946 1968 const getColorContrast = (iconColor) => colordBgColor.contrast(iconColor);
1947 1969 const maxContrast = Math.max(...ICON_COLORS.map(getColorContrast));
1948 1970 return {
1949 1971 ...iconDescriptor,
@@ -2035,9 +2057,9 @@
2035 2057 }
2036 2058 function isBlockRegistered(name) {
2037 2059 return getBlockType(name) !== void 0;
2038 2060 }
2039 - function __experimentalSanitizeBlockAttributes(name, attributes) {
2061 + function sanitizeBlockAttributes(name, attributes) {
2040 2062 const blockType = getBlockType(name);
2041 2063 if (void 0 === blockType) {
2042 2064 throw new Error(`Block type '${name}' is not registered.`);
2043 2065 }
@@ -2073,8 +2095,15 @@
2073 2095 },
2074 2096 {}
2075 2097 );
2076 2098 }
2099 + function __experimentalSanitizeBlockAttributes(name, attributes) {
2100 + (0, import_deprecated.default)("__experimentalSanitizeBlockAttributes", {
2101 + since: "7.1",
2102 + alternative: "sanitizeBlockAttributes"
2103 + });
2104 + return sanitizeBlockAttributes(name, attributes);
2105 + }
2077 2106 function getBlockAttributesNamesByRole(name, role) {
2078 2107 const attributes = getBlockType(name)?.attributes;
2079 2108 if (!attributes) {
2080 2109 return [];
@@ -2429,8 +2458,9 @@
2429 2458 hasChildBlocksWithInserterSupport: () => hasChildBlocksWithInserterSupport2,
2430 2459 isMatchingSearchTerm: () => isMatchingSearchTerm
2431 2460 });
2432 2461 var import_remove_accents = __toESM(require_remove_accents(), 1);
2462 + var import_es6 = __toESM(require_es6(), 1);
2433 2463 var import_data4 = __toESM(require_data(), 1);
2434 2464 var import_rich_text2 = __toESM(require_rich_text(), 1);
2435 2465 var import_deprecated3 = __toESM(require_deprecated(), 1);
2436 2466
@@ -2460,8 +2490,9 @@
2460 2490 __export(private_selectors_exports, {
2461 2491 getAllBlockBindingsSources: () => getAllBlockBindingsSources,
2462 2492 getBlockBindingsSource: () => getBlockBindingsSource2,
2463 2493 getBlockBindingsSourceFieldsList: () => getBlockBindingsSourceFieldsList,
2494 + getBlockKeyboardShortcuts: () => getBlockKeyboardShortcuts,
2464 2495 getBootstrappedBlockType: () => getBootstrappedBlockType,
2465 2496 getSupportedStyles: () => getSupportedStyles,
2466 2497 getUnprocessedBlockTypes: () => getUnprocessedBlockTypes,
2467 2498 hasContentRoleAttribute: () => hasContentRoleAttribute
@@ -2488,8 +2519,9 @@
2488 2519 "textAlign",
2489 2520 "textDecoration",
2490 2521 "textIndent",
2491 2522 "textTransform",
2523 + "textShadow",
2492 2524 "letterSpacing"
2493 2525 ];
2494 2526 function filterElementBlockSupports(blockSupports, name, element) {
2495 2527 return blockSupports.filter((support) => {
@@ -2595,8 +2627,59 @@
2595 2627 },
2596 2628 (state, source, blockContext) => [source.getFieldsList, source.usesContext, blockContext]
2597 2629 )
2598 2630 );
2631 + var getBlockKeyboardShortcuts = (0, import_data3.createSelector)(
2632 + (state) => {
2633 + const shortcuts = [];
2634 + for (const blockName of Object.keys(state.blockTypes)) {
2635 + for (const variation of state.blockVariations[blockName] ?? []) {
2636 + if (!variation.shortcut) {
2637 + continue;
2638 + }
2639 + shortcuts.push({
2640 + ...variation.shortcut,
2641 + targetBlockName: blockName,
2642 + blockNames: [blockName],
2643 + variationName: variation.name
2644 + });
2645 + }
2646 + const transforms = state.blockTypes[blockName]?.transforms;
2647 + for (const transform of transforms?.to ?? []) {
2648 + if (transform.type !== "block") {
2649 + continue;
2650 + }
2651 + const targetBlockName = transform.blocks?.[0];
2652 + if (!targetBlockName) {
2653 + continue;
2654 + }
2655 + for (const shortcut of transform.shortcuts ?? []) {
2656 + shortcuts.push({
2657 + ...shortcut,
2658 + targetBlockName,
2659 + blockNames: [blockName],
2660 + variationName: shortcut.variationName ?? transform.variationName
2661 + });
2662 + }
2663 + }
2664 + for (const transform of transforms?.from ?? []) {
2665 + if (transform.type !== "block" || !transform.blocks?.length) {
2666 + continue;
2667 + }
2668 + for (const shortcut of transform.shortcuts ?? []) {
2669 + shortcuts.push({
2670 + ...shortcut,
2671 + targetBlockName: blockName,
2672 + blockNames: transform.blocks,
2673 + variationName: shortcut.variationName ?? transform.variationName
2674 + });
2675 + }
2676 + }
2677 + }
2678 + return shortcuts;
2679 + },
2680 + (state) => [state.blockTypes, state.blockVariations]
2681 + );
2599 2682 var hasContentRoleAttribute = (state, blockTypeName) => {
2600 2683 const blockType = getBlockType2(state, blockTypeName);
2601 2684 if (!blockType) {
2602 2685 return false;
@@ -2647,18 +2730,29 @@
2647 2730 (state, blockName) => [
2648 2731 state.blockVariations[blockName]
2649 2732 ]
2650 2733 );
2651 - function getActiveBlockVariation(state, blockName, attributes, scope) {
2734 + function getActiveBlockVariation(state, blockName, attributes, scope, innerContent) {
2652 2735 const variations = getBlockVariations2(state, blockName, scope);
2653 2736 if (!variations) {
2654 2737 return variations;
2655 2738 }
2739 + if (innerContent) {
2740 + const innerContentMatch = variations.find(
2741 + (variation) => variation.innerContent && (0, import_es6.default)(variation.innerContent, innerContent)
2742 + );
2743 + if (innerContentMatch) {
2744 + return innerContentMatch;
2745 + }
2746 + }
2656 2747 const blockType = getBlockType2(state, blockName);
2657 2748 const attributeKeys = Object.keys(blockType?.attributes || {});
2658 2749 let match;
2659 2750 let maxMatchedAttributes = 0;
2660 2751 for (const variation of variations) {
2752 + if (variation.innerContent) {
2753 + continue;
2754 + }
2661 2755 if (Array.isArray(variation.isActive)) {
2662 2756 const definedAttributes = variation.isActive.filter(
2663 2757 (attribute) => {
2664 2758 const topLevelAttribute = attribute.split(".")[0];
@@ -2800,15 +2894,15 @@
2800 2894 });
2801 2895 var import_deprecated5 = __toESM(require_deprecated(), 1);
2802 2896
2803 2897 // node_modules/is-plain-object/dist/is-plain-object.mjs
2804 - function isObject3(o3) {
2805 - return Object.prototype.toString.call(o3) === "[object Object]";
2898 + function isObject3(o2) {
2899 + return Object.prototype.toString.call(o2) === "[object Object]";
2806 2900 }
2807 - function isPlainObject(o3) {
2901 + function isPlainObject(o2) {
2808 2902 var ctor, prot;
2809 - if (isObject3(o3) === false) return false;
2810 - ctor = o3.constructor;
2903 + if (isObject3(o2) === false) return false;
2904 + ctor = o2.constructor;
2811 2905 if (ctor === void 0) return true;
2812 2906 prot = ctor.prototype;
2813 2907 if (isObject3(prot) === false) return false;
2814 2908 if (prot.hasOwnProperty("isPrototypeOf") === false) {
@@ -2926,9 +3020,9 @@
2926 3020 if ("edit" in settings && !(0, import_react_is.isValidElementType)(settings.edit)) {
2927 3021 (0, import_warning2.default)('The "edit" property must be a valid component.');
2928 3022 return;
2929 3023 }
2930 - if (LEGACY_CATEGORY_MAPPING.hasOwnProperty(settings.category)) {
3024 + if (typeof settings.category === "string" && LEGACY_CATEGORY_MAPPING.hasOwnProperty(settings.category)) {
2931 3025 settings.category = LEGACY_CATEGORY_MAPPING[settings.category];
2932 3026 }
2933 3027 if ("category" in settings && !select3.getCategories().some(
2934 3028 ({ slug }) => slug === settings.category
@@ -2945,10 +3039,11 @@
2945 3039 if (typeof settings.title !== "string") {
2946 3040 (0, import_warning2.default)("Block titles must be strings.");
2947 3041 return;
2948 3042 }
2949 - settings.icon = normalizeIconObject(settings.icon);
2950 - if (!isValidIcon(settings.icon.src)) {
3043 + const icon = normalizeIconObject(settings.icon);
3044 + settings.icon = icon;
3045 + if (!isValidIcon(icon.src)) {
2951 3046 (0, import_warning2.default)(
2952 3047 "The icon passed is invalid. The icon should be a string, an element, a function, or an object following the specifications documented in https://developer.wordpress.org/block-editor/developers/block-api/block-registration/#icon-optional"
2953 3048 );
2954 3049 return;
@@ -3154,10 +3249,10 @@
3154 3249 unlock(store).registerPrivateActions(private_actions_exports);
3155 3250
3156 3251 // node_modules/uuid/dist/stringify.js
3157 3252 var byteToHex = [];
3158 - for (let i2 = 0; i2 < 256; ++i2) {
3159 - byteToHex.push((i2 + 256).toString(16).slice(1));
3253 + for (let i = 0; i < 256; ++i) {
3254 + byteToHex.push((i + 256).toString(16).slice(1));
3160 3255 }
3161 3256 function unsafeStringify(arr, offset = 0) {
3162 3257 return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
3163 3258 }
@@ -3187,10 +3282,10 @@
3187 3282 offset = offset || 0;
3188 3283 if (offset < 0 || offset + 16 > buf.length) {
3189 3284 throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
3190 3285 }
3191 - for (let i2 = 0; i2 < 16; ++i2) {
3192 - buf[offset + i2] = rnds[i2];
3286 + for (let i = 0; i < 16; ++i) {
3287 + buf[offset + i] = rnds[i];
3193 3288 }
3194 3289 return buf;
3195 3290 }
3196 3291 return unsafeStringify(rnds);
@@ -3198,10 +3293,13 @@
3198 3293 var v4_default = v4;
3199 3294
3200 3295 // packages/blocks/build-module/api/factory.mjs
3201 3296 var import_hooks2 = __toESM(require_hooks(), 1);
3297 + var import_deprecated6 = __toESM(require_deprecated(), 1);
3298 + var import_warning3 = __toESM(require_warning(), 1);
3299 + var isBlockTypeTransform = (transform) => transform?.type === "block";
3202 3300 var getBlockTypeWithTransformMetadata = (blockType, transform) => transform.variationName ? { ...blockType, variationName: transform.variationName } : blockType;
3203 - function createBlock(name, attributes = {}, innerBlocks = []) {
3301 + function createBlock(name, attributes = {}, innerBlocks = [], innerContent) {
3204 3302 if (!isBlockRegistered(name)) {
3205 3303 return createBlock("core/missing", {
3206 3304 originalName: name,
3207 3305 originalContent: "",
@@ -3207,14 +3305,11 @@
3207 3305 originalContent: "",
3208 3306 originalUndelimitedContent: ""
3209 3307 });
3210 3308 }
3211 - const sanitizedAttributes = __experimentalSanitizeBlockAttributes(
3212 - name,
3213 - attributes
3214 - );
3309 + const sanitizedAttributes = sanitizeBlockAttributes(name, attributes);
3215 3310 const clientId = v4_default();
3216 - return {
3311 + const block = {
3217 3312 clientId,
3218 3313 name,
3219 3314 isValid: true,
3220 3315 attributes: sanitizedAttributes,
@@ -3219,8 +3314,18 @@
3219 3314 isValid: true,
3220 3315 attributes: sanitizedAttributes,
3221 3316 innerBlocks
3222 3317 };
3318 + if (innerContent) {
3319 + if (name === "core/html") {
3320 + block.innerContent = innerContent;
3321 + } else {
3322 + (0, import_warning3.default)(
3323 + `The innerContent argument passed to createBlock for the "${name}" block was ignored. Only the Custom HTML block stores static inner content.`
3324 + );
3325 + }
3326 + }
3327 + return block;
3223 3328 }
3224 3329 function createBlocksFromInnerBlocksTemplate(innerBlocksOrTemplate = []) {
3225 3330 return innerBlocksOrTemplate.map((innerBlock) => {
3226 3331 const innerBlockTemplate = Array.isArray(innerBlock) ? innerBlock : [
@@ -3225,21 +3330,23 @@
3225 3330 return innerBlocksOrTemplate.map((innerBlock) => {
3226 3331 const innerBlockTemplate = Array.isArray(innerBlock) ? innerBlock : [
3227 3332 innerBlock.name,
3228 3333 innerBlock.attributes,
3229 - innerBlock.innerBlocks
3334 + innerBlock.innerBlocks,
3335 + innerBlock.innerContent
3230 3336 ];
3231 - const [name, attributes, innerBlocks = []] = innerBlockTemplate;
3337 + const [name, attributes, innerBlocks = [], innerContent] = innerBlockTemplate;
3232 3338 return createBlock(
3233 3339 name,
3234 3340 attributes,
3235 3341 createBlocksFromInnerBlocksTemplate(
3236 3342 innerBlocks
3237 - )
3343 + ),
3344 + innerContent
3238 3345 );
3239 3346 });
3240 3347 }
3241 - function __experimentalCloneSanitizedBlock(block, mergeAttributes = {}, newInnerBlocks) {
3348 + function cloneSanitizedBlock(block, mergeAttributes = {}, newInnerBlocks) {
3242 3349 const { name } = block;
3243 3350 if (!isBlockRegistered(name)) {
3244 3351 return createBlock("core/missing", {
3245 3352 originalName: name,
@@ -3247,9 +3354,9 @@
3247 3354 originalUndelimitedContent: ""
3248 3355 });
3249 3356 }
3250 3357 const clientId = v4_default();
3251 - const sanitizedAttributes = __experimentalSanitizeBlockAttributes(name, {
3358 + const sanitizedAttributes = sanitizeBlockAttributes(name, {
3252 3359 ...block.attributes,
3253 3360 ...mergeAttributes
3254 3361 });
3255 3362 return {
@@ -3256,12 +3363,19 @@
3256 3363 ...block,
3257 3364 clientId,
3258 3365 attributes: sanitizedAttributes,
3259 3366 innerBlocks: newInnerBlocks || block.innerBlocks.map(
3260 - (innerBlock) => __experimentalCloneSanitizedBlock(innerBlock)
3367 + (innerBlock) => cloneSanitizedBlock(innerBlock)
3261 3368 )
3262 3369 };
3263 3370 }
3371 + function __experimentalCloneSanitizedBlock(block, mergeAttributes = {}, newInnerBlocks) {
3372 + (0, import_deprecated6.default)("__experimentalCloneSanitizedBlock", {
3373 + since: "7.1",
3374 + alternative: "cloneSanitizedBlock"
3375 + });
3376 + return cloneSanitizedBlock(block, mergeAttributes, newInnerBlocks);
3377 + }
3264 3378 function cloneBlock(block, mergeAttributes = {}, newInnerBlocks) {
3265 3379 const clientId = v4_default();
3266 3380 return {
3267 3381 ...block,
@@ -3285,12 +3399,8 @@
3285 3399 }
3286 3400 if (!isWildcardBlockTransform(transform) && !blocks.every((block) => block.name === firstBlockName)) {
3287 3401 return false;
3288 3402 }
3289 - const isBlockType = transform.type === "block";
3290 - if (!isBlockType) {
3291 - return false;
3292 - }
3293 3403 const sourceBlock = blocks[0];
3294 3404 const hasMatchingName = direction !== "from" || transform.blocks.indexOf(sourceBlock.name) !== -1 || isWildcardBlockTransform(transform);
3295 3405 if (!hasMatchingName) {
3296 3406 return false;
@@ -3310,9 +3420,9 @@
3310 3420 const allBlockTypes = getBlockTypes();
3311 3421 const blockTypesWithPossibleFromTransforms = allBlockTypes.flatMap(
3312 3422 (blockType) => {
3313 3423 const fromTransforms = getBlockTransforms("from", blockType.name);
3314 - return fromTransforms.filter(
3424 + return fromTransforms.filter(isBlockTypeTransform).filter(
3315 3425 (transform) => isPossibleTransformForSource(transform, "from", blocks)
3316 3426 ).map(
3317 3427 (transform) => getBlockTypeWithTransformMetadata(blockType, transform)
3318 3428 );
@@ -3326,13 +3436,13 @@
3326 3436 }
3327 3437 const sourceBlock = blocks[0];
3328 3438 const blockType = getBlockType(sourceBlock.name);
3329 3439 const transformsTo = blockType ? getBlockTransforms("to", blockType.name) : [];
3330 - const possibleTransforms = transformsTo.filter((transform) => {
3331 - return transform && isPossibleTransformForSource(transform, "to", blocks);
3332 - });
3440 + const possibleTransforms = transformsTo.filter(isBlockTypeTransform).filter(
3441 + (transform) => isPossibleTransformForSource(transform, "to", blocks)
3442 + );
3333 3443 return possibleTransforms.flatMap((transformation) => {
3334 - return (transformation.blocks || []).map((name) => {
3444 + return (transformation.blocks ?? []).map((name) => {
3335 3445 const transformedBlockType = getBlockType(name);
3336 3446 return transformedBlockType ? getBlockTypeWithTransformMetadata(
3337 3447 transformedBlockType,
3338 3448 transformation
@@ -3337,11 +3447,11 @@
3337 3447 transformedBlockType,
3338 3448 transformation
3339 3449 ) : void 0;
3340 3450 });
3341 - }).filter((bt) => !!bt);
3451 + }).filter((bt2) => !!bt2);
3342 3452 };
3343 - var isWildcardBlockTransform = (t3) => !!t3 && t3.type === "block" && Array.isArray(t3.blocks) && t3.blocks.includes("*");
3453 + var isWildcardBlockTransform = (t2) => isBlockTypeTransform(t2) && Array.isArray(t2.blocks) && t2.blocks.includes("*");
3344 3454 var isContainerGroupBlock = (name) => name === getGroupingBlockName();
3345 3455 function getPossibleBlockTransformations(blocks) {
3346 3456 if (!blocks.length) {
3347 3457 return [];
@@ -3361,14 +3471,14 @@
3361 3471 return [...blockTypesByNameAndVariation.values()];
3362 3472 }
3363 3473 function findTransform(transforms, predicate) {
3364 3474 const hooks = (0, import_hooks2.createHooks)();
3365 - for (let i2 = 0; i2 < transforms.length; i2++) {
3366 - const candidate = transforms[i2];
3475 + for (let i = 0; i < transforms.length; i++) {
3476 + const candidate = transforms[i];
3367 3477 if (predicate(candidate)) {
3368 3478 hooks.addFilter(
3369 3479 "transform",
3370 - "transform/" + i2.toString(),
3480 + "transform/" + i.toString(),
3371 3481 (result) => result ? result : candidate,
3372 3482 candidate.priority
3373 3483 );
3374 3484 }
@@ -3379,37 +3489,15 @@
3379 3489 if (blockTypeOrName === void 0) {
3380 3490 return getBlockTypes().map(({ name }) => getBlockTransforms(direction, name)).flat();
3381 3491 }
3382 3492 const blockType = normalizeBlockType(blockTypeOrName);
3383 - const { name: blockName, transforms } = blockType || {};
3384 - const directionTransforms = transforms?.[direction];
3385 - if (!transforms || !Array.isArray(directionTransforms)) {
3493 + const directionTransforms = blockType?.transforms?.[direction];
3494 + if (!blockType || !Array.isArray(directionTransforms)) {
3386 3495 return [];
3387 3496 }
3388 - const usingMobileTransformations = transforms.supportedMobileTransforms && Array.isArray(transforms.supportedMobileTransforms);
3389 - const filteredTransforms = usingMobileTransformations ? directionTransforms.filter((t3) => {
3390 - if (t3.type === "raw") {
3391 - return true;
3392 - }
3393 - if (t3.type === "prefix") {
3394 - return true;
3395 - }
3396 - if (!t3.blocks || !t3.blocks.length) {
3397 - return false;
3398 - }
3399 - if (isWildcardBlockTransform(t3)) {
3400 - return true;
3401 - }
3402 - return t3.blocks.every(
3403 - (transformBlockName) => transforms.supportedMobileTransforms.includes(
3404 - transformBlockName
3405 - )
3406 - );
3407 - }) : directionTransforms;
3408 - return filteredTransforms.map((transform) => ({
3497 + return directionTransforms.map((transform) => ({
3409 3498 ...transform,
3410 - blockName,
3411 - usingMobileTransformations
3499 + blockName: blockType.name
3412 3500 }));
3413 3501 }
3414 3502 function maybeCheckTransformIsMatch(transform, blocks) {
3415 3503 if (typeof transform.isMatch !== "function") {
@@ -3424,17 +3512,21 @@
3424 3512 const blocksArray = Array.isArray(blocks) ? blocks : [blocks];
3425 3513 const isMultiBlock = blocksArray.length > 1;
3426 3514 const firstBlock = blocksArray[0];
3427 3515 const sourceName = firstBlock.name;
3428 - const transformationsFrom = getBlockTransforms("from", name);
3429 - const transformationsTo = getBlockTransforms("to", sourceName);
3430 - const isMatchingVariation = (t3) => variationName ? t3.variationName === variationName : !t3.variationName;
3516 + const transformationsFrom = getBlockTransforms("from", name).filter(
3517 + isBlockTypeTransform
3518 + );
3519 + const transformationsTo = getBlockTransforms("to", sourceName).filter(
3520 + isBlockTypeTransform
3521 + );
3522 + const isMatchingVariation = (t2) => variationName ? t2.variationName === variationName : !t2.variationName;
3431 3523 const transformation = findTransform(
3432 3524 transformationsTo,
3433 - (t3) => t3.type === "block" && isMatchingVariation(t3) && (isWildcardBlockTransform(t3) || t3.blocks.indexOf(name) !== -1) && (!isMultiBlock || !!t3.isMultiBlock) && maybeCheckTransformIsMatch(t3, blocksArray)
3525 + (t2) => isMatchingVariation(t2) && (isWildcardBlockTransform(t2) || t2.blocks.indexOf(name) !== -1) && (!isMultiBlock || !!t2.isMultiBlock) && maybeCheckTransformIsMatch(t2, blocksArray)
3434 3526 ) || findTransform(
3435 3527 transformationsFrom,
3436 - (t3) => t3.type === "block" && isMatchingVariation(t3) && (isWildcardBlockTransform(t3) || t3.blocks.indexOf(sourceName) !== -1) && (!isMultiBlock || !!t3.isMultiBlock) && maybeCheckTransformIsMatch(t3, blocksArray)
3528 + (t2) => isMatchingVariation(t2) && (isWildcardBlockTransform(t2) || t2.blocks.indexOf(sourceName) !== -1) && (!isMultiBlock || !!t2.isMultiBlock) && maybeCheckTransformIsMatch(t2, blocksArray)
3437 3529 );
3438 3530 if (!transformation) {
3439 3531 return null;
3440 3532 }
@@ -3486,9 +3578,10 @@
3486 3578 name,
3487 3579 example.attributes,
3488 3580 (example.innerBlocks ?? []).map(
3489 3581 (innerBlock) => getBlockFromExample(innerBlock.name, innerBlock)
3490 - )
3582 + ),
3583 + example.innerContent
3491 3584 );
3492 3585
3493 3586 // packages/blocks/build-module/api/parser/index.mjs
3494 3587 var import_block_serialization_default_parser = __toESM(require_block_serialization_default_parser(), 1);
@@ -3498,9 +3591,9 @@
3498 3591 var import_element2 = __toESM(require_element(), 1);
3499 3592 var import_hooks3 = __toESM(require_hooks(), 1);
3500 3593 var import_is_shallow_equal = __toESM(require_is_shallow_equal(), 1);
3501 3594 var import_autop = __toESM(require_autop(), 1);
3502 - var import_deprecated6 = __toESM(require_deprecated(), 1);
3595 + var import_deprecated7 = __toESM(require_deprecated(), 1);
3503 3596
3504 3597 // packages/blocks/build-module/api/parser/serialize-raw-block.mjs
3505 3598 function serializeRawBlock(rawBlock, options = {}) {
3506 3599 const { isCommentDelimited = true } = options;
@@ -3621,9 +3714,9 @@
3621 3714 if (attributeSchema.role === "local") {
3622 3715 return accumulator;
3623 3716 }
3624 3717 if (attributeSchema.__experimentalRole === "local") {
3625 - (0, import_deprecated6.default)("__experimentalRole attribute", {
3718 + (0, import_deprecated7.default)("__experimentalRole attribute", {
3626 3719 since: "6.7",
3627 3720 version: "6.8",
3628 3721 alternative: "role attribute",
3629 3722 hint: `Check the block.json of the ${blockType?.name} block.`
@@ -3641,9 +3734,28 @@
3641 3734 }
3642 3735 function serializeAttributes(attributes) {
3643 3736 return JSON.stringify(attributes).replaceAll("\\\\", "\\u005c").replaceAll("--", "\\u002d\\u002d").replaceAll("<", "\\u003c").replaceAll(">", "\\u003e").replaceAll("&", "\\u0026").replaceAll('\\"', "\\u0022");
3644 3737 }
3738 + function serializeInnerContent(innerContent, innerBlocks) {
3739 + let childIndex = 0;
3740 + const parts = innerContent.map((item) => {
3741 + if (item !== null) {
3742 + return item;
3743 + }
3744 + const innerBlock = innerBlocks[childIndex++];
3745 + return innerBlock ? serializeBlock(innerBlock, { isInnerBlocks: true }) : "";
3746 + });
3747 + for (; childIndex < innerBlocks.length; childIndex++) {
3748 + parts.push(
3749 + serializeBlock(innerBlocks[childIndex], { isInnerBlocks: true })
3750 + );
3751 + }
3752 + return parts.join("").trim();
3753 + }
3645 3754 function getBlockInnerHTML(block) {
3755 + if (block.innerContent && block.name === "core/html") {
3756 + return serializeInnerContent(block.innerContent, block.innerBlocks);
3757 + }
3646 3758 let saveContent = block.originalContent ?? "";
3647 3759 if (block.isValid || block.innerBlocks.length) {
3648 3760 try {
3649 3761 saveContent = getSaveContent(
@@ -4338,10 +4450,10 @@
4338 4450 }
4339 4451 if (arguments.length === 0) {
4340 4452 return token;
4341 4453 }
4342 - for (var i2 = 0; i2 < arguments.length; i2++) {
4343 - if (token.type === arguments[i2]) {
4454 + for (var i = 0; i < arguments.length; i++) {
4455 + if (token.type === arguments[i]) {
4344 4456 return token;
4345 4457 }
4346 4458 }
4347 4459 throw new Error("token type was unexpectedly " + token.type);
@@ -4456,10 +4568,10 @@
4456 4568 })()
4457 4569 );
4458 4570
4459 4571 // packages/blocks/build-module/api/validation/index.mjs
4460 - var import_es6 = __toESM(require_es6(), 1);
4461 - var import_deprecated7 = __toESM(require_deprecated(), 1);
4572 + var import_es62 = __toESM(require_es6(), 1);
4573 + var import_deprecated8 = __toESM(require_deprecated(), 1);
4462 4574 var import_html_entities = __toESM(require_html_entities(), 1);
4463 4575
4464 4576 // packages/blocks/build-module/api/validation/logger.mjs
4465 4577 function createLogger() {
@@ -4595,10 +4707,10 @@
4595 4707 }
4596 4708 function isEquivalentTextTokens(actual, expected, logger = createLogger()) {
4597 4709 let actualChars = actual.chars;
4598 4710 let expectedChars = expected.chars;
4599 - for (let i2 = 0; i2 < TEXT_NORMALIZATIONS.length; i2++) {
4600 - const normalize = TEXT_NORMALIZATIONS[i2];
4711 + for (let i = 0; i < TEXT_NORMALIZATIONS.length; i++) {
4712 + const normalize = TEXT_NORMALIZATIONS[i];
4601 4713 actualChars = normalize(actualChars);
4602 4714 expectedChars = normalize(expectedChars);
4603 4715 if (actualChars === expectedChars) {
4604 4716 return true;
@@ -4647,9 +4759,9 @@
4647 4759 );
4648 4760 return actualDiff.length === 0 && expectedDiff.length === 0;
4649 4761 },
4650 4762 style: (actual, expected) => {
4651 - return (0, import_es6.default)(
4763 + return (0, import_es62.default)(
4652 4764 ...[actual, expected].map(getStyleProperties)
4653 4765 );
4654 4766 },
4655 4767 // For each boolean attribute, mere presence of attribute in both is enough
@@ -4667,13 +4779,13 @@
4667 4779 );
4668 4780 return false;
4669 4781 }
4670 4782 const expectedAttributes = {};
4671 - for (let i2 = 0; i2 < expected.length; i2++) {
4672 - expectedAttributes[expected[i2][0].toLowerCase()] = expected[i2][1];
4783 + for (let i = 0; i < expected.length; i++) {
4784 + expectedAttributes[expected[i][0].toLowerCase()] = expected[i][1];
4673 4785 }
4674 - for (let i2 = 0; i2 < actual.length; i2++) {
4675 - const [name, actualValue] = actual[i2];
4786 + for (let i = 0; i < actual.length; i++) {
4787 + const [name, actualValue] = actual[i];
4676 4788 const nameLower = name.toLowerCase();
4677 4789 if (!expectedAttributes.hasOwnProperty(nameLower)) {
4678 4790 logger.warning("Encountered unexpected attribute `%s`.", name);
4679 4791 return false;
@@ -4836,9 +4948,9 @@
4836 4948 }
4837 4949 return [isValid, logger.getItems()];
4838 4950 }
4839 4951 function isValidBlockContent(blockTypeOrName, attributes, originalBlockContent) {
4840 - (0, import_deprecated7.default)("isValidBlockContent introduces opportunity for data loss", {
4952 + (0, import_deprecated8.default)("isValidBlockContent introduces opportunity for data loss", {
4841 4953 since: "12.6",
4842 4954 plugin: "Gutenberg",
4843 4955 alternative: "validateBlock"
4844 4956 });
@@ -4895,13 +5007,13 @@
4895 5007 name = "core/social-link";
4896 5008 }
4897 5009 if (name && name.indexOf("core-embed/") === 0) {
4898 5010 const providerSlug = name.substring(11);
4899 - const deprecated12 = {
5011 + const deprecated13 = {
4900 5012 speaker: "speaker-deck",
4901 5013 polldaddy: "crowdsignal"
4902 5014 };
4903 - newAttributes.providerNameSlug = providerSlug in deprecated12 ? deprecated12[providerSlug] : providerSlug;
5015 + newAttributes.providerNameSlug = providerSlug in deprecated13 ? deprecated13[providerSlug] : providerSlug;
4904 5016 if (!["amazon-kindle", "wordpress"].includes(providerSlug)) {
4905 5017 newAttributes.responsive = true;
4906 5018 }
4907 5019 name = "core/embed";
@@ -4996,9 +5108,9 @@
4996 5108 var doc = getDocument();
4997 5109 doc.body.innerHTML = source;
4998 5110 source = doc.body;
4999 5111 }
5000 - if ("function" === typeof matchers) {
5112 + if (typeof matchers === "function") {
5001 5113 return matchers(source);
5002 5114 }
5003 5115 if (Object !== matchers.constructor) {
5004 5116 return;
@@ -5003,16 +5115,22 @@
5003 5115 if (Object !== matchers.constructor) {
5004 5116 return;
5005 5117 }
5006 5118 return Object.keys(matchers).reduce(function(memo, key) {
5007 - memo[key] = parse(source, matchers[key]);
5119 + var inner = matchers[key];
5120 + memo[key] = parse(source, inner);
5008 5121 return memo;
5009 5122 }, {});
5010 5123 }
5011 - function prop(selector, name) {
5124 + function prop(arg1, arg2) {
5125 + var name;
5126 + var selector;
5012 5127 if (1 === arguments.length) {
5013 - name = selector;
5128 + name = arg1;
5014 5129 selector = void 0;
5130 + } else {
5131 + name = arg2;
5132 + selector = arg1;
5015 5133 }
5016 5134 return function(node) {
5017 5135 var match = node;
5018 5136 if (selector) {
@@ -5022,16 +5140,21 @@
5022 5140 return getPath(match, name);
5023 5141 }
5024 5142 };
5025 5143 }
5026 - function attr(selector, name) {
5144 + function attr(arg1, arg2) {
5145 + var name;
5146 + var selector;
5027 5147 if (1 === arguments.length) {
5028 - name = selector;
5148 + name = arg1;
5029 5149 selector = void 0;
5150 + } else {
5151 + name = arg2;
5152 + selector = arg1;
5030 5153 }
5031 5154 return function(node) {
5032 5155 var attributes = prop(selector, "attributes")(node);
5033 - if (attributes && attributes.hasOwnProperty(name)) {
5156 + if (attributes && Object.prototype.hasOwnProperty.call(attributes, name)) {
5034 5157 return attributes[name].value;
5035 5158 }
5036 5159 };
5037 5160 }
@@ -5053,16 +5176,16 @@
5053 5176 var head;
5054 5177 var tail;
5055 5178 options = options || {};
5056 5179 function memoized() {
5057 - var node = head, len = arguments.length, args, i2;
5180 + var node = head, len = arguments.length, args, i;
5058 5181 searchCache: while (node) {
5059 5182 if (node.args.length !== arguments.length) {
5060 5183 node = node.next;
5061 5184 continue;
5062 5185 }
5063 - for (i2 = 0; i2 < len; i2++) {
5064 - if (node.args[i2] !== arguments[i2]) {
5186 + for (i = 0; i < len; i++) {
5187 + if (node.args[i] !== arguments[i]) {
5065 5188 node = node.next;
5066 5189 continue searchCache;
5067 5190 }
5068 5191 }
@@ -5081,10 +5204,10 @@
5081 5204 }
5082 5205 return node.val;
5083 5206 }
5084 5207 args = new Array(len);
5085 - for (i2 = 0; i2 < len; i2++) {
5086 - args[i2] = arguments[i2];
5208 + for (i = 0; i < len; i++) {
5209 + args[i] = arguments[i];
5087 5210 }
5088 5211 node = {
5089 5212 args,
5090 5213 // Generate the result from original function
@@ -5122,18 +5245,18 @@
5122 5245 // packages/blocks/build-module/api/matchers.mjs
5123 5246 var import_rich_text3 = __toESM(require_rich_text(), 1);
5124 5247
5125 5248 // packages/blocks/build-module/api/node.mjs
5126 - var import_deprecated9 = __toESM(require_deprecated(), 1);
5249 + var import_deprecated10 = __toESM(require_deprecated(), 1);
5127 5250
5128 5251 // packages/blocks/build-module/api/children.mjs
5129 5252 var import_element3 = __toESM(require_element(), 1);
5130 - var import_deprecated8 = __toESM(require_deprecated(), 1);
5253 + var import_deprecated9 = __toESM(require_deprecated(), 1);
5131 5254 function getSerializeCapableElement(children) {
5132 5255 return children;
5133 5256 }
5134 5257 function getChildrenArray(children) {
5135 - (0, import_deprecated8.default)("wp.blocks.children.getChildrenArray", {
5258 + (0, import_deprecated9.default)("wp.blocks.children.getChildrenArray", {
5136 5259 since: "6.1",
5137 5260 version: "6.3",
5138 5261 link: "https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"
5139 5262 });
@@ -5139,9 +5262,9 @@
5139 5262 });
5140 5263 return children;
5141 5264 }
5142 5265 function concat(...blockNodes) {
5143 - (0, import_deprecated8.default)("wp.blocks.children.concat", {
5266 + (0, import_deprecated9.default)("wp.blocks.children.concat", {
5144 5267 since: "6.1",
5145 5268 version: "6.3",
5146 5269 alternative: "wp.richText.concat",
5147 5270 link: "https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"
@@ -5146,12 +5269,12 @@
5146 5269 alternative: "wp.richText.concat",
5147 5270 link: "https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"
5148 5271 });
5149 5272 const result = [];
5150 - for (let i2 = 0; i2 < blockNodes.length; i2++) {
5151 - const blockNode = Array.isArray(blockNodes[i2]) ? blockNodes[i2] : [blockNodes[i2]];
5152 - for (let j3 = 0; j3 < blockNode.length; j3++) {
5153 - const child = blockNode[j3];
5273 + for (let i = 0; i < blockNodes.length; i++) {
5274 + const blockNode = Array.isArray(blockNodes[i]) ? blockNodes[i] : [blockNodes[i]];
5275 + for (let j2 = 0; j2 < blockNode.length; j2++) {
5276 + const child = blockNode[j2];
5154 5277 const canConcatToPreviousString = typeof child === "string" && typeof result[result.length - 1] === "string";
5155 5278 if (canConcatToPreviousString) {
5156 5279 result[result.length - 1] += child;
5157 5280 } else {
@@ -5161,9 +5284,9 @@
5161 5284 }
5162 5285 return result;
5163 5286 }
5164 5287 function fromDOM22(domNodes) {
5165 - (0, import_deprecated8.default)("wp.blocks.children.fromDOM", {
5288 + (0, import_deprecated9.default)("wp.blocks.children.fromDOM", {
5166 5289 since: "6.1",
5167 5290 version: "6.3",
5168 5291 alternative: "wp.richText.create",
5169 5292 link: "https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"
@@ -5168,11 +5291,11 @@
5168 5291 alternative: "wp.richText.create",
5169 5292 link: "https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"
5170 5293 });
5171 5294 const result = [];
5172 - for (let i2 = 0; i2 < domNodes.length; i2++) {
5295 + for (let i = 0; i < domNodes.length; i++) {
5173 5296 try {
5174 - result.push(fromDOM2(domNodes[i2]));
5297 + result.push(fromDOM2(domNodes[i]));
5175 5298 } catch {
5176 5299 }
5177 5300 }
5178 5301 return result;
@@ -5177,9 +5300,9 @@
5177 5300 }
5178 5301 return result;
5179 5302 }
5180 5303 function toHTML(children) {
5181 - (0, import_deprecated8.default)("wp.blocks.children.toHTML", {
5304 + (0, import_deprecated9.default)("wp.blocks.children.toHTML", {
5182 5305 since: "6.1",
5183 5306 version: "6.3",
5184 5307 alternative: "wp.richText.toHTMLString",
5185 5308 link: "https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"
@@ -5187,9 +5310,9 @@
5187 5310 const element = getSerializeCapableElement(children);
5188 5311 return (0, import_element3.renderToString)(element);
5189 5312 }
5190 5313 function matcher(selector) {
5191 - (0, import_deprecated8.default)("wp.blocks.children.matcher", {
5314 + (0, import_deprecated9.default)("wp.blocks.children.matcher", {
5192 5315 since: "6.1",
5193 5316 version: "6.3",
5194 5317 alternative: "html source",
5195 5318 link: "https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"
@@ -5214,9 +5337,9 @@
5214 5337 };
5215 5338
5216 5339 // packages/blocks/build-module/api/node.mjs
5217 5340 function isNodeOfType(node, type) {
5218 - (0, import_deprecated9.default)("wp.blocks.node.isNodeOfType", {
5341 + (0, import_deprecated10.default)("wp.blocks.node.isNodeOfType", {
5219 5342 since: "6.1",
5220 5343 version: "6.3",
5221 5344 link: "https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"
5222 5345 });
@@ -5223,16 +5346,16 @@
5223 5346 return typeof node !== "string" && node?.type === type;
5224 5347 }
5225 5348 function getNamedNodeMapAsObject(nodeMap) {
5226 5349 const result = {};
5227 - for (let i2 = 0; i2 < nodeMap.length; i2++) {
5228 - const { name, value } = nodeMap[i2];
5350 + for (let i = 0; i < nodeMap.length; i++) {
5351 + const { name, value } = nodeMap[i];
5229 5352 result[name] = value;
5230 5353 }
5231 5354 return result;
5232 5355 }
5233 5356 function fromDOM2(domNode) {
5234 - (0, import_deprecated9.default)("wp.blocks.node.fromDOM", {
5357 + (0, import_deprecated10.default)("wp.blocks.node.fromDOM", {
5235 5358 since: "6.1",
5236 5359 version: "6.3",
5237 5360 alternative: "wp.richText.create",
5238 5361 link: "https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"
@@ -5253,9 +5376,9 @@
5253 5376 }
5254 5377 };
5255 5378 }
5256 5379 function toHTML2(node) {
5257 - (0, import_deprecated9.default)("wp.blocks.node.toHTML", {
5380 + (0, import_deprecated10.default)("wp.blocks.node.toHTML", {
5258 5381 since: "6.1",
5259 5382 version: "6.3",
5260 5383 alternative: "wp.richText.toHTMLString",
5261 5384 link: "https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"
@@ -5262,9 +5385,9 @@
5262 5385 });
5263 5386 return toHTML([node]);
5264 5387 }
5265 5388 function matcher2(selector) {
5266 - (0, import_deprecated9.default)("wp.blocks.node.matcher", {
5389 + (0, import_deprecated10.default)("wp.blocks.node.matcher", {
5267 5390 since: "6.1",
5268 5391 version: "6.3",
5269 5392 alternative: "html source",
5270 5393 link: "https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"
@@ -5320,9 +5443,9 @@
5320 5443 }) : import_rich_text3.RichTextData.empty();
5321 5444 };
5322 5445
5323 5446 // packages/blocks/build-module/api/parser/get-block-attributes.mjs
5324 - var toBooleanAttributeMatcher = (matcher3) => (value) => matcher3(value) !== void 0;
5447 + var toBooleanAttributeMatcher = (matcher3) => (domNode) => matcher3(domNode) !== void 0;
5325 5448 function isOfType(value, type) {
5326 5449 switch (type) {
5327 5450 case "rich-text":
5328 5451 return value instanceof import_rich_text4.RichTextData;
@@ -5386,14 +5509,14 @@
5386 5509 var matcherFromSource = memize(
5387 5510 (sourceConfig) => {
5388 5511 switch (sourceConfig.source) {
5389 5512 case "attribute": {
5390 - let matcher3 = attr(
5513 + const matcher3 = attr(
5391 5514 sourceConfig.selector,
5392 5515 sourceConfig.attribute
5393 5516 );
5394 5517 if (sourceConfig.type === "boolean") {
5395 - matcher3 = toBooleanAttributeMatcher(matcher3);
5518 + return toBooleanAttributeMatcher(matcher3);
5396 5519 }
5397 5520 return matcher3;
5398 5521 }
5399 5522 case "html":
@@ -5431,9 +5554,12 @@
5431 5554 }
5432 5555 }
5433 5556 );
5434 5557 function parseHtml(innerHTML) {
5435 - return parse(innerHTML, (h2) => h2);
5558 + return parse(
5559 + innerHTML ?? "",
5560 + (h) => h
5561 + );
5436 5562 }
5437 5563 function parseWithAttributeSchema(innerHTML, attributeSchema) {
5438 5564 return matcherFromSource(attributeSchema)(
5439 5565 parseHtml(innerHTML)
@@ -5569,10 +5695,10 @@
5569 5695 const { deprecated: deprecatedDefinitions } = blockType;
5570 5696 if (!deprecatedDefinitions || !deprecatedDefinitions.length) {
5571 5697 return block;
5572 5698 }
5573 - for (let i2 = 0; i2 < deprecatedDefinitions.length; i2++) {
5574 - const { isEligible = stubFalse } = deprecatedDefinitions[i2];
5699 + for (let i = 0; i < deprecatedDefinitions.length; i++) {
5700 + const { isEligible = stubFalse } = deprecatedDefinitions[i];
5575 5701 if (block.isValid && !isEligible(parsedAttributes, block.innerBlocks, {
5576 5702 blockNode: rawBlock,
5577 5703 block
5578 5704 })) {
@@ -5582,9 +5708,9 @@
5582 5708 omit(
5583 5709 blockType,
5584 5710 DEPRECATED_ENTRY_KEYS
5585 5711 ),
5586 - deprecatedDefinitions[i2]
5712 + deprecatedDefinitions[i]
5587 5713 );
5588 5714 let migratedBlock = {
5589 5715 ...block,
5590 5716 attributes: getBlockAttributes(
@@ -5714,8 +5840,16 @@
5714 5840 ),
5715 5841 parsedInnerBlocks
5716 5842 );
5717 5843 parsedBlock.originalContent = normalizedBlock.innerHTML;
5844 + if (blockType.name === "core/html") {
5845 + parsedBlock.innerContent = normalizedBlock.innerContent ?? [
5846 + normalizedBlock.innerHTML
5847 + ];
5848 + parsedBlock.isValid = true;
5849 + parsedBlock.validationIssues = [];
5850 + return parsedBlock;
5851 + }
5718 5852 const validatedBlock = applyBlockValidation(parsedBlock, blockType);
5719 5853 const { validationIssues } = validatedBlock;
5720 5854 const updatedBlock = applyBlockDeprecatedVersions(
5721 5855 validatedBlock,
@@ -5756,19 +5890,19 @@
5756 5890 );
5757 5891 }
5758 5892
5759 5893 // packages/blocks/build-module/api/raw-handling/index.mjs
5760 - var import_deprecated10 = __toESM(require_deprecated(), 1);
5894 + var import_deprecated11 = __toESM(require_deprecated(), 1);
5761 5895 var import_dom13 = __toESM(require_dom(), 1);
5762 5896
5763 5897 // packages/blocks/build-module/api/raw-handling/get-raw-transforms.mjs
5764 5898 function getRawTransforms() {
5765 - return getBlockTransforms("from").filter(({ type }) => type === "raw").map((transform) => {
5766 - return transform.isMatch ? transform : {
5767 - ...transform,
5768 - isMatch: (node) => transform.selector && node.matches(transform.selector)
5769 - };
5770 - });
5899 + return getBlockTransforms("from").filter(
5900 + (transform) => transform.type === "raw"
5901 + ).map((transform) => ({
5902 + ...transform,
5903 + isMatch: transform.isMatch ?? ((node) => !!transform.selector && node.matches(transform.selector))
5904 + }));
5771 5905 }
5772 5906
5773 5907 // packages/blocks/build-module/api/raw-handling/html-to-blocks.mjs
5774 5908 function htmlToBlocks(html2, handler) {
@@ -5777,18 +5911,17 @@
5777 5911 return Array.from(doc.body.children).flatMap((node) => {
5778 5912 const transforms = getRawTransforms();
5779 5913 const rawTransform = findTransform(
5780 5914 transforms,
5781 - ((t3) => {
5782 - const transform2 = t3;
5783 - return transform2.isMatch(node);
5784 - })
5915 + (transform2) => transform2.isMatch(node)
5785 5916 );
5786 5917 if (!rawTransform) {
5787 5918 return createBlock(
5788 5919 // Should not be hardcoded.
5789 5920 "core/html",
5790 - getBlockAttributes("core/html", node.outerHTML)
5921 + {},
5922 + [],
5923 + [node.outerHTML]
5791 5924 );
5792 5925 }
5793 5926 const { transform, blockName } = rawTransform;
5794 5927 if (transform) {
@@ -6018,19 +6151,16 @@
6018 6151 var castArray = (maybeArray) => Array.isArray(maybeArray) ? maybeArray : [maybeArray];
6019 6152 var beforeLineRegexp = /(\n|<p>|<br\s*\/?>)\s*$/;
6020 6153 var afterLineRegexp = /^\s*(\n|<\/p>|<br\s*\/?>)/;
6021 6154 function segmentHTMLToShortcodeBlock(HTML, lastIndex = 0, excludedBlockNames = []) {
6022 - const transformsFrom = getBlockTransforms(
6023 - "from"
6155 + const transformsFrom = getBlockTransforms("from").filter(
6156 + (transform) => transform.type === "shortcode"
6024 6157 );
6025 6158 const transformation = findTransform(
6026 6159 transformsFrom,
6027 - ((transform) => {
6028 - const t3 = transform;
6029 - return excludedBlockNames.indexOf(t3.blockName) === -1 && t3.type === "shortcode" && castArray(t3.tag).some(
6030 - (tag) => (0, import_shortcode.regexp)(tag).test(HTML)
6031 - );
6032 - })
6160 + (transform) => excludedBlockNames.indexOf(transform.blockName) === -1 && castArray(transform.tag).some(
6161 + (tag) => (0, import_shortcode.regexp)(tag).test(HTML)
6162 + )
6033 6163 );
6034 6164 if (!transformation) {
6035 6165 return [HTML];
6036 6166 }
@@ -6037,76 +6167,74 @@
6037 6167 const transformTags = castArray(transformation.tag);
6038 6168 const transformTag = transformTags.find(
6039 6169 (tag) => (0, import_shortcode.regexp)(tag).test(HTML)
6040 6170 );
6041 - let match;
6042 6171 const previousIndex = lastIndex;
6043 - if (match = (0, import_shortcode.next)(transformTag, HTML, lastIndex)) {
6044 - lastIndex = match.index + match.content.length;
6045 - const beforeHTML = HTML.substr(0, match.index);
6046 - const afterHTML = HTML.substr(lastIndex);
6047 - if (!match.shortcode.content?.includes("<") && !(beforeLineRegexp.test(beforeHTML) && afterLineRegexp.test(afterHTML))) {
6048 - return segmentHTMLToShortcodeBlock(HTML, lastIndex);
6049 - }
6050 - if (transformation.isMatch && !transformation.isMatch(match.shortcode.attrs)) {
6051 - return segmentHTMLToShortcodeBlock(HTML, previousIndex, [
6052 - ...excludedBlockNames,
6053 - transformation.blockName
6054 - ]);
6055 - }
6056 - let blocks = [];
6057 - if (typeof transformation.transform === "function") {
6058 - blocks = [].concat(
6059 - transformation.transform(match.shortcode.attrs, match)
6060 - );
6061 - blocks = blocks.map((block) => {
6062 - block.originalContent = match.shortcode.content;
6063 - return applyBuiltInValidationFixes(
6064 - block,
6065 - getBlockType(block.name)
6066 - );
6067 - });
6068 - } else {
6069 - const attributes = Object.fromEntries(
6070 - Object.entries(transformation.attributes).filter(([, schema]) => schema.shortcode).map(([key, schema]) => [
6071 - key,
6072 - schema.shortcode(match.shortcode.attrs, match)
6073 - ])
6074 - );
6075 - const blockType = getBlockType(transformation.blockName);
6076 - if (!blockType) {
6077 - return [HTML];
6078 - }
6079 - const transformationBlockType = {
6080 - ...blockType,
6081 - attributes: transformation.attributes
6082 - };
6083 - let block = createBlock(
6084 - transformation.blockName,
6085 - getBlockAttributes(
6086 - transformationBlockType,
6087 - match.shortcode.content,
6088 - attributes
6089 - )
6090 - );
6172 + const match = (0, import_shortcode.next)(transformTag, HTML, lastIndex);
6173 + if (!match) {
6174 + return [HTML];
6175 + }
6176 + lastIndex = match.index + match.content.length;
6177 + const beforeHTML = HTML.substr(0, match.index);
6178 + const afterHTML = HTML.substr(lastIndex);
6179 + if (!match.shortcode.content?.includes("<") && !(beforeLineRegexp.test(beforeHTML) && afterLineRegexp.test(afterHTML))) {
6180 + return segmentHTMLToShortcodeBlock(HTML, lastIndex);
6181 + }
6182 + if (transformation.isMatch && !transformation.isMatch(match.shortcode.attrs)) {
6183 + return segmentHTMLToShortcodeBlock(HTML, previousIndex, [
6184 + ...excludedBlockNames,
6185 + transformation.blockName
6186 + ]);
6187 + }
6188 + let blocks = [];
6189 + if (typeof transformation.transform === "function") {
6190 + blocks = [].concat(
6191 + transformation.transform(match.shortcode.attrs, match)
6192 + );
6193 + blocks = blocks.map((block) => {
6091 6194 block.originalContent = match.shortcode.content;
6092 - block = applyBuiltInValidationFixes(
6195 + return applyBuiltInValidationFixes(
6093 6196 block,
6094 - transformationBlockType
6197 + getBlockType(block.name)
6095 6198 );
6096 - blocks = [block];
6199 + });
6200 + } else {
6201 + const blockType = getBlockType(transformation.blockName);
6202 + if (!blockType) {
6203 + return [HTML];
6097 6204 }
6098 - return [
6099 - ...segmentHTMLToShortcodeBlock(
6100 - beforeHTML.replace(beforeLineRegexp, "")
6101 - ),
6102 - ...blocks,
6103 - ...segmentHTMLToShortcodeBlock(
6104 - afterHTML.replace(afterLineRegexp, "")
6205 + const transformAttributes = transformation.attributes ?? blockType.attributes;
6206 + const attributes = Object.fromEntries(
6207 + Object.entries(transformAttributes).filter(([, schema]) => schema.shortcode).map(([key, schema]) => [
6208 + key,
6209 + schema.shortcode(match.shortcode.attrs, match)
6210 + ])
6211 + );
6212 + const transformationBlockType = {
6213 + ...blockType,
6214 + attributes: transformAttributes
6215 + };
6216 + let block = createBlock(
6217 + transformation.blockName,
6218 + getBlockAttributes(
6219 + transformationBlockType,
6220 + match.shortcode.content,
6221 + attributes
6105 6222 )
6106 - ];
6223 + );
6224 + block.originalContent = match.shortcode.content;
6225 + block = applyBuiltInValidationFixes(block, transformationBlockType);
6226 + blocks = [block];
6107 6227 }
6108 - return [HTML];
6228 + return [
6229 + ...segmentHTMLToShortcodeBlock(
6230 + beforeHTML.replace(beforeLineRegexp, "")
6231 + ),
6232 + ...blocks,
6233 + ...segmentHTMLToShortcodeBlock(
6234 + afterHTML.replace(afterLineRegexp, "")
6235 + )
6236 + ];
6109 6237 }
6110 6238 var shortcode_converter_default = segmentHTMLToShortcodeBlock;
6111 6239
6112 6240 // packages/blocks/build-module/api/raw-handling/utils.mjs
@@ -6172,41 +6300,41 @@
6172 6300 return [...objValue || [], ...srcValue || []];
6173 6301 }
6174 6302 }
6175 6303 }
6176 - function mergeTagNameSchemas(a2, b3) {
6177 - if (a2 === b3) {
6178 - return a2;
6304 + function mergeTagNameSchemas(a, b2) {
6305 + if (a === b2) {
6306 + return a;
6179 6307 }
6180 - for (const key in b3) {
6181 - if (a2[key]) {
6182 - a2[key] = mergeTagNameSchemaProperties(
6183 - a2[key],
6184 - b3[key],
6308 + for (const key in b2) {
6309 + if (a[key]) {
6310 + a[key] = mergeTagNameSchemaProperties(
6311 + a[key],
6312 + b2[key],
6185 6313 key
6186 6314 );
6187 - } else if (Array.isArray(b3[key])) {
6188 - a2[key] = b3[key].slice();
6315 + } else if (Array.isArray(b2[key])) {
6316 + a[key] = b2[key].slice();
6189 6317 } else {
6190 - a2[key] = { ...b3[key] };
6318 + a[key] = { ...b2[key] };
6191 6319 }
6192 6320 }
6193 - return a2;
6321 + return a;
6194 6322 }
6195 - function mergeSchemas(a2, b3) {
6196 - if (a2 === b3) {
6197 - return a2;
6323 + function mergeSchemas(a, b2) {
6324 + if (a === b2) {
6325 + return a;
6198 6326 }
6199 - for (const key in b3) {
6200 - if (a2[key]) {
6201 - a2[key] = mergeTagNameSchemas(a2[key], b3[key]);
6202 - } else if (Array.isArray(b3[key])) {
6203 - a2[key] = b3[key].slice();
6327 + for (const key in b2) {
6328 + if (a[key]) {
6329 + a[key] = mergeTagNameSchemas(a[key], b2[key]);
6330 + } else if (Array.isArray(b2[key])) {
6331 + a[key] = b2[key].slice();
6204 6332 } else {
6205 - a2[key] = { ...b3[key] };
6333 + a[key] = { ...b2[key] };
6206 6334 }
6207 6335 }
6208 - return a2;
6336 + return a;
6209 6337 }
6210 6338 return schemas.reduce(mergeSchemas, {});
6211 6339 }
6212 6340 function getBlockContentSchema(context) {
@@ -6222,10 +6350,10 @@
6222 6350 return false;
6223 6351 }
6224 6352 const wrapper = doc.body.children.item(0);
6225 6353 const descendants = wrapper.getElementsByTagName("*");
6226 - for (let i2 = 0; i2 < descendants.length; i2++) {
6227 - if (descendants.item(i2).tagName !== "BR") {
6354 + for (let i = 0; i < descendants.length; i++) {
6355 + if (descendants.item(i).tagName !== "BR") {
6228 6356 return false;
6229 6357 }
6230 6358 }
6231 6359 if (wrapper.tagName !== "SPAN") {
@@ -6287,9 +6415,9 @@
6287 6415 ["ul", "li", "ol"],
6288 6416 ["h1", "h2", "h3", "h4", "h5", "h6"]
6289 6417 ];
6290 6418 return inlineAllowedTagGroups.some(
6291 - (tagGroup) => [tag, contextTag].filter((t3) => !tagGroup.includes(t3)).length === 0
6419 + (tagGroup) => [tag, contextTag].filter((t2) => !tagGroup.includes(t2)).length === 0
6292 6420 );
6293 6421 }
6294 6422 function deepCheck(nodes, contextTag) {
6295 6423 return nodes.every(
@@ -6455,10 +6583,10 @@
6455 6583 node.src = "";
6456 6584 return;
6457 6585 }
6458 6586 const uint8Array = new Uint8Array(decoded.length);
6459 - for (let i2 = 0; i2 < uint8Array.length; i2++) {
6460 - uint8Array[i2] = decoded.charCodeAt(i2);
6587 + for (let i = 0; i < uint8Array.length; i++) {
6588 + uint8Array[i] = decoded.charCodeAt(i);
6461 6589 }
6462 6590 const name = type.replace("/", ".");
6463 6591 const file = new window.File([uint8Array], name, { type });
6464 6592 node.src = (0, import_blob.createBlobURL)(file);
@@ -6477,24 +6605,31 @@
6477 6605 node.innerHTML = normaliseBlocks(node.innerHTML);
6478 6606 }
6479 6607
6480 6608 // node_modules/marked/lib/marked.esm.js
6481 - function z() {
6609 + function A2() {
6482 6610 return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
6483 6611 }
6484 - var T = z();
6485 - function G(l4) {
6612 + var T = A2();
6613 + function U(l4) {
6486 6614 T = l4;
6487 6615 }
6488 - var _ = { exec: () => null };
6489 - function d2(l4, e2 = "") {
6490 - let t3 = typeof l4 == "string" ? l4 : l4.source, n2 = { replace: (s2, r2) => {
6491 - let i2 = typeof r2 == "string" ? r2 : r2.source;
6492 - return i2 = i2.replace(m2.caret, "$1"), t3 = t3.replace(s2, i2), n2;
6493 - }, getRegex: () => new RegExp(t3, e2) };
6494 - return n2;
6616 + var E2 = { exec: () => null };
6617 + function I(l4) {
6618 + let e2 = [];
6619 + return (t2) => {
6620 + let n = Math.max(0, Math.min(3, t2 - 1)), i = e2[n];
6621 + return i || (i = l4(n), e2[n] = i), i;
6622 + };
6495 6623 }
6496 - var Re = ((l4 = "") => {
6624 + function d(l4, e2 = "") {
6625 + let t2 = typeof l4 == "string" ? l4 : l4.source, n = { replace: (i, r2) => {
6626 + let o2 = typeof r2 == "string" ? r2 : r2.source;
6627 + return o2 = o2.replace(m2.caret, "$1"), t2 = t2.replace(i, o2), n;
6628 + }, getRegex: () => new RegExp(t2, e2) };
6629 + return n;
6630 + }
6631 + var we = ((l4 = "") => {
6497 6632 try {
6498 6633 return !!new RegExp("(?<=1)(?<!1)" + l4);
6499 6634 } catch {
6500 6635 return false;
@@ -6499,80 +6634,92 @@
6499 6634 } catch {
6500 6635 return false;
6501 6636 }
6502 6637 })();
6503 - var m2 = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (l4) => new RegExp(`^( {0,3}${l4})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (l4) => new RegExp(`^ {0,${Math.min(3, l4 - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (l4) => new RegExp(`^ {0,${Math.min(3, l4 - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (l4) => new RegExp(`^ {0,${Math.min(3, l4 - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (l4) => new RegExp(`^ {0,${Math.min(3, l4 - 1)}}#`), htmlBeginRegex: (l4) => new RegExp(`^ {0,${Math.min(3, l4 - 1)}}<(?:[a-z].*>|!--)`, "i"), blockquoteBeginRegex: (l4) => new RegExp(`^ {0,${Math.min(3, l4 - 1)}}>`) };
6504 - var Te = /^(?:[ \t]*(?:\n|$))+/;
6505 - var Oe = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/;
6506 - var we = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/;
6507 - var I = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/;
6508 - var ye = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/;
6509 - var Q = / {0,3}(?:[*+-]|\d{1,9}[.)])/;
6510 - var ie = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/;
6511 - var oe = d2(ie).replace(/bull/g, Q).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex();
6512 - var Pe = d2(ie).replace(/bull/g, Q).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex();
6513 - var j2 = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/;
6514 - var Se = /^[^\n]+/;
6515 - var F = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/;
6516 - var $e = d2(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", F).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex();
6517 - var Le = d2(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Q).getRegex();
6518 - var v2 = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";
6519 - var U = /<!--(?:-?>|[\s\S]*?(?:-->|$))/;
6520 - var _e = d2("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", U).replace("tag", v2).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
6521 - var ae = d2(j2).replace("hr", I).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v2).getRegex();
6522 - var Me = d2(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ae).getRegex();
6523 - var K = { blockquote: Me, code: Oe, def: $e, fences: we, heading: ye, hr: I, html: _e, lheading: oe, list: Le, newline: Te, paragraph: ae, table: _, text: Se };
6524 - var re = d2("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", I).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v2).getRegex();
6525 - var ze = { ...K, lheading: Pe, table: re, paragraph: d2(j2).replace("hr", I).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", re).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v2).getRegex() };
6526 - var Ee = { ...K, html: d2(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", U).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: _, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: d2(j2).replace("hr", I).replace("heading", ` *#{1,6} *[^
6527 -]`).replace("lheading", oe).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() };
6528 - var Ae = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/;
6529 - var Ce = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/;
6530 - var le = /^( {2,}|\\)\n(?!\s*$)/;
6531 - var Ie = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/;
6532 - var E = /[\p{P}\p{S}]/u;
6533 - var H2 = /[\s\p{P}\p{S}]/u;
6534 - var W = /[^\s\p{P}\p{S}]/u;
6535 - var Be = d2(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, H2).getRegex();
6536 - var ue = /(?!~)[\p{P}\p{S}]/u;
6537 - var De = /(?!~)[\s\p{P}\p{S}]/u;
6538 - var qe = /(?:[^\s\p{P}\p{S}]|~)/u;
6539 - var ve = d2(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Re ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex();
6540 - var pe = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/;
6541 - var He = d2(pe, "u").replace(/punct/g, E).getRegex();
6542 - var Ze = d2(pe, "u").replace(/punct/g, ue).getRegex();
6543 - var ce = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)";
6544 - var Ge = d2(ce, "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H2).replace(/punct/g, E).getRegex();
6545 - var Ne = d2(ce, "gu").replace(/notPunctSpace/g, qe).replace(/punctSpace/g, De).replace(/punct/g, ue).getRegex();
6546 - var Qe = d2("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H2).replace(/punct/g, E).getRegex();
6547 - var je = d2(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, E).getRegex();
6548 - var Fe = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)";
6549 - var Ue = d2(Fe, "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H2).replace(/punct/g, E).getRegex();
6550 - var Ke = d2(/\\(punct)/, "gu").replace(/punct/g, E).getRegex();
6551 - var We = d2(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex();
6552 - var Xe = d2(U).replace("(?:-->|$)", "-->").getRegex();
6553 - var Je = d2("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Xe).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex();
6554 - var q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/;
6555 - var Ve = d2(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex();
6556 - var he = d2(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", F).getRegex();
6557 - var ke = d2(/^!?\[(ref)\](?:\[\])?/).replace("ref", F).getRegex();
6558 - var Ye = d2("reflink|nolink(?!\\()", "g").replace("reflink", he).replace("nolink", ke).getRegex();
6559 - var se = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/;
6560 - var X = { _backpedal: _, anyPunctuation: Ke, autolink: We, blockSkip: ve, br: le, code: Ce, del: _, delLDelim: _, delRDelim: _, emStrongLDelim: He, emStrongRDelimAst: Ge, emStrongRDelimUnd: Qe, escape: Ae, link: Ve, nolink: ke, punctuation: Be, reflink: he, reflinkSearch: Ye, tag: Je, text: Ie, url: _ };
6561 - var et = { ...X, link: d2(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(), reflink: d2(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex() };
6562 - var N2 = { ...X, emStrongRDelimAst: Ne, emStrongLDelim: Ze, delLDelim: je, delRDelim: Ue, url: d2(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", se).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: d2(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", se).getRegex() };
6563 - var tt = { ...N2, br: d2(le).replace("{2,}", "*").getRegex(), text: d2(N2.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() };
6564 - var B = { normal: K, gfm: ze, pedantic: Ee };
6565 - var A = { normal: X, gfm: N2, breaks: tt, pedantic: et };
6566 - var nt = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" };
6567 - var de = (l4) => nt[l4];
6568 - function O(l4, e2) {
6638 + var m2 = { codeRemoveIndent: /^(?: {0,3}\t| {1,4})/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, endingSpaceTabChar: /[ \t]$/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (l4) => new RegExp(`^( {0,3}${l4})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: I((l4) => new RegExp(`^ {0,${l4}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: I((l4) => new RegExp(`^ {0,${l4}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)), fencesBeginRegex: I((l4) => new RegExp(`^ {0,${l4}}(?:\`\`\`|~~~)`)), headingBeginRegex: I((l4) => new RegExp(`^ {0,${l4}}#`)), htmlBeginRegex: I((l4) => new RegExp(`^ {0,${l4}}(?:</?(?:${H2})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`, "i")), blockquoteBeginRegex: I((l4) => new RegExp(`^ {0,${l4}}>`)) };
6639 + var ye = /^(?:[ \t]*(?:\n|$))+/;
6640 + var Pe = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/;
6641 + var Se = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/;
6642 + var v2 = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/;
6643 + var _e = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/;
6644 + var K = / {0,3}(?:[*+-]|\d{1,9}[.)])/;
6645 + var le = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/;
6646 + var ue = d(le).replace(/bull/g, K).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex();
6647 + var $e = d(le).replace(/bull/g, K).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex();
6648 + var W = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/;
6649 + var Le = /^[^\n]+/;
6650 + var X = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/;
6651 + var ze = d(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", X).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex();
6652 + var Ee = d(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, K).getRegex();
6653 + var H2 = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";
6654 + var J = /<!--(?:-?>|[\s\S]*?(?:-->|$))/;
6655 + var Me = d("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", J).replace("tag", H2).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
6656 + var pe = (l4) => d(W).replace("hr", v2).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", l4).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H2).getRegex();
6657 + var Ae = pe(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/);
6658 + var Ie = pe(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/);
6659 + var Ce = d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ie).getRegex();
6660 + var V = { blockquote: Ce, code: Pe, def: ze, fences: Se, heading: _e, hr: v2, html: Me, lheading: ue, list: Ee, newline: ye, paragraph: Ae, table: E2, text: Le };
6661 + var ie = d("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", v2).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H2).getRegex();
6662 + var Be = { ...V, lheading: $e, table: ie, paragraph: d(W).replace("hr", v2).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ie).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H2).getRegex() };
6663 + var De = { ...V, html: d(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", J).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: E2, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: d(W).replace("hr", v2).replace("heading", ` *#{1,6} *[^
6664 +]`).replace("lheading", ue).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() };
6665 + var qe = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/;
6666 + var ve = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/;
6667 + var ce = /^( {2,}|\\)\n(?!\s*$)[ \t]*/;
6668 + var He = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/;
6669 + var _ = /[\p{P}\p{S}]/u;
6670 + var C2 = /[\s\p{P}\p{S}]/u;
6671 + var Z = /[^\s\p{P}\p{S}]/u;
6672 + var Ze = d(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, C2).getRegex();
6673 + var Ge = /[\p{Pi}\p{Ps}"']/u;
6674 + var he = /(?!~)[\p{P}\p{S}]/u;
6675 + var Qe = /(?!~)[\s\p{P}\p{S}]/u;
6676 + var Ne = /(?:[^\s\p{P}\p{S}]|~)/u;
6677 + var je = d(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", we ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex();
6678 + var de = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/;
6679 + var Ue = d(de, "u").replace(/punct/g, _).getRegex();
6680 + var Fe = d(de, "u").replace(/punct/g, he).getRegex();
6681 + var Ke = /^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/;
6682 + var We = d(Ke, "u").replace(/openQuote/g, Ge).replace(/punct/g, _).getRegex();
6683 + var ke = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)";
6684 + var Xe = d(ke, "gu").replace(/notPunctSpace/g, Z).replace(/punctSpace/g, C2).replace(/punct/g, _).getRegex();
6685 + var Je = d(ke, "gu").replace(/notPunctSpace/g, Ne).replace(/punctSpace/g, Qe).replace(/punct/g, he).getRegex();
6686 + var Ve = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)";
6687 + var Ye = d(Ve, "gu").replace(/notPunctSpace/g, Z).replace(/punctSpace/g, C2).replace(/punct/g, _).getRegex();
6688 + var et = d("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Z).replace(/punctSpace/g, C2).replace(/punct/g, _).getRegex();
6689 + var tt = "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)";
6690 + var nt = d(tt, "gu").replace(/notPunctSpace/g, Z).replace(/punctSpace/g, C2).replace(/punct/g, _).getRegex();
6691 + var rt = d(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, _).getRegex();
6692 + var st = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)";
6693 + var it = d(st, "gu").replace(/notPunctSpace/g, Z).replace(/punctSpace/g, C2).replace(/punct/g, _).getRegex();
6694 + var ot = d(/\\(punct)/, "gu").replace(/punct/g, _).getRegex();
6695 + var at = d(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex();
6696 + var lt = d(J).replace("(?:-->|$)", "-->").getRegex();
6697 + var ut = d("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", lt).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex();
6698 + var ge = /\[(?:\\[\s\S]|[^\[\]\\])*\]/;
6699 + var N2 = d(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets", ge).getRegex();
6700 + var pt = d(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", N2).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex();
6701 + var ct = d(/^!?\[(label)\]\[(ref)\]/).replace("label", N2).replace("ref", X).getRegex();
6702 + var ht = d(/^!?\[(ref)\](?:\[\])?/).replace("ref", X).getRegex();
6703 + var oe = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/;
6704 + var dt = d(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets", ge).getRegex();
6705 + var kt = d("reflink|nolink(?!\\()", "g").replace("reflink", d(/^!?\[(label)\]\[(ref)\]/).replace("label", dt).replace("ref", oe).getRegex()).replace("nolink", d(/^!?\[(ref)\](?:\[\])?/).replace("ref", oe).getRegex()).getRegex();
6706 + var ae = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/;
6707 + var Y = { _backpedal: E2, anyPunctuation: ot, autolink: at, blockSkip: je, br: ce, code: ve, del: E2, delLDelim: E2, delRDelim: E2, emStrongLDelim: Ue, emStrongRDelimAst: Xe, emStrongRDelimUnd: et, escape: qe, link: pt, nolink: ht, punctuation: Ze, reflink: ct, reflinkSearch: kt, tag: ut, text: He, url: E2 };
6708 + var gt = { ...Y, emStrongLDelim: We, emStrongRDelimAst: Ye, emStrongRDelimUnd: nt, link: d(/^!?\[(label)\]\((.*?)\)/).replace("label", N2).getRegex(), reflink: d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", N2).getRegex() };
6709 + var F = { ...Y, emStrongRDelimAst: Je, emStrongLDelim: Fe, delLDelim: rt, delRDelim: it, url: d(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ae).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: d(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ae).getRegex() };
6710 + var ft = { ...F, br: d(ce).replace("{2,}", "*").getRegex(), text: d(F.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() };
6711 + var G = { normal: V, gfm: Be, pedantic: De };
6712 + var B = { normal: Y, gfm: F, breaks: ft, pedantic: gt };
6713 + var mt = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" };
6714 + var fe = (l4) => mt[l4];
6715 + function R2(l4, e2) {
6569 6716 if (e2) {
6570 - if (m2.escapeTest.test(l4)) return l4.replace(m2.escapeReplace, de);
6571 - } else if (m2.escapeTestNoEncode.test(l4)) return l4.replace(m2.escapeReplaceNoEncode, de);
6717 + if (m2.escapeTest.test(l4)) return l4.replace(m2.escapeReplace, fe);
6718 + } else if (m2.escapeTestNoEncode.test(l4)) return l4.replace(m2.escapeReplaceNoEncode, fe);
6572 6719 return l4;
6573 6720 }
6574 - function J(l4) {
6721 + function ee(l4) {
6575 6722 try {
6576 6723 l4 = encodeURI(l4).replace(m2.percentDecode, "%");
6577 6724 } catch {
6578 6725 return null;
@@ -6578,74 +6725,109 @@
6578 6725 return null;
6579 6726 }
6580 6727 return l4;
6581 6728 }
6582 - function V(l4, e2) {
6583 - let t3 = l4.replace(m2.findPipe, (r2, i2, o3) => {
6584 - let u2 = false, a2 = i2;
6585 - for (; --a2 >= 0 && o3[a2] === "\\"; ) u2 = !u2;
6586 - return u2 ? "|" : " |";
6587 - }), n2 = t3.split(m2.splitPipe), s2 = 0;
6588 - if (n2[0].trim() || n2.shift(), n2.length > 0 && !n2.at(-1)?.trim() && n2.pop(), e2) if (n2.length > e2) n2.splice(e2);
6589 - else for (; n2.length < e2; ) n2.push("");
6590 - for (; s2 < n2.length; s2++) n2[s2] = n2[s2].trim().replace(m2.slashPipe, "|");
6591 - return n2;
6729 + function te(l4, e2) {
6730 + let t2 = l4.replace(m2.findPipe, (r2, o2, s) => {
6731 + let u = false, a = o2;
6732 + for (; --a >= 0 && s[a] === "\\"; ) u = !u;
6733 + return u ? "|" : " |";
6734 + }), n = t2.split(m2.splitPipe), i = 0;
6735 + if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), e2) if (n.length > e2) n.splice(e2);
6736 + else for (; n.length < e2; ) n.push("");
6737 + for (; i < n.length; i++) n[i] = n[i].trim().replace(m2.slashPipe, "|");
6738 + return n;
6592 6739 }
6593 - function $2(l4, e2, t3) {
6594 - let n2 = l4.length;
6595 - if (n2 === 0) return "";
6596 - let s2 = 0;
6597 - for (; s2 < n2; ) {
6598 - let r2 = l4.charAt(n2 - s2 - 1);
6599 - if (r2 === e2 && !t3) s2++;
6600 - else if (r2 !== e2 && t3) s2++;
6740 + function $2(l4, e2, t2) {
6741 + let n = l4.length;
6742 + if (n === 0) return "";
6743 + let i = 0;
6744 + for (; i < n; ) {
6745 + let r2 = l4.charAt(n - i - 1);
6746 + if (r2 === e2 && !t2) i++;
6747 + else if (r2 !== e2 && t2) i++;
6601 6748 else break;
6602 6749 }
6603 - return l4.slice(0, n2 - s2);
6750 + return l4.slice(0, n - i);
6604 6751 }
6605 - function Y(l4) {
6752 + function ne(l4) {
6606 6753 let e2 = l4.split(`
6607 -`), t3 = e2.length - 1;
6608 - for (; t3 >= 0 && m2.blankLine.test(e2[t3]); ) t3--;
6609 - return e2.length - t3 <= 2 ? l4 : e2.slice(0, t3 + 1).join(`
6754 +`), t2 = e2.length - 1;
6755 + for (; t2 >= 0 && m2.blankLine.test(e2[t2]); ) t2--;
6756 + return e2.length - t2 <= 2 ? l4 : e2.slice(0, t2 + 1).join(`
6610 6757 `);
6611 6758 }
6612 - function ge(l4, e2) {
6759 + function D2(l4) {
6760 + return l4.toLowerCase().toUpperCase().toLowerCase();
6761 + }
6762 + function me(l4, e2) {
6613 6763 if (l4.indexOf(e2[1]) === -1) return -1;
6614 - let t3 = 0;
6615 - for (let n2 = 0; n2 < l4.length; n2++) if (l4[n2] === "\\") n2++;
6616 - else if (l4[n2] === e2[0]) t3++;
6617 - else if (l4[n2] === e2[1] && (t3--, t3 < 0)) return n2;
6618 - return t3 > 0 ? -2 : -1;
6764 + let t2 = 0;
6765 + for (let n = 0; n < l4.length; n++) if (l4[n] === "\\") n++;
6766 + else if (l4[n] === e2[0]) t2++;
6767 + else if (l4[n] === e2[1] && (t2--, t2 < 0)) return n;
6768 + return t2 > 0 ? -2 : -1;
6619 6769 }
6620 - function fe(l4, e2 = 0) {
6621 - let t3 = e2, n2 = "";
6622 - for (let s2 of l4) if (s2 === " ") {
6623 - let r2 = 4 - t3 % 4;
6624 - n2 += " ".repeat(r2), t3 += r2;
6625 - } else n2 += s2, t3++;
6626 - return n2;
6770 + function xe(l4, e2 = 0) {
6771 + let t2 = e2, n = "";
6772 + for (let i of l4) if (i === " ") {
6773 + let r2 = 4 - t2 % 4;
6774 + n += " ".repeat(r2), t2 += r2;
6775 + } else n += i, t2++;
6776 + return n;
6627 6777 }
6628 - function me(l4, e2, t3, n2, s2) {
6629 - let r2 = e2.href, i2 = e2.title || null, o3 = l4[1].replace(s2.other.outputLinkReplace, "$1");
6630 - n2.state.inLink = true;
6631 - let u2 = { type: l4[0].charAt(0) === "!" ? "image" : "link", raw: t3, href: r2, title: i2, text: o3, tokens: n2.inlineTokens(o3) };
6632 - return n2.state.inLink = false, u2;
6778 + function be(l4, e2, t2, n, i) {
6779 + let r2 = e2.href, o2 = e2.title || null, s = l4[1].replace(i.other.outputLinkReplace, "$1"), u = l4[0].charAt(0) === "!";
6780 + n.state.inLink = true;
6781 + let a = n.state.linkEmitted, p2 = n.state.inRawBlock;
6782 + n.state.linkEmitted = false;
6783 + let c2 = n.inlineTokens(s), h = n.state.linkEmitted;
6784 + if (n.state.linkEmitted = a, n.state.inLink = false, !u) {
6785 + if (h) {
6786 + n.state.inRawBlock = p2;
6787 + return;
6788 + }
6789 + n.state.linkEmitted = true;
6790 + }
6791 + return { type: u ? "image" : "link", raw: t2, href: r2, title: o2, text: s, tokens: c2 };
6633 6792 }
6634 - function rt(l4, e2, t3) {
6635 - let n2 = l4.match(t3.other.indentCodeCompensation);
6636 - if (n2 === null) return e2;
6637 - let s2 = n2[1];
6793 + function xt(l4, e2, t2) {
6794 + let n = l4.match(t2.other.indentCodeCompensation);
6795 + if (n === null) return e2;
6796 + let i = n[1];
6638 6797 return e2.split(`
6639 6798 `).map((r2) => {
6640 - let i2 = r2.match(t3.other.beginningSpace);
6641 - if (i2 === null) return r2;
6642 - let [o3] = i2;
6643 - return o3.length >= s2.length ? r2.slice(s2.length) : r2;
6799 + let o2 = r2.match(t2.other.beginningSpace);
6800 + if (o2 === null) return r2;
6801 + let [s] = o2;
6802 + return r2.slice(Math.min(s.length, i.length));
6644 6803 }).join(`
6645 6804 `);
6646 6805 }
6647 - var w2 = class {
6806 + function Re(l4, e2, t2, n) {
6807 + if (!e2.includes("<")) return false;
6808 + for (let i = 0; i < e2.length; i++) {
6809 + if (e2[i] === "\\") {
6810 + i++;
6811 + continue;
6812 + }
6813 + if (e2[i] === "`") {
6814 + let s = n.inline.code.exec(e2.slice(i));
6815 + if (s) {
6816 + i += s[0].length - 1;
6817 + continue;
6818 + }
6819 + }
6820 + if (e2[i] !== "<") continue;
6821 + let r2 = l4.slice(t2 + i), o2 = n.inline.tag.exec(r2) || n.inline.autolink.exec(r2);
6822 + if (o2) {
6823 + if (o2[0].length > e2.length - i) return true;
6824 + i += o2[0].length - 1;
6825 + }
6826 + }
6827 + return false;
6828 + }
6829 + var y2 = class {
6648 6830 options;
6649 6831 rules;
6650 6832 lexer;
6651 6833 constructor(e2) {
@@ -6651,319 +6833,326 @@
6651 6833 constructor(e2) {
6652 6834 this.options = e2 || T;
6653 6835 }
6654 6836 space(e2) {
6655 - let t3 = this.rules.block.newline.exec(e2);
6656 - if (t3 && t3[0].length > 0) return { type: "space", raw: t3[0] };
6837 + let t2 = this.rules.block.newline.exec(e2);
6838 + if (t2 && t2[0].length > 0) return { type: "space", raw: t2[0] };
6657 6839 }
6658 6840 code(e2) {
6659 - let t3 = this.rules.block.code.exec(e2);
6660 - if (t3) {
6661 - let n2 = this.options.pedantic ? t3[0] : Y(t3[0]), s2 = n2.replace(this.rules.other.codeRemoveIndent, "");
6662 - return { type: "code", raw: n2, codeBlockStyle: "indented", text: s2 };
6841 + let t2 = this.rules.block.code.exec(e2);
6842 + if (t2) {
6843 + let n = this.options.pedantic ? t2[0] : ne(t2[0]), i = n.replace(this.rules.other.codeRemoveIndent, "");
6844 + return { type: "code", raw: n, codeBlockStyle: "indented", text: i };
6663 6845 }
6664 6846 }
6665 6847 fences(e2) {
6666 - let t3 = this.rules.block.fences.exec(e2);
6667 - if (t3) {
6668 - let n2 = t3[0], s2 = rt(n2, t3[3] || "", this.rules);
6669 - return { type: "code", raw: n2, lang: t3[2] ? t3[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t3[2], text: s2 };
6848 + let t2 = this.rules.block.fences.exec(e2);
6849 + if (t2) {
6850 + let n = t2[0], i = xt(n, t2[3] || "", this.rules);
6851 + return { type: "code", raw: n, lang: t2[2] ? t2[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t2[2], text: i };
6670 6852 }
6671 6853 }
6672 6854 heading(e2) {
6673 - let t3 = this.rules.block.heading.exec(e2);
6674 - if (t3) {
6675 - let n2 = t3[2].trim();
6676 - if (this.rules.other.endingHash.test(n2)) {
6677 - let s2 = $2(n2, "#");
6678 - (this.options.pedantic || !s2 || this.rules.other.endingSpaceChar.test(s2)) && (n2 = s2.trim());
6855 + let t2 = this.rules.block.heading.exec(e2);
6856 + if (t2) {
6857 + let n = t2[2].trim();
6858 + if (this.rules.other.endingHash.test(n)) {
6859 + let i = $2(n, "#");
6860 + (this.options.pedantic || !i || this.rules.other.endingSpaceTabChar.test(i)) && (n = i.trim());
6679 6861 }
6680 - return { type: "heading", raw: $2(t3[0], `
6681 -`), depth: t3[1].length, text: n2, tokens: this.lexer.inline(n2) };
6862 + return { type: "heading", raw: $2(t2[0], `
6863 +`), depth: t2[1].length, text: n, tokens: this.lexer.inline(n) };
6682 6864 }
6683 6865 }
6684 6866 hr(e2) {
6685 - let t3 = this.rules.block.hr.exec(e2);
6686 - if (t3) return { type: "hr", raw: $2(t3[0], `
6867 + let t2 = this.rules.block.hr.exec(e2);
6868 + if (t2) return { type: "hr", raw: $2(t2[0], `
6687 6869 `) };
6688 6870 }
6689 6871 blockquote(e2) {
6690 - let t3 = this.rules.block.blockquote.exec(e2);
6691 - if (t3) {
6692 - let n2 = $2(t3[0], `
6872 + let t2 = this.rules.block.blockquote.exec(e2);
6873 + if (t2) {
6874 + let n = $2(t2[0], `
6693 6875 `).split(`
6694 -`), s2 = "", r2 = "", i2 = [];
6695 - for (; n2.length > 0; ) {
6696 - let o3 = false, u2 = [], a2;
6697 - for (a2 = 0; a2 < n2.length; a2++) if (this.rules.other.blockquoteStart.test(n2[a2])) u2.push(n2[a2]), o3 = true;
6698 - else if (!o3) u2.push(n2[a2]);
6876 +`), i = "", r2 = "", o2 = [];
6877 + for (; n.length > 0; ) {
6878 + let s = false, u = [], a;
6879 + for (a = 0; a < n.length; a++) if (this.rules.other.blockquoteStart.test(n[a])) u.push(n[a]), s = true;
6880 + else if (!s) u.push(n[a]);
6699 6881 else break;
6700 - n2 = n2.slice(a2);
6701 - let c2 = u2.join(`
6702 -`), p2 = c2.replace(this.rules.other.blockquoteSetextReplace, `
6882 + n = n.slice(a);
6883 + let p2 = u.join(`
6884 +`), c2 = p2.replace(this.rules.other.blockquoteSetextReplace, `
6703 6885 $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
6704 - s2 = s2 ? `${s2}
6705 -${c2}` : c2, r2 = r2 ? `${r2}
6706 -${p2}` : p2;
6707 - let k2 = this.lexer.state.top;
6708 - if (this.lexer.state.top = true, this.lexer.blockTokens(p2, i2, true), this.lexer.state.top = k2, n2.length === 0) break;
6709 - let h2 = i2.at(-1);
6710 - if (h2?.type === "code") break;
6711 - if (h2?.type === "blockquote") {
6712 - let R = h2, f2 = R.raw + `
6713 -` + n2.join(`
6714 -`), S2 = this.blockquote(f2);
6715 - i2[i2.length - 1] = S2, s2 = s2.substring(0, s2.length - R.raw.length) + S2.raw, r2 = r2.substring(0, r2.length - R.text.length) + S2.text;
6886 + i = i ? `${i}
6887 +${p2}` : p2, r2 = r2 ? `${r2}
6888 +${c2}` : c2;
6889 + let h = this.lexer.state.top;
6890 + if (this.lexer.state.top = true, this.lexer.blockTokens(c2, o2, true), this.lexer.state.top = h, n.length === 0) break;
6891 + let k2 = o2.at(-1);
6892 + if (k2?.type === "code") break;
6893 + if (k2?.type === "blockquote") {
6894 + let O = k2, g2 = n.join(`
6895 +`), w2 = O.raw + `
6896 +` + g2.replace(this.rules.other.blockquoteSetextReplace2, ""), z = this.blockquote(w2);
6897 + o2[o2.length - 1] = z, i = `${i}
6898 +${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + z.text;
6716 6899 break;
6717 - } else if (h2?.type === "list") {
6718 - let R = h2, f2 = R.raw + `
6719 -` + n2.join(`
6720 -`), S2 = this.list(f2);
6721 - i2[i2.length - 1] = S2, s2 = s2.substring(0, s2.length - h2.raw.length) + S2.raw, r2 = r2.substring(0, r2.length - R.raw.length) + S2.raw, n2 = f2.substring(i2.at(-1).raw.length).split(`
6900 + } else if (k2?.type === "list") {
6901 + let O = k2, g2 = O.raw + `
6902 +` + n.join(`
6903 +`), w2 = this.list(g2);
6904 + o2[o2.length - 1] = w2, i = i.substring(0, i.length - k2.raw.length) + w2.raw, r2 = r2.substring(0, r2.length - O.raw.length) + w2.raw, n = g2.substring(o2.at(-1).raw.length).split(`
6722 6905 `);
6723 6906 continue;
6724 6907 }
6725 6908 }
6726 - return { type: "blockquote", raw: s2, tokens: i2, text: r2 };
6909 + return { type: "blockquote", raw: i, tokens: o2, text: r2 };
6727 6910 }
6728 6911 }
6729 6912 list(e2) {
6730 - let t3 = this.rules.block.list.exec(e2);
6731 - if (t3) {
6732 - let n2 = t3[1].trim(), s2 = n2.length > 1, r2 = { type: "list", raw: "", ordered: s2, start: s2 ? +n2.slice(0, -1) : "", loose: false, items: [] };
6733 - n2 = s2 ? `\\d{1,9}\\${n2.slice(-1)}` : `\\${n2}`, this.options.pedantic && (n2 = s2 ? n2 : "[*+-]");
6734 - let i2 = this.rules.other.listItemRegex(n2), o3 = false;
6913 + let t2 = this.rules.block.list.exec(e2);
6914 + if (t2) {
6915 + let n = t2[1].trim(), i = n.length > 1, r2 = { type: "list", raw: "", ordered: i, start: i ? +n.slice(0, -1) : "", loose: false, items: [] };
6916 + n = i ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = i ? n : "[*+-]");
6917 + let o2 = this.rules.other.listItemRegex(n), s = false;
6735 6918 for (; e2; ) {
6736 - let a2 = false, c2 = "", p2 = "";
6737 - if (!(t3 = i2.exec(e2)) || this.rules.block.hr.test(e2)) break;
6738 - c2 = t3[0], e2 = e2.substring(c2.length);
6739 - let k2 = fe(t3[2].split(`
6740 -`, 1)[0], t3[1].length), h2 = e2.split(`
6741 -`, 1)[0], R = !k2.trim(), f2 = 0;
6742 - if (this.options.pedantic ? (f2 = 2, p2 = k2.trimStart()) : R ? f2 = t3[1].length + 1 : (f2 = k2.search(this.rules.other.nonSpaceChar), f2 = f2 > 4 ? 1 : f2, p2 = k2.slice(f2), f2 += t3[1].length), R && this.rules.other.blankLine.test(h2) && (c2 += h2 + `
6743 -`, e2 = e2.substring(h2.length + 1), a2 = true), !a2) {
6744 - let S2 = this.rules.other.nextBulletRegex(f2), ee = this.rules.other.hrRegex(f2), te = this.rules.other.fencesBeginRegex(f2), ne = this.rules.other.headingBeginRegex(f2), xe = this.rules.other.htmlBeginRegex(f2), be = this.rules.other.blockquoteBeginRegex(f2);
6919 + let a = false, p2 = "", c2 = "";
6920 + if (!(t2 = o2.exec(e2)) || this.rules.block.hr.test(e2)) break;
6921 + p2 = t2[0], e2 = e2.substring(p2.length);
6922 + let h = xe(t2[2].split(`
6923 +`, 1)[0], t2[1].length), k2 = e2.split(`
6924 +`, 1)[0], O = !h.trim(), g2 = 0;
6925 + if (this.options.pedantic ? (g2 = 2, c2 = h.trimStart()) : O ? g2 = t2[1].length + 1 : (g2 = h.search(this.rules.other.nonSpaceChar), g2 = g2 > 4 ? 1 : g2, c2 = h.slice(g2), g2 += t2[1].length), O && this.rules.other.blankLine.test(k2) && (p2 += k2 + `
6926 +`, e2 = e2.substring(k2.length + 1), a = true), !a) {
6927 + let w2 = this.rules.other.nextBulletRegex(g2), z = this.rules.other.hrRegex(g2), re = this.rules.other.fencesBeginRegex(g2), se = this.rules.other.headingBeginRegex(g2), Te = this.rules.other.htmlBeginRegex(g2), Oe = this.rules.other.blockquoteBeginRegex(g2);
6745 6928 for (; e2; ) {
6746 - let Z = e2.split(`
6747 -`, 1)[0], C;
6748 - if (h2 = Z, this.options.pedantic ? (h2 = h2.replace(this.rules.other.listReplaceNesting, " "), C = h2) : C = h2.replace(this.rules.other.tabCharGlobal, " "), te.test(h2) || ne.test(h2) || xe.test(h2) || be.test(h2) || S2.test(h2) || ee.test(h2)) break;
6749 - if (C.search(this.rules.other.nonSpaceChar) >= f2 || !h2.trim()) p2 += `
6750 -` + C.slice(f2);
6929 + let j2 = e2.split(`
6930 +`, 1)[0], q2;
6931 + if (k2 = j2, this.options.pedantic ? (k2 = k2.replace(this.rules.other.listReplaceNesting, " "), q2 = k2) : q2 = k2.replace(this.rules.other.tabCharGlobal, " "), re.test(k2) || se.test(k2) || Te.test(k2) || Oe.test(k2) || w2.test(k2) || z.test(k2)) break;
6932 + if (q2.search(this.rules.other.nonSpaceChar) >= g2 || !k2.trim()) c2 += `
6933 +` + q2.slice(g2);
6751 6934 else {
6752 - if (R || k2.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || te.test(k2) || ne.test(k2) || ee.test(k2)) break;
6753 - p2 += `
6754 -` + h2;
6935 + if (O || h.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || re.test(h) || se.test(h) || z.test(h)) break;
6936 + c2 += `
6937 +` + k2;
6755 6938 }
6756 - R = !h2.trim(), c2 += Z + `
6757 -`, e2 = e2.substring(Z.length + 1), k2 = C.slice(f2);
6939 + O = !k2.trim(), p2 += j2 + `
6940 +`, e2 = e2.substring(j2.length + 1), h = q2.slice(g2);
6758 6941 }
6759 6942 }
6760 - r2.loose || (o3 ? r2.loose = true : this.rules.other.doubleBlankLine.test(c2) && (o3 = true)), r2.items.push({ type: "list_item", raw: c2, task: !!this.options.gfm && this.rules.other.listIsTask.test(p2), loose: false, text: p2, tokens: [] }), r2.raw += c2;
6943 + r2.loose || (s ? r2.loose = true : this.rules.other.doubleBlankLine.test(p2) && (s = true)), r2.items.push({ type: "list_item", raw: p2, task: !!this.options.gfm && this.rules.other.listIsTask.test(c2), loose: false, text: c2, tokens: [] }), r2.raw += p2;
6761 6944 }
6762 - let u2 = r2.items.at(-1);
6763 - if (u2) u2.raw = u2.raw.trimEnd(), u2.text = u2.text.trimEnd();
6945 + let u = r2.items.at(-1);
6946 + if (u) u.raw = u.raw.trimEnd(), u.text = u.text.trimEnd();
6764 6947 else return;
6765 6948 r2.raw = r2.raw.trimEnd();
6766 - for (let a2 of r2.items) {
6767 - this.lexer.state.top = false, a2.tokens = this.lexer.blockTokens(a2.text, []);
6768 - let c2 = a2.tokens[0];
6769 - if (a2.task && (c2?.type === "text" || c2?.type === "paragraph")) {
6770 - a2.text = a2.text.replace(this.rules.other.listReplaceTask, ""), c2.raw = c2.raw.replace(this.rules.other.listReplaceTask, ""), c2.text = c2.text.replace(this.rules.other.listReplaceTask, "");
6771 - for (let k2 = this.lexer.inlineQueue.length - 1; k2 >= 0; k2--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[k2].src)) {
6772 - this.lexer.inlineQueue[k2].src = this.lexer.inlineQueue[k2].src.replace(this.rules.other.listReplaceTask, "");
6949 + for (let a of r2.items) if (this.lexer.state.top = false, a.tokens = this.lexer.blockTokens(a.text, []), !r2.loose) {
6950 + let p2 = a.tokens.filter((h) => h.type === "space"), c2 = p2.length > 0 && p2.some((h) => this.rules.other.anyLine.test(h.raw));
6951 + r2.loose = c2;
6952 + }
6953 + for (let a of r2.items) {
6954 + let p2 = a.tokens[0];
6955 + if (a.task && (p2?.type === "text" || p2?.type === "paragraph")) {
6956 + a.text = a.text.replace(this.rules.other.listReplaceTask, ""), p2.raw = p2.raw.replace(this.rules.other.listReplaceTask, ""), p2.text = p2.text.replace(this.rules.other.listReplaceTask, "");
6957 + for (let h = this.lexer.inlineQueue.length - 1; h >= 0; h--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)) {
6958 + this.lexer.inlineQueue[h].src = this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask, "");
6773 6959 break;
6774 6960 }
6775 - let p2 = this.rules.other.listTaskCheckbox.exec(a2.raw);
6776 - if (p2) {
6777 - let k2 = { type: "checkbox", raw: p2[0] + " ", checked: p2[0] !== "[ ]" };
6778 - a2.checked = k2.checked, r2.loose ? a2.tokens[0] && ["paragraph", "text"].includes(a2.tokens[0].type) && "tokens" in a2.tokens[0] && a2.tokens[0].tokens ? (a2.tokens[0].raw = k2.raw + a2.tokens[0].raw, a2.tokens[0].text = k2.raw + a2.tokens[0].text, a2.tokens[0].tokens.unshift(k2)) : a2.tokens.unshift({ type: "paragraph", raw: k2.raw, text: k2.raw, tokens: [k2] }) : a2.tokens.unshift(k2);
6961 + let c2 = this.rules.other.listTaskCheckbox.exec(a.raw);
6962 + if (c2) {
6963 + let h = { type: "checkbox", raw: c2[0] + " ", checked: c2[0] !== "[ ]" };
6964 + a.checked = h.checked, r2.loose ? a.tokens[0] && ["paragraph", "text"].includes(a.tokens[0].type) && "tokens" in a.tokens[0] && a.tokens[0].tokens ? (a.tokens[0].raw = h.raw + a.tokens[0].raw, a.tokens[0].text = h.raw + a.tokens[0].text, a.tokens[0].tokens.unshift(h)) : a.tokens.unshift({ type: "paragraph", raw: h.raw, text: h.raw, tokens: [h] }) : a.tokens.unshift(h);
6779 6965 }
6780 - } else a2.task && (a2.task = false);
6781 - if (!r2.loose) {
6782 - let p2 = a2.tokens.filter((h2) => h2.type === "space"), k2 = p2.length > 0 && p2.some((h2) => this.rules.other.anyLine.test(h2.raw));
6783 - r2.loose = k2;
6784 - }
6966 + } else a.task && (a.task = false);
6785 6967 }
6786 - if (r2.loose) for (let a2 of r2.items) {
6787 - a2.loose = true;
6788 - for (let c2 of a2.tokens) c2.type === "text" && (c2.type = "paragraph");
6968 + if (r2.loose) for (let a of r2.items) {
6969 + a.loose = true;
6970 + for (let p2 of a.tokens) p2.type === "text" && (p2.type = "paragraph");
6789 6971 }
6790 6972 return r2;
6791 6973 }
6792 6974 }
6793 6975 html(e2) {
6794 - let t3 = this.rules.block.html.exec(e2);
6795 - if (t3) {
6796 - let n2 = Y(t3[0]);
6797 - return { type: "html", block: true, raw: n2, pre: t3[1] === "pre" || t3[1] === "script" || t3[1] === "style", text: n2 };
6976 + let t2 = this.rules.block.html.exec(e2);
6977 + if (t2) {
6978 + let n = ne(t2[0]);
6979 + return { type: "html", block: true, raw: n, pre: t2[1] === "pre" || t2[1] === "script" || t2[1] === "style", text: n };
6798 6980 }
6799 6981 }
6800 6982 def(e2) {
6801 - let t3 = this.rules.block.def.exec(e2);
6802 - if (t3) {
6803 - let n2 = t3[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), s2 = t3[2] ? t3[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", r2 = t3[3] ? t3[3].substring(1, t3[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t3[3];
6804 - return { type: "def", tag: n2, raw: $2(t3[0], `
6805 -`), href: s2, title: r2 };
6983 + let t2 = this.rules.block.def.exec(e2);
6984 + if (t2) {
6985 + let n = D2(t2[1]).replace(this.rules.other.multipleSpaceGlobal, " "), i = t2[2] ? t2[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", r2 = t2[3] ? t2[3].substring(1, t2[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t2[3];
6986 + return { type: "def", tag: n, raw: $2(t2[0], `
6987 +`), href: i, title: r2 };
6806 6988 }
6807 6989 }
6808 6990 table(e2) {
6809 - let t3 = this.rules.block.table.exec(e2);
6810 - if (!t3 || !this.rules.other.tableDelimiter.test(t3[2])) return;
6811 - let n2 = V(t3[1]), s2 = t3[2].replace(this.rules.other.tableAlignChars, "").split("|"), r2 = t3[3]?.trim() ? t3[3].replace(this.rules.other.tableRowBlankLine, "").split(`
6812 -`) : [], i2 = { type: "table", raw: $2(t3[0], `
6991 + let t2 = this.rules.block.table.exec(e2);
6992 + if (!t2 || !this.rules.other.tableDelimiter.test(t2[2])) return;
6993 + let n = te(t2[1]), i = t2[2].replace(this.rules.other.tableAlignChars, "").split("|"), r2 = t2[3]?.trim() ? t2[3].replace(this.rules.other.tableRowBlankLine, "").split(`
6994 +`) : [], o2 = { type: "table", raw: $2(t2[0], `
6813 6995 `), header: [], align: [], rows: [] };
6814 - if (n2.length === s2.length) {
6815 - for (let o3 of s2) this.rules.other.tableAlignRight.test(o3) ? i2.align.push("right") : this.rules.other.tableAlignCenter.test(o3) ? i2.align.push("center") : this.rules.other.tableAlignLeft.test(o3) ? i2.align.push("left") : i2.align.push(null);
6816 - for (let o3 = 0; o3 < n2.length; o3++) i2.header.push({ text: n2[o3], tokens: this.lexer.inline(n2[o3]), header: true, align: i2.align[o3] });
6817 - for (let o3 of r2) i2.rows.push(V(o3, i2.header.length).map((u2, a2) => ({ text: u2, tokens: this.lexer.inline(u2), header: false, align: i2.align[a2] })));
6818 - return i2;
6996 + if (n.length === i.length) {
6997 + for (let s of i) this.rules.other.tableAlignRight.test(s) ? o2.align.push("right") : this.rules.other.tableAlignCenter.test(s) ? o2.align.push("center") : this.rules.other.tableAlignLeft.test(s) ? o2.align.push("left") : o2.align.push(null);
6998 + for (let s = 0; s < n.length; s++) o2.header.push({ text: n[s], tokens: this.lexer.inline(n[s]), header: true, align: o2.align[s] });
6999 + for (let s of r2) o2.rows.push(te(s, o2.header.length).map((u, a) => ({ text: u, tokens: this.lexer.inline(u), header: false, align: o2.align[a] })));
7000 + return o2;
6819 7001 }
6820 7002 }
6821 7003 lheading(e2) {
6822 - let t3 = this.rules.block.lheading.exec(e2);
6823 - if (t3) {
6824 - let n2 = t3[1].trim();
6825 - return { type: "heading", raw: $2(t3[0], `
6826 -`), depth: t3[2].charAt(0) === "=" ? 1 : 2, text: n2, tokens: this.lexer.inline(n2) };
7004 + let t2 = this.rules.block.lheading.exec(e2);
7005 + if (t2) {
7006 + let n = t2[1].trim();
7007 + return { type: "heading", raw: $2(t2[0], `
7008 +`), depth: t2[2].charAt(0) === "=" ? 1 : 2, text: n, tokens: this.lexer.inline(n) };
6827 7009 }
6828 7010 }
6829 7011 paragraph(e2) {
6830 - let t3 = this.rules.block.paragraph.exec(e2);
6831 - if (t3) {
6832 - let n2 = t3[1].charAt(t3[1].length - 1) === `
6833 -` ? t3[1].slice(0, -1) : t3[1];
6834 - return { type: "paragraph", raw: t3[0], text: n2, tokens: this.lexer.inline(n2) };
7012 + let t2 = this.rules.block.paragraph.exec(e2);
7013 + if (t2) {
7014 + let n = t2[1].charAt(t2[1].length - 1) === `
7015 +` ? t2[1].slice(0, -1) : t2[1];
7016 + return { type: "paragraph", raw: t2[0], text: n, tokens: this.lexer.inline(n) };
6835 7017 }
6836 7018 }
6837 7019 text(e2) {
6838 - let t3 = this.rules.block.text.exec(e2);
6839 - if (t3) return { type: "text", raw: t3[0], text: t3[0], tokens: this.lexer.inline(t3[0]) };
7020 + let t2 = this.rules.block.text.exec(e2);
7021 + if (t2) return { type: "text", raw: t2[0], text: t2[0], tokens: this.lexer.inline(t2[0]) };
6840 7022 }
6841 7023 escape(e2) {
6842 - let t3 = this.rules.inline.escape.exec(e2);
6843 - if (t3) return { type: "escape", raw: t3[0], text: t3[1] };
7024 + let t2 = this.rules.inline.escape.exec(e2);
7025 + if (t2) return { type: "escape", raw: t2[0], text: t2[1] };
6844 7026 }
6845 7027 tag(e2) {
6846 - let t3 = this.rules.inline.tag.exec(e2);
6847 - if (t3) return !this.lexer.state.inLink && this.rules.other.startATag.test(t3[0]) ? this.lexer.state.inLink = true : this.lexer.state.inLink && this.rules.other.endATag.test(t3[0]) && (this.lexer.state.inLink = false), !this.lexer.state.inRawBlock && this.rules.other.startPreScriptTag.test(t3[0]) ? this.lexer.state.inRawBlock = true : this.lexer.state.inRawBlock && this.rules.other.endPreScriptTag.test(t3[0]) && (this.lexer.state.inRawBlock = false), { type: "html", raw: t3[0], inLink: this.lexer.state.inLink, inRawBlock: this.lexer.state.inRawBlock, block: false, text: t3[0] };
7028 + let t2 = this.rules.inline.tag.exec(e2);
7029 + if (t2) return !this.lexer.state.inLink && this.rules.other.startATag.test(t2[0]) ? this.lexer.state.inLink = true : this.lexer.state.inLink && this.rules.other.endATag.test(t2[0]) && (this.lexer.state.inLink = false), !this.lexer.state.inRawBlock && this.rules.other.startPreScriptTag.test(t2[0]) ? this.lexer.state.inRawBlock = true : this.lexer.state.inRawBlock && this.rules.other.endPreScriptTag.test(t2[0]) && (this.lexer.state.inRawBlock = false), { type: "html", raw: t2[0], inLink: this.lexer.state.inLink, inRawBlock: this.lexer.state.inRawBlock, block: false, text: t2[0] };
6848 7030 }
6849 7031 link(e2) {
6850 - let t3 = this.rules.inline.link.exec(e2);
6851 - if (t3) {
6852 - let n2 = t3[2].trim();
6853 - if (!this.options.pedantic && this.rules.other.startAngleBracket.test(n2)) {
6854 - if (!this.rules.other.endAngleBracket.test(n2)) return;
6855 - let i2 = $2(n2.slice(0, -1), "\\");
6856 - if ((n2.length - i2.length) % 2 === 0) return;
7032 + let t2 = this.rules.inline.link.exec(e2);
7033 + if (t2) {
7034 + let n = t2[0].charAt(0) === "!" ? 2 : 1;
7035 + if (!this.options.pedantic && Re(e2, t2[1], n, this.rules)) return;
7036 + let i = t2[2].trim();
7037 + if (!this.options.pedantic && this.rules.other.startAngleBracket.test(i)) {
7038 + if (!this.rules.other.endAngleBracket.test(i)) return;
7039 + let s = $2(i.slice(0, -1), "\\");
7040 + if ((i.length - s.length) % 2 === 0) return;
6857 7041 } else {
6858 - let i2 = ge(t3[2], "()");
6859 - if (i2 === -2) return;
6860 - if (i2 > -1) {
6861 - let u2 = (t3[0].indexOf("!") === 0 ? 5 : 4) + t3[1].length + i2;
6862 - t3[2] = t3[2].substring(0, i2), t3[0] = t3[0].substring(0, u2).trim(), t3[3] = "";
7042 + let s = me(t2[2], "()");
7043 + if (s === -2) return;
7044 + if (s > -1) {
7045 + let a = (t2[0].indexOf("!") === 0 ? 5 : 4) + t2[1].length + s;
7046 + t2[2] = t2[2].substring(0, s), t2[0] = t2[0].substring(0, a).trim(), t2[3] = "";
6863 7047 }
6864 7048 }
6865 - let s2 = t3[2], r2 = "";
7049 + let r2 = t2[2], o2 = "";
6866 7050 if (this.options.pedantic) {
6867 - let i2 = this.rules.other.pedanticHrefTitle.exec(s2);
6868 - i2 && (s2 = i2[1], r2 = i2[3]);
6869 - } else r2 = t3[3] ? t3[3].slice(1, -1) : "";
6870 - return s2 = s2.trim(), this.rules.other.startAngleBracket.test(s2) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n2) ? s2 = s2.slice(1) : s2 = s2.slice(1, -1)), me(t3, { href: s2 && s2.replace(this.rules.inline.anyPunctuation, "$1"), title: r2 && r2.replace(this.rules.inline.anyPunctuation, "$1") }, t3[0], this.lexer, this.rules);
7051 + let s = this.rules.other.pedanticHrefTitle.exec(r2);
7052 + s && (r2 = s[1], o2 = s[3]);
7053 + } else o2 = t2[3] ? t2[3].slice(1, -1) : "";
7054 + return r2 = r2.trim(), this.rules.other.startAngleBracket.test(r2) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(i) ? r2 = r2.slice(1) : r2 = r2.slice(1, -1)), be(t2, { href: r2 && r2.replace(this.rules.inline.anyPunctuation, "$1"), title: o2 && o2.replace(this.rules.inline.anyPunctuation, "$1") }, t2[0], this.lexer, this.rules);
6871 7055 }
6872 7056 }
6873 - reflink(e2, t3) {
6874 - let n2;
6875 - if ((n2 = this.rules.inline.reflink.exec(e2)) || (n2 = this.rules.inline.nolink.exec(e2))) {
6876 - let s2 = (n2[2] || n2[1]).replace(this.rules.other.multipleSpaceGlobal, " "), r2 = t3[s2.toLowerCase()];
6877 - if (!r2) {
6878 - let i2 = n2[0].charAt(0);
6879 - return { type: "text", raw: i2, text: i2 };
7057 + reflink(e2, t2) {
7058 + let n;
7059 + if ((n = this.rules.inline.reflink.exec(e2)) || (n = this.rules.inline.nolink.exec(e2))) {
7060 + let i = n[0].charAt(0) === "!" ? 2 : 1;
7061 + if (!this.options.pedantic && Re(e2, n[1], i, this.rules)) return;
7062 + let r2 = (n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " "), o2 = t2[D2(r2)];
7063 + if (!o2) {
7064 + let s = n[0].charAt(0);
7065 + return { type: "text", raw: s, text: s };
6880 7066 }
6881 - return me(n2, r2, n2[0], this.lexer, this.rules);
7067 + return be(n, o2, n[0], this.lexer, this.rules);
6882 7068 }
6883 7069 }
6884 - emStrong(e2, t3, n2 = "") {
6885 - let s2 = this.rules.inline.emStrongLDelim.exec(e2);
6886 - if (!s2 || !s2[1] && !s2[2] && !s2[3] && !s2[4] || s2[4] && n2.match(this.rules.other.unicodeAlphaNumeric)) return;
6887 - if (!(s2[1] || s2[3] || "") || !n2 || this.rules.inline.punctuation.exec(n2)) {
6888 - let i2 = [...s2[0]].length - 1, o3, u2, a2 = i2, c2 = 0, p2 = s2[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
6889 - for (p2.lastIndex = 0, t3 = t3.slice(-1 * e2.length + i2); (s2 = p2.exec(t3)) !== null; ) {
6890 - if (o3 = s2[1] || s2[2] || s2[3] || s2[4] || s2[5] || s2[6], !o3) continue;
6891 - if (u2 = [...o3].length, s2[3] || s2[4]) {
6892 - a2 += u2;
7070 + emStrong(e2, t2, n = "") {
7071 + let i = this.rules.inline.emStrongLDelim.exec(e2);
7072 + if (!i || !i[1] && !i[2] && !i[3] && !i[4] || i[4] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
7073 + if (!(i[1] || i[3] || "") || !n || this.rules.inline.punctuation.exec(n)) {
7074 + let o2 = [...i[0]].length - 1, s, u, a = o2, p2 = 0, c2 = i[0][0], h = n === c2, k2 = c2 === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
7075 + for (k2.lastIndex = 0, t2 = t2.slice(-1 * e2.length + o2); (i = k2.exec(t2)) !== null; ) {
7076 + if (s = i[1] || i[2] || i[3] || i[4] || i[5] || i[6], !s) continue;
7077 + if (u = [...s].length, i[3] || i[4]) {
7078 + a += u;
6893 7079 continue;
6894 - } else if ((s2[5] || s2[6]) && i2 % 3 && !((i2 + u2) % 3)) {
6895 - c2 += u2;
6896 - continue;
7080 + } else if (i[5] || i[6]) {
7081 + if (o2 % 3 && !((o2 + u) % 3)) {
7082 + p2 += u;
7083 + continue;
7084 + }
7085 + if (h) break;
6897 7086 }
6898 - if (a2 -= u2, a2 > 0) continue;
6899 - u2 = Math.min(u2, u2 + a2 + c2);
6900 - let k2 = [...s2[0]][0].length, h2 = e2.slice(0, i2 + s2.index + k2 + u2);
6901 - if (Math.min(i2, u2) % 2) {
6902 - let f2 = h2.slice(1, -1);
6903 - return { type: "em", raw: h2, text: f2, tokens: this.lexer.inlineTokens(f2) };
7087 + if (a -= u, a > 0) continue;
7088 + u = Math.min(u, u + a + p2);
7089 + let O = [...i[0]][0].length, g2 = e2.slice(0, o2 + i.index + O + u);
7090 + if (Math.min(o2, u) % 2) {
7091 + let z = g2.slice(1, -1);
7092 + return { type: "em", raw: g2, text: z, tokens: this.lexer.inlineTokens(z) };
6904 7093 }
6905 - let R = h2.slice(2, -2);
6906 - return { type: "strong", raw: h2, text: R, tokens: this.lexer.inlineTokens(R) };
7094 + let w2 = g2.slice(2, -2);
7095 + return { type: "strong", raw: g2, text: w2, tokens: this.lexer.inlineTokens(w2) };
6907 7096 }
6908 7097 }
6909 7098 }
6910 7099 codespan(e2) {
6911 - let t3 = this.rules.inline.code.exec(e2);
6912 - if (t3) {
6913 - let n2 = t3[2].replace(this.rules.other.newLineCharGlobal, " "), s2 = this.rules.other.nonSpaceChar.test(n2), r2 = this.rules.other.startingSpaceChar.test(n2) && this.rules.other.endingSpaceChar.test(n2);
6914 - return s2 && r2 && (n2 = n2.substring(1, n2.length - 1)), { type: "codespan", raw: t3[0], text: n2 };
7100 + let t2 = this.rules.inline.code.exec(e2);
7101 + if (t2) {
7102 + let n = t2[2].replace(this.rules.other.newLineCharGlobal, " "), i = this.rules.other.nonSpaceChar.test(n), r2 = this.rules.other.startingSpaceChar.test(n) && this.rules.other.endingSpaceChar.test(n);
7103 + return i && r2 && (n = n.substring(1, n.length - 1)), { type: "codespan", raw: t2[0], text: n };
6915 7104 }
6916 7105 }
6917 7106 br(e2) {
6918 - let t3 = this.rules.inline.br.exec(e2);
6919 - if (t3) return { type: "br", raw: t3[0] };
7107 + let t2 = this.rules.inline.br.exec(e2);
7108 + if (t2) return { type: "br", raw: t2[0] };
6920 7109 }
6921 - del(e2, t3, n2 = "") {
6922 - let s2 = this.rules.inline.delLDelim.exec(e2);
6923 - if (!s2) return;
6924 - if (!(s2[1] || "") || !n2 || this.rules.inline.punctuation.exec(n2)) {
6925 - let i2 = [...s2[0]].length - 1, o3, u2, a2 = i2, c2 = this.rules.inline.delRDelim;
6926 - for (c2.lastIndex = 0, t3 = t3.slice(-1 * e2.length + i2); (s2 = c2.exec(t3)) !== null; ) {
6927 - if (o3 = s2[1] || s2[2] || s2[3] || s2[4] || s2[5] || s2[6], !o3 || (u2 = [...o3].length, u2 !== i2)) continue;
6928 - if (s2[3] || s2[4]) {
6929 - a2 += u2;
7110 + del(e2, t2, n = "") {
7111 + let i = this.rules.inline.delLDelim.exec(e2);
7112 + if (!i) return;
7113 + if (!(i[1] || "") || !n || this.rules.inline.punctuation.exec(n)) {
7114 + let o2 = [...i[0]].length - 1, s, u, a = o2, p2 = this.rules.inline.delRDelim;
7115 + for (p2.lastIndex = 0, t2 = t2.slice(-1 * e2.length + o2); (i = p2.exec(t2)) !== null; ) {
7116 + if (s = i[1] || i[2] || i[3] || i[4] || i[5] || i[6], !s || (u = [...s].length, u !== o2)) continue;
7117 + if (i[3] || i[4]) {
7118 + a += u;
6930 7119 continue;
6931 7120 }
6932 - if (a2 -= u2, a2 > 0) continue;
6933 - u2 = Math.min(u2, u2 + a2);
6934 - let p2 = [...s2[0]][0].length, k2 = e2.slice(0, i2 + s2.index + p2 + u2), h2 = k2.slice(i2, -i2);
6935 - return { type: "del", raw: k2, text: h2, tokens: this.lexer.inlineTokens(h2) };
7121 + if (a -= u, a > 0) continue;
7122 + u = Math.min(u, u + a);
7123 + let c2 = [...i[0]][0].length, h = e2.slice(0, o2 + i.index + c2 + u), k2 = h.slice(o2, -o2);
7124 + return { type: "del", raw: h, text: k2, tokens: this.lexer.inlineTokens(k2) };
6936 7125 }
6937 7126 }
6938 7127 }
6939 7128 autolink(e2) {
6940 - let t3 = this.rules.inline.autolink.exec(e2);
6941 - if (t3) {
6942 - let n2, s2;
6943 - return t3[2] === "@" ? (n2 = t3[1], s2 = "mailto:" + n2) : (n2 = t3[1], s2 = n2), { type: "link", raw: t3[0], text: n2, href: s2, tokens: [{ type: "text", raw: n2, text: n2 }] };
7129 + let t2 = this.rules.inline.autolink.exec(e2);
7130 + if (t2) {
7131 + let n, i;
7132 + return t2[2] === "@" ? (n = t2[1], i = "mailto:" + n) : (n = t2[1], i = n), { type: "link", raw: t2[0], text: n, href: i, autolink: true, tokens: [{ type: "text", raw: n, text: n }] };
6944 7133 }
6945 7134 }
6946 7135 url(e2) {
6947 - let t3;
6948 - if (t3 = this.rules.inline.url.exec(e2)) {
6949 - let n2, s2;
6950 - if (t3[2] === "@") n2 = t3[0], s2 = "mailto:" + n2;
7136 + let t2;
7137 + if (t2 = this.rules.inline.url.exec(e2)) {
7138 + let n, i;
7139 + if (t2[2] === "@") n = t2[0], i = "mailto:" + n;
6951 7140 else {
6952 7141 let r2;
6953 7142 do
6954 - r2 = t3[0], t3[0] = this.rules.inline._backpedal.exec(t3[0])?.[0] ?? "";
6955 - while (r2 !== t3[0]);
6956 - n2 = t3[0], t3[1] === "www." ? s2 = "http://" + t3[0] : s2 = t3[0];
7143 + r2 = t2[0], t2[0] = this.rules.inline._backpedal.exec(t2[0])?.[0] ?? "";
7144 + while (r2 !== t2[0]);
7145 + n = t2[0], t2[1] === "www." ? i = "http://" + t2[0] : i = t2[0];
6957 7146 }
6958 - return { type: "link", raw: t3[0], text: n2, href: s2, tokens: [{ type: "text", raw: n2, text: n2 }] };
7147 + return { type: "link", raw: t2[0], text: n, href: i, autolink: true, tokens: [{ type: "text", raw: n, text: n }] };
6959 7148 }
6960 7149 }
6961 7150 inlineText(e2) {
6962 - let t3 = this.rules.inline.text.exec(e2);
6963 - if (t3) {
6964 - let n2 = this.lexer.state.inRawBlock;
6965 - return { type: "text", raw: t3[0], text: t3[0], escaped: n2 };
7151 + let t2 = this.rules.inline.text.exec(e2);
7152 + if (t2) {
7153 + let n = this.lexer.state.inRawBlock;
7154 + return { type: "text", raw: t2[0], text: t2[0], escaped: n };
6966 7155 }
6967 7156 }
6968 7157 };
6969 7158 var x2 = class l2 {
@@ -6972,120 +7161,120 @@
6972 7161 state;
6973 7162 inlineQueue;
6974 7163 tokenizer;
6975 7164 constructor(e2) {
6976 - this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e2 || T, this.options.tokenizer = this.options.tokenizer || new w2(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, top: true };
6977 - let t3 = { other: m2, block: B.normal, inline: A.normal };
6978 - this.options.pedantic ? (t3.block = B.pedantic, t3.inline = A.pedantic) : this.options.gfm && (t3.block = B.gfm, this.options.breaks ? t3.inline = A.breaks : t3.inline = A.gfm), this.tokenizer.rules = t3;
7165 + this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e2 || T, this.options.tokenizer = this.options.tokenizer || new y2(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, linkEmitted: false, top: true };
7166 + let t2 = { other: m2, block: G.normal, inline: B.normal };
7167 + this.options.pedantic ? (t2.block = G.pedantic, t2.inline = B.pedantic) : this.options.gfm && (t2.block = G.gfm, this.options.breaks ? t2.inline = B.breaks : t2.inline = B.gfm), this.tokenizer.rules = t2;
6979 7168 }
6980 7169 static get rules() {
6981 - return { block: B, inline: A };
7170 + return { block: G, inline: B };
6982 7171 }
6983 - static lex(e2, t3) {
6984 - return new l2(t3).lex(e2);
7172 + static lex(e2, t2) {
7173 + return new l2(t2).lex(e2);
6985 7174 }
6986 - static lexInline(e2, t3) {
6987 - return new l2(t3).inlineTokens(e2);
7175 + static lexInline(e2, t2) {
7176 + return new l2(t2).inlineTokens(e2);
6988 7177 }
6989 7178 lex(e2) {
6990 7179 e2 = e2.replace(m2.carriageReturn, `
6991 7180 `), this.blockTokens(e2, this.tokens);
6992 - for (let t3 = 0; t3 < this.inlineQueue.length; t3++) {
6993 - let n2 = this.inlineQueue[t3];
6994 - this.inlineTokens(n2.src, n2.tokens);
7181 + for (let t2 = 0; t2 < this.inlineQueue.length; t2++) {
7182 + let n = this.inlineQueue[t2];
7183 + this.inlineTokens(n.src, n.tokens);
6995 7184 }
6996 7185 return this.inlineQueue = [], this.tokens;
6997 7186 }
6998 - blockTokens(e2, t3 = [], n2 = false) {
7187 + blockTokens(e2, t2 = [], n = false) {
6999 7188 this.tokenizer.lexer = this, this.options.pedantic && (e2 = e2.replace(m2.tabCharGlobal, " ").replace(m2.spaceLine, ""));
7000 - let s2 = 1 / 0;
7189 + let i = 1 / 0;
7001 7190 for (; e2; ) {
7002 - if (e2.length < s2) s2 = e2.length;
7191 + if (e2.length < i) i = e2.length;
7003 7192 else {
7004 7193 this.infiniteLoopError(e2.charCodeAt(0));
7005 7194 break;
7006 7195 }
7007 7196 let r2;
7008 - if (this.options.extensions?.block?.some((o3) => (r2 = o3.call({ lexer: this }, e2, t3)) ? (e2 = e2.substring(r2.raw.length), t3.push(r2), true) : false)) continue;
7197 + if (this.options.extensions?.block?.some((s) => (r2 = s.call({ lexer: this }, e2, t2)) ? (e2 = e2.substring(r2.raw.length), t2.push(r2), true) : false)) continue;
7009 7198 if (r2 = this.tokenizer.space(e2)) {
7010 7199 e2 = e2.substring(r2.raw.length);
7011 - let o3 = t3.at(-1);
7012 - r2.raw.length === 1 && o3 !== void 0 ? o3.raw += `
7013 -` : t3.push(r2);
7200 + let s = t2.at(-1);
7201 + r2.raw.length === 1 && s !== void 0 ? s.raw += `
7202 +` : t2.push(r2);
7014 7203 continue;
7015 7204 }
7016 7205 if (r2 = this.tokenizer.code(e2)) {
7017 7206 e2 = e2.substring(r2.raw.length);
7018 - let o3 = t3.at(-1);
7019 - o3?.type === "paragraph" || o3?.type === "text" ? (o3.raw += (o3.raw.endsWith(`
7207 + let s = t2.at(-1);
7208 + s?.type === "paragraph" || s?.type === "text" ? (s.raw += (s.raw.endsWith(`
7020 7209 `) ? "" : `
7021 -`) + r2.raw, o3.text += `
7022 -` + r2.text, this.inlineQueue.at(-1).src = o3.text) : t3.push(r2);
7210 +`) + r2.raw, s.text += `
7211 +` + r2.text, this.inlineQueue.at(-1).src = s.text) : t2.push(r2);
7023 7212 continue;
7024 7213 }
7025 7214 if (r2 = this.tokenizer.fences(e2)) {
7026 - e2 = e2.substring(r2.raw.length), t3.push(r2);
7215 + e2 = e2.substring(r2.raw.length), t2.push(r2);
7027 7216 continue;
7028 7217 }
7029 7218 if (r2 = this.tokenizer.heading(e2)) {
7030 - e2 = e2.substring(r2.raw.length), t3.push(r2);
7219 + e2 = e2.substring(r2.raw.length), t2.push(r2);
7031 7220 continue;
7032 7221 }
7033 7222 if (r2 = this.tokenizer.hr(e2)) {
7034 - e2 = e2.substring(r2.raw.length), t3.push(r2);
7223 + e2 = e2.substring(r2.raw.length), t2.push(r2);
7035 7224 continue;
7036 7225 }
7037 7226 if (r2 = this.tokenizer.blockquote(e2)) {
7038 - e2 = e2.substring(r2.raw.length), t3.push(r2);
7227 + e2 = e2.substring(r2.raw.length), t2.push(r2);
7039 7228 continue;
7040 7229 }
7041 7230 if (r2 = this.tokenizer.list(e2)) {
7042 - e2 = e2.substring(r2.raw.length), t3.push(r2);
7231 + e2 = e2.substring(r2.raw.length), t2.push(r2);
7043 7232 continue;
7044 7233 }
7045 7234 if (r2 = this.tokenizer.html(e2)) {
7046 - e2 = e2.substring(r2.raw.length), t3.push(r2);
7235 + e2 = e2.substring(r2.raw.length), t2.push(r2);
7047 7236 continue;
7048 7237 }
7049 7238 if (r2 = this.tokenizer.def(e2)) {
7050 7239 e2 = e2.substring(r2.raw.length);
7051 - let o3 = t3.at(-1);
7052 - o3?.type === "paragraph" || o3?.type === "text" ? (o3.raw += (o3.raw.endsWith(`
7240 + let s = t2.at(-1);
7241 + s?.type === "paragraph" || s?.type === "text" ? (s.raw += (s.raw.endsWith(`
7053 7242 `) ? "" : `
7054 -`) + r2.raw, o3.text += `
7055 -` + r2.raw, this.inlineQueue.at(-1).src = o3.text) : this.tokens.links[r2.tag] || (this.tokens.links[r2.tag] = { href: r2.href, title: r2.title }, t3.push(r2));
7243 +`) + r2.raw, s.text += `
7244 +` + r2.raw, this.inlineQueue.at(-1).src = s.text) : this.tokens.links[r2.tag] || (this.tokens.links[r2.tag] = { href: r2.href, title: r2.title }, t2.push(r2));
7056 7245 continue;
7057 7246 }
7058 7247 if (r2 = this.tokenizer.table(e2)) {
7059 - e2 = e2.substring(r2.raw.length), t3.push(r2);
7248 + e2 = e2.substring(r2.raw.length), t2.push(r2);
7060 7249 continue;
7061 7250 }
7062 7251 if (r2 = this.tokenizer.lheading(e2)) {
7063 - e2 = e2.substring(r2.raw.length), t3.push(r2);
7252 + e2 = e2.substring(r2.raw.length), t2.push(r2);
7064 7253 continue;
7065 7254 }
7066 - let i2 = e2;
7255 + let o2 = e2;
7067 7256 if (this.options.extensions?.startBlock) {
7068 - let o3 = 1 / 0, u2 = e2.slice(1), a2;
7069 - this.options.extensions.startBlock.forEach((c2) => {
7070 - a2 = c2.call({ lexer: this }, u2), typeof a2 == "number" && a2 >= 0 && (o3 = Math.min(o3, a2));
7071 - }), o3 < 1 / 0 && o3 >= 0 && (i2 = e2.substring(0, o3 + 1));
7257 + let s = 1 / 0, u = e2.slice(1), a;
7258 + this.options.extensions.startBlock.forEach((p2) => {
7259 + a = p2.call({ lexer: this }, u), typeof a == "number" && a >= 0 && (s = Math.min(s, a));
7260 + }), s < 1 / 0 && s >= 0 && (o2 = e2.substring(0, s + 1));
7072 7261 }
7073 - if (this.state.top && (r2 = this.tokenizer.paragraph(i2))) {
7074 - let o3 = t3.at(-1);
7075 - n2 && o3?.type === "paragraph" ? (o3.raw += (o3.raw.endsWith(`
7262 + if (this.state.top && (r2 = this.tokenizer.paragraph(o2))) {
7263 + let s = t2.at(-1);
7264 + n && s?.type === "paragraph" ? (s.raw += (s.raw.endsWith(`
7076 7265 `) ? "" : `
7077 -`) + r2.raw, o3.text += `
7078 -` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = o3.text) : t3.push(r2), n2 = i2.length !== e2.length, e2 = e2.substring(r2.raw.length);
7266 +`) + r2.raw, s.text += `
7267 +` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s.text) : t2.push(r2), n = o2.length !== e2.length, e2 = e2.substring(r2.raw.length);
7079 7268 continue;
7080 7269 }
7081 7270 if (r2 = this.tokenizer.text(e2)) {
7082 7271 e2 = e2.substring(r2.raw.length);
7083 - let o3 = t3.at(-1);
7084 - o3?.type === "text" ? (o3.raw += (o3.raw.endsWith(`
7272 + let s = t2.at(-1);
7273 + s?.type === "text" ? (s.raw += (s.raw.endsWith(`
7085 7274 `) ? "" : `
7086 -`) + r2.raw, o3.text += `
7087 -` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = o3.text) : t3.push(r2);
7275 +`) + r2.raw, s.text += `
7276 +` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s.text) : t2.push(r2);
7088 7277 continue;
7089 7278 }
7090 7279 if (e2) {
7091 7280 this.infiniteLoopError(e2.charCodeAt(0));
@@ -7091,87 +7280,105 @@
7091 7280 this.infiniteLoopError(e2.charCodeAt(0));
7092 7281 break;
7093 7282 }
7094 7283 }
7095 - return this.state.top = true, t3;
7284 + return this.state.top = true, t2;
7096 7285 }
7097 - inline(e2, t3 = []) {
7098 - return this.inlineQueue.push({ src: e2, tokens: t3 }), t3;
7286 + inline(e2, t2 = []) {
7287 + return this.inlineQueue.push({ src: e2, tokens: t2 }), t2;
7099 7288 }
7100 - inlineTokens(e2, t3 = []) {
7289 + linkInText(e2) {
7290 + if (!e2.includes("[")) return false;
7291 + let t2 = this.tokenizer.rules.inline.link;
7292 + for (let n of e2.matchAll(this.tokenizer.rules.inline.blockSkip)) if (t2.test(n[0]) && e2.charAt(n.index - 1) !== "!") return true;
7293 + for (let n of e2.matchAll(this.tokenizer.rules.inline.reflinkSearch)) {
7294 + let i = n[0], r2 = i.lastIndexOf("[");
7295 + if (!(i.charAt(0) === "!" || !Object.hasOwn(this.tokens.links, D2(i.slice(r2 + 1, -1)))) && !(r2 > 1 && this.linkInText(i.slice(1, r2 - 1)))) return true;
7296 + }
7297 + return false;
7298 + }
7299 + inlineTokens(e2, t2 = []) {
7101 7300 this.tokenizer.lexer = this;
7102 - let n2 = e2, s2 = null;
7103 - if (this.tokens.links) {
7104 - let a2 = Object.keys(this.tokens.links);
7105 - if (a2.length > 0) for (; (s2 = this.tokenizer.rules.inline.reflinkSearch.exec(n2)) !== null; ) a2.includes(s2[0].slice(s2[0].lastIndexOf("[") + 1, -1)) && (n2 = n2.slice(0, s2.index) + "[" + "a".repeat(s2[0].length - 2) + "]" + n2.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
7301 + let n = e2;
7302 + if (this.tokens.links && e2.includes("[")) {
7303 + let s = this.tokenizer.rules.inline.reflinkSearch, u = (a) => {
7304 + let p2 = a.lastIndexOf("[");
7305 + if (!Object.hasOwn(this.tokens.links, D2(a.slice(p2 + 1, -1)))) return a;
7306 + if (p2 > 1 && a.charAt(0) !== "!") {
7307 + let c2 = a.slice(1, p2 - 1);
7308 + if (this.linkInText(c2)) return "[" + c2.replace(s, u) + "][" + "a".repeat(a.length - p2 - 2) + "]";
7309 + }
7310 + return "[" + "a".repeat(a.length - 2) + "]";
7311 + };
7312 + n = n.replace(s, u);
7106 7313 }
7107 - for (; (s2 = this.tokenizer.rules.inline.anyPunctuation.exec(n2)) !== null; ) n2 = n2.slice(0, s2.index) + "++" + n2.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
7108 - let r2;
7109 - for (; (s2 = this.tokenizer.rules.inline.blockSkip.exec(n2)) !== null; ) r2 = s2[2] ? s2[2].length : 0, n2 = n2.slice(0, s2.index + r2) + "[" + "a".repeat(s2[0].length - r2 - 2) + "]" + n2.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
7110 - n2 = this.options.hooks?.emStrongMask?.call({ lexer: this }, n2) ?? n2;
7111 - let i2 = false, o3 = "", u2 = 1 / 0;
7314 + n = n.replace(this.tokenizer.rules.inline.anyPunctuation, (s) => "+".repeat(s.length)), n = n.replace(this.tokenizer.rules.inline.blockSkip, (s, u, a) => {
7315 + let p2 = a ? a.length : 0;
7316 + return s.slice(0, p2) + "[" + "a".repeat(s.length - p2 - 2) + "]";
7317 + }), n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
7318 + let i = false, r2 = "", o2 = 1 / 0;
7112 7319 for (; e2; ) {
7113 - if (e2.length < u2) u2 = e2.length;
7320 + if (e2.length < o2) o2 = e2.length;
7114 7321 else {
7115 7322 this.infiniteLoopError(e2.charCodeAt(0));
7116 7323 break;
7117 7324 }
7118 - i2 || (o3 = ""), i2 = false;
7119 - let a2;
7120 - if (this.options.extensions?.inline?.some((p2) => (a2 = p2.call({ lexer: this }, e2, t3)) ? (e2 = e2.substring(a2.raw.length), t3.push(a2), true) : false)) continue;
7121 - if (a2 = this.tokenizer.escape(e2)) {
7122 - e2 = e2.substring(a2.raw.length), t3.push(a2);
7325 + i || (r2 = ""), i = false;
7326 + let s;
7327 + if (this.options.extensions?.inline?.some((a) => (s = a.call({ lexer: this }, e2, t2)) ? (e2 = e2.substring(s.raw.length), t2.push(s), true) : false)) continue;
7328 + if (s = this.tokenizer.escape(e2)) {
7329 + e2 = e2.substring(s.raw.length), t2.push(s);
7123 7330 continue;
7124 7331 }
7125 - if (a2 = this.tokenizer.tag(e2)) {
7126 - e2 = e2.substring(a2.raw.length), t3.push(a2);
7332 + if (s = this.tokenizer.tag(e2)) {
7333 + e2 = e2.substring(s.raw.length), t2.push(s);
7127 7334 continue;
7128 7335 }
7129 - if (a2 = this.tokenizer.link(e2)) {
7130 - e2 = e2.substring(a2.raw.length), t3.push(a2);
7336 + if (s = this.tokenizer.link(e2)) {
7337 + e2 = e2.substring(s.raw.length), t2.push(s);
7131 7338 continue;
7132 7339 }
7133 - if (a2 = this.tokenizer.reflink(e2, this.tokens.links)) {
7134 - e2 = e2.substring(a2.raw.length);
7135 - let p2 = t3.at(-1);
7136 - a2.type === "text" && p2?.type === "text" ? (p2.raw += a2.raw, p2.text += a2.text) : t3.push(a2);
7340 + if (s = this.tokenizer.reflink(e2, this.tokens.links)) {
7341 + e2 = e2.substring(s.raw.length);
7342 + let a = t2.at(-1);
7343 + s.type === "text" && a?.type === "text" ? (a.raw += s.raw, a.text += s.text) : t2.push(s);
7137 7344 continue;
7138 7345 }
7139 - if (a2 = this.tokenizer.emStrong(e2, n2, o3)) {
7140 - e2 = e2.substring(a2.raw.length), t3.push(a2);
7346 + if (s = this.tokenizer.emStrong(e2, n, r2)) {
7347 + e2 = e2.substring(s.raw.length), t2.push(s);
7141 7348 continue;
7142 7349 }
7143 - if (a2 = this.tokenizer.codespan(e2)) {
7144 - e2 = e2.substring(a2.raw.length), t3.push(a2);
7350 + if (s = this.tokenizer.codespan(e2)) {
7351 + e2 = e2.substring(s.raw.length), t2.push(s);
7145 7352 continue;
7146 7353 }
7147 - if (a2 = this.tokenizer.br(e2)) {
7148 - e2 = e2.substring(a2.raw.length), t3.push(a2);
7354 + if (s = this.tokenizer.br(e2)) {
7355 + e2 = e2.substring(s.raw.length), t2.push(s);
7149 7356 continue;
7150 7357 }
7151 - if (a2 = this.tokenizer.del(e2, n2, o3)) {
7152 - e2 = e2.substring(a2.raw.length), t3.push(a2);
7358 + if (s = this.tokenizer.del(e2, n, r2)) {
7359 + e2 = e2.substring(s.raw.length), t2.push(s);
7153 7360 continue;
7154 7361 }
7155 - if (a2 = this.tokenizer.autolink(e2)) {
7156 - e2 = e2.substring(a2.raw.length), t3.push(a2);
7362 + if (s = this.tokenizer.autolink(e2)) {
7363 + e2 = e2.substring(s.raw.length), t2.push(s);
7157 7364 continue;
7158 7365 }
7159 - if (!this.state.inLink && (a2 = this.tokenizer.url(e2))) {
7160 - e2 = e2.substring(a2.raw.length), t3.push(a2);
7366 + if (!this.state.inLink && (s = this.tokenizer.url(e2))) {
7367 + e2 = e2.substring(s.raw.length), t2.push(s);
7161 7368 continue;
7162 7369 }
7163 - let c2 = e2;
7370 + let u = e2;
7164 7371 if (this.options.extensions?.startInline) {
7165 - let p2 = 1 / 0, k2 = e2.slice(1), h2;
7166 - this.options.extensions.startInline.forEach((R) => {
7167 - h2 = R.call({ lexer: this }, k2), typeof h2 == "number" && h2 >= 0 && (p2 = Math.min(p2, h2));
7168 - }), p2 < 1 / 0 && p2 >= 0 && (c2 = e2.substring(0, p2 + 1));
7372 + let a = 1 / 0, p2 = e2.slice(1), c2;
7373 + this.options.extensions.startInline.forEach((h) => {
7374 + c2 = h.call({ lexer: this }, p2), typeof c2 == "number" && c2 >= 0 && (a = Math.min(a, c2));
7375 + }), a < 1 / 0 && a >= 0 && (u = e2.substring(0, a + 1));
7169 7376 }
7170 - if (a2 = this.tokenizer.inlineText(c2)) {
7171 - e2 = e2.substring(a2.raw.length), a2.raw.slice(-1) !== "_" && (o3 = a2.raw.slice(-1)), i2 = true;
7172 - let p2 = t3.at(-1);
7173 - p2?.type === "text" ? (p2.raw += a2.raw, p2.text += a2.text) : t3.push(a2);
7377 + if (s = this.tokenizer.inlineText(u)) {
7378 + e2 = e2.substring(s.raw.length), s.raw.slice(-1) !== "_" && (r2 = s.raw.slice(-1)), i = true;
7379 + let a = t2.at(-1);
7380 + a?.type === "text" ? (a.raw += s.raw, a.text += s.text) : t2.push(s);
7174 7381 continue;
7175 7382 }
7176 7383 if (e2) {
7177 7384 this.infiniteLoopError(e2.charCodeAt(0));
@@ -7177,17 +7384,17 @@
7177 7384 this.infiniteLoopError(e2.charCodeAt(0));
7178 7385 break;
7179 7386 }
7180 7387 }
7181 - return t3;
7388 + return t2;
7182 7389 }
7183 7390 infiniteLoopError(e2) {
7184 - let t3 = "Infinite loop on byte: " + e2;
7185 - if (this.options.silent) console.error(t3);
7186 - else throw new Error(t3);
7391 + let t2 = "Infinite loop on byte: " + e2;
7392 + if (this.options.silent) console.error(t2);
7393 + else throw new Error(t2);
7187 7394 }
7188 7395 };
7189 - var y2 = class {
7396 + var P = class {
7190 7397 options;
7191 7398 parser;
7192 7399 constructor(e2) {
7193 7400 this.options = e2 || T;
@@ -7194,14 +7401,14 @@
7194 7401 }
7195 7402 space(e2) {
7196 7403 return "";
7197 7404 }
7198 - code({ text: e2, lang: t3, escaped: n2 }) {
7199 - let s2 = (t3 || "").match(m2.notSpaceStart)?.[0], r2 = e2.replace(m2.endingNewline, "") + `
7405 + code({ text: e2, lang: t2, escaped: n }) {
7406 + let i = (t2 || "").match(m2.notSpaceStart)?.[0], r2 = e2 ? e2.replace(m2.endingNewline, "") + `
7407 +` : "";
7408 + return i ? '<pre><code class="language-' + R2(i) + '">' + (n ? r2 : R2(r2, true)) + `</code></pre>
7409 +` : "<pre><code>" + (n ? r2 : R2(r2, true)) + `</code></pre>
7200 7410 `;
7201 - return s2 ? '<pre><code class="language-' + O(s2) + '">' + (n2 ? r2 : O(r2, true)) + `</code></pre>
7202 -` : "<pre><code>" + (n2 ? r2 : O(r2, true)) + `</code></pre>
7203 -`;
7204 7411 }
7205 7412 blockquote({ tokens: e2 }) {
7206 7413 return `<blockquote>
7207 7414 ${this.parser.parse(e2)}</blockquote>
@@ -7212,10 +7419,10 @@
7212 7419 }
7213 7420 def(e2) {
7214 7421 return "";
7215 7422 }
7216 - heading({ tokens: e2, depth: t3 }) {
7217 - return `<h${t3}>${this.parser.parseInline(e2)}</h${t3}>
7423 + heading({ tokens: e2, depth: t2 }) {
7424 + return `<h${t2}>${this.parser.parseInline(e2)}</h${t2}>
7218 7425 `;
7219 7426 }
7220 7427 hr(e2) {
7221 7428 return `<hr>
@@ -7221,16 +7428,16 @@
7221 7428 return `<hr>
7222 7429 `;
7223 7430 }
7224 7431 list(e2) {
7225 - let t3 = e2.ordered, n2 = e2.start, s2 = "";
7226 - for (let o3 = 0; o3 < e2.items.length; o3++) {
7227 - let u2 = e2.items[o3];
7228 - s2 += this.listitem(u2);
7432 + let t2 = e2.ordered, n = e2.start, i = "";
7433 + for (let s = 0; s < e2.items.length; s++) {
7434 + let u = e2.items[s];
7435 + i += this.listitem(u);
7229 7436 }
7230 - let r2 = t3 ? "ol" : "ul", i2 = t3 && n2 !== 1 ? ' start="' + n2 + '"' : "";
7231 - return "<" + r2 + i2 + `>
7232 -` + s2 + "</" + r2 + `>
7437 + let r2 = t2 ? "ol" : "ul", o2 = t2 && n !== 1 ? ' start="' + n + '"' : "";
7438 + return "<" + r2 + o2 + `>
7439 +` + i + "</" + r2 + `>
7233 7440 `;
7234 7441 }
7235 7442 listitem(e2) {
7236 7443 return `<li>${this.parser.parse(e2.tokens)}</li>
@@ -7243,22 +7450,22 @@
7243 7450 return `<p>${this.parser.parseInline(e2)}</p>
7244 7451 `;
7245 7452 }
7246 7453 table(e2) {
7247 - let t3 = "", n2 = "";
7248 - for (let r2 = 0; r2 < e2.header.length; r2++) n2 += this.tablecell(e2.header[r2]);
7249 - t3 += this.tablerow({ text: n2 });
7250 - let s2 = "";
7454 + let t2 = "", n = "";
7455 + for (let r2 = 0; r2 < e2.header.length; r2++) n += this.tablecell(e2.header[r2]);
7456 + t2 += this.tablerow({ text: n });
7457 + let i = "";
7251 7458 for (let r2 = 0; r2 < e2.rows.length; r2++) {
7252 - let i2 = e2.rows[r2];
7253 - n2 = "";
7254 - for (let o3 = 0; o3 < i2.length; o3++) n2 += this.tablecell(i2[o3]);
7255 - s2 += this.tablerow({ text: n2 });
7459 + let o2 = e2.rows[r2];
7460 + n = "";
7461 + for (let s = 0; s < o2.length; s++) n += this.tablecell(o2[s]);
7462 + i += this.tablerow({ text: n });
7256 7463 }
7257 - return s2 && (s2 = `<tbody>${s2}</tbody>`), `<table>
7464 + return i && (i = `<tbody>${i}</tbody>`), `<table>
7258 7465 <thead>
7259 -` + t3 + `</thead>
7260 -` + s2 + `</table>
7466 +` + t2 + `</thead>
7467 +` + i + `</table>
7261 7468 `;
7262 7469 }
7263 7470 tablerow({ text: e2 }) {
7264 7471 return `<tr>
@@ -7265,10 +7472,10 @@
7265 7472 ${e2}</tr>
7266 7473 `;
7267 7474 }
7268 7475 tablecell(e2) {
7269 - let t3 = this.parser.parseInline(e2.tokens), n2 = e2.header ? "th" : "td";
7270 - return (e2.align ? `<${n2} align="${e2.align}">` : `<${n2}>`) + t3 + `</${n2}>
7476 + let t2 = this.parser.parseInline(e2.tokens), n = e2.header ? "th" : "td";
7477 + return (e2.align ? `<${n} align="${e2.align}">` : `<${n}>`) + t2 + `</${n}>
7271 7478 `;
7272 7479 }
7273 7480 strong({ tokens: e2 }) {
7274 7481 return `<strong>${this.parser.parseInline(e2)}</strong>`;
@@ -7276,9 +7483,9 @@
7276 7483 em({ tokens: e2 }) {
7277 7484 return `<em>${this.parser.parseInline(e2)}</em>`;
7278 7485 }
7279 7486 codespan({ text: e2 }) {
7280 - return `<code>${O(e2, true)}</code>`;
7487 + return `<code>${R2(e2, true)}</code>`;
7281 7488 }
7282 7489 br(e2) {
7283 7490 return "<br>";
7284 7491 }
@@ -7284,25 +7491,25 @@
7284 7491 }
7285 7492 del({ tokens: e2 }) {
7286 7493 return `<del>${this.parser.parseInline(e2)}</del>`;
7287 7494 }
7288 - link({ href: e2, title: t3, tokens: n2 }) {
7289 - let s2 = this.parser.parseInline(n2), r2 = J(e2);
7290 - if (r2 === null) return s2;
7291 - e2 = r2;
7292 - let i2 = '<a href="' + e2 + '"';
7293 - return t3 && (i2 += ' title="' + O(t3) + '"'), i2 += ">" + s2 + "</a>", i2;
7495 + link({ href: e2, title: t2, text: n, tokens: i, autolink: r2 }) {
7496 + let o2 = r2 ? R2(n, true) : this.parser.parseInline(i), s = ee(e2);
7497 + if (s === null) return o2;
7498 + e2 = R2(s, r2);
7499 + let u = '<a href="' + e2 + '"';
7500 + return t2 && (u += ' title="' + R2(t2) + '"'), u += ">" + o2 + "</a>", u;
7294 7501 }
7295 - image({ href: e2, title: t3, text: n2, tokens: s2 }) {
7296 - s2 && (n2 = this.parser.parseInline(s2, this.parser.textRenderer));
7297 - let r2 = J(e2);
7298 - if (r2 === null) return O(n2);
7502 + image({ href: e2, title: t2, text: n, tokens: i }) {
7503 + i && (n = this.parser.parseInline(i, this.parser.textRenderer));
7504 + let r2 = ee(e2);
7505 + if (r2 === null) return R2(n);
7299 7506 e2 = r2;
7300 - let i2 = `<img src="${e2}" alt="${O(n2)}"`;
7301 - return t3 && (i2 += ` title="${O(t3)}"`), i2 += ">", i2;
7507 + let o2 = `<img src="${R2(e2)}" alt="${R2(n)}"`;
7508 + return t2 && (o2 += ` title="${R2(t2)}"`), o2 += ">", o2;
7302 7509 }
7303 7510 text(e2) {
7304 - return "tokens" in e2 && e2.tokens ? this.parser.parseInline(e2.tokens) : "escaped" in e2 && e2.escaped ? e2.text : O(e2.text);
7511 + return "tokens" in e2 && e2.tokens ? this.parser.parseInline(e2.tokens) : "escaped" in e2 && e2.escaped ? e2.text : R2(e2.text);
7305 7512 }
7306 7513 };
7307 7514 var L = class {
7308 7515 strong({ text: e2 }) {
@@ -7335,161 +7542,161 @@
7335 7542 checkbox({ raw: e2 }) {
7336 7543 return e2;
7337 7544 }
7338 7545 };
7339 - var b2 = class l3 {
7546 + var b = class l3 {
7340 7547 options;
7341 7548 renderer;
7342 7549 textRenderer;
7343 7550 constructor(e2) {
7344 - this.options = e2 || T, this.options.renderer = this.options.renderer || new y2(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new L();
7551 + this.options = e2 || T, this.options.renderer = this.options.renderer || new P(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new L();
7345 7552 }
7346 - static parse(e2, t3) {
7347 - return new l3(t3).parse(e2);
7553 + static parse(e2, t2) {
7554 + return new l3(t2).parse(e2);
7348 7555 }
7349 - static parseInline(e2, t3) {
7350 - return new l3(t3).parseInline(e2);
7556 + static parseInline(e2, t2) {
7557 + return new l3(t2).parseInline(e2);
7351 7558 }
7352 7559 parse(e2) {
7353 7560 this.renderer.parser = this;
7354 - let t3 = "";
7355 - for (let n2 = 0; n2 < e2.length; n2++) {
7356 - let s2 = e2[n2];
7357 - if (this.options.extensions?.renderers?.[s2.type]) {
7358 - let i2 = s2, o3 = this.options.extensions.renderers[i2.type].call({ parser: this }, i2);
7359 - if (o3 !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "def", "paragraph", "text"].includes(i2.type)) {
7360 - t3 += o3 || "";
7561 + let t2 = "";
7562 + for (let n = 0; n < e2.length; n++) {
7563 + let i = e2[n];
7564 + if (this.options.extensions?.renderers?.[i.type]) {
7565 + let o2 = i, s = this.options.extensions.renderers[o2.type].call({ parser: this }, o2);
7566 + if (s !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "checkbox", "html", "def", "paragraph", "text"].includes(o2.type)) {
7567 + t2 += s || "";
7361 7568 continue;
7362 7569 }
7363 7570 }
7364 - let r2 = s2;
7571 + let r2 = i;
7365 7572 switch (r2.type) {
7366 7573 case "space": {
7367 - t3 += this.renderer.space(r2);
7574 + t2 += this.renderer.space(r2);
7368 7575 break;
7369 7576 }
7370 7577 case "hr": {
7371 - t3 += this.renderer.hr(r2);
7578 + t2 += this.renderer.hr(r2);
7372 7579 break;
7373 7580 }
7374 7581 case "heading": {
7375 - t3 += this.renderer.heading(r2);
7582 + t2 += this.renderer.heading(r2);
7376 7583 break;
7377 7584 }
7378 7585 case "code": {
7379 - t3 += this.renderer.code(r2);
7586 + t2 += this.renderer.code(r2);
7380 7587 break;
7381 7588 }
7382 7589 case "table": {
7383 - t3 += this.renderer.table(r2);
7590 + t2 += this.renderer.table(r2);
7384 7591 break;
7385 7592 }
7386 7593 case "blockquote": {
7387 - t3 += this.renderer.blockquote(r2);
7594 + t2 += this.renderer.blockquote(r2);
7388 7595 break;
7389 7596 }
7390 7597 case "list": {
7391 - t3 += this.renderer.list(r2);
7598 + t2 += this.renderer.list(r2);
7392 7599 break;
7393 7600 }
7394 7601 case "checkbox": {
7395 - t3 += this.renderer.checkbox(r2);
7602 + t2 += this.renderer.checkbox(r2);
7396 7603 break;
7397 7604 }
7398 7605 case "html": {
7399 - t3 += this.renderer.html(r2);
7606 + t2 += this.renderer.html(r2);
7400 7607 break;
7401 7608 }
7402 7609 case "def": {
7403 - t3 += this.renderer.def(r2);
7610 + t2 += this.renderer.def(r2);
7404 7611 break;
7405 7612 }
7406 7613 case "paragraph": {
7407 - t3 += this.renderer.paragraph(r2);
7614 + t2 += this.renderer.paragraph(r2);
7408 7615 break;
7409 7616 }
7410 7617 case "text": {
7411 - t3 += this.renderer.text(r2);
7618 + t2 += this.renderer.text(r2);
7412 7619 break;
7413 7620 }
7414 7621 default: {
7415 - let i2 = 'Token with "' + r2.type + '" type was not found.';
7416 - if (this.options.silent) return console.error(i2), "";
7417 - throw new Error(i2);
7622 + let o2 = 'Token with "' + r2.type + '" type was not found.';
7623 + if (this.options.silent) return console.error(o2), "";
7624 + throw new Error(o2);
7418 7625 }
7419 7626 }
7420 7627 }
7421 - return t3;
7628 + return t2;
7422 7629 }
7423 - parseInline(e2, t3 = this.renderer) {
7630 + parseInline(e2, t2 = this.renderer) {
7424 7631 this.renderer.parser = this;
7425 - let n2 = "";
7426 - for (let s2 = 0; s2 < e2.length; s2++) {
7427 - let r2 = e2[s2];
7632 + let n = "";
7633 + for (let i = 0; i < e2.length; i++) {
7634 + let r2 = e2[i];
7428 7635 if (this.options.extensions?.renderers?.[r2.type]) {
7429 - let o3 = this.options.extensions.renderers[r2.type].call({ parser: this }, r2);
7430 - if (o3 !== false || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(r2.type)) {
7431 - n2 += o3 || "";
7636 + let s = this.options.extensions.renderers[r2.type].call({ parser: this }, r2);
7637 + if (s !== false || !["escape", "html", "link", "image", "checkbox", "strong", "em", "codespan", "br", "del", "text"].includes(r2.type)) {
7638 + n += s || "";
7432 7639 continue;
7433 7640 }
7434 7641 }
7435 - let i2 = r2;
7436 - switch (i2.type) {
7642 + let o2 = r2;
7643 + switch (o2.type) {
7437 7644 case "escape": {
7438 - n2 += t3.text(i2);
7645 + n += t2.text(o2);
7439 7646 break;
7440 7647 }
7441 7648 case "html": {
7442 - n2 += t3.html(i2);
7649 + n += t2.html(o2);
7443 7650 break;
7444 7651 }
7445 7652 case "link": {
7446 - n2 += t3.link(i2);
7653 + n += t2.link(o2);
7447 7654 break;
7448 7655 }
7449 7656 case "image": {
7450 - n2 += t3.image(i2);
7657 + n += t2.image(o2);
7451 7658 break;
7452 7659 }
7453 7660 case "checkbox": {
7454 - n2 += t3.checkbox(i2);
7661 + n += t2.checkbox(o2);
7455 7662 break;
7456 7663 }
7457 7664 case "strong": {
7458 - n2 += t3.strong(i2);
7665 + n += t2.strong(o2);
7459 7666 break;
7460 7667 }
7461 7668 case "em": {
7462 - n2 += t3.em(i2);
7669 + n += t2.em(o2);
7463 7670 break;
7464 7671 }
7465 7672 case "codespan": {
7466 - n2 += t3.codespan(i2);
7673 + n += t2.codespan(o2);
7467 7674 break;
7468 7675 }
7469 7676 case "br": {
7470 - n2 += t3.br(i2);
7677 + n += t2.br(o2);
7471 7678 break;
7472 7679 }
7473 7680 case "del": {
7474 - n2 += t3.del(i2);
7681 + n += t2.del(o2);
7475 7682 break;
7476 7683 }
7477 7684 case "text": {
7478 - n2 += t3.text(i2);
7685 + n += t2.text(o2);
7479 7686 break;
7480 7687 }
7481 7688 default: {
7482 - let o3 = 'Token with "' + i2.type + '" type was not found.';
7483 - if (this.options.silent) return console.error(o3), "";
7484 - throw new Error(o3);
7689 + let s = 'Token with "' + o2.type + '" type was not found.';
7690 + if (this.options.silent) return console.error(s), "";
7691 + throw new Error(s);
7485 7692 }
7486 7693 }
7487 7694 }
7488 - return n2;
7695 + return n;
7489 7696 }
7490 7697 };
7491 - var P = class {
7698 + var S = class {
7492 7699 options;
7493 7700 block;
7494 7701 constructor(e2) {
7495 7702 this.options = e2 || T;
@@ -7511,210 +7718,210 @@
7511 7718 provideLexer(e2 = this.block) {
7512 7719 return e2 ? x2.lex : x2.lexInline;
7513 7720 }
7514 7721 provideParser(e2 = this.block) {
7515 - return e2 ? b2.parse : b2.parseInline;
7722 + return e2 ? b.parse : b.parseInline;
7516 7723 }
7517 7724 };
7518 - var D = class {
7519 - defaults = z();
7725 + var Q = class {
7726 + defaults = A2();
7520 7727 options = this.setOptions;
7521 7728 parse = this.parseMarkdown(true);
7522 7729 parseInline = this.parseMarkdown(false);
7523 - Parser = b2;
7524 - Renderer = y2;
7730 + Parser = b;
7731 + Renderer = P;
7525 7732 TextRenderer = L;
7526 7733 Lexer = x2;
7527 - Tokenizer = w2;
7528 - Hooks = P;
7734 + Tokenizer = y2;
7735 + Hooks = S;
7529 7736 constructor(...e2) {
7530 7737 this.use(...e2);
7531 7738 }
7532 - walkTokens(e2, t3) {
7533 - let n2 = [];
7534 - for (let s2 of e2) switch (n2 = n2.concat(t3.call(this, s2)), s2.type) {
7739 + walkTokens(e2, t2) {
7740 + let n = [];
7741 + for (let i of e2) switch (n = n.concat(t2.call(this, i)), i.type) {
7535 7742 case "table": {
7536 - let r2 = s2;
7537 - for (let i2 of r2.header) n2 = n2.concat(this.walkTokens(i2.tokens, t3));
7538 - for (let i2 of r2.rows) for (let o3 of i2) n2 = n2.concat(this.walkTokens(o3.tokens, t3));
7743 + let r2 = i;
7744 + for (let o2 of r2.header) n = n.concat(this.walkTokens(o2.tokens, t2));
7745 + for (let o2 of r2.rows) for (let s of o2) n = n.concat(this.walkTokens(s.tokens, t2));
7539 7746 break;
7540 7747 }
7541 7748 case "list": {
7542 - let r2 = s2;
7543 - n2 = n2.concat(this.walkTokens(r2.items, t3));
7749 + let r2 = i;
7750 + n = n.concat(this.walkTokens(r2.items, t2));
7544 7751 break;
7545 7752 }
7546 7753 default: {
7547 - let r2 = s2;
7548 - this.defaults.extensions?.childTokens?.[r2.type] ? this.defaults.extensions.childTokens[r2.type].forEach((i2) => {
7549 - let o3 = r2[i2].flat(1 / 0);
7550 - n2 = n2.concat(this.walkTokens(o3, t3));
7551 - }) : r2.tokens && (n2 = n2.concat(this.walkTokens(r2.tokens, t3)));
7754 + let r2 = i;
7755 + this.defaults.extensions?.childTokens?.[r2.type] ? this.defaults.extensions.childTokens[r2.type].forEach((o2) => {
7756 + let s = r2[o2].flat(1 / 0);
7757 + n = n.concat(this.walkTokens(s, t2));
7758 + }) : r2.tokens && (n = n.concat(this.walkTokens(r2.tokens, t2)));
7552 7759 }
7553 7760 }
7554 - return n2;
7761 + return n;
7555 7762 }
7556 7763 use(...e2) {
7557 - let t3 = this.defaults.extensions || { renderers: {}, childTokens: {} };
7558 - return e2.forEach((n2) => {
7559 - let s2 = { ...n2 };
7560 - if (s2.async = this.defaults.async || s2.async || false, n2.extensions && (n2.extensions.forEach((r2) => {
7764 + let t2 = this.defaults.extensions || { renderers: {}, childTokens: {} };
7765 + return e2.forEach((n) => {
7766 + let i = { ...n };
7767 + if (i.async = this.defaults.async || i.async || false, n.extensions && (n.extensions.forEach((r2) => {
7561 7768 if (!r2.name) throw new Error("extension name required");
7562 7769 if ("renderer" in r2) {
7563 - let i2 = t3.renderers[r2.name];
7564 - i2 ? t3.renderers[r2.name] = function(...o3) {
7565 - let u2 = r2.renderer.apply(this, o3);
7566 - return u2 === false && (u2 = i2.apply(this, o3)), u2;
7567 - } : t3.renderers[r2.name] = r2.renderer;
7770 + let o2 = t2.renderers[r2.name];
7771 + o2 ? t2.renderers[r2.name] = function(...s) {
7772 + let u = r2.renderer.apply(this, s);
7773 + return u === false && (u = o2.apply(this, s)), u;
7774 + } : t2.renderers[r2.name] = r2.renderer;
7568 7775 }
7569 7776 if ("tokenizer" in r2) {
7570 7777 if (!r2.level || r2.level !== "block" && r2.level !== "inline") throw new Error("extension level must be 'block' or 'inline'");
7571 - let i2 = t3[r2.level];
7572 - i2 ? i2.unshift(r2.tokenizer) : t3[r2.level] = [r2.tokenizer], r2.start && (r2.level === "block" ? t3.startBlock ? t3.startBlock.push(r2.start) : t3.startBlock = [r2.start] : r2.level === "inline" && (t3.startInline ? t3.startInline.push(r2.start) : t3.startInline = [r2.start]));
7778 + let o2 = t2[r2.level];
7779 + o2 ? o2.unshift(r2.tokenizer) : t2[r2.level] = [r2.tokenizer], r2.start && (r2.level === "block" ? t2.startBlock ? t2.startBlock.push(r2.start) : t2.startBlock = [r2.start] : r2.level === "inline" && (t2.startInline ? t2.startInline.push(r2.start) : t2.startInline = [r2.start]));
7573 7780 }
7574 - "childTokens" in r2 && r2.childTokens && (t3.childTokens[r2.name] = r2.childTokens);
7575 - }), s2.extensions = t3), n2.renderer) {
7576 - let r2 = this.defaults.renderer || new y2(this.defaults);
7577 - for (let i2 in n2.renderer) {
7578 - if (!(i2 in r2)) throw new Error(`renderer '${i2}' does not exist`);
7579 - if (["options", "parser"].includes(i2)) continue;
7580 - let o3 = i2, u2 = n2.renderer[o3], a2 = r2[o3];
7581 - r2[o3] = (...c2) => {
7582 - let p2 = u2.apply(r2, c2);
7583 - return p2 === false && (p2 = a2.apply(r2, c2)), p2 || "";
7781 + "childTokens" in r2 && r2.childTokens && (t2.childTokens[r2.name] = r2.childTokens);
7782 + }), i.extensions = t2), n.renderer) {
7783 + let r2 = this.defaults.renderer || new P(this.defaults);
7784 + for (let o2 in n.renderer) {
7785 + if (!(o2 in r2)) throw new Error(`renderer '${o2}' does not exist`);
7786 + if (["options", "parser"].includes(o2)) continue;
7787 + let s = o2, u = n.renderer[s], a = r2[s];
7788 + r2[s] = (...p2) => {
7789 + let c2 = u.apply(r2, p2);
7790 + return c2 === false && (c2 = a.apply(r2, p2)), c2 || "";
7584 7791 };
7585 7792 }
7586 - s2.renderer = r2;
7793 + i.renderer = r2;
7587 7794 }
7588 - if (n2.tokenizer) {
7589 - let r2 = this.defaults.tokenizer || new w2(this.defaults);
7590 - for (let i2 in n2.tokenizer) {
7591 - if (!(i2 in r2)) throw new Error(`tokenizer '${i2}' does not exist`);
7592 - if (["options", "rules", "lexer"].includes(i2)) continue;
7593 - let o3 = i2, u2 = n2.tokenizer[o3], a2 = r2[o3];
7594 - r2[o3] = (...c2) => {
7595 - let p2 = u2.apply(r2, c2);
7596 - return p2 === false && (p2 = a2.apply(r2, c2)), p2;
7795 + if (n.tokenizer) {
7796 + let r2 = this.defaults.tokenizer || new y2(this.defaults);
7797 + for (let o2 in n.tokenizer) {
7798 + if (!(o2 in r2)) throw new Error(`tokenizer '${o2}' does not exist`);
7799 + if (["options", "rules", "lexer"].includes(o2)) continue;
7800 + let s = o2, u = n.tokenizer[s], a = r2[s];
7801 + r2[s] = (...p2) => {
7802 + let c2 = u.apply(r2, p2);
7803 + return c2 === false && (c2 = a.apply(r2, p2)), c2;
7597 7804 };
7598 7805 }
7599 - s2.tokenizer = r2;
7806 + i.tokenizer = r2;
7600 7807 }
7601 - if (n2.hooks) {
7602 - let r2 = this.defaults.hooks || new P();
7603 - for (let i2 in n2.hooks) {
7604 - if (!(i2 in r2)) throw new Error(`hook '${i2}' does not exist`);
7605 - if (["options", "block"].includes(i2)) continue;
7606 - let o3 = i2, u2 = n2.hooks[o3], a2 = r2[o3];
7607 - P.passThroughHooks.has(i2) ? r2[o3] = (c2) => {
7608 - if (this.defaults.async && P.passThroughHooksRespectAsync.has(i2)) return (async () => {
7609 - let k2 = await u2.call(r2, c2);
7610 - return a2.call(r2, k2);
7808 + if (n.hooks) {
7809 + let r2 = this.defaults.hooks || new S();
7810 + for (let o2 in n.hooks) {
7811 + if (!(o2 in r2)) throw new Error(`hook '${o2}' does not exist`);
7812 + if (["options", "block"].includes(o2)) continue;
7813 + let s = o2, u = n.hooks[s], a = r2[s];
7814 + S.passThroughHooks.has(o2) ? r2[s] = (p2) => {
7815 + if (this.defaults.async && S.passThroughHooksRespectAsync.has(o2)) return (async () => {
7816 + let h = await u.call(r2, p2);
7817 + return a.call(r2, h);
7611 7818 })();
7612 - let p2 = u2.call(r2, c2);
7613 - return a2.call(r2, p2);
7614 - } : r2[o3] = (...c2) => {
7819 + let c2 = u.call(r2, p2);
7820 + return a.call(r2, c2);
7821 + } : r2[s] = (...p2) => {
7615 7822 if (this.defaults.async) return (async () => {
7616 - let k2 = await u2.apply(r2, c2);
7617 - return k2 === false && (k2 = await a2.apply(r2, c2)), k2;
7823 + let h = await u.apply(r2, p2);
7824 + return h === false && (h = await a.apply(r2, p2)), h;
7618 7825 })();
7619 - let p2 = u2.apply(r2, c2);
7620 - return p2 === false && (p2 = a2.apply(r2, c2)), p2;
7826 + let c2 = u.apply(r2, p2);
7827 + return c2 === false && (c2 = a.apply(r2, p2)), c2;
7621 7828 };
7622 7829 }
7623 - s2.hooks = r2;
7830 + i.hooks = r2;
7624 7831 }
7625 - if (n2.walkTokens) {
7626 - let r2 = this.defaults.walkTokens, i2 = n2.walkTokens;
7627 - s2.walkTokens = function(o3) {
7628 - let u2 = [];
7629 - return u2.push(i2.call(this, o3)), r2 && (u2 = u2.concat(r2.call(this, o3))), u2;
7832 + if (n.walkTokens) {
7833 + let r2 = this.defaults.walkTokens, o2 = n.walkTokens;
7834 + i.walkTokens = function(s) {
7835 + let u = [];
7836 + return u.push(o2.call(this, s)), r2 && (u = u.concat(r2.call(this, s))), u;
7630 7837 };
7631 7838 }
7632 - this.defaults = { ...this.defaults, ...s2 };
7839 + this.defaults = { ...this.defaults, ...i };
7633 7840 }), this;
7634 7841 }
7635 7842 setOptions(e2) {
7636 7843 return this.defaults = { ...this.defaults, ...e2 }, this;
7637 7844 }
7638 - lexer(e2, t3) {
7639 - return x2.lex(e2, t3 ?? this.defaults);
7845 + lexer(e2, t2) {
7846 + return x2.lex(e2, t2 ?? this.defaults);
7640 7847 }
7641 - parser(e2, t3) {
7642 - return b2.parse(e2, t3 ?? this.defaults);
7848 + parser(e2, t2) {
7849 + return b.parse(e2, t2 ?? this.defaults);
7643 7850 }
7644 7851 parseMarkdown(e2) {
7645 - return (n2, s2) => {
7646 - let r2 = { ...s2 }, i2 = { ...this.defaults, ...r2 }, o3 = this.onError(!!i2.silent, !!i2.async);
7647 - if (this.defaults.async === true && r2.async === false) return o3(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
7648 - if (typeof n2 > "u" || n2 === null) return o3(new Error("marked(): input parameter is undefined or null"));
7649 - if (typeof n2 != "string") return o3(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n2) + ", string expected"));
7650 - if (i2.hooks && (i2.hooks.options = i2, i2.hooks.block = e2), i2.async) return (async () => {
7651 - let u2 = i2.hooks ? await i2.hooks.preprocess(n2) : n2, c2 = await (i2.hooks ? await i2.hooks.provideLexer(e2) : e2 ? x2.lex : x2.lexInline)(u2, i2), p2 = i2.hooks ? await i2.hooks.processAllTokens(c2) : c2;
7652 - i2.walkTokens && await Promise.all(this.walkTokens(p2, i2.walkTokens));
7653 - let h2 = await (i2.hooks ? await i2.hooks.provideParser(e2) : e2 ? b2.parse : b2.parseInline)(p2, i2);
7654 - return i2.hooks ? await i2.hooks.postprocess(h2) : h2;
7655 - })().catch(o3);
7852 + return (n, i) => {
7853 + let r2 = { ...i }, o2 = { ...this.defaults, ...r2 }, s = this.onError(!!o2.silent, !!o2.async);
7854 + if (this.defaults.async === true && r2.async === false) return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
7855 + if (typeof n > "u" || n === null) return s(new Error("marked(): input parameter is undefined or null"));
7856 + if (typeof n != "string") return s(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
7857 + if (o2.hooks && (o2.hooks.options = o2, o2.hooks.block = e2), o2.async) return (async () => {
7858 + let u = o2.hooks ? await o2.hooks.preprocess(n) : n, p2 = await (o2.hooks ? await o2.hooks.provideLexer(e2) : e2 ? x2.lex : x2.lexInline)(u, o2), c2 = o2.hooks ? await o2.hooks.processAllTokens(p2) : p2;
7859 + o2.walkTokens && await Promise.all(this.walkTokens(c2, o2.walkTokens));
7860 + let k2 = await (o2.hooks ? await o2.hooks.provideParser(e2) : e2 ? b.parse : b.parseInline)(c2, o2);
7861 + return o2.hooks ? await o2.hooks.postprocess(k2) : k2;
7862 + })().catch(s);
7656 7863 try {
7657 - i2.hooks && (n2 = i2.hooks.preprocess(n2));
7658 - let a2 = (i2.hooks ? i2.hooks.provideLexer(e2) : e2 ? x2.lex : x2.lexInline)(n2, i2);
7659 - i2.hooks && (a2 = i2.hooks.processAllTokens(a2)), i2.walkTokens && this.walkTokens(a2, i2.walkTokens);
7660 - let p2 = (i2.hooks ? i2.hooks.provideParser(e2) : e2 ? b2.parse : b2.parseInline)(a2, i2);
7661 - return i2.hooks && (p2 = i2.hooks.postprocess(p2)), p2;
7662 - } catch (u2) {
7663 - return o3(u2);
7864 + o2.hooks && (n = o2.hooks.preprocess(n));
7865 + let a = (o2.hooks ? o2.hooks.provideLexer(e2) : e2 ? x2.lex : x2.lexInline)(n, o2);
7866 + o2.hooks && (a = o2.hooks.processAllTokens(a)), o2.walkTokens && this.walkTokens(a, o2.walkTokens);
7867 + let c2 = (o2.hooks ? o2.hooks.provideParser(e2) : e2 ? b.parse : b.parseInline)(a, o2);
7868 + return o2.hooks && (c2 = o2.hooks.postprocess(c2)), c2;
7869 + } catch (u) {
7870 + return s(u);
7664 7871 }
7665 7872 };
7666 7873 }
7667 - onError(e2, t3) {
7668 - return (n2) => {
7669 - if (n2.message += `
7874 + onError(e2, t2) {
7875 + return (n) => {
7876 + if (n.message += `
7670 7877 Please report this to https://github.com/markedjs/marked.`, e2) {
7671 - let s2 = "<p>An error occurred:</p><pre>" + O(n2.message + "", true) + "</pre>";
7672 - return t3 ? Promise.resolve(s2) : s2;
7878 + let i = "<p>An error occurred:</p><pre>" + R2(n.message + "", true) + "</pre>";
7879 + return t2 ? Promise.resolve(i) : i;
7673 7880 }
7674 - if (t3) return Promise.reject(n2);
7675 - throw n2;
7881 + if (t2) return Promise.reject(n);
7882 + throw n;
7676 7883 };
7677 7884 }
7678 7885 };
7679 - var M2 = new D();
7680 - function g2(l4, e2) {
7886 + var M2 = new Q();
7887 + function f(l4, e2) {
7681 7888 return M2.parse(l4, e2);
7682 7889 }
7683 - g2.options = g2.setOptions = function(l4) {
7684 - return M2.setOptions(l4), g2.defaults = M2.defaults, G(g2.defaults), g2;
7890 + f.options = f.setOptions = function(l4) {
7891 + return M2.setOptions(l4), f.defaults = M2.defaults, U(f.defaults), f;
7685 7892 };
7686 - g2.getDefaults = z;
7687 - g2.defaults = T;
7688 - g2.use = function(...l4) {
7689 - return M2.use(...l4), g2.defaults = M2.defaults, G(g2.defaults), g2;
7690 - };
7691 - g2.walkTokens = function(l4, e2) {
7893 + f.getDefaults = A2;
7894 + f.defaults = T;
7895 + function bt(...l4) {
7896 + return M2.use(...l4), f.defaults = M2.defaults, U(f.defaults), f;
7897 + }
7898 + f.use = bt;
7899 + f.walkTokens = function(l4, e2) {
7692 7900 return M2.walkTokens(l4, e2);
7693 7901 };
7694 - g2.parseInline = M2.parseInline;
7695 - g2.Parser = b2;
7696 - g2.parser = b2.parse;
7697 - g2.Renderer = y2;
7698 - g2.TextRenderer = L;
7699 - g2.Lexer = x2;
7700 - g2.lexer = x2.lex;
7701 - g2.Tokenizer = w2;
7702 - g2.Hooks = P;
7703 - g2.parse = g2;
7704 - var jt = g2.options;
7705 - var Ft = g2.setOptions;
7706 - var Ut = g2.use;
7707 - var Kt = g2.walkTokens;
7708 - var Wt = g2.parseInline;
7709 - var Jt = b2.parse;
7710 - var Vt = x2.lex;
7902 + f.parseInline = M2.parseInline;
7903 + f.Parser = b;
7904 + f.parser = b.parse;
7905 + f.Renderer = P;
7906 + f.TextRenderer = L;
7907 + f.Lexer = x2;
7908 + f.lexer = x2.lex;
7909 + f.Tokenizer = y2;
7910 + f.Hooks = S;
7911 + f.parse = f;
7912 + var un = f.options;
7913 + var pn = f.setOptions;
7914 + var cn = f.walkTokens;
7915 + var hn = f.parseInline;
7916 + var kn = b.parse;
7917 + var gn = x2.lex;
7711 7918
7712 7919 // packages/blocks/build-module/api/raw-handling/markdown-converter.mjs
7713 7920 function escapeBodyText(value) {
7714 7921 return value.replace(/&(?!#?\w+;)/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
7715 7922 }
7716 - var converter = new D({
7923 + var converter = new Q({
7717 7924 gfm: true,
7718 7925 breaks: true,
7719 7926 renderer: {
7720 7927 // Match showdown's `omitExtraWLInCodeBlocks`: marked appends `\n`
@@ -7910,13 +8117,13 @@
7910 8117 if (/\\[a-zA-Z]+\s*\{/g.test(text2)) {
7911 8118 return true;
7912 8119 }
7913 8120 const softClues = [
7914 - (t3) => t3.includes("^") && !t3.startsWith("^"),
7915 - (t3) => ["=", "+", "-", "/", "*"].some(
7916 - (operator) => t3.includes(operator)
8121 + (t2) => t2.includes("^") && !t2.startsWith("^"),
8122 + (t2) => ["=", "+", "-", "/", "*"].some(
8123 + (operator) => t2.includes(operator)
7917 8124 ),
7918 - (t3) => /\\[a-zA-Z]+/g.test(t3)
8125 + (t2) => /\\[a-zA-Z]+/g.test(t2)
7919 8126 ];
7920 8127 if (softClues.filter((clue) => clue(text2)).length >= 2) {
7921 8128 return true;
7922 8129 }
@@ -8079,9 +8286,9 @@
8079 8286 }
8080 8287
8081 8288 // packages/blocks/build-module/api/raw-handling/index.mjs
8082 8289 function deprecatedGetPhrasingContentSchema(context) {
8083 - (0, import_deprecated10.default)("wp.blocks.getPhrasingContentSchema", {
8290 + (0, import_deprecated11.default)("wp.blocks.getPhrasingContentSchema", {
8084 8291 since: "5.6",
8085 8292 alternative: "wp.dom.getPhrasingContentSchema"
8086 8293 });
8087 8294 return (0, import_dom13.getPhrasingContentSchema)(context);
@@ -8195,22 +8402,20 @@
8195 8402 );
8196 8403 }
8197 8404
8198 8405 // packages/blocks/build-module/api/index.mjs
8199 - var fieldsKey = /* @__PURE__ */ Symbol("fields");
8200 - var formKey = /* @__PURE__ */ Symbol("form");
8406 + var editableRootKey = /* @__PURE__ */ Symbol("editableRoot");
8201 8407 var privateApis = {};
8202 8408 lock(privateApis, {
8203 8409 isContentBlock,
8204 - fieldsKey,
8205 - formKey,
8410 + editableRootKey,
8206 8411 parseRawBlock
8207 8412 });
8208 8413
8209 8414 // packages/blocks/build-module/deprecated.mjs
8210 - var import_deprecated11 = __toESM(require_deprecated(), 1);
8415 + var import_deprecated12 = __toESM(require_deprecated(), 1);
8211 8416 function withBlockContentContext(OriginalComponent) {
8212 - (0, import_deprecated11.default)("wp.blocks.withBlockContentContext", {
8417 + (0, import_deprecated12.default)("wp.blocks.withBlockContentContext", {
8213 8418 since: "6.1"
8214 8419 });
8215 8420 return OriginalComponent;
8216 8421 }
@@ -8236,5 +8441,7 @@
8236 8441 * Copyright (c) 2014-2017, Jon Schlinkert.
8237 8442 * Released under the MIT License.
8238 8443 *)
8239 8444 */
8445 +(window.wp ||= {}).blocks = wp.blocks;
8446 +})();
8240 8447 //# sourceMappingURL=index.js.map