diff --git a/django_prose_editor/static/django_prose_editor/editor.js b/django_prose_editor/static/django_prose_editor/editor.js index 4275171..e6932fb 100644 --- a/django_prose_editor/static/django_prose_editor/editor.js +++ b/django_prose_editor/static/django_prose_editor/editor.js @@ -7,7 +7,7 @@ `);return{dom:a,text:f,slice:e}}function fc(n,e,t,r,o){let i=o.parent.type.spec.code,s,l;if(!t&&!e)return null;let a=e&&(r||i||!t);if(a){if(n.someProp("transformPastedText",f=>{e=f(e,i||r,n)}),i)return e?new S(k.from(n.state.schema.text(e.replace(/\r\n?/g,` `))),0,0):S.empty;let u=n.someProp("clipboardTextParser",f=>f(e,o,r,n));if(u)l=u;else{let f=o.marks(),{schema:h}=n.state,p=$e.fromSchema(h);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let g=s.appendChild(document.createElement("p"));m&&g.appendChild(p.serializeNode(h.text(m,f)))})}}else n.someProp("transformPastedHTML",u=>{t=u(t,n)}),s=_h(t),vn&&jh(s);let c=s&&s.querySelector("[data-pm-slice]"),d=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let u=+d[3];u>0;u--){let f=s.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;s=f}if(l||(l=(n.someProp("clipboardParser")||n.someProp("domParser")||Re.fromSchema(n.state.schema)).parseSlice(s,{preserveWhitespace:!!(a||d),context:o,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!Hh.test(f.parentNode.nodeName)?{ignore:!0}:null}})),d)l=Wh(za(l,+d[1],+d[2]),d[4]);else if(l=S.maxOpen($h(l.content,o),!0),l.openStart||l.openEnd){let u=0,f=0;for(let h=l.content.firstChild;u{l=u(l,n)}),l}var Hh=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function $h(n,e){if(n.childCount<2)return n;for(let t=e.depth;t>=0;t--){let o=e.node(t).contentMatchAt(e.index(t)),i,s=[];if(n.forEach(l=>{if(!s)return;let a=o.findWrapping(l.type),c;if(!a)return s=null;if(c=s.length&&i.length&&pc(a,i,l,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=mc(s[s.length-1],i.length));let d=hc(l,a);s.push(d),o=o.matchType(d.type),i=a}}),s)return k.from(s)}return n}function hc(n,e,t=0){for(let r=e.length-1;r>=t;r--)n=e[r].create(null,k.from(n));return n}function pc(n,e,t,r,o){if(o1&&(i=0),o=t&&(l=e<0?s.contentMatchAt(0).fillBefore(l,i<=o).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(k.empty,!0))),n.replaceChild(e<0?0:n.childCount-1,s.copy(l))}function za(n,e,t){return et})),ci.createHTML(n)):n}function _h(n){let e=/^(\s*]*>)*/.exec(n);e&&(n=n.slice(e[0].length));let t=yc().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(n),o;if((o=r&&gc[r[1].toLowerCase()])&&(n=o.map(i=>"<"+i+">").join("")+n+o.map(i=>"").reverse().join("")),t.innerHTML=Vh(n),o)for(let i=0;i=0;l-=2){let a=t.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;o=k.from(a.create(r[l+1],o)),i++,s++}return new S(o,i,s)}var he={},pe={},Kh={touchstart:!0,touchmove:!0},Mi=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function Jh(n){for(let e in he){let t=he[e];n.dom.addEventListener(e,n.input.eventHandlers[e]=r=>{qh(n,r)&&!Ii(n,r)&&(n.editable||!(r.type in pe))&&t(n,r)},Kh[e]?{passive:!0}:void 0)}fe&&n.dom.addEventListener("input",()=>null),Ai(n)}function rt(n,e){n.input.lastSelectionOrigin=e,n.input.lastSelectionTime=Date.now()}function Uh(n){n.domObserver.stop();for(let e in n.input.eventHandlers)n.dom.removeEventListener(e,n.input.eventHandlers[e]);clearTimeout(n.input.composingTimeout),clearTimeout(n.input.lastIOSEnterFallbackTimeout)}function Ai(n){n.someProp("handleDOMEvents",e=>{for(let t in e)n.input.eventHandlers[t]||n.dom.addEventListener(t,n.input.eventHandlers[t]=r=>Ii(n,r))})}function Ii(n,e){return n.someProp("handleDOMEvents",t=>{let r=t[e.type];return r?r(n,e)||e.defaultPrevented:!1})}function qh(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target;t!=n.dom;t=t.parentNode)if(!t||t.nodeType==11||t.pmViewDesc&&t.pmViewDesc.stopEvent(e))return!1;return!0}function Gh(n,e){!Ii(n,e)&&he[e.type]&&(n.editable||!(e.type in pe))&&he[e.type](n,e)}pe.keydown=(n,e)=>{let t=e;if(n.input.shiftKey=t.keyCode==16||t.shiftKey,!kc(n,t)&&(n.input.lastKeyCode=t.keyCode,n.input.lastKeyCodeTime=Date.now(),!(Ke&&ae&&t.keyCode==13)))if(t.keyCode!=229&&n.domObserver.forceFlush(),Ut&&t.keyCode==13&&!t.ctrlKey&&!t.altKey&&!t.metaKey){let r=Date.now();n.input.lastIOSEnter=r,n.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{n.input.lastIOSEnter==r&&(n.someProp("handleKeyDown",o=>o(n,St(13,"Enter"))),n.input.lastIOSEnter=0)},200)}else n.someProp("handleKeyDown",r=>r(n,t))||Fh(n,t)?t.preventDefault():rt(n,"key")};pe.keyup=(n,e)=>{e.keyCode==16&&(n.input.shiftKey=!1)};pe.keypress=(n,e)=>{let t=e;if(kc(n,t)||!t.charCode||t.ctrlKey&&!t.altKey||Ce&&t.metaKey)return;if(n.someProp("handleKeyPress",o=>o(n,t))){t.preventDefault();return}let r=n.state.selection;if(!(r instanceof M)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(t.charCode);!/[\r\n]/.test(o)&&!n.someProp("handleTextInput",i=>i(n,r.$from.pos,r.$to.pos,o))&&n.dispatch(n.state.tr.insertText(o).scrollIntoView()),t.preventDefault()}};function Nr(n){return{left:n.clientX,top:n.clientY}}function Yh(n,e){let t=e.x-n.clientX,r=e.y-n.clientY;return t*t+r*r<100}function Pi(n,e,t,r,o){if(r==-1)return!1;let i=n.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(n.someProp(e,l=>s>i.depth?l(n,t,i.nodeAfter,i.before(s),o,!0):l(n,t,i.node(s),i.before(s),o,!1)))return!0;return!1}function Jt(n,e,t){if(n.focused||n.focus(),n.state.selection.eq(e))return;let r=n.state.tr.setSelection(e);t=="pointer"&&r.setMeta("pointer",!0),n.dispatch(r)}function Qh(n,e){if(e==-1)return!1;let t=n.state.doc.resolve(e),r=t.nodeAfter;return r&&r.isAtom&&T.isSelectable(r)?(Jt(n,new T(t),"pointer"),!0):!1}function Xh(n,e){if(e==-1)return!1;let t=n.state.selection,r,o;t instanceof T&&(r=t.node);let i=n.state.doc.resolve(e);for(let s=i.depth+1;s>0;s--){let l=s>i.depth?i.nodeAfter:i.node(s);if(T.isSelectable(l)){r&&t.$from.depth>0&&s>=t.$from.depth&&i.before(t.$from.depth+1)==t.$from.pos?o=i.before(t.$from.depth):o=i.before(s);break}}return o!=null?(Jt(n,T.create(n.state.doc,o),"pointer"),!0):!1}function Zh(n,e,t,r,o){return Pi(n,"handleClickOn",e,t,r)||n.someProp("handleClick",i=>i(n,e,r))||(o?Xh(n,t):Qh(n,t))}function ep(n,e,t,r){return Pi(n,"handleDoubleClickOn",e,t,r)||n.someProp("handleDoubleClick",o=>o(n,e,r))}function tp(n,e,t,r){return Pi(n,"handleTripleClickOn",e,t,r)||n.someProp("handleTripleClick",o=>o(n,e,r))||np(n,t,r)}function np(n,e,t){if(t.button!=0)return!1;let r=n.state.doc;if(e==-1)return r.inlineContent?(Jt(n,M.create(r,0,r.content.size),"pointer"),!0):!1;let o=r.resolve(e);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),l=o.before(i);if(s.inlineContent)Jt(n,M.create(r,l+1,l+1+s.content.size),"pointer");else if(T.isSelectable(s))Jt(n,T.create(r,l),"pointer");else continue;return!0}}function Li(n){return wr(n)}var bc=Ce?"metaKey":"ctrlKey";he.mousedown=(n,e)=>{let t=e;n.input.shiftKey=t.shiftKey;let r=Li(n),o=Date.now(),i="singleClick";o-n.input.lastClick.time<500&&Yh(t,n.input.lastClick)&&!t[bc]&&(n.input.lastClick.type=="singleClick"?i="doubleClick":n.input.lastClick.type=="doubleClick"&&(i="tripleClick")),n.input.lastClick={time:o,x:t.clientX,y:t.clientY,type:i};let s=n.posAtCoords(Nr(t));s&&(i=="singleClick"?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new Ti(n,s,t,!!r)):(i=="doubleClick"?ep:tp)(n,s.pos,s.inside,t)?t.preventDefault():rt(n,"pointer"))};var Ti=class{constructor(e,t,r,o){this.view=e,this.pos=t,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[bc],this.allowDefault=r.shiftKey;let i,s;if(t.inside>-1)i=e.state.doc.nodeAt(t.inside),s=t.inside;else{let d=e.state.doc.resolve(t.pos);i=d.parent,s=d.depth?d.before():0}let l=o?null:r.target,a=l?e.docView.nearestDesc(l,!0):null;this.target=a&&a.dom.nodeType==1?a.dom:null;let{selection:c}=e.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||c instanceof T&&c.from<=s&&c.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Ne&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),rt(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Je(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Nr(e))),this.updateAllowDefault(e),this.allowDefault||!t?rt(this.view,"pointer"):Zh(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||fe&&this.mightDrag&&!this.mightDrag.node.isAtom||ae&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Jt(this.view,A.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):rt(this.view,"pointer")}move(e){this.updateAllowDefault(e),rt(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}};he.touchstart=n=>{n.input.lastTouch=Date.now(),Li(n),rt(n,"pointer")};he.touchmove=n=>{n.input.lastTouch=Date.now(),rt(n,"pointer")};he.contextmenu=n=>Li(n);function kc(n,e){return n.composing?!0:fe&&Math.abs(e.timeStamp-n.input.compositionEndedAt)<500?(n.input.compositionEndedAt=-2e8,!0):!1}var rp=Ke?5e3:-1;pe.compositionstart=pe.compositionupdate=n=>{if(!n.composing){n.domObserver.flush();let{state:e}=n,t=e.selection.$to;if(e.selection instanceof M&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))n.markCursor=n.state.storedMarks||t.marks(),wr(n,!0),n.markCursor=null;else if(wr(n,!e.selection.empty),Ne&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let r=n.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){let l=n.domSelection();l&&l.collapse(s,s.nodeValue.length);break}else o=s,i=-1}}n.input.composing=!0}xc(n,rp)};pe.compositionend=(n,e)=>{n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=e.timeStamp,n.input.compositionPendingChanges=n.domObserver.pendingRecords().length?n.input.compositionID:0,n.input.compositionNode=null,n.input.compositionPendingChanges&&Promise.resolve().then(()=>n.domObserver.flush()),n.input.compositionID++,xc(n,20))};function xc(n,e){clearTimeout(n.input.composingTimeout),e>-1&&(n.input.composingTimeout=setTimeout(()=>wr(n),e))}function Sc(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=ip());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}function op(n){let e=n.domSelectionRange();if(!e.focusNode)return null;let t=th(e.focusNode,e.focusOffset),r=nh(e.focusNode,e.focusOffset);if(t&&r&&t!=r){let o=r.pmViewDesc,i=n.domObserver.lastChangedTextNode;if(t==i||r==i)return i;if(!o||!o.isText(r.nodeValue))return r;if(n.input.compositionNode==r){let s=t.pmViewDesc;if(!(!s||!s.isText(t.nodeValue)))return r}}return t||r}function ip(){let n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}function wr(n,e=!1){if(!(Ke&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),Sc(n),e||n.docView&&n.docView.dirty){let t=Ri(n);return t&&!t.eq(n.state.selection)?n.dispatch(n.state.tr.setSelection(t)):(n.markCursor||e)&&!n.state.selection.empty?n.dispatch(n.state.tr.deleteSelection()):n.updateState(n.state),!0}return!1}}function sp(n,e){if(!n.dom.parentNode)return;let t=n.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),n.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t),n.focus()},50)}var Tn=ye&&ot<15||Ut&&lh<604;he.copy=pe.cut=(n,e)=>{let t=e,r=n.state.selection,o=t.type=="cut";if(r.empty)return;let i=Tn?null:t.clipboardData,s=r.content(),{dom:l,text:a}=uc(n,s);i?(t.preventDefault(),i.clearData(),i.setData("text/html",l.innerHTML),i.setData("text/plain",a)):sp(n,l),o&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function lp(n){return n.openStart==0&&n.openEnd==0&&n.content.childCount==1?n.content.firstChild:null}function ap(n,e){if(!n.dom.parentNode)return;let t=n.input.shiftKey||n.state.selection.$from.parent.type.spec.code,r=n.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=n.input.shiftKey&&n.input.lastKeyCode!=45;setTimeout(()=>{n.focus(),r.parentNode&&r.parentNode.removeChild(r),t?En(n,r.value,null,o,e):En(n,r.textContent,r.innerHTML,o,e)},50)}function En(n,e,t,r,o){let i=fc(n,e,t,r,n.state.selection.$from);if(n.someProp("handlePaste",a=>a(n,o,i||S.empty)))return!0;if(!i)return!1;let s=lp(i),l=s?n.state.tr.replaceSelectionWith(s,r):n.state.tr.replaceSelection(i);return n.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function wc(n){let e=n.getData("text/plain")||n.getData("Text");if(e)return e;let t=n.getData("text/uri-list");return t?t.replace(/\r?\n/g," "):""}pe.paste=(n,e)=>{let t=e;if(n.composing&&!Ke)return;let r=Tn?null:t.clipboardData,o=n.input.shiftKey&&n.input.lastKeyCode!=45;r&&En(n,wc(r),r.getData("text/html"),o,t)?t.preventDefault():ap(n,t)};var Cr=class{constructor(e,t,r){this.slice=e,this.move=t,this.node=r}},Cc=Ce?"altKey":"ctrlKey";he.dragstart=(n,e)=>{let t=e,r=n.input.mouseDown;if(r&&r.done(),!t.dataTransfer)return;let o=n.state.selection,i=o.empty?null:n.posAtCoords(Nr(t)),s;if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof T?o.to-1:o.to))){if(r&&r.mightDrag)s=T.create(n.state.doc,r.mightDrag.pos);else if(t.target&&t.target.nodeType==1){let u=n.docView.nearestDesc(t.target,!0);u&&u.node.type.spec.draggable&&u!=n.docView&&(s=T.create(n.state.doc,u.posBefore))}}let l=(s||n.state.selection).content(),{dom:a,text:c,slice:d}=uc(n,l);(!t.dataTransfer.files.length||!ae||Qa>120)&&t.dataTransfer.clearData(),t.dataTransfer.setData(Tn?"Text":"text/html",a.innerHTML),t.dataTransfer.effectAllowed="copyMove",Tn||t.dataTransfer.setData("text/plain",c),n.dragging=new Cr(d,!t[Cc],s)};he.dragend=n=>{let e=n.dragging;window.setTimeout(()=>{n.dragging==e&&(n.dragging=null)},50)};pe.dragover=pe.dragenter=(n,e)=>e.preventDefault();pe.drop=(n,e)=>{let t=e,r=n.dragging;if(n.dragging=null,!t.dataTransfer)return;let o=n.posAtCoords(Nr(t));if(!o)return;let i=n.state.doc.resolve(o.pos),s=r&&r.slice;s?n.someProp("transformPasted",p=>{s=p(s,n)}):s=fc(n,wc(t.dataTransfer),Tn?null:t.dataTransfer.getData("text/html"),!1,i);let l=!!(r&&!t[Cc]);if(n.someProp("handleDrop",p=>p(n,t,s||S.empty,l))){t.preventDefault();return}if(!s)return;t.preventDefault();let a=s?hr(n.state.doc,i.pos,s):i.pos;a==null&&(a=i.pos);let c=n.state.tr;if(l){let{node:p}=r;p?p.replace(c):c.deleteSelection()}let d=c.mapping.map(a),u=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,f=c.doc;if(u?c.replaceRangeWith(d,d,s.content.firstChild):c.replaceRange(d,d,s),c.doc.eq(f))return;let h=c.doc.resolve(d);if(u&&T.isSelectable(s.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new T(h));else{let p=c.mapping.map(a);c.mapping.maps[c.mapping.maps.length-1].forEach((m,g,y,w)=>p=w),c.setSelection(Di(n,h,c.doc.resolve(p)))}n.focus(),n.dispatch(c.setMeta("uiEvent","drop"))};he.focus=n=>{n.input.lastFocus=Date.now(),n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(()=>{n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.domSelectionRange())&&Je(n)},20))};he.blur=(n,e)=>{let t=e;n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),t.relatedTarget&&n.dom.contains(t.relatedTarget)&&n.domObserver.currentSelection.clear(),n.focused=!1)};he.beforeinput=(n,e)=>{if(ae&&Ke&&e.inputType=="deleteContentBackward"){n.domObserver.flushSoon();let{domChangeCount:r}=n.input;setTimeout(()=>{if(n.input.domChangeCount!=r||(n.dom.blur(),n.focus(),n.someProp("handleKeyDown",i=>i(n,St(8,"Backspace")))))return;let{$cursor:o}=n.state.selection;o&&o.pos>0&&n.dispatch(n.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let n in pe)he[n]=pe[n];function On(n,e){if(n==e)return!0;for(let t in n)if(n[t]!==e[t])return!1;for(let t in e)if(!(t in n))return!1;return!0}var Mr=class n{constructor(e,t){this.toDOM=e,this.spec=t||At,this.side=this.spec.side||0}map(e,t,r,o){let{pos:i,deleted:s}=e.mapResult(t.from+o,this.side<0?-1:1);return s?null:new re(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof n&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&On(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}},Mt=class n{constructor(e,t){this.attrs=e,this.spec=t||At}map(e,t,r,o){let i=e.map(t.from+o,this.spec.inclusiveStart?-1:1)-r,s=e.map(t.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=s?null:new re(i,s,this)}valid(e,t){return t.from=e&&(!i||i(l.spec))&&r.push(l.copy(l.from+o,l.to+o))}for(let s=0;se){let l=this.children[s]+1;this.children[s+2].findInner(e-l,t-l,r,o+l,i)}}map(e,t,r){return this==le||e.maps.length==0?this:this.mapInner(e,t,0,0,r||At)}mapInner(e,t,r,o,i){let s;for(let l=0;l{let c=a+r,d;if(d=Ac(t,l,c)){for(o||(o=this.children.slice());il&&u.to=e){this.children[l]==e&&(r=this.children[l+2]);break}let i=e+1,s=i+t.content.size;for(let l=0;li&&a.type instanceof Mt){let c=Math.max(i,a.from)-i,d=Math.min(s,a.to)-i;co.map(e,t,At));return n.from(r)}forChild(e,t){if(t.isLeaf)return G.empty;let r=[];for(let o=0;ot instanceof G)?e:e.reduce((t,r)=>t.concat(r instanceof G?r:r.members),[]))}}forEachSet(e){for(let t=0;t{let g=m-p-(h-f);for(let y=0;yw+d-u)continue;let O=l[y]+d-u;h>=O?l[y+1]=f<=O?-2:-1:f>=d&&g&&(l[y]+=g,l[y+1]+=g)}u+=g}),d=t.maps[c].map(d,-1)}let a=!1;for(let c=0;c=r.content.size){a=!0;continue}let f=t.map(n[c+1]+i,-1),h=f-o,{index:p,offset:m}=r.content.findIndex(u),g=r.maybeChild(p);if(g&&m==u&&m+g.nodeSize==h){let y=l[c+2].mapInner(t,g,d+1,n[c]+i+1,s);y!=le?(l[c]=u,l[c+1]=h,l[c+2]=y):(l[c+1]=-2,a=!0)}else a=!0}if(a){let c=dp(l,n,e,t,o,i,s),d=Tr(c,r,0,s);e=d.local;for(let u=0;ut&&s.to{let c=Ac(n,l,a+t);if(c){i=!0;let d=Tr(c,l,t+a+1,r);d!=le&&o.push(a,a+l.nodeSize,d)}});let s=Mc(i?Tc(n):n,-t).sort(Tt);for(let l=0;l0;)e++;n.splice(e,0,t)}function di(n){let e=[];return n.someProp("decorations",t=>{let r=t(n.state);r&&r!=le&&e.push(r)}),n.cursorWrapper&&e.push(G.create(n.state.doc,[n.cursorWrapper.deco])),Ar.from(e)}var up={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},fp=ye&&ot<=11,Oi=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}},Ni=class{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Oi,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;oo.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),fp&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,up)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;tthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Ra(this.view)){if(this.suppressingSelectionUpdates)return Je(this.view);if(ye&&ot<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Et(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,r;for(let i=e.focusNode;i;i=An(i))t.add(i);for(let i=e.anchorNode;i;i=An(i))if(t.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let r=e.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&Ra(e)&&!this.ignoreSelectionChange(r),i=-1,s=-1,l=!1,a=[];if(e.editable)for(let d=0;du.nodeName=="BR");if(d.length==2){let[u,f]=d;u.parentNode&&u.parentNode.parentNode==f.parentNode?f.remove():u.remove()}else{let{focusNode:u}=this.currentSelection;for(let f of d){let h=f.parentNode;h&&h.nodeName=="LI"&&(!u||mp(e,u)!=h)&&f.remove()}}}let c=null;i<0&&o&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)-1||o)&&(i>-1&&(e.docView.markDirty(i,s),hp(e)),this.handleDOMChange(i,s,l,a),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||Je(e),this.currentSelection.set(r))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let d=0;do;g--){let y=r.childNodes[g-1],w=y.pmViewDesc;if(y.nodeName=="BR"&&!w){i=g;break}if(!w||w.size)break}let u=n.state.doc,f=n.someProp("domParser")||Re.fromSchema(n.state.schema),h=u.resolve(s),p=null,m=f.parse(r,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:o,to:i,preserveWhitespace:h.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:yp,context:h});if(c&&c[0].pos!=null){let g=c[0].pos,y=c[1]&&c[1].pos;y==null&&(y=g),p={anchor:g+s,head:y+s}}return{doc:m,sel:p,from:s,to:l}}function yp(n){let e=n.pmViewDesc;if(e)return e.parseRule();if(n.nodeName=="BR"&&n.parentNode){if(fe&&/^(ul|ol)$/i.test(n.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}else if(n.parentNode.lastChild==n||fe&&/^(tr|table)$/i.test(n.parentNode.nodeName))return{ignore:!0}}else if(n.nodeName=="IMG"&&n.getAttribute("mark-placeholder"))return{ignore:!0};return null}var bp=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function kp(n,e,t,r,o){let i=n.input.compositionPendingChanges||(n.composing?n.input.compositionID:0);if(n.input.compositionPendingChanges=0,e<0){let B=n.input.lastSelectionTime>Date.now()-50?n.input.lastSelectionOrigin:null,Se=Ri(n,B);if(Se&&!n.state.selection.eq(Se)){if(ae&&Ke&&n.input.lastKeyCode===13&&Date.now()-100sn(n,St(13,"Enter"))))return;let ht=n.state.tr.setSelection(Se);B=="pointer"?ht.setMeta("pointer",!0):B=="key"&&ht.scrollIntoView(),i&&ht.setMeta("composition",i),n.dispatch(ht)}return}let s=n.state.doc.resolve(e),l=s.sharedDepth(t);e=s.before(l+1),t=n.state.doc.resolve(t).after(l+1);let a=n.state.selection,c=gp(n,e,t),d=n.state.doc,u=d.slice(c.from,c.to),f,h;n.input.lastKeyCode===8&&Date.now()-100Date.now()-225||Ke)&&o.some(B=>B.nodeType==1&&!bp.test(B.nodeName))&&(!p||p.endA>=p.endB)&&n.someProp("handleKeyDown",B=>B(n,St(13,"Enter")))){n.input.lastIOSEnter=0;return}if(!p)if(r&&a instanceof M&&!a.empty&&a.$head.sameParent(a.$anchor)&&!n.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))p={start:a.from,endA:a.to,endB:a.to};else{if(c.sel){let B=ja(n,n.state.doc,c.sel);if(B&&!B.eq(n.state.selection)){let Se=n.state.tr.setSelection(B);i&&Se.setMeta("composition",i),n.dispatch(Se)}}return}n.state.selection.fromn.state.selection.from&&p.start<=n.state.selection.from+2&&n.state.selection.from>=c.from?p.start=n.state.selection.from:p.endA=n.state.selection.to-2&&n.state.selection.to<=c.to&&(p.endB+=n.state.selection.to-p.endA,p.endA=n.state.selection.to)),ye&&ot<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>c.from&&c.doc.textBetween(p.start-c.from-1,p.start-c.from+1)==" \xA0"&&(p.start--,p.endA--,p.endB--);let m=c.doc.resolveNoCache(p.start-c.from),g=c.doc.resolveNoCache(p.endB-c.from),y=d.resolve(p.start),w=m.sameParent(g)&&m.parent.inlineContent&&y.end()>=p.endA,O;if((Ut&&n.input.lastIOSEnter>Date.now()-225&&(!w||o.some(B=>B.nodeName=="DIV"||B.nodeName=="P"))||!w&&m.posB(n,St(13,"Enter")))){n.input.lastIOSEnter=0;return}if(n.state.selection.anchor>p.start&&Sp(d,p.start,p.endA,m,g)&&n.someProp("handleKeyDown",B=>B(n,St(8,"Backspace")))){Ke&&ae&&n.domObserver.suppressSelectionUpdates();return}ae&&p.endB==p.start&&(n.input.lastChromeDelete=Date.now()),Ke&&!w&&m.start()!=g.start()&&g.parentOffset==0&&m.depth==g.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==p.endA&&(p.endB-=2,g=c.doc.resolveNoCache(p.endB-c.from),setTimeout(()=>{n.someProp("handleKeyDown",function(B){return B(n,St(13,"Enter"))})},20));let L=p.start,E=p.endA,I,W,q;if(w){if(m.pos==g.pos)ye&&ot<=11&&m.parentOffset==0&&(n.domObserver.suppressSelectionUpdates(),setTimeout(()=>Je(n),20)),I=n.state.tr.delete(L,E),W=d.resolve(p.start).marksAcross(d.resolve(p.endA));else if(p.endA==p.endB&&(q=xp(m.parent.content.cut(m.parentOffset,g.parentOffset),y.parent.content.cut(y.parentOffset,p.endA-y.start()))))I=n.state.tr,q.type=="add"?I.addMark(L,E,q.mark):I.removeMark(L,E,q.mark);else if(m.parent.child(m.index()).isText&&m.index()==g.index()-(g.textOffset?0:1)){let B=m.parent.textBetween(m.parentOffset,g.parentOffset);if(n.someProp("handleTextInput",Se=>Se(n,L,E,B)))return;I=n.state.tr.insertText(B,L,E)}}if(I||(I=n.state.tr.replace(L,E,c.doc.slice(p.start-c.from,p.endB-c.from))),c.sel){let B=ja(n,I.doc,c.sel);B&&!(ae&&n.composing&&B.empty&&(p.start!=p.endB||n.input.lastChromeDeletee.content.size?null:Di(n,e.resolve(t.anchor),e.resolve(t.head))}function xp(n,e){let t=n.firstChild.marks,r=e.firstChild.marks,o=t,i=r,s,l,a;for(let d=0;dd.mark(l.addToSet(d.marks));else if(o.length==0&&i.length==1)l=i[0],s="remove",a=d=>d.mark(l.removeFromSet(d.marks));else return null;let c=[];for(let d=0;dt||ui(s,!0,!1)0&&(e||n.indexAfter(r)==n.node(r).childCount);)r--,o++,e=!1;if(t){let i=n.node(r).maybeChild(n.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function wp(n,e,t,r,o){let i=n.findDiffStart(e,t);if(i==null)return null;let{a:s,b:l}=n.findDiffEnd(e,t+n.size,t+e.size);if(o=="end"){let a=Math.max(0,i-Math.min(s,l));r-=s+a-i}if(s=s?i-r:0;i-=a,i&&i=l?i-r:0;i-=a,i&&i=56320&&e<=57343&&t>=55296&&t<=56319}var Er=class{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Mi,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(Ga),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=Ua(this),Ja(this),this.nodeViews=qa(this),this.docView=Aa(this.state.doc,Ka(this),di(this),this.dom,this),this.domObserver=new Ni(this,(r,o,i,s)=>kp(this,r,o,i,s)),this.domObserver.start(),Jh(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Ai(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(Ga),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let r in this._props)t[r]=this._props[r];t.state=this.state;for(let r in e)t[r]=e[r];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var r;let o=this.state,i=!1,s=!1;e.storedMarks&&this.composing&&(Sc(this),s=!0),this.state=e;let l=o.plugins!=e.plugins||this._props.plugins!=t.plugins;if(l||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let h=qa(this);Mp(h,this.nodeViews)&&(this.nodeViews=h,i=!0)}(l||t.handleDOMEvents!=this._props.handleDOMEvents)&&Ai(this),this.editable=Ua(this),Ja(this);let a=di(this),c=Ka(this),d=o.plugins!=e.plugins&&!o.doc.eq(e.doc)?"reset":e.scrollToSelection>o.scrollToSelection?"to selection":"preserve",u=i||!this.docView.matchesNode(e.doc,c,a);(u||!e.selection.eq(o.selection))&&(s=!0);let f=d=="preserve"&&s&&this.dom.style.overflowAnchor==null&&dh(this);if(s){this.domObserver.stop();let h=u&&(ye||ae)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&Cp(o.selection,e.selection);if(u){let p=ae?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=op(this)),(i||!this.docView.update(e.doc,c,a,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=Aa(e.doc,c,a,this.dom,this)),p&&!this.trackWrites&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Rh(this))?Je(this,h):(ac(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,o),d=="reset"?this.dom.scrollTop=0:d=="to selection"?this.scrollToSelection():f&&uh(f)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof T){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&ka(this,t.getBoundingClientRect(),e)}else ka(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let t=0;t0&&this.state.doc.nodeAt(i))==r.node&&(o=i)}this.dragging=new Cr(e.slice,e.move,o<0?void 0:T.create(this.state.doc,o))}someProp(e,t){let r=this._props&&this._props[e],o;if(r!=null&&(o=t?t(r):r))return o;for(let s=0;st.ownerDocument.getSelection()),this._root=t}return e||document}updateRoot(){this._root=null}posAtCoords(e){return yh(this,e)}coordsAtPos(e,t=1){return nc(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,r=-1){let o=this.docView.posFromDOM(e,t,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(e,t){return wh(this,t||this.state,e)}pasteHTML(e,t){return En(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return En(this,e,null,!0,t||new ClipboardEvent("paste"))}destroy(){this.docView&&(Uh(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],di(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Zf())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return Gh(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return e?fe&&this.root.nodeType===11&&oh(this.dom.ownerDocument)==this.dom&&pp(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};function Ka(n){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(n.editable),n.someProp("attributes",t=>{if(typeof t=="function"&&(t=t(n.state)),t)for(let r in t)r=="class"?e.class+=" "+t[r]:r=="style"?e.style=(e.style?e.style+";":"")+t[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(t[r]))}),e.translate||(e.translate="no"),[re.node(0,n.state.doc.content.size,e)]}function Ja(n){if(n.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),n.cursorWrapper={dom:e,deco:re.widget(n.state.selection.from,e,{raw:!0,marks:n.markCursor})}}else n.cursorWrapper=null}function Ua(n){return!n.someProp("editable",e=>e(n.state)===!1)}function Cp(n,e){let t=Math.min(n.$anchor.sharedDepth(n.head),e.$anchor.sharedDepth(e.head));return n.$anchor.start(t)!=e.$anchor.start(t)}function qa(n){let e=Object.create(null);function t(r){for(let o in r)Object.prototype.hasOwnProperty.call(e,o)||(e[o]=r[o])}return n.someProp("nodeViews",t),n.someProp("markViews",t),e}function Mp(n,e){let t=0,r=0;for(let o in n){if(n[o]!=e[o])return!0;t++}for(let o in e)r++;return t!=r}function Ga(n){if(n.spec.state||n.spec.filterTransaction||n.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Ue={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:"'"},Rr={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Ap=typeof navigator!="undefined"&&/Mac/.test(navigator.platform),Tp=typeof navigator!="undefined"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(Q=0;Q<10;Q++)Ue[48+Q]=Ue[96+Q]=String(Q);var Q;for(Q=1;Q<=24;Q++)Ue[Q+111]="F"+Q;var Q;for(Q=65;Q<=90;Q++)Ue[Q]=String.fromCharCode(Q+32),Rr[Q]=String.fromCharCode(Q);var Q;for(vr in Ue)Rr.hasOwnProperty(vr)||(Rr[vr]=Ue[vr]);var vr;function Ec(n){var e=Ap&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||Tp&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Rr:Ue)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}var Ep=typeof navigator!="undefined"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function Op(n){let e=n.split(/-(?!$)/),t=e[e.length-1];t=="Space"&&(t=" ");let r,o,i,s;for(let l=0;l127)&&(i=Ue[r.keyCode])&&i!=o){let l=e[zi(i,r)];if(l&&l(t.state,t.dispatch,t))return!0}}return!1}}var Dr=(n,e)=>n.selection.empty?!1:(e&&e(n.tr.deleteSelection().scrollIntoView()),!0);function vc(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("backward",n):t.parentOffset>0)?null:t}var Hi=(n,e,t)=>{let r=vc(n,t);if(!r)return!1;let o=Vi(r);if(!o){let s=r.blockRange(),l=s&&_e(s);return l==null?!1:(e&&e(n.tr.lift(s,l).scrollIntoView()),!0)}let i=o.nodeBefore;if(Hc(n,o,e,-1))return!0;if(r.parent.content.size==0&&(Gt(i,"end")||T.isSelectable(i)))for(let s=r.depth;;s--){let l=xn(n.doc,r.before(s),r.after(s),S.empty);if(l&&l.slice.size1)break}return i.isAtom&&o.depth==r.depth-1?(e&&e(n.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),!0):!1},Rc=(n,e,t)=>{let r=vc(n,t);if(!r)return!1;let o=Vi(r);return o?Ic(n,o,e):!1},Dc=(n,e,t)=>{let r=Pc(n,t);if(!r)return!1;let o=Wi(r);return o?Ic(n,o,e):!1};function Ic(n,e,t){let r=e.nodeBefore,o=r,i=e.pos-1;for(;!o.isTextblock;i--){if(o.type.spec.isolating)return!1;let d=o.lastChild;if(!d)return!1;o=d}let s=e.nodeAfter,l=s,a=e.pos+1;for(;!l.isTextblock;a++){if(l.type.spec.isolating)return!1;let d=l.firstChild;if(!d)return!1;l=d}let c=xn(n.doc,i,a,S.empty);if(!c||c.from!=i||c instanceof se&&c.slice.size>=a-i)return!1;if(t){let d=n.tr.step(c);d.setSelection(M.create(d.doc,i)),t(d.scrollIntoView())}return!0}function Gt(n,e,t=!1){for(let r=n;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(t&&r.childCount!=1)return!1}return!1}var $i=(n,e,t)=>{let{$head:r,empty:o}=n.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("backward",n):r.parentOffset>0)return!1;i=Vi(r)}let s=i&&i.nodeBefore;return!s||!T.isSelectable(s)?!1:(e&&e(n.tr.setSelection(T.create(n.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function Vi(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){if(n.index(e)>0)return n.doc.resolve(n.before(e+1));if(n.node(e).type.spec.isolating)break}return null}function Pc(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("forward",n):t.parentOffset{let r=Pc(n,t);if(!r)return!1;let o=Wi(r);if(!o)return!1;let i=o.nodeAfter;if(Hc(n,o,e,1))return!0;if(r.parent.content.size==0&&(Gt(i,"start")||T.isSelectable(i))){let s=xn(n.doc,r.before(),r.after(),S.empty);if(s&&s.slice.size{let{$head:r,empty:o}=n.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("forward",n):r.parentOffset=0;e--){let t=n.node(e);if(n.index(e)+1{let t=n.selection,r=t instanceof T,o;if(r){if(t.node.isTextblock||!Oe(n.doc,t.from))return!1;o=t.from}else if(o=$t(n.doc,t.from,-1),o==null)return!1;if(e){let i=n.tr.join(o);r&&i.setSelection(T.create(i.doc,o-n.doc.resolve(o).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0},Bc=(n,e)=>{let t=n.selection,r;if(t instanceof T){if(t.node.isTextblock||!Oe(n.doc,t.to))return!1;r=t.to}else if(r=$t(n.doc,t.to,1),r==null)return!1;return e&&e(n.tr.join(r).scrollIntoView()),!0},zc=(n,e)=>{let{$from:t,$to:r}=n.selection,o=t.blockRange(r),i=o&&_e(o);return i==null?!1:(e&&e(n.tr.lift(o,i).scrollIntoView()),!0)},Ki=(n,e)=>{let{$head:t,$anchor:r}=n.selection;return!t.parent.type.spec.code||!t.sameParent(r)?!1:(e&&e(n.tr.insertText(` -`).scrollIntoView()),!0)};function Ji(n){for(let e=0;e{let{$head:t,$anchor:r}=n.selection;if(!t.parent.type.spec.code||!t.sameParent(r))return!1;let o=t.node(-1),i=t.indexAfter(-1),s=Ji(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(e){let l=t.after(),a=n.tr.replaceWith(l,l,s.createAndFill());a.setSelection(A.near(a.doc.resolve(l),1)),e(a.scrollIntoView())}return!0},qi=(n,e)=>{let t=n.selection,{$from:r,$to:o}=t;if(t instanceof ue||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=Ji(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let s=(!r.parentOffset&&o.index(){let{$cursor:t}=n.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let i=t.before();if(we(n.doc,i))return e&&e(n.tr.split(i).scrollIntoView()),!0}let r=t.blockRange(),o=r&&_e(r);return o==null?!1:(e&&e(n.tr.lift(r,o).scrollIntoView()),!0)};function vp(n){return(e,t)=>{let{$from:r,$to:o}=e.selection;if(e.selection instanceof T&&e.selection.node.isBlock)return!r.parentOffset||!we(e.doc,r.pos)?!1:(t&&t(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],s,l,a=!1,c=!1;for(let h=r.depth;;h--)if(r.node(h).isBlock){a=r.end(h)==r.pos+(r.depth-h),c=r.start(h)==r.pos-(r.depth-h),l=Ji(r.node(h-1).contentMatchAt(r.indexAfter(h-1)));let m=n&&n(o.parent,a,r);i.unshift(m||(a&&l?{type:l}:null)),s=h;break}else{if(h==1)return!1;i.unshift(null)}let d=e.tr;(e.selection instanceof M||e.selection instanceof ue)&&d.deleteSelection();let u=d.mapping.map(r.pos),f=we(d.doc,u,i.length,i);if(f||(i[0]=l?{type:l}:null,f=we(d.doc,u,i.length,i)),d.split(u,i.length,i),!a&&c&&r.node(s).type!=l){let h=d.mapping.map(r.before(s)),p=d.doc.resolve(h);l&&r.node(s-1).canReplaceWith(p.index(),p.index()+1,l)&&d.setNodeMarkup(d.mapping.map(r.before(s)),l)}return t&&t(d.scrollIntoView()),!0}}var Rp=vp();var Fc=(n,e)=>{let{$from:t,to:r}=n.selection,o,i=t.sharedDepth(r);return i==0?!1:(o=t.before(i),e&&e(n.tr.setSelection(T.create(n.doc,o))),!0)},Dp=(n,e)=>(e&&e(n.tr.setSelection(new ue(n.doc))),!0);function Ip(n,e,t){let r=e.nodeBefore,o=e.nodeAfter,i=e.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(t&&t(n.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(o.isTextblock||Oe(n.doc,e.pos))?!1:(t&&t(n.tr.join(e.pos).scrollIntoView()),!0)}function Hc(n,e,t,r){let o=e.nodeBefore,i=e.nodeAfter,s,l,a=o.type.spec.isolating||i.type.spec.isolating;if(!a&&Ip(n,e,t))return!0;let c=!a&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(s=(l=o.contentMatchAt(o.childCount)).findWrapping(i.type))&&l.matchType(s[0]||i.type).validEnd){if(t){let h=e.pos+i.nodeSize,p=k.empty;for(let y=s.length-1;y>=0;y--)p=k.from(s[y].create(null,p));p=k.from(o.copy(p));let m=n.tr.step(new Y(e.pos-1,h,e.pos,h,new S(p,1,0),s.length,!0)),g=m.doc.resolve(h+2*s.length);g.nodeAfter&&g.nodeAfter.type==o.type&&Oe(m.doc,g.pos)&&m.join(g.pos),t(m.scrollIntoView())}return!0}let d=i.type.spec.isolating||r>0&&a?null:A.findFrom(e,1),u=d&&d.$from.blockRange(d.$to),f=u&&_e(u);if(f!=null&&f>=e.depth)return t&&t(n.tr.lift(u,f).scrollIntoView()),!0;if(c&&Gt(i,"start",!0)&&Gt(o,"end")){let h=o,p=[];for(;p.push(h),!h.isTextblock;)h=h.lastChild;let m=i,g=1;for(;!m.isTextblock;m=m.firstChild)g++;if(h.canReplace(h.childCount,h.childCount,m.content)){if(t){let y=k.empty;for(let O=p.length-1;O>=0;O--)y=k.from(p[O].copy(y));let w=n.tr.step(new Y(e.pos-p.length,e.pos+i.nodeSize,e.pos+g,e.pos+i.nodeSize-g,new S(y,p.length,0),0,!0));t(w.scrollIntoView())}return!0}}return!1}function $c(n){return function(e,t){let r=e.selection,o=n<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(t&&t(e.tr.setSelection(M.create(e.doc,n<0?o.start(i):o.end(i)))),!0):!1}}var Yi=$c(-1),Qi=$c(1);function Vc(n,e=null){return function(t,r){let{$from:o,$to:i}=t.selection,s=o.blockRange(i),l=s&&Ht(s,n,e);return l?(r&&r(t.tr.wrap(s,l).scrollIntoView()),!0):!1}}function Xi(n,e=null){return function(t,r){let o=!1;for(let i=0;i{if(o)return!1;if(!(!a.isTextblock||a.hasMarkup(n,e)))if(a.type==n)o=!0;else{let d=t.doc.resolve(c),u=d.index();o=d.parent.canReplaceWith(u,u+1,n)}})}if(!o)return!1;if(r){let i=t.tr;for(let s=0;s=2&&e.$from.node(e.depth-1).type.compatibleContent(t)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let a=s.resolve(e.start-2);i=new yt(a,a,e.depth),e.endIndex=0;d--)i=k.from(t[d].type.create(t[d].attrs,i));n.step(new Y(e.start-(r?2:0),e.end,e.start,e.end,new S(i,0,0),t.length,!0));let s=0;for(let d=0;ds.childCount>0&&s.firstChild.type==n);return i?t?r.node(i.depth-1).type==n?zp(e,t,n,i):Fp(e,t,i):!0:!1}}function zp(n,e,t,r){let o=n.tr,i=r.end,s=r.$to.end(r.depth);im;p--)h-=o.child(p).nodeSize,r.delete(h-1,h+1);let i=r.doc.resolve(t.start),s=i.nodeAfter;if(r.mapping.map(t.end)!=t.start+i.nodeAfter.nodeSize)return!1;let l=t.startIndex==0,a=t.endIndex==o.childCount,c=i.node(-1),d=i.index(-1);if(!c.canReplace(d+(l?0:1),d+1,s.content.append(a?k.empty:k.from(o))))return!1;let u=i.pos,f=u+s.nodeSize;return r.step(new Y(u-(l?1:0),f+(a?1:0),u+1,f-1,new S((l?k.empty:k.from(o.copy(k.empty))).append(a?k.empty:k.from(o.copy(k.empty))),l?0:1,a?0:1),l?0:1)),e(r.scrollIntoView()),!0}function Wc(n){return function(e,t){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,c=>c.childCount>0&&c.firstChild.type==n);if(!i)return!1;let s=i.startIndex;if(s==0)return!1;let l=i.parent,a=l.child(s-1);if(a.type!=n)return!1;if(t){let c=a.lastChild&&a.lastChild.type==l.type,d=k.from(c?n.create():null),u=new S(k.from(n.create(null,k.from(l.type.create(null,d)))),c?3:1,0),f=i.start,h=i.end;t(e.tr.step(new Y(f-(c?3:1),h,f,h,u,1,!0)).scrollIntoView())}return!0}}function zn(n){let{state:e,transaction:t}=n,{selection:r}=t,{doc:o}=t,{storedMarks:i}=t;return v(b({},e),{apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=t.selection,o=t.doc,i=t.storedMarks,t}})}var Nt=class{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:e,editor:t,state:r}=this,{view:o}=t,{tr:i}=r,s=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(([l,a])=>[l,(...d)=>{let u=a(...d)(s);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(i),u}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){let{rawCommands:r,editor:o,state:i}=this,{view:s}=o,l=[],a=!!e,c=e||i.tr,d=()=>(!a&&t&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(c),l.every(f=>f===!0)),u=v(b({},Object.fromEntries(Object.entries(r).map(([f,h])=>[f,(...m)=>{let g=this.buildProps(c,t),y=h(...m)(g);return l.push(y),u}]))),{run:d});return u}createCan(e){let{rawCommands:t,state:r}=this,o=!1,i=e||r.tr,s=this.buildProps(i,o),l=Object.fromEntries(Object.entries(t).map(([a,c])=>[a,(...d)=>c(...d)(v(b({},s),{dispatch:void 0}))]));return v(b({},l),{chain:()=>this.createChain(i,o)})}buildProps(e,t=!0){let{rawCommands:r,editor:o,state:i}=this,{view:s}=o,l={tr:e,editor:o,view:s,state:zn({state:i,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(r).map(([a,c])=>[a,(...d)=>c(...d)(l)]))}};return l}},ns=class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){let r=this.callbacks[e];return r&&r.forEach(o=>o.apply(this,t)),this}off(e,t){let r=this.callbacks[e];return r&&(t?this.callbacks[e]=r.filter(o=>o!==t):delete this.callbacks[e]),this}once(e,t){let r=(...o)=>{this.off(e,r),t.apply(this,o)};return this.on(e,r)}removeAllListeners(){this.callbacks={}}};function C(n,e,t){return n.config[e]===void 0&&n.parent?C(n.parent,e,t):typeof n.config[e]=="function"?n.config[e].bind(v(b({},t),{parent:n.parent?C(n.parent,e,t):null})):n.config[e]}function Fn(n){let e=n.filter(o=>o.type==="extension"),t=n.filter(o=>o.type==="node"),r=n.filter(o=>o.type==="mark");return{baseExtensions:e,nodeExtensions:t,markExtensions:r}}function ds(n){let e=[],{nodeExtensions:t,markExtensions:r}=Fn(n),o=[...t,...r],i={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return n.forEach(s=>{let l={name:s.name,options:s.options,storage:s.storage,extensions:o},a=C(s,"addGlobalAttributes",l);if(!a)return;a().forEach(d=>{d.types.forEach(u=>{Object.entries(d.attributes).forEach(([f,h])=>{e.push({type:u,name:f,attribute:b(b({},i),h)})})})})}),o.forEach(s=>{let l={name:s.name,options:s.options,storage:s.storage},a=C(s,"addAttributes",l);if(!a)return;let c=a();Object.entries(c).forEach(([d,u])=>{let f=b(b({},i),u);typeof(f==null?void 0:f.default)=="function"&&(f.default=f.default()),f!=null&&f.isRequired&&(f==null?void 0:f.default)===void 0&&delete f.default,e.push({type:s.name,name:d,attribute:f})})}),e}function X(n,e){if(typeof n=="string"){if(!e.nodes[n])throw Error(`There is no node type named '${n}'. Maybe you forgot to add the extension?`);return e.nodes[n]}return n}function N(...n){return n.filter(e=>!!e).reduce((e,t)=>{let r=b({},e);return Object.entries(t).forEach(([o,i])=>{if(!r[o]){r[o]=i;return}if(o==="class"){let l=i?i.split(" "):[],a=r[o]?r[o].split(" "):[],c=l.filter(d=>!a.includes(d));r[o]=[...a,...c].join(" ")}else if(o==="style"){let l=i?i.split(";").map(d=>d.trim()).filter(Boolean):[],a=r[o]?r[o].split(";").map(d=>d.trim()).filter(Boolean):[],c=new Map;a.forEach(d=>{let[u,f]=d.split(":").map(h=>h.trim());c.set(u,f)}),l.forEach(d=>{let[u,f]=d.split(":").map(h=>h.trim());c.set(u,f)}),r[o]=Array.from(c.entries()).map(([d,u])=>`${d}: ${u}`).join("; ")}else r[o]=i}),r},{})}function Br(n,e){return e.filter(t=>t.type===n.type.name).filter(t=>t.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(n.attrs)||{}:{[t.name]:n.attrs[t.name]}).reduce((t,r)=>N(t,r),{})}function us(n){return typeof n=="function"}function R(n,e=void 0,...t){return us(n)?e?n.bind(e)(...t):n(...t):n}function qc(n={}){return Object.keys(n).length===0&&n.constructor===Object}function Gc(n){return typeof n!="string"?n:n.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(n):n==="true"?!0:n==="false"?!1:n}function rs(n,e){return"style"in n?n:v(b({},n),{getAttrs:t=>{let r=n.getAttrs?n.getAttrs(t):n.attrs;if(r===!1)return!1;let o=e.reduce((i,s)=>{let l=s.attribute.parseHTML?s.attribute.parseHTML(t):Gc(t.getAttribute(s.name));return l==null?i:v(b({},i),{[s.name]:l})},{});return b(b({},r),o)}})}function Kc(n){return Object.fromEntries(Object.entries(n).filter(([e,t])=>e==="attrs"&&qc(t)?!1:t!=null))}function fs(n,e){var t;let r=ds(n),{nodeExtensions:o,markExtensions:i}=Fn(n),s=(t=o.find(c=>C(c,"topNode")))===null||t===void 0?void 0:t.name,l=Object.fromEntries(o.map(c=>{let d=r.filter(y=>y.type===c.name),u={name:c.name,options:c.options,storage:c.storage,editor:e},f=n.reduce((y,w)=>{let O=C(w,"extendNodeSchema",u);return b(b({},y),O?O(c):{})},{}),h=Kc(v(b({},f),{content:R(C(c,"content",u)),marks:R(C(c,"marks",u)),group:R(C(c,"group",u)),inline:R(C(c,"inline",u)),atom:R(C(c,"atom",u)),selectable:R(C(c,"selectable",u)),draggable:R(C(c,"draggable",u)),code:R(C(c,"code",u)),whitespace:R(C(c,"whitespace",u)),linebreakReplacement:R(C(c,"linebreakReplacement",u)),defining:R(C(c,"defining",u)),isolating:R(C(c,"isolating",u)),attrs:Object.fromEntries(d.map(y=>{var w;return[y.name,{default:(w=y==null?void 0:y.attribute)===null||w===void 0?void 0:w.default}]}))})),p=R(C(c,"parseHTML",u));p&&(h.parseDOM=p.map(y=>rs(y,d)));let m=C(c,"renderHTML",u);m&&(h.toDOM=y=>m({node:y,HTMLAttributes:Br(y,d)}));let g=C(c,"renderText",u);return g&&(h.toText=g),[c.name,h]})),a=Object.fromEntries(i.map(c=>{let d=r.filter(g=>g.type===c.name),u={name:c.name,options:c.options,storage:c.storage,editor:e},f=n.reduce((g,y)=>{let w=C(y,"extendMarkSchema",u);return b(b({},g),w?w(c):{})},{}),h=Kc(v(b({},f),{inclusive:R(C(c,"inclusive",u)),excludes:R(C(c,"excludes",u)),group:R(C(c,"group",u)),spanning:R(C(c,"spanning",u)),code:R(C(c,"code",u)),attrs:Object.fromEntries(d.map(g=>{var y;return[g.name,{default:(y=g==null?void 0:g.attribute)===null||y===void 0?void 0:y.default}]}))})),p=R(C(c,"parseHTML",u));p&&(h.parseDOM=p.map(g=>rs(g,d)));let m=C(c,"renderHTML",u);return m&&(h.toDOM=g=>m({mark:g,HTMLAttributes:Br(g,d)})),[c.name,h]}));return new un({topNode:s,nodes:l,marks:a})}function Lr(n,e){return e.nodes[n]||e.marks[n]||null}function is(n,e){return Array.isArray(e)?e.some(t=>(typeof t=="string"?t:t.name)===n.name):e}function Hn(n,e){let t=$e.fromSchema(e).serializeFragment(n),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(t),o.innerHTML}var Yc=(n,e=500)=>{let t="",r=n.parentOffset;return n.parent.nodesBetween(Math.max(0,r-e),r,(o,i,s,l)=>{var a,c;let d=((c=(a=o.type.spec).toText)===null||c===void 0?void 0:c.call(a,{node:o,pos:i,parent:s,index:l}))||o.textContent||"%leaf%";t+=o.isAtom&&!o.isText?d:d.slice(0,Math.max(0,r-i))}),t};function Vr(n){return Object.prototype.toString.call(n)==="[object RegExp]"}var at=class{constructor(e){this.find=e.find,this.handler=e.handler}},Hp=(n,e)=>{if(Vr(e))return e.exec(n);let t=e(n);if(!t)return null;let r=[t.text];return r.index=t.index,r.input=n,r.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(t.replaceWith)),r};function Ir(n){var e;let{editor:t,from:r,to:o,text:i,rules:s,plugin:l}=n,{view:a}=t;if(a.composing)return!1;let c=a.state.doc.resolve(r);if(c.parent.type.spec.code||!((e=c.nodeBefore||c.nodeAfter)===null||e===void 0)&&e.marks.find(f=>f.type.spec.code))return!1;let d=!1,u=Yc(c)+i;return s.forEach(f=>{if(d)return;let h=Hp(u,f.find);if(!h)return;let p=a.state.tr,m=zn({state:a.state,transaction:p}),g={from:r-(h[0].length-i.length),to:o},{commands:y,chain:w,can:O}=new Nt({editor:t,state:m});f.handler({state:m,range:g,match:h,commands:y,chain:w,can:O})===null||!p.steps.length||(p.setMeta(l,{transform:p,from:r,to:o,text:i}),a.dispatch(p),d=!0)}),d}function Qc(n){let{editor:e,rules:t}=n,r=new P({state:{init(){return null},apply(o,i,s){let l=o.getMeta(r);if(l)return l;let a=o.getMeta("applyInputRules");return!!a&&setTimeout(()=>{let{text:d}=a;typeof d=="string"?d=d:d=Hn(k.from(d),s.schema);let{from:u}=a,f=u+d.length;Ir({editor:e,from:u,to:f,text:d,rules:t,plugin:r})}),o.selectionSet||o.docChanged?null:i}},props:{handleTextInput(o,i,s,l){return Ir({editor:e,from:i,to:s,text:l,rules:t,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{let{$cursor:i}=o.state.selection;i&&Ir({editor:e,from:i.pos,to:i.pos,text:"",rules:t,plugin:r})}),!1)},handleKeyDown(o,i){if(i.key!=="Enter")return!1;let{$cursor:s}=o.state.selection;return s?Ir({editor:e,from:s.pos,to:s.pos,text:` +`).scrollIntoView()),!0)};function Ji(n){for(let e=0;e{let{$head:t,$anchor:r}=n.selection;if(!t.parent.type.spec.code||!t.sameParent(r))return!1;let o=t.node(-1),i=t.indexAfter(-1),s=Ji(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(e){let l=t.after(),a=n.tr.replaceWith(l,l,s.createAndFill());a.setSelection(A.near(a.doc.resolve(l),1)),e(a.scrollIntoView())}return!0},qi=(n,e)=>{let t=n.selection,{$from:r,$to:o}=t;if(t instanceof ue||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=Ji(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let s=(!r.parentOffset&&o.index(){let{$cursor:t}=n.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let i=t.before();if(we(n.doc,i))return e&&e(n.tr.split(i).scrollIntoView()),!0}let r=t.blockRange(),o=r&&_e(r);return o==null?!1:(e&&e(n.tr.lift(r,o).scrollIntoView()),!0)};function vp(n){return(e,t)=>{let{$from:r,$to:o}=e.selection;if(e.selection instanceof T&&e.selection.node.isBlock)return!r.parentOffset||!we(e.doc,r.pos)?!1:(t&&t(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],s,l,a=!1,c=!1;for(let h=r.depth;;h--)if(r.node(h).isBlock){a=r.end(h)==r.pos+(r.depth-h),c=r.start(h)==r.pos-(r.depth-h),l=Ji(r.node(h-1).contentMatchAt(r.indexAfter(h-1)));let m=n&&n(o.parent,a,r);i.unshift(m||(a&&l?{type:l}:null)),s=h;break}else{if(h==1)return!1;i.unshift(null)}let d=e.tr;(e.selection instanceof M||e.selection instanceof ue)&&d.deleteSelection();let u=d.mapping.map(r.pos),f=we(d.doc,u,i.length,i);if(f||(i[0]=l?{type:l}:null,f=we(d.doc,u,i.length,i)),d.split(u,i.length,i),!a&&c&&r.node(s).type!=l){let h=d.mapping.map(r.before(s)),p=d.doc.resolve(h);l&&r.node(s-1).canReplaceWith(p.index(),p.index()+1,l)&&d.setNodeMarkup(d.mapping.map(r.before(s)),l)}return t&&t(d.scrollIntoView()),!0}}var Rp=vp();var Fc=(n,e)=>{let{$from:t,to:r}=n.selection,o,i=t.sharedDepth(r);return i==0?!1:(o=t.before(i),e&&e(n.tr.setSelection(T.create(n.doc,o))),!0)},Dp=(n,e)=>(e&&e(n.tr.setSelection(new ue(n.doc))),!0);function Ip(n,e,t){let r=e.nodeBefore,o=e.nodeAfter,i=e.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(t&&t(n.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(o.isTextblock||Oe(n.doc,e.pos))?!1:(t&&t(n.tr.join(e.pos).scrollIntoView()),!0)}function Hc(n,e,t,r){let o=e.nodeBefore,i=e.nodeAfter,s,l,a=o.type.spec.isolating||i.type.spec.isolating;if(!a&&Ip(n,e,t))return!0;let c=!a&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(s=(l=o.contentMatchAt(o.childCount)).findWrapping(i.type))&&l.matchType(s[0]||i.type).validEnd){if(t){let h=e.pos+i.nodeSize,p=k.empty;for(let y=s.length-1;y>=0;y--)p=k.from(s[y].create(null,p));p=k.from(o.copy(p));let m=n.tr.step(new Y(e.pos-1,h,e.pos,h,new S(p,1,0),s.length,!0)),g=m.doc.resolve(h+2*s.length);g.nodeAfter&&g.nodeAfter.type==o.type&&Oe(m.doc,g.pos)&&m.join(g.pos),t(m.scrollIntoView())}return!0}let d=i.type.spec.isolating||r>0&&a?null:A.findFrom(e,1),u=d&&d.$from.blockRange(d.$to),f=u&&_e(u);if(f!=null&&f>=e.depth)return t&&t(n.tr.lift(u,f).scrollIntoView()),!0;if(c&&Gt(i,"start",!0)&&Gt(o,"end")){let h=o,p=[];for(;p.push(h),!h.isTextblock;)h=h.lastChild;let m=i,g=1;for(;!m.isTextblock;m=m.firstChild)g++;if(h.canReplace(h.childCount,h.childCount,m.content)){if(t){let y=k.empty;for(let O=p.length-1;O>=0;O--)y=k.from(p[O].copy(y));let w=n.tr.step(new Y(e.pos-p.length,e.pos+i.nodeSize,e.pos+g,e.pos+i.nodeSize-g,new S(y,p.length,0),0,!0));t(w.scrollIntoView())}return!0}}return!1}function $c(n){return function(e,t){let r=e.selection,o=n<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(t&&t(e.tr.setSelection(M.create(e.doc,n<0?o.start(i):o.end(i)))),!0):!1}}var Yi=$c(-1),Qi=$c(1);function Vc(n,e=null){return function(t,r){let{$from:o,$to:i}=t.selection,s=o.blockRange(i),l=s&&Ht(s,n,e);return l?(r&&r(t.tr.wrap(s,l).scrollIntoView()),!0):!1}}function Xi(n,e=null){return function(t,r){let o=!1;for(let i=0;i{if(o)return!1;if(!(!a.isTextblock||a.hasMarkup(n,e)))if(a.type==n)o=!0;else{let d=t.doc.resolve(c),u=d.index();o=d.parent.canReplaceWith(u,u+1,n)}})}if(!o)return!1;if(r){let i=t.tr;for(let s=0;s=2&&e.$from.node(e.depth-1).type.compatibleContent(t)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let a=s.resolve(e.start-2);i=new yt(a,a,e.depth),e.endIndex=0;d--)i=k.from(t[d].type.create(t[d].attrs,i));n.step(new Y(e.start-(r?2:0),e.end,e.start,e.end,new S(i,0,0),t.length,!0));let s=0;for(let d=0;ds.childCount>0&&s.firstChild.type==n);return i?t?r.node(i.depth-1).type==n?zp(e,t,n,i):Fp(e,t,i):!0:!1}}function zp(n,e,t,r){let o=n.tr,i=r.end,s=r.$to.end(r.depth);im;p--)h-=o.child(p).nodeSize,r.delete(h-1,h+1);let i=r.doc.resolve(t.start),s=i.nodeAfter;if(r.mapping.map(t.end)!=t.start+i.nodeAfter.nodeSize)return!1;let l=t.startIndex==0,a=t.endIndex==o.childCount,c=i.node(-1),d=i.index(-1);if(!c.canReplace(d+(l?0:1),d+1,s.content.append(a?k.empty:k.from(o))))return!1;let u=i.pos,f=u+s.nodeSize;return r.step(new Y(u-(l?1:0),f+(a?1:0),u+1,f-1,new S((l?k.empty:k.from(o.copy(k.empty))).append(a?k.empty:k.from(o.copy(k.empty))),l?0:1,a?0:1),l?0:1)),e(r.scrollIntoView()),!0}function Wc(n){return function(e,t){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,c=>c.childCount>0&&c.firstChild.type==n);if(!i)return!1;let s=i.startIndex;if(s==0)return!1;let l=i.parent,a=l.child(s-1);if(a.type!=n)return!1;if(t){let c=a.lastChild&&a.lastChild.type==l.type,d=k.from(c?n.create():null),u=new S(k.from(n.create(null,k.from(l.type.create(null,d)))),c?3:1,0),f=i.start,h=i.end;t(e.tr.step(new Y(f-(c?3:1),h,f,h,u,1,!0)).scrollIntoView())}return!0}}function zn(n){let{state:e,transaction:t}=n,{selection:r}=t,{doc:o}=t,{storedMarks:i}=t;return v(b({},e),{apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=t.selection,o=t.doc,i=t.storedMarks,t}})}var Nt=class{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:e,editor:t,state:r}=this,{view:o}=t,{tr:i}=r,s=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(([l,a])=>[l,(...d)=>{let u=a(...d)(s);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(i),u}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){let{rawCommands:r,editor:o,state:i}=this,{view:s}=o,l=[],a=!!e,c=e||i.tr,d=()=>(!a&&t&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(c),l.every(f=>f===!0)),u=v(b({},Object.fromEntries(Object.entries(r).map(([f,h])=>[f,(...m)=>{let g=this.buildProps(c,t),y=h(...m)(g);return l.push(y),u}]))),{run:d});return u}createCan(e){let{rawCommands:t,state:r}=this,o=!1,i=e||r.tr,s=this.buildProps(i,o),l=Object.fromEntries(Object.entries(t).map(([a,c])=>[a,(...d)=>c(...d)(v(b({},s),{dispatch:void 0}))]));return v(b({},l),{chain:()=>this.createChain(i,o)})}buildProps(e,t=!0){let{rawCommands:r,editor:o,state:i}=this,{view:s}=o,l={tr:e,editor:o,view:s,state:zn({state:i,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(r).map(([a,c])=>[a,(...d)=>c(...d)(l)]))}};return l}},ns=class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){let r=this.callbacks[e];return r&&r.forEach(o=>o.apply(this,t)),this}off(e,t){let r=this.callbacks[e];return r&&(t?this.callbacks[e]=r.filter(o=>o!==t):delete this.callbacks[e]),this}once(e,t){let r=(...o)=>{this.off(e,r),t.apply(this,o)};return this.on(e,r)}removeAllListeners(){this.callbacks={}}};function C(n,e,t){return n.config[e]===void 0&&n.parent?C(n.parent,e,t):typeof n.config[e]=="function"?n.config[e].bind(v(b({},t),{parent:n.parent?C(n.parent,e,t):null})):n.config[e]}function Fn(n){let e=n.filter(o=>o.type==="extension"),t=n.filter(o=>o.type==="node"),r=n.filter(o=>o.type==="mark");return{baseExtensions:e,nodeExtensions:t,markExtensions:r}}function ds(n){let e=[],{nodeExtensions:t,markExtensions:r}=Fn(n),o=[...t,...r],i={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return n.forEach(s=>{let l={name:s.name,options:s.options,storage:s.storage,extensions:o},a=C(s,"addGlobalAttributes",l);if(!a)return;a().forEach(d=>{d.types.forEach(u=>{Object.entries(d.attributes).forEach(([f,h])=>{e.push({type:u,name:f,attribute:b(b({},i),h)})})})})}),o.forEach(s=>{let l={name:s.name,options:s.options,storage:s.storage},a=C(s,"addAttributes",l);if(!a)return;let c=a();Object.entries(c).forEach(([d,u])=>{let f=b(b({},i),u);typeof(f==null?void 0:f.default)=="function"&&(f.default=f.default()),f!=null&&f.isRequired&&(f==null?void 0:f.default)===void 0&&delete f.default,e.push({type:s.name,name:d,attribute:f})})}),e}function X(n,e){if(typeof n=="string"){if(!e.nodes[n])throw Error(`There is no node type named '${n}'. Maybe you forgot to add the extension?`);return e.nodes[n]}return n}function N(...n){return n.filter(e=>!!e).reduce((e,t)=>{let r=b({},e);return Object.entries(t).forEach(([o,i])=>{if(!r[o]){r[o]=i;return}if(o==="class"){let l=i?String(i).split(" "):[],a=r[o]?r[o].split(" "):[],c=l.filter(d=>!a.includes(d));r[o]=[...a,...c].join(" ")}else if(o==="style"){let l=i?i.split(";").map(d=>d.trim()).filter(Boolean):[],a=r[o]?r[o].split(";").map(d=>d.trim()).filter(Boolean):[],c=new Map;a.forEach(d=>{let[u,f]=d.split(":").map(h=>h.trim());c.set(u,f)}),l.forEach(d=>{let[u,f]=d.split(":").map(h=>h.trim());c.set(u,f)}),r[o]=Array.from(c.entries()).map(([d,u])=>`${d}: ${u}`).join("; ")}else r[o]=i}),r},{})}function Br(n,e){return e.filter(t=>t.type===n.type.name).filter(t=>t.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(n.attrs)||{}:{[t.name]:n.attrs[t.name]}).reduce((t,r)=>N(t,r),{})}function us(n){return typeof n=="function"}function R(n,e=void 0,...t){return us(n)?e?n.bind(e)(...t):n(...t):n}function qc(n={}){return Object.keys(n).length===0&&n.constructor===Object}function Gc(n){return typeof n!="string"?n:n.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(n):n==="true"?!0:n==="false"?!1:n}function rs(n,e){return"style"in n?n:v(b({},n),{getAttrs:t=>{let r=n.getAttrs?n.getAttrs(t):n.attrs;if(r===!1)return!1;let o=e.reduce((i,s)=>{let l=s.attribute.parseHTML?s.attribute.parseHTML(t):Gc(t.getAttribute(s.name));return l==null?i:v(b({},i),{[s.name]:l})},{});return b(b({},r),o)}})}function Kc(n){return Object.fromEntries(Object.entries(n).filter(([e,t])=>e==="attrs"&&qc(t)?!1:t!=null))}function fs(n,e){var t;let r=ds(n),{nodeExtensions:o,markExtensions:i}=Fn(n),s=(t=o.find(c=>C(c,"topNode")))===null||t===void 0?void 0:t.name,l=Object.fromEntries(o.map(c=>{let d=r.filter(y=>y.type===c.name),u={name:c.name,options:c.options,storage:c.storage,editor:e},f=n.reduce((y,w)=>{let O=C(w,"extendNodeSchema",u);return b(b({},y),O?O(c):{})},{}),h=Kc(v(b({},f),{content:R(C(c,"content",u)),marks:R(C(c,"marks",u)),group:R(C(c,"group",u)),inline:R(C(c,"inline",u)),atom:R(C(c,"atom",u)),selectable:R(C(c,"selectable",u)),draggable:R(C(c,"draggable",u)),code:R(C(c,"code",u)),whitespace:R(C(c,"whitespace",u)),linebreakReplacement:R(C(c,"linebreakReplacement",u)),defining:R(C(c,"defining",u)),isolating:R(C(c,"isolating",u)),attrs:Object.fromEntries(d.map(y=>{var w;return[y.name,{default:(w=y==null?void 0:y.attribute)===null||w===void 0?void 0:w.default}]}))})),p=R(C(c,"parseHTML",u));p&&(h.parseDOM=p.map(y=>rs(y,d)));let m=C(c,"renderHTML",u);m&&(h.toDOM=y=>m({node:y,HTMLAttributes:Br(y,d)}));let g=C(c,"renderText",u);return g&&(h.toText=g),[c.name,h]})),a=Object.fromEntries(i.map(c=>{let d=r.filter(g=>g.type===c.name),u={name:c.name,options:c.options,storage:c.storage,editor:e},f=n.reduce((g,y)=>{let w=C(y,"extendMarkSchema",u);return b(b({},g),w?w(c):{})},{}),h=Kc(v(b({},f),{inclusive:R(C(c,"inclusive",u)),excludes:R(C(c,"excludes",u)),group:R(C(c,"group",u)),spanning:R(C(c,"spanning",u)),code:R(C(c,"code",u)),attrs:Object.fromEntries(d.map(g=>{var y;return[g.name,{default:(y=g==null?void 0:g.attribute)===null||y===void 0?void 0:y.default}]}))})),p=R(C(c,"parseHTML",u));p&&(h.parseDOM=p.map(g=>rs(g,d)));let m=C(c,"renderHTML",u);return m&&(h.toDOM=g=>m({mark:g,HTMLAttributes:Br(g,d)})),[c.name,h]}));return new un({topNode:s,nodes:l,marks:a})}function Lr(n,e){return e.nodes[n]||e.marks[n]||null}function is(n,e){return Array.isArray(e)?e.some(t=>(typeof t=="string"?t:t.name)===n.name):e}function Hn(n,e){let t=$e.fromSchema(e).serializeFragment(n),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(t),o.innerHTML}var Yc=(n,e=500)=>{let t="",r=n.parentOffset;return n.parent.nodesBetween(Math.max(0,r-e),r,(o,i,s,l)=>{var a,c;let d=((c=(a=o.type.spec).toText)===null||c===void 0?void 0:c.call(a,{node:o,pos:i,parent:s,index:l}))||o.textContent||"%leaf%";t+=o.isAtom&&!o.isText?d:d.slice(0,Math.max(0,r-i))}),t};function Vr(n){return Object.prototype.toString.call(n)==="[object RegExp]"}var at=class{constructor(e){this.find=e.find,this.handler=e.handler}},Hp=(n,e)=>{if(Vr(e))return e.exec(n);let t=e(n);if(!t)return null;let r=[t.text];return r.index=t.index,r.input=n,r.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(t.replaceWith)),r};function Ir(n){var e;let{editor:t,from:r,to:o,text:i,rules:s,plugin:l}=n,{view:a}=t;if(a.composing)return!1;let c=a.state.doc.resolve(r);if(c.parent.type.spec.code||!((e=c.nodeBefore||c.nodeAfter)===null||e===void 0)&&e.marks.find(f=>f.type.spec.code))return!1;let d=!1,u=Yc(c)+i;return s.forEach(f=>{if(d)return;let h=Hp(u,f.find);if(!h)return;let p=a.state.tr,m=zn({state:a.state,transaction:p}),g={from:r-(h[0].length-i.length),to:o},{commands:y,chain:w,can:O}=new Nt({editor:t,state:m});f.handler({state:m,range:g,match:h,commands:y,chain:w,can:O})===null||!p.steps.length||(p.setMeta(l,{transform:p,from:r,to:o,text:i}),a.dispatch(p),d=!0)}),d}function Qc(n){let{editor:e,rules:t}=n,r=new P({state:{init(){return null},apply(o,i,s){let l=o.getMeta(r);if(l)return l;let a=o.getMeta("applyInputRules");return!!a&&setTimeout(()=>{let{text:d}=a;typeof d=="string"?d=d:d=Hn(k.from(d),s.schema);let{from:u}=a,f=u+d.length;Ir({editor:e,from:u,to:f,text:d,rules:t,plugin:r})}),o.selectionSet||o.docChanged?null:i}},props:{handleTextInput(o,i,s,l){return Ir({editor:e,from:i,to:s,text:l,rules:t,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{let{$cursor:i}=o.state.selection;i&&Ir({editor:e,from:i.pos,to:i.pos,text:"",rules:t,plugin:r})}),!1)},handleKeyDown(o,i){if(i.key!=="Enter")return!1;let{$cursor:s}=o.state.selection;return s?Ir({editor:e,from:s.pos,to:s.pos,text:` `,rules:t,plugin:r}):!1}},isInputRules:!0});return r}function $p(n){return Object.prototype.toString.call(n).slice(8,-1)}function Dn(n){return $p(n)!=="Object"?!1:n.constructor===Object&&Object.getPrototypeOf(n)===Object.prototype}function $n(n,e){let t=b({},n);return Dn(n)&&Dn(e)&&Object.keys(e).forEach(r=>{Dn(e[r])&&Dn(n[r])?t[r]=$n(n[r],e[r]):t[r]=e[r]}),t}var K=class n{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=b(b({},this.config),e),this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=R(C(this,"addOptions",{name:this.name}))),this.storage=R(C(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new n(e)}configure(e={}){let t=this.extend(v(b({},this.config),{addOptions:()=>$n(this.options,e)}));return t.name=this.name,t.parent=this.parent,t}extend(e={}){let t=new n(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=R(C(t,"addOptions",{name:t.name})),t.storage=R(C(t,"addStorage",{name:t.name,options:t.options})),t}static handleExit({editor:e,mark:t}){let{tr:r}=e.state,o=e.state.selection.$from;if(o.pos===o.end()){let s=o.marks();if(!!!s.find(c=>(c==null?void 0:c.type.name)===t.name))return!1;let a=s.find(c=>(c==null?void 0:c.type.name)===t.name);return a&&r.removeStoredMark(a),r.insertText(" ",o.pos),e.view.dispatch(r),!0}return!1}};function Xc(n){return typeof n=="number"}var Qt=class{constructor(e){this.find=e.find,this.handler=e.handler}},Vp=(n,e,t)=>{if(Vr(e))return[...n.matchAll(e)];let r=e(n,t);return r?r.map(o=>{let i=[o.text];return i.index=o.index,i.input=n,i.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(o.replaceWith)),i}):[]};function _p(n){let{editor:e,state:t,from:r,to:o,rule:i,pasteEvent:s,dropEvent:l}=n,{commands:a,chain:c,can:d}=new Nt({editor:e,state:t}),u=[];return t.doc.nodesBetween(r,o,(h,p)=>{if(!h.isTextblock||h.type.spec.code)return;let m=Math.max(r,p),g=Math.min(o,p+h.content.size),y=h.textBetween(m-p,g-p,void 0,"\uFFFC");Vp(y,i.find,s).forEach(O=>{if(O.index===void 0)return;let L=m+O.index+1,E=L+O[0].length,I={from:t.tr.mapping.map(L),to:t.tr.mapping.map(E)},W=i.handler({state:t,range:I,match:O,commands:a,chain:c,can:d,pasteEvent:s,dropEvent:l});u.push(W)})}),u.every(h=>h!==null)}var Pr=null,jp=n=>{var e;let t=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=t.clipboardData)===null||e===void 0||e.setData("text/html",n),t};function Zc(n){let{editor:e,rules:t}=n,r=null,o=!1,i=!1,s=typeof ClipboardEvent!="undefined"?new ClipboardEvent("paste"):null,l;try{l=typeof DragEvent!="undefined"?new DragEvent("drop"):null}catch(d){l=null}let a=({state:d,from:u,to:f,rule:h,pasteEvt:p})=>{let m=d.tr,g=zn({state:d,transaction:m});if(!(!_p({editor:e,state:g,from:Math.max(u-1,0),to:f.b-1,rule:h,pasteEvent:p,dropEvent:l})||!m.steps.length)){try{l=typeof DragEvent!="undefined"?new DragEvent("drop"):null}catch(w){l=null}return s=typeof ClipboardEvent!="undefined"?new ClipboardEvent("paste"):null,m}};return t.map(d=>new P({view(u){let f=p=>{var m;r=!((m=u.dom.parentElement)===null||m===void 0)&&m.contains(p.target)?u.dom.parentElement:null,r&&(Pr=e)},h=()=>{Pr&&(Pr=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",h),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",h)}}},props:{handleDOMEvents:{drop:(u,f)=>{if(i=r===u.dom.parentElement,l=f,!i){let h=Pr;h&&setTimeout(()=>{let p=h.state.selection;p&&h.commands.deleteRange({from:p.from,to:p.to})},10)}return!1},paste:(u,f)=>{var h;let p=(h=f.clipboardData)===null||h===void 0?void 0:h.getData("text/html");return s=f,o=!!(p!=null&&p.includes("data-pm-slice")),!1}}},appendTransaction:(u,f,h)=>{let p=u[0],m=p.getMeta("uiEvent")==="paste"&&!o,g=p.getMeta("uiEvent")==="drop"&&!i,y=p.getMeta("applyPasteRules"),w=!!y;if(!m&&!g&&!w)return;if(w){let{text:E}=y;typeof E=="string"?E=E:E=Hn(k.from(E),h.schema);let{from:I}=y,W=I+E.length,q=jp(E);return a({rule:d,state:h,from:I,to:{b:W},pasteEvt:q})}let O=f.doc.content.findDiffStart(h.doc.content),L=f.doc.content.findDiffEnd(h.doc.content);if(!(!Xc(O)||!L||O===L.b))return a({rule:d,state:h,from:O,to:L,pasteEvt:s})}}))}function ed(n){let e=n.filter((t,r)=>n.indexOf(t)!==r);return Array.from(new Set(e))}var zr=class n{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=n.resolve(e),this.schema=fs(this.extensions,t),this.setupExtensions()}static resolve(e){let t=n.sort(n.flatten(e)),r=ed(t.map(o=>o.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(o=>`'${o}'`).join(", ")}]. This can lead to issues.`),t}static flatten(e){return e.map(t=>{let r={name:t.name,options:t.options,storage:t.storage},o=C(t,"addExtensions",r);return o?[t,...this.flatten(o())]:t}).flat(10)}static sort(e){return e.sort((r,o)=>{let i=C(r,"priority")||100,s=C(o,"priority")||100;return i>s?-1:i{let r={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:Lr(t.name,this.schema)},o=C(t,"addCommands",r);return o?b(b({},e),o()):e},{})}get plugins(){let{editor:e}=this,t=n.sort([...this.extensions].reverse()),r=[],o=[],i=t.map(s=>{let l={name:s.name,options:s.options,storage:s.storage,editor:e,type:Lr(s.name,this.schema)},a=[],c=C(s,"addKeyboardShortcuts",l),d={};if(s.type==="mark"&&C(s,"exitable",l)&&(d.ArrowRight=()=>K.handleExit({editor:e,mark:s})),c){let m=Object.fromEntries(Object.entries(c()).map(([g,y])=>[g,()=>y({editor:e})]));d=b(b({},d),m)}let u=Oc(d);a.push(u);let f=C(s,"addInputRules",l);is(s,e.options.enableInputRules)&&f&&r.push(...f());let h=C(s,"addPasteRules",l);is(s,e.options.enablePasteRules)&&h&&o.push(...h());let p=C(s,"addProseMirrorPlugins",l);if(p){let m=p();a.push(...m)}return a}).flat();return[Qc({editor:e,rules:r}),...Zc({editor:e,rules:o}),...i]}get attributes(){return ds(this.extensions)}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=Fn(this.extensions);return Object.fromEntries(t.filter(r=>!!C(r,"addNodeView")).map(r=>{let o=this.attributes.filter(a=>a.type===r.name),i={name:r.name,options:r.options,storage:r.storage,editor:e,type:X(r.name,this.schema)},s=C(r,"addNodeView",i);if(!s)return[];let l=(a,c,d,u,f)=>{let h=Br(a,o);return s()({node:a,view:c,getPos:d,decorations:u,innerDecorations:f,editor:e,extension:r,HTMLAttributes:h})};return[r.name,l]}))}setupExtensions(){this.extensions.forEach(e=>{var t;this.editor.extensionStorage[e.name]=e.storage;let r={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:Lr(e.name,this.schema)};e.type==="mark"&&(!((t=R(C(e,"keepOnSplit",r)))!==null&&t!==void 0)||t)&&this.splittableMarks.push(e.name);let o=C(e,"onBeforeCreate",r),i=C(e,"onCreate",r),s=C(e,"onUpdate",r),l=C(e,"onSelectionUpdate",r),a=C(e,"onTransaction",r),c=C(e,"onFocus",r),d=C(e,"onBlur",r),u=C(e,"onDestroy",r);o&&this.editor.on("beforeCreate",o),i&&this.editor.on("create",i),s&&this.editor.on("update",s),l&&this.editor.on("selectionUpdate",l),a&&this.editor.on("transaction",a),c&&this.editor.on("focus",c),d&&this.editor.on("blur",d),u&&this.editor.on("destroy",u)})}},H=class n{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=b(b({},this.config),e),this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=R(C(this,"addOptions",{name:this.name}))),this.storage=R(C(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new n(e)}configure(e={}){let t=this.extend(v(b({},this.config),{addOptions:()=>$n(this.options,e)}));return t.name=this.name,t.parent=this.parent,t}extend(e={}){let t=new n(b(b({},this.config),e));return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=R(C(t,"addOptions",{name:t.name})),t.storage=R(C(t,"addStorage",{name:t.name,options:t.options})),t}};function hs(n,e,t){let{from:r,to:o}=e,{blockSeparator:i=` `,textSerializers:s={}}=t||{},l="";return n.nodesBetween(r,o,(a,c,d,u)=>{var f;a.isBlock&&c>r&&(l+=i);let h=s==null?void 0:s[a.type.name];if(h)return d&&(l+=h({node:a,pos:c,parent:d,index:u,range:e})),!1;a.isText&&(l+=(f=a==null?void 0:a.text)===null||f===void 0?void 0:f.slice(Math.max(r,c)-c,o-c))}),l}function _r(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}var td=H.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new P({key:new V("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{let{editor:n}=this,{state:e,schema:t}=n,{doc:r,selection:o}=e,{ranges:i}=o,s=Math.min(...i.map(d=>d.$from.pos)),l=Math.max(...i.map(d=>d.$to.pos)),a=_r(t);return hs(r,{from:s,to:l},v(b({},this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{}),{textSerializers:a}))}}})]}}),Wp=()=>({editor:n,view:e})=>(requestAnimationFrame(()=>{var t;n.isDestroyed||(e.dom.blur(),(t=window==null?void 0:window.getSelection())===null||t===void 0||t.removeAllRanges())}),!0),Kp=(n=!1)=>({commands:e})=>e.setContent("",n),Jp=()=>({state:n,tr:e,dispatch:t})=>{let{selection:r}=e,{ranges:o}=r;return t&&o.forEach(({$from:i,$to:s})=>{n.doc.nodesBetween(i.pos,s.pos,(l,a)=>{if(l.type.isText)return;let{doc:c,mapping:d}=e,u=c.resolve(d.map(a)),f=c.resolve(d.map(a+l.nodeSize)),h=u.blockRange(f);if(!h)return;let p=_e(h);if(l.type.isTextblock){let{defaultType:m}=u.parent.contentMatchAt(u.index());e.setNodeMarkup(h.start,m)}(p||p===0)&&e.lift(h,p)})}),!0},Up=n=>e=>n(e),qp=()=>({state:n,dispatch:e})=>qi(n,e),Gp=(n,e)=>({editor:t,tr:r})=>{let{state:o}=t,i=o.doc.slice(n.from,n.to);r.deleteRange(n.from,n.to);let s=r.mapping.map(e);return r.insert(s,i.content),r.setSelection(new M(r.doc.resolve(s-1))),!0},Yp=()=>({tr:n,dispatch:e})=>{let{selection:t}=n,r=t.$anchor.node();if(r.content.size>0)return!1;let o=n.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===r.type){if(e){let l=o.before(i),a=o.after(i);n.delete(l,a).scrollIntoView()}return!0}return!1},Qp=n=>({tr:e,state:t,dispatch:r})=>{let o=X(n,t.schema),i=e.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===o){if(r){let a=i.before(s),c=i.after(s);e.delete(a,c).scrollIntoView()}return!0}return!1},Xp=n=>({tr:e,dispatch:t})=>{let{from:r,to:o}=n;return t&&e.delete(r,o),!0},Zp=()=>({state:n,dispatch:e})=>Dr(n,e),em=()=>({commands:n})=>n.keyboardShortcut("Enter"),tm=()=>({state:n,dispatch:e})=>Ui(n,e);function Pn(n,e,t={strict:!0}){let r=Object.keys(e);return r.length?r.every(o=>t.strict?e[o]===n[o]:Vr(e[o])?e[o].test(n[o]):e[o]===n[o]):!0}function nd(n,e,t={}){return n.find(r=>r.type===e&&Pn(Object.fromEntries(Object.keys(t).map(o=>[o,r.attrs[o]])),t))}function Jc(n,e,t={}){return!!nd(n,e,t)}function jr(n,e,t){var r;if(!n||!e)return;let o=n.parent.childAfter(n.parentOffset);if((!o.node||!o.node.marks.some(d=>d.type===e))&&(o=n.parent.childBefore(n.parentOffset)),!o.node||!o.node.marks.some(d=>d.type===e)||(t=t||((r=o.node.marks[0])===null||r===void 0?void 0:r.attrs),!nd([...o.node.marks],e,t)))return;let s=o.index,l=n.start()+o.offset,a=s+1,c=l+o.node.nodeSize;for(;s>0&&Jc([...n.parent.child(s-1).marks],e,t);)s-=1,l-=n.parent.child(s).nodeSize;for(;a({tr:t,state:r,dispatch:o})=>{let i=qe(n,r.schema),{doc:s,selection:l}=t,{$from:a,from:c,to:d}=l;if(o){let u=jr(a,i,e);if(u&&u.from<=c&&u.to>=d){let f=M.create(s,u.from,u.to);t.setSelection(f)}}return!0},rm=n=>e=>{let t=typeof n=="function"?n(e):n;for(let r=0;r({editor:t,view:r,tr:o,dispatch:i})=>{e=b({scrollIntoView:!0},e);let s=()=>{r.dom.focus(),requestAnimationFrame(()=>{t.isDestroyed||(r.focus(),e!=null&&e.scrollIntoView&&t.commands.scrollIntoView())})};if(r.hasFocus()&&n===null||n===!1)return!0;if(i&&n===null&&!ps(t.state.selection))return s(),!0;let l=ms(o.doc,n)||t.state.selection,a=t.state.selection.eq(l);return i&&(a||o.setSelection(l),a&&o.storedMarks&&o.setStoredMarks(o.storedMarks),s()),!0},im=(n,e)=>t=>n.every((r,o)=>e(r,v(b({},t),{index:o}))),sm=(n,e)=>({tr:t,commands:r})=>r.insertContentAt({from:t.selection.from,to:t.selection.to},n,e),rd=n=>{let e=n.childNodes;for(let t=e.length-1;t>=0;t-=1){let r=e[t];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?n.removeChild(r):r.nodeType===1&&rd(r)}return n};function Yt(n){let e=`${n}`,t=new window.DOMParser().parseFromString(e,"text/html").body;return rd(t)}function Ln(n,e,t){if(n instanceof ge||n instanceof k)return n;t=b({slice:!0,parseOptions:{}},t);let r=typeof n=="object"&&n!==null,o=typeof n=="string";if(r)try{if(Array.isArray(n)&&n.length>0)return k.fromArray(n.map(l=>e.nodeFromJSON(l)));let s=e.nodeFromJSON(n);return t.errorOnInvalidContent&&s.check(),s}catch(i){if(t.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return console.warn("[tiptap warn]: Invalid content.","Passed value:",n,"Error:",i),Ln("",e,t)}if(o){if(t.errorOnInvalidContent){let s=!1,l="",a=new un({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(s=!0,l=typeof c=="string"?c:c.outerHTML,null)}]}})});if(t.slice?Re.fromSchema(a).parseSlice(Yt(n),t.parseOptions):Re.fromSchema(a).parse(Yt(n),t.parseOptions),t.errorOnInvalidContent&&s)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${l}`)})}let i=Re.fromSchema(e);return t.slice?i.parseSlice(Yt(n),t.parseOptions).content:i.parse(Yt(n),t.parseOptions)}return Ln("",e,t)}function od(n,e,t){let r=n.steps.length-1;if(r{s===0&&(s=d)}),n.setSelection(A.near(n.doc.resolve(s),t))}var lm=n=>!("type"in n),am=(n,e,t)=>({tr:r,dispatch:o,editor:i})=>{var s;if(o){t=b({parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1},t);let l;try{l=Ln(e,i.schema,{parseOptions:b({preserveWhitespace:"full"},t.parseOptions),errorOnInvalidContent:(s=t.errorOnInvalidContent)!==null&&s!==void 0?s:i.options.enableContentCheck})}catch(p){return i.emit("contentError",{editor:i,error:p,disableCollaboration:()=>{i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}}),!1}let{from:a,to:c}=typeof n=="number"?{from:n,to:n}:{from:n.from,to:n.to},d=!0,u=!0;if((lm(l)?l:[l]).forEach(p=>{p.check(),d=d?p.isText&&p.marks.length===0:!1,u=u?p.isBlock:!1}),a===c&&u){let{parent:p}=r.doc.resolve(a);p.isTextblock&&!p.type.spec.code&&!p.childCount&&(a-=1,c+=1)}let h;if(d){if(Array.isArray(e))h=e.map(p=>p.text||"").join("");else if(e instanceof k){let p="";e.forEach(m=>{m.text&&(p+=m.text)}),h=p}else typeof e=="object"&&e&&e.text?h=e.text:h=e;r.insertText(h,a,c)}else h=l,r.replaceWith(a,c,h);t.updateSelection&&od(r,r.steps.length-1,-1),t.applyInputRules&&r.setMeta("applyInputRules",{from:a,text:h}),t.applyPasteRules&&r.setMeta("applyPasteRules",{from:a,text:h})}return!0},cm=()=>({state:n,dispatch:e})=>Lc(n,e),dm=()=>({state:n,dispatch:e})=>Bc(n,e),um=()=>({state:n,dispatch:e})=>Hi(n,e),fm=()=>({state:n,dispatch:e})=>_i(n,e),hm=()=>({state:n,dispatch:e,tr:t})=>{try{let r=$t(n.doc,n.selection.$from.pos,-1);return r==null?!1:(t.join(r,2),e&&e(t),!0)}catch(r){return!1}},pm=()=>({state:n,dispatch:e,tr:t})=>{try{let r=$t(n.doc,n.selection.$from.pos,1);return r==null?!1:(t.join(r,2),e&&e(t),!0)}catch(r){return!1}},mm=()=>({state:n,dispatch:e})=>Rc(n,e),gm=()=>({state:n,dispatch:e})=>Dc(n,e);function Wr(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function gs(){return typeof navigator!="undefined"?/Mac/.test(navigator.platform):!1}function ym(n){let e=n.split(/-(?!$)/),t=e[e.length-1];t==="Space"&&(t=" ");let r,o,i,s;for(let l=0;l({editor:e,view:t,tr:r,dispatch:o})=>{let i=ym(n).split(/-(?!$)/),s=i.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),l=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),a=e.captureTransaction(()=>{t.someProp("handleKeyDown",c=>c(t,l))});return a==null||a.steps.forEach(c=>{let d=c.map(r.mapping);d&&o&&r.maybeStep(d)}),!0};function Xt(n,e,t={}){let{from:r,to:o,empty:i}=n.selection,s=e?X(e,n.schema):null,l=[];n.doc.nodesBetween(r,o,(u,f)=>{if(u.isText)return;let h=Math.max(r,f),p=Math.min(o,f+u.nodeSize);l.push({node:u,from:h,to:p})});let a=o-r,c=l.filter(u=>s?s.name===u.node.type.name:!0).filter(u=>Pn(u.node.attrs,t,{strict:!1}));return i?!!c.length:c.reduce((u,f)=>u+f.to-f.from,0)>=a}var km=(n,e={})=>({state:t,dispatch:r})=>{let o=X(n,t.schema);return Xt(t,o,e)?zc(t,r):!1},xm=()=>({state:n,dispatch:e})=>Gi(n,e),Sm=n=>({state:e,dispatch:t})=>{let r=X(n,e.schema);return jc(r)(e,t)},wm=()=>({state:n,dispatch:e})=>Ki(n,e);function Vn(n,e){return e.nodes[n]?"node":e.marks[n]?"mark":null}function ss(n,e){let t=typeof e=="string"?[e]:e;return Object.keys(n).reduce((r,o)=>(t.includes(o)||(r[o]=n[o]),r),{})}var Cm=(n,e)=>({tr:t,state:r,dispatch:o})=>{let i=null,s=null,l=Vn(typeof n=="string"?n:n.name,r.schema);return l?(l==="node"&&(i=X(n,r.schema)),l==="mark"&&(s=qe(n,r.schema)),o&&t.selection.ranges.forEach(a=>{r.doc.nodesBetween(a.$from.pos,a.$to.pos,(c,d)=>{i&&i===c.type&&t.setNodeMarkup(d,void 0,ss(c.attrs,e)),s&&c.marks.length&&c.marks.forEach(u=>{s===u.type&&t.addMark(d,d+c.nodeSize,s.create(ss(u.attrs,e)))})})}),!0):!1},Mm=()=>({tr:n,dispatch:e})=>(e&&n.scrollIntoView(),!0),Am=()=>({tr:n,dispatch:e})=>{if(e){let t=new ue(n.doc);n.setSelection(t)}return!0},Tm=()=>({state:n,dispatch:e})=>$i(n,e),Em=()=>({state:n,dispatch:e})=>ji(n,e),Om=()=>({state:n,dispatch:e})=>Fc(n,e),Nm=()=>({state:n,dispatch:e})=>Qi(n,e),vm=()=>({state:n,dispatch:e})=>Yi(n,e);function Fr(n,e,t={},r={}){return Ln(n,e,{slice:!1,parseOptions:t,errorOnInvalidContent:r.errorOnInvalidContent})}var Rm=(n,e=!1,t={},r={})=>({editor:o,tr:i,dispatch:s,commands:l})=>{var a,c;let{doc:d}=i;if(t.preserveWhitespace!=="full"){let u=Fr(n,o.schema,t,{errorOnInvalidContent:(a=r.errorOnInvalidContent)!==null&&a!==void 0?a:o.options.enableContentCheck});return s&&i.replaceWith(0,d.content.size,u).setMeta("preventUpdate",!e),!0}return s&&i.setMeta("preventUpdate",!e),l.insertContentAt({from:0,to:d.content.size},n,{parseOptions:t,errorOnInvalidContent:(c=r.errorOnInvalidContent)!==null&&c!==void 0?c:o.options.enableContentCheck})};function ys(n,e){let t=qe(e,n.schema),{from:r,to:o,empty:i}=n.selection,s=[];i?(n.storedMarks&&s.push(...n.storedMarks),s.push(...n.selection.$head.marks())):n.doc.nodesBetween(r,o,a=>{s.push(...a.marks)});let l=s.find(a=>a.type.name===t.name);return l?b({},l.attrs):{}}function bs(n,e){let t=new et(n);return e.forEach(r=>{r.steps.forEach(o=>{t.step(o)})}),t}function id(n){for(let e=0;e{e(r)&&t.push({node:r,pos:o})}),t}function ks(n,e,t){let r=[];return n.nodesBetween(e.from,e.to,(o,i)=>{t(o)&&r.push({node:o,pos:i})}),r}function Kr(n,e){for(let t=n.depth;t>0;t-=1){let r=n.node(t);if(e(r))return{pos:t>0?n.before(t):0,start:n.start(t),depth:t,node:r}}}function _n(n){return e=>Kr(e.$from,n)}function Jr(n,e){let t=zr.resolve(n);return fs(t,e)}function Im(n,e){let t=Jr(e),r=ge.fromJSON(t,n);return Hn(r.content,t)}function Pm(n,e){let t=Jr(e),r=Yt(n);return Re.fromSchema(t).parse(r).toJSON()}function xs(n,e){let t={from:0,to:n.content.size};return hs(n,t,e)}function Lm(n,e,t){let{blockSeparator:r=` @@ -96,4 +96,4 @@ img.ProseMirror-separator { `,Uy="\uFE0F",qy="\u200D",Gs="\uFFFC",lo=null,ao=null;function Gy(n=[]){let e={};be.groups=e;let t=new be;lo==null&&(lo=Hu(Vy)),ao==null&&(ao=Hu(_y)),x(t,"'",ll),x(t,"{",Un),x(t,"}",qn),x(t,"[",fo),x(t,"]",ho),x(t,"(",po),x(t,")",mo),x(t,"<",go),x(t,">",yo),x(t,"\uFF08",bo),x(t,"\uFF09",ko),x(t,"\u300C",xo),x(t,"\u300D",So),x(t,"\u300E",wo),x(t,"\u300F",Co),x(t,"\uFF1C",Mo),x(t,"\uFF1E",Ao),x(t,"&",To),x(t,"*",Eo),x(t,"@",ut),x(t,"`",No),x(t,"^",vo),x(t,":",ft),x(t,",",al),x(t,"$",Ro),x(t,".",Fe),x(t,"=",Do),x(t,"!",cl),x(t,"-",Ee),x(t,"%",Gn),x(t,"|",Io),x(t,"+",Po),x(t,"#",Lo),x(t,"?",Yn),x(t,'"',dl),x(t,"/",He),x(t,";",ul),x(t,"~",Qn),x(t,"_",Bo),x(t,"\\",Oo),x(t,"\u30FB",Ju);let r=U(t,Xe,il,{[Qs]:!0});U(r,Xe,r);let o=U(r,Qe,Wu,{[Jn]:!0}),i=U(r,Wn,Ku,{[Kn]:!0}),s=U(t,Qe,Ze,{[Xs]:!0});U(s,Xe,o),U(s,Qe,s),U(o,Xe,o),U(o,Qe,o);let l=U(t,Wn,tl,{[Zs]:!0});U(l,Qe),U(l,Xe,i),U(l,Wn,l),U(i,Xe,i),U(i,Qe),U(i,Wn,i);let a=x(t,qs,sl,{[Ks]:!0}),c=x(t,Fu,ol,{[Ks]:!0}),d=U(t,Us,ol,{[Ks]:!0});x(t,Gs,d),x(c,qs,a),x(c,Gs,d),U(c,Us,d),x(d,Fu),x(d,qs),U(d,Us,d),x(d,Gs,d);let u=U(t,Js,Uu,{[ju]:!0});x(u,"#"),U(u,Js,u),x(u,Uy,u);let f=x(u,qy);x(f,"#"),U(f,Js,u);let h=[[Qe,s],[Xe,o]],p=[[Qe,null],[Wn,l],[Xe,i]];for(let m=0;mm[0]>g[0]?1:-1);for(let m=0;m=0?w[el]=!0:Qe.test(g)?Xe.test(g)?w[Jn]=!0:w[Xs]=!0:w[Qs]=!0,zu(t,g,g,w)}return zu(t,"localhost",Xn,{ascii:!0}),t.jd=new be(zo),{start:t,tokens:rn({groups:e},qu)}}function Gu(n,e){let t=Yy(e.replace(/[A-Z]/g,l=>l.toLowerCase())),r=t.length,o=[],i=0,s=0;for(;s=0&&(u+=t[s].length,f++),c+=t[s].length,i+=t[s].length,s++;i-=u,s-=f,c-=u,o.push({t:d.t,v:e.slice(i-c,i),s:i-c,e:i})}return o}function Yy(n){let e=[],t=n.length,r=0;for(;r56319||r+1===t||(i=n.charCodeAt(r+1))<56320||i>57343?n[r]:n.slice(r,r+2);e.push(s),r+=s.length}return e}function dt(n,e,t,r,o){let i,s=e.length;for(let l=0;l=0;)i++;if(i>0){e.push(t.join(""));for(let s=parseInt(n.substring(r,r+i),10);s>0;s--)t.pop();r+=i}else t.push(n[r]),r++}return e}var Zn={defaultProtocol:"http",events:null,format:$u,formatHref:$u,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function fl(n,e=null){let t=rn({},Zn);n&&(t=rn(t,n instanceof fl?n.o:n));let r=t.ignoreTags,o=[];for(let i=0;it?r.substring(0,t)+"\u2026":r},toFormattedHref(n){return n.get("formatHref",this.toHref(n.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(n=Zn.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(n),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(n){return{type:this.t,value:this.toFormattedString(n),isLink:this.isLink,href:this.toFormattedHref(n),start:this.startIndex(),end:this.endIndex()}},validate(n){return n.get("validate",this.toString(),this)},render(n){let e=this,t=this.toHref(n.get("defaultProtocol")),r=n.get("formatHref",t,this),o=n.get("tagName",t,e),i=this.toFormattedString(n),s={},l=n.get("className",t,e),a=n.get("target",t,e),c=n.get("rel",t,e),d=n.getObj("attributes",t,e),u=n.getObj("events",t,e);return s.href=r,l&&(s.class=l),a&&(s.target=a),c&&(s.rel=c),d&&rn(s,d),{tagName:o,attributes:s,content:i,eventListeners:u}}};function Fo(n,e){class t extends Yu{constructor(o,i){super(o,i),this.t=n}}for(let r in e)t.prototype[r]=e[r];return t.t=n,t}var Vu=Fo("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),_u=Fo("text"),Qy=Fo("nl"),co=Fo("url",{isLink:!0,toHref(n=Zn.defaultProtocol){return this.hasProtocol()?this.v:`${n}://${this.v}`},hasProtocol(){let n=this.tk;return n.length>=2&&n[0].t!==Xn&&n[1].t===ft}});var Te=n=>new be(n);function Xy({groups:n}){let e=n.domain.concat([To,Eo,ut,Oo,No,vo,Ro,Do,Ee,il,Gn,Io,Po,Lo,He,zo,Qn,Bo]),t=[ft,al,Fe,cl,Gn,Yn,dl,ul,go,yo,Un,qn,ho,fo,po,mo,bo,ko,xo,So,wo,Co,Mo,Ao],r=[To,ll,Eo,Oo,No,vo,Ro,Do,Ee,Un,qn,Gn,Io,Po,Lo,Yn,He,zo,Qn,Bo],o=Te(),i=x(o,Qn);D(i,r,i),D(i,n.domain,i);let s=Te(),l=Te(),a=Te();D(o,n.domain,s),D(o,n.scheme,l),D(o,n.slashscheme,a),D(s,r,i),D(s,n.domain,s);let c=x(s,ut);x(i,ut,c),x(l,ut,c),x(a,ut,c);let d=x(i,Fe);D(d,r,i),D(d,n.domain,i);let u=Te();D(c,n.domain,u),D(u,n.domain,u);let f=x(u,Fe);D(f,n.domain,u);let h=Te(Vu);D(f,n.tld,h),D(f,n.utld,h),x(c,Xn,h);let p=x(u,Ee);x(p,Ee,p),D(p,n.domain,u),D(h,n.domain,u),x(h,Fe,f),x(h,Ee,p);let m=x(h,ft);D(m,n.numeric,Vu);let g=x(s,Ee),y=x(s,Fe);x(g,Ee,g),D(g,n.domain,s),D(y,r,i),D(y,n.domain,s);let w=Te(co);D(y,n.tld,w),D(y,n.utld,w),D(w,n.domain,s),D(w,r,i),x(w,Fe,y),x(w,Ee,g),x(w,ut,c);let O=x(w,ft),L=Te(co);D(O,n.numeric,L);let E=Te(co),I=Te();D(E,e,E),D(E,t,I),D(I,e,E),D(I,t,I),x(w,He,E),x(L,He,E);let W=x(l,ft),q=x(a,ft),B=x(q,He),Se=x(B,He);D(l,n.domain,s),x(l,Fe,y),x(l,Ee,g),D(a,n.domain,s),x(a,Fe,y),x(a,Ee,g),D(W,n.domain,E),x(W,He,E),x(W,Yn,E),D(Se,n.domain,E),D(Se,e,E),x(Se,He,E);let ht=[[Un,qn],[fo,ho],[po,mo],[go,yo],[bo,ko],[xo,So],[wo,Co],[Mo,Ao]];for(let sn=0;sn=0&&f++,o++,d++;if(f<0)o-=d,o0&&(i.push(Ys(_u,e,s)),s=[]),o-=f,d-=f;let h=u.t,p=t.slice(o-d,o);i.push(Ys(h,e,p))}}return s.length>0&&i.push(Ys(_u,e,s)),i}function Ys(n,e,t){let r=t[0].s,o=t[t.length-1].e,i=e.slice(r,o);return new n(i,t)}var e0=typeof console!="undefined"&&console&&console.warn||(()=>{}),t0="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",j={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function Qu(){return be.groups={},j.scanner=null,j.parser=null,j.tokenQueue=[],j.pluginQueue=[],j.customSchemes=[],j.initialized=!1,j}function hl(n,e=!1){if(j.initialized&&e0(`linkifyjs: already initialized - will not register custom scheme "${n}" ${t0}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(n))throw new Error(`linkifyjs: incorrect scheme format. 1. Must only contain digits, lowercase ASCII letters or "-" 2. Cannot start or end with "-" -3. "-" cannot repeat`);j.customSchemes.push([n,e])}function n0(){j.scanner=Gy(j.customSchemes);for(let n=0;n{let o=e.some(c=>c.docChanged)&&!t.doc.eq(r.doc),i=e.some(c=>c.getMeta("preventAutolink"));if(!o||i)return;let{tr:s}=r,l=bs(t.doc,[...e]);if(Ss(l).forEach(({newRange:c})=>{let d=ks(r.doc,c,h=>h.isTextblock),u,f;if(d.length>1?(u=d[0],f=r.doc.textBetween(u.pos,u.pos+u.node.nodeSize,void 0," ")):d.length&&r.doc.textBetween(c.from,c.to," "," ").endsWith(" ")&&(u=d[0],f=r.doc.textBetween(u.pos,c.to,void 0," ")),u&&f){let h=f.split(" ").filter(y=>y!=="");if(h.length<=0)return!1;let p=h[h.length-1],m=u.pos+f.lastIndexOf(p);if(!p)return!1;let g=Ho(p).map(y=>y.toObject(n.defaultProtocol));if(!r0(g))return!1;g.filter(y=>y.isLink).map(y=>v(b({},y),{from:m+y.start+1,to:m+y.end+1})).filter(y=>r.schema.marks.code?!r.doc.rangeHasMark(y.from,y.to,r.schema.marks.code):!0).filter(y=>n.validate(y.value)).filter(y=>n.shouldAutoLink(y.value)).forEach(y=>{jn(y.from,y.to,r.doc).some(w=>w.mark.type===n.type)||s.addMark(y.from,y.to,n.type.create({href:y.href}))})}}),!!s.steps.length)return s}})}function i0(n){return new P({key:new V("handleClickLink"),props:{handleClick:(e,t,r)=>{var o,i;if(r.button!==0||!e.editable)return!1;let s=r.target,l=[];for(;s.nodeName!=="DIV";)l.push(s),s=s.parentNode;if(!l.find(f=>f.nodeName==="A"))return!1;let a=Ur(e.state,n.type.name),c=r.target,d=(o=c==null?void 0:c.href)!==null&&o!==void 0?o:a.href,u=(i=c==null?void 0:c.target)!==null&&i!==void 0?i:a.target;return c&&d?(window.open(d,u),!0):!1}}})}function s0(n){return new P({key:new V("handlePasteLink"),props:{handlePaste:(e,t,r)=>{let{state:o}=e,{selection:i}=o,{empty:s}=i;if(s)return!1;let l="";r.content.forEach(c=>{l+=c.textContent});let a=pl(l,{defaultProtocol:n.defaultProtocol}).find(c=>c.isLink&&c.value===l);return!l||!a?!1:(n.editor.commands.setMark(n.type,{href:a.href}),!0)}}})}var l0=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function Lt(n,e){let t=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{let o=typeof r=="string"?r:r.scheme;o&&t.push(o)}),!n||n.replace(l0,"").match(new RegExp(`^(?:(?:${t.join("|")}):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))`,"i"))}var Xu=K.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(n=>{if(typeof n=="string"){hl(n);return}hl(n.scheme,n.optionalSlashes)})},onDestroy(){Qu()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(n,e)=>!!Lt(n,e.protocols),validate:n=>!!n,shouldAutoLink:n=>!!n}},addAttributes(){return{href:{default:null,parseHTML(n){return n.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:n=>{let e=n.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:t=>!!Lt(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:n}){return this.options.isAllowedUri(n.href,{defaultValidate:e=>!!Lt(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",N(this.options.HTMLAttributes,n),0]:["a",N(this.options.HTMLAttributes,v(b({},n),{href:""})),0]},addCommands(){return{setLink:n=>({chain:e})=>{let{href:t}=n;return this.options.isAllowedUri(t,{defaultValidate:r=>!!Lt(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,n).setMeta("preventAutolink",!0).run():!1},toggleLink:n=>({chain:e})=>{let{href:t}=n;return this.options.isAllowedUri(t,{defaultValidate:r=>!!Lt(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().toggleMark(this.name,n,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run():!1},unsetLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[me({find:n=>{let e=[];if(n){let{protocols:t,defaultProtocol:r}=this.options,o=pl(n).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:s=>!!Lt(s,t),protocols:t,defaultProtocol:r}));o.length&&o.forEach(i=>e.push({text:i.value,data:{href:i.href},index:i.start}))}return e},type:this.type,getAttributes:n=>{var e;return{href:(e=n.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){let n=[],{protocols:e,defaultProtocol:t}=this.options;return this.options.autolink&&n.push(o0({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:o=>!!Lt(o,e),protocols:e,defaultProtocol:t}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&n.push(i0({type:this.type})),this.options.linkOnPaste&&n.push(s0({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),n}});var Zu=Xu.extend({addOptions(){var n;return v(b({},(n=this.parent)==null?void 0:n.call(this)),{openOnClick:!1,HTMLAttributes:{target:null,rel:"noopener noreferrer nofollow",class:null}})},addCommands(){var n;return v(b({},(n=this.parent)==null?void 0:n.call(this)),{addLink:()=>({editor:e})=>{let t=e.getAttributes(this.name);Pu(e,t).then(r=>{if(r){let o=e.chain().focus().extendMarkRange(this.name).unsetMark(this.name);o.setMark(this.name,r),o.run()}})}})},addKeyboardShortcuts(){return{"Mod-k":({editor:n})=>{let e;(e=window.event)&&e.preventDefault(),n.commands.addLink()}}}});var ef=H.create({name:"noSpellCheck",addProseMirrorPlugins(){return[new P({view(n){return new ml(n)}})]}}),ml=class{constructor(e){this.editorView=e,this.editorView.dom.setAttribute("spellcheck","false")}update(){}destroy(){this.editorView.dom.removeAttribute("spellcheck")}};var tf=H.create({name:"typographic",addProseMirrorPlugins(){return[of]}});function nf(n,e,t,r){let o=n.childCount,i=e.childCount;e:for(let s=0,l=0;s{let t=[];if(n.text)for(let r of n.text.matchAll(/(\u00A0|\u00AD)/g)){let o=e+(r.index||0);t.push(re.inline(o,o+1,{class:a0[r[1]]}))}return t},c0=n=>{let e=[];return n.descendants((t,r)=>{e.push(rf(t,r))}),G.create(n,e.flat())},of=new P({state:{init(n,{doc:e}){return c0(e)},apply(n,e,t){let r=e.map(n.mapping,n.doc);return nf(t.doc,n.doc,0,(o,i)=>{r=r.remove(r.find(i,i+o.content.size)),r=r.add(n.doc,rf(o,i))}),r}},props:{decorations(n){return of.getState(n)}}});var er=(n,e)=>n.extensionManager.extensions.find(t=>t.name===e),sf=n=>[f0(n),h0(n),m0(n),p0(n),y0(n),b0(n),g0(n),k0(n)].filter(Boolean),d0=H.create({name:"menu",addOptions(){return{menuItems:sf}},addProseMirrorPlugins(){let n=this.editor,e=this.options.menuItems(n);return[new P({view(){let t=new gl(n,e);return n.view.dom.parentNode.insertBefore(t.dom,n.view.dom),t}})]}}),gl=class{constructor(e,t){this.items=t.flat(),this.editor=e,this.dom=_("div",{className:"prose-menubar"}),t.filter(r=>r.length).forEach(r=>{let o=_("div",{className:"prose-menubar__group"});this.dom.append(o),r.forEach(({dom:i})=>o.append(i))}),this.update(),this.dom.addEventListener("mousedown",r=>{r.preventDefault(),e.view.focus(),this.items.forEach(({command:o,dom:i})=>{i.contains(r.target)&&o(e)})})}update(){this.items.forEach(({dom:e,enabled:t=()=>!0,active:r=()=>!1,hidden:o=()=>!1})=>{e.classList.toggle("disabled",!t(this.editor)),e.classList.toggle("active",!!r(this.editor)),e.classList.toggle("hidden",!!o(this.editor))})}destroy(){this.dom.remove()}};function on(n,e=""){return _("span",{className:"prose-menubar__button",textContent:n,title:e})}function ee(n,e){return _("span",{className:"prose-menubar__button material-icons",textContent:n,title:e})}var u0=(n,e)=>{let t=_("span",{className:"prose-menubar__button prose-menubar__button--heading"});return t.append(_("span",{className:"material-icons",textContent:"title",title:`heading ${e}`}),_("span",{className:"level",textContent:`${e}`})),{command:r=>{r.chain().focus().toggleHeading({level:e}).run()},dom:t,active(r){return r.isActive("heading",{level:e})}}};function f0(n){let e=n.schema,t=er(n,"heading"),o=(t?t.options.levels:[]).map(s=>u0(n,s)),i;return(i=e.nodes.bulletList)&&o.push({command(s){s.chain().focus().toggleBulletList().run()},dom:ee("format_list_bulleted","unordered list"),active(s){return!1}}),(i=e.nodes.orderedList)&&o.push({command(s){s.chain().focus().toggleOrderedList().run()},dom:ee("format_list_numbered","ordered list"),active(s){return!1}}),o.length?[...o,{command(s){s.chain().focus().setParagraph().run()},dom:ee("notes","paragraph"),active(s){return!1}}]:[]}function h0(n){let e=n.schema,t=[],r;return(r=e.nodes.blockquote)&&t.push({command(o){o.chain().focus().toggleBlockquote().run()},dom:ee("format_quote","blockquote"),active(o){return o.isActive("blockquote")}}),(r=e.nodes.horizontalRule)&&t.push({command(o){o.chain().focus().setHorizontalRule().run()},dom:ee("horizontal_rule","horizontal rule"),active(o){return!1}}),t}function p0(n){let e=(t,r)=>t in n.schema.marks?{command(o){o.chain().focus().toggleMark(t).run()},dom:r,active:o=>o.isActive(t)}:null;return[e("bold",ee("format_bold","bold")),e("italic",ee("format_italic","italic")),e("underline",ee("format_underline","underline")),e("strike",ee("format_strikethrough","strike")),e("subscript",ee("subscript","subscript")),e("superscript",ee("superscript","superscript"))].filter(Boolean)}function m0(n){let e=n.schema.marks.link;return e?[{command(t){t.chain().addLink().focus().run()},enabled(t){return!t.state.selection.empty||t.isActive("link")},dom:ee("insert_link","insert link"),active(t){return t.isActive(e)}},{command(t){t.chain().focus().unsetLink().run()},dom:ee("link_off","remove link"),hidden(t){return!t.isActive("link")}}]:[]}function g0(n){return er(n,"history")?[{command(e){e.commands.undo()},enabled(e){return e.can().undo()},dom:ee("undo","undo"),active(){return!1}},{command(e){e.commands.redo()},enabled(e){return e.can().redo()},dom:ee("redo","redo"),active(){return!1}}]:null}function y0(n){let e=t=>({command(r){r.chain().focus().setTextAlign(t).run()},dom:ee(`format_align_${t}`,t),active(){return n.isActive({textAlign:t})}});return er(n,"textAlign")?[e("left"),e("center"),e("right"),e("justify")]:null}function b0(n){if(!er(n,"table"))return[];let e=(t,r)=>({command:t,dom:r,hidden(){return!n.isActive("table")}});return[{command(t){t.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!1}).run()},dom:ee("grid_on","Insert table")},e(t=>{t.chain().focus().addColumnAfter().run()},on("+Col")),e(t=>{t.chain().focus().deleteColumn().run()},on("-Col")),e(t=>{t.chain().focus().addRowAfter().run()},on("+Row")),e(t=>{t.chain().focus().deleteRow().run()},on("-Row")),e(t=>{t.chain().focus().mergeCells().run()},on("Merge")),e(t=>{t.chain().focus().splitCell().run()},on("Split"))]}function k0(n){return er(n,"html")?[{command(e){e.commands.editHTML()},dom:ee("code","edit HTML")}]:null}function x0(n,e,{shadow:t=!1}={}){let r=n.hasAttribute("disabled"),o=_("div",{className:"prose-editor-wrapper"});n.before(o);let i=_("div",{className:`prose-editor ${r?"disabled":""}`});if(t){let l=o.attachShadow({mode:"open"});for(let a of It().stylesheets)l.append(_("link",{rel:"stylesheet",href:a}));l.append(i)}else o.append(i);return new Bn({element:i,editable:!r,extensions:e,content:n.value,onUpdate({editor:l}){n.value=l.getHTML(),n.dispatchEvent(new Event("input",{bubbles:!0}))},onDestroy(){o.remove()}})}function S0(n,e){function t(o){for(let i of o.querySelectorAll(e))i.id.includes("__prefix__")||n(i)}function r(){let o;(o=window.django)&&(o=o.jQuery)&&o(document).on("formset:added",i=>{t(i.target)})}t(document),r()}window.DjangoProseEditor=yl;})(); +3. "-" cannot repeat`);j.customSchemes.push([n,e])}function n0(){j.scanner=Gy(j.customSchemes);for(let n=0;n{let o=e.some(c=>c.docChanged)&&!t.doc.eq(r.doc),i=e.some(c=>c.getMeta("preventAutolink"));if(!o||i)return;let{tr:s}=r,l=bs(t.doc,[...e]);if(Ss(l).forEach(({newRange:c})=>{let d=ks(r.doc,c,h=>h.isTextblock),u,f;if(d.length>1?(u=d[0],f=r.doc.textBetween(u.pos,u.pos+u.node.nodeSize,void 0," ")):d.length&&r.doc.textBetween(c.from,c.to," "," ").endsWith(" ")&&(u=d[0],f=r.doc.textBetween(u.pos,c.to,void 0," ")),u&&f){let h=f.split(" ").filter(y=>y!=="");if(h.length<=0)return!1;let p=h[h.length-1],m=u.pos+f.lastIndexOf(p);if(!p)return!1;let g=Ho(p).map(y=>y.toObject(n.defaultProtocol));if(!r0(g))return!1;g.filter(y=>y.isLink).map(y=>v(b({},y),{from:m+y.start+1,to:m+y.end+1})).filter(y=>r.schema.marks.code?!r.doc.rangeHasMark(y.from,y.to,r.schema.marks.code):!0).filter(y=>n.validate(y.value)).filter(y=>n.shouldAutoLink(y.value)).forEach(y=>{jn(y.from,y.to,r.doc).some(w=>w.mark.type===n.type)||s.addMark(y.from,y.to,n.type.create({href:y.href}))})}}),!!s.steps.length)return s}})}function i0(n){return new P({key:new V("handleClickLink"),props:{handleClick:(e,t,r)=>{var o,i;if(r.button!==0||!e.editable)return!1;let s=r.target,l=[];for(;s.nodeName!=="DIV";)l.push(s),s=s.parentNode;if(!l.find(f=>f.nodeName==="A"))return!1;let a=Ur(e.state,n.type.name),c=r.target,d=(o=c==null?void 0:c.href)!==null&&o!==void 0?o:a.href,u=(i=c==null?void 0:c.target)!==null&&i!==void 0?i:a.target;return c&&d?(window.open(d,u),!0):!1}}})}function s0(n){return new P({key:new V("handlePasteLink"),props:{handlePaste:(e,t,r)=>{let{state:o}=e,{selection:i}=o,{empty:s}=i;if(s)return!1;let l="";r.content.forEach(c=>{l+=c.textContent});let a=pl(l,{defaultProtocol:n.defaultProtocol}).find(c=>c.isLink&&c.value===l);return!l||!a?!1:n.editor.commands.setMark(n.type,{href:a.href})}}})}var l0=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function Lt(n,e){let t=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{let o=typeof r=="string"?r:r.scheme;o&&t.push(o)}),!n||n.replace(l0,"").match(new RegExp(`^(?:(?:${t.join("|")}):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))`,"i"))}var Xu=K.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(n=>{if(typeof n=="string"){hl(n);return}hl(n.scheme,n.optionalSlashes)})},onDestroy(){Qu()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(n,e)=>!!Lt(n,e.protocols),validate:n=>!!n,shouldAutoLink:n=>!!n}},addAttributes(){return{href:{default:null,parseHTML(n){return n.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:n=>{let e=n.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:t=>!!Lt(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:n}){return this.options.isAllowedUri(n.href,{defaultValidate:e=>!!Lt(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",N(this.options.HTMLAttributes,n),0]:["a",N(this.options.HTMLAttributes,v(b({},n),{href:""})),0]},addCommands(){return{setLink:n=>({chain:e})=>{let{href:t}=n;return this.options.isAllowedUri(t,{defaultValidate:r=>!!Lt(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,n).setMeta("preventAutolink",!0).run():!1},toggleLink:n=>({chain:e})=>{let{href:t}=n;return this.options.isAllowedUri(t,{defaultValidate:r=>!!Lt(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().toggleMark(this.name,n,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run():!1},unsetLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[me({find:n=>{let e=[];if(n){let{protocols:t,defaultProtocol:r}=this.options,o=pl(n).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:s=>!!Lt(s,t),protocols:t,defaultProtocol:r}));o.length&&o.forEach(i=>e.push({text:i.value,data:{href:i.href},index:i.start}))}return e},type:this.type,getAttributes:n=>{var e;return{href:(e=n.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){let n=[],{protocols:e,defaultProtocol:t}=this.options;return this.options.autolink&&n.push(o0({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:o=>!!Lt(o,e),protocols:e,defaultProtocol:t}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&n.push(i0({type:this.type})),this.options.linkOnPaste&&n.push(s0({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),n}});var Zu=Xu.extend({addOptions(){var n;return v(b({},(n=this.parent)==null?void 0:n.call(this)),{openOnClick:!1,HTMLAttributes:{target:null,rel:"noopener noreferrer nofollow",class:null}})},addCommands(){var n;return v(b({},(n=this.parent)==null?void 0:n.call(this)),{addLink:()=>({editor:e})=>{let t=e.getAttributes(this.name);Pu(e,t).then(r=>{if(r){let o=e.chain().focus().extendMarkRange(this.name).unsetMark(this.name);o.setMark(this.name,r),o.run()}})}})},addKeyboardShortcuts(){return{"Mod-k":({editor:n})=>{let e;(e=window.event)&&e.preventDefault(),n.commands.addLink()}}}});var ef=H.create({name:"noSpellCheck",addProseMirrorPlugins(){return[new P({view(n){return new ml(n)}})]}}),ml=class{constructor(e){this.editorView=e,this.editorView.dom.setAttribute("spellcheck","false")}update(){}destroy(){this.editorView.dom.removeAttribute("spellcheck")}};var tf=H.create({name:"typographic",addProseMirrorPlugins(){return[of]}});function nf(n,e,t,r){let o=n.childCount,i=e.childCount;e:for(let s=0,l=0;s{let t=[];if(n.text)for(let r of n.text.matchAll(/(\u00A0|\u00AD)/g)){let o=e+(r.index||0);t.push(re.inline(o,o+1,{class:a0[r[1]]}))}return t},c0=n=>{let e=[];return n.descendants((t,r)=>{e.push(rf(t,r))}),G.create(n,e.flat())},of=new P({state:{init(n,{doc:e}){return c0(e)},apply(n,e,t){let r=e.map(n.mapping,n.doc);return nf(t.doc,n.doc,0,(o,i)=>{r=r.remove(r.find(i,i+o.content.size)),r=r.add(n.doc,rf(o,i))}),r}},props:{decorations(n){return of.getState(n)}}});var er=(n,e)=>n.extensionManager.extensions.find(t=>t.name===e),sf=n=>[f0(n),h0(n),m0(n),p0(n),y0(n),b0(n),g0(n),k0(n)].filter(Boolean),d0=H.create({name:"menu",addOptions(){return{menuItems:sf}},addProseMirrorPlugins(){let n=this.editor,e=this.options.menuItems(n);return[new P({view(){let t=new gl(n,e);return n.view.dom.parentNode.insertBefore(t.dom,n.view.dom),t}})]}}),gl=class{constructor(e,t){this.items=t.flat(),this.editor=e,this.dom=_("div",{className:"prose-menubar"}),t.filter(r=>r.length).forEach(r=>{let o=_("div",{className:"prose-menubar__group"});this.dom.append(o),r.forEach(({dom:i})=>o.append(i))}),this.update(),this.dom.addEventListener("mousedown",r=>{r.preventDefault(),e.view.focus(),this.items.forEach(({command:o,dom:i})=>{i.contains(r.target)&&o(e)})})}update(){this.items.forEach(({dom:e,enabled:t=()=>!0,active:r=()=>!1,hidden:o=()=>!1})=>{e.classList.toggle("disabled",!t(this.editor)),e.classList.toggle("active",!!r(this.editor)),e.classList.toggle("hidden",!!o(this.editor))})}destroy(){this.dom.remove()}};function on(n,e=""){return _("span",{className:"prose-menubar__button",textContent:n,title:e})}function ee(n,e){return _("span",{className:"prose-menubar__button material-icons",textContent:n,title:e})}var u0=(n,e)=>{let t=_("span",{className:"prose-menubar__button prose-menubar__button--heading"});return t.append(_("span",{className:"material-icons",textContent:"title",title:`heading ${e}`}),_("span",{className:"level",textContent:`${e}`})),{command:r=>{r.chain().focus().toggleHeading({level:e}).run()},dom:t,active(r){return r.isActive("heading",{level:e})}}};function f0(n){let e=n.schema,t=er(n,"heading"),o=(t?t.options.levels:[]).map(s=>u0(n,s)),i;return(i=e.nodes.bulletList)&&o.push({command(s){s.chain().focus().toggleBulletList().run()},dom:ee("format_list_bulleted","unordered list"),active(s){return!1}}),(i=e.nodes.orderedList)&&o.push({command(s){s.chain().focus().toggleOrderedList().run()},dom:ee("format_list_numbered","ordered list"),active(s){return!1}}),o.length?[...o,{command(s){s.chain().focus().setParagraph().run()},dom:ee("notes","paragraph"),active(s){return!1}}]:[]}function h0(n){let e=n.schema,t=[],r;return(r=e.nodes.blockquote)&&t.push({command(o){o.chain().focus().toggleBlockquote().run()},dom:ee("format_quote","blockquote"),active(o){return o.isActive("blockquote")}}),(r=e.nodes.horizontalRule)&&t.push({command(o){o.chain().focus().setHorizontalRule().run()},dom:ee("horizontal_rule","horizontal rule"),active(o){return!1}}),t}function p0(n){let e=(t,r)=>t in n.schema.marks?{command(o){o.chain().focus().toggleMark(t).run()},dom:r,active:o=>o.isActive(t)}:null;return[e("bold",ee("format_bold","bold")),e("italic",ee("format_italic","italic")),e("underline",ee("format_underline","underline")),e("strike",ee("format_strikethrough","strike")),e("subscript",ee("subscript","subscript")),e("superscript",ee("superscript","superscript"))].filter(Boolean)}function m0(n){let e=n.schema.marks.link;return e?[{command(t){t.chain().addLink().focus().run()},enabled(t){return!t.state.selection.empty||t.isActive("link")},dom:ee("insert_link","insert link"),active(t){return t.isActive(e)}},{command(t){t.chain().focus().unsetLink().run()},dom:ee("link_off","remove link"),hidden(t){return!t.isActive("link")}}]:[]}function g0(n){return er(n,"history")?[{command(e){e.commands.undo()},enabled(e){return e.can().undo()},dom:ee("undo","undo"),active(){return!1}},{command(e){e.commands.redo()},enabled(e){return e.can().redo()},dom:ee("redo","redo"),active(){return!1}}]:null}function y0(n){let e=t=>({command(r){r.chain().focus().setTextAlign(t).run()},dom:ee(`format_align_${t}`,t),active(){return n.isActive({textAlign:t})}});return er(n,"textAlign")?[e("left"),e("center"),e("right"),e("justify")]:null}function b0(n){if(!er(n,"table"))return[];let e=(t,r)=>({command:t,dom:r,hidden(){return!n.isActive("table")}});return[{command(t){t.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!1}).run()},dom:ee("grid_on","Insert table")},e(t=>{t.chain().focus().addColumnAfter().run()},on("+Col")),e(t=>{t.chain().focus().deleteColumn().run()},on("-Col")),e(t=>{t.chain().focus().addRowAfter().run()},on("+Row")),e(t=>{t.chain().focus().deleteRow().run()},on("-Row")),e(t=>{t.chain().focus().mergeCells().run()},on("Merge")),e(t=>{t.chain().focus().splitCell().run()},on("Split"))]}function k0(n){return er(n,"html")?[{command(e){e.commands.editHTML()},dom:ee("code","edit HTML")}]:null}function x0(n,e,{shadow:t=!1}={}){let r=n.hasAttribute("disabled"),o=_("div",{className:"prose-editor-wrapper"});n.before(o);let i=_("div",{className:`prose-editor ${r?"disabled":""}`});if(t){let l=o.attachShadow({mode:"open"});for(let a of It().stylesheets)l.append(_("link",{rel:"stylesheet",href:a}));l.append(i)}else o.append(i);return new Bn({element:i,editable:!r,extensions:e,content:n.value,onUpdate({editor:l}){n.value=l.getHTML(),n.dispatchEvent(new Event("input",{bubbles:!0}))},onDestroy(){o.remove()}})}function S0(n,e){function t(o){for(let i of o.querySelectorAll(e))i.id.includes("__prefix__")||n(i)}function r(){let o;(o=window.django)&&(o=o.jQuery)&&o(document).on("formset:added",i=>{t(i.target)})}t(document),r()}window.DjangoProseEditor=yl;})(); diff --git a/package.json b/package.json index b50fc83..8a8b296 100644 --- a/package.json +++ b/package.json @@ -4,27 +4,27 @@ "main": "index.js", "license": "MIT", "dependencies": { - "@tiptap/core": "^2.11.0", - "@tiptap/extension-code": "^2.11.0", - "@tiptap/extension-code-block": "^2.11.0", - "@tiptap/extension-color": "^2.11.0", - "@tiptap/extension-highlight": "^2.11.0", - "@tiptap/extension-link": "^2.11.0", - "@tiptap/extension-subscript": "^2.11.0", - "@tiptap/extension-superscript": "^2.11.0", - "@tiptap/extension-table": "^2.11.0", - "@tiptap/extension-table-cell": "^2.11.0", - "@tiptap/extension-table-header": "^2.11.0", - "@tiptap/extension-table-row": "^2.11.0", - "@tiptap/extension-text-align": "^2.11.0", - "@tiptap/extension-text-style": "^2.11.0", - "@tiptap/extension-underline": "^2.11.0", - "@tiptap/pm": "^2.11.0", - "@tiptap/starter-kit": "^2.11.0", + "@tiptap/core": "^2.11.2", + "@tiptap/extension-code": "^2.11.2", + "@tiptap/extension-code-block": "^2.11.2", + "@tiptap/extension-color": "^2.11.2", + "@tiptap/extension-highlight": "^2.11.2", + "@tiptap/extension-link": "^2.11.2", + "@tiptap/extension-subscript": "^2.11.2", + "@tiptap/extension-superscript": "^2.11.2", + "@tiptap/extension-table": "^2.11.2", + "@tiptap/extension-table-cell": "^2.11.2", + "@tiptap/extension-table-header": "^2.11.2", + "@tiptap/extension-table-row": "^2.11.2", + "@tiptap/extension-text-align": "^2.11.2", + "@tiptap/extension-text-style": "^2.11.2", + "@tiptap/extension-underline": "^2.11.2", + "@tiptap/pm": "^2.11.2", + "@tiptap/starter-kit": "^2.11.2", "autoprefixer": "^10.4.20", "esbuild": "^0.24.2", "esbuild-postcss": "^0.0.4", - "postcss": "^8.4.49" + "postcss": "^8.5.1" }, "scripts": { "dev": "node esbuild.mjs watch", diff --git a/yarn.lock b/yarn.lock index 9f44a8a..07f46ee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -132,167 +132,167 @@ resolved "https://registry.yarnpkg.com/@remirror/core-constants/-/core-constants-3.0.0.tgz#96fdb89d25c62e7b6a5d08caf0ce5114370e3b8f" integrity sha512-42aWfPrimMfDKDi4YegyS7x+/0tlzaqwPQCULLanv3DMIlu96KTJR0fM5isWX2UViOqlGnX6YFgqWepcX+XMNg== -"@tiptap/core@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/core/-/core-2.11.0.tgz#72891ae9b3e4b2a67f79ab3bcb14483d30a9bd8a" - integrity sha512-0S3AWx6E2QqwdQqb6z0/q6zq2u9lA9oL3BLyAaITGSC9zt8OwjloS2k1zN6wLa9hp2rO0c0vDnWsTPeFaEaMdw== - -"@tiptap/extension-blockquote@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-blockquote/-/extension-blockquote-2.11.0.tgz#c80aec1ce7791be5a0b45071ffb7481f40c35666" - integrity sha512-DBjWbgmbAAR879WAsk0+5xxgqpOTweWNnY7kEqWv3EJtLUvECXN63smiv3o4fREwwbEJqgihBu5/YugRC5z1dg== - -"@tiptap/extension-bold@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-bold/-/extension-bold-2.11.0.tgz#170e04df4396f3a3b830e34055b3a87f4e42a3b6" - integrity sha512-3x9BQZHYD5xFA0pCEneEMHZyIoxYo4NKcbhR4CLxGad1Xd+5g109nr1+eZ1JgvnChkeVf1eD6SaQE2A28lxR5g== - -"@tiptap/extension-bullet-list@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-bullet-list/-/extension-bullet-list-2.11.0.tgz#972f31f1fffc74327c3cb9795893c13736132de3" - integrity sha512-UALypJvO+cPSk/nC1HhkX/ImS9FxbKe2Pr0iDofakvZU1U1msumLVn2M/iq+ax1Mm9thodpvJv0hGDtFRwm7lQ== - -"@tiptap/extension-code-block@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-code-block/-/extension-code-block-2.11.0.tgz#ab8d19bb85ba9dccb14ad5dcc6559cb7965d173e" - integrity sha512-8of3qTOLjpveHBrrk8KVliSUVd6R2i2TNrBj0f/21HcFVAy0fP++02p6vI6UPOhwM3+p3CprGdSM48DFCu1rqw== - -"@tiptap/extension-code@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-code/-/extension-code-2.11.0.tgz#eaf3a0a63ceeda462d1526e40a221223c7497b54" - integrity sha512-2roNZxcny1bGjyZ8x6VmGTuKbwfJyTZ1hiqPc/CRTQ1u42yOhbjF4ziA5kfyUoQlzygZrWH9LR5IMYGzPQ1N3w== - -"@tiptap/extension-color@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-color/-/extension-color-2.11.0.tgz#0008ac39d1e8b141d24591a30ce22c84e53fff27" - integrity sha512-9dO6zr7Zzz7vvJAct+IGHvYpV6pHcNyifLjmXNdJdKY118lnoeQfu1dsxiPGl9KXCv5bHgn4dUg3CsrnAlb9OQ== - -"@tiptap/extension-document@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-document/-/extension-document-2.11.0.tgz#dcae7bc3a29b279ddbf88fc2b248817705ccb8a6" - integrity sha512-9YI0AT3mxyUZD7NHECHyV1uAjQ8KwxOS5ACwvrK1MU8TqY084LmodYNTXPKwpqbr51yvt3qZq1R7UIVu4/22Cg== - -"@tiptap/extension-dropcursor@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-dropcursor/-/extension-dropcursor-2.11.0.tgz#c81eea3f90c460d1eefed14f8e9735346340191b" - integrity sha512-p7tUtlz7KzBa+06+7W2LJ8AEiHG5chdnUIapojZ7SqQCrFRVw70R+orpkzkoictxNNHsun0A9FCUy4rz8L0+nQ== - -"@tiptap/extension-gapcursor@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-gapcursor/-/extension-gapcursor-2.11.0.tgz#01511c996656c43ed008825b66ccdf9fa365a674" - integrity sha512-1TVOthPkUYwTQnQwP0BzuIHVz09epOiXJQ3GqgNZsmTehwcMzz2vGCpx1JXhZ5DoMaREHNLCdraXb1n2FdhDNA== - -"@tiptap/extension-hard-break@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-hard-break/-/extension-hard-break-2.11.0.tgz#0e199a1c58171fe1879e730b87666e759fe55c04" - integrity sha512-7pMgPNk2FnPT0LcWaWNNxOLK3LQnRSYFgrdBGMXec3sy+y3Lit3hM+EZhbZcHpTIQTbWWs+eskh1waRMIt0ZaQ== - -"@tiptap/extension-heading@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-heading/-/extension-heading-2.11.0.tgz#8b7530a325faffdf325d03d82a2d6947a440d662" - integrity sha512-vrYvxibsY7/Sd2wYQDZ8AfIORfFi/UHZAWI7JmaMtDkILuMLYQ+jXb7p4K2FFW/1nN7C8QqgLLFI5AfjZUusgw== - -"@tiptap/extension-highlight@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-highlight/-/extension-highlight-2.11.0.tgz#6bb17852e99d66ec920549bed71ad8b8145d3eda" - integrity sha512-+szogL1ux8HMOuIn+TyB5PNhS0mdy4so5ejT2KAMtdZioPNS3Awj1FypimrXJV1kDjaN6LHRkF+w8/bV0qX4hA== - -"@tiptap/extension-history@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-history/-/extension-history-2.11.0.tgz#fc04cb418e4bad6c659b101d48812e43f04c3bbc" - integrity sha512-eEUEDoOtS17AHVEPbGfZ+x2L5A87SiIsppWYTkpfIH/8EnVQmzu+3i1tcT9cWvHC31d9JTG7TDptVuuHr30TJw== - -"@tiptap/extension-horizontal-rule@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-horizontal-rule/-/extension-horizontal-rule-2.11.0.tgz#ba7dc213f93cf3920ebcff246a8aaf845cb0b683" - integrity sha512-ZbkILwmcccmwQB2VTA/dzHRMB+xoJQ8UJdafcUiaAUlQfvDgl898+AYMa2GRTZkLPvzCKjXMC9hybSyy54Lz3Q== - -"@tiptap/extension-italic@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-italic/-/extension-italic-2.11.0.tgz#fe36d1aac51d8d5f8c276116a1e4408396440d8e" - integrity sha512-T+jjS0gOsvNzQXVTSArmUp/kt2R9OikPQaV1DI60bfjO0rknOgtG0tbwZmfbugzwc07RbpxOYFy3vBxMLDsksA== - -"@tiptap/extension-link@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-link/-/extension-link-2.11.0.tgz#f2093ba758201304637a88256c5a388c8acf035a" - integrity sha512-hvJSj0Ul4h8uxivtFtqaSy08s9G3smaW0He0ybYJ7rcJIsZ1zSrxQLGvIr/J8/yUq8VoVNspNR5cGUoyQaaw4A== +"@tiptap/core@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/core/-/core-2.11.2.tgz#d9d4bd912ee12d4127180e60d2672605c208baf7" + integrity sha512-Z437c/sQg31yrRVgLJVkQuih+7Og5tjRx6FE/zE47QgEayqQ9yXH0LrTAbPiY6IfY1X+f2A0h3e5Y/WGD6rC3Q== + +"@tiptap/extension-blockquote@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-blockquote/-/extension-blockquote-2.11.2.tgz#9f434872d9e66eeafa60f2c13196d4d32013c7b1" + integrity sha512-5XeU1o5UfjMCFX3AwgeErwDKlpUr5YPhta2tQqNsQUQ7QvumIdK/3apNT15/d8pySAjdAphDWEd/CZ2di5hq6A== + +"@tiptap/extension-bold@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-bold/-/extension-bold-2.11.2.tgz#e1a2b8ca2f7b5a2a2c1bed25d73dcd8bb474174c" + integrity sha512-pSls6UnKiPMm2c0m1viuZ0aFexxUmTRm17vDA2Gy5PhRm5qSsnHlSxyEuEcKNOi/rIx+oJehvG1oO4uI+kmCKg== + +"@tiptap/extension-bullet-list@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-bullet-list/-/extension-bullet-list-2.11.2.tgz#cad06f9c1cb7c448739b736f3e98a337a47ba6b7" + integrity sha512-zqZYT7lmmivEDEO+6w5bl5kV3UP1L2dw5mksyMGtxpvoDgbFHZ85+ron6SeHee8C7vJc6aIptc1p6NxIS5/l0A== + +"@tiptap/extension-code-block@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-code-block/-/extension-code-block-2.11.2.tgz#81f43250c5514bcd24e04544e0d645c1a9f1ffce" + integrity sha512-O6gVfql3uFZNq9yaUDa98VgV58BqaUSeOUnhZwLzpB/4VlqzTyW6/kvFxhKcSp7f+GmrMQaV4PXRs+tZcq6EFw== + +"@tiptap/extension-code@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-code/-/extension-code-2.11.2.tgz#32ed9a28e59be8eb02a54dc610fa783f0d3d6f74" + integrity sha512-G8vvb17QAYQij3haz9RoDvArK1LSOZHqGzQ2dJ3/d0W5oqOyUrTnseN66fRZjWhBT3pns0VL2erwe/NBIqLOIw== + +"@tiptap/extension-color@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-color/-/extension-color-2.11.2.tgz#fbeab0af7b05cdef715cd0a0797e86025641f0c3" + integrity sha512-KUfASlEXrZeioBeSnpQWmCIiWtVaHDXJ+ZD0giSGSTQ4JwqdsIYZd8HpUrQjsfTkrqxW13zxQ1VklfvSPM8PQA== + +"@tiptap/extension-document@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-document/-/extension-document-2.11.2.tgz#307aa0010d2074c05ffff043eedebe5571e84e4d" + integrity sha512-/EZhIAN1x7DYgGM0xv7y7wo5ceBmHb0+rOIPuBerVFeTn+VcC3tST/Q64bdvcxgNe2E59Ti0CUdYEA51wc2u5Q== + +"@tiptap/extension-dropcursor@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-dropcursor/-/extension-dropcursor-2.11.2.tgz#b0dd8844c425d3d82ab354be7bef650eebd160b6" + integrity sha512-HbXC9cMVZUY3kyKwbDtVH452CY1qlyLbIvTaN0+dxkFgcVeQZZtfIxU7DwMmqCDmDnsh0CdDqUgUvcXS2UQTwA== + +"@tiptap/extension-gapcursor@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-gapcursor/-/extension-gapcursor-2.11.2.tgz#9a44175bca5eb13e5281f22c6c64d6b9e3db326e" + integrity sha512-ssJOrcc8dzlo5/Qq3+EixASDHTj3mqCyAv7Ohed1QYEYr+TsSpsTbjR0eMLjWHlgbt24TXL2Wr0ldjYCU8T1ZA== + +"@tiptap/extension-hard-break@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-hard-break/-/extension-hard-break-2.11.2.tgz#54813af7264cdb808c86b0c386155dc1f6d812f8" + integrity sha512-FNcXemfuwkiP4drZ9m90BC6GD4nyikfYHYEUyYuVd74Mm6w5vXpueWXus3mUcdT78xTs1XpQVibDorilLu7X8w== + +"@tiptap/extension-heading@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-heading/-/extension-heading-2.11.2.tgz#f0aa459204ba4a45d36830eafae2f8430e854a48" + integrity sha512-y/wAEXYB0a8y5WmSYGCIXAhus1ydudn0pokKIzT/OD00XutAVh14qOB5h/+m8iXwGU/UYMP7SUCtK82txZqwKA== + +"@tiptap/extension-highlight@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-highlight/-/extension-highlight-2.11.2.tgz#f78983063a0d87d203ba5dce116f6ae73ad2bb37" + integrity sha512-ztq2lGthTIY/zPYtdYrG7+0dc4R4abkZqDVAmLxkFcwjs/mejq7nMG7WM2Unn2cIGo96m8Ibz/UtoOPJDt/+/Q== + +"@tiptap/extension-history@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-history/-/extension-history-2.11.2.tgz#62820dcb50863ccc4f482b295e2ee17c2c66b43e" + integrity sha512-BamS6YjKsETgP7msmm0oIpqmNSLJWbivm3XurR3uSUqJZYrQo1Fv+No4HAR7eAACxoOnYGcDmYsrombRVs9lxw== + +"@tiptap/extension-horizontal-rule@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-horizontal-rule/-/extension-horizontal-rule-2.11.2.tgz#0f674a66e3d46a86f1cc2ab679836b5c77208d51" + integrity sha512-R7MkTQzxkBy0bXJfq6L+6ax01/hmTEUvPPoyjwDSfU1Ktc1ihBJGUdTNtohT1KoQGQYt2d9khBohVspsXoCmFw== + +"@tiptap/extension-italic@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-italic/-/extension-italic-2.11.2.tgz#f74051e6c767680bf43039b8f152736c0553f13e" + integrity sha512-652oTa+iDiR7sMtmePSy+303HSNJxvxmV/6IvQoMdffJU0oPiWcWnCCL0qrWgtHh15dplj36EtB/znENWbvVOw== + +"@tiptap/extension-link@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-link/-/extension-link-2.11.2.tgz#46096d6862a2c4f8dd18e9db9204959e4b1dbe0d" + integrity sha512-Mbre+JotLMUg9jdWWrwIReiRVMkA2kMzmtD2Aqy/n5P+wuI84898qIZSkhPEzDOGzp0mluUO/iGsz0NdTto/JQ== dependencies: linkifyjs "^4.2.0" -"@tiptap/extension-list-item@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-list-item/-/extension-list-item-2.11.0.tgz#15889fd8217b998bfef78cd9079c8405b5a9abcd" - integrity sha512-Jikcg0fccpM13a3hAFLtguMcpVg4eMWI8NnC0aUULD9rFhvWZQYQYQuoK3fO6vQrAQpNhsV4oa0dfSq1btu9kg== - -"@tiptap/extension-ordered-list@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-ordered-list/-/extension-ordered-list-2.11.0.tgz#29d4afab66e85c701a7ab5b86ea1cc1f5ae7e3c7" - integrity sha512-i6pNsDHA2QvBAebwjAuvhHKwz+bZVJ929PCIJaN8mxg0ldiAmFbAsf+rwIIFHWogMp+5xEX2RBzux20usNVZ9w== - -"@tiptap/extension-paragraph@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-paragraph/-/extension-paragraph-2.11.0.tgz#936bfbc6781acd5ac0dba6bcdc2fa67514ce6164" - integrity sha512-xLNC05An3SQq0bVHJtOTLa8As5r6NxDZFpK0NZqO2hTq/fAIRL/9VPeZ8E0tziXULwIvIPp+L0Taw3TvaUkRUg== - -"@tiptap/extension-strike@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-strike/-/extension-strike-2.11.0.tgz#8507cfb501f4950d869f8ddd1adb47b66680765f" - integrity sha512-71i2IZT58kY2ohlhyO+ucyAioNNCkNkuPkrVERc9lXhmcCKOff5y6ekDHQHO2jNjnejkVE5ibyDO3Z7RUXjh1A== - -"@tiptap/extension-subscript@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-subscript/-/extension-subscript-2.11.0.tgz#194a454cc10636ccdd99997803e0d229f09db30e" - integrity sha512-OXJq4dSu8ZnT36+THKKlxjHw+dhjLRHxfchA5qWw5juAiN+pJ2PqqJ/iCbkYJewvw0llCOk4hHumdnRiABYJsQ== - -"@tiptap/extension-superscript@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-superscript/-/extension-superscript-2.11.0.tgz#71d3b12cb6a8e4e47ab7750ee850f00ea753721d" - integrity sha512-MRKgFna6op8mensjTkUQzIG74PxnM4EfINJPlMuSEkk43wyx+ZyUEttvSYmIpoOFUwrzPVoFP6SfmyDCZUQmIg== - -"@tiptap/extension-table-cell@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-table-cell/-/extension-table-cell-2.11.0.tgz#439ae8c348d52651afa0d9df92c5e191e0dc8e09" - integrity sha512-05lXXaGPWzVi/mVYRzsiLbaZ1VVU42buCkoTZrduvJsGEu6K+Cut2fqo7I29CJmJ0P/hDSyMEJDKqdKSP9xalA== - -"@tiptap/extension-table-header@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-table-header/-/extension-table-header-2.11.0.tgz#1f38080f33d720095439bff2482cbfed3b6607d7" - integrity sha512-pOKz1E7VT9v37psA0lFJ0mcj2DAa/KNqNqO3TGOUnNOYaN+/6w01i6tA7rAinULsxaFTZx5x1BGLMqonc6n0fw== - -"@tiptap/extension-table-row@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-table-row/-/extension-table-row-2.11.0.tgz#f038f93a91c08210886ca2128027a36b0a1902c6" - integrity sha512-j+o5Lr1JynSWcd/NN+4mNELvcVwj6CxcNT3J37oc5uy0a6CBhHlmp1d9eEbEnk95tMEsibunVV73wRqE150nEw== - -"@tiptap/extension-table@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-table/-/extension-table-2.11.0.tgz#12d901fc43ebeb533bace136324cedc9d258c319" - integrity sha512-RH9pw2L2eilFjQxEGaWdk7929rm4NLxCs/aXuFVY+zL3ZHzHovsMDM5SZiyk4pTnVpE2Bj8+NcDZ8r/zMcvYIA== - -"@tiptap/extension-text-align@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-text-align/-/extension-text-align-2.11.0.tgz#b90b86ee3f6e14c9abf186cb8ab6ced20c0df14d" - integrity sha512-VRXBqO17po6ddqhoWLBa2aCX/tqHdzdKPLfjnBy1fF8hjQKbidzjMWhb4CMm31ApvJjKK/DTkM3EnyYS/XDhng== - -"@tiptap/extension-text-style@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-text-style/-/extension-text-style-2.11.0.tgz#2acb6207fe6acdb5479384682846980be15caa80" - integrity sha512-vuA16wMZ6J3fboL7FObwV2f5uN9Vg0WYmqU7971vxzJyaRj9VE1eeH8Kh5fq4RgwDzc13MZGvZZV4HcE1R8o8A== - -"@tiptap/extension-text@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-text/-/extension-text-2.11.0.tgz#56ad3d9b14a34f67f7f8b82a499ef7a9a10ef0a6" - integrity sha512-LcyrP+7ZEVx3YaKzjMAeujq+4xRt4mZ3ITGph2CQ4vOKFaMI8bzSR909q18t7Qyyvek0a9VydEU1NHSaq4G5jw== - -"@tiptap/extension-underline@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/extension-underline/-/extension-underline-2.11.0.tgz#473025d3ed01953fb2c23f8060ea90be4c231faa" - integrity sha512-DE1piq441y1+9Aj1pvvuq1dcc5B2HZ2d1SPtO4DTMjCxrhok12biTkMxxq0q1dzA5/BouLlUW6WTPpinhmrUWA== - -"@tiptap/pm@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/pm/-/pm-2.11.0.tgz#c2ccb0c9b99fd5915d9390e90d3ab9e5fb408cd8" - integrity sha512-4RU6bpODkMY+ZshzdRFcuUc5jWlMW82LWXR6UOsHK/X/Mav41ZFS0Cyf+hQM6gxxTB09YFIICmGpEpULb+/CuA== +"@tiptap/extension-list-item@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-list-item/-/extension-list-item-2.11.2.tgz#4b81f934bdbe98ee5e1dabdb799f2f3bf095c44e" + integrity sha512-cxysDCvw45bem53qLZtTCkle1pttO4Y/FGqYm1hl66ol3cZsuLbjpOb4aDB6wRhyd701Ws6MjOYM+cZsmtTNpw== + +"@tiptap/extension-ordered-list@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-ordered-list/-/extension-ordered-list-2.11.2.tgz#37b2f0d614cb173934848ee72d730663868e5b41" + integrity sha512-TR8OqwKkQ0OCp40V9hcRJUcO1PSzCYWXy0mvW351lOYO8D6uE+1ouVkEV9qjXBC30sVCnQykSp/FR9UjsIuiVw== + +"@tiptap/extension-paragraph@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-paragraph/-/extension-paragraph-2.11.2.tgz#b4e99129b1c5959e2926b9563ced89755e0d4d81" + integrity sha512-iydTjeZbPJuqctOaAx7QebLPvz9J/hBxPptuhe4GZmqInknAk7+SFJagYeGNb14wfXKOvDZ9DMqv6mBiqSA90Q== + +"@tiptap/extension-strike@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-strike/-/extension-strike-2.11.2.tgz#9b5b698da5a024219e2ecf438c3b503d9b812fbe" + integrity sha512-n/rznmhqFlENGSlFY9t3pWnWzSmvDpUj3sjVhdpYteis+OCzabN9+c5KdQTBPMjtwRuRleQiKWnHmxvif0heEg== + +"@tiptap/extension-subscript@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-subscript/-/extension-subscript-2.11.2.tgz#b389b40fde7835d4adb96d9080bc3c40f632edd6" + integrity sha512-5Q8ULogx5v50kH28qMpJOlswwHrmKu/BI8sGOT0QF9n/nVEaVNdiGf55l3+AYaIhdTl/ADiIN9b08qWF0NAwgg== + +"@tiptap/extension-superscript@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-superscript/-/extension-superscript-2.11.2.tgz#2dcba05f5a8e2a814eb05aa980ea5f4d5904b844" + integrity sha512-daUF2FB3k8Tu99M0ro1ZXfsyRutbmE/du6kINtOzbu8TucCR5KYqCNlBrsdK3CxHpkAhoC1sLTG6RdLMu2o6qg== + +"@tiptap/extension-table-cell@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-table-cell/-/extension-table-cell-2.11.2.tgz#9a455e28740e89a8061b29059b0043d41e422a57" + integrity sha512-m//QPQ/GN4mMuj2/PcT2HmUGF3bFk41zN3hDcOmfrszClsmcEVIViApVr7U6HqlIq4TFAFDLXtIK79FW9ByIDg== + +"@tiptap/extension-table-header@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-table-header/-/extension-table-header-2.11.2.tgz#869af41a952c96144a8fe54a790f2edf065c6816" + integrity sha512-y2MCki8jZWT/cM4eG/3sPwUvtsj5d/+7RibbhjWnz1u42XyPoHKTZr9ZqUOAJ67vwB8LF8n8qb7D1YDqvDyA9Q== + +"@tiptap/extension-table-row@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-table-row/-/extension-table-row-2.11.2.tgz#55848d1cc45ebd4f68e3ec427cd6194e4de0c6b4" + integrity sha512-8eCWoaijS6JD0gJOsqg8BhcTNW6I1uvq6JwnAnpv3lznHj19Q5mevC7ixuFRe9Wk/qiYZaCBXk6NcpzaqB8o/g== + +"@tiptap/extension-table@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-table/-/extension-table-2.11.2.tgz#124e4b7dae537f13fd6e8c38c3cd0611d2d12b7f" + integrity sha512-s3pVORRDrm1AHuENhvuONpI4KtLLGJbg8QLxO/a7qeScAjHR0V9lOqdpweNfPgiMwj5zMV45tGF/tweM4x2fJQ== + +"@tiptap/extension-text-align@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-text-align/-/extension-text-align-2.11.2.tgz#bc2985d9affaed06bebbcf9e1904bf526490a5ab" + integrity sha512-0QfjepmK+iHubjTsJshuhSZvF54M+vaqpReDraf9NKVx+WkiZ+mxJX4S5nZwoFsp21sEz7Q7z03+uXgb/yj7mQ== + +"@tiptap/extension-text-style@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-text-style/-/extension-text-style-2.11.2.tgz#5a7f068c251b39b07893110cbc546004944f880c" + integrity sha512-RAa7BTwEOJRZN3EB2lg03KXyu7JC/Ce96cerh3D0Fo78yrtKOArPaiVHoTki6ZEIG43ccHEit1PPjMYxivPPeg== + +"@tiptap/extension-text@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-text/-/extension-text-2.11.2.tgz#743352716de6288191cd336fa1d676c391acda52" + integrity sha512-fJZeKYM5jeJ7NpS3FWLnC/NAvg+mZNbcTaRgXMo5ljBCgiMcYHhYg9p/RHk4SeICZBBpR9WSSZXHMACd9CbJiA== + +"@tiptap/extension-underline@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/extension-underline/-/extension-underline-2.11.2.tgz#e6bb61ddbd48100b3b4de33822e24f766f7825bd" + integrity sha512-Gq7hfV3D/3E1zoE6JXSYZ3boKfbjebFu7IuQZ6w6QSS/IkGN8c6kW+WtkhOKN3jV7Z5uF5KIVp3XCqNIwChWNQ== + +"@tiptap/pm@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/pm/-/pm-2.11.2.tgz#7f0cc0dcb11d8975958815c338848a1bbf2b400f" + integrity sha512-lNOMFRcD0mGy7Hf8tFMHW/fnglvq3dA0grs0QrSY4cHyYbH9BHtQjLMDceczXdXbXZq7nEqC40UBWNnqtaclpw== dependencies: prosemirror-changeset "^2.2.1" prosemirror-collab "^1.3.1" @@ -313,32 +313,32 @@ prosemirror-transform "^1.10.2" prosemirror-view "^1.37.0" -"@tiptap/starter-kit@^2.11.0": - version "2.11.0" - resolved "https://registry.yarnpkg.com/@tiptap/starter-kit/-/starter-kit-2.11.0.tgz#3b4a9ca9daaffed3abd030d4cd72e8d9d3eb0649" - integrity sha512-lrYmkeaAFiuUjN5nGnCowdjponrsR7eRmeTf/15/5oZsNrMN7t/fvPb014AqhG/anNasa0ism4CKZns3D+4pKQ== +"@tiptap/starter-kit@^2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/@tiptap/starter-kit/-/starter-kit-2.11.2.tgz#de7012444dab4ee3cb5e61093e6a4ac9c0c9e98a" + integrity sha512-FUIblP9BSmBzskf/aX7AIcUK5XP5Gi/VqUqm5evCkzlR1FrggLoy+vY+CX0me4oE/WYk4KAgIRXkE9tcbwotQA== dependencies: - "@tiptap/core" "^2.11.0" - "@tiptap/extension-blockquote" "^2.11.0" - "@tiptap/extension-bold" "^2.11.0" - "@tiptap/extension-bullet-list" "^2.11.0" - "@tiptap/extension-code" "^2.11.0" - "@tiptap/extension-code-block" "^2.11.0" - "@tiptap/extension-document" "^2.11.0" - "@tiptap/extension-dropcursor" "^2.11.0" - "@tiptap/extension-gapcursor" "^2.11.0" - "@tiptap/extension-hard-break" "^2.11.0" - "@tiptap/extension-heading" "^2.11.0" - "@tiptap/extension-history" "^2.11.0" - "@tiptap/extension-horizontal-rule" "^2.11.0" - "@tiptap/extension-italic" "^2.11.0" - "@tiptap/extension-list-item" "^2.11.0" - "@tiptap/extension-ordered-list" "^2.11.0" - "@tiptap/extension-paragraph" "^2.11.0" - "@tiptap/extension-strike" "^2.11.0" - "@tiptap/extension-text" "^2.11.0" - "@tiptap/extension-text-style" "^2.11.0" - "@tiptap/pm" "^2.11.0" + "@tiptap/core" "^2.11.2" + "@tiptap/extension-blockquote" "^2.11.2" + "@tiptap/extension-bold" "^2.11.2" + "@tiptap/extension-bullet-list" "^2.11.2" + "@tiptap/extension-code" "^2.11.2" + "@tiptap/extension-code-block" "^2.11.2" + "@tiptap/extension-document" "^2.11.2" + "@tiptap/extension-dropcursor" "^2.11.2" + "@tiptap/extension-gapcursor" "^2.11.2" + "@tiptap/extension-hard-break" "^2.11.2" + "@tiptap/extension-heading" "^2.11.2" + "@tiptap/extension-history" "^2.11.2" + "@tiptap/extension-horizontal-rule" "^2.11.2" + "@tiptap/extension-italic" "^2.11.2" + "@tiptap/extension-list-item" "^2.11.2" + "@tiptap/extension-ordered-list" "^2.11.2" + "@tiptap/extension-paragraph" "^2.11.2" + "@tiptap/extension-strike" "^2.11.2" + "@tiptap/extension-text" "^2.11.2" + "@tiptap/extension-text-style" "^2.11.2" + "@tiptap/pm" "^2.11.2" "@types/linkify-it@^5": version "5.0.0" @@ -376,9 +376,9 @@ autoprefixer@^10.4.20: postcss-value-parser "^4.2.0" browserslist@^4.23.3: - version "4.24.3" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.24.3.tgz#5fc2725ca8fb3c1432e13dac278c7cc103e026d2" - integrity sha512-1CPmv8iobE2fyRMV97dAcMVegvvWKxmq94hkLiAkUGwKVTyDLw33K+ZxiFrREKmmps4rIw6grcCFCnTMSZ/YiA== + version "4.24.4" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.24.4.tgz#c6b2865a3f08bcb860a0e827389003b9fe686e4b" + integrity sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A== dependencies: caniuse-lite "^1.0.30001688" electron-to-chromium "^1.5.73" @@ -386,9 +386,9 @@ browserslist@^4.23.3: update-browserslist-db "^1.1.1" caniuse-lite@^1.0.30001646, caniuse-lite@^1.0.30001688: - version "1.0.30001690" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001690.tgz#f2d15e3aaf8e18f76b2b8c1481abde063b8104c8" - integrity sha512-5ExiE3qQN6oF8Clf8ifIDcMRCRE/dMGcETG/XGMD8/XiXm6HXQgQTh1yZYLXXpSOsEUlJm1Xr7kGULZTuGtP/w== + version "1.0.30001695" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001695.tgz#39dfedd8f94851132795fdf9b79d29659ad9c4d4" + integrity sha512-vHyLade6wTgI2u1ec3WQBxv+2BrTERV28UXQu9LO6lZ9pYeMk34vjXFLOxo1A4UBA8XTL4njRQZdno/yYaSmWw== crelt@^1.0.0: version "1.0.6" @@ -396,9 +396,9 @@ crelt@^1.0.0: integrity sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g== electron-to-chromium@^1.5.73: - version "1.5.76" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.76.tgz#db20295c5061b68f07c8ea4dfcbd701485d94a3d" - integrity sha512-CjVQyG7n7Sr+eBXE86HIulnL5N8xZY1sgmOPGuq/F0Rr0FJq63lg0kEtOIDfZBk44FnDLf6FUJ+dsJcuiUDdDQ== + version "1.5.84" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.84.tgz#8e334ca206bb293a20b16418bf454783365b0a95" + integrity sha512-I+DQ8xgafao9Ha6y0qjHHvpZ9OfyA1qKlkHkjywxzniORU2awxyz7f/iVJcULmrF2yrM3nHQf+iDjJtbbexd/g== entities@^4.4.0: version "4.5.0" @@ -492,7 +492,7 @@ mdurl@^2.0.0: resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-2.0.0.tgz#80676ec0433025dd3e17ee983d0fe8de5a2237e0" integrity sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w== -nanoid@^3.3.7: +nanoid@^3.3.8: version "3.3.8" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf" integrity sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w== @@ -512,7 +512,7 @@ orderedmap@^2.0.0: resolved "https://registry.yarnpkg.com/orderedmap/-/orderedmap-2.1.1.tgz#61481269c44031c449915497bf5a4ad273c512d2" integrity sha512-TvAWxi0nDe1j/rtMcWcIj94+Ffe6n7zhow33h40SKxmsmozs6dz/e+EajymfoFcHd7sxNn8yHM8839uixMOV6g== -picocolors@^1.0.1, picocolors@^1.1.0, picocolors@^1.1.1: +picocolors@^1.0.1, picocolors@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== @@ -530,12 +530,12 @@ postcss-value-parser@^4.2.0: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== -postcss@^8.4.49: - version "8.4.49" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.49.tgz#4ea479048ab059ab3ae61d082190fabfd994fe19" - integrity sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA== +postcss@^8.5.1: + version "8.5.1" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.5.1.tgz#e2272a1f8a807fafa413218245630b5db10a3214" + integrity sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ== dependencies: - nanoid "^3.3.7" + nanoid "^3.3.8" picocolors "^1.1.1" source-map-js "^1.2.1" @@ -714,12 +714,12 @@ uc.micro@^2.0.0, uc.micro@^2.1.0: integrity sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A== update-browserslist-db@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz#80846fba1d79e82547fb661f8d141e0945755fe5" - integrity sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A== + version "1.1.2" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.2.tgz#97e9c96ab0ae7bcac08e9ae5151d26e6bc6b5580" + integrity sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg== dependencies: escalade "^3.2.0" - picocolors "^1.1.0" + picocolors "^1.1.1" w3c-keyname@^2.2.0: version "2.2.8"