PageSourceSearch

https://baskadia.com/_next/static/chunks/4885-3d883c84e69d2b7e.js

js baskadia.com collected 2026-09-24 09:03:58 UTC 500,932 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4885],{99601:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(2===e.length)return r(e[0],e[1])||null;var n=e.slice(1).reduce((function(e,t){return r(e,t)}),e[0]);return n||null};var n=new WeakMap;function r(e,t){if(e&&t){var r=n.get(e)||new WeakMap;n.set(e,r);var i=r.get(t)||function(n){o(e,n),o(t,n)};return r.set(t,i),i}return e||t}function o(e,t){"function"===typeof e?e(t):e.current=t}},56851:function(e,t){"use strict";t.Q=function(e){var t,n=[],r=String(e||""),o=r.indexOf(","),i=0,s=!1;for(;!s;)-1===o&&(o=r.length,s=!0),!(t=r.slice(i,o).trim())&&s||n.push(t),i=o+1,o=r.indexOf(",",i);return n}},63150:function(e){"use strict";e.exports=e=>{if("string"!==typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}},69463:function(e){"undefined"!==typeof self&&self,e.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){function r(){throw new TypeError("The given URL is not a string. Please verify your string|array.")}function o(e){"string"!==typeof e&&r();for(var t=0,n=0,o=0,a=e.length,l=0;a--&&++l&&!(t&&-1<i.indexOf(e[l]));)"."===e[l]&&(++t,n=l);for(t=l,l=n;l--;)if(-1!==s.indexOf(e[l])){o=l+1;break}return 2>o?"":e.slice(o,t)}var i=["/",":","?","#"],s=[".","/","@"];e.exports=function(e){if("string"===typeof e)return o(e);if(Array.isArray(e)){var t,n=[],i=0;for(t=e.length;i<t;i++)n.push(o(e[i]));return n}r()}}])},78892:function(e){"use strict";e.exports=function(e,n){var r,o,i,s=e||"",a=n||"div",l={},c=0;for(;c<s.length;)t.lastIndex=c,i=t.exec(s),(r=s.slice(c,i?i.index:s.length))&&(o?"#"===o?l.id=r:l.className?l.className.push(r):l.className=[r]:a=r,c+=r.length),i&&(o=i[0],c++);return{type:"element",tagName:a,properties:l,children:[]}};var t=/[#.]/g},62502:function(e,t,n){"use strict";var r=n(99560),o=n(66632),i=n(78892),s=n(36582).Q,a=n(56851).Q;e.exports=function(e,t,n){var o=n?function(e){var t,n=e.length,r=-1,o={};for(;++r<n;)o[(t=e[r]).toLowerCase()]=t;return o}(n):null;return function(e,n){var r,s=i(e,t),a=Array.prototype.slice.call(arguments,2),h=s.tagName.toLowerCase();s.tagName=o&&l.call(o,h)?o[h]:h,n&&c(n,s)&&(a.unshift(n),n=null);if(n)for(r in n)p(s.properties,r,n[r]);u(s.children,a),"template"===s.tagName&&(s.content={type:"root",children:s.children},s.children=[]);return s};function p(t,n,o){var i,l,c;null!==o&&void 0!==o&&o===o&&(l=(i=r(e,n)).property,"string"===typeof(c=o)&&(i.spaceSeparated?c=s(c):i.commaSeparated?c=a(c):i.commaOrSpaceSeparated&&(c=s(a(c).join(" ")))),"style"===l&&"string"!==typeof o&&(c=function(e){var t,n=[];for(t in e)n.push([t,e[t]].join(": "));return n.join("; ")}(c)),"className"===l&&t.className&&(c=t.className.concat(c)),t[l]=function(e,t,n){var r,o,i;if("object"!==typeof n||!("length"in n))return h(e,t,n);o=n.length,r=-1,i=[];for(;++r<o;)i[r]=h(e,t,n[r]);return i}(i,l,c))}};var l={}.hasOwnProperty;function c(e,t){return"string"===typeof e||"length"in e||function(e,t){var n=t.type;if("input"===e||!n||"string"!==typeof n)return!1;if("object"===typeof t.children&&"length"in t.children)return!0;if(n=n.toLowerCase(),"button"===e)return"menu"!==n&&"submit"!==n&&"reset"!==n&&"button"!==n;return"value"in t}(t.tagName,e)}function u(e,t){var n,r;if("string"!==typeof t&&"number"!==typeof t)if("object"===typeof t&&"length"in t)for(n=-1,r=t.length;++n<r;)u(e,t[n]);else{if("object"!==typeof t||!("type"in t))throw new Error("Expected node, nodes, or string, got `"+t+"`");e.push(t)}else e.push({type:"text",value:String(t)})}function h(e,t,n){var r=n;return e.number||e.positiveNumber?isNaN(r)||""===r||(r=Number(r)):(e.boolean||e.overloadedBoolean)&&("string"!==typeof r||""!==r&&o(n)!==o(t)||(r=!0)),r}},52579:function(e,t,n){"use strict";var r=n(97247),o=n(62502)(r,"div");o.displayName="html",e.exports=o},31742:function(e,t,n){"use strict";e.exports=n(52579)},46260:function(e){"use strict";e.exports=function(e){var t="string"===typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}},7961:function(e,t,n){"use strict";var r=n(46260),o=n(46195);e.exports=function(e){return r(e)||o(e)}},46195:function(e){"use strict";e.exports=function(e){var t="string"===typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}},79480:function(e){"use strict";e.exports=function(e){var t="string"===typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}},1161:function(e){"use strict";function t(e,t){if("string"!==typeof e)return[e];var n=[e];"string"===typeof t||Array.isArray(t)?t={brackets:t}:t||(t={});var r=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],o=t.escape||"___",i=!!t.flat;r.forEach((function(e){var t=new RegExp(["\\",e[0],"[^\\",e[0],"\\",e[1],"]*\\",e[1]].join("")),r=[];function i(t,i,s){var a=n.push(t.slice(e[0].length,-e[1].length))-1;return r.push(a),o+a+o}n.forEach((function(e,r){for(var o,s=0;e!=o;)if(o=e,e=e.replace(t,i),s++>1e4)throw Error("References have circular dependency. Please, check them.");n[r]=e})),r=r.reverse(),n=n.map((function(t){return r.forEach((function(n){t=t.replace(new RegExp("(\\"+o+n+"\\"+o+")","g"),e[0]+"$1"+e[1])})),t}))}));var s=new RegExp("\\"+o+"([0-9]+)\\"+o);return i?n:function e(t,n,r){for(var o,i=[],a=0;o=s.exec(t);){if(a++>1e4)throw Error("Circular references in parenthesis");
1i.push(t.slice(0,o.index)),i.push(e(n[o[1]],n)),t=t.slice(o.index+o[0].length)}return i.push(t),i}(n[0],n)}function n(e,t){if(t&&t.flat){var n,r=t&&t.escape||"___",o=e[0];if(!o)return"";for(var i=new RegExp("\\"+r+"([0-9]+)\\"+r),s=0;o!=n;){if(s++>1e4)throw Error("Circular references in "+e);n=o,o=o.replace(i,a)}return o}return e.reduce((function e(t,n){return Array.isArray(n)&&(n=n.reduce(e,"")),t+n}),"");function a(t,n){if(null==e[n])throw Error("Reference "+n+"is undefined");return e[n]}}function r(e,r){return Array.isArray(e)?n(e,r):t(e,r)}r.parse=t,r.stringify=n,e.exports=r},89435:function(e){"use strict";var t;e.exports=function(e){var n,r="&"+e+";";if((t=t||document.createElement("i")).innerHTML=r,59===(n=t.textContent).charCodeAt(n.length-1)&&"semi"!==e)return!1;return n!==r&&n}},57574:function(e,t,n){"use strict";var r=n(37452),o=n(93580),i=n(46195),s=n(79480),a=n(7961),l=n(89435);e.exports=function(e,t){var n,i,s={};t||(t={});for(i in p)n=t[i],s[i]=null===n||void 0===n?p[i]:n;(s.position.indent||s.position.start)&&(s.indent=s.position.indent||[],s.position=s.position.start);return function(e,t){var n,i,s,p,x,b,S,C,M,O,E,A,T,R,N,I,D,_,L,P=t.additional,$=t.nonTerminated,z=t.text,F=t.reference,B=t.warning,j=t.textContext,H=t.referenceContext,W=t.warningContext,J=t.position,U=t.indent||[],q=e.length,V=0,K=-1,Y=J.column||1,G=J.line||1,X="",Z=[];"string"===typeof P&&(P=P.charCodeAt(0));I=Q(),C=B?ee:h,V--,q++;for(;++V<q;)if(10===x&&(Y=U[K]||1),38===(x=e.charCodeAt(V))){if(9===(S=e.charCodeAt(V+1))||10===S||12===S||32===S||38===S||60===S||S!==S||P&&S===P){X+=u(x),Y++;continue}for(A=T=V+1,L=T,35===S?(L=++A,88===(S=e.charCodeAt(L))||120===S?(R=f,L=++A):R=m):R=d,n="",E="",p="",N=v[R],L--;++L<q&&N(S=e.charCodeAt(L));)p+=u(S),R===d&&c.call(r,p)&&(n=p,E=r[p]);(s=59===e.charCodeAt(L))&&(L++,(i=R===d&&l(p))&&(n=p,E=i)),_=1+L-T,(s||$)&&(p?R===d?(s&&!E?C(5,1):(n!==p&&(_=1+(L=A+n.length)-A,s=!1),s||(M=n?1:3,t.attribute?61===(S=e.charCodeAt(L))?(C(M,_),E=null):a(S)?E=null:C(M,_):C(M,_))),b=E):(s||C(2,_),k(b=parseInt(p,g[R]))?(C(7,_),b=u(65533)):b in o?(C(6,_),b=o[b]):(O="",w(b)&&C(6,_),b>65535&&(O+=u((b-=65536)>>>10|55296),b=56320|1023&b),b=O+u(b))):R!==d&&C(4,_)),b?(te(),I=Q(),V=L-1,Y+=L-T+1,Z.push(b),(D=Q()).offset++,F&&F.call(H,b,{start:I,end:D},e.slice(T-1,L)),I=D):(p=e.slice(T-1,L),X+=p,Y+=p.length,V=L-1)}else 10===x&&(G++,K++,Y=0),x===x?(X+=u(x),Y++):te();return Z.join("");function Q(){return{line:G,column:Y,offset:V+(J.offset||0)}}function ee(e,t){var n=Q();n.column+=t,n.offset+=t,B.call(W,y[e],n,e)}function te(){X&&(Z.push(X),z&&z.call(j,X,{start:I,end:Q()}),X="")}}(e,s)};var c={}.hasOwnProperty,u=String.fromCharCode,h=Function.prototype,p={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},d="named",f="hexadecimal",m="decimal",g={hexadecimal:16,decimal:10},v={};v.named=a,v[m]=i,v[f]=s;var y={};function k(e){return e>=55296&&e<=57343||e>1114111}function w(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||65535===(65535&e)||65534===(65535&e)}y[1]="Named character references must be terminated by a semicolon",y[2]="Numeric character references must be terminated by a semicolon",y[3]="Named character references cannot be empty",y[4]="Numeric character references cannot be empty",y[5]="Named character references must be known",y[6]="Numeric character references cannot be disallowed",y[7]="Numeric character references cannot be outside the permissible Unicode range"},28325:function(e,t,n){var r=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},o={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof i?new i(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){var r,i;switch(n=n||{},o.util.type(t)){case"Object":if(i=o.util.objId(t),n[i])return n[i];for(var s in r={},n[i]=r,t)t.hasOwnProperty(s)&&(r[s]=e(t[s],n));return r;case"Array":return i=o.util.objId(t),n[i]?n[i]:(r=[],n[i]=r,t.forEach((function(t,o){r[o]=e(t,n)}
vendor: 5,027 bytes, line 1
1)),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,"gi"),""),e.classList.add("language-"+n)},currentScript:function(){if("undefined"===typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r="no-"+t;e;){var o=e.classList;if(o.contains(t))return!0;if(o.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=o.util.clone(o.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var i=(r=r||o.languages)[e],s={};for(var a in i)if(i.hasOwnProperty(a)){if(a==t)for(var l in n)n.hasOwnProperty(l)&&(s[l]=n[l]);n.hasOwnProperty(a)||(s[a]=i[a])}var c=r[e];return r[e]=s,o.languages.DFS(o.languages,(function(t,n){n===c&&t!=e&&(this[t]=s)})),s},DFS:function e(t,n,r,i){i=i||{};var s=o.util.objId;for(var a in t)if(t.hasOwnProperty(a)){n.call(t,a,t[a],r||a);var l=t[a],c=o.util.type(l);"Object"!==c||i[s(l)]?"Array"!==c||i[s(l)]||(i[s(l)]=!0,e(l,n,a,i)):(i[s(l)]=!0,e(l,n,null,i))}}},plugins:{},highlightAll:function(e,t){o.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),o.hooks.run("before-all-elements-highlight",r);for(var i,s=0;i=r.elements[s++];)o.highlightElement(i,!0===t,r.callback)},highlightElement:function(t,n,r){var i=o.util.getLanguage(t),s=o.languages[i];o.util.setLanguage(t,i);var a=t.parentElement;a&&"pre"===a.nodeName.toLowerCase()&&o.util.setLanguage(a,i);var l={element:t,language:i,grammar:s,code:t.textContent};function c(e){l.highlightedCode=e,o.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,o.hooks.run("after-highlight",l),o.hooks.run("complete",l),r&&r.call(l.element)}if(o.hooks.run("before-sanity-check",l),(a=l.element.parentElement)&&"pre"===a.nodeName.toLowerCase()&&!a.hasAttribute("tabindex")&&a.setAttribute("tabindex","0"),!l.code)return o.hooks.run("complete",l),void(r&&r.call(l.element));if(o.hooks.run("before-highlight",l),l.grammar)if(n&&e.Worker){var u=new Worker(o.filename);u.onmessage=function(e){c(e.data)},u.postMessage(JSON.stringify({language:l.language,code:l.code,immediateClose:!0}))}else c(o.highlight(l.code,l.grammar,l.language));else c(o.util.encode(l.code))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(o.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=o.tokenize(r.code,r.grammar),o.hooks.run("after-tokenize",r),i.stringify(o.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var o=new l;return c(o,o.head,e),a(e,o,t,o.head,0),function(e){var t=[],n=e.head.next;for(;n!==e.tail;)t.push(n.value),n=n.next;return t}(o)},hooks:{all:{},add:function(e,t){var n=o.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=o.hooks.all[e];if(n&&n.length)for(var r,i=0;r=n[i++];)r(t)}},Token:i};function i(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function s(e,t,n,r){e.lastIndex=t;var o=e.exec(n);if(o&&r&&o[1]){var i=o[1].length;o.index+=i,o[0]=o[0].slice(i)}return o}function a(e,t,n,r,l,h){for(var p in n)if(n.hasOwnProperty(p)&&n[p]){var d=n[p];d=Array.isArray(d)?d:[d];for(var f=0;f<d.length;++f){if(h&&h.cause==p+","+f)return;var m=d[f],g=m.inside,v=!!m.lookbehind,y=!!m.greedy,k=m.alias;if(y&&!m.pattern.global){var w=m.pattern.toString().match(/[imsuy]*$/)[0];m.pattern=RegExp(m.pattern.source,w+"g")}for(var x=m.pattern||m,b=r.next,S=l;b!==t.tail&&!(h&&S>=h.reach);S+=b.value.length,b=b.next){var C=b.value;if(t.length>e.length)return;if(!(C instanceof i)){var M,O=1;if(y){if(!(M=s(x,S,e,v))||M.index>=e.length)break;var E=M.index,A=M.index+M[0].length,T=S;for(T+=b.value.length;E>=T;)T+=(b=b.next).value.length;if(S=T-=b.value.length,b.value instanceof i)continue;for(var R=b;R!==t.tail&&(T<A||"string"===typeof R.value);R=R.next)O++,T+=R.value.length;O--,C=e.slice(S,T),M.index-=S}else if(!(M=s(x,0,C,v)))continue;E=M.index;var N=M[0],I=C.slice(0,E),D=C.slice(E+N.length),_=S+C.length;h&&_>h.reach&&(h.reach=_);var L=b.prev;if(I&&(L=c(t,L,I),S+=I.length),u(t,L,O),b=c(t,L,new i(p,g?o.tokenize(N,g):N,k,N)),D&&c(t,b,D),O>1){var P={cause:p+","+f,reach:_};a(e,t,n,b.prev,S,P),h&&P.reach>h.reach&&(h.reach=P.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}
1function c(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function u(e,t,n){for(var r=t.next,o=0;o<n&&r!==e.tail;o++)r=r.next;t.next=r,r.prev=t,e.length-=o}if(e.Prism=o,i.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var r="";return t.forEach((function(t){r+=e(t,n)})),r}var i={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},s=t.alias;s&&(Array.isArray(s)?Array.prototype.push.apply(i.classes,s):i.classes.push(s)),o.hooks.run("wrap",i);var a="";for(var l in i.attributes)a+=" "+l+'="'+(i.attributes[l]||"").replace(/"/g,"&quot;")+'"';return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+a+">"+i.content+"</"+i.tag+">"},!e.document)return e.addEventListener?(o.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),r=n.language,i=n.code,s=n.immediateClose;e.postMessage(o.highlight(i,o.languages[r],r)),s&&e.close()}),!1),o):o;var h=o.util.currentScript();function p(){o.manual||o.highlightAll()}if(h&&(o.filename=h.src,h.hasAttribute("data-manual")&&(o.manual=!0)),!o.manual){var d=document.readyState;"loading"===d||"interactive"===d&&h&&h.defer?document.addEventListener("DOMContentLoaded",p):window.requestAnimationFrame?window.requestAnimationFrame(p):window.setTimeout(p,16)}return o}("undefined"!==typeof window?window:"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=r),"undefined"!==typeof n.g&&(n.g.Prism=r)},99560:function(e,t,n){"use strict";var r=n(66632),o=n(98805),i=n(57643),s="data";e.exports=function(e,t){var n=r(t),p=t,d=i;if(n in e.normal)return e.property[e.normal[n]];n.length>4&&n.slice(0,4)===s&&a.test(t)&&("-"===t.charAt(4)?p=function(e){var t=e.slice(5).replace(l,h);return s+t.charAt(0).toUpperCase()+t.slice(1)}(t):t=function(e){var t=e.slice(4);if(l.test(t))return e;"-"!==(t=t.replace(c,u)).charAt(0)&&(t="-"+t);return s+t}(t),d=o);return new d(p,t)};var a=/^data[-\w.:]+$/i,l=/-[a-z]/g,c=/[A-Z]/g;function u(e){return"-"+e.toLowerCase()}function h(e){return e.charAt(1).toUpperCase()}},97247:function(e,t,n){"use strict";var r=n(19940),o=n(8289),i=n(5812),s=n(94397),a=n(67716),l=n(61805);e.exports=r([i,o,s,a,l])},67716:function(e,t,n){"use strict";var r=n(17e3),o=n(17596),i=r.booleanish,s=r.number,a=r.spaceSeparated;e.exports=o({transform:function(e,t){return"role"===t?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:i,ariaAutoComplete:null,ariaBusy:i,ariaChecked:i,ariaColCount:s,ariaColIndex:s,ariaColSpan:s,ariaControls:a,ariaCurrent:null,ariaDescribedBy:a,ariaDetails:null,ariaDisabled:i,ariaDropEffect:a,ariaErrorMessage:null,ariaExpanded:i,ariaFlowTo:a,ariaGrabbed:i,ariaHasPopup:null,ariaHidden:i,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:a,ariaLevel:s,ariaLive:null,ariaModal:i,ariaMultiLine:i,ariaMultiSelectable:i,ariaOrientation:null,ariaOwns:a,ariaPlaceholder:null,ariaPosInSet:s,ariaPressed:i,ariaReadOnly:i,ariaRelevant:null,ariaRequired:i,ariaRoleDescription:a,ariaRowCount:s,ariaRowIndex:s,ariaRowSpan:s,ariaSelected:i,ariaSetSize:s,ariaSort:null,ariaValueMax:s,ariaValueMin:s,ariaValueNow:s,ariaValueText:null,role:null}})},61805:function(e,t,n){"use strict";var r=n(17e3),o=n(17596),i=n(10855),s=r.boolean,a=r.overloadedBoolean,l=r.booleanish,c=r.number,u=r.spaceSeparated,h=r.commaSeparated;e.exports=o({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:i,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:h,acceptCharset:u,accessKey:u,action:null,allow:null,allowFullScreen:s,allowPaymentRequest:s,allowUserMedia:s,alt:null,as:null,async:s,autoCapitalize:null,autoComplete:u,autoFocus:s,autoPlay:s,capture:s,charSet:null,checked:s,cite:null,className:u,cols:c,colSpan:null,content:null,contentEditable:l,controls:s,controlsList:u,coords:c|h,crossOrigin:null,data:null,dateTime:null,decoding:null,default:s,defer:s,dir:null,dirName:null,disabled:s,download:a,draggable:l,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:s,formTarget:null,headers:u,height:c,hidden:s,high:c,href:null,hrefLang:null,htmlFor:u,httpEquiv:u,id:null,imageSizes:null,imageSrcSet:h,inputMode:null,integrity:null,is:null,isMap:s,itemId:null,itemProp:u,itemRef:u,itemScope:s,itemType:u,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:s,low:c,manifest:null,max:null,maxLength:c,media:null,method:null,min:null,minLength:c,multiple:s,muted:s,name:null,nonce:null,noModule:s,noValidate:s,onAbort:null,onAfterPrint:null,onAuxCl
1ick:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextMenu:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:s,optimum:c,pattern:null,ping:u,placeholder:null,playsInline:s,poster:null,preload:null,readOnly:s,referrerPolicy:null,rel:u,required:s,reversed:s,rows:c,rowSpan:c,sandbox:u,scope:null,scoped:s,seamless:s,selected:s,shape:null,size:c,sizes:null,slot:null,span:c,spellCheck:l,src:null,srcDoc:null,srcLang:null,srcSet:h,start:c,step:null,style:null,tabIndex:c,target:null,title:null,translate:null,type:null,typeMustMatch:s,useMap:null,value:l,width:c,wrap:null,align:null,aLink:null,archive:u,axis:null,background:null,bgColor:null,border:c,borderColor:null,bottomMargin:c,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:s,declare:s,event:null,face:null,frame:null,frameBorder:null,hSpace:c,leftMargin:c,link:null,longDesc:null,lowSrc:null,marginHeight:c,marginWidth:c,noResize:s,noHref:s,noShade:s,noWrap:s,object:null,profile:null,prompt:null,rev:null,rightMargin:c,rules:null,scheme:null,scrolling:l,standby:null,summary:null,text:null,topMargin:c,valueType:null,version:null,vAlign:null,vLink:null,vSpace:c,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:s,disableRemotePlayback:s,prefix:null,property:null,results:c,security:null,unselectable:null}})},10855:function(e,t,n){"use strict";var r=n(28740);e.exports=function(e,t){return r(e,t.toLowerCase())}},28740:function(e){"use strict";e.exports=function(e,t){return t in e?e[t]:t}},17596:function(e,t,n){"use strict";var r=n(66632),o=n(99607),i=n(98805);e.exports=function(e){var t,n,s=e.space,a=e.mustUseProperty||[],l=e.attributes||{},c=e.properties,u=e.transform,h={},p={};for(t in c)n=new i(t,u(l,t),c[t],s),-1!==a.indexOf(t)&&(n.mustUseProperty=!0),h[t]=n,p[r(t)]=t,p[r(n.attribute)]=t;return new o(h,p,s)}},98805:function(e,t,n){"use strict";var r=n(57643),o=n(17e3);e.exports=a,a.prototype=new r,a.prototype.defined=!0;var i=["boolean","booleanish","overloadedBoolean","number","commaSeparated","spaceSeparated","commaOrSpaceSeparated"],s=i.length;function a(e,t,n,a){var c,u=-1;for(l(this,"space",a),r.call(this,e,t);++u<s;)l(this,c=i[u],(n&o[c])===o[c])}function l(e,t,n){n&&(e[t]=n)}},57643:function(e){"use strict";e.exports=n;var t=n.prototype;function n(e,t){this.property=e,this.attribute=t}t.space=null,t.attribute=null,t.property=null,t.boolean=!1,t.booleanish=!1,t.overloadedBoolean=!1,t.number=!1,t.commaSeparated=!1,t.spaceSeparated=!1,t.commaOrSpaceSeparated=!1,t.mustUseProperty=!1,t.defined=!1},19940:function(e,t,n){"use strict";var r=n(47529),o=n(99607);e.exports=function(e){var t,n,i=e.length,s=[],a=[],l=-1;for(;++l<i;)t=e[l],s.push(t.property),a.push(t.normal),n=t.space;return new o(r.apply(null,s),r.apply(null,a),n)}},99607:function(e){"use strict";e.exports=n;var t=n.prototype;function n(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}t.space=null,t.normal={},t.property={}},17e3:function(e,t){"use strict";var n=0;function r(){return Math.pow(2,++n)}t.boolean=r(),t.booleanish=r(),t.overloadedBoolean=r(),t.number=r(),t.spaceSeparated=r(),t.commaSeparated=r(),t.commaOrSpaceSeparated=r()},8289:function(e,t,n){"use strict";var r=n(17596);
1e.exports=r({space:"xlink",transform:function(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}})},5812:function(e,t,n){"use strict";var r=n(17596);e.exports=r({space:"xml",transform:function(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}})},94397:function(e,t,n){"use strict";var r=n(17596),o=n(10855);e.exports=r({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:o,properties:{xmlns:null,xmlnsXLink:null}})},66632:function(e){"use strict";e.exports=function(e){return e.toLowerCase()}},69124:function(e,t,n){"use strict";var r=n(42391),o=n(19443),i=n(31640),s=function(e,t){return function(n){Array.isArray(e)||(e=[e]);for(var r=0,o=e.length;r<o;r++){var i=I(e[r])(n.selection);if(i){var s=m(i.pos,t)(n);if(s!==n)return s}}return n}},a=function(e){return function(t){if(p(t.selection)){var n=t.selection,i=n.$from,s=n.$to;if(e instanceof o.Fragment&&i.parent.canReplace(i.index(),i.indexAfter(),e)||i.parent.canReplaceWith(i.index(),i.indexAfter(),e.type))return f(t.replaceWith(i.pos,s.pos,e).setSelection(new r.NodeSelection(t.doc.resolve(i.pos))))}return t}},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return function(n){var o=r.Selection.findFrom(n.doc.resolve(e),t,!0);return o?n.setSelection(o):n}},c=function(e){return e.type&&e.type.spec.selectable},u=function(e,t,n){return function(e){return c(e)&&e.type.isLeaf}(e)?n.setSelection(new r.NodeSelection(n.doc.resolve(t))):l(t)(n)},h=function(e,t,n){return function(r){var o="number"===typeof t,i=r.selection.$from,l=o?r.doc.resolve(t):p(r.selection)?r.doc.resolve(i.pos+1):i,h=l.parent;if(p(r.selection)&&n&&r!==(r=a(e)(r)))return r;if(w(h)&&r!==(r=s(h.type,e)(r))){var d=c(e)?l.before(l.depth):l.pos;return u(e,d,r)}if(k(l,e)){r.insert(l.pos,e);var m=o?l.pos:c(e)?r.selection.$anchor.pos-1:r.selection.$anchor.pos;return f(u(e,m,r))}for(var g=l.depth;g>0;g--){var v=l.after(g),y=r.doc.resolve(v);if(k(y,e))return r.insert(v,e),f(u(e,v,r))}return r}},p=function(e){return e instanceof r.NodeSelection},d=function(e,t){return Array.isArray(e)&&e.indexOf(t.type)>-1||t.type===e},f=function(e){return Object.assign(Object.create(e),e).setTime(Date.now())},m=function(e,t){return function(n){var r=n.doc.nodeAt(e),o=n.doc.resolve(e);if(g(o,t)){var i=(n=n.replaceWith(e,e+r.nodeSize,t)).selection.$from.pos-1;return n=l(Math.max(i,0),-1)(n),n=l(n.selection.$from.start())(n),f(n)}return n}},g=function(e,t){var n=e.node(e.depth);return n&&n.type.validContent(t instanceof o.Fragment?t:o.Fragment.from(t))},v=function(e){return function(t){var n=t.doc.nodeAt(e);return f(t.delete(e,e+n.nodeSize))}},y=function(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;var t={};return Object.keys(e.nodes).forEach((function(n){var r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)})),e.cached.tableNodeTypes=t,t},k=function(e,t){var n=e.index();return t instanceof o.Fragment?e.parent.canReplace(n,n,t):t instanceof o.Node&&e.parent.canReplaceWith(n,n,t.type)},w=function(e){return!e||"paragraph"===e.type.name&&2===e.nodeSize},x=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t?e.createChecked(null,t):e.createAndFill()},b=function(e){return function(t){for(var n=i.TableMap.get(t.$anchorCell.node(-1)),r
1=t.$anchorCell.start(-1),o=n.cellsInRect(e),s=n.cellsInRect(n.rectBetween(t.$anchorCell.pos-r,t.$headCell.pos-r)),a=0,l=o.length;a<l;a++)if(-1===s.indexOf(o[a]))return!1;return!0}},S=function(e){return e[0].map((function(t,n){return e.map((function(e){return e[n]}))}))},C=function(e){for(var t=i.TableMap.get(e),n=[],r=0;r<t.height;r++){for(var o=[],s={},a=0;a<t.width;a++){var l=t.map[r*t.width+a],c=e.nodeAt(l),u=t.findCell(l);s[l]||u.top!==r?o.push(null):(s[l]=!0,o.push(c))}n.push(o)}return n},M=function(e,t){for(var n=[],r=i.TableMap.get(e),o=0;o<r.height;o++){for(var s=e.child(o),a=[],l=0;l<r.width;l++)if(t[o][l]){var c=r.map[o*r.width+l],u=t[o][l],h=e.nodeAt(c).type.createChecked(Object.assign({},u.attrs),u.content,u.marks);a.push(h)}n.push(s.type.createChecked(s.attrs,a,s.marks))}return e.type.createChecked(e.attrs,n,e.marks)},O=function(e,t,n,r){var o=t[0]>n[0]?-1:1,i=e.splice(t[0],t.length),s=i.length%2===0?1:0,a=void 0;return a=-1===r&&1===o?n[0]-1:1===r&&-1===o?n[n.length-1]-s+1:-1===o?n[0]:n[n.length-1]-s,e.splice.apply(e,[a,0].concat(i)),e},E=function(e,t,n,r){var o="Target position is invalid, you can't move the "+r+" "+e+" to "+t+", the target can't be split. You could use tryToFit option.";if(1===(e>t?-1:1)){if(-1!==n.slice(0,n.length-1).indexOf(t))throw new Error(o)}else if(-1!==n.slice(1).indexOf(t))throw new Error(o);return!0},A=function(e){return function(t){var n=t.$from;return T(n,e)}},T=function(e,t){for(var n=e.depth;n>0;n--){var r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}},R=function(e,t){return function(n){var r=A(e)(n);if(r)return _(r.pos,t)}},N=function(e){return function(t){return!!A(e)(t)}},I=function(e){return function(t){return A((function(t){return d(e,t)}))(t)}},D=function(e){var t=e.$from.nodeBefore,n=r.Selection.findFrom(e.$from,-1);if(n&&t){var o=I(t.type)(n);return o?o.pos:n.$from.pos}},_=function(e,t){var n=t(e),r=n.node.childNodes[n.offset];return n.node.nodeType===Node.TEXT_NODE?n.node.parentNode:r&&r.nodeType!==Node.TEXT_NODE?r:n.node},L=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)throw new Error('Invalid "node" parameter');var n=[];return e.descendants((function(e,r){if(n.push({node:e,pos:r}),!t)return!1})),n},P=function(e,t,n){if(!e)throw new Error('Invalid "node" parameter');if(!t)throw new Error('Invalid "predicate" parameter');return L(e,n).filter((function(e){return t(e.node)}))},$=function(e,t,n){return P(e,(function(e){return e.type===t}),n)};var z=function(e){return A((function(e){return e.type.spec.tableRole&&"table"===e.type.spec.tableRole}))(e)},F=function(e){return e instanceof i.CellSelection},B=function(e){if(F(e)){var t=i.TableMap.get(e.$anchorCell.node(-1));return b({left:0,right:t.width,top:0,bottom:t.height})(e)}return!1},j=function(e){return function(t){var n=z(t);if(n){var r=i.TableMap.get(n.node);return(Array.isArray(e)?e:Array.from([e])).reduce((function(e,t){if(t>=0&&t<=r.width-1){var o=r.cellsInRect({left:t,right:t+1,top:0,bottom:r.height});return e.concat(o.map((function(e){var t=n.node.nodeAt(e),r=e+n.start;return{pos:r,start:r+1,node:t}})))}}),[])}}},H=function(e){return function(t){var n=z(t);if(n){var r=i.TableMap.get(n.node);return(Array.isArray(e)?e:Array.from([e])).reduce((function(e,t){if(t>=0&&t<=r.height-1){var o=r.cellsInRect({left:0,right:r.width,top:t,bottom:t+1});return e.concat(o.map((function(e){var t=n.node.nodeAt(e),r=e+n.start;return{pos:r,start:r+1,node:t}})))}}),[])}}},W=function(e){return function(t,n){return function(r){var o=z(r.selection),s="row"===e;if(o){var a=i.TableMap.get(o.node);if(t>=0&&t<(s?a.height:a.width)){var l=s?0:t,c=s?t:0,u=s?a.width:t+1,h=s?t+1:a.height;if(n){var p=X(r.selection.$from);if(!p)return r;var d=a.findCell(p.pos-o.start);s?(c=Math.min(c,d.top),h=Math.max(h,d.bottom)):(l=Math.min(l,d.left),u=Math.max(u,d.right))}var m=a.cellsInRect({left:l,top:c,right:s?u:l+1,bottom:s?c+1:h}),g=h-c===1?m:a.cellsInRect({left:s?l:u-1,top:s?h-1:c,right:u,bottom:h}),v=o.start+m[0],y=o.start+g[g.length-1],k=r.doc.resolve(v),w=r.doc.resolve(y);return f(r.setSelection(new i.CellSelection(w,k)))}}return r}}},J=W("column"),U=W("row"),q=function(e){return function(t){var n=z(t.selection);if(n){var r=i.TableMap.get(n.node);
1if(e>=0&&e<=r.height){for(var o=n.node,s=y(o.type.schema),a=n.start,l=0;l<e+1;l++)a+=o.child(l).nodeSize;var c=o.child(e),u=[],p=0;if(c.forEach((function(e){1===e.attrs.rowspan&&(p+=e.attrs.colspan,u.push(s[e.type.spec.tableRole].createAndFill(e.attrs,e.marks)))})),p<r.width){for(var d=[],f=function(n){var r=Q(n,(function(t,r){var o=t.node.attrs.rowspan;return o>1&&n+o>e}))(t);d.push.apply(d,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(r))},m=e;m>=0;m--)f(m);d.length&&d.forEach((function(e){t=G(e,{rowspan:e.node.attrs.rowspan+1})(t)}))}return h(s.row.create(c.attrs,u),a)(t)}}return t}},V=function(e){return function(t){var n=z(t.selection);if(n){var r=i.TableMap.get(n.node);if(0===e&&1===r.width)return Y(t);if(e>=0&&e<=r.width)return i.removeColumn(t,{map:r,tableStart:n.start,table:n.node},e),f(t)}return t}},K=function(e){return function(t){var n=z(t.selection);if(n){var r=i.TableMap.get(n.node);if(0===e&&1===r.height)return Y(t);if(e>=0&&e<=r.height)return i.removeRow(t,{map:r,tableStart:n.start,table:n.node},e),f(t)}return t}},Y=function(e){for(var t=e.selection.$from,n=t.depth;n>0;n--){if("table"===t.node(n).type.spec.tableRole)return f(e.delete(t.before(n),t.after(n)))}return e},G=function(e,t){return function(n){return e?(n.setNodeMarkup(e.pos,null,Object.assign({},e.node.attrs,t)),f(n)):n}},X=function(e){return T(e,(function(e){return e.type.spec.tableRole&&/cell/i.test(e.type.spec.tableRole)}))},Z=function(e){var t=X(e);if(t){var n=function(e){return T(e,(function(e){return e.type.spec.tableRole&&/table/i.test(e.type.spec.tableRole)}))}(e),r=i.TableMap.get(n.node),o=t.pos-n.start;return r.rectBetween(o,o)}},Q=function(e,t){return function(n){var r=[],o=H(e)(n.selection);if(o)for(var i=o.length-1;i>=0;i--)t(o[i],n)&&r.push(o[i]);return r}},ee=function(e){return function(t){for(var n=e,r=e,o=function(e){var o=j(e)(t.selection);o&&o.forEach((function(t){var o=t.node.attrs.colspan+e-1;o>=n&&(n=e),o>r&&(r=o)}))},i=e;i>=0;i--)o(i);var s=function(e){var n=j(e)(t.selection);n&&n.forEach((function(t){var n=t.node.attrs.colspan+e-1;t.node.attrs.colspan>1&&n>r&&(r=n)}))};for(i=e;i<=r;i++)s(i);var a=[];for(i=n;i<=r;i++){var l=j(i)(t.selection);l&&l.length&&a.push(i)}n=a[0],r=a[a.length-1];for(var c=j(n)(t.selection),u=H(0)(t.selection),h=t.doc.resolve(c[c.length-1].pos),p=void 0,d=r;d>=n;d--){var f=j(d)(t.selection);if(f&&f.length){for(var m=u.length-1;m>=0;m--)if(u[m].pos===f[0].pos){p=f[0];break}if(p)break}}return{$anchor:h,$head:t.doc.resolve(p.pos),indexes:a}}},te=function(e){return function(t){for(var n=e,r=e,o=function(e){H(e)(t.selection).forEach((function(t){var o=t.node.attrs.rowspan+e-1;o>=n&&(n=e),o>r&&(r=o)}))},i=e;i>=0;i--)o(i);var s=function(e){H(e)(t.selection).forEach((function(t){var n=t.node.attrs.rowspan+e-1;t.node.attrs.rowspan>1&&n>r&&(r=n)}))};for(i=e;i<=r;i++)s(i);var a=[];for(i=n;i<=r;i++){var l=H(i)(t.selection);l&&l.length&&a.push(i)}n=a[0],r=a[a.length-1];for(var c=H(n)(t.selection),u=j(0)(t.selection),h=t.doc.resolve(c[c.length-1].pos),p=void 0,d=r;d>=n;d--){var f=H(d)(t.selection);if(f&&f.length){for(var m=u.length-1;m>=0;m--)if(u[m].pos===f[0].pos){p=f[0];break}if(p)break}}return{$anchor:h,$head:t.doc.resolve(p.pos),indexes:a}}};t.Kk=A,t.a1=function(e){return function(t){if(p(t)){var n=t.node,r=t.$from;if(d(e,n))return{node:n,pos:r.pos,depth:r.depth}}}},t.BX=s},11215:function(e,t,n){"use strict";var r="object"===typeof globalThis?globalThis:"object"===typeof self?self:"object"===typeof window?window:"object"===typeof n.g?n.g:{}
1,o=function(){var e="Prism"in r,t=e?r.Prism:void 0;return function(){e?r.Prism=t:delete r.Prism;e=void 0,t=void 0}}();r.Prism={manual:!0,disableWorkerMessageHandler:!0};var i=n(31742),s=n(57574),a=n(28325),l=n(2717),c=n(12049),u=n(29726),h=n(36155);o();var p={}.hasOwnProperty;function d(){}d.prototype=a;var f=new d;function m(e){if("function"!==typeof e||!e.displayName)throw new Error("Expected `function` for `grammar`, got `"+e+"`");void 0===f.languages[e.displayName]&&e(f)}e.exports=f,f.highlight=function(e,t){var n,r=a.highlight;if("string"!==typeof e)throw new Error("Expected `string` for `value`, got `"+e+"`");if("Object"===f.util.type(t))n=t,t=null;else{if("string"!==typeof t)throw new Error("Expected `string` for `name`, got `"+t+"`");if(!p.call(f.languages,t))throw new Error("Unknown language: `"+t+"` is not registered");n=f.languages[t]}return r.call(this,e,n,t)},f.register=m,f.alias=function(e,t){var n,r,o,i,s=f.languages,a=e;t&&((a={})[e]=t);for(n in a)for(r=a[n],o=(r="string"===typeof r?[r]:r).length,i=-1;++i<o;)s[r[i]]=s[n]},f.registered=function(e){if("string"!==typeof e)throw new Error("Expected `string` for `language`, got `"+e+"`");return p.call(f.languages,e)},f.listLanguages=function(){var e,t=f.languages,n=[];for(e in t)p.call(t,e)&&"object"===typeof t[e]&&n.push(e);return n},m(l),m(c),m(u),m(h),f.util.encode=function(e){return e},f.Token.stringify=function(e,t,n){var r;if("string"===typeof e)return{type:"text",value:e};if("Array"===f.util.type(e))return function(e,t){var n,r=[],o=e.length,i=-1;for(;++i<o;)""!==(n=e[i])&&null!==n&&void 0!==n&&r.push(n);i=-1,o=r.length;for(;++i<o;)n=r[i],r[i]=f.Token.stringify(n,t,r);return r}(e,t);r={type:e.type,content:f.Token.stringify(e.content,t,n),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:n},e.alias&&(r.classes=r.classes.concat(e.alias));return f.hooks.run("wrap",r),i(r.tag+"."+r.classes.join("."),function(e){var t;for(t in e)e[t]=s(e[t]);return e}(r.attributes),r.content)}},29726:function(e){"use strict";function t(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}e.exports=t,t.displayName="clike",t.aliases=[]},12049:function(e){"use strict";function t(e){!function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(e)}e.exports=t,t.displayName="css",t.aliases=[]},36155:function(e){"use strict";function t(e){e.languages.javascript=e.languages.extend("clike",{"class-name":[e.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?
1:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}e.exports=t,t.displayName="javascript",t.aliases=["js"]},2717:function(e){"use strict";function t(e){e.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}}
1,"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.value.replace(/&amp;/,"&"))})),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(t,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:e.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var o={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};o["language-"+n]={pattern:/[\s\S]+/,inside:e.languages[n]};var i={};i[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return t})),"i"),lookbehind:!0,greedy:!0,inside:o},e.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(t,n){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:e.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}e.exports=t,t.displayName="markup",t.aliases=["html","mathml","svg","xml","ssml","atom","rss"]},36582:function(e,t){"use strict";t.Q=function(e){var t=String(e||"").trim();return""===t?[]:t.split(n)};var n=/[ \t\n\r\f]+/g},45298:function(e,t){"use strict";t.Z=function(e,t){}},28498:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.errorMessages=t.ErrorType=void 0,function(e){e.MalformedUnicode="MALFORMED_UNICODE",e.MalformedHexadecimal="MALFORMED_HEXADECIMAL",e.CodePointLimit="CODE_POINT_LIMIT",e.OctalDeprecation="OCTAL_DEPRECATION",e.EndOfString="END_OF_STRING"}(n=t.ErrorType||(t.ErrorType={})),t.errorMessages=new Map([[n.MalformedUnicode,"malformed Unicode character escape sequence"],[n.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[n.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[n.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[n.EndOfString,"malformed escape sequence at end of string"]])},93012:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unraw=t.errorMessages=t.ErrorType=void 0;const r=n(28498);function o(e,t,n){const o=function(e){return e.match(/[^a-f0-9]/i)?NaN:parseInt(e,16)}(e);if(Number.isNaN(o)||void 0!==n&&n!==e.length)throw new SyntaxError(r.errorMessages.get(t));return o}function i(e,t){const n=o(e,r.ErrorType.MalformedUnicode,4);if(void 0!==t){const e=o(t,r.ErrorType.MalformedUnicode,4);return String.fromCharCode(n,e)}return String.fromCharCode(n)}Object.defineProperty(t,"ErrorType",{enumerable:!0,get:function(){return r.ErrorType}}),Object.defineProperty(t,"errorMessages",{enumerable:!0,get:function(){return r.errorMessages}});const s=new Map([["b","\b"],["f","\f"],["n","\n"],["r","\r"],["t","\t"],["v","\v"],["0","\0"]]);const a=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function l(e,t=!1){return e.replace(a,(function(e,n,a,l,c,u,h,p,d){if(void 0!==n)return"\\";if(void 0!==a)return function(e){const t=o(e,r.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(t)}(a);if(void 0!==l)return function(e){if("{"!==(t=e).charAt(0)||"}"!==t.charAt(t.length-1))throw new SyntaxError(r.errorMessages.get(r.ErrorType.MalformedUnicode));var t;const n=o(e.slice(1,-1),r.ErrorType.MalformedUnicode);try{return String.fromCodePoint(n)}catch(i){throw i instanceof RangeError?new SyntaxError(r.errorMessages.get(r.ErrorType.CodePointLimit)):i}}(l);if(void 0!==c)return i(c,u);if(void 0!==h)return i(h);if("0"===p)return"\0";if(void 0!==p)return function(e,t=!1){if(t)throw new SyntaxError(r.errorMessages.get(r.ErrorType.OctalDeprecation));const n=parseInt(e,8);return String.fromCharCode(n)}(p,!t);if(void 0!==d)return f=d,s.get(f)||f;var f;throw new SyntaxError(r.errorMessages.get(r.ErrorType.EndOfString))}))}t.unraw=l,t.default=l},47529:function(e){e.exports=function(){for(var e={},n=0;n<arguments.length;n++){var r=arguments[n];for(var o in r)t.call(r,o)&&(e[o]=r[o])}return e};var t=Object.prototype.hasOwnProperty},36586:function(e){"use strict";function t(e){this.content=e}t.prototype={constructor:t,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return-1==t?void 0:this.content[t+1]},update:function(e,n,r){var o=r&&r!=e?this.remove(r):this,i=o.find(e),s=o.content.slice();return-1==i?s.push(r||e,n):(s[i+1]=n,r&&(s[i]=r)),new t(s)},remove:function(e){var n=this.find(e);if(-1==n)return this;var r=this.content.slice();return r.splice(n,2),new t(r)},addToStart:function(e,n){return new t([e,n].concat(this.remove(e).content))},addToEnd:function(e,n){var r=this.remove(e).content.slice();return r.push(e,n),new t(r)},addBefore:function(e,n,r){var o=this.remove(n),i=o.content.slice(),s=o.find(e);return i.splice(-1==s?i.length:s,0,n,r),new t(i)}
1,forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=t.from(e)).size?new t(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=t.from(e)).size?new t(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var n=this;e=t.from(e);for(var r=0;r<e.content.length;r+=2)n=n.remove(e.content[r]);return n},toObject:function(){var e={};return this.forEach((function(t,n){e[t]=n})),e},get size(){return this.content.length>>1}},t.from=function(e){if(e instanceof t)return e;var n=[];if(e)for(var r in e)n.push(r,e[r]);return new t(n)},e.exports=t},97354:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(26691),o=n(42391),i="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function s(e){var t,n,r,o,s=e.split(/-(?!$)/),a=s[s.length-1];"Space"==a&&(a=" ");for(var l=0;l<s.length-1;l++){var c=s[l];if(/^(cmd|meta|m)$/i.test(c))o=!0;else if(/^a(lt)?$/i.test(c))t=!0;else if(/^(c|ctrl|control)$/i.test(c))n=!0;else if(/^s(hift)?$/i.test(c))r=!0;else{if(!/^mod$/i.test(c))throw new Error("Unrecognized modifier name: "+c);i?o=!0:n=!0}}return t&&(a="Alt-"+a),n&&(a="Ctrl-"+a),o&&(a="Meta-"+a),r&&(a="Shift-"+a),a}function a(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function l(e){var t=function(e){var t=Object.create(null);for(var n in e)t[s(n)]=e[n];return t}(e);return function(e,n){var o,i=r.keyName(n),s=t[a(i,n)];if(s&&s(e.state,e.dispatch,e))return!0;if(1==i.length&&" "!=i){if(n.shiftKey){var l=t[a(i,n,!1)];if(l&&l(e.state,e.dispatch,e))return!0}if((n.shiftKey||n.altKey||n.metaKey||i.charCodeAt(0)>127)&&(o=r.base[n.keyCode])&&o!=i){var c=t[a(o,n)];if(c&&c(e.state,e.dispatch,e))return!0}}return!1}}t.keydownHandler=l,t.keymap=function(e){return new o.Plugin({props:{handleKeyDown:l(e)}})}},19443:function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(l){a=!0,o=l}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(){return i="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=s(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},i.apply(this,arguments)}function s(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=f(e)););return e}function a(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}function l(e){var t=p();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===y(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u(e){var t="function"===typeof Map?new Map:void 0;return u=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return h(e,arguments,f(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),d(r,e)},u(e)}function h(e,t,n){return h=p()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&d(o,n.prototype),o},h.apply(null,arguments)}function p(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(w){return!1}}
1function d(e,t){return d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},d(e,t)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t,n){return t&&g(e.prototype,t),n&&g(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}Object.defineProperty(t,"__esModule",{value:!0});var k=n(36586);var w,x=(w=k)&&"object"===y(w)&&"default"in w?w:{default:w};function b(e,t,n){for(var r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;var o=e.child(r),i=t.child(r);if(o!=i){if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(var s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){var a=b(o.content,i.content,n+1);if(null!=a)return a}n+=o.nodeSize}else n+=o.nodeSize}}function S(e,t,n,r){for(var o=e.childCount,i=t.childCount;;){if(0==o||0==i)return o==i?null:{a:n,b:r};var s=e.child(--o),a=t.child(--i),l=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){for(var c=0,u=Math.min(s.text.length,a.text.length);c<u&&s.text[s.text.length-c-1]==a.text[a.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){var h=S(s.content,a.content,n-1,r-1);if(h)return h}n-=l,r-=l}else n-=l,r-=l}}var C=function(){function e(t,n){if(m(this,e),this.content=t,this.size=n||0,null==n)for(var r=0;r<t.length;r++)this.size+=t[r].nodeSize}return v(e,[{key:"nodesBetween",value:function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4?arguments[4]:void 0,i=0,s=0;s<t;i++){var a=this.content[i],l=s+a.nodeSize;if(l>e&&!1!==n(a,r+s,o||null,i)&&a.content.size){var c=s+1;a.nodesBetween(Math.max(0,e-c),Math.min(a.content.size,t-c),n,r+c)}s=l}}},{key:"descendants",value:function(e){this.nodesBetween(0,this.size,e)}},{key:"textBetween",value:function(e,t,n,r){var o="",i=!0;return this.nodesBetween(e,t,(function(s,a){s.isText?(o+=s.text.slice(Math.max(e,a)-a,t-a),i=!n):s.isLeaf?(r?o+="function"===typeof r?r(s):r:s.type.spec.leafText&&(o+=s.type.spec.leafText(s)),i=!n):!i&&s.isBlock&&(o+=n,i=!0)}),0),o}},{key:"append",value:function(t){if(!t.size)return this;if(!this.size)return t;var n=this.lastChild,r=t.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);i<t.content.length;i++)o.push(t.content[i]);return new e(o,this.size+t.size)}},{key:"cut",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size;if(0==t&&n==this.size)return this;var r=[],o=0;if(n>t)for(var i=0,s=0;s<n;i++){var a=this.content[i],l=s+a.nodeSize;l>t&&((s<t||l>n)&&(a=a.isText?a.cut(Math.max(0,t-s),Math.min(a.text.length,n-s)):a.cut(Math.max(0,t-s-1),Math.min(a.content.size,n-s-1))),r.push(a),o+=a.nodeSize),s=l}return new e(r,o)}},{key:"cutByIndex",value:function(t,n){return t==n?e.empty:0==t&&n==this.content.length?this:new e(this.content.slice(t,n))}},{key:"replaceChild",value:function(t,n){var r=this.content[t];if(r==n)return this;var o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[t]=n,new e(o,i)}},{key:"addToStart",value:function(t){return new e([t].concat(this.content),this.size+t.nodeSize)}},{key:"addToEnd",value:function(t){return new e(this.content.concat(t),this.size+t.nodeSize)}},{key:"eq",value:function(e){if(this.content.length!=e.content.length)return!1;for(var t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}},{key:"firstChild",get:function(){return this.content.length?this.content[0]:null}},{key:"lastChild",get:function(){return this.content.length?this.content[this.content.length-1]:null}},{key:"childCount",get:function(){return this.content.length}},{key:"child",value:function(e){var t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}},{key:"maybeChild",value:function(e){return this.content[e]||null}}
1,{key:"forEach",value:function(e){for(var t=0,n=0;t<this.content.length;t++){var r=this.content[t];e(r,n,t),n+=r.nodeSize}}},{key:"findDiffStart",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return b(this,e,t)}},{key:"findDiffEnd",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.size;return S(this,e,t,n)}},{key:"findIndex",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(0==e)return O(0,e);if(e==this.size)return O(this.content.length,e);if(e>this.size||e<0)throw new RangeError("Position ".concat(e," outside of fragment (").concat(this,")"));for(var n=0,r=0;;n++){var o=this.child(n),i=r+o.nodeSize;if(i>=e)return i==e||t>0?O(n+1,i):O(n,r);r=i}}},{key:"toString",value:function(){return"<"+this.toStringInner()+">"}},{key:"toStringInner",value:function(){return this.content.join(", ")}},{key:"toJSON",value:function(){return this.content.length?this.content.map((function(e){return e.toJSON()})):null}}],[{key:"fromJSON",value:function(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new e(n.map(t.nodeFromJSON))}},{key:"fromArray",value:function(t){if(!t.length)return e.empty;for(var n,r=0,o=0;o<t.length;o++){var i=t[o];r+=i.nodeSize,o&&i.isText&&t[o-1].sameMarkup(i)?(n||(n=t.slice(0,o)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new e(n||t,r)}},{key:"from",value:function(t){if(!t)return e.empty;if(t instanceof e)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new e([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}]),e}();C.empty=new C([],0);var M={index:0,offset:0};function O(e,t){return M.index=e,M.offset=t,M}function E(e,t){if(e===t)return!0;if(!e||"object"!=y(e)||!t||"object"!=y(t))return!1;var n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(!E(e[r],t[r]))return!1}else{for(var o in e)if(!(o in t)||!E(e[o],t[o]))return!1;for(var i in t)if(!(i in e))return!1}return!0}var A=function(){function e(t,n){m(this,e),this.type=t,this.attrs=n}return v(e,[{key:"addToSet",value:function(e){for(var t,n=!1,r=0;r<e.length;r++){var o=e[r];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,r));else{if(o.type.excludes(this.type))return e;!n&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(o)}}return t||(t=e.slice()),n||t.push(this),t}},{key:"removeFromSet",value:function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}},{key:"isInSet",value:function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}},{key:"eq",value:function(e){return this==e||this.type==e.type&&E(this.attrs,e.attrs)}},{key:"toJSON",value:function(){var e={type:this.type.name};for(var t in this.attrs){e.attrs=this.attrs;break}return e}}],[{key:"fromJSON",value:function(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");var n=e.marks[t.type];if(!n)throw new RangeError("There is no mark type ".concat(t.type," in this schema"));return n.create(t.attrs)}},{key:"sameSet",value:function(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}},{key:"setFrom",value:function(t){if(!t||Array.isArray(t)&&0==t.length)return e.none;if(t instanceof e)return[t];var n=t.slice();return n.sort((function(e,t){return e.type.rank-t.type.rank})),n}}]),e}();A.none=[];var T=function(e){a(n,e);var t=l(n);function n(){return m(this,n),t.apply(this,arguments)}return v(n)}(u(Error)),R=function(){function e(t,n,r){m(this,e),this.content=t,this.openStart=n,this.openEnd=r}return v(e,[{key:"size",get:function(){return this.content.size-this.openStart-this.openEnd}},{key:"insertAt",value:function(t,n){var r=I(this.content,t+this.openStart,n);return r&&new e(r,this.openStart,this.openEnd)}},{key:"removeBetween",value:function(t,n){return new e(N(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}},{key:"eq",value:function(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}},{key:"toString",value:function(){return this.content+"("+this.openStart+","+this.openEnd+")"}},{key:"toJSON",value:function(){if(!this.content.size)return null;var e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}}],[{key:"fromJSON",value:function(t,n){if(!n)return e.empty;var r=n.openStart||0,o=n.openEnd||0;if("number"!=typeof r||"number"!=typeof o)throw new RangeError("Invalid input for Slice.fromJSON");return new e(C.fromJSON(t,n.content),r,o)}},{key:"maxOpen",value:function(t){for(var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=0,o=0,i=t.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(var s=t.lastChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.lastChild)o++;return new e(t,r,o)}}]),e}();function N(e,t,n){var r=e.findIndex(t),o=r.index,i=r.offset,s=e.maybeChild(o),a=e.findIndex(n),l=a.index,c=a.offset;if(i==t||s.isText){if(c!=n&&!e.child(l).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(o!=l)throw new RangeError("Removing non-flat range");return e.replaceChild(o,s.copy(N(s.content,t-i-1,n-i-1)))}function I(e,t,n,r){var o=e.findIndex(t),i=o.index,s=o.offset,a=e.maybeChild(i);if(s==t||a.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));var l=I(a.content,t-s-1,n);return l&&e.replaceChild(i,a.copy(l))}function D(e,t,n){if(n.openStart>
1e.depth)throw new T("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new T("Inconsistent open depths");return _(e,t,n,0)}function _(e,t,n,r){var o=e.index(r),i=e.node(r);if(o==t.index(r)&&r<e.depth-n.openStart){var s=_(e,t,n,r+1);return i.copy(i.content.replaceChild(o,s))}if(n.content.size){if(n.openStart||n.openEnd||e.depth!=r||t.depth!=r){var a=function(e,t){for(var n=t.depth-e.openStart,r=t.node(n).copy(e.content),o=n-1;o>=0;o--)r=t.node(o).copy(C.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(n,e);return F(i,B(e,a.start,a.end,t,r))}var l=e.parent,c=l.content;return F(l,c.cut(0,e.parentOffset).append(n.content).append(c.cut(t.parentOffset)))}return F(i,j(e,t,r))}function L(e,t){if(!t.type.compatibleContent(e.type))throw new T("Cannot join "+t.type.name+" onto "+e.type.name)}function P(e,t,n){var r=e.node(n);return L(r,t.node(n)),r}function $(e,t){var n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function z(e,t,n,r){var o=(t||e).node(n),i=0,s=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&($(e.nodeAfter,r),i++));for(var a=i;a<s;a++)$(o.child(a),r);t&&t.depth==n&&t.textOffset&&$(t.nodeBefore,r)}function F(e,t){return e.type.checkContent(t),e.copy(t)}function B(e,t,n,r,o){var i=e.depth>o&&P(e,t,o+1),s=r.depth>o&&P(n,r,o+1),a=[];return z(null,e,o,a),i&&s&&t.index(o)==n.index(o)?(L(i,s),$(F(i,B(e,t,n,r,o+1)),a)):(i&&$(F(i,j(e,t,o+1)),a),z(t,n,o,a),s&&$(F(s,j(n,r,o+1)),a)),z(r,null,o,a),new C(a)}function j(e,t,n){var r=[];(z(null,e,n,r),e.depth>n)&&$(F(P(e,t,n+1),j(e,t,n+1)),r);return z(t,null,n,r),new C(r)}R.empty=new R(C.empty,0,0);var H=function(){function e(t,n,r){m(this,e),this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}return v(e,[{key:"resolveDepth",value:function(e){return null==e?this.depth:e<0?this.depth+e:e}},{key:"parent",get:function(){return this.node(this.depth)}},{key:"doc",get:function(){return this.node(0)}},{key:"node",value:function(e){return this.path[3*this.resolveDepth(e)]}},{key:"index",value:function(e){return this.path[3*this.resolveDepth(e)+1]}},{key:"indexAfter",value:function(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}},{key:"start",value:function(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}},{key:"end",value:function(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}},{key:"before",value:function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}},{key:"after",value:function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}},{key:"textOffset",get:function(){return this.pos-this.path[this.path.length-1]}},{key:"nodeAfter",get:function(){var e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;var n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}},{key:"nodeBefore",get:function(){var e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}},{key:"posAtIndex",value:function(e,t){t=this.resolveDepth(t);for(var n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1,o=0;o<e;o++)r+=n.child(o).nodeSize;return r}},{key:"marks",value:function(){var e=this.parent,t=this.index();if(0==e.content.size)return A.none;if(this.textOffset)return e.child(t).marks;var n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){var o=n;n=r,r=o}for(var i=n.marks,s=0;s<i.length;s++)!1!==i[s].type.spec.inclusive||r&&i[s].isInSet(r.marks)||(i=i[s--].removeFromSet(i));return i}},{key:"marksAcross",value:function(e){var t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;for(var n=t.marks,r=e.parent.maybeChild(e.index()),o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].removeFromSet(n));return n}},{key:"sharedDepth",value:function(e){for(var t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}},{key:"blockRange",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this,t=arguments.length>1?arguments[1]:void 0;if(e.pos<this.pos)return e.blockRange(this);for(var n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new q(this,e,n);return null}},{key:"sameParent",value:function(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}},{key:"max",value:function(e){return e.pos>this.pos?e:this}},{key:"min",value:function(e){return e.pos<this.pos?e:this}},{key:"toString",value:function(){for(var e="",t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}}],[{key:"resolve",value:function(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");for(var r=[],o=0,i=n,s=t;;){var a=s.content.findIndex(i),l=a.index,c=a.offset,u=i-c;
1if(r.push(s,l,o+c),!u)break;if((s=s.child(l)).isText)break;i=u-1,o+=c+1}return new e(n,r,i)}},{key:"resolveCached",value:function(t,n){for(var r=0;r<W.length;r++){var o=W[r];if(o.pos==n&&o.doc==t)return o}var i=W[J]=e.resolve(t,n);return J=(J+1)%U,i}}]),e}(),W=[],J=0,U=12,q=function(){function e(t,n,r){m(this,e),this.$from=t,this.$to=n,this.depth=r}return v(e,[{key:"start",get:function(){return this.$from.before(this.depth+1)}},{key:"end",get:function(){return this.$to.after(this.depth+1)}},{key:"parent",get:function(){return this.$from.node(this.depth)}},{key:"startIndex",get:function(){return this.$from.index(this.depth)}},{key:"endIndex",get:function(){return this.$to.indexAfter(this.depth)}}]),e}(),V=Object.create(null),K=function(){function e(t,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:A.none;m(this,e),this.type=t,this.attrs=n,this.marks=o,this.content=r||C.empty}return v(e,[{key:"nodeSize",get:function(){return this.isLeaf?1:2+this.content.size}},{key:"childCount",get:function(){return this.content.childCount}},{key:"child",value:function(e){return this.content.child(e)}},{key:"maybeChild",value:function(e){return this.content.maybeChild(e)}},{key:"forEach",value:function(e){this.content.forEach(e)}},{key:"nodesBetween",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;this.content.nodesBetween(e,t,n,r,this)}},{key:"descendants",value:function(e){this.nodesBetween(0,this.content.size,e)}},{key:"textContent",get:function(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}},{key:"textBetween",value:function(e,t,n,r){return this.content.textBetween(e,t,n,r)}},{key:"firstChild",get:function(){return this.content.firstChild}},{key:"lastChild",get:function(){return this.content.lastChild}},{key:"eq",value:function(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}},{key:"sameMarkup",value:function(e){return this.hasMarkup(e.type,e.attrs,e.marks)}},{key:"hasMarkup",value:function(e,t,n){return this.type==e&&E(this.attrs,t||e.defaultAttrs||V)&&A.sameSet(this.marks,n||A.none)}},{key:"copy",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}},{key:"mark",value:function(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}},{key:"cut",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.content.size;return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}},{key:"slice",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.content.size,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e==t)return R.empty;var r=this.resolve(e),o=this.resolve(t),i=n?0:r.sharedDepth(t),s=r.start(i),a=r.node(i),l=a.content.cut(r.pos-s,o.pos-s);return new R(l,r.depth-i,o.depth-i)}},{key:"replace",value:function(e,t,n){return D(this.resolve(e),this.resolve(t),n)}},{key:"nodeAt",value:function(e){for(var t=this;;){var n=t.content.findIndex(e),r=n.index,o=n.offset;if(!(t=t.maybeChild(r)))return null;if(o==e||t.isText)return t;e-=o+1}}},{key:"childAfter",value:function(e){var t=this.content.findIndex(e),n=t.index,r=t.offset;return{node:this.content.maybeChild(n),index:n,offset:r}}},{key:"childBefore",value:function(e){if(0==e)return{node:null,index:0,offset:0};var t=this.content.findIndex(e),n=t.index,r=t.offset;if(r<e)return{node:this.content.child(n),index:n,offset:r};var o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}}},{key:"resolve",value:function(e){return H.resolveCached(this,e)}},{key:"resolveNoCache",value:function(e){return H.resolve(this,e)}},{key:"rangeHasMark",value:function(e,t,n){var r=!1;return t>e&&this.nodesBetween(e,t,(function(e){return n.isInSet(e.marks)&&(r=!0),!r})),r}},{key:"isBlock",get:function(){return this.type.isBlock}},{key:"isTextblock",get:function(){return this.type.isTextblock}},{key:"inlineContent",get:function(){return this.type.inlineContent}},{key:"isInline",get:function(){return this.type.isInline}},{key:"isText",get:function(){return this.type.isText}},{key:"isLeaf",get:function(){return this.type.isLeaf}},{key:"isAtom",get:function(){return this.type.isAtom}}
1,{key:"toString",value:function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),G(this.marks,e)}},{key:"contentMatchAt",value:function(e){var t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}},{key:"canReplace",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:C.empty,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:n.childCount,i=this.contentMatchAt(e).matchFragment(n,r,o),s=i&&i.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(var a=r;a<o;a++)if(!this.type.allowsMarks(n.child(a).marks))return!1;return!0}},{key:"canReplaceWith",value:function(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;var o=this.contentMatchAt(e).matchType(n),i=o&&o.matchFragment(this.content,t);return!!i&&i.validEnd}},{key:"canAppend",value:function(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}},{key:"check",value:function(){this.type.checkContent(this.content);for(var e=A.none,t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!A.sameSet(e,this.marks))throw new RangeError("Invalid collection of marks for node ".concat(this.type.name,": ").concat(this.marks.map((function(e){return e.type.name}))));this.content.forEach((function(e){return e.check()}))}},{key:"toJSON",value:function(){var e={type:this.type.name};for(var t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map((function(e){return e.toJSON()}))),e}}],[{key:"fromJSON",value:function(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");var n=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}var r=C.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}}]),e}();K.prototype.text=void 0;var Y=function(e){a(n,e);var t=l(n);function n(e,r,o,i){var s;if(m(this,n),s=t.call(this,e,r,null,i),!o)throw new RangeError("Empty text nodes are not allowed");return s.text=o,s}return v(n,[{key:"toString",value:function(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):G(this.marks,JSON.stringify(this.text))}},{key:"textContent",get:function(){return this.text}},{key:"textBetween",value:function(e,t){return this.text.slice(e,t)}},{key:"nodeSize",get:function(){return this.text.length}},{key:"mark",value:function(e){return e==this.marks?this:new n(this.type,this.attrs,this.text,e)}},{key:"withText",value:function(e){return e==this.text?this:new n(this.type,this.attrs,e,this.marks)}},{key:"cut",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.text.length;return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}},{key:"eq",value:function(e){return this.sameMarkup(e)&&this.text==e.text}},{key:"toJSON",value:function(){var e=i(f(n.prototype),"toJSON",this).call(this);return e.text=this.text,e}}]),n}(K);function G(e,t){for(var n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var X=function(){function e(t){m(this,e),this.validEnd=t,this.next=[],this.wrapCache=[]}return v(e,[{key:"matchType",value:function(e){for(var t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}},{key:"matchFragment",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.childCount,r=this,o=t;r&&o<n;o++)r=r.matchType(e.child(o).type);return r}},{key:"inlineContent",get:function(){return 0!=this.next.length&&this.next[0].type.isInline}},{key:"defaultType",get:function(){for(var e=0;e<this.next.length;e++){var t=this.next[e].type;if(!t.isText&&!t.hasRequiredAttrs())return t}return null}},{key:"compatible",value:function(e){for(var t=0;t<this.next.length;t++)for(var n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}},{key:"fillBefore",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=[this];function o(i,s){var a=i.matchFragment(e,n);if(a&&(!t||a.validEnd))return C.from(s.map((function(e){return e.createAndFill()})));for(var l=0;l<i.next.length;l++){var c=i.next[l],u=c.type,h=c.next;if(!u.isText&&!u.hasRequiredAttrs()&&-1==r.indexOf(h)){r.push(h);var p=o(h,s.concat(u));if(p)return p}}return null}return o(this,[])}},{key:"findWrapping",value:function(e){for(var t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];var n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}},{key:"computeWrapping",value:function(e){for(var t=Object.create(null),n=[{match:this,type:null,via:null}];n.length;){var r=n.shift(),o=r.match;if(o.matchType(e)){for(var i=[],s=r;s.type;s=s.via)i.push(s.type);return i.reverse()}for(var a=0;a<o.next.length;a++){var l=o.next[a],c=l.type,u=l.next;c.isLeaf||c.hasRequiredAttrs()||c.name in t||r.type&&!u.validEnd||(n.push({match:c.contentMatch,type:c,via:r}),t[c.name]=!0)}}return null}},{key:"edgeCount",get:function(){return this.next.length}},{key:"edge",value:function(e){if(e>=this.next.length)throw new RangeError("There's no ".concat(e,"th edge in this content match"));return this.next[e]}},{key:"toString",value:function(){var e=[];return function t(n){e.push(n);for(var r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map((function(t,n){for(var r=n+(t.validEnd?"*":" ")+" ",o=0;o<t.next.length;o++)r+=(o?", ":"")+t.next[o].type.name+"->"+e.indexOf(t.next[o].next);return r})).join("\n")}}],[{key:"parse",value:function(t,n){var r=new Z(t,n);if(null==r.next)return e.empty;var o=Q(r);r.next&&r.err("Unexpected trailing text");var i=se(function(e){var t=[[]];return o(i(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){var o={term:r,to:n};return t[e].push(o),o}function o(e,t){e.forEach((function(e){return e.to=t}))}function i(e,t){if("choice"==e.type)return e.exprs.reduce((function(e,n){return e.concat(i(n,t))}),[]);if("seq"!=e.type){if("star"==e.type){var s=n();return r(t,s),o(i(e.expr,s),s),[r(s)]}if("plus"==e.type){var a=n();return o(i(e.expr,t),a),o(i(e.expr,a),a),[r(a)]}if("opt"==e.type)return[r(t)].concat(i(e.expr,t));if("range"==e.type){for(var l=t,c=0;c<e.min;c++){var u=n();o(i(e.expr,l),u),l=u}if(-1==e.max)o(i(e.expr,l),l);else for(var h=e.min;h<e.max;h++){var p=n();r(l,p),o(i(e.expr,l),p),l=p}return[r(l)]}if("name"==e.type)return[r(t,void 0,e.value)];throw new Error("Unknown expr type")}for(var d=0;;d++){var f=i(e.exprs[d],t);if(d==e.exprs.length-1)return f;o(f,t=n())}}}(o));return function(e,t){for(var n=0,r=[e];n<r.length;n++){for(var o=r[n],i=!o.validEnd,s=[],a=0;a<o.next.length;a++){var l=o.next[a],c=l.type,u=l.next;s.push(c.name),!i||c.isText||c.hasRequiredAttrs()||(i=!1),-1==r.indexOf(u)&&r.push(u)}i&&t.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(i,r),i}}]),e}();X.empty=new X(!0);var Z=function(){function e(t,n){m(this,e),this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?
1=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}return v(e,[{key:"next",get:function(){return this.tokens[this.pos]}},{key:"eat",value:function(e){return this.next==e&&(this.pos++||!0)}},{key:"err",value:function(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}]),e}();function Q(e){var t=[];do{t.push(ee(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function ee(e){var t=[];do{t.push(te(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function te(e){for(var t=function(e){if(e.eat("(")){var t=Q(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){var n=function(e,t){var n=e.nodeTypes,r=n[t];if(r)return[r];var o=[];for(var i in n){var s=n[i];s.groups.indexOf(t)>-1&&o.push(s)}0==o.length&&e.err("No node type or group '"+t+"' found");return o}(e,e.next).map((function(t){return null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t}}));return e.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}e.err("Unexpected token '"+e.next+"'")}(e);;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=re(e,t)}return t}function ne(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");var t=Number(e.next);return e.pos++,t}function re(e,t){var n=ne(e),r=n;return e.eat(",")&&(r="}"!=e.next?ne(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function oe(e,t){return t-e}function ie(e,t){var n=[];return function t(r){var o=e[r];if(1==o.length&&!o[0].term)return t(o[0].to);n.push(r);for(var i=0;i<o.length;i++){var s=o[i],a=s.term,l=s.to;a||-1!=n.indexOf(l)||t(l)}}(t),n.sort(oe)}function se(e){var t=Object.create(null);return function n(r){var o=[];r.forEach((function(t){e[t].forEach((function(t){var n=t.term,r=t.to;if(n){for(var i,s=0;s<o.length;s++)o[s][0]==n&&(i=o[s][1]);ie(e,r).forEach((function(e){i||o.push([n,i=[]]),-1==i.indexOf(e)&&i.push(e)}))}}))}));for(var i=t[r.join(",")]=new X(r.indexOf(e.length-1)>-1),s=0;s<o.length;s++){var a=o[s][1].sort(oe);i.next.push({type:o[s][0],next:t[a.join(",")]||n(a)})}return i}(ie(e,0))}function ae(e){var t=Object.create(null);for(var n in e){var r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function le(e,t){var n=Object.create(null);for(var r in e){var o=t&&t[r];if(void 0===o){var i=e[r];if(!i.hasDefault)throw new RangeError("No value supplied for attribute "+r);o=i.default}n[r]=o}return n}function ce(e){var t=Object.create(null);if(e)for(var n in e)t[n]=new he(e[n]);return t}var ue=function(){function e(t,n,r){m(this,e),this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=ce(r.attrs),this.defaultAttrs=ae(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||"text"==t),this.isText="text"==t}return v(e,[{key:"isInline",get:function(){return!this.isBlock}},{key:"isTextblock",get:function(){return this.isBlock&&this.inlineContent}},{key:"isLeaf",get:function(){return this.contentMatch==X.empty}},{key:"isAtom",get:function(){return this.isLeaf||!!this.spec.atom}},{key:"whitespace",get:function(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}},{key:"hasRequiredAttrs",value:function(){for(var e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}},{key:"compatibleContent",value:function(e){return this==e||this.contentMatch.compatible(e.contentMatch)}},{key:"computeAttrs",value:function(e){return!e&&this.defaultAttrs?this.defaultAttrs:le(this.attrs,e)}},{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new K(this,this.computeAttrs(e),C.from(t),A.setFrom(n))}},{key:"createChecked",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;
1return t=C.from(t),this.checkContent(t),new K(this,this.computeAttrs(e),t,A.setFrom(n))}},{key:"createAndFill",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(e=this.computeAttrs(e),(t=C.from(t)).size){var r=this.contentMatch.fillBefore(t);if(!r)return null;t=r.append(t)}var o=this.contentMatch.matchFragment(t),i=o&&o.fillBefore(C.empty,!0);return i?new K(this,e,t.append(i),A.setFrom(n)):null}},{key:"validContent",value:function(e){var t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(var n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0}},{key:"checkContent",value:function(e){if(!this.validContent(e))throw new RangeError("Invalid content for node ".concat(this.name,": ").concat(e.toString().slice(0,50)))}},{key:"allowsMarkType",value:function(e){return null==this.markSet||this.markSet.indexOf(e)>-1}},{key:"allowsMarks",value:function(e){if(null==this.markSet)return!0;for(var t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}},{key:"allowedMarks",value:function(e){if(null==this.markSet)return e;for(var t,n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:A.none:e}}],[{key:"compile",value:function(t,n){var r=Object.create(null);t.forEach((function(t,o){return r[t]=new e(t,n,o)}));var o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(var i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}}]),e}(),he=function(){function e(t){m(this,e),this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}return v(e,[{key:"isRequired",get:function(){return!this.hasDefault}}]),e}(),pe=function(){function e(t,n,r,o){m(this,e),this.name=t,this.rank=n,this.schema=r,this.spec=o,this.attrs=ce(o.attrs),this.excluded=null;var i=ae(this.attrs);this.instance=i?new A(this,i):null}return v(e,[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return!e&&this.instance?this.instance:new A(this,le(this.attrs,e))}},{key:"removeFromSet",value:function(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}},{key:"isInSet",value:function(e){for(var t=0;t<e.length;t++)if(e[t].type==this)return e[t]}},{key:"excludes",value:function(e){return this.excluded.indexOf(e)>-1}}],[{key:"compile",value:function(t,n){var r=Object.create(null),o=0;return t.forEach((function(t,i){return r[t]=new e(t,o++,n,i)})),r}}]),e}(),de=function(){function e(t){m(this,e),this.cached=Object.create(null);var n=this.spec={};for(var r in t)n[r]=t[r];n.nodes=x.default.from(t.nodes),n.marks=x.default.from(t.marks||{}),this.nodes=ue.compile(this.spec.nodes,this),this.marks=pe.compile(this.spec.marks,this);var o=Object.create(null);for(var i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");var s=this.nodes[i],a=s.spec.content||"",l=s.spec.marks;s.contentMatch=o[a]||(o[a]=X.parse(a,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.markSet="_"==l?null:l?fe(this,l.split(" ")):""!=l&&s.inlineContent?null:[]}for(var c in this.marks){var u=this.marks[c],h=u.spec.excludes;u.excluded=null==h?[u]:""==h?[]:fe(this,h.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}return v(e,[{key:"node",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof ue))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)}},{key:"text",value:function(e,t){var n=this.nodes.text;return new Y(n,n.defaultAttrs,e,A.setFrom(t))}},{key:"mark",value:function(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}},{key:"nodeFromJSON",value:function(e){return K.fromJSON(this,e)}},{key:"markFromJSON",value:function(e){return A.fromJSON(this,e)}},{key:"nodeType",value:function(e){var t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}]),e}();function fe(e,t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i=e.marks[o],s=i;if(i)n.push(i);else for(var a in e.marks){var l=e.marks[a];("_"==o||l.spec.group&&l.spec.group.split(" ").indexOf(o)>-1)&&n.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}var me=function(){function e(t,n){var r=this;m(this,e),this.schema=t,this.rules=n,this.tags=[],this.styles=[],n.forEac
1h((function(e){e.tag?r.tags.push(e):e.style&&r.styles.push(e)})),this.normalizeLists=!this.tags.some((function(e){if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;var n=t.nodes[e.node];return n.contentMatch.matchType(n)}))}return v(e,[{key:"parse",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new xe(this,t,!1);return n.addAll(e,t.from,t.to),n.finish()}},{key:"parseSlice",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new xe(this,t,!0);return n.addAll(e,t.from,t.to),R.maxOpen(n.finish())}},{key:"matchTag",value:function(e,t,n){for(var r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){var o=this.tags[r];if(be(e,o.tag)&&(void 0===o.namespace||e.namespaceURI==o.namespace)&&(!o.context||t.matchesContext(o.context))){if(o.getAttrs){var i=o.getAttrs(e);if(!1===i)continue;o.attrs=i||void 0}return o}}}},{key:"matchStyle",value:function(e,t,n,r){for(var o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){var i=this.styles[o],s=i.style;if(!(0!=s.indexOf(e)||i.context&&!n.matchesContext(i.context)||s.length>e.length&&(61!=s.charCodeAt(e.length)||s.slice(e.length+1)!=t))){if(i.getAttrs){var a=i.getAttrs(t);if(!1===a)continue;i.attrs=a||void 0}return i}}}}],[{key:"schemaRules",value:function(e){var t=[];function n(e){for(var n=null==e.priority?50:e.priority,r=0;r<t.length;r++){var o=t[r];if((null==o.priority?50:o.priority)<n)break}t.splice(r,0,e)}var r=function(t){var r=e.marks[t].spec.parseDOM;r&&r.forEach((function(e){n(e=Se(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)}))};for(var o in e.marks)r(o);var i=function(t){var r=e.nodes[t].spec.parseDOM;r&&r.forEach((function(e){n(e=Se(e)),e.node||e.ignore||e.mark||(e.node=t)}))};for(var s in e.nodes)i(s);return t}},{key:"fromSchema",value:function(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}}]),e}(),ge={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},ve={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},ye={ol:!0,ul:!0};function ke(e,t,n){return null!=t?(t?1:0)|("full"===t?2:0):e&&"pre"==e.whitespace?3:-5&n}var we=function(){function e(t,n,r,o,i,s,a){m(this,e),this.type=t,this.attrs=n,this.marks=r,this.pendingMarks=o,this.solid=i,this.options=a,this.content=[],this.activeMarks=A.none,this.stashMarks=[],this.match=s||(4&a?null:t.contentMatch)}return v(e,[{key:"findWrapping",value:function(e){if(!this.match){if(!this.type)return[];var t=this.type.contentMatch.fillBefore(C.from(e));if(!t){var n,r=this.type.contentMatch;return(n=r.findWrapping(e.type))?(this.match=r,n):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)}},{key:"finish",value:function(e){if(!(1&this.options)){var t,n=this.content[this.content.length-1];if(n&&n.isText&&(t=/[ \t\r\n\u000c]+$/.exec(n.text))){var r=n;n.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=r.withText(r.text.slice(0,r.text.length-t[0].length))}}var o=C.from(this.content);return!e&&this.match&&(o=o.append(this.match.fillBefore(C.empty,!0))),this.type?this.type.create(this.attrs,o,this.marks):o}},{key:"popFromStashMark",value:function(e){for(var t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}},{key:"applyPending",value:function(e){for(var t=0,n=this.pendingMarks;t<n.length;t++){var r=n[t];(this.type?this.type.allowsMarkType(r.type):Ce(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}}},{key:"inlineContext",value:function(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!ge.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}]),e}(),xe=function(){function e(t,n,r){m(this,e),this.parser=t,this.options=n,this.isOpen=r,this.open=0;var o,i=n.topNode,s=ke(null,n.preserveWhitespace,0)|(r?4:0);o=i?new we(i.type,i.attrs,A.none,A.none,!0,n.topMatch||i.type.contentMatch,s):new we(r?null:t.schema.topNodeType,null,A.none,A.none,!0,null,s),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}return v(e,[{key:"top",get:function(){return this.nodes[this.open]}},{key:"addDOM",value:function(e){3==e.nodeType?this.addTextNode(e):1==e.nodeType&&this.addElement(e)}},{key:"withStyleRules",value:function(e,t){var n=e.getAttribute("style");if(!n)return t();var o=this.readStyles(function(e){var t,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;t=n.exec(e);)r.push(t[1],t[2].trim());return r}(n));if(o){for(var i=r(o,2),s=i[0],a=i[1],l=this.top,c=0;c<a.length;c++)this.removePendingMark(a[c],l);for(var u=0;u<s.length;u++)this.addPendingMark(s[u]);t();for(var h=0;h<s.length;h++)this.removePendingMark(s[h],l);for(var p=0;p<a.length;p++)this.addPendingMark(a[p])}}},{key:"addTextNode",value:function(e){var t=e.nodeValue,n=this.top;if(2&n.options||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(1&n.options)t=2&n.options?t.replace(/\r\n?/g,"\n"):t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){var r=n.content[n.content.length-1],o=e.previousSibling;(!r||o&&"BR"==o.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}},{key:"addElement",value:function(e,t){var n,r=this,o=e.nodeName.toLowerCase();ye.hasOwnProperty(o)&&this.parser.normalizeLists&&function(e){for(var t=e.firstChild,n=null;t;t=t.nextSibling){var r=1==t.nodeType?t.nodeName.toLowerCase():null;r&&ye.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):"li"==r?n=t:r&&(n=null)}}(e);var i=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(n=this.parser.matchTag(e,this,t));if(i?i.ignore:ve.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e);else if(!i||i.skip||i.closeParent){i&&i.closeParent?this.open=Math.max(0,this.open-1):i&&i.skip.nodeType&&(e=i.skip);var s,a=this.top,l=this.needsBlock;if(ge.hasOwnProperty(o))a.content.length&&a.content[0].isInline&&this.open&&(this.open--,a=this.top),s=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild)return void this.leafFallback(e);i&&i.skip?this.addAll(e):this.withStyleRules(e,(function(){return r.addAll(e)})),s&&this.sync(a),this.needsBlock=l}else this.withStyleRules(e,(function(){r.addElementByRule(e,i,!1===i.consuming?n:void 0)}))}},{key:"leafFallback",value:function(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"))}},{key:"ignoreFallback",value:function(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}},{key:"readStyles",value:function(e){for(var t=this,n=A.none,r=A.none,o=0;o<e.length;o+=2)for(var i=function(i){var a=t.parser.matchStyle(e[o],e[o+1],t,i);return a?a.ignore?(s=i,{v:null}):(a.clearMark?t.top.pendingMarks.concat(t.top.activeMarks).forEac
1h((function(e){a.clearMark(e)&&(r=e.addToSet(r))})):n=t.parser.schema.marks[a.mark].create(a.attrs).addToSet(n),!1!==a.consuming?(s=i,"break"):void(s=i=a)):(s=i,"break")},s=void 0;;){var a=i(s);if("break"===a)break;if("object"===y(a))return a.v}return[n,r]}},{key:"addElementByRule",value:function(e,t,n){var r,o,i,s=this;t.node?(o=this.parser.schema.nodes[t.node]).isLeaf?this.insertNode(o.create(t.attrs))||this.leafFallback(e):r=this.enter(o,t.attrs||null,t.preserveWhitespace):(i=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(i));var a=this.top;if(o&&o.isLeaf)this.findInside(e);else if(n)this.addElement(e,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((function(e){return s.insertNode(e)}));else{var l=e;"string"==typeof t.contentElement?l=e.querySelector(t.contentElement):"function"==typeof t.contentElement?l=t.contentElement(e):t.contentElement&&(l=t.contentElement),this.findAround(e,l,!0),this.addAll(l)}r&&this.sync(a)&&this.open--,i&&this.removePendingMark(i,a)}},{key:"addAll",value:function(e,t,n){for(var r=t||0,o=t?e.childNodes[t]:e.firstChild,i=null==n?null:e.childNodes[n];o!=i;o=o.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(o);this.findAtPoint(e,r)}},{key:"findPlace",value:function(e){for(var t,n,r=this.open;r>=0;r--){var o=this.nodes[r],i=o.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,n=o,!i.length))break;if(o.solid)break}if(!t)return!1;this.sync(n);for(var s=0;s<t.length;s++)this.enterInner(t[s],null,!1);return!0}},{key:"insertNode",value:function(e){if(e.isInline&&this.needsBlock&&!this.top.type){var t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(e)){this.closeExtra();var n=this.top;n.applyPending(e.type),n.match&&(n.match=n.match.matchType(e.type));for(var r=n.activeMarks,o=0;o<e.marks.length;o++)n.type&&!n.type.allowsMarkType(e.marks[o].type)||(r=e.marks[o].addToSet(r));return n.content.push(e.mark(r)),!0}return!1}},{key:"enter",value:function(e,t,n){var r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r}},{key:"enterInner",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;this.closeExtra();var o=this.top;o.applyPending(e),o.match=o.match&&o.match.matchType(e);var i=ke(e,r,o.options);4&o.options&&0==o.content.length&&(i|=4),this.nodes.push(new we(e,t,o.activeMarks,o.pendingMarks,n,null,i)),this.open++}},{key:"closeExtra",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}},{key:"finish",value:function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}},{key:"sync",value:function(e){for(var t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}},{key:"currentPos",get:function(){this.closeExtra();for(var e=0,t=this.open;t>=0;t--){for(var n=this.nodes[t].content,r=n.length-1;r>=0;r--)e+=n[r].nodeSize;t&&e++}return e}},{key:"findAtPoint",value:function(e,t){if(this.find)for(var n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}},{key:"findInside",value:function(e){if(this.find)for(var t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}},{key:"findAround",value:function(e,t,n){if(e!=t&&this.find)for(var r=0;r<this.find.length;r++){if(null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node))t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}}},{key:"findInText",value:function(e){if(this.find)for(var t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}},{key:"matchesContext",value:function(e){var t=this;if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);var n=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1);return function e(s,a){for(;s>=0;s--){var l=n[s];if(""==l){if(s==n.length-1||0==s)continue;for(;a>=i;a--)if(e(s-1,a))return!0;return!1}var c=a>0||0==a&&o?t.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!c||c.name!=l&&-1==c.groups.indexOf(l))return!1;a--}return!0}(n.length-1,this.open)}},{key:"textblockFromContext",value:function(){var e=this.options.context;if(e)for(var t=e.depth;t>=0;t--){var n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;
1if(n&&n.isTextblock&&n.defaultAttrs)return n}for(var r in this.parser.schema.nodes){var o=this.parser.schema.nodes[r];if(o.isTextblock&&o.defaultAttrs)return o}}},{key:"addPendingMark",value:function(e){var t=function(e,t){for(var n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}},{key:"removePendingMark",value:function(e,t){for(var n=this.open;n>=0;n--){var r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);var o=r.popFromStashMark(e);o&&r.type&&r.type.allowsMarkType(o.type)&&(r.activeMarks=o.addToSet(r.activeMarks))}if(r==t)break}}}]),e}();function be(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function Se(e){var t={};for(var n in e)t[n]=e[n];return t}function Ce(e,t){var n=t.schema.nodes,r=function(r){var o=n[r];if(!o.allowsMarkType(e))return"continue";var i=[];return function e(n){i.push(n);for(var r=0;r<n.edgeCount;r++){var o=n.edge(r),s=o.type,a=o.next;if(s==t)return!0;if(i.indexOf(a)<0&&e(a))return!0}}(o.contentMatch)?{v:!0}:void 0};for(var o in n){var i=r(o);if("continue"!==i&&"object"===y(i))return i.v}}var Me=function(){function e(t,n){m(this,e),this.nodes=t,this.marks=n}return v(e,[{key:"serializeFragment",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;r||(r=Ee(n).createDocumentFragment());var o=r,i=[];return e.forEach((function(e){if(i.length||e.marks.length){for(var r=0,s=0;r<i.length&&s<e.marks.length;){var a=e.marks[s];if(t.marks[a.type.name]){if(!a.eq(i[r][0])||!1===a.type.spec.spanning)break;r++,s++}else s++}for(;r<i.length;)o=i.pop()[1];for(;s<e.marks.length;){var l=e.marks[s++],c=t.serializeMark(l,e.isInline,n);c&&(i.push([l,o]),o.appendChild(c.dom),o=c.contentDOM||c.dom)}}o.appendChild(t.serializeNodeInner(e,n))})),r}},{key:"serializeNodeInner",value:function(t,n){var r=e.renderSpec(Ee(n),this.nodes[t.type.name](t)),o=r.dom,i=r.contentDOM;if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,i)}return o}},{key:"serializeNode",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.serializeNodeInner(e,t),r=e.marks.length-1;r>=0;r--){var o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n}},{key:"serializeMark",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=this.marks[t.type.name];return o&&e.renderSpec(Ee(r),o(t,n))}}],[{key:"renderSpec",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("string"==typeof n)return{dom:t.createTextNode(n)};if(null!=n.nodeType)return{dom:n};if(n.dom&&null!=n.dom.nodeType)return n;var o,i=n[0],s=i.indexOf(" ");s>0&&(r=i.slice(0,s),i=i.slice(s+1));var a=r?t.createElementNS(r,i):t.createElement(i),l=n[1],c=1;if(l&&"object"==y(l)&&null==l.nodeType&&!Array.isArray(l))for(var u in c=2,l)if(null!=l[u]){var h=u.indexOf(" ");h>0?a.setAttributeNS(u.slice(0,h),u.slice(h+1),l[u]):a.setAttribute(u,l[u])}for(var p=c;p<n.length;p++){var d=n[p];if(0===d){if(p<n.length-1||p>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}var f=e.renderSpec(t,d,r),m=f.dom,g=f.contentDOM;if(a.appendChild(m),g){if(o)throw new RangeError("Multiple content holes");o=g}}return{dom:a,contentDOM:o}}},{key:"fromSchema",value:function(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}},{key:"nodesFromSchema",value:function(e){var t=Oe(e.nodes);return t.text||(t.text=function(e){return e.text}),t}},{key:"marksFromSchema",value:function(e){return Oe(e.marks)}}]),e}();function Oe(e){var t={};for(var n in e){var r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Ee(e){return e.document||window.document}
1t.ContentMatch=X,t.DOMParser=me,t.DOMSerializer=Me,t.Fragment=C,t.Mark=A,t.MarkType=pe,t.Node=K,t.NodeRange=q,t.NodeType=ue,t.ReplaceError=T,t.ResolvedPos=H,t.Schema=de,t.Slice=R},42391:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(){return o="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=i(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},o.apply(this,arguments)}function i(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=u(e)););return e}function s(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}function a(e,t){return a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(e,t)}function l(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=u(e);if(t){var o=u(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===r(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}Object.defineProperty(t,"__esModule",{value:!0});var f=n(19443),m=n(77587),g=Object.create(null),v=function(){function e(t,n,r){h(this,e),this.$anchor=t,this.$head=n,this.ranges=r||[new y(t.min(n),t.max(n))]}return d(e,[{key:"anchor",get:function(){return this.$anchor.pos}},{key:"head",get:function(){return this.$head.pos}},{key:"from",get:function(){return this.$from.pos}},{key:"to",get:function(){return this.$to.pos}},{key:"$from",get:function(){return this.ranges[0].$from}},{key:"$to",get:function(){return this.ranges[0].$to}},{key:"empty",get:function(){for(var e=this.ranges,t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}},{key:"content",value:function(){return this.$from.doc.slice(this.from,this.to,!0)}},{key:"replace",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.Slice.empty,n=t.content.lastChild,r=null,o=0;o<t.openEnd;o++)r=n,n=n.lastChild;for(var i=e.steps.length,s=this.ranges,a=0;a<s.length;a++){var l=s[a],c=l.$from,u=l.$to,h=e.mapping.slice(i);e.replaceRange(h.map(c.pos),h.map(u.pos),a?f.Slice.empty:t),0==a&&A(e,i,(n?n.isInline:r&&r.isTextblock)?-1:1)}}},{key:"replaceWith",value:function(e,t){for(var n=e.steps.length,r=this.ranges,o=0;o<r.length;o++){var i=r[o],s=i.$from,a=i.$to,l=e.mapping.slice(n),c=l.map(s.pos),u=l.map(a.pos);o?e.deleteRange(c,u):(e.replaceRangeWith(c,u,t),A(e,n,t.isInline?-1:1))}}},{key:"getBookmark",value:function(){return x.between(this.$anchor,this.$head).getBookmark()}}],[{key:"findFrom",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.parent.inlineContent?new x(e):E(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(var o=e.depth-1;o>=0;o--){var i=t<0?E(e.node(0),e.node(o),e.before(o+1),e.index(o),t,n):E(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,n);if(i)return i}return null}},{key:"near",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.findFrom(e,t)||this.findFrom(e,-t)||new M(e.node(0))}},{key:"atStart",value:function(e){return E(e,e,0,0,1)||new M(e)}},{key:"atEnd",value:function(e){return E(e,e,e.content.size,e.childCount,-1)||new M(e)}},{key:"fromJSON",value:function(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=g[t.type];if(!n)throw new RangeError("No selection type ".concat(t.type," defined"));return n.fromJSON(e,t)}},{key:"jsonID",value:function(e,t){if(e in g)throw new RangeError("Duplicate use of selection JSON ID "+e);return g[e]=t,t.prototype.jsonID=e,t}}]),e}();v.prototype.visible=!0;var y=d((function e(t,n){h(this,e),this.$from=t,this.$to=n})),k=!1;function w(e){k||e.parent.inlineContent||(k=!0,console.warn("TextSelection endpoint not pointing into a 
1node with inline content ("+e.parent.type.name+")"))}var x=function(e){s(n,e);var t=l(n);function n(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return h(this,n),w(e),w(r),t.call(this,e,r)}return d(n,[{key:"$cursor",get:function(){return this.$anchor.pos==this.$head.pos?this.$head:null}},{key:"map",value:function(e,t){var r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return v.near(r);var o=e.resolve(t.map(this.anchor));return new n(o.parent.inlineContent?o:r,r)}},{key:"replace",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.Slice.empty;if(o(u(n.prototype),"replace",this).call(this,e,t),t==f.Slice.empty){var r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}},{key:"eq",value:function(e){return e instanceof n&&e.anchor==this.anchor&&e.head==this.head}},{key:"getBookmark",value:function(){return new b(this.anchor,this.head)}},{key:"toJSON",value:function(){return{type:"text",anchor:this.anchor,head:this.head}}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new n(e.resolve(t.anchor),e.resolve(t.head))}},{key:"create",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}},{key:"between",value:function(e,t,r){var o=e.pos-t.pos;if(r&&!o||(r=o>=0?1:-1),!t.parent.inlineContent){var i=v.findFrom(t,r,!0)||v.findFrom(t,-r,!0);if(!i)return v.near(t,r);t=i.$head}return e.parent.inlineContent||(0==o||(e=(v.findFrom(e,-r,!0)||v.findFrom(e,r,!0)).$anchor).pos<t.pos!=o<0)&&(e=t),new n(e,t)}}]),n}(v);v.jsonID("text",x);var b=function(){function e(t,n){h(this,e),this.anchor=t,this.head=n}return d(e,[{key:"map",value:function(t){return new e(t.map(this.anchor),t.map(this.head))}},{key:"resolve",value:function(e){return x.between(e.resolve(this.anchor),e.resolve(this.head))}}]),e}(),S=function(e){s(n,e);var t=l(n);function n(e){var r;h(this,n);var o=e.nodeAfter,i=e.node(0).resolve(e.pos+o.nodeSize);return(r=t.call(this,e,i)).node=o,r}return d(n,[{key:"map",value:function(e,t){var r=t.mapResult(this.anchor),o=r.deleted,i=r.pos,s=e.resolve(i);return o?v.near(s):new n(s)}},{key:"content",value:function(){return new f.Slice(f.Fragment.from(this.node),0,0)}},{key:"eq",value:function(e){return e instanceof n&&e.anchor==this.anchor}},{key:"toJSON",value:function(){return{type:"node",anchor:this.anchor}}},{key:"getBookmark",value:function(){return new C(this.anchor)}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new n(e.resolve(t.anchor))}},{key:"create",value:function(e,t){return new n(e.resolve(t))}},{key:"isSelectable",value:function(e){return!e.isText&&!1!==e.type.spec.selectable}}]),n}(v);S.prototype.visible=!1,v.jsonID("node",S);var C=function(){function e(t){h(this,e),this.anchor=t}return d(e,[{key:"map",value:function(t){var n=t.mapResult(this.anchor),r=n.deleted,o=n.pos;return r?new b(o,o):new e(o)}},{key:"resolve",value:function(e){var t=e.resolve(this.anchor),n=t.nodeAfter;return n&&S.isSelectable(n)?new S(t):v.near(t)}}]),e}(),M=function(e){s(n,e);var t=l(n);function n(e){return h(this,n),t.call(this,e.resolve(0),e.resolve(e.content.size))}return d(n,[{key:"replace",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.Slice.empty;if(t==f.Slice.empty){e.delete(0,e.doc.content.size);var r=v.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else o(u(n.prototype),"replace",this).call(this,e,t)}},{key:"toJSON",value:function(){return{type:"all"}}},{key:"map",value:function(e){return new n(e)}},{key:"eq",value:function(e){return e instanceof n}},{key:"getBookmark",value:function(){return O}}],[{key:"fromJSON",value:function(e){return new n(e)}}]),n}(v);v.jsonID("all",M);var O={map:function(){return this},resolve:function(e){return new M(e)}};function E(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(t.inlineContent)return x.create(e,n);for(var s=r-(o>0?0:1);o>0?s<t.childCount:s>=0;s+=o){var a=t.child(s);if(a.isAtom){if(!i&&S.isSelectable(a))return S.create(e,n-(o<0?a.nodeSize:0))}else{var l=E(e,a,n+o,o<0?a.childCount:0,o,i);if(l)return l}n+=a.nodeSize*o}return null}function A(e,t,n){var r=e.steps.length-1;if(!(r<t)){var o,i=e.steps[r];if(i instanceof m.ReplaceStep||i instanceof m.ReplaceAroundStep)e.mapping.maps[r].forEach((function(e,t,n,r){null==o&&(o=r)})),e.setSelection(v.near(e.doc.resolve(o),n))}}var T=function(e){s(n,e);var t=l(n);function n(e){var r;return h(this,n),(r=t.call(this,e.doc)).curSelectionFor=0,r.updated=0,r.meta=Object.create(null),r.time=Date.now(),r.curSelection=e.selection,r.storedMarks=e.storedMarks,r}return d(n,[{key:"selection",get:function(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}},{key:"setSelection",value:function(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this}},{key:"selectionSet",get:function(){return(1&this.updated)>0}},{key:"setStoredMarks",value:function(e){return this.storedMarks=e,this.updated|=2,this}},{key:"ensureMarks",value:function(e){return f.Mark.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}},{key:"addStoredMark",value:function(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}},{key:"removeStoredMark",value:function(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}},{key:"storedMarksSet",get:function(){return(2&this.updated)>0}},{key:"addStep",value:function(e,t){o(u(n.prototype),"addStep",this).call(this,e,t),this.updated=-3&this.updated,this.storedMarks=null}},{key:"setTime",value:function(e){return this.time=e,this}},{key:"replaceSelection",value:function(e){return this.selection.replace(this,e),this}},{key:"replaceSelectionWith",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||f.Mar
1k.none))),n.replaceWith(this,e),this}},{key:"deleteSelection",value:function(){return this.selection.replace(this),this}},{key:"insertText",value:function(e,t,n){var r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();if(null==n&&(n=t),n=null==n?t:n,!e)return this.deleteRange(t,n);var o=this.storedMarks;if(!o){var i=this.doc.resolve(t);o=n==t?i.marks():i.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,o)),this.selection.empty||this.setSelection(v.near(this.selection.$to)),this}},{key:"setMeta",value:function(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}},{key:"getMeta",value:function(e){return this.meta["string"==typeof e?e:e.key]}},{key:"isGeneric",get:function(){for(var e in this.meta)return!1;return!0}},{key:"scrollIntoView",value:function(){return this.updated|=4,this}},{key:"scrolledIntoView",get:function(){return(4&this.updated)>0}}]),n}(m.Transform);function R(e,t){return t&&e?e.bind(t):e}var N=d((function e(t,n,r){h(this,e),this.name=t,this.init=R(n.init,r),this.apply=R(n.apply,r)})),I=[new N("doc",{init:function(e){return e.doc||e.schema.topNodeType.createAndFill()},apply:function(e){return e.doc}}),new N("selection",{init:function(e,t){return e.selection||v.atStart(t.doc)},apply:function(e){return e.selection}}),new N("storedMarks",{init:function(e){return e.storedMarks||null},apply:function(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new N("scrollToSelection",{init:function(){return 0},apply:function(e,t){return e.scrolledIntoView?t+1:t}})],D=d((function e(t,n){var r=this;h(this,e),this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=I.slice(),n&&n.forEach((function(e){if(r.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");r.plugins.push(e),r.pluginsByKey[e.key]=e,e.spec.state&&r.fields.push(new N(e.key,e.spec.state,e))}))})),_=function(){function e(t){h(this,e),this.config=t}return d(e,[{key:"schema",get:function(){return this.config.schema}},{key:"plugins",get:function(){return this.config.plugins}},{key:"apply",value:function(e){return this.applyTransaction(e).state}},{key:"filterTransaction",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=0;n<this.config.plugins.length;n++)if(n!=t){var r=this.config.plugins[n];if(r.spec.filterTransaction&&!r.spec.filterTransaction.call(r,e,this))return!1}return!0}},{key:"applyTransaction",value:function(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};for(var t=[e],n=this.applyInner(e),r=null;;){for(var o=!1,i=0;i<this.config.plugins.length;i++){var s=this.config.plugins[i];if(s.spec.appendTransaction){var a=r?r[i].n:0,l=r?r[i].state:this,c=a<t.length&&s.spec.appendTransaction.call(s,a?t.slice(a):t,l,n);if(c&&n.filterTransaction(c,i)){if(c.setMeta("appendedTransaction",e),!r){r=[];for(var u=0;u<this.config.plugins.length;u++)r.push(u<i?{state:n,n:t.length}:{state:this,n:0})}t.push(c),n=n.applyInner(c),o=!0}r&&(r[i]={state:n,n:t.length})}}if(!o)return{state:n,transactions:t}}}},{key:"applyInner",value:function(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");for(var n=new e(this.config),r=this.config.fields,o=0;o<r.length;o++){var i=r[o];n[i.name]=i.apply(t,this[i.name],this,n)}return n}},{key:"tr",get:function(){return new T(this)}},{key:"reconfigure",value:function(t){for(var n=new D(this.schema,t.plugins),r=n.fields,o=new e(n),i=0;i<r.length;i++){var s=r[i].name;o[s]=this.hasOwnProperty(s)?this[s]:r[i].init(t,o)}return o}},{key:"toJSON",value:function(e){var t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map((function(e){return e.toJSON()}))),e&&"object"==r(e))for(var n in e){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");var o=e[n],i=o.spec.state;i&&i.toJSON&&(t[n]=i.toJSON.call(o,this[o.key]))}return t}}],[{key:"create",value:function(t){for(var n=new D(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new e(n),o=0;o<n.fields.length;o++)r[n.fields[o].name]=n.fields[o].init(t,r);return r}},{key:"fromJSON",value:function(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");var o=new D(t.schema,t.plugins),i=new e(o);return o.fields.forEach((function(e){if("doc"==e.name)i.doc=f.Node.fromJSON(t.schema,n.doc);else if("selection"==e.name)i.selection=v.fromJSON(i.doc,n.selection);else if("storedMarks"==e.name)n.storedMarks&&(i.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(var o in r){var s=r[o],a=s.spec.state;if(s.key==e.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(n,o))return void(i[e.name]=a.fromJSON.call(s,t,n[o],i)
1)}i[e.name]=e.init(t,i)}})),i}}]),e}();function L(e,t,n){for(var r in e){var o=e[r];o instanceof Function?o=o.bind(t):"handleDOMEvents"==r&&(o=L(o,t,{})),n[r]=o}return n}var P=function(){function e(t){h(this,e),this.spec=t,this.props={},t.props&&L(t.props,this,this.props),this.key=t.key?t.key.key:z("plugin")}return d(e,[{key:"getState",value:function(e){return e[this.key]}}]),e}(),$=Object.create(null);function z(e){return e in $?e+"$"+ ++$[e]:($[e]=0,e+"$")}var F=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"key";h(this,e),this.key=z(t)}return d(e,[{key:"get",value:function(e){return e.config.pluginsByKey[this.key]}},{key:"getState",value:function(e){return e[this.key]}}]),e}();t.AllSelection=M,t.EditorState=_,t.NodeSelection=S,t.Plugin=P,t.PluginKey=F,t.Selection=v,t.SelectionRange=y,t.TextSelection=x,t.Transaction=T},31640:function(e,t,n){"use strict";var r,o=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l={};((e,t)=>{for(var n in t)o(e,n,{get:t[n],enumerable:!0})})(l,{CellBookmark:()=>L,CellSelection:()=>_,ResizeState:()=>fe,TableMap:()=>m,TableView:()=>ue,__clipCells:()=>V,__insertCells:()=>G,__pastedCells:()=>U,addColSpan:()=>I,addColumn:()=>be,addColumnAfter:()=>Ce,addColumnBefore:()=>Se,addRow:()=>Ae,addRowAfter:()=>Re,addRowBefore:()=>Te,cellAround:()=>b,colCount:()=>T,columnIsHeader:()=>D,columnResizing:()=>de,columnResizingPluginKey:()=>pe,deleteColumn:()=>Oe,deleteRow:()=>Ie,deleteTable:()=>Je,findCell:()=>A,fixTables:()=>F,fixTablesKey:()=>$,goToNextCell:()=>We,handlePaste:()=>re,inSameTable:()=>E,isInTable:()=>S,mergeCells:()=>_e,moveCellForward:()=>O,nextCell:()=>R,pointsAtCell:()=>M,removeColSpan:()=>N,removeColumn:()=>Me,removeRow:()=>Ne,rowIsHeader:()=>Ee,selectedRect:()=>xe,selectionCell:()=>C,setCellAttr:()=>$e,splitCell:()=>Le,splitCellWithType:()=>Pe,tableEditing:()=>Ue,tableEditingKey:()=>x,tableNodeTypes:()=>w,tableNodes:()=>k,toggleHeader:()=>Fe,toggleHeaderCell:()=>He,toggleHeaderColumn:()=>je,toggleHeaderRow:()=>Be,updateColumnsOnResize:()=>he}),e.exports=(r=l,((e,t,n,r)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let l of s(t))a.call(e,l)||l===n||o(e,l,{get:()=>t[l],enumerable:!(r=i(t,l))||r.enumerable});return e})(o({},"__esModule",{value:!0}),r));var c,u,h=n(42391),p=n(19443),d=n(42391),f=n(9222);if("undefined"!=typeof WeakMap){let e=new WeakMap;c=t=>e.get(t),u=(t,n)=>(e.set(t,n),n)}else{const e=[],t=10;let n=0;c=t=>{for(let n=0;n<e.length;n+=2)if(e[n]==t)return e[n+1]},u=(r,o)=>(n==t&&(n=0),e[n++]=r,e[n++]=o)}var m=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){const n=this.map[t];if(n!=e)continue;const r=t%this.width,o=t/this.width|0;let i=r+1,s=o+1;for(let e=1;i<this.width&&this.map[t+e]==n;e++)i++;for(let e=1;s<this.height&&this.map[t+this.width*e]==n;e++)s++;return{left:r,top:o,right:i,bottom:s}}throw new RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){const{left:r,right:o,top:i,bottom:s}=this.findCell(e);return"horiz"==t?(n<0?0==r:o==this.width)?null:this.map[i*this.width+(n<0?r-1:o)]:(n<0?0==i:s==this.height)?null:this.map[r+this.width*(n<0?i-1:s)]}rectBetween(e,t){const{left:n,right:r,top:o,bottom:i}=this.findCell(e),{left:s,right:a,top:l,bottom:c}=this.findCell(t);return{left:Math.min(n,s),top:Math.min(o,l),right:Math.max(r,a),bottom:Math.max(i,c)}}cellsInRect(e){const t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let o=e.left;o<e.right;o++){const i=r*this.width+o,s=this.map[i];n[s]||(n[s]=!0,o==e.left&&o&&this.map[i-1]==s||r==e.top&&r&&this.map[i-this.width]==s||t.push(s))}return t}positionAt(e,t,n){for(let r=0,o=0;;r++){const i=o+n.child(r).nodeSize;if(r==e){let n=t+e*this.width;const r=(e+1)*this.width;for(;n<r&&this.map[n]<o;)n++;return n==r?i-1:this.map[n]}o=i}}static get(e){return c(e)||u(e,function(e){if("table"!=e.type.spec.tableRole)throw new RangeError("Not a table node: "+e.type.n
1ame);const t=function(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){const o=e.child(r);let i=0;if(n)for(let t=0;t<r;t++){const n=e.child(t);for(let e=0;e<n.childCount;e++){const o=n.child(e);t+o.attrs.rowspan>r&&(i+=o.attrs.colspan)}}for(let e=0;e<o.childCount;e++){const t=o.child(e);i+=t.attrs.colspan,t.attrs.rowspan>1&&(n=!0)}-1==t?t=i:t!=i&&(t=Math.max(t,i))}return t}(e),n=e.childCount,r=[];let o=0,i=null;const s=[];for(let c=0,u=t*n;c<u;c++)r[c]=0;for(let c=0,u=0;c<n;c++){const a=e.child(c);u++;for(let e=0;;e++){for(;o<r.length&&0!=r[o];)o++;if(e==a.childCount)break;const l=a.child(e),{colspan:h,rowspan:p,colwidth:d}=l.attrs;for(let e=0;e<p;e++){if(e+c>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:u,n:p-e});break}const a=o+e*t;for(let e=0;e<h;e++){0==r[a+e]?r[a+e]=u:(i||(i=[])).push({type:"collision",row:c,pos:u,n:h-e});const n=d&&d[e];if(n){const r=(a+e)%t*2,o=s[r];null==o||o!=n&&1==s[r+1]?(s[r]=n,s[r+1]=1):o==n&&s[r+1]++}}}o+=h,u+=l.nodeSize}const l=(c+1)*t;let h=0;for(;o<l;)0==r[o++]&&h++;h&&(i||(i=[])).push({type:"missing",row:c,n:h}),u++}const a=new m(t,n,r,i);let l=!1;for(let c=0;!l&&c<s.length;c+=2)null!=s[c]&&s[c+1]<n&&(l=!0);l&&function(e,t,n){e.problems||(e.problems=[]);const r={};for(let o=0;o<e.map.length;o++){const i=e.map[o];if(r[i])continue;r[i]=!0;const s=n.nodeAt(i);if(!s)throw new RangeError(`No cell with offset ${i} found`);let a=null;const l=s.attrs;for(let n=0;n<l.colspan;n++){const r=t[2*((o+n)%e.width)];null==r||l.colwidth&&l.colwidth[n]==r||((a||(a=g(l)))[n]=r)}a&&e.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:a})}}(a,s,e);return a}(e))}};function g(e){if(e.colwidth)return e.colwidth.slice();const t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function v(e,t){if("string"===typeof e)return{};const n=e.getAttribute("data-colwidth"),r=n&&/^\d+(,\d+)*$/.test(n)?n.split(",").map((e=>Number(e))):null,o=Number(e.getAttribute("colspan")||1),i={colspan:o,rowspan:Number(e.getAttribute("rowspan")||1),colwidth:r&&r.length==o?r:null};for(const s in t){const n=t[s].getFromDOM,r=n&&n(e);null!=r&&(i[s]=r)}return i}function y(e,t){const n={};1!=e.attrs.colspan&&(n.colspan=e.attrs.colspan),1!=e.attrs.rowspan&&(n.rowspan=e.attrs.rowspan),e.attrs.colwidth&&(n["data-colwidth"]=e.attrs.colwidth.join(","));for(const r in t){const o=t[r].setDOMAttr;o&&o(e.attrs[r],n)}return n}function k(e){const t=e.cellAttributes||{},n={colspan:{default:1},rowspan:{default:1},colwidth:{default:null}};for(const r in t)n[r]={default:t[r].default};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:e.tableGroup,parseDOM:[{tag:"table"}],toDOM:()=>["table",["tbody",0]]},table_row:{content:"(table_cell | table_header)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM:()=>["tr",0]},table_cell:{content:e.cellContent,attrs:n,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:e=>v(e,t)}],toDOM:e=>["td",y(e,t),0]},table_header:{content:e.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:e=>v(e,t)}],toDOM:e=>["th",y(e,t),0]}}}function w(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(const n in e.nodes){const r=e.nodes[n],o=r.spec.tableRole;o&&(t[o]=r)}}return t}var x=new(n(42391).PluginKey)("selectingCells");function b(e){for(let t=e.depth-1;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return e.node(0).resolve(e.before(t+1));return null}function S(e){const t=e.selection.$head;for(let n=t.depth;n>0;n--)if("row"==t.node(n).type.spec.tableRole)return!0;return!1}function C(e){const t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&"cell"==t.node.type.spec.tableRole)return t.$anchor;const n=b(t.$head)||function(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){const r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){const r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n-t.nodeSize)}}(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function M(e){return"row"==e.parent.type.spec.tableRole&&!!e.nodeAfter}
1function O(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function E(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function A(e){return m.get(e.node(-1)).findCell(e.pos-e.start(-1))}function T(e){return m.get(e.node(-1)).colCount(e.pos-e.start(-1))}function R(e,t,n){const r=e.node(-1),o=m.get(r),i=e.start(-1),s=o.nextCell(e.pos-i,t,n);return null==s?null:e.node(0).resolve(i+s)}function N(e,t,n=1){const r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some((e=>e>0))||(r.colwidth=null)),r}function I(e,t,n=1){const r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let e=0;e<n;e++)r.colwidth.splice(t,0,0)}return r}function D(e,t,n){const r=w(t.type.schema).header_cell;for(let o=0;o<e.height;o++)if(t.nodeAt(e.map[n+o*e.width]).type!=r)return!1;return!0}var _=class extends d.Selection{constructor(e,t=e){const n=e.node(-1),r=m.get(n),o=e.start(-1),i=r.rectBetween(e.pos-o,t.pos-o),s=e.node(0),a=r.cellsInRect(i).filter((e=>e!=t.pos-o));a.unshift(t.pos-o);const l=a.map((e=>{const t=n.nodeAt(e);if(!t)throw RangeError(`No cell with offset ${e} found`);const r=o+e+1;return new d.SelectionRange(s.resolve(r),s.resolve(r+t.content.size))}));super(l[0].$from,l[0].$to,l),this.$anchorCell=e,this.$headCell=t}map(e,t){const n=e.resolve(t.map(this.$anchorCell.pos)),r=e.resolve(t.map(this.$headCell.pos));if(M(n)&&M(r)&&E(n,r)){const e=this.$anchorCell.node(-1)!=n.node(-1);return e&&this.isRowSelection()?_.rowSelection(n,r):e&&this.isColSelection()?_.colSelection(n,r):new _(n,r)}return d.TextSelection.between(n,r)}content(){const e=this.$anchorCell.node(-1),t=m.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),o={},i=[];for(let a=r.top;a<r.bottom;a++){const n=[];for(let i=a*t.width+r.left,s=r.left;s<r.right;s++,i++){const s=t.map[i];if(o[s])continue;o[s]=!0;const a=t.findCell(s);let l=e.nodeAt(s);if(!l)throw RangeError(`No cell with offset ${s} found`);const c=r.left-a.left,u=a.right-r.right;if(c>0||u>0){let e=l.attrs;if(c>0&&(e=N(e,0,c)),u>0&&(e=N(e,e.colspan-u,u)),a.left<r.left){if(l=l.type.createAndFill(e),!l)throw RangeError(`Could not create cell with attrs ${JSON.stringify(e)}`)}else l=l.type.create(e,l.content)}if(a.top<r.top||a.bottom>r.bottom){const e={...l.attrs,rowspan:Math.min(a.bottom,r.bottom)-Math.max(a.top,r.top)};l=a.top<r.top?l.type.createAndFill(e):l.type.create(e,l.content)}n.push(l)}i.push(e.child(a).copy(p.Fragment.from(n)))}const s=this.isColSelection()&&this.isRowSelection()?e:i;return new p.Slice(p.Fragment.from(s),1,1)}replace(e,t=p.Slice.empty){const n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){const{$from:o,$to:s}=r[i],a=e.mapping.slice(n);e.replace(a.map(o.pos),a.map(s.pos),i?p.Slice.empty:t)}const o=d.Selection.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);o&&e.setSelection(o)}replaceWith(e,t){this.replace(e,new p.Slice(p.Fragment.from(t),0,0))}forEachCell(e){const t=this.$anchorCell.node(-1),n=m.get(t),r=this.$anchorCell.start(-1),o=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let i=0;i<o.length;i++)e(t.nodeAt(o[i]),r+o[i])}isColSelection(){const e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;const n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount}static colSelection(e,t=e){const n=e.node(-1),r=m.get(n),o=e.start(-1),i=r.findCell(e.pos-o),s=r.findCell(t.pos-o),a=e.node(0);return i.top<=s.top?(i.top>0&&(e=a.resolve(o+r.map[i.left])),s.bottom<r.height&&(t=a.resolve(o+r.map[r.width*(r.height-1)+s.right-1]))):(s.top>0&&(t=a.resolve(o+r.map[s.left])),i.bottom<r.height&&(e=a.resolve(o+r.map[r.width*(r.height-1)+i.right-1]))),new _(e,t)}isRowSelection(){const e=this.$anchorCell.node(-1),t=m.get(e),n=this.$anchorCell.start(-1),r=t.colCount(this.$anchorCell.pos-n),o=t.colCount(this.$headCell.pos-n);if(Math.min(r,o)>0)return!1;const i=r+this.$anchorCell.nodeAfter.attrs.colspan,s=o+this.$headCell.nodeAfter.attrs.colspan;return Math.max(i,s)==t.width}eq(e){return e instanceof _&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,t=e){const n=e.node(-1),r=m.get(n),o=e.start(-1),i=r.findCell(e.pos-o),s=r.findCell(t.pos-o),a=e.n
1ode(0);return i.left<=s.left?(i.left>0&&(e=a.resolve(o+r.map[i.top*r.width])),s.right<r.width&&(t=a.resolve(o+r.map[r.width*(s.top+1)-1]))):(s.left>0&&(t=a.resolve(o+r.map[s.top*r.width])),i.right<r.width&&(e=a.resolve(o+r.map[r.width*(i.top+1)-1]))),new _(e,t)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,t){return new _(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){return new _(e.resolve(t),e.resolve(n))}getBookmark(){return new L(this.$anchorCell.pos,this.$headCell.pos)}};_.prototype.visible=!1,d.Selection.jsonID("cell",_);var L=class{constructor(e,t){this.anchor=e,this.head=t}map(e){return new L(e.map(this.anchor),e.map(this.head))}resolve(e){const t=e.resolve(this.anchor),n=e.resolve(this.head);return"row"==t.parent.type.spec.tableRole&&"row"==n.parent.type.spec.tableRole&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&E(t,n)?new _(t,n):d.Selection.near(n,1)}};function P(e){if(!(e.selection instanceof _))return null;const t=[];return e.selection.forEachCell(((e,n)=>{t.push(f.Decoration.node(n,n+e.nodeSize,{class:"selectedCell"}))})),f.DecorationSet.create(e.doc,t)}var $=new(n(42391).PluginKey)("fix-tables");function z(e,t,n,r){const o=e.childCount,i=t.childCount;e:for(let s=0,a=0;s<i;s++){const i=t.child(s);for(let t=a,r=Math.min(o,s+3);t<r;t++)if(e.child(t)==i){a=t+1,n+=i.nodeSize;continue e}r(i,n),a<o&&e.child(a).sameMarkup(i)?z(e.child(a),i,n+1,r):i.nodesBetween(0,i.content.size,r,n+1),n+=i.nodeSize}}function F(e,t){let n;const r=(t,r)=>{"table"==t.type.spec.tableRole&&(n=function(e,t,n,r){const o=m.get(t);if(!o.problems)return r;r||(r=e.tr);const i=[];for(let l=0;l<o.height;l++)i.push(0);for(let l=0;l<o.problems.length;l++){const e=o.problems[l];if("collision"==e.type){const o=t.nodeAt(e.pos);if(!o)continue;const s=o.attrs;for(let t=0;t<s.rowspan;t++)i[e.row+t]+=e.n;r.setNodeMarkup(r.mapping.map(n+1+e.pos),null,N(s,s.colspan-e.n,e.n))}else if("missing"==e.type)i[e.row]+=e.n;else if("overlong_rowspan"==e.type){const o=t.nodeAt(e.pos);if(!o)continue;r.setNodeMarkup(r.mapping.map(n+1+e.pos),null,{...o.attrs,rowspan:o.attrs.rowspan-e.n})}else if("colwidth mismatch"==e.type){const o=t.nodeAt(e.pos);if(!o)continue;r.setNodeMarkup(r.mapping.map(n+1+e.pos),null,{...o.attrs,colwidth:e.colwidth})}}let s,a;for(let l=0;l<i.length;l++)i[l]&&(null==s&&(s=l),a=l);for(let l=0,c=n+1;l<o.height;l++){const n=t.child(l),o=c+n.nodeSize,u=i[l];if(u>0){let t="cell";n.firstChild&&(t=n.firstChild.type.spec.tableRole);const i=[];for(let n=0;n<u;n++){const n=w(e.schema)[t].createAndFill();n&&i.push(n)}const h=0!=l&&s!=l-1||a!=l?o-1:c+1;r.insert(r.mapping.map(h),i)}c=o}return r.setMeta($,{fixTables:!0})}(e,t,r,n))};return t?t.doc!=e.doc&&z(t.doc,e.doc,0,r):e.doc.descendants(r),n}var B=n(19443),j=n(42391),H=n(97354),W=n(19443),J=n(77587);function U(e){if(!e.size)return null;let{content:t,openStart:n,openEnd:r}=e;for(;1==t.childCount&&(n>0&&r>0||"table"==t.child(0).type.spec.tableRole);)n--,r--,t=t.child(0).content;const o=t.child(0),i=o.type.spec.tableRole,s=o.type.schema,a=[];if("row"==i)for(let l=0;l<t.childCount;l++){let e=t.child(l).content;const o=l?0:Math.max(0,n-1),i=l<t.childCount-1?0:Math.max(0,r-1);(o||i)&&(e=q(w(s).row,new W.Slice(e,o,i)).content),a.push(e)}else{if("cell"!=i&&"header_cell"!=i)return null;a.push(n||r?q(w(s).row,new W.Slice(t,n,r)).content:t)}return function(e,t){const n=[];for(let o=0;o<t.length;o++){const e=t[o];for(let t=e.childCount-1;t>=0;t--){const{rowspan:r,colspan:i}=e.child(t).attrs;for(let e=o;e<o+r;e++)n[e]=(n[e]||0)+i}}let r=0;for(let o=0;o<n.length;o++)r=Math.max(r,n[o]);for(let o=0;o<n.length;o++)if(o>=t.length&&t.push(W.Fragment.empty),n[o]<r){const i=w(e).cell.createAndFill(),s=[];for(let e=n[o];e<r;e++)s.push(i);t[o]=t[o].append(W.Fragment.from(s))}return{height:t.length,width:r,rows:t}}(s,a)}function q(e,t){const n=e.createAndFill();return new J.Transform(n).replace(0,n.content.size,t).doc}function V({width:e,height:t,rows:n},r,o){if(e!=r){const t=[],o=[];for(let e=0;e<n.length;e++){const i=n[e],s=[];for(let n=t[e]||0,o=0;n<r;o++){let a=i.child(o%i.childCount);n+a.attrs.colspan>r&&(a=a.type.createChecked(N(a.attrs,a.attrs.colspan,n+a.attrs.colspan-r),a.content)),s.push(a),n+=a.attrs.colspan;for(let n=1;n<a.attrs.rowspan;n++)t[e+n]=(t[e+n]||0)+a.attrs.colspan}o.push(W.Fragment.from(s))}n=o,e=r}if(t!=o){const e=[];for(let r=0,i=0;r<o;r++,i++){const s=[],a=n[i%t];for(let e=0;e<a.childCount;e++){let t=a.child(e);r+t.attrs.rowspan>o&&(t=t.type.create({...t.attrs,rowspan:Math.max(1,o-t.attrs.rowspan)},t.content)),s.push(t)}e.push(W.Fragment.from(s))}n=e,t=o}return{width:e,height:t,rows:n}}function K(e,t,n,r,o,i,s,a){if(0==s||s==t.height)return!1;let l=!1;for(let c=o;c<i;c++){const o=s*t.width+c,i=t.map[o];if(t.map[o-t.width]==i){l=!0;const o=n.nodeAt(i),{top:u,left:h}=t.findCell(i);e.setNodeMarkup(e.mapping.slice(a).map(i+r),null,{...o.attrs,rowspan:s-u}),e.insert(e.mapping.slice(a).map(t.positionAt(s,h,n)),o.type.createAndFill({...o.attrs,rowspan:u+o.attrs.rowspan-s})),c+=o.attrs.colspan-1}}return l}function Y(e,t,n,r,o,i,s,a){if(0==s||s==t.width)return!1;let l=!1;for(let c=o;c<i;c++){const o=c*t.width+s,i=t.map[o];if(t.map[o-1]==i){l=!0;const o=n.nodeAt(i),u=t.colCount(i),h=e.mapping.slice(a).map(i+r);e.setNodeMarkup(h,null,N(o.attrs,s-u,o.attrs.colspan-(s-u))),e.insert(h+o.nodeSize,o.type.createAndFill(N(o.attrs,0,s-u))),c+=o.attrs.rowspan-1}}return l}function G(e,t,n,r,o){let i=n?e.doc.nodeAt(n-1):e.doc;if(!i)throw new Error("No table found");let s=m.get(i);const{top:a,left:l}=r,c=l+o.width,u=a+o.height,h=e.tr;let p=0;function d(){if(i=n?h.doc.nodeAt(n-1):h.doc,!i)throw new Error("No table found");s=m.get(i),p=h.mapping.maps.length}(function(e,t,n,r,o,i,s){const a=w(e.doc.type.schema);let l,c;if(o>t.width)for(let u=0,h=0;u<t.height;u++){const i=n.child(u);h+=i.nodeSize;const p=[];let d;d=null==i.lastChild||i.lastChild.type==a.cell?l||(l=a.cell.createAndFill()):c||(c=a.header_cell.createAndFill());for(let e=t.width;e<o;e++)p.push(d);e.insert(e.mapping.slice(s).map(h-1+r),p)}if(i>t.height){const u=[];for(let e=0,r=(t.height-1)*t.width;e<Math.max(t.width,o);e++){const o=!(e>=t.width)&&n.nodeAt(t.map[r+e]).type==a.header_cell;
1u.push(o?c||(c=a.header_cell.createAndFill()):l||(l=a.cell.createAndFill()))}const h=a.row.create(null,W.Fragment.from(u)),p=[];for(let e=t.height;e<i;e++)p.push(h);e.insert(e.mapping.slice(s).map(r+n.nodeSize-2),p)}return!(!l&&!c)})(h,s,i,n,c,u,p)&&d(),K(h,s,i,n,l,c,a,p)&&d(),K(h,s,i,n,l,c,u,p)&&d(),Y(h,s,i,n,a,u,l,p)&&d(),Y(h,s,i,n,a,u,c,p)&&d();for(let f=a;f<u;f++){const e=s.positionAt(f,l,i),t=s.positionAt(f,c,i);h.replace(h.mapping.slice(p).map(e+n),h.mapping.slice(p).map(t+n),new W.Slice(o.rows[f-a],0,0))}d(),h.setSelection(new _(h.doc.resolve(n+s.positionAt(a,l,i)),h.doc.resolve(n+s.positionAt(u-1,c-1,i)))),t(h)}var X=(0,H.keydownHandler)({ArrowLeft:Q("horiz",-1),ArrowRight:Q("horiz",1),ArrowUp:Q("vert",-1),ArrowDown:Q("vert",1),"Shift-ArrowLeft":ee("horiz",-1),"Shift-ArrowRight":ee("horiz",1),"Shift-ArrowUp":ee("vert",-1),"Shift-ArrowDown":ee("vert",1),Backspace:te,"Mod-Backspace":te,Delete:te,"Mod-Delete":te});function Z(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function Q(e,t){return(n,r,o)=>{if(!o)return!1;const i=n.selection;if(i instanceof _)return Z(n,r,j.Selection.near(i.$headCell,t));if("horiz"!=e&&!i.empty)return!1;const s=ie(o,e,t);if(null==s)return!1;if("horiz"==e)return Z(n,r,j.Selection.near(n.doc.resolve(i.head+t),t));{const o=n.doc.resolve(s),i=R(o,e,t);let a;return a=i?j.Selection.near(i,1):t<0?j.Selection.near(n.doc.resolve(o.before(-1)),-1):j.Selection.near(n.doc.resolve(o.after(-1)),1),Z(n,r,a)}}}function ee(e,t){return(n,r,o)=>{if(!o)return!1;const i=n.selection;let s;if(i instanceof _)s=i;else{const r=ie(o,e,t);if(null==r)return!1;s=new _(n.doc.resolve(r))}const a=R(s.$headCell,e,t);return!!a&&Z(n,r,new _(s.$anchorCell,a))}}function te(e,t){const n=e.selection;if(!(n instanceof _))return!1;if(t){const r=e.tr,o=w(e.schema).cell.createAndFill().content;n.forEachCell(((e,t)=>{e.content.eq(o)||r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new B.Slice(o,0,0))})),r.docChanged&&t(r)}return!0}function ne(e,t){const n=b(e.state.doc.resolve(t));return!!n&&(e.dispatch(e.state.tr.setSelection(new _(n))),!0)}function re(e,t,n){if(!S(e.state))return!1;let r=U(n);const o=e.state.selection;if(o instanceof _){r||(r={width:1,height:1,rows:[B.Fragment.from(q(w(e.state.schema).cell,n))]});const t=o.$anchorCell.node(-1),i=o.$anchorCell.start(-1),s=m.get(t).rectBetween(o.$anchorCell.pos-i,o.$headCell.pos-i);return r=V(r,s.right-s.left,s.bottom-s.top),G(e.state,e.dispatch,i,s,r),!0}if(r){const t=C(e.state),n=t.start(-1);return G(e.state,e.dispatch,n,m.get(t.node(-1)).findCell(t.pos-n),r),!0}return!1}function oe(e,t){var n;if(t.ctrlKey||t.metaKey)return;const r=se(e,t.target);let o;if(t.shiftKey&&e.state.selection instanceof _)i(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&null!=(o=b(e.state.selection.$anchor))&&(null==(n=ae(e,t))?void 0:n.pos)!=o.pos)i(o,t),t.preventDefault();else if(!r)return;function i(t,n){let r=ae(e,n);const o=null==x.getState(e.state);if(!r||!E(t,r)){if(!o)return;r=t}const i=new _(t,r);
1if(o||!e.state.selection.eq(i)){const n=e.state.tr.setSelection(i);o&&n.setMeta(x,t.pos),e.dispatch(n)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",a),null!=x.getState(e.state)&&e.dispatch(e.state.tr.setMeta(x,-1))}function a(n){const o=n,a=x.getState(e.state);let l;if(null!=a)l=e.state.doc.resolve(a);else if(se(e,o.target)!=r&&(l=ae(e,t),!l))return s();l&&i(l,o)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",a)}function ie(e,t,n){if(!(e.state.selection instanceof j.TextSelection))return null;const{$head:r}=e.state.selection;for(let o=r.depth-1;o>=0;o--){const i=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:i.childCount))return null;if("cell"==i.type.spec.tableRole||"header_cell"==i.type.spec.tableRole){const i=r.before(o),s="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(s)?i:null}}return null}function se(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t;return null}function ae(e,t){const n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?b(e.state.doc.resolve(n.pos)):null}var le=n(42391),ce=n(9222),ue=class{constructor(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),he(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type==this.node.type&&(this.node=e,he(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))}};function he(e,t,n,r,o,i){var s;let a=0,l=!0,c=t.firstChild;const u=e.firstChild;if(u){for(let e=0,n=0;e<u.childCount;e++){const{colspan:s,colwidth:h}=u.child(e).attrs;for(let e=0;e<s;e++,n++){const s=o==n?i:h&&h[e],u=s?s+"px":"";a+=s||r,s||(l=!1),c?(c.style.width!=u&&(c.style.width=u),c=c.nextSibling):t.appendChild(document.createElement("col")).style.width=u}}for(;c;){const e=c.nextSibling;null==(s=c.parentNode)||s.removeChild(c),c=e}l?(n.style.width=a+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=a+"px")}}var pe=new le.PluginKey("tableColumnResizing");function de({handleWidth:e=5,cellMinWidth:t=25,View:n=ue,lastColumnResizable:r=!0}={}){const o=new le.Plugin({key:pe,state:{init:(e,r)=>(o.spec.props.nodeViews[w(r.schema).table.name]=(e,r)=>new n(e,t,r),new fe(-1,!1)),apply:(e,t)=>t.apply(e)},props:{attributes:e=>{const t=pe.getState(e);return t&&t.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(t,n)=>{!function(e,t,n,r,o){const i=pe.getState(e.state);if(!i)return;if(!i.dragging){const r=function(e){for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}(t.target);let s=-1;if(r){const{left:o,right:i}=r.getBoundingClientRect();t.clientX-o<=n?s=me(e,t,"left",n):i-t.clientX<=n&&(s=me(e,t,"right",n))}if(s!=i.activeHandle){if(!o&&-1!==s){const t=e.state.doc.resolve(s),n=t.node(-1),r=m.get(n),o=t.start(-1);if(r.colCount(t.pos-o)+t.nodeAfter.attrs.colspan-1==r.width-1)return}ve(e,s)}}}(t,n,e,0,r)},mouseleave:e=>{!function(e){const t=pe.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&ve(e,-1)}(e)},mousedown:(e,n)=>{!function(e,t,n){const r=pe.getState(e.state);if(!r||-1==r.activeHandle||r.dragging)return!1;const o=e.state.doc.nodeAt(r.activeHandle),i=function(e,t,{colspan:n,colwidth:r}){const o=r&&r[r.length-1];if(o)return o;const i=e.domAtPos(t);let s=i.node.childNodes[i.offset].offsetWidth,a=n;if(r)for(let l=0;l<n;l++)r[l]&&(s-=r[l],a--);return s/a}(e,r.activeHandle,o.attrs);function s(t){window.removeEventListener("mouseup",s),window.removeEventListener("mousemove",a);const r=pe.getState(e.state);(null==r?void 0:r.dragging)&&(!function(e,t,n){const r=e.state.doc.resolve(t),o=r.node(-1),i=m.get(o),s=r.start(-1),a=i.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,l=e.state.tr;for(let c=0;c<i.height;c++){const e=c*i.width+a;if(c&&i.map[e]==i.map[e-i.width])continue;const t=i.map[e],r=o.nodeAt(t).attrs,u=1==r.colspan?0:a-i.colCount(t);if(r.colwidth&&r.colwidth[u]==n)continue;const h=r.colwidth?r.colwidth.slice():ye(r.colspan);h[u]=n,l.setNodeMarkup(s+t,null,{...r,colwidth:h})}l.docChanged&&e.dispatch(l)}(e,r.activeHandle,ge(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(pe,{setDragging:null})))}function a(t){if(!t.which)return s(t);const r=pe.getState(e.state);if(r&&r.dragging){const o=ge(r.dragging,t,n);!function(e,t,n,r){const o=e.state.doc.resolve(t),i=o.node(-1),s=o.start(-1),a=m.get(i).colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1;let l=e.domAtPos(o.start(-1)).node;for(;l&&"TABLE"!=l.nodeName;)l=l.parentNode;if(!l)return;he(i,l.firstChild,l,r,a,n)}(e,r.activeHandle,o,n)}}e.dispatch(e.state.tr.setMeta(pe,{setDragging:{startX:t.clientX,startWidth:i}})),window.addEventListener("mouseup",s),window.addEventListener("mousemove",a),t.preventDefault()}(e,n,t)}},decorations:e=>{const t=pe.getState(e);if(t&&t.activeHandle>-1)return function(e,t){const n=[],r=e.doc.resolve(t),o=r.node(-1);if(!o)return ce.DecorationSet.empty;const i=m.get(o),s=r.start(-1),a=i.colCount(r.pos-s)+r.nodeAfter.attrs.colspan;for(let l=0;l<i.height;l++){const e=a+l*i.width-1;if((a==i.width||i.map[e]!=i.map[e+1])&&(0==l||i.map[e]!=i.map[e-i.width])){const t=i.map[e],r=s+t+o.nodeAt(t).nodeSize-1,a=document.createElement("div");
1a.className="column-resize-handle",n.push(ce.Decoration.widget(r,a))}}return ce.DecorationSet.create(e.doc,n)}(e,t.activeHandle)},nodeViews:{}}});return o}var fe=class{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(e){const t=this,n=e.getMeta(pe);if(n&&null!=n.setHandle)return new fe(n.setHandle,!1);if(n&&void 0!==n.setDragging)return new fe(t.activeHandle,n.setDragging);if(t.activeHandle>-1&&e.docChanged){let n=e.mapping.map(t.activeHandle,-1);return M(e.doc.resolve(n))||(n=-1),new fe(n,t.dragging)}return t}};function me(e,t,n,r){const o="right"==n?-r:r,i=e.posAtCoords({left:t.clientX+o,top:t.clientY});if(!i)return-1;const{pos:s}=i,a=b(e.state.doc.resolve(s));if(!a)return-1;if("right"==n)return a.pos;const l=m.get(a.node(-1)),c=a.start(-1),u=l.map.indexOf(a.pos-c);return u%l.width==0?-1:c+l.map[u-1]}function ge(e,t,n){const r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function ve(e,t){e.dispatch(e.state.tr.setMeta(pe,{setHandle:t}))}function ye(e){return Array(e).fill(0)}var ke=n(19443),we=n(42391);function xe(e){const t=e.selection,n=C(e),r=n.node(-1),o=n.start(-1),i=m.get(r);return{...t instanceof _?i.rectBetween(t.$anchorCell.pos-o,t.$headCell.pos-o):i.findCell(n.pos-o),tableStart:o,map:i,table:r}}function be(e,{map:t,tableStart:n,table:r},o){let i=o>0?-1:0;D(t,r,o+i)&&(i=0==o||o==t.width?null:0);for(let s=0;s<t.height;s++){const a=s*t.width+o;if(o>0&&o<t.width&&t.map[a-1]==t.map[a]){const i=t.map[a],l=r.nodeAt(i);e.setNodeMarkup(e.mapping.map(n+i),null,I(l.attrs,o-t.colCount(i))),s+=l.attrs.rowspan-1}else{const l=null==i?w(r.type.schema).cell:r.nodeAt(t.map[a+i]).type,c=t.positionAt(s,o,r);e.insert(e.mapping.map(n+c),l.createAndFill())}}return e}function Se(e,t){if(!S(e))return!1;if(t){const n=xe(e);t(be(e.tr,n,n.left))}return!0}function Ce(e,t){if(!S(e))return!1;if(t){const n=xe(e);t(be(e.tr,n,n.right))}return!0}function Me(e,{map:t,table:n,tableStart:r},o){const i=e.mapping.maps.length;for(let s=0;s<t.height;){const a=s*t.width+o,l=t.map[a],c=n.nodeAt(l),u=c.attrs;if(o>0&&t.map[a-1]==l||o<t.width-1&&t.map[a+1]==l)e.setNodeMarkup(e.mapping.slice(i).map(r+l),null,N(u,o-t.colCount(l)));else{const t=e.mapping.slice(i).map(r+l);e.delete(t,t+c.nodeSize)}s+=u.rowspan}}function Oe(e,t){if(!S(e))return!1;if(t){const n=xe(e),r=e.tr;if(0==n.left&&n.right==n.map.width)return!1;for(let e=n.right-1;Me(r,n,e),e!=n.left;e--){const e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError("No table found");n.table=e,n.map=m.get(e)}t(r)}return!0}function Ee(e,t,n){var r;const o=w(t.type.schema).header_cell;for(let i=0;i<e.width;i++)if((null==(r=t.nodeAt(e.map[i+n*e.width]))?void 0:r.type)!=o)return!1;return!0}function Ae(e,{map:t,tableStart:n,table:r},o){var i;let s=n;for(let c=0;c<o;c++)s+=r.child(c).nodeSize;const a=[];let l=o>0?-1:0;Ee(t,r,o+l)&&(l=0==o||o==t.height?null:0);for(let c=0,u=t.width*o;c<t.width;c++,u++)if(o>0&&o<t.height&&t.map[u]==t.map[u-t.width]){const o=t.map[u],i=r.nodeAt(o).attrs;e.setNodeMarkup(n+o,null,{...i,rowspan:i.rowspan+1}),c+=i.colspan-1}else{const e=null==l?w(r.type.schema).cell:null==(i=r.nodeAt(t.map[u+l*t.width]))?void 0:i.type,n=null==e?void 0:e.createAndFill();n&&a.push(n)}return e.insert(s,w(r.type.schema).row.create(null,a)),e}function Te(e,t){if(!S(e))return!1;if(t){const n=xe(e);t(Ae(e.tr,n,n.top))}return!0}function Re(e,t){if(!S(e))return!1;if(t){const n=xe(e);t(Ae(e.tr,n,n.bottom))}return!0}function Ne(e,{map:t,table:n,tableStart:r},o){let i=0;for(let l=0;l<o;l++)i+=n.child(l).nodeSize;const s=i+n.child(o).nodeSize,a=e.mapping.maps.length;e.delete(i+r,s+r);for(let l=0,c=o*t.width;l<t.width;l++,c++){const i=t.map[c];if(o>0&&i==t.map[c-t.width]){const t=n.nodeAt(i).attrs;e.setNodeMarkup(e.mapping.slice(a).map(i+r),null,{...t,rowspan:t.rowspan-1}),l+=t.colspan-1}else if(o<t.width&&i==t.map[c+t.width]){const s=n.nodeAt(i),c=s.attrs,u=s.type.create({...c,rowspan:s.attrs.rowspan-1},s.content),h=t.positionAt(o+1,l,n);e.insert(e.mapping.slice(a).map(r+h),u),l+=c.colspan-1}}}function Ie(e,t){if(!S(e))return!1;if(t){const n=xe(e),r=e.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(let e=n.bottom-1;Ne(r,n,e),e!=n.top;e--){const e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError("No table found");n.table=e,n.map=m.get(n.table)}t(r)}return!0}function De(e){const t=e.content;return 1==t.childCount&&t.child(0).isTextblock&&0==t.child(0).childCount}function _e(e,t){const n=e.selection;if(!(n instanceof _)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=xe(e),{map:o}=r;if(function({width:e,height:t,map:n},r){let o=r.top*e+r.left,i=o,s=(r.bottom-1)*e+r.left,a=o+(r.right-r.left-1);for(let l=r.top;
1l<r.bottom;l++){if(r.left>0&&n[i]==n[i-1]||r.right<e&&n[a]==n[a+1])return!0;i+=e,a+=e}for(let l=r.left;l<r.right;l++){if(r.top>0&&n[o]==n[o-e]||r.bottom<t&&n[s]==n[s+e])return!0;o++,s++}return!1}(o,r))return!1;if(t){const n=e.tr,i={};let s,a,l=ke.Fragment.empty;for(let e=r.top;e<r.bottom;e++)for(let t=r.left;t<r.right;t++){const c=o.map[e*o.width+t],u=r.table.nodeAt(c);if(!i[c]&&u)if(i[c]=!0,null==s)s=c,a=u;else{De(u)||(l=l.append(u.content));const e=n.mapping.map(c+r.tableStart);n.delete(e,e+u.nodeSize)}}if(null==s||null==a)return!0;if(n.setNodeMarkup(s+r.tableStart,null,{...I(a.attrs,a.attrs.colspan,r.right-r.left-a.attrs.colspan),rowspan:r.bottom-r.top}),l.size){const e=s+1+a.content.size,t=De(a)?s+1:e;n.replaceWith(t+r.tableStart,e+r.tableStart,l)}n.setSelection(new _(n.doc.resolve(s+r.tableStart))),t(n)}return!0}function Le(e,t){const n=w(e.schema);return Pe((({node:e})=>n[e.type.spec.tableRole]))(e,t)}function Pe(e){return(t,n)=>{var r;const o=t.selection;let i,s;if(o instanceof _){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;i=o.$anchorCell.nodeAfter,s=o.$anchorCell.pos}else{if(i=function(e){for(let t=e.depth;t>0;t--){const n=e.node(t).type.spec.tableRole;if("cell"===n||"header_cell"===n)return e.node(t)}return null}(o.$from),!i)return!1;s=null==(r=b(o.$from))?void 0:r.pos}if(null==i||null==s)return!1;if(1==i.attrs.colspan&&1==i.attrs.rowspan)return!1;if(n){let r=i.attrs;const a=[],l=r.colwidth;r.rowspan>1&&(r={...r,rowspan:1}),r.colspan>1&&(r={...r,colspan:1});const c=xe(t),u=t.tr;for(let e=0;e<c.right-c.left;e++)a.push(l?{...r,colwidth:l&&l[e]?[l[e]]:null}:r);let h;for(let t=c.top;t<c.bottom;t++){let n=c.map.positionAt(t,c.left,c.table);t==c.top&&(n+=i.nodeSize);for(let r=c.left,o=0;r<c.right;r++,o++)r==c.left&&t==c.top||u.insert(h=u.mapping.map(n+c.tableStart,1),e({node:i,row:t,col:r}).createAndFill(a[o]))}u.setNodeMarkup(s,e({node:i,row:c.top,col:c.left}),a[0]),o instanceof _&&u.setSelection(new _(u.doc.resolve(o.$anchorCell.pos),h?u.doc.resolve(h):void 0)),n(u)}return!0}}function $e(e,t){return function(n,r){if(!S(n))return!1;const o=C(n);if(o.nodeAfter.attrs[e]===t)return!1;if(r){const i=n.tr;n.selection instanceof _?n.selection.forEachCell(((n,r)=>{n.attrs[e]!==t&&i.setNodeMarkup(r,null,{...n.attrs,[e]:t})})):i.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[e]:t}),r(i)}return!0}}function ze(e,t,n){const r=t.map.cellsInRect({left:0,top:0,right:"row"==e?t.map.width:1,bottom:"column"==e?t.map.height:1});for(let o=0;o<r.length;o++){const e=t.table.nodeAt(r[o]);if(e&&e.type!==n.header_cell)return!1}return!0}function Fe(e,t){return(t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(e){return function(t,n){if(!S(t))return!1;if(n){const r=w(t.schema),o=xe(t),i=t.tr,s=o.map.cellsInRect("column"==e?{left:o.left,top:0,right:o.right,bottom:o.map.height}:"row"==e?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),a=s.map((e=>o.table.nodeAt(e)));for(let e=0;e<s.length;e++)a[e].type==r.header_cell&&i.setNodeMarkup(o.tableStart+s[e],r.cell,a[e].attrs);if(0==i.steps.length)for(let e=0;e<s.length;e++)i.setNodeMarkup(o.tableStart+s[e],r.header_cell,a[e].attrs);n(i)}return!0}}(e):function(t,n){if(!S(t))return!1;if(n){const r=w(t.schema),o=xe(t),i=t.tr,s=ze("row",o,r),a=ze("column",o,r),l=("column"===e?s:"row"===e&&a)?1:0,c="column"==e?{left:0,top:l,right:1,bottom:o.map.height}:"row"==e?{left:l,top:0,right:o.map.width,bottom:1}:o,u="column"==e?a?r.cell:r.header_cell:"row"==e?s?r.cell:r.header_cell:r.cell;o.map.cellsInRect(c).forEach((e=>{const t=e+o.tableStart,n=i.doc.nodeAt(t);n&&i.setNodeMarkup(t,u,n.attrs)})),n(i)}return!0}}var Be=Fe("row",{useDeprecatedLogic:!0}),je=Fe("column",{useDeprecatedLogic:!0}),He=Fe("cell",{useDeprecatedLogic:!0});function We(e){return function(t,n){if(!S(t))return!1;const r=function(e,t){if(t<0){const t=e.nodeBefore;if(t)return e.pos-t.nodeSize;for(let n=e.index(-1)-1,r=e.before();n>=0;n--){const t=e.node(-1).child(n),o=t.lastChild;if(o)return r-1-o.nodeSize;r-=t.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;const t=e.node(-1);for(let n=e.indexAfter(-1),r=e.after();n<t.childCount;n++){const e=t.child(n);if(e.childCount)return r+1;r+=e.nodeSize}}return null}(C(t),e);if(null==r)return!1;if(n){const e=t.doc.resolve(r);n(t.tr.setSelection(we.TextSelection.between(e,O(e))).scrollIntoView())}return!0}}function Je(e,t){const n=e.selection.$anchor;for(let r=n.depth;r>0;r--){if("table"==n.node(r).type.spec.tableRole)return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0}return!1}function Ue({allowTableNodeSelection:e=!1}={}){return new h.Plugin({key:x,state:{init:()=>null,apply(e,t){const n=e.getMeta(x);if(null!=n)return-1==n?null:n;if(null==t||!e.docChanged)return t;const{deleted:r,pos:o}=e.mapping.mapResult(t);return r?null:o}},props:{decorations:P,handleDOMEvents:{mousedown:oe},createSelectionBetween:e=>null!=x.getState(e.state)?e.state.selection:null,handleTripleClick:ne,handleKeyDown:X,handlePaste:re},appendTransaction:(t,n,r)=>function(e,t,n){const r=(t||e).selection,o=(t||e).doc;let i,s;if(r instanceof d.NodeSelection&&(s=r.node.type.spec.tableRole)){if("cell"==s||"header_cell"==s)i=_.create(o,r.from);else if("row"==s){const e=o.resolve(r.from+1);i=_.rowSelection(e,e)}else if(!n){const e=m.get(r.node),t=r.from+1,n=t+e.map[e.width*e.height-1];i=_.create(o,t+1,n)}}else r instanceof d.TextSelection&&function({$from:e,$to:t}){if(e.pos==t.pos||e.pos<e.pos-6)return!1;let n=e.pos,r=t.pos,o=e.depth;for(;o>=0&&!(e.after(o+1)<e.end(o));o--,n++);for(let i=t.depth;i>=0&&!(t.before(i+1)>t.start(i));i--,r--);return n==r&&/row|table/.test(e.node(o).type.spec.tableRole)}(r)?i=d.TextSelection.create(o,r.from):r instanceof d.TextSelection&&function({$from:e,$to:t}){let n,r;for(let o=e.depth;o>0;o--){const t=e.node(o);if("cell"===t.type.spec.tableRole||"header_cell"===t.type.spec.tableRole){n=t;break}}for(let o=t.depth;o>0;o--){const e=t.node(o);if("cell"===e.type.spec.tableRole||"header_cell"===e.type.spec.tableRole){r=e;break}}return n!==r&&0===t.parentOffset}(r)&&(i=d.TextSelection.create(o,r.$from.start(),r.$from.end()));return i&&(t||(t=e.tr)).setSelection(i),t}(r,F(r,n),e)})}},77587:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e){var t="function"===typeof Map?new Map:void 0;return o=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return i(e,arguments,h(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),a(r,e)},o(e)}function i(e,t,n){return i=u()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&a(o,n.prototype),o},i.apply(null,arguments)}function s(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}
1function a(e,t){return a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(e,t)}function l(e){var t=u();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===r(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var m=n(19443),g=Math.pow(2,16);function v(e){return 65535&e}var y=function(){function e(t,n,r){p(this,e),this.pos=t,this.delInfo=n,this.recover=r}return f(e,[{key:"deleted",get:function(){return(8&this.delInfo)>0}},{key:"deletedBefore",get:function(){return(5&this.delInfo)>0}},{key:"deletedAfter",get:function(){return(6&this.delInfo)>0}},{key:"deletedAcross",get:function(){return(4&this.delInfo)>0}}]),e}(),k=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(p(this,e),this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}return f(e,[{key:"recover",value:function(e){var t=0,n=v(e);if(!this.inverted)for(var r=0;r<n;r++)t+=this.ranges[3*r+2]-this.ranges[3*r+1];return this.ranges[3*n]+t+function(e){return(e-(65535&e))/g}(e)}},{key:"mapResult",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(e,t,!1)}},{key:"map",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(e,t,!0)}},{key:"_map",value:function(e,t,n){for(var r=0,o=this.inverted?2:1,i=this.inverted?1:2,s=0;s<this.ranges.length;s+=3){var a=this.ranges[s]-(this.inverted?r:0);if(a>e)break;var l=this.ranges[s+o],c=this.ranges[s+i],u=a+l;if(e<=u){var h=a+r+((l?e==a?-1:e==u?1:t:t)<0?0:c);if(n)return h;var p=e==(t<0?a:u)?null:s/3+(e-a)*g,d=e==a?2:e==u?1:4;return(t<0?e!=a:e!=u)&&(d|=8),new y(h,d,p)}r+=c-l}return n?e+r:new y(e+r,0,null)}},{key:"touches",value:function(e,t){for(var n=0,r=v(t),o=this.inverted?2:1,i=this.inverted?1:2,s=0;s<this.ranges.length;s+=3){var a=this.ranges[s]-(this.inverted?n:0);if(a>e)break;var l=this.ranges[s+o];if(e<=a+l&&s==3*r)return!0;n+=this.ranges[s+i]-l}return!1}},{key:"forEach",value:function(e){for(var t=this.inverted?2:1,n=this.inverted?1:2,r=0,o=0;r<this.ranges.length;r+=3){var i=this.ranges[r],s=i-(this.inverted?o:0),a=i+(this.inverted?0:o),l=this.ranges[r+t],c=this.ranges[r+n];e(s,s+l,a,a+c),o+=c-l}}},{key:"invert",value:function(){return new e(this.ranges,!this.inverted)}},{key:"toString",value:function(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}}],[{key:"offset",value:function(t){return 0==t?e.empty:new e(t<0?[0,-t,0]:[0,0,t])}}]),e}();k.empty=new k([]);var w=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length;p(this,e),this.maps=t,this.mirror=n,this.from=r,this.to=o}return f(e,[{key:"slice",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.maps.length;return new e(this.maps,this.mirror,t,n)}},{key:"copy",value:function(){return new e(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}},{key:"appendMap",value:function(e,t){this.to=this.maps.push(e),null!=t&&this.setMirror(this.maps.length-1,t)}},{key:"appendMapping",value:function(e){for(var t=0,n=this.maps.length;t<e.maps.length;t++){var r=e.getMirror(t);this.appendMap(e.maps[t],null!=r&&r<t?n+r:void 0)}}},{key:"getMirror",value:function(e){if(this.mirror)for(var t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}},{key:"setMirror",value:function(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}},{key:"appendMappingInverted",value:function(e){for(var t=e.maps.length-1,n=this.maps.length+e.maps.length;t>=0;t--){var r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}},{key:"invert",value:function(){var t=new e;return t.appendMappingInverted(this),t}},{key:"map",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(this.mirror)return this._map(e,t,!0);for(var n=this.from;n<this.to;n++)e=this.maps[n].map(e,t);return e}},{key:"mapResult",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(e,t,!1)}},{key:"_map",value:function(e,t,n){for(var r=0,o=this.from;o<this.to;o++){var i=this.maps[o].mapResult(e,t);if(null!=i.recover){var s=this.getMirror(o);if(null!=s&&s>o&&s<this.to){o=s,e=this.maps[s].recover(i.recover);continue}}r|=i.delInfo,e=i.pos}return n?e:new y(e,r,null)}}]),e}(),x=Object.create(null),b=function(){function e(){p(this,e)}return f(e,[{key:"getMap",value:function(){return k.empty}},{key:"merge",value:function(e){return null}}],[{key:"fromJSON",value:function(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=x[t.stepType];if(!n)throw new RangeError("No step type ".concat(t.stepType," defined"));return n.fromJSON(e,t)}},{key:"jsonID",value:function(e,t){if(e in x)throw new RangeError("Duplicate use of step JSON ID "+e);return x[e]=t,t.prototype.jsonID=e,t}}]),e}(),S=function(){function e(t,n){p(this,e),this.doc=t,this.failed=n}return f(e,null,[{key:"ok",value:function(t){return new e(t,null)}},{key:"fail",value:function(t){return new e(null,t)}},{key:"fromReplace",value:function(t,n,r,o){try{return e.ok(t.replace(n,r,o))}catch(i){if(i instanceof m.ReplaceError)return e.fail(i.message);throw i}}}]),e}();
1function C(e,t,n){for(var r=[],o=0;o<e.childCount;o++){var i=e.child(o);i.content.size&&(i=i.copy(C(i.content,t,i))),i.isInline&&(i=t(i,n,o)),r.push(i)}return m.Fragment.fromArray(r)}var M=function(e){s(n,e);var t=l(n);function n(e,r,o){var i;return p(this,n),(i=t.call(this)).from=e,i.to=r,i.mark=o,i}return f(n,[{key:"apply",value:function(e){var t=this,n=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new m.Slice(C(n.content,(function(e,n){return e.isAtom&&n.type.allowsMarkType(t.mark.type)?e.mark(t.mark.addToSet(e.marks)):e}),o),n.openStart,n.openEnd);return S.fromReplace(e,this.from,this.to,i)}},{key:"invert",value:function(){return new O(this.from,this.to,this.mark)}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new n(t.pos,r.pos,this.mark)}},{key:"merge",value:function(e){return e instanceof n&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new n(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}},{key:"toJSON",value:function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new n(t.from,t.to,e.markFromJSON(t.mark))}}]),n}(b);b.jsonID("addMark",M);var O=function(e){s(n,e);var t=l(n);function n(e,r,o){var i;return p(this,n),(i=t.call(this)).from=e,i.to=r,i.mark=o,i}return f(n,[{key:"apply",value:function(e){var t=this,n=e.slice(this.from,this.to),r=new m.Slice(C(n.content,(function(e){return e.mark(t.mark.removeFromSet(e.marks))}),e),n.openStart,n.openEnd);return S.fromReplace(e,this.from,this.to,r)}},{key:"invert",value:function(){return new M(this.from,this.to,this.mark)}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new n(t.pos,r.pos,this.mark)}},{key:"merge",value:function(e){return e instanceof n&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new n(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}},{key:"toJSON",value:function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new n(t.from,t.to,e.markFromJSON(t.mark))}}]),n}(b);b.jsonID("removeMark",O);var E=function(e){s(n,e);var t=l(n);function n(e,r){var o;return p(this,n),(o=t.call(this)).pos=e,o.mark=r,o}return f(n,[{key:"apply",value:function(e){var t=e.nodeAt(this.pos);if(!t)return S.fail("No node at mark step's position");var n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return S.fromReplace(e,this.pos,this.pos+1,new m.Slice(m.Fragment.from(n),0,t.isLeaf?0:1))}},{key:"invert",value:function(e){var t=e.nodeAt(this.pos);if(t){var r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(var o=0;o<t.marks.length;o++)if(!t.marks[o].isInSet(r))return new n(this.pos,t.marks[o]);return new n(this.pos,this.mark)}}return new A(this.pos,this.mark)}},{key:"map",value:function(e){var t=e.mapResult(this.pos,1);return t.deletedAfter?null:new n(t.pos,this.mark)}},{key:"toJSON",value:function(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new n(t.pos,e.markFromJSON(t.mark))}}]),n}(b);b.jsonID("addNodeMark",E);var A=function(e){s(n,e);var t=l(n);function n(e,r){var o;return p(this,n),(o=t.call(this)).pos=e,o.mark=r,o}return f(n,[{key:"apply",value:function(e){var t=e.nodeAt(this.pos);if(!t)return S.fail("No node at mark step's position");var n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return S.fromReplace(e,this.pos,this.pos+1,new m.Slice(m.Fragment.from(n),0,t.isLeaf?0:1))}},{key:"invert",value:function(e){var t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new E(this.pos,this.mark):this}},{key:"map",value:function(e){var t=e.mapResult(this.pos,1);return t.deletedAfter?null:new n(t.pos,this.mark)}}
1,{key:"toJSON",value:function(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new n(t.pos,e.markFromJSON(t.mark))}}]),n}(b);b.jsonID("removeNodeMark",A);var T=function(e){s(n,e);var t=l(n);function n(e,r,o){var i,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return p(this,n),(i=t.call(this)).from=e,i.to=r,i.slice=o,i.structure=s,i}return f(n,[{key:"apply",value:function(e){return this.structure&&N(e,this.from,this.to)?S.fail("Structure replace would overwrite content"):S.fromReplace(e,this.from,this.to,this.slice)}},{key:"getMap",value:function(){return new k([this.from,this.to-this.from,this.slice.size])}},{key:"invert",value:function(e){return new n(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new n(t.pos,Math.max(t.pos,r.pos),this.slice)}},{key:"merge",value:function(e){if(!(e instanceof n)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;var t=this.slice.size+e.slice.size==0?m.Slice.empty:new m.Slice(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new n(e.from,this.to,t,this.structure)}var r=this.slice.size+e.slice.size==0?m.Slice.empty:new m.Slice(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new n(this.from,this.to+(e.to-e.from),r,this.structure)}},{key:"toJSON",value:function(){var e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new n(t.from,t.to,m.Slice.fromJSON(e,t.slice),!!t.structure)}}]),n}(b);b.jsonID("replace",T);var R=function(e){s(n,e);var t=l(n);function n(e,r,o,i,s,a){var l,c=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return p(this,n),(l=t.call(this)).from=e,l.to=r,l.gapFrom=o,l.gapTo=i,l.slice=s,l.insert=a,l.structure=c,l}return f(n,[{key:"apply",value:function(e){if(this.structure&&(N(e,this.from,this.gapFrom)||N(e,this.gapTo,this.to)))return S.fail("Structure gap-replace would overwrite content");var t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return S.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,t.content);return n?S.fromReplace(e,this.from,this.to,n):S.fail("Content does not fit in gap")}},{key:"getMap",value:function(){return new k([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}},{key:"invert",value:function(e){var t=this.gapTo-this.gapFrom;return new n(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=e.map(this.gapFrom,-1),i=e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||o<t.pos||i>r.pos?null:new n(t.pos,r.pos,o,i,this.slice,this.insert,this.structure)}},{key:"toJSON",value:function(){var e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new n(t.from,t.to,t.gapFrom,t.gapTo,m.Slice.fromJSON(e,t.slice),t.insert,!!t.structure)}}]),n}(b);function N(e,t,n){for(var r=e.resolve(t),o=n-t,i=r.depth;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0)for(var s=r.node(i).maybeChild(r.indexAfter(i));o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}return!1}function I(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function D(e){return{type:e,attrs:null}}function _(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.contentMatchAt(r).findWrapping(t);if(!i)return null;var s=i.length?i[0]:t;return n.canReplaceWith(r,o,s)?i:null}function L(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.child(r),s=t.contentMatch.findWrapping(i.type);if(!s)return null;for(var a=(s.length?s[s.length-1]:t).contentMatch,l=r;a&&l<o;l++)a=a.matchType(n.child(l).type);return a&&a.validEnd?s:null}function P(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var i=e.steps.length;e.doc.nodesBetween(t,n,(function(t,n){if(t.isTextblock&&!t.hasMarkup(r,o)&&function(e,t,n){var r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(e.doc,e.mapping.slice(i).map(n),r)){e.clearIncompatible(e.mapping.slice(i).map(n,1),r);var s=e.mapping.slice(i),a=s.map(n,1),l=s.map(n+t.nodeSize,1);return e.step(new R(a,l,a+1,l-1,new m.Slice(m.Fragment.from(r.create(o,null,t.marks)),0,0),1,!0)),!1}}))}function $(e,t,n,r,o){var i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");n||(n=i.type);var s=n.create(r,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new R(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new m.Slice(m.Fragment.from(s),0,0),1,!0))}function z(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,o=e.doc.resolve(t),i=m.Fragment.empty,s=m.Fragment.empty,a=o.depth,l=o.depth-n,c=n-1;a>l;a--,c--){i=m.Fragment.from(o.node(a).copy(i));var u=r&&r[c];s=m.Fragment.from(u?u.type.create(u.attrs,s):o.node(a).copy(s))}e.step(new T(t,t,new m.Slice(i.append(s),n,n),!0))}
1function F(e,t){return!(!e||!t||e.isLeaf||!e.canAppend(t))}function B(e,t,n){var r=new T(t-n,t+n,m.Slice.empty,!0);e.step(r)}function j(e,t,n){var r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(var o=r.depth-1;o>=0;o--){var i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(var s=r.depth-1;s>=0;s--){var a=r.indexAfter(s);if(r.node(s).canReplaceWith(a,a,n))return r.after(s+1);if(a<r.node(s).childCount)return null}return null}function H(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:m.Slice.empty;if(t==n&&!r.size)return null;var o=e.resolve(t),i=e.resolve(n);return W(o,i,r)?new T(t,n,r):new J(o,i,r).fit()}function W(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}b.jsonID("replaceAround",R);var J=function(){function e(t,n,r){p(this,e),this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=m.Fragment.empty;for(var o=0;o<=t.depth;o++){var i=t.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(t.indexAfter(o))})}for(var s=t.depth;s>0;s--)this.placed=m.Fragment.from(t.node(s).copy(this.placed))}return f(e,[{key:"depth",get:function(){return this.frontier.length-1}},{key:"fit",value:function(){for(;this.unplaced.size;){var e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}var t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(t<0?this.$to:r.doc.resolve(t));if(!o)return null;for(var i=this.placed,s=r.depth,a=o.depth;s&&a&&1==i.childCount;)i=i.firstChild.content,s--,a--;var l=new m.Slice(i,s,a);return t>-1?new R(r.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new T(r.pos,o.pos,l):null}},{key:"findFittable",value:function(){for(var e=this.unplaced.openStart,t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){var o=t.firstChild;if(t.childCount>1&&(r=0),o.type.spec.isolating&&r<=n){e=n;break}t=o.content}for(var i=1;i<=2;i++)for(var s=1==i?e:this.unplaced.openStart;s>=0;s--)for(var a=null,l=(s?(a=V(this.unplaced.content,s-1).firstChild).content:this.unplaced.content).firstChild,c=this.depth;c>=0;c--){var u=this.frontier[c],h=u.type,p=u.match,d=void 0,f=null;if(1==i&&(l?p.matchType(l.type)||(f=p.fillBefore(m.Fragment.from(l),!1)):a&&h.compatibleContent(a.type)))return{sliceDepth:s,frontierDepth:c,parent:a,inject:f};if(2==i&&l&&(d=p.findWrapping(l.type)))return{sliceDepth:s,frontierDepth:c,parent:a,wrap:d};if(a&&p.matchType(a.type))break}}},{key:"openMore",value:function(){var e=this.unplaced,t=e.content,n=e.openStart,r=e.openEnd,o=V(t,n);return!(!o.childCount||o.firstChild.isLeaf)&&(this.unplaced=new m.Slice(t,n+1,Math.max(r,o.size+n>=t.size-r?n+1:0)),!0)}},{key:"dropNode",value:function(){var e=this.unplaced,t=e.content,n=e.openStart,r=e.openEnd,o=V(t,n);if(o.childCount<=1&&n>0){var i=t.size-n<=n+o.size;this.unplaced=new m.Slice(U(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new m.Slice(U(t,n,1),n,r)}},{key:"placeNodes",value:function(e){for(var t=e.sliceDepth,n=e.frontierDepth,r=e.parent,o=e.inject,i=e.wrap;this.depth>n;)this.closeFrontierNode();if(i)for(var s=0;s<i.length;s++)this.openFrontierNode(i[s]);var a=this.unplaced,l=r?r.content:a.content,c=a.openStart-t,u=0,h=[],p=this.frontier[n],d=p.match,f=p.type;if(o){for(s=0;s<o.childCount;s++)h.push(o.child(s));d=d.matchFragment(o)}for(var g=l.size+t-(a.content.size-a.openEnd);u<l.childCount;){var v=l.child(u),y=d.matchType(v.type);if(!y)break;(++u>1||0==c||v.content.size)&&(d=y,h.push(K(v.mark(f.allowedMarks(v.marks)),1==u?c:0,u==l.childCount?g:-1)))}var k=u==l.childCount;k||(g=-1),this.placed=q(this.placed,n,m.Fragment.from(h)),this.frontier[n].match=d,k&&g<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var w=0,x=l;w<g;w++){var b=x.lastChild;this.frontier.push({type:b.type,match:b.contentMatchAt(b.childCount)}),x=b.content}this.unplaced=k?0==t?m.Slice.empty:new m.Slice(U(a.content,t-1,1),t-1,g<0?a.openEnd:t-1):new m.Slice(U(a.content,t,u),a.openStart,a.openEnd)}},{key:"mustMoveInline",value:function(){if(!this.$to.parent.isTextblock)return-1;var e,t=this.frontier[this.depth];if(!t.type.isTextblock||!Y(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return-1;for(var n=this.$to.depth,r=this.$to.after(n);n>1&&r==this.$to.end(--n);)++r;return r}},{key:"findCloseLevel",value:function(e){e:for(var t=Math.min(this.depth,e.depth);t>=0;t--){var n=this.frontier[t],r=n.match,o=n.type,i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),s=Y(e,t,o,r,i);if(s){for(var a=t-1;a>=0;a--){var l=this.frontier[a],c=l.match,u=Y(e,a,l.type,c,!0);if(!u||u.childCount)continue e}return{depth:t,fit:s,move:i?e.doc.resolve(e.after(t+1)):e}}}}},{key:"close",value:function(e){var t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=q(this.placed,t.depth,t.fit)),e=t.move;for(var n=t.depth+1;n<=e.depth;n++){var r=e.node(n),o=r.type.contentMatch.fillBefore(r.content,!0,e.index(n));this.openFrontierNode(r.type,r.attrs,o)}return e}},{key:"openFrontierNode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=q(this.placed,this.depth,m.Fragment.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}},{key:"closeFrontierNode",value:function(){var e=this.frontier.pop().match.fillBefore(m.Fragment.empty,!0);e.childCount&&(this.placed=q(this.placed,this.frontier.length,e))}}]),e}();function U(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(U(e.firstChild.content,t-1,n)))}function q(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(q(e.lastChild.content,t-1,n)))}function V(e,t){for(var n=0;n<t;n++)e=e.firstChild.content;return e}function K(e,t,n){if(t<=0)return e;var r=e.content;return t>1&&(r=r.replaceChild(0,K(r.firstChild,t-1,1==r.childCount?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(m.Fragment.empty,!0)))),e.copy(r)}function Y(e,t,n,r,o){var i=e.node(t),s=o?e.indexAfter(t):e.index(t);if(s==i.childCount&&!n.compatibleContent(i.type))return null;var a=r.fillBefore(i.content,!0,s);return a&&!function(e,t,n){for(var r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,i.content,s)?a:null}function G(e,t,n,r,o){if(t<n){var i=e.firstChild;e=e.replaceChild(0,i.copy(G(i.content,t+1,n,r,i)))}if(t>r){var s=o.contentMatchAt(0),a=s.fillBefore(e).append(e);e=a.append(s.matchFragment(a).fillBefore(m.Fragment.empty,!0))}return e}function X(e,t){for(var n=[],r=Math.min(e.depth,t.depth);r>=0;r--){var o=e.start(r);if(o<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&n.push(r)}return n}var Z=function(e){s(n,e);var t=l(n);function n(e,r,o){var i;return p(this,n),(i=t.call(this)).pos=e,i.attr=r,i.value=o,i}return f(n,[{key:"apply",value:function(e){var t=e.nodeAt(this.pos);if(!t)return S.fail("No node at attribute step's position");var n=Object.create(null);for(var r in t.attrs)n[r]=t.attrs[r];n[this.attr]=this.value;var o=t.type.create(n,null,t.marks);return S.fromReplace(e,this.pos,this.pos+1,new m.Slice(m.Fragment.from(o),0,t.isLeaf?0:1))}},{key:"getMap",value:function(){return k.empty}},{key:"invert",value:function(e){return new n(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}},{key:"map",value:function(e){var t=e.mapResult(this.pos,1);return t.deletedAfter?null:new n(t.pos,this.attr,this.value)}},{key:"toJSON",value:function(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.pos||"string"!=typeof t.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new n(t.pos,t.attr,t.value)}}]),n}(b);b.jsonID("attr",Z);var Q=function(e){s(n,e);var t=l(n);function n(e,r){var o;return p(this,n),(o=t.call(this)).attr=e,o.value=r,o}return f(n,[{key:"apply",value:function(e){var t=Object.create(null);for(var n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;var r=e.type.create(t,e.content,e.marks);return S.ok(r)}},{key:"getMap",value:function(){return k.empty}},{key:"invert",value:function(e){return new n(this.attr,e.attrs[this.attr])}},{key:"map",value:function(e){return this}},{key:"toJSON",value:function(){return{stepType:"docAttr",attr:this.attr,value:this.value}}}],[{key:"fromJSON",value:function(e,t){if("string"!=typeof t.attr)throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new n(t.attr,t.value)}}]),n}(b);b.jsonID("docAttr",Q),t.TransformError=function(e){s(n,e);var t=l(n);function n(){return p(this,n),t.apply(this,arguments)}return f(n)}(o(Error)),t.TransformError=function e(t){var n=Error.call(this,t);return n.__proto__=e.prototype,n},t.TransformError.prototype=Object.create(Error.prototype),t.TransformError.prototype.constructor=t.TransformError,t.TransformError.prototype.name="TransformError";var ee=function(){function e(t){p(this,e),this.doc=t,this.steps=[],this.docs=[],this.mapping=new w}return f(e,[{key:"before",get:function(){return this.docs.length?this.docs[0]:this.doc}},{key:"step",value:function(e){var n=this.maybeStep(e);if(n.failed)throw new t.TransformError(n.failed);return this}},{key:"maybeStep",value:function(e){var t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}},{key:"docChanged",get:function(){return this.steps.length>0}},{key:"addStep",value:function(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}},{key:"replace",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:m.Slice.empty,r=H(this.doc,e,t,n);return r&&this.step(r),this}},{key:"replaceWith",value:function(e,t,n){return this.replace(e,t,new m.Slice(m.Fragment.from(n),0,0))}},{key:"delete",value:function(e,t){return this.replace(e,t,m.Slice.empty)}},{key:"insert",value:function(e,t){return this.replaceWith(e,e,t)}},{key:"replaceRange",value:function(e,t,n){return function(e,t,n,r){if(!r.size)return e.deleteRange(t,n);var o=e.doc.resolve(t),i=e.doc.resolve(n);if(W(o,i,r))return e.step(new T(t,n,r));var s=X(o,e.doc.resolve(n));0==s[s.length-1]&&s.pop();var a=-(o.depth+1);s.unshift(a);for(var l=o.depth,c=o.pos-1;l>0;l--,c--){var u=o.node(l).type.spec;if(u.defining||u.definingAsContext||u.isolating)break;s.indexOf(l)>-1?a=l:o.before(l)==c&&s.splice(1,0,-l)}for(var h,p=s.indexOf(a),d=[],f=r.openStart,g=r.content,v=0;;v++){var y=g.firstChild;if(d.push(y),v==r.openStart)break;g=y.content}for(var k=f-1;k>=0;k--){var w=d[k],x=(h=w.type).spec.defining||h.spec.definingForContent;if(x&&!w.sameMarkup(o.node(Math.abs(a)-1)))f=k;else if(x||!w.type.isTextblock)break}for(var b=r.openStart;b>=0;b--){var S=(b+f+1)%(r.openStart+1),C=d[S];if(C)for(var M=0;M<s.length;M++){var O=s[(M+p)%s.length],E=!0;O<0&&(E=!1,O=-O);var A=o.node(O-1),R=o.index(O-1);if(A.canReplaceWith(R,R,C.type,C.marks))return e.replace(o.before(O),E?i.after(O):n,new m.Slice(G(r.content,0,r.openStart,S),S,r.openEnd))}}for(var N=e.steps.length,I=s.length-1;I>=0&&(e.replace(t,n,r),!(e.steps.length>N));I--){var D=s[I];D<0||(t=o.before(D),n=i.after(D))}}(this,e,t,n),this}},{key:"replaceRangeWith",value:function(e,t,n){return function(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){var o=j(e.doc,t,r.type);null!=o&&(t=n=o)}e.replaceRange(t,n,new m.Slice(m.Fragment.from(r),0,0))}(this,e,t,n),this}},{key:"deleteRange",value:function(e,t){return function(e,t,n){for(var r=e.doc.resolve(t),o=e.doc.resolve(n),i=X(r,o),s=0;s<i.length;s++){var a=i[s],l=s==i.length-1;if(l&&0==a||r.node(a).type.contentMatch.validEnd)return e.delete(r.start(a),o.end(a));if(a>0&&(l||r.node(a-1).canReplace(r.index(a-1),o.indexAfter(a-1))))return e.delete(r.before(a),o.after(a))}for(var c=1;c<=r.depth&&c<=o.depth;c++)if(t-r.start(c)==r.depth-c&&n>r.end(c)&&o.end(c)-n!=o.depth-c)return e.delete(r.before(c),n);e.delete(t,n)}(this,e,t),this}},{key:"lift",value:function(e,t){return function(e,t,n){for(var r=t.$from,o=t.$to,i=t.depth,s=r.before(i+1),a=o.after(i+1),l=s,c=a,u=m.Fragment.empty,h=0,p=i,d=!1;p>n;p--)d||r.index(p)>0?(d=!0,u=m.Fragment.from(r.node(p).copy(u)),h++):l--;for(var f=m.Fragment.empty,g=0,v=i,y=!1;v>n;v--)y||o.after(v+1)<o.end(v)?(y=!0,f=m.Fragment.from(o.node(v).copy(f)),g++):c++;
1e.step(new R(l,c,s,a,new m.Slice(u.append(f),h,g),u.size-h,!0))}(this,e,t),this}},{key:"join",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return B(this,e,t),this}},{key:"wrap",value:function(e,t){return function(e,t,n){for(var r=m.Fragment.empty,o=n.length-1;o>=0;o--){if(r.size){var i=n[o].type.contentMatch.matchFragment(r);if(!i||!i.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=m.Fragment.from(n[o].type.create(n[o].attrs,r))}var s=t.start,a=t.end;e.step(new R(s,a,s,a,new m.Slice(r,0,0),n.length,!0))}(this,e,t),this}},{key:"setBlockType",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return P(this,e,t,n,r),this}},{key:"setNodeMarkup",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3?arguments[3]:void 0;return $(this,e,t,n,r),this}},{key:"setNodeAttribute",value:function(e,t,n){return this.step(new Z(e,t,n)),this}},{key:"setDocAttribute",value:function(e,t){return this.step(new Q(e,t)),this}},{key:"addNodeMark",value:function(e,t){return this.step(new E(e,t)),this}},{key:"removeNodeMark",value:function(e,t){if(!(t instanceof m.Mark)){var n=this.doc.nodeAt(e);if(!n)throw new RangeError("No node at position "+e);if(!(t=t.isInSet(n.marks)))return this}return this.step(new A(e,t)),this}},{key:"split",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2?arguments[2]:void 0;return z(this,e,t,n),this}},{key:"addMark",value:function(e,t,n){return function(e,t,n,r){var o,i,s=[],a=[];e.doc.nodesBetween(t,n,(function(e,l,c){if(e.isInline){var u=e.marks;if(!r.isInSet(u)&&c.type.allowsMarkType(r.type)){for(var h=Math.max(l,t),p=Math.min(l+e.nodeSize,n),d=r.addToSet(u),f=0;f<u.length;f++)u[f].isInSet(d)||(o&&o.to==h&&o.mark.eq(u[f])?o.to=p:s.push(o=new O(h,p,u[f])));i&&i.to==h?i.to=p:a.push(i=new M(h,p,r))}}})),s.forEach((function(t){return e.step(t)})),a.forEach((function(t){return e.step(t)}))}(this,e,t,n),this}},{key:"removeMark",value:function(e,t,n){return function(e,t,n,r){var o=[],i=0;e.doc.nodesBetween(t,n,(function(e,s){if(e.isInline){i++;var a=null;if(r instanceof m.MarkType)for(var l,c=e.marks;l=r.isInSet(c);)(a||(a=[])).push(l),c=l.removeFromSet(c);else r?r.isInSet(e.marks)&&(a=[r]):a=e.marks;if(a&&a.length)for(var u=Math.min(s+e.nodeSize,n),h=0;h<a.length;h++){for(var p=a[h],d=void 0,f=0;f<o.length;f++){var g=o[f];g.step==i-1&&p.eq(o[f].style)&&(d=g)}d?(d.to=u,d.step=i):o.push({style:p,from:Math.max(s,t),to:u,step:i})}}})),o.forEach((function(t){return e.step(new O(t.from,t.to,t.style))}))}(this,e,t,n),this}},{key:"clearIncompatible",value:function(e,t,n){return function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.contentMatch,o=e.doc.nodeAt(t),i=[],s=t+1,a=0;a<o.childCount;a++){var l=o.child(a),c=s+l.nodeSize,u=r.matchType(l.type);if(u){r=u;for(var h=0;h<l.marks.length;h++)n.allowsMarkType(l.marks[h].type)||e.step(new O(s,c,l.marks[h]));if(l.isText&&!n.spec.code)for(var p=void 0,d=/\r?\n|\r/g,f=void 0;p=d.exec(l.text);)f||(f=new m.Slice(m.Fragment.from(n.schema.text(" ",n.allowedMarks(l.marks))),0,0)),i.push(new T(s+p.index,s+p.index+p[0].length,f))}else i.push(new T(s,c,m.Slice.empty));s=c}if(!r.validEnd){var g=r.fillBefore(m.Fragment.empty,!0);e.replace(s,s,new m.Slice(g,0,0))}for(var v=i.length-1;v>=0;v--)e.step(i[v])}(this,e,t,n),this}}]),e}();t.AddMarkStep=M,t.AddNodeMarkStep=E,t.AttrStep=Z,t.DocAttrStep=Q,t.MapResult=y,t.Mapping=w,t.RemoveMarkStep=O,t.RemoveNodeMarkStep=A,t.ReplaceAroundStep=R,t.ReplaceStep=T,t.Step=b,t.StepMap=k,t.StepResult=S,t.Transform=ee,t.canJoin=function(e,t){var n=e.resolve(t),r=n.index();return F(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)},t.canSplit=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,o=e.resolve(t),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(var a=o.depth-1,l=n-2;a>i;a--,l--){var c=o.node(a),u=o.index(a);if(c.type.spec.isolating)return!1;var h=c.content.cutByIndex(u,c.childCount),p=r&&r[l+1];p&&(h=h.replaceChild(0,p.type.create(p.attrs)));var d=r&&r[l]||c;if(!c.canReplace(u+1,c.childCount)||!d.type.validContent(h))return!1}var f=o.indexAfter(i),m=r&&r[0];return o.node(i).canReplaceWith(f,f,m?m.type:o.node(i+1).type)},t.dropPoint=function(e,t,n){var r=e.resolve(t);if(!n.content.size)return t;for(var o=n.content,i=0;i<n.openStart;i++)o=o.firstChild.content;for(var s=1;s<=(0==n.openStart&&n.size?2:1);s++)for(var a=r.depth;a>=0;a--){var l=a==r.depth?0:r.pos<=(r.start(a+1)+r.end(a+1))/2?-1:1,c=r.index(a)+(l>0?1:0),u=r.node(a),h=!1;if(1==s)h=u.canReplace(c,c,o);else{var p=u.contentMatchAt(c).findWrapping(o.firstChild.type);h=p&&u.canReplaceWith(c,c,p[0])}if(h)return 0==l?r.pos:l<0?r.before(a+1):r.after(a+1)}return null}
1,t.findWrapping=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,o=_(e,t),i=o&&L(r,t);return i?o.map(D).concat({type:t,attrs:n}).concat(i.map(D)):null},t.insertPoint=j,t.joinPoint=function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=e.resolve(t),o=r.depth;;o--){var i=void 0,s=void 0,a=r.index(o);if(o==r.depth?(i=r.nodeBefore,s=r.nodeAfter):n>0?(i=r.node(o+1),a++,s=r.node(o).maybeChild(a)):(i=r.node(o).maybeChild(a-1),s=r.node(o+1)),i&&!i.isTextblock&&F(i,s)&&r.node(o).canReplace(a,a+1))return t;if(0==o)break;t=n<0?r.before(o):r.after(o)}},t.liftTarget=function(e){for(var t=e.parent.content.cutByIndex(e.startIndex,e.endIndex),n=e.depth;;--n){var r=e.$from.node(n),o=e.$from.index(n),i=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(o,i,t))return n;if(0==n||r.type.spec.isolating||!I(r,o,i))break}return null},t.replaceStep=H},26691:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});for(var n={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},r={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},o="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),i="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),s=0;s<10;s++)n[48+s]=n[96+s]=String(s);for(s=1;s<=24;s++)n[s+111]="F"+s;for(s=65;s<=90;s++)n[s]=String.fromCharCode(s+32),r[s]=String.fromCharCode(s);for(var a in n)r.hasOwnProperty(a)||(r[a]=n[a]);t.base=n,t.keyName=function(e){var t=!(o&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||i&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?r:n)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t},t.shift=r},61082:function(e,t,n){"use strict";n.d(t,{cx:function(){return r}});var r=function(){const e=Array.prototype.slice.call(arguments).filter(Boolean),t={},n=[];e.forEach((e=>{(e?e.split(" "):[]).forEach((e=>{if(e.startsWith("atm_")){const[,n]=e.split("_");t[n]=e}else n.push(e)}))}));const r=[];for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&r.push(t[o]);return r.push(...n),r.join(" ")}},33937:function(e,t,n){"use strict";n.d(t,{Q2:function(){return I},PZ:function(){return x},V1:function(){return L},EP:function(){return ce},NZ:function(){return m},as:function(){return Pe},hK:function(){return M},JB:function(){return O},Kk:function(){return C},Tr:function(){return E},EM:function(){return N},qh:function(){return $e},QC:function(){return oe},Lp:function(){return ae},JN:function(){return Q},Me:function(){return ue},IH:function(){return ne},FI:function(){return se},jo:function(){return z},JM:function(){return ie},C2:function(){return g},b0:function(){return le},yZ:function(){return T},OC:function(){return ge},d7:function(){return U},xN:function(){return ee},$q:function(){return X},mV:function(){return y},jd:function(){return k},mp:function(){return te},OA:function(){return be},pI:function(){return $},yw:function(){return G},Ig:function(){return R},$9:function(){return w},EG:function(){return Y},mt:function(){return j},K_:function(){return H},PH:function(){return B},gf:function(){return P},Ab:function(){return A},GK:function(){return Ce},sg:function(){return Se},hT:function(){return J},X3:function(){return ke},Cf:function(){return ze},bk:function(){return _},x2:function(){return Fe},Kh:function(){return ye},Em:function(){return me},P9:function(){return De},aS:function(){return b},IY:function(){return S},lp:function(){return Ne},uJ:function(){return Ae},yL:function(){return v},zU:function(){return Te},bm:function(){return Ee},dy:function(){return Me},ym:function(){return Oe}});var r=n(378),o=n(57555),i=n(2376),s=n(16560),a=n(25477);function l(e,t){return function(e){return(0,a.Z)(e)}(e)+":"+t}function c(){return"undefined"!==typeof document?document:null}var u=n(47650),h=n(12806),p=(n(1161),n(36912)),d=n(84799),f=n(83454),m={get isBrowser(){return!("undefined"===typeof window||"undefined"===typeof window.document||!window.navigator||!window.navigator.userAgent)},get isJSDOM(){return m.isBrowser&&window.navigator.userAgent.includes("jsdom")},get isNode(){return"undefined"!==typeof f&&null!=f.versions&&null!=f.versions.node},get isIos(){return m.isBrowser&&/iPod|iPhone|iPad/.test(navigator.platform)},get isMac(){return m.isBrowser&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)},get isApple(){return m.isNode?"darwin"===f.platform:!!m.isBrowser&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform)},get isDevelopment(){return!1},get isTest(){return!1},get isProduction(){return!0}};function g(e,t){var n;const r=pe(e);return(null==(n=null==r?void 0:r.getComputedStyle(e))?void 0:n.getPropertyValue(t))??""}function v(e,t){return Object.assign(e.style,t)}function y(e){return(0,o.Kn)(e)&&(0,o.hj)(e.nodeType)&&(0,o.HD)(e.nodeName)}function k(e){return y(e)&&1===e.nodeType}function w(e){const{types:t,node:n}=e;if(!n)return!1;const r=e=>e===n.type||e===n.type.name;return(0,o.kJ)(t)?t.some(r):r(t)}function x(e,t){const{tr:n}=t;return e.forEach((e=>{e.steps.forEach((e=>{n.step(e)}))})),n}function b({pos:e,tr:t}){const n=t.doc.nodeAt(e);return n&&t.delete(e,e+n.nodeSize),t}function S({pos:e,tr:t,content:n}){const r=t.doc.nodeAt(e);return r&&t.replaceWith(e,e+r.nodeSize,n),t}function C(e){const{predicate:t,selection:n}=e,r=W(n)?n.selection.$from:q(n)?n.$from:n;for(let o=r.depth;o>0;o--){const e=r.node(o),n=o>0?r.before(o):0,i=r.start(o),s=n+e.nodeSize;if(t(e,n))return{pos:n,depth:o,node:e,start:i,end:s}}}function M(e){const{depth:t}=e,n=t>0?e.before(t):0,r=e.node(t);return{pos:n,start:e.start(t),node:r,end:n+r.nodeSize,depth:t}}function O(e){const t=C({predicate:()=>!0,selection:e});return(0,o.kG)(t,{message:"No parent node found for the selection provided."}),t}function E(e){const{types:t,selection:n}=e;return C({predicate:e=>w({types:t,node:e}),selection:n})}function A(e){return q(e)?e.empty:e.selection.empty}function T(e){return e.docChanged||e.selectionSet}function R(e){return!!N(e)}function N(e){const{state:t,type:n,attrs:i}=e,{selection:s,doc:a}=t,l=(0,o.HD)(n)?a.type.schema.nodes[n]:n;(0,o.kG)(l,{code:r.mA.SCHEMA,message:`No node exists for ${n}`});const c=function(e){const{types:t,selection:n}=e;if(Y(n)&&w({types:t,node:n.node}))return{pos:n.$from.pos,depth:n.$from.depth,start:n.$from.start(),end:n.$from.pos+n.node.nodeSize,node:n.node}}({selection:s,types:n})??C({predicate:e=>e.type===l,selection:s});return i&&!(0,o.Qr)(i)&&c?c.node.hasMarkup(l,{...c.node.attrs,...i})?c:void 0:c}function I(...e){return t=>{if(!(0,o.Of)(e))return!1;const[n,...r]=e;let i=!1;const s=(...e)=>()=>{if(!(0,o.Of)(e))return!1;i=!0;const[,...n]=e;return I(...e)({...t,next:s(...n)})},a=s(...r),l=n({...t,next:a});return i||l?l:a()}}function D(e,t){const n=new Map,r=(0,o.Ry)();for(const i of e)for(const[e,s]of(0,o.qh)(i)){const o=[...n.get(e)??[],s],i=I(...o);n.set(e,o),r[e]=t(i)}return r}function _(e){return D(e,(e=>(t,n,r)=>e({state:t,dispatch:n,view:r,tr:t.tr,next:()=>!1})))}function L(e,t){const n=e.attrs??{};return Object.entries(t).every((([e,t])=>n[e]===t))}function P(e){return(0,o.Kn)(e)}function $(e,t){return(0,o.kJ)(t)?(0,o.q9)(t,e[r.By]):t===e[r.By]}function z(e,t){return(0,o.HD)(e)?(0,o.fp)(t.nodes,e):e}function F(e){return(0,o.Kn)(e)&&e instanceof h.ZU}function B(e){return(0,o.Kn)(e)&&e instanceof h.NB}function j(e){return(0,o.Kn)(e)&&e instanceof h.HY}function H(e){return(0,o.Kn)(e)&&e instanceof h.vc}function W(e){return(0,o.Kn)(e)&&e instanceof i.yy}function J(e){return(0,o.Kn)(e)&&e instanceof i.Bs}function U(e){return(0,o.Kn)(e)&&e instanceof i.C1}function q(e){return(0,o.Kn)(e)&&e instanceof i.Y1}function V(e){return(0,o.Kn)(e)&&e instanceof h.ZQ}function K(e){const{trState:t,from:n,to:r,type:i,attrs:s={}}=e,{doc:a}=t,l=function(e,t){return(0,o.HD)(e)?(0,o.fp)(t.marks,e):e}(i,a.type.schema);if(0===Object.keys(s).length)return a.rangeHasMark(n,r,l);let c=!1;return r>n&&a.nodesBetween(n,r,(e=>{if(c)return!1;const t=e.marks??[];return c=t.some((e=>e.type===l&&L(e,s))),!c})),c}function Y(e){return(0,o.Kn)(e)&&e instanceof i.qv}function G(e){const{trState:t,type:n,attrs:i={},from:s,to:a}=e,{selection:l,doc:c,storedMarks:u}=t,h=(0,o.HD)(n)?c.type.schema.marks[n]:n;
1if((0,o.kG)(h,{code:r.mA.SCHEMA,message:`Mark type: ${n} does not exist on the current schema.`}),s&&a)try{return Math.max(s,a)<c.nodeSize&&K({...e,from:s,to:a})}catch{return!1}if(l.empty){return(u??l.$from.marks()).some((e=>e.type===n&&L(e,i??{})))}return K({...e,from:l.from,to:l.to})}function X(e,t={}){const n=function(e){var t;return(null==(t=e.nodes.doc)?void 0:t.createAndFill())??void 0}(e.type.schema);if(!n)return!1;const{ignoreAttributes:r,ignoreDocAttributes:o}=t;return r?Z(n,e):o?n.content.eq(e.content):n.eq(e)}function Z(e,t){if(e===t)return!0;return e.type===t.type&&h.vc.sameSet(e.marks,t.marks)&&function(){if(e.content===t.content)return!0;if(e.content.size!==t.content.size)return!1;const n=[],r=[];e.content.forEach((e=>n.push(e))),t.content.forEach((e=>r.push(e)));for(const[e,t]of n.entries()){const n=r[e];if(!n)return!1;if(!Z(t,n))return!1}return!0}()}function Q(e){for(const t of Object.values(e.nodes))if("doc"!==t.name&&(t.isBlock||t.isTextblock))return t;(0,o.kG)(!1,{code:r.mA.SCHEMA,message:"No default block node found for the provided schema."})}function ee(e){return e.type===Q(e.type.schema)}function te(e){return!!e&&e.type.isBlock&&!e.textContent&&!e.childCount}function ne(e,t,n){const i=e.parent.childAfter(e.parentOffset);if(!i.node)return;const s=(0,o.HD)(t)?t:t.name,a=i.node.marks.find((({type:e})=>e.name===s));let l=e.index(),c=e.start()+i.offset,u=l+1,h=c+i.node.nodeSize;if(!a)return n&&h<n.pos?ne(e.doc.resolve(h+1),t,n):void 0;for(;l>0&&a.isInSet(e.parent.child(l-1).marks);)l-=1,c-=e.parent.child(l).nodeSize;for(;u<e.parent.childCount&&a.isInSet(e.parent.child(u).marks);)h+=e.parent.child(u).nodeSize,u+=1;return{from:c,to:h,text:e.doc.textBetween(c,h,r.Z9,"\n\n"),mark:a}}function re(e,t){return 0===t.length||t.some((t=>e instanceof t))}function oe(e,t=[]){const n=[],{steps:r,mapping:i}=e,a=i.invert();r.forEach(((e,r)=>{if(!re(e,t))return;const o=[],l=e.getMap(),c=i.slice(r);if(0===l.ranges.length&&function(e){return re(e,[s.WJ,s.FC,s.Pu,s.xu])}(e)){const{from:t,to:n}=e;o.push({from:t,to:n})}else l.forEach(((e,t)=>{o.push({from:e,to:t})}));o.forEach((e=>{const t=c.map(e.from,-1),r=c.map(e.to);n.push({from:t,to:r,prevFrom:a.map(t,-1),prevTo:a.map(r)})}))}));return function(e){return(0,o.uw)(e,(({from:e,to:t,prevFrom:n,prevTo:r})=>`${e}_${t}_${n}_${r}`)).filter(((e,t,n)=>!n.some(((n,r)=>t!==r&&e.prevFrom>=n.prevFrom&&e.prevTo<=n.prevTo&&e.from>=n.from&&e.to<=n.to))))}((0,o.DY)(n,((e,t)=>e.from-t.from)))}function ie(e){return function(e,t){if(!J(e.selection))return;let{from:n,to:o}=e.selection;const s=(t,n)=>function(e){var t;return(null==(t=e.content.firstChild)?void 0:t.textContent)??""}(i.Bs.between(e.doc.resolve(t),e.doc.resolve(n)).content());for(let r=s(n-1,n);r&&!t.test(r);n--,r=s(n-1,n));for(let r=s(o,o+1);r&&!t.test(r);o++,r=s(o,o+1));if(n===o)return;return{from:n,to:o,text:e.doc.textBetween(n,o,r.Z9,"\n\n")}}(e,/\W/)}function se(e,t=0){const n=(0,o.kJ)(e)?e[t]:e;return(0,o.hu)((0,o.HD)(n),`No match string found for match ${e}`),n??""}function ae(e){return J(e)?e.$cursor:void 0}function le(e,t){const n=t.nodeSize-2;let r;const s=e=>(0,o.uZ)({min:0,max:n,value:e});if(q(e))return e;if("all"===e)return new i.C1(t);if(r="start"===e?0:"end"===e?n:V(e)?e.pos:e,(0,o.hj)(r))return r=s(r),i.Bs.near(t.resolve(r));if(a=r,(0,o.Kn)(a)&&(0,o.hj)(a.anchor)&&(0,o.hj)(a.head)){const e=s(r.anchor),n=s(r.head);return i.Bs.between(t.resolve(e),t.resolve(n))}var a;const l=s(r.from),c=s(r.to);return i.Bs.between(t.resolve(l),t.resolve(c))}function ce(e){const{content:t,schema:n,document:i,stringHandler:s,onError:a,attempts:l=0}=e,c=a&&l<=3||0===l;if((0,o.kG)(c,{code:r.mA.INVALID_CONTENT,message:"The invalid content has been called recursively more than ${MAX_ATTEMPTS} times. The content is invalid and the error handler has not been able to recover properly."}),(0,o.HD)(t)){(0,o.kG)(s,{code:r.mA.INVALID_CONTENT,message:`The string '${t}' was added to the editor, but no \`stringHandler\` was added. Please provide a valid string handler which transforms your content to a \`ProsemirrorNode\` to prevent this error.`});return s({document:i,content:t,schema:n})}if(W(t))return t.doc;if(B(t))return t;try{return n.nodeFromJSON(t)}catch(u){const i=function({json:e,schema:t,...n}){const r=new Set((0,o.XP)(t.marks)),i=new Set((0,o.XP)(t.nodes)),s=xe({json:e,path:[],validNodes:i,validMarks:r});return{json:e,invalidContent:s,transformers:we,...n}}({schema:n,error:u,json:t}),s=null==a?void 0:a(i);return(0,o.kG)(s,{code:r.mA.INVALID_CONTENT,message:`An error occurred when processing the content. Please provide an \`onError\` handler to process the invalid content: ${JSON.stringify(i.invalidContent,null,2)}`}),ce({...e,content:s,attempts:l+1})}}function ue(){const e=c();if(e)return e;throw new Error("Unable to retrieve the document from the global scope. \nIt seems that you are running Remirror in a non-browser environment. Remirror need browser APIs to work. \nIf you are using Jest (or other testing frameworks), make sure that you are using the JSDOM environment (https://jestjs.io/docs/29.0/configuration#testenvironment-string). \nIf you are using Next.js (or other server-side rendering frameworks), please use dynamic import with `ssr: false` to load the editor component without rendering it on the server (https://nextjs.org/docs/advanced-features/dynamic-import#with-no-ssr). \nIf you are using Node.js, you can install JSDOM and Remirror will try to use it automatically, or you can create a fake document and pass it to Remirror")}function he(e){var t;return(null==e?void 0:e.defaultView)??("undefined"!==typeof window?window:void 0)??(null==(t=c())?void 0:t.defaultView)}function pe(e){return he(null==e?void 0:e.ownerDocument)}function de(e){const t=he(e)??ue().defaultView;if(t)return t;throw new Error("Unable to retrieve the window from the global scope")}
1function fe(e,t=ue()){const n=function(e,t){return!!B(e)&&(t?e.type===t.nodes.doc:"doc"===e.type.name)}(e,e.type.schema)?e.content:h.HY.from(e);return h.PW.fromSchema(e.type.schema).serializeFragment(n,{document:t})}function me(e,t=ue()){const n=t.createElement("div");return n.append(fe(e,t)),n.innerHTML}function ge(e){const{content:t,schema:n,document:r,fragment:o=!1,...i}=e,s=function(e,t){return(new(de(t).DOMParser)).parseFromString(`<body>${e}</body>`,"text/html").body}(t,r),a=h.aw.fromSchema(n);return o?a.parseSlice(s,{...ve,...i}).content:a.parse(s,{...ve,...i})}var ve={preserveWhitespace:!1};function ye(e,t){const n=(0,o.XP)(t.defaults());return u({...e},n)}function ke(e,t){let n="";t&&(n=`${t.trim()}`);const r=function(e){var t="";for(var n in e){var r=e[n];"string"!==typeof r&&"number"!==typeof r||(t&&(t+=";"),t+=l(n,r))}return t}(e);if(!r)return n;const o=(n.endsWith(";")," ");return`${n}${o}${r}`}var we={remove(e,t){let n=e;for(const r of t)r.invalidParentNode||(n=(0,o.zN)(r.path,n));return n}};function xe(e){const{json:t,validMarks:n,validNodes:r,path:i=[]}=e,s={validMarks:n,validNodes:r},a=[],{type:l,marks:c,content:u}=t;let{invalidParentMark:h=!1,invalidParentNode:p=!1}=e;if(c){const e=[];for(const[t,r]of c.entries()){const s=(0,o.HD)(r)?r:r.type;n.has(s)||(e.unshift({name:s,path:[...i,"marks",`${t}`],type:"mark",invalidParentMark:h,invalidParentNode:p}),h=!0)}a.push(...e)}if(r.has(l)||(a.push({name:l,type:"node",path:i,invalidParentMark:h,invalidParentNode:p}),p=!0),u){const e=[];for(const[t,n]of u.entries())e.unshift(...xe({...s,json:n,path:[...i,"content",`${t}`],invalidParentMark:h,invalidParentNode:p}));a.unshift(...e)}return a}function be(e){return!!(J(e)&&e.$cursor&&e.$cursor.parentOffset>=e.$cursor.parent.content.size)}function Se(e){return!!(J(e)&&e.$cursor&&e.$cursor.parentOffset<=0)}function Ce(e){const t=i.Y1.atStart(e.$anchor.doc);return!(!Se(e)||t.anchor!==e.anchor)}function Me(e){return({dispatch:t,tr:n})=>{const{type:r,attrs:s=(0,o.Ry)(),appendText:a,range:l}=e,c=l?i.Bs.between(n.doc.resolve(l.from),n.doc.resolve(l.to)):n.selection,{$from:u,from:h,to:p}=c;let d=0===u.depth&&n.doc.type.allowsMarkType(r);return n.doc.nodesBetween(h,p,(e=>{if(d)return!1;e.inlineContent&&e.type.allowsMarkType(r)&&(d=!0)})),!!d&&(null==t||t(n.addMark(h,p,r.create(s))&&a?n.insertText(a):n),!0)}}function Oe(e,t={},n){return function(r){const{tr:i,dispatch:a,state:l}=r,c=(0,o.HD)(e)?(0,o.fp)(l.schema.nodes,e):e,{from:u,to:h}=le(n??i.selection,i.doc),p=i.doc.resolve(u),d=i.doc.resolve(h),f=p.blockRange(d),m=f&&(0,s.nd)(f,c,t);return!(!m||!f)&&(null==a||a(i.wrap(f,m).scrollIntoView()),!0)}}function Ee(e,t={},n){return r=>{const{tr:i,state:a}=r;return N({state:i,type:(0,o.HD)(e)?(0,o.fp)(a.schema.nodes,e):e,attrs:t})?function({tr:e,dispatch:t}){const{$from:n,$to:r}=e.selection,i=n.blockRange(r),a=i&&(0,s.k9)(i);return!(!(0,o.hj)(a)||!i)&&(null==t||t(e.lift(i,a).scrollIntoView()),!0)}(r):Oe(e,t,n)(r)}}function Ae(e,t,n,r=!0){return function(i){const{tr:s,dispatch:a,state:l}=i,c=(0,o.HD)(e)?(0,o.fp)(l.schema.nodes,e):e,{from:u,to:h}=le(n??s.selection,s.doc);let p,d=!1;return s.doc.nodesBetween(u,h,((e,n)=>{if(d)return!1;if(!e.isTextblock||e.hasMarkup(c,t))return;if(e.type===c)return d=!0,void(p=e.attrs);const r=s.doc.resolve(n),o=r.index();d=r.parent.canReplaceWith(o,o+1,c),d&&(p=r.parent.attrs)})),!!d&&(null==a||a(s.setBlockType(u,h,c,{...r?p:{},...t}).scrollIntoView()),!0)}}function Te(e){return t=>{const{tr:n,state:r}=t,{type:o,attrs:i,preserveAttrs:s=!0}=e,a=N({state:n,type:o,attrs:i}),l=e.toggleType??Q(r.schema);if(a)return Ae(l,{...s?a.node.attrs:{},...i})(t);const c=N({state:n,type:l,attrs:i});return Ae(o,{...s?null==c?void 0:c.node.attrs:{},...i})(t)}}function Re(e=0){const t=navigator.userAgent.match(/Chrom(e|ium)\/(\d+)\./);return!!t&&Number.parseInt((0,o.fp)(t,2),10)>=e}function Ne(e){const{attrs:t={},appendText:n="",content:s="",keepSelection:a=!1,range:l}=e;return({state:c,tr:u,dispatch:p})=>{var d;const f=c.schema,m=le(e.selection??l??u.selection,u.doc),g=m.$from.index(),{from:v,to:y,$from:k}=m,w=(0,o.HD)(e.type)?f.nodes[e.type]??f.marks[e.type]:e.type;if((0,o.kG)(!(0,o.HD)(e.type)||w,{code:r.mA.SCHEMA,message:`Schema contains 
1no marks or nodes with name ${w}`}),x=w,(0,o.Kn)(x)&&x instanceof h.Jq){if(!k.parent.canReplaceWith(g,g,w))return!1;u.replaceWith(v,y,w.create(t,s?f.text(s):void 0))}else(0,o.kG)(s,{message:"`replaceText` cannot be called without content when using a mark type"}),u.replaceWith(v,y,f.text(s,F(w)?[w.create(t)]:void 0));var x;return n&&u.insertText(n),a&&function(e,t){let{head:n,empty:r,anchor:o}=e;for(const i of t.steps)n=i.getMap().map(n);r?t.setSelection(i.Bs.near(t.doc.resolve(n))):t.setSelection(i.Bs.between(t.doc.resolve(o),t.doc.resolve(n)))}(c.selection,u),p&&(Re(60)&&(null==(d=document.getSelection())||d.empty()),p(u)),!0}}function Ie(e,t){const n=e.parent.childAfter(e.parentOffset);if(!n.node)return;const{marks:r,nodeSize:o}=n.node;if(r[0])return r[0].type;const i=e.start()+n.offset+o;return Ie(e.doc.resolve(i+1),t)}function De(e){return({dispatch:t,tr:n,state:i})=>{const{type:s,expand:a=!0,range:l}=e,c=le(e.selection??l??n.selection,n.doc);let{from:u,to:h,$from:p,$to:d}=c;const f=(0,o.HD)(s)?i.schema.marks[s]:s;null!==f&&(0,o.kG)(f,{code:r.mA.SCHEMA,message:`Mark type: ${s} does not exist on the current schema.`});const m=f??Ie(p);if(!m)return!1;const g=ne(p,m,d);return a&&g&&(u=Math.max(0,Math.min(u,g.from)),h=Math.min(Math.max(h,g.to),n.doc.nodeSize-2)),null==t||t(n.removeMark(u,(0,o.hj)(h)?h:u,F(f)?f:void 0)),!0}}function _e(e){const{node:t,predicate:n,descend:i=!0,action:s}=e;(0,o.kG)(B(t),{code:r.mA.INTERNAL,message:'Invalid "node" parameter passed to "findChildren".'}),(0,o.kG)((0,o.mf)(n),{code:r.mA.INTERNAL,message:'Invalid "predicate" parameter passed to "findChildren".'});const a=[];return t.descendants(((e,t)=>{const r={node:e,pos:t};return n(r)?(a.push(r),null==s||s(r),i):i})),a}function Le({predicate:e}){return t=>_e({...t,predicate:e})}Le({predicate:e=>e.node.isText}),Le({predicate:e=>e.node.isInline}),Le({predicate:e=>e.node.isBlock});function Pe(e){const{type:t,...n}=e;return _e({...n,predicate:e=>e.node.type===t})}function $e(e,t={}){const{descend:n=!1,predicate:r,StepTypes:o}=t,i=function(e,t){const n=[],r=oe(e,t);for(const o of r)try{const t=e.doc.resolve(o.from),r=e.doc.resolve(o.to),i=t.blockRange(r);i&&n.push(i)}catch{}return n}(e,o),s=[];for(const a of i){const{start:t,end:o}=a;e.doc.nodesBetween(t,o,((e,t)=>(((null==r?void 0:r(e,t,a))??!0)&&s.push({node:e,pos:t}),n)))}return s}function ze(e){const{regexp:t,type:n,getAttributes:i,ignoreWhitespace:s=!1,beforeDispatch:a,updateCaptured:l,shouldSkip:c,invalidMarks:u}=e;let h;const d=new p.VK(t,((e,t,p,f)=>{const{tr:m,schema:g}=e;h||(h=(0,o.HD)(n)?g.marks[n]:n,(0,o.kG)(h,{code:r.mA.SCHEMA,message:`Mark type: ${n} does not exist on the current schema.`}));let v=t[1],y=t[0];const k=Be({captureGroup:v,fullMatch:y,end:f,start:p,rule:d,state:e,ignoreWhitespace:s,invalidMarks:u,shouldSkip:c,updateCaptured:l});if(!k)return null;({start:p,end:f,captureGroup:v,fullMatch:y}=k);const w=(0,o.mf)(i)?i(t):i;let x=f,b=[];if(v){const e=y.search(/\S/),t=p+y.indexOf(v),n=t+v.length;b=m.storedMarks??[],n<f&&m.delete(n,f),t>p&&m.delete(p+e,t),x=p+e+v.length}return m.addMark(p,x,h.create(w)),m.setStoredMarks(b),null==a||a({tr:m,match:t,start:p,end:f}),m}));return d}function Fe(e){const{regexp:t,type:n,getAttributes:i,beforeDispatch:s,shouldSkip:a,ignoreWhitespace:l=!1,updateCaptured:c,invalidMarks:u}=e,h=new p.VK(t,((e,t,p,d)=>{const f=(0,o.mf)(i)?i(t):i,{tr:m,schema:g}=e,v=(0,o.HD)(n)?g.nodes[n]:n;let y=t[1],k=t[0];const w=Be({captureGroup:y,fullMatch:k,end:d,start:p,rule:h,state:e,ignoreWhitespace:l,invalidMarks:u,shouldSkip:a,updateCaptured:c});if(!w)return null;({start:p,end:d,captureGroup:y,fullMatch:k}=w),(0,o.kG)(v,{code:r.mA.SCHEMA,message:`No node exists for ${n} in the schema.`});const x=v.createAndFill(f);return x&&(m.replaceRangeWith(v.isBlock?m.doc.resolve(p).before():p,d,x),null==s||s({tr:m,match:[k,y??""],start:p,end:d})),m}));return h}function Be({captureGroup:e,fullMatch:t,end:n,start:r,rule:o,ignoreWhitespace:i,shouldSkip:s,updateCaptured:a,state:l,invalidMarks:c}){var u;if(null==t)return null;const h=(null==a?void 0:a({captureGroup:e,fullMatch:t,start:r,end:n}))??{};e=h.captureGroup??e,t=h.fullMatch??t,r=h.start??r,n=h.end??n;const p=l.doc.resolve(r),f=l.doc.resolve(n);return c&&(0,d.j4)({$from:p,$to:f},c)||o.invalidMarks&&(0,d.j4)({$from:p,$to:f},o.invalidMarks)||i&&""===(null==e?void 0:e.trim())||(null==s?void 0:s({state:l,captureGroup:e,fullMatch:t,start:r,end:n,ruleType:"mark"}))||(null==(u=o.shouldSkip)?void 0:u.call(o,{state:l,captureGroup:e,fullMatch:t,start:r,end:n,ruleType:"mark"}))?null:{captureGroup:e,end:n,fullMatch:t,start:r}}},31871:function(e,t,n){"use strict";n.d(t,{z:function(){return h}});var r=n(44573),o=n(378),i=n(33937),s=n(48776),a=n(36912),l=Object.defineProperty,c=Object.getOwnPropertyDescriptor,u=(e,t,n,r)=>{for(var o,i=r>1?void 0:r?c(t,n):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&l(t,n,i),i},h=class extends r.QR{get name(){return"blockquote"}createTags(){return[o.eX.Block,o.eX.FormattingNode]}createNodeSpec(e,t){return{content:"block+",defining:!0,draggable:!1,...t,attrs:e.defaults(),parseDOM:[{tag:"blockquote",getAttrs:e.parse,priority:100},...t.parseDOM??[]],toDOM:t=>["blockquote",e.dom(t),0]}}toggleBlockquote(){return(0,i.bm)(this.type)}shortcut(e){return this.toggleBlockquote()(e)}createInputRules(){return[(0,a.S0)(/^\s*>\s$/,this.type)]}
1createPasteRules(){return{type:"node",nodeType:this.type,regexp:/^\s*>\s$/,startOfTextBlock:!0}}};u([(0,r.WDe)({icon:"doubleQuotesL",description:({t:e})=>e(s.TU.DESCRIPTION),label:({t:e})=>e(s.TU.LABEL)})],h.prototype,"toggleBlockquote",1),u([(0,r.IGC)({shortcut:"Ctrl->",command:"toggleBlockquote"})],h.prototype,"shortcut",1)},56073:function(e,t,n){"use strict";n.d(t,{H:function(){return p}});var r=n(44573),o=n(378),i=n(33937),s=n(57555),a=n(48776),l=Object.defineProperty,c=Object.getOwnPropertyDescriptor,u=(e,t,n,r)=>{for(var o,i=r>1?void 0:r?c(t,n):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&l(t,n,i),i},h={icon:"bold",label:({t:e})=>e(a.ov.LABEL),description:({t:e})=>e(a.ov.DESCRIPTION)},p=class extends r.uS7{get name(){return"bold"}createTags(){return[o.eX.FormattingMark,o.eX.FontStyle]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"strong",getAttrs:e.parse},{tag:"b",getAttrs:t=>!(!(0,i.jd)(t)||"normal"===t.style.fontWeight)&&e.parse(t)},{style:"font-weight",getAttrs:e=>!(!(0,s.HD)(e)||!/^(bold(er)?|[5-9]\d{2,})$/.test(e))&&null},...t.parseDOM??[]],toDOM:t=>{const{weight:n}=this.options;return n?["strong",{"font-weight":n.toString()},0]:["strong",e.dom(t),0]}}}createInputRules(){return[(0,i.Cf)({regexp:/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,type:this.t
1ype,ignoreWhitespace:!0})]}toggleBold(e){return(0,r.w9d)({type:this.type,selection:e})}setBold(e){return({tr:t,dispatch:n})=>{const{from:r,to:o}=(0,i.b0)(e??t.selection,t.doc);return null==n||n(t.addMark(r,o,this.type.create())),!0}}removeBold(e){return({tr:t,dispatch:n})=>{const{from:r,to:o}=(0,i.b0)(e??t.selection,t.doc);return!!t.doc.rangeHasMark(r,o,this.type)&&(null==n||n(t.removeMark(r,o,this.type)),!0)}}shortcut(e){return this.toggleBold()(e)}};u([(0,r.WDe)(h)],p.prototype,"toggleBold",1),u([(0,r.WDe)()],p.prototype,"setBold",1),u([(0,r.WDe)()],p.prototype,"removeBold",1),u([(0,r.IGC)({shortcut:o.vO.Bold,command:"toggleBold"})],p.prototype,"shortcut",1),p=u([(0,r.AOx)({defaultOptions:{weight:void 0},staticKeys:["weight"]})],p)},78822:function(e,t,n){"use strict";n.d(t,{W:function(){return I}});var r=n(11215),o=n(44573),i=n(378),s=n(33937),a=n(57555),l=n(82696),c=n(2376),u=n(31026),h=n(84348),p=n(48776),d=Object.defineProperty,f=Object.getOwnPropertyDescriptor,m=(e,t,n,r)=>{for(var o,i=r>1?void 0:r?f(t,n):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&d(t,n,i),i},g=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},v=(e,t,n)=>(g(e,t,"read from private field"),n?n.call(e):t.get(e)),y=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},k=(e,t,n,r)=>(g(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),w="data-code-block-language";function x(e,t,n=[]){return e.map((e=>{const r=[...n];return"element"===e.type&&e.properties.className?r.push(...e.properties.className):"text"===e.type&&0===r.length&&t&&r.push(t),"element"===e.type?x(e.children,t,r):{text:e.value,classes:r}}))}function b(e,t){var n;const{node:o,pos:i}=e,s=M({language:null==(n=o.attrs.language)?void 0:n.replace("language-",""),fallback:"markup"}),l=x(r.highlight(o.textContent??"",s),t);let c=i+1;return(0,a.VF)(l).map((function(e){const t=c,n=t+e.text.length;return c=n,{...e,from:t,to:n}}))}function S(e){const{blocks:t,skipLast:n,plainTextClassName:r}=e,o=[];for(const i of t){const e=b(i,r),t=n?e.length-1:e.length;for(const n of(0,a.w6)(t)){const t=e[n],r=null==t?void 0:t.classes;if(!t||!(null==r?void 0:r.length))continue;const i=h.p.inline(t.from,t.to,{class:r.join(" ")});o.push(i)}}return o}function C(e){return t=>({state:{tr:n,selection:r},dispatch:o})=>{if(!function(e){return!!(e&&(0,a.Kn)(e)&&(0,a.HD)(e.language)&&e.language.length>0)}(t))throw new Error("Invalid attrs passed to the updateAttributes method");const i=(0,s.Tr)({types:e,selection:r});return!(!i||(0,a.Xy)(t,i.node.attrs))&&(n.setNodeMarkup(i.pos,e,{...i.node.attrs,...t}),o&&o(n),!0)}}function M(e){const{language:t,fallback:n}=e;if(!t)return n;const o=r.listLanguages();for(const r of o)if(r.toLowerCase()===t.toLowerCase())return r;return n}var O,E,A,{DESCRIPTION:T,LABEL:R}=p.J,N={icon:"bracesLine",description:({t:e})=>e(T),label:({t:e})=>e(R)};O=new WeakMap,E=new WeakMap,A=new WeakMap;var I=class extends o.QR{get name(){return"codeBlock"}createTags(){return[i.eX.Block,i.eX.Code]}init(){this.registerLanguages()}createNodeSpec(e,t){const n=/highlight-(?:text|source)-([\da-z]+)/;return{content:"text*",marks:"",defining:!0,draggable:!1,...t,code:!0,attrs:{...e.defaults(),language:{default:this.options.defaultLanguage},wrap:{default:this.options.defaultWrap}},parseDOM:[{tag:"div.highlight",preserveWhitespace:"full",getAttrs:t=>{var r,o;if(!(0,s.jd)(t))return!1;const i=t.querySelector("pre.code");if(!(0,s.jd)(i))return!1;const a="pre-wrap"===(0,s.C2)(i,"white-space"),l=null==(o=null==(r=t.className.match(n))?void 0:r[1])?void 0:o.replace("language-","");return{...e.parse(t),language:l,wrap:a}}},{tag:"pre",preserveWhitespace:"full",getAttrs:t=>{if(!(0,s.jd)(t))return!1;const n=t.querySelector("code");if(!(0,s.jd)(n))return!1;const r="pre-wrap"===(0,s.C2)(n,"white-space"),o=this.options.getLanguageFromDom(n,t);return{...e.parse(t),language:o,wrap:r}}},...t.parseDOM??[]],toDOM:t=>function(e,t){const{language:n,wrap:r}=(0,s.Kh)(e.attrs,t),{style:i,...a}=t.dom(e);let l=a.style;return r&&(l=(0,s.X3)({whiteSpace:"pre-wrap",wordBreak:"break-all"},l)),["pre",{spellcheck:"false",...a,class:(0,o.cx)(a.class,`language-${n}`)},["code",{[w]:n,style:l},0]]}(t,e)}}createAttributes(){return{class:u.uV[this.options.syntaxTheme.toUpperCase()]}}createInputRules(){return[(0,s.x2)({regexp:/^```([\dA-Za-z]*) $/,type:this.t
1ype,beforeDispatch:({tr:e,start:t})=>{const n=e.doc.resolve(t);e.setSelection(c.Bs.near(n))},getAttributes:e=>({language:M({language:(0,s.FI)(e,1),fallback:this.options.defaultLanguage})})})]}onSetOptions(e){const{changes:t}=e;t.supportedLanguages.changed&&this.registerLanguages(),t.syntaxTheme.changed&&this.store.updateAttributes()}createPlugin(){const e=new class{constructor(e,t){y(this,O,void 0),y(this,E,void 0),y(this,A,!1),k(this,E,e),k(this,O,t)}init(e){const t=(0,s.as)({node:e.doc,type:v(this,E)});return this.refreshDecorationSet(e.doc,t),this}refreshDecorationSet(e,t){const n=S({blocks:t,skipLast:v(this,A),defaultLanguage:v(this,O).options.defaultLanguage,plainTextClassName:v(this,O).options.plainTextClassName??void 0});this.decorationSet=h.EH.create(e,n)}apply(e,t){if(!e.docChanged)return this;this.decorationSet=this.decorationSet.map(e.mapping,e.doc);const n=(0,s.qh)(e,{descend:!0,predicate:e=>e.type===v(this,E),StepTypes:[]});return this.updateDecorationSet(e,n),this}updateDecorationSet(e,t){if(0===t.length)return;let n=this.decorationSet;for(const{node:r,pos:o}of t)n=this.decorationSet.remove(this.decorationSet.find(o,o+r.nodeSize));this.decorationSet=n.add(e.doc,S({blocks:t,skipLast:v(this,A),defaultLanguage:v(this,O).options.defaultLanguage,plainTextClassName:v(this,O).options.plainTextClassName??void 0}))}setDeleted(e){k(this,A,e)}}(this.type,this),t=()=>(e.setDeleted(!0),!1);return{state:{init:(t,n)=>e.init(n),apply:(t,n,r,o)=>e.apply(t,o)},props:{handleKeyDown:(0,l.$)({Backspace:t,"Mod-Backspace":t,Delete:t,"Mod-Delete":t,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t}),decorations:()=>(e.setDeleted(!1),e.decorationSet)}}}toggleCodeBlock(e={}){return(0,s.zU)({type:this.type,toggleType:this.options.toggleName,attrs:{language:this.options.defaultLanguage,...e}})}createCodeBlock(e){return(0,s.uJ)(this.type,e)}updateCodeBlock(e){return C(this.type)(e)}formatCodeBlock(e){return function(e){return({pos:t}=(0,a.Ry)())=>({tr:n,dispatch:r})=>{const{type:o,formatter:i,defaultLanguage:a}=e,{from:l,to:u}=t?{from:t,to:t}:n.selection,h=(0,s.Tr)({types:o,selection:n.selection});if(!h)return!1;const{node:{attrs:p,textContent:d},start:f}=h,m=l-f,g=u-f,v=M({language:p.language,fallback:a}),y=i({source:d,language:v,cursorOffset:m});let k;if(m!==g&&(k=i({source:d,language:v,cursorOffset:g})),!y)return!1;const{cursorOffset:w,formatted:x}=y;if(x===d)return!1;const b=f+d.length;n.insertText(x,f,b);const S=f+w,C=k?f+k.cursorOffset:void 0;return n.setSelection(c.Bs.between(n.doc.resolve(S),n.doc.resolve(C??S))),r&&r(n),!0}}({type:this.type,formatter:this.options.formatter,defaultLanguage:this.options.defaultLanguage})(e)}tabKey({state:e,dispatch:t}){const{selection:n,tr:r,schema:o}=e,{node:i}=(0,s.JB)(n);if(!(0,s.$9)({node:i,types:this.type}))return!1;if(n.empty)r.insertText("\t");else{const{from:e,to:t}=n;r.replaceWith(e,t,o.text("\t"))}return t&&t(r),!0}backspaceKey({dispatch:e,tr:t,state:n}){if(!t.selection.empty)return!1;const r=(0,s.Tr)({types:this.type,selection:t.selection});if((null==r?void 0:r.start)!==t.selection.from)return!1;const{pos:o,node:i,start:l}=r,u=(0,a.fp)(n.schema.nodes,this.options.toggleName);return""===i.textContent.trim()?t.doc.lastChild===i&&t.doc.firstChild===i?(0,s.IY)({pos:o,tr:t,content:u.create()}):(0,s.aS)({pos:o,tr:t}):l>2?t.setSelection(c.Bs.near(t.doc.resolve(l-2))):(t.insert(0,u.create()),t.setSelection(c.Bs.near(t.doc.resolve(1)))),e&&e(t),!0}enterKey({dispatch:e,tr:t}){if(!(0,s.hT)(t.selection)||!t.selection.empty)return!1;const{nodeBefore:n,parent:r}=t.selection.$anchor;if(!(null==n?void 0:n.isText)||!r.type.isTextblock)return!1;const o=/^```([A-Za-z]*)?$/,{text:i,nodeSize:a}=n,{textContent:l}=r;if(!i)return!1;const u=i.match(o),h=l.match(o);if(!u||!h)return!1;const[,p]=u,d=M({language:p,fallback:this.options.defaultLanguage}),f=t.selection.$from.before(),m=f+a+1;return t.replaceWith(f,m,this.type.create({language:d})),t.setSelection(c.Bs.near(t.doc.resolve(f+1))),e&&e(t),!0}formatShortcut({tr:e}){const t=this.store.commands;
1if(!(0,s.Ig)({type:this.type,state:e}))return!1;const n=t.formatCodeBlock.isEnabled();return n&&t.formatCodeBlock(),n}registerLanguages(){for(const e of this.options.supportedLanguages)r.register(e)}};m([(0,o.WDe)(N)],I.prototype,"toggleCodeBlock",1),m([(0,o.WDe)()],I.prototype,"createCodeBlock",1),m([(0,o.WDe)()],I.prototype,"updateCodeBlock",1),m([(0,o.WDe)()],I.prototype,"formatCodeBlock",1),m([(0,o.IGC)({shortcut:"Tab"})],I.prototype,"tabKey",1),m([(0,o.IGC)({shortcut:"Backspace"})],I.prototype,"backspaceKey",1),m([(0,o.IGC)({shortcut:"Enter"})],I.prototype,"enterKey",1),m([(0,o.IGC)({shortcut:i.vO.Format})],I.prototype,"formatShortcut",1),I=m([(0,o.AOx)({defaultOptions:{supportedLanguages:[],toggleName:"paragraph",formatter:({source:e})=>({cursorOffset:0,formatted:e}),syntaxTheme:"a11y_dark",defaultLanguage:"markup",defaultWrap:!1,plainTextClassName:"",getLanguageFromDom:function(e){var t;return null==(t=e.getAttribute(w)??e.classList[0])?void 0:t.replace("language-","")}},staticKeys:["getLanguageFromDom"]})],I)},55658:function(e,t,n){"use strict";n.d(t,{l:function(){return d}});var r=n(44573),o=n(378),i=n(33937),s=n(48776),a=Object.defineProperty,l=Object.getOwnPropertyDescriptor,c=(e,t,n,r)=>{for(var o,i=r>1?void 0:r?l(t,n):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&a(t,n,i),i},{DESCRIPTION:u,LABEL:h}=s.jz,p={icon:"codeLine",description:({t:e})=>e(u),label:({t:e})=>e(h)},d=class extends r.uS7{get name(){return"code"}createTags(){return[o.eX.Code,o.eX.ExcludeInputRules]}createMarkSpec(e,t){return{excludes:"_",...t,attrs:e.defaults(),parseDOM:[{tag:"code",getAttrs:e.parse},...t.parseDOM??[]],toDOM:t=>["code",{spellcheck:"false",...e.dom(t)},0]}}createKeymap(){return{"Mod-`":(0,r.w9d)({type:this.type})}}keyboardShortcut(e){return this.toggleCode()(e)}toggleCode(){return(0,r.w9d)({type:this.type})}createInputRules(){return[(0,i.Cf)({regexp:new RegExp(`(?:\`)([^\`${o.Z9}
1]+)(?:\`)$`),type:this.type,ignoreWhitespace:!0})]}createPasteRules(){return[{type:"mark",regexp:/`([^`]+)`/g,markType:this.type}]}};c([(0,r.IGC)({shortcut:o.vO.Code,command:"toggleCode"})],d.prototype,"keyboardShortcut",1),c([(0,r.WDe)(p)],d.prototype,"toggleCode",1),d=c([(0,r.AOx)({})],d)},13848:function(e,t,n){"use strict";n.d(t,{h:function(){return u}});var r=n(44573),o=n(378),i=n(27784),s=n(25804),a=Object.defineProperty,l=Object.getOwnPropertyDescriptor,c=(e,t,n,r)=>{for(var o,i=r>1?void 0:r?l(t,n):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&a(t,n,i),i},u=class extends r.QR{get name(){return"hardBreak"}createTags(){return[o.eX.InlineNode]}createNodeSpec(e,t){return{inline:!0,selectable:!1,atom:!0,leafText:()=>"\n",...t,attrs:e.defaults(),parseDOM:[{tag:"br",getAttrs:e.parse},...t.parseDOM??[]],toDOM:t=>["br",e.dom(t)]}}createKeymap(){const e=(0,i.QF)((0,i.A_)(s.uo),(()=>(this.store.commands.insertHardBreak(),!0)));return{"Mod-Enter":e,"Shift-Enter":e}}insertHardBreak(){return e=>{const{tr:t,dispatch:n}=e;return null==n||n(t.replaceSelectionWith(this.type.create()).scrollIntoView()),!0}}};c([(0,r.WDe)()],u.prototype,"insertHardBreak",1),u=c([(0,r.AOx)({defaultPriority:o.xV.Low})],u)},71265:function(e,t,n){"use strict";n.d(t,{e:function(){return m}});var r=n(44573),o=n(378),i=n(33937),s=n(57555),a=n(36912),l=n(48776),c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,h=(e,t,n,r)=>{for(var o,i=r>1?void 0:r?u(t,n):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&c(t,n,i),i},{LABEL:p}=l.bk,d={icon:({attrs:e})=>`h${(null==e?void 0:e.level)??"1"}`,label:({t:e,attrs:t})=>e({...p,values:{level:null==t?void 0:t.level}})},f=[o.vO.H1,o.vO.H2,o.vO.H3,o.vO.H4,o.vO.H5,o.vO.H6],m=class extends r.QR{get name(){return"heading"}createTags(){return[o.eX.Block,o.eX.TextBlock,o.eX.FormattingNode]}createNodeSpec(e,t){return{content:"inline*",defining:!0,draggable:!1,...t,attrs:{...e.defaults(),level:{default:this.options.defaultLevel}},parseDOM:[...this.options.levels.map((t=>({tag:`h${t}`,getAttrs:n=>({...e.parse(n),level:t})}))),...t.parseDOM??[]],toDOM:t=>this.options.levels.includes(t.attrs.level)?[`h${t.attrs.level}`,e.dom(t),0]:[`h${this.options.defaultLevel}`,e.dom(t),0]}}toggleHeading(e={}){return(0,i.zU)({type:this.type,toggleType:"paragraph",attrs:e})}createKeymap(e){const t=this.store.getExtension(r.i8b),n=(0,s.Ry)(),a=[];for(const r of this.options.levels){const t=f[r-1]??o.vO.H1;n[t]=(0,i.uJ)(this.type,{level:r}),a.push({attrs:{level:r},shortcut:e(t)[0]})}return t.updateDecorated("toggleHeading",{shortcut:a}),n}createInputRules(){return this.options.levels.map((e=>(0,a.zK)(new RegExp(`^(#{1,${e}})\\s$`),this.type,(()=>({level:e})))))}createPasteRules(){return this.options.levels.map((e=>({type:"node",nodeType:this.type,regexp:new RegExp(`^#{${e}}\\s([\\s\\w]+)$`),getAttributes:()=>({level:e}),startOfTextBlock:!0})))}};h([(0,r.WDe)(d)],m.prototype,"toggleHeading",1),m=h([(0,r.AOx)({defaultOptions:{levels:[1,2,3,4,5,6],defaultLevel:1},staticKeys:["defaultLevel","levels"]})],m)},32594:function(e,t,n){"use strict";n.d(t,{u:function(){return d}});var r=n(44573),o=n(57555),i=n(33937),s=n(27784),a=n(378),l=n(48776),c=n(58463),u=Object.defineProperty,h=Object.getOwnPropertyDescriptor,p=(e,t,n,r)=>{for(var o,i=r>1?void 0:r?h(t,n):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&u(t,n,i),i},d=class extends r.nNj{constructor(){super(...arguments),this.wrapMethod=(e,t)=>({state:n,dispatch:r,view:i})=>{const{getState:s,getDispatch:a}=this.options,l=(0,o.mf)(s)?s():n,c=(0,o.mf)(a)&&r?a():r,u=e(l,c,i);return null==t||t(u),u}}get name(){return"history"}createKeymap(){return{"Mod-y":i.NZ.isMac?()=>!1:this.wrapMethod(c.KX,this.options.onRedo),"Mod-z":this.wrapMethod(c.Yw,this.options.onUndo),"Shift-Mod-z":this.wrapMethod(c.KX,this.options.onRedo)}}undoShortcut(e){return this.wrapMethod(c.Yw,this.options.onUndo)(e)}redoShortcut(e){return this.wrapMethod(c.KX,this.options.onRedo)(e)}createExternalPlugins(){const{depth:e,newGroupDelay:t}=this.options;return[(0,c.m8)({depth:e,newGroupDelay:t})]}undo(){return(0,s.fB)(this.wrapMethod(c.Yw,this.options.onUndo))}redo(){return(0,s.fB)(this.wrapMethod(c.KX,this.options.onRedo))}undoDepth(e=this.store.getState()){return(0,c.of)(e)}redoDepth(e=this.store.getState()){return(0,c.AH)(e)}};
1p([(0,r.IGC)({shortcut:a.vO.Undo,command:"undo"})],d.prototype,"undoShortcut",1),p([(0,r.IGC)({shortcut:a.vO.Redo,command:"redo"})],d.prototype,"redoShortcut",1),p([(0,r.WDe)({disableChaining:!0,description:({t:e})=>e(l.XW.UNDO_DESCRIPTION),label:({t:e})=>e(l.XW.UNDO_LABEL),icon:"arrowGoBackFill"})],d.prototype,"undo",1),p([(0,r.WDe)({disableChaining:!0,description:({t:e})=>e(l.XW.REDO_DESCRIPTION),label:({t:e})=>e(l.XW.REDO_LABEL),icon:"arrowGoForwardFill"})],d.prototype,"redo",1),p([(0,r._y)()],d.prototype,"undoDepth",1),p([(0,r._y)()],d.prototype,"redoDepth",1),d=p([(0,r.AOx)({defaultOptions:{depth:100,newGroupDelay:500,getDispatch:void 0,getState:void 0},staticKeys:["depth","newGroupDelay"],handlerKeys:["onUndo","onRedo"]})],d)},82874:function(e,t,n){"use strict";n.d(t,{Gc:function(){return E}});var r,o=n(44573),i=n(378),s=n(33937),a=n(57555),l=n(16560),c=n(31026),u=n(27856),h=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},p=(e,t,n)=>(h(e,t,"read from private field"),n?n.call(e):t.get(e)),d=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},f=(e,t,n,r)=>(h(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),m=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="22" height="22" fill="rgba(0, 0, 0, 0.65)" stroke="rgba(255, 255, 255, 0.5)" transform="rotate(90)" xmlns:v="https://vecta.io/nano"><path fill-rule="evenodd" d="M14 0a2 2 0 0 0-2 2v10H2a2 2 0 1 0 0 4h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z"/></svg>'),g=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="22" height="22" fill="rgba(0, 0, 0, 0.65)" stroke="rgba(255, 255, 255, 0.5)" transform="matrix(0 1 1 0 0 0)" xmlns:v="https://vecta.io/nano"><path fill-rule="evenodd" d="M14 0a2 2 0 0 0-2 2v10H2a2 2 0 1 0 0 4h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z"/></svg>');r=new WeakMap;var v,y,k,w,x,b=(e=>(e[e.Fixed=0]="Fixed",e[e.Flexible=1]="Flexible",e))(b||{});function S(e){return"number"===typeof e?`${e}px`:e||void 0}v=new WeakMap,y=new WeakMap,k=new WeakMap,w=new WeakMap,x=new WeakMap;var C=Object.defineProperty,M=Object.getOwnPropertyDescriptor,O=(e,t,n,r)=>{for(var o,i=r>1?void 0:r?M(t,n):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&C(t,n,i),i},E=class extends o.QR{get name(){return"image"}createTags(){return[i.eX.InlineNode,i.eX.Media]}createNodeSpec(e,t){const{preferPastedTextContent:n}=this.options;return{inline:!0,draggable:!0,selectable:!1,...t,attrs:{...e.defaults(),alt:{default:""},crop:{default:null},height:{default:null},width:{default:null},rotate:{default:null},src:{default:null},title:{default:""},fileName:{default:null},resizable:{default:!1}},parseDOM:[{tag:"img[src]",getAttrs:t=>{var r;if((0,s.jd)(t)){const o=function({element:e,parse:t}){const{width:n,height:r}=function(e){let{width:t,height:n}=e.style;return t=t||e.getAttribute("width")||"",n=n||e.getAttribute("height")||"",{width:t,height:n}}(e);return{...t(e),alt:e.getAttribute("alt")??"",height:Number.parseInt(r||"0",10)||null,src:e.getAttribute("src")??null,title:e.getAttribute("title")??"",width:Number.parseInt(n||"0",10)||null,fileName:e.getAttribute("data-file-name")??null}}({element:t,parse:e.parse});return(!n||!(null==(r=o.src)?void 0:r.startsWith("file:///")))&&o}return{}}},...t.parseDOM??[]],toDOM:t=>{const n=(0,s.Kh)(t.attrs,e);return["img",{...e.dom(t),...n}]}}}insertImage(e,t){return({tr:n,dispatch:r})=>{const{from:o,to:i}=(0,s.b0)(t??n.selection,n.doc),a=this.type.create(e);return null==r||r(n.replaceRangeWith(o,i,a)),!0}}uploadImage(e,t){const{updatePlaceholder:n,destroyPlaceholder:r,createPlaceholder:o}=this.options;return i=>{const{tr:s}=i;let a=s.selection.from;return this.store.createPlaceholderCommand({promise:e,placeholder:{type:"widget",get pos(){return a},createElement:(e,n)=>{const r=o(e,n);return null==t||t(r),r},onUpdate:(e,t,r,o)=>{n(e,t,r,o)},onDestroy:(e,t)=>{r(e,t)}},onSuccess:(e,t,n)=>this.insertImage(e,t)(n)}).validate((({tr:e,dispatch:t})=>{const n=(0,l.Yo)(e.doc,a,this.type);return null!=n&&(a=n,e.selection.empty||null==t||t(e.deleteSelection()),!0)}),"unshift").generateCommand()(i)}}fileUploadFileHandler(e,t,n){var r;const{preferPastedTextContent:o,uploadHandler:i}=this.options;if(o&&function(e){return void 0!==e.clipboardData}(t)&&(null==(r=t.clipboardData)?void 0:r.getData("text/plain")))return!1;const{commands:s,chain:l}=this.store,c=i(e.map(((e,t)=>({file:e,progress:e=>{s.updatePlaceholder(c[t],e)}}))));(0,a.hj)(n)&&l.selectText(n);for(const a of c)l.uploadImage(a);return l.run(),!0}createPasteRules(){return[{type:"file",regexp:/image/i,fileHandler:e=>{const t="drop"===e.type?e.pos:void 0;return this.fileUploadFileHandler(e.files,e.event,t)}}]}createNodeViews(){return this.options.enableResizing?(e,t,n)=>new class extends class{constructor({node:e,view:t,getPos:n,aspectRatio:o=0,options:i,initialSize:a}){d(this,v,void 0),d(this,y,void 0),d(this,k,[]),d(this,w,void 0),d(this,x,void 0);const l=this.createWrapper(e,a),c=this.createElement({node:e,view:t,getPos:n,options:i}),u=(1===o?[0,1,2,3,4]:[0,1]).map((e=>new class{constructor(e){d(this,r,void 0);const t=document.createElement("div"),n=document.createElement("div");this.dom=t,f(this,r,n),this.type=e,this.createHandle(e)}createHandle(e){switch((0,s.yL)(this.dom,{position:"absolute",pointerEvents:"auto",display:"flex",alignItems:"center",justifyContent:"center",zIndex:"100"}),(0,s.yL)(p(this,r),{opacity:"0",transition:"opacity 300ms ease-in 0s"}),p(this,r).dataset.dragging="",e){case 0:(0,s.yL)(this.dom,{right:"0px",top:"0px",height:"100%",width:"15px",cursor:"col-resize"}),(0,s.yL)(p(this,r),{width:" 4px",height:"36px",maxHeight:"50%",boxSizing:"content-box",background:"rgba(0, 0, 0, 0.65)",border:"1px solid rgba(255, 255, 255, 0.5)",borderRadius:"6px"});break;
1case 1:(0,s.yL)(this.dom,{left:"0px",top:"0px",height:"100%",width:"15px",cursor:"col-resize"}),(0,s.yL)(p(this,r),{width:" 4px",height:"36px",maxHeight:"50%",boxSizing:"content-box",background:"rgba(0, 0, 0, 0.65)",border:"1px solid rgba(255, 255, 255, 0.5)",borderRadius:"6px"});break;case 2:(0,s.yL)(this.dom,{bottom:"0px",width:"100%",height:"14px",cursor:"row-resize"}),(0,s.yL)(p(this,r),{width:" 42px",height:"4px",boxSizing:"content-box",maxWidth:"50%",background:"rgba(0, 0, 0, 0.65)",border:"1px solid rgba(255, 255, 255, 0.5)",borderRadius:"6px"});break;case 3:(0,s.yL)(this.dom,{right:"-1px",bottom:"-2px",width:"30px",height:"30px",cursor:"nwse-resize",zIndex:"101"}),(0,s.yL)(p(this,r),{height:"22px",width:"22px",backgroundRepeat:"no-repeat",backgroundImage:`url("data:image/svg+xml,${g}") `});break;case 4:(0,s.yL)(this.dom,{left:"-1px",bottom:"-2px",width:"30px",height:"30px",cursor:"nesw-resize",zIndex:"101"}),(0,s.yL)(p(this,r),{height:"22px",width:"22px",backgroundRepeat:"no-repeat",backgroundImage:`url("data:image/svg+xml,${m}") `})}this.dom.append(p(this,r))}setHandleVisibility(e){const t=e||!!p(this,r).dataset.dragging;p(this,r).style.opacity=t?"1":"0"}dataSetDragging(e){p(this,r).dataset.dragging=e?"true":""}}(e)));for(const r of u){const e=e=>{this.startResizing(e,t,n,r)};r.dom.addEventListener("mousedown",e),p(this,k).push((()=>r.dom.removeEventListener("mousedown",e))),l.append(r.dom)}const h=()=>{u.forEach((e=>e.setHandleVisibility(!0)))},b=()=>{u.forEach((e=>e.setHandleVisibility(!1)))};l.addEventListener("mouseover",h),l.addEventListener("mouseout",b),p(this,k).push((()=>l.removeEventListener("mouseover",h)),(()=>l.removeEventListener("mouseout",b))),l.append(c),this.dom=l,f(this,y,e),f(this,v,c),this.aspectRatio=o}createWrapper(e,t){const n=document.createElement("div");return n.classList.add("remirror-resizable-view"),n.style.position="relative",t?(0,s.yL)(n,{width:S(t.width),aspectRatio:`${t.width} / ${t.height}`}):(0,s.yL)(n,{width:S(e.attrs.width),aspectRatio:`${e.attrs.width} / ${e.attrs.height}`}),(0,s.yL)(n,{maxWidth:"100%",minWidth:"50px",verticalAlign:"bottom",display:"inline-block",lineHeight:"0",transition:"width 0.15s ease-out, height 0.15s ease-out"}),n}startResizing(e,t,n,r){var o,i;e.preventDefault(),r.dataSetDragging(!0),p(this,v).style.pointerEvents="none";const s=e.pageX,a=e.pageY,l=(null==(o=p(this,v))?void 0:o.getBoundingClientRect().width)||0,c=(null==(i=p(this,v))?void 0:i.getBoundingClientRect().height)||0,h=(0,u.P)(100,!1,(e=>{const t=e.pageX,n=e.pageY,o=t-s,i=n-a;let u=null,h=null;if(0===this.aspectRatio&&l&&c)switch(r.type){case 0:case 3:u=l+o,h=c/l*u;break;case 1:case 4:u=l-o,h=c/l*u;break;case 2:h=c+i,u=l/c*h}else if(1===this.aspectRatio)switch(r.type){case 0:u=l+o;break;case 1:u=l-o;break;case 2:h=c+i;break;case 3:u=l+o,h=c+i;break;case 4:u=l-o,h=c+i}"number"===typeof u&&u<50&&(0===this.aspectRatio&&l&&c?(u=50,h=c/l*u):1===this.aspectRatio&&(u=50)),u&&(f(this,w,Math.round(u)),this.dom.style.width=`${p(this,w)}px`),h&&f(this,x,Math.round(h)),(u||h)&&(this.dom.style.aspectRatio=`${p(this,w)} / ${p(this,x)}`)})),d=e=>{e.preventDefault(),r.dataSetDragging(!1),r.setHandleVisibility(!1),p(this,v).style.pointerEvents="auto",document.removeEventListener("mousemove",h),document.removeEventListener("mouseup",d);const o=n(),i=t.state.tr.setNodeMarkup(o,void 0,{...p(this,y).attrs,width:p(this,w),height:p(this,x)});t.dispatch(i)};document.addEventListener("mousemove",h),document.addEventListener("mouseup",d),p(this,k).push((()=>document.removeEventListener("mousemove",h))),p(this,k).push((()=>document.removeEventListener("mouseup",d)))}update(e){return e.type===p(this,y).type&&(0!==this.aspectRatio||!e.attrs.width||e.attrs.width===p(this,w))&&(1!==this.aspectRatio||!e.attrs.width||!e.attrs.height||e.attrs.width===p(this,w)||e.attrs.height===p(this,x))&&(!!((t=p(this,y))===(n=e)||function(e,t,n){const r=e.attrs,o=t.attrs,i={};for(const a of n)i[a]=null;e.attrs={...r,...i},t.attrs={...o,...i};const s=e.sameMarkup(t);return e.attrs=r,t.attrs=o,s}(t,n,["width","height"])&&t.content.eq(n.content))&&(f(this,y,e),f(this,w,e.attrs.width),f(this,x,e.attrs.height),!0));var t,n}
1destroy(){p(this,k).forEach((e=>e()))}}{constructor(e,t,n){super({node:e,view:t,getPos:n,aspectRatio:b.Fixed})}createElement({node:e}){const t=document.createElement("img");return t.setAttribute("src",e.attrs.src),(0,s.yL)(t,{width:"100%",minWidth:"50px",objectFit:"contain"}),t}}(e,t,n):{}}};O([(0,o.WDe)()],E.prototype,"insertImage",1),O([(0,o.WDe)()],E.prototype,"uploadImage",1),E=O([(0,o.AOx)({defaultOptions:{createPlaceholder:function(e,t){const n=document.createElement("div");return n.classList.add(c.Jl.IMAGE_LOADER),n},updatePlaceholder:()=>{},destroyPlaceholder:()=>{},uploadHandler:function(e){(0,a.kG)(e.length>0,{code:i.mA.EXTENSION,message:"The upload handler was applied for the image extension without any valid files"});let t=0;const n=[];for(const{file:r,progress:o}of e)n.push((()=>new Promise((n=>{const i=new FileReader;i.addEventListener("load",(i=>{var s;t+=1,o(t/e.length),n({src:null==(s=i.target)?void 0:s.result,fileName:r.name})}),{once:!0}),i.readAsDataURL(r)}))));return n},enableResizing:!1,preferPastedTextContent:!0}})],E)},5705:function(e,t,n){"use strict";n.d(t,{f:function(){return h}});var r=n(44573),o=n(378),i=n(33937),s=n(48776),a=Object.defineProperty,l=Object.getOwnPropertyDescriptor,c=(e,t,n,r)=>{for(var o,i=r>1?void 0:r?l(t,n):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&a(t,n,i),i},u={icon:"italic",label:({t:e})=>e(s.wr.LABEL),description:({t:e})=>e(s.wr.DESCRIPTION)},h=class extends r.uS7{get name(){return"italic"}createTags(){return[o.eX.FontStyle,o.eX.FormattingMark]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"i",getAttrs:e.parse},{tag:"em",getAttrs:e.parse},{style:"font-style=italic"},...t.parseDOM??[]],toDOM:t=>["em",e.dom(t),0]}}createKeymap(){return{"Mod-i":(0,r.w9d)({type:this.type})}}createInputRules(){return[(0,i.Cf)({regexp:/(?:^|[^*])\*([^*]+)\*$/,type:this.t
1ype,ignoreWhitespace:!0,updateCaptured:({fullMatch:e,start:t})=>e.startsWith("*")?{}:{fullMatch:e.slice(1),start:t+1}}),(0,i.Cf)({regexp:/(?:^|\W)_([^_]+)_$/,type:this.type,ignoreWhitespace:!0,updateCaptured:({fullMatch:e,start:t})=>e.startsWith("_")?{}:{fullMatch:e.slice(1),start:t+1}})]}createPasteRules(){return[{type:"mark",markType:this.type,regexp:/(?:^|\W)_([^_]+)_/g},{type:"mark",markType:this.type,regexp:/\*([^*]+)\*/g}]}toggleItalic(e){return(0,r.w9d)({type:this.type,selection:e})}shortcut(e){return this.toggleItalic()(e)}};c([(0,r.WDe)(u)],h.prototype,"toggleItalic",1),c([(0,r.IGC)({shortcut:o.vO.Italic,command:"toggleItalic"})],h.prototype,"shortcut",1),h=c([(0,r.AOx)({})],h)},611:function(e,t,n){"use strict";n.d(t,{y5:function(){return f}});var r=n(69463),o=n(44573),i=n(378),s=n(57555),a=n(33937),l=n(58463),c=n(16560),u=Object.defineProperty,h=Object.getOwnPropertyDescriptor,p=(e,t,n,r)=>{for(var o,i=r>1?void 0:r?h(t,n):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&u(t,n,i),i},d="updateLink",f=class extends o.uS7{constructor(){super(...arguments),this._autoLinkRegexNonGlobal=void 0}get name(){return"link"}createTags(){return[i.eX.Link,i.eX.ExcludeInputRules]}createMarkSpec(e,t){const n="data-link-auto",r=e=>{const{defaultTarget:t,supportedTargets:n}=this.options,r=t?[...n,t]:n;return e&&(0,s.q9)(r,e)?{target:e}:void 0};return{inclusive:!1,excludes:"_",...t,attrs:{...e.defaults(),href:{},target:{default:this.options.defaultTarget},auto:{default:!1}},parseDOM:[{tag:"a[href]",getAttrs:t=>{if(!(0,a.jd)(t))return!1;const o=t.getAttribute("href"),i=t.textContent,s=this.options.autoLink&&(t.hasAttribute(n)||o===i||(null==o?void 0:o.replace(`${this.options.defaultProtocol}//`,""))===i);return{...e.parse(t),href:o,auto:s,...r(t.getAttribute("target"))}}},...t.parseDOM??[]],toDOM:t=>{const{auto:o,target:i,...s}=(0,a.Kh)(t.attrs,e),l=t.attrs.auto?{[n]:""}:{};return["a",{...e.dom(t),...s,rel:"noopener noreferrer nofollow",...l,...r(t.attrs.target)},0]}}}onCreate(){const{autoLinkRegex:e}=this.options;this._autoLinkRegexNonGlobal=new RegExp(`^${e.source}$`,e.flags.replace("g",""))}shortcut({tr:e}){let t="",{from:n,to:r,empty:o,$from:i}=e.selection,s=!1;const l=(0,a.IH)(i,this.type);if(o){const o=l??(0,a.JM)(e);if(!o)return!1;({text:t,from:n,to:r}=o),s=!0}return n!==r&&(s||(t=e.doc.textBetween(n,r)),this.options.onActivateLink(t),this.options.onShortcut({activeLink:l?{attrs:l.mark.attrs,from:l.from,to:l.to}:void 0,selectedText:t,from:n,to:r}),!0)}updateLink(e,t){return n=>{const{tr:r}=n;return!!((0,a.hT)(r.selection)&&!(0,a.Ab)(r.selection)||(0,a.d7)(r.
1selection)||(0,a.yw)({trState:r,type:this.type})||t)&&(r.setMeta(this.name,{command:d,attrs:e,range:t}),(0,a.dy)({type:this.type,attrs:e,range:t})(n))}}selectLink(){return this.store.commands.selectMark.original(this.type)}removeLink(e){return t=>{const{tr:n}=t;return!!(0,a.yw)({trState:n,type:this.type,...e})&&(0,a.P9)({type:this.type,expand:!0,range:e})(t)}}createPasteRules(){return[{type:"mark",regexp:this.options.autoLinkRegex,markType:this.type,getAttributes:(e,t)=>({href:this.buildHref((0,a.FI)(e)),auto:!t}),transformMatch:e=>{const t=(0,a.FI)(e);return!!t&&(!!this.isValidUrl(t)&&t)}}]}createEventHandlers(){return{clickMark:(e,t)=>{const n=t.getMark(this.type);if(!n)return;const r=n.mark.attrs,o={...r,...n};if(this.options.onClick(e,o))return!0;if(!this.store.view.editable)return;let i=!1;if(this.options.openLinkOnClick){i=!0;const e=r.href;window.open(e,"_blank")}return this.options.selectTextOnClick&&(i=!0,this.store.commands.selectText(n)),i}}}createPlugin(){return{appendTransaction:(e,t,n)=>{if(e.filter((e=>!!e.getMeta(this.name))).forEach((e=>{const t=e.getMeta(this.name);if(t.command===d){const{range:e,attrs:r}=t,{selection:o,doc:i}=n,s={range:e,selection:o,doc:i,attrs:r},{from:a,to:l}=e??o;this.options.onUpdateLink(i.textBetween(a,l),s)}})),!this.options.autoLink)return;if((0,l.of)(t)-(0,l.of)(n)===1)return;if(!e.some((e=>e.docChanged)))return;const r=(0,a.PZ)(e,t),o=(0,a.QC)(r,[c.FC,c.Pu]),{mapping:i}=r,{tr:s,doc:u}=n,{updateLink:h,removeLink:p}=this.store.chain(s);return o.forEach((({prevFrom:e,prevTo:n,from:r,to:o})=>{const a=[],l=o-r===2,c=this.getLinkMarksInRange(t.doc,e,n,!0).filter((e=>e.mark.type===this.type)).map((({from:e,to:t,text:n})=>({mappedFrom:i.map(e),mappedTo:i.map(t),text:n,from:e,to:t})));c.forEach((({mappedFrom:e,mappedTo:n,from:i,to:s},d)=>this.getLinkMarksInRange(u,e,n,!0).filter((e=>e.mark.type===this.type)).forEach((n=>{const f=t.doc.textBetween(i,s,void 0," "),m=u.textBetween(n.from,n.to+1,void 0," ").trim(),g=this.isValidUrl(f);this.isValidUrl(m)||(g&&(p({from:n.from,to:n.to}).tr(),c.splice(d,1)),l||r===o&&this.findAutoLinks(m).map((t=>this.addLinkProperties({...t,from:e+t.start,to:e+t.end}))).forEach((({attrs:e,range:t,text:n})=>{h(e,t).tr(),a.push({attrs:e,range:t,text:n})})))})))),this.findTextBlocksInRange(u,{from:r,to:o}).forEach((({text:e,positionStart:t})=>{this.findAutoLinks(e).map((e=>this.addLinkProperties({...e,from:t+e.start+1,to:t+e.end+1}))).filter((({range:e})=>{const t=r>=e.from&&r<=e.to,n=o>=e.from&&o<=e.to;return t||n||l})).filter((({range:e})=>0===this.getLinkMarksInRange(s.doc,e.from,e.to,!1).length)).filter((({range:{from:e},text:t})=>!c.some((({text:n,mappedFrom:r})=>r===e&&n===t)))).forEach((({attrs:e,text:t,range:n})=>{h(e,n).tr(),a.push({attrs:e,range:n,text:t})}))})),window.requestAnimationFrame((()=>{a.forEach((({attrs:e,range:t,text:n})=>{const{doc:r,selection:o}=s;this.options.onUpdateLink(n,{attrs:e,doc:r,range:t,selection:o})}))}))})),0!==s.steps.length?s:void 0}}}buildHref(e){return this.options.extractHref({url:e,defaultProtocol:this.options.defaultProtocol})}getLinkMarksInRange(e,t,n,r){const o=[];if(t===n){const n=Math.max(t-1,0),i=e.resolve(n),s=(0,a.IH)(i,this.type);(null==s?void 0:s.mark.attrs.auto)===r&&o.push(s)}else e.nodesBetween(t,n,((e,t)=>{const n=(e.marks??[]).find((({type:e,attrs:t})=>e===this.type&&t.auto===r));n&&o.push({from:t,to:t+e.nodeSize,mark:n,text:e.textContent})}));return o}findTextBlocksInRange(e,t){const n=[];return e.nodesBetween(t.from,t.to,((e,t)=>{e.isTextblock&&e.type.allowsMarkType(this.type)&&n.push({node:e,pos:t})})),n.map((t=>({text:e.textBetween(t.pos,t.pos+t.node.nodeSize,void 0," "),positionStart:t.pos})))}addLinkProperties({from:e,to:t,href:n,...r}){return{...r,range:{from:e,to:t},attrs:{href:n,auto:!0}}}findAutoLinks(e){if(this.options.findAutoLinks)return this.options.findAutoLinks(e,this.options.defaultProtocol);const t=[];for(const n of(0,s.JD)(e,this.options.autoLinkRegex)){const e=(0,a.FI)(n);if(!e)continue;const r=this.buildHref(e);(this.isValidTLD(r)||r.startsWith("tel:"))&&t.push({text:e,href:r,start:n.index,end:n.index+e.length})}return t}isValidUrl(e){var t;return this.options.isValidUrl?this.options.isValidUrl(e,this.options.defaultProtocol):this.isValidTLD(this.buildHref(e))&&!!(null==(t=this._autoLinkRegexNonGlobal)?void 0:t.test(e))}isValidTLD(e){const{autoLinkAllowedTLDs:t}=this.options;if(0===t.length)return!0;const n=r(e);
1if(""===n)return!0;const o=(0,s.Z$)(n.split("."));return t.includes(o)}};p([(0,o.IGC)({shortcut:i.vO.InsertLink})],f.prototype,"shortcut",1),p([(0,o.WDe)()],f.prototype,"updateLink",1),p([(0,o.WDe)()],f.prototype,"selectLink",1),p([(0,o.WDe)()],f.prototype,"removeLink",1),f=p([(0,o.AOx)({defaultOptions:{autoLink:!1,defaultProtocol:"",selectTextOnClick:!1,openLinkOnClick:!1,autoLinkRegex:/(?:(?:(?:https?|ftp):)?\/\/)?(?:\S+(?::\S*)?@)?(?:(?:[\da-z\u00A1-\uFFFF][\w\u00A1-\uFFFF-]{0,62})?[\da-z\u00A1-\uFFFF]\.)*(?:(?:\d(?!\.)|[a-z\u00A1-\uFFFF])(?:[\da-z\u00A1-\uFFFF][\w\u00A1-\uFFFF-]{0,62})?[\da-z\u00A1-\uFFFF]\.)+[a-z\u00A1-\uFFFF]{2,}(?::\d{2,5})?(?:[#/?]\S*)?/gi,autoLinkAllowedTLDs:["com","de","net","org","uk","cn","ga","nl","cf","ml","tk","ru","br","gq","xyz","fr","eu","info","co","au","ca","it","in","ch","pl","es","online","us","top","be","jp","biz","se","at","dk","cz","za","me","ir","icu","shop","kr","site","mx","hu","io","cc","club","no","cyou"],findAutoLinks:void 0,isValidUrl:void 0,defaultTarget:null,supportedTargets:[],extractHref:function({url:e,defaultProtocol:t}){const n=/^((?:https?|ftp)?:)\/\//.test(e);if(!n&&e.includes("@"))return`mailto:${e}`;return n?e:`${t}//${e}`}},staticKeys:["autoLinkRegex"],handlerKeyOptions:{onClick:{earlyReturnValue:!0}},handlerKeys:["onActivateLink","onShortcut","onUpdateLink","onClick"],defaultPriority:i.xV.Medium})],f)},78469:function(e,t,n){"use strict";n.d(t,{UQ:function(){return F},_3:function(){return B}});var r=n(44573),o=n(378),i=n(57555),s=n(48776),a=n(36912),l=n(2376),c=n(31026),u=n(27784),h=n(33937),p=n(25804),d=n(12806),f=n(16560);function m(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),a=!1,l=s;if(!s)return!1;if(s.depth>=2&&o.node(s.depth-1).type.compatibleContent(e)&&0==s.startIndex){if(0==o.index(s.depth-1))return!1;let e=n.doc.resolve(s.start-2);l=new d.Ts(e,e,s.depth),s.endIndex<s.parent.childCount&&(s=new d.Ts(o,n.doc.resolve(i.end(s.depth)),s.depth)),a=!0}let c=(0,f.nd)(l,e,t,s);return!!c&&(r&&r(function(e,t,n,r,o){let i=d.HY.empty;for(let u=n.length-1;u>=0;u--)i=d.HY.from(n[u].type.create(n[u].attrs,i));e.step(new f.FC(t.start-(r?2:0),t.end,t.start,t.end,new d.p2(i,0,0),n.length,!0));let s=0;for(let u=0;u<n.length;u++)n[u].type==o&&(s=u+1);let a=n.length-s,l=t.start+n.length-(r?2:0),c=t.parent;for(let u=t.startIndex,h=t.endIndex,p=!0;u<h;u++,p=!1)!p&&(0,f.Ax)(e.doc,l,a)&&(e.split(l,a),l+=2*a),l+=c.child(u).nodeSize;return e}(n.tr,s,c,a,e).scrollIntoView()),!0)}}function g(e){return function(t,n){let{$from:r,$to:o}=t.selection,i=r.blockRange(o,(t=>t.childCount>0&&t.firstChild.type==e));return!!i&&(!n||(r.node(i.depth-1).type==e?function(e,t,n,r){let o=e.tr,i=r.end,s=r.$to.end(r.depth);i<s&&(o.step(new f.FC(i-1,s,i,s,new d.p2(d.HY.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new d.Ts(o.doc.resolve(r.$from.pos),o.doc.resolve(s),r.depth));const a=(0,f.k9)(r);if(null==a)return!1;o.lift(r,a);let l=o.mapping.map(i,-1)-1;(0,f.Mn)(o.doc,l)&&o.join(l);return t(o.scrollIntoView()),!0}(t,n,e,i):function(e,t,n){let r=e.tr,o=n.parent;for(let d=n.end,f=n.endIndex-1,m=n.startIndex;f>m;f--)d-=o.child(f).nodeSize,r.delete(d-1,d+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let a=0==n.startIndex,l=n.endIndex==o.childCount,c=i.node(-1),u=i.index(-1);if(!c.canReplace(u+(a?0:1),u+1,s.content.append(l?d.HY.empty:d.HY.from(o))))return!1;let h=i.pos,p=h+s.nodeSize;return r.step(new f.FC(h-(a?1:0),p+(l?1:0),h+1,p-1,new d.p2((a?d.HY.empty:d.HY.from(o.copy(d.HY.empty))).append(l?d.HY.empty:d.HY.from(o.copy(d.HY.empty))),a?0:1,l?0:1),a?0:1)),t(r.scrollIntoView()),!0}(t,n,i)))}}var v=Object.defineProperty,y=Object.getOwnPropertyDescriptor,k=(e,t,n,r)=>{for(var o,i=r>1?void 0:r?y(t,n):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&v(t,n,i),i};function w(e){var t;return!!(null==(t=e.spec.group)?void 0:t.includes(o.eX.ListContainerNode))}function x(e){return w(e.type)}function b(e){return function(e){var t;return!!(null==(t=e.spec.group)?void 0:t.includes(o.eX.ListItemNode))}(e.type)}function S(e,t){return n=>{const{dispatch:r,tr:o}=n,i=(0,u.Ux)(o,n.state),{$from:s,$to:a}=o.selection,l=s.blockRange(a);if(!l)return!1;const c=(0,h.Kk)({predicate:e=>w(e.type),selection:o.selection});
1if(c&&l.depth-c.depth<=1&&0===l.startIndex){if(c.node.type===e)return E(t)(n);if(w(c.node.type))return e.validContent(c.node.content)?(null==r||r(o.setNodeMarkup(c.pos,e)),!0):!!function(e,t,n,r){const o=t.node,i=e.doc.resolve(t.start),s=i.node(-1),a=i.index(-1);if(!s)return!1;if(!s.canReplace(a,a+1,d.HY.from(n.create())))return!1;const l=[];for(let d=0;d<o.childCount;d++){const e=o.child(d);if(!r.validContent(e.content))return!1;const t=r.createChecked(null,e.content);l.push(t)}const c=n.createChecked(null,l),u=t.pos,h=u+o.nodeSize,p=e.selection.from;return e.replaceRangeWith(u,h,c),e.setSelection(e.selection.constructor.near(e.doc.resolve(p))),!0}(o,c,e,t)&&(null==r||r(o.scrollIntoView()),!0)}return m(e)(i,r)}}function C(e,t=["checked"]){return function({tr:n,dispatch:r,state:o}){var i,s;const a=(0,h.jo)(e,o.schema),{$from:c,$to:u}=n.selection;if((0,h.EG)(n.selection)&&n.selection.node.isBlock||c.depth<2||!c.sameParent(u))return!1;const p=c.node(-1);if(p.type!==a)return!1;if(0===c.parent.content.size&&c.node(-1).childCount===c.indexAfter(-1)){if(2===c.depth||c.node(-3).type!==a||c.index(-2)!==c.node(-2).childCount-1)return!1;if(r){const e=c.index(-1)>0;let t=d.HY.empty;for(let n=c.depth-(e?1:2);n>=c.depth-3;n--)t=d.HY.from(c.node(n).copy(t));const o=(null==(i=a.contentMatch.defaultType)?void 0:i.createAndFill())||void 0;t=t.append(d.HY.from(a.createAndFill(null,o)||void 0));const s=c.indexAfter(-1)<c.node(-2).childCount?1:c.indexAfter(-2)<c.node(-3).childCount?2:3;n.replace(c.before(e?void 0:-1),c.after(-s),new d.p2(t,e?3:2,2)),n.setSelection(n.selection.constructor.near(n.doc.resolve(c.pos+(e?3:2)))),r(n.scrollIntoView())}return!0}if(p.attrs.closed&&c.sameParent(u)&&u.pos===u.end()){if(r){const e=c.after(-1),t=(null==(s=a.contentMatch.defaultType)?void 0:s.createAndFill())||void 0,o=a.createAndFill(null,t);o&&(n.insert(e,o),n.setSelection(l.Bs.near(n.doc.resolve(e+1)))),n.delete(c.pos,u.pos),r(n.scrollIntoView())}return!0}const m=Object.fromEntries(Object.entries(p.attrs).filter((([e])=>!t.includes(e)))),g=u.pos===c.end()?p.contentMatchAt(0).defaultType:null,v={...c.node().attrs};n.delete(c.pos,u.pos);const y=g?[{type:a,attrs:m},{type:g,attrs:v}]:[{type:a,attrs:m}];return!!(0,f.Ax)(n.doc,c.pos,2)&&(r&&r(n.split(c.pos,2,y).scrollIntoView()),!0)}}function M({listType:e,itemType:t,tr:n}){const r=A(n.selection);if(!r)return!1;const o=0===r.startIndex,{from:i,to:s}=n.selection;return!!function({listType:e,itemType:t,tr:n,range:r}){var o;const i=r.parent,s=n.doc.slice(r.start,r.end);if(i.type===e&&(null==(o=s.content.firstChild)?void 0:o.type)===t)return!1;const a=[];for(let c=0;c<s.content.childCount;c++){const e=s.content.child(c);if(!t.validContent(e.content))return!1;const n=t.createChecked(null,e.content);a.push(n)}const l=e.createChecked(null,a);return n.replaceRange(r.start,r.end,new d.p2(d.HY.from(l),0,0)),!0}({listType:e,itemType:t,tr:n,range:r})&&(n.setSelection(l.Bs.between(n.doc.resolve(o?i:i+2),n.doc.resolve(o?s:s+2))),n.scrollIntoView(),!0)}function O(e,t){const n=t||e.selection.$from;let r,o,i,s,a=[];for(let c=n.depth;c>=0;c--){if(o=n.node(c),r=n.index(c),i=o.maybeChild(r-1),s=o.maybeChild(r),i&&s&&i.type.name===s.type.name&&x(i)){const e=n.before(c+1);a.push(e)}if(r=n.indexAfter(c),i=o.maybeChild(r-1),s=o.maybeChild(r),i&&s&&i.type.name===s.type.name&&x(i)){const e=n.after(c+1);a.push(e)}}
1a=[...new Set(a)].sort(((e,t)=>t-e));let l=!1;for(const c of a)(0,f.Mn)(e.doc,c)&&(e.join(c),l=!0);return l}function E(e){return t=>{const{dispatch:n,tr:r}=t,o=(0,u.Ux)(r,t.state),i=function(e,t){const{$from:n,$to:r}=t;return n.blockRange(r,(t=>{var n;return(null==(n=t.firstChild)?void 0:n.type)===e}))}(e,r.selection);return!!i&&(!n||(function(e,t,n){const r=e.tr,o=n.parent,i=r.mapping.maps.length;for(let d=n.end,f=n.endIndex-1,g=n.startIndex;f>g;f--)d-=o.child(f).nodeSize,r.delete(d-1,d+1);const s=r.doc.resolve(n.start),a=s.nodeAfter;if(!a)return!1;if(r.mapping.slice(i).map(n.end)!==n.start+a.nodeSize)return!1;const l=0===n.startIndex,c=n.endIndex===o.childCount,u=s.node(-1),h=s.index(-1);if(!u.canReplace(h+(l?0:1),h+1,a.content.append(c?d.HY.empty:d.HY.from(o))))return!1;const p=s.pos,m=p+a.nodeSize;r.step(new f.FC(p-(l?1:0),m+(c?1:0),p+1,m-1,new d.p2((l?d.HY.empty:d.HY.from(o.copy(d.HY.empty))).append(c?d.HY.empty:d.HY.from(o.copy(d.HY.empty))),l?0:1,c?0:1),l?0:1)),t(r.scrollIntoView())}(o,n,i),!0))}}function A(e){const{$from:t,$to:n}=e;return t.blockRange(n,x)}function T({view:e}){if(!e)return!1;{const t=e.state.selection.$cursor;if(!t||t.parentOffset>0)return!1;const n=t.blockRange();if(!n||!b(n.parent)||0!==n.startIndex)return!1}{const t=e.state.tr;(function(e){const t=e.selection.$from,n=t.blockRange();if(!n||!b(n.parent)||0!==n.startIndex)return!1;const r=t.node(n.depth-2),o=t.index(n.depth),i=t.index(n.depth-1),s=t.index(n.depth-2),a=r.maybeChild(s-1),l=null==a?void 0:a.lastChild;if(0!==o||0!==i)return!1;if(a&&x(a)&&l&&b(l))return M({listType:a.type,itemType:l.type,tr:e});if(b(r)){const o=r,i=t.node(n.depth-3);if(x(i))return M({listType:i.type,itemType:o.type,tr:e})}return!1})(t)&&e.dispatch(t)}{const t=e.state.selection.$cursor;if(!t||t.parentOffset>0)return!1;const n=t.blockRange();if(!n||!b(n.parent)||0!==n.startIndex)return!1;const r=t.index(n.depth),o=t.index(n.depth-1),i=t.index(n.depth-2),s=n.depth-2>=1&&b(t.node(n.depth-2));0===r&&0===o&&i<=1&&s&&g(n.parent.type)(e.state,e.dispatch)}return(0,p.al)(e.state,e.dispatch,e),!0}function R({node:e,mark:t,updateDOM:n,updateMark:r}){const o=document.createElement("label");o.contentEditable="false",o.classList.add(c.MQ.LIST_ITEM_MARKER_CONTAINER),o.append(t);const i=document.createElement("div"),s=document.createElement("li");s.classList.add(c.MQ.LIST_ITEM_WITH_CUSTOM_MARKER),s.append(o),s.append(i);const a=o=>o.type===e.type&&(n(e=o,s),r(e,t),!0);return a(e),{dom:s,contentDOM:i,update:a}}function N(e){let t=A(e.selection);if(!t)return!1;const n=function(e,t){const n=e.node(t.depth-1),r=e.node(t.depth-2);return!(!b(n)||!x(r))&&{parentItem:n,parentList:r}}(e.selection.$from,t);if(!n)return!1;const{parentItem:r,parentList:o}=n;t=function(e,t){const n=t.parent,r=t.parent.child(t.endIndex-1),o=t.end,i=t.$to.end(t.depth);return o<i?(e.step(new f.FC(o-1,i,o,i,new d.p2(d.HY.from(r.type.create(null,n.copy())),1,0),1,!0)),new d.Ts(e.doc.resolve(t.$from.pos),e.doc.resolve(i),t.depth)):t}(e,t),t=function(e,t){const n=t.parent,r=t.parent.child(t.endIndex-1),o=t.end,i=t.$to.end(t.depth-1);return o+1<i?(e.step(new f.FC(o-1,i,o+1,i,new d.p2(d.HY.from(n.type.create(null,r.type.create(null))),2,0),0,!0)),new d.Ts(e.selection.$from,e.selection.$to,t.depth)):t}(e,t),t=function(e,t,n,r){return M({listType:n.type,itemType:r.type,tr:e})?new d.Ts(e.selection.$from,e.selection.$to,t.depth):t}(e,t,o,r);const i=(0,f.k9)(t);return"number"!==typeof i||(e.lift(t,i),t=A(e.selection),t&&O(e,e.doc.resolve(t.end-2))),!0}var I=({tr:e,dispatch:t})=>!!N(e)&&(null==t||t(e.scrollIntoView()),!0);function D(e){const{$from:t,$to:n}=e.selection,r=A(e.selection);if(!r)return!1;const o=e.doc.resolve(r.start).node();if(!x(o))return!1;const i=function(e,t,n){let r,o,i,s;const a=t.doc;if(n.startIndex>=1){r=e.child(n.startIndex-1),o=e,s=a.resolve(n.start).start(n.depth),i=s+1;for(let e=0;e<n.startIndex-1;e++)i+=o.child(e).nodeSize}else{const e=t.index(n.depth-1);if(!(e>=1))return!1;{const a=t.node(n.depth-1),l=t.start(n.depth-1);if(o=a.child(e-1),!x(o))return!1;s=l+1;for(let t=0;t<e-1;t++)s+=a.child(t).nodeSize;if(r=o.child(o.childCount-1),i=s+o.nodeSize-r.nodeSize-1,!b(r))return!1}}return{previousItem:r,previousList:o,previousItemStart:i,previousListStart:s}}(o,t,r);if(!i)return!1;const{previousItem:s,previousList:a,previousItemStart:c}=i,{selectedSlice:u,unselectedSlice:h}=function(e,t,n){let r,o;const i=n.start,s=t.depth>=n.depth+2?t.end(n.depth+2):n.end-1,a=n.end;return s+1>=a?(r=e.slice(i,a),o=null):(r=e.slice(i,s),o=e.slice(s+1,a-1)),{selectedSlice:r,unselectedSlice:o}}(e.doc,n,r),p=s.content.append(d.HY.fromArray([o.copy(u.content)])).append(h?h.content:d.HY.empty);e.deleteRange(r.start,r.end);const f=c+s.nodeSize-2,m=s.copy(p);return m.check(),e.replaceRangeWith(c-1,f+1,m),e.setSelection(a===o?l.Bs.between(e.doc.resolve(t.pos),e.doc.resolve(n.pos)):l.Bs.between(e.doc.resolve(t.pos-2),e.doc.resolve(n.pos-2))),!0}var _=({tr:e,dispatch:t})=>!!D(e)&&(null==t||t(e.scrollIntoView()),!0),L=class extends r.nNj{get name(){return"listItemShared"}createKeymap(){const e={Tab:_,"Shift-Tab":I,Backspace:T,"Mod-Backspace":T};if(h.NZ.isMac){const t={"Ctrl-h":e.Backspace,"Alt-Backspace":e["Mod-Backspace"]};return{...e,...t}}return e}createPlugin(){return{appendTransaction:(e,t,n)=>{const r=n.tr;return O(r)?r:null}}}},P=class extends r.QR{get name(){return"listItem"}createTags(){return[o.eX.ListItemNode]}createNodeSpec(e,t){return{content:"paragraph block*",defining:!0,draggable:!1,...t,attrs:{...e.defaults(),closed:{default:!1},nested:{default:!1}},parseDOM:[{tag:"li",getAttrs:e.parse,priority:o.xV.Lowest},...t.parseDOM??[]],toDOM:t=>["li",e.dom(t),0]}}createNodeViews(){return this.options.enableCollapsible?(e,t,n)=>{const r=document.createElement("div");return r.classList.add(c.MQ.COLLAPSIBLE_LIST_ITEM_BUTTON),r.contentEditable="false",r.addEventListener("click",(()=>{if(r.classList.contains("disabled"))return;const e=n(),o=l.qv.create(t.state.doc,e);return t.dispatch(t.state.tr.setSelection(o)),this.store.commands.toggleListItemClosed(),!0})),R({mark:r,node:e,updateDOM:$,updateMark:z})}:{}}createKeymap(){return{Enter:C(this.type)}}createExtensions(){return[new L]}toggleListItemClosed(e){return({state:{tr:t,selection:n},dispatch:r})=>
1{if(!(0,h.EG)(n)||n.node.type.name!==this.name)return!1;const{node:o,from:s}=n;return e=(0,i.jn)(e)?e:!o.attrs.closed,null==r||r(t.setNodeMarkup(s,void 0,{...o.attrs,closed:e})),!0}}liftListItemOutOfList(e){return E(e??this.type)}};function $(e,t){e.attrs.closed?t.classList.add(c.MQ.COLLAPSIBLE_LIST_ITEM_CLOSED):t.classList.remove(c.MQ.COLLAPSIBLE_LIST_ITEM_CLOSED)}function z(e,t){e.childCount<=1?t.classList.add("disabled"):t.classList.remove("disabled")}k([(0,r.WDe)()],P.prototype,"toggleListItemClosed",1),k([(0,r.WDe)()],P.prototype,"liftListItemOutOfList",1),P=k([(0,r.AOx)({defaultOptions:{enableCollapsible:!1},staticKeys:["enableCollapsible"]})],P);var F=class extends r.QR{get name(){return"bulletList"}createTags(){return[o.eX.Block,o.eX.ListContainerNode]}createNodeSpec(e,t){return{content:"listItem+",...t,attrs:e.defaults(),parseDOM:[{tag:"ul",getAttrs:e.parse},...t.parseDOM??[]],toDOM:t=>["ul",e.dom(t),0]}}createNodeViews(){return this.options.enableSpine?(e,t,n)=>{var r;const o=document.createElement("div");o.style.position="relative";const i=n(),s=t.state.doc.resolve(i+1),a=s.node(s.depth-1);if(!("listItem"!==(null==(r=null==a?void 0:a.type)?void 0:r.name))){const e=document.createElement("div");e.contentEditable="false",e.classList.add(c.MQ.LIST_SPINE),e.addEventListener("click",(e=>{const r=n(),o=t.state.doc.resolve(r+1),i=o.start(o.depth-1),s=l.qv.create(t.state.doc,i-1);t.dispatch(t.state.tr.setSelection(s)),this.store.commands.toggleListItemClosed(),e.preventDefault(),e.stopPropagation()})),o.append(e)}const u=document.createElement("ul");return u.classList.add(c.MQ.UL_LIST_CONTENT),o.append(u),{dom:o,contentDOM:u}}:{}}createExtensions(){return[new P({priority:o.xV.Low,enableCollapsible:this.options.enableSpine})]}toggleBulletList(){return S(this.type,(0,i.fp)(this.store.schema.nodes,"listItem"))}listShortcut(e){return this.toggleBulletList()(e)}createInputRules(){const e=/^\s*([*+-])\s$/;return[(0,a.S0)(e,this.type),new a.VK(e,((e,t,n,r)=>{const o=e.tr;o.deleteRange(n,r);return M({listType:this.type,itemType:(0,i.fp)(this.store.schema.nodes,"listItem"),tr:o})?o:null}))]}};k([(0,r.WDe)({icon:"listUnordered",label:({t:e})=>e(s.it.BULLET_LIST_LABEL)})],F.prototype,"toggleBulletList",1),k([(0,r.IGC)({shortcut:o.vO.BulletList,command:"toggleBulletList"})],F.prototype,"listShortcut",1),F=k([(0,r.AOx)({defaultOptions:{enableSpine:!1},staticKeys:["enableSpine"]})],F);var B=class extends r.QR{get name(){return"orderedList"}createTags(){return[o.eX.Block,o.eX.ListContainerNode]}createNodeSpec(e,t){return{content:"listItem+",...t,attrs:{...e.defaults(),order:{default:1}},parseDOM:[{tag:"ol",getAttrs:t=>(0,h.jd)(t)?{...e.parse(t),order:+(t.getAttribute("start")??1)}:{}},...t.parseDOM??[]],toDOM:t=>{const n=e.dom(t);return 1===t.attrs.order?["ol",n,0]:["ol",{...n,start:t.attrs.order},0]}}}createExtensions(){return[new P({priority:o.xV.Low})]}toggleOrderedList(){return S(this.type,(0,i.fp)(this.store.schema.nodes,"listItem"))}listShortcut(e){return this.toggleOrderedList()(e)}createInputRules(){const e=/^(\d+)\.\s$/;return[(0,a.S0)(e,this.type,(e=>({order:+(0,i.fp)(e,1)})),((e,t)=>t.childCount+t.attrs.order===+(0,i.fp)(e,1))),new a.VK(e,((e,t,n,r)=>{const o=e.tr;o.deleteRange(n,r);if(!M({listType:this.type,itemType:(0,i.fp)(this.store.schema.nodes,"listItem"),tr:o}))return null;const s=+(0,i.fp)(t,1);if(1!==s){const e=(0,h.Tr)({selection:o.selection,types:this.type});e&&o.setNodeMarkup(e.pos,void 0,{order:s})}return o}))]}};k([(0,r.WDe)({icon:"listOrdered",label:({t:e})=>e(s.it.ORDERED_LIST_LABEL)})],B.prototype,"toggleOrderedList",1),k([(0,r.IGC)({shortcut:o.vO.OrderedList,command:"toggleOrderedList"})],B.prototype,"listShortcut",1),B=k([(0,r.AOx)({})],B);var j=class extends r.QR{get name(){return"taskListItem"}createTags(){return[o.eX.ListItemNode]}createNodeSpec(e,t){return{content:"paragraph block*",defining:!0,draggable:!1,...t,attrs:{...e.defaults(),checked:{default:!1}},parseDOM:[{tag:"li[data-task-list-item]",getAttrs:t=>{let n=!1;return(0,h.jd)(t)&&null!==t.getAttribute("data-checked")&&(n=!0),{checked:n,...e.parse(t)}},priority:o.xV.Medium},...t.parseDOM??[]],toDOM:t=>["li",{...e.dom(t),"data-task-list-item":"","data-checked":t.attrs.checked?"":void 0},0]}}createNodeViews(){return(e,t,n)=>{const r=document.createElement("input");return r.type="checkbox",r.classList.add(c.MQ.LIST_ITEM_CHECKBOX),r.contentEditable="false",r.addEventListener("click",(e=>{t.editable||e.preventDefault()})),r.addEventListener("change",(()=>{const e=n(),r=t.state.doc.resolve(e+1);this.store.commands.toggleCheckboxChecked({$pos:r})})),r.checked=e.attrs.checked,R({node:e,mark:r,updateDOM:H,updateMark:W})}}createKeymap(){return{Enter:C(this.type)}}createExtensions(){return[new L]}toggleCheckboxChecked(e){let t,n;return"boolean"===typeof e?t=e:e&&(t=e.checked,n=e.$pos),({tr:e,dispatch:r})=>{const o=(0,h.Tr)({selection:n??e.selection.$from,types:this.type});if(!o)return!1;const{node:i,pos:s}=o,a={...i.attrs,checked:t??!i.attrs.checked};
1return null==r||r(e.setNodeMarkup(s,void 0,a)),!0}}createInputRules(){const e=/^\s*(\[( ?|x|X)]\s)$/;return[(0,a.S0)(e,this.type,(e=>({checked:["x","X"].includes((0,h.FI)(e,2))}))),new a.VK(e,((e,t,n,r)=>{const o=e.tr;o.deleteRange(n,r);if(!M({listType:(0,i.fp)(this.store.schema.nodes,"taskList"),itemType:this.type,tr:o}))return null;const s=["x","X"].includes((0,h.FI)(t,2));if(s){const e=(0,h.Tr)({selection:o.selection,types:this.type});e&&o.setNodeMarkup(e.pos,void 0,{checked:s})}return o}))]}};function H(e,t){e.attrs.checked?t.setAttribute("data-checked",""):t.removeAttribute("data-checked"),t.setAttribute("data-task-list-item","")}function W(e,t){t.checked=!!e.attrs.checked}k([(0,r.WDe)()],j.prototype,"toggleCheckboxChecked",1);var J=class extends r.QR{get name(){return"taskList"}createTags(){return[o.eX.Block,o.eX.ListContainerNode]}createNodeSpec(e,t){return{content:"taskListItem+",...t,attrs:e.defaults(),parseDOM:[{tag:"ul[data-task-list]",getAttrs:e.parse,priority:o.xV.Medium},...t.parseDOM??[]],toDOM:t=>["ul",{...e.dom(t),"data-task-list":""},0]}}createExtensions(){return[new j({})]}toggleTaskList(){return S(this.type,(0,i.fp)(this.store.schema.nodes,"taskListItem"))}listShortcut(e){return this.toggleTaskList()(e)}};k([(0,r.WDe)({icon:"checkboxMultipleLine",label:({t:e})=>e(s.it.TASK_LIST_LABEL)})],J.prototype,"toggleTaskList",1),k([(0,r.IGC)({shortcut:o.vO.TaskList,command:"toggleTaskList"})],J.prototype,"listShortcut",1)},54340:function(e,t,n){"use strict";n.d(t,{V:function(){return h}});var r=n(44573),o=n(378),i=n(33937),s=n(48776),a=Object.defineProperty,l=Object.getOwnPropertyDescriptor,c=(e,t,n,r)=>{for(var o,i=r>1?void 0:r?l(t,n):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&a(t,n,i),i},u={icon:"strikethrough",label:({t:e})=>e(s.Mo.LABEL),description:({t:e})=>e(s.Mo.DESCRIPTION)},h=class extends r.uS7{get name(){return"strike"}createTags(){return[o.eX.FontStyle,o.eX.FormattingMark]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"s",getAttrs:e.parse},{tag:"del",getAttrs:e.parse},{tag:"strike",getAttrs:e.parse},{style:"text-decoration",getAttrs:e=>"line-through"===e&&{}},...t.parseDOM??[]],toDOM:t=>["s",e.dom(t),0]}}toggleStrike(){return(0,r.w9d)({type:this.type})}shortcut(e){return this.toggleStrike()(e)}createInputRules(){return[(0,i.Cf)({regexp:/~([^~]+)~$/,type:this.t
1ype,ignoreWhitespace:!0})]}createPasteRules(){return[{regexp:/~([^~]+)~/g,type:"mark",markType:this.type}]}};c([(0,r.WDe)(u)],h.prototype,"toggleStrike",1),c([(0,r.IGC)({shortcut:o.vO.Strike,command:"toggleStrike"})],h.prototype,"shortcut",1),h=c([(0,r.AOx)({})],h)},40545:function(e,t,n){"use strict";n.d(t,{A:function(){return u}});var r=n(44573),o=n(378),i=n(48776),s=Object.defineProperty,a=Object.getOwnPropertyDescriptor,l=(e,t,n,r)=>{for(var o,i=r>1?void 0:r?a(t,n):t,l=e.length-1;l>=0;l--)(o=e[l])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&s(t,n,i),i},c={icon:"underline",label:({t:e})=>e(i.bA.LABEL),description:({t:e})=>e(i.bA.DESCRIPTION)},u=class extends r.uS7{get name(){return"underline"}createTags(){return[o.eX.FontStyle,o.eX.FormattingMark]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"u",getAttrs:e.parse},{style:"text-decoration",getAttrs:e=>"underline"===e&&{}},...t.parseDOM??[]],toDOM:t=>["u",e.dom(t),0]}}toggleUnderline(e){return(0,r.w9d)({type:this.type,selection:e})}shortcut(e){return this.toggleUnderline()(e)}};l([(0,r.WDe)(c)],u.prototype,"toggleUnderline",1),l([(0,r.IGC)({shortcut:o.vO.Underline,command:"toggleUnderline"})],u.prototype,"shortcut",1),u=l([(0,r.AOx)({})],u)},48776:function(e,t,n){"use strict";n.d(t,{J:function(){return s},Mo:function(){return d},TU:function(){return o},Vb:function(){return r},XW:function(){return c},bA:function(){return f},bk:function(){return l},iR:function(){return p},it:function(){return h},jz:function(){return a},ov:function(){return i},wr:function(){return u}});var r=Object.freeze({__proto__:null,COPY_DESCRIPTION:{id:"extension.command.copy.description",message:"Copy the selected text",comment:"Description for copy command."},COPY_LABEL:{id:"extension.command.copy.label",message:"Copy",comment:"Label for copy command."},CUT_DESCRIPTION:{id:"extension.command.cut.description",message:"Cut the selected text",comment:"Description for cut command."},CUT_LABEL:{id:"extension.command.cut.label",message:"Cut",comment:"Label for cut command."},PASTE_DESCRIPTION:{id:"extension.command.paste.description",message:"Paste content into the editor",comment:"Description for paste command."},PASTE_LABEL:{id:"extension.command.paste.label",message:"Paste",comment:"Label for paste command."},SELECT_ALL_DESCRIPTION:{id:"extension.command.select-all.description",message:"Select all content within the editor",comment:"Description for select all command."},SELECT_ALL_LABEL:{id:"extension.command.select-all.label",message:"Select all",comment:"Label for select all command."}});var o=Object.freeze({__proto__:null,DESCRIPTION:{id:"extension.command.toggle-blockquote.description",message:"Add blockquote formatting to the selected text",comment:"Description for blockquote formatting command."},LABEL:{id:"extension.command.toggle-blockquote.label",message:"Blockquote",comment:"Label for blockquote formatting command."}});var i=Object.freeze({__proto__:null,DESCRIPTION:{id:"extension.command.toggle-bold.description",message:"Add bold formatting to the selected text",comment:"Description for bold formatting command."},LABEL:{id:"extension.command.toggle-bold.label",message:"Bold",comment:"Label for bold formatting command."}});var s=Object.freeze({__proto__:null,DESCRIPTION:{id:"extension.command.toggle-code-block.description",message:"Add a code block",comment:"Description for the code block command."},LABEL:{id:"extension.command.toggle-code-block.label",message:"Codeblock",comment:"Label for the code block command."}});var a=Object.freeze({__proto__:null,DESCRIPTION:{id:"extension.command.toggle-code.description",message:"Add inline code formatting to the selected text",comment:"Description for the inline code formatting command."},LABEL:{id:"extension.command.toggle-code.label",message:"Code",comment:"Label for the inline code formatting."}});var l=Object.freeze({__proto__:null,LABEL:{id:"extension.command.toggle-heading.label",message:"{level, select, 1 {Heading 1}\n2 {Heading 2}\n3 {Heading 3}\n4 {Heading 4}\n5 {Heading 5}\n6 {Heading 6}\nother {Heading}}",comment:"Label for heading command with support for levels."}});var c=Object.freeze({__proto__:null,REDO_DESCRIPTION:{id:"extension.command.redo.description",message:"Redo the most recent action",comment:"Description for redo."},REDO_LABEL:{id:"extension.command.redo.label",message:"Redo",comment:"Label for redo."}
1,UNDO_DESCRIPTION:{id:"extension.command.undo.description",message:"Undo the most recent action",comment:"Description for undo."},UNDO_LABEL:{id:"extension.command.undo.label",message:"Undo",comment:"Label for undo."}});var u=Object.freeze({__proto__:null,DESCRIPTION:{id:"extension.command.toggle-italic.description",message:"Italicize the selected text",comment:"Description for italic formatting command."},LABEL:{id:"extension.command.toggle-italic.label",message:"Italic",comment:"Label for italic formatting command."}});var h=Object.freeze({__proto__:null,BULLET_LIST_LABEL:{id:"extension.command.toggle-bullet-list.description",message:"Bulleted list",comment:"Description for inserting a bullet list into the editor."},ORDERED_LIST_LABEL:{id:"extension.command.toggle-ordered-list.label",message:"Ordered list",comment:"Label for inserting an ordered list into the editor."},TASK_LIST_LABEL:{id:"extension.command.toggle-task-list.description",message:"Tasked list",comment:"Description for inserting a task list into the editor."}});var p=Object.freeze({__proto__:null,CONVERT_DESCRIPTION:{id:"extension.command.convert-paragraph.description",message:"Convert current block into a paragraph block.",comment:"Description for converting a paragraph."},CONVERT_LABEL:{id:"extension.command.convert-paragraph.label",message:"Convert Paragraph",comment:"Label for converting the current node into a paragraph."},INSERT_DESCRIPTION:{id:"extension.command.insert-paragraph.description",message:"Insert a new paragraph",comment:"Description for inserting a paragraph."},INSERT_LABEL:{id:"extension.command.insert-paragraph.label",message:"Insert Paragraph",comment:"Label for inserting a paragraph."}});var d=Object.freeze({__proto__:null,DESCRIPTION:{id:"extension.command.toggle-strike.description",message:"Strikethrough the selected text",comment:"Description for strike formatting command."},LABEL:{id:"extension.command.toggle-strike.label",message:"Strikethrough",comment:"Label for strike formatting command."}});var f=Object.freeze({__proto__:null,DESCRIPTION:{id:"extension.command.toggle-underline.description",message:"Underline the selected text",comment:"Description for underline formatting command."},LABEL:{id:"extension.command.toggle-underline.label",message:"Underline",comment:"Label for underline formatting command."}})},27784:function(e,t,n){"use strict";n.d(t,{A_:function(){return s},QF:function(){return l},Ux:function(){return i},fB:function(){return a}});var r=n(378),o=n(57555);function i(e,t){const n=Object.getPrototypeOf(t);let r=e.selection,i=e.doc,s=e.storedMarks;const a=(0,o.Ry)();for(const[o,l]of Object.entries(t))a[o]={value:l};return Object.create(n,{...a,storedMarks:{get:()=>s},selection:{get:()=>r},doc:{get:()=>i},tr:{get:()=>(r=e.selection,i=e.doc,s=e.storedMarks,e)}})}function s(e){return({state:t,dispatch:n,view:r,tr:o})=>e(i(o,t),n,r)}function a(e){return t=>{var n;return(0,o.kG)(void 0===t.dispatch||t.dispatch===(null==(n=t.view)?void 0:n.dispatch),{code:r.mA.NON_CHAINABLE_COMMAND}),e(t)}}function l(...e){return({state:t,dispatch:n,view:r,tr:o,...i})=>{for(const s of e)if(s({state:t,dispatch:n,view:r,tr:o,...i}))return!0;return!1}}},2525:function(e,t,n){"use strict";n.d(t,{O1:function(){return ns},iF:function(){return Qi},rj:function(){return Hi}});var r={};n.r(r),n.d(r,{_in:function(){return D},af:function(){return _},ak:function(){return L},am:function(){return P},an:function(){return $},ar:function(){return z},ars:function(){return F},as:function(){return B},asa:function(){return j},ast:function(){return H},az:function(){return W},be:function(){return J},bem:function(){return U},bez:function(){return q},bg:function(){return V},bho:function(){return K},bm:function(){return Y},bn:function(){return G},bo:function(){return X},br:function(){return Z},brx:function(){return Q},bs:function(){return ee},ca:function(){return te},ce:function(){return ne},ceb:function(){return re},cgg:function(){return oe},chr:function(){return ie},ckb:function(){return se},cs:function(){return ae},cy:function(){return le},da:function(){return ce},de:function(){return ue},dsb:function(){return he},dv:function(){return pe},dz:function(){return de},ee:function(){return fe},el:function(){return me},en:function(){return ge},eo:function(){return ve},es:function(){return ye},et:function(){return ke},eu:function(){return we},fa:function(){return xe},ff:function(){return be},fi:function(){return Se},fil:function(){return Ce},fo:function(){return Me},fr:function(){return Oe},fur:function(){return Ee},fy:function(){return Ae},ga:function(){return Te},gd:function(){return Re},gl:function(){return Ne},gsw:function(){return Ie},gu:function(){return De},guw:function(){return _e},gv:function(){return Le},ha:function(){return Pe},haw:function(){return $e},he:function(){return ze},hi:function(){return Fe},hr:function(){return Be},hsb:function(){return je},hu:function(){return He},hy:function(){return We},ia:function(){return Je},id:function(){return Ue},ig:function(){return qe},ii:function(){return Ve},io:function(){return Ke},is:function(){return Ye},it:function(){return Ge},iu:function(){return Xe},iw:function(){return Ze},ja:function(){return Qe},jbo:function(){return et},jgo:function(){return tt},ji:function(){return nt},jmc:function(){return rt},jv:function(){return ot},jw:function(){return it},ka:function(){return st},kab:function(){return at},kaj:function(){return lt},kcg:function(){return ct},kde:function(){return ut},kea:function(){return ht},kk:function(){return pt},kkj:function(){return dt},kl:function(){return ft},km:function(){return mt},kn:function(){return gt},ko:function(){return vt},ks:function(){return yt},ksb:function(){return kt},ksh:function(){return wt},ku:function(){return xt},kw:function(){return bt},ky:function(){return St},lag:function(){return Ct},lb:function(){return Mt},lg:function(){return Ot},lkt:function(){return Et},ln:function(){return At},lo:function(){return Tt},lt:function(){return Rt},lv:function(){return Nt},mas:function(){return It},mg:function(){return Dt},mgo:function(){return _t},mk:function(){return Lt},ml:function(){return Pt},mn:function(){return $t},mo:function(){return zt},mr:function(){return Ft},ms:function(){return Bt},mt:function(){return jt},my:function(){return Ht},nah:function(){return Wt},naq:function(){return Jt},nb:function(){return Ut},nd:function(){return qt},ne:function(){return Vt},nl:function(){return Kt},nn:function(){return Yt},nnh:function(){return Gt},no:function(){return Xt},nqo:function(){return Zt},nr:function(){return Qt},nso:function(){return en},ny:function(){return tn},nyn:function(){return nn},om:function(){return rn},or:function(){return on},os:function(){return sn},osa:function(){return an},pa:function(){return ln},pap:function(){return cn},pl:function(){return un},prg:function(){return hn},ps:function(){return pn},pt:function(){return dn},pt_PT:function(){return fn},rm:function(){return mn},ro:function(){return gn},rof:function(){return vn},root:function(){return yn},ru:function(){return kn},rwk:function(){return wn},sah:function(){return xn},saq:function(){return bn},sc:function(){return Sn},scn:function(){return Cn},sd:function(){return Mn},sdh:function(){return On},se:function(){return En},seh:function(){return An},ses:function(){return Tn},sg:function(){return Rn},sh:function(){return Nn},shi:function(){return In},si:function(){return Dn},sk:function(){return _n},sl:function(){return Ln},sma:function(){return Pn},smi:function(){return $n},smj:function(){return zn},smn:function(){return Fn},sms:function(){return Bn},sn:function(){return jn},so:function(){return Hn},sq:function(){return Wn},sr:function(){return Jn},ss:function(){return Un},ssy:function(){return qn},st:function(){return Vn},su:function(){return Kn},sv:function(){return Yn},sw:function(){return Gn},syr:function(){return Xn},ta:function(){return Zn},te:function(){return Qn},teo:function(){return er},th:function(){return tr},ti:function(){return nr},tig:function(){return rr},tk:function(){return or},tl:function(){return ir},tn:function(){return sr},to:function(){return ar},tr:function(){return lr},ts:function(){return cr},tzm:function(){return ur},ug:function(){return hr},uk:function(){return pr},ur:function(){return dr},uz:function(){return fr},ve:function(){return mr},vi:function(){return gr},vo:function(){return vr},vun:function(){return yr},wa:function(){return kr},wae:function(){return wr},wo:function(){return xr},xh:function(){return br},xog:function(){return Sr},yi:function(){return Cr},yo:function(){return Mr},yue:function(){return Or},zh:function(){return Er},zu:function(){return Ar}});var o=n(67294),i=n(57555),s=n(378);function a(e){const t=(0,o.createContext)(null),n=function(e){return(t,n)=>{const r=(0,o.useContext)(e),i=function(e){const t=(0,o.useRef)();return l((()=>{t.current=e})),t.current}(r);if(!r)throw new Error("`useContextHook` must be placed inside the `Provider` returned by the `createContextState` method");if(!t)return r;if("function"!==typeof t)throw new TypeError("invalid arguments passed to `useContextHook`. This hook must be called with zero arguments, a getter function or a path string.");const s=t(r);if(!i||!n)return s;const a=t(i);return n(a,s)?a:s}}(t);return[n=>{const r=e(n);return o.createElement(t.Provider,{value:r},n.children)},n,t]}var l="undefined"!==typeof document?o.useLayoutEffect:o.useEffect;function c(e){return t=>{if(!e.current)throw new Error("`get` called outside of function scope. `get` can only be called within a function.");
1if(!t)return e.current;if("function"!==typeof t)throw new TypeError("Invalid arguments passed to `useContextHook`. The hook must be called with zero arguments, a getter function or a path string.");return t(e.current)}}function u(e){return t=>{if(!e.current)throw new Error("`set` called outside of function scope. `set` can only be called within a function.");e.current((e=>({...e,..."function"===typeof t?t(e):t})))}}var h=n(93012);const p=e=>"string"===typeof e,d=new Map;function f(e){return[...Array.isArray(e)?e:[e],"en"]}function m(e,t,n){const r=f(e);return y((()=>k("date",r,n)),(()=>new Intl.DateTimeFormat(r,n))).format(p(t)?new Date(t):t)}function g(e,t,n){const r=f(e);return y((()=>k("number",r,n)),(()=>new Intl.NumberFormat(r,n))).format(t)}function v(e,t,n,{offset:r=0,...o}){const i=f(e),s=t?y((()=>k("plural-ordinal",i)),(()=>new Intl.PluralRules(i,{type:"ordinal"}))):y((()=>k("plural-cardinal",i)),(()=>new Intl.PluralRules(i,{type:"cardinal"})));return o[n]??o[s.select(n-r)]??o.other}function y(e,t){const n=e();let r=d.get(n);return r||(r=t(),d.set(n,r)),r}function k(e,t,n){return`${e}-${t.join("-")}-${JSON.stringify(n)}`}const w=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g;function x(e,t,n){return(r,o={})=>{const i=((e,t,n={})=>{t=t||e;const r=e=>p(e)?n[e]||{style:e}:e,o=(e,o)=>{const i=Object.keys(n).length?r("number"):{},s=g(t,e,i);return o.replace("#",s)};return{plural:(e,n)=>{const{offset:r=0}=n,i=v(t,!1,e,n);return o(e-r,i)},selectordinal:(e,n)=>{const{offset:r=0}=n,i=v(t,!0,e,n);return o(e-r,i)},select:(e,t)=>t[e]??t.other,number:(e,n)=>g(t,e,r(n)),date:(e,n)=>m(t,e,r(n)),undefined:e=>e}})(t,n,o),s=e=>Array.isArray(e)?e.reduce(((e,t)=>{if(p(t))return e+t;const[n,o,a]=t;let l={};null==a||p(a)?l=a:Object.keys(a).forEach((e=>{l[e]=s(a[e])}));const c=i[o](r[n],l);return null==c?e:e+c}),""):e,a=s(e);return p(a)&&w.test(a)?h(a.trim()):p(a)?a.trim():a}}var b=Object.defineProperty,S=(e,t,n)=>(((e,t,n)=>{t in e?b(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!==typeof t?t+"":t,n),n);var C=Object.defineProperty,M=(e,t,n)=>(((e,t,n)=>{t in e?C(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!==typeof t?t+"":t,n),n);class O extends class{constructor(){S(this,"_events",{})}on(e,t){return this._hasEvent(e)||(this._events[e]=[]),this._events[e].push(t),()=>this.removeListener(e,t)}removeListener(e,t){if(!this._hasEvent(e))return;const n=this._events[e].indexOf(t);~n&&this._events[e].splice(n,1)}emit(e,...t){this._hasEvent(e)&&this._events[e].map((e=>e.apply(this,t)))}_hasEvent(e){return Array.isArray(this._events[e])}}{constructor(e){super(),M(this,"_locale"),M(this,"_locales"),M(this,"_localeData"),M(this,"_messages"),M(this,"_missing"),M(this,"t",this._.bind(this)),this._messages={},this._localeData={},null!=e.missing&&(this._missing=e.missing),null!=e.messages&&this.load(e.messages),null!=e.localeData&&this.loadLocaleData(e.localeData),null==e.locale&&null==e.locales||this.activate(e.locale,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}get localeData(){return this._localeData[this._locale]??{}}_loadLocaleData(e,t){null==this._localeData[e]?this._localeData[e]=t:Object.assign(this._localeData[e],t)}loadLocaleData(e,t){null!=t?this._loadLocaleData(e,t):Object.keys(e).forEach((t=>this._loadLocaleData(t,e[t]))),this.emit("change")}_load(e,t){null==this._messages[e]?this._messages[e]=t:Object.assign(this._messages[e],t)}load(e,t){null!=t?this._load(e,t):Object.keys(e).forEach((t=>this._load(t,e[t]))),this.emit("change")}loadAndActivate({locale:e,locales:t,messages:n}){this._locale=e,this._locales=t||void 0,this._messages[this._locale]=n,this.emit("change")}activate(e,t){this._locale=e,this._locales=t,this.emit("change")}_(e,t={},{message:n,formats:r}={}){p(e)||(t=e.values||t,n=e.message,e=e.id);const o=!this.messages[e],i=this._missing;if(i&&o)return"function"===typeof i?i(this._locale,e):i;o&&this.emit("missing",{id:e,locale:this._locale});let s=this.messages[e]||n||e;return p(s)&&w.test(s)?JSON.parse(`"${s}"`):p(s)?s:x(s,this._locale,this._locales)(t,r)}date(e,t){return m(this._locales||this._locale,e,t)}number(e,t){return g(this._locales||this._locale,e,t)}}const E=function(e={}){return new O(e)}();function A(e,t){return t?"other":1==e?"one":"other"}function T(e,t){return t?"other":0==e||1==e?"one":"other"}function R(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"}function N(e,t){return"other"}function I(e,t){return t?"other":1==e?"one":2==e?"two":"other"}const D=N,_=A,L=T;function P(e,t){return t?"other":e>=0&&e<=1?"one":"other"}const $=A;function z(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":0==e?"zero":1==e?"one":2==e?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"}function F(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":0==e?"zero":1==e?"one":2==e?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"}function B(e,t){return t?1==e||5==e||7==e||8==e||9==e||10==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"}const j=A,H=R;function W(e,t){var n=String(e).split(".")[0],r=n.slice(-1),o=n.slice(-2),i=n.slice(-3);return t?1==r||2==r||5==r||7==r||8==r||20==o||50==o||70==o||80==o?"one":3==r||4==r||100==i||200==i||300==i||400==i||500==i||600==i||700==i||800==i||900==i?"few":0==n||6==r||40==o||
160==o||90==o?"many":"other":1==e?"one":"other"}function J(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-1),i=r&&n[0].slice(-2);return t?2!=o&&3!=o||12==i||13==i?"other":"few":1==o&&11!=i?"one":o>=2&&o<=4&&(i<12||i>14)?"few":r&&0==o||o>=5&&o<=9||i>=11&&i<=14?"many":"other"}const U=A,q=A,V=A,K=T,Y=N;function G(e,t){return t?1==e||5==e||7==e||8==e||9==e||10==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"}const X=N;function Z(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-1),i=r&&n[0].slice(-2),s=r&&n[0].slice(-6);return t?"other":1==o&&11!=i&&71!=i&&91!=i?"one":2==o&&12!=i&&72!=i&&92!=i?"two":(3==o||4==o||9==o)&&(i<10||i>19)&&(i<70||i>79)&&(i<90||i>99)?"few":0!=e&&r&&0==s?"many":"other"}const Q=A;function ee(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),a=r.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?"other":i&&1==s&&11!=a||1==l&&11!=c?"one":i&&s>=2&&s<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}function te(e,t){var n=!String(e).split(".")[1];return t?1==e||3==e?"one":2==e?"two":4==e?"few":"other":1==e&&n?"one":"other"}const ne=A;function re(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),a=o.slice(-1);return t?"other":i&&(1==r||2==r||3==r)||i&&4!=s&&6!=s&&9!=s||!i&&4!=a&&6!=a&&9!=a?"one":"other"}const oe=A,ie=A,se=A;function ae(e,t){var n=String(e).split("."),r=n[0],o=!n[1];return t?"other":1==e&&o?"one":r>=2&&r<=4&&o?"few":o?"other":"many"}function le(e,t){return t?0==e||7==e||8==e||9==e?"zero":1==e?"one":2==e?"two":3==e||4==e?"few":5==e||6==e?"many":"other":0==e?"zero":1==e?"one":2==e?"two":3==e?"few":6==e?"many":"other"}function ce(e,t){var n=String(e).split("."),r=n[0],o=Number(n[0])==e;return t||1!=e&&(o||0!=r&&1!=r)?"other":"one"}const ue=R;function he(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-2),a=o.slice(-2);return t?"other":i&&1==s||1==a?"one":i&&2==s||2==a?"two":i&&(3==s||4==s)||3==a||4==a?"few":"other"}const pe=A,de=N,fe=A,me=A;function ge(e,t){var n=String(e).split("."),r=!n[1],o=Number(n[0])==e,i=o&&n[0].slice(-1),s=o&&n[0].slice(-2);return t?1==i&&11!=s?"one":2==i&&12!=s?"two":3==i&&13!=s?"few":"other":1==e&&r?"one":"other"}const ve=A,ye=A,ke=R,we=A;function xe(e,t){return t?"other":e>=0&&e<=1?"one":"other"}function be(e,t){return t?"other":e>=0&&e<2?"one":"other"}const Se=R;function Ce(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),a=o.slice(-1);return t?1==e?"one":"other":i&&(1==r||2==r||3==r)||i&&4!=s&&6!=s&&9!=s||!i&&4!=a&&6!=a&&9!=a?"one":"other"}const Me=A;function Oe(e,t){return t?1==e?"one":"other":e>=0&&e<2?"one":"other"}const Ee=A,Ae=R;function Te(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?1==e?"one":"other":1==e?"one":2==e?"two":r&&e>=3&&e<=6?"few":r&&e>=7&&e<=10?"many":"other"}function Re(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?1==e||11==e?"one":2==e||12==e?"two":3==e||13==e?"few":"other":1==e||11==e?"one":2==e||12==e?"two":r&&e>=3&&e<=10||r&&e>=13&&e<=19?"few":"other"}const Ne=R,Ie=A;function De(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"}const _e=T;function Le(e,t){var n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-1),s=r.slice(-2);return t?"other":o&&1==i?"one":o&&2==i?"two":!o||0!=s&&20!=s&&40!=s&&60!=s&&80!=s?o?"other":"many":"few"}const Pe=A,$e=A;function ze(e,t){var n=String(e).split("."),r=n[0],o=!n[1],i=Number(n[0])==e,s=i&&n[0].slice(-1);return t?"other":1==e&&o?"one":2==r&&o?"two":o&&(e<0||e>10)&&i&&0==s?"many":"other"}function Fe(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"}function Be(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),a=r.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?"other":i&&1==s&&11!=a||1==l&&11!=c?"one":i&&s>=2&&s<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}function je(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-2),a=o.slice(-2);return t?"other":i&&1==s||1==a?"one":i&&2==s||2==a?"two":i&&(3==s||4==s)||3==a||4==a?"few":"other"}function He(e,t){return t?1==e||5==e?"one":"other":1==e?"one":"other"}function We(e,t){return t?1==e?"one":"other":e>
1=0&&e<2?"one":"other"}const Je=R,Ue=N,qe=N,Ve=N,Ke=R;function Ye(e,t){var n=String(e).split("."),r=n[0],o=Number(n[0])==e,i=r.slice(-1),s=r.slice(-2);return t?"other":o&&1==i&&11!=s||!o?"one":"other"}function Ge(e,t){var n=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&n?"one":"other"}const Xe=I;function Ze(e,t){var n=String(e).split("."),r=n[0],o=!n[1],i=Number(n[0])==e,s=i&&n[0].slice(-1);return t?"other":1==e&&o?"one":2==r&&o?"two":o&&(e<0||e>10)&&i&&0==s?"many":"other"}const Qe=N,et=N,tt=A,nt=R,rt=A,ot=N,it=N;function st(e,t){var n=String(e).split(".")[0],r=n.slice(-2);return t?1==n?"one":0==n||r>=2&&r<=20||40==r||60==r||80==r?"many":"other":1==e?"one":"other"}function at(e,t){return t?"other":e>=0&&e<2?"one":"other"}const lt=A,ct=A,ut=N,ht=N;function pt(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-1);return t?6==o||9==o||r&&0==o&&0!=e?"many":"other":1==e?"one":"other"}const dt=A,ft=A,mt=N;function gt(e,t){return t?"other":e>=0&&e<=1?"one":"other"}const vt=N,yt=A,kt=A;function wt(e,t){return t?"other":0==e?"zero":1==e?"one":"other"}const xt=A;function bt(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-2),i=r&&n[0].slice(-3),s=r&&n[0].slice(-5),a=r&&n[0].slice(-6);return t?r&&e>=1&&e<=4||o>=1&&o<=4||o>=21&&o<=24||o>=41&&o<=44||o>=61&&o<=64||o>=81&&o<=84?"one":5==e||5==o?"many":"other":0==e?"zero":1==e?"one":2==o||22==o||42==o||62==o||82==o||r&&0==i&&(s>=1e3&&s<=2e4||4e4==s||6e4==s||8e4==s)||0!=e&&1e5==a?"two":3==o||23==o||43==o||63==o||83==o?"few":1==e||1!=o&&21!=o&&41!=o&&61!=o&&81!=o?"other":"many"}const St=A;function Ct(e,t){var n=String(e).split(".")[0];return t?"other":0==e?"zero":0!=n&&1!=n||0==e?"other":"one"}const Mt=A,Ot=A,Et=N,At=T;function Tt(e,t){return t&&1==e?"one":"other"}function Rt(e,t){var n=String(e).split("."),r=n[1]||"",o=Number(n[0])==e,i=o&&n[0].slice(-1),s=o&&n[0].slice(-2);return t?"other":1==i&&(s<11||s>19)?"one":i>=2&&i<=9&&(s<11||s>19)?"few":0!=r?"many":"other"}function Nt(e,t){var n=String(e).split("."),r=n[1]||"",o=r.length,i=Number(n[0])==e,s=i&&n[0].slice(-1),a=i&&n[0].slice(-2),l=r.slice(-2),c=r.slice(-1);return t?"other":i&&0==s||a>=11&&a<=19||2==o&&l>=11&&l<=19?"zero":1==s&&11!=a||2==o&&1==c&&11!=l||2!=o&&1==c?"one":"other"}const It=A,Dt=T,_t=A;function Lt(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),a=r.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?1==s&&11!=a?"one":2==s&&12!=a?"two":7!=s&&8!=s||17==a||18==a?"other":"many":i&&1==s&&11!=a||1==l&&11!=c?"one":"other"}const Pt=A,$t=A;function zt(e,t){var n=String(e).split("."),r=!n[1],o=Number(n[0])==e&&n[0].slice(-2);return t?1==e?"one":"other":1==e&&r?"one":!r||0==e||o>=2&&o<=19?"few":"other"}function Ft(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":"other":1==e?"one":"other"}function Bt(e,t){return t&&1==e?"one":"other"}function jt(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":1==e?"one":0==e||r>=2&&r<=10?"few":r>=11&&r<=19?"many":"other"}const Ht=N,Wt=A,Jt=I,Ut=A,qt=A;function Vt(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?r&&e>
1=1&&e<=4?"one":"other":1==e?"one":"other"}const Kt=R,Yt=A,Gt=A,Xt=A,Zt=N,Qt=A,en=T,tn=A,nn=A,rn=A;function on(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?1==e||5==e||r&&e>=7&&e<=9?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":1==e?"one":"other"}const sn=A,an=N,ln=T,cn=A;function un(e,t){var n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-1),s=r.slice(-2);return t?"other":1==e&&o?"one":o&&i>=2&&i<=4&&(s<12||s>14)?"few":o&&1!=r&&(0==i||1==i)||o&&i>=5&&i<=9||o&&s>=12&&s<=14?"many":"other"}function hn(e,t){var n=String(e).split("."),r=n[1]||"",o=r.length,i=Number(n[0])==e,s=i&&n[0].slice(-1),a=i&&n[0].slice(-2),l=r.slice(-2),c=r.slice(-1);return t?"other":i&&0==s||a>=11&&a<=19||2==o&&l>=11&&l<=19?"zero":1==s&&11!=a||2==o&&1==c&&11!=l||2!=o&&1==c?"one":"other"}const pn=A;function dn(e,t){var n=String(e).split(".")[0];return t?"other":0==n||1==n?"one":"other"}const fn=R,mn=A;function gn(e,t){var n=String(e).split("."),r=!n[1],o=Number(n[0])==e&&n[0].slice(-2);return t?1==e?"one":"other":1==e&&r?"one":!r||0==e||o>=2&&o<=19?"few":"other"}const vn=A,yn=N;function kn(e,t){var n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-1),s=r.slice(-2);return t?"other":o&&1==i&&11!=s?"one":o&&i>=2&&i<=4&&(s<12||s>14)?"few":o&&0==i||o&&i>=5&&i<=9||o&&s>=11&&s<=14?"many":"other"}const wn=A,xn=N,bn=A;function Sn(e,t){var n=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&n?"one":"other"}function Cn(e,t){var n=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&n?"one":"other"}const Mn=A,On=A,En=I,An=A,Tn=N,Rn=N;function Nn(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),a=r.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?"other":i&&1==s&&11!=a||1==l&&11!=c?"one":i&&s>=2&&s<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}function In(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?"other":e>=0&&e<=1?"one":r&&e>=2&&e<=10?"few":"other"}function Dn(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"";return t?"other":0==e||1==e||0==r&&1==o?"one":"other"}function _n(e,t){var n=String(e).split("."),r=n[0],o=!n[1];return t?"other":1==e&&o?"one":r>=2&&r<=4&&o?"few":o?"other":"many"}function Ln(e,t){var n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-2);return t?"other":o&&1==i?"one":o&&2==i?"two":o&&(3==i||4==i)||!o?"few":"other"}const Pn=I,$n=I,zn=I,Fn=I,Bn=I,jn=A,Hn=A;function Wn(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-1),i=r&&n[0].slice(-2);return t?1==e?"one":4==o&&14!=i?"many":"other":1==e?"one":"other"}function Jn(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),a=r.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?"other":i&&1==s&&11!=a||1==l&&11!=c?"one":i&&s>=2&&s<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}const Un=A,qn=A,Vn=A,Kn=N;function Yn(e,t){var n=String(e).split("."),r=!n[1],o=Number(n[0])==e,i=o&&n[0].slice(-1),s=o&&n[0].slice(-2);return t?1!=i&&2!=i||11==s||12==s?"other":"one":1==e&&r?"one":"other"}const Gn=R,Xn=A,Zn=A,Qn=A,er=A,tr=N,nr=T,rr=A;function or(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-1);return t?6==r||9==r||10==e?"few":"other":1==e?"one":"other"}function ir(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),a=o.slice(-1);return t?1==e?"one":"other":i&&(1==r||2==r||3==r)||i&&4!=s&&6!=s&&9!=s||!i&&4!=a&&6!=a&&9!=a?"one":"other"}const sr=A,ar=N,lr=A,cr=A;function ur(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?"other":0==e||1==e||r&&e>=11&&e<=99?"one":"other"}const hr=A;function pr(e,t){var n=String(e).split("."),r=n[0],o=!n[1],i=Number(n[0])==e,s=i&&n[0].slice(-1),a=i&&n[0].slice(-2),l=r.slice(-1),c=r.slice(-2);return t?3==s&&13!=a?"few":"other":o&&1==l&&11!=c?"one":o&&l>=2&&l<=4&&(c<12||c>14)?"few":o&&0==l||o&&l>=5&&l<=9||o&&c>=11&&c<=14?"many":"other"}const dr=R,fr=A,mr=A;function gr(e,t){return t&&1==e?"one":"other"}const vr=A,yr=A,kr=T,wr=A,xr=N,br=A,Sr=A,Cr=R,Mr=N,Or=N,Er=N;function Ar(e,t){return t?"other":e>=0&&e<=1?"one":"other"}var Tr,Rr,Nr=Object.defineProperty,Ir=Object.getOwnPropertyDescriptor,Dr=Object.getOwnPropertyNames,_r=Object.prototype.hasOwnProperty,Lr=(e,t,n,r)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let o of Dr(t))_r.call(e,o)||o===n||Nr(e,o,{get:()=>t[o],enumerable:!(r=Ir(t,o))||r.enumerable});return e},Pr=JSON.parse('{"extension.command.toggle-upper-case.label":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text c
1ase"}]],"extension.table.column_count":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"extension.table.row_count":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.toggle-columns.description":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"extension.command.toggle-columns.label":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"extension.command.set-text-direction.label":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"extension.command.set-text-direction.description":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"extension.command.toggle-heading.label":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"extension.command.toggle-callout.description":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"extension.command.toggle-callout.label":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"extension.command.toggle-code-block.description":"Add a code block","extension.command.add-annotation.label":"Add annotation","extension.command.toggle-blockquote.description":"Add blockquote formatting to the selected text","extension.command.toggle-bold.description":"Add bold formatting to the selected text","extension.command.toggle-code.description":"Add inline code formatting to the selected text","keyboard.shortcut.alt":"Alt","keyboard.shortcut.arrowDown":"Arrow Down","keyboard.shortcut.arrowLeft":"Arrow Left","keyboard.shortcut.arrowRight":"Arrow Right","keyboard.shortcut.arrowUp":"Arrow Up","keyboard.shortcut.backspace":"Backspace","ui.text-color.black":"Black","extension.command.toggle-blockquote.label":"Blockquote","ui.text-color.blue":"Blue","ui.text-color.blue.hue":["Blue ",["hue"]],"extension.command.toggle-bold.label":"Bold","extension.command.toggle-bullet-list.description":"Bulleted list","keyboard.shortcut.capsLock":"Caps Lock","extension.command.center-align.label":"Center align","extension.command.toggle-code.label":"Code","extension.command.toggle-code-block.label":"Codeblock","keyboard.shortcut.command":"Command","QcPNd6":"Image description","ogrUzJ":"Add a short description here.","yqdyzr":"Image","6/02F4":"Image source","X8H91v":"Image","zhQ7Zt":"Italic","ZL7E7l":"Underline","keyboard.shortcut.control":"Control","extension.command.convert-paragraph.description":"Convert current block into a paragraph block.","extension.command.convert-paragraph.label":"Convert Paragraph","extension.command.copy.label":"Copy","extension.command.copy.description":"Copy the selected text","extension.command.create-table.description":"Create a table with set number of rows and columns.","extension.command.create-table.label":"Create table","extension.command.cut.label":"Cut","extension.command.cut.description":"Cut the selected text","ui.text-color.cyan":"Cyan","ui.text-color.cyan.hue":["Cyan ",["hue"]],"extension.command.decrease-font-size.label":"Decrease","extension.command.decrease-indent.label":"Decrease indentation","extension.command.decrease-font-size.description":"Decrease the font size.","keyboard.shortcut.delete":"Delete","extension.command.insert-horizontal-rule.label":"Divider","keyboard.shortcut.end":"End","keyboard.shortcut.escape":"Enter","keyboard.shortcut.enter":"Enter","6PjrOF":"Add annotation","OTq5WC":"Center align","oeZ3ox":"Convert current block into a paragraph block.","m1khs+":"Convert Paragraph","w/1U+3":"Copy the selected text","kdodi0":"Copy","k0KR/u":"Create a table with set number of rows and columns.","zrwMyD":"Create table","D/nWxh":"Cut the selected text","jHPv5m":"Cut","5cNgRx":"Decrease the font size.","vyRNWx":"Decrease","Jgiol4":"Decrease indentation","1gJSHH":"Increase the font size","OQXJXz":"Increase","72TLhr":"Increase indentation","HFlfzJ":"Insert Emoji","RPq9fY":"Separate content with a diving horizontal line","OKQF+e":"Divider","zjYb9C":"Insert a new paragraph","4M4sXC":"Insert Paragraph","1Q+eVc":"Justify","ejWWtP":"Left align","wVqrpS":"Paste content into the editor","07v9aw":"Paste","zUYfou":"Redo the most recent action","9Nq9zr":"Redo","0uxaZe":"Remove annotation","iJWZAz":"Right align","g5WpPn":"Select all c
1ontent within the editor","2+pZDT":"Select all","yChCR1":"Set text case","GMzAC/":"Set the font size for the selected text.","vzEyrv":"Font size","7VCkJ8":"Set the text color for the selected text.","qjWFaR":"Text color","LVWgFu":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"WXwRy1":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"G/o315":"Set the text highlight color for the selected text.","xtHg6d":"Text highlight","1p1W/p":"Add blockquote formatting to the selected text","6+rh6I":"Blockquote","0yB3LV":"Add bold formatting to the selected text","sFMo4Z":"Bold","SMKG/s":"Bulleted list","/BYCMi":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"V+3IBe":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"hbIo4L":"Add a code block","7GkMcx":"Codeblock","2r4JYl":"Add inline code formatting to the selected text","Up8Tpe":"Code","ATHSPS":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"7DC1VE":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"hnrBeo":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"NkZAcw":"Italicize the selected text","2fTW9e":"Italic","c759Ra":"Ordered list","uQwrZu":"Strikethrough the selected text","pT3qly":"Strikethrough","BHk+zu":"Subscript","18BVwM":"Superscript","tOIVCV":"Tasked list","4Janx3":"Underline the selected text","dCHt+D":"Underline","YYAprs":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"tczyZL":"Show hidden whitespace characters in your editor.","0qAX23":"Toggle Whitespace","ezMADU":"Undo the most recent action","N3P7EC":"Undo","2nj/+s":"Update annotation","dWD7u4":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"qXqgVT":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.set-font-size.label":"Font size","ui.text-color.grape":"Grape","ui.text-color.grape.hue":["Grape ",["hue"]],"ui.text-color.gray":"Gray","ui.text-color.gray.hue":["Gray ",["hue"]],"ui.text-color.green":"Green","ui.text-color.green.hue":["Green ",["hue"]],"keyboard.shortcut.home":"Home","extension.command.increase-font-size.label":"Increase","extension.command.increase-indent.label":"Increase indentation","extension.command.increase-font-size.description":"Increase the font size","ui.text-color.indigo":"Indigo","ui.text-color.indigo.hue":["Indigo ",["hue"]],"extension.command.insert-paragraph.description":"Insert a new paragraph","extension.command.insert-emoji.label":"Insert Emoji","extension.command.insert-paragraph.label":"Insert Paragraph","extension.command.toggle-italic.label":"Italic","extension.command.toggle-italic.description":"Italicize the selected text","extension.command.justify-align.label":"Justify","R7NlCw":"Alt","RbDiK5":"Arrow Down","Dgyd+E":"Arrow Left","8pdCk4":"Arrow Right","Gp/343":"Arrow Up","PFPV0A":"Backspace","0IRYvp":"Caps Lock","X7HX0D":"Command","zq0AdD":"Control","8SfToN":"Delete","Ys/uah":"End","3K5hww":"Enter","veQt1j":"Enter","ySv7i+":"Home","e6RUI1":"Page Down","EEJk31":"Page Up","7sbhAU":"Shift","Q4eplT":"Space","SUhVVC":"Tab","extension.command.left-align.label":"Left align","ui.text-color.lime":"Lime","ui.text-color.lime.hue":["Lime ",["hue"]],"react-components.mention-atom-component.zero-items":"No items available","ui.text-color.orange":"Orange","ui.text-color.orange.hue":["Orange ",["hue"]],"extension.command.toggle-ordered-list.label":"Ordered list","keyboard.shortcut.pageDown":"Page Down","keyboard.shortcut.pageUp":"Page Up","extension.command.paste.label":"Paste","extension.command.paste.description":"Paste content into the editor","ui.text-color.pink":"Pink","ui.text-color.pink.hue":["Pink ",["hue"]],"zvMfIA":"No items available","pEjhti":"Static Menu","ui.text-color.red":"Red","ui.text-color.red.hue":["Red ",["hue"]],"extension.command.redo.label":"Redo","extension.command.redo.description":"Redo the most recent action","extension.command.remove-annotation.label":"Remove annotation","extension.command.right-align.label":"Right align","extension.command.select-all.label":"Select all","extension.command.select-all.description":"Select all c
1ontent within the editor","extension.command.insert-horizontal-rule.description":"Separate content with a diving horizontal line","extension.command.set-casing.label":"Set text case","extension.command.set-font-size.description":"Set the font size for the selected text.","extension.command.set-text-color.description":"Set the text color for the selected text.","extension.command.set-text-highlight.description":"Set the text highlight color for the selected text.","keyboard.shortcut.shift":"Shift","extension.command.toggle-whitespace.description":"Show hidden whitespace characters in your editor.","keyboard.shortcut.space":"Space","extension.command.toggle-strike.label":"Strikethrough","extension.command.toggle-strike.description":"Strikethrough the selected text","extension.command.toggle-subscript.label":"Subscript","extension.command.toggle-superscript.label":"Superscript","keyboard.shortcut.tab":"Tab","extension.command.toggle-task-list.description":"Tasked list","ui.text-color.teal":"Teal","ui.text-color.teal.hue":["Teal ",["hue"]],"extension.command.set-text-color.label":"Text color","extension.command.set-text-highlight.label":"Text highlight","extension.command.toggle-whitespace.label":"Toggle Whitespace","ui.text-color.transparent":"Transparent","slrB1c":"Black","6QML30":"Blue","xw+keN":["Blue ",["hue"]],"38RHqP":"Cyan","D89yPf":["Cyan ",["hue"]],"VjBLnd":"Grape","Rp40yv":["Grape ",["hue"]],"5Dm9D1":"Gray","HGjXjC":["Gray ",["hue"]],"b9fz+n":"Green","18jo3M":["Green ",["hue"]],"CFzqCV":"Indigo","aVlDku":["Indigo ",["hue"]],"04PfLc":"Lime","KRTK6Y":["Lime ",["hue"]],"pSnXFd":"Orange","ve/MJZ":["Orange ",["hue"]],"OvCgDa":"Pink","l7NqyT":["Pink ",["hue"]],"IT9k0j":"Red","AdyJ7/":["Red ",["hue"]],"3D2UWc":"Teal","Dcq0Y1":["Teal ",["hue"]],"bsi2ik":"Transparent","Tj3PRR":"Violet","xxMH5N":["Violet ",["hue"]],"Rum0ah":"White","4gaw/Q":"Yellow","hhauc3":["Yellow ",["hue"]],"extension.command.toggle-underline.label":"Underline","extension.command.toggle-underline.description":"Underline the selected text","extension.command.undo.label":"Undo","extension.command.undo.description":"Undo the most recent action","extension.command.update-annotation.label":"Update annotation","ui.text-color.violet":"Violet","ui.text-color.violet.hue":["Violet ",["hue"]],"ui.text-color.white":"White","ui.text-color.yellow":"Yellow","ui.text-color.yellow.hue":["Yellow ",["hue"]]}'),$r={};Lr($r,Tr=r,"default"),Rr&&Lr(Rr,Tr,"default"),E.loadLocaleData("en",{plurals:$r.en}),E.load("en",Pr),E.activate("en");var zr=n(44573),Fr=n(33937),Br=n(16560),jr=Object.defineProperty,Hr=Object.getOwnPropertyDescriptor,Wr=(e,t,n,r)=>{for(var o,i=r>1?void 0:r?Hr(t,n):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&jr(t,n,i),i},Jr=class extends zr.QR{get name(){return"doc"}createNodeSpec(e,t){const{docAttributes:n,content:r}=this.options,o=(0,i.Ry)();if((0,i.PO)(n))for(const[s,a]of(0,i.qh)(n))o[s]={default:a};else for(const i of n)o[i]={default:null};return{attrs:o,content:r,...t}}setDocAttributes(e){return({tr:t,dispatch:n})=>{if(n){for(const[n,r]of Object.entries(e))t.step(new Vr(n,r));n(t)}return!0}}isDefaultDocNode({state:e=this.store.getState(),options:t}={}){return(0,Fr.$q)(e.doc,t)}};Wr([(0,zr.WDe)()],Jr.prototype,"setDocAttributes",1),Wr([(0,zr._y)()],Jr.prototype,"isDefaultDocNode",1),Jr=Wr([(0,zr.AOx)({defaultOptions:{content:"block+",docAttributes:[]},defaultPriority:s.xV.Medium,staticKeys:["content","docAttributes"],disableExtraAttributes:!0})],Jr);var Ur="SetDocAttribute",qr="RevertSetDocAttribute",Vr=class extends Br.h8{constructor(e,t,n=Ur){super(),this.stepType=n,this.key=e,this.value=t}static fromJSON(e,t){return new Vr(t.key,t.value,t.stepType)}
1apply(e){this.previous=e.attrs[this.key];const t={...e.attrs,[this.key]:this.value};return Br.oo.ok(e.type.create(t,e.content,e.marks))}invert(){return new Vr(this.key,this.previous,qr)}map(){return this}toJSON(){return{stepType:this.stepType,key:this.key,value:this.value}}};try{Br.h8.jsonID(Ur,Vr),Br.h8.jsonID(qr,Vr)}catch(rs){if(!rs.message.startsWith("Duplicate use of step JSON ID"))throw rs}var Kr=Object.defineProperty,Yr=Object.getOwnPropertyDescriptor,Gr=(e,t,n,r)=>{for(var o,i=r>1?void 0:r?Yr(t,n):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&Kr(t,n,i),i};var Xr=class extends zr.nNj{constructor(){super(...arguments),this.mousedown=!1,this.mouseover=!1,this.createMouseEventHandler=e=>(t,n)=>{const r=n,o=function(e,t){const n=t.target;if(n){const t=function(e,t,n,r){const o=e.docView.posFromDOM(t,n,r);return null===o||o<0?null:o}(e,n,0);if(null!==t){const n=e.state.doc.resolve(t),r=n.node().isLeaf?0:1;return{pos:t,inside:n.start()-r}}}return e.posAtCoords({left:t.clientX,top:t.clientY})??void 0}(t,r);if(!o)return!1;const a=[],l=[],{inside:c,pos:u}=o;if(-1===c)return!1;const h=t.state.doc.resolve(u),p=h.depth+1;for(const e of(0,i.w6)(p,1))a.push({node:e>h.depth&&h.nodeAfter?h.nodeAfter:h.node(e),pos:h.before(e)});for(const{type:e}of h.marksAcross(h)??[]){const t=(0,Fr.IH)(h,e);t&&l.push(t)}return e(r,{view:t,nodes:a,marks:l,getMark:e=>{const n=(0,i.HD)(e)?t.state.schema.marks[e]:e;return(0,i.kG)(n,{code:s.mA.EXTENSION,message:`The mark ${e} being checked does not exist within the editor schema.`}),l.find((e=>e.mark.type===n))},getNode:e=>{var n;const r=(0,i.HD)(e)?t.state.schema.nodes[e]:e;(0,i.kG)(r,{code:s.mA.EXTENSION,message:"The node being checked does not exist"});const o=a.find((({node:e})=>e.type===r));if(o)return{...o,isRoot:!!(null==(n=a[0])?void 0:n.node.eq(o.node))}}})}}get name(){return"events"}onView(){var e,t;if(!(null==(e=this.store.managerSettings.exclude)?void 0:e.clickHandler))for(const n of this.store.extensions){if(!n.createEventHandlers||(null==(t=n.options.exclude)?void 0:t.clickHandler))continue;const e=n.createEventHandlers();for(const[t,n]of(0,i.qh)(e))this.addHandler(t,n)}}createPlugin(){const e=new WeakMap,t=(t,n,r,o,a,l,c,u)=>{const h=this.store.currentState,{schema:p,doc:d}=h,f=d.resolve(o),m=e.has(c),g=function(e){const{handled:t,view:n,$pos:r,state:o}=e,a={getMark:i.ZT,markRanges:[],view:n,state:o};if(t)return a;for(const{type:i}of r.marksAcross(r)??[]){const e=(0,Fr.IH)(r,i);e&&a.markRanges.push(e)}return a.getMark=e=>{const t=(0,i.HD)(e)?o.schema.marks[e]:e;return(0,i.kG)(t,{code:s.mA.EXTENSION,message:`The mark ${e} being checked does not exist within the editor schema.`}),a.markRanges.find((e=>e.mark.type===t))},a}({$pos:f,handled:m,view:r,state:h});let v=!1;m||(v=t(c,g)||v);const y={...g,pos:o,direct:u,nodeWithPosition:{node:a,pos:l},getNode:e=>{const t=(0,i.HD)(e)?p.nodes[e]:e;return(0,i.kG)(t,{code:s.mA.EXTENSION,message:"The node being checked does not exist"}),t===a.type?{node:a,pos:l}:void 0}};return e.set(c,!0),n(c,y)||v};return{props:{handleKeyPress:(e,t)=>this.options.keypress(t)||!1,handleKeyDown:(e,t)=>this.options.keydown(t)||!1,handleTextInput:(e,t,n,r)=>this.options.textInput({from:t,to:n,text:r})||!1,handleClickOn:(e,n,r,o,i,s)=>t(this.options.clickMark,this.options.click,e,n,r,o,i,s),handleDoubleClickOn:(e,n,r,o,i,s)=>t(this.options.doubleClickMark,this.options.doubleClick,e,n,r,o,i,s),handleTripleClickOn:(e,n,r,o,i,s)=>t(this.options.tripleClickMark,this.options.tripleClick,e,n,r,o,i,s),handleDOMEvents:{focus:(e,t)=>this.options.focus(t)||!1,blur:(e,t)=>this.options.blur(t)||!1,mousedown:(e,t)=>(this.startMouseover(),this.options.mousedown(t)||!1),mouseup:(e,t)=>(this.endMouseover(),this.options.mouseup(t)||!1),mouseleave:(e,t)=>(this.mouseover=!1,this.options.mouseleave(t)||!1),mouseenter:(e,t)=>(this.mouseover=!0,this.options.mouseenter(t)||!1),keyup:(e,t)=>this.options.keyup(t)||!1,mouseout:this.createMouseEventHandler(((e,t)=>{const n={...t,hovering:!1};return this.options.hover(e,n)||!1})),mouseover:this.createMouseEventHandler(((e,t)=>{const n={...t,hovering:!0};return this.options.hover(e,n)||!1})),contextmenu:this.createMouseEventHandler(((e,t)=>this.options.contextmenu(e,t)||!1)),scroll:(e,t)=>
1this.options.scroll(t)||!1,copy:(e,t)=>this.options.copy(t)||!1,cut:(e,t)=>this.options.cut(t)||!1,paste:(e,t)=>this.options.paste(t)||!1}},view:e=>{let t=e.editable;const n=this.options;return{update(e){const r=e.editable;r!==t&&(n.editable(r),t=r)}}}}}isInteracting(){return this.mousedown&&this.mouseover}startMouseover(){this.mouseover=!0,this.mousedown||(this.mousedown=!0,this.store.document.documentElement.addEventListener("mouseup",(()=>{this.endMouseover()}),{once:!0}))}endMouseover(){this.mousedown&&(this.mousedown=!1,this.store.commands.emptyUpdate())}};Gr([(0,zr._y)()],Xr.prototype,"isInteracting",1),Xr=Gr([(0,zr.AOx)({handlerKeys:["blur","focus","mousedown","mouseup","mouseenter","mouseleave","textInput","keypress","keyup","keydown","click","clickMark","doubleClick","doubleClickMark","tripleClick","tripleClickMark","contextmenu","hover","scroll","copy","cut","paste","editable"],handlerKeyOptions:{blur:{earlyReturnValue:!0},focus:{earlyReturnValue:!0},mousedown:{earlyReturnValue:!0},mouseleave:{earlyReturnValue:!0},mouseup:{earlyReturnValue:!0},click:{earlyReturnValue:!0},doubleClick:{earlyReturnValue:!0},tripleClick:{earlyReturnValue:!0},hover:{earlyReturnValue:!0},contextmenu:{earlyReturnValue:!0},scroll:{earlyReturnValue:!0},copy:{earlyReturnValue:!0},cut:{earlyReturnValue:!0},paste:{earlyReturnValue:!0}},defaultPriority:s.xV.High})],Xr);var Zr=n(82696),Qr=n(2376),eo=n(12806),to=n(84348);class no extends Qr.Y1{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return no.valid(n)?new no(n):Qr.Y1.near(n)}content(){return eo.p2.empty}eq(e){return e instanceof no&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new no(e.resolve(t.pos))}getBookmark(){return new ro(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!function(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(0!=n)for(let e=r.child(n-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(e)||!function(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n!=r.childCount)for(let e=r.child(n);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(e))return!1;let n=t.type.spec.allowGapCursor;if(null!=n)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,t,n=!1){e:for(;;){if(!n&&no.valid(e))return e;let r=e.pos,o=null;for(let n=e.depth;;n--){let i=e.node(n);if(t>0?e.indexAfter(n)<i.childCount:e.index(n)>0){o=i.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;r+=t;let s=e.doc.resolve(r);if(no.valid(s))return s}for(;;){let i=t>0?o.firstChild:o.lastChild;if(!i){if(o.isAtom&&!o.isText&&!Qr.qv.isSelectable(o)){e=e.doc.resolve(r+o.nodeSize*t),n=!1;continue e}break}o=i,r+=t;let s=e.doc.resolve(r);if(no.valid(s))return s}return null}}}no.prototype.visible=!1,no.findFrom=no.findGapCursorFrom,Qr.Y1.jsonID("gapcursor",no);class ro{constructor(e){this.pos=e}map(e){return new ro(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return no.valid(t)?new no(t):Qr.Y1.near(t)}}const oo=(0,Zr.$)({ArrowLeft:io("horiz",-1),ArrowRight:io("horiz",1),ArrowUp:io("vert",-1),ArrowDown:io("vert",1)});function io(e,t){const n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,o){let i=e.selection,s=t>0?i.$to:i.$from,a=i.empty;if(i instanceof Qr.Bs){if(!o.endOfTextblock(n)||0==s.depth)return!1;a=!1,s=e.doc.resolve(t>0?s.after():s.before())}let l=no.findGapCursorFrom(s,t,a);return!!l&&(r&&r(e.tr.setSelection(new no(l))),!0)}}function so(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!no.valid(r))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return!(o&&o.inside>-1&&Qr.qv.isSelectable(e.state.doc.nodeAt(o.inside)))&&(e.dispatch(e.state.tr.setSelection(new no(r))),!0)}function ao(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof no))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let o=eo.HY.empty;for(let s=r.length-1;s>=0;s--)o=eo.HY.from(r[s].createAndFill(null,o));let i=e.state.tr.replace(n.pos,n.pos,new eo.p2(o,0,0));return i.setSelection(Qr.Bs.near(i.doc.resolve(n.pos+1))),e.dispatch(i),!1}function lo(e){if(!(e.selection instanceof no))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",to.EH.create(e.doc,[to.p.widget(e.selection.head,t,{key:"gapcursor"})])}var co=Object.defineProperty,uo=Object.getOwnPropertyDescriptor,ho=class extends zr.nNj{get name(){return"gapCursor"}createExternalPlugins(){return[new Qr.Sy({props:{decorations:lo,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&no.valid(n)?new no(n):null,handleClick:so,handleKeyDown:oo,handleDOMEvents:{beforeinput
1:ao}}})]}};ho=((e,t,n,r)=>{for(var o,i=r>1?void 0:r?uo(t,n):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&co(t,n,i),i})([(0,zr.AOx)({})],ho);(0,i.V9)(no);var po=n(32594),fo=n(48776),mo=Object.defineProperty,go=Object.getOwnPropertyDescriptor,vo=(e,t,n,r)=>{for(var o,i=r>1?void 0:r?go(t,n):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&mo(t,n,i),i},yo={icon:"paragraph",label:({t:e})=>e(fo.iR.INSERT_LABEL),description:({t:e})=>e(fo.iR.INSERT_DESCRIPTION)},ko={icon:"paragraph",label:({t:e})=>e(fo.iR.CONVERT_LABEL),description:({t:e})=>e(fo.iR.CONVERT_DESCRIPTION)},wo=class extends zr.QR{get name(){return"paragraph"}createTags(){return[s.eX.LastNodeCompatible,s.eX.TextBlock,s.eX.Block,s.eX.FormattingNode]}createNodeSpec(e,t){return{content:"inline*",draggable:!1,...t,attrs:{...e.defaults()},parseDOM:[{tag:"p",getAttrs:t=>({...e.parse(t)})},...t.parseDOM??[]],toDOM:t=>["p",e.dom(t),0]}}convertParagraph(e={}){const{attrs:t,selection:n,preserveAttrs:r}=e;return this.store.commands.setBlockNodeType.original(this.type,t,n,r)}insertParagraph(e,t={}){const{selection:n,attrs:r}=t;return this.store.commands.insertNode.original(this.type,{content:e,selection:n,attrs:r})}shortcut(e){return this.convertParagraph()(e)}};vo([(0,zr.WDe)(ko)],wo.prototype,"convertParagraph",1),vo([(0,zr.WDe)(yo)],wo.prototype,"insertParagraph",1),vo([(0,zr.IGC)({shortcut:s.vO.Paragraph,command:"convertParagraph"})],wo.prototype,"shortcut",1),wo=vo([(0,zr.AOx)({defaultPriority:s.xV.Medium})],wo);var xo,bo,So,Co,Mo,Oo,Eo,Ao,To,Ro=n(48111),No=n(27856),Io=n(31026),Do=Object.defineProperty,_o=Object.getOwnPropertyDescriptor,Lo=(e,t,n,r)=>{for(var o,i=r>1?void 0:r?_o(t,n):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&Do(t,n,i),i},Po=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},$o=(e,t,n)=>(Po(e,t,"read from private field"),n?n.call(e):t.get(e)),zo=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Fo=(e,t,n,r)=>(Po(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Bo=class{constructor(e){zo(this,xo,(0,Ro.i)()),zo(this,bo,[]),zo(this,So,new Map),zo(this,Co,[]),zo(this,Mo,!1),zo(this,Oo,void 0),zo(this,Eo,void 0),zo(this,Ao,void 0),zo(this,To,void 0),this.addListener=(e,t)=>$o(this,xo).on(e,t),Fo(this,Oo,e),Fo(this,Eo,e.getActive),Fo(this,To,e.getPosition),Fo(this,Ao,e.getID),this.hasChanged=e.hasChanged,this.events=e.events??["state","scroll"]}static create(e){return new Bo(e)}static fromPositioner(e,t){return Bo.create({...e.basePositioner,...t})}get basePositioner(){return{getActive:$o(this,Eo),getPosition:$o(this,To),hasChanged:this.hasChanged,events:this.events,getID:$o(this,Ao)}}onActiveChanged(e){this.recentUpdate=e;const t=$o(this,Eo).call(this,e);Fo(this,bo,t),Fo(this,So,new Map),Fo(this,Mo,!1),Fo(this,Co,[]);const n=[];for(const[r,o]of t.entries()){const t=this.getID(o,r);$o(this,Co).push(t),n.push({setElement:t=>this.addProps({...e,data:o,element:t},r),id:t,data:o})}$o(this,xo).emit("update",n)}getID(e,t){var n;return(null==(n=$o(this,Ao))?void 0:n.call(this,e,t))??t.toString()}addProps(e,t){if($o(this,Mo))return;if($o(this,So).set(t,e),$o(this,So).size<$o(this,bo).length)return;const n=[];for(const r of $o(this,bo).keys()){const e=$o(this,So).get(r);(0,i.kG)(e,{code:s.mA.INTERNAL,message:"Something went wrong when retrieving the parameters"});const t=$o(this,Co)[r];if(!t)return;n.push({position:$o(this,To).call(this,e),element:e.element,id:t})}$o(this,xo).emit("done",n)}clone(e){return Bo.create({...$o(this,Oo),...(0,i.mf)(e)?e($o(this,Oo)):e})}active(e){const t=(0,i.mf)(e)?e:()=>e;return this.clone((e=>({getActive:n=>e.getActive(n).filter(t)})))}},jo=Bo;function Ho(e){const{tr:t,state:n,previousState:r}=e;return!r||(!(!t||!function(e,t=Uo){const{key:n}=(null==e?void 0:e.getMeta(Jo))??{};return n===t}(t))||(t?(0,Fr.yZ)(t):!n.doc.eq(r.doc)||!n.selection.eq(r.selection)))}function Wo(e,t,n={}){const r=t.getBoundingClientRect(),{accountForPadding:o=!1}=n;let s=0,a=0,l=0,c=0;if((0,Fr.jd)(t)&&o){const e=Number.parseFloat((0,Fr.C2)(t,"padding-left").replace("px","")),n=Number.parseFloat((0,Fr.C2)(t,"padding-right").replace("px","")),r=Number.parseFloat((0,Fr.C2)(t,"padding-top").replace("px","")),o=Number.parseFloat((0,Fr.C2)(t,"padding-bottom").replace("px","")),i=Number.parseFloat((0,Fr.C2)(t,"border-left").replace("px","")),u=Number.parseFloat((0,Fr.C2)(t,"border-right").replace("px","")),h=Number.parseFloat((0,Fr.C2)(t,"border-top").replace("px","")),p=Number.parseFloat((0,Fr.C2)(t,"border-bottom").replace("px","")),d=t.offsetWidth-t.clientWidth,f=t.offsetHeight-t.clientHeight;s+=e+i+("rtl"===t.dir?d:0),a+=n+u+("rtl"===t.dir?0:d),l+=r+h,c+=o+p+f}const u=new DOMRect(r.left+s,r.top+l,r.width-a,r.height-c);for(const[h,p]of[[e.top,e.left],[e.top,e.right],[e.bottom,e.left],[e.bottom,e.right]])if((0,i.uh)(h,u.to
1p,u.bottom)&&(0,i.uh)(p,u.left,u.right))return!0;return!1}xo=new WeakMap,bo=new WeakMap,So=new WeakMap,Co=new WeakMap,Mo=new WeakMap,Oo=new WeakMap,Eo=new WeakMap,Ao=new WeakMap,To=new WeakMap,jo.EMPTY=[];var Jo="positionerUpdate",Uo="__all_positioners__",qo={y:-999999,x:-999999,width:0,height:0},Vo={...qo,left:-999999,top:-999999,bottom:-999999,right:-999999},Ko={...qo,rect:{...Vo,toJSON:()=>Vo},visible:!1},Yo=jo.create({hasChanged:Ho,getActive(e){const{state:t}=e;if(!(0,Fr.Ab)(t)||t.selection.$anchor.depth>2)return jo.EMPTY;const n=(0,Fr.Kk)({predicate:e=>e.type.isBlock,selection:t});return n?[n]:jo.EMPTY},getPosition(e){const{view:t,data:n}=e,r=t.nodeDOM(n.pos);if(!(0,Fr.jd)(r))return Ko;const o=r.getBoundingClientRect(),i=t.dom.getBoundingClientRect(),s=o.height,a=o.width,l=t.dom.scrollLeft+o.left-i.left;return{y:t.dom.scrollTop+o.top-i.top,x:l,height:s,width:a,rect:o,visible:Wo(o,t.dom)}}}),Go=Yo.clone((({getActive:e})=>({getActive:t=>{const[n]=e(t);return n&&(0,Fr.mp)(n.node)&&n.node.type===(0,Fr.JN)(t.state.schema)?[n]:jo.EMPTY}})));Go.clone((({getPosition:e})=>({getPosition:t=>({...e(t),width:1})}))),Go.clone((({getPosition:e})=>({getPosition:t=>{const{width:n,x:r,y:o,height:i}=e(t);return{...e(t),width:1,x:n+r,rect:new DOMRect(n+r,o,1,i)}}})));function Xo(e){return jo.create({hasChanged:Ho,getActive:t=>{const{state:n,view:r}=t;if(!e(n)||!(0,Fr.hT)(n.selection))return jo.EMPTY;try{const{head:e,anchor:t}=n.selection;return[{from:r.coordsAtPos(t),to:r.coordsAtPos(e)}]}catch{return jo.EMPTY}},getPosition(e){const{element:t,data:n,view:r}=e,{from:o,to:i}=n,s=t.offsetParent??r.dom,a=s.getBoundingClientRect(),l=Math.abs(i.bottom-o.top),c=l>o.bottom-o.top,u=Math.min(o.left,i.left),h=Math.min(o.top,i.top),p=s.scrollLeft+(c?i.left-a.left:u-a.left),d=s.scrollTop+h-a.top,f=c?1:Math.abs(o.left-i.right),m=new DOMRect(c?i.left:u,h,f,l);return{rect:m,y:d,x:p,height:l,width:f,visible:Wo(m,r.dom)}}})}var Zo=Xo((e=>!e.selection.empty));Xo((e=>e.selection.empty)),Xo((()=>!0)),Zo.clone((()=>({getActive:e=>{const{state:t,view:n}=e;if(!t.selection.empty)return jo.EMPTY;const r=(0,Fr.JM)(t);if(!r)return jo.EMPTY;try{return[{from:n.coordsAtPos(r.from),to:n.coordsAtPos(r.to)}]}catch{return jo.EMPTY}}})));var Qo=class extends zr.nNj{constructor(){super(...arguments),this.positioners=[],this.onAddCustomHandler=({positioner:e})=>{if(e)return this.positioners=[...this.positioners,e],this.store.commands.forceUpdate(),()=>{this.positioners=this.positioners.filter((t=>t!==e))}}}get name(){return"positioner"}createAttributes(){return{class:Io.bu.EDITOR}}init(){this.onScroll=(0,No.D)(this.options.scrollDebounce,this.onScroll.bind(this))}createEventHandlers(){return{scroll:()=>(this.onScroll(),!1),hover:(e,t)=>(this.positioner(this.getBaseProps("hover",{hover:t})),!1),contextmenu:(e,t)=>(this.positioner(this.getBaseProps("contextmenu",{contextmenu:t})),!1)}}onStateUpdate(e){this.positioner({...e,previousState:e.firstUpdate?void 0:e.previousState,event:"state",helpers:this.store.helpers})}createDecorations(e){if(this.element??(this.element=this.createElement()),!this.element.hasChildNodes())return to.EH.empty;const t=to.p.widget(0,this.element,{key:"positioner-widget",side:-1,stopEvent:()=>!0});return to.EH.create(e.doc,[t])}forceUpdatePositioners(e=Uo){return({tr:t,dispatch:n})=>(null==n||n(t.setMeta(Jo,{key:e})),!0)}getPositionerWidget(){return this.element??(this.element=this.createElement())}createElement(){const e=document.createElement("span");return e.dataset.id="remirror-positioner-widget",e.setAttribute("role","presentation"),e}triggerPositioner(e,t){e.hasChanged(t)&&e.onActiveChanged({...t,view:this.store.view})}positioner(e){for(const t of this.positioners){!t.events.includes(e.event)||this.triggerPositioner(t,e)}}getBaseProps(e,t){const n=this.store.getState(),r=this.store.previousState;return{helpers:this.store.helpers,event:e,firstUpdate:!1,previousState:r,state:n,...t}}onScroll(){this.positioner(this.getBaseProps("scroll",{scroll:{scrollTop:this.store.view.dom.scrollTop}}))}};Lo([(0,zr.WDe)()],Qo.prototype,"forceUpdatePositioners",1),Lo([(0,zr._y)()],Qo.prototype,"getPositionerWidget",1),Qo=Lo([(0,zr.AOx)({defaultOptions:{scrollDebounce:100}
1,customHandlerKeys:["positioner"],staticKeys:["scrollDebounce"]})],Qo);var ei=Object.defineProperty,ti=Object.getOwnPropertyDescriptor,ni=class extends zr.QR{get name(){return"text"}createTags(){return[s.eX.InlineNode]}createNodeSpec(){return{}}};ni=((e,t,n,r)=>{for(var o,i=r>1?void 0:r?ti(t,n):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&ei(t,n,i),i})([(0,zr.AOx)({disableExtraAttributes:!0,defaultPriority:s.xV.Medium})],ni);var ri={...Jr.defaultOptions,...wo.defaultOptions,...po.u.defaultOptions,excludeExtensions:[]};function oi(e={}){e={...ri,...e};const{content:t,depth:n,getDispatch:r,getState:o,newGroupDelay:i,excludeExtensions:s}=e,a={};for(const c of s??[])a[c]=!0;const l=[];if(!a.history){const e=new po.u({depth:n,getDispatch:r,getState:o,newGroupDelay:i});l.push(e)}return a.doc||l.push(new Jr({content:t})),a.text||l.push(new ni),a.paragraph||l.push(new wo),a.positioner||l.push(new Qo),a.gapCursor||l.push(new ho),a.events||l.push(new Xr),l}var ii=Object.defineProperty,si=Object.getOwnPropertyDescriptor,ai=class extends zr.nNj{get name(){return"placeholder"}createAttributes(){return{"aria-placeholder":this.options.placeholder}}createPlugin(){return{state:{init:(e,t)=>({...this.options,empty:(0,Fr.$q)(t.doc,{ignoreAttributes:!0})}),apply:(e,t,n,r)=>function(e){const{pluginState:t,extension:n,tr:r,state:o}=e;if(!r.docChanged)return t;return{...n.options,empty:(0,Fr.$q)(o.doc)}}({pluginState:t,tr:e,extension:this,state:r})},props:{decorations:e=>function(e){const{extension:t,state:n}=e,{empty:r}=t.pluginKey.getState(n),{emptyNodeClass:o,placeholder:i}=t.options;if(!r)return null;const s=[];return n.doc.descendants(((e,t)=>{const n=to.p.node(t,t+e.nodeSize,{class:o,"data-placeholder":i});s.push(n)})),to.EH.create(n.doc,s)}({state:e,extension:this})}}}onSetOptions(e){const{changes:t}=e;t.placeholder.changed&&this.store.phase>=s.RC.EditorView&&this.store.updateAttributes()}};ai=((e,t,n,r)=>{for(var o,i=r>1?void 0:r?si(t,n):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&ii(t,n,i),i})([(0,zr.AOx)({defaultOptions:{emptyNodeClass:Io._x.IS_EMPTY,placeholder:""}})],ai);var li,ci=n(73935),ui=n(31857),hi=Object.defineProperty,pi=Object.getOwnPropertyDescriptor,di=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},fi=(e,t,n)=>(di(e,t,"read from private field"),n?n.call(e):t.get(e)),mi=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},gi=(e,t,n,r)=>(di(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);li=new WeakMap;var vi,yi,ki,wi,xi,bi,Si,Ci,Mi,Oi,Ei,Ai,Ti=e=>{const{portals:t}=e;return o.createElement(o.Fragment,null,t.map((([e,{Component:t,key:n}])=>(0,ci.createPortal)(o.createElement(t,null),e,n))))};var Ri=class{constructor({getPosition:e,node:t,portalContainer:n,view:r,ReactComponent:a,options:l}){mi(this,vi,void 0),mi(this,yi,[]),mi(this,ki,void 0),mi(this,wi,void 0),mi(this,xi,void 0),mi(this,bi,void 0),mi(this,Si,void 0),mi(this,Ci,!1),mi(this,Mi,void 0),mi(this,Oi,void 0),mi(this,Ei,void 0),mi(this,Ai,(e=>{e&&((0,i.kG)(fi(this,Oi),{code:s.mA.REACT_NODE_VIEW,message:`You have applied a ref to a node view provided for '${fi(this,vi).type.name}' which doesn't support content.`}),e.append(fi(this,Oi)))})),this.Component=()=>{const e=fi(this,xi);return(0,i.kG)(e,{code:s.mA.REACT_NODE_VIEW,message:`The custom react node view provided for ${fi(this,vi).type.name} doesn't have a valid ReactComponent`}),o.createElement(e,{updateAttributes:this.updateAttributes,selected:this.selected,view:fi(this,ki),getPosition:fi(this,bi),node:fi(this,vi),forwardRef:fi(this,Ai),decorations:fi(this,yi)})},this.updateAttributes=e=>{if(!fi(this,ki).editable)return;const t=fi(this,bi).call(this);if(null==t)return;const n=fi(this,ki).state.tr.setNodeMarkup(t,void 0,{...fi(this,vi).attrs,...e});fi(this,ki).dispatch(n)},(0,i.kG)((0,i.mf)(e),{message:"You are attempting to use a node view for a mark type. This is not supported yet. Please check your configuration."}),gi(this,vi,t),gi(this,ki,r),gi(this,wi,n),gi(this,xi,a),gi(this,bi,e),gi(this,Si,l),gi(this,Ei,this.createDom());const{contentDOM:c,wrapper:u}=this.createContentDom()??{};gi(this,Mi,c??void 0),gi(this,Oi,u),fi(this,Oi)&&fi(this,Ei).append(fi(this,Oi)),this.setDomAttributes(fi(this,vi),fi(this,Ei)),this.Component.displayName=(0,ui.Ho)(`${fi(this,vi).type.name}NodeView`),this.renderComponent()}static create(e){const{portalContainer:t,ReactComponent:n,options:r}=e;return(e,o,i)=>new Ri({options:r,node:e,view:o,getPosition:i,portalContainer:t,ReactComponent:n})}get selected(){return fi(this,Ci)}get contentDOM(){return fi(this,Mi)}get dom(){return fi(this,Ei)}renderComponent(){fi(this,wi).render({Component:this.Component,container:fi(this,Ei)})}createDom(){const{defaultBlockNode:e,defaultInlineNode:t}=fi(this,Si),n=fi(this,vi).isInline?document.createElement(t):document.createElement(e);
1return n.classList.add(`${(0,ui.GL)(fi(this,vi).type.name)}-node-view-wrapper`),n}createContentDom(){var e,t;if(fi(this,vi).isLeaf)return;const n=null==(t=(e=fi(this,vi).type.spec).toDOM)?void 0:t.call(e,fi(this,vi));if(!n)return;const{contentDOM:r,dom:o}=eo.PW.renderSpec(document,n);let i;return(0,Fr.jd)(o)?(i=o,o===r&&(i=document.createElement("span"),i.classList.add(`${(0,ui.GL)(fi(this,vi).type.name)}-node-view-content-wrapper`),i.append(r)),(0,Fr.jd)(r),{wrapper:i,contentDOM:r}):void 0}update(e,t){return!!(0,Fr.$9)({types:fi(this,vi).type,node:e})&&(fi(this,vi)===e&&fi(this,yi)===t||(fi(this,vi).sameMarkup(e)||this.setDomAttributes(e,fi(this,Ei)),gi(this,vi,e),gi(this,yi,t),this.renderComponent()),!0)}setDomAttributes(e,t){const{toDOM:n}=fi(this,vi).type.spec;let r=e.attrs;if(n){const t=n(e);if((0,i.HD)(t)||(o=t,(0,Fr.mV)(o)||(0,i.PO)(o)&&(0,Fr.mV)(o.dom)))return;(0,i.PO)(t[1])&&(r=t[1])}var o;for(const[s,a]of(0,i.qh)(r))t.setAttribute(s,a)}selectNode(){gi(this,Ci,!0),fi(this,Ei)&&fi(this,Ei).classList.add(s.Eg),this.renderComponent()}deselectNode(){gi(this,Ci,!1),fi(this,Ei)&&fi(this,Ei).classList.remove(s.Eg),this.renderComponent()}destroy(){fi(this,wi).remove(fi(this,Ei))}ignoreMutation(e){return"selection"===e.type?!fi(this,vi).type.spec.selectable:!fi(this,Oi)||!fi(this,Oi).contains(e.target)}stopEvent(e){var t;if(!fi(this,Ei))return!1;if((0,i.mf)(fi(this,Si).stopEvent))return fi(this,Si).stopEvent({event:e});const n=e.target;if(!(fi(this,Ei).contains(n)&&!(null==(t=this.contentDOM)?void 0:t.contains(n))))return!1;const r="drop"===e.type;if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!r)return!0;const o=!!fi(this,vi).type.spec.draggable,s=Qr.qv.isSelectable(fi(this,vi)),a="copy"===e.type,l="paste"===e.type,c="cut"===e.type,u="mousedown"===e.type,h=e.type.startsWith("drag");return!o&&s&&h&&e.preventDefault(),!(h||r||a||l||c||u&&s)}},Ni=Ri;vi=new WeakMap,yi=new WeakMap,ki=new WeakMap,wi=new WeakMap,xi=new WeakMap,bi=new WeakMap,Si=new WeakMap,Ci=new WeakMap,Mi=new WeakMap,Oi=new WeakMap,Ei=new WeakMap,Ai=new WeakMap;var Ii=class extends zr.nNj{constructor(){super(...arguments),this.portalContainer=new class{constructor(){this.portals=new Map,mi(this,li,(0,Ro.i)()),this.on=e=>fi(this,li).on("update",e),this.once=e=>{const t=fi(this,li).on("update",(n=>{t(),e(n)}));return t}}update(){fi(this,li).emit("update",this.portals)}render({Component:e,container:t}){const n=this.portals.get(t);this.portals.set(t,{Component:e,key:(null==n?void 0:n.key)??(0,i.EL)()}),this.update()}forceUpdate(){for(const[e,{Component:t}]of this.portals)this.portals.set(e,{Component:t,key:(0,i.EL)()})}remove(e){this.portals.delete(e),this.update()}}}get name(){return"reactComponent"}onCreate(){this.store.setStoreKey("portalContainer",this.portalContainer)}createNodeViews(){const e=(0,i.Ry)(),t=this.store.managerSettings.nodeViewComponents??{};for(const r of this.store.extensions)r.ReactComponent&&(0,zr.JZE)(r)&&"ssr"!==r.reactComponentEnvironment&&(e[r.name]=Ni.create({options:this.options,ReactComponent:r.ReactComponent,portalContainer:this.portalContainer}));const n=(0,i.qh)({...this.options.nodeViewComponents,...t});for(const[r,o]of n)e[r]=Ni.create({options:this.options,ReactComponent:o,portalContainer:this.portalContainer});return e}};Ii=((e,t,n,r)=>{for(var o,i=r>1?void 0:r?pi(t,n):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&hi(t,n,i),i})([(0,zr.AOx)({defaultOptions:{defaultBlockNode:"div",defaultInlineNode:"span",defaultContentNode:"span",defaultEnvironment:"both",nodeViewComponents:{},stopEvent:null},staticKeys:["defaultBlockNode","defaultInlineNode","defaultContentNode","defaultEnvironment"]})],Ii);var Di=Object.defineProperty,_i=Object.getOwnPropertyDescriptor,Li={...ai.defaultOptions,...Ii.defaultOptions},Pi=[...ai.staticKeys,...Ii.staticKeys],$i=class extends zr.nNj{get name(){return"react"}onSetOptions(e){const{pickChanged:t}=e;this.getExtension(ai).setOptions(t(["placeholder"]))}createExtensions(){const{emptyNodeClass:e,placeholder:t,defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:o,defaultInlineNode:i,nodeViewComponents:a}=this.options;return[new ai({emptyNodeClass:e,placeholder:t,priority:s.xV.Low}),new Ii({defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:o,defaultInlineNode:i,nodeViewComponents:a})]}};$i=((e,t,n,r)=>{for(var o,i=r>
11?void 0:r?_i(t,n):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&Di(t,n,i),i})([(0,zr.AOx)({defaultOptions:Li,staticKeys:Pi})],$i);var zi=n(99601),Fi=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Bi=(e,t,n)=>(Fi(e,t,"read from private field"),n?n.call(e):t.get(e));var ji=(0,o.createContext)(null);function Hi(e){const t=(0,o.useContext)(ji),n=(0,o.useRef)(function(){const[,e]=(0,o.useState)((0,i.Ry)());return(0,o.useCallback)((()=>{e((0,i.Ry)())}),[])}());(0,i.kG)(t,{code:s.mA.REACT_PROVIDER_CONTEXT});const{addHandler:r}=t;return(0,o.useEffect)((()=>{let t=e;if(t){if((0,i.PO)(t)){const{autoUpdate:e}=t;t=e?()=>n.current():void 0}if((0,i.mf)(t))return r("updated",t)}}),[r,e]),t}var Wi,Ji,[Ui,qi]=(Wi=({props:e})=>{const t=e.locale??"en",n=e.i18n??E,r=e.supportedLocales??[t],o=n._.bind(n);return{locale:t,i18n:n,supportedLocales:r,t:o}},a((e=>{const t=(0,o.useRef)(null),n=(0,o.useRef)(),r=null==Ji?void 0:Ji(e),[i,s]=(0,o.useState)((()=>Wi({get:c(t),set:u(n),previousContext:void 0,props:e,state:r}))),a=[...Object.values(e),r];return(0,o.useEffect)((()=>{0!==a.length&&s((o=>Wi({get:c(t),set:u(n),previousContext:o,props:e,state:r})))}),a),t.current=i,n.current=s,i})));function Vi(e,t={}){const{core:n,react:r,...o}=t;return(0,zr.ZQL)(e)?e:zr.Ao0.create((()=>[...(0,i.r2)(e),new $i(r),...oi(n)]),o)}var Ki,Yi="object"===typeof zi&&zi.__esModule&&zi.default?zi.default:zi,Gi=class extends zr.gQe{constructor(e){super(e),((e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)})(this,Ki,void 0),this.rootPropsConfig={called:!1,count:0},this.getRootProps=e=>this.internalGetRootProps(e,null),this.internalGetRootProps=(e,t)=>{this.rootPropsConfig.called=!0;const{refKey:n="ref",ref:r,...o}=e??(0,i.Ry)();return{[n]:Yi(r,this.onRef),key:this.uid,...o,children:t}},this.onRef=e=>{var t,n,r,o;e&&(this.rootPropsConfig.count+=1,(0,i.kG)(this.rootPropsConfig.count<=1,{code:s.mA.REACT_GET_ROOT_PROPS,message:`Called ${this.rootPropsConfig.count} times`}),r=e,Fi(t=this,n=Ki,"write to private field"),o?o.call(t,r):n.set(t,r),this.onRefLoad())},this.manager.view?this.manager.view.setProps({state:this.manager.view.state,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0}):this.manager.getExtension(ai).setOptions({placeholder:this.props.placeholder??""})}get name(){return"react"}update(e){return super.update(e),this}createView(e){return new to.tk(null,{state:e,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0,plugins:[]})}updateState({state:e,...t}){const{triggerChange:n=!0,tr:r,transactions:o}=t;if(this.props.state){const{onChange:t}=this.props;return(0,i.kG)(t,{code:s.mA.REACT_CONTROLLED,message:"You are required to provide the `onChange` handler when creating a controlled editor."}),(0,i.kG)(n,{code:s.mA.REACT_CONTROLLED,message:"Controlled editors do not support `clearContent` or `setContent` where `triggerChange` is `true`. Update the `state` prop instead."}),this.previousStateOverride||(this.previousStateOverride=this.getState()),void this.onChange({state:e,tr:r,transactions:o})}r||o||(e=e.apply(e.tr.setMeta(s.zr,{}))),this.view.updateState(e),n&&0!==(null==o?void 0:o.length)&&this.onChange({state:e,tr:r,transactions:o}),this.manager.onStateUpdate({previousState:this.previousState,state:e,tr:r,transactions:o})}updateControlledState(e,t){this.previousStateOverride=t,e=e.apply(e.tr.setMeta(s.zr,{})),this.view.updateState(e),this.manager.onStateUpdate({previousState:this.previousState,state:e}),this.previousStateOverride=void 0}addProsemirrorViewToDom(e,t){"start"===this.props.insertPosition?e.insertBefore(t,e.firstChild):e.append(t)}onRefLoad(){(0,i.kG)(Bi(this,Ki),{code:s.mA.REACT_EDITOR_VIEW,message:"Something went wrong when initializing the text editor. Please check your setup."});const{autoFocus:e}=this.props;this.addProsemirrorViewToDom(Bi(this,Ki),this.view.dom),e&&this.focus(e),this.onChange(),this.addFocusListeners()}onUpdate(){this.view&&Bi(this,Ki)&&this.view.setProps({...this.view.props,editable:()=>this.props.editable??!0})}get frameworkOutput(){return{...this.baseOutput,getRootProps:this.getRootProps,portalContainer:this.manager.store.portalContainer}}
1resetRender(){this.rootPropsConfig.called=!1,this.rootPropsConfig.count=0}};Ki=new WeakMap;var Xi="undefined"!==typeof document?o.useLayoutEffect:o.useEffect;function Zi(e){const{manager:t,state:n}=e,{placeholder:r,editable:a}=e;(0,o.useRef)(!0).current&&!(0,i.le)(r)&&t.getExtension($i).setOptions({placeholder:r}),(0,o.useEffect)((()=>{null!=r&&t.getExtension($i).setOptions({placeholder:r})}),[r,t]);const[l]=(0,o.useState)((()=>{if(n)return n;const r=t.createEmptyDoc(),[o,s]=(0,i.kJ)(e.initialContent)?e.initialContent:[e.initialContent??r];return t.createState({content:o,selection:s})})),c=function(e){const t=(0,o.useRef)(e);t.current=e;const n=(0,o.useMemo)((()=>new Gi(t.current)),[]);return n.update(e),n}({initialEditorState:l,getProps:()=>e});return(0,o.useEffect)((()=>()=>{c.destroy()}),[c]),(0,o.useEffect)((()=>{c.onUpdate()}),[a,c]),function(e){const{state:t}=e.props,n=(0,o.useRef)(!!t),r=function(e){const t=(0,o.useRef)();return Xi((()=>{t.current=e})),t.current}(t);Xi((()=>{const o=t?!0===n.current:!1===n.current;(0,i.kG)(o,{code:s.mA.REACT_CONTROLLED,message:n.current?"You have attempted to switch from a controlled to an uncontrolled editor. Once you set up an editor as a controlled editor it must always provide a `state` prop.":"You have provided a `state` prop to an uncontrolled editor. In order to set up your editor as controlled you must provide the `state` prop from the very first render."}),t&&t!==r&&e.updateControlledState(t,r??void 0)}),[t,r,e])}(c),c.frameworkOutput}function Qi(e={}){const{content:t,document:n,selection:r,extensions:i,...s}=e,a=function(e,t={}){const n=(0,o.useRef)(e),r=(0,o.useRef)(t),[i,s]=(0,o.useState)((()=>Vi(e,t)));return n.current=e,r.current=t,(0,o.useEffect)((()=>i.addHandler("destroy",(()=>{s((()=>Vi(n.current,r.current)))}))),[i]),i}(i??(()=>[]),s),[l,c]=(0,o.useState)((()=>a.createState({selection:r,content:t??a.createEmptyDoc()}))),u=(0,o.useCallback)((({state:e})=>{c(e)}),[]),h=(0,o.useCallback)((()=>a.output),[a]);return(0,o.useMemo)((()=>({state:l,setState:c,manager:a,onChange:u,getContext:h})),[h,a,u,l])}var es=()=>o.createElement("div",{className:Io.kd.EDITOR_WRAPPER,...Hi().getRootProps()}),ts=e=>(e.hook(),null);function ns(e){const{children:t,autoRender:n,i18n:r,locale:s,supportedLocales:a,hooks:l=[],...c}=e,u=Zi(c),h=function(e){const[t,n]=(0,o.useState)((()=>Array.from(e.portals.entries())));return(0,o.useEffect)((()=>e.on((e=>{n(Array.from(e.entries()))}))),[e]),(0,o.useMemo)((()=>t),[t])}(u.portalContainer),p="start"===n||!0===n||!t&&(0,i.le)(n),d="end"===n;return o.createElement(Ui,{i18n:r,locale:s,supportedLocales:a},o.createElement(ji.Provider,{value:u},o.createElement(Ti,{portals:h}),l.map(((e,t)=>o.createElement(ts,{hook:e,key:t}))),p&&o.createElement(es,null),t,d&&o.createElement(es,null)))}},31026:function(e,t,n){"use strict";function r(e,t,n){return Math.min(Math.max(e,n),t)}n.d(t,{kd:function(){return M},uV:function(){return O},Jl:function(){return E},MQ:function(){return A},_x:function(){return T},bu:function(){return R}});class o extends Error{constructor(e){super(`Failed to parse color: "${e}"`)}}var i=o;function s(e){if("string"!==typeof e)throw new i(e);if("transparent"===e.trim().toLowerCase())return[0,0,0,0];let t=e.trim();t=f.test(e)?function(e){const t=e.toLowerCase().trim(),n=l[function(e){let t=5381,n=e.length;for(;n;)t=33*t^e.charCodeAt(--n);return(t>>>0)%2341}(t)];if(!n)throw new i(e);return`#${n}`}(e):e;const n=u.exec(t);if(n){const e=Array.from(n).slice(1);return[...e.slice(0,3).map((e=>parseInt(c(e,2),16))),parseInt(c(e[3]||"f",2),16)/255]}const o=h.exec(t);if(o){const e=Array.from(o).slice(1);return[...e.slice(0,3).map((e=>parseInt(e,16))),parseInt(e[3]||"ff",16)/255]}const s=p.exec(t);if(s){const e=Array.from(s).slice(1);return[...e.slice(0,3).map((e=>parseInt(e,10))),parseFloat(e[3]||"1")]}const a=d.exec(t);if(a){const[t,n,o,s]=Array.from(a).slice(1).map(parseFloat);if(r(0,100,n)!==n)throw new i(e);if(r(0,100,o)!==o)throw new i(e);return[...g(t,n,o),Number.isNaN(s)?1:s]}throw new i(e)}const a=e=>parseInt(e.replace(/_/g,""),36),l="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce(((e,t)=>{const n=a(t.substring(0,3)),r=a(t.substring(3)).toString(16);let o="";for(let i=0;i<6-r.length;i++)o+="0";return e[n]=`${o}${r}`,e}),{});const c=(e,t)=>Array.from(Array(t)).map((()=>e)).join(""),u=new RegExp(`^#${c("([a-f0-9])",3)}([a-f0-9])?$`,"i"),h=new RegExp(`^#${c("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),p=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${c(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),d=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,f=/^[a-z]+$/i,m=e=>Math.round(255*e),g=(e,t,n)=>{let r=n/100;if(0===t)return[r,r,r].map(m);const o=(e%360+360)%360/60,i=(1-Math.abs(2*r-1))*(t/100),s=i*(1-Math.abs(o%2-1));let a=0,l=0,c=0;o>=0&&o<1?(a=i,l=s):o>=1&&o<2?(a=s,l=i):o>=2&&o<3?(l=i,c=s):o>=3&&o<4?(l=s,c=i):o>=4&&o<5?(a=s,c=i):o>=5&&o<6&&(a=i,c=s);const u=r-i/2;return[a+u,l+u,c+u].map(m)};function v(e){const[t,n,r,o]=s(e).map(((e,t)=>3===t?e:e/255)),i=Math.max(t,n,r),a=Math.min(t,n,r),l=(i+a)/2;if(i===a)return[0,0,l,o];const c=i-a;return[60*(t===i?(n-r)/c+(n<r?6:0):n===i?(r-t)/c+2:(t-n)/c+4),l>.5?c/(2-i-a):c/(i+a),l,o]}function y(e,t,n,o){return`hsla(${(e%360).toFixed()}, ${r(0,100,100*t).toFixed()}%, ${r(0,100,100*n).toFixed()}%, ${parseFloat(r(0,1,o).toFixed(3))})`}function k(e,t){const[n,r,o,i]=v(e);return y(n,r,o-t,i)}function w(e){if("transparent"===e)return 0;function t(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}const[n,r,o]=s(e);return.2126*t(n)+.7152*t(r)+.0722*t(o)}function x(e,t,n,o){return`rgba(${r(0,255,e).toFixed()}, ${r(0,255,t).toFixed()}, ${r(0,255,n).toFixed()}, ${parseFloat(r(0,1,o).toFixed(3))})`}function b(e,t){return k(e,-t)}function S(e,t){const[n,r,o,i]=s(e);return x(n,r,o,i-t)}function C(e){return function(e){return w(e)>.179}(e)?"#000":"#fff"}var M=Object.freeze({__proto__:null,ANIMATED_POPOVER:"remirror-animated-popover",BUTTON:"remirror-button",BUTTON_ACTIVE:"remirror-button-active",COLOR_PICKER:"remirror-color-picker",COLOR_PICKER_CELL:"remirror-color-picker-cell",COLOR_PICKER_CELL_SELECTED:"remirror-color-picker-cell-selected",COMPOSITE:"remirror-composite",DIALOG:"remirror-dialog",DIALOG_BACKDROP:"remirror-dialog-backdrop",EDITOR_WRAPPER:"remirror-editor-wrapper",FLEX_COLUMN:"remirror-flex-column",FLEX_ROW:"remirror-flex-row",FLOATING_POPOVER:"remirror-floating-popover",FORM:"remirror-form",FORM_GROUP:"remirror-form-group",FORM_LABEL:"remirror-form-label",FORM_MESSAGE:"remirror-form-message",GROUP:"remirror-group",INPUT:"remirror-input",MENU:"remirror-menu",MENU_BAR:"remirror-menu-bar",MENU_BUTTON:"remirror-menu-button",MENU_BUTTON_LEFT:"remirror-menu-button-left",MENU_BUTTON_NEST
1ED_LEFT:"remirror-menu-button-nested-left",MENU_BUTTON_NESTED_RIGHT:"remirror-menu-button-nested-right",MENU_BUTTON_RIGHT:"remirror-menu-button-right",MENU_DROPDOWN_LABEL:"remirror-menu-dropdown-label",MENU_GROUP:"remirror-menu-group",MENU_ITEM:"remirror-menu-item",MENU_ITEM_CHECKBOX:"remirror-menu-item-checkbox",MENU_ITEM_COLUMN:"remirror-menu-item-column",MENU_ITEM_RADIO:"remirror-menu-item-radio",MENU_ITEM_ROW:"remirror-menu-item-row",MENU_PANE:"remirror-menu-pane",MENU_PANE_ACTIVE:"remirror-menu-pane-active",MENU_PANE_ICON:"remirror-menu-pane-icon",MENU_PANE_LABEL:"remirror-menu-pane-label",MENU_PANE_SHORTCUT:"remirror-menu-pane-shortcut",POPOVER:"remirror-popover",ROLE:"remirror-role",SEPARATOR:"remirror-separator",TAB:"remirror-tab",TABBABLE:"remirror-tabbable",TABLE_SIZE_EDITOR:"remirror-table-size-editor",TABLE_SIZE_EDITOR_BODY:"remirror-table-size-editor-body",TABLE_SIZE_EDITOR_CELL:"remirror-table-size-editor-cell",TABLE_SIZE_EDITOR_CELL_SELECTED:"remirror-table-size-editor-cell-selected",TABLE_SIZE_EDITOR_FOOTER:"remirror-table-size-editor-footer",TAB_LIST:"remirror-tab-list",TOOLBAR:"remirror-toolbar",TOOLTIP:"remirror-tooltip"});var O=Object.freeze({__proto__:null,A11Y_DARK:"remirror-a11y-dark",ATOM_DARK:"remirror-atom-dark",BASE16_ATELIERSULPHURPOOL_LIGHT:"remirror-base16-ateliersulphurpool-light",CB:"remirror-cb",DARCULA:"remirror-darcula",DRACULA:"remirror-dracula",DUOTONE_DARK:"remirror-duotone-dark",DUOTONE_EARTH:"remirror-duotone-earth",DUOTONE_FOREST:"remirror-duotone-forest",DUOTONE_LIGHT:"remirror-duotone-light",DUOTONE_SEA:"remirror-duotone-sea",DUOTONE_SPACE:"remirror-duotone-space",GH_COLORS:"remirror-gh-colors",HOPSCOTCH:"remirror-hopscotch",LANGUAGE_SELECT_POSITIONER:"remirror-language-select-positioner",LANGUAGE_SELECT_WIDTH:"remirror-language-select-width",POJOAQUE:"remirror-pojoaque",VS:"remirror-vs",WRAP:"remirror-wrap",XONOKAI:"remirror-xonokai"});var E=Object.freeze({__proto__:null,IMAGE_LOADER:"remirror-image-loader"});var A=Object.freeze({__proto__:null,COLLAPSIBLE_LIST_ITEM_BUTTON:"remirror-collapsible-list-item-button",COLLAPSIBLE_LIST_ITEM_CLOSED:"remirror-collapsible-list-item-closed",EDITOR:"remirror-editor",LIST_ITEM_CHECKBOX:"remirror-list-item-checkbox",LIST_ITEM_MARKER_CONTAINER:"remirror-list-item-marker-container",LIST_ITEM_WITH_CUSTOM_MARKER:"remirror-list-item-with-custom-mark",LIST_SPINE:"remirror-list-spine",UL_LIST_CONTENT:"remirror-ul-list-content"});var T=Object.freeze({__proto__:null,IS_EMPTY:"remirror-is-empty"});var R=Object.freeze({__proto__:null,EDITOR:"remirror-editor",POSITIONER:"remirror-positioner",POSITIONER_WIDGET:"remirror-positioner-widget"});const N={gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},I="#000000",D="#ffffff",_=S(I,.75),L="#7963d2",P="#bcd263",$=N.gray[1],z="rgba(10,31,68,0.08)",F="rgba(10,31,68,0.10)",B="rgba(10,31,68,0.12)",j={background:D,border:_,foreground:I,muted:$,primary:L,secondary:P,primaryText:"#fff",secondaryText:"#fff",text:"#252103",faded:b(S(I,.1),.13)},H={...j,background:k(D,.15),border:k(_,.15),foreground:k(I,.15),muted:k($,.15),primary:k(L,.15),secondary:k(P,.15),get text(){return C(this.background)},get primaryText(){return C(this.primary)},get secondaryText(){return C(this.secondary)}},W={...j,background:k(D,.075),border:k(_,.075),foreground:k(I,.075),muted:k($,.075),primary:k(L,.075),secondary:k(P,.075),get text(){return C(this.background)},get primaryText(){return C(this.primary)},get secondaryText(){return C(this.secondary)}};S(I,.1),S(L,.6),b(I,.8),b(I,.4),N.gray[3],N.blue[7],N.blue[1],N.blue[5],N.blue[7],b(I,.4),N.blue[5],N.red[7],N.red[1],N.red[5]},51438:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:function(){return r}})},52951:function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,{Z:function(){return o}})},16567:function(e,t,n){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}function o(e){return r(e)}function i(e,t){return!t||"object"!==((n=t)&&n.constructor===Symbol?"symbol":typeof n)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t;var n}function s(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=o(e);if(t){var s=o(this).constructor;n=Reflect.construct(r,arguments,s)}else n=r.apply(this,arguments);return i(this,n)}}n.d(t,{Z:function(){return s}})},88029:function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}n.d(t,{Z:function(){return o}})},31857:function(e,t,n){"use strict";n.d(t,{GL:function(){return l},Ho:function(){return a}});const r=/^[a-z\xe0-\xf6\xf8-\xff]+|[A-Z\xc0-\xd6\xd8-\xdf][a-z\xe0-\xf6\xf8-\xff]+|[a-z\xe0-\xf6\xf8-\xff]+|[0-9]+|[A-Z\xc0-\xd6\xd8-\xdf]+(?![a-z\xe0-\xf6\xf8-\xff])/g,o=/\S+/g;function i(e,t){const{keepSpecialCharacters:n=!1,keep:i,prefix:s=""}=t||{},a=e.trim().normalize("NFC"),l=a.includes(" "),c=function(e,t){const n={parts:[],prefixes:[]}
1,r=e.matchAll(t);let o=0;for(const s of r){if("number"!==typeof s.index)continue;const t=s[0];n.parts.push(t);const r=e.slice(o,s.index).trim();n.prefixes.push(r),o=s.index+t.length}const i=e.slice(o).trim();return i&&(n.parts.push(""),n.prefixes.push(i)),n}(a,l?o:r);return c.parts.map(((e,t)=>{let r=c.prefixes[t]||"",o=e;return!1===n&&(i&&(o=o.normalize("NFD").replace(new RegExp(`[^a-zA-Z\xd8\xdf\xf80-9${i.join("")}]`,"g"),"")),i||(o=o.normalize("NFD").replace(/[^a-zA-Z\xd8\xdf\xf80-9]/g,""),r="")),i&&(r=r.replace(new RegExp(`[^${i.join("")}]`,"g"),"")),0===t?r+o:r||o?l&&!r&&s.match(/\s/)?" "+o:(r||s)+o:""})).filter(Boolean)}function s(e){const t=e.matchAll(r).next().value,n=t?t.index:0;return e.slice(0,n+1).toUpperCase()+e.slice(n+1).toLowerCase()}function a(e,t){return i(e,t).reduce(((e,t)=>e+s(t)),"")}function l(e,t){return i(e,{...t,prefix:"-"}).join("").toLowerCase()}},48111:function(e,t,n){"use strict";n.d(t,{i:function(){return r}});let r=()=>({events:{},emit(e,...t){(this.events[e]||[]).forEach((e=>e(...t)))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter((e=>e!==t))}})},25804:function(e,t,n){"use strict";n.d(t,{N0:function(){return v},QF:function(){return S},YR:function(){return A},al:function(){return l},uo:function(){return f},w9:function(){return b}});var r=n(16560),o=n(12806),i=n(2376);const s=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function a(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const l=(e,t,n)=>{let s=a(e,n);if(!s)return!1;let l=u(s);if(!l){let n=s.blockRange(),o=n&&(0,r.k9)(n);return null!=o&&(t&&t(e.tr.lift(n,o).scrollIntoView()),!0)}let h=l.nodeBefore;if(!h.type.spec.isolating&&y(e,l,t))return!0;if(0==s.parent.content.size&&(c(h,"end")||i.qv.isSelectable(h))){let n=(0,r.dR)(e.doc,s.before(),s.after(),o.p2.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(c(h,"end")?i.Y1.findFrom(r.doc.resolve(r.mapping.map(l.pos,-1)),-1):i.qv.create(r.doc,l.pos-h.nodeSize)),t(r.scrollIntoView())}return!0}}return!(!h.isAtom||l.depth!=s.depth-1)&&(t&&t(e.tr.delete(l.pos-h.nodeSize,l.pos).scrollIntoView()),!0)};function c(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}function u(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function h(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)?null:n}function p(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}function d(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const f=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),s=n.indexAfter(-1),a=d(o.contentMatchAt(s));if(!a||!o.canReplaceWith(s,s,a))return!1;if(t){let r=n.after(),o=e.tr.replaceWith(r,r,a.createAndFill());o.setSelection(i.Y1.near(o.doc.resolve(r),1)),t(o.scrollIntoView())}return!0};const m=(e,t)=>{let{$from:n,$to:o}=e.selection;if(e.selection instanceof i.qv&&e.selection.node.isBlock)return!(!n.parentOffset||!(0,r.Ax)(e.doc,n.pos))&&(t&&t(e.tr.split(n.pos).scrollIntoView()),!0);if(!n.parent.isBlock)return!1;if(t){let s=o.parentOffset==o.parent.content.size,a=e.tr;(e.selection instanceof i.Bs||e.selection instanceof i.C1)&&a.deleteSelection();let l=0==n.depth?null:d(n.node(-1).contentMatchAt(n.indexAfter(-1))),c=g&&g(o.parent,s),u=c?[c]:s&&l?[{type:l}]:void 0,h=(0,r.Ax)(a.doc,a.mapping.map(n.pos),1,u);if(u||h||!(0,r.Ax)(a.doc,a.mapping.map(n.pos),1,l?[{type:l}]:void 0)||(l&&(u=[{type:l}]),h=!0),h&&(a.split(a.mapping.map(n.pos),1,u),!s&&!n.parentOffset&&n.parent.type!=l)){let e=a.mapping.map(n.before()),t=a.doc.resolve(e);l&&n.node(-1).canReplaceWith(t.index(),t.index()+1,l)&&a.setNodeMarkup(a.mapping.map(n.before()),l)}t(a.scrollIntoView())}return!0};var g;const v=(e,t)=>
1{let n,{$from:r,to:o}=e.selection,s=r.sharedDepth(o);return 0!=s&&(n=r.before(s),t&&t(e.tr.setSelection(i.qv.create(e.doc,n))),!0)};function y(e,t,n){let s,a,l=t.nodeBefore,u=t.nodeAfter;if(l.type.spec.isolating||u.type.spec.isolating)return!1;if(function(e,t,n){let o=t.nodeBefore,i=t.nodeAfter,s=t.index();return!!(o&&i&&o.type.compatibleContent(i.type))&&(!o.content.size&&t.parent.canReplace(s-1,s)?(n&&n(e.tr.delete(t.pos-o.nodeSize,t.pos).scrollIntoView()),!0):!(!t.parent.canReplace(s,s+1)||!i.isTextblock&&!(0,r.Mn)(e.doc,t.pos))&&(n&&n(e.tr.clearIncompatible(t.pos,o.type,o.contentMatchAt(o.childCount)).join(t.pos).scrollIntoView()),!0))}(e,t,n))return!0;let h=t.parent.canReplace(t.index(),t.index()+1);if(h&&(s=(a=l.contentMatchAt(l.childCount)).findWrapping(u.type))&&a.matchType(s[0]||u.type).validEnd){if(n){let i=t.pos+u.nodeSize,a=o.HY.empty;for(let e=s.length-1;e>=0;e--)a=o.HY.from(s[e].create(null,a));a=o.HY.from(l.copy(a));let c=e.tr.step(new r.FC(t.pos-1,i,t.pos,i,new o.p2(a,1,0),s.length,!0)),h=i+2*s.length;(0,r.Mn)(c.doc,h)&&c.join(h),n(c.scrollIntoView())}return!0}let p=i.Y1.findFrom(t,1),d=p&&p.$from.blockRange(p.$to),f=d&&(0,r.k9)(d);if(null!=f&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(h&&c(u,"start",!0)&&c(l,"end")){let i=l,s=[];for(;s.push(i),!i.isTextblock;)i=i.lastChild;let a=u,c=1;for(;!a.isTextblock;a=a.firstChild)c++;if(i.canReplace(i.childCount,i.childCount,a.content)){if(n){let i=o.HY.empty;for(let e=s.length-1;e>=0;e--)i=o.HY.from(s[e].copy(i));n(e.tr.step(new r.FC(t.pos-s.length,t.pos+u.nodeSize,t.pos+c,t.pos+u.nodeSize-c,new o.p2(i,s.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function k(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,s=o.depth;for(;o.node(s).isInline;){if(!s)return!1;s--}return!!o.node(s).isTextblock&&(n&&n(t.tr.setSelection(i.Bs.create(t.doc,e<0?o.start(s):o.end(s)))),!0)}}const w=k(-1),x=k(1);function b(e,t=null){return function(n,r){let{empty:o,$cursor:i,ranges:s}=n.selection;if(o&&!i||!function(e,t,n){for(let r=0;r<t.length;r++){let{$from:o,$to:i}=t[r],s=0==o.depth&&e.inlineContent&&e.type.allowsMarkType(n);if(e.nodesBetween(o.pos,i.pos,(e=>{if(s)return!1;s=e.inlineContent&&e.type.allowsMarkType(n)})),s)return!0}return!1}(n.doc,s,e))return!1;if(r)if(i)e.isInSet(n.storedMarks||i.marks())?r(n.tr.removeStoredMark(e)):r(n.tr.addStoredMark(e.create(t)));else{let o=!1,i=n.tr;for(let t=0;!o&&t<s.length;t++){let{$from:r,$to:i}=s[t];o=n.doc.rangeHasMark(r.pos,i.pos,e)}for(let n=0;n<s.length;n++){let{$from:r,$to:a}=s[n];if(o)i.removeMark(r.pos,a.pos,e);else{let n=r.pos,o=a.pos,s=r.nodeAfter,l=a.nodeBefore,c=s&&s.isText?/^\s*/.exec(s.text)[0].length:0,u=l&&l.isText?/\s*$/.exec(l.text)[0].length:0;n+c<o&&(n+=c,o-=u),i.addMark(n,o,e.create(t))}}r(i.scrollIntoView())}return!0}}function S(...e){return function(t,n,r){for(let o=0;o<e.length;o++)if(e[o](t,n,r))return!0;return!1}}let C=S(s,l,((e,t,n)=>{let{$head:r,empty:o}=e.selection,s=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;s=u(r)}let a=s&&s.nodeBefore;return!(!a||!i.qv.isSelectable(a))&&(t&&t(e.tr.setSelection(i.qv.create(e.doc,s.pos-a.nodeSize)).scrollIntoView()),!0)})),M=S(s,((e,t,n)=>{let s=h(e,n);if(!s)return!1;let a=p(s);if(!a)return!1;let l=a.nodeAfter;if(y(e,a,t))return!0;if(0==s.parent.content.size&&(c(l,"start")||i.qv.isSelectable(l))){let n=(0,r.dR)(e.doc,s.before(),s.after(),o.p2.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(c(l,"start")?i.Y1.findFrom(r.doc.resolve(r.mapping.map(a.pos)),1):i.qv.create(r.doc,r.mapping.map(a.pos))),t(r.scrollIntoView())}return!0}}return!(!l.isAtom||a.depth!=s.depth-1)&&(t&&t(e.tr.delete(a.pos,a.pos+l.nodeSize).scrollIntoView()),!0)}),((e,t,n)=>{let{$head:r,empty:o}=e.selection,s=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;s=p(r)}let a=s&&s.nodeAfter;return!(!a||!i.qv.isSelectable(a))&&(t&&t(e.tr.setSelection(i.qv.create(e.doc,s.pos)).scrollIntoView()),!0)}));const O={Enter:S(((e,t)=>{let{$head:n,$anchor:r}=e.selection;return!(!n.parent.type.spec.code||!n.sameParent(r))&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)}),((e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof i.C1||r.parent.inlineContent||o.parent.inlineContent)return!1;let s=d(o.parent.contentMatchAt(o.indexAfter()));if(!s||!s.isTextblock)return!1;if(t){let n=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,a=e.tr.insert(n,s.createAndFill());a.setSelection(i.Bs.create(a.doc,n+1)),t(a.scrollIntoView())}return!0}),((e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let o=n.before();if((0,r.Ax)(e.doc,o))return t&&t(e.tr.split(o).scrollIntoView()),!0}let o=n.blockRange(),i=o&&(0,r.k9)(o);return null!=i&&(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)}),m),"Mod-Enter":f,Backspace:C,"Mod-Backspace":C,"Shift-Backspace":C,Delete:M,"Mod-Delete":M,"Mod-a":(e,t)=>
1(t&&t(e.tr.setSelection(new i.C1(e.doc))),!0)},E={"Ctrl-h":O.Backspace,"Alt-Backspace":O["Mod-Backspace"],"Ctrl-d":O.Delete,"Ctrl-Alt-Backspace":O["Mod-Delete"],"Alt-Delete":O["Mod-Delete"],"Alt-d":O["Mod-Delete"],"Ctrl-a":w,"Ctrl-e":x};for(let T in O)E[T]=O[T];const A=("undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!("undefined"==typeof os||!os.platform)&&"darwin"==os.platform())?E:O},58463:function(e,t,n){"use strict";n.d(t,{m8:function(){return b},KX:function(){return C},AH:function(){return O},Yw:function(){return S},of:function(){return M}});var r=200,o=function(){};o.prototype.append=function(e){return e.length?(e=o.from(e),!this.length&&e||e.length<r&&this.leafAppend(e)||this.length<r&&e.leafPrepend(this)||this.appendInner(e)):this},o.prototype.prepend=function(e){return e.length?o.from(e).append(this):this},o.prototype.appendInner=function(e){return new s(this,e)},o.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?o.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},o.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},o.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},o.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(t,n){return r.push(e(t,n))}),t,n),r},o.from=function(e){return e instanceof o?e:e&&e.length?new i(e):o.empty};var i=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var o=t;o<n;o++)if(!1===e(this.values[o],r+o))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var o=t-1;o>=n;o--)if(!1===e(this.values[o],r+o))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=r)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=r)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(o);o.empty=new i([]);var s=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var o=this.left.length;return!(t<o&&!1===this.left.forEachInner(e,t,Math.min(n,o),r))&&(!(n>o&&!1===this.right.forEachInner(e,Math.max(t-o,0),Math.min(this.length,n)-o,r+o))&&void 0)},t.prototype.forEachInvertedInner=function(e,t,n,r){var o=this.left.length;return!(t>o&&!1===this.right.forEachInvertedInner(e,t-o,Math.max(n,o)-o,r+o))&&(!(n<o&&!1===this.left.forEachInvertedInner(e,Math.min(t,o),n,r))&&void 0)},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(o),a=o,l=n(16560),c=n(2376);class u{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null;let n,r,o=this.items.length;for(;;o--){if(this.items.get(o-1).selection){--o;break}}t&&(n=this.remapping(o,this.items.length),r=n.maps.length);let i,s,a=e.tr,l=[],c=[];
1return this.items.forEach(((e,t)=>{if(!e.step)return n||(n=this.remapping(o,t+1),r=n.maps.length),r--,void c.push(e);if(n){c.push(new h(e.map));let t,o=e.step.map(n.slice(r));o&&a.maybeStep(o).doc&&(t=a.mapping.maps[a.mapping.maps.length-1],l.push(new h(t,void 0,void 0,l.length+c.length))),r--,t&&n.appendMap(t,r)}else a.maybeStep(e.step);return e.selection?(i=n?e.selection.map(n.slice(r)):e.selection,s=new u(this.items.slice(0,o).append(c.reverse().concat(l)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:a,selection:i}}addTransform(e,t,n,r){let o=[],i=this.eventCount,s=this.items,a=!r&&s.length?s.get(s.length-1):null;for(let c=0;c<e.steps.length;c++){let n,l=e.steps[c].invert(e.docs[c]),u=new h(e.mapping.maps[c],l,t);(n=a&&a.merge(u))&&(u=n,c?o.pop():s=s.slice(0,s.length-1)),o.push(u),t&&(i++,t=void 0),r||(a=u)}let l=i-n.depth;return l>d&&(s=function(e,t){let n;return e.forEach(((e,r)=>{if(e.selection&&0==t--)return n=r,!1})),e.slice(n)}(s,l),i-=l),new u(s.append(o),i)}remapping(e,t){let n=new l.vs;return this.items.forEach(((t,r)=>{let o=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,o)}),e,t),n}addMaps(e){return 0==this.eventCount?this:new u(this.items.append(e.map((e=>new h(e)))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),o=e.mapping,i=e.steps.length,s=this.eventCount;this.items.forEach((e=>{e.selection&&s--}),r);let a=t;this.items.forEach((t=>{let r=o.getMirror(--a);if(null==r)return;i=Math.min(i,r);let l=o.maps[r];if(t.step){let i=e.steps[r].invert(e.docs[r]),c=t.selection&&t.selection.map(o.slice(a+1,r));c&&s++,n.push(new h(l,i,c))}else n.push(new h(l))}),r);let l=[];for(let u=t;u<i;u++)l.push(new h(o.maps[u]));let c=this.items.slice(0,r).append(l).append(n),p=new u(c,s);return p.emptyItemCount()>500&&(p=p.compress(this.items.length-n.length)),p}emptyItemCount(){let e=0;return this.items.forEach((t=>{t.step||e++})),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,r=[],o=0;return this.items.forEach(((i,s)=>{if(s>=e)r.push(i),i.selection&&o++;else if(i.step){let e=i.step.map(t.slice(n)),s=e&&e.getMap();if(n--,s&&t.appendMap(s,n),e){let a=i.selection&&i.selection.map(t.slice(n));a&&o++;let l,c=new h(s.invert(),e,a),u=r.length-1;(l=r.length&&r[u].merge(c))?r[u]=l:r.push(c)}}else i.map&&n--}),this.items.length,0),new u(a.from(r.reverse()),o)}}u.empty=new u(a.empty,0);class h{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new h(t.getMap().invert(),t,this.selection)}}}class p{constructor(e,t,n,r,o){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=o}}const d=20;function f(e){let t=[];return e.forEach(((e,n,r,o)=>t.push(r,o))),t}function m(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let o=t.map(e[r],1),i=t.map(e[r+1],-1);o<=i&&n.push(o,i)}return n}function g(e,t,n,r){let o=k(t),i=w.get(t).spec.config,s=(r?e.undone:e.done).popEvent(t,o);if(!s)return;let a=s.selection.resolve(s.transform.doc),l=(r?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),i,o),c=new p(r?l:s.remaining,r?s.remaining:l,null,0,-1);n(s.transform.setSelection(a).setMeta(w,{redo:r,historyState:c}).scrollIntoView())}let v=!1,y=null;function k(e){let t=e.plugins;if(y!=t){v=!1,y=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){v=!0;break}}return v}const w=new c.H$("history"),x=new c.H$("closeHistory");function b(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new c.Sy({key:w,state:{init:()=>new p(u.empty,u.empty,null,0,-1),apply:(t,n,r)=>function(e,t,n,r){let o,i=n.getMeta(w);if(i)return i.historyState;n.getMeta(x)&&(e=new p(e.done,e.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(s&&s.getMeta(w))return s.getMeta(w).redo?new p(e.done.addTransform(n,void 0,r,k(t)),e.undone,f(n.mapping.maps[n.steps.length-1]),e.prevTime,e.prevComposition):new p(e.done,e.undone.addTransform(n,void 0,r,k(t)),null,e.prevTime,e.prevComposition);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new p(e.done.rebased(n,o),e.undone.rebased(n,o),m(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new p(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),m(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);{let o=n.getMeta("composition"),i=0==e.prevTime||!s&&e.prevComposition!=o&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;
1return e.mapping.maps[0].forEach(((e,r)=>{for(let o=0;o<t.length;o+=2)e<=t[o+1]&&r>=t[o]&&(n=!0)})),n}(n,e.prevRanges)),a=s?m(e.prevRanges,n.mapping):f(n.mapping.maps[n.steps.length-1]);return new p(e.done.addTransform(n,i?t.selection.getBookmark():void 0,r,k(t)),u.empty,a,n.time,null==o?e.prevComposition:o)}}(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?S:"historyRedo"==n?C:null;return!!r&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}const S=(e,t)=>{let n=w.getState(e);return!(!n||0==n.done.eventCount)&&(t&&g(n,e,t,!1),!0)},C=(e,t)=>{let n=w.getState(e);return!(!n||0==n.undone.eventCount)&&(t&&g(n,e,t,!0),!0)};function M(e){let t=w.getState(e);return t?t.done.eventCount:0}function O(e){let t=w.getState(e);return t?t.undone.eventCount:0}},36912:function(e,t,n){"use strict";n.d(t,{Hw:function(){return s},S0:function(){return c},VK:function(){return i},dU:function(){return l},zK:function(){return u}});var r=n(2376),o=n(16560);class i{constructor(e,t){var n;this.match=e,this.match=e,this.handler="string"==typeof t?(n=t,function(e,t,r,o){let i=n;if(t[1]){let e=t[0].lastIndexOf(t[1]);i+=t[0].slice(e+t[1].length);let n=(r+=e)-o;n>0&&(i=t[0].slice(e-n,e)+i,r=o)}return e.tr.insertText(i,r,o)}):t}}function s({rules:e}){let t=new r.Sy({state:{init:()=>null,apply(e,t){let n=e.getMeta(this);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:(n,r,o,i)=>a(n,r,o,i,e,t),handleDOMEvents:{compositionend:n=>{setTimeout((()=>{let{$cursor:r}=n.state.selection;r&&a(n,r.pos,r.pos,"",e,t)}))}}},isInputRules:!0});return t}function a(e,t,n,r,o,i){if(e.composing)return!1;let s=e.state,a=s.doc.resolve(t);if(a.parent.type.spec.code)return!1;let l=a.parent.textBetween(Math.max(0,a.parentOffset-500),a.parentOffset,null,"\ufffc")+r;for(let c=0;c<o.length;c++){let a=o[c].match.exec(l),u=a&&o[c].handler(s,a,t-(a[0].length-r.length),n);if(u)return e.dispatch(u.setMeta(i,{transform:u,from:t,to:n,text:r})),!0}return!1}const l=(e,t)=>{let n=e.plugins;for(let r=0;r<n.length;r++){let o,i=n[r];if(i.spec.isInputRules&&(o=i.getState(e))){if(t){let n=e.tr,r=o.transform;for(let e=r.steps.length-1;e>=0;e--)n.step(r.steps[e].invert(r.docs[e]));if(o.text){let t=n.doc.resolve(o.from).marks();n.replaceWith(o.from,o.to,e.schema.text(o.text,t))}else n.delete(o.from,o.to);t(n)}return!0}}return!1};new i(/--$/,"\u2014"),new i(/\.\.\.$/,"\u2026"),new i(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"\u201c"),new i(/"$/,"\u201d"),new i(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"\u2018"),new i(/'$/,"\u2019");function c(e,t,n=null,r){return new i(e,((e,i,s,a)=>{let l=n instanceof Function?n(i):n,c=e.tr.delete(s,a),u=c.doc.resolve(s).blockRange(),h=u&&(0,o.nd)(u,t,l);if(!h)return null;c.wrap(u,h);let p=c.doc.resolve(s-1).nodeBefore;return p&&p.type==t&&(0,o.Mn)(c.doc,s-1)&&(!r||r(i,p))&&c.join(s-1),c}))}function u(e,t,n=null){return new i(e,((e,r,o,i)=>{let s=e.doc.resolve(o),a=n instanceof Function?n(r):n;return s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),t)?e.tr.delete(o,i).setBlockType(o,o,t,a):null}))}},82696:function(e,t,n){"use strict";n.d(t,{$:function(){return p}});for(var r={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},o={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},i="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),s="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),a=0;a<10;a++)r[48+a]=r[96+a]=String(a);for(a=1;a<=24;a++)r[a+111]="F"+a;for(a=65;a<=90;a++)r[a]=String.fromCharCode(a+32),o[a]=String.fromCharCode(a);for(var l in r)o.hasOwnProperty(l)||(o[l]=r[l]);const c="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function u(e){let t,n,r,o,i=e.split(/-(?!$)/),s=i[i.length-1];"Space"==s&&(s=" ");for(let a=0;a<i.length-1;a++){let e=i[a];if(/^(cmd|meta|m)$/i.test(e))o=!0;else if(/^a(lt)?$/i.test(e))t=!0;else if(/^(c|ctrl|control)$/i.test(e))n=!0;else if(/^s(hift)?$/i.test(e))r=!0;else{if(!/^mod$/i.test(e))throw new Error("Unrecognized modifier name: "+e);c?o=!0:n=!0}}return t&&(s="Alt-"+s),n&&(s="Ctrl-"+s),o&&(s="Meta-"+s),r&&(s="Shift-"+s),s}
1function h(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function p(e){let t=function(e){let t=Object.create(null);for(let n in e)t[u(n)]=e[n];return t}(e);return function(e,n){let a,l=function(e){var t=!(i&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||s&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?o:r)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(n),c=t[h(l,n)];if(c&&c(e.state,e.dispatch,e))return!0;if(1==l.length&&" "!=l){if(n.shiftKey){let r=t[h(l,n,!1)];if(r&&r(e.state,e.dispatch,e))return!0}if((n.shiftKey||n.altKey||n.metaKey||l.charCodeAt(0)>127)&&(a=r[n.keyCode])&&a!=l){let r=t[h(a,n)];if(r&&r(e.state,e.dispatch,e))return!0}}return!1}}},12806:function(e,t,n){"use strict";function r(e){this.content=e}n.d(t,{aw:function(){return X},PW:function(){return ae},HY:function(){return a},vc:function(){return h},ZU:function(){return K},NB:function(){return N},Ts:function(){return T},Jq:function(){return q},e4:function(){return p},ZQ:function(){return M},V_:function(){return Y},p2:function(){return d}}),r.prototype={constructor:r,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return-1==t?void 0:this.content[t+1]},update:function(e,t,n){var o=n&&n!=e?this.remove(n):this,i=o.find(e),s=o.content.slice();return-1==i?s.push(n||e,t):(s[i+1]=t,n&&(s[i]=n)),new r(s)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new r(n)},addToStart:function(e,t){return new r([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new r(n)},addBefore:function(e,t,n){var o=this.remove(t),i=o.content.slice(),s=o.find(e);return i.splice(-1==s?i.length:s,0,t,n),new r(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=r.from(e)).size?new r(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=r.from(e)).size?new r(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=r.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach((function(t,n){e[t]=n})),e},get size(){return this.content.length>>1}},r.from=function(e){if(e instanceof r)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new r(t)};var o=r;function i(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),s=t.child(r);if(o!=s){if(!o.sameMarkup(s))return n;if(o.isText&&o.text!=s.text){for(let e=0;o.text[e]==s.text[e];e++)n++;return n}if(o.content.size||s.content.size){let e=i(o.content,s.content,n+1);if(null!=e)return e}n+=o.nodeSize}else n+=o.nodeSize}}function s(e,t,n,r){for(let o=e.childCount,i=t.childCount;;){if(0==o||0==i)return o==i?null:{a:n,b:r};let a=e.child(--o),l=t.child(--i),c=a.nodeSize;if(a!=l){if(!a.sameMarkup(l))return{a:n,b:r};if(a.isText&&a.text!=l.text){let e=0,t=Math.min(a.text.length,l.text.length);for(;e<t&&a.text[a.text.length-e-1]==l.text[l.text.length-e-1];)e++,n--,r--;return{a:n,b:r}}if(a.content.size||l.content.size){let e=s(a.content,l.content,n-1,r-1);if(e)return e}n-=c,r-=c}else n-=c,r-=c}}class a{constructor(e,t){if(this.content=e,this.size=t||0,null==t)for(let n=0;n<e.length;n++)this.size+=e[n].nodeSize}nodesBetween(e,t,n,r=0,o){for(let i=0,s=0;s<t;i++){let a=this.content[i],l=s+a.nodeSize;if(l>e&&!1!==n(a,r+s,o||null,i)&&a.content.size){let o=s+1;a.nodesBetween(Math.max(0,e-o),Math.min(a.content.size,t-o),n,r+o)}s=l}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let o="",i=!0;return this.nodesBetween(e,t,((s,a)=>{s.isText?(o+=s.text.slice(Math.max(e,a)-a,t-a),i=!n):s.isLeaf?(r?o+="function"===typeof r?r(s):r:s.type.spec.leafText&&(o+=s.type.spec.leafText(s)),i=!n):!i&&s.isBlock&&(o+=n,i=!0)}),0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),o=1);o<e.content.length;o++)r.push(e.content[o]);return new a(r,this.size+e.size)}cut(e,t=this.size){if(0==e&&t==this.size)return this;let n=[],r=0;if(t>e)for(let o=0,i=0;i<t;o++){let s=this.content[o],a=i+s.nodeSize;a>e&&((i<e||a>t)&&(s=s.isText?s.cut(Math.max(0,e-i),Math.min(s.text.length,t-i)):s.cut(Math.max(0,e-i-1),Math.min(s.content.size,t-i-1))),n.push(s),r+=s.nodeSize),i=a}return new a(n,r)}cutByIndex(e,t){return e==t?a.empty:0==e&&t==this.content.length?this:new a(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;
vendor: 3,714 bytes, line 1
1let r=this.content.slice(),o=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new a(r,o)}addToStart(e){return new a([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new a(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return i(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return s(this,e,t,n)}findIndex(e,t=-1){if(0==e)return c(0,e);if(e==this.size)return c(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=r+this.child(n).nodeSize;if(o>=e)return o==e||t>0?c(n+1,o):c(n,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map((e=>e.toJSON())):null}static fromJSON(e,t){if(!t)return a.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new a(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return a.empty;let t,n=0;for(let r=0;r<e.length;r++){let o=e[r];n+=o.nodeSize,r&&o.isText&&e[r-1].sameMarkup(o)?(t||(t=e.slice(0,r)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new a(t||e,n)}static from(e){if(!e)return a.empty;if(e instanceof a)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new a([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}a.empty=new a([],0);const l={index:0,offset:0};function c(e,t){return l.index=e,l.offset=t,l}function u(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!u(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!u(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}class h{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let o=e[r];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,r));else{if(o.type.excludes(this.type))return e;!n&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(o)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&u(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw new RangeError(`There is no mark type ${t.type} in this schema`);return n.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&0==e.length)return h.none;if(e instanceof h)return[e];let t=e.slice();return t.sort(((e,t)=>e.type.rank-t.type.rank)),t}}h.none=[];
1class p extends Error{}class d{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=m(this.content,e+this.openStart,t);return n&&new d(n,this.openStart,this.openEnd)}removeBetween(e,t){return new d(f(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return d.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new d(a.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)n++;for(let o=e.lastChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.lastChild)r++;return new d(e,n,r)}}function f(e,t,n){let{index:r,offset:o}=e.findIndex(t),i=e.maybeChild(r),{index:s,offset:a}=e.findIndex(n);if(o==t||i.isText){if(a!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,i.copy(f(i.content,t-o-1,n-o-1)))}function m(e,t,n,r){let{index:o,offset:i}=e.findIndex(t),s=e.maybeChild(o);if(i==t||s.isText)return r&&!r.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let a=m(s.content,t-i-1,n);return a&&e.replaceChild(o,s.copy(a))}function g(e,t,n){if(n.openStart>e.depth)throw new p("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new p("Inconsistent open depths");return v(e,t,n,0)}function v(e,t,n,r){let o=e.index(r),i=e.node(r);if(o==t.index(r)&&r<e.depth-n.openStart){let s=v(e,t,n,r+1);return i.copy(i.content.replaceChild(o,s))}if(n.content.size){if(n.openStart||n.openEnd||e.depth!=r||t.depth!=r){let{start:o,end:s}=function(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let o=n-1;o>=0;o--)r=t.node(o).copy(a.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(n,e);return b(i,S(e,o,s,t,r))}{let r=e.parent,o=r.content;return b(r,o.cut(0,e.parentOffset).append(n.content).append(o.cut(t.parentOffset)))}}return b(i,C(e,t,r))}function y(e,t){if(!t.type.compatibleContent(e.type))throw new p("Cannot join "+t.type.name+" onto "+e.type.name)}function k(e,t,n){let r=e.node(n);return y(r,t.node(n)),r}function w(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function x(e,t,n,r){let o=(t||e).node(n),i=0,s=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(w(e.nodeAfter,r),i++));for(let a=i;a<s;a++)w(o.child(a),r);t&&t.depth==n&&t.textOffset&&w(t.nodeBefore,r)}function b(e,t){return e.type.checkContent(t),e.copy(t)}function S(e,t,n,r,o){let i=e.depth>o&&k(e,t,o+1),s=r.depth>o&&k(n,r,o+1),l=[];return x(null,e,o,l),i&&s&&t.index(o)==n.index(o)?(y(i,s),w(b(i,S(e,t,n,r,o+1)),l)):(i&&w(b(i,C(e,t,o+1)),l),x(t,n,o,l),s&&w(b(s,C(n,r,o+1)),l)),x(r,null,o,l),new a(l)}function C(e,t,n){let r=[];if(x(null,e,n,r),e.depth>n){w(b(k(e,t,n+1),C(e,t,n+1)),r)}return x(t,null,n,r),new a(r)}d.empty=new d(a.empty,0,0);class M{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let o=0;o<e;o++)r+=n.child(o).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(0==e.content.size)return h.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let o=n.marks;for(var i=0;i<o.length;i++)!1!==o[i].type.spec.inclusive||r&&o[i].isInSet(r.marks)||(o=o[i--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new T(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let n=[],r=0,o=t;for(let i=e;;){let{index:e,offset:t}=i.content.findIndex(o),s=o-t;if(n.push(i,e,r+t),!s)break;if(i=i.child(e),i.isText)break;o=s-1,r+=t+1}return new M(t,n,o)}
1static resolveCached(e,t){for(let r=0;r<O.length;r++){let n=O[r];if(n.pos==t&&n.doc==e)return n}let n=O[E]=M.resolve(e,t);return E=(E+1)%A,n}}let O=[],E=0,A=12;class T{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const R=Object.create(null);class N{constructor(e,t,n,r=h.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||a.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&u(this.attrs,t||e.defaultAttrs||R)&&h.sameSet(this.marks,n||h.none)}copy(e=null){return e==this.content?this:new N(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new N(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return d.empty;let r=this.resolve(e),o=this.resolve(t),i=n?0:r.sharedDepth(t),s=r.start(i),a=r.node(i).content.cut(r.pos-s,o.pos-s);return new d(a,r.depth-i,o.depth-i)}replace(e,t,n){return g(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(0==e)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return M.resolveCached(this,e)}resolveNoCache(e){return M.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,(e=>(n.isInSet(e.marks)&&(r=!0),!r))),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),D(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=a.empty,r=0,o=n.childCount){let i=this.contentMatchAt(e).matchFragment(n,r,o),s=i&&i.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(let a=r;a<o;a++)if(!this.type.allowsMarks(n.child(a).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let o=this.contentMatchAt(e).matchType(n),i=o&&o.matchFragment(this.content,t);return!!i&&i.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content);let e=h.none;for(let t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!h.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((e=>
1e.type.name))}`);this.content.forEach((e=>e.check()))}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map((e=>e.toJSON()))),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let n=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=a.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}}N.prototype.text=void 0;class I extends N{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):D(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new I(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new I(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function D(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class _{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new L(e,t);if(null==n.next)return _.empty;let r=P(n);n.next&&n.err("Unexpected trailing text");let o=function(e){let t=Object.create(null);return n(H(e,0));function n(r){let o=[];r.forEach((t=>{e[t].forEach((({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e<o.length;e++)o[e][0]==t&&(r=o[e][1]);H(e,n).forEach((e=>{r||o.push([t,r=[]]),-1==r.indexOf(e)&&r.push(e)}))}))}));let i=t[r.join(",")]=new _(r.indexOf(e.length-1)>-1);for(let e=0;e<o.length;e++){let r=o[e][1].sort(j);i.next.push({type:o[e][0],next:t[r.join(",")]||n(r)})}return i}}(function(e){let t=[[]];return o(i(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let o={term:r,to:n};return t[e].push(o),o}function o(e,t){e.forEach((e=>e.to=t))}function i(e,t){if("choice"==e.type)return e.exprs.reduce(((e,n)=>e.concat(i(n,t))),[]);if("seq"!=e.type){if("star"==e.type){let s=n();return r(t,s),o(i(e.expr,s),s),[r(s)]}if("plus"==e.type){let s=n();return o(i(e.expr,t),s),o(i(e.expr,s),s),[r(s)]}if("opt"==e.type)return[r(t)].concat(i(e.expr,t));if("range"==e.type){let s=t;for(let t=0;t<e.min;t++){let t=n();o(i(e.expr,s),t),s=t}if(-1==e.max)o(i(e.expr,s),s);else for(let t=e.min;t<e.max;t++){let t=n();r(s,t),o(i(e.expr,s),t),s=t}return[r(s)]}if("name"==e.type)return[r(t,void 0,e.value)];throw new Error("Unknown expr type")}for(let r=0;;r++){let s=i(e.exprs[r],t);if(r==e.exprs.length-1)return s;o(s,t=n())}}}(r));return function(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],o=!e.validEnd,i=[];for(let t=0;t<e.next.length;t++){let{type:n,next:s}=e.next[t];i.push(n.name),!o||n.isText||n.hasRequiredAttrs()||(o=!1),-1==r.indexOf(s)&&r.push(s)}o&&t.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,n),o}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let o=t;r&&o<n;o++)r=r.matchType(e.child(o).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!t.isText&&!t.hasRequiredAttrs())return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];return function o(i,s){let l=i.matchFragment(e,n);if(l&&(!t||l.validEnd))return a.from(s.map((e=>e.createAndFill())));for(let e=0;e<i.next.length;e++){let{type:t,next:n}=i.next[e];if(!t.isText&&!t.hasRequiredAttrs()&&-1==r.indexOf(n)){r.push(n);let e=o(n,s.concat(t));if(e)return e}}return null}(this,[])}findWrapping(e){for(let n=0;n<this.wrapCache.length;n+=2)if(this.wrapCache[n]==e)return this.wrapCache[n+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),o=r.match;if(o.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<o.next.length;e++){let{type:i,next:s}=o.next[e];i.isLeaf||i.hasRequiredAttrs()||i.name in t||r.type&&!s.validEnd||(n.push({match:i.contentMatch,type:i,via:r}),t[i.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return function t(n){e.push(n);for(let r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map(((t,n)=>{let r=n+(t.validEnd?"*":" ")+" ";for(let o=0;o<t.next.length;o++)r+=(o?", ":"")+t.next[o].type.name+"->"+e.indexOf(t.next[o].next);return r})).join("\n")}}_.empty=new _(!0);class L{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?
1=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function P(e){let t=[];do{t.push($(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function $(e){let t=[];do{t.push(z(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function z(e){let t=function(e){if(e.eat("(")){let t=P(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){let t=function(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let o=[];for(let i in n){let e=n[i];e.groups.indexOf(t)>-1&&o.push(e)}0==o.length&&e.err("No node type or group '"+t+"' found");return o}(e,e.next).map((t=>(null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t})));return e.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}e.err("Unexpected token '"+e.next+"'")}(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=B(e,t)}return t}function F(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function B(e,t){let n=F(e),r=n;return e.eat(",")&&(r="}"!=e.next?F(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function j(e,t){return t-e}function H(e,t){let n=[];return function t(r){let o=e[r];if(1==o.length&&!o[0].term)return t(o[0].to);n.push(r);for(let e=0;e<o.length;e++){let{term:r,to:i}=o[e];r||-1!=n.indexOf(i)||t(i)}}(t),n.sort(j)}function W(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function J(e,t){let n=Object.create(null);for(let r in e){let o=t&&t[r];if(void 0===o){let t=e[r];if(!t.hasDefault)throw new RangeError("No value supplied for attribute "+r);o=t.default}n[r]=o}return n}function U(e){let t=Object.create(null);if(e)for(let n in e)t[n]=new V(e[n]);return t}class q{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=U(n.attrs),this.defaultAttrs=W(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==_.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:J(this.attrs,e)}create(e=null,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new N(this,this.computeAttrs(e),a.from(t),h.setFrom(n))}createChecked(e=null,t,n){return t=a.from(t),this.checkContent(t),new N(this,this.computeAttrs(e),t,h.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),(t=a.from(t)).size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),o=r&&r.fillBefore(a.empty,!0);return o?new N(this,e,t.append(o),h.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}allowsMarkType(e){return null==this.markSet||this.markSet.indexOf(e)>-1}allowsMarks(e){if(null==this.markSet)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(null==this.markSet)return e;let t;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:h.none:e}static compile(e,t){let n=Object.create(null);e.forEach(((e,r)=>n[e]=new q(e,t,r)));let r=t.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");
1if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let o in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}}class V{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class K{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=U(r.attrs),this.excluded=null;let o=W(this.attrs);this.instance=o?new h(this,o):null}create(e=null){return!e&&this.instance?this.instance:new h(this,J(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach(((e,o)=>n[e]=new K(e,r++,t,o))),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}}class Y{constructor(e){this.cached=Object.create(null);let t=this.spec={};for(let r in e)t[r]=e[r];t.nodes=o.from(e.nodes),t.marks=o.from(e.marks||{}),this.nodes=q.compile(this.spec.nodes,this),this.marks=K.compile(this.spec.marks,this);let n=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let e=this.nodes[r],t=e.spec.content||"",o=e.spec.marks;e.contentMatch=n[t]||(n[t]=_.parse(t,this.nodes)),e.inlineContent=e.contentMatch.inlineContent,e.markSet="_"==o?null:o?G(this,o.split(" ")):""!=o&&e.inlineContent?null:[]}for(let r in this.marks){let e=this.marks[r],t=e.spec.excludes;e.excluded=null==t?[e]:""==t?[]:G(this,t.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof q))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new I(n,n.defaultAttrs,e,h.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return N.fromJSON(this,e)}markFromJSON(e){return h.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function G(e,t){let n=[];for(let r=0;r<t.length;r++){let o=t[r],i=e.marks[o],s=i;if(i)n.push(i);else for(let t in e.marks){let r=e.marks[t];("_"==o||r.spec.group&&r.spec.group.split(" ").indexOf(o)>-1)&&n.push(s=r)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class X{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach((e=>{e.tag?this.tags.push(e):e.style&&this.styles.push(e)})),this.normalizeLists=!this.tags.some((t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)}))}parse(e,t={}){let n=new re(this,t,!1);return n.addAll(e,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new re(this,t,!0);return n.addAll(e,t.from,t.to),d.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(oe(e,n.tag)&&(void 0===n.namespace||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(!1===t)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){let r=this.styles[o],i=r.style;if(!(0!=i.indexOf(e)||r.context&&!n.matchesContext(r.context)||i.length>e.length&&(61!=i.charCodeAt(e.length)||i.slice(e.length+1)!=t))){if(r.getAttrs){let e=r.getAttrs(t);if(!1===e)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=null==e.priority?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((null==e.priority?50:e.priority)<n)break}t.splice(r,0,e)}for(let r in e.marks){let t=e.marks[r].spec.parseDOM;t&&t.forEach((e=>{n(e=ie(e)),e.mark||e.ignore||e.clearMark||(e.mark=r)}))}for(let r in e.nodes){let t=e.nodes[r].spec.parseDOM;t&&t.forEach((e=>{n(e=ie(e)),e.node||e.ignore||e.mark||(e.node=r)}))}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new X(e,X.schemaRules(e)))}}const Z={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Q={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},ee={ol:!0,ul:!0};function te(e,t,n){return null!=t?(t?1:0)|("full"===t?2:0):e&&"pre"==e.whitespace?3:-5&n}class ne{constructor(e,t,n,r,o,i,s){this.type=e,this.attrs=t,this.marks=n,this.pendingMarks=r,this.solid=o,this.options=s,this.content=[],this.activeMarks=h.none,this.stashMarks=[],this.match=i||(4&s?null:e.contentMatch)}
1findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(a.from(e));if(!t){let t,n=this.type.contentMatch;return(t=n.findWrapping(e.type))?(this.match=n,t):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let e,t=this.content[this.content.length-1];if(t&&t.isText&&(e=/[ \t\r\n\u000c]+$/.exec(t.text))){let n=t;t.text.length==e[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-e[0].length))}}let t=a.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(a.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,n=this.pendingMarks;t<n.length;t++){let r=n[t];(this.type?this.type.allowsMarkType(r.type):se(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Z.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class re{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0;let r,o=t.topNode,i=te(null,t.preserveWhitespace,0)|(n?4:0);r=o?new ne(o.type,o.attrs,h.none,h.none,!0,t.topMatch||o.type.contentMatch,i):new ne(n?null:e.schema.topNodeType,null,h.none,h.none,!0,null,i),this.nodes=[r],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e){3==e.nodeType?this.addTextNode(e):1==e.nodeType&&this.addElement(e)}withStyleRules(e,t){let n=e.getAttribute("style");if(!n)return t();let r=this.readStyles(function(e){let t,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;t=n.exec(e);)r.push(t[1],t[2].trim());return r}(n));if(!r)return;let[o,i]=r,s=this.top;for(let a=0;a<i.length;a++)this.removePendingMark(i[a],s);for(let a=0;a<o.length;a++)this.addPendingMark(o[a]);t();for(let a=0;a<o.length;a++)this.removePendingMark(o[a],s);for(let a=0;a<i.length;a++)this.addPendingMark(i[a])}addTextNode(e){let t=e.nodeValue,n=this.top;if(2&n.options||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(1&n.options)t=2&n.options?t.replace(/\r\n?/g,"\n"):t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){let r=n.content[n.content.length-1],o=e.previousSibling;(!r||o&&"BR"==o.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}addElement(e,t){let n,r=e.nodeName.toLowerCase();ee.hasOwnProperty(r)&&this.parser.normalizeLists&&function(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=1==t.nodeType?t.nodeName.toLowerCase():null;e&&ee.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}(e);let o=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(n=this.parser.matchTag(e,this,t));if(o?o.ignore:Q.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(e=o.skip);let t,n=this.top,i=this.needsBlock;if(Z.hasOwnProperty(r))n.content.length&&n.content[0].isInline&&this.open&&(this.open--,n=this.top),t=!0,n.type||(this.needsBlock=!0);else if(!e.firstChild)return void this.leafFallback(e);o&&o.skip?this.addAll(e):this.withStyleRules(e,(()=>this.addAll(e))),t&&this.sync(n),this.needsBlock=i}else this.withStyleRules(e,(()=>{this.addElementByRule(e,o,!1===o.consuming?n:void 0)}))}leafFallback(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"))}ignoreFallback(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}readStyles(e){let t=h.none,n=h.none;for(let r=0;r<e.length;r+=2)for(let o;;){let i=this.parser.matchStyle(e[r],e[r+1],this,o);if(!i)break;if(i.ignore)return null;if(i.clearMark?this.top.pendingMarks.concat(this.top.activeMarks).forEac
1h((e=>{i.clearMark(e)&&(n=e.addToSet(n))})):t=this.parser.schema.marks[i.mark].create(i.attrs).addToSet(t),!1!==i.consuming)break;o=i}return[t,n]}addElementByRule(e,t,n){let r,o,i;if(t.node)o=this.parser.schema.nodes[t.node],o.isLeaf?this.insertNode(o.create(t.attrs))||this.leafFallback(e):r=this.enter(o,t.attrs||null,t.preserveWhitespace);else{i=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(i)}let s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(n)this.addElement(e,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((e=>this.insertNode(e)));else{let n=e;"string"==typeof t.contentElement?n=e.querySelector(t.contentElement):"function"==typeof t.contentElement?n=t.contentElement(e):t.contentElement&&(n=t.contentElement),this.findAround(e,n,!0),this.addAll(n)}r&&this.sync(s)&&this.open--,i&&this.removePendingMark(i,s)}addAll(e,t,n){let r=t||0;for(let o=t?e.childNodes[t]:e.firstChild,i=null==n?null:e.childNodes[n];o!=i;o=o.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(o);this.findAtPoint(e,r)}findPlace(e){let t,n;for(let r=this.open;r>=0;r--){let o=this.nodes[r],i=o.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,n=o,!i.length))break;if(o.solid)break}if(!t)return!1;this.sync(n);for(let r=0;r<t.length;r++)this.enterInner(t[r],null,!1);return!0}insertNode(e){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&this.enterInner(e)}if(this.findPlace(e)){this.closeExtra();let t=this.top;t.applyPending(e.type),t.match&&(t.match=t.match.matchType(e.type));let n=t.activeMarks;for(let r=0;r<e.marks.length;r++)t.type&&!t.type.allowsMarkType(e.marks[r].type)||(n=e.marks[r].addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n){let r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r}enterInner(e,t=null,n=!1,r){this.closeExtra();let o=this.top;o.applyPending(e),o.match=o.match&&o.match.matchType(e);let i=te(e,r,o.options);4&o.options&&0==o.content.length&&(i|=4),this.nodes.push(new ne(e,t,o.activeMarks,o.pendingMarks,n,null,i)),this.open++}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)if(null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node)){t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),o=-(n?n.depth+1:0)+(r?0:1),i=(e,s)=>{for(;e>=0;e--){let a=t[e];if(""==a){if(e==t.length-1||0==e)continue;for(;s>=o;s--)if(i(e-1,s))return!0;return!1}{let e=s>0||0==s&&r?this.nodes[s].type:n&&s>=o?n.node(s-o).type:null;if(!e||e.name!=a&&-1==e.groups.indexOf(a))return!1;s--}}return!0};return i(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let t in this.parser.schema.nodes){let e=this.parser.schema.nodes[t];
1if(e.isTextblock&&e.defaultAttrs)return e}}addPendingMark(e){let t=function(e,t){for(let n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,t){for(let n=this.open;n>=0;n--){let r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);let t=r.popFromStashMark(e);t&&r.type&&r.type.allowsMarkType(t.type)&&(r.activeMarks=t.addToSet(r.activeMarks))}if(r==t)break}}}function oe(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function ie(e){let t={};for(let n in e)t[n]=e[n];return t}function se(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let i=[],s=e=>{i.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:o}=e.edge(n);if(r==t)return!0;if(i.indexOf(o)<0&&s(o))return!0}};if(s(o.contentMatch))return!0}}class ae{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=ce(t).createDocumentFragment());let r=n,o=[];return e.forEach((e=>{if(o.length||e.marks.length){let n=0,i=0;for(;n<o.length&&i<e.marks.length;){let t=e.marks[i];if(this.marks[t.type.name]){if(!t.eq(o[n][0])||!1===t.type.spec.spanning)break;n++,i++}else i++}for(;n<o.length;)r=o.pop()[1];for(;i<e.marks.length;){let n=e.marks[i++],s=this.serializeMark(n,e.isInline,t);s&&(o.push([n,r]),r.appendChild(s.dom),r=s.contentDOM||s.dom)}}r.appendChild(this.serializeNodeInner(e,t))})),n}serializeNodeInner(e,t){let{dom:n,contentDOM:r}=ae.renderSpec(ce(t),this.nodes[e.type.name](e));if(r){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&ae.renderSpec(ce(n),r(e,t))}static renderSpec(e,t,n=null){if("string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;let r,o=t[0],i=o.indexOf(" ");i>0&&(n=o.slice(0,i),o=o.slice(i+1));let s=n?e.createElementNS(n,o):e.createElement(o),a=t[1],l=1;if(a&&"object"==typeof a&&null==a.nodeType&&!Array.isArray(a)){l=2;for(let e in a)if(null!=a[e]){let t=e.indexOf(" ");t>0?s.setAttributeNS(e.slice(0,t),e.slice(t+1),a[e]):s.setAttribute(e,a[e])}}for(let c=l;c<t.length;c++){let o=t[c];if(0===o){if(c<t.length-1||c>l)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}{let{dom:t,contentDOM:i}=ae.renderSpec(e,o,n);if(s.appendChild(t),i){if(r)throw new RangeError("Multiple content holes");r=i}}}return{dom:s,contentDOM:r}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new ae(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=le(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return le(e.marks)}}function le(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function ce(e){return e.document||window.document}},69400:function(e,t,n){"use strict";n.d(t,{N:function(){return a}});var r=n(12806),o=n(2376),i=n(378),s=n(57555);function a(e){const t=(0,s.DY)(e,((e,t)=>(t.priority??i.xV.Low)-(e.priority??i.xV.Low))),n=[],a=[];for(const r of t)m(r)?n.push(r):a.push(r);let c;return new o.Sy({key:l,view:e=>(c=e,{}),props:{transformPasted:e=>{var t,o,i;const a=c.state.selection.$from,l=a.node().type.name,u=new Set(a.marks().map((e=>e.type.name)));for(const h of n){if((null==(t=h.ignoredNodes)?void 0:t.includes(l))||(null==(o=h.ignoredMarks)?void 0:o.some((e=>u.has(e)))))continue;const n=(null==(i=e.content.firstChild)?void 0:i.textContent)??"",a=!c.state.selection.empty&&1===e.content.childCount&&n,p=(0,s.JD)(n,h.regexp)[0];if(a&&p&&"mark"===h.type&&h.replaceSelection){const{from:e,to:t}=c.state.selection,n=c.state.doc.slice(e,t),o=n.content.textBetween(0,n.content.size);if("boolean"!==typeof h.replaceSelection?h.replaceSelection(o):h.replaceSelection){const e=[],{getAttributes:t,markType:o}=h,i=(0,s.mf)(t)?t(p,!0):t,a=o.create(i);return n.content.forEach((t=>{if(t.isText){const n=a.addToSet(t.marks);e.push(t.mark(n))}})),r.p2.maxOpen(r.HY.fromArray(e))}}const{nodes:f,transformed:m}=d(e.content,h,c.state.schema);m&&(e="node"===h.type&&h.nodeType.isBlock?new r.p2(r.HY.fromArray(f),0,0):new r.p2(r.HY.fromArray(f),e.openStart,e.openEnd))}return function(e){const t=r.p2.maxOpen(e.content);
1return t.openStart<e.openStart||t.openEnd<e.openEnd?t:e}(e)},handleDOMEvents:{paste:(e,t)=>{var n,r;const o=t;if(!(null==(r=(n=e.props).editable)?void 0:r.call(n,e.state)))return!1;const{clipboardData:i}=o;if(!i)return!1;const s=[...i.items].map((e=>e.getAsFile())).filter((e=>!!e));if(0===s.length)return!1;const{selection:l}=e.state;for(const{fileHandler:c,regexp:u}of a){const t=u?s.filter((e=>u.test(e.type))):s;if(0!==t.length&&c({event:o,files:t,selection:l,view:e,type:"paste"}))return o.preventDefault(),!0}return!1},drop:(e,t)=>{var n,r,o;const i=t;if(!(null==(r=(n=e.props).editable)?void 0:r.call(n,e.state)))return!1;const{dataTransfer:s,clientX:l,clientY:c}=i;if(!s)return!1;const u=function(e){var t,n;const{dataTransfer:r}=e;if(!r)return[];if((null==(t=r.files)?void 0:t.length)>0)return[...r.files];if(null==(n=r.items)?void 0:n.length)return[...r.items].map((e=>e.getAsFile())).filter((e=>!!e));return[]}(i);if(0===u.length)return!1;const h=(null==(o=e.posAtCoords({left:l,top:c}))?void 0:o.pos)??e.state.selection.anchor;for(const{fileHandler:p,regexp:d}of a){const t=d?u.filter((e=>d.test(e.type))):u;if(0!==t.length&&p({event:i,files:t,pos:h,view:e,type:"drop"}))return i.preventDefault(),!0}return!1}}}})}var l=new o.H$("pasteRule");function c(e,t){return function n(o){const{fragment:i,rule:a,nodes:l}=o,{regexp:c,ignoreWhitespace:u,ignoredMarks:h,ignoredNodes:p}=a;let d=!1;return i.forEach((o=>{if((null==p?void 0:p.includes(o.type.name))||g(o))return void l.push(o);if(!o.isText){const e=n({fragment:o.content,rule:a,nodes:[]});d||(d=e.transformed);const t=r.HY.fromArray(e.nodes);return void(o.type.validContent(t)?l.push(o.copy(t)):l.push(...e.nodes))}if(o.marks.some((e=>v(e)||(null==h?void 0:h.includes(e.type.name)))))return void l.push(o);const i=o.text??"";let f=0;for(const n of(0,s.JD)(i,c)){const r=n[1],i=n[0];if(u&&""===(null==r?void 0:r.trim())||!i)return;const s=n.index,c=s+i.length;s>f&&l.push(o.cut(f,s));let h=o.cut(s,c);if(i&&r){const e=i.search(/\S/),t=s+i.indexOf(r),n=t+r.length;e&&l.push(o.cut(s,s+e)),h=o.cut(t,n)}e({nodes:l,rule:a,textNode:h,match:n,schema:t}),d=!0,f=c}i&&f<i.length&&l.push(o.cut(f))})),{nodes:l,transformed:d}}}function u(e){const{nodes:t,rule:n,textNode:r,match:o,schema:i}=e,{transformMatch:a,getAttributes:l,markType:c}=n,u=(0,s.mf)(l)?l(o,!1):l,h=r.text??"",p=c.create(u),d=null==a?void 0:a(o);if(""===d)return;if(!1===d)return void t.push(i.text(h,r.marks));const f=p.addToSet(r.marks);t.push(i.text(d??h,f))}function h(e){const{nodes:t,rule:n,textNode:r,match:o,schema:i}=e,{transformMatch:s}=n,a=null==s?void 0:s(o);if(""===a||!1===a)return;const l=a??r.text??"";t.push(i.text(l,r.marks))}function p(e){const{nodes:t,rule:n,textNode:r,match:o}=e,{getAttributes:i,nodeType:a,getContent:l}=n,c=(0,s.mf)(i)?i(o,!1):i,u=(l?l(o):r)||void 0;t.push(a.createChecked(c,u))}function d(e,t,n){const r=[];switch(t.type){case"mark":return c(u,n)({fragment:e,nodes:r,rule:t});case"node":return c(p,n)({fragment:e,nodes:r,rule:t});default:return c(h,n)({fragment:e,nodes:r,rule:t})}}
1var f=["mark","node","text"];function m(e){return(0,s.q9)(f,e.type)}function g(e){var t;return e.type.spec.code||(null==(t=e.type.spec.group)?void 0:t.split(" ").includes("code"))}function v(e){var t;return"code"===e.type.name||(null==(t=e.type.spec.group)?void 0:t.split(" ").includes("code"))}},2376:function(e,t,n){"use strict";n.d(t,{Bs:function(){return u},C1:function(){return f},H$:function(){return A},Sy:function(){return M},Y1:function(){return s},qv:function(){return p},yy:function(){return S}});var r=n(12806),o=n(16560);const i=Object.create(null);class s{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new a(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=r.p2.empty){let n=t.content.lastChild,o=null;for(let r=0;r<t.openEnd;r++)o=n,n=n.lastChild;let i=e.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:l,$to:c}=s[a],u=e.mapping.slice(i);e.replaceRange(u.map(l.pos),u.map(c.pos),a?r.p2.empty:t),0==a&&v(e,i,(n?n.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){let{$from:i,$to:s}=r[o],a=e.mapping.slice(n),l=a.map(i.pos),c=a.map(s.pos);o?e.deleteRange(l,c):(e.replaceRangeWith(l,c,t),v(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new u(e):g(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let o=e.depth-1;o>=0;o--){let r=t<0?g(e.node(0),e.node(o),e.before(o+1),e.index(o),t,n):g(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,n);if(r)return r}return null}
1static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new f(e.node(0))}static atStart(e){return g(e,e,0,0,1)||new f(e)}static atEnd(e){return g(e,e,e.content.size,e.childCount,-1)||new f(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=i[t.type];if(!n)throw new RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in i)throw new RangeError("Duplicate use of selection JSON ID "+e);return i[e]=t,t.prototype.jsonID=e,t}getBookmark(){return u.between(this.$anchor,this.$head).getBookmark()}}s.prototype.visible=!0;class a{constructor(e,t){this.$from=e,this.$to=t}}let l=!1;function c(e){l||e.parent.inlineContent||(l=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class u extends s{constructor(e,t=e){c(e),c(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return s.near(n);let r=e.resolve(t.map(this.anchor));return new u(r.parent.inlineContent?r:n,n)}replace(e,t=r.p2.empty){if(super.replace(e,t),t==r.p2.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof u&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new h(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new u(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if(n&&!r||(n=r>=0?1:-1),!t.parent.inlineContent){let e=s.findFrom(t,n,!0)||s.findFrom(t,-n,!0);if(!e)return s.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r||(e=(s.findFrom(e,-n,!0)||s.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0)&&(e=t),new u(e,t)}}s.jsonID("text",u);class h{constructor(e,t){this.anchor=e,this.head=t}map(e){return new h(e.map(this.anchor),e.map(this.head))}resolve(e){return u.between(e.resolve(this.anchor),e.resolve(this.head))}}class p extends s{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),o=e.resolve(r);return n?s.near(o):new p(o)}content(){return new r.p2(r.HY.from(this.node),0,0)}eq(e){return e instanceof p&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new d(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new p(e.resolve(t.anchor))}static create(e,t){return new p(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}p.prototype.visible=!1,s.jsonID("node",p);class d{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new h(n,n):new d(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&p.isSelectable(n)?new p(t):s.near(t)}}class f extends s{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=r.p2.empty){if(t==r.p2.empty){e.delete(0,e.doc.content.size);let t=s.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new f(e)}map(e){return new f(e)}eq(e){return e instanceof f}getBookmark(){return m}}s.jsonID("all",f);const m={map(){return this},resolve:e=>new f(e)};function g(e,t,n,r,o,i=!1){if(t.inlineContent)return u.create(e,n);for(let s=r-(o>0?0:1);o>0?s<t.childCount:s>=0;s+=o){let r=t.child(s);if(r.isAtom){if(!i&&p.isSelectable(r))return p.create(e,n-(o<0?r.nodeSize:0))}else{let t=g(e,r,n+o,o<0?r.childCount:0,o,i);if(t)return t}n+=r.nodeSize*o}return null}function v(e,t,n){let r=e.steps.length-1;if(r<t)return;let i,a=e.steps[r];(a instanceof o.Pu||a instanceof o.FC)&&(e.mapping.maps[r].forEach(((e,t,n,r)=>{null==i&&(i=r)})),e.setSelection(s.near(e.doc.resolve(i),n)))}class y extends o.wx{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return r.vc.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(e,t){super.addStep(e,t),this.updated=-3&this.updated,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.vc.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(null==n&&(n=t),n=null==n?t:n,!e)return this.deleteRange(t,n);let o=this.storedMarks;if(!o){let e=this.doc.resolve(t);o=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,o)),this.selection.empty||this.setSelection(s.near(this.selection.$to)),this}}setMeta(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}getMeta(e){return this.meta["string"==typeof e?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function k(e,t){return t&&e?e.bind(t):e}class w{constructor(e,t,n){this.name=e,this.init=k(t.init,n),this.apply=k(t.apply,n)}}const x=[new w("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new w("selection",{init:(e,t)=>
1e.selection||s.atStart(t.doc),apply:e=>e.selection}),new w("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new w("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class b{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=x.slice(),t&&t.forEach((e=>{if(this.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new w(e.key,e.spec.state,e))}))}}class S{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let t=this.config.plugins[n];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let o=!1;for(let i=0;i<this.config.plugins.length;i++){let s=this.config.plugins[i];if(s.spec.appendTransaction){let a=r?r[i].n:0,l=r?r[i].state:this,c=a<t.length&&s.spec.appendTransaction.call(s,a?t.slice(a):t,l,n);if(c&&n.filterTransaction(c,i)){if(c.setMeta("appendedTransaction",e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<i?{state:n,n:t.length}:{state:this,n:0})}t.push(c),n=n.applyInner(c),o=!0}r&&(r[i]={state:n,n:t.length})}}if(!o)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new S(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let o=n[r];t[o.name]=o.apply(e,this[o.name],this,t)}return t}get tr(){return new y(this)}static create(e){let t=new b(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new S(t);for(let r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n}reconfigure(e){let t=new b(this.schema,e.plugins),n=t.fields,r=new S(t);for(let o=0;o<n.length;o++){let t=n[o].name;r[t]=this.hasOwnProperty(t)?this[t]:n[o].init(e,r)}return r}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map((e=>e.toJSON()))),e&&"object"==typeof e)for(let n in e){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],o=r.spec.state;o&&o.toJSON&&(t[n]=o.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,n){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let o=new b(e.schema,e.plugins),i=new S(o);return o.fields.forEach((o=>{if("doc"==o.name)i.doc=r.NB.fromJSON(e.schema,t.doc);else if("selection"==o.name)i.selection=s.fromJSON(i.doc,t.selection);else if("storedMarks"==o.name)t.storedMarks&&(i.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let r in n){let s=n[r],a=s.spec.state;if(s.key==o.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(t,r))return void(i[o.name]=a.fromJSON.call(s,e,t[r],i))}i[o.name]=o.init(e,i)}})),i}}function C(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):"handleDOMEvents"==r&&(o=C(o,t,{})),n[r]=o}return n}class M{constructor(e){this.spec=e,this.props={},e.props&&C(e.props,this,this.props),this.key=e.key?e.key.key:E("plugin")}getState(e){return e[this.key]}}const O=Object.create(null);function E(e){return e in O?e+"$"+ ++O[e]:(O[e]=0,e+"$")}class A{constructor(e="key"){this.key=E(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}},84799:function(e,t,n){"use strict";n.d(t,{C$:function(){return q},D7:function(){return V},Ek:function(){return J},gn:function(){return U},hu:function(){return W},j4:function(){return S}});var r=n(2376),o=n(84348),i=n(57555),s=n(63150),a=n(378),l=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},c=(e,t,n)=>(l(e,t,"read from private field"),n?n.call(e):t.get(e)),u=(e,t,n
1)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},h=(e,t,n,r)=>(l(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var p=["jump-backward-exit","jump-forward-exit"],d=["jump-backward-change","jump-forward-change"];function f(e){return!!(e&&e.query.full.length>=e.suggester.matchOffset)}function m(e){return(0,i.Kn)(e)&&e instanceof r.Bs}function g(e){const{match:t,changeReason:n,exitReason:r}=e;return{...t,changeReason:n,exitReason:r}}function v(e){const{text:t,regexp:n,$pos:r,suggester:o}=e,s=r.start();let l;return(0,i.JD)(t,n).forEach((e=>{if(function(e,t){const{invalidPrefixCharacters:n,validPrefixCharacters:r}=t;if(n)return!new RegExp(E(n)).test(e);return new RegExp(E(r)).test(e)}(e.input.slice(Math.max(0,e.index-1),e.index),o)){const t=e.index+s,n=e[0],c=e[1];if(!(0,i.HD)(n)||!(0,i.HD)(c))return;const u=t+n.length,h=Math.min(u,r.pos),p=h-t;t<r.pos&&u>=r.pos&&(l={range:{from:t,to:u,cursor:h},match:e,query:{partial:n.slice(c.length,p),full:n.slice(c.length)},text:{partial:n.slice(0,p),full:n},textAfter:r.doc.textBetween(u,r.end(),a.Vp,a.Vp),textBefore:r.doc.textBetween(s,t,a.Vp,a.Vp),suggester:o})}})),l}function y(e){const{$pos:t,suggester:n}=e,{char:r,name:o,startOfLine:l,supportedCharacters:c,matchOffset:u,multiline:h,caseInsensitive:p,unicode:d}=n,f=function(e){const{char:t,matchOffset:n,startOfLine:r,supportedCharacters:o,captureChar:a=!0,caseInsensitive:l=!1,multiline:c=!1,unicode:u=!1}=e,h=`g${c?"m":""}${l?"i":""}${u?"u":""}`;let p=function(e){return(0,i.HD)(e)?new RegExp(s(e)):e}(t).source;a&&(p=`(${p})`);return new RegExp(`${d=r,d?"^":""}${p}${function(e,t){return`(?:${E(e)}){${t},}`}(o,n)}`,h);var d}({char:r,matchOffset:u,startOfLine:l,supportedCharacters:c,multiline:h,caseInsensitive:p,unicode:d});return v({suggester:n,text:t.doc.textBetween(t.before(),t.end(),a.Vp,a.Vp),regexp:f,$pos:t,char:r,name:o})}function k(e){const{state:t,match:n}=e;try{return y({$pos:t.doc.resolve(n.range.cursor),suggester:n.suggester})}catch{return}}function w(e){const{prev:t,next:n,state:r}=e;return!n&&t.range.from>=r.doc.nodeSize?{exit:g({match:t,exitReason:"delete"})}:n&&t.query.partial?t.range.to===n.range.cursor?{exit:g({match:n,exitReason:"exit-end"})}:t.query.partial?{exit:g({match:n,exitReason:"exit-split"})}:{}:{exit:g({match:t,exitReason:"invalid-exit-split"})}}function x(e){const{prev:t,next:n,state:r,$pos:o}=e,s=(0,i.Ry)();if(!t&&!n)return s;const a={prev:t,next:n};return function(e){return!(!e.prev||!e.next||e.prev.range.from===e.next.range.from)}(a)?function(e){const{prev:t,next:n,state:r}=e,o=(0,i.Ry)(),s=k({state:r,match:t}),{exit:a}=s&&s.query.full!==t.query.full?w({prev:t,next:s,state:r}):o;return t.range.from<n.range.from?{exit:a??g({match:t,exitReason:"jump-forward-exit"}),change:g({match:n,changeReason:"jump-forward-change"})}:{exit:a??g({match:t,exitReason:"jump-backward-exit"}),change:g({match:n,changeReason:"jump-backward-change"})}}({prev:a.prev,next:a.next,state:r}):function(e){return!(e.prev||!e.next)}(a)?{change:g({match:a.next,changeReason:"start"})}:function(e){return!(!e.prev||e.next)}(a)?function(e){const{match:t,state:n,$pos:r}=e,{selection:o}=n,i=k({match:t,state:n});return i&&i.text.full===t.text.full?!o.empty&&(o.from<=t.range.from||o.to>=t.range.to)?{exit:g({match:t,exitReason:"selection-outside"})}:r.pos>t.range.to?{exit:g({match:t,exitReason:"move-end"})}:r.pos<=t.range.from?{exit:g({match:t,exitReason:"move-start"})}:{}:w({prev:t,next:i,state:n})}({$pos:o,match:a.prev,state:r}):function(e){return!(!e.prev||!e.next||e.prev.text.full===e.next.text.full)}(a)?{change:g({match:a.next,changeReason:"change-character"})}:function(e){return!(!e.prev||!e.next||e.prev.range.cursor===e.next.range.cursor)}(a)?{change:g({match:a.next,changeReason:r.selection.empty?"move":"selection-inside"})}:s}function b(e,t){for(let n=e.depth;n>0;n--){const r=e.node(n);if(t.includes(r.type.name))return!0}return!1}function S(e,t){const{$from:n,$to:r}=e;return!!C(e,t)||(0,i.w6)(n.pos,r.pos).some((e=>function(e,t){const n=new Set(e.marks().map((e=>
1e.type.name)));return t.some((e=>n.has(e)))}(n.doc.resolve(e),t)))}function C(e,t){const{$from:n,$to:r}=e,o=new Set((n.marksAcross(r)??[]).map((e=>e.type.name)));return t.some((e=>o.has(e)))}function M(e,t){const{$cursor:n}=t,{validMarks:r,validNodes:o,invalidMarks:s,invalidNodes:a}=e;return!(r||o||!(0,i.yD)(s)||!(0,i.yD)(a))||!(r&&!C(t,r))&&(!(o&&!b(n,o))&&(!(!r&&S(t,s))&&!(!o&&b(n,a))))}function O(e){const{suggesters:t,$pos:n,selectionEmpty:r}=e;for(const o of t)if(!o.emptySelectionsOnly||r)try{const e=y({suggester:o,$pos:n});if(!e)continue;const t={$from:n.doc.resolve(e.range.from),$to:n.doc.resolve(e.range.to),$cursor:n};if(M(o,t)&&o.isValidPosition(t,e))return e}catch{}}function E(e){return(0,i.Kj)(e)?e.source:e}var A,T,R,N,I,D,_,L,P,$={appendTransaction:!1,priority:50,ignoredTag:"span",matchOffset:0,disableDecorations:!1,startOfLine:!1,suggestClassName:"suggest",suggestTag:"span",supportedCharacters:/\w+/,validPrefixCharacters:/^[\s\0]?$/,invalidPrefixCharacters:null,ignoredClassName:null,invalidMarks:[],invalidNodes:[],validMarks:null,validNodes:null,isValidPosition:()=>!0,checkNextValidSelection:null,emptySelectionsOnly:!1,caseInsensitive:!1,multiline:!1,unicode:!1,captureChar:!0},z="__ignore_prosemirror_suggest_update__";var F=class{constructor(e){u(this,A,!1),u(this,T,!1),u(this,R,void 0),u(this,N,void 0),u(this,I,void 0),u(this,D,(0,i.Ry)()),u(this,_,o.EH.empty),u(this,L,!1),u(this,P,!1),this.setMarkRemoved=()=>{h(this,L,!0)},this.findNextTextSelection=e=>{const t=e.$from.doc,n=Math.min(t.nodeSize-2,e.to+1),o=t.resolve(n),i=r.Y1.findFrom(o,1,!0);if(m(i))return i},this.ignoreNextExit=()=>{h(this,T,!0)},this.addIgnored=({from:e,name:t,specific:n=!1})=>{const r=c(this,R).find((e=>e.name===t));if(!r)throw new Error(`No suggester exists for the name provided: ${t}`);const s=e+((0,i.HD)(r.char)?r.char.length:1),a=r.ignoredClassName?{class:r.ignoredClassName}:{}
1,l=o.p.inline(e,s,{nodeName:r.ignoredTag,...a},{name:t,specific:n,char:r.char});h(this,_,c(this,_).add(this.view.state.doc,[l]))},this.removeIgnored=({from:e,name:t})=>{const n=c(this,R).find((e=>e.name===t));if(!n)throw new Error(`No suggester exists for the name provided: ${t}`);const r=(0,i.HD)(n.char)?n.char.length:1,o=c(this,_).find(e,e+r)[0];o&&o.spec.name===t&&h(this,_,c(this,_).remove([o]))},this.clearIgnored=e=>{if(!e)return void h(this,_,o.EH.empty);const t=c(this,_).find().filter((({spec:t})=>t.name===e));h(this,_,c(this,_).remove(t))},this.findMatchAtPosition=(e,t)=>O({suggesters:t?c(this,R).filter((e=>e.name===t)):c(this,R),$pos:e,docChanged:!1,selectionEmpty:!0}),this.setLastChangeFromAppend=()=>{h(this,P,!0)};const t=j();h(this,R,e.map(t)),h(this,R,(0,i.DY)(c(this,R),((e,t)=>t.priority-e.priority)))}static create(e){return new F(e)}get decorationSet(){return c(this,_)}get removed(){return c(this,L)}get match(){return c(this,N)?c(this,N):c(this,I)&&c(this,D).exit?c(this,I):void 0}init(e){return this.view=e,this}createProps(e){const{name:t,char:n}=e.suggester;return{view:this.view,addIgnored:this.addIgnored,clearIgnored:this.clearIgnored,ignoreNextExit:this.ignoreNextExit,setMarkRemoved:this.setMarkRemoved,name:t,char:n,...e}}shouldRunExit(){return!c(this,T)||(h(this,T,!1),!1)}updateWithNextSelection(e){var t,n,r;const o=this.findNextTextSelection(e.selection);if(o)for(const i of c(this,R)){const s=null==(t=c(this,D).change)?void 0:t.suggester.name,a=null==(n=c(this,D).exit)?void 0:n.suggester.name;null==(r=i.checkNextValidSelection)||r.call(i,o.$from,e,{change:s,exit:a})}}changeHandler(e,t){const{change:n,exit:r}=c(this,D),o=this.match;if(!n&&!r||!f(o))return;const s=t===(null==r?void 0:r.suggester.appendTransaction)&&this.shouldRunExit(),a=t===(null==n?void 0:n.suggester.appendTransaction);if(s||a){if(n&&r&&function(e){var t,n;return(0,i.q9)(p,null==(t=e.exit)?void 0:t.exitReason)||(0,i.q9)(d,null==(n=e.change)?void 0:n.changeReason)}({change:n,exit:r})){const t=this.createProps(r),o=this.createProps(n);r.range.from,n.range.from;return s&&r.suggester.onChange(t,e),a&&n.suggester.onChange(o,e),void(s&&h(this,L,!1))}n&&a&&n.suggester.onChange(this.createProps(n),e),r&&s&&(r.suggester.onChange(this.createProps(r),e),h(this,L,!1),"invalid-exit-split"===r.exitReason&&h(this,D,(0,i.Ry)())
1)}}mapIgnoredDecorations(e){const t=c(this,_).map(e.mapping,e.doc),n=t.find().filter((({from:e,to:t,spec:n})=>t-e!==((0,i.HD)(n.char)?n.char.length:1)));h(this,_,t.remove(n))}shouldIgnoreMatch({range:e,suggester:{name:t}}){return c(this,_).find().some((({spec:n,from:r})=>r===e.from&&(!n.specific||n.name===t)))}resetState(){h(this,D,(0,i.Ry)()),h(this,N,void 0),h(this,L,!1),h(this,P,!1)}updateReasons(e){const{$pos:t,state:n}=e,r=c(this,A),o=c(this,R),i=n.selection.empty,s=m(n.selection)?O({suggesters:o,$pos:t,docChanged:r,selectionEmpty:i}):void 0;h(this,N,s&&this.shouldIgnoreMatch(s)?void 0:s),h(this,D,x({next:c(this,N),prev:c(this,I),state:n,$pos:t}))}addSuggester(e){const t=c(this,R).find((t=>t.name===e.name)),n=j();if(t)h(this,R,c(this,R).map((r=>r===t?n(e):r)));else{const t=[...c(this,R),n(e)];h(this,R,(0,i.DY)(t,((e,t)=>t.priority-e.priority)))}return()=>this.removeSuggester(e.name)}removeSuggester(e){const t=(0,i.HD)(e)?e:e.name;h(this,R,c(this,R).filter((e=>e.name!==t))),this.clearIgnored(t)}toJSON(){return this.match}apply(e){const{exit:t,change:n}=c(this,D);if(c(this,P)&&(h(this,P,!1),!(null==t?void 0:t.suggester.appendTransaction)&&!(null==n?void 0:n.suggester.appendTransaction)))return this;const{tr:r,state:o}=e,i=r.docChanged||r.selectionSet;return r.getMeta(z)||!i&&!c(this,L)||(h(this,A,r.docChanged),this.mapIgnoredDecorations(r),t&&this.resetState(),h(this,I,c(this,N)),this.updateReasons({$pos:r.selection.$from,state:o})),this}createDecorations(e){const t=this.match;if(!f(t))return c(this,_);const{disableDecorations:n}=t.suggester;if((0,i.mf)(n)?n(e,t):n)return c(this,_);const{range:r,suggester:s}=t,{name:a,suggestTag:l,suggestClassName:u}=s,{from:h,to:p}=r;return this.shouldIgnoreMatch(t)?c(this,_):c(this,_).add(e.doc,[o.p.inline(h,p,{nodeName:l,class:a?`${u} suggest-${a}`:u},{name:a})])}},B=F;function j(){const e=new Set;return t=>{if(e.has(t.name))throw new Error(`A suggester already exists with the name '${t.name}'. The name provided must be unique.`);const n={...$,...t};return e.add(t.name),n}}A=new WeakMap,T=new WeakMap,R=new WeakMap,N=new WeakMap,I=new WeakMap,D=new WeakMap,_=new WeakMap,L=new WeakMap,P=new WeakMap;var H=new r.H$("suggest");function W(e){return H.getState(e)}function J(e,t){return W(e).addSuggester(t)}function U(e){e.setMeta(z,!0)}function q(e,t){return W(e).removeSuggester(t)}function V(...e){const t=B.create(e);return new r.Sy({key:H,view:e=>(t.init(e),{update:e=>t.changeHandler(e.state.tr,!1)}),state:{init:()=>t,apply:(e,n,r,o)=>t.apply({tr:e,state:o})},appendTransaction:(e,n,r)=>{const o=r.tr;return t.updateWithNextSelection(o),t.changeHandler(o,!0),o.docChanged||o.steps.length>0||o.selectionSet||o.storedMarksSet?(t.setLastChangeFromAppend(),o):null},props:{decorations:e=>t.createDecorations(e)}})}},16560:function(e,t,n){"use strict";n.d(t,{Ax:function(){return C},FC:function(){return y},Mn:function(){return M},Pu:function(){return v},WJ:function(){return d},Yo:function(){return E},dR:function(){return T},h8:function(){return u},k9:function(){return x},nd:function(){return b},nj:function(){return A},oo:function(){return h},vs:function(){return l},wx:function(){return H},xu:function(){return f}});var r=n(12806);const o=Math.pow(2,16);function i(e){return 65535&e}class s{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class a{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&a.empty)return a.empty}recover(e){let t=0,n=i(e);if(!this.inverted)for(let r=0;r<n;r++)t+=this.ranges[3*r+2]-this.ranges[3*r+1];return this.ranges[3*n]+t+function(e){return(e-(65535&e))/o}(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,i=this.inverted?2:1,a=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let c=this.ranges[l]-(this.inverted?r:0);if(c>e)break;let u=this.ranges[l+i],h=this.ranges[l+a],p=c+u;if(e<=p){let i=c+r+((u?e==c?-1:e==p?1:t:t)<0?0:h);if(n)return i;let a=e==(t<0?c:p)?null:l/3+(e-c)*o,d=e==c?2:e==p?1:4;return(t<0?e!=c:e!=p)&&(d|=8),new s(i,d,a)}r+=h-u}return n?e+r:new s(e+r,0,null)}touches(e,t){let n=0,r=i(t),o=this.inverted?2:1,s=this.inverted?1:2;
1for(let i=0;i<this.ranges.length;i+=3){let t=this.ranges[i]-(this.inverted?n:0);if(t>e)break;let a=this.ranges[i+o];if(e<=t+a&&i==3*r)return!0;n+=this.ranges[i+s]-a}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,o=0;r<this.ranges.length;r+=3){let i=this.ranges[r],s=i-(this.inverted?o:0),a=i+(this.inverted?0:o),l=this.ranges[r+t],c=this.ranges[r+n];e(s,s+l,a,a+c),o+=c-l}}invert(){return new a(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?a.empty:new a(e<0?[0,-e,0]:[0,0,e])}}a.empty=new a([]);class l{constructor(e=[],t,n=0,r=e.length){this.maps=e,this.mirror=t,this.from=n,this.to=r}slice(e=0,t=this.maps.length){return new l(this.maps,this.mirror,e,t)}copy(){return new l(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){this.to=this.maps.push(e),null!=t&&this.setMirror(this.maps.length-1,t)}appendMapping(e){for(let t=0,n=this.maps.length;t<e.maps.length;t++){let r=e.getMirror(t);this.appendMap(e.maps[t],null!=r&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror)for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this.maps.length+e.maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}invert(){let e=new l;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this.maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let o=this.from;o<this.to;o++){let n=this.maps[o].mapResult(e,t);if(null!=n.recover){let t=this.getMirror(o);if(null!=t&&t>o&&t<this.to){o=t,e=this.maps[t].recover(n.recover);continue}}r|=n.delInfo,e=n.pos}return n?e:new s(e,r,null)}}const c=Object.create(null);class u{getMap(){return a.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=c[t.stepType];if(!n)throw new RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in c)throw new RangeError("Duplicate use of step JSON ID "+e);return c[e]=t,t.prototype.jsonID=e,t}}class h{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new h(e,null)}static fail(e){return new h(null,e)}static fromReplace(e,t,n,o){try{return h.ok(e.replace(t,n,o))}catch(i){if(i instanceof r.e4)return h.fail(i.message);throw i}}}function p(e,t,n){let o=[];for(let r=0;r<e.childCount;r++){let i=e.child(r);i.content.size&&(i=i.copy(p(i.content,t,i))),i.isInline&&(i=t(i,n,r)),o.push(i)}return r.HY.fromArray(o)}class d extends u{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),o=n.node(n.sharedDepth(this.to)),i=new r.p2(p(t.content,((e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e),o),t.openStart,t.openEnd);return h.fromReplace(e,this.from,this.to,i)}invert(){return new f(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new d(t.pos,n.pos,this.mark)}merge(e){return e instanceof d&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new d(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new d(t.from,t.to,e.markFromJSON(t.mark))}}u.jsonID("addMark",d);class f extends u{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new r.p2(p(t.content,(e=>e.mark(this.mark.removeFromSet(e.marks))),e),t.openStart,t.openEnd);return h.fromReplace(e,this.from,this.to,n)}invert(){return new d(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new f(t.pos,n.pos,this.mark)}merge(e){return e instanceof f&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new f(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new f(t.from,t.to,e.markFromJSON(t.mark))}}u.jsonID("removeMark",f);class m extends u{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return h.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return h.fromReplace(e,this.pos,this.pos+1,new r.p2(r.HY.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let e=this.mark.addToSet(t.marks);if(e.length==t.marks.length){for(let n=0;n<t.marks.length;n++)if(!t.marks[n].isInSet(e))return new m(this.pos,t.marks[n]);return new m(this.pos,this.mark)}}return new g(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new m(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new m(t.pos,e.markFromJSON(t.mark))}}u.jsonID("addNodeMark",m);class g extends u{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return h.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return h.fromReplace(e,this.pos,this.pos+1,new r.p2(r.HY.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new m(this.pos,this.mark):this}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new g(t.pos,this.mark)}
1toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new g(t.pos,e.markFromJSON(t.mark))}}u.jsonID("removeNodeMark",g);class v extends u{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&k(e,this.from,this.to)?h.fail("Structure replace would overwrite content"):h.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new a([this.from,this.to-this.from,this.slice.size])}invert(e){return new v(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deletedAcross&&n.deletedAcross?null:new v(t.pos,Math.max(t.pos,n.pos),this.slice)}merge(e){if(!(e instanceof v)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;{let t=this.slice.size+e.slice.size==0?r.p2.empty:new r.p2(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new v(e.from,this.to,t,this.structure)}}{let t=this.slice.size+e.slice.size==0?r.p2.empty:new r.p2(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new v(this.from,this.to+(e.to-e.from),t,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new v(t.from,t.to,r.p2.fromJSON(e,t.slice),!!t.structure)}}u.jsonID("replace",v);class y extends u{constructor(e,t,n,r,o,i,s=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=o,this.insert=i,this.structure=s}apply(e){if(this.structure&&(k(e,this.from,this.gapFrom)||k(e,this.gapTo,this.to)))return h.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return h.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?h.fromReplace(e,this.from,this.to,n):h.fail("Content does not fit in gap")}getMap(){return new a([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new y(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),r=e.map(this.gapFrom,-1),o=e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||o>n.pos?null:new y(t.pos,n.pos,r,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new y(t.from,t.to,t.gapFrom,t.gapTo,r.p2.fromJSON(e,t.slice),t.insert,!!t.structure)}}function k(e,t,n){let r=e.resolve(t),o=n-t,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let e=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,o--}}return!1}function w(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function x(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let r=e.$from.node(n),o=e.$from.index(n),i=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(o,i,t))return n;if(0==n||r.type.spec.isolating||!w(r,o,i))break}return null}function b(e,t,n=null,r=e){let o=function(e,t){let{parent:n,startIndex:r,endIndex:o}=e,i=n.contentMatchAt(r).findWrapping(t);if(!i)return null;let s=i.length?i[0]:t;return n.canReplaceWith(r,o,s)?i:null}(e,t),i=o&&function(e,t){let{parent:n,startIndex:r,endIndex:o}=e,i=n.child(r),s=t.contentMatch.findWrapping(i.type);if(!s)return null;let a=(s.length?s[s.length-1]:t).contentMatch;for(let l=r;a&&l<o;l++)a=a.matchType(n.child(l).type);return a&&a.validEnd?s:null}(r,t);return i?o.map(S).concat({type:t,attrs:n}).concat(i.map(S)):null}function S(e){return{type:e,attrs:null}}function C(e,t,n=1,r){let o=e.resolve(t),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let c=o.depth-1,u=n-2;c>i;c--,u--){let e=o.node(c),t=o.index(c);if(e.type.spec.isolating)return!1;let n=e.content.cutByIndex(t,e.childCount),i=r&&r[u+1];i&&(n=n.replaceChild(0,i.type.create(i.attrs)));let s=r&&r[u]||e;if(!e.canReplace(t+1,e.childCount)||!s.type.validContent(n))return!1}let a=o.indexAfter(i),l=r&&r[0];return o.node(i).canReplaceWith(a,a,l?l.type:o.node(i+1).type)}function M(e,t){let n=e.resolve(t),r=n.index();return O(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}
1function O(e,t){return!(!e||!t||e.isLeaf||!e.canAppend(t))}function E(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(let o=r.depth-1;o>=0;o--){let e=r.index(o);if(r.node(o).canReplaceWith(e,e,n))return r.before(o+1);if(e>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let e=r.indexAfter(o);if(r.node(o).canReplaceWith(e,e,n))return r.after(o+1);if(e<r.node(o).childCount)return null}return null}function A(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let o=n.content;for(let i=0;i<n.openStart;i++)o=o.firstChild.content;for(let i=1;i<=(0==n.openStart&&n.size?2:1);i++)for(let e=r.depth;e>=0;e--){let t=e==r.depth?0:r.pos<=(r.start(e+1)+r.end(e+1))/2?-1:1,n=r.index(e)+(t>0?1:0),s=r.node(e),a=!1;if(1==i)a=s.canReplace(n,n,o);else{let e=s.contentMatchAt(n).findWrapping(o.firstChild.type);a=e&&s.canReplaceWith(n,n,e[0])}if(a)return 0==t?r.pos:t<0?r.before(e+1):r.after(e+1)}return null}function T(e,t,n=t,o=r.p2.empty){if(t==n&&!o.size)return null;let i=e.resolve(t),s=e.resolve(n);return R(i,s,o)?new v(t,n,o):new N(i,s,o).fit()}function R(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}u.jsonID("replaceAround",y);class N{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=r.HY.empty;for(let r=0;r<=e.depth;r++){let t=e.node(r);this.frontier.push({type:t.type,match:t.contentMatchAt(e.indexAfter(r))})}for(let o=e.depth;o>0;o--)this.placed=r.HY.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,o=this.close(e<0?this.$to:n.doc.resolve(e));if(!o)return null;let i=this.placed,s=n.depth,a=o.depth;for(;s&&a&&1==i.childCount;)i=i.firstChild.content,s--,a--;let l=new r.p2(i,s,a);return e>-1?new y(n.pos,e,this.$to.pos,this.$to.end(),l,t):l.size||n.pos!=this.$to.pos?new v(n.pos,o.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let o=t.firstChild;if(t.childCount>1&&(r=0),o.type.spec.isolating&&r<=n){e=n;break}t=o.content}for(let t=1;t<=2;t++)for(let n=1==t?e:this.unplaced.openStart;n>=0;n--){let e,o=null;n?(o=_(this.unplaced.content,n-1).firstChild,e=o.content):e=this.unplaced.content;let i=e.firstChild;for(let s=this.depth;s>=0;s--){let e,{type:a,match:l}=this.frontier[s],c=null;if(1==t&&(i?l.matchType(i.type)||(c=l.fillBefore(r.HY.from(i),!1)):o&&a.compatibleContent(o.type)))return{sliceDepth:n,frontierDepth:s,parent:o,inject:c};if(2==t&&i&&(e=l.findWrapping(i.type)))return{sliceDepth:n,frontierDepth:s,parent:o,wrap:e};if(o&&l.matchType(o.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,o=_(e,t);return!(!o.childCount||o.firstChild.isLeaf)&&(this.unplaced=new r.p2(e,t+1,Math.max(n,o.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,o=_(e,t);if(o.childCount<=1&&t>0){let i=e.size-t<=t+o.size;this.unplaced=new r.p2(I(e,t-1,1),t-1,i?t-1:n)}else this.unplaced=new r.p2(I(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:o,wrap:i}){for(;this.depth>t;)this.closeFrontierNode();if(i)for(let r=0;r<i.length;r++)this.openFrontierNode(i[r]);let s=this.unplaced,a=n?n.content:s.content,l=s.openStart-e,c=0,u=[],{match:h,type:p}=this.frontier[t];if(o){for(let e=0;e<o.childCount;e++)u.push(o.child(e));h=h.matchFragment(o)}let d=a.size+e-(s.content.size-s.openEnd);for(;c<a.childCount;){let e=a.child(c),t=h.matchType(e.type);if(!t)break;c++,(c>1||0==l||e.content.size)&&(h=t,u.push(L(e.mark(p.allowedMarks(e.marks)),1==c?l:0,c==a.childCount?d:-1)))}let f=c==a.childCount;f||(d=-1),this.placed=D(this.placed,t,r.HY.from(u)),this.frontier[t].match=h,f&&d<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let r=0,m=a;r<d;r++){let e=m.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),m=e.content}this.unplaced=f?0==e?r.p2.empty:new r.p2(I(s.content,e-1,1),e-1,d<0?s.openEnd:e-1):new r.p2(I(s.content,e,c),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e,t=this.frontier[this.depth];if(!t.type.isTextblock||!P(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return-1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],o=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),i=P(e,t,r,n,o);if(i){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],o=P(e,n,r,t,!0);if(!o||o.childCount)continue e}return{depth:t,fit:i,move:o?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=D(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=D(this.placed,this.depth,r.HY.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(r.HY.empty,!0);e.childCount&&(this.placed=D(this.placed,this.frontier.length,e))}}function I(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(I(e.firstChild.content,t-1,n)))}function D(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(D(e.last
1Child.content,t-1,n)))}function _(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function L(e,t,n){if(t<=0)return e;let o=e.content;return t>1&&(o=o.replaceChild(0,L(o.firstChild,t-1,1==o.childCount?n-1:0))),t>0&&(o=e.type.contentMatch.fillBefore(o).append(o),n<=0&&(o=o.append(e.type.contentMatch.matchFragment(o).fillBefore(r.HY.empty,!0)))),e.copy(o)}function P(e,t,n,r,o){let i=e.node(t),s=o?e.indexAfter(t):e.index(t);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let a=r.fillBefore(i.content,!0,s);return a&&!function(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,i.content,s)?a:null}function $(e,t,n,o,i){if(t<n){let r=e.firstChild;e=e.replaceChild(0,r.copy($(r.content,t+1,n,o,r)))}if(t>o){let t=i.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(r.HY.empty,!0))}return e}function z(e,t){let n=[];for(let r=Math.min(e.depth,t.depth);r>=0;r--){let o=e.start(r);if(o<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&n.push(r)}return n}class F extends u{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return h.fail("No node at attribute step's position");let n=Object.create(null);for(let r in t.attrs)n[r]=t.attrs[r];n[this.attr]=this.value;let o=t.type.create(n,null,t.marks);return h.fromReplace(e,this.pos,this.pos+1,new r.p2(r.HY.from(o),0,t.isLeaf?0:1))}getMap(){return a.empty}invert(e){return new F(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new F(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if("number"!=typeof t.pos||"string"!=typeof t.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new F(t.pos,t.attr,t.value)}}u.jsonID("attr",F);class B extends u{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let r in e.attrs)t[r]=e.attrs[r];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return h.ok(n)}getMap(){return a.empty}invert(e){return new B(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if("string"!=typeof t.attr)throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new B(t.attr,t.value)}}u.jsonID("docAttr",B);let j=class extends Error{};j=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},(j.prototype=Object.create(Error.prototype)).constructor=j,j.prototype.name="TransformError";class H{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new l}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new j(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=r.p2.empty){let o=T(this.doc,e,t,n);return o&&this.step(o),this}replaceWith(e,t,n){return this.replace(e,t,new r.p2(r.HY.from(n),0,0))}delete(e,t){return this.replace(e,t,r.p2.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return function(e,t,n,o){if(!o.size)return e.deleteRange(t,n);let i=e.doc.resolve(t),s=e.doc.resolve(n);if(R(i,s,o))return e.step(new v(t,n,o));let a=z(i,e.doc.resolve(n));0==a[a.length-1]&&a.pop();let l=-(i.depth+1);a.unshift(l);for(let r=i.depth,f=i.pos-1;r>0;r--,f--){let e=i.node(r).type.spec;if(e.defining||e.definingAsContext||e.isolating)break;a.indexOf(r)>-1?l=r:i.before(r)==f&&a.splice(1,0,-r)}let c=a.indexOf(l),u=[],h=o.openStart;for(let r=o.content,f=0;;f++){let e=r.firstChild;if(u.push(e),f==o.openStart)break;r=e.content}for(let r=h-1;r>=0;r--){let e=u[r],t=(p=e.type).spec.defining||p.spec.definingForContent;if(t&&!e.sameMarkup(i.node(Math.abs(l)-1)))h=r;else if(t||!e.type.isTextblock)break}var p;for(let f=o.openStart;f>=0;f--){let t=(f+h+1)%(o.openStart+1),l=u[t];if(l)for(let u=0;u<a.length;u++){let h=a[(u+c)%a.length],p=!0;h<0&&(p=!1,h=-h);let d=i.node(h-1),f=i.index(h-1);if(d.canReplaceWith(f,f,l.type,l.marks))return e.replace(i.before(h),p?s.after(h):n,new r.p2($(o.content,0,o.openStart,t),t,o.openEnd))}}let d=e.steps.length;for(let r=a.length-1;r>=0&&(e.replace(t,n,o),!(e.steps.length>d));r--){let e=a[r];e<0||(t=i.before(e),n=s.after(e))}}(this,e,t,n),this}replaceRangeWith(e,t,n){return function(e,t,n,o){if(!o.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let r=E(e.doc,t,o.type);null!=r&&(t=n=r)}e.replaceRange(t,n,new r.p2(r.HY.from(o),0,0))}(this,e,t,n),this}deleteRange(e,t){return function(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),i=z(r,o);for(let s=0;s<i.length;s++){let t=i[s],n=s==i.length-1;if(n&&0==t||r.node(t).type.contentMatch.validEnd)return e.delete(r.start(t),o.end(t));if(t>0&&(n||r.node(t-1).canReplace(r.index(t-1),o.indexAfter(t-1))))return e.delete(r.before(t),o.after(t))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&o.end(s)-n!=o.depth-s)return e.delete(r.before(s),n);e.delete(t,n)}(this,e,t),this}lift(e,t){return function(e,t,n){let{$from:o,$to:i,depth:s}=t,a=o.before(s+1),l=i.after(s+1),c=a,u=l,h=r.HY.empty,p=0;for(let m=s,g=!1;m>n;m--)g||o.index(m)>0?(g=!0,h=r.HY.from(o.node(m).copy(h)),p++):c--;let d=r.HY.empty,f=0;for(let m=s,g=!1;m>n;m--)g||i.after(m+1)<i.end(m)?(g=!0,d=r.HY.from(i.node(m).copy(d)),f++):u++;e.step(new y(c,u,a,l,new r.p2(h.append(d),p,f),h.size-p,!0))}(this,e,t),this}join(e,t=1){return function(e,t,n){let o=new v(t-n,t+n,r.p2.empty,!0);e.step(o)}(this,e,t),this}wrap(e,t){return function(e,t,n){let o=r.HY.empty;for(let a=n.length-1;a>=0;a--){if(o.size){let e=n[a].type.contentMatch.matchFragment(o);if(!e||!e.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}o=r.HY.from(n[a].type.create(n[a].attrs,o))}let i=t.start,s=t.end;e.step(new y(i,s,i,s,new r.p2(o,0,0),n.length,!0))}(this,e,t),this}setBlockType(e,t=e,n,o=null){return function(e,t,n,o,i){if(!o.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=e.steps.length;e.doc.nodesBetween(t,n,((t,n)=>{if(t.isTextblock&&!t.hasMarkup(o,i)&&function(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(e.doc,e.mapping.slice(s).map(n),o)){e.clearIncompatible(e.mapping.slice(s).map(n,1),o);let a=e.mapping.slice(s),l=a.map(n,1),c=a.map(n+t.nodeSize,1);return e.step(new y(l,c,l+1,c-1,new r.p2(r.HY.from(o.create(i,null,t.marks)),0,0),1,!0)),!1}}))}(this,e,t,n,o),this}setNodeMarkup(e,t,n=null,o){return function(e,t,n,o,i){let s=e.doc.nodeAt(t);if(!s)throw new RangeError("No node at given position");n||(n=s.type);let a=n.create(o,null,i||s.marks);if(s.isLeaf)return e.replaceWith(t,t+s.nodeSize,a);if(!n.validContent(s.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new y(t,t+s.nodeSize,t+1,t+s.nodeSize-1,new r.p2(r.HY.from(a),0,0),1,!0))}(this,e,t,n,o),this}setNodeAttribute(e,t,n){return this.step(new F(e,t,n)),this}setDocAttribute(e,t){return this.step(new B(e,t)),this}addNodeMark(e,t){return this.step(new m(e,t)),this}
1removeNodeMark(e,t){if(!(t instanceof r.vc)){let n=this.doc.nodeAt(e);if(!n)throw new RangeError("No node at position "+e);if(!(t=t.isInSet(n.marks)))return this}return this.step(new g(e,t)),this}split(e,t=1,n){return function(e,t,n=1,o){let i=e.doc.resolve(t),s=r.HY.empty,a=r.HY.empty;for(let l=i.depth,c=i.depth-n,u=n-1;l>c;l--,u--){s=r.HY.from(i.node(l).copy(s));let e=o&&o[u];a=r.HY.from(e?e.type.create(e.attrs,a):i.node(l).copy(a))}e.step(new v(t,t,new r.p2(s.append(a),n,n),!0))}(this,e,t,n),this}addMark(e,t,n){return function(e,t,n,r){let o,i,s=[],a=[];e.doc.nodesBetween(t,n,((e,l,c)=>{if(!e.isInline)return;let u=e.marks;if(!r.isInSet(u)&&c.type.allowsMarkType(r.type)){let c=Math.max(l,t),h=Math.min(l+e.nodeSize,n),p=r.addToSet(u);for(let e=0;e<u.length;e++)u[e].isInSet(p)||(o&&o.to==c&&o.mark.eq(u[e])?o.to=h:s.push(o=new f(c,h,u[e])));i&&i.to==c?i.to=h:a.push(i=new d(c,h,r))}})),s.forEach((t=>e.step(t))),a.forEach((t=>e.step(t)))}(this,e,t,n),this}removeMark(e,t,n){return function(e,t,n,o){let i=[],s=0;e.doc.nodesBetween(t,n,((e,a)=>{if(!e.isInline)return;s++;let l=null;if(o instanceof r.ZU){let t,n=e.marks;for(;t=o.isInSet(n);)(l||(l=[])).push(t),n=t.removeFromSet(n)}else o?o.isInSet(e.marks)&&(l=[o]):l=e.marks;if(l&&l.length){let r=Math.min(a+e.nodeSize,n);for(let e=0;e<l.length;e++){let n,o=l[e];for(let e=0;e<i.length;e++){let t=i[e];t.step==s-1&&o.eq(i[e].style)&&(n=t)}n?(n.to=r,n.step=s):i.push({style:o,from:Math.max(a,t),to:r,step:s})}}})),i.forEach((t=>e.step(new f(t.from,t.to,t.style))))}(this,e,t,n),this}clearIncompatible(e,t,n){return function(e,t,n,o=n.contentMatch){let i=e.doc.nodeAt(t),s=[],a=t+1;for(let l=0;l<i.childCount;l++){let t=i.child(l),c=a+t.nodeSize,u=o.matchType(t.type);if(u){o=u;for(let r=0;r<t.marks.length;r++)n.allowsMarkType(t.marks[r].type)||e.step(new f(a,c,t.marks[r]));if(t.isText&&!n.spec.code){let e,o,i=/\r?\n|\r/g;for(;e=i.exec(t.text);)o||(o=new r.p2(r.HY.from(n.schema.text(" ",n.allowedMarks(t.marks))),0,0)),s.push(new v(a+e.index,a+e.index+e[0].length,o))}}else s.push(new v(a,c,r.p2.empty));a=c}if(!o.validEnd){let t=o.fillBefore(r.HY.empty,!0);e.replace(a,a,new r.p2(t,0,0))}for(let r=s.length-1;r>=0;r--)e.step(s[r])}(this,e,t,n),this}}},27856:function(e,t,n){"use strict";function r(e,t,n,r){var o,i=!1,s=0;function a(){o&&clearTimeout(o)}function l(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var h=this,p=Date.now()-s;function d(){s=Date.now(),n.apply(h,c)}function f(){o=void 0}i||(r&&!o&&d(),a(),void 0===r&&p>e?d():!0!==t&&(o=setTimeout(r?f:d,void 0===r?e-p:e)))}return"boolean"!==typeof t&&(r=n,n=t,t=void 0),l.cancel=function(){a(),i=!0},l}function o(e,t,n){return void 0===n?r(e,t,!1):r(e,n,!1!==t)}n.d(t,{D:function(){return o},P:function(){return r}})},37452:function(e){"use strict";e.exports=JSON.parse('{"AElig":"\xc6","AMP":"&","Aacute":"\xc1","Acirc":"\xc2","Agrave":"\xc0","Aring":"\xc5","Atilde":"\xc3","Auml":"\xc4","COPY":"\xa9","Ccedil":"\xc7","ETH":"\xd0","Eacute":"\xc9","Ecirc":"\xca","Egrave":"\xc8","Euml":"\xcb","GT":">","Iacute":"\xcd","Icirc":"\xce","Igrave":"\xcc","Iuml":"\xcf","LT":"<","Ntilde":"\xd1","Oacute":"\xd3","Ocirc":"\xd4","Ograve":"\xd2","Oslash":"\xd8","Otilde":"\xd5","Ouml":"\xd6","QUOT":"\\"","REG":"\xae","THORN":"\xde","Uacute":"\xda","Ucirc":"\xdb","Ugrave":"\xd9","Uuml":"\xdc","Yacute":"\xdd","aacute":"\xe1","acirc":"\xe2","acute":"\xb4","aelig":"\xe6","agrave":"\xe0","amp":"&","aring":"\xe5","atilde":"\xe3","auml":"\xe4","brvbar":"\xa6","ccedil":"\xe7","cedil":"\xb8","cent":"\xa2","copy":"\xa9","curren":"\xa4","deg":"\xb0","divide":"\xf7","eacute":"\xe9","ecirc":"\xea","egrave":"\xe8","eth":"\xf0","euml":"\xeb","frac12":"\xbd","frac14":"\xbc","frac34":"\xbe","gt":">","iacute":"\xed","icirc":"\xee","iexcl":"\xa1","igrave":"\xec","iquest":"\xbf","iuml":"\xef","laquo":"\xab","lt":"<","macr":"\xaf","micro":"\xb5","middot":"\xb7","nbsp":"\xa0","not":"\xac","ntilde":"\xf1","oacute":"\xf3","ocirc":"\xf4","ograve":"\xf2","ordf":"\xaa","ordm":"\xba","oslash":"\xf8","otilde":"\xf5","ouml":"\xf6","para":"\xb6","plusmn":"\xb1","pound":"\xa3","quot":"\\"","raquo":"\xbb","reg":"\xae","sect":"\xa7","shy":"\xad","sup1":"\xb9","sup2":"\xb2","sup3":"\xb3","szlig":"\xdf","thorn":"\xfe","t
1imes":"\xd7","uacute":"\xfa","ucirc":"\xfb","ugrave":"\xf9","uml":"\xa8","uuml":"\xfc","yacute":"\xfd","yen":"\xa5","yuml":"\xff"}')},93580:function(e){"use strict";e.exports=JSON.parse('{"0":"\ufffd","128":"\u20ac","130":"\u201a","131":"\u0192","132":"\u201e","133":"\u2026","134":"\u2020","135":"\u2021","136":"\u02c6","137":"\u2030","138":"\u0160","139":"\u2039","140":"\u0152","142":"\u017d","145":"\u2018","146":"\u2019","147":"\u201c","148":"\u201d","149":"\u2022","150":"\u2013","151":"\u2014","152":"\u02dc","153":"\u2122","154":"\u0161","155":"\u203a","156":"\u0153","158":"\u017e","159":"\u0178"}')}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.