lexxy-realtime 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,17 @@
1
+ var e=Object.defineProperty,t=((t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r})({$addUpdateTag:()=>ao,$applyNodeReplacement:()=>po,$caretFromPoint:()=>ys,$caretRangeFromSelection:()=>Cs,$cloneWithProperties:()=>jo,$cloneWithPropertiesEphemeral:()=>Mo,$comparePointCaretNext:()=>ms,$copyNode:()=>fo,$create:()=>Ro,$createChildrenArray:()=>Bo,$createLineBreakNode:()=>dr,$createNodeSelection:()=>Zr,$createParagraphNode:()=>Ji,$createPoint:()=>k,$createRangeSelection:()=>Xr,$createRangeSelectionFromDom:()=>Qr,$createTabNode:()=>jr,$createTextNode:()=>D,$extendCaretToRange:()=>us,$findMatchingParent:()=>zo,$getAdjacentChildCaret:()=>os,$getAdjacentNode:()=>$a,$getAdjacentSiblingOrParentSiblingCaret:()=>Ms,$getCaretInDirection:()=>ks,$getCaretRange:()=>fs,$getCaretRangeInDirection:()=>As,$getCharacterOffsets:()=>Br,$getChildCaret:()=>is,$getChildCaretAtIndex:()=>js,$getChildCaretOrSelf:()=>as,$getCollapsedCaretRange:()=>ds,$getCommonAncestor:()=>vs,$getCommonAncestorResultBranchOrder:()=>hs,$getEditor:()=>Eo,$getEditorDOMRenderConfig:()=>Do,$getNearestNodeFromDOMNode:()=>Aa,$getNearestRootOrShadowRoot:()=>uo,$getNodeByKey:()=>V,$getNodeByKeyOrThrow:()=>ho,$getNodeFromDOMNode:()=>Oa,$getPreviousSelection:()=>ei,$getRoot:()=>H,$getSelection:()=>j,$getSiblingCaret:()=>Z,$getState:()=>ye,$getStateChange:()=>be,$getTextContent:()=>li,$getTextNodeOffset:()=>ns,$getTextPointCaret:()=>ts,$getTextPointCaretSlice:()=>rs,$getWritableNodeState:()=>we,$hasAncestor:()=>so,$hasUpdateTag:()=>io,$insertNodes:()=>ci,$isBlockElementNode:()=>Jr,$isChildCaret:()=>X,$isDecoratorNode:()=>R,$isEditorState:()=>Ui,$isElementNode:()=>L,$isExtendableTextPointCaret:()=>Os,$isInlineElementOrDecoratorNode:()=>lo,$isLeafNode:()=>Ca,$isLexicalNode:()=>Kn,$isLineBreakNode:()=>fr,$isNodeCaret:()=>Xo,$isNodeSelection:()=>Rr,$isParagraphNode:()=>Yi,$isRangeSelection:()=>A,$isRootNode:()=>z,$isRootOrShadowRoot:()=>q,$isSiblingCaret:()=>Zo,$isTabNode:()=>Mr,$isTextNode:()=>O,$isTextPointCaret:()=>Yo,$isTextPointCaretSlice:()=>ls,$isTokenOrSegmented:()=>va,$isTokenOrTab:()=>_a,$nodesOfType:()=>Za,$normalizeCaret:()=>Q,$normalizeSelection__EXPERIMENTAL:()=>Pe,$onUpdate:()=>oo,$parseSerializedNode:()=>wi,$removeTextFromCaretRange:()=>Ds,$rewindSiblingCaret:()=>ws,$selectAll:()=>Ja,$setCompositionKey:()=>B,$setPointFromCaret:()=>bs,$setSelection:()=>U,$setSelectionFromCaretRange:()=>xs,$setState:()=>xe,$splitAtPointCaretNext:()=>Fs,$splitNode:()=>yo,$updateRangeSelectionFromCaretRange:()=>Ss,ArtificialNode__DO_NOT_USE:()=>Gi,BEFORE_INPUT_COMMAND:()=>ht,BLUR_COMMAND:()=>on,CAN_REDO_COMMAND:()=>nn,CAN_UNDO_COMMAND:()=>rn,CLEAR_EDITOR_COMMAND:()=>en,CLEAR_HISTORY_COMMAND:()=>tn,CLICK_COMMAND:()=>mt,COLLABORATION_TAG:()=>Zn,COMMAND_PRIORITY_BEFORE_CRITICAL:()=>-4,COMMAND_PRIORITY_BEFORE_EDITOR:()=>-8,COMMAND_PRIORITY_BEFORE_HIGH:()=>-5,COMMAND_PRIORITY_BEFORE_LOW:()=>-7,COMMAND_PRIORITY_BEFORE_NORMAL:()=>-6,COMMAND_PRIORITY_CRITICAL:()=>4,COMMAND_PRIORITY_EDITOR:()=>0,COMMAND_PRIORITY_HIGH:()=>3,COMMAND_PRIORITY_LOW:()=>1,COMMAND_PRIORITY_NORMAL:()=>2,COMPOSITION_END_COMMAND:()=>vt,COMPOSITION_END_TAG:()=>rr,COMPOSITION_START_COMMAND:()=>_t,COMPOSITION_START_TAG:()=>nr,CONTROLLED_TEXT_INSERTION_COMMAND:()=>St,COPY_COMMAND:()=>Zt,CUT_COMMAND:()=>Qt,DEFAULT_EDITOR_DOM_CONFIG:()=>Qi,DELETE_CHARACTER_COMMAND:()=>yt,DELETE_LINE_COMMAND:()=>Et,DELETE_WORD_COMMAND:()=>Tt,DRAGEND_COMMAND:()=>Xt,DRAGOVER_COMMAND:()=>Yt,DRAGSTART_COMMAND:()=>Jt,DROP_COMMAND:()=>Kt,DecoratorNode:()=>Ri,ElementNode:()=>Ii,FOCUS_COMMAND:()=>an,FORMAT_ELEMENT_COMMAND:()=>qt,FORMAT_TEXT_COMMAND:()=>Dt,HISTORIC_TAG:()=>qn,HISTORY_MERGE_TAG:()=>Yn,HISTORY_PUSH_TAG:()=>Jn,INDENT_CONTENT_COMMAND:()=>Wt,INPUT_COMMAND:()=>gt,INSERT_LINE_BREAK_COMMAND:()=>bt,INSERT_PARAGRAPH_COMMAND:()=>xt,INSERT_TAB_COMMAND:()=>Ut,INTERNAL_$isBlock:()=>To,IS_ALL_FORMATTING:()=>h,IS_BOLD:()=>1,IS_CODE:()=>16,IS_HIGHLIGHT:()=>128,IS_ITALIC:()=>2,IS_STRIKETHROUGH:()=>4,IS_SUBSCRIPT:()=>32,IS_SUPERSCRIPT:()=>64,IS_UNDERLINE:()=>8,KEY_ARROW_DOWN_COMMAND:()=>It,KEY_ARROW_LEFT_COMMAND:()=>Nt,KEY_ARROW_RIGHT_COMMAND:()=>jt,KEY_ARROW_UP_COMMAND:()=>Ft,KEY_BACKSPACE_COMMAND:()=>zt,KEY_DELETE_COMMAND:()=>Vt,KEY_DOWN_COMMAND:()=>At,KEY_ENTER_COMMAND:()=>Lt,KEY_ESCAPE_COMMAND:()=>Bt,KEY_MODIFIER_COMMAND:()=>sn,KEY_SPACE_COMMAND:()=>Rt,KEY_TAB_COMMAND:()=>Ht,LineBreakNode:()=>lr,MOVE_TO_END:()=>Mt,MOVE_TO_START:()=>Pt,NODE_STATE_KEY:()=>`$`,OUTDENT_CONTENT_COMMAND:()=>Gt,PASTE_COMMAND:()=>Ct,PASTE_TAG:()=>Xn,ParagraphNode:()=>Ki,REDO_COMMAND:()=>kt,REMOVE_TEXT_COMMAND:()=>wt,RootNode:()=>zi,SELECTION_CHANGE_COMMAND:()=>ft,SELECTION_INSERT_CLIPBOARD_NODES_COMMAND:()=>pt,SELECT_ALL_COMMAND:()=>$t,SKIP_COLLAB_TAG:()=>Qn,SKIP_DOM_SELECTION_TAG:()=>er,SKIP_SCROLL_INTO_VIEW_TAG:()=>$n,SKIP_SELECTION_FOCUS_TAG:()=>tr,TEXT_TYPE_TO_FORMAT:()=>y,TabNode:()=>Ar,TextNode:()=>br,UNDO_COMMAND:()=>Ot,addClassNamesToElement:()=>Hs,buildImportMap:()=>Un,configExtension:()=>Ls,createCommand:()=>T,createEditor:()=>$i,createSharedNodeState:()=>Se,createState:()=>ve,declarePeerDependency:()=>Rs,defineExtension:()=>Is,flipDirection:()=>Go,getDOMOwnerDocument:()=>ro,getDOMSelection:()=>J,getDOMSelectionFromTarget:()=>vo,getDOMTextNode:()=>xa,getEditorPropertyFromDOMNode:()=>ha,getNearestEditorFromDOMNode:()=>ma,getRegisteredNode:()=>ca,getRegisteredNodeOrThrow:()=>sa,getStaticNodeConfig:()=>Lo,getStyleObjectFromCSS:()=>ar,getTextDirection:()=>ga,getTransformSetFromKlass:()=>Zi,isBlockDomNode:()=>wo,isCurrentlyReadOnlyMode:()=>gi,isDOMDocumentNode:()=>ba,isDOMNode:()=>xo,isDOMTextNode:()=>ya,isDOMUnmanaged:()=>Fo,isDocumentFragment:()=>So,isExactShortcutMatch:()=>W,isHTMLAnchorElement:()=>bo,isHTMLElement:()=>Y,isInlineDomNode:()=>Co,isLexicalEditor:()=>pa,isModifierMatch:()=>Ua,isSelectionCapturedInDecoratorInput:()=>da,isSelectionWithinEditor:()=>fa,makeStepwiseIterator:()=>ps,mergeRegister:()=>Ws,normalizeClassNames:()=>Vs,removeClassNamesFromElement:()=>Us,removeFromParent:()=>Ta,resetRandomKey:()=>oa,safeCast:()=>zs,setDOMStyleFromCSS:()=>cr,setDOMStyleObject:()=>sr,setDOMUnmanaged:()=>Po,setNodeIndentFromDOM:()=>No,shallowMergeConfig:()=>Bs,toggleTextFormatType:()=>Sa});function n(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function r(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);n.search=r.toString(),console.warn(`Minified Lexical warning #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const i=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,a=i&&`documentMode`in document?document.documentMode:null,o=i&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),s=i&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),c=!(!i||!(`InputEvent`in window)||a)&&`getTargetRanges`in new window.InputEvent(`input`),l=i&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,u=i&&/Android/.test(navigator.userAgent),d=i&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!u,f=i&&/^(?=.*Chrome).*/i.test(navigator.userAgent),p=i&&u&&f,m=i&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&o&&!f,h=2047,g=d||l||m?`\xA0`:`​`,_=s?`\xA0`:g,v=RegExp(`^[^A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿]*[֑-߿יִ-﷽ﹰ-ﻼ]`),ee=RegExp(`^[^֑-߿יִ-﷽ﹰ-ﻼ]*[A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿]`),y={bold:1,capitalize:1024,code:16,highlight:128,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},b={directionless:1,unmergeable:2},x={center:2,end:6,justify:4,left:1,right:3,start:5},te={2:`center`,6:`end`,4:`justify`,1:`left`,3:`right`,5:`start`},ne={normal:0,segmented:2,token:1},re={0:`normal`,2:`segmented`,1:`token`},ie=`$config`;var ae=class{_front=new Set;_back=new Set;_cache;get size(){return this._front.size+this._back.size}addBack(e){return delete this._cache,this._front.has(e)||this._back.add(e),this}addFront(e){return delete this._cache,this._back.has(e)||this._front.add(e),this}delete(e){return delete this._cache,this._front.delete(e)||this._back.delete(e)}toArray(){let e=Array.from(this._front).reverse();for(let t of this._back)e.push(t);return e}toReadonlyArray(){return this._cache=this._cache||this.toArray(),this._cache}[Symbol.iterator](){return this.toReadonlyArray()[Symbol.iterator]()}};function oe(e,t,n,r,i,a){let o=e.getFirstChild();for(;o!==null;){let e=o.__key;o.__parent===t&&(L(o)&&oe(o,e,n,r,i,a),n.has(e)||a.delete(e),i.push(e)),o=o.getNextSibling()}}let se=!1,ce=0;function le(e){ce=e.timeStamp}function ue(e,t,n){let r=e.nodeName===`BR`,i=t.__lexicalLineBreak;return i&&(e===i||r&&e.previousSibling===i)||r&&ka(e,n)!==void 0}function de(e,t,n){let r=J(K(n)),i=null,a=null;r!==null&&r.anchorNode===e&&(i=r.anchorOffset,a=r.focusOffset);let o=e.nodeValue;o!==null&&Ba(t,o,i,a,!1)}function fe(e,t,n){if(A(e)){let t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return ya(t)&&n.isAttached()}function pe(e,t,n,r){for(let i=e;i&&!Fo(i);i=no(i)){let e=ka(i,t);if(e!==void 0){let t=V(e,n);if(t)return R(t)||!Y(i)?void 0:[i,t]}else if(i===r)return[r,Na(n)]}}function me(e,t,n){se=!0;let r=performance.now()-ce>100;try{Ni(e,()=>{let i=j()||function(e){return e.getEditorState().read(()=>{let e=j();return e===null?null:e.clone()})}(e),a=new Map,o=e.getRootElement(),c=e._editorState,l=e._blockCursorElement,u=!1,d=``;for(let n=0;n<t.length;n++){let f=t[n],p=f.type,m=f.target,h=pe(m,e,c,o);if(!h)continue;let[g,_]=h;if(p===`characterData`)r&&O(_)&&ya(m)&&fe(i,m,_)&&de(m,_,e);else if(p===`childList`){u=!0;let t=f.addedNodes;for(let n=0;n<t.length;n++){let r=t[n],i=Oa(r),a=r.parentNode;if(a!=null&&r!==l&&i===null&&!ue(r,a,e)){if(s){let e=(Y(r)?r.innerText:null)||r.nodeValue;e&&(d+=e)}a.removeChild(r)}}let n=f.removedNodes,r=n.length;if(r>0){let t=0;for(let i=0;i<r;i++){let r=n[i];(ue(r,m,e)||l===r)&&(m.appendChild(r),t++)}r!==t&&a.set(g,_)}}}if(a.size>0)for(let[t,n]of a)n.reconcileObservedMutation(t,e);let f=n.takeRecords();if(f.length>0){for(let t=0;t<f.length;t++){let n=f[t],r=n.addedNodes,i=n.target;for(let t=0;t<r.length;t++){let n=r[t],a=n.parentNode;a==null||n.nodeName!==`BR`||ue(n,i,e)||a.removeChild(n)}}n.takeRecords()}i!==null&&(u&&U(i),s&&eo(e)&&i.insertRawText(d))})}finally{se=!1}}function he(e){let t=e._observer;t!==null&&me(e,t.takeRecords(),t)}function ge(e){(function(e){ce===0&&K(e).addEventListener(`textInput`,le,!0)})(e),e._observer=new MutationObserver((t,n)=>{me(e,t,n)})}var _e=class{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;constructor(e,t){this.key=e,this.parse=t.parse.bind(t),this.unparse=(t.unparse||De).bind(t),this.isEqual=(t.isEqual||Object.is).bind(t),this.defaultValue=this.parse(void 0),this.resetOnCopyNode=t.resetOnCopyNode||!1}};function ve(e,t){return new _e(e,t)}function ye(e,t,n=`latest`){let r=(n===`latest`?e.getLatest():e).__state;return r?r.getValue(t):t.defaultValue}function be(e,t,n){let r=ye(e,n,`direct`),i=ye(t,n,`direct`);return n.isEqual(r,i)?null:[r,i]}function xe(e,t,n){let r;if(F(),typeof n==`function`){let i=e.getLatest(),a=ye(i,t);if(r=n(a),t.isEqual(a,r))return i}else r=n;let i=e.getWritable();return we(i).updateFromKnown(t,r),i}function Se(e){let t=new Map,n=new Set;for(let r=typeof e==`function`?e:e.replace;r.prototype&&r.prototype.getType!==void 0;r=Object.getPrototypeOf(r)){let{ownNodeConfig:e}=Lo(r);if(e&&e.stateConfigs)for(let r of e.stateConfigs){let e;`stateConfig`in r?(e=r.stateConfig,r.flat&&n.add(e.key)):e=r,t.set(e.key,e)}}return{flatKeys:n,sharedConfigMap:t}}var Ce=class e{node;knownState;unknownState;sharedNodeState;size;constructor(e,t,n=void 0,r=new Map,i=void 0){this.node=e,this.sharedNodeState=t,this.unknownState=n,this.knownState=r;let{sharedConfigMap:a}=this.sharedNodeState,o=i===void 0?function(e,t,n){let r=n.size;if(t)for(let i in t){let t=e.get(i);t&&n.has(t)||r++}return r}(a,n,r):i;this.size=o}getValue(e){let t=this.knownState.get(e);if(t!==void 0)return t;this.sharedNodeState.sharedConfigMap.set(e.key,e);let n=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){let t=this.unknownState[e.key];t!==void 0&&(n=e.parse(t)),this.updateFromKnown(e,n)}return n}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){let e={...this.unknownState},t={};for(let[t,n]of this.knownState)t.isEqual(n,t.defaultValue)?delete e[t.key]:e[t.key]=t.unparse(n);for(let n of this.sharedNodeState.flatKeys)n in e&&(t[n]=e[n],delete e[n]);return Ee(e)&&(t.$=e),t}getWritable(t){if(this.node===t)return this;let{sharedNodeState:n,unknownState:r}=this,i=new Map(this.knownState);return new e(t,n,function(e,t,n){let r;if(n)for(let[i,a]of Object.entries(n)){let n=e.get(i);n?t.has(n)||t.set(n,n.parse(a)):(r||={},r[i]=a)}return r}(n.sharedConfigMap,i,r),i,this.size)}resetOnCopyNode(){for(let e of this.knownState.keys())e.resetOnCopyNode&&this.knownState.set(e,e.defaultValue);return this}updateFromKnown(e,t){let n=e.key;this.sharedNodeState.sharedConfigMap.set(n,e);let{knownState:r,unknownState:i}=this;r.has(e)||i&&n in i||(i&&(delete i[n],this.unknownState=Ee(i)),this.size++),r.set(e,t)}updateFromUnknown(e,t){let n=this.sharedNodeState.sharedConfigMap.get(e);n?this.updateFromKnown(n,n.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){let{knownState:t}=this;for(let e of t.keys())t.set(e,e.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(let[t,n]of Object.entries(e))this.updateFromUnknown(t,n)}};function we(e){let t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new Ce(t,Te(t));return t.__state=n,n}function Te(e){return e.__state?e.__state.sharedNodeState:sa(Eo(),e.getType()).sharedNodeState}function Ee(e){if(e)for(let t in e)return e}function De(e){return e}function Oe(e,t,n){for(let[r,i]of t.knownState){if(e.has(r.key))continue;e.add(r.key);let t=n?n.getValue(r):r.defaultValue;if(t!==i&&!r.isEqual(t,i))return!0}return!1}function ke(e,t,n){let{unknownState:r}=t,i=n?n.unknownState:void 0;if(r){for(let[t,n]of Object.entries(r))if(!e.has(t)&&(e.add(t),n!==(i?i[t]:void 0)))return!0}return!1}function Ae(e,t){let n=e.__state;return n&&n.node===e?n.getWritable(t):n}function je(e,t){let n=e.__mode,r=e.__format,i=e.__style,a=t.__mode,o=t.__format,s=t.__style,c=e.__state,l=t.__state;return(n===null||n===a)&&(r===null||r===o)&&(i===null||i===s)&&(e.__state===null||c===l||function(e,t){if(e===t)return!0;let n=new Set;return!(e&&Oe(n,e,t)||t&&Oe(n,t,e)||e&&ke(n,e,t)||t&&ke(n,t,e))}(c,l))}function Me(e,t){let n=e.mergeWithSibling(t),r=I()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function Ne(e){let t,n,r=e;if(r.__text!==``||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&O(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==``){if(je(t,r)){r=Me(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&O(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==``){if(je(r,n)){r=Me(r,n);break}break}n.remove()}}else r.remove()}function Pe(e){return Fe(e.anchor),Fe(e.focus),e}function Fe(e){for(;e.type===`element`;){let t=e.getNode(),n=e.offset,r,i;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),i=!0):(r=t.getChildAtIndex(n),i=!1),O(r)){e.set(r.__key,i?r.getTextContentSize():0,`text`,!0);break}if(!L(r))break;e.set(r.__key,i?r.getChildrenSize():0,`element`,!0)}}let Ie,S,Le,Re,ze,Be,Ve,C,He,Ue,We,w=``,Ge=null,Ke=null,qe=!1,Je=!1;function Ye(e,t){let n=Ve.get(e);if(t!==null){let n=dt(e);n.parentNode===t&&t.removeChild(n)}if(C.has(e)||S._keyToDOMMap.delete(e),L(n)){let e=Bo(n,Ve);Xe(e,0,e.length-1,null)}n!==void 0&&Xa(Ue,Le,Re,n,`destroyed`)}function Xe(e,t,n,r){for(let i=t;i<=n;++i){let t=e[i];t!==void 0&&Ye(t,r)}}function Ze(e,t){e.setProperty(`text-align`,t)}function Qe(e,t){let n=Ie.theme.indent;if(typeof n==`string`){let r=e.classList.contains(n);t>0&&!r?e.classList.add(n):t<1&&r&&e.classList.remove(n)}if(t===0)return void e.style.setProperty(`padding-inline-start`,``);let r=getComputedStyle(S._rootElement||e).getPropertyValue(`--lexical-indent-base-value`)||`40px`;e.style.setProperty(`padding-inline-start`,`calc(${t} * ${r})`)}function $e(e,t){let n=e.style;t===0?Ze(n,``):t===1?Ze(n,`left`):t===2?Ze(n,`center`):t===3?Ze(n,`right`):t===4?Ze(n,`justify`):t===5?Ze(n,`start`):t===6&&Ze(n,`end`)}function et(e,t){let n=function(e){let t=e.__dir;if(t!==null)return t;if(z(e))return null;let n=e.getParentOrThrow();return z(n)&&n.__dir===null?`auto`:null}(t);n===null?e.removeAttribute(`dir`):e.dir=n}function tt(e,t){let r=C.get(e);r===void 0&&n(60);let i=We.$createDOM(r,S);if(function(e,t,n){let r=n._keyToDOMMap;(function(e,t,n){let r=`__lexicalKey_${t._key}`;e[r]=n})(t,n,e),r.set(e,t)}(e,i,S),O(r)?i.setAttribute(`data-lexical-text`,`true`):R(r)&&i.setAttribute(`data-lexical-decorator`,`true`),L(r)){let e=r.__indent,t=r.__size;if(et(i,r),e!==0&&Qe(i,e),t!==0){let e=t-1;nt(Bo(r,C),r,0,e,We.$getDOMSlot(r,i,S))}let n=r.__format;n!==0&&$e(i,n),r.isInline()||it(null,r,i)}else{let t=r.getTextContent();if(R(r)){let t=r.decorate(S,Ie);t!==null&&st(e,t),i.contentEditable=`false`}w+=t}return t!==null&&t.insertChild(i),We.$decorateDOM(r,null,i,S),Xa(Ue,Le,Re,r,`created`),i}function nt(e,t,n,r,i){let a=w;w=``;let o=n;for(;o<=r;++o){tt(e[o],i);let t=C.get(e[o]);t!==null&&O(t)?Ge===null&&(Ge=t.getFormat(),Ke=t.getStyle()):L(t)&&o<r&&!t.isInline()&&(w+=`
2
+
3
+ `)}i.element.__lexicalTextContent=w,w=a+w}function rt(e,t){if(e){let n=e.__last;if(n){let e=t.get(n);if(e)return fr(e)?`line-break`:R(e)&&e.isInline()?`decorator`:null}return`empty`}return null}function it(e,t,n){let r=rt(e,Ve),i=rt(t,C);r!==i&&We.$getDOMSlot(t,n,S).setManagedLineBreak(i)}function at(e,t,r){var i;Ge=null,Ke=null,function(e,t,r){let i=w,a=e.__size,o=t.__size;w=``;let s=r.element;if(a===1&&o===1){let n=e.__first,r=t.__first;if(n===r)ot(n,s);else{let e=dt(n),t=tt(r,null);try{s.replaceChild(t,e)}catch(i){if(typeof i==`object`&&i){let a=`${i.toString()} Parent: ${s.tagName}, new child: {tag: ${t.tagName} key: ${r}}, old child: {tag: ${e.tagName}, key: ${n}}.`;throw Error(a)}throw i}Ye(n,null)}let i=C.get(r);O(i)&&Ge===null&&(Ge=i.getFormat(),Ke=i.getStyle())}else{let i=Bo(e,Ve),c=Bo(t,C);if(i.length!==a&&n(227),c.length!==o&&n(228),a===0)o!==0&&nt(c,0,0,o-1,r);else if(o===0){if(a!==0){let e=r.after==null&&r.before==null&&r.element.__lexicalLineBreak==null;Xe(i,0,a-1,e?null:s),e&&(s.textContent=``)}}else(function(e,t,n,r,i,a){let o=r-1,s=i-1,c,l,u=a.getFirstChild(),d=0,f=0;for(;d<=o&&f<=s;){let e=t[d],r=n[f];if(e===r)u=ct(ot(r,a.element)),d++,f++;else{if(l===void 0&&(l=lt(n,f)),c===void 0)c=lt(t,d);else if(!c.has(e)){d++;continue}if(!l.has(e)){u=ct(dt(e)),Ye(e,a.element),d++,c.delete(e);continue}if(c.has(r)){let e=to(S,r);e!==u&&a.withBefore(u).insertChild(e),u=ct(ot(r,a.element)),d++,f++}else tt(r,a.withBefore(u)),f++}let i=C.get(r);i!==null&&O(i)?Ge===null&&(Ge=i.getFormat(),Ke=i.getStyle()):L(i)&&f<=s&&!i.isInline()&&(w+=`
4
+
5
+ `)}let p=d>o,m=f>s;if(p&&!m){let e=n[s+1],t=e===void 0?null:S.getElementByKey(e);nt(n,0,f,s,a.withBefore(t))}else m&&!p&&Xe(t,d,o,a.element)})(0,i,c,a,o,r)}s.__lexicalTextContent=w,w=i+w}(e,t,We.$getDOMSlot(t,r,S)),i=t,Ge==null||Ge===i.__textFormat||Je||i.setTextFormat(Ge),function(e){Ke==null||Ke===e.__textStyle||Je||e.setTextStyle(Ke)}(t)}function ot(e,t){let r=Ve.get(e),i=C.get(e);r!==void 0&&i!==void 0||n(61);let a=qe||Be.has(e)||ze.has(e),o=to(S,e);if(r===i&&!a){let e;if(L(r)){let t=o.__lexicalTextContent;typeof t==`string`?e=t:(e=r.getTextContent(),o.__lexicalTextContent=e)}else e=r.getTextContent();return w+=e,o}if(r!==i&&a&&Xa(Ue,Le,Re,i,`updated`),We.$updateDOM(i,r,o,S)){let r=tt(e,null);return t===null&&n(62),t.replaceChild(r,o),Ye(e,null),r}if(L(r)){L(i)||n(334,e);let t=i.__indent;(qe||t!==r.__indent)&&Qe(o,t);let s=i.__format;if((qe||s!==r.__format)&&$e(o,s),a)at(r,i,o),z(i)||i.isInline()||it(r,i,o);else{let e=o.__lexicalTextContent,t;typeof e==`string`?t=e:(t=r.getTextContent(),o.__lexicalTextContent=t),w+=t}if((qe||i.__dir!==r.__dir)&&(et(o,i),z(i)&&!qe))for(let e of i.getChildren())L(e)&&et(to(S,e.getKey()),e)}else{let t=i.getTextContent();if(R(i)){let t=i.decorate(S,Ie);t!==null&&st(e,t)}w+=t}if(!Je&&z(i)&&i.__cachedText!==w){let e=i.getWritable();e.__cachedText=w,i=e}return We.$decorateDOM(i,r,o,S),o}function st(e,t){let n=S._pendingDecorators,r=S._decorators;if(n===null){if(r[e]===t)return;n=ja(S)}n[e]=t}function ct(e){let t=e.nextSibling;return t!==null&&t===S._blockCursorElement&&(t=t.nextSibling),t}function lt(e,t){let n=new Set;for(let r=t;r<e.length;r++)n.add(e[r]);return n}function ut(e,t,n,r,i,a){w=``,qe=r===2,S=n,Ie=n._config,We=n._config.dom||Qi,Le=n._nodes,Re=S._listeners.mutation,ze=i,Be=a,Ve=e._nodeMap,C=t._nodeMap,Je=t._readOnly,He=new Map(n._keyToDOMMap);let o=new Map;return Ue=o,ot(`root`,null),S=void 0,Le=void 0,ze=void 0,Be=void 0,Ve=void 0,C=void 0,Ie=void 0,He=void 0,Ue=void 0,We=Qi,o}function dt(e){let t=He.get(e);return t===void 0&&n(75,e),t}function T(e){return{type:e}}const ft=T(`SELECTION_CHANGE_COMMAND`),pt=T(`SELECTION_INSERT_CLIPBOARD_NODES_COMMAND`),mt=T(`CLICK_COMMAND`),ht=T(`BEFORE_INPUT_COMMAND`),gt=T(`INPUT_COMMAND`),_t=T(`COMPOSITION_START_COMMAND`),vt=T(`COMPOSITION_END_COMMAND`),yt=T(`DELETE_CHARACTER_COMMAND`),bt=T(`INSERT_LINE_BREAK_COMMAND`),xt=T(`INSERT_PARAGRAPH_COMMAND`),St=T(`CONTROLLED_TEXT_INSERTION_COMMAND`),Ct=T(`PASTE_COMMAND`),wt=T(`REMOVE_TEXT_COMMAND`),Tt=T(`DELETE_WORD_COMMAND`),Et=T(`DELETE_LINE_COMMAND`),Dt=T(`FORMAT_TEXT_COMMAND`),Ot=T(`UNDO_COMMAND`),kt=T(`REDO_COMMAND`),At=T(`KEYDOWN_COMMAND`),jt=T(`KEY_ARROW_RIGHT_COMMAND`),Mt=T(`MOVE_TO_END`),Nt=T(`KEY_ARROW_LEFT_COMMAND`),Pt=T(`MOVE_TO_START`),Ft=T(`KEY_ARROW_UP_COMMAND`),It=T(`KEY_ARROW_DOWN_COMMAND`),Lt=T(`KEY_ENTER_COMMAND`),Rt=T(`KEY_SPACE_COMMAND`),zt=T(`KEY_BACKSPACE_COMMAND`),Bt=T(`KEY_ESCAPE_COMMAND`),Vt=T(`KEY_DELETE_COMMAND`),Ht=T(`KEY_TAB_COMMAND`),Ut=T(`INSERT_TAB_COMMAND`),Wt=T(`INDENT_CONTENT_COMMAND`),Gt=T(`OUTDENT_CONTENT_COMMAND`),Kt=T(`DROP_COMMAND`),qt=T(`FORMAT_ELEMENT_COMMAND`),Jt=T(`DRAGSTART_COMMAND`),Yt=T(`DRAGOVER_COMMAND`),Xt=T(`DRAGEND_COMMAND`),Zt=T(`COPY_COMMAND`),Qt=T(`CUT_COMMAND`),$t=T(`SELECT_ALL_COMMAND`),en=T(`CLEAR_EDITOR_COMMAND`),tn=T(`CLEAR_HISTORY_COMMAND`),nn=T(`CAN_REDO_COMMAND`),rn=T(`CAN_UNDO_COMMAND`),an=T(`FOCUS_COMMAND`),on=T(`BLUR_COMMAND`),sn=T(`KEY_MODIFIER_COMMAND`),cn=Object.freeze({}),ln=[[`keydown`,function(e,t){un=e.timeStamp,dn=e.key,!t.isComposing()&&G(t,At,e)}],[`pointerdown`,function(e,t){let n=e.target,r=e.pointerType;xo(n)&&r!==`touch`&&r!==`pen`&&e.button===0&&Ni(t,()=>{ua(n)||(_n=!0)})}],[`compositionstart`,function(e,t){G(t,_t,e)}],[`compositionend`,function(e,t){s?yn=!0:l||!d&&!m?G(t,vt,e):(bn=!0,xn=e.data)}],[`input`,function(e,t){e.stopPropagation(),Ni(t,()=>{t.dispatchCommand(gt,e)},{event:e}),pn=null}],[`click`,function(e,t){Ni(t,()=>{let n=j(),r=J(K(t)),i=ei();if(r){if(A(n)){let t=n.anchor,a=t.getNode();if(t.type===`element`&&t.offset===0&&n.isCollapsed()&&!z(a)&&H().getChildrenSize()===1&&a.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i))r.removeAllRanges(),n.dirty=!0;else if(e.detail===3&&!n.isCollapsed()&&a!==n.focus.getNode()){let e=zo(a,e=>L(e)&&!e.isInline());L(e)&&e.select(0)}}else if(e.pointerType===`touch`||e.pointerType===`pen`){let n=r.anchorNode;(Y(n)||ya(n))&&U($r(i,r,t,e))}}G(t,mt,e)})}],[`cut`,cn],[`copy`,cn],[`dragstart`,cn],[`dragover`,cn],[`dragend`,cn],[`paste`,cn],[`focus`,cn],[`blur`,cn],[`drop`,cn]];c&&ln.push([`beforeinput`,(e,t)=>function(e,t){let n=e.inputType;n===`deleteCompositionText`||s&&eo(t)||n!==`insertCompositionText`&&G(t,ht,e)}(e,t)]);let un=0,dn=null,fn=0,pn=null;const mn=new WeakMap,hn=new WeakMap;let gn=!1,_n=!1,vn=!1,yn=!1,bn=!1,xn=``,Sn=null,Cn=[0,``,0,`root`,0];function wn(e,t,n,r,i){let a=e.anchor,o=e.focus,s=a.getNode(),l=I(),u=J(K(l)),d=u===null?null:u.anchorNode,f=a.key,p=l.getElementByKey(f),m=n.length;return f!==o.key||!O(s)||(!i&&(!c||fn<r+50)||s.isDirty()&&m<2||Fa(n))&&a.offset!==o.offset&&!s.isComposing()||va(s)||s.isDirty()&&m>1||(i||!c)&&p!==null&&!s.isComposing()&&d!==xa(p)||u!==null&&t!==null&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||!s.isComposing()&&(s.getFormat()!==e.format||s.getStyle()!==e.style)||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;let n=e.anchor.offset,r=t.getParentOrThrow(),i=_a(t);return n===0?!t.canInsertTextBefore()||!r.canInsertTextBefore()&&!t.isComposing()||i||function(e){let t=e.getPreviousSibling();return(O(t)||L(t)&&t.isInline())&&!t.canInsertTextAfter()}(t):n===t.getTextContentSize()&&(!t.canInsertTextAfter()||!r.canInsertTextAfter()&&!t.isComposing()||i)}(e,s)}function Tn(e,t){return ya(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function En(e,t,r){let{anchorNode:i,anchorOffset:a,focusNode:o,focusOffset:s}=e;gn&&(gn=!1,Tn(i,a)&&Tn(o,s)&&!Sn)||Ni(t,()=>{if(!r)return void U(null);if(!fa(t,i,o))return;let c=j();if(Sn&&A(c)&&c.isCollapsed()){let e=c.anchor,t=Sn.anchor;(e.key===t.key&&e.offset===t.offset+1||e.offset===1&&t.getNode().is(e.getNode().getPreviousSibling()))&&(c=Sn.clone(),U(c))}if(Sn=null,A(c)){let r=c.anchor,i=r.getNode();if(c.isCollapsed()){e.type===`Range`&&e.anchorNode===e.focusNode&&(c.dirty=!0);let a=K(t).event,o=a?a.timeStamp:performance.now(),[s,l,u,d,f]=Cn,p=H(),m=!1===t.isComposing()&&p.getTextContent()===``;if(o<f+200&&r.offset===u&&r.key===d)Dn(c,s,l);else if(r.type===`text`)O(i)||n(141),On(c,i);else if(r.type===`element`&&!m){L(i)||n(259);let e=r.getNode();e.isEmpty()?function(e,t){Dn(e,t.getTextFormat(),t.getTextStyle())}(c,e):Dn(c,c.format,``)}}else{let e=r.key,t=c.focus.key,n=c.getNodes(),i=n.length,o=c.isBackward(),l=o?s:a,u=o?a:s,d=o?t:e,f=o?e:t,p=2047,m=!1;for(let e=0;e<i;e++){let t=n[e],r=t.getTextContentSize();if(O(t)&&r!==0&&!(e===0&&t.__key===d&&l===r||e===i-1&&t.__key===f&&u===0)&&(m=!0,p&=t.getFormat(),p===0))break}c.format=m?p:0}}G(t,ft,void 0)})}function Dn(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function On(e,t){Dn(e,t.getFormat(),t.getStyle())}function kn(e){if(!e.getTargetRanges)return null;let t=e.getTargetRanges();return t.length===0?null:t[0]}function An(e){let t=e.inputType,r=kn(e),i=I(),a=j();if(t===`deleteContentBackward`){if(a===null){let e=ei();if(!A(e))return!0;U(e.clone())}if(A(a)){let t=a.anchor.key===a.focus.key;if(o=e.timeStamp,dn===`MediaLast`&&o<un+30&&i.isComposing()&&t){if(B(null),un=0,setTimeout(()=>{Ni(i,()=>{B(null)})},30),A(a)){let e=a.anchor.getNode();e.markDirty(),O(e)||n(142),On(a,e)}}else{B(null),e.preventDefault();let n=a.anchor.getNode(),r=n.getTextContent(),o=n.canInsertTextAfter(),s=a.anchor.offset===0&&a.focus.offset===r.length,c=p&&t&&!s&&o;if(c&&a.isCollapsed()&&(c=!R($a(a.anchor,!0))),!c){G(i,yt,!0);let e=j();p&&A(e)&&e.isCollapsed()&&(Sn=e,setTimeout(()=>Sn=null))}}return!0}}var o;if(!A(a))return!0;let s=e.data;pn!==null&&za(!1,i,pn),a.dirty&&pn===null||!a.isCollapsed()||z(a.anchor.getNode())||r===null||a.applyDOMRange(r),pn=null;let c=a.anchor,u=a.focus,d=c.getNode(),f=u.getNode();if(t===`insertText`||t===`insertTranspose`){if(s===`
6
+ `)e.preventDefault(),G(i,bt,!1);else if(s===`
7
+
8
+ `)e.preventDefault(),G(i,xt,void 0);else if(s==null&&e.dataTransfer){let t=e.dataTransfer.getData(`text/plain`);e.preventDefault(),a.insertRawText(t)}else s!=null&&wn(a,r,s,e.timeStamp,!0)?(e.preventDefault(),G(i,St,s)):pn=s;return fn=e.timeStamp,!0}switch(e.preventDefault(),t){case`insertFromYank`:case`insertFromDrop`:case`insertReplacementText`:G(i,St,e);break;case`insertFromComposition`:B(null),G(i,St,e);break;case`insertLineBreak`:B(null),G(i,bt,!1);break;case`insertParagraph`:B(null),vn&&!l?(vn=!1,G(i,bt,!1)):G(i,xt,void 0);break;case`insertFromPaste`:case`insertFromPasteAsQuotation`:G(i,Ct,e);break;case`deleteByComposition`:(function(e,t){return e!==t||L(e)||L(t)||!_a(e)||!_a(t)})(d,f)&&G(i,wt,e);break;case`deleteByDrag`:ao(tr),G(i,wt,e);break;case`deleteByCut`:G(i,wt,e);break;case`deleteContent`:G(i,yt,!1);break;case`deleteWordBackward`:G(i,Tt,!0);break;case`deleteWordForward`:G(i,Tt,!1);break;case`deleteHardLineBackward`:case`deleteSoftLineBackward`:G(i,Et,!0);break;case`deleteContentForward`:case`deleteHardLineForward`:case`deleteSoftLineForward`:G(i,Et,!1);break;case`formatStrikeThrough`:G(i,Dt,`strikethrough`);break;case`formatBold`:G(i,Dt,`bold`);break;case`formatItalic`:G(i,Dt,`italic`);break;case`formatUnderline`:G(i,Dt,`underline`);break;case`historyUndo`:G(i,Ot,void 0);break;case`historyRedo`:G(i,kt,void 0)}return!0}function jn(e){if(Y(e.target)&&ua(e.target))return!0;let t=I(),n=j(),r=e.data,i=kn(e);if(r!=null&&A(n)&&wn(n,i,r,e.timeStamp,!1)){yn&&=(Pn(t,r),!1);let i=n.anchor.getNode(),a=J(K(t));if(a===null)return!0;let o=n.isBackward(),l=o?n.anchor.offset:n.focus.offset,u=o?n.focus.offset:n.anchor.offset;c&&!n.isCollapsed()&&O(i)&&a.anchorNode!==null&&i.getTextContent().slice(0,l)+r+i.getTextContent().slice(l+u)===Ra(a.anchorNode)||G(t,St,r);let d=r.length;s&&d>1&&e.inputType===`insertCompositionText`&&!t.isComposing()&&(n.anchor.offset-=d),p&&t.isComposing()&&(un=0,B(null))}else za(!1,t,r===null?void 0:r),yn&&=(Pn(t,r||void 0),!1);return function(){F(),he(I())}(),!0}function Mn(e){let t=I(),n=j();if(A(n)&&!t.isComposing()){let r=n.anchor,i=n.anchor.getNode();B(r.key),ao(nr),(e.timeStamp<un+30||r.type===`element`||!n.isCollapsed()||i.getFormat()!==n.format||O(i)&&i.getStyle()!==n.style)&&G(t,St,_)}return!0}function Nn(e){return Pn(I(),e.data),ao(rr),!0}function Pn(e,t){let n=e._compositionKey;if(B(null),n!==null&&t!=null){if(t===``){let t=V(n),r=xa(e.getElementByKey(n));if(r!==null&&r.nodeValue!==null&&O(t)){let n=J(K(e)),i=null,a=null;n!==null&&n.anchorNode===r&&(i=n.anchorOffset,a=n.focusOffset),Ba(t,r.nodeValue,i,a,!0)}return}if(t[t.length-1]===`
9
+ `){let t=j();if(A(t)||Rr(t)){if(A(t)){let e=t.focus;t.anchor.set(e.key,e.offset,e.type)}G(e,Lt,null);return}}}za(!0,e,t)}function Fn(e){let t=I();if(e.key==null)return!0;if(bn){if(Ka(e))return Ni(t,()=>{Pn(t,xn)}),bn=!1,xn=``,!0;bn=!1,xn=``}if(function(e){return W(e,`ArrowRight`,{shiftKey:`any`})}(e))G(t,jt,e);else if(function(e){return W(e,`ArrowRight`,Wa)}(e))G(t,Mt,e);else if(function(e){return W(e,`ArrowLeft`,{shiftKey:`any`})}(e))G(t,Nt,e);else if(function(e){return W(e,`ArrowLeft`,Wa)}(e))G(t,Pt,e);else if(function(e){return W(e,`ArrowUp`,{altKey:`any`,shiftKey:`any`})}(e))G(t,Ft,e);else if(function(e){return W(e,`ArrowDown`,{altKey:`any`,shiftKey:`any`})}(e))G(t,It,e);else if(function(e){return W(e,`Enter`,{altKey:`any`,ctrlKey:`any`,metaKey:`any`,shiftKey:!0})}(e))vn=!0,G(t,Lt,e);else if(function(e){return e.key===` `}(e))G(t,Rt,e);else if(function(e){return o&&W(e,`o`,{ctrlKey:!0})}(e))e.preventDefault(),vn=!0,G(t,bt,!0);else if(function(e){return W(e,`Enter`,{altKey:`any`,ctrlKey:`any`,metaKey:`any`})}(e))vn=!1,G(t,Lt,e);else if(function(e){return W(e,`Backspace`,{shiftKey:`any`})||o&&W(e,`h`,{ctrlKey:!0})}(e))Ka(e)?G(t,zt,e):(e.preventDefault(),G(t,yt,!0));else if(function(e){return e.key===`Escape`}(e))G(t,Bt,e);else if(function(e){return W(e,`Delete`,{})||o&&W(e,`d`,{ctrlKey:!0})}(e))(function(e){return e.key===`Delete`})(e)?G(t,Vt,e):(e.preventDefault(),G(t,yt,!1));else if(function(e){return W(e,`Backspace`,Ga)}(e))e.preventDefault(),G(t,Tt,!0);else if(function(e){return W(e,`Delete`,Ga)}(e))e.preventDefault(),G(t,Tt,!1);else if(function(e){return o&&W(e,`Backspace`,{metaKey:!0})}(e))e.preventDefault(),G(t,Et,!0);else if(function(e){return o&&(W(e,`Delete`,{metaKey:!0})||W(e,`k`,{ctrlKey:!0}))}(e))e.preventDefault(),G(t,Et,!1);else if(function(e){return W(e,`b`,Wa)}(e))e.preventDefault(),G(t,Dt,`bold`);else if(function(e){return W(e,`u`,Wa)}(e))e.preventDefault(),G(t,Dt,`underline`);else if(function(e){return W(e,`i`,Wa)}(e))e.preventDefault(),G(t,Dt,`italic`);else if(function(e){return W(e,`Tab`,{shiftKey:`any`})}(e))G(t,Ht,e);else if(function(e){return W(e,`z`,Wa)}(e))e.preventDefault(),G(t,Ot,void 0);else if(function(e){return o?W(e,`z`,{metaKey:!0,shiftKey:!0}):W(e,`y`,{ctrlKey:!0})||W(e,`z`,{ctrlKey:!0,shiftKey:!0})}(e))e.preventDefault(),G(t,kt,void 0);else{let n=t._editorState._selection;n===null||A(n)?qa(e)&&(e.preventDefault(),G(t,$t,e)):function(e){return W(e,`c`,Wa)}(e)?(e.preventDefault(),G(t,Zt,e)):function(e){return W(e,`x`,Wa)}(e)?(e.preventDefault(),G(t,Qt,e)):qa(e)&&(e.preventDefault(),G(t,$t,e))}return function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey}(e)&&t.dispatchCommand(sn,e),!0}function In(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}const Ln=new Map;function Rn(e){let t=vo(e.target);if(t===null)return;let n=ma(t.anchorNode);if(n===null)return;_n&&(_n=!1,Ni(n,()=>{let r=ei(),i=t.anchorNode;(Y(i)||ya(i))&&U($r(r,t,n,e))}));let r=Ia(n),i=r[r.length-1],a=i._key,o=Ln.get(a),s=o||i;s!==n&&En(t,s,!1),En(t,n,!0),n===i?o&&Ln.delete(a):Ln.set(a,n)}function zn(e){e._lexicalHandled=!0}function Bn(e){return!0===e._lexicalHandled}function Vn(e){let t=mn.get(e);if(t===void 0)return;let r=hn.get(t);if(r===void 0)return;let i=r-1;i>=0||n(164),mn.delete(e),hn.set(t,i),i===0&&t.removeEventListener(`selectionchange`,Rn);let a=ha(e);pa(a)?(function(e){if(e._parentEditor!==null){let t=Ia(e),n=t[t.length-1]._key;Ln.get(n)===e&&Ln.delete(n)}else Ln.delete(e._key)}(a),e.__lexicalEditor=null):a&&n(198);let o=In(e);for(let e=0;e<o.length;e++)o[e]();e.__lexicalEventHandles=[]}function Hn(e,t,n){F();let r=e.__key,i=e.getParent();if(i===null)return;let a=function(e){let t=j();if(!A(t)||!L(e))return t;let{anchor:n,focus:r}=t,i=n.getNode(),a=r.getNode();return so(i,e)&&n.set(e.__key,0,`element`),so(a,e)&&r.set(e.__key,0,`element`),t}(e),o=!1;if(A(a)&&t){let t=a.anchor,n=a.focus;t.key===r&&(ri(t,e,i,e.getPreviousSibling(),e.getNextSibling()),o=!0),n.key===r&&(ri(n,e,i,e.getPreviousSibling(),e.getNextSibling()),o=!0)}else Rr(a)&&t&&e.isSelected()&&e.selectPrevious();if(A(a)&&t&&!o){let t=e.getIndexWithinParent();Ta(e),ti(a,i,t,-1)}else Ta(e);n||q(i)||i.canBeEmpty()||!i.isEmpty()||Hn(i,t),t&&a&&z(i)&&i.isEmpty()&&i.selectEnd()}function Un(e){return e}const Wn=Symbol.for(`ephemeral`);function Gn(e){return e[Wn]||!1}var E=class{__type;__key;__parent;__prev;__next;__state;static getType(){let{ownNodeType:e}=Lo(this);return e===void 0&&n(64,this.name),e}static clone(e){n(65,this.name)}$config(){return{}}config(e,t){let n=t.extends||Object.getPrototypeOf(this.constructor);return Object.assign(t,{extends:n,type:e}),{[e]:t}}afterCloneFrom(e){this.__key===e.__key?(this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev,this.__state=e.__state):e.__state&&(this.__state=e.__state.getWritable(this))}resetOnCopyNodeFrom(e){this.__state&&=this.__state.getWritable(this).resetOnCopyNode()}static importDOM;constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",{configurable:!0,enumerable:!1,value:void 0,writable:!0}),wa(this,e)}getType(){return this.__type}isInline(){n(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e===`root`)return!0;let t=V(e);if(t===null)break;e=t.__parent}return!1}isSelected(e){let t=e||j();if(t==null)return!1;let n=t.getNodes().some(e=>e.__key===this.__key);if(O(this))return n;if(A(t)&&t.anchor.type===`element`&&t.focus.type===`element`){if(t.isCollapsed())return!1;let e=this.getParent();if(R(this)&&this.isInline()&&e){let n=t.isBackward()?t.focus:t.anchor;if(e.is(n.getNode())&&n.offset===e.getChildrenSize()&&this.is(e.getLastChild()))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){let e=this.getParent();if(e===null)return-1;let t=e.getFirstChild(),n=0;for(;t!==null;){if(this.is(t))return n;n++,t=t.getNextSibling()}return-1}getParent(){let e=this.getLatest().__parent;return e===null?null:V(e)}getParentOrThrow(){let e=this.getParent();return e===null&&n(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){let t=e.getParent();if(q(t))return L(e)||e===this&&R(e)||n(194),e;e=t}return null}getTopLevelElementOrThrow(){let e=this.getTopLevelElement();return e===null&&n(67,this.__key),e}getParents(){let e=[],t=this.getParent();for(;t!==null;)e.push(t),t=t.getParent();return e}getParentKeys(){let e=[],t=this.getParent();for(;t!==null;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){let e=this.getLatest().__prev;return e===null?null:V(e)}getPreviousSiblings(){let e=[],t=this.getParent();if(t===null)return e;let n=t.getFirstChild();for(;n!==null&&!n.is(this);)e.push(n),n=n.getNextSibling();return e}getNextSibling(){let e=this.getLatest().__next;return e===null?null:V(e)}getNextSiblings(){let e=[],t=this.getNextSibling();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){let t=L(this)?this:this.getParent(),n=L(e)?e:e.getParent(),r=t&&n?vs(t,n):null;return r?r.commonAncestor:null}is(e){return e!=null&&this.__key===e.__key}isBefore(e){let t=vs(this,e);return t!==null&&(t.type===`descendant`||(t.type===`branch`?hs(t)===-1:(t.type!==`same`&&t.type!==`ancestor`&&n(279),!1)))}isParentOf(e){let t=vs(this,e);return t!==null&&t.type===`ancestor`}getNodesBetween(e){let t=this.isBefore(e),r=[],i=new Set,a=this;for(;a!==null;){let o=a.__key;if(i.has(o)||(i.add(o),r.push(a)),a===e)break;let s=L(a)?t?a.getFirstChild():a.getLastChild():null;if(s!==null){a=s;continue}let c=t?a.getNextSibling():a.getPreviousSibling();if(c!==null){a=c;continue}let l=a.getParentOrThrow();if(i.has(l.__key)||r.push(l),l===e)break;let u=null,d=l;do{if(d===null&&n(68),u=t?d.getNextSibling():d.getPreviousSibling(),d=d.getParent(),d===null)break;u!==null||i.has(d.__key)||r.push(d)}while(u===null);a=u}return t||r.reverse(),r}isDirty(){let e=I()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){if(Gn(this))return this;let e=V(this.__key);return e===null&&n(113),e}getWritable(){if(Gn(this))return this;F();let e=vi(),t=I(),n=e._nodeMap,r=this.__key,i=this.getLatest(),a=t._cloneNotNeeded,o=j();if(o!==null&&o.setCachedNodes(null),a.has(r))return Ea(i),i;let s=jo(i);return a.add(r),Ea(s),n.set(r,s),s}getTextContent(){return``}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){n(70)}updateDOM(e,t,r){n(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){let e=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...e}}static importJSON(e){n(18,this.name)}updateFromJSON(e){return function(e,t){let n=e.getWritable(),r=t.$,i=r;for(let e of Te(n).flatKeys)e in t&&(i!==void 0&&i!==r||(i={...r}),i[e]=t[e]);return(n.__state||i)&&we(e).updateFromJSON(i),n}(this,e)}static transform(){return null}remove(e){Hn(this,!0,e)}replace(e,t){F();let r=j();r!==null&&(r=r.clone()),mo(this,e);let i=this.getLatest(),a=this.__key,o=e.__key,s=e.getWritable(),c=this.getParentOrThrow().getWritable(),l=c.__size;Ta(s);let u=i.getPreviousSibling(),d=i.getNextSibling(),f=i.__prev,p=i.__next,m=i.__parent;if(Hn(i,!1,!0),u===null?c.__first=o:u.getWritable().__next=o,s.__prev=f,d===null?c.__last=o:d.getWritable().__prev=o,s.__next=p,s.__parent=m,c.__size=l,t&&(L(this)&&L(s)||n(139),this.getChildren().forEach(e=>{s.append(e)})),A(r)){U(r);let e=r.anchor,t=r.focus;e.key===a&&Fr(e,s),t.key===a&&Fr(t,s)}return Da()===a&&B(o),s}insertAfter(e,t=!0){F(),mo(this,e);let n=this.getWritable(),r=e.getWritable(),i=r.getParent(),a=j(),o=!1,s=!1;if(i!==null){let t=e.getIndexWithinParent();if(Ta(r),A(a)){let e=i.__key,n=a.anchor,r=a.focus;o=n.type===`element`&&n.key===e&&n.offset===t+1,s=r.type===`element`&&r.key===e&&r.offset===t+1}}let c=this.getNextSibling(),l=this.getParentOrThrow().getWritable(),u=r.__key,d=n.__next;if(c===null?l.__last=u:c.getWritable().__prev=u,l.__size++,n.__next=u,r.__next=d,r.__prev=n.__key,r.__parent=n.__parent,t&&A(a)){let e=this.getIndexWithinParent();ti(a,l,e+1);let t=l.__key;o&&a.anchor.set(t,e+2,`element`),s&&a.focus.set(t,e+2,`element`)}return e}insertBefore(e,t=!0){F(),mo(this,e);let n=this.getWritable(),r=e.getWritable(),i=r.__key;Ta(r);let a=this.getPreviousSibling(),o=this.getParentOrThrow().getWritable(),s=n.__prev,c=this.getIndexWithinParent();a===null?o.__first=i:a.getWritable().__next=i,o.__size++,n.__prev=i,r.__prev=s,r.__next=n.__key,r.__parent=n.__parent;let l=j();return t&&A(l)&&ti(l,this.getParentOrThrow(),c),e}isParentRequired(){return!1}createParentElementNode(){return Ji()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){F();let n=this.getPreviousSibling(),r=this.getParentOrThrow();if(n===null)return r.select(0,0);if(L(n))return n.select();if(!O(n)){let e=n.getIndexWithinParent()+1;return r.select(e,e)}return n.select(e,t)}selectNext(e,t){F();let n=this.getNextSibling(),r=this.getParentOrThrow();if(n===null)return r.select();if(L(n))return n.select(0,0);if(!O(n)){let e=n.getIndexWithinParent();return r.select(e,e)}return n.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}};function Kn(e){return e instanceof E}const qn=`historic`,Jn=`history-push`,Yn=`history-merge`,Xn=`paste`,Zn=`collaboration`,Qn=`skip-collab`,$n=`skip-scroll-into-view`,er=`skip-dom-selection`,tr=`skip-selection-focus`,nr=`composition-start`,rr=`composition-end`,ir=/\s*!important\s*$/i;function ar(e){let t={};if(!e)return t;let n=``,r=``,i=null,a=!1,o=!1,s=!1,c=0;for(let l=0;l<e.length;l++){let u=e[l];if(a)u===`*`&&e[l+1]===`/`&&(a=!1,l++);else if(o)s?r+=u:n+=u,o=!1;else if(i===null)if(u!==`/`||e[l+1]!==`*`)if(u!==`"`&&u!==`'`)if(u!==`(`)if(u!==`)`)if(s||u!==`:`||c!==0){if(u===`;`&&c===0){let e=n.trim(),i=r.trim();e!==``&&i!==``&&(t[e]=i),n=``,r=``,s=!1;continue}s?r+=u:n+=u}else s=!0;else c=Math.max(0,c-1),s?r+=u:n+=u;else c++,s?r+=u:n+=u;else i=u,s?r+=u:n+=u;else a=!0,l++;else s?r+=u:n+=u,u===`\\`?o=!0:u===i&&(i=null)}let l=n.trim(),u=r.trim();return l!==``&&u!==``&&(t[l]=u),t}function or(e,t,n){let r=ir.test(n)?`important`:``,i=r===``?n:n.replace(ir,``).trim();e.setProperty(t,i,r)}function sr(e,t){for(let n in t){let r=t[n];r==null?e.removeProperty(n):or(e,n,r)}}function cr(e,t,n=``){if(t===n)return;let r=ar(n),i=ar(t);for(let t in i)delete r[t],or(e,t,i[t]);for(let t in r)e.removeProperty(t)}var lr=class e extends E{static getType(){return`linebreak`}static clone(t){return new e(t.__key)}constructor(e){super(e)}getTextContent(){return`
10
+ `}createDOM(){return document.createElement(`br`)}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:e=>function(e){let t=e.parentElement;if(t!==null&&wo(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&pr(n)){let n=t.lastChild;if(n===e||n.previousSibling===e&&pr(n))return!0}}return!1}(e)||function(e){let t=e.parentElement;if(t!==null&&wo(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&pr(n))return!1;let r=t.lastChild;if(r===e||r.previousSibling===e&&pr(r))return!0}return!1}(e)?null:{conversion:ur,priority:0}}}static importJSON(e){return dr().updateFromJSON(e)}};function ur(e){return{node:dr()}}function dr(){return po(new lr)}function fr(e){return e instanceof lr}function pr(e){return ya(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||``)}function mr(e,t){return 16&t?`code`:t&128?`mark`:32&t?`sub`:64&t?`sup`:null}function hr(e,t){return 1&t?`strong`:2&t?`em`:`span`}function gr(e,t,n,r,i){let a=r.classList,o=Ya(i,`base`);o!==void 0&&a.add(...o),o=Ya(i,`underlineStrikethrough`);let s=!1,c=8&t&&4&t;o!==void 0&&(8&n&&4&n?(s=!0,c||a.add(...o)):c&&a.remove(...o));for(let e in y){let r=y[e];if(o=Ya(i,e),o!==void 0)if(n&r){if(s&&(e===`underline`||e===`strikethrough`)){t&r&&a.remove(...o);continue}((t&r)===0||c&&e===`underline`||e===`strikethrough`)&&a.add(...o)}else t&r&&a.remove(...o)}}function _r(e,t,n){let r=t.firstChild,i=n.isComposing(),a=e+(i?g:``);if(r==null)t.textContent=a;else{let e=r.nodeValue;if(e!==a)if(i||s){let[t,n,i]=function(e,t){let n=e.length,r=t.length,i=0,a=0;for(;i<n&&i<r&&e[i]===t[i];)i++;for(;a+i<n&&a+i<r&&e[n-a-1]===t[r-a-1];)a++;return[i,n-i-a,t.slice(i,r-a)]}(e,a);n!==0&&r.deleteData(t,n),r.insertData(t,i)}else r.nodeValue=a}}function vr(e,t,n,r,i,a){_r(i,e,t);let o=a.theme.text;o!==void 0&&gr(0,0,r,e,o)}function yr(e,t){let n=document.createElement(t);return n.appendChild(e),n}var br=class e extends E{__text;__format;__style;__mode;__detail;static getType(){return`text`}static clone(t){return new e(t.__text,t.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text,this.__format=e.__format,this.__style=e.__style,this.__mode=e.__mode,this.__detail=e.__detail}constructor(e=``,t){super(t),this.__text=e,this.__format=0,this.__style=``,this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){let e=this.getLatest();return re[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Da()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){let t=y[e];return(this.getFormat()&t)!==0}isSimpleText(){return this.__type===`text`&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return Sa(this.getLatest().__format,e,t)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,t){let n=this.__format,r=mr(0,n),i=hr(0,n),a=r===null?i:r,o=document.createElement(a),s=o;this.hasFormat(`code`)&&o.setAttribute(`spellcheck`,`false`),r!==null&&(s=document.createElement(i),o.appendChild(s)),vr(s,this,0,n,this.__text,e);let c=this.__style;return c!==``&&cr(o.style,c),o}updateDOM(e,t,r){let i=this.__text,a=e.__format,o=this.__format,s=mr(0,a),c=mr(0,o),l=hr(0,a),u=hr(0,o);if((s===null?l:s)!==(c===null?u:c))return!0;if(s===c&&l!==u){let e=t.firstChild;e??n(48);let a=document.createElement(u);return vr(a,this,0,o,i,r),t.replaceChild(a,e),!1}let d=t;c!==null&&s!==null&&(d=t.firstChild,d??n(49)),_r(i,d,this);let f=r.theme.text;f!==void 0&&a!==o&&gr(0,a,o,d,f);let p=e.__style,m=this.__style;return p!==m&&cr(t.style,m,p),!1}static importDOM(){return{"#text":()=>({conversion:Tr,priority:0}),b:()=>({conversion:Sr,priority:0}),code:()=>({conversion:Or,priority:0}),em:()=>({conversion:Or,priority:0}),i:()=>({conversion:Or,priority:0}),mark:()=>({conversion:Or,priority:0}),s:()=>({conversion:Or,priority:0}),span:()=>({conversion:xr,priority:0}),strong:()=>({conversion:Or,priority:0}),sub:()=>({conversion:Or,priority:0}),sup:()=>({conversion:Or,priority:0}),u:()=>({conversion:Or,priority:0})}}static importJSON(e){return D().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTextContent(e.text).setFormat(e.format).setDetail(e.detail).setMode(e.mode).setStyle(e.style)}exportDOM(e){let{element:t}=super.exportDOM(e);return Y(t)||n(132),t.style.whiteSpace=`pre-wrap`,this.hasFormat(`lowercase`)?t.style.textTransform=`lowercase`:this.hasFormat(`uppercase`)?t.style.textTransform=`uppercase`:this.hasFormat(`capitalize`)&&(t.style.textTransform=`capitalize`),this.hasFormat(`bold`)&&(t=yr(t,`b`)),this.hasFormat(`italic`)&&(t=yr(t,`i`)),this.hasFormat(`strikethrough`)&&(t=yr(t,`s`)),this.hasFormat(`underline`)&&(t=yr(t,`u`)),{element:t}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(e,t){}setFormat(e){let t=this.getWritable();return t.__format=typeof e==`string`?y[e]:e,t}setDetail(e){let t=this.getWritable();return t.__detail=typeof e==`string`?b[e]:e,t}setStyle(e){let t=this.getWritable();return t.__style=e,t}toggleFormat(e){let t=Sa(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){let e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){let e=this.getWritable();return e.__detail^=2,e}setMode(e){let t=ne[e];if(this.__mode===t)return this;let n=this.getWritable();return n.__mode=t,n}setTextContent(e){if(this.__text===e)return this;let t=this.getWritable();return t.__text=e,t}select(e,t){F();let n=e,r=t,i=j(),a=this.getTextContent(),o=this.__key;if(typeof a==`string`){let e=a.length;n===void 0&&(n=e),r===void 0&&(r=e)}else n=0,r=0;if(!A(i))return Yr(o,n,o,r,`text`,`text`);{let e=Da();e!==i.anchor.key&&e!==i.focus.key||B(o),i.setTextNodeRange(this,n,this,r)}return i}selectStart(){return this.select(0,0)}selectEnd(){let e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,n,r){let i=this.getWritable(),a=i.__text,o=n.length,s=e;s<0&&(s=o+s,s<0&&(s=0));let c=j();if(r&&A(c)){let t=e+o;c.setTextNodeRange(i,t,i,t)}return i.__text=a.slice(0,s)+n+a.slice(s+t),i}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){F();let t=this.getLatest(),n=t.getTextContent();if(n===``)return[];let r=t.__key,i=Da(),a=n.length;e.sort((e,t)=>e-t),e.push(a);let o=[],s=e.length;for(let t=0,r=0;t<a&&r<=s;r++){let i=e[r];i>t&&(o.push(n.slice(t,i)),t=i)}let c=o.length;if(c===1)return[t];let l=o[0],u=t.getParent(),d,f=t.getFormat(),p=t.getStyle(),m=t.__detail,h=!1,g=null,_=null,v=j();if(A(v)){let[e,t]=v.isBackward()?[v.focus,v.anchor]:[v.anchor,v.focus];e.type===`text`&&e.key===r&&(g=e),t.type===`text`&&t.key===r&&(_=t)}t.isSegmented()?(d=D(l),d.__format=f,d.__style=p,d.__detail=m,d.__state=Ae(t,d),h=!0):d=t.setTextContent(l);let ee=[d];for(let e=1;e<c;e++){let n=D(o[e]);n.__format=f,n.__style=p,n.__detail=m,n.__state=Ae(t,n);let a=n.__key;i===r&&B(a),ee.push(n)}let y=g?g.offset:null,b=_?_.offset:null,x=0;for(let e of ee){if(!g&&!_)break;let t=x+e.getTextContentSize();if(g!==null&&y!==null&&y<=t&&y>=x&&(g.set(e.getKey(),y-x,`text`),y<t&&(g=null)),_!==null&&b!==null&&b<=t&&b>=x){_.set(e.getKey(),b-x,`text`);break}x=t}if(u!==null){(function(e){let t=e.getPreviousSibling(),n=e.getNextSibling();t!==null&&Ea(t),n!==null&&Ea(n)})(this);let e=u.getWritable(),t=this.getIndexWithinParent();h?(e.splice(t,0,ee),this.remove()):e.splice(t,1,ee),A(v)&&ti(v,u,t,c-1)}return ee}mergeWithSibling(e){let t=e===this.getPreviousSibling();t||e===this.getNextSibling()||n(50);let r=this.__key,i=e.__key,a=this.__text,o=a.length;Da()===i&&B(r);let s=j();if(A(s)){let n=s.anchor,a=s.focus;n!==null&&n.key===i&&ii(n,t,r,e,o),a!==null&&a.key===i&&ii(a,t,r,e,o)}let c=e.__text,l=t?c+a:a+c;this.setTextContent(l);let u=this.getWritable();return e.remove(),u}isTextEntity(){return!1}};function xr(e){return{forChild:kr(e.style),node:null}}function Sr(e){let t=e,n=t.style.fontWeight===`normal`;return{forChild:kr(t.style,n?void 0:`bold`),node:null}}const Cr=new WeakMap;function wr(e){if(!Y(e))return!1;if(e.nodeName===`PRE`)return!0;let t=e.style.whiteSpace;return typeof t==`string`&&t.startsWith(`pre`)}function Tr(e){let t=e;e.parentElement===null&&n(129);let r=t.textContent||``;if(function(e){let t,n=e.parentNode,r=[e];for(;n!==null&&(t=Cr.get(n))===void 0&&!wr(n);)r.push(n),n=n.parentNode;let i=t===void 0?n:t;for(let e=0;e<r.length;e++)Cr.set(r[e],i);return i}(t)!==null){let e=r.split(/(\r?\n|\t)/),t=[],n=e.length;for(let r=0;r<n;r++){let n=e[r];n===`
11
+ `||n===`\r
12
+ `?t.push(dr()):n===` `?t.push(jr()):n!==``&&t.push(D(n))}return{node:t}}if(r=r.replace(/\r/g,``).replace(/[ \t\n]+/g,` `),r===``)return{node:null};if(r[0]===` `){let e=t,n=!0;for(;e!==null&&(e=Er(e,!1))!==null;){let t=e.textContent||``;if(t.length>0){/[ \t\n]$/.test(t)&&(r=r.slice(1)),n=!1;break}}n&&(r=r.slice(1))}if(r[r.length-1]===` `){let e=t,n=!0;for(;e!==null&&(e=Er(e,!0))!==null;)if((e.textContent||``).replace(/^( |\t|\r?\n)+/,``).length>0){n=!1;break}n&&(r=r.slice(0,r.length-1))}return r===``?{node:null}:{node:D(r)}}function Er(e,t){let n=e;for(;;){let e;for(;(e=t?n.nextSibling:n.previousSibling)===null;){let e=n.parentElement;if(e===null)return null;n=e}if(n=e,Y(n)){let e=n.style.display;if(e===``&&!Co(n)||e!==``&&!e.startsWith(`inline`))return null}let r=n;for(;(r=t?n.firstChild:n.lastChild)!==null;)n=r;if(ya(n))return n;if(n.nodeName===`BR`)return null}}const Dr={code:`code`,em:`italic`,i:`italic`,mark:`highlight`,s:`strikethrough`,strong:`bold`,sub:`subscript`,sup:`superscript`,u:`underline`};function Or(e){let t=Dr[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:kr(e.style,t),node:null}}function D(e=``){return po(new br(e))}function O(e){return e instanceof br}function kr(e,t){let n=e.fontWeight,r=e.textDecoration.split(` `),i=n===`700`||n===`bold`,a=r.includes(`line-through`),o=e.fontStyle===`italic`,s=r.includes(`underline`),c=e.verticalAlign;return e=>O(e)?(i&&!e.hasFormat(`bold`)&&e.toggleFormat(`bold`),a&&!e.hasFormat(`strikethrough`)&&e.toggleFormat(`strikethrough`),o&&!e.hasFormat(`italic`)&&e.toggleFormat(`italic`),s&&!e.hasFormat(`underline`)&&e.toggleFormat(`underline`),c!==`sub`||e.hasFormat(`subscript`)||e.toggleFormat(`subscript`),c!==`super`||e.hasFormat(`superscript`)||e.toggleFormat(`superscript`),t&&!e.hasFormat(t)&&e.toggleFormat(t),e):e}var Ar=class e extends br{static getType(){return`tab`}static clone(t){return new e(t.__key)}constructor(e){super(` `,e),this.__detail=2}static importDOM(){return null}createDOM(e){let t=super.createDOM(e),n=Ya(e.theme,`tab`);return n!==void 0&&t.classList.add(...n),t}static importJSON(e){return jr().updateFromJSON(e)}setTextContent(e){return e!==` `&&e!==``&&r(126),super.setTextContent(` `)}spliceText(e,t,r,i){return r===``&&t===0||r===` `&&t===1||n(286),this}setDetail(e){return e!==2&&n(127),this}setMode(e){return e!==`normal`&&n(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}};function jr(){return po(new Ar)}function Mr(e){return e instanceof Ar}var Nr=class{key;offset;type;_selection;constructor(e,t,n){this._selection=null,this.key=e,this.offset=t,this.type=n}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){return this.key===e.key?this.offset<e.offset:ms(Q(ys(this,`next`)),Q(ys(e,`next`)))<0}getNode(){let e=V(this.key);return e===null&&n(20),e}set(e,t,n,r){let i=this._selection,a=this.key;r&&this.key===e&&this.offset===t&&this.type===n||(this.key=e,this.offset=t,this.type=n,gi()||(Da()===a&&B(e),i!==null&&(i.setCachedNodes(null),i.dirty=!0)))}};function k(e,t,n){return new Nr(e,t,n)}function Pr(e,t){let n=t.__key,r=e.offset,i=`element`;if(O(t)){i=`text`;let e=t.getTextContentSize();r>e&&(r=e)}else if(!L(t)){let e=t.getNextSibling();if(O(e))n=e.__key,r=0,i=`text`;else{let e=t.getParent();e&&(n=e.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,i)}function Fr(e,t){if(L(t)){let n=t.getLastDescendant();L(n)||O(n)?Pr(e,n):Pr(e,t)}else Pr(e,t)}var Ir=class e{_nodes;_cachedNodes;dirty;constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!Rr(e))return!1;let t=this._nodes,n=e._nodes;return t.size===n.size&&Array.from(t).every(e=>n.has(e))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new e(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){let t=this.getNodes(),n=t.length,r=t[n-1],i;if(O(r))i=r.select();else{let e=r.getIndexWithinParent()+1;i=r.getParentOrThrow().select(e,e)}i.insertNodes(e);for(let e=0;e<n;e++)t[e].remove()}getNodes(){let e=this._cachedNodes;if(e!==null)return e;let t=this._nodes,n=[];for(let e of t){let t=V(e);t!==null&&n.push(t)}return gi()||(this._cachedNodes=n),n}getTextContent(){let e=this.getNodes(),t=``;for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}deleteNodes(){let e=this.getNodes();if((j()||ei())===this&&e[0]){let t=Z(e[0],`next`);xs(fs(t,t))}for(let t of e)t.remove()}};function A(e){return e instanceof Lr}var Lr=class e{format;style;anchor;focus;_cachedNodes;dirty;constructor(e,t,n,r){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this.format=n,this.style=r,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!A(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){let e=this._cachedNodes;if(e!==null)return e;let t=function(e){let t=[],[n,r]=e.getTextSlices();n&&t.push(n.caret.origin);let i=new Set,a=new Set;for(let n of e)if(X(n)){let{origin:e}=n;t.length===0?i.add(e):(a.add(e),t.push(e))}else{let{origin:e}=n;L(e)&&a.has(e)||t.push(e)}if(r&&t.push(r.caret.origin),Zo(e.focus)&&L(e.focus.origin)&&e.focus.getNodeAtCaret()===null)for(let n=is(e.focus.origin,`previous`);X(n)&&i.has(n.origin)&&!n.origin.isEmpty()&&n.origin.is(t[t.length-1]);n=os(n))i.delete(n.origin),t.pop();for(;t.length>1;){let e=t[t.length-1];if(!L(e)||a.has(e)||e.isEmpty()||i.has(e))break;t.pop()}if(t.length===0&&e.isCollapsed()){let n=Q(e.anchor),r=Q(e.anchor.getFlipped()),i=e=>Yo(e)?e.origin:e.getNodeAtCaret(),a=i(n)||i(r)||(e.anchor.getNodeAtCaret()?n.origin:r.origin);t.push(a)}return t}(As(Cs(this),`next`));return gi()||(this._cachedNodes=t),t}setTextNodeRange(e,t,n,r){this.anchor.set(e.__key,t,`text`),this.focus.set(n.__key,r,`text`)}getTextContent(){let e=this.getNodes();if(e.length===0)return``;let t=e[0],n=e[e.length-1],r=this.anchor,i=this.focus,a=r.isBefore(i),[o,s]=Br(this),c=``,l=!0;for(let u=0;u<e.length;u++){let d=e[u];if(L(d)&&!d.isInline())l||(c+=`
13
+ `),l=!d.isEmpty();else if(l=!1,O(d)){let e=d.getTextContent();d===t?d===n?r.type===`element`&&i.type===`element`&&i.offset!==r.offset||(e=o<s?e.slice(o,s):e.slice(s,o)):e=a?e.slice(o):e.slice(s):d===n&&(e=a?e.slice(0,s):e.slice(0,o)),c+=e}else!R(d)&&!fr(d)||d===n&&this.isCollapsed()||(c+=d.getTextContent())}return c}applyDOMRange(e){let t=I(),n=t.getEditorState()._selection,r=qr(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n);if(r===null)return;let[i,a]=r;this.anchor.set(i.key,i.offset,i.type,!0),this.focus.set(a.key,a.offset,a.type,!0),Pe(this)}clone(){let t=this.anchor,n=this.focus;return new e(k(t.key,t.offset,t.type),k(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(e){this.format=Sa(this.format,e,null),this.dirty=!0}setFormat(e){this.format=e,this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){let t=y[e];return(this.format&t)!==0}insertRawText(e){let t=e.split(/(\r?\n|\t)/),n=[],r=t.length;for(let e=0;e<r;e++){let r=t[e];r===`
14
+ `||r===`\r
15
+ `?n.push(dr()):r===` `?n.push(jr()):n.push(D(r))}this.insertNodes(n)}insertText(e){let t=this.anchor,r=this.focus,i=this.format,a=this.style,o=t,s=r;!this.isCollapsed()&&r.isBefore(t)&&(o=r,s=t),o.type===`element`&&function(e,t,n,r){let i=e.getNode(),a=i.getChildAtIndex(e.offset),o=D();if(o.setFormat(n),o.setStyle(r),Yi(a))a.splice(0,0,[o]);else{let e=z(i)?Ji().append(o):o;a===null?i.append(e):a.insertBefore(e)}e.is(t)&&t.set(o.__key,0,`text`),e.set(o.__key,0,`text`)}(o,s,i,a),s.type===`element`&&bs(s,Q(ys(s,`next`)));let c=o.offset,l=s.offset,u=this.getNodes(),d=u.length,f=u[0];O(f)||n(26);let p=f.getTextContent().length,m=f.getParentOrThrow(),h=u[d-1];if(d===1&&s.type===`element`&&(l=p,s.set(o.key,l,`text`)),this.isCollapsed()&&c===p&&(va(f)||!f.canInsertTextAfter()||!m.canInsertTextAfter()&&f.getNextSibling()===null)){let t=f.getNextSibling();if(O(t)&&t.canInsertTextBefore()&&!va(t)||(t=D(),t.setFormat(i),t.setStyle(a),m.canInsertTextAfter()?f.insertAfter(t):m.insertAfter(t)),t.select(0,0),f=t,e!==``)return void this.insertText(e)}else if(this.isCollapsed()&&c===0&&(va(f)||!f.canInsertTextBefore()||!m.canInsertTextBefore()&&f.getPreviousSibling()===null)){let t=f.getPreviousSibling();if(O(t)&&!va(t)||(t=D(),t.setFormat(i),m.canInsertTextBefore()?f.insertBefore(t):m.insertBefore(t)),t.select(),f=t,e!==``)return void this.insertText(e)}else if(f.isSegmented()&&c!==p){let e=D(f.getTextContent());e.setFormat(i),f.replace(e),f=e}else if(!this.isCollapsed()&&e!==``){let t=h.getParent();if(!m.canInsertTextBefore()||!m.canInsertTextAfter()||L(t)&&(!t.canInsertTextBefore()||!t.canInsertTextAfter()))return this.insertText(``),Kr(this.anchor,this.focus),void this.insertText(e)}if(d===1){if(_a(f)){let t=D(e);t.select(),f.replace(t);return}let t=f.getFormat(),n=f.getStyle();if(c!==l||t===i&&n===a){if(Mr(f)){let t=D(e);t.setFormat(i),t.setStyle(a),t.select(),f.replace(t);return}}else{if(f.getTextContent()!==``){let t=D(e);if(t.setFormat(i),t.setStyle(a),t.select(),c===0)f.insertBefore(t,!1);else{let[e]=f.splitText(c);e.insertAfter(t,!1)}t.isComposing()&&this.anchor.type===`text`&&(this.anchor.offset-=e.length);return}f.setFormat(i),f.setStyle(a)}let r=l-c;f=f.spliceText(c,r,e,!0),f.getTextContent()===``?f.remove():this.anchor.type===`text`&&(this.format=t,this.style=n,f.isComposing()&&(this.anchor.offset-=e.length))}else{let t=new Set([...f.getParentKeys(),...h.getParentKeys()]),n=L(f)?f:f.getParentOrThrow(),r=L(h)?h:h.getParentOrThrow(),i=h;if(!n.is(r)&&r.isInline())do i=r,r=r.getParentOrThrow();while(r.isInline());if(s.type===`text`&&(l!==0||h.getTextContent()===``)||s.type===`element`&&h.getIndexWithinParent()<l)if(O(h)&&!_a(h)&&l!==h.getTextContentSize()){if(h.isSegmented()){let e=D(h.getTextContent());h.replace(e),h=e}z(s.getNode())||s.type!==`text`||(h=h.spliceText(0,l,``)),t.add(h.__key)}else{let e=h.getParentOrThrow();e.canBeEmpty()||e.getChildrenSize()!==1?h.remove():e.remove()}else t.add(h.__key);let a=r.getChildren(),o=new Set(u),m=n.is(r),g=n.isInline()&&f.getNextSibling()===null?n:f;for(let e=a.length-1;e>=0;e--){let t=a[e];if(t.is(f)||L(t)&&t.isParentOf(f))break;t.isAttached()&&(!o.has(t)||t.is(i)?m||g.insertAfter(t,!1):t.remove())}if(!m){let e=r,n=null;for(;e!==null;){let r=e.getChildren(),i=r.length;(i===0||r[i-1].is(n))&&(t.delete(e.__key),n=e),e=e.getParent()}}if(_a(f))if(c===p)f.select();else{let t=D(e);t.select(),f.replace(t)}else f=f.spliceText(c,p-c,e,!0),f.getTextContent()===``?f.remove():this.anchor.type===`text`&&(this.format=f.getFormat(),this.style=f.getStyle(),f.isComposing()&&(this.anchor.offset-=e.length));for(let e=1;e<d;e++){let n=u[e],r=n.__key;t.has(r)||n.remove()}}}removeText(){let e=j()===this;Ss(this,Ds(Cs(this))),e&&j()!==this&&U(this)}formatText(e,t=null){if(this.isCollapsed())return this.toggleFormat(e),void B(null);let n=this.getNodes(),r=[];for(let e of n)O(e)&&r.push(e);let i=t=>{n.forEach(n=>{if(L(n)){let r=n.getFormatFlags(e,t);n.setTextFormat(r)}})},a=r.length;if(a===0)return this.toggleFormat(e),B(null),void i(t);let o=this.anchor,s=this.focus,c=this.isBackward(),l=c?s:o,u=c?o:s,d=0,f=r[0],p=l.type===`element`?0:l.offset;if(l.type===`text`&&p===f.getTextContentSize()&&(d=1,f=r[1],p=0),f==null)return;let m=f.getFormatFlags(e,t);i(m);let h=a-1,g=r[h],_=u.type===`text`?u.offset:g.getTextContentSize();if(f.is(g)){if(p===_)return;if(va(f)||p===0&&_===f.getTextContentSize())f.setFormat(m);else{let e=f.splitText(p,_),t=p===0?e[0]:e[1];t.setFormat(m),l.type===`text`&&l.set(t.__key,0,`text`),u.type===`text`&&u.set(t.__key,_-p,`text`)}this.format=m;return}p===0||va(f)||([,f]=f.splitText(p),p=0),f.setFormat(m);let v=g.getFormatFlags(e,m);_>0&&(_===g.getTextContentSize()||va(g)||([g]=g.splitText(_)),g.setFormat(v));for(let t=d+1;t<h;t++){let n=r[t],i=n.getFormatFlags(e,v);n.setFormat(i)}l.type===`text`&&l.set(f.__key,p,`text`),u.type===`text`&&u.set(g.__key,_,`text`),this.format=m|v}insertNodes(e){if(e.length===0)return;if(this.isCollapsed()||this.removeText(),this.anchor.key===`root`){this.insertParagraph();let t=j();return A(t)||n(134),t.insertNodes(e)}let t=(this.isBackward()?this.focus:this.anchor).getNode(),r=zo(t,To),i=e[e.length-1];if(L(r)&&`__language`in r){if(`__language`in e[0])this.insertText(e[0].getTextContent());else{let t=ui(this);r.splice(t,0,e),i.selectEnd()}return}if(!e.some(e=>(L(e)||R(e))&&!e.isInline())){L(r)||n(211,t.constructor.name,t.getType());let a=ui(this);r.splice(a,0,e),i.selectEnd();return}let a=function(e){let t=Ji(),n=null;for(let r=0;r<e.length;r++){let i=e[r],a=fr(i);if(a||R(i)&&i.isInline()||L(i)&&i.isInline()||O(i)||i.isParentRequired()){if(n===null&&(n=i.createParentElementNode(),t.append(n),a))continue;n!==null&&n.append(i)}else t.append(i),n=null}return t}(e),o=a.getLastDescendant(),s=a.getChildren(),c=!L(r)||!r.isEmpty()?this.insertParagraph():null,l=s[s.length-1],u=s[0];var d;L(d=u)&&To(d)&&!d.isEmpty()&&L(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(L(r)||n(211,t.constructor.name,t.getType()),r.append(...u.getChildren()),u=s[1]),u&&(r===null&&n(212,t.constructor.name,t.getType()),function(e,t){let r=t.getParentOrThrow().getLastChild(),i=t,a=[t];for(;i!==r;)i.getNextSibling()||n(140),i=i.getNextSibling(),a.push(i);let o=e;for(let e of a)o=o.insertAfter(e)}(r,u));let f=zo(o,To);c&&L(f)&&(c.canMergeWhenEmpty()||To(l))&&(f.append(...c.getChildren()),c.remove()),L(r)&&r.isEmpty()&&r.remove(),o.selectEnd();let p=L(r)?r.getLastChild():null;fr(p)&&f!==r&&p.remove()}insertParagraph(){if(this.anchor.key===`root`){let e=Ji();return H().splice(this.anchor.offset,0,[e]),e.select(),e}let e=ui(this),t=zo(this.anchor.getNode(),To);L(t)||n(213);let r=t.getChildAtIndex(e),i=r?[r,...r.getNextSiblings()]:[],a=t.insertNewAfter(this,!1);return a?(a.append(...i),a.selectStart(),a):null}insertLineBreak(e){let t=dr();if(this.insertNodes([t]),e){let e=t.getParentOrThrow(),n=t.getIndexWithinParent();e.select(n,n)}}extract(){let e=[...this.getNodes()],t=e.length,n=e[0],r=e[t-1],[i,a]=Br(this),o=this.isBackward(),[s,c]=o?[this.focus,this.anchor]:[this.anchor,this.focus],[l,u]=o?[a,i]:[i,a];if(t===0)return[];if(t===1){if(O(n)&&!this.isCollapsed()){let e=n.splitText(l,u),t=l===0?e[0]:e[1];return t?(s.set(t.getKey(),0,`text`),c.set(t.getKey(),t.getTextContentSize(),`text`),[t]):[]}return[n]}if(O(n)&&(l===n.getTextContentSize()?e.shift():l!==0&&([,n]=n.splitText(l),e[0]=n,s.set(n.getKey(),0,`text`))),O(r)){let t=r.getTextContent().length;u===0?e.pop():u!==t&&([r]=r.splitText(u),e[e.length-1]=r,c.set(r.getKey(),r.getTextContentSize(),`text`))}return e}modify(e,t,n){if(fi(this,e,t,n))return;let r=e===`move`,i=I(),a=J(K(i));if(!a)return;let o=i._blockCursorElement,s=i._rootElement,c=this.focus.getNode();if(s===null||o===null||!L(c)||c.isInline()||c.canBeEmpty()||_o(o,i,s),this.dirty){let e=to(i,this.anchor.key),t=to(i,this.focus.key);this.anchor.type===`text`&&(e=xa(e)),this.focus.type===`text`&&(t=xa(t)),e&&t&&ai(a,e,this.anchor.offset,t,this.focus.offset)}if(function(e,t,n,r){e.modify(t,n,r)}(a,e,t?`backward`:`forward`,n),a.rangeCount>0){let e=a.getRangeAt(0),n=this.anchor.getNode(),i=z(n)?n:uo(n);if(this.applyDOMRange(e),this.dirty=!0,!r){let n=this.getNodes(),r=[],o=!1;for(let e=0;e<n.length;e++){let t=n[e];so(t,i)?r.push(t):o=!0}if(o&&r.length>0)if(t){let e=r[0];L(e)?e.selectStart():e.getParentOrThrow().selectStart()}else{let e=r[r.length-1];L(e)?e.selectEnd():e.getParentOrThrow().selectEnd()}a.anchorNode===e.startContainer&&a.anchorOffset===e.startOffset||function(e){let t=e.focus,n=e.anchor,r=n.key,i=n.offset,a=n.type;n.set(t.key,t.offset,t.type,!0),t.set(r,i,a,!0)}(this)}}n===`lineboundary`&&fi(this,e,t,n,`decorators`)}forwardDeletion(e,t,n){if(!n&&(e.type===`element`&&L(t)&&e.offset===t.getChildrenSize()||e.type===`text`&&e.offset===t.getTextContentSize())){let e=t.getParent(),n=t.getNextSibling()||(e===null?null:e.getNextSibling());if(L(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(e){let t=this.isCollapsed();if(this.isCollapsed()){let t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;let r=us(ys(t,e?`previous`:`next`));if(r.getTextSlices().every(e=>e===null||e.distance===0)){let e={type:`initial`};for(let t of r.iterNodeCarets(`shadowRoot`))if(X(t)){if(!t.origin.isInline()){if(t.origin.isShadowRoot()){if(e.type===`merge-block`)break;if(L(r.anchor.origin)&&r.anchor.origin.isEmpty()){let e=Q(t);Ss(this,fs(e,e)),r.anchor.origin.remove()}return}e.type!==`merge-next-block`&&e.type!==`merge-block`||(e={block:e.block,caret:t,type:`merge-block`})}}else{if(e.type===`merge-block`)break;if(Zo(t)){if(L(t.origin)){if(t.origin.isInline()){if(!t.origin.isParentOf(r.anchor.origin))break}else e={block:t.origin,type:`merge-next-block`};continue}if(R(t.origin)){if(!t.origin.isIsolated())if(e.type===`merge-next-block`&&(t.origin.isKeyboardSelectable()||!t.origin.isInline())&&L(r.anchor.origin)&&r.anchor.origin.isEmpty()){r.anchor.origin.remove();let e=Zr();e.add(t.origin.getKey()),U(e)}else t.origin.remove();return}break}}if(e.type===`merge-block`){let{caret:t,block:n}=e;return Ss(this,fs(!t.origin.isEmpty()&&n.isEmpty()?ws(Z(n,t.direction)):r.anchor,t)),this.removeText()}}let i=this.focus;if(this.modify(`extend`,e,`character`),this.isCollapsed()){if(e&&t.offset===0&&Vr(this,t.getNode()))return}else{let r=i.type===`text`?i.getNode():null;if(n=t.type===`text`?t.getNode():null,r!==null&&r.isSegmented()){let t=i.offset,a=r.getTextContentSize();if(r.is(n)||e&&t!==a||!e&&t!==0)return void Ur(r,e,t)}else if(n!==null&&n.isSegmented()){let i=t.offset,a=n.getTextContentSize();if(n.is(r)||e&&i!==0||!e&&i!==a)return void Ur(n,e,i)}(function(e,t){let n=e.anchor,r=e.focus,i=n.getNode();if(i===r.getNode()&&n.type===`text`&&r.type===`text`){let e=n.offset,a=r.offset,o=e<a,s=o?e:a,c=o?a:e,l=c-1;s!==l&&(function(e){return!(Fa(e)||Hr(e))})(i.getTextContent().slice(s,c))&&(t?r.set(r.key,l,r.type):n.set(n.key,l,n.type))}})(this,e)}}if(this.removeText(),e&&!t&&this.isCollapsed()&&this.anchor.type===`element`&&this.anchor.offset===0){let e=this.anchor.getNode();e.isEmpty()&&z(e.getParent())&&e.getPreviousSibling()===null&&Vr(this,e)}}deleteLine(e){this.isCollapsed()&&this.modify(`extend`,e,`lineboundary`),this.isCollapsed()?this.deleteCharacter(e):this.removeText()}deleteWord(e){if(this.isCollapsed()){let t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;this.modify(`extend`,e,`word`)}this.isCollapsed()?this.deleteCharacter(e):this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}};function Rr(e){return e instanceof Ir}function zr(e){let t=e.offset;if(e.type===`text`)return t;let n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function Br(e){let t=e.getStartEndPoints();if(t===null)return[0,0];let[n,r]=t;return n.type===`element`&&r.type===`element`&&n.key===r.key&&n.offset===r.offset?[0,0]:[zr(n),zr(r)]}function Vr(e,t){for(let n=t;n;n=n.getParent()){if(L(n)){if(n.collapseAtStart(e))return!0;if(q(n))break}if(n.getPreviousSibling())break}return!1}const Hr=(()=>{try{let e=RegExp(`\\p{Emoji}`,`u`),t=e.test.bind(e);if(t(`❤️`)&&t(`#️⃣`)&&t(`👍`))return t}catch{}return()=>!1})();function Ur(e,t,n){let r=e,i=r.getTextContent().split(/(?=\s)/g),a=i.length,o=0,s=0;for(let e=0;e<a;e++){let r=e===a-1;if(s=o,o+=i[e].length,t&&o===n||o>n||r){i.splice(e,1),r&&(s=void 0);break}}let c=i.join(``).trim();c===``?r.remove():(r.setTextContent(c),r.select(s,s))}function Wr(e,t,r,i){let a,o=t;if(Y(e)){let s=!1,c=e.childNodes,l=c.length,u=i._blockCursorElement;o===l&&(s=!0,o=l-1);let d=c[o],f=!1;if(d===u)d=c[o+1],f=!0;else if(u!==null){let n=u.parentNode;e===n&&t>Array.prototype.indexOf.call(n.children,u)&&o--}if(a=Pa(d),O(a))o=ns(a,s?`next`:`previous`);else{let c=Pa(e);if(c===null)return null;if(L(c)){let l=i.getElementByKey(c.getKey());l===null&&n(214);let u=Do(i).$getDOMSlot(c,l,i);[c,o]=u.resolveChildIndex(c,l,e,t),L(c)||n(215),s&&o>=c.getChildrenSize()&&(o=Math.max(0,c.getChildrenSize()-1));let d=c.getChildAtIndex(o);if(L(d)&&function(e,t,n){let r=e.getParent();return n===null||r===null||!r.canBeEmpty()||r!==n.getNode()}(d,0,r)){let e=s?d.getLastDescendant():d.getFirstDescendant();e===null?c=d:(d=e,c=L(d)?d:d.getParentOrThrow()),o=0}O(d)?(a=d,c=null,o=ns(d,s?`next`:`previous`)):d!==c&&s&&!f&&(L(c)||n(216),o=Math.min(c.getChildrenSize(),o+1))}else{let n=c.getIndexWithinParent();o=t===0&&R(c)&&Pa(e)===c?n:n+1,c=c.getParentOrThrow()}if(L(c))return k(c.__key,o,`element`)}}else a=Pa(e);return O(a)?k(a.__key,ns(a,o,`clamp`),`text`):null}function Gr(e,t,n){let r=e.offset,i=e.getNode();if(r===0){let r=i.getPreviousSibling(),a=i.getParent();if(t){if((n||!t)&&r===null&&L(a)&&a.isInline()){let t=a.getPreviousSibling();O(t)&&e.set(t.__key,t.getTextContent().length,`text`)}}else L(r)&&!n&&r.isInline()?e.set(r.__key,r.getChildrenSize(),`element`):O(r)&&e.set(r.__key,r.getTextContent().length,`text`)}else if(r===i.getTextContent().length){let r=i.getNextSibling(),a=i.getParent();if(t&&L(r)&&r.isInline())e.set(r.__key,0,`element`);else if((n||t)&&r===null&&L(a)&&a.isInline()&&!a.canInsertTextAfter()){let t=a.getNextSibling();O(t)&&e.set(t.__key,0,`text`)}}}function Kr(e,t,n){if(e.type===`text`&&t.type===`text`){let n=e.isBefore(t),r=e.is(t);Gr(e,n,r),Gr(t,!n,r),r&&t.set(e.key,e.offset,e.type)}}function qr(e,t,n,r,i,a){if(e===null||n===null||!fa(i,e,n))return null;let o=Wr(e,t,A(a)?a.anchor:null,i);if(o===null)return null;let s=Wr(n,r,A(a)?a.focus:null,i);if(s===null)return null;if(o.type===`element`&&s.type===`element`){let t=Pa(e),r=Pa(n);if(R(t)&&R(r))return null}return Kr(o,s),[o,s]}function Jr(e){return L(e)&&!e.isInline()}function Yr(e,t,n,r,i,a){let o=vi(),s=new Lr(k(e,t,i),k(n,r,a),0,``);return s.dirty=!0,o._selection=s,s}function Xr(){return new Lr(k(`root`,0,`element`),k(`root`,0,`element`),0,``)}function Zr(){return new Ir(new Set)}function Qr(e,t){return $r(null,e,t,null)}function $r(e,t,n,r){let i=n._window;if(i===null)return null;let a=r||i.event,o=a?a.type:void 0,s=o===`selectionchange`,c=!se&&(s||o===`beforeinput`||o===`compositionstart`||o===`compositionend`||o===`click`&&a&&a.detail===3||o===`drop`||o===void 0),l,u,d,f;if(A(e)&&!c)return e.clone();if(t===null)return null;if(l=t.anchorNode,u=t.focusNode,d=t.anchorOffset,f=t.focusOffset,(s||o===void 0)&&A(e)&&!fa(n,l,u))return e.clone();let p=qr(l,d,u,f,n,e);if(p===null)return null;let[m,h]=p,g=0,_=``;if(A(e)){let t=e.anchor;if(m.key===t.key)g=e.format,_=e.style;else{let e=m.getNode();O(e)?(g=e.getFormat(),_=e.getStyle()):L(e)&&(g=e.getTextFormat(),_=e.getTextStyle())}}return new Lr(m,h,g,_)}function j(){return vi()._selection}function ei(){return I()._editorState._selection}function ti(e,t,n,r=1){let i=e.anchor,a=e.focus,o=i.getNode(),s=a.getNode();if(!t.is(o)&&!t.is(s))return;let c=t.__key;if(e.isCollapsed()){let t=i.offset;if(n<=t&&r>0||n<t&&r<0){let n=Math.max(0,t+r);i.set(c,n,`element`),a.set(c,n,`element`),ni(e)}}else{let o=e.isBackward(),s=o?a:i,l=s.getNode(),u=o?i:a,d=u.getNode();if(t.is(l)){let e=s.offset;(n<=e&&r>0||n<e&&r<0)&&s.set(c,Math.max(0,e+r),`element`)}if(t.is(d)){let e=u.offset;(n<=e&&r>0||n<e&&r<0)&&u.set(c,Math.max(0,e+r),`element`)}}ni(e)}function ni(e){let t=e.anchor,n=t.offset,r=e.focus,i=r.offset,a=t.getNode(),o=r.getNode();if(e.isCollapsed()){if(!L(a))return;let e=a.getChildrenSize(),i=n>=e,o=i?a.getChildAtIndex(e-1):a.getChildAtIndex(n);if(O(o)){let e=0;i&&(e=o.getTextContentSize()),t.set(o.__key,e,`text`),r.set(o.__key,e,`text`)}return}if(L(a)){let e=a.getChildrenSize(),r=n>=e,i=r?a.getChildAtIndex(e-1):a.getChildAtIndex(n);if(O(i)){let e=0;r&&(e=i.getTextContentSize()),t.set(i.__key,e,`text`)}}if(L(o)){let e=o.getChildrenSize(),t=i>=e,n=t?o.getChildAtIndex(e-1):o.getChildAtIndex(i);if(O(n)){let e=0;t&&(e=n.getTextContentSize()),r.set(n.__key,e,`text`)}}}function ri(e,t,n,r,i){let a=null,o=0,s=null;r===null?i!==null&&(a=i.__key,O(i)?s=`text`:L(i)&&(s=`element`)):(a=r.__key,O(r)?(o=r.getTextContentSize(),s=`text`):L(r)&&(o=r.getChildrenSize(),s=`element`)),a!==null&&s!==null?e.set(a,o,s):(o=t.getIndexWithinParent(),o===-1&&(o=n.getChildrenSize()),e.set(n.__key,o,`element`))}function ii(e,t,n,r,i){e.type===`text`?e.set(n,e.offset+(t?0:i),`text`):e.offset>r.getIndexWithinParent()&&e.set(e.key,e.offset-1,`element`)}function ai(e,t,n,r,i){try{e.setBaseAndExtent(t,n,r,i)}catch{}}function oi(e,t,n){let r=to(e,t.getKey());if(L(t)){let i=Do(e).$getDOMSlot(t,r,e);return[i.element,n+i.getFirstChildOffset()]}return[r,n]}function si(e,t,n,r,i,a,o){let c=r.anchorNode,l=r.focusNode,u=r.anchorOffset,d=r.focusOffset,f=document.activeElement;if(i.has(`collaboration`)&&f!==a||f!==null&&da(f))return;if(!A(t))return void(e!==null&&fa(n,c,l)&&r.removeAllRanges());let p=t.anchor,m=t.focus,h=p.getNode(),g=m.getNode(),[_,v]=oi(n,h,p.offset),[ee,y]=oi(n,g,m.offset),b=t.format,x=t.style,te=t.isCollapsed(),ne=_,re=ee,ie=!1;var ae,oe,se,ce,le;if(p.type===`text`?(ne=xa(_),ie=h.getFormat()!==b||h.getStyle()!==x):A(e)&&e.anchor.type===`text`&&(ie=!0),m.type===`text`&&(re=xa(ee)),ne!==null&&re!==null&&(te&&(e===null||ie||A(e)&&(e.format!==b||e.style!==x))&&(ae=b,oe=x,se=v,ce=p.key,le=performance.now(),Cn=[ae,oe,se,ce,le]),u!==v||d!==y||c!==ne||l!==re||r.type===`Range`&&te||(f!==null&&a.contains(f)||i.has(`skip-selection-focus`)||a.focus({preventScroll:!0}),p.type===`element`))){if(ai(r,ne,v,re,y),!s||!t.isCollapsed()||a===null||i.has(`skip-selection-focus`)||document.activeElement!==null&&a.contains(document.activeElement)||a.focus({preventScroll:!0}),!i.has(`skip-scroll-into-view`)&&t.isCollapsed()&&a!==null&&a===document.activeElement){let e=A(t)&&t.anchor.type===`element`?ne.childNodes[v]||null:r.rangeCount>0?r.getRangeAt(0):null;if(e!==null){let t;if(e instanceof Text){let n=document.createRange();n.selectNode(e),t=n.getBoundingClientRect()}else t=e.getBoundingClientRect();(function(e,t,n){let r=ro(n),i=co(r);if(r===null||i===null)return;let{top:a,bottom:o}=t,s=0,c=0,l=n;for(;l!==null;){let t=l===r.body;if(t){s=0,c=K(e).innerHeight;let t=i.getComputedStyle(r.documentElement),n=parseFloat(t.scrollPaddingTop),a=parseFloat(t.scrollPaddingBottom);isFinite(n)&&(s+=n),isFinite(a)&&(c-=a)}else{let e=l.getBoundingClientRect();s=e.top,c=e.bottom}let n=0;if(a<s?n=-(s-a):o>c&&(n=o-c),n!==0)if(t)i.scrollBy(0,n);else{let e=l.scrollTop;l.scrollTop+=n;let t=l.scrollTop-e;a-=t,o-=t}if(t)break;l=no(l)}})(n,t,a)}}gn=!0}}function ci(e){let t=j()||ei();t===null&&(t=H().selectEnd()),t.insertNodes(e)}function li(){let e=j();return e===null?``:e.getTextContent()}function ui(e){let t=e;e.isCollapsed()||t.removeText();let r=j();A(r)&&(t=r),A(t)||n(161);let i=t.anchor,a=i.getNode(),o=i.offset;for(;!To(a);){let e=a;if([a,o]=di(a,o),e.is(a))break}return o}function di(e,t){let n=e.getParent();if(!n){let e=Ji();return H().append(e),e.select(),[H(),0]}if(O(e)){let r=e.splitText(t);if(r.length===0)return[n,e.getIndexWithinParent()];let i=t===0?0:1;return[n,r[0].getIndexWithinParent()+i]}if(!L(e)||t===0)return[n,e.getIndexWithinParent()];let r=e.getChildAtIndex(t);if(r){let n=new Lr(k(e.__key,t,`element`),k(e.__key,t,`element`),0,``),i=e.insertNewAfter(n);i&&i.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}function fi(e,t,n,r,i=`decorators-and-blocks`){if(t===`move`&&r===`character`&&!e.isCollapsed()){let[t,r]=n===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return r.set(t.key,t.offset,t.type),!0}let a=ys(e.focus,n?`previous`:`next`),o=r===`lineboundary`,s=t===`move`,c=a,l=i===`decorators-and-blocks`;if(!Os(c)){for(let e of c){l=!1;let{origin:t}=e;if(!R(t)||t.isIsolated()||(c=e,!o||!t.isInline()))break}if(l)for(let e of us(a).iterNodeCarets(t===`extend`?`shadowRoot`:`root`)){if(X(e))e.origin.isInline()||(c=e);else{if(L(e.origin))continue;R(e.origin)&&!e.origin.isInline()&&(c=e)}break}}if(c===a)return!1;if(s&&!o&&R(c.origin)&&c.origin.isKeyboardSelectable()){let e=Zr();return e.add(c.origin.getKey()),U(e),!0}return c=Q(c),s&&bs(e.anchor,c),bs(e.focus,c),l||!o}let M=null,N=null,P=!1,pi=!1,mi=0;const hi={characterData:!0,childList:!0,subtree:!0};function gi(){return P||M!==null&&M._readOnly}function F(){P&&n(13)}function _i(){mi>99&&n(14)}function vi(){return M===null&&n(195,yi()),M}function I(){return N===null&&n(337,yi()),N}function yi(){let e=0,t=new Set,n=na.version;if(typeof window<`u`)for(let r of document.querySelectorAll(`[contenteditable]`)){let i=ha(r);if(pa(i))e++;else if(i){let e=String(i.constructor.version||`<0.17.1`);e===n&&(e+=` (separately built, likely a bundler configuration issue)`),t.add(e)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(`, `)}`),r}function bi(){return N}function xi(e,t,n){let r=t.__type,i=sa(e,r),a=n.get(r);a===void 0&&(a=Array.from(i.transforms),n.set(r,a));let o=a.length;for(let e=0;e<o&&(a[e](t),t.isAttached());e++);}function Si(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}function Ci(e,t){if(!t)return;let n=e._updateTags,r=t;Array.isArray(t)||(r=[t]);for(let e of r)n.add(e)}function wi(e){return Ti(e,I()._nodes)}function Ti(e,t){let r=e.type,i=t.get(r);i===void 0&&n(17,r);let a=i.klass;e.type!==a.getType()&&n(18,a.name);let o=a.importJSON(e),s=e.children;if(L(o)&&Array.isArray(s))for(let e=0;e<s.length;e++){let n=Ti(s[e],t);o.append(n)}return o}function Ei(e,t,n){let r=M,i=P,a=N;M=t,P=!0,N=e;try{return n()}finally{M=r,P=i,N=a}}function Di(e,t){let n=e._pendingEditorState,r=e._rootElement,i=e._headless||r===null;if(n===null)return void(e._deferred.length>0&&Ai(e,e._deferred));let a=e._editorState,o=a._selection,s=n._selection,c=e._dirtyType!==0,l=M,u=P,d=N,f=e._updating,p=e._observer,m=null;if(e._pendingEditorState=null,e._editorState=n,!i&&c&&p!==null){N=e,M=n,P=!1,e._updating=!0;try{let t=e._dirtyType,r=e._dirtyElements,i=e._dirtyLeaves;p.disconnect(),m=ut(a,n,e,t,r,i)}catch(t){if(t instanceof Error&&e._onError(t),pi)throw t;Xi(e,null,r,n),ge(e),e._dirtyType=2,pi=!0,Di(e,a),pi=!1;return}finally{p.observe(r,hi),e._updating=f,M=l,P=u,N=d}}n._readOnly||=!0;let h=e._dirtyLeaves,g=e._dirtyElements,_=e._normalizedNodes,v=e._updateTags,ee=e._deferred;c&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set),function(e,t){let n=e._decorators,r=e._pendingDecorators||n,i=t._nodeMap,a;for(a in r)i.has(a)||(r===n&&(r=ja(e)),delete r[a])}(e,n);let y=i?null:J(K(e));if(e._editable&&y!==null&&(c||s===null||s.dirty||!s.is(o))&&r!==null&&!v.has(`skip-dom-selection`)){N=e,M=n;try{if(p!==null&&p.disconnect(),c||s===null||s.dirty){let t=e._blockCursorElement;t!==null&&_o(t,e,r),si(o,s,e,y,v,r)}(function(e,t,n){let r=e._blockCursorElement;if(A(n)&&n.isCollapsed()&&n.anchor.type===`element`&&t.contains(document.activeElement)){let i=n.anchor,a=i.getNode(),o=i.offset,s=!1,c=null;if(o===a.getChildrenSize())go(a.getChildAtIndex(o-1))&&(s=!0);else{let t=a.getChildAtIndex(o);if(t!==null&&go(t)){let n=t.getPreviousSibling();(n===null||go(n))&&(s=!0,c=e.getElementByKey(t.__key))}}if(s){let n=e.getElementByKey(a.__key);r===null&&(e._blockCursorElement=r=function(e){let t=e.theme,n=document.createElement(`div`);n.contentEditable=`false`,n.setAttribute(`data-lexical-cursor`,`true`);let r=t.blockCursor;return r!==void 0&&(typeof r==`string`&&(r=t.blockCursor=Vs(r)),r!==void 0&&n.classList.add(...r)),n}(e._config)),t.style.caretColor=`transparent`,c===null?n.appendChild(r):n.insertBefore(r,c);return}}r!==null&&_o(r,e,t)})(e,r,s)}finally{p!==null&&p.observe(r,hi),N=d,M=l}}m!==null&&function(e,t,n,r,i){let a=Array.from(e._listeners.mutation),o=a.length;for(let e=0;e<o;e++){let[o,s]=a[e];for(let e of s){let a=t.get(e);a!==void 0&&o(a,{dirtyLeaves:r,prevEditorState:i,updateTags:n})}}}(e,m,v,h,a),A(s)||s===null||o!==null&&o.is(s)||e.dispatchCommand(ft,void 0);let b=e._pendingDecorators;b!==null&&(e._decorators=b,e._pendingDecorators=null,Oi(`decorator`,e,!0,b)),function(e,t,n){let r=Ma(t),i=Ma(n);r!==i&&Oi(`textcontent`,e,!0,i)}(e,t||a,n),Oi(`update`,e,!0,{dirtyElements:g,dirtyLeaves:h,editorState:n,mutatedNodes:m,normalizedNodes:_,prevEditorState:t||a,tags:v}),Ai(e,ee),function(e){let t=e._updates;if(t.length!==0){let n=t.shift();if(n){let[t,r]=n;Mi(e,t,r)}}}(e)}function Oi(e,t,n,...r){let i=t._updating;t._updating=n;try{let n=t._listeners[e],i=Array.from(n);for(let[e,t]of i){t&&t();let i=e(...r);n.has(e)?n.set(e,i):i&&i()}}finally{t._updating=i}}function ki(e,t,n,r){let i=Ia(e),a;for(let e=4;e>=0;e--)for(let o=0;o<i.length;o++){let s=i[o];if(o>0&&s._updating){a=s;break}let c=s._commands.get(t);if(c!==void 0){let t=c[e];if(t.size>0){let e=!1;if(Ni(s,()=>{for(let i of t)if(i(n,r))return void(e=!0)}),e)return e}}}return a&&a.update(()=>{ki(a,t,n,r)}),!1}function Ai(e,t){if(e._deferred=[],t.length!==0){let n=e._updating;e._updating=!0;try{for(let e=0;e<t.length;e++)t[e]()}finally{e._updating=n}}}function ji(e,t){let r=e._updates,i=t||!1;for(;r.length!==0;){let t=r.shift();if(t){let[r,a]=t,o=e._pendingEditorState,s;a!==void 0&&(s=a.onUpdate,a.skipTransforms&&(i=!0),a.discrete&&(o===null&&n(191),o._flushSync=!0),s&&e._deferred.push(s),Ci(e,a.tag)),o==null?Mi(e,r,a):r()}}return i}function Mi(e,t,r){let i=e._updateTags,a,o=!1,s=!1;r!==void 0&&(a=r.onUpdate,Ci(e,r.tag),o=r.skipTransforms||!1,s=r.discrete||!1),a&&e._deferred.push(a);let c=e._editorState,l=e._pendingEditorState,u=!1;(l===null||l._readOnly)&&(l=e._pendingEditorState=Bi(l||c),u=!0),l._flushSync=s;let d=M,f=P,p=N,m=e._updating;M=l,P=!1,e._updating=!0,N=e;let h=e._headless||e.getRootElement()===null;ia(null);try{u&&(h?c._selection!==null&&(l._selection=c._selection.clone()):l._selection=function(e,t){let n=e.getEditorState()._selection,r=J(K(e));return A(n)||n==null?$r(n,r,e,t):n.clone()}(e,r&&r.event||null));let i=e._compositionKey;t(),o=ji(e,o),function(e,t){let n=t.getEditorState()._selection,r=e._selection;if(A(r)){let e=r.anchor,t=r.focus,i;if(e.type===`text`&&(i=e.getNode(),i.selectionTransform(n,r)),t.type===`text`){let e=t.getNode();i!==e&&e.selectionTransform(n,r)}}}(l,e),e._dirtyType!==0&&(o?function(e,t){let n=t._dirtyLeaves,r=e._nodeMap;for(let e of n){let t=r.get(e);O(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&Ne(t)}}(l,e):function(e,t){let n=t._dirtyLeaves,r=t._dirtyElements,i=e._nodeMap,a=Da(),o=new Map,s=n,c=s.size,l=r,u=l.size;for(;c>0||u>0;){if(c>0){t._dirtyLeaves=new Set;for(let e of s){let r=i.get(e);O(r)&&r.isAttached()&&r.isSimpleText()&&!r.isUnmergeable()&&Ne(r),r!==void 0&&Si(r,a)&&xi(t,r,o),n.add(e)}if(s=t._dirtyLeaves,c=s.size,c>0){mi++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map,l.delete(`root`)&&l.set(`root`,!0);for(let e of l){let n=e[0],s=e[1];if(r.set(n,s),!s)continue;let c=i.get(n);c!==void 0&&Si(c,a)&&xi(t,c,o)}s=t._dirtyLeaves,c=s.size,l=t._dirtyElements,u=l.size,mi++}t._dirtyLeaves=n,t._dirtyElements=r}(l,e),ji(e),function(e,t,n,r){let i=e._nodeMap,a=t._nodeMap,o=[];for(let[e]of r){let t=a.get(e);t!==void 0&&(t.isAttached()||(L(t)&&oe(t,e,i,a,o,r),i.has(e)||r.delete(e),o.push(e)))}for(let e of o)a.delete(e);for(let e of n){let t=a.get(e);t===void 0||t.isAttached()||(i.has(e)||n.delete(e),a.delete(e))}}(c,l,e._dirtyLeaves,e._dirtyElements)),i!==e._compositionKey&&(l._flushSync=!0);let a=l._selection;if(A(a)){let e=l._nodeMap,t=a.anchor.key,r=a.focus.key;e.get(t)!==void 0&&e.get(r)!==void 0||n(19)}else Rr(a)&&a._nodes.size===0&&(l._selection=null)}catch(t){t instanceof Error&&e._onError(t),e._pendingEditorState=c,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),Di(e);return}finally{M=d,P=f,N=p,e._updating=m,mi=0}e._dirtyType!==0||e._deferred.length>0||function(e,t){let n=t.getEditorState()._selection,r=e._selection;if(r!==null){if(r.dirty||!r.is(n))return!0}else if(n!==null)return!0;return!1}(l,e)?l._flushSync?(l._flushSync=!1,Di(e)):u&&la(()=>{Di(e)}):(l._flushSync=!1,u&&(i.clear(),e._deferred=[],e._pendingEditorState=null))}function Ni(e,t,n){N===e&&n===void 0?t():Mi(e,t,n)}var Pi=class e{element;before;after;constructor(e,t,n){this.element=e,this.before=t||null,this.after=n||null}withBefore(t){return new e(this.element,t,this.after)}withAfter(t){return new e(this.element,this.before,t)}withElement(t){return this.element===t?this:new e(t,this.before,this.after)}insertChild(e){let t=this.before||this.getManagedLineBreak();return t!==null&&t.parentElement!==this.element&&n(222),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&n(223),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&n(224),this.element.replaceChild(e,t),this}getFirstChild(){let e=this.after?this.after.nextSibling:this.element.firstChild;return e===this.before||e===this.getManagedLineBreak()?null:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(e===null)this.removeManagedLineBreak();else{let t=e===`decorator`&&(m||l||d);this.insertManagedLineBreak(t)}}removeManagedLineBreak(){let e=this.getManagedLineBreak();if(e){let t=this.element,n=e.nodeName===`IMG`?e.nextSibling:null;n&&t.removeChild(n),t.removeChild(e),t.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){let t=this.getManagedLineBreak();if(t){if(e===(t.nodeName===`IMG`))return;this.removeManagedLineBreak()}let n=this.element,r=this.before,i=document.createElement(`br`);if(n.insertBefore(i,r),e){let e=document.createElement(`img`);e.setAttribute(`data-lexical-linebreak`,`true`),e.style.setProperty(`display`,`inline`,`important`),e.style.setProperty(`border`,`0px`,`important`),e.style.setProperty(`margin`,`0px`,`important`),e.alt=``,n.insertBefore(e,i),n.__lexicalLineBreak=e}else n.__lexicalLineBreak=i}getFirstChildOffset(){let e=0;for(let t=this.after;t!==null;t=t.previousSibling)e++;return e}resolveChildIndex(e,t,n,r){if(n===this.element){let t=this.getFirstChildOffset();return[e,Math.min(t+e.getChildrenSize(),Math.max(t,r))]}let i=Fi(t,n);i.push(r);let a=Fi(t,this.element),o=e.getIndexWithinParent();for(let e=0;e<a.length;e++){let t=i[e],n=a[e];if(t===void 0||t<n)break;if(t>n){o+=1;break}}return[e.getParentOrThrow(),o]}};function Fi(e,t){let r=[],i=t;for(;i!==e&&i!==null;i=i.parentNode){let e=0;for(let t=i.previousSibling;t!==null;t=t.previousSibling)e++;r.push(e)}return i!==e&&n(225),r.reverse()}var Ii=class extends E{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style=``,this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=``}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){let e=this.getFormat();return te[e]||``}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){let e=[],t=this.getFirstChild();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){let e=[],t=this.getFirstChild();for(;t!==null;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){let e=I()._dirtyElements;return e!==null&&e.has(this.__key)}isLastChild(){let e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return t!==null&&t.is(e)}getAllTextNodes(){let e=[],t=this.getFirstChild();for(;t!==null;){if(O(t)&&e.push(t),L(t)){let n=t.getAllTextNodes();e.push(...n)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;L(e);){let t=e.getFirstChild();if(t===null)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;L(e);){let t=e.getLastChild();if(t===null)break;e=t}return e}getDescendantByIndex(e){let t=this.getChildren(),n=t.length;if(e>=n){let e=t[n-1];return L(e)&&e.getLastDescendant()||e||null}let r=t[e];return L(r)&&r.getFirstDescendant()||r||null}getFirstChild(){let e=this.getLatest().__first;return e===null?null:V(e)}getFirstChildOrThrow(){let e=this.getFirstChild();return e===null&&n(45,this.__key),e}getLastChild(){let e=this.getLatest().__last;return e===null?null:V(e)}getLastChildOrThrow(){let e=this.getLastChild();return e===null&&n(96,this.__key),e}getChildAtIndex(e){let t=this.getChildrenSize(),n,r;if(e<t/2){for(n=this.getFirstChild(),r=0;n!==null&&r<=e;){if(r===e)return n;n=n.getNextSibling(),r++}return null}for(n=this.getLastChild(),r=t-1;n!==null&&r>=e;){if(r===e)return n;n=n.getPreviousSibling(),r--}return null}getTextContent(){let e=``,t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContent(),L(i)&&r!==n-1&&!i.isInline()&&(e+=`
16
+
17
+ `)}return e}getTextContentSize(){let e=0,t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContentSize(),L(i)&&r!==n-1&&!i.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(e!==``){let t=x[e];return(this.getFormat()&t)!==0}return!1}hasTextFormat(e){let t=y[e];return(this.getTextFormat()&t)!==0}getFormatFlags(e,t){return Sa(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){F();let n=j(),r=e,i=t,a=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&t===0){let e=this.getFirstChild();if(O(e)||L(e))return e.select(0,0)}else if(!(e!==void 0&&e!==a||t!==void 0&&t!==a)){let e=this.getLastChild();if(O(e)||L(e))return e.select()}}r===void 0&&(r=a),i===void 0&&(i=a);let o=this.__key;return A(n)?(n.anchor.set(o,r,`element`),n.focus.set(o,i,`element`),n.dirty=!0,n):Yr(o,r,o,i,`element`,`element`)}selectStart(){let e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){let e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){let e=this.getWritable();return this.getChildren().forEach(e=>e.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){let t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=e!==``&&x[e]||0,this}setStyle(e){return this.getWritable().__style=e||``,this}setTextFormat(e){let t=this.getWritable();return t.__textFormat=e,t}setTextStyle(e){let t=this.getWritable();return t.__textStyle=e,t}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,r){Gn(this)&&n(324,this.__key,this.__type);let i=this.getChildrenSize(),a=this.getWritable();e+t<=i||n(226,String(e),String(t),String(i));let o=a.__key,s=[],c=[],l=this.getChildAtIndex(e+t),u=null,d=i-t+r.length;if(e!==0)if(e===i)u=this.getLastChild();else{let t=this.getChildAtIndex(e);t!==null&&(u=t.getPreviousSibling())}if(t>0){let e=u===null?this.getFirstChild():u.getNextSibling();for(let r=0;r<t;r++){e===null&&n(100);let t=e.getNextSibling(),r=e.__key;Ta(e.getWritable()),c.push(r),e=t}}let f=u;for(let e of r){f!==null&&e.is(f)&&(u=f=f.getPreviousSibling());let t=e.getWritable();t.__parent===o&&d--,Ta(t);let r=e.__key;if(f===null)a.__first=r,t.__prev=null;else{let e=f.getWritable();e.__next=r,t.__prev=e.__key}e.__key===o&&n(76),t.__parent=o,s.push(r),f=e}if(e+t===i)f!==null&&(f.getWritable().__next=null,a.__last=f.__key);else if(l!==null){let e=l.getWritable();if(f!==null){let t=f.getWritable();e.__prev=f.__key,t.__next=l.__key}else e.__prev=null}if(a.__size=d,c.length){let e=j();if(A(e)){let t=new Set(c),n=new Set(s),{anchor:r,focus:i}=e;Li(r,t,n)&&ri(r,r.getNode(),this,u,l),Li(i,t,n)&&ri(i,i.getNode(),this,u,l),d!==0||this.canBeEmpty()||q(this)||this.remove()}}return a}getDOMSlot(e){return new Pi(e)}exportDOM(e){let{element:t}=super.exportDOM(e);if(Y(t)){let e=this.getIndent();e>0&&(t.style.paddingInlineStart=40*e+`px`);let n=this.getDirection();n&&(t.dir=n)}return{element:t}}exportJSON(){let e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},t=this.getTextFormat(),n=this.getTextStyle();return t===0&&n===``||q(this)||this.getChildren().some(O)||(t!==0&&(e.textFormat=t),n!==``&&(e.textStyle=n)),e}updateFromJSON(e){return super.updateFromJSON(e).setFormat(e.format).setIndent(e.indent).setDirection(e.direction).setTextFormat(e.textFormat||0).setTextStyle(e.textStyle||``)}insertNewAfter(e,t){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,t,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,t){let n=Do(t).$getDOMSlot(this,e,t),r=n.getFirstChild();for(let e=this.getFirstChild();e;e=e.getNextSibling()){let i=t.getElementByKey(e.getKey());i!==null&&(r==null?(n.insertChild(i),r=i):r!==i&&n.replaceChild(i,r),r=r.nextSibling)}}};function L(e){return e instanceof Ii}function Li(e,t,n){let r=e.getNode();for(;r;){let e=r.__key;if(t.has(e)&&!n.has(e))return!0;r=r.getParent()}return!1}var Ri=class extends E{decorate(e,t){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}};function R(e){return e instanceof Ri}var zi=class e extends Ii{__cachedText;static getType(){return`root`}static clone(){return new e}constructor(){super(`root`),this.__cachedText=null}getTopLevelElementOrThrow(){n(51)}getTextContent(){let e=this.__cachedText;return!gi()&&I()._dirtyType!==0||e===null?super.getTextContent():e}remove(){n(52)}replace(e){n(53)}insertBefore(e){n(54)}insertAfter(e){n(55)}updateDOM(e,t){return!1}splice(e,t,r){for(let e of r)L(e)||R(e)||n(282);return super.splice(e,t,r)}static importJSON(e){return H().updateFromJSON(e)}collapseAtStart(){return!0}};function z(e){return e instanceof zi}function Bi(e){return new Wi(new Map(e._nodeMap))}function Vi(){return new Wi(new Map([[`root`,new zi]]))}function Hi(e){let t=e.exportJSON(),r=e.constructor;if(t.type!==r.getType()&&n(130,r.name),L(e)){let i=t.children;Array.isArray(i)||n(59,r.name);let a=e.getChildren();for(let e=0;e<a.length;e++){let t=Hi(a[e]);i.push(t)}}return t}function Ui(e){return e instanceof Wi}var Wi=class e{_nodeMap;_selection;_flushSync;_readOnly;constructor(e,t){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(e,t){return Ei(t&&t.editor||null,this,e)}clone(t){let n=new e(this._nodeMap,t===void 0?this._selection:t);return n._readOnly=!0,n}toJSON(){return Ei(null,this,()=>({root:Hi(H())}))}},Gi=class extends Ii{static getType(){return`artificial`}createDOM(e){return document.createElement(`div`)}},Ki=class e extends Ii{static getType(){return`paragraph`}static clone(t){return new e(t.__key)}createDOM(e){let t=document.createElement(`p`),n=Ya(e.theme,`paragraph`);return n!==void 0&&t.classList.add(...n),t}updateDOM(e,t,n){return!1}static importDOM(){return{p:e=>({conversion:qi,priority:0})}}exportDOM(e){let{element:t}=super.exportDOM(e);if(Y(t)){this.isEmpty()&&t.append(document.createElement(`br`));let e=this.getFormatType();e&&(t.style.textAlign=e)}return{element:t}}static importJSON(e){return Ji().updateFromJSON(e)}exportJSON(){let e=super.exportJSON();if(e.textFormat===void 0||e.textStyle===void 0){let t=this.getChildren().find(O);t?(e.textFormat=t.getFormat(),e.textStyle=t.getStyle()):(e.textFormat=this.getTextFormat(),e.textStyle=this.getTextStyle())}return e}insertNewAfter(e,t){let n=Ji();n.setTextFormat(e.format),n.setTextStyle(e.style);let r=this.getDirection();return n.setDirection(r),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,t),n}collapseAtStart(){let e=this.getChildren();if(e.length===0||O(e[0])&&e[0].getTextContent().trim()===``){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}};function qi(e){let t=Ji();if(e.style&&(t.setFormat(e.style.textAlign),No(e,t)),t.getFormatType()===``){let n=e.getAttribute(`align`);n&&n&&n in x&&t.setFormat(n)}return{node:t}}function Ji(){return po(new Ki)}function Yi(e){return e instanceof Ki}function Xi(e,t,n,r){let i=e._keyToDOMMap;i.clear(),e._editorState=Vi(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null;let a=e._observer;a!==null&&(a.disconnect(),e._observer=null),t!==null&&(t.textContent=``),n!==null&&(n.textContent=``,i.set(`root`,n))}function Zi(e){let t=new Set,n=new Set,r=e;for(;r;){let{ownNodeConfig:e}=Lo(r),i=r.transform;if(!n.has(i)){n.add(i);let e=r.transform();e&&t.add(e)}if(e){let n=e.$transform;n&&t.add(n),r=e.extends}else{let e=Object.getPrototypeOf(r);r=e.prototype instanceof E&&e!==E?e:void 0}}return t}const Qi={$createDOM:(e,t)=>e.createDOM(t._config,t),$decorateDOM:(e,t,n,r)=>{},$exportDOM:(e,t)=>{let n=ca(t,e.getType());return n&&n.exportDOM!==void 0?n.exportDOM(t,e):e.exportDOM(t)},$extractWithChild:(e,t,n,r,i)=>L(e)&&e.extractWithChild(t,n,r),$getDOMSlot:(e,t,r)=>(L(e)||n(336,e.getKey(),e.getType()),e.getDOMSlot(t)),$shouldExclude:(e,t,n)=>L(e)&&e.excludeFromCopy(`html`),$shouldInclude:(e,t,n)=>!t||e.isSelected(t),$updateDOM:(e,t,n,r)=>e.updateDOM(t,n,r._config)};function $i(e){let t=e||{},n=bi(),r=t.theme||{},i=e===void 0?n:t.parentEditor||null,a=t.disableEvents||!1,o=Vi(),s=t.namespace||(i===null?La():i._config.namespace),c=t.editorState,l=[zi,br,lr,Ar,Ki,Gi,...t.nodes||[]],{onError:u,html:d}=t,f=t.editable===void 0||t.editable,p;if(e===void 0&&n!==null)p=n._nodes;else{p=new Map;for(let e=0;e<l.length;e++){let t=l[e],n=null,r=null;if(typeof t!=`function`){let e=t;t=e.replace,n=e.with,r=e.withKlass||null}Lo(t);let i=t.getType(),a=Zi(t);p.set(i,{exportDOM:d&&d.export?d.export.get(t):void 0,klass:t,replace:n,replaceWithKlass:r,sharedNodeState:Se(l[e]),transforms:a})}}let m=new na(o,i,p,{disableEvents:a,dom:{...Qi,...e&&e.dom},namespace:s,theme:r},u||console.error,function(e,t){let n=new Map,r=new Set,i=e=>{Object.keys(e).forEach(t=>{let r=n.get(t);r===void 0&&(r=[],n.set(t,r)),r.push(e[t])})};return e.forEach(e=>{let t=e.klass.importDOM;if(t==null||r.has(t))return;r.add(t);let n=t.call(e.klass);n!==null&&i(n)}),t&&i(t),n}(p,d?d.import:void 0),f,e);return c!==void 0&&(m._pendingEditorState=c,m._dirtyType=2),function(e){e.registerCommand(ht,An,0),e.registerCommand(gt,jn,0),e.registerCommand(_t,Mn,0),e.registerCommand(vt,Nn,0),e.registerCommand(At,Fn,0)}(m),m}function ea(e,t){let n=e.get(t);e.delete(t),n&&n()}function ta(e,t,n){return e.set(t,n),ea.bind(null,e,t)}var na=class{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_htmlConversions;_window;_editable;_blockCursorElement;_createEditorArgs;constructor(e,t,n,r,i,a,o,s){this._createEditorArgs=s,this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Map,editable:new Map,mutation:new Map,root:new Map,textcontent:new Map,update:new Map},this._commands=new Map,this._config=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=La(),this._onError=i,this._htmlConversions=a,this._editable=o,this._headless=t!==null&&t._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){return ta(this._listeners.update,e)}registerEditableListener(e){return ta(this._listeners.editable,e)}registerDecoratorListener(e){return ta(this._listeners.decorator,e)}registerTextContentListener(e){return ta(this._listeners.textcontent,e)}registerRootListener(e){let t=this._listeners.root;return Ws(ta(t,e,e(this._rootElement,null)||void 0),()=>function(e,t,n){let r=e.get(t);r&&r(),e.set(t,t(...n)||void 0)}(t,e,[null,this._rootElement]))}registerCommand(e,t,r){r===void 0&&n(35);let i=this._commands;i.has(e)||i.set(e,[new ae,new ae,new ae,new ae,new ae]);let a=i.get(e);a===void 0&&n(36,String(e));let o=function(e){return 7&e}(r),s=a[o];return o===r?s.addBack(t):s.addFront(t),()=>{s.delete(t),a.every(e=>e.size===0)&&i.delete(e)}}registerMutationListener(e,t,n){let r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,i=this._listeners.mutation,a=i.get(t);a===void 0&&(a=new Set,i.set(t,a)),a.add(r);let o=n&&n.skipInitialization;return o!==void 0&&o||this.initializeMutationListener(t,r),()=>{a.delete(r),a.size===0&&i.delete(t)}}getRegisteredNode(e){let t=this._nodes.get(e.getType());return t===void 0&&n(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){let n=this._editorState,r=Ao(n).get(t.getType());if(!r)return;let i=new Map;for(let e of r.keys())i.set(e,`created`);i.size>0&&e(i,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set([`registerMutationListener`])})}registerNodeTransformToKlass(e,t){let n=this.getRegisteredNode(e);return n.transforms.add(t),n}registerNodeTransform(e,t){let n=this.registerNodeTransformToKlass(e,t),r=[n],i=n.replaceWithKlass;if(i!=null){let e=this.registerNodeTransformToKlass(i,t);r.push(e)}return function(e,t){let n=Ao(e.getEditorState()),r=[];for(let e of t){let t=n.get(e);t&&r.push(t)}r.length!==0&&e.update(()=>{for(let e of r)for(let t of e.keys()){let e=V(t);e&&e.markDirty()}},e._pendingEditorState===null?{tag:Yn}:void 0)}(this,r.map(e=>e.klass.getType())),()=>{r.forEach(e=>e.transforms.delete(t))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return G(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){let t=this._rootElement;if(e!==t){let n=Ya(this._config.theme,`root`),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,Xi(this,t,e,r),t!==null&&(this._config.disableEvents||Vn(t),n!=null&&t.classList.remove(...n)),e!==null){let t=co(e),r=e.style;r.userSelect=`text`,r.whiteSpace=`pre-wrap`,r.wordBreak=`break-word`,e.setAttribute(`data-lexical-editor`,`true`),this._window=t,this._dirtyType=2,ge(this),this._updateTags.add(Yn),Di(this),this._config.disableEvents||function(e,t){let n=e.ownerDocument;mn.set(e,n);let r=hn.get(n)??0;r<1&&n.addEventListener(`selectionchange`,Rn),hn.set(n,r+1),e.__lexicalEditor=t;let i=In(e);for(let n=0;n<ln.length;n++){let[r,a]=ln[n],o=typeof a==`function`?e=>{Bn(e)||(zn(e),(t.isEditable()||r===`click`)&&a(e,t))}:e=>{if(Bn(e))return;zn(e);let n=t.isEditable();switch(r){case`cut`:return n&&G(t,Qt,e);case`copy`:return G(t,Zt,e);case`paste`:return n&&G(t,Ct,e);case`dragstart`:return n&&G(t,Jt,e);case`dragover`:return n&&G(t,Yt,e);case`dragend`:return n&&G(t,Xt,e);case`focus`:return n&&G(t,an,e);case`blur`:return n&&G(t,on,e);case`drop`:return n&&G(t,Kt,e)}};e.addEventListener(r,o),i.push(()=>{e.removeEventListener(r,o)})}}(e,this),n!=null&&e.classList.add(...n)}else this._window=null,this._updateTags.add(Yn),Di(this);Oi(`root`,this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&n(38);let r=e;r._readOnly&&(r=Bi(e),r._selection=e._selection?e._selection.clone():null),he(this);let i=this._pendingEditorState,a=this._updateTags,o=t===void 0?null:t.tag;i===null||i.isEmpty()||(o!=null&&a.add(o),Di(this)),this._pendingEditorState=r,this._dirtyType=2,this._dirtyElements.set(`root`,!1),this._compositionKey=null,o!=null&&a.add(o),this._updating||Di(this)}parseEditorState(e,t){return function(e,t,n){let r=Vi(),i=M,a=P,o=N,s=t._dirtyElements,c=t._dirtyLeaves,l=t._cloneNotNeeded,u=t._dirtyType;t._dirtyElements=new Map,t._dirtyLeaves=new Set,t._cloneNotNeeded=new Set,t._dirtyType=0,M=r,P=!1,N=t,ia(null);try{let i=t._nodes;Ti(e.root,i),n&&n(),r._readOnly=!0}catch(e){e instanceof Error&&t._onError(e)}finally{t._dirtyElements=s,t._dirtyLeaves=c,t._cloneNotNeeded=l,t._dirtyType=u,M=i,P=a,N=o}return r}(typeof e==`string`?JSON.parse(e):e,this,t)}read(e){return Di(this),this.getEditorState().read(e,{editor:this})}update(e,t){(function(e,t,n){e._updating?e._updates.push([t,n]):Mi(e,t,n)})(this,e,t)}focus(e,t={}){let n=this._rootElement;n!==null&&(n.setAttribute(`autocapitalize`,`off`),Ni(this,()=>{let r=j(),i=H();r===null?i.getChildrenSize()!==0&&(t.defaultSelection===`rootStart`?i.selectStart():i.selectEnd()):r.dirty||U(r.clone()),ao(`focus`),oo(()=>{n.removeAttribute(`autocapitalize`),e&&e()})}),this._pendingEditorState===null&&n.removeAttribute(`autocapitalize`))}blur(){let e=this._rootElement;e!==null&&e.blur();let t=J(this._window);t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,Oi(`editable`,this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}};na.version=`0.44.0+prod.esm`;let ra=null;function ia(e){ra=e}let aa=1;function oa(){aa=1}function sa(e,t){let r=ca(e,t);return r===void 0&&n(30,t),r}function ca(e,t){return e._nodes.get(t)}const la=typeof queueMicrotask==`function`?queueMicrotask:e=>{Promise.resolve().then(e)};function ua(e){return R(Aa(e))}function da(e){let t=document.activeElement;if(!Y(t))return!1;let n=t.nodeName;return R(Aa(e))&&(n===`INPUT`||n===`TEXTAREA`||t.contentEditable===`true`&&ha(t)==null)}function fa(e,t,n){let r=e.getRootElement();try{return r!==null&&r.contains(t)&&r.contains(n)&&t!==null&&!da(t)&&ma(t)===e}catch{return!1}}function pa(e){return e instanceof na}function ma(e){let t=e;for(;t!=null;){let e=ha(t);if(pa(e))return e;t=no(t)}return null}function ha(e){return e?e.__lexicalEditor:null}function ga(e){return v.test(e)?`rtl`:ee.test(e)?`ltr`:null}function _a(e){return Mr(e)||e.isToken()}function va(e){return _a(e)||e.isSegmented()}function ya(e){return xo(e)&&e.nodeType===3}function ba(e){return xo(e)&&e.nodeType===9}function xa(e){let t=e;for(;t!=null;){if(ya(t))return t;t=t.firstChild}return null}function Sa(e,t,n){let r=y[t];if(n!==null&&(e&r)===(n&r))return e;let i=e^r;return t===`subscript`?i&=~y.superscript:t===`superscript`?i&=~y.subscript:t===`lowercase`?(i&=~y.uppercase,i&=~y.capitalize):t===`uppercase`?(i&=~y.lowercase,i&=~y.capitalize):t===`capitalize`&&(i&=~y.lowercase,i&=~y.uppercase),i}function Ca(e){return O(e)||fr(e)||R(e)}function wa(e,t){let n=function(){let e=ra;return ra=null,e}();if((t||=n&&n.__key)!=null)return void(e.__key=t);F(),_i();let r=I(),i=vi(),a=``+aa++;i._nodeMap.set(a,e),L(e)?r._dirtyElements.set(a,!0):r._dirtyLeaves.add(a),r._cloneNotNeeded.add(a),r._dirtyType=1,e.__key=a}function Ta(e){let t=e.getParent();if(t!==null){let n=e.getWritable(),r=t.getWritable(),i=e.getPreviousSibling(),a=e.getNextSibling(),o=a===null?null:a.__key,s=i===null?null:i.__key,c=i===null?null:i.getWritable(),l=a===null?null:a.getWritable();i===null&&(r.__first=o),a===null&&(r.__last=s),c!==null&&(c.__next=o),l!==null&&(l.__prev=s),n.__prev=null,n.__next=null,n.__parent=null,r.__size--}}function Ea(e){_i(),Gn(e)&&n(323,e.__key,e.__type);let t=e.getLatest(),r=t.__parent,i=vi(),a=I(),o=i._nodeMap,s=a._dirtyElements;r!==null&&function(e,t,n){let r=e;for(;r!==null;){if(n.has(r))return;let e=t.get(r);if(e===void 0)break;n.set(r,!1),r=e.__parent}}(r,o,s);let c=t.__key;a._dirtyType=1,L(e)?s.set(c,!0):a._dirtyLeaves.add(c)}function B(e){F();let t=I(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,n!==null){let e=V(n);e!==null&&e.getWritable()}if(e!==null){let t=V(e);t!==null&&t.getWritable()}}}function Da(){return gi()?null:I()._compositionKey}function V(e,t){let n=(t||vi())._nodeMap.get(e);return n===void 0?null:n}function Oa(e,t){let n=ka(e,I());return n===void 0?null:V(n,t)}function ka(e,t){return e[`__lexicalKey_${t._key}`]}function Aa(e,t){let n=e;for(;n!=null;){let e=Oa(n,t);if(e!==null)return e;n=no(n)}return null}function ja(e){let t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function Ma(e){return e.read(()=>H().getTextContent())}function H(){return Na(vi())}function Na(e){return e._nodeMap.get(`root`)}function U(e){F();let t=vi();e!==null&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function Pa(e){let t=I(),n=function(e,t){let n=e;for(;n!=null;){let e=ka(n,t);if(e!==void 0)return e;n=no(n)}return null}(e,t);return n===null?e===t.getRootElement()?V(`root`):null:V(n)}function Fa(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function Ia(e){let t=[];for(let n=e;n!==null;n=n._parentEditor)t.push(n);return t}function La(){return Math.random().toString(36).replace(/[^a-z]+/g,``).substring(0,5)}function Ra(e){return ya(e)?e.nodeValue:null}function za(e,t,n){let r=J(K(t));if(r===null)return;let i=r.anchorNode,{anchorOffset:a,focusOffset:o}=r;if(i!==null){let t=Ra(i),r=Aa(i);if(t!==null&&O(r)){if((t===g||t===_)&&n){let e=n.length;t=n,a=e,o=e}t!==null&&Ba(r,t,a,o,e)}}}function Ba(e,t,n,r,i){let a=e;if(a.isAttached()&&(i||!a.isDirty())){let o=a.isComposing(),s=t;if((o||i)&&(t.endsWith(g)&&(s=t.slice(0,-g.length)),i)){let e=_,t;for(;(t=s.indexOf(e))!==-1;)s=s.slice(0,t)+s.slice(t+e.length),n!==null&&n>t&&(n=Math.max(t,n-e.length)),r!==null&&r>t&&(r=Math.max(t,r-e.length))}let c=a.getTextContent();if(i||s!==c){if(s===``){if(B(null),d||l||m)a.remove();else{let e=I();setTimeout(()=>{e.update(()=>{a.isAttached()&&a.remove()})},20)}return}let t=a.getParent(),i=ei(),c=a.getTextContentSize(),u=Da(),f=a.getKey();if(a.isToken()||u!==null&&f===u&&!o||A(i)&&(t!==null&&!t.canInsertTextBefore()&&i.anchor.offset===0||i.anchor.key===e.__key&&i.anchor.offset===0&&!a.canInsertTextBefore()&&!o||i.focus.key===e.__key&&i.focus.offset===c&&!a.canInsertTextAfter()&&!o))return void a.markDirty();let p=j();if(!A(p)||n===null||r===null)return void Va(a,s,p);if(p.setTextNodeRange(a,n,a,r),a.isSegmented()){let e=D(a.getTextContent());a.replace(e),a=e}Va(a,s,p)}}}function Va(e,t,n){if(e.setTextContent(t),A(n)){let t=e.getKey();for(let r of[`anchor`,`focus`]){let i=n[r];i.type===`text`&&i.key===t&&(i.offset=ns(e,i.offset,`clamp`))}}}function Ha(e,t,n){let r=t[n]||!1;return r===`any`||r===e[n]}function Ua(e,t){return Ha(e,t,`altKey`)&&Ha(e,t,`ctrlKey`)&&Ha(e,t,`shiftKey`)&&Ha(e,t,`metaKey`)}function W(e,t,n){if(!Ua(e,n))return!1;if(e.key.toLowerCase()===t.toLowerCase())return!0;if(t.length>1||e.key.length===1&&e.key.charCodeAt(0)<=127)return!1;if(e.code.startsWith(`Digit`)&&/^\d$/.test(t))return e.code===`Digit${t}`;let r=`Key`+t.toUpperCase();return e.code===r}const Wa={ctrlKey:!o,metaKey:o},Ga={altKey:o,ctrlKey:!o};function Ka(e){return e.key===`Backspace`}function qa(e){return W(e,`a`,Wa)}function Ja(e){let t=H();if(A(e)){let t=e.anchor,n=e.focus,r=t.getNode().getTopLevelElementOrThrow().getParentOrThrow();return t.set(r.getKey(),0,`element`),n.set(r.getKey(),r.getChildrenSize(),`element`),Pe(e),e}{let e=t.select(0,t.getChildrenSize());return U(Pe(e)),e}}function Ya(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});let n=e.__lexicalClassNameCache,r=n[t];if(r!==void 0)return r;let i=e[t];if(typeof i==`string`){let e=Vs(i);return n[t]=e,e}return i}function Xa(e,t,r,i,a){if(r.size===0)return;let o=i.__type,s=i.__key,c=t.get(o);c===void 0&&n(33,o);let l=c.klass,u=e.get(l);u===void 0&&(u=new Map,e.set(l,u));let d=u.get(s),f=d===`destroyed`&&a===`created`;(d===void 0||f)&&u.set(s,f?`updated`:a)}function Za(e){let t=e.getType(),n=vi();if(n._readOnly){let e=Ao(n).get(t);return e?Array.from(e.values()):[]}let r=n._nodeMap,i=[];for(let[,n]of r)n instanceof e&&n.__type===t&&n.isAttached()&&i.push(n);return i}function Qa(e,t,n){let r=e.getParent(),i=n,a=e;return r!==null&&(t&&n===0?(i=a.getIndexWithinParent(),a=r):t||n!==a.getChildrenSize()||(i=a.getIndexWithinParent()+1,a=r)),a.getChildAtIndex(t?i-1:i)}function $a(e,t){let n=e.offset;if(e.type===`element`)return Qa(e.getNode(),t,n);{let r=e.getNode();if(t&&n===0||!t&&n===r.getTextContentSize()){let e=t?r.getPreviousSibling():r.getNextSibling();return e===null?Qa(r.getParentOrThrow(),t,r.getIndexWithinParent()+ +!t):e}}return null}function eo(e){let t=K(e).event,n=t&&t.inputType;return n===`insertFromPaste`||n===`insertFromPasteAsQuotation`}function G(e,t,n){return ki(e,t,n,e)}function to(e,t){let r=e._keyToDOMMap.get(t);return r===void 0&&n(75,t),r}function no(e){let t=e.assignedSlot||e.parentElement;return So(t)?t.host:t}function ro(e){return ba(e)?e:Y(e)?e.ownerDocument:null}function io(e){return I()._updateTags.has(e)}function ao(e){F(),I()._updateTags.add(e)}function oo(e){F(),I()._deferred.push(e)}function so(e,t){let n=e.getParent();for(;n!==null;){if(n.is(t))return!0;n=n.getParent()}return!1}function co(e){let t=ro(e);return t?t.defaultView:null}function K(e){let t=e._window;return t===null&&n(78),t}function lo(e){return L(e)&&e.isInline()||R(e)&&e.isInline()}function uo(e){let t=e.getParentOrThrow();for(;t!==null;){if(q(t))return t;t=t.getParentOrThrow()}return t}function q(e){return z(e)||L(e)&&e.isShadowRoot()}function fo(e,t=!1){let n=e.constructor.clone(e);return wa(n,null),n.afterCloneFrom(e),t||n.resetOnCopyNodeFrom(e),n}function po(e){let t=I(),r=e.getType(),i=ca(t,r);i===void 0&&n(200,e.constructor.name,r);let{replace:a,replaceWithKlass:o}=i;if(a!==null){let t=a(e),i=t.constructor;return o===null?t instanceof e.constructor&&i!==e.constructor||n(202,i.name,i.getType(),e.constructor.name,r):t instanceof o||n(201,o.name,o.getType(),i.name,i.getType(),e.constructor.name,r),t.__key===e.__key&&n(203,e.constructor.name,r,i.name,i.getType()),t}return e}function mo(e,t){!z(e.getParent())||L(t)||R(t)||n(99)}function ho(e){let t=V(e);return t===null&&n(63,e),t}function go(e){return(R(e)||L(e)&&!e.canBeEmpty())&&!e.isInline()}function _o(e,t,n){n.style.removeProperty(`caret-color`),t._blockCursorElement=null;let r=e.parentElement;r!==null&&r.removeChild(e)}function J(e){return i?(e||window).getSelection():null}function vo(e){let t=co(e);return t?t.getSelection():null}function yo(e,t){let r=e.getChildAtIndex(t);r??=e,q(e)&&n(102);let i=e=>{let t=e.getParentOrThrow(),a=q(t),o=e!==r||a?fo(e):e;if(a)return L(e)&&L(o)||n(133),e.insertAfter(o),[e,o,o];{let[n,r,a]=i(t),s=e.getNextSiblings();return a.append(o,...s),[n,r,o]}},[a,o]=i(r);return[a,o]}function bo(e){return Y(e)&&e.tagName===`A`}function Y(e){return xo(e)&&e.nodeType===1}function xo(e){return typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`number`}function So(e){return xo(e)&&e.nodeType===11}function Co(e){let t=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,`i`);return e.nodeName.match(t)!==null}function wo(e){let t=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,`i`);return e.nodeName.match(t)!==null}function To(e){if(R(e)&&!e.isInline())return!0;if(!L(e)||q(e))return!1;let t=e.getFirstChild(),n=t===null||fr(t)||O(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}function Eo(){return I()}function Do(e=Eo()){return e._config.dom||Qi}const Oo=new WeakMap,ko=new Map;function Ao(e){if(!e._readOnly&&e.isEmpty())return ko;e._readOnly||n(192);let t=Oo.get(e);return t||(t=function(e){let t=new Map;for(let[n,r]of e._nodeMap){let e=r.__type,i=t.get(e);i||(i=new Map,t.set(e,i)),i.set(n,r)}return t}(e),Oo.set(e,t)),t}function jo(e){let t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function Mo(e){return(t=jo(e))[Wn]=!0,t;var t}function No(e,t){let n=parseInt(e.style.paddingInlineStart,10)||0,r=Math.round(n/40);t.setIndent(r)}function Po(e){e.__lexicalUnmanaged=!0}function Fo(e){return!0===e.__lexicalUnmanaged}function Io(e,t){return function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(e,t)&&e[t]!==E[t]}function Lo(e){let t=ie in e.prototype?e.prototype[ie]():void 0,r=function(e){if(!(e===E||e.prototype instanceof E)){let t=`<unknown>`,r=`<unknown>`;try{t=e.getType()}catch{}try{na.version&&(r=JSON.parse(na.version))}catch{}n(290,e.name,t,r)}return e===Ri||e===Ii||e===E}(e),i=!r&&Io(e,`getType`)?e.getType():void 0,a,o=i;if(t)if(i)a=t[i];else for(let[e,n]of Object.entries(t))o=e,a=n;if(!r&&o&&(Io(e,`getType`)||(e.getType=()=>o),Io(e,`clone`)||(e.clone=t=>(ia(t),new e)),Io(e,`importJSON`)||(e.importJSON=a&&a.$importJSON||(t=>new e().updateFromJSON(t))),!Io(e,`importDOM`)&&a)){let{importDOM:t}=a;t&&(e.importDOM=()=>t)}return{ownNodeConfig:a,ownNodeType:o}}function Ro(e){let t=Eo();return F(),new(t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e))).klass}const zo=(e,t)=>{let n=e;for(;n!=null&&!z(n);){if(t(n))return n;n=n.getParent()}return null};function Bo(e,t){let r=[],i=e.__first;for(;i!==null;){let e=t===null?V(i):t.get(i);e??n(174),r.push(i),i=e.__next}return r}const Vo={next:`previous`,previous:`next`};var Ho=class{origin;constructor(e){this.origin=e}[Symbol.iterator](){return ps({hasNext:Zo,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return Z(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return Z(this.origin,this.direction)}remove(){let e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,t){let n=this.getNodeAtCaret();return e.is(this.origin)||e.is(n)||(n===null?this.insert(e):n.replace(e,t)),this}splice(e,t,r=`next`){let i=r===this.direction?t:Array.from(t).reverse(),a=this,o=this.getParentAtCaret(),s=new Map;for(let t=a.getAdjacentCaret();t!==null&&s.size<e;t=t.getAdjacentCaret()){let e=t.origin.getWritable();s.set(e.getKey(),e)}for(let e of i){if(s.size>0){let t=a.getNodeAtCaret();if(t){if(s.delete(t.getKey()),s.delete(e.getKey()),!(t.is(e)||a.origin.is(e))){let n=e.getParent();n&&n.is(o)&&e.remove(),t.replace(e)}}else t===null&&n(263,Array.from(s).join(` `))}else a.insert(e);a=Z(e,this.direction)}for(let e of s.values())e.remove();return this}},Uo=class e extends Ho{type=`child`;getLatest(){let e=this.origin.getLatest();return e===this.origin?this:is(e,this.direction)}getParentCaret(e=`root`){return Z(Ko(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=Go(this.direction);return Z(this.getNodeAtCaret(),e)||is(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(t){return t instanceof e&&this.direction===t.direction&&this.origin.is(t.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}};const Wo={root:z,shadowRoot:q};function Go(e){return Vo[e]}function Ko(e,t=`root`){return Wo[t](e)?null:e}var qo=class e extends Ho{type=`sibling`;getLatest(){let e=this.origin.getLatest();return e===this.origin?this:Z(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return L(this.origin)?is(this.origin,this.direction):null}getParentCaret(e=`root`){return Z(Ko(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=Go(this.direction);return Z(this.getNodeAtCaret(),e)||is(this.origin.getParentOrThrow(),e)}isSamePointCaret(t){return t instanceof e&&this.direction===t.direction&&this.origin.is(t.origin)}isSameNodeCaret(t){return(t instanceof e||t instanceof Jo)&&this.direction===t.direction&&this.origin.is(t.origin)}},Jo=class e extends Ho{type=`text`;offset;constructor(e,t){super(e),this.offset=t}getLatest(){let e=this.origin.getLatest();return e===this.origin?this:ts(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e=`root`){return Z(Ko(this.getParentAtCaret(),e),this.direction)}getFlipped(){return ts(this.origin,Go(this.direction),this.offset)}isSamePointCaret(t){return t instanceof e&&this.direction===t.direction&&this.origin.is(t.origin)&&this.offset===t.offset}isSameNodeCaret(t){return(t instanceof qo||t instanceof e)&&this.direction===t.direction&&this.origin.is(t.origin)}getSiblingCaret(){return Z(this.origin,this.direction)}};function Yo(e){return e instanceof Jo}function Xo(e){return e instanceof Ho}function Zo(e){return e instanceof qo}function X(e){return e instanceof Uo}const Qo={next:class extends Jo{direction=`next`;getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends Jo{direction=`previous`;getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},$o={next:class extends qo{direction=`next`;getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends qo{direction=`previous`;getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},es={next:class extends Uo{direction=`next`;getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends Uo{direction=`previous`;getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function Z(e,t){return e?new $o[t](e):null}function ts(e,t,n){return e?new Qo[t](e,ns(e,n)):null}function ns(e,t,n=`error`){let i=e.getTextContentSize(),a=t===`next`?i:t===`previous`?0:t;return(a<0||a>i)&&(n!==`clamp`&&r(284,String(t),String(i),e.getKey()),a=a<0?0:i),a}function rs(e,t){return new cs(e,t)}function is(e,t){return L(e)?new es[t](e):null}function as(e){return e&&e.getChildCaret()||e}function os(e){return e&&as(e.getAdjacentCaret())}var ss=class e{type=`node-caret-range`;direction;anchor;focus;constructor(e,t,n){this.anchor=e,this.focus=t,this.direction=n}getLatest(){let t=this.anchor.getLatest(),n=this.focus.getLatest();return t===this.anchor&&n===this.focus?this:new e(t,n,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){let e=e=>{let t=this[e].getLatest();return Yo(t)?function(e,t){let{direction:n,origin:r}=e;return rs(e,ns(r,t===`focus`?Go(n):n)-e.offset)}(t,e):null},t=e(`anchor`),n=e(`focus`);if(t&&n){let{caret:e}=t,{caret:r}=n;if(e.isSameNodeCaret(r))return[rs(e,r.offset-e.offset),null]}return[t,n]}iterNodeCarets(e=`root`){let t=Yo(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),r=Yo(n),i=t=>t.isSameNodeCaret(n)?null:os(t)||t.getParentCaret(e);return ps({hasNext:e=>e!==null&&!(r&&n.isSameNodeCaret(e)),initial:t.isSameNodeCaret(n)?null:i(t),map:e=>e,step:i})}[Symbol.iterator](){return this.iterNodeCarets(`root`)}},cs=class{type=`slice`;caret;distance;constructor(e,t){this.caret=e,this.distance=t}getSliceIndices(){let{distance:e,caret:{offset:t}}=this,n=t+e;return n<t?[n,t]:[t,n]}getTextContent(){let[e,t]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,t)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){let{caret:{origin:e,direction:t}}=this,[n,r]=this.getSliceIndices(),i=e.getTextContent();return ts(e.setTextContent(i.slice(0,n)+i.slice(r)),t,n)}};function ls(e){return e instanceof cs}function us(e){return fs(e,Z(H(),e.direction))}function ds(e){return fs(e,e)}function fs(e,t){return e.direction!==t.direction&&n(265),new ss(e,t,e.direction)}function ps(e){let{initial:t,hasNext:n,step:r,map:i}=e,a=t;return{[Symbol.iterator](){return this},next(){if(!n(a))return{done:!0,value:void 0};let e={done:!1,value:i(a)};return a=r(a),e}}}function ms(e,t){let r=vs(e.origin,t.origin);switch(r===null&&n(275,e.origin.getKey(),t.origin.getKey()),r.type){case`same`:{let n=e.type===`text`,r=t.type===`text`;return n&&r?function(e,t){return Math.sign(e-t)}(e.offset,t.offset):e.type===t.type?0:n?-1:r?1:e.type===`child`?-1:1}case`ancestor`:return e.type===`child`?-1:1;case`descendant`:return t.type===`child`?1:-1;case`branch`:return hs(r)}}function hs(e){let{a:t,b:n}=e,r=t.__key,i=n.__key,a=t,o=n;for(;a&&o;a=a.getNextSibling(),o=o.getNextSibling()){if(a.__key===i)return-1;if(o.__key===r)return 1}return a===null?1:-1}function gs(e,t){return t.is(e)}function _s(e){return L(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function vs(e,t){if(e.is(t))return{commonAncestor:e,type:`same`};let r=new Map;for(let[t,n]=_s(e);t;n=t,t=t.getParent())r.set(t,n);for(let[i,a]=_s(t);i;a=i,i=i.getParent()){let o=r.get(i);if(o!==void 0)return o===null?(gs(e,i)||n(276),{commonAncestor:i,type:`ancestor`}):a===null?(gs(t,i)||n(277),{commonAncestor:i,type:`descendant`}):((L(o)||gs(e,o))&&(L(a)||gs(t,a))&&i.is(o.getParent())&&i.is(a.getParent())||n(278),{a:o,b:a,commonAncestor:i,type:`branch`})}return null}function ys(e,t){let{type:r,key:i,offset:a}=e,o=ho(e.key);return r===`text`?(O(o)||n(266,o.getType(),i),ts(o,t,a)):(L(o)||n(267,o.getType(),i),js(o,e.offset,t))}function bs(e,t){let{origin:r,direction:i}=t,a=i===`next`;Yo(t)?e.set(r.getKey(),t.offset,`text`):Zo(t)?O(r)?e.set(r.getKey(),ns(r,i),`text`):e.set(r.getParentOrThrow().getKey(),r.getIndexWithinParent()+ +!!a,`element`):(X(t)&&L(r)||n(268),e.set(r.getKey(),a?0:r.getChildrenSize(),`element`))}function xs(e){let t=j(),n=A(t)?t:Xr();return Ss(n,e),U(n),n}function Ss(e,t){bs(e.anchor,t.anchor),bs(e.focus,t.focus)}function Cs(e){let{anchor:t,focus:n}=e,r=ys(t,`next`),i=ys(n,`next`),a=ms(r,i)<=0?`next`:`previous`;return fs(ks(r,a),ks(i,a))}function ws(e){let{direction:t,origin:n}=e,r=Z(n,Go(t)).getNodeAtCaret();return r?Z(r,t):is(n.getParentOrThrow(),t)}function Ts(e,t=`root`){let n=[e];for(let r=X(e)?e.getParentCaret(t):e.getSiblingCaret();r!==null;r=r.getParentCaret(t))n.push(ws(r));return n}function Es(e){return!!e&&e.origin.isAttached()}function Ds(e,t=`removeEmptySlices`){if(e.isCollapsed())return e;let r=`root`,i=`next`,a=t,o=As(e,i),s=Ts(o.anchor,r),c=Ts(o.focus.getFlipped(),r),l=new Set,u=[];for(let e of o.iterNodeCarets(r))if(X(e))l.add(e.origin.getKey());else if(Zo(e)){let{origin:t}=e;L(t)&&!l.has(t.getKey())||u.push(t)}for(let e of u)e.remove();for(let e of o.getTextSlices()){if(!e)continue;let{origin:t}=e.caret,n=t.getTextContentSize(),r=ws(Z(t,i)),o=t.getMode();if(Math.abs(e.distance)===n&&a===`removeEmptySlices`||o===`token`&&e.distance!==0)r.remove();else if(e.distance!==0){a=`removeEmptySlices`;let t=e.removeTextSlice(),n=e.caret.origin;if(o===`segmented`){let e=t.origin,n=D(e.getTextContent()).setStyle(e.getStyle()).setFormat(e.getFormat());r.replaceOrInsert(n),t=ts(n,i,t.offset)}n.is(s[0].origin)&&(s[0]=t),n.is(c[0].origin)&&(c[0]=t.getFlipped())}}let d,f;for(let e of s)if(Es(e)){d=Q(e);break}for(let e of c)if(Es(e)){f=Q(e);break}let p=function(e,t,n){if(!e||!t)return null;let r=e.getParentAtCaret(),i=t.getParentAtCaret();if(!r||!i)return null;let a=r.getParents().reverse();a.push(r);let o=i.getParents().reverse();o.push(i);let s=Math.min(a.length,o.length),c;for(c=0;c<s&&a[c]===o[c];c++);let l=(e,t)=>{let n;for(let r=c;r<e.length;r++){let i=e[r];if(q(i))return;!n&&t(i)&&(n=i)}return n},u=l(a,To),d=u&&l(o,e=>n.has(e.getKey())&&To(e));return u&&d?[u,d]:null}(d,f,l);if(p){let[e,t]=p;is(e,`previous`).splice(0,t.getChildren());let n=t.getParent();for(t.remove(!0);n&&n.isEmpty();){let e=n;n=n.getParent(),e.remove(!0)}}let m=[d,f,...s,...c].find(Es);if(m)return ds(ks(Q(m),e.direction));n(269,JSON.stringify(s.map(e=>e.origin.__key)))}function Q(e){let t=function(e){let t=e;for(;X(t);){let e=os(t);if(!X(e))break;t=e}return t}(e.getLatest()),{direction:n}=t;if(O(t.origin))return Yo(t)?t:ts(t.origin,n,n);let r=t.getAdjacentCaret();return Zo(r)&&O(r.origin)?ts(r.origin,n,Go(n)):t}function Os(e){return Yo(e)&&e.offset!==ns(e.origin,e.direction)}function ks(e,t){return e.direction===t?e:e.getFlipped()}function As(e,t){return e.direction===t?e:fs(ks(e.focus,t),ks(e.anchor,t))}function js(e,t,n){let r=is(e,`next`);for(let e=0;e<t;e++){let e=r.getAdjacentCaret();if(e===null)break;r=e}return ks(r,n)}function Ms(e,t=`root`){let n=0,r=e,i=os(r);for(;i===null;){if(n--,i=r.getParentCaret(t),!i)return null;r=i,i=os(r)}return i&&[i,n]}function Ns(e){let{origin:t,offset:r,direction:i}=e;if(r===ns(t,i))return e.getSiblingCaret();if(r===ns(t,Go(i)))return ws(e.getSiblingCaret());let[a]=t.splitText(r);return O(a)||n(281),ks(Z(a,`next`),i)}function Ps(e,t){return!0}function Fs(e,{$copyElementNode:t=fo,$splitTextPointCaretNext:n=Ns,rootMode:r=`shadowRoot`,$shouldSplit:i=Ps,removeEmptyDestination:a=!1}={}){if(Yo(e))return n(e);let o=e.getParentCaret(r);if(o){let{origin:n}=o;if(X(e)){let e=ws(o);if(a&&n.isEmpty())return n.remove(),e;if(!n.canBeEmpty()||!i(n,`first`))return e}let r=function(e){let t=[];for(let n=e.getAdjacentCaret();n;n=n.getAdjacentCaret())t.push(n.origin);return t}(e);(r.length>0||!a&&n.canBeEmpty()&&i(n,`last`))&&o.insert(t(n).splice(0,0,r))}return o}function Is(e){return e}function Ls(...e){return e}function Rs(e,t){return[e,t]}function zs(e){return e}function Bs(e,t){if(!t||e===t)return e;for(let n in t)if(e[n]!==t[n])return{...e,...t};return e}function Vs(...e){let t=[];for(let n of e)if(n&&typeof n==`string`)for(let[e]of n.matchAll(/\S+/g))t.push(e);return t}function Hs(e,...t){let n=Vs(...t);n.length>0&&e.classList.add(...n)}function Us(e,...t){let n=Vs(...t);n.length>0&&e.classList.remove(...n)}function Ws(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}const $=t,Gs=$.$addUpdateTag,Ks=$.$applyNodeReplacement,qs=$.$caretFromPoint,Js=$.$caretRangeFromSelection,Ys=$.$cloneWithProperties,Xs=$.$cloneWithPropertiesEphemeral,Zs=$.$comparePointCaretNext,Qs=$.$copyNode,$s=$.$create,ec=$.$createChildrenArray,tc=$.$createLineBreakNode,nc=$.$createNodeSelection,rc=$.$createParagraphNode,ic=$.$createPoint,ac=$.$createRangeSelection,oc=$.$createRangeSelectionFromDom,sc=$.$createTabNode,cc=$.$createTextNode,lc=$.$extendCaretToRange,uc=$.$findMatchingParent,dc=$.$getAdjacentChildCaret,fc=$.$getAdjacentNode,pc=$.$getAdjacentSiblingOrParentSiblingCaret,mc=$.$getCaretInDirection,hc=$.$getCaretRange,gc=$.$getCaretRangeInDirection,_c=$.$getCharacterOffsets,vc=$.$getChildCaret,yc=$.$getChildCaretAtIndex,bc=$.$getChildCaretOrSelf,xc=$.$getCollapsedCaretRange,Sc=$.$getCommonAncestor,Cc=$.$getCommonAncestorResultBranchOrder,wc=$.$getEditor,Tc=$.$getEditorDOMRenderConfig,Ec=$.$getNearestNodeFromDOMNode,Dc=$.$getNearestRootOrShadowRoot,Oc=$.$getNodeByKey,kc=$.$getNodeByKeyOrThrow,Ac=$.$getNodeFromDOMNode,jc=$.$getPreviousSelection,Mc=$.$getRoot,Nc=$.$getSelection,Pc=$.$getSiblingCaret,Fc=$.$getState,Ic=$.$getStateChange,Lc=$.$getTextContent,Rc=$.$getTextNodeOffset,zc=$.$getTextPointCaret,Bc=$.$getTextPointCaretSlice,Vc=$.$getWritableNodeState,Hc=$.$hasAncestor,Uc=$.$hasUpdateTag,Wc=$.$insertNodes,Gc=$.$isBlockElementNode,Kc=$.$isChildCaret,qc=$.$isDecoratorNode,Jc=$.$isEditorState,Yc=$.$isElementNode,Xc=$.$isExtendableTextPointCaret,Zc=$.$isInlineElementOrDecoratorNode,Qc=$.$isLeafNode,$c=$.$isLexicalNode,el=$.$isLineBreakNode,tl=$.$isNodeCaret,nl=$.$isNodeSelection,rl=$.$isParagraphNode,il=$.$isRangeSelection,al=$.$isRootNode,ol=$.$isRootOrShadowRoot,sl=$.$isSiblingCaret,cl=$.$isTabNode,ll=$.$isTextNode,ul=$.$isTextPointCaret,dl=$.$isTextPointCaretSlice,fl=$.$isTokenOrSegmented,pl=$.$isTokenOrTab,ml=$.$nodesOfType,hl=$.$normalizeCaret,gl=$.$normalizeSelection__EXPERIMENTAL,_l=$.$onUpdate,vl=$.$parseSerializedNode,yl=$.$removeTextFromCaretRange,bl=$.$rewindSiblingCaret,xl=$.$selectAll,Sl=$.$setCompositionKey,Cl=$.$setPointFromCaret,wl=$.$setSelection,Tl=$.$setSelectionFromCaretRange,El=$.$setState,Dl=$.$splitAtPointCaretNext,Ol=$.$splitNode,kl=$.$updateRangeSelectionFromCaretRange,Al=$.ArtificialNode__DO_NOT_USE,jl=$.BEFORE_INPUT_COMMAND,Ml=$.BLUR_COMMAND,Nl=$.CAN_REDO_COMMAND,Pl=$.CAN_UNDO_COMMAND,Fl=$.CLEAR_EDITOR_COMMAND,Il=$.CLEAR_HISTORY_COMMAND,Ll=$.CLICK_COMMAND,Rl=$.COLLABORATION_TAG,zl=$.COMMAND_PRIORITY_BEFORE_CRITICAL,Bl=$.COMMAND_PRIORITY_BEFORE_EDITOR,Vl=$.COMMAND_PRIORITY_BEFORE_HIGH,Hl=$.COMMAND_PRIORITY_BEFORE_LOW,Ul=$.COMMAND_PRIORITY_BEFORE_NORMAL,Wl=$.COMMAND_PRIORITY_CRITICAL,Gl=$.COMMAND_PRIORITY_EDITOR,Kl=$.COMMAND_PRIORITY_HIGH,ql=$.COMMAND_PRIORITY_LOW,Jl=$.COMMAND_PRIORITY_NORMAL,Yl=$.COMPOSITION_END_COMMAND,Xl=$.COMPOSITION_END_TAG,Zl=$.COMPOSITION_START_COMMAND,Ql=$.COMPOSITION_START_TAG,$l=$.CONTROLLED_TEXT_INSERTION_COMMAND,eu=$.COPY_COMMAND,tu=$.CUT_COMMAND,nu=$.DEFAULT_EDITOR_DOM_CONFIG,ru=$.DELETE_CHARACTER_COMMAND,iu=$.DELETE_LINE_COMMAND,au=$.DELETE_WORD_COMMAND,ou=$.DRAGEND_COMMAND,su=$.DRAGOVER_COMMAND,cu=$.DRAGSTART_COMMAND,lu=$.DROP_COMMAND,uu=$.DecoratorNode,du=$.ElementNode,fu=$.FOCUS_COMMAND,pu=$.FORMAT_ELEMENT_COMMAND,mu=$.FORMAT_TEXT_COMMAND,hu=$.HISTORIC_TAG,gu=$.HISTORY_MERGE_TAG,_u=$.HISTORY_PUSH_TAG,vu=$.INDENT_CONTENT_COMMAND,yu=$.INPUT_COMMAND,bu=$.INSERT_LINE_BREAK_COMMAND,xu=$.INSERT_PARAGRAPH_COMMAND,Su=$.INSERT_TAB_COMMAND,Cu=$.INTERNAL_$isBlock,wu=$.IS_ALL_FORMATTING,Tu=$.IS_BOLD,Eu=$.IS_CODE,Du=$.IS_HIGHLIGHT,Ou=$.IS_ITALIC,ku=$.IS_STRIKETHROUGH,Au=$.IS_SUBSCRIPT,ju=$.IS_SUPERSCRIPT,Mu=$.IS_UNDERLINE,Nu=$.KEY_ARROW_DOWN_COMMAND,Pu=$.KEY_ARROW_LEFT_COMMAND,Fu=$.KEY_ARROW_RIGHT_COMMAND,Iu=$.KEY_ARROW_UP_COMMAND,Lu=$.KEY_BACKSPACE_COMMAND,Ru=$.KEY_DELETE_COMMAND,zu=$.KEY_DOWN_COMMAND,Bu=$.KEY_ENTER_COMMAND,Vu=$.KEY_ESCAPE_COMMAND,Hu=$.KEY_MODIFIER_COMMAND,Uu=$.KEY_SPACE_COMMAND,Wu=$.KEY_TAB_COMMAND,Gu=$.LineBreakNode,Ku=$.MOVE_TO_END,qu=$.MOVE_TO_START,Ju=$.NODE_STATE_KEY,Yu=$.OUTDENT_CONTENT_COMMAND,Xu=$.PASTE_COMMAND,Zu=$.PASTE_TAG,Qu=$.ParagraphNode,$u=$.REDO_COMMAND,ed=$.REMOVE_TEXT_COMMAND,td=$.RootNode,nd=$.SELECTION_CHANGE_COMMAND,rd=$.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND,id=$.SELECT_ALL_COMMAND,ad=$.SKIP_COLLAB_TAG,od=$.SKIP_DOM_SELECTION_TAG,sd=$.SKIP_SCROLL_INTO_VIEW_TAG,cd=$.SKIP_SELECTION_FOCUS_TAG,ld=$.TEXT_TYPE_TO_FORMAT,ud=$.TabNode,dd=$.TextNode,fd=$.UNDO_COMMAND,pd=$.addClassNamesToElement,md=$.buildImportMap,hd=$.configExtension,gd=$.createCommand,_d=$.createEditor,vd=$.createSharedNodeState,yd=$.createState,bd=$.declarePeerDependency,xd=$.defineExtension,Sd=$.flipDirection,Cd=$.getDOMOwnerDocument,wd=$.getDOMSelection,Td=$.getDOMSelectionFromTarget,Ed=$.getDOMTextNode,Dd=$.getEditorPropertyFromDOMNode,Od=$.getNearestEditorFromDOMNode,kd=$.getRegisteredNode,Ad=$.getRegisteredNodeOrThrow,jd=$.getStaticNodeConfig,Md=$.getStyleObjectFromCSS,Nd=$.getTextDirection,Pd=$.getTransformSetFromKlass,Fd=$.isBlockDomNode,Id=$.isCurrentlyReadOnlyMode,Ld=$.isDOMDocumentNode,Rd=$.isDOMNode,zd=$.isDOMTextNode,Bd=$.isDOMUnmanaged,Vd=$.isDocumentFragment,Hd=$.isExactShortcutMatch,Ud=$.isHTMLAnchorElement,Wd=$.isHTMLElement,Gd=$.isInlineDomNode,Kd=$.isLexicalEditor,qd=$.isModifierMatch,Jd=$.isSelectionCapturedInDecoratorInput,Yd=$.isSelectionWithinEditor,Xd=$.makeStepwiseIterator,Zd=$.mergeRegister,Qd=$.normalizeClassNames,$d=$.removeClassNamesFromElement,ef=$.removeFromParent,tf=$.resetRandomKey,nf=$.safeCast,rf=$.setDOMStyleFromCSS,af=$.setDOMStyleObject,of=$.setDOMUnmanaged,sf=$.setNodeIndentFromDOM,cf=$.shallowMergeConfig,lf=$.toggleTextFormatType;export{Gs as $addUpdateTag,Ks as $applyNodeReplacement,qs as $caretFromPoint,Js as $caretRangeFromSelection,Ys as $cloneWithProperties,Xs as $cloneWithPropertiesEphemeral,Zs as $comparePointCaretNext,Qs as $copyNode,$s as $create,ec as $createChildrenArray,tc as $createLineBreakNode,nc as $createNodeSelection,rc as $createParagraphNode,ic as $createPoint,ac as $createRangeSelection,oc as $createRangeSelectionFromDom,sc as $createTabNode,cc as $createTextNode,lc as $extendCaretToRange,uc as $findMatchingParent,dc as $getAdjacentChildCaret,fc as $getAdjacentNode,pc as $getAdjacentSiblingOrParentSiblingCaret,mc as $getCaretInDirection,hc as $getCaretRange,gc as $getCaretRangeInDirection,_c as $getCharacterOffsets,vc as $getChildCaret,yc as $getChildCaretAtIndex,bc as $getChildCaretOrSelf,xc as $getCollapsedCaretRange,Sc as $getCommonAncestor,Cc as $getCommonAncestorResultBranchOrder,wc as $getEditor,Tc as $getEditorDOMRenderConfig,Ec as $getNearestNodeFromDOMNode,Dc as $getNearestRootOrShadowRoot,Oc as $getNodeByKey,kc as $getNodeByKeyOrThrow,Ac as $getNodeFromDOMNode,jc as $getPreviousSelection,Mc as $getRoot,Nc as $getSelection,Pc as $getSiblingCaret,Fc as $getState,Ic as $getStateChange,Lc as $getTextContent,Rc as $getTextNodeOffset,zc as $getTextPointCaret,Bc as $getTextPointCaretSlice,Vc as $getWritableNodeState,Hc as $hasAncestor,Uc as $hasUpdateTag,Wc as $insertNodes,Gc as $isBlockElementNode,Kc as $isChildCaret,qc as $isDecoratorNode,Jc as $isEditorState,Yc as $isElementNode,Xc as $isExtendableTextPointCaret,Zc as $isInlineElementOrDecoratorNode,Qc as $isLeafNode,$c as $isLexicalNode,el as $isLineBreakNode,tl as $isNodeCaret,nl as $isNodeSelection,rl as $isParagraphNode,il as $isRangeSelection,al as $isRootNode,ol as $isRootOrShadowRoot,sl as $isSiblingCaret,cl as $isTabNode,ll as $isTextNode,ul as $isTextPointCaret,dl as $isTextPointCaretSlice,fl as $isTokenOrSegmented,pl as $isTokenOrTab,ml as $nodesOfType,hl as $normalizeCaret,gl as $normalizeSelection__EXPERIMENTAL,_l as $onUpdate,vl as $parseSerializedNode,yl as $removeTextFromCaretRange,bl as $rewindSiblingCaret,xl as $selectAll,Sl as $setCompositionKey,Cl as $setPointFromCaret,wl as $setSelection,Tl as $setSelectionFromCaretRange,El as $setState,Dl as $splitAtPointCaretNext,Ol as $splitNode,kl as $updateRangeSelectionFromCaretRange,Al as ArtificialNode__DO_NOT_USE,jl as BEFORE_INPUT_COMMAND,Ml as BLUR_COMMAND,Nl as CAN_REDO_COMMAND,Pl as CAN_UNDO_COMMAND,Fl as CLEAR_EDITOR_COMMAND,Il as CLEAR_HISTORY_COMMAND,Ll as CLICK_COMMAND,Rl as COLLABORATION_TAG,zl as COMMAND_PRIORITY_BEFORE_CRITICAL,Bl as COMMAND_PRIORITY_BEFORE_EDITOR,Vl as COMMAND_PRIORITY_BEFORE_HIGH,Hl as COMMAND_PRIORITY_BEFORE_LOW,Ul as COMMAND_PRIORITY_BEFORE_NORMAL,Wl as COMMAND_PRIORITY_CRITICAL,Gl as COMMAND_PRIORITY_EDITOR,Kl as COMMAND_PRIORITY_HIGH,ql as COMMAND_PRIORITY_LOW,Jl as COMMAND_PRIORITY_NORMAL,Yl as COMPOSITION_END_COMMAND,Xl as COMPOSITION_END_TAG,Zl as COMPOSITION_START_COMMAND,Ql as COMPOSITION_START_TAG,$l as CONTROLLED_TEXT_INSERTION_COMMAND,eu as COPY_COMMAND,tu as CUT_COMMAND,nu as DEFAULT_EDITOR_DOM_CONFIG,ru as DELETE_CHARACTER_COMMAND,iu as DELETE_LINE_COMMAND,au as DELETE_WORD_COMMAND,ou as DRAGEND_COMMAND,su as DRAGOVER_COMMAND,cu as DRAGSTART_COMMAND,lu as DROP_COMMAND,uu as DecoratorNode,du as ElementNode,fu as FOCUS_COMMAND,pu as FORMAT_ELEMENT_COMMAND,mu as FORMAT_TEXT_COMMAND,hu as HISTORIC_TAG,gu as HISTORY_MERGE_TAG,_u as HISTORY_PUSH_TAG,vu as INDENT_CONTENT_COMMAND,yu as INPUT_COMMAND,bu as INSERT_LINE_BREAK_COMMAND,xu as INSERT_PARAGRAPH_COMMAND,Su as INSERT_TAB_COMMAND,Cu as INTERNAL_$isBlock,wu as IS_ALL_FORMATTING,Tu as IS_BOLD,Eu as IS_CODE,Du as IS_HIGHLIGHT,Ou as IS_ITALIC,ku as IS_STRIKETHROUGH,Au as IS_SUBSCRIPT,ju as IS_SUPERSCRIPT,Mu as IS_UNDERLINE,Nu as KEY_ARROW_DOWN_COMMAND,Pu as KEY_ARROW_LEFT_COMMAND,Fu as KEY_ARROW_RIGHT_COMMAND,Iu as KEY_ARROW_UP_COMMAND,Lu as KEY_BACKSPACE_COMMAND,Ru as KEY_DELETE_COMMAND,zu as KEY_DOWN_COMMAND,Bu as KEY_ENTER_COMMAND,Vu as KEY_ESCAPE_COMMAND,Hu as KEY_MODIFIER_COMMAND,Uu as KEY_SPACE_COMMAND,Wu as KEY_TAB_COMMAND,Gu as LineBreakNode,Ku as MOVE_TO_END,qu as MOVE_TO_START,Ju as NODE_STATE_KEY,Yu as OUTDENT_CONTENT_COMMAND,Xu as PASTE_COMMAND,Zu as PASTE_TAG,Qu as ParagraphNode,$u as REDO_COMMAND,ed as REMOVE_TEXT_COMMAND,td as RootNode,nd as SELECTION_CHANGE_COMMAND,rd as SELECTION_INSERT_CLIPBOARD_NODES_COMMAND,id as SELECT_ALL_COMMAND,ad as SKIP_COLLAB_TAG,od as SKIP_DOM_SELECTION_TAG,sd as SKIP_SCROLL_INTO_VIEW_TAG,cd as SKIP_SELECTION_FOCUS_TAG,ld as TEXT_TYPE_TO_FORMAT,ud as TabNode,dd as TextNode,fd as UNDO_COMMAND,pd as addClassNamesToElement,md as buildImportMap,hd as configExtension,gd as createCommand,_d as createEditor,vd as createSharedNodeState,yd as createState,bd as declarePeerDependency,xd as defineExtension,Sd as flipDirection,Cd as getDOMOwnerDocument,wd as getDOMSelection,Td as getDOMSelectionFromTarget,Ed as getDOMTextNode,Dd as getEditorPropertyFromDOMNode,Od as getNearestEditorFromDOMNode,kd as getRegisteredNode,Ad as getRegisteredNodeOrThrow,jd as getStaticNodeConfig,Md as getStyleObjectFromCSS,Nd as getTextDirection,Pd as getTransformSetFromKlass,Fd as isBlockDomNode,Id as isCurrentlyReadOnlyMode,Ld as isDOMDocumentNode,Rd as isDOMNode,zd as isDOMTextNode,Bd as isDOMUnmanaged,Vd as isDocumentFragment,Hd as isExactShortcutMatch,Ud as isHTMLAnchorElement,Wd as isHTMLElement,Gd as isInlineDomNode,Kd as isLexicalEditor,qd as isModifierMatch,Jd as isSelectionCapturedInDecoratorInput,Yd as isSelectionWithinEditor,Xd as makeStepwiseIterator,Zd as mergeRegister,Qd as normalizeClassNames,$d as removeClassNamesFromElement,ef as removeFromParent,tf as resetRandomKey,nf as safeCast,rf as setDOMStyleFromCSS,af as setDOMStyleObject,of as setDOMUnmanaged,sf as setNodeIndentFromDOM,cf as shallowMergeConfig,lf as toggleTextFormatType};