PageSourceSearch

https://www.alignmentforum.org/_next/static/immutable/chunks/3uckhlwz6rh2g.js

js alignmentforum.org collected 2026-10-01 10:13:23 UTC 135,448 bytes, 5 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="9afaacf9-45ca-c1d8-c089-9cf20968adaa")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,965952,e=>{"use strict";var t=e.i(299749);function n(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];let r=new URL("https://lexical.dev/docs/error"),l=new URLSearchParams;for(let t of(l.append("code",e),n))l.append("v",t);throw r.search=l.toString(),Error("Minified Lexical error #".concat(e,"; visit ").concat(r.toString()," for the full message or use the non-minified dev environment for full errors and additional helpful warnings."))}function i(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];let r=new URL("https://lexical.dev/docs/error"),l=new URLSearchParams;for(let t of(l.append("code",e),n))l.append("v",t);r.search=l.toString(),console.warn("Minified Lexical warning #".concat(e,"; visit ").concat(r.toString()," for the full message or use the non-minified dev environment for full errors and additional helpful warnings."))}let r="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement,l=r&&"documentMode"in document?document.documentMode:null,o=r&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),s=r&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),a=!(!r||!("InputEvent"in window)||l)&&"getTargetRanges"in new window.InputEvent("input"),u=r&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,d=r&&/Android/.test(navigator.userAgent),c=r&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!d,f=r&&/^(?=.*Chrome).*/i.test(navigator.userAgent),h=r&&d&&f,g=r&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&o&&!f,_=c||u||g?" ":"​",p=s?" ":_,y="֑-߿יִ-﷽ﹰ-ﻼ",m="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",C=RegExp("^[^"+m+"]*["+y+"]"),x=RegExp("^[^"+y+"]*["+m+"]"),v={bold:1,capitalize:1024,code:16,highlight:128,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},S={directionless:1,unmergeable:2},N={center:2,end:6,justify:4,left:1,right:3,start:5},T={2:"center",6:"end",4:"justify",1:"left",3:"right",5:"start"},k={normal:0,segmented:2,token:1},O={0:"normal",2:"segmented",1:"token"},E="$config";class b{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]()}constructor(){(0,t._)(this,"_front",new Set),(0,t._)(this,"_back",new Set),(0,t._)(this,"_cache",void 0)}}let M=!1,A=0;function w(e){A=e.timeStamp}function D(e,t,n){let i="BR"===e.nodeName,r=t.__lexicalLineBreak;return r&&(e===r||i&&e.previousSibling===r)||i&&void 0!==i5(e,n)}function P(e,t,n){M=!0;let i=performance.now()-A>100;try{ig(e,()=>{let r=nj()||e.getEditorState().read(()=>{let e=nj();return null!==e?e.clone():null}),l=new Map,o=e.getRootElement(),a=e._editorState,u=e._blockCursorElement,d=!1,c="";for(let n=0;n<t.length;n++){let f=t[n],h=f.type,g=f.target,_=function(e,t,n,i){var r;for(let l=e;l&&(r=l,!0!==r.__lexicalUnmanaged);l=rT(l)){let e=i5(l,t);if(void 0!==e){let t=i4(e,n);if(t)return iv(t)||!rz(l)?void 0:[l,t]}else if(l===i)return[i,rt(n)]}}(g,e,a,o);if(!_)continue;let[p,y]=_;if("characterData"===h)i&&nm(y)&&iH(g)&&function(e,t,n){if(nb(e)){let t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return iH(t)&&n.isAttached()}(r,g,y)&&function(e,t,n){let i=rK(rA(n)),r=null,l=null;
2null!==i&&i.anchorNode===e&&(r=i.anchorOffset,l=i.focusOffset);let o=e.nodeValue;null!==o&&ru(t,o,r,l,!1)}(g,y,e);else if("childList"===h){d=!0;let t=f.addedNodes;for(let n=0;n<t.length;n++){let i=t[n],r=i6(i),l=i.parentNode;if(null!=l&&i!==u&&null===r&&!D(i,l,e)){if(s){let e=(rz(i)?i.innerText:null)||i.nodeValue;e&&(c+=e)}l.removeChild(i)}}let n=f.removedNodes,i=n.length;if(i>0){let t=0;for(let r=0;r<i;r++){let i=n[r];(D(i,g,e)||u===i)&&(g.appendChild(i),t++)}i!==t&&l.set(p,y)}}}if(l.size>0)for(let[t,n]of l)n.reconcileObservedMutation(t,e);let f=n.takeRecords();if(f.length>0){for(let t=0;t<f.length;t++){let n=f[t],i=n.addedNodes,r=n.target;for(let t=0;t<i.length;t++){let n=i[t],l=n.parentNode;null==l||"BR"!==n.nodeName||D(n,r,e)||l.removeChild(n)}}n.takeRecords()}null!==r&&(d&&rn(r),s&&rv(e)&&r.insertRawText(c))})}finally{M=!1}}function F(e){let t=e._observer;null!==t&&P(e,t.takeRecords(),t)}function I(e){0===A&&rA(e).addEventListener("textInput",w,!0),e._observer=new MutationObserver((t,n)=>{P(e,t,n)})}class L{constructor(e,n){(0,t._)(this,"key",void 0),(0,t._)(this,"parse",void 0),(0,t._)(this,"unparse",void 0),(0,t._)(this,"isEqual",void 0),(0,t._)(this,"defaultValue",void 0),(0,t._)(this,"resetOnCopyNode",void 0),this.key=e,this.parse=n.parse.bind(n),this.unparse=(n.unparse||$).bind(n),this.isEqual=(n.isEqual||Object.is).bind(n),this.defaultValue=this.parse(void 0),this.resetOnCopyNode=n.resetOnCopyNode||!1}}function R(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"latest",i=("latest"===n?e.getLatest():e).__state;return i?i.getValue(t):t.defaultValue}class K{getValue(e){let t=this.knownState.get(e);if(void 0!==t)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];void 0!==t&&(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 W(e)&&(t.$=e),t}getWritable(e){if(this.node===e)return this;let{sharedNodeState:t,unknownState:n}=this,i=new Map(this.knownState);return new K(e,t,function(e,t,n){let i;if(n)for(let[r,l]of Object.entries(n)){let n=e.get(r);n?t.has(n)||t.set(n,n.parse(l)):(i=i||{})[r]=l}return i}(t.sharedConfigMap,i,n),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:i,unknownState:r}=this;i.has(e)||r&&n in r||(r&&(delete r[n],this.unknownState=W(r)),this.size++),i.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)}constructor(e,n,i,r=new Map,l){(0,t._)(this,"node",void 0),(0,t._)(this,"knownState",void 0),(0,t._)(this,"unknownState",void 0),(0,t._)(this,"sharedNodeState",void 0),(0,t._)(this,"size",void 0),this.node=e,this.sharedNodeState=n,this.unknownState=i,this.knownState=r;const{sharedConfigMap:o}=this.sharedNodeState,s=void 0!==l?l:function(e,t,n){let i=n.size;if(t)for(let r in t){let t=e.get(r);t&&n.has(t)||i++}return i}(o,i,r);this.size=s}}function B(e){let t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new K(t,z(t));return t.__state=n,n}function z(e){return e.__state?e.__state.sharedNodeState:iB(rY(),e.getType()).sharedNodeState}function W(e){if(e)for(let t in e)return e}function $(e){return e}function U(e,t,n){for(let[i,r]of t.knownState){if(e.has(i.key))continue;e.add(i.key);let t=n?n.getValue(i):i.defaultValue;if(t!==r&&!i.isEqual(t,r))return!0}return!1}function j(e,t,n){let{unknownState:i}=t,r=n?n.unknownState:void 0;if(i){for(let[t,n]of Object.entries(i))if(!e.has(t)&&(e.add(t),n!==(r?r[t]:void 0)))return!0}return!1}function J(e,t){let n=e.__state;return n&&n.node===e?n.getWritable(t):n}function Y(e,t){let n=e.__mode,i=e.__format,r=e.__style,l=t.__mode,o=t.__format,s=t.__style,a=e.__state,u=t.__state;return(null===n||n===l)&&(null===i||i===o)&&(null===r||r===s)&&(null===e.__state||a===u||function(e,t){if(e===t)return!0;let n=new Set;return!(e&&U(n,e,t)||t&&U(n,t,e)||e&&j(n,e,t)||t&&j(n,t,e))}(a,u))}function V(e,t){let n=e.mergeWithSibling(t),i=ie()._normalizedNodes;return i.add(e.__key),i.add(t.__key),n}function G(e){let t,n,i=e;if(""!==i.__text||!i.isSimpleText()||i.isUnmergeable()){for(;null!==(t=i.getPreviousSibling())&&nm(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(""!==t.__text){Y(t,i)&&(i=V(t,i));break}t.remove()}for(;null!==(n=i.getNextSibling())&&nm(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(""!==n.__text){Y(i,n)&&(i=V(i,n));break}n.remove()}}else i.remove()}function H(e){return q(e.anchor),q(e.focus),e}function q(e){for(;"element"===e.type;){let t,n,i=e.getNode(),r=e.offset;if(r===i.getChildrenSize()?(t=i.getChildAtIndex(r-1),n=!0):(t=i.getChildAtIndex(r),n=!1),nm(t)){e.set(t.__key,n?t.getTextContentSize():0,"text",!0);break}if(!im(t))break;e.set(t.__key,n?t.getChildrenSize():0,"element",!0)}}
2let X,Q,Z,ee,et,en,ei,er,el,eo,es,ea="",eu=null,ed=null,ec=!1,ef=!1;function eh(e,t){let n=ei.get(e);if(null!==t){let n=eO(e);n.parentNode===t&&t.removeChild(n)}if(er.has(e)||Q._keyToDOMMap.delete(e),im(n)){let e=r2(n,ei);eg(e,0,e.length-1,null)}void 0!==n&&rm(eo,Z,ee,n,"destroyed")}function eg(e,t,n,i){for(let r=t;r<=n;++r){let t=e[r];void 0!==t&&eh(t,i)}}function e_(e,t){e.setProperty("text-align",t)}function ep(e,t){let n=X.theme.indent;if("string"==typeof n){let i=e.classList.contains(n);t>0&&!i?e.classList.add(n):t<1&&i&&e.classList.remove(n)}if(0===t)return void e.style.setProperty("padding-inline-start","");let i=getComputedStyle(Q._rootElement||e).getPropertyValue("--lexical-indent-base-value")||"40px";e.style.setProperty("padding-inline-start","calc(".concat(t," * ").concat(i,")"))}function ey(e,t){let n=e.style;0===t?e_(n,""):1===t?e_(n,"left"):2===t?e_(n,"center"):3===t?e_(n,"right"):4===t?e_(n,"justify"):5===t?e_(n,"start"):6===t&&e_(n,"end")}function em(e,t){let n=function(e){let t=e.__dir;if(null!==t)return t;if(iN(e))return null;let n=e.getParentOrThrow();return iN(n)&&null===n.__dir?"auto":null}(t);null!==n?e.dir=n:e.removeAttribute("dir")}function eC(e,t){var i;let r,l=er.get(e);void 0===l&&n(60);let o=es.$createDOM(l,Q);if(r=(i=Q)._keyToDOMMap,o["__lexicalKey_".concat(i._key)]=e,r.set(e,o),nm(l)?o.setAttribute("data-lexical-text","true"):iv(l)&&o.setAttribute("data-lexical-decorator","true"),im(l)){let e=l.__indent,t=l.__size;em(o,l),0!==e&&ep(o,e),0!==t&&ex(r2(l,er),l,0,t-1,es.$getDOMSlot(l,o,Q));let n=l.__format;0!==n&&ey(o,n),l.isInline()||eS(null,l,o)}else{let t=l.getTextContent();if(iv(l)){let t=l.decorate(Q,X);null!==t&&eN(e,t),o.contentEditable="false"}ea+=t}return null!==t&&t.insertChild(o),es.$decorateDOM(l,null,o,Q),rm(eo,Z,ee,l,"created"),o}function ex(e,t,n,i,r){let l=ea;ea="";let o=n;for(;o<=i;++o){eC(e[o],r);let t=er.get(e[o]);null!==t&&nm(t)?null===eu&&(eu=t.getFormat(),ed=t.getStyle()):im(t)&&o<i&&!t.isInline()&&(ea+="\n\n")}r.element.__lexicalTextContent=ea,ea=l+ea}function ev(e,t){if(e){let n=e.__last;if(n){let e=t.get(n);if(e)return nt(e)?"line-break":iv(e)&&e.isInline()?"decorator":null}return"empty"}return null}function eS(e,t,n){let i=ev(e,ei),r=ev(t,er);i!==r&&es.$getDOMSlot(t,n,Q).setManagedLineBreak(r)}function eN(e,t){let n=Q._pendingDecorators,i=Q._decorators;if(null===n){if(i[e]===t)return;n=i9(Q)}n[e]=t}function eT(e){let t=e.nextSibling;return null!==t&&t===Q._blockCursorElement&&(t=t.nextSibling),t}function ek(e,t){let n=new Set;for(let i=t;i<e.length;i++)n.add(e[i]);return n}function eO(e){let t=el.get(e);return void 0===t&&n(75,e),t}function eE(e){return{type:e}}let eb=eE("SELECTION_CHANGE_COMMAND"),eM=eE("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),eA=eE("CLICK_COMMAND"),ew=eE("BEFORE_INPUT_COMMAND"),eD=eE("INPUT_COMMAND"),eP=eE("COMPOSITION_START_COMMAND"),eF=eE("COMPOSITION_END_COMMAND"),eI=eE("DELETE_CHARACTER_COMMAND"),eL=eE("INSERT_LINE_BREAK_COMMAND"),eR=eE("INSERT_PARAGRAPH_COMMAND"),eK=eE("CONTROLLED_TEXT_INSERTION_COMMAND"),eB=eE("PASTE_COMMAND"),ez=eE("REMOVE_TEXT_COMMAND"),eW=eE("DELETE_WORD_COMMAND"),e$=eE("DELETE_LINE_COMMAND"),eU=eE("FORMAT_TEXT_COMMAND"),ej=eE("UNDO_COMMAND"),eJ=eE("REDO_COMMAND"),eY=eE("KEYDOWN_COMMAND"),eV=eE("KEY_ARROW_RIGHT_COMMAND"),eG=eE("MOVE_TO_END"),eH=eE("KEY_ARROW_LEFT_COMMAND"),eq=eE("MOVE_TO_START"),eX=eE("KEY_ARROW_UP_COMMAND"),eQ=eE("KEY_ARROW_DOWN_COMMAND"),eZ=eE("KEY_ENTER_COMMAND"),e0=eE("KEY_SPACE_COMMAND"),e1=eE("KEY_BACKSPACE_COMMAND"),e2=eE("KEY_ESCAPE_COMMAND"),e3=eE("KEY_DELETE_COMMAND"),e4=eE("KEY_TAB_COMMAND"),e6=eE("INSERT_TAB_COMMAND"),e5=eE("INDENT_CONTENT_COMMAND"),e7=eE("OUTDENT_CONTENT_COMMAND"),e9=eE("DROP_COMMAND"),e8=eE("FORMAT_ELEMENT_COMMAND"),te=eE("DRAGSTART_COMMAND"),tt=eE("DRAGOVER_COMMAND"),tn=eE("DRAGEND_COMMAND"),ti=eE("COPY_COMMAND"),tr=eE("CUT_COMMAND"),tl=eE("SELECT_ALL_COMMAND"),to=eE("CLEAR_EDITOR_COMMAND"),ts=eE("CLEAR_HISTORY_COMMAND"),ta=eE("CAN_REDO_COMMAND"),tu=eE("CAN_UNDO_COMMAND"),td=eE("FOCUS_COMMAND"),tc=eE("BLUR_COMMAND"),tf=eE("KEY_MODIFIER_COMMAND"),th=Object.freeze({}),tg=[["keydown",function(e,t){t_=e.timeStamp,tp=e.key,t.isComposing()||rS(t,eY,e)}],["pointerdown",function(e,t){let n=e.target,i=e.pointerType;rW(n)&&"touch"!==i&&"pen"!==i&&0===e.button&&ig(t,()=>{iv(i7(n))||(tS=!0)})}],["compositionstart",function(e,t){rS(t,eP,e)}],["compositionend",function(e,t){s?tT=!0:!u&&(c||g)?(tk=!0,tO=e.data):rS(t,eF,e)}],["input",function(e,t){e.stopPropagation(),ig(t,()=>{t.dispatchCommand(eD,e)},{event:e}),tm=null}],["click",function(e,t){ig(t,()=>{let n=nj(),i=rK(rA(t)),r=nJ();if(i){if(nb(n)){let t=n.anchor,l=t.getNode();if("element"===t.type&&0===t.offset&&n.isCollapsed()&&!iN(l)&&1===re().getChildrenSize()&&l.getTopLevelElementOrThrow().isEmpty()&&null!==r&&n.is(r))i.removeAllRanges(),n.dirty=!0;else if(3===e.detail&&!n.isCollapsed()&&l!==n.focus.getNode()){let e=r1(l,e=>im(e)&&!e.isInline());im(e)&&e.select(0)}}else if("touch"===e.pointerType||"pen"===e.pointerType){let n=i.anchorNode;(rz(n)||iH(n))&&rn(nU(r,i,t,e))}}rS(t,eA,e)})}],["cut",th],["copy",th],["dragstart",th],["dragover",th],["dragend",th],["paste",th],["focus",th],["blur",th],["drop",th]];a&&tg.push(["beforeinput",(e,t)=>{let n;"deleteCompositionText"===(n=e.inputType)||s&&rv(t)||"insertCompositionText"!==n&&rS(t,ew,e)}]);let t_=0,tp=null,ty=0,tm=null,tC=new WeakMap,tx=new WeakMap,tv=!1,t
2S=!1,tN=!1,tT=!1,tk=!1,tO="",tE=null,tb=[0,"",0,"root",0];function tM(e,t,n,i,r){let l=e.anchor,o=e.focus,s=l.getNode(),u=ie(),d=rK(rA(u)),c=null!==d?d.anchorNode:null,f=l.key,h=u.getElementByKey(f),g=n.length;return f!==o.key||!nm(s)||(!r&&(!a||ty<i+50)||s.isDirty()&&g<2||rr(n))&&l.offset!==o.offset&&!s.isComposing()||iG(s)||s.isDirty()&&g>1||(r||!a)&&null!==h&&!s.isComposing()&&c!==iX(h)||null!==d&&null!==t&&(!t.collapsed||t.startContainer!==d.anchorNode||t.startOffset!==d.anchorOffset)||!s.isComposing()&&(s.getFormat()!==e.format||s.getStyle()!==e.style)||function(e,t){let n;if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;let i=e.anchor.offset,r=t.getParentOrThrow(),l=iV(t);return 0===i?!t.canInsertTextBefore()||!r.canInsertTextBefore()&&!t.isComposing()||l||(nm(n=t.getPreviousSibling())||im(n)&&n.isInline())&&!n.canInsertTextAfter():i===t.getTextContentSize()&&(!t.canInsertTextAfter()||!r.canInsertTextAfter()&&!t.isComposing()||l)}(e,s)}function tA(e,t){return iH(e)&&null!==e.nodeValue&&0!==t&&t!==e.nodeValue.length}function tw(e,t,i){let{anchorNode:r,anchorOffset:l,focusNode:o,focusOffset:s}=e;tv&&(tv=!1,tA(r,l)&&tA(o,s)&&!tE)||ig(t,()=>{if(!i)return void rn(null);if(!iU(t,r,o))return;let a=nj();if(tE&&nb(a)&&a.isCollapsed()){let e=a.anchor,t=tE.anchor;(e.key===t.key&&e.offset===t.offset+1||1===e.offset&&t.getNode().is(e.getNode().getPreviousSibling()))&&rn(a=tE.clone())}if(tE=null,nb(a)){let i=a.anchor,r=i.getNode();if(a.isCollapsed()){"Range"===e.type&&e.anchorNode===e.focusNode&&(a.dirty=!0);let l=rA(t).event,o=l?l.timeStamp:performance.now(),[s,u,d,c,f]=tb,h=re(),g=!1===t.isComposing()&&""===h.getTextContent();if(o<f+200&&i.offset===d&&i.key===c)tD(a,s,u);else if("text"===i.type)nm(r)||n(141),tP(a,r);else if("element"===i.type&&!g){im(r)||n(259);let e=i.getNode();e.isEmpty()?tD(a,e.getTextFormat(),e.getTextStyle()):tD(a,a.format,"")}}else{let e=i.key,t=a.focus.key,n=a.getNodes(),r=n.length,o=a.isBackward(),u=o?s:l,d=o?l:s,c=o?t:e,f=o?e:t,h=2047,g=!1;for(let e=0;e<r;e++){let t=n[e],i=t.getTextContentSize();if(nm(t)&&0!==i&&(0!==e||t.__key!==c||u!==i)&&(e!==r-1||t.__key!==f||0!==d)&&(g=!0,0==(h&=t.getFormat())))break}a.format=g?h:0}}rS(t,eb,void 0)})}function tD(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function tP(e,t){tD(e,t.getFormat(),t.getStyle())}function tF(e){if(!e.getTargetRanges)return null;let t=e.getTargetRanges();return 0===t.length?null:t[0]}function tI(e){var t;let i=e.inputType,r=tF(e),l=ie(),o=nj();if("deleteContentBackward"===i){if(null===o){let e=nJ();if(!nb(e))return!0;rn(e.clone())}if(nb(o)){let i=o.anchor.key===o.focus.key;if(t=e.timeStamp,"MediaLast"===tp&&t<t_+30&&l.isComposing()&&i){if(i2(null),t_=0,setTimeout(()=>{ig(l,()=>{i2(null)})},30),nb(o)){let e=o.anchor.getNode();e.markDirty(),nm(e)||n(142),tP(o,e)}}else{i2(null),e.preventDefault();let t=o.anchor.getNode(),n=t.getTextContent(),r=t.canInsertTextAfter(),s=0===o.anchor.offset&&o.focus.offset===n.length,a=h&&i&&!s&&r;if(a&&o.isCollapsed()&&(a=!iv(rx(o.anchor,!0))),!a){rS(l,eI,!0);let e=nj();h&&nb(e)&&e.isCollapsed()&&(tE=e,setTimeout(()=>tE=null))}}return!0}}if(!nb(o))return!0;let s=e.data;null!==tm&&ra(!1,l,tm),o.dirty&&null===tm||!o.isCollapsed()||iN(o.anchor.getNode())||null===r||o.applyDOMRange(r),tm=null;let a=o.anchor,d=o.focus,c=a.getNode(),f=d.getNode();if("insertText"===i||"insertTranspose"===i){if("\n"===s)e.preventDefault(),rS(l,eL,!1);else if("\n\n"===s)e.preventDefault(),rS(l,eR,void 0);else if(null==s&&e.dataTransfer){let t=e.dataTransfer.getData("text/plain");e.preventDefault(),o.insertRawText(t)}else null!=s&&tM(o,r,s,e.timeStamp,!0)?(e.preventDefault(),rS(l,eK,s)):tm=s;return ty=e.timeStamp,!0}switch(e.preventDefault(),i){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":rS(l,eK,e);break;case"insertFromComposition":i2(null),rS(l,eK,e);break;case"insertLineBreak":i2(null),rS(l,eL,!1);break;case"insertParagraph":i2(null),tN&&!u?(tN=!1,rS(l,eL,!1)):rS(l,eR,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":rS(l,eB,e);break;case"deleteByComposition":(c!==f||im(c)||im(f)||!iV(c)||!iV(f))&&rS(l,ez,e);break;case"deleteByDrag":rO(t1),rS(l,ez,e);break;case"deleteByCut":rS(l,ez,e);break;case"deleteContent":rS(l,eI,!1);break;case"deleteWordBackward":rS(l,eW,!0);break;
2case"deleteWordForward":rS(l,eW,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":rS(l,e$,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":rS(l,e$,!1);break;case"formatStrikeThrough":rS(l,eU,"strikethrough");break;case"formatBold":rS(l,eU,"bold");break;case"formatItalic":rS(l,eU,"italic");break;case"formatUnderline":rS(l,eU,"underline");break;case"historyUndo":rS(l,ej,void 0);break;case"historyRedo":rS(l,eJ,void 0)}return!0}function tL(e){if(rz(e.target)&&iv(i7(e.target)))return!0;let t=ie(),n=nj(),i=e.data,r=tF(e);if(null!=i&&nb(n)&&tM(n,r,i,e.timeStamp,!1)){tT&&(tB(t,i),tT=!1);let r=n.anchor.getNode(),l=rK(rA(t));if(null===l)return!0;let o=n.isBackward(),u=o?n.anchor.offset:n.focus.offset,d=o?n.focus.offset:n.anchor.offset;a&&!n.isCollapsed()&&nm(r)&&null!==l.anchorNode&&r.getTextContent().slice(0,u)+i+r.getTextContent().slice(u+d)===rs(l.anchorNode)||rS(t,eK,i);let c=i.length;s&&c>1&&"insertCompositionText"===e.inputType&&!t.isComposing()&&(n.anchor.offset-=c),h&&t.isComposing()&&(t_=0,i2(null))}else ra(!1,t,null!==i?i:void 0),tT&&(tB(t,i||void 0),tT=!1);return n7(),F(ie()),!0}function tR(e){let t=ie(),n=nj();if(nb(n)&&!t.isComposing()){let i=n.anchor,r=n.anchor.getNode();i2(i.key),rO(t2),(e.timeStamp<t_+30||"element"===i.type||!n.isCollapsed()||r.getFormat()!==n.format||nm(r)&&r.getStyle()!==n.style)&&rS(t,eK,p)}return!0}function tK(e){return tB(ie(),e.data),rO(t3),!0}function tB(e,t){let n=e._compositionKey;if(i2(null),null!==n&&null!=t){if(""===t){let t=i4(n),i=iX(e.getElementByKey(n));if(null!==i&&null!==i.nodeValue&&nm(t)){let n=rK(rA(e)),r=null,l=null;null!==n&&n.anchorNode===i&&(r=n.anchorOffset,l=n.focusOffset),ru(t,i.nodeValue,r,l,!0)}return}if("\n"===t[t.length-1]){let t=nj();if(nb(t)||nA(t)){if(nb(t)){let e=t.focus;t.anchor.set(e.key,e.offset,e.type)}return void rS(e,eZ,null)}}}ra(!0,e,t)}function tz(e){let t=ie();if(null==e.key)return!0;if(tk){if(rp(e))return ig(t,()=>{tB(t,tO)}),tk=!1,tO="",!0;tk=!1,tO=""}if(rh(e,"ArrowRight",{shiftKey:"any"}))rS(t,eV,e);else if(rh(e,"ArrowRight",rg))rS(t,eG,e);else if(rh(e,"ArrowLeft",{shiftKey:"any"}))rS(t,eH,e);else if(rh(e,"ArrowLeft",rg))rS(t,eq,e);else if(rh(e,"ArrowUp",{altKey:"any",shiftKey:"any"}))rS(t,eX,e);else if(rh(e,"ArrowDown",{altKey:"any",shiftKey:"any"}))rS(t,eQ,e);else if(rh(e,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0}))tN=!0,rS(t,eZ,e);else if(" "===e.key)rS(t,e0,e);else if(o&&rh(e,"o",{ctrlKey:!0}))e.preventDefault(),tN=!0,rS(t,eL,!0);else if(rh(e,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"}))tN=!1,rS(t,eZ,e);else if(rh(e,"Backspace",{shiftKey:"any"})||o&&rh(e,"h",{ctrlKey:!0}))rp(e)?rS(t,e1,e):(e.preventDefault(),rS(t,eI,!0));else if("Escape"===e.key)rS(t,e2,e);else if(rh(e,"Delete",{})||o&&rh(e,"d",{ctrlKey:!0}))"Delete"!==e.key?(e.preventDefault(),rS(t,eI,!1)):rS(t,e3,e);else if(rh(e,"Backspace",r_))e.preventDefault(),rS(t,eW,!0);else if(rh(e,"Delete",r_))e.preventDefault(),rS(t,eW,!1);else if(o&&rh(e,"Backspace",{metaKey:!0}))e.preventDefault(),rS(t,e$,!0);else if(o&&(rh(e,"Delete",{metaKey:!0})||rh(e,"k",{ctrlKey:!0})))e.preventDefault(),rS(t,e$,!1);else if(rh(e,"b",rg))e.preventDefault(),rS(t,eU,"bold");else if(rh(e,"u",rg))e.preventDefault(),rS(t,eU,"underline");else if(rh(e,"i",rg))e.preventDefault(),rS(t,eU,"italic");else if(rh(e,"Tab",{shiftKey:"any"}))rS(t,e4,e);else if(rh(e,"z",rg))e.preventDefault(),rS(t,ej,void 0);else if(o?rh(e,"z",{metaKey:!0,shiftKey:!0}):rh(e,"y",{ctrlKey:!0})||rh(e,"z",{ctrlKey:!0,shiftKey:!0}))e.preventDefault(),rS(t,eJ,void 0);else{let n=t._editorState._selection;null===n||nb(n)?rh(e,"a",rg)&&(e.preventDefault(),rS(t,tl,e)):rh(e,"c",rg)?(e.preventDefault(),rS(t,ti,e)):rh(e,"x",rg)?(e.preventDefault(),rS(t,tr,e)):rh(e,"a",rg)&&(e.preventDefault(),rS(t,tl,e))}return(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)&&t.dispatchCommand(tf,e),!0}function tW(e){let t=e.__lexicalEventHandles;return void 0===t&&(e.__lexicalEventHandles=t=[]),t}let t$=new Map;function tU(e){let t=rB(e.target);if(null===t)return;let n=iJ(t.anchorNode);if(null===n)return;tS&&(tS=!1,ig(n,()=>{let i=nJ(),r=t.anchorNode;(rz(r)||iH(r))&&rn(nU(i,t,n,e))}));let i=rl(n),r=i[i.length-1],l=r._key,o=t$.get(l),s=o||r;s!==n&&tw(t,s,!1),tw(t,n,!0),n!==r?t$.set(l,n):o&&t$.delete(l)}function tj(e){e._lexicalHandled=!0}function tJ(e){return!0===e._lexicalHandled}let tY=()=>{};
2function tV(e,t,n){n7();let i=e.__key,r=e.getParent();if(null===r)return;let l=function(e){let t=nj();if(!nb(t)||!im(e))return t;let{anchor:n,focus:i}=t,r=n.getNode(),l=i.getNode();return rb(r,e)&&n.set(e.__key,0,"element"),rb(l,e)&&i.set(e.__key,0,"element"),t}(e),o=!1;if(nb(l)&&t){let t=l.anchor,n=l.focus;t.key===i&&(nG(t,e,r,e.getPreviousSibling(),e.getNextSibling()),o=!0),n.key===i&&(nG(n,e,r,e.getPreviousSibling(),e.getNextSibling()),o=!0)}else nA(l)&&t&&e.isSelected()&&e.selectPrevious();if(nb(l)&&t&&!o){let t=e.getIndexWithinParent();i0(e),nY(l,r,t,-1)}else i0(e);n||rw(r)||r.canBeEmpty()||!r.isEmpty()||tV(r,t),t&&l&&iN(r)&&r.isEmpty()&&r.selectEnd()}let tG=Symbol.for("ephemeral");function tH(e){return e[tG]||!1}class tq{static getType(){let{ownNodeType:e}=r0(this);return void 0===e&&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=this.__state.getWritable(this).resetOnCopyNode())}getType(){return this.__type}isInline(){n(137,this.constructor.name)}isAttached(){let e=this.__key;for(;null!==e;){if("root"===e)return!0;let t=i4(e);if(null===t)break;e=t.__parent}return!1}isSelected(e){let t=e||nj();if(null==t)return!1;let n=t.getNodes().some(e=>e.__key===this.__key);if(nm(this))return n;if(nb(t)&&"element"===t.anchor.type&&"element"===t.focus.type){if(t.isCollapsed())return!1;let e=this.getParent();if(iv(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(null===e)return -1;let t=e.getFirstChild(),n=0;for(;null!==t;){if(this.is(t))return n;n++,t=t.getNextSibling()}return -1}getParent(){let e=this.getLatest().__parent;return null===e?null:i4(e)}getParentOrThrow(){let e=this.getParent();return null===e&&n(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){let t=e.getParent();if(rw(t))return im(e)||e===this&&iv(e)||n(194),e;e=t}return null}getTopLevelElementOrThrow(){let e=this.getTopLevelElement();return null===e&&n(67,this.__key),e}getParents(){let e=[],t=this.getParent();for(;null!==t;)e.push(t),t=t.getParent();return e}getParentKeys(){let e=[],t=this.getParent();for(;null!==t;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){let e=this.getLatest().__prev;return null===e?null:i4(e)}getPreviousSiblings(){let e=[],t=this.getParent();if(null===t)return e;let n=t.getFirstChild();for(;null!==n&&!n.is(this);)e.push(n),n=n.getNextSibling();return e}getNextSibling(){let e=this.getLatest().__next;return null===e?null:i4(e)}getNextSiblings(){let e=[],t=this.getNextSibling();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){let t=im(this)?this:this.getParent(),n=im(e)?e:e.getParent(),i=t&&n?lv(t,n):null;return i?i.commonAncestor:null}is(e){return null!=e&&this.__key===e.__key}isBefore(e){let t=lv(this,e);return null!==t&&("descendant"===t.type||("branch"===t.type?-1===lC(t):("same"!==t.type&&"ancestor"!==t.type&&n(279),!1)))}isParentOf(e){let t=lv(this,e);return null!==t&&"ancestor"===t.type}getNodesBetween(e){let t=this.isBefore(e),i=[],r=new Set,l=this;for(;null!==l;){let o=l.__key;if(r.has(o)||(r.add(o),i.push(l)),l===e)break;let s=im(l)?t?l.getFirstChild():l.getLastChild():null;if(null!==s){l=s;continue}let a=t?l.getNextSibling():l.getPreviousSibling();if(null!==a){l=a;continue}let u=l.getParentOrThrow();if(r.has(u.__key)||i.push(u),u===e)break;let d=null,c=u;do{if(null===c&&n(68),d=t?c.getNextSibling():c.getPreviousSibling(),null===(c=c.getParent()))break;null!==d||r.has(c.__key)||i.push(c)}while(null===d)l=d}return t||i.reverse(),i}isDirty(){let e=ie()._dirtyLeaves;return null!==e&&e.has(this.__key)}getLatest(){if(tH(this))return this;let e=i4(this.__key);return null===e&&n(113),e}getWritable(){if(tH(this))return this;n7();let e=n8(),t=ie(),n=e._nodeMap,i=this.__key,r=this.getLatest(),l=t._cloneNotNeeded,o=nj();if(null!==o&&o.setCachedNodes(null),l.has(i))return i1(r),r;let s=rX(r);return l.add(i),i1(s),n.set(i,s),s}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){n(70)}updateDOM(e,t,i){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(),i=t.$,r=i;for(let e of z(n).flatKeys)e in t&&(void 0!==r&&r!==i||(r={...i}),r[e]=t[e]);return(n.__state||r)&&B(e).updateFromJSON(r),n}(this,e)}static transform(){return null}remove(e){tV(this,!0,e)}replace(e,t){n7();let i=nj();null!==i&&(i=i.clone()),rF(this,e);let r=this.getLatest(),l=this.__key,o=e.__key,s=e.getWritable(),a=this.getParentOrThrow().getWritable(),u=a.__size;i0(s);let d=r.getPreviousSibling(),c=r.getNextSibling(),f=r.__prev,h=r.__next,g=r.__parent;if((tV(r,!1,!0),null===d)?a.__first=o:d.getWritable().__next=o,(s.__prev=f,null===c)?a.__last=o:c.getWritable().__prev=o,s.__next=h,s.__parent=g,a.__size=u,t&&(im(this)&&im(s)||n(139),this.getChildren().forEac
2h(e=>{s.append(e)})),nb(i)){rn(i);let e=i.anchor,t=i.focus;e.key===l&&nO(e,s),t.key===l&&nO(t,s)}return i3()===l&&i2(o),s}insertAfter(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];n7(),rF(this,e);let n=this.getWritable(),i=e.getWritable(),r=i.getParent(),l=nj(),o=!1,s=!1;if(null!==r){let t=e.getIndexWithinParent();if(i0(i),nb(l)){let e=r.__key,n=l.anchor,i=l.focus;o="element"===n.type&&n.key===e&&n.offset===t+1,s="element"===i.type&&i.key===e&&i.offset===t+1}}let a=this.getNextSibling(),u=this.getParentOrThrow().getWritable(),d=i.__key,c=n.__next;if(null===a?u.__last=d:a.getWritable().__prev=d,u.__size++,n.__next=d,i.__next=c,i.__prev=n.__key,i.__parent=n.__parent,t&&nb(l)){let e=this.getIndexWithinParent();nY(l,u,e+1);let t=u.__key;o&&l.anchor.set(t,e+2,"element"),s&&l.focus.set(t,e+2,"element")}return e}insertBefore(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];n7(),rF(this,e);let n=this.getWritable(),i=e.getWritable(),r=i.__key;i0(i);let l=this.getPreviousSibling(),o=this.getParentOrThrow().getWritable(),s=n.__prev,a=this.getIndexWithinParent();null===l?o.__first=r:l.getWritable().__next=r,o.__size++,n.__prev=r,i.__prev=s,i.__next=n.__key,i.__parent=n.__parent;let u=nj();return t&&nb(u)&&nY(u,this.getParentOrThrow(),a),e}isParentRequired(){return!1}createParentElementNode(){return iA()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){n7();let n=this.getPreviousSibling(),i=this.getParentOrThrow();if(null===n)return i.select(0,0);if(im(n))return n.select();if(!nm(n)){let e=n.getIndexWithinParent()+1;return i.select(e,e)}return n.select(e,t)}selectNext(e,t){n7();let n=this.getNextSibling(),i=this.getParentOrThrow();if(null===n)return i.select();if(im(n))return n.select(0,0);if(!nm(n)){let e=n.getIndexWithinParent();return i.select(e,e)}return n.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}constructor(e){(0,t._)(this,"__type",void 0),(0,t._)(this,"__key",void 0),(0,t._)(this,"__parent",void 0),(0,t._)(this,"__prev",void 0),(0,t._)(this,"__next",void 0),(0,t._)(this,"__state",void 0),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}),iZ(this,e)}}(0,t._)(tq,"importDOM",void 0);let tX="history-merge",tQ="collaboration",tZ="skip-scroll-into-view",t0="skip-dom-selection",t1="skip-selection-focus",t2="composition-start",t3="composition-end",t4=/\s*!important\s*$/i;function t6(e){let t={};if(!e)return t;let n="",i="",r=null,l=!1,o=!1,s=!1,a=0;for(let u=0;u<e.length;u++){let d=e[u];if(l)"*"===d&&"/"===e[u+1]&&(l=!1,u++);else if(o)s?i+=d:n+=d,o=!1;else if(null===r)if("/"!==d||"*"!==e[u+1])if('"'!==d&&"'"!==d)if("("!==d)if(")"!==d)if(s||":"!==d||0!==a){if(";"===d&&0===a){let e=n.trim(),r=i.trim();""!==e&&""!==r&&(t[e]=r),n="",i="",s=!1;continue}s?i+=d:n+=d}else s=!0;else a=Math.max(0,a-1),s?i+=d:n+=d;else a++,s?i+=d:n+=d;else r=d,s?i+=d:n+=d;else l=!0,u++;else s?i+=d:n+=d,"\\"===d?o=!0:d===r&&(r=null)}let u=n.trim(),d=i.trim();return""!==u&&""!==d&&(t[u]=d),t}function t5(e,t,n){let i=t4.test(n)?"important":"",r=""===i?n:n.replace(t4,"").trim();e.setProperty(t,r,i)}function t7(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(t===n)return;let i=t6(n),r=t6(t);for(let t in r)delete i[t],t5(e,t,r[t]);for(let t in i)e.removeProperty(t)}class t9 extends tq{static getType(){return"linebreak"}static clone(e){return new t9(e.__key)}getTextContent(){return"\n"}createDOM(){return document.createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:e=>(function(e){let t=e.parentElement;if(null!==t&&rj(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&nn(n)){let n=t.lastChild;if(n===e||n.previousSibling===e&&nn(n))return!0}}return!1})(e)||function(e){let t=e.parentElement;if(null!==t&&rj(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&nn(n))return!1;let i=t.lastChild;if(i===e||i.previousSibling===e&&nn(i))return!0}return!1}(e)?null:{conversion:t8,priority:0}}}static importJSON(e){return ne().updateFromJSON(e)}constructor(e){super(e)}}function t8(e){return{node:ne()}}function ne(){return rP(new t9)}function nt(e){return e instanceof t9}function nn(e){return iH(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}function ni(e,t){return 16&t?"code":128&t?"mark":32&t?"sub":64&t?"sup":null}function nr(e,t){return 1&t?"strong":2&t?"em":"span"}function nl(e,t,n,i,r){let l=i.classList,o=ry(r,"base");void 0!==o&&l.add(...o);let s=!1,a=8&t&&4&t;for(let e in void 0!==(o=ry(r,"underlineStrikethrough"))&&(8&n&&4&n?(s=!0,a||l.add(...o)):a&&l.remove(...o)),v){let i=v[e];
2if(void 0!==(o=ry(r,e)))if(n&i){if(s&&("underline"===e||"strikethrough"===e)){t&i&&l.remove(...o);continue}(0==(t&i)||a&&"underline"===e||"strikethrough"===e)&&l.add(...o)}else t&i&&l.remove(...o)}}function no(e,t,n){let i=t.firstChild,r=n.isComposing(),l=e+(r?_:"");if(null==i)t.textContent=l;else{let e=i.nodeValue;if(e!==l)if(r||s){let[t,n,r]=function(e,t){let n=e.length,i=t.length,r=0,l=0;for(;r<n&&r<i&&e[r]===t[r];)r++;for(;l+r<n&&l+r<i&&e[n-l-1]===t[i-l-1];)l++;return[r,n-r-l,t.slice(r,i-l)]}(e,l);0!==n&&i.deleteData(t,n),i.insertData(t,r)}else i.nodeValue=l}}function ns(e,t,n,i,r,l){no(r,e,t);let o=l.theme.text;void 0!==o&&nl(0,0,i,e,o)}function na(e,t){let n=document.createElement(t);return n.appendChild(e),n}class nu extends tq{static getType(){return"text"}static clone(e){return new nu(e.__text,e.__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}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){return O[this.getLatest().__mode]}getStyle(){return this.getLatest().__style}isToken(){return 1===this.getLatest().__mode}isComposing(){return this.__key===i3()}isSegmented(){return 2===this.getLatest().__mode}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){let t=v[e];return 0!=(this.getFormat()&t)}isSimpleText(){return"text"===this.__type&&0===this.__mode}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return iQ(this.getLatest().__format,e,t)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,t){let n=this.__format,i=ni(0,n),r=nr(0,n),l=null===i?r:i,o=document.createElement(l),s=o;this.hasFormat("code")&&o.setAttribute("spellcheck","false"),null!==i&&(s=document.createElement(r),o.appendChild(s)),ns(s,this,0,n,this.__text,e);let a=this.__style;return""!==a&&t7(o.style,a),o}updateDOM(e,t,i){let r=this.__text,l=e.__format,o=this.__format,s=ni(0,l),a=ni(0,o),u=nr(0,l),d=nr(0,o);if((null===s?u:s)!==(null===a?d:a))return!0;if(s===a&&u!==d){let e=t.firstChild;null==e&&n(48);let l=document.createElement(d);return ns(l,this,0,o,r,i),t.replaceChild(l,e),!1}let c=t;null!==a&&null!==s&&null==(c=t.firstChild)&&n(49),no(r,c,this);let f=i.theme.text;void 0!==f&&l!==o&&nl(0,l,o,c,f);let h=e.__style,g=this.__style;return h!==g&&t7(t.style,g,h),!1}static importDOM(){return{"#text":()=>({conversion:nh,priority:0}),b:()=>({conversion:nc,priority:0}),code:()=>({conversion:np,priority:0}),em:()=>({conversion:np,priority:0}),i:()=>({conversion:np,priority:0}),mark:()=>({conversion:np,priority:0}),s:()=>({conversion:np,priority:0}),span:()=>({conversion:nd,priority:0}),strong:()=>({conversion:np,priority:0}),sub:()=>({conversion:np,priority:0}),sup:()=>({conversion:np,priority:0}),u:()=>({conversion:np,priority:0})}}static importJSON(e){return ny().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTextContent(e.text).setFormat(e.format).setDetail(e.detail).setMode(e.mode).setStyle(e.style)}
2exportDOM(e){let{element:t}=super.exportDOM(e);return rz(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=na(t,"b")),this.hasFormat("italic")&&(t=na(t,"i")),this.hasFormat("strikethrough")&&(t=na(t,"s")),this.hasFormat("underline")&&(t=na(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="string"==typeof e?v[e]:e,t}setDetail(e){let t=this.getWritable();return t.__detail="string"==typeof e?S[e]:e,t}setStyle(e){let t=this.getWritable();return t.__style=e,t}toggleFormat(e){let t=iQ(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=k[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){n7();let n=e,i=t,r=nj(),l=this.getTextContent(),o=this.__key;if("string"==typeof l){let e=l.length;void 0===n&&(n=e),void 0===i&&(i=e)}else n=0,i=0;if(!nb(r))return nz(o,n,o,i,"text","text");{let e=i3();e!==r.anchor.key&&e!==r.focus.key||i2(o),r.setTextNodeRange(this,n,this,i)}return r}selectStart(){return this.select(0,0)}selectEnd(){let e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,n,i){let r=this.getWritable(),l=r.__text,o=n.length,s=e;s<0&&(s=o+s)<0&&(s=0);let a=nj();if(i&&nb(a)){let t=e+o;a.setTextNodeRange(r,t,r,t)}return r.__text=l.slice(0,s)+n+l.slice(s+t),r}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(){let e;for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];n7();let r=this.getLatest(),l=r.getTextContent();if(""===l)return[];let o=r.__key,s=i3(),a=l.length;n.sort((e,t)=>e-t),n.push(a);let u=[],d=n.length;for(let e=0,t=0;e<a&&t<=d;t++){let i=n[t];i>e&&(u.push(l.slice(e,i)),e=i)}let c=u.length;if(1===c)return[r];let f=u[0],h=r.getParent(),g=r.getFormat(),_=r.getStyle(),p=r.__detail,y=!1,m=null,C=null,x=nj();if(nb(x)){let[e,t]=x.isBackward()?[x.focus,x.anchor]:[x.anchor,x.focus];"text"===e.type&&e.key===o&&(m=e),"text"===t.type&&t.key===o&&(C=t)}r.isSegmented()?((e=ny(f)).__format=g,e.__style=_,e.__detail=p,e.__state=J(r,e),y=!0):e=r.setTextContent(f);let v=[e];for(let e=1;e<c;e++){let t=ny(u[e]);t.__format=g,t.__style=_,t.__detail=p,t.__state=J(r,t);let n=t.__key;s===o&&i2(n),v.push(t)}let S=m?m.offset:null,N=C?C.offset:null,T=0;for(let e of v){if(!m&&!C)break;let t=T+e.getTextContentSize();if(null!==m&&null!==S&&S<=t&&S>=T&&(m.set(e.getKey(),S-T,"text"),S<t&&(m=null)),null!==C&&null!==N&&N<=t&&N>=T){C.set(e.getKey(),N-T,"text");break}T=t}if(null!==h){let e,t;e=this.getPreviousSibling(),t=this.getNextSibling(),null!==e&&i1(e),null!==t&&i1(t);let n=h.getWritable(),i=this.getIndexWithinParent();y?(n.splice(i,0,v),this.remove()):n.splice(i,1,v),nb(x)&&nY(x,h,i,c-1)}return v}mergeWithSibling(e){let t=e===this.getPreviousSibling();t||e===this.getNextSibling()||n(50);let i=this.__key,r=e.__key,l=this.__text,o=l.length;i3()===r&&i2(i);let s=nj();if(nb(s)){let n=s.anchor,l=s.focus;null!==n&&n.key===r&&nH(n,t,i,e,o),null!==l&&l.key===r&&nH(l,t,i,e,o)}let a=e.__text,u=t?a+l:l+a;this.setTextContent(u);let d=this.getWritable();return e.remove(),d}isTextEntity(){return!1}constructor(e="",n){super(n),(0,t._)(this,"__text",void 0),(0,t._)(this,"__format",void 0),(0,t._)(this,"__style",void 0),(0,t._)(this,"__mode",void 0),(0,t._)(this,"__detail",void 0),this.__text=e,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}}function nd(e){return{forChild:nC(e.style),node:null}}function nc(e){let t="normal"===e.style.fontWeight;return{forChild:nC(e.style,t?void 0:"bold"),node:null}}let nf=new WeakMap;function nh(e){null===e.parentElement&&n(129);let t=e.textContent||"";if(null!==function(e){let t,n=e.parentNode,i=[e];for(;null!==n&&void 0===(t=nf.get(n))&&!function(e){if(!rz(e))return!1;
2if("PRE"===e.nodeName)return!0;let t=e.style.whiteSpace;return"string"==typeof t&&t.startsWith("pre")}(n);)i.push(n),n=n.parentNode;let r=void 0===t?n:t;for(let e=0;e<i.length;e++)nf.set(i[e],r);return r}(e)){let e=t.split(/(\r?\n|\t)/),n=[],i=e.length;for(let t=0;t<i;t++){let i=e[t];"\n"===i||"\r\n"===i?n.push(ne()):"	"===i?n.push(nv()):""!==i&&n.push(ny(i))}return{node:n}}if(""===(t=t.replace(/\r/g,"").replace(/[ \t\n]+/g," ")))return{node:null};if(" "===t[0]){let n=e,i=!0;for(;null!==n&&null!==(n=ng(n,!1));){let e=n.textContent||"";if(e.length>0){/[ \t\n]$/.test(e)&&(t=t.slice(1)),i=!1;break}}i&&(t=t.slice(1))}if(" "===t[t.length-1]){let n=e,i=!0;for(;null!==n&&null!==(n=ng(n,!0));)if((n.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(t=t.slice(0,t.length-1))}return""===t?{node:null}:{node:ny(t)}}function ng(e,t){let n=e;for(;;){let e;for(;null===(e=t?n.nextSibling:n.previousSibling);){let e=n.parentElement;if(null===e)return null;n=e}if(rz(n=e)){let e=n.style.display;if(""===e&&!rU(n)||""!==e&&!e.startsWith("inline"))return null}let i=n;for(;null!==(i=t?n.firstChild:n.lastChild);)n=i;if(iH(n))return n;if("BR"===n.nodeName)return null}}let n_={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function np(e){let t=n_[e.nodeName.toLowerCase()];return void 0===t?{node:null}:{forChild:nC(e.style,t),node:null}}function ny(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return rP(new nu(e))}function nm(e){return e instanceof nu}function nC(e,t){let n=e.fontWeight,i=e.textDecoration.split(" "),r="700"===n||"bold"===n,l=i.includes("line-through"),o="italic"===e.fontStyle,s=i.includes("underline"),a=e.verticalAlign;return e=>(nm(e)&&(r&&!e.hasFormat("bold")&&e.toggleFormat("bold"),l&&!e.hasFormat("strikethrough")&&e.toggleFormat("strikethrough"),o&&!e.hasFormat("italic")&&e.toggleFormat("italic"),s&&!e.hasFormat("underline")&&e.toggleFormat("underline"),"sub"!==a||e.hasFormat("subscript")||e.toggleFormat("subscript"),"super"!==a||e.hasFormat("superscript")||e.toggleFormat("superscript"),t&&!e.hasFormat(t)&&e.toggleFormat(t)),e)}class nx extends nu{static getType(){return"tab"}static clone(e){return new nx(e.__key)}static importDOM(){return null}createDOM(e){let t=super.createDOM(e),n=ry(e.theme,"tab");return void 0!==n&&t.classList.add(...n),t}static importJSON(e){return nv().updateFromJSON(e)}setTextContent(e){return"	"!==e&&""!==e&&i(126),super.setTextContent("	")}spliceText(e,t,i,r){return""===i&&0===t||"	"===i&&1===t||n(286),this}setDetail(e){return 2!==e&&n(127),this}setMode(e){return"normal"!==e&&n(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}constructor(e){super("	",e),this.__detail=2}}function nv(){return rP(new nx)}function nS(e){return e instanceof nx}class nN{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:0>lm(lw(lS(this,"next")),lw(lS(e,"next")))}getNode(){let e=i4(this.key);return null===e&&n(20),e}set(e,t,n,i){let r=this._selection,l=this.key;i&&this.key===e&&this.offset===t&&this.type===n||(this.key=e,this.offset=t,this.type=n,n5()||(i3()===l&&i2(e),null!==r&&(r.setCachedNodes(null),r.dirty=!0)))}constructor(e,n,i){(0,t._)(this,"key",void 0),(0,t._)(this,"offset",void 0),(0,t._)(this,"type",void 0),(0,t._)(this,"_selection",void 0),this._selection=null,this.key=e,this.offset=n,this.type=i}}function nT(e,t,n){return new nN(e,t,n)}function nk(e,t){let n=t.__key,i=e.offset,r="element";if(nm(t)){r="text";let e=t.getTextContentSize();i>e&&(i=e)}else if(!im(t)){let e=t.getNextSibling();if(nm(e))n=e.__key,i=0,r="text";else{let e=t.getParent();e&&(n=e.__key,i=t.getIndexWithinParent()+1)}}e.set(n,i,r)}function nO(e,t){if(im(t)){let n=t.getLastDescendant();im(n)||nm(n)?nk(e,n):nk(e,t)}else nk(e,t)}class nE{getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!nA(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 nE(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){let t,n=this.getNodes(),i=n.length,r=n[i-1];if(nm(r))t=r.select();else{let e=r.getIndexWithinParent()+1;t=r.getParentOrThrow().select(e,e)}
2t.insertNodes(e);for(let e=0;e<i;e++)n[e].remove()}getNodes(){let e=this._cachedNodes;if(null!==e)return e;let t=this._nodes,n=[];for(let e of t){let t=i4(e);null!==t&&n.push(t)}return n5()||(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((nj()||nJ())===this&&e[0]){let t=lo(e[0],"next");lT(lp(t,t))}for(let t of e)t.remove()}constructor(e){(0,t._)(this,"_nodes",void 0),(0,t._)(this,"_cachedNodes",void 0),(0,t._)(this,"dirty",void 0),this._cachedNodes=null,this._nodes=e,this.dirty=!1}}function nb(e){return e instanceof nM}class nM{getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!nb(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(null!==e)return e;let t=function(e){let t=[],[n,i]=e.getTextSlices();n&&t.push(n.caret.origin);let r=new Set,l=new Set;for(let n of e)if(ln(n)){let{origin:e}=n;0===t.length?r.add(e):(l.add(e),t.push(e))}else{let{origin:e}=n;im(e)&&l.has(e)||t.push(e)}if(i&&t.push(i.caret.origin),lt(e.focus)&&im(e.focus.origin)&&null===e.focus.getNodeAtCaret())for(let n=lu(e.focus.origin,"previous");ln(n)&&r.has(n.origin)&&!n.origin.isEmpty()&&n.origin.is(t[t.length-1]);n=lc(n))r.delete(n.origin),t.pop();for(;t.length>1;){let e=t[t.length-1];if(!im(e)||l.has(e)||e.isEmpty()||r.has(e))break;t.pop()}if(0===t.length&&e.isCollapsed()){let n=lw(e.anchor),i=lw(e.anchor.getFlipped()),r=e=>le(e)?e.origin:e.getNodeAtCaret(),l=r(n)||r(i)||(e.anchor.getNodeAtCaret()?n.origin:i.origin);t.push(l)}return t}(lF(lO(this),"next"));return n5()||(this._cachedNodes=t),t}setTextNodeRange(e,t,n,i){this.anchor.set(e.__key,t,"text"),this.focus.set(n.__key,i,"text")}getTextContent(){let e=this.getNodes();if(0===e.length)return"";let t=e[0],n=e[e.length-1],i=this.anchor,r=this.focus,l=i.isBefore(r),[o,s]=nD(this),a="",u=!0;for(let d=0;d<e.length;d++){let c=e[d];if(im(c)&&!c.isInline())u||(a+="\n"),u=!c.isEmpty();else if(u=!1,nm(c)){let e=c.getTextContent();c===t?c===n?"element"===i.type&&"element"===r.type&&r.offset!==i.offset||(e=o<s?e.slice(o,s):e.slice(s,o)):e=l?e.slice(o):e.slice(s):c===n&&(e=l?e.slice(0,s):e.slice(0,o)),a+=e}else!iv(c)&&!nt(c)||c===n&&this.isCollapsed()||(a+=c.getTextContent())}return a}applyDOMRange(e){let t=ie(),n=t.getEditorState()._selection,i=nB(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n);if(null===i)return;let[r,l]=i;this.anchor.set(r.key,r.offset,r.type,!0),this.focus.set(l.key,l.offset,l.type,!0),H(this)}clone(){let e=this.anchor,t=this.focus;return new nM(nT(e.key,e.offset,e.type),nT(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=iQ(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=v[e];return 0!=(this.format&t)}insertRawText(e){let t=e.split(/(\r?\n|\t)/),n=[],i=t.length;for(let e=0;e<i;e++){let i=t[e];"\n"===i||"\r\n"===i?n.push(ne()):"	"===i?n.push(nv()):n.push(ny(i))}this.insertNodes(n)}insertText(e){let t=this.anchor,i=this.focus,r=this.format,l=this.style,o=t,s=i;!this.isCollapsed()&&i.isBefore(t)&&(o=i,s=t),"element"===o.type&&function(e,t,n,i){let r=e.getNode(),l=r.getChildAtIndex(e.offset),o=ny();if(o.setFormat(n),o.setStyle(i),iw(l))l.splice(0,0,[o]);else{let e=iN(r)?iA().append(o):o;null===l?r.append(e):l.insertBefore(e)}e.is(t)&&t.set(o.__key,0,"text"),e.set(o.__key,0,"text")}(o,s,r,l),"element"===s.type&&lN(s,lw(lS(s,"next")));let a=o.offset,u=s.offset,d=this.getNodes(),c=d.length,f=d[0];nm(f)||n(26);let h=f.getTextContent().length,g=f.getParentOrThrow(),_=d[c-1];if(1===c&&"element"===s.type&&(u=h,s.set(o.key,u,"text")),this.isCollapsed()&&a===h&&(iG(f)||!f.canInsertTextAfter()||!g.canInsertTextAfter()&&null===f.getNextSibling())){let t=f.getNextSibling();if(nm(t)&&t.canInsertTextBefore()&&!iG(t)||((t=ny()).setFormat(r),t.setStyle(l),g.canInsertTextAfter()?f.insertAfter(t):g.
2insertAfter(t)),t.select(0,0),f=t,""!==e)return void this.insertText(e)}else if(this.isCollapsed()&&0===a&&(iG(f)||!f.canInsertTextBefore()||!g.canInsertTextBefore()&&null===f.getPreviousSibling())){let t=f.getPreviousSibling();if(nm(t)&&!iG(t)||((t=ny()).setFormat(r),g.canInsertTextBefore()?f.insertBefore(t):g.insertBefore(t)),t.select(),f=t,""!==e)return void this.insertText(e)}else if(f.isSegmented()&&a!==h){let e=ny(f.getTextContent());e.setFormat(r),f.replace(e),f=e}else if(!this.isCollapsed()&&""!==e){let t=_.getParent();if(!g.canInsertTextBefore()||!g.canInsertTextAfter()||im(t)&&(!t.canInsertTextBefore()||!t.canInsertTextAfter()))return this.insertText(""),nK(this.anchor,this.focus),void this.insertText(e)}if(1===c){if(iV(f)){let t=ny(e);return t.select(),void f.replace(t)}let t=f.getFormat(),n=f.getStyle();if(a!==u||t===r&&n===l){if(nS(f)){let t=ny(e);return t.setFormat(r),t.setStyle(l),t.select(),void f.replace(t)}}else{if(""!==f.getTextContent()){let t=ny(e);if(t.setFormat(r),t.setStyle(l),t.select(),0===a)f.insertBefore(t,!1);else{let[e]=f.splitText(a);e.insertAfter(t,!1)}return void(t.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length))}f.setFormat(r),f.setStyle(l)}let i=u-a;""===(f=f.spliceText(a,i,e,!0)).getTextContent()?f.remove():"text"===this.anchor.type&&(this.format=t,this.style=n,f.isComposing()&&(this.anchor.offset-=e.length))}else{let t=new Set([...f.getParentKeys(),..._.getParentKeys()]),n=im(f)?f:f.getParentOrThrow(),i=im(_)?_:_.getParentOrThrow(),r=_;if(!n.is(i)&&i.isInline())do r=i,i=i.getParentOrThrow();while(i.isInline())if("text"===s.type&&(0!==u||""===_.getTextContent())||"element"===s.type&&_.getIndexWithinParent()<u)if(nm(_)&&!iV(_)&&u!==_.getTextContentSize()){if(_.isSegmented()){let e=ny(_.getTextContent());_.replace(e),_=e}iN(s.getNode())||"text"!==s.type||(_=_.spliceText(0,u,"")),t.add(_.__key)}else{let e=_.getParentOrThrow();e.canBeEmpty()||1!==e.getChildrenSize()?_.remove():e.remove()}else t.add(_.__key);let l=i.getChildren(),o=new Set(d),g=n.is(i),p=n.isInline()&&null===f.getNextSibling()?n:f;for(let e=l.length-1;e>=0;e--){let t=l[e];if(t.is(f)||im(t)&&t.isParentOf(f))break;t.isAttached()&&(!o.has(t)||t.is(r)?g||p.insertAfter(t,!1):t.remove())}if(!g){let e=i,n=null;for(;null!==e;){let i=e.getChildren(),r=i.length;(0===r||i[r-1].is(n))&&(t.delete(e.__key),n=e),e=e.getParent()}}if(iV(f))if(a===h)f.select();else{let t=ny(e);t.select(),f.replace(t)}else""===(f=f.spliceText(a,h-a,e,!0)).getTextContent()?f.remove():"text"===this.anchor.type&&(this.format=f.getFormat(),this.style=f.getStyle(),f.isComposing()&&(this.anchor.offset-=e.length));for(let e=1;e<c;e++){let n=d[e],i=n.__key;t.has(i)||n.remove()}}}removeText(){let e=nj()===this;lk(this,lA(lO(this))),e&&nj()!==this&&rn(this)}formatText(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.isCollapsed())return this.toggleFormat(e),void i2(null);let n=this.getNodes(),i=[];for(let e of n)nm(e)&&i.push(e);let r=t=>{n.forEach(n=>{if(im(n)){let i=n.getFormatFlags(e,t);n.setTextFormat(i)}})},l=i.length;if(0===l)return this.toggleFormat(e),i2(null),void r(t);let o=this.anchor,s=this.focus,a=this.isBackward(),u=a?s:o,d=a?o:s,c=0,f=i[0],h="element"===u.type?0:u.offset;if("text"===u.type&&h===f.getTextContentSize()&&(c=1,f=i[1],h=0),null==f)return;let g=f.getFormatFlags(e,t);r(g);let _=l-1,p=i[_],y="text"===d.type?d.offset:p.getTextContentSize();if(f.is(p)){if(h===y)return;if(iG(f)||0===h&&y===f.getTextContentSize())f.setFormat(g);else{let e=f.splitText(h,y),t=0===h?e[0]:e[1];t.setFormat(g),"text"===u.type&&u.set(t.__key,0,"text"),"text"===d.type&&d.set(t.__key,y-h,"text")}return void(this.format=g)}0===h||iG(f)||([,f]=f.splitText(h),h=0),f.setFormat(g);let m=p.getFormatFlags(e,g);y>0&&(y===p.getTextContentSize()||iG(p)||([p]=p.splitText(y)),p.setFormat(m));for(let t=c+1;t<_;t++){let n=i[t],r=n.getFormatFlags(e,m);n.setFormat(r)}"text"===u.type&&u.set(f.__key,h,"text"),"text"===d.type&&d.set(p.__key,y,"text"),this.format=g|m}insertNodes(e){var t;if(0===e.length)return;if(this.isCollapsed()||this.removeText(),"root"===this.anchor.key){this.insertParagraph();let t=nj();
2return nb(t)||n(134),t.insertNodes(e)}let i=(this.isBackward()?this.focus:this.anchor).getNode(),r=r1(i,rJ),l=e[e.length-1];if(im(r)&&"__language"in r){if("__language"in e[0])this.insertText(e[0].getTextContent());else{let t=nQ(this);r.splice(t,0,e),l.selectEnd()}return}if(!e.some(e=>(im(e)||iv(e))&&!e.isInline())){im(r)||n(211,i.constructor.name,i.getType());let t=nQ(this);return r.splice(t,0,e),void l.selectEnd()}let o=function(e){let t=iA(),n=null;for(let i=0;i<e.length;i++){let r=e[i],l=nt(r);if(l||iv(r)&&r.isInline()||im(r)&&r.isInline()||nm(r)||r.isParentRequired()){if(null===n&&(n=r.createParentElementNode(),t.append(n),l))continue;null!==n&&n.append(r)}else t.append(r),n=null}return t}(e),s=o.getLastDescendant(),a=o.getChildren(),u=im(r)&&r.isEmpty()?null:this.insertParagraph(),d=a[a.length-1],c=a[0];im(t=c)&&rJ(t)&&!t.isEmpty()&&im(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(im(r)||n(211,i.constructor.name,i.getType()),r.append(...c.getChildren()),c=a[1]),c&&(null===r&&n(212,i.constructor.name,i.getType()),function(e,t){let i=t.getParentOrThrow().getLastChild(),r=t,l=[t];for(;r!==i;)r.getNextSibling()||n(140),l.push(r=r.getNextSibling());let o=e;for(let e of l)o=o.insertAfter(e)}(r,c));let f=r1(s,rJ);u&&im(f)&&(u.canMergeWhenEmpty()||rJ(d))&&(f.append(...u.getChildren()),u.remove()),im(r)&&r.isEmpty()&&r.remove(),s.selectEnd();let h=im(r)?r.getLastChild():null;nt(h)&&f!==r&&h.remove()}insertParagraph(){if("root"===this.anchor.key){let e=iA();return re().splice(this.anchor.offset,0,[e]),e.select(),e}let e=nQ(this),t=r1(this.anchor.getNode(),rJ);im(t)||n(213);let i=t.getChildAtIndex(e),r=i?[i,...i.getNextSiblings()]:[],l=t.insertNewAfter(this,!1);return l?(l.append(...r),l.selectStart(),l):null}insertLineBreak(e){let t=ne();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],i=e[t-1],[r,l]=nD(this),o=this.isBackward(),[s,a]=o?[this.focus,this.anchor]:[this.anchor,this.focus],[u,d]=o?[l,r]:[r,l];if(0===t)return[];if(1===t){if(nm(n)&&!this.isCollapsed()){let e=n.splitText(u,d),t=0===u?e[0]:e[1];return t?(s.set(t.getKey(),0,"text"),a.set(t.getKey(),t.getTextContentSize(),"text"),[t]):[]}return[n]}if(nm(n)&&(u===n.getTextContentSize()?e.shift():0!==u&&([,n]=n.splitText(u),e[0]=n,s.set(n.getKey(),0,"text"))),nm(i)){let t=i.getTextContent().length;0===d?e.pop():d!==t&&([i]=i.splitText(d),e[e.length-1]=i,a.set(i.getKey(),i.getTextContentSize(),"text"))}return e}modify(e,t,n){var i;if(nZ(this,e,t,n))return;let r="move"===e,l=ie(),o=rK(rA(l));if(!o)return;let s=l._blockCursorElement,a=l._rootElement,u=this.focus.getNode();if(null===a||null===s||!im(u)||u.isInline()||u.canBeEmpty()||rR(s,l,a),this.dirty){let e=rN(l,this.anchor.key),t=rN(l,this.focus.key);"text"===this.anchor.type&&(e=iX(e)),"text"===this.focus.type&&(t=iX(t)),e&&t&&nq(o,e,this.anchor.offset,t,this.focus.offset)}if(i=t?"backward":"forward",o.modify(e,i,n),o.rangeCount>0){let e=o.getRangeAt(0),n=this.anchor.getNode(),i=iN(n)?n:function(e){let t=e.getParentOrThrow();for(;null!==t&&!rw(t);)t=t.getParentOrThrow();return t}(n);if(this.applyDOMRange(e),this.dirty=!0,!r){let n,r,l,s,a,u=this.getNodes(),d=[],c=!1;for(let e=0;e<u.length;e++){let t=u[e];rb(t,i)?d.push(t):c=!0}if(c&&d.length>0)if(t){let e=d[0];im(e)?e.selectStart():e.getParentOrThrow().selectStart()}else{let e=d[d.length-1];im(e)?e.selectEnd():e.getParentOrThrow().selectEnd()}o.anchorNode===e.startContainer&&o.anchorOffset===e.startOffset||(n=this.focus,l=(r=this.anchor).key,s=r.offset,a=r.type,r.set(n.key,n.offset,n.type,!0),n.set(l,s,a,!0))}}"lineboundary"===n&&nZ(this,e,t,n,"decorators")}forwardDeletion(e,t,n){if(!n&&("element"===e.type&&im(t)&&e.offset===t.getChildrenSize()||"text"===e.type&&e.offset===t.getTextContentSize())){let e=t.getParent(),n=t.getNextSibling()||(null===e?null:e.getNextSibling());if(im(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 i=lg(lS(t,e?"previous":"next"));if(i.getTextSlices().every(e=>null===e||0===e.distance)){let e={type:"initial"};for(let t of i.iterNodeCarets("shadowRoot"))if(ln(t))if(t.origin.isInline());else{if(t.origin.isShadowRoot()){if("merge-block"===e.type)break;
2if(im(i.anchor.origin)&&i.anchor.origin.isEmpty()){let e=lw(t);lk(this,lp(e,e)),i.anchor.origin.remove()}return}"merge-next-block"!==e.type&&"merge-block"!==e.type||(e={block:e.block,caret:t,type:"merge-block"})}else{if("merge-block"===e.type)break;if(lt(t)){if(im(t.origin)){if(t.origin.isInline()){if(!t.origin.isParentOf(i.anchor.origin))break}else e={block:t.origin,type:"merge-next-block"};continue}if(iv(t.origin)){if(t.origin.isIsolated());else if("merge-next-block"===e.type&&(t.origin.isKeyboardSelectable()||!t.origin.isInline())&&im(i.anchor.origin)&&i.anchor.origin.isEmpty()){i.anchor.origin.remove();let e=n$();e.add(t.origin.getKey()),rn(e)}else t.origin.remove();return}break}}if("merge-block"===e.type){let{caret:t,block:n}=e;return lk(this,lp(!t.origin.isEmpty()&&n.isEmpty()?lE(lo(n,t.direction)):i.anchor,t)),this.removeText()}}let r=this.focus;if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&0===t.offset&&nP(this,t.getNode()))return}else{let i="text"===r.type?r.getNode():null;if(n="text"===t.type?t.getNode():null,null!==i&&i.isSegmented()){let t=r.offset,l=i.getTextContentSize();if(i.is(n)||e&&t!==l||!e&&0!==t)return void nI(i,e,t)}else if(null!==n&&n.isSegmented()){let r=t.offset,l=n.getTextContentSize();if(n.is(i)||e&&0!==r||!e&&r!==l)return void nI(n,e,r)}!function(e,t){let n=e.anchor,i=e.focus,r=n.getNode();if(r===i.getNode()&&"text"===n.type&&"text"===i.type){var l;let e=n.offset,o=i.offset,s=e<o,a=s?e:o,u=s?o:e,d=u-1;a===d||rr(l=r.getTextContent().slice(a,u))||nF(l)||(t?i.set(i.key,d,i.type):n.set(n.key,d,n.type))}}(this,e)}}if(this.removeText(),e&&!t&&this.isCollapsed()&&"element"===this.anchor.type&&0===this.anchor.offset){let e=this.anchor.getNode();e.isEmpty()&&iN(e.getParent())&&null===e.getPreviousSibling()&&nP(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]}constructor(e,n,i,r){(0,t._)(this,"format",void 0),(0,t._)(this,"style",void 0),(0,t._)(this,"anchor",void 0),(0,t._)(this,"focus",void 0),(0,t._)(this,"_cachedNodes",void 0),(0,t._)(this,"dirty",void 0),this.anchor=e,this.focus=n,e._selection=this,n._selection=this,this._cachedNodes=null,this.format=i,this.style=r,this.dirty=!1}}function nA(e){return e instanceof nE}function nw(e){let t=e.offset;if("text"===e.type)return t;let n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function nD(e){let t=e.getStartEndPoints();if(null===t)return[0,0];let[n,i]=t;return"element"===n.type&&"element"===i.type&&n.key===i.key&&n.offset===i.offset?[0,0]:[nw(n),nw(i)]}function nP(e,t){for(let n=t;n;n=n.getParent()){if(im(n)){if(n.collapseAtStart(e))return!0;if(rw(n))break}if(n.getPreviousSibling())break}return!1}let nF=(()=>{try{let e=RegExp("\\p{Emoji}","u"),t=e.test.bind(e);if(t("❤️")&&t("#️⃣")&&t("👍"))return t}catch(e){}return()=>!1})();function nI(e,t,n){let i=e.getTextContent().split(/(?=\s)/g),r=i.length,l=0,o=0;for(let e=0;e<r;e++){let s=e===r-1;if(o=l,l+=i[e].length,t&&l===n||l>n||s){i.splice(e,1),s&&(o=void 0);break}}let s=i.join("").trim();""===s?e.remove():(e.setTextContent(s),e.select(o,o))}function nL(e,t,i,r){let l,o=t;if(rz(e)){let s=!1,a=e.childNodes,u=a.length,d=r._blockCursorElement;o===u&&(s=!0,o=u-1);let c=a[o],f=!1;if(c===d)c=a[o+1],f=!0;else if(null!==d){let n=d.parentNode;e===n&&t>Array.prototype.indexOf.call(n.children,d)&&o--}if(nm(l=ri(c)))o=la(l,s?"next":"previous");else{let a=ri(e);if(null===a)return null;if(im(a)){let u,d=r.getElementByKey(a.getKey());null===d&&n(214);let c=rV(r).$getDOMSlot(a,d,r);[a,o]=c.resolveChildIndex(a,d,e,t),im(a)||n(215),s&&o>=a.getChildrenSize()&&(o=Math.max(0,a.getChildrenSize()-1));let h=a.getChildAtIndex(o);if(im(h)&&(u=h.getParent(),null===i||null===u||!u.canBeEmpty()||u!==i.getNode())){let e=s?h.getLastDescendant():h.getFirstDescendant();a=null===e||im(h=e)?h:h.getParentOrThrow(),o=0}nm(h)?(l=h,a=null,o=la(h,s?"next":"previous")):h!==a&&s&&!f&&(im(a)||n(216),o=Math.min(a.getChildrenSize(),o+1))}else{let n=a.getIndexWithinParent();o=0===t&&iv(a)&&ri(e)===a?n:n+1,a=a.getParentOrThrow()}if(im(a))return nT(a.__key,o,"element")}}else l=ri(e);return nm(l)?nT(l.__key,la(l,o,"clamp"),"text"):null}function nR(e,t,n){let i=e.offset,r=e.getNode();if(0===i){let i=r.getPreviousSibling(),l=r.getParent();if(t){if((n||!t)&&null===i&&im(l)&&l.isInline()){let t=l.getPreviousSibling();nm(t)&&e.set(t.__key,t.getTextContent().length,"text")}}else im(i)&&!n&&i.isInline()?e.set(i.__key,i.getChildrenSize(),"element"):nm(i)&&e.set(i.__key,i.getTextContent().length,"text")}else if(i===r.getTextContent().length){let i=r.getNextSibling(),l=r.getParent();if(t&&im(i)&&i.isInline())e.set(i.__key,0,"element");else if((n||t)&&null===i&&im(l)&&l.isInline()&&!l.canInsertTextAfter()){let t=l.getNextSibling();nm(t)&&e.set(t.__key,0,"text")}}}function nK(e,t,n){if("text"===e.type&&"text"===t.type){let n=e.isBefore(t),i=e.is(t);nR(e,n,i),nR(t,!n,i),i&&t.set(e.key,e.offset,e.type)}}function nB(e,t,n,i,r,l){if(null===e||null===n||!iU(r,e,n))return null;let o=nL(e,t,nb(l)?l.anchor:null,r);if(null===o)return null;let s=nL(n,i,nb(l)?l.focus:null,r);if(null===s)return null;if("element"===o.type&&"element"===s.type){let t=ri(e),i=ri(n);if(iv(t)&&iv(i))return null}return nK(o,s),[o,s]}function nz(e,t,n,i,r,l){let o=n8(),s=new nM(nT(e,t,r),nT(n,i,l),0,"");return s.dirty=!0,o._selection=s,s}function nW(){return new nM(nT("root",0,"element"),nT("root",0,"element"),0,"")}function n$(){return new nE(new Set)}function nU(e,t,n,i){let r,l,o,s,a=n._window;if(null===a)return null;let u=i||a.event,d=u?u.type:void 0,c="selectionchange"===d,f=!M&&(c||"beforeinput"===d||"compositionstart"===d||"compositionend"===d||"click"===d&&u&&3===u.detail||"drop"===d||void 0===d);if(nb(e)&&!f)return e.clone();if(null===t)return null;if(r=t.anchorNode,l=t.focusNode,o=t.anchorOffset,s=t.focusOffset,(c||void 0===d)&&nb(e)&&!iU(n,r,l))return e.clone();let h=nB(r,o,l,s,n,e);if(null===h)return null;let[g,_]=h,p=0,y="";if(nb(e)){let t=e.anchor;if(g.key===t.key)p=e.format,y=e.style;else{let e=g.getNode();nm(e)?(p=e.getFormat(),y=e.getStyle()):im(e)&&(p=e.getTextFormat(),y=e.getTextStyle())}}return new nM(g,_,p,y)}function nj(){return n8()._selection}function nJ(){return ie()._editorState._selection}function nY(e,t,n){let i=arguments.length>
23&&void 0!==arguments[3]?arguments[3]:1,r=e.anchor,l=e.focus,o=r.getNode(),s=l.getNode();if(!t.is(o)&&!t.is(s))return;let a=t.__key;if(e.isCollapsed()){let t=r.offset;if(n<=t&&i>0||n<t&&i<0){let n=Math.max(0,t+i);r.set(a,n,"element"),l.set(a,n,"element"),nV(e)}}else{let o=e.isBackward(),s=o?l:r,u=s.getNode(),d=o?r:l,c=d.getNode();if(t.is(u)){let e=s.offset;(n<=e&&i>0||n<e&&i<0)&&s.set(a,Math.max(0,e+i),"element")}if(t.is(c)){let e=d.offset;(n<=e&&i>0||n<e&&i<0)&&d.set(a,Math.max(0,e+i),"element")}}nV(e)}function nV(e){let t=e.anchor,n=t.offset,i=e.focus,r=i.offset,l=t.getNode(),o=i.getNode();if(e.isCollapsed()){if(!im(l))return;let e=l.getChildrenSize(),r=n>=e,o=r?l.getChildAtIndex(e-1):l.getChildAtIndex(n);if(nm(o)){let e=0;r&&(e=o.getTextContentSize()),t.set(o.__key,e,"text"),i.set(o.__key,e,"text")}return}if(im(l)){let e=l.getChildrenSize(),i=n>=e,r=i?l.getChildAtIndex(e-1):l.getChildAtIndex(n);if(nm(r)){let e=0;i&&(e=r.getTextContentSize()),t.set(r.__key,e,"text")}}if(im(o)){let e=o.getChildrenSize(),t=r>=e,n=t?o.getChildAtIndex(e-1):o.getChildAtIndex(r);if(nm(n)){let e=0;t&&(e=n.getTextContentSize()),i.set(n.__key,e,"text")}}}function nG(e,t,n,i,r){let l=null,o=0,s=null;null!==i?(l=i.__key,nm(i)?(o=i.getTextContentSize(),s="text"):im(i)&&(o=i.getChildrenSize(),s="element")):null!==r&&(l=r.__key,nm(r)?s="text":im(r)&&(s="element")),null!==l&&null!==s?e.set(l,o,s):(-1===(o=t.getIndexWithinParent())&&(o=n.getChildrenSize()),e.set(n.__key,o,"element"))}function nH(e,t,n,i,r){"text"===e.type?e.set(n,e.offset+(t?0:r),"text"):e.offset>i.getIndexWithinParent()&&e.set(e.key,e.offset-1,"element")}function nq(e,t,n,i,r){try{e.setBaseAndExtent(t,n,i,r)}catch(e){}}function nX(e,t,n){let i=rN(e,t.getKey());if(im(t)){let r=rV(e).$getDOMSlot(t,i,e);return[r.element,n+r.getFirstChildOffset()]}return[i,n]}function nQ(e){let t=e;e.isCollapsed()||t.removeText();let i=nj();nb(i)&&(t=i),nb(t)||n(161);let r=t.anchor,l=r.getNode(),o=r.offset;for(;!rJ(l);){let e=l;if([l,o]=function(e,t){let n=e.getParent();if(!n){let e=iA();return re().append(e),e.select(),[re(),0]}if(nm(e)){let i=e.splitText(t);if(0===i.length)return[n,e.getIndexWithinParent()];let r=+(0!==t);return[n,i[0].getIndexWithinParent()+r]}if(!im(e)||0===t)return[n,e.getIndexWithinParent()];let i=e.getChildAtIndex(t);if(i){let n=new nM(nT(e.__key,t,"element"),nT(e.__key,t,"element"),0,""),r=e.insertNewAfter(n);r&&r.append(i,...i.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}(l,o),e.is(l))break}return o}function nZ(e,t,n,i){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"decorators-and-blocks";if("move"===t&&"character"===i&&!e.isCollapsed()){let[t,i]=n===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return i.set(t.key,t.offset,t.type),!0}let l=lS(e.focus,n?"previous":"next"),o="lineboundary"===i,s="move"===t,a=l,u="decorators-and-blocks"===r;if(!lD(a)){for(let e of a){u=!1;let{origin:t}=e;if(!iv(t)||t.isIsolated()||(a=e,!o||!t.isInline()))break}if(u)for(let e of lg(l).iterNodeCarets("extend"===t?"shadowRoot":"root")){if(ln(e))e.origin.isInline()||(a=e);else{if(im(e.origin))continue;iv(e.origin)&&!e.origin.isInline()&&(a=e)}break}}if(a===l)return!1;if(s&&!o&&iv(a.origin)&&a.origin.isKeyboardSelectable()){let e=n$();return e.add(a.origin.getKey()),rn(e),!0}return a=lw(a),s&&lN(e.anchor,a),lN(e.focus,a),u||!o}let n0=null,n1=null,n2=!1,n3=!1,n4=0,n6={characterData:!0,childList:!0,subtree:!0};function n5(){return n2||null!==n0&&n0._readOnly}function n7(){n2&&n(13)}function n9(){n4>99&&n(14)}function n8(){return null===n0&&n(195,it()),n0}function ie(){return null===n1&&n(337,it()),n1}function it(){let e=0,t=new Set,n=iL.version;if("u">typeof window)for(let i of document.querySelectorAll("[contenteditable]")){let r=iY(i);if(ij(r))e++;else if(r){let e=String(r.constructor.version||"<0.17.1");e===n&&(e+=" (separately built, likely a bundler configuration issue)"),t.add(e)}}let i=" Detected on the page: ".concat(e," compatible editor(s) with version ").concat(n);return t.size&&(i+=" and incompatible editors with versions ".concat(Array.from(t).join(", "))),i}function ii(e,t,n){let i=t.__type,r=iB(e,i),l=n.get(i);void 0===l&&(l=Array.from(r.transforms),n.set(i,l));let o=l.length;for(let e=0;e<o&&(l[e](t),t.isAttached());e++);}function ir(e,t){return void 0!==e&&e.__key!==t&&e.isAttached()}function il(e,t){if(!t)return;let n=e._updateTags,i=t;for(let e of(Array.isArray(t)||(i=[t]),i))n.add(e)}function io(e,t){let i=e.type,r=t.get(i);void 0===r&&n(17,i);let l=r.klass;e.type!==l.getType()&&n(18,l.name);let o=l.importJSON(e),s=e.children;if(im(o)&&Array.isArray(s))for(let e=0;e<s.length;e++){let n=io(s[e],t);o.append(n)}return o}function is(e,t,n){let i=n0,r=n2,l=n1;n0=t,n2=!0,n1=e;try{return n()}finally{n0=i,n2=r,n1=l}}function ia(e,t){let i,r,l=e._pendingEditorState,o=e._rootElement,a=e._headless||null===o;if(null===l)return void(e._deferred.length>0&&id(e,e._deferred));let u=e._editorState,d=u._selection,c=l._selection,f=0!==e._dirtyType,h=n0,g=n2,_=n1,p=e._updating,y=e._observer,m=null;if(e._pendingEditorState=null,e._editorState=l,!a&&f&&null!==y){n1=e,n0=l,n2=!1,e._updating=!0;try{let t,i=e._dirtyType,r=e._dirtyElements,o=e._dirtyLeaves;y.disconnect(),ea="",ec=2===i,Q=e,X=e._config,es=e._config.dom||iP,Z=e._nodes,ee=Q._listeners.mutation,et=r,en=o,ei=u._nodeMap,er=l._nodeMap,ef=l._readOnly,el=new Map(e._keyToDOMMap),eo=t=new Map,function e(t,i){let r=ei.get(t),l=er.get(t);void 0!==r&&void 0!==l||n(61);let o=ec||en.has(t)||et.has(t),s=rN(Q,t);if(r===l&&!o){let e;if(im(r)){let t=s.__lexicalTextContent;"string"==typeof t?e=t:s.__lexicalTextContent=e=r.getTextContent()}else e=r.getTextContent();return ea+=e,s}if(r!==l&&o&&rm(eo,Z,ee,l,"updated"),es.$updateDOM(l,r,s,Q)){let e=eC(t,null);return null===i&&n(62),i.replaceChild(e,s),eh(t,null),e}if(im(r)){im(l)||n(334,t);let i=l.__indent;(ec||i!==r.__indent)&&ep(s,i);let a=l.__format;if((ec||a!==r.__format)&&ey(s,a),o)(function(t,i,r){eu=null,ed=null,function(t,i,r){let l=ea,o=t.__size,s=i.__size;ea="";let a=r.element;if(1===o&&1===s){let n=t.__first,r=i.__first;if(n===r)e(n,a);else{let e=eO(n),t=eC(r,null);try{a.replaceChild(t,e)}catch(i){if("object"==typeof i&&null!=i)throw Error("".concat(i.toString()," Parent: ").concat(a.tagName,", new child: {tag: ").concat(t.tagName," key: ").concat(r,"}, old child: {tag: ").concat(e.tagName,", key: ").concat(n,"}."));throw i}eh(n,null)}let l=er.get(r);nm(l)&&null===eu&&(eu=l.getFormat(),ed=l.getStyle())}else{let l=r2(t,ei),u=r2(i,er);
2if(l.length!==o&&n(227),u.length!==s&&n(228),0===o)0!==s&&ex(u,0,0,s-1,r);else if(0===s){if(0!==o){let e=null==r.after&&null==r.before&&null==r.element.__lexicalLineBreak;eg(l,0,o-1,e?null:a),e&&(a.textContent="")}}else!function(t,n,i,r,l){let o=i-1,s=r-1,a,u,d=l.getFirstChild(),c=0,f=0;for(;c<=o&&f<=s;){let i=t[c],r=n[f];if(i===r)d=eT(e(r,l.element)),c++,f++;else{if(void 0===u&&(u=ek(n,f)),void 0===a)a=ek(t,c);else if(!a.has(i)){c++;continue}if(!u.has(i)){d=eT(eO(i)),eh(i,l.element),c++,a.delete(i);continue}if(a.has(r)){let t=rN(Q,r);t!==d&&l.withBefore(d).insertChild(t),d=eT(e(r,l.element)),c++,f++}else eC(r,l.withBefore(d)),f++}let o=er.get(r);null!==o&&nm(o)?null===eu&&(eu=o.getFormat(),ed=o.getStyle()):im(o)&&f<=s&&!o.isInline()&&(ea+="\n\n")}let h=c>o,g=f>s;if(h&&!g){let e=n[s+1],t=void 0===e?null:Q.getElementByKey(e);ex(n,0,f,s,l.withBefore(t))}else g&&!h&&eg(t,c,o,l.element)}(l,u,o,s,r)}a.__lexicalTextContent=ea,ea=l+ea}(t,i,es.$getDOMSlot(i,r,Q)),null==eu||eu===i.__textFormat||ef||i.setTextFormat(eu),null==ed||ed===i.__textStyle||ef||i.setTextStyle(ed)})(r,l,s),iN(l)||l.isInline()||eS(r,l,s);else{let e,t=s.__lexicalTextContent;"string"==typeof t?e=t:s.__lexicalTextContent=e=r.getTextContent(),ea+=e}if((ec||l.__dir!==r.__dir)&&(em(s,l),iN(l)&&!ec))for(let e of l.getChildren())im(e)&&em(rN(Q,e.getKey()),e)}else{let e=l.getTextContent();if(iv(l)){let e=l.decorate(Q,X);null!==e&&eN(t,e)}ea+=e}if(!ef&&iN(l)&&l.__cachedText!==ea){let e=l.getWritable();e.__cachedText=ea,l=e}return es.$decorateDOM(l,r,s,Q),s}("root",null),Q=void 0,Z=void 0,et=void 0,en=void 0,ei=void 0,er=void 0,X=void 0,el=void 0,eo=void 0,es=iP,m=t}catch(t){if(t instanceof Error&&e._onError(t),n3)throw t;return iD(e,null,o,l),I(e),e._dirtyType=2,n3=!0,ia(e,u),void(n3=!1)}finally{y.observe(o,n6),e._updating=p,n0=h,n2=g,n1=_}}l._readOnly||(l._readOnly=!0);let C=e._dirtyLeaves,x=e._dirtyElements,v=e._normalizedNodes,S=e._updateTags,N=e._deferred;f&&(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,i=e._decorators,r=e._pendingDecorators||i,l=t._nodeMap;for(n in r)l.has(n)||(r===i&&(r=i9(e)),delete r[n])}(e,l);let T=a?null:rK(rA(e));if(e._editable&&null!==T&&(f||null===c||c.dirty||!c.is(d))&&null!==o&&!S.has(t0)){n1=e,n0=l;try{if(null!==y&&y.disconnect(),f||null===c||c.dirty){let t=e._blockCursorElement;null!==t&&rR(t,e,o),function(e,t,n,i,r,l){var o;let a=i.anchorNode,u=i.focusNode,d=i.anchorOffset,c=i.focusOffset,f=document.activeElement;if(r.has(tQ)&&f!==l||null!==f&&i$(f))return;if(!nb(t))return null!==e&&iU(n,a,u)&&i.removeAllRanges();let h=t.anchor,g=t.focus,_=h.getNode(),p=g.getNode(),[y,m]=nX(n,_,h.offset),[C,x]=nX(n,p,g.offset),v=t.format,S=t.style,N=t.isCollapsed(),T=y,k=C,O=!1;if("text"===h.type?(T=iX(y),O=_.getFormat()!==v||_.getStyle()!==S):nb(e)&&"text"===e.anchor.type&&(O=!0),"text"===g.type&&(k=iX(C)),null!==T&&null!==k&&(N&&(null===e||O||nb(e)&&(e.format!==v||e.style!==S))&&(o=h.key,tb=[v,S,m,o,performance.now()]),d!==m||c!==x||a!==T||u!==k||"Range"===i.type&&N||(null!==f&&l.contains(f)||r.has(t1)||l.focus({preventScroll:!0}),"element"===h.type))){if(nq(i,T,m,k,x),!s||!t.isCollapsed()||null===l||r.has(t1)||null!==document.activeElement&&l.contains(document.activeElement)||l.focus({preventScroll:!0}),!r.has(tZ)&&t.isCollapsed()&&null!==l&&l===document.activeElement){let e=nb(t)&&"element"===t.anchor.type?T.childNodes[m]||null:i.rangeCount>0?i.getRangeAt(0):null;if(null!==e){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 i=rk(n),r=rM(i);if(null===i||null===r)return;let{top:l,bottom:o}=t,s=0,a=0,u=n;for(;null!==u;){let t=u===i.body;if(t){s=0,a=rA(e).innerHeight;let t=r.getComputedStyle(i.documentElement),n=parseFloat(t.scrollPaddingTop),l=parseFloat(t.scrollPaddingBottom);isFinite(n)&&(s+=n),isFinite(l)&&(a-=l)}else{let e=u.getBoundingClientRect();s=e.top,a=e.bottom}let n=0;if(l<s?n=-(s-l):o>a&&(n=o-a),0!==n)if(t)r.scrollBy(0,n);else{let e=u.scrollTop;u.scrollTop+=n;let t=u.scrollTop-e;l-=t,o-=t}if(t)break;u=rT(u)}}(n,t,l)}}tv=!0}}(d,c,e,T,S,o)}!function(e,t,n){let i=e._blockCursorElement;if(nb(n)&&n.isCollapsed()&&"element"===n.anchor.type&&t.contains(document.activeElement)){let r=n.anchor,l=r.getNode(),o=r.offset,s=!1,a=null;if(o===l.getChildrenSize())rL(l.getChildAtIndex(o-1))&&(s=!0);else{let t=l.getChildAtIndex(o);if(null!==t&&rL(t)){let n=t.getPreviousSibling();(null===n||rL(n))&&(s=!0,a=e.getElementByKey(t.__key))}}if(s){let n,r,o,s=e.getElementByKey(l.__key);return null===i&&(n=e._config.theme,(r=document.createElement("div")).contentEditable="false",r.setAttribute("data-lexical-cursor","true"),o=n.blockCursor,void 0!==o&&("string"==typeof o&&(o=n.blockCursor=lK(o)),void 0!==o&&r.classList.add(...o)),e._blockCursorElement=i=r),t.style.caretColor="transparent",null===a?s.appendChild(i):s.insertBefore(i,a)}}null!==i&&rR(i,e,t)}(e,o,c)}finally{null!==y&&y.observe(o,n6),n1=_,n0=h}}null!==m&&function(e,t,n,i,r){let l=Array.from(e._listeners.mutation),o=l.length;for(let e=0;e<o;e++){let[o,s]=l[e];for(let e of s){let l=t.get(e);void 0!==l&&o(l,{dirtyLeaves:i,prevEditorState:r,updateTags:n})}}}(e,m,S,C,u),nb(c)||null===c||null!==d&&d.is(c)||e.dispatchCommand(eb,void 0);let k=e._pendingDecorators;null!==k&&(e._decorators=k,e._pendingDecorators=null,iu("decorator",e,!0,k
2)),i=i8(t||u),i!==(r=i8(l))&&iu("textcontent",e,!0,r),iu("update",e,!0,{dirtyElements:x,dirtyLeaves:C,editorState:l,mutatedNodes:m,normalizedNodes:v,prevEditorState:t||u,tags:S}),id(e,N),function(e){let t=e._updates;if(0!==t.length){let n=t.shift();if(n){let[t,i]=n;ih(e,t,i)}}}(e)}function iu(e,t,n){for(var i=arguments.length,r=Array(i>3?i-3:0),l=3;l<i;l++)r[l-3]=arguments[l];let o=t._updating;t._updating=n;try{let n=t._listeners[e];for(let[e,t]of Array.from(n)){t&&t();let i=e(...r);n.has(e)?n.set(e,i):i&&i()}}finally{t._updating=o}}function id(e,t){if(e._deferred=[],0!==t.length){let n=e._updating;e._updating=!0;try{for(let e=0;e<t.length;e++)t[e]()}finally{e._updating=n}}}function ic(e,t){let i=e._updates,r=t||!1;for(;0!==i.length;){let t=i.shift();if(t){let i,[l,o]=t,s=e._pendingEditorState;void 0!==o&&(i=o.onUpdate,o.skipTransforms&&(r=!0),o.discrete&&(null===s&&n(191),s._flushSync=!0),i&&e._deferred.push(i),il(e,o.tag)),null==s?ih(e,l,o):l()}}return r}function ih(e,t,i){let r=e._updateTags,l,o=!1,s=!1;void 0!==i&&(l=i.onUpdate,il(e,i.tag),o=i.skipTransforms||!1,s=i.discrete||!1),l&&e._deferred.push(l);let a=e._editorState,u=e._pendingEditorState,d=!1;(null===u||u._readOnly)&&(u=e._pendingEditorState=iT(u||a),d=!0),u._flushSync=s;let c=n0,f=n2,h=n1,g=e._updating;n0=u,n2=!1,e._updating=!0,n1=e;let _=e._headless||null===e.getRootElement();iR=null;try{var p;let r,l;d&&(_?null!==a._selection&&(u._selection=a._selection.clone()):u._selection=(p=i&&i.event||null,r=e.getEditorState()._selection,l=rK(rA(e)),nb(r)||null==r?nU(r,l,e,p):r.clone()));let s=e._compositionKey;t(),o=ic(e,o),function(e,t){let n=t.getEditorState()._selection,i=e._selection;if(nb(i)){let e,t=i.anchor,r=i.focus;if("text"===t.type&&(e=t.getNode()).selectionTransform(n,i),"text"===r.type){let t=r.getNode();e!==t&&t.selectionTransform(n,i)}}}(u,e),0!==e._dirtyType&&(o?function(e,t){let n=t._dirtyLeaves,i=e._nodeMap;for(let e of n){let t=i.get(e);nm(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&G(t)}}(u,e):function(e,t){let n=t._dirtyLeaves,i=t._dirtyElements,r=e._nodeMap,l=i3(),o=new Map,s=n,a=s.size,u=i,d=u.size;for(;a>0||d>0;){if(a>0){for(let e of(t._dirtyLeaves=new Set,s)){let i=r.get(e);nm(i)&&i.isAttached()&&i.isSimpleText()&&!i.isUnmergeable()&&G(i),void 0!==i&&ir(i,l)&&ii(t,i,o),n.add(e)}if((a=(s=t._dirtyLeaves).size)>0){n4++;continue}}for(let e of(t._dirtyLeaves=new Set,t._dirtyElements=new Map,u.delete("root")&&u.set("root",!0),u)){let n=e[0],s=e[1];if(i.set(n,s),!s)continue;let a=r.get(n);void 0!==a&&ir(a,l)&&ii(t,a,o)}a=(s=t._dirtyLeaves).size,d=(u=t._dirtyElements).size,n4++}t._dirtyLeaves=n,t._dirtyElements=i}(u,e),ic(e),function(e,t,n,i){let r=e._nodeMap,l=t._nodeMap,o=[];for(let[e]of i){let t=l.get(e);void 0!==t&&(t.isAttached()||(im(t)&&function e(t,n,i,r,l,o){let s=t.getFirstChild();for(;null!==s;){let t=s.__key;s.__parent===n&&(im(s)&&e(s,t,i,r,l,o),i.has(t)||o.delete(t),l.push(t)),s=s.getNextSibling()}}(t,e,r,l,o,i),r.has(e)||i.delete(e),o.push(e)))}for(let e of o)l.delete(e);for(let e of n){let t=l.get(e);void 0===t||t.isAttached()||(r.has(e)||n.delete(e),l.delete(e))}}(a,u,e._dirtyLeaves,e._dirtyElements)),s!==e._compositionKey&&(u._flushSync=!0);let c=u._selection;if(nb(c)){let e=u._nodeMap,t=c.anchor.key,i=c.focus.key;void 0!==e.get(t)&&void 0!==e.get(i)||n(19)}else nA(c)&&0===c._nodes.size&&(u._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=a,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void ia(e)}finally{n0=c,n2=f,n1=h,e._updating=g,n4=0}0!==e._dirtyType||e._deferred.length>0||function(e,t){let n=t.getEditorState()._selection,i=e._selection;if(null!==i){if(i.dirty||!i.is(n))return!0}else if(null!==n)return!0;return!1}(u,e)?u._flushSync?(u._flushSync=!1,ia(e)):d&&iW(()=>{ia(e)}):(u._flushSync=!1,d&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function ig(e,t,n){n1===e&&void 0===n?t():ih(e,t,n)}class i_{withBefore(e){return new i_(this.element,e,this.after)}withAfter(e){return new i_(this.element,this.before,e)}withElement(e){return this.element===e?this:new i_(e,this.before,this.after)}insertChild(e){let t=this.before||this.getManagedLineBreak();return null!==t&&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){null===e?this.removeManagedLineBreak():this.insertManagedLineBreak("decorator"===e&&(g||u||c))}removeManagedLineBreak(){let e=this.getManagedLineBreak();if(e){let t=this.element,n="IMG"===e.nodeName?e.nextSibling:null;n&&t.removeChild(n),t.removeChild(e),t.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){let t=this.getManagedLineBreak();if(t){if(e===("IMG"===t.nodeName))return;this.removeManagedLineBreak()}let n=this.element,i=this.before,r=document.createElement("br");if(n.insertBefore(r,i),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,r),n.__lexicalLineBreak=e}else n.__lexicalLineBreak=r}getFirstChildOffset(){let e=0;for(let t=this.after;null!==t;t=t.previousSibling)e++;return e}resolveChildIndex(e,t,n,i){if(n===this.element){let t=this.getFirstChildOffset();return[e,Math.min(t+e.getChildrenSize(),Math.max(t,i))]}let r=ip(t,n);r.push(i);let l=ip(t,this.element),o=e.getIndexWithinParent();for(let e=0;e<l.length;e++){let t=r[e],n=l[e];
2if(void 0===t||t<n)break;if(t>n){o+=1;break}}return[e.getParentOrThrow(),o]}constructor(e,n,i){(0,t._)(this,"element",void 0),(0,t._)(this,"before",void 0),(0,t._)(this,"after",void 0),this.element=e,this.before=n||null,this.after=i||null}}function ip(e,t){let i=[],r=t;for(;r!==e&&null!==r;r=r.parentNode){let e=0;for(let t=r.previousSibling;null!==t;t=t.previousSibling)e++;i.push(e)}return r!==e&&n(225),i.reverse()}class iy extends tq{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(){return T[this.getFormat()]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){let e=[],t=this.getFirstChild();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){let e=[],t=this.getFirstChild();for(;null!==t;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return 0===this.getChildrenSize()}isDirty(){let e=ie()._dirtyElements;return null!==e&&e.has(this.__key)}isLastChild(){let e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return null!==t&&t.is(e)}getAllTextNodes(){let e=[],t=this.getFirstChild();for(;null!==t;){if(nm(t)&&e.push(t),im(t)){let n=t.getAllTextNodes();e.push(...n)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;im(e);){let t=e.getFirstChild();if(null===t)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;im(e);){let t=e.getLastChild();if(null===t)break;e=t}return e}getDescendantByIndex(e){let t=this.getChildren(),n=t.length;if(e>=n){let e=t[n-1];return im(e)&&e.getLastDescendant()||e||null}let i=t[e];return im(i)&&i.getFirstDescendant()||i||null}getFirstChild(){let e=this.getLatest().__first;return null===e?null:i4(e)}getFirstChildOrThrow(){let e=this.getFirstChild();return null===e&&n(45,this.__key),e}getLastChild(){let e=this.getLatest().__last;return null===e?null:i4(e)}getLastChildOrThrow(){let e=this.getLastChild();return null===e&&n(96,this.__key),e}getChildAtIndex(e){let t,n,i=this.getChildrenSize();if(e<i/2){for(t=this.getFirstChild(),n=0;null!==t&&n<=e;){if(n===e)return t;t=t.getNextSibling(),n++}return null}for(t=this.getLastChild(),n=i-1;null!==t&&n>=e;){if(n===e)return t;t=t.getPreviousSibling(),n--}return null}getTextContent(){let e="",t=this.getChildren(),n=t.length;for(let i=0;i<n;i++){let r=t[i];e+=r.getTextContent(),im(r)&&i!==n-1&&!r.isInline()&&(e+="\n\n")}return e}getTextContentSize(){let e=0,t=this.getChildren(),n=t.length;for(let i=0;i<n;i++){let r=t[i];e+=r.getTextContentSize(),im(r)&&i!==n-1&&!r.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(""!==e){let t=N[e];return 0!=(this.getFormat()&t)}return!1}hasTextFormat(e){let t=v[e];return 0!=(this.getTextFormat()&t)}getFormatFlags(e,t){return iQ(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){n7();let n=nj(),i=e,r=t,l=this.getChildrenSize();if(!this.canBeEmpty()){if(0===e&&0===t){let e=this.getFirstChild();if(nm(e)||im(e))return e.select(0,0)}else if((void 0===e||e===l)&&(void 0===t||t===l)){let e=this.getLastChild();if(nm(e)||im(e))return e.select()}}void 0===i&&(i=l),void 0===r&&(r=l);let o=this.__key;return nb(n)?(n.anchor.set(o,i,"element"),n.focus.set(o,r,"element"),n.dirty=!0,n):nz(o,i,o,r,"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();
2return this.getChildren().forEach(e=>e.remove()),e}append(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.splice(this.getChildrenSize(),0,t)}setDirection(e){let t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=""!==e&&N[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,i){tH(this)&&n(324,this.__key,this.__type);let r=this.getChildrenSize(),l=this.getWritable();e+t<=r||n(226,String(e),String(t),String(r));let o=l.__key,s=[],a=[],u=this.getChildAtIndex(e+t),d=null,c=r-t+i.length;if(0!==e)if(e===r)d=this.getLastChild();else{let t=this.getChildAtIndex(e);null!==t&&(d=t.getPreviousSibling())}if(t>0){let e=null===d?this.getFirstChild():d.getNextSibling();for(let i=0;i<t;i++){null===e&&n(100);let t=e.getNextSibling(),i=e.__key;i0(e.getWritable()),a.push(i),e=t}}let f=d;for(let e of i){null!==f&&e.is(f)&&(d=f=f.getPreviousSibling());let t=e.getWritable();t.__parent===o&&c--,i0(t);let i=e.__key;if(null===f)l.__first=i,t.__prev=null;else{let e=f.getWritable();e.__next=i,t.__prev=e.__key}e.__key===o&&n(76),t.__parent=o,s.push(i),f=e}if(e+t===r)null!==f&&(f.getWritable().__next=null,l.__last=f.__key);else if(null!==u){let e=u.getWritable();if(null!==f){let t=f.getWritable();e.__prev=f.__key,t.__next=u.__key}else e.__prev=null}if(l.__size=c,a.length){let e=nj();if(nb(e)){let t=new Set(a),n=new Set(s),{anchor:i,focus:r}=e;iC(i,t,n)&&nG(i,i.getNode(),this,d,u),iC(r,t,n)&&nG(r,r.getNode(),this,d,u),0!==c||this.canBeEmpty()||rw(this)||this.remove()}}return l}getDOMSlot(e){return new i_(e)}exportDOM(e){let{element:t}=super.exportDOM(e);if(rz(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 0===t&&""===n||rw(this)||this.getChildren().some(nm)||(0!==t&&(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=rV(t).$getDOMSlot(this,e,t),i=n.getFirstChild();for(let e=this.getFirstChild();e;e=e.getNextSibling()){let r=t.getElementByKey(e.getKey());null!==r&&(null==i?(n.insertChild(r),i=r):i!==r&&n.replaceChild(r,i),i=i.nextSibling)}}constructor(e){super(e),(0,t._)(this,"__first",void 0),(0,t._)(this,"__last",void 0),(0,t._)(this,"__size",void 0),(0,t._)(this,"__format",void 0),(0,t._)(this,"__style",void 0),(0,t._)(this,"__indent",void 0),(0,t._)(this,"__dir",void 0),(0,t._)(this,"__textFormat",void 0),(0,t._)(this,"__textStyle",void 0),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=""}}function im(e){return e instanceof iy}function iC(e,t,n){let i=e.getNode();for(;i;){let e=i.__key;if(t.has(e)&&!n.has(e))return!0;i=i.getParent()}return!1}class ix extends tq{decorate(e,t){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function iv(e){return e instanceof ix}class iS extends iy{static getType(){return"root"}static clone(){return new iS}getTopLevelElementOrThrow(){n(51)}getTextContent(){let e=this.__cachedText;return(n5()||0===ie()._dirtyType)&&null!==e?e:super.getTextContent()}remove(){n(52)}replace(e){n(53)}insertBefore(e){n(54)}insertAfter(e){n(55)}updateDOM(e,t){return!1}splice(e,t,i){for(let e of i)im(e)||iv(e)||n(282);return super.splice(e,t,i)}static importJSON(e){return re().updateFromJSON(e)}collapseAtStart(){return!0}constructor(){super("root"),(0,t._)(this,"__cachedText",void 0),this.__cachedText=null}}function iN(e){return e instanceof iS}function iT(e){return new iO(new Map(e._nodeMap))}function ik(){return new iO(new Map([["root",new iS]]))}class iO{isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(e,t){return is(t&&t.editor||null,this,e)}clone(e){let t=new iO(this._nodeMap,void 0===e?this._selection:e);return t._readOnly=!0,t}toJSON(){return is(null,this,()=>({root:function e(t){let i=t.exportJSON(),r=t.constructor;if(i.type!==r.getType()&&n(130,r.name),im(t)){let l=i.children;Array.isArray(l)||n(59,r.name);let o=t.getChildren();for(let t=0;t<o.length;t++){let n=e(o[t]);l.push(n)}}return i}(re())}))}constructor(e,n){(0,t._)(this,"_nodeMap",void 0),(0,t._)(this,"_selection",void 0),(0,t._)(this,"_flushSync",void 0),(0,t._)(this,"_readOnly",void 0),this._nodeMap=e,this._selection=n||null,this._flushSync=!1,this._readOnly=!1}}class iE extends iy{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class ib extends iy{static getType(){return"paragraph"}static clone(e){return new ib(e.__key)}createDOM(e){let t=document.createElement("p"),n=ry(e.theme,"paragraph");return void 0!==n&&t.classList.add(...n),t}updateDOM(e,t,n){return!1}static importDOM(){return{p:e=>({conversion:iM,priority:0})}}exportDOM(e){let{element:t}=super.exportDOM(e);if(rz(t)){this.isEmpty()&&t.append(document.createElement("br"));let e=this.getFormatType();e&&(t.style.textAlign=e)}return{element:t}}static importJSON(e){return iA().updateFromJSON(e)}exportJSON(){let e=super.exportJSON();if(void 0===e.textFormat||void 0===e.textStyle){let t=this.getChildren().find(nm);t?(e.textFormat=t.getFormat(),e.textStyle=t.getStyle()):(e.textFormat=this.getTextFormat(),e.textStyle=this.getTextStyle())}return e}insertNewAfter(e,t){let n=iA();n.setTextFormat(e.format),n.setTextStyle(e.style);let i=this.getDirection();return n.setDirection(i),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,t),n}collapseAtStart(){let e=this.getChildren();if(0===e.length||nm(e[0])&&""===e[0].getTextContent().trim()){if(null!==this.getNextSibling())return this.selectNext(),this.remove(),!0;if(null!==this.getPreviousSibling())return this.selectPrevious(),this.remove(),!0}return!1}}function iM(e){let t=iA();if(e.style&&(t.setFormat(e.style.textAlign),rQ(e,t)),""===t.getFormatType()){let n=e.getAttribute("align");n&&n&&n in N&&t.setFormat(n)}return{node:t}}function iA(){return rP(new ib)}function iw(e){return e instanceof ib}function iD(e,t,n,i){let r=e._keyToDOMMap;r.clear(),e._editorState=ik(),e._pendingEditorState=i,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 l=e._observer;null!==l&&(l.disconnect(),e._observer=null),null!==t&&(t.textContent=""),null!==n&&(n.textContent="",r.set("root",n))}let iP={$createDOM:(e,t)=>e.createDOM(t._config,t),$decorateDOM:(e,t,n,i)=>{},$exportDOM:(e,t)=>{let n=iz(t,e.getType());return n&&void 0!==n.exportDOM?n.exportDOM(t,e):e.exportDOM(t)},$extractWithChild:(e,t,n,i,r)=>im(e)&&e.extractWithChild(t,n,i),$getDOMSlot:(e,t,i)=>(im(e)||n(336,e.getKey(),e.getType()),e.getDOMSlot(t)),$shouldExclude:(e,t,n)=>im(e)&&e.excludeFromCopy("html"),$shouldInclude:(e,t,n)=>!t||e.isSelected(t),$updateDOM:(e,t,n,i)=>e.updateDOM(t,n,i._config)};function iF(e,t){let n=e.get(t);e.delete(t),n&&n()}function iI(e,t,n){return e.set(t,n),iF.bind(null,e,t)}class iL{isComposing(){return null!=this._compositionKey}registerUpdateListener(e){return iI(this._listeners.update,e)}
2registerEditableListener(e){return iI(this._listeners.editable,e)}registerDecoratorListener(e){return iI(this._listeners.decorator,e)}registerTextContentListener(e){return iI(this._listeners.textcontent,e)}registerRootListener(e){let t=this._listeners.root;return lB(iI(t,e,e(this._rootElement,null)||void 0),()=>{var n;let i;return n=[null,this._rootElement],void((i=t.get(e))&&i(),t.set(e,e(...n)||void 0))})}registerCommand(e,t,i){void 0===i&&n(35);let r=this._commands;r.has(e)||r.set(e,[new b,new b,new b,new b,new b]);let l=r.get(e);void 0===l&&n(36,String(e));let o=7&i,s=l[o];return o!==i?s.addFront(t):s.addBack(t),()=>{s.delete(t),l.every(e=>0===e.size)&&r.delete(e)}}registerMutationListener(e,t,n){let i=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,r=this._listeners.mutation,l=r.get(t);void 0===l&&(l=new Set,r.set(t,l)),l.add(i);let o=n&&n.skipInitialization;return void 0!==o&&o||this.initializeMutationListener(t,i),()=>{l.delete(i),0===l.size&&r.delete(t)}}getRegisteredNode(e){let t=this._nodes.get(e.getType());return void 0===t&&n(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){let n=this._editorState,i=rq(n).get(t.getType());if(!i)return;let r=new Map;for(let e of i.keys())r.set(e,"created");r.size>0&&e(r,{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),i=[n],r=n.replaceWithKlass;if(null!=r){let e=this.registerNodeTransformToKlass(r,t);i.push(e)}return function(e,t){let n=rq(e.getEditorState()),i=[];for(let e of t){let t=n.get(e);t&&i.push(t)}0!==i.length&&e.update(()=>{for(let e of i)for(let t of e.keys()){let e=i4(t);e&&e.markDirty()}},null===e._pendingEditorState?{tag:tX}:void 0)}(this,i.map(e=>e.klass.getType())),()=>{i.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 rS(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 i=ry(this._config.theme,"root"),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,iD(this,t,e,r),null!==t&&(this._config.disableEvents||function(e){let t=tC.get(e);if(void 0===t)return tY();let i=tx.get(t);if(void 0===i)return tY();let r=i-1;r>=0||n(164),tC.delete(e),tx.set(t,r),0===r&&t.removeEventListener("selectionchange",tU);let l=iY(e);ij(l)?(!function(e){if(null!==e._parentEditor){let t=rl(e),n=t[t.length-1]._key;t$.get(n)===e&&t$.delete(n)}else t$.delete(e._key)}(l),e.__lexicalEditor=null):l&&n(198);let o=tW(e);for(let e=0;e<o.length;e++)o[e]();e.__lexicalEventHandles=[]}(t),null!=i&&t.classList.remove(...i)),null!==e){let t=rM(e),n=e.style;n.userSelect="text",n.whiteSpace="pre-wrap",n.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=t,this._dirtyType=2,I(this),this._updateTags.add(tX),ia(this),this._config.disableEvents||function(e,t){var n;let i=e.ownerDocument;tC.set(e,i);let r=null!=(n=tx.get(i))?n:0;r<1&&i.addEventListener("selectionchange",tU),tx.set(i,r+1),e.__lexicalEditor=t;let l=tW(e);for(let n=0;n<tg.length;n++){let[i,r]=tg[n],o="function"==typeof r?e=>{tJ(e)||(tj(e),(t.isEditable()||"click"===i)&&r(e,t))}:e=>{if(tJ(e))return;tj(e);let n=t.isEditable();switch(i){case"cut":return n&&rS(t,tr,e);case"copy":return rS(t,ti,e);case"paste":return n&&rS(t,eB,e);case"dragstart":return n&&rS(t,te,e);case"dragover":return n&&rS(t,tt,e);case"dragend":return n&&rS(t,tn,e);case"focus":return n&&rS(t,td,e);case"blur":return n&&rS(t,tc,e);case"drop":return n&&rS(t,e9,e)}};e.addEventListener(i,o),l.push(()=>{e.removeEventListener(i,o)})}}(e,this),null!=i&&e.classList.add(...i)}else this._window=null,this._updateTags.add(tX),ia(this);iu("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 i=e;i._readOnly&&((i=iT(e))._selection=e._selection?e._selection.clone():null),F(this);
2let r=this._pendingEditorState,l=this._updateTags,o=void 0!==t?t.tag:null;null===r||r.isEmpty()||(null!=o&&l.add(o),ia(this)),this._pendingEditorState=i,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,null!=o&&l.add(o),this._updating||ia(this)}parseEditorState(e,t){return function(e,t,n){let i=ik(),r=n0,l=n2,o=n1,s=t._dirtyElements,a=t._dirtyLeaves,u=t._cloneNotNeeded,d=t._dirtyType;t._dirtyElements=new Map,t._dirtyLeaves=new Set,t._cloneNotNeeded=new Set,t._dirtyType=0,n0=i,n2=!1,n1=t,iR=null;try{let r=t._nodes;io(e.root,r),n&&n(),i._readOnly=!0}catch(e){e instanceof Error&&t._onError(e)}finally{t._dirtyElements=s,t._dirtyLeaves=a,t._cloneNotNeeded=u,t._dirtyType=d,n0=r,n2=l,n1=o}return i}("string"==typeof e?JSON.parse(e):e,this,t)}read(e){return ia(this),this.getEditorState().read(e,{editor:this})}update(e,t){this._updating?this._updates.push([e,t]):ih(this,e,t)}focus(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),ig(this,()=>{let i=nj(),r=re();null!==i?i.dirty||rn(i.clone()):0!==r.getChildrenSize()&&("rootStart"===t.defaultSelection?r.selectStart():r.selectEnd()),rO("focus"),rE(()=>{n.removeAttribute("autocapitalize"),e&&e()})}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){let e=this._rootElement;null!==e&&e.blur();let t=rK(this._window);null!==t&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,iu("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}constructor(e,n,i,r,l,o,s,a){(0,t._)(this,"_headless",void 0),(0,t._)(this,"_parentEditor",void 0),(0,t._)(this,"_rootElement",void 0),(0,t._)(this,"_editorState",void 0),(0,t._)(this,"_pendingEditorState",void 0),(0,t._)(this,"_compositionKey",void 0),(0,t._)(this,"_deferred",void 0),(0,t._)(this,"_keyToDOMMap",void 0),(0,t._)(this,"_updates",void 0),(0,t._)(this,"_updating",void 0),(0,t._)(this,"_listeners",void 0),(0,t._)(this,"_commands",void 0),(0,t._)(this,"_nodes",void 0),(0,t._)(this,"_decorators",void 0),(0,t._)(this,"_pendingDecorators",void 0),(0,t._)(this,"_config",void 0),(0,t._)(this,"_dirtyType",void 0),(0,t._)(this,"_cloneNotNeeded",void 0),(0,t._)(this,"_dirtyLeaves",void 0),(0,t._)(this,"_dirtyElements",void 0),(0,t._)(this,"_normalizedNodes",void 0),(0,t._)(this,"_updateTags",void 0),(0,t._)(this,"_observer",void 0),(0,t._)(this,"_key",void 0),(0,t._)(this,"_onError",void 0),(0,t._)(this,"_htmlConversions",void 0),(0,t._)(this,"_window",void 0),(0,t._)(this,"_editable",void 0),(0,t._)(this,"_blockCursorElement",void 0),(0,t._)(this,"_createEditorArgs",void 0),this._createEditorArgs=a,this._parentEditor=n,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=i,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=ro(),this._onError=l,this._htmlConversions=o,this._editable=s,this._headless=null!==n&&n._headless,this._window=null,this._blockCursorElement=null}}(0,t._)(iL,"version",void 0),iL.version="0.44.0+prod.esm";let iR=null,iK=1;function iB(e,t){let i=iz(e,t);return void 0===i&&n(30,t),i}function iz(e,t){return e._nodes.get(t)}let iW="function"==typeof queueMicrotask?queueMicrotask:e=>{Promise.resolve().then(e)};function i$(e){let t=document.activeElement;if(!rz(t))return!1;let n=t.nodeName;return iv(i7(e))&&("INPUT"===n||"TEXTAREA"===n||"true"===t.contentEditable&&null==iY(t))}function iU(e,t,n){let i=e.getRootElement();try{return null!==i&&i.contains(t)&&i.contains(n)&&null!==t&&!i$(t)&&iJ(t)===e}catch(e){return!1}}function ij(e){return e instanceof iL}function iJ(e){let t=e;for(;null!=t;){let e=iY(t);if(ij(e))return e;t=rT(t)}return null}function iY(e){return e?e.__lexicalEditor:null}function iV(e){return nS(e)||e.isToken()}function iG(e){return iV(e)||e.isSegmented()}
2function iH(e){return rW(e)&&3===e.nodeType}function iq(e){return rW(e)&&9===e.nodeType}function iX(e){let t=e;for(;null!=t;){if(iH(t))return t;t=t.firstChild}return null}function iQ(e,t,n){let i=v[t];if(null!==n&&(e&i)==(n&i))return e;let r=e^i;return"subscript"===t?r&=~v.superscript:"superscript"===t?r&=~v.subscript:"lowercase"===t?(r&=~v.uppercase,r&=~v.capitalize):"uppercase"===t?(r&=~v.lowercase,r&=~v.capitalize):"capitalize"===t&&(r&=~v.lowercase,r&=~v.uppercase),r}function iZ(e,t){let n,i=(n=iR,iR=null,n);if(null!=(t=t||i&&i.__key))return void(e.__key=t);n7(),n9();let r=ie(),l=n8(),o=""+iK++;l._nodeMap.set(o,e),im(e)?r._dirtyElements.set(o,!0):r._dirtyLeaves.add(o),r._cloneNotNeeded.add(o),r._dirtyType=1,e.__key=o}function i0(e){let t=e.getParent();if(null!==t){let n=e.getWritable(),i=t.getWritable(),r=e.getPreviousSibling(),l=e.getNextSibling(),o=null!==l?l.__key:null,s=null!==r?r.__key:null,a=null!==r?r.getWritable():null,u=null!==l?l.getWritable():null;null===r&&(i.__first=o),null===l&&(i.__last=s),null!==a&&(a.__next=o),null!==u&&(u.__prev=s),n.__prev=null,n.__next=null,n.__parent=null,i.__size--}}function i1(e){n9(),tH(e)&&n(323,e.__key,e.__type);let t=e.getLatest(),i=t.__parent,r=n8(),l=ie(),o=r._nodeMap,s=l._dirtyElements;null!==i&&function(e,t,n){let i=e;for(;null!==i;){if(n.has(i))return;let e=t.get(i);if(void 0===e)break;n.set(i,!1),i=e.__parent}}(i,o,s);let a=t.__key;l._dirtyType=1,im(e)?s.set(a,!0):l._dirtyLeaves.add(a)}function i2(e){n7();let t=ie(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,null!==n){let e=i4(n);null!==e&&e.getWritable()}if(null!==e){let t=i4(e);null!==t&&t.getWritable()}}}function i3(){return n5()?null:ie()._compositionKey}function i4(e,t){let n=(t||n8())._nodeMap.get(e);return void 0===n?null:n}function i6(e,t){let n=i5(e,ie());return void 0!==n?i4(n,t):null}function i5(e,t){return e["__lexicalKey_".concat(t._key)]}function i7(e,t){let n=e;for(;null!=n;){let e=i6(n,t);if(null!==e)return e;n=rT(n)}return null}function i9(e){let t=Object.assign({},e._decorators);return e._pendingDecorators=t,t}function i8(e){return e.read(()=>re().getTextContent())}function re(){return rt(n8())}function rt(e){return e._nodeMap.get("root")}function rn(e){n7();let t=n8();null!==e&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function ri(e){let t=ie(),n=function(e,t){let n=e;for(;null!=n;){let e=i5(n,t);if(void 0!==e)return e;n=rT(n)}return null}(e,t);return null===n?e===t.getRootElement()?i4("root"):null:i4(n)}function rr(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function rl(e){let t=[];for(let n=e;null!==n;n=n._parentEditor)t.push(n);return t}function ro(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function rs(e){return iH(e)?e.nodeValue:null}function ra(e,t,n){let i=rK(rA(t));if(null===i)return;let r=i.anchorNode,{anchorOffset:l,focusOffset:o}=i;if(null!==r){let t=rs(r),i=i7(r);if(null!==t&&nm(i)){if((t===_||t===p)&&n){let e=n.length;t=n,l=e,o=e}null!==t&&ru(i,t,l,o,e)}}}function ru(e,t,n,i,r){let l=e;if(l.isAttached()&&(r||!l.isDirty())){let o=l.isComposing(),s=t;if((o||r)&&(t.endsWith(_)&&(s=t.slice(0,-_.length)),r)){let e;for(;-1!==(e=s.indexOf(p));)s=s.slice(0,e)+s.slice(e+p.length),null!==n&&n>e&&(n=Math.max(e,n-p.length)),null!==i&&i>e&&(i=Math.max(e,i-p.length))}let a=l.getTextContent();if(r||s!==a){if(""===s){if(i2(null),c||u||g)l.remove();else{let e=ie();setTimeout(()=>{e.update(()=>{l.isAttached()&&l.remove()})},20)}return}let t=l.getParent(),r=nJ(),a=l.getTextContentSize(),d=i3(),f=l.getKey();if(l.isToken()||null!==d&&f===d&&!o||nb(r)&&(null!==t&&!t.canInsertTextBefore()&&0===r.anchor.offset||r.anchor.key===e.__key&&0===r.anchor.offset&&!l.canInsertTextBefore()&&!o||r.focus.key===e.__key&&r.focus.offset===a&&!l.canInsertTextAfter()&&!o))return void l.markDirty();let h=nj();if(!nb(h)||null===n||null===i)return void rd(l,s,h);if(h.setTextNodeRange(l,n,l,i),l.isSegmented()){let e=ny(l.getTextContent());l.replace(e),l=e}rd(l,s,h)}}}function rd(e,t,n){if(e.setTextContent(t),nb(n)){let t=e.getKey();for(let i of["anchor","focus"]){let r=n[i];"text"===r.type&&r.key===t&&(r.offset=la(e,r.offset,"clamp"))}}}
2function rc(e,t,n){let i=t[n]||!1;return"any"===i||i===e[n]}function rf(e,t){return rc(e,t,"altKey")&&rc(e,t,"ctrlKey")&&rc(e,t,"shiftKey")&&rc(e,t,"metaKey")}function rh(e,t,n){if(!rf(e,n))return!1;if(e.key.toLowerCase()===t.toLowerCase())return!0;if(t.length>1||1===e.key.length&&127>=e.key.charCodeAt(0))return!1;if(e.code.startsWith("Digit")&&/^\d$/.test(t))return e.code==="Digit".concat(t);let i="Key"+t.toUpperCase();return e.code===i}let rg={ctrlKey:!o,metaKey:o},r_={altKey:o,ctrlKey:!o};function rp(e){return"Backspace"===e.key}function ry(e,t){void 0===e.__lexicalClassNameCache&&(e.__lexicalClassNameCache={});let n=e.__lexicalClassNameCache,i=n[t];if(void 0!==i)return i;let r=e[t];if("string"==typeof r){let e=lK(r);return n[t]=e,e}return r}function rm(e,t,i,r,l){if(0===i.size)return;let o=r.__type,s=r.__key,a=t.get(o);void 0===a&&n(33,o);let u=a.klass,d=e.get(u);void 0===d&&(d=new Map,e.set(u,d));let c=d.get(s),f="destroyed"===c&&"created"===l;(void 0===c||f)&&d.set(s,f?"updated":l)}function rC(e,t,n){let i=e.getParent(),r=n,l=e;return null!==i&&(t&&0===n?(r=l.getIndexWithinParent(),l=i):t||n!==l.getChildrenSize()||(r=l.getIndexWithinParent()+1,l=i)),l.getChildAtIndex(t?r-1:r)}function rx(e,t){let n=e.offset;if("element"===e.type)return rC(e.getNode(),t,n);{let i=e.getNode();if(t&&0===n||!t&&n===i.getTextContentSize()){let e=t?i.getPreviousSibling():i.getNextSibling();return null===e?rC(i.getParentOrThrow(),t,i.getIndexWithinParent()+ +!t):e}}return null}function rv(e){let t=rA(e).event,n=t&&t.inputType;return"insertFromPaste"===n||"insertFromPasteAsQuotation"===n}function rS(e,t,n){return function e(t,n,i,r){let l,o=rl(t);for(let e=4;e>=0;e--)for(let t=0;t<o.length;t++){let s=o[t];if(t>0&&s._updating){l=s;break}let a=s._commands.get(n);if(void 0!==a){let t=a[e];if(t.size>0){let e=!1;if(ig(s,()=>{for(let n of t)if(n(i,r))return void(e=!0)}),e)return e}}}return l&&l.update(()=>{e(l,n,i,r)}),!1}(e,t,n,e)}function rN(e,t){let i=e._keyToDOMMap.get(t);return void 0===i&&n(75,t),i}function rT(e){let t=e.assignedSlot||e.parentElement;return r$(t)?t.host:t}function rk(e){return iq(e)?e:rz(e)?e.ownerDocument:null}function rO(e){n7(),ie()._updateTags.add(e)}function rE(e){n7(),ie()._deferred.push(e)}function rb(e,t){let n=e.getParent();for(;null!==n;){if(n.is(t))return!0;n=n.getParent()}return!1}function rM(e){let t=rk(e);return t?t.defaultView:null}function rA(e){let t=e._window;return null===t&&n(78),t}function rw(e){return iN(e)||im(e)&&e.isShadowRoot()}function rD(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.constructor.clone(e);return iZ(n,null),n.afterCloneFrom(e),t||n.resetOnCopyNodeFrom(e),n}function rP(e){let t=ie(),i=e.getType(),r=iz(t,i);void 0===r&&n(200,e.constructor.name,i);let{replace:l,replaceWithKlass:o}=r;if(null!==l){let t=l(e),r=t.constructor;return null!==o?t instanceof o||n(201,o.name,o.getType(),r.name,r.getType(),e.constructor.name,i):t instanceof e.constructor&&r!==e.constructor||n(202,r.name,r.getType(),e.constructor.name,i),t.__key===e.__key&&n(203,e.constructor.name,i,r.name,r.getType()),t}return e}function rF(e,t){!iN(e.getParent())||im(t)||iv(t)||n(99)}function rI(e){let t=i4(e);return null===t&&n(63,e),t}function rL(e){return(iv(e)||im(e)&&!e.canBeEmpty())&&!e.isInline()}function rR(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;let i=e.parentElement;null!==i&&i.removeChild(e)}function rK(e){return r?(e||window).getSelection():null}function rB(e){let t=rM(e);return t?t.getSelection():null}function rz(e){return rW(e)&&1===e.nodeType}function rW(e){return"object"==typeof e&&null!==e&&"nodeType"in e&&"number"==typeof e.nodeType}function r$(e){return rW(e)&&11===e.nodeType}function rU(e){let t=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 null!==e.nodeName.match(t)}function rj(e){let t=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 null!==e.nodeName.match(t)}function rJ(e){if(iv(e)&&!e.isInline())return!0;
2if(!im(e)||rw(e))return!1;let t=e.getFirstChild(),n=null===t||nt(t)||nm(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}function rY(){return ie()}function rV(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rY();return e._config.dom||iP}let rG=new WeakMap,rH=new Map;function rq(e){if(!e._readOnly&&e.isEmpty())return rH;e._readOnly||n(192);let t=rG.get(e);return t||(t=function(e){let t=new Map;for(let[n,i]of e._nodeMap){let e=i.__type,r=t.get(e);r||(r=new Map,t.set(e,r)),r.set(n,i)}return t}(e),rG.set(e,t)),t}function rX(e){let t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function rQ(e,t){let n=Math.round((parseInt(e.style.paddingInlineStart,10)||0)/40);t.setIndent(n)}function rZ(e,t){return Object.prototype.hasOwnProperty.call(e,t)&&e[t]!==tq[t]}function r0(e){let t=E in e.prototype?e.prototype[E]():void 0,i=function(e){if(!(e===tq||e.prototype instanceof tq)){let t="<unknown>",i="<unknown>";try{t=e.getType()}catch(e){}try{iL.version&&(i=JSON.parse(iL.version))}catch(e){}n(290,e.name,t,i)}return e===ix||e===iy||e===tq}(e),r=!i&&rZ(e,"getType")?e.getType():void 0,l,o=r;if(t)if(r)l=t[r];else for(let[e,n]of Object.entries(t))o=e,l=n;if(!i&&o&&(rZ(e,"getType")||(e.getType=()=>o),rZ(e,"clone")||(e.clone=t=>(iR=t,new e)),rZ(e,"importJSON")||(e.importJSON=l&&l.$importJSON||(t=>(new e).updateFromJSON(t))),!rZ(e,"importDOM")&&l)){let{importDOM:t}=l;t&&(e.importDOM=()=>t)}return{ownNodeConfig:l,ownNodeType:o}}let r1=(e,t)=>{let n=e;for(;null!=n&&!iN(n);){if(t(n))return n;n=n.getParent()}return null};function r2(e,t){let i=[],r=e.__first;for(;null!==r;){let e=null===t?i4(r):t.get(r);null==e&&n(174),i.push(r),r=e.__next}return i}let r3={next:"previous",previous:"next"};class r4{[Symbol.iterator](){return ly({hasNext:lt,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return lo(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return lo(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)||(null===n?this.insert(e):n.replace(e,t)),this}splice(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"next",r=i===this.direction?t:Array.from(t).reverse(),l=this,o=this.getParentAtCaret(),s=new Map;for(let t=l.getAdjacentCaret();null!==t&&s.size<e;t=t.getAdjacentCaret()){let e=t.origin.getWritable();s.set(e.getKey(),e)}for(let e of r){if(s.size>0){let t=l.getNodeAtCaret();if(t)if(s.delete(t.getKey()),s.delete(e.getKey()),t.is(e)||l.origin.is(e));else{let n=e.getParent();n&&n.is(o)&&e.remove(),t.replace(e)}else null===t&&n(263,Array.from(s).join(" "))}else l.insert(e);l=lo(e,this.direction)}for(let e of s.values())e.remove();return this}constructor(e){(0,t._)(this,"origin",void 0),this.origin=e}}class r6 extends r4{getLatest(){let e=this.origin.getLatest();return e===this.origin?this:lu(e,this.direction)}getParentCaret(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"root";return lo(r7(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=r3[this.direction];return lo(this.getNodeAtCaret(),e)||lu(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(e){return e instanceof r6&&this.direction===e.direction&&this.origin.is(e.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}constructor(...e){super(...e),(0,t._)(this,"type","child")}}let r5={root:iN,shadowRoot:rw};function r7(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"root";return r5[t](e)?null:e}class r9 extends r4{getLatest(){let e=this.origin.getLatest();return e===this.origin?this:lo(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return im(this.origin)?lu(this.origin,this.direction):null}getParentCaret(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"root";return lo(r7(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=r3[this.direction];return lo(this.getNodeAtCaret(),e)||lu(this.origin.getParentOrThrow(),e)}isSamePointCaret(e){return e instanceof r9&&this.direction===e.direction&&this.origin.is(e.origin)}isSameNodeCaret(e){return(e instanceof r9||e instanceof r8)&&this.direction===e.direction&&this.origin.is(e.origin)}constructor(...e){super(...e),(0,t._)(this,"type","sibling")}}class r8 extends r4{getLatest(){let e=this.origin.getLatest();return e===this.origin?this:ls(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"root";return lo(r7(this.getParentAtCaret(),e),this.direction)}getFlipped(){return ls(this.origin,r3[this.direction],this.offset)}isSamePointCaret(e){return e instanceof r8&&this.direction===e.direction&&this.origin.is(e.origin)&&this.offset===e.offset}isSameNodeCaret(e){return(e instanceof r9||e instanceof r8)&&this.direction===e.direction&&this.origin.is(e.origin)}getSiblingCaret(){return lo(this.origin,this.direction)}constructor(e,n){super(e),(0,t._)(this,"type","text"),(0,t._)(this,"offset",void 0),this.offset=n}}function le(e){return e instanceof r8}function lt(e){return e instanceof r9}function ln(e){return e instanceof r6}let li={next:class extends r8{getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}constructor(...e){super(...e),(0,t._)(this,"direction","next")}},previous:class extends r8{getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}constructor(...e){super(...e),(0,t._)(this,"direction","previous")}}},lr={next:class extends r9{getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}constructor(...e){super(...e),(0,t._)(this,"direction","next")}},previous:class extends r9{getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}constructor(...e){super(...e),(0,t._)(this,"direction","previous")}}},ll={next:class extends r6{getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}constructor(...e){super(...e),(0,t._)(this,"direction","next")}},previous:class extends r6{getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}constructor(...e){super(...e),(0,t._)(this,"direction","previous")}}};function lo(e,t){return e?new lr[t](e):null}
2function ls(e,t,n){return e?new li[t](e,la(e,n)):null}function la(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"error",r=e.getTextContentSize(),l="next"===t?r:"previous"===t?0:t;return(l<0||l>r)&&("clamp"!==n&&i(284,String(t),String(r),e.getKey()),l=l<0?0:r),l}function lu(e,t){return im(e)?new ll[t](e):null}function ld(e){return e&&e.getChildCaret()||e}function lc(e){return e&&ld(e.getAdjacentCaret())}class lf{getLatest(){let e=this.anchor.getLatest(),t=this.focus.getLatest();return e===this.anchor&&t===this.focus?this:new lf(e,t,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){let e=e=>{let t=this[e].getLatest();return le(t)?function(e,t){let{direction:n,origin:i}=e;return new lh(e,la(i,"focus"===t?r3[n]:n)-e.offset)}(t,e):null},t=e("anchor"),n=e("focus");if(t&&n){let{caret:e}=t,{caret:i}=n;if(e.isSameNodeCaret(i))return[new lh(e,i.offset-e.offset),null]}return[t,n]}iterNodeCarets(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"root",t=le(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),i=le(n),r=t=>t.isSameNodeCaret(n)?null:lc(t)||t.getParentCaret(e);return ly({hasNext:e=>null!==e&&!(i&&n.isSameNodeCaret(e)),initial:t.isSameNodeCaret(n)?null:r(t),map:e=>e,step:r})}[Symbol.iterator](){return this.iterNodeCarets("root")}constructor(e,n,i){(0,t._)(this,"type","node-caret-range"),(0,t._)(this,"direction",void 0),(0,t._)(this,"anchor",void 0),(0,t._)(this,"focus",void 0),this.anchor=e,this.focus=n,this.direction=i}}class lh{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,i]=this.getSliceIndices(),r=e.getTextContent();return ls(e.setTextContent(r.slice(0,n)+r.slice(i)),t,n)}constructor(e,n){(0,t._)(this,"type","slice"),(0,t._)(this,"caret",void 0),(0,t._)(this,"distance",void 0),this.caret=e,this.distance=n}}function lg(e){return lp(e,lo(re(),e.direction))}function l_(e){return lp(e,e)}function lp(e,t){return e.direction!==t.direction&&n(265),new lf(e,t,e.direction)}function ly(e){let{initial:t,hasNext:n,step:i,map:r}=e,l=t;return{[Symbol.iterator](){return this},next(){if(!n(l))return{done:!0,value:void 0};let e={done:!1,value:r(l)};return l=i(l),e}}}function lm(e,t){let i=lv(e.origin,t.origin);switch(null===i&&n(275,e.origin.getKey(),t.origin.getKey()),i.type){case"same":{let n="text"===e.type,i="text"===t.type;return n&&i?Math.sign(e.offset-t.offset):e.type===t.type?0:n?-1:i?1:"child"===e.type?-1:1}case"ancestor":return"child"===e.type?-1:1;case"descendant":return"child"===t.type?1:-1;case"branch":return lC(i)}}function lC(e){let{a:t,b:n}=e,i=t.__key,r=n.__key,l=t,o=n;for(;l&&o;l=l.getNextSibling(),o=o.getNextSibling()){if(l.__key===r)return -1;if(o.__key===i)return 1}return null===l?1:-1}function lx(e){return im(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function lv(e,t){if(e.is(t))return{commonAncestor:e,type:"same"};let i=new Map;for(let[t,n]=lx(e);t;n=t,t=t.getParent())i.set(t,n);for(let[r,l]=lx(t);r;l=r,r=r.getParent()){let o=i.get(r);if(void 0!==o)return null===o?(r.is(e)||n(276),{commonAncestor:r,type:"ancestor"}):null===l?(r.is(t)||n(277),{commonAncestor:r,type:"descendant"}):((im(o)||o.is(e))&&(im(l)||l.is(t))&&r.is(o.getParent())&&r.is(l.getParent())||n(278),{a:o,b:l,commonAncestor:r,type:"branch"})}return null}function lS(e,t){let{type:i,key:r,offset:l}=e,o=rI(e.key);return"text"===i?(nm(o)||n(266,o.getType(),r),ls(o,t,l)):(im(o)||n(267,o.getType(),r),lI(o,e.offset,t))}function lN(e,t){let{origin:i,direction:r}=t,l="next"===r;le(t)?e.set(i.getKey(),t.offset,"text"):lt(t)?nm(i)?e.set(i.getKey(),la(i,r),"text"):e.set(i.getParentOrThrow().getKey(),i.getIndexWithinParent()+ +!!l,"element"):(ln(t)&&im(i)||n(268),e.set(i.getKey(),l?0:i.getChildrenSize(),"element"))}function lT(e){let t=nj(),n=nb(t)?t:nW();return lk(n,e),rn(n),n}function lk(e,t){lN(e.anchor,t.anchor),lN(e.focus,t.focus)}function lO(e){let{anchor:t,focus:n}=e,i=lS(t,"next"),r=lS(n,"next"),l=0>=lm(i,r)?"next":"previous";return lp(lP(i,l),lP(r,l))}function lE(e){let{direction:t,origin:n}=e,i=lo(n,r3[t]).getNodeAtCaret();return i?lo(i,t):lu(n.getParentOrThrow(),t)}function lb(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"root",n=[e];for(let i=ln(e)?e.getParentCaret(t):e.getSiblingCaret();null!==i;i=i.getParentCaret(t))n.push(lE(i));return n}function lM(e){return!!e&&e.origin.isAttached()}function lA(e){let t,i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"removeEmptySlices";if(e.isCollapsed())return e;let l="root",o="next",s=r,a=lF(e,o),u=lb(a.anchor,l),d=lb(a.focus.getFlipped(),l),c=new Set,f=[];for(let e of a.iterNodeCarets(l))if(ln(e))c.add(e.origin.getKey());else if(lt(e)){let{origin:t}=e;im(t)&&!c.has(t.getKey())||f.push(t)}for(let e of f)e.remove();for(let e of a.getTextSlices()){if(!e)continue;let{origin:t}=e.caret,n=t.getTextContentSize(),i=lE(lo(t,o)),r=t.getMode();if(Math.abs(e.distance)===n&&"removeEmptySlices"===s||"token"===r&&0!==e.distance)i.remove();else if(0!==e.distance){s="removeEmptySlices";let t=e.removeTextSlice(),n=e.caret.origin;if("segmented"===r){let e=t.origin,n=ny(e.getTextContent()).setStyle(e.getStyle()).setFormat(e.getFormat());i.replaceOrInsert(n),t=ls(n,o,t.offset)}n.is(u[0].origin)&&(u[0]=t),n.is(d[0].origin)&&(d[0]=t.getFlipped())}}for(let e of u)if(lM(e)){t=lw(e);break}for(let e of d)if(lM(e)){i=lw(e);break}let h=function(e,t,n){let i;if(!e||!t)return null;let r=e.getParentAtCaret(),l=t.getParentAtCaret();if(!r||!l)return null;let o=r.getParents().reverse();o.push(r);let s=l.getParents().reverse();s.push(l);let a=Math.min(o.length,s.length);for(i=0;i<a&&o[i]===s[i];i++);let u=(e,t)=>
2{let n;for(let r=i;r<e.length;r++){let i=e[r];if(rw(i))return;!n&&t(i)&&(n=i)}return n},d=u(o,rJ),c=d&&u(s,e=>n.has(e.getKey())&&rJ(e));return d&&c?[d,c]:null}(t,i,c);if(h){let[e,t]=h;lu(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 g=[t,i,...u,...d].find(lM);if(g)return l_(lP(lw(g),e.direction));n(269,JSON.stringify(u.map(e=>e.origin.__key)))}function lw(e){let t=function(e){let t=e;for(;ln(t);){let e=lc(t);if(!ln(e))break;t=e}return t}(e.getLatest()),{direction:n}=t;if(nm(t.origin))return le(t)?t:ls(t.origin,n,n);let i=t.getAdjacentCaret();return lt(i)&&nm(i.origin)?ls(i.origin,n,r3[n]):t}function lD(e){return le(e)&&e.offset!==la(e.origin,e.direction)}function lP(e,t){return e.direction===t?e:e.getFlipped()}function lF(e,t){return e.direction===t?e:lp(lP(e.focus,t),lP(e.anchor,t))}function lI(e,t,n){let i=lu(e,"next");for(let e=0;e<t;e++){let e=i.getAdjacentCaret();if(null===e)break;i=e}return lP(i,n)}function lL(e){let{origin:t,offset:i,direction:r}=e;if(i===la(t,r))return e.getSiblingCaret();if(i===la(t,r3[r]))return lE(e.getSiblingCaret());let[l]=t.splitText(i);return nm(l)||n(281),lP(lo(l,"next"),r)}function lR(e,t){return!0}function lK(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let i=[];for(let e of t)if(e&&"string"==typeof e)for(let[t]of e.matchAll(/\S+/g))i.push(t);return i}function lB(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return()=>{for(let e=t.length-1;e>=0;e--)t[e]();t.length=0}}e.s(["$addUpdateTag",0,rO,"$applyNodeReplacement",0,rP,"$caretFromPoint",0,lS,"$caretRangeFromSelection",0,lO,"$cloneWithProperties",0,rX,"$cloneWithPropertiesEphemeral",0,function(e){var t;return(t=rX(e))[tG]=!0,t},"$comparePointCaretNext",0,lm,"$copyNode",0,rD,"$create",0,function(e){let t=rY();return n7(),new(t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e))).klass},"$createChildrenArray",0,r2,"$createLineBreakNode",0,ne,"$createNodeSelection",0,n$,"$createParagraphNode",0,iA,"$createPoint",0,nT,"$createRangeSelection",0,nW,"$createRangeSelectionFromDom",0,function(e,t){return nU(null,e,t,null)},"$createTabNode",0,nv,"$createTextNode",0,ny,"$extendCaretToRange",0,lg,"$findMatchingParent",0,r1,"$getAdjacentChildCaret",0,lc,"$getAdjacentNode",0,rx,"$getAdjacentSiblingOrParentSiblingCaret",0,function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"root",n=0,i=e,r=lc(i);for(;null===r;){if(n--,!(r=i.getParentCaret(t)))return null;r=lc(i=r)}return r&&[r,n]},"$getCaretInDirection",0,lP,"$getCaretRange",0,lp,"$getCaretRangeInDirection",0,lF,"$getCharacterOffsets",0,nD,"$getChildCaret",0,lu,"$getChildCaretAtIndex",0,lI,"$getChildCaretOrSelf",0,ld,"$getCollapsedCaretRange",0,l_,"$getEditor",0,rY,"$getEditorDOMRenderConfig",0,rV,"$getNearestNodeFromDOMNode",0,i7,"$getNodeByKey",0,i4,"$getNodeByKeyOrThrow",0,rI,"$getNodeFromDOMNode",0,i6,"$getPreviousSelection",0,nJ,"$getRoot",0,re,"$getSelection",0,nj,"$getSiblingCaret",0,lo,"$getState",0,R,"$getTextPointCaret",0,ls,"$getWritableNodeState",0,B,"$hasAncestor",0,rb,"$insertNodes",0,function(e){let t=nj()||nJ();null===t&&(t=re().selectEnd()),t.insertNodes(e)},"$isBlockElementNode",0,function(e){return im(e)&&!e.isInline()},"$isChildCaret",0,ln,"$isDecoratorNode",0,iv,"$isEditorState",0,function(e){return e instanceof iO},"$isElementNode",0,im,"$isExtendableTextPointCaret",0,lD,"$isInlineElementOrDecoratorNode",0,function(e){return im(e)&&e.isInline()||iv(e)&&e.isInline()},"$isLeafNode",0,function(e){return nm(e)||nt(e)||iv(e)},"$isLexicalNode",0,function(e){return e instanceof tq},"$isLineBreakNode",0,nt,"$isNodeSelection",0,nA,"$isParagraphNode",0,iw,"$isRangeSelection",0,nb,"$isRootNode",0,iN,"$isRootOrShadowRoot",0,rw,"$isSiblingCaret",0,lt,"$isTabNode",0,nS,"$isTextNode",0,nm,"$isTextPointCaret",0,le,"$isTokenOrSegmented",0,iG,"$nodesOfType",0,function(e){let t=e.getType(),n=n8();if(n._readOnly){let e=rq(n).get(t);return e?Array.from(e.values()):[]}let i=n._nodeMap,r=[];for(let[,n]of i)n instanceof e&&n.__type===t&&n.isAttached()&&r.push(n);return r},"$normalizeCaret",0,lw,"$normalizeSelection__EXPERIMENTAL",0,H,"$onUpdate",0,rE,"$parseSerializedNode",0,function(e){return io(e,ie()._nodes)},"$removeTextFromCaretRange",0,lA,"$rewindSiblingCaret",0,lE,"$selectAll",0,function(e){let t=re();if(nb(e)){let t=e.anchor,n=e.focus,i=t.getNode().getTopLevelElementOrThrow().getParentOrThrow();return t.set(i.getKey(),0,"element"),n.set(i.getKey(),i.getChildrenSize(),"element"),H(e),e}{let e=t.select(0,t.getChildrenSize());return rn(H(e)),e}},"$setPointFromCaret",0,lN,"$setSelection",0,rn,"$setSelectionFromCaretRange",0,lT,"$setState",0,function(e,t,n){let i;if(n7(),"function"==typeof n){let r=e.getLatest(),l=R(r,t);if(i=n(l),t.isEqual(l,i))return r}else i=n;let r=e.getWritable();return B(r).updateFromKnown(t,i),r},"$splitAtPointCaretNext",0,function(e){let{$copyElementNode:t=rD,$splitTextPointCaretNext:n=lL,rootMode:i="shadowRoot",$shouldSplit:r=lR,removeEmptyDestination:l=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(le(e))return n(e);let o=e.getParentCaret(i);if(o){let{origin:n}=o;if(ln(e)){let e=lE(o);if(l&&n.isEmpty())return n.remove(),e;if(!n.canBeEmpty()||!r(n,"first"))return e}let i=function(e){let t=[];for(let n=e.getAdjacentCaret();n;n=n.getAdjacentCaret())t.push(n.origin);return t}(e);(i.length>0||!l&&n.canBeEmpty()&&r(n,"last"))&&o.insert(t(n).splice(0,0,i))}return o},"ArtificialNode__DO_NOT_USE",0,iE,"BLUR_COMMAND",0,tc,"CAN_REDO_COMMAND",0,ta,"CAN_UNDO_COMMAND",0,tu,"CLEAR_EDITOR_COMMAND",0,to,"CLEAR_HISTORY_COMMAND",0,ts,"CLICK_COMMAND",0,eA,"COLLABORATION_TAG",0,tQ,"COMMAND_PRIORITY_CRITICAL",0,4,"COMMAND_PRIORITY_EDITOR",0,0,"COMMAND_PRIORITY_HIGH",0,3,"COMMAND_PRIORITY_LOW",0,1,"COMMAND_PRIORITY_NORMAL",0,2,"COMPOSITION_END_TAG",0,t3,"COMPOSITION_START_TAG",0,t2,"CONTROLLED_TEXT_INSERTION_COMMAND",0,eK,"COPY_COMMAND",0,ti,"CUT_COMMAND",0,tr,"DEFAULT_EDITOR_DOM_CONFIG",0,iP,"DELETE_CHARACTER_COMMAND",0,eI,"DELETE_LINE_COMMAND",0,e$,"DELETE_WORD_COMMAND",0,eW,"DRAGOVER_COMMAND",0,tt,"DRAGSTART_COMMAND",0,te,"DROP_COMMAND",0,e9,"DecoratorNode",0,ix,"ElementNode",0,iy,"FOCUS_COMMAND",0,td,"FORMAT_ELEMENT_COMMAND",0,e8,"FORMAT_TEXT_COMMAND",0,eU,"HISTORIC_TAG",0,"historic","HISTORY_MERGE_TAG",0,tX,"HISTORY_PUSH_TAG",0,"history-push","INDENT_CONTENT_COMMAND",0,e5,"INSERT_LINE_BREAK_COMMAND",0,eL,"INSERT_PARAGRAPH_COMMAND",0,eR,"INSERT_TAB_COMMAND",0,e6,"INTERNAL_$isBlock",0,rJ,"KEY_ARROW_DOWN_COMMAND",0,eQ,"KEY_ARROW_LEFT_COMMAND",0,eH,"KEY_ARROW_RIGHT_COMMAND",0,eV,"KEY_ARROW_UP_COMMAND",0,eX,"KEY_BACKSPACE_COMMAND",0,e1,"KEY_DELETE_COMMAND",0,e3,"KEY_DOWN_COMMAND",0,eY,"KEY_ENTER_COMMAND",0,eZ,"KEY_ESCAPE_COMMAND",0,e2,"KEY_SPACE_COMMAND",0,e0,"KEY_TAB_COMMAND",0,e4,"LineBreakNode",0,t9,"MOVE_TO_END",0,eG,"MOVE_TO_START",0,eq,"OUTDENT_CONTENT_COMMAND",0,e7,"PASTE_COMMAND",0,eB,"PASTE_TAG",0,"paste","ParagraphNode",0,ib,"REDO_COMMAND",0,eJ,"REMOVE_TEXT_COMMAND",0,ez,"RootNode",0,iS,"SELECTION_CHANGE_COMMAND",0,eb,"SELECTION_INSERT_CLIPBOARD_NODES_COMMAND",0,eM,"SELECT_ALL_COMMAND",0,tl,"SKIP_COLLAB_TAG",0,"skip-collab","SKIP_DOM_SELECTION_TAG",0,t0,"SKIP_SCROLL_INTO_VIEW_TAG",0,tZ,"SKIP_SELECTION_FOCUS_TAG",0,t1,"TEXT_TYPE_TO_FORMAT",0,v,"TabNode",0,n
2x,"TextNode",0,nu,"UNDO_COMMAND",0,ej,"addClassNamesToElement",0,function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];let r=lK(...n);r.length>0&&e.classList.add(...r)},"buildImportMap",0,function(e){return e},"configExtension",0,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t},"createCommand",0,eE,"createEditor",0,function(e){var t,n;let i,r,l,o,s=e||{},a=n1,u=s.theme||{},d=void 0===e?a:s.parentEditor||null,c=s.disableEvents||!1,f=ik(),h=s.namespace||(null!==d?d._config.namespace:ro()),g=s.editorState,_=[iS,nu,t9,nx,ib,iE,...s.nodes||[]],{onError:p,html:y}=s,m=void 0===s.editable||s.editable;if(void 0===e&&null!==a)i=a._nodes;else{i=new Map;for(let e=0;e<_.length;e++){let t=_[e],n=null,r=null;if("function"!=typeof t){let e=t;t=e.replace,n=e.with,r=e.withKlass||null}r0(t);let l=t.getType(),o=function(e){let t=new Set,n=new Set,i=e;for(;i;){let{ownNodeConfig:e}=r0(i),r=i.transform;if(!n.has(r)){n.add(r);let e=i.transform();e&&t.add(e)}if(e){let n=e.$transform;n&&t.add(n),i=e.extends}else{let e=Object.getPrototypeOf(i);i=e.prototype instanceof tq&&e!==tq?e:void 0}}return t}(t);i.set(l,{exportDOM:y&&y.export?y.export.get(t):void 0,klass:t,replace:n,replaceWithKlass:r,sharedNodeState:function(e){let t=new Map,n=new Set;for(let i="function"==typeof e?e:e.replace;i.prototype&&void 0!==i.prototype.getType;i=Object.getPrototypeOf(i)){let{ownNodeConfig:e}=r0(i);if(e&&e.stateConfigs)for(let i of e.stateConfigs){let e;"stateConfig"in i?(e=i.stateConfig,i.flat&&n.add(e.key)):e=i,t.set(e.key,e)}}return{flatKeys:n,sharedConfigMap:t}}(_[e]),transforms:o})}}let C=new iL(f,d,i,{disableEvents:c,dom:{...iP,...e&&e.dom},namespace:h,theme:u},p||console.error,(t=i,n=y?y.import:void 0,r=new Map,l=new Set,o=e=>{Object.keys(e).forEach(t=>{let n=r.get(t);void 0===n&&(n=[],r.set(t,n)),n.push(e[t])})},t.forEach(e=>{let t=e.klass.importDOM;if(null==t||l.has(t))return;l.add(t);let n=t.call(e.klass);null!==n&&o(n)}),n&&o(n),r),m,e);return void 0!==g&&(C._pendingEditorState=g,C._dirtyType=2),C.registerCommand(ew,tI,0),C.registerCommand(eD,tL,0),C.registerCommand(eP,tR,0),C.registerCommand(eF,tK,0),C.registerCommand(eY,tz,0),C},"createState",0,function(e,t){return new L(e,t)},"declarePeerDependency",0,function(e,t){return[e,t]},"defineExtension",0,function(e){return e},"getDOMSelection",0,rK,"getDOMSelectionFromTarget",0,rB,"getDOMTextNode",0,iX,"getNearestEditorFromDOMNode",0,iJ,"getStaticNodeConfig",0,r0,"getStyleObjectFromCSS",0,t6,"getTextDirection",0,function(e){return C.test(e)?"rtl":x.test(e)?"ltr":null},"isBlockDomNode",0,rj,"isCurrentlyReadOnlyMode",0,n5,"isDOMDocumentNode",0,iq,"isDOMNode",0,rW,"isDocumentFragment",0,r$,"isHTMLAnchorElement",0,function(e){return rz(e)&&"A"===e.tagName},"isHTMLElement",0,rz,"isInlineDomNode",0,rU,"isLexicalEditor",0,ij,"isModifierMatch",0,rf,"isSelectionCapturedInDecoratorInput",0,i$,"isSelectionWithinEditor",0,iU,"makeStepwiseIterator",0,ly,"mergeRegister",0,lB,"normalizeClassNames",0,lK,"removeClassNamesFromElement",0,function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];let r=lK(...n);r.length>0&&e.classList.remove(...r)},"removeFromParent",0,i0,"safeCast",0,function(e){return e},"setDOMStyleFromCSS",0,t7,"setDOMStyleObject",0,function(e,t){for(let n in t){let i=t[n];null==i?e.removeProperty(n):t5(e,n,i)}},"setDOMUnmanaged",0,function(e){e.__lexicalUnmanaged=!0},"setNodeIndentFromDOM",0,rQ,"shallowMergeConfig",0,function(e,t){if(!t||e===t)return e;for(let n in t)if(e[n]!==t[n])return{...e,...t};return e},"toggleTextFormatType",0,iQ])}]);
3
4//# debugId=9afaacf9-45ca-c1d8-c089-9cf20968adaa
5//# sourceMappingURL=25q2z_5sj_3fy.js.map

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