1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6886],{37532:(e,t,n)=>{let i;function r(e,...t){let n=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;for(let n of(i.append("code",e),t))i.append("v",n);throw n.search=i.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function l(e,...t){let n=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;for(let n of(i.append("code",e),t))i.append("v",n);n.search=i.toString(),console.warn(`Minified Lexical warning #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}n.d(t,{$Mp:()=>u,$ey:()=>tg,$iu:()=>sc,A$M:()=>lZ,A6j:()=>tT,A7V:()=>rx,AX0:()=>tk,AcB:()=>sr,AcJ:()=>rF,Ap3:()=>nw,Ave:()=>sa,B1s:()=>oO,BtT:()=>oT,CMH:()=>lG,CaD:()=>ep,Chh:()=>ei,Cku:()=>is,Csq:()=>sm,Cyw:()=>rc,DTJ:()=>oP,DzG:()=>p,ELr:()=>lI,Ey8:()=>nW,FAd:()=>y,FEN:()=>tf,Fb2:()=>oS,FfB:()=>or,FyW:()=>r5,GMe:()=>i8,GRK:()=>rC,H1t:()=>rL,H2A:()=>iI,HEf:()=>sA,HYn:()=>tH,Hkj:()=>lS,Htb:()=>ir,Huu:()=>tM,I2P:()=>n9,I8X:()=>en,IR1:()=>ts,IWk:()=>lY,IgX:()=>C,IlV:()=>o3,IqF:()=>lR,J61:()=>x,JM3:()=>tv,J_T:()=>rk,JqA:()=>nv,K6z:()=>tZ,K8K:()=>l5,KfJ:()=>tq,KiH:()=>oC,Kp7:()=>rd,LYZ:()=>rX,LZn:()=>M,L_P:()=>ng,MK6:()=>n0,MSq:()=>oi,MZu:()=>nZ,Mgk:()=>l0,MvL:()=>tn,NEy:()=>iL,NG9:()=>sh,NZv:()=>sx,NiT:()=>lu,Nwr:()=>sF,O0w:()=>sN,OCP:()=>ol,OQi:()=>nE,OXk:()=>tF,OpE:()=>oZ,PiT:()=>tI,Pl0:()=>rG,Q$N:()=>tA,Q2o:()=>i1,R3g:()=>lV,RB3:()=>rb,RTZ:()=>it,RTo:()=>tE,Rb_:()=>r2,RpX:()=>tb,S1w:()=>iw,S3D:()=>m,SKc:()=>tj,Sdt:()=>sD,Sr4:()=>tK,Sz2:()=>oh,T40:()=>nb,T8n:()=>o6,TJt:()=>sn,TQ:()=>lB,TSH:()=>ox,Tc1:()=>sE,TeU:()=>v,TgX:()=>tB,U5P:()=>of,UDz:()=>tN,Uax:()=>i3,Uqh:()=>rZ,V30:()=>tC,VSO:()=>tU,WKo:()=>rv,WWb:()=>tV,WgU:()=>rP,WuB:()=>tu,XI_:()=>nM,XKQ:()=>td,YPs:()=>r3,YW5:()=>tP,YwR:()=>h,ZB7:()=>sO,ZKf:()=>tx,_On:()=>l8,_jw:()=>iK,a9V:()=>oe,aT4:()=>f,bM3:()=>tc,bMH:()=>nk,bSg:()=>rO,bbF:()=>tw,bqM:()=>l1,c_R:()=>r4,cmH:()=>oQ,d8p:()=>tr,dCx:()=>lD,da8:()=>rI,dxY:()=>od,e1k:()=>lb,erb:()=>o7,ev7:()=>nQ,ex6:()=>oA,fD3:()=>rw,fGB:()=>ra,fUS:()=>tz,ff4:()=>ru,fwY:()=>nN,gCZ:()=>tO,guI:()=>tt,hVL:()=>il,hVZ:()=>rg,haT:()=>rh,hdR:()=>sC,hi0:()=>t_,hkE:()=>tm,i0_:()=>on,ieJ:()=>rR,jGx:()=>S,jZM:()=>rD,jj2:()=>lH,k1Q:()=>sT,kFe:()=>nG,lJ7:()=>rM,lSZ:()=>sp,lVE:()=>sw,lue:()=>r0,mB:()=>ty,mB$:()=>r6,mWO:()=>se,mYE:()=>iP,n0X:()=>nT,n1P:()=>lf,nAs:()=>lX,nsf:()=>ln,o4q:()=>T,oqR:()=>ti,pGK:()=>sy,pJU:()=>li,pTq:()=>l$,peL:()=>lJ,phO:()=>ov,pz6:()=>d,q3P:()=>oc,qxK:()=>o,rN:()=>oX,rUs:()=>ik,rdQ:()=>sk,riq:()=>tR,sM8:()=>k,sTu:()=>nY,sWS:()=>st,sY8:()=>a,sby:()=>l6,sik:()=>tL,sne:()=>nA,t5V:()=>tJ,u5G:()=>t$,uTE:()=>iT,urt:()=>et,uwZ:()=>o5,v0B:()=>ry,v39:()=>l2,vAA:()=>l4,vE9:()=>sb,vJq:()=>iN,vU2:()=>oF,viC:()=>tp,w$Z:()=>tD,wH$:()=>rT,waI:()=>th,wb_:()=>rB,xKE:()=>nO,xL4:()=>lo,xQ8:()=>sf,xyu:()=>rK,y68:()=>iS});let o="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,s=o&&"documentMode"in document?document.documentMode:null,a=o&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),u=o&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),f=!(!o||!("InputEvent"in window)||s)&&"getTargetRanges"in new window.InputEvent("input"),d=o&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,c=o&&/Android/.test(navigator.userAgent),h=o&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!c,g=o&&/^(?=.*Chrome).*/i.test(navigator.userAgent),_=o&&c&&g,p=o&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&a&&!g,y=1,m=2,x=4,C=8,S=16,v=32,T=64,k=128,b=h||d||p?"\xa0":"â",N=u?"\xa0":b,w="Ö-ß¿ï¬-﷽ﹰ-ﻼ",E="A-Za-z\xc0-\xd6\xd8-\xf6\xf8-ʸÌ-Öà -á¿¿ââ°-ï¬ï¸-﹯﻽-ï¿¿",M=(RegExp("^[^"+E+"]*["+w+"]"),RegExp("^[^"+w+"]*["+E+"]"),{bold:1,capitalize:1024,code:16,highlight:k,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512}),O={directionless:1,unmergeable:2},A={center:2,end:6,justify:4,left:1,right:3,start:5},D={2:"center",6:"end",4:"justify",1:"left",3:"right",5:"start"},F={normal:0,segmented:2,token:1},P={0:"normal",2:"segmented",1:"token"},I="$config";function L(){return on()._blockCursorElement}class K{element;before;after;constructor(e,t,n){this.element=e,this.before=t||null,this.after=n||null}withBefore(e){return new K(this.element,e,this.after)}withAfter(e){return new K(this.element,this.before,e)}withElement(e){return this.element===e?this:new K(e,this.before,this.after)}insertChild(e){let t=this.getInsertionAnchor();return null!==t&&t.parentElement!==this.element&&r(357),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&r(358),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&r(359),this.element.replaceChild(e,t),this}getFirstChild(){let e=this.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;return t===this.getInsertionAnchor()?null:t}getFirstChildAnchor(){return this.after}resolveLeafPosition(e,t,n){if(this.element===e)return t===e&&0===n?"before":"after";let i=z(e,this.element);if(null===i)return"after";let r=Array.prototype.indexOf.call(e.childNodes,i);if(r<0)return"after";if(t===e)return n<=r?"before":"after";let l=z(e,t);if(null===l)return"after";let o=Array.prototype.indexOf.call(e.childNodes,l);return o>=0&&o<=r?"before":"after"}getInsertionAnchor(){return this.before}}function z(e,t){let n=t;for(;null!==n&&n.parentNode!==e;)n=n.parentNode;return n}class B extends K{withBefore(e){return new B(this.element,e,this.after)}withAfter(e){return new B(this.element,this.before,e)}withElement(e){return this.element===e?this:new B(e,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()}getFirstChildAnchor(){var e;let t=super.getFirstChildAnchor(),n=t?t.nextSibling:this.element.firstChild;for(;null!==(e=n)&&1===e.nodeType&&e.hasAttribute("data-lexical-slot");)t=n,n=n.nextSibling;let i=t?t.nextSibling:this.element.firstChild;return null!==i&&i===L()?i:t}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){(this.element.__lexicalLastChildKind=e,null===e)?this.removeManagedLineBreak():this.insertManagedLineBreak("decorator"===e&&(p||d||h))}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=lZ().createElement("br");if(r.setAttribute("data-lexical-managed-linebreak","true"),n.insertBefore(r,i),e){let e=lZ().createElement("img");e.setAttribute("data-lexical-managed-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=this.getFirstChild(),t=this.getInsertionAnchor(),n=0;for(let i=this.element.firstChild;null!==i&&i!==e&&i!==t;i=i.nextSibling)n++;return n}resolveChildIndex(e,t,n,i){if(n===this.element){let t=this.getFirstChildOffset(),n=L(),r=this.element.childNodes,l=Math.min(i,r.length),o=0;for(let e=t;e<l;e++)r[e]!==n&&o++;return[e,Math.min(o,e.getChildrenSize())]}let r=R(t,n);r.push(i);let l=R(t,this.element),o=e.getIndexWithinParent();for(let e=0;e<l.length;e++){let t=r[e],n=l[e];
1if(void 0===t||t<n)break;if(t>n){o+=1;break}}return[e.getParentOrThrow(),o]}}function R(e,t){let n=[],i=t;for(;i!==e&&null!==i;i=i.parentNode){let e=0;for(let t=i.previousSibling;null!==t;t=t.previousSibling)e++;n.push(e)}return i!==e&&r(225),n.reverse()}try{i="0.49.0+prod.esm"}catch(e){}let W=i??'"<unknown>+source"';class ${_front=new Set;_back=new Set;_cache;get size(){return this._front.size+this._back.size}addBack(e){return delete this._cache,this._front.has(e)||this._back.add(e),this}addFront(e){return delete this._cache,this._back.has(e)||this._front.add(e),this}delete(e){return delete this._cache,this._front.delete(e)||this._back.delete(e)}toArray(){let e=Array.from(this._front).reverse();for(let t of this._back)e.push(t);return e}toReadonlyArray(){return this._cache=this._cache||this.toArray(),this._cache}[Symbol.iterator](){return this.toReadonlyArray()[Symbol.iterator]()}}function U(e,t=1e3){return e instanceof H?e.clone():e.size<t?new Map(e):(new H).init(new Map(e),void 0,e.size)}class H{_mutable=!1;_old=void 0;_nursery=void 0;_size=0;clone(){return this._mutable=!1,(new H).init(this._old,this._nursery,this._size)}init(e,t,n){return this._old=e,this._nursery=t,this._size=n,this}get size(){return this._size}has(e){return void 0!==this.get(e)}getWithTombstone(e){let t=this._nursery&&this._nursery.get(e);return void 0!==t?t:this._old&&this._old.get(e)}get(e){let t=this.getWithTombstone(e);return null===t?void 0:t}shouldCompact(){return void 0!==this._nursery&&2*this._nursery.size>this._size}getNursery(){return this._mutable&&this._nursery||(this.compact(),this._nursery=new Map(this._nursery),this._mutable=!0),this._nursery}compact(e=!1){if(this._nursery&&this._nursery.size>0&&(e||this.shouldCompact())){let e=new Map(this._old);for(let[t,n]of this._nursery)null!==n?e.set(t,n):e.delete(t);this._old=e,this._nursery=void 0}return this._mutable=!1,this}set(e,t){let n=this.getWithTombstone(e);if(n===t)return this;let i=this.getNursery();return null!=n||(this._size++,null===n&&i.delete(e)),i.set(e,t),this}delete(e){let t=this.has(e);return t&&(this.getNursery().set(e,null),this._size--),t}getOrInsert(e,t){let n=this.get(e);return void 0!==n?n:(this.set(e,t),t)}getOrInsertComputed(e,t){let n=this.get(e);if(void 0!==n)return n;let i=t(e);return this.set(e,i),i}clear(){this._mutable=!1,this._old=void 0,this._nursery=void 0,this._size=0}*keys(){for(let e of this.entries())yield e[0]}*values(){for(let e of this.entries())yield e[1]}*entries(){let e=this._nursery,t=this._old;if(t)for(let n of t){let t=n[0],i=e?e.get(t):void 0;null!==i&&(void 0!==i&&(n[1]=i),yield n)}if(e)for(let n of e)null===n[1]||t&&t.has(n[0])||(yield n)}forEach(e,t){for(let[n,i]of(void 0!==t&&(e=e.bind(t)),this.entries()))e(i,n,this)}get[Symbol.toStringTag](){return"GenMap"}[Symbol.iterator](){return this.entries()}}function j(e,t,n,i,r,l){if(ru(e)){let o=e.getFirstChild();for(;null!==o;){let e=o.__key;o.__parent===t&&((ru(o)||ow(o)&&null!==o.__slots)&&j(o,e,n,i,r,l),n.has(e)||l.delete(e),r.push(e)),o=o.getNextSibling()}}for(let o of ow(e)&&null!==e.__slots?e.__slots.values():[]){let e=i.get(o);void 0!==e&&oE(e)&&e.__slotHost===t&&((ru(e)||ow(e)&&null!==e.__slots)&&j(e,o,n,i,r,l),n.has(o)||l.delete(o),r.push(o))}}let J=!1,V=0;function q(e){V=e.timeStamp}function Y(e,t,n){let i="BR"===e.nodeName,r=t.__lexicalLineBreak;return r&&(e===r||i&&e.previousSibling===r)||i&&void 0!==ll(e,n)}function G(e,t,n){J=!0;let i=performance.now()-V>100;try{ro(e,()=>{let r=iN()||e.read("latest",()=>{let e=iN();return null!==e?e.clone():null}),l=new Map,o=e._editorState,s=e._blockCursorElement,a=!1,f="";for(let n=0;n<t.length;n++){let d=t[n],c=d.type,h=d.target,g=function(e,t,n){for(let i=e;i&&!og(i);i=lD(i)){let e=ll(i,t);if(void 0!==e){let t=ln(e,n);if(t)return rc(t)||!l6(i)?void 0:[i,t]}}}(h,e,o);if(!g)continue;let[_,p]=g;if("characterData"===c)i&&nG(p)&&r3(h)&&function(e,t,n){if(n9(e)){let t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return r3(t)&&n.isAttached()}(r,h,p)&&function(e,t,n){let i=lJ(lK(n)),r=i&&l0(i,n._rootElement),l=null,o=null;null!==r&&r.anchorNode===e&&(l=r.anchorOffset,o=r.focusOffset);let s=e.nodeValue;null!==s&&lm(t,s,l,o,!1)}(h,p,e);else if("childList"===c){a=!0;let t=d.addedNodes;for(let n=0;n<t.length;n++){let i=t[n],r=li(i),l=i.parentNode;if(!(null==l||i===s||null!==r||Y(i,l,e)||e._slotsUsed&&l6(i)&&i.hasAttribute("data-lexical-slot")||og(i))){if(u){let e=(l6(i)?i.innerText:null)||i.nodeValue;e&&(f+=e)}l.removeChild(i)}}let n=d.removedNodes,i=n.length;if(i>0){let t=0;for(let r=0;r<i;r++){let i=n[r];(Y(i,h,e)||s===i)&&(h.appendChild(i),t++)}i!==t&&l.set(_,p)}}}if(l.size>0)for(let[t,n]of l)n.reconcileObservedMutation(t,e);let d=n.takeRecords();if(d.length>0){for(let t=0;t<d.length;t++){let n=d[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||Y(n,r,e)||l.removeChild(n)}}n.takeRecords()}null!==r&&(a&&lf(r),u&&lM(e)&&r.insertRawText(f))})}finally{J=!1}}function X(e){let t=e._observer;null!==t&&G(e,t.takeRecords(),t)}function Z(e){0===V&&lK(e).addEventListener("textInput",q,!0),e._observer=new MutationObserver((t,n)=>{G(e,t,n)})}let Q="latest";class ee{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;constructor(e,t){this.key=e,this.parse=t.parse.bind(t),this.unparse=(t.unparse||eu).bind(t),this.isEqual=(t.isEqual||Object.is).bind(t),this.defaultValue=this.parse(void 0),this.resetOnCopyNode=t.resetOnCopyNode||!1}}function et(e,t){return new ee(e,t)}function en(e,t,n=Q){let i=(n===Q?e.getLatest():e).__state;return i?i.getValue(t):t.defaultValue}
1function ei(e,t,n){let i;if(iZ(),"function"==typeof n){let r=e.getLatest(),l=en(r,t);if(i=n(l),t.isEqual(l,i))return r}else i=n;let r=e.getWritable();return eo(r).updateFromKnown(t,i),r}let er=new Set(["__proto__","constructor","prototype"]);class el{node;knownState;unknownState;sharedNodeState;size;constructor(e,t,n,i=new Map,r){this.node=e,this.sharedNodeState=t,this.unknownState=n,this.knownState=i;let{sharedConfigMap:l}=this.sharedNodeState,o=void 0!==r?r: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}(l,n,i);this.size=o}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 ea(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 el(e,t,function(e,t,n){let i;if(n)for(let[r,l]of Object.entries(n)){if(er.has(r))continue;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=ea(r)),this.size++),i.set(e,t)}updateFromUnknown(e,t){if(er.has(e))return;let n=this.sharedNodeState.sharedConfigMap.get(e);n?this.updateFromKnown(n,n.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){let{knownState:t}=this;for(let e of t.keys())t.set(e,e.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(let[t,n]of Object.entries(e))this.updateFromUnknown(t,n)}}function eo(e){let t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new el(t,es(t));return t.__state=n,n}function es(e){return e.__state?e.__state.sharedNodeState:rV(on(),e.getType()).sharedNodeState}function ea(e){if(e)for(let t in e)return e}function eu(e){return e}function ef(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 ed(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 ec(e,t){let n=e.__state;return n&&n.node===e?n.getWritable(t):n}function eh(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&&ef(n,e,t)||t&&ef(n,t,e)||e&&ed(n,e,t)||t&&ed(n,t,e))}(a,u))}function eg(e,t){let n=e.mergeWithSibling(t),i=i2()._normalizedNodes;return i.add(e.__key),i.add(t.__key),n}function e_(e){let t,n,i=e;if(""!==i.__text||!i.isSimpleText()||i.isUnmergeable()){for(;null!==(t=i.getPreviousSibling())&&nG(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(""!==t.__text){eh(t,i)&&(i=eg(t,i));break}t.remove()}for(;null!==(n=i.getNextSibling())&&nG(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(""!==n.__text){eh(i,n)&&(i=eg(i,n));break}n.remove()}}else i.remove()}function ep(e){return ey(e.anchor),ey(e.focus),e}function ey(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),nG(t)){e.set(t.__key,n?t.getTextContentSize():0,"text",!0);break}if(!ru(t))break;e.set(t.__key,n?t.getChildrenSize():0,"element",!0)}}let em=Symbol.for("@lexical/CachedTextSize");function ex(e,t){return eI.read(()=>{let n=0,i=e;for(let e=0;e<t&&null!==i;e++){let l=eP.get(i);if(void 0===l&&r(345,i),ru(l)){let o=eL.get(i);if(void 0!==o&&ru(o)&&o.__parent!==l.__parent)n+=l.getTextContentSize();else{let e=eK.get(i),t=e&&e.__lexicalTextContent;"string"!=typeof t&&r(346,l.getType()),n+=t.length}e<t-1&&!l.isInline()&&(n+=2)}else{let e=l[em];void 0===e&&r(347,l.getType(),i),n+=e}i=l.__next}return n},{editor:ev})}function eC(e){ru(e)||void 0===e[em]&&(e[em]=nG(e)?e.__text.length:e.getTextContentSize())}let eS,ev,eT,ek="",eb=null,eN=null,ew=null;function eE(){return{firstTextKey:ew,format:eb,style:eN}}function eM(e){null!==e.firstTextKey&&(eb=e.format,eN=e.style,ew=e.firstTextKey)}function eO(e){if(null!==ew)return;let t=e.__lexicalFirstTextKey;if(void 0===t&&r(348),null===t)return;let n=eL.get(t);nG(n)&&(eb=n.getFormat(),eN=n.getStyle(),ew=t)}let eA,eD,eF,eP,eI,eL,eK,ez,eB,eR,eW=!1,e$=!1;function eU(e,t){let n=eP.get(e),i=eL.has(e);if(null!==t){let n=te(e);n.parentNode===t&&t.removeChild(n)}if(!i){if(ev._keyToDOMMap.delete(e),ru(n)){let e=ok(n,eP);eH(e,0,e.length-1,null)}if(void 0!==n){for(let e of eZ(n).values()){let t=e0(e);eU(e,null),null!==t&&t.remove()}lw(eB,eT,eA,n,"destroyed")}}}function eH(e,t,n,i){for(let r=t;r<=n;++r){let t=e[r];void 0!==t&&eU(t,i)}}function ej(e,t){e.setProperty("text-align",t)}function eJ(e,t){let n=eS.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)}e.style.setProperty("padding-inline-start",0===t?"":`calc(${t} * var(--lexical-indent-base-value, 40px))`)}function eV(e,t){let n=e.style;0===t?ej(n,""):1===t?ej(n,"left"):2===t?ej(n,"center"):3===t?ej(n,"right"):4===t?ej(n,"justify"):5===t?ej(n,"start"):6===t&&ej(n,"end")}function eq(e,t){let n=function(e){let t=e.__dir;if(null!==t)return t;if(rg(e))return null;let n=e.getParent();return null===n||lR(n)&&null===n.__dir?"auto":null}(t);null!==n?e.dir=n:e.removeAttribute("dir")}function eY(e){let t=lZ().createElement("div");return t.setAttribute("data-lexical-slot",e),t.style.display="none",t}function eG(e,t,n){t||"false"===e.contentEditable?function(e,t=on()){let n=t.isEditable();e.contentEditable=n?"true":"false",n?e.__lexicalEditor=t:delete e.__lexicalEditor}(n,ev):n.removeAttribute("contenteditable")}function eX(e,t,n){let i=ek,r=eE();ek="";let l="",o=rc(e);for(let[i,r]of n){let n=eY(i);eG(t,o,n),t.appendChild(n),ek="";let s=eE();e2(r,or(e,n,ev)),eM(s),eQ(e,i,t,n),l+=ek}return eM(r),ek=i,l}function eZ(e){return ow(e)&&null!==e.__slots?e.__slots:oN}function eQ(e,t,n,i){let r=eR.$getSlotTargetElement(e,t,n,ev);null!==r&&(i.parentElement!==r&&r.appendChild(i),i.style.display="")}function e0(e){let t=eK.get(e);return void 0!==t?t.parentElement:null}function e1(e,t,n){let i=eZ(e),r=eZ(t);for(let[e,t]of i)if(!r.has(e)){let e=e0(t);eU(t,null),null!==e&&e.remove()}let l=ek,o=eE(),s="",a=null,u=rc(t);for(let[e,l]of r){let r=i.get(e),o=void 0!==r?e0(r):null;ek="";let f=eE();if(null===o){o=eY(e);let i=null;for(let e of n.children)if(!e.hasAttribute("data-lexical-slot")){i=e;break}n.insertBefore(o,i),e2(l,or(t,o,ev))}else r===l?e5(l,o):(void 0!==r&&eU(r,o),e2(l,or(t,o,ev)));if(eM(f),eG(n,u,o),eQ(t,e,n,o),s+=ek,o.parentElement===n){let e=null===a?n.firstChild:a.nextSibling;e!==o&&n.insertBefore(o,e),a=o}}return eM(o),ek=l,s}function e2(e,t){var n,i;let l=eL.get(e);if(void 0===l&&r(60),null!==t){let n=eP.get(e);if(void 0!==n){let i=eK.get(e);if(void 0!==i){let r=oE(n)?n.__slotHost:null,o=oE(l)?l.__slotHost:null,s=n.__parent!==l.__parent||r!==o,a=null!==o&&i.parentElement!==t.element;if(s||a)return t.insertChild(i),e5(e,t.element)}}}let o=eR.$createDOM(l,ev);if(function(e,t,n){let i=n._keyToDOMMap;lr(t,n,e),i.set(e,t)}(e,o,ev),nG(l)?o.setAttribute("data-lexical-text","true"):rc(l)&&(o.setAttribute("data-lexical-decorator","true"),i={captureSelection:!0}
1,(n=o).__lexicalUnmanaged=!0,i&&void 0!==i.captureSelection&&(n.__lexicalCapturedSelection=i.captureSelection)),ru(l)){let e=l.__indent,t=l.__size;eq(o,l),0!==e&&eJ(o,e);let n=eZ(l),i=n.size>0?eX(l,o,n):"";if(0===t)o.__lexicalTextContent=i,o.__lexicalFirstTextKey=null,ek+=i,n.size>0&&(o.__lexicalSlotTextLength=i.length);else{let e=ek;if(e3(ok(l,eL),l,0,t-1,or(l,o,ev)),""!==i){let t=o.__lexicalTextContent||"";o.__lexicalTextContent=i+t,ek=e+i+t}n.size>0&&(o.__lexicalSlotTextLength=i.length)}let r=l.__format;0!==r&&eV(o,r),l.isInline()||e6(null,l,o)}else{let t=l.getTextContent();if(rc(l)){let t=l.decorate(ev,eS);null!==t&&e7(e,t),o.contentEditable="false";let n=eZ(l);n.size>0&&eX(l,o,n)}ek+=t}return null!==t&&t.insertChild(o),eR.$decorateDOM(l,null,o,ev),eC(l),lw(eB,eT,eA,l,"created"),o}function e3(e,t,n,i,l){let o=ek,s=eE();ek="",eb=null,eN=null,ew=null;let a=n;for(;a<=i;++a){let t=eE();e2(e[a],l);let n=eL.get(e[a]);null!==n&&nG(n)?null===eb&&(eb=n.getFormat(),eN=n.getStyle(),ew=n.__key):ru(n)&&a<i&&!n.isInline()&&(ek+="\n\n"),eM(t)}let u=ev._keyToDOMMap.get(t.__key);void 0===u&&r(349,t.__key),u.__lexicalTextContent=ek,u.__lexicalFirstTextKey=ew,ek=o+ek,eM(s)}function e6(e,t,n){let i=or(t,n,ev),r=i.element.__lexicalLastChildKind??null,l=function(e,t){if(e){let n=e.__last;if(n){let e=t.get(n);if(e)return rT(e)?"line-break":rc(e)&&e.isInline()?"decorator":null}return eZ(e).size>0?null:"empty"}return null}(t,eL);r!==l&&i.setManagedLineBreak(l)}function e4(e,t,n){let i=t.__lexicalFirstTextKey;if(null!=i){let t=e.__key,r=i;for(;null!==r;){let e=eL.get(r);if(void 0===e){r=null;break}if(e.__parent===t)break;r=e.__parent}if(null!==r&&!n.has(r)){let e=eL.get(i);if(nG(e))return eb=e.getFormat(),void(eN=e.getStyle())}}t.__lexicalFirstTextKey=ew}function e5(e,t){let n=eP.get(e),i=eL.get(e);void 0!==n&&void 0!==i||r(61);let l=eW||eF.has(e)||eD.has(e),o=lA(ev,e);if(n===i&&!l){let e;
1if(ru(n)){let t=o.__lexicalTextContent;"string"!=typeof t&&r(355,n.getType()),e=t,eO(o)}else e=n.getTextContent();return ek+=e,o}if(n!==i&&l&&lw(eB,eT,eA,i,"updated"),eR.$updateDOM(i,n,o,ev)){let n=e2(e,null);return null===t&&r(62),t.replaceChild(n,o),eU(e,null),n}if(ru(n)){ru(i)||r(334,e);let t=i.__indent;(eW||t!==n.__indent)&&eJ(o,t);let s=i.__format;(eW||s!==n.__format)&&eV(o,s);let a=l&&(eZ(i).size>0||eZ(n).size>0)?e1(n,i,o):"";if(l){let e=ek;if(function(e,t,n){eb=null,eN=null,ew=null,function(e,t,n){let i=ek,l=e.__size,o=t.__size;ek="";let s=n.element,a=ev._keyToDOMMap.get(t.__key);void 0===a&&r(351,t.__key);let u=o-l;if(!eW&&1>=Math.abs(u)&&l>=4&&e.__first===t.__first&&(0!==u||!ev._cloneNotNeeded.has(e.__key))){let l=a.__lexicalTextContent,f=ez.get(e.__key);if(!eW&&"string"==typeof l&&void 0!==f){let o=function(e,t){let n=t.size;if(0===n||n>=e.__size)return null;let i=e.__last,r=null,l=0;for(;null!==i&&l<n;){if(!t.has(i))return null;r=i;let e=eL.get(i);if(void 0===e)return null;i=e.__prev,l++}return l!==n||null!==i&&t.has(i)?null:r}(t,f);if(null!==o){let d=f.size;if(0===u){let e=ex(o,d),n=o,u=0;for(;null!==n&&u<d;){let e=eL.get(n);if(void 0===e)break;let t=eE();e5(n,s),nG(e)&&null===eb&&(eb=e.getFormat(),eN=e.getStyle(),ew=e.__key),eM(t),n=e.__next,u++}let c="";for(n=o,u=0;null!==n&&u<d;){let e,t=eL.get(n);if(void 0===t)break;if(ru(t)){let i=ev._keyToDOMMap.get(n),l=i&&i.__lexicalTextContent;"string"!=typeof l&&r(352,t.getType()),e=l}else e=t.getTextContent();c+=e,u<d-1&&ru(t)&&!t.isInline()&&(c+="\n\n"),n=t.__next,u++}let h=a.__lexicalSlotTextLength||0,g=h>0?l.slice(h):l,_=g.slice(0,g.length-e)+c;return a.__lexicalTextContent=_,ek=i+_,e4(t,a,f)}if(function(e,t,n,i,l,o,s,a){if(1!==a&&-1!==a||s!==(1===a?2:1))return!1;let u=s-a,f=e.__last;for(let e=0;e<u-1;e++){if(null===f)return!1;let e=eP.get(f);if(void 0===e)return!1;f=e.__prev}if(null===f)return!1;let d=eL.get(o),c=eP.get(f);if(void 0===d||void 0===c||d.__prev!==c.__prev)return!1;let h=[],g=o;for(let e=0;e<s;e++){if(null===g)return!1;h.push(g);let e=eL.get(g);g=e?e.__next:null}let _=[];g=f;for(let e=0;e<u;e++){if(null===g)return!1;_.push(g);let e=eP.get(g);g=e?e.__next:null}let p=new Set(_),y=new Set(h),m=[],x=0,C=0;for(;x<u&&C<s;)if(h[C]===_[x])m.push({key:h[C],kind:"reconcile"}),x++,C++;else if(y.has(_[x])){if(p.has(h[C]))return!1;m.push({key:h[C],kind:"create",nextIndex:C}),C++}else m.push({key:_[x],kind:"destroy"}),x++;for(;x<u;)m.push({key:_[x++],kind:"destroy"});for(;C<s;)m.push({key:h[C],kind:"create",nextIndex:C}),C++;let S=ex(f,u);for(let e of m){let t=eE();if("reconcile"===e.kind)e5(e.key,n.element);else if("destroy"===e.kind)eU(e.key,n.element);else{let t=null;for(let n=e.nextIndex+1;n<s;n++){let e=ev._keyToDOMMap.get(h[n]);if(void 0!==e){t=e;break}}e2(e.key,n.withBefore(t??n.before))}if("destroy"!==e.kind){let t=eL.get(e.key);t&&nG(t)&&null===eb&&(eb=t.getFormat(),eN=t.getStyle(),ew=t.__key)}eM(t)}let v="";for(let e=0;e<s;e++){let t,n=eL.get(h[e]);if(void 0===n)return!1;if(ru(n)){let i=ev._keyToDOMMap.get(h[e]),l=i&&i.__lexicalTextContent;"string"!=typeof l&&r(350,n.getType()),t=l}else t=n.getTextContent();v+=t,e<s-1&&ru(n)&&!n.isInline()&&(v+="\n\n")}let T=i.__lexicalSlotTextLength||0,k=T>0?l.slice(T):l;return i.__lexicalTextContent=k.slice(0,k.length-S)+v,!0}(e,0,n,a,l,o,d,u)){let e=a.__lexicalTextContent;return"string"!=typeof e&&r(353),ek=i+e,e4(t,a,f)}}}if(0===u){let t=e.__first,n=0;for(;null!==t;){let e=eL.get(t);if(void 0===e)break;let i=eW||eF.has(t)||eD.has(t),l=eE();if(i)e5(t,s);else{let n,i;if(ru(e)){let l=(i=eK.get(t))&&i.__lexicalTextContent;"string"!=typeof l&&r(354,e.getType()),n=l}else n=e.getTextContent();ek+=n,void 0!==i&&eO(i)}nG(e)?null===eb&&(eb=e.getFormat(),eN=e.getStyle(),ew=e.__key):ru(e)&&n<o-1&&!e.isInline()&&(ek+="\n\n"),eM(l),t=e.__next,n++}return a.__lexicalTextContent=ek,a.__lexicalFirstTextKey=ew,ek=i+ek}}if(1===l&&1===o){let i=e.__first,r=t.__first;if(i===r)e5(i,s);else{let e=te(i),t=e2(r,null);try{e.parentNode===s?s.replaceChild(t,e):n.insertChild(t)}catch(n){if("object"==typeof n&&null!=n)throw Error(`${n.toString()} Parent: ${s.tagName}, new child: {tag: ${t.tagName} key: ${r}}, old child: {tag: ${e.tagName}, key: ${i}}.`);throw n}eU(i,null)}let l=eL.get(r);nG(l)&&null===eb&&(eb=l.getFormat(),eN=l.getStyle(),ew=l.__key)}else{let i=ok(e,eP),a=ok(t,eL);if(i.length!==l&&r(227),a.length!==o&&r(228),0===l)0!==o&&e3(a,t,0,o-1,n);else if(0===o){if(0!==l){let e=null==n.after&&null==n.before&&0===eZ(t).size&&null==n.element.__lexicalLineBreak;eH(i,0,l-1,e?null:s),e&&(s.textContent="")}}else!function(e,t,n,i,r,l){let o=i-1,s=r-1,a,u,f=l.getFirstChild(),d=0,c=0;for(;d<=o&&c<=s;){let e=t[d],i=n[c],r=eE();if(e===i)f=e8(e5(i,l.element)),d++,c++;else{if(void 0===u&&(u=e9(n,c)),void 0===a)a=e9(t,d);else if(!a.has(e)){d++,eM(r);continue}if(!u.has(e)){f=e8(te(e)),eU(e,l.element),d++,a.delete(e),eM(r);continue}if(a.has(i)){let e=lA(ev,i);e!==f&&l.withBefore(f??l.before).insertChild(e),f=e8(e5(i,l.element)),d++,c++}else e2(i,l.withBefore(f??l.before)),c++}let o=eL.get(i);null!==o&&nG(o)?null===eb&&(eb=o.getFormat(),eN=o.getStyle(),ew=o.__key):ru(o)&&c<=s&&!o.isInline()&&(ek+="\n\n"),eM(r)}let h=d>o,g=c>s;if(h&&!g){let t=n[s+1],i=void 0===t?null:ev.getElementByKey(t);e3(n,e,c,s,l.withBefore(i??l.before))}else g&&!h&&eH(t,d,o,l.element)}(t,i,a,l,o,n)}a.__lexicalTextContent=ek,a.__lexicalFirstTextKey=ew,ek=i+ek}(e,t,or(t,n,ev)),lR(t)||(null==eb||eb===t.__textFormat||e$||t.setTextFormat(eb),null==eN||eN===t.__textStyle||e$||t.setTextStyle(eN))}
1(n,i,o),rg(i)||i.isInline()||e6(0,i,o),""!==a){let t=o.__lexicalTextContent||"";o.__lexicalTextContent=a+t,ek=e+a+t,o.__lexicalSlotTextLength=a.length}else(eZ(i).size>0||eZ(n).size>0)&&(o.__lexicalSlotTextLength=0)}else{let e=o.__lexicalTextContent;"string"!=typeof e&&r(356,n.getType()),ek+=e,eO(o)}if((eW||i.__dir!==n.__dir||i.__parent!==n.__parent)&&(eq(o,i),rg(i)&&!eW))for(let e of i.getChildren())ru(e)&&eq(lA(ev,e.getKey()),e)}else{let t=i.getTextContent();if(rc(i)){let t=i.decorate(ev,eS);null!==t&&e7(e,t),l&&(eZ(i).size>0||eZ(n).size>0)&&e1(n,i,o)}ek+=t}if(!e$&&rg(i)){let e=i.getLatest();if(e.__cachedText!==ek){let t=e.getWritable();t.__cachedText=ek,i=t}}return eR.$decorateDOM(i,n,o,ev),eC(i),o}function e7(e,t){let n=ev._pendingDecorators,i=ev._decorators;if(null===n){if(i[e]===t)return;n=ls(ev)}n[e]=t}function e8(e){let t=e.nextSibling;return null!==t&&t===ev._blockCursorElement&&(t=t.nextSibling),t}function e9(e,t){let n=new Set;for(let i=t;i<e.length;i++)n.add(e[i]);return n}function te(e){let t=eK.get(e);return void 0===t&&r(75,e),t}function tt(e){return{type:e}}let tn=tt("SELECTION_CHANGE_COMMAND"),ti=tt("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),tr=tt("CLICK_COMMAND"),tl=tt("BEFORE_INPUT_COMMAND"),to=tt("INPUT_COMMAND"),ts=tt("COMPOSITION_START_COMMAND"),ta=tt("COMPOSITION_END_COMMAND"),tu=tt("DELETE_CHARACTER_COMMAND"),tf=tt("INSERT_LINE_BREAK_COMMAND"),td=tt("INSERT_PARAGRAPH_COMMAND"),tc=tt("CONTROLLED_TEXT_INSERTION_COMMAND"),th=tt("PASTE_COMMAND"),tg=tt("REMOVE_TEXT_COMMAND"),t_=tt("DELETE_WORD_COMMAND"),tp=tt("DELETE_LINE_COMMAND"),ty=tt("FORMAT_TEXT_COMMAND"),tm=tt("SET_TEXT_FORMAT_COMMAND"),tx=tt("UNDO_COMMAND"),tC=tt("REDO_COMMAND"),tS=tt("KEYDOWN_COMMAND"),tv=tt("KEY_ARROW_RIGHT_COMMAND"),tT=tt("MOVE_TO_END"),tk=tt("KEY_ARROW_LEFT_COMMAND"),tb=tt("MOVE_TO_START"),tN=tt("KEY_ARROW_UP_COMMAND"),tw=tt("KEY_ARROW_DOWN_COMMAND"),tE=tt("KEY_ENTER_COMMAND"),tM=tt("KEY_SPACE_COMMAND"),tO=tt("KEY_BACKSPACE_COMMAND"),tA=tt("KEY_ESCAPE_COMMAND"),tD=tt("KEY_DELETE_COMMAND"),tF=tt("KEY_TAB_COMMAND"),tP=tt("INSERT_TAB_COMMAND"),tI=tt("INDENT_CONTENT_COMMAND"),tL=tt("OUTDENT_CONTENT_COMMAND"),tK=tt("DROP_COMMAND"),tz=tt("FORMAT_ELEMENT_COMMAND"),tB=tt("DRAGSTART_COMMAND"),tR=tt("DRAGOVER_COMMAND"),tW=tt("DRAGEND_COMMAND"),t$=tt("COPY_COMMAND"),tU=tt("CUT_COMMAND"),tH=tt("SELECT_ALL_COMMAND"),tj=tt("CLEAR_EDITOR_COMMAND"),tJ=tt("CLEAR_HISTORY_COMMAND"),tV=tt("CAN_REDO_COMMAND"),tq=tt("CAN_UNDO_COMMAND"),tY=tt("FOCUS_COMMAND"),tG=tt("BLUR_COMMAND"),tX=tt("KEY_MODIFIER_COMMAND");function tZ(e,t,n,i){return e.addEventListener(t,n,i),e.removeEventListener.bind(e,t,n,i)}let tQ=Object.freeze({}),t0=[["keydown",function(e,t){let n=t._inputState;n.lastKeyDownTimeStamp=e.timeStamp,n.lastKeyCode=e.key,"Backspace"!==e.key&&nt(n),t.isComposing()||lO(t,tS,e)}],["pointerdown",function(e,t){let n=l3(e),i=e.pointerType;l4(n)&&"touch"!==i&&"pen"!==i&&0===e.button&&ro(t,()=>{o_(n,t)||(t._inputState.isSelectionChangeFromMouseDown=!0)})}],["compositionstart",function(e,t){lO(t,ts,e)}],["compositionend",function(e,t){let n=t._inputState;u?n.compositionPhase="ending-firefox":!d&&(h||p)?(n.compositionPhase="ending-safari",n.compositionEndData=e.data):lO(t,ta,e)}],["input",function(e,t){e.stopPropagation();let n=t._inputState;nt(n),ro(t,()=>{ni(e,t)||t.dispatchCommand(to,e)},{event:e}),n.unprocessedBeforeInputData=null}],["click",function(e,t){ro(t,()=>{let n=iN(),i=lJ(lK(t)),r=iw();if(i){if(n9(n)){let e=n.anchor,t=e.getNode();"element"===e.type&&0===e.offset&&n.isCollapsed()&&!rg(t)&&1===lu().getChildrenSize()&&t.getTopLevelElementOrThrow().isEmpty()&&null!==r&&n.is(r)&&(i.removeAllRanges(),n.dirty=!0)}else if("touch"===e.pointerType||"pen"===e.pointerType){let n=l0(i,t._rootElement).anchorNode;(l6(n)||r3(n))&&lf(ib(r,i,t,e))}}if(u&&null!==i&&0===i.rangeCount){let n=t._rootElement;if(null!==n&&e.target===n){let l=e.clientY,o=n.childNodes.length;for(let e=0;e<n.childNodes.length;e++){let t=n.childNodes[e];if(l6(t)){let n=t.getBoundingClientRect();if(l<=(n.top+n.bottom)/2){o=e;break}}}i.setBaseAndExtent(n,o,n,o);let s=ib(r,i,t,e);null!==s?lf(s):i.removeAllRanges()}}lO(t,tr,e)})}],["cut",tQ],["copy",tQ],["dragstart",tQ],["dragover",tQ],["dragend",tQ],["paste",tQ],["focus",tQ],["blur",tQ],["drop",tQ]];f&&t0.push(["beforeinput",(e,t)=>(function(e,t){let n=e.inputType;!("deleteCompositionText"===n||u&&lM(t))&&"insertCompositionText"!==n&&ro(t,()=>{ni(e,t)||lO(t,tl,e)},{event:e})})(e,t)]);let t1=new WeakMap,t2=new WeakMap,t3=function(e){let t=new Map;
1return{dispose(){for(let e of t.values())e.dispose();t.clear()},register(n,i){let r=t.get(n);void 0===r&&(r={dispose:e(n,i),holders:new Set},t.set(n,r));let l=()=>{let e=t.get(n);e&&e.holders.delete(l)&&0===e.holders.size&&(t.delete(n),e.dispose())};return r.holders.add(l),l}}}(e=>(e.addEventListener("selectionchange",nh),()=>e.removeEventListener("selectionchange",nh)));function t6(e,t,n,i,r,l){let o,s=e.anchor,a=e.focus,u=s.getNode(),d=i2();if(void 0!==l)o=l;else{let e=lJ(lK(d));o=null!==e?l0(e,d._rootElement):null}let c=null!==o?o.anchorNode:null,h=s.key,g=d.getElementByKey(h),_=n.length;return h!==a.key||!nG(u)||(!r&&(!f||d._inputState.lastBeforeInputInsertTextTimeStamp<i+50)||u.isDirty()&&_<2||lh(n))&&s.offset!==a.offset&&!u.isComposing()||r2(u)||u.isDirty()&&_>1||(r||!f)&&null!==g&&!u.isComposing()&&c!==ol(u,g,d)||null!==o&&null!==t&&(!t.collapsed||t.startContainer!==o.anchorNode||t.startOffset!==o.anchorOffset)||!u.isComposing()&&(u.getFormat()!==e.format||u.getStyle()!==e.style)||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;let n=e.anchor.offset,i=t.getParentOrThrow(),r=r1(t);return 0===n?!t.canInsertTextBefore()||!i.canInsertTextBefore()&&!t.isComposing()||r||function(e){let t=e.getPreviousSibling();return(nG(t)||ru(t)&&t.isInline())&&!t.canInsertTextAfter()}(t):n===t.getTextContentSize()&&(!t.canInsertTextAfter()||!i.canInsertTextAfter()&&!t.isComposing()||r)}(e,u)}function t4(e,t){return r3(e)&&null!==e.nodeValue&&0!==t&&t!==e.nodeValue.length}function t5(e,t,n){let{anchorNode:i,anchorOffset:l,focusNode:o,focusOffset:s}=l0(e,t._rootElement),a=t._inputState;a.isSelectionChangeFromDOMUpdate&&(a.isSelectionChangeFromDOMUpdate=!1,t4(i,l)&&t4(o,s)&&!a.postDeleteSelectionToRestore)||ro(t,()=>{if(!n)return void lf(null);if(!rX(t,i,o))return;let u=iN();if(a.postDeleteSelectionToRestore&&n9(u)&&u.isCollapsed()){let e=u.anchor,t=a.postDeleteSelectionToRestore.anchor;(e.key===t.key&&e.offset===t.offset+1||1===e.offset&&t.getNode().is(e.getNode().getPreviousSibling()))&&lf(u=a.postDeleteSelectionToRestore.clone())}if(a.postDeleteSelectionToRestore=null,n9(u)){let n=u.anchor,d=n.getNode();if(u.isCollapsed()){"Range"===e.type&&i===o&&(u.dirty=!0);let l=lK(t).event,s=l?l.timeStamp:performance.now(),{format:c,style:h,offset:g,key:_,timeStamp:p}=a.collapsedSelectionFormat,y=lu(),m=!1===t.isComposing()&&""===y.getTextContent();if(s<p+200&&n.offset===g&&n.key===_)t7(u,c,h);else if("text"===n.type)nG(d)||r(141),t8(u,d);else if("element"===n.type&&!m){var f;ru(d)||r(259);let e=n.getNode();e.isEmpty()?t7(u,(f=e).getTextFormat(),f.getTextStyle()):t7(u,u.format,"")}}else{let e=n.key,t=u.focus.key,i=u.getNodes(),r=i.length,o=u.isBackward(),a=o?s:l,f=o?l:s,d=o?t:e,c=o?e:t,h=2047,g=!1;for(let e=0;e<r;e++){let t=i[e],n=t.getTextContentSize();if(nG(t)&&0!==n&&(0!==e||t.__key!==d||a!==n)&&(e!==r-1||t.__key!==c||0!==f)&&(g=!0,0==(h&=t.getFormat())))break}u.format=g?h:0}}lO(t,tn)})}function t7(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function t8(e,t){t7(e,t.getFormat(),t.getStyle())}function t9(e){if(!e.getTargetRanges)return null;let t=e.getTargetRanges();return 0===t.length?null:t[0]}function ne(e){let{lastKeyCode:t}=i2()._inputState;if(null==e||e.length<=1||null==t)return;let n=1===t.length?t:"Enter"===t?"\n":"Tab"===t?" ":null;if(!n)return;let i=iN();if(!n9(i)||!i.isCollapsed())return;let r=i.anchor.getNode();if(!nG(r))return;let{offset:l}=i.anchor;if(r.getTextContentSize()===l){let e=r.getNextSibling();if("\n"===n){if(rT(e))e.selectEnd();else if(!e){let e=oT(r,iS),t=e&&e.getNextSibling();ru(t)&&t.selectStart()}}else" "===n?n0(e)&&e.selectEnd():nG(e)&&e.getTextContent()[0]===n&&e.select(1,1)}else r.getTextContent()[l]===n&&r.select(l+1,l+1)}function nt(e){e.isInsertTextAfterHandledSelectionCommand=!1,null!==e.handledSelectionCommandTimeoutId&&(clearTimeout(e.handledSelectionCommandTimeoutId),e.handledSelectionCommandTimeoutId=null)}function nn(e){nt(e),e.isInsertTextAfterHandledSelectionCommand=!0,e.handledSelectionCommandTimeoutId=setTimeout(()=>nt(e),0)}function ni(e,t){let n=l3(e);
1if(l6(n)&&o_(n,t))return!0;let i=t.getRootElement();if(null===i)return!1;let r=l2(i.ownerDocument);return null!==r&&i.contains(r)&&o_(r,t)}function nr(e){var t;let n=e.inputType,i=t9(e),l=i2(),o=l._inputState,s=iN();if("insertText"===n&&e.data&&o.isInsertTextAfterHandledSelectionCommand){if(nt(o),e.preventDefault(),n9(s)&&!s.isCollapsed()){let e=s.isBackward()?s.anchor:s.focus;s.anchor.set(e.key,e.offset,e.type),s.focus.set(e.key,e.offset,e.type)}return!0}if("deleteContentBackward"===n){if(null===s){let e=iw();if(!n9(e))return!0;lf(e.clone())}if(n9(s)){let n=s.anchor.key===s.focus.key;if(t=e.timeStamp,"MediaLast"===o.lastKeyCode&&t<o.lastKeyDownTimeStamp+30&&l.isComposing()&&n){if(le(null),o.lastKeyDownTimeStamp=0,setTimeout(()=>{ro(l,()=>{le(null)})},30),n9(s)){let e=s.anchor.getNode();e.markDirty(),nG(e)||r(142),t8(s,e)}}else{if(le(null),d&&null!==i&&!i.collapsed&&(s.applyDOMRange(i),!s.isCollapsed()))return e.preventDefault(),s.removeText(),!0;e.preventDefault();let t=s.anchor.getNode(),r=t.getTextContent(),a=t.canInsertTextAfter(),u=0===s.anchor.offset&&s.focus.offset===r.length,f=_&&n&&!u&&a;if(f&&s.isCollapsed()&&(f=!rc(function(e,t){let n=e.offset;if("element"===e.type)return lE(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?lE(i.getParentOrThrow(),t,i.getIndexWithinParent()+ +!t):e}}return null}(s.anchor,!0))),!f){lO(l,tu,!0);let e=iN();_&&n9(e)&&e.isCollapsed()&&(o.postDeleteSelectionToRestore=e,setTimeout(()=>o.postDeleteSelectionToRestore=null))}}return!0}}if(!n9(s))return!0;let a=e.data;null!==o.unprocessedBeforeInputData&&ly(!1,l,o.unprocessedBeforeInputData),s.dirty&&null===o.unprocessedBeforeInputData||!s.isCollapsed()||rg(s.anchor.getNode())||null===i||s.applyDOMRange(i),o.unprocessedBeforeInputData=null;let u=s.anchor,f=s.focus,c=u.getNode(),h=f.getNode();if("insertText"===n||"insertTranspose"===n){if("\n"===a)e.preventDefault(),lO(l,tf,!1);else if("\n\n"===a)e.preventDefault(),lO(l,td);else if(null==a&&e.dataTransfer){let t=e.dataTransfer.getData("text/plain");e.preventDefault(),s.insertRawText(t)}else null!=a&&t6(s,i,a,e.timeStamp,!0)?(e.preventDefault(),lO(l,tc,a),ne(a)):o.unprocessedBeforeInputData=a;return o.lastBeforeInputInsertTextTimeStamp=e.timeStamp,!0}switch(e.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":lO(l,tc,e),ne((e.dataTransfer?e.dataTransfer.getData("text/plain"):null)??e.data);break;case"insertFromComposition":{let t=o.hadOrphanedCompositionEvents;o.hadOrphanedCompositionEvents=!1;let n=l._compositionKey;le(null),t||lO(l,tc,e),na(n);break}case"insertLineBreak":le(null),lO(l,tf,!1);break;case"insertParagraph":le(null),o.isInsertLineBreak&&!d?(o.isInsertLineBreak=!1,lO(l,tf,!1)):lO(l,td);break;case"insertFromPaste":case"insertFromPasteAsQuotation":lO(l,th,e);break;case"deleteByComposition":(c!==h||ru(c)||ru(h)||!r1(c)||!r1(h))&&lO(l,tg,e);break;case"deleteByDrag":lP(nM),lO(l,tg,e);break;case"deleteByCut":lO(l,tg,e);break;case"deleteContent":lO(l,tu,!1);break;case"deleteWordBackward":lO(l,t_,!0);break;
1case"deleteWordForward":lO(l,t_,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":lO(l,tp,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":lO(l,tp,!1);break;case"formatStrikeThrough":lO(l,ty,"strikethrough");break;case"formatBold":lO(l,ty,"bold");break;case"formatItalic":lO(l,ty,"italic");break;case"formatUnderline":lO(l,ty,"underline");break;case"historyUndo":lO(l,tx);break;case"historyRedo":lO(l,tC)}return!0}function nl(e){let t=i2(),n=t._inputState,i=iN(),r=e.data,l=t9(e),o=!1;if(null!=r&&n9(i)){let s=lJ(lK(t)),a=null!==s?l0(s,t._rootElement):null,d="insertCompositionText"===e.inputType&&"ending-firefox"!==n.compositionPhase&&!t.isComposing();d&&(n.hadOrphanedCompositionEvents=!0);let c=i.anchor.getNode(),h="insertCompositionText"===e.inputType&&"ending-firefox"!==n.compositionPhase&&t.isComposing()&&nG(c)&&r2(c);if(!d&&!h&&t6(i,l,r,e.timeStamp,!1,a)){if(o=!0,"ending-firefox"===n.compositionPhase){let e=nu(t,r);if(n.compositionPhase="idle",e)return lP(nA),ld(),!0}let l=i.anchor.getNode();if(null===s||null===a)return!0;let d=i.isBackward(),c=d?i.anchor.offset:i.focus.offset,h=d?i.focus.offset:i.anchor.offset;f&&!i.isCollapsed()&&nG(l)&&null!==a.anchorNode&&l.getTextContent().slice(0,c)+r+l.getTextContent().slice(c+h)===lp(a.anchorNode)||lO(t,tc,r);let g=r.length;u&&g>1&&"insertCompositionText"===e.inputType&&!t.isComposing()&&(i.anchor.offset-=g,i._cachedNodes=null,i._cachedIsBackward=null),_&&t.isComposing()&&(n.lastKeyDownTimeStamp=0,le(null))}}return o||(ly(!1,t,null!==r?r:void 0),"ending-firefox"!==n.compositionPhase||(nu(t,r||void 0),lP(nA),n.compositionPhase="idle")),ld(),!0}function no(e){let t=i2(),n=t._inputState,i=iN();if(n9(i)&&!t.isComposing()){n.compositionPhase="composing",n.hadOrphanedCompositionEvents=!1;let r=i.anchor,l=i.anchor.getNode();if(le(r.key),lP(nO),e.timeStamp<n.lastKeyDownTimeStamp+30||"element"===r.type||!i.isCollapsed()||!_&&(l.getFormat()!==i.format||nG(l)&&l.getStyle()!==i.style)||nG(l)&&(r2(l)||0===r.offset&&!l.canInsertTextBefore()||r.offset===l.getTextContentSize()&&!l.canInsertTextAfter())){lO(t,tc,N);let e=iN();n9(e)&&le(e.anchor.key)}}return!0}function ns(e){let t=i2();return t._inputState.compositionPhase="idle",nu(t,e.data),lP(nA),!0}function na(e){if(null===e)return;let t=ln(e);if(!nG(t)||"text"===t.getType()||r2(t)||!t.isAttached())return;let n=iN(),i=n9(n)&&n.anchor.key===e?n.anchor.offset:null,r=nY(t.getTextContent());if(r.setFormat(t.getFormat()),r.setStyle(t.getStyle()),t.replace(r),null!==i){let e=Math.min(i,r.getTextContentSize());r.select(e,e)}}function nu(e,t){let n=e._compositionKey;if(le(null),null!==n&&null!=t){if(""===t){let t=ln(n),i=e.getElementByKey(n),r=null!==i&&nG(t)?ol(t,i,e):null;if(null!==r&&null!==r.nodeValue&&nG(t)){let n=lJ(lK(e)),i=n&&l0(n,e._rootElement),l=null,o=null;null!==i&&i.anchorNode===r&&(l=i.anchorOffset,o=i.focusOffset),lm(t,r.nodeValue,l,o,!0)}return na(n),!1}if("\n"===t[t.length-1]){let t=iN();if(n9(t)||it(t)){if(n9(t)){let e=t.focus;t.anchor.set(e.key,e.offset,e.type)}return lO(e,tE,null),na(n),!1}}let i=ln(n);if(null!==i&&nG(i)&&r2(i)){i.markDirty();let e=iN(),r=i.getTextContentSize(),l=n9(e)&&e.anchor.key===n?e.anchor.offset:r;return i.select(l,l).insertText(t),!0}}return ly(!0,e,t),na(n),!1}function nf(e){let t=i2(),n=t._inputState;if(null==e.key)return!0;if("ending-safari"===n.compositionPhase){let i=lk(e);if(i&&ro(t,()=>{nu(t,n.compositionEndData)}),n.compositionPhase="idle",n.compositionEndData="",i)return!0}if(lS(e,"ArrowRight",{shiftKey:"any"}))lO(t,tv,e);else if(lS(e,"ArrowRight",{...lv,shiftKey:"any"}))lO(t,tT,e);else if(lS(e,"ArrowLeft",{shiftKey:"any"}))lO(t,tk,e);else if(lS(e,"ArrowLeft",{...lv,shiftKey:"any"}))lO(t,tb,e);else if(lS(e,"ArrowUp",{altKey:"any",shiftKey:"any"}))lO(t,tN,e);else if(lS(e,"ArrowDown",{altKey:"any",shiftKey:"any"}))lO(t,tw,e);else if(lS(e,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0}))n.isInsertLineBreak=!0,lO(t,tE,e);else if(" "===e.key)lO(t,tM,e);else if(a&&lS(e,"o",{ctrlKey:!0}))e.preventDefault(),n.isInsertLineBreak=!0,lO(t,tf,!0);else if(lS(e,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"}))n.isInsertLineBreak=!1,lO(t,tE,e);else if(lS(e,"Backspace",{shiftKey:"any"})||a&&lS(e,"h",{ctrlKey:!0}))lk(e)?lO(t,tO,e)&&nn(n):(e.preventDefault(),lO(t,tu,!0));else if("Escape"===e.key)lO(t,tA,e);else if(lS(e,"Delete",{})||a&&lS(e,"d",{ctrlKey:!0}))"Delete"!==e.key?(e.preventDefault(),lO(t,tu,!1)):lO(t,tD,e);else if(lS(e,"Backspace",lT))e.preventDefault(),lO(t,t_,!0);else if(lS(e,"Delete",lT))e.preventDefault(),lO(t,t_,!1);else if(a&&lS(e,"Backspace",{metaKey:!0}))e.preventDefault(),lO(t,tp,!0);else if(a&&(lS(e,"Delete",{metaKey:!0})||lS(e,"k",{ctrlKey:!0})))e.preventDefault(),lO(t,tp,!1);else if(lS(e,"b",lv))e.preventDefault(),lO(t,ty,"bold");else if(lS(e,"u",lv))e.preventDefault(),lO(t,ty,"underline");else if(lS(e,"i",lv))e.preventDefault(),lO(t,ty,"italic");else if(lS(e,"Tab",{shiftKey:"any"}))lO(t,tF,e);else if(lS(e,"z",lv))e.preventDefault(),lO(t,tx);else if(a?lS(e,"z",{metaKey:!0,shiftKey:!0}):lS(e,"y",{ctrlKey:!0})||lS(e,"z",{ctrlKey:!0,shiftKey:!0}))e.preventDefault(),lO(t,tC);else{let i=t._editorState._selection;lS(e,"a",lv)?(e.preventDefault(),lO(t,tH,e)&&nn(n)):null===i||n9(i)||(lS(e,"c",lv)?(e.preventDefault(),lO(t,t$,e)):lS(e,"x",lv)&&(e.preventDefault(),lO(t,tU,e)))}return(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)&&t.dispatchCommand(tX,e),!0}
1function nd(e){let t=e.__lexicalEventHandles;return void 0===t&&(e.__lexicalEventHandles=t=[]),t}let nc=new Map;function nh(e){let t=function(e){let t=lL(e);return t?t.getSelection():null}(e.target);if(null===t)return;let n=lF(e.target),i=null,r=null,l=null!==n?t2.get(n):void 0;if(null!==n){if(void 0!==l){let e=l.editors,n=l.hasShadowEditor;if(void 0===n){for(let t of(n=!1,e))if(null!==t._rootElement&&lV(t._rootElement.getRootNode())){n=!0;break}l.hasShadowEditor=n}if(n){let n=null,l=null;for(let o of e){let e=o._rootElement;if(null===e)continue;let s=l0(t,e).anchorNode;if(null!==s&&rQ(s)===o){if(lV(e.getRootNode())){i=o,r=s;break}null===n&&(n=o,l=s)}}null===i&&null!==n&&(i=n,r=l)}else{let e=t.anchorNode;null===e||l6(e)&&null!==e.shadowRoot||null!==(i=rQ(e))&&(r=e)}}if(null===i){let e=l2(n);i=null!==e?rQ(e):null}}if(null===i)return;if(i._inputState.isSelectionChangeFromMouseDown){if(void 0!==l)for(let e of l.editors)e._inputState.isSelectionChangeFromMouseDown=!1;ro(i,()=>{let n=iw(),l=r??l0(t,i._rootElement).anchorNode;(l6(l)||r3(l))&&lf(ib(n,t,i,e))})}let o=lg(i),s=o[o.length-1],a=s._key,u=nc.get(a),f=u||s;f!==i&&t5(t,f,!1),t5(t,i,!0),i!==s?nc.set(a,i):u&&nc.delete(a)}function ng(e){e._lexicalHandled=!0}function n_(e){return!0===e._lexicalHandled}let np=()=>{};function ny(e,t,n){iZ();let i=e.__key,l=e.getParent();if(null===l)return void(null!==oM(e)&&r(367,i,String(oM(e))));let o=function(e){let t=iN();if(!n9(t)||!ru(e))return t;let{anchor:n,focus:i}=t,r=n.getNode(),l=i.getNode();return lI(r,e)&&n.set(e.__key,0,"element"),lI(l,e)&&i.set(e.__key,0,"element"),t}(e),s=!1;if(n9(o)&&t){let t=o.anchor,n=o.focus;t.key===i&&(iO(t,e,l,e.getPreviousSibling(),e.getNextSibling()),s=!0),n.key===i&&(iO(n,e,l,e.getPreviousSibling(),e.getNextSibling()),s=!0)}else it(o)&&t&&e.isSelected()&&e.selectPrevious();if(n9(o)&&t&&!s){let t=e.getIndexWithinParent();r8(e),iE(o,l,t,-1)}else r8(e);n||lR(l)||l.canBeEmpty()||!l.isEmpty()||ny(l,t),t&&o&&rg(l)&&l.isEmpty()&&l.selectEnd()}let nm=Symbol.for("ephemeral");function nx(e){return e[nm]||!1}let nC={configurable:!0,enumerable:!1,value:void 0,writable:!0};class nS{__type;__key;__parent;__prev;__next;__state;[em];static getType(){let{ownNodeType:e}=ox(this);return void 0===e&&r(64,this.name),e}static clone(e){r(65,this.name)}$config(){return{}}config(e,t){let n=t.extends||ob(this.constructor);return Object.assign(t,{extends:n}),"string"==typeof e&&Object.assign(t,{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())}static importDOM;constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",nC),Object.defineProperty(this,em,nC),r7(this,e)}getType(){return this.__type}isInline(){r(137,this.constructor.name)}isAttached(){let e=this.__key;for(;null!==e;){if("root"===e)return!0;let t=ln(e);if(null===t)break;e=null!==t.__parent?t.__parent:oM(t)}return!1}isSelected(e){let t=e||iN();if(null==t)return!1;let n=t.getNodes().some(e=>e.__key===this.__key);if(nG(this))return n;if(n9(t)&&"element"===t.anchor.type&&"element"===t.focus.type){if(t.isCollapsed())return!1;let e=this.getParent();if(rc(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:ln(e)}getParentOrThrow(){let e=this.getParent();return null===e&&r(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){let t=e.getParent();if(lR(t)||null!==oM(e))return ru(e)||e===this&&rc(e)||r(194),e;e=t}return null}getTopLevelElementOrThrow(){let e=this.getTopLevelElement();return null===e&&r(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:ln(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:ln(e)}getNextSiblings(){let e=[],t=this.getNextSibling();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){let t=ru(this)?this:this.getParent(),n=ru(e)?e:e.getParent(),i=t&&n?ss(t,n):null;return i?i.commonAncestor:null}is(e){return null!=e&&this.__key===e.__key}isBefore(e){let t=ss(this,e);return null!==t&&("descendant"===t.type||("branch"===t.type?-1===sl(t):("same"!==t.type&&"ancestor"!==t.type&&r(279),!1)))}isParentOf(e){return lI(e,this)}getNodesBetween(e){let t=this.isBefore(e),n=[],i=new Set,l=this;for(;null!==l;){let o=l.__key;
1if(i.has(o)||(i.add(o),n.push(l)),l===e)break;let s=ru(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(i.has(u.__key)||n.push(u),u===e)break;let f=null,d=u;do{if(null===d&&r(68),f=t?d.getNextSibling():d.getPreviousSibling(),null===(d=d.getParent()))break;null!==f||i.has(d.__key)||n.push(d)}while(null===f);l=f}return t||n.reverse(),n}isDirty(){let e=i2()._dirtyLeaves;return null!==e&&e.has(this.__key)}getLatest(){if(nx(this))return this;let e=ln(this.__key);return null===e&&r(113),e}getWritable(){if(nx(this))return this;iZ();let e=i0(),t=i2(),n=e._nodeMap,i=this.__key,r=this.getLatest(),l=t._cloneNotNeeded,o=iN();if(null!==o&&o.setCachedNodes(null),l.has(i))return r9(r),r;let s=ou(r);return l.add(i),r9(s),n.set(i,s),s}getTextContent(){return oR(this)}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){r(70)}updateDOM(e,t,n){r(71)}getDOMSlot(e){return new K(e)}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){r(18,this.name)}updateFromJSON(e){return function(e,t){let n=e.getWritable(),i=t.$,r=i;for(let e of es(n).flatKeys)e in t&&(void 0!==r&&r!==i||(r={...i}),r[e]=t[e]);return(n.__state||r)&&eo(e).updateFromJSON(r),n}(this,e)}static transform(){return null}remove(e){ny(this,!0,e)}replace(e,t){iZ();let n=iN();null!==n&&(n=n.clone()),lU(this,e);let i=this.getLatest(),l=this.__key,o=e.__key,s=e.getWritable(),a=this.getParentOrThrow().getWritable(),u=a.__size,f=s.getParent(),d=null!==f?s.getIndexWithinParent():-1;r8(s),null!==f&&n9(n)&&iE(n,f,d,-1);let c=i.getPreviousSibling(),h=i.getNextSibling(),g=i.__prev,_=i.__next,p=i.__parent;(ny(i,!1,!0),null===c)?a.__first=o:c.getWritable().__next=o,(s.__prev=g,null===h)?a.__last=o:h.getWritable().__prev=o,s.__next=_,s.__parent=p,a.__size=u;let y=0;t&&(ru(this)&&ru(s)||r(139),y=s.getChildrenSize(),s.splice(y,0,this.getChildren()));let m=oF(this);if(m.length>0)for(let e of(ow(this)&&ow(s)||r(368,this.__key,s.__key),m)){let t=oP(this,e);null!==t&&(function(e,t){let n=e.getWritable();if(null===n.__slots)return;let i=n.__slots.get(t);void 0!==i&&(oU(i),oK(n).delete(t))}(this,e),o$(s,e,t))}if(n9(n)){lf(n);let e=n.anchor,i=n.focus;e.key===l&&(t&&"element"===e.type?e.set(s.__key,y+e.offset,"element"):n6(e,s)),i.key===l&&(t&&"element"===i.type?i.set(s.__key,y+i.offset,"element"):n6(i,s))}return lt()===l&&le(o),s}insertAfter(e,t=!0){iZ(),lU(this,e);let n=this.getWritable(),i=e.getWritable();this.getParentOrThrow();let r=i.getParent(),l=iN(),o=!1,s=!1;if(null!==r){let n=e.getIndexWithinParent();if(n9(l)){let e=r.__key,t=l.anchor,i=l.focus;o="element"===t.type&&t.key===e&&t.offset===n+1,s="element"===i.type&&i.key===e&&i.offset===n+1}r8(i),t&&n9(l)&&iE(l,r,n,-1)}else r8(i);let a=this.getNextSibling(),u=this.getParentOrThrow().getWritable(),f=i.__key,d=n.__next;if(null===a?u.__last=f:a.getWritable().__prev=f,u.__size++,n.__next=f,i.__next=d,i.__prev=n.__key,i.__parent=n.__parent,t&&n9(l)){let e=this.getIndexWithinParent();iE(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,t=!0){iZ(),lU(this,e);let n=this.getWritable(),i=e.getWritable();this.getParentOrThrow();let r=i.__key,l=iN(),o=i.getParent(),s=null!==o?i.getIndexWithinParent():-1;r8(i),null!==o&&t&&n9(l)&&iE(l,o,s,-1);let a=this.getPreviousSibling(),u=this.getParentOrThrow().getWritable(),f=n.__prev,d=this.getIndexWithinParent();return null===a?u.__first=r:a.getWritable().__next=r,u.__size++,n.__prev=r,i.__prev=f,i.__next=n.__key,i.__parent=n.__parent,t&&n9(l)&&iE(l,this.getParentOrThrow(),d),e}isParentRequired(){return!1}createParentElementNode(){return rM()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){iZ();let n=oO(this);if(null!==n)return n.selectPrevious(e,t);let i=this.getPreviousSibling(),r=this.getParentOrThrow();if(null===i)return r.select(0,0);if(ru(i))return i.select();if(!nG(i)){let e=i.getIndexWithinParent()+1;return r.select(e,e)}return i.select(e,t)}selectNext(e,t){iZ();let n=oO(this);if(null!==n)return n.selectNext(e,t);let i=this.getNextSibling(),r=this.getParentOrThrow();if(null===i)return r.select();if(ru(i))return i.select(0,0);if(!nG(i)){let e=i.getIndexWithinParent();return r.select(e,e)}return i.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}}function nv(e){return e instanceof nS}let nT="historic",nk="history-push",nb="history-merge",nN="paste",nw="cut",nE="skip-scroll-into-view",nM="skip-selection-focus",nO="composition-start",nA="composition-end";function nD(e){let t={};if(!e)return t;let n="",i="",r=null,l=!1,o=!1,s=!1,a=0,u=e.length,f=-1;for(let d=0;d<u;d++){let u=e[d];if(l)"*"===u&&"/"===e[d+1]&&(l=!1,d++);else if(o)-1===f&&(f=d),o=!1;else if(null===r)if("/"!==u||"*"!==e[d+1])if('"'!==u&&"'"!==u)if("("!==u)if(")"!==u)if(s||":"
1!==u||0!==a){if(";"===u&&0===a){-1!==f&&(s?i+=e.slice(f,d):n+=e.slice(f,d),f=-1);let r=n.trim(),l=i.trim();""!==r&&""!==l&&(t[r]=l),n="",i="",s=!1;continue}-1===f&&(f=d)}else -1!==f&&(n+=e.slice(f,d),f=-1),s=!0;else -1===f&&(f=d),a=Math.max(0,a-1);else -1===f&&(f=d),a++;else -1===f&&(f=d),r=u;else -1!==f&&(s?i+=e.slice(f,d):n+=e.slice(f,d),f=-1),l=!0,d++;else -1===f&&(f=d),"\\"===u?o=!0:u===r&&(r=null)}-1!==f&&(s?i+=e.slice(f,u):n+=e.slice(f,u));let d=n.trim(),c=i.trim();return""!==d&&""!==c&&(t[d]=c),t}function nF(e,t,n=""){if(t===n)return;let i=nD(n),r=nD(t);for(let t in r)delete i[t],function(e,t,n){let i=n.trimEnd(),r=i.length-10;r>=0&&"!important"===i.slice(r).toLowerCase()?e.setProperty(t,i.slice(0,r).trim(),"important"):e.setProperty(t,n,"")}(e,t,r[t]);for(let t in i)e.removeProperty(t)}function nP(e,t){return 16&t?"code":t&k?"mark":32&t?"sub":64&t?"sup":null}function nI(e,t){return 1&t?"strong":2&t?"em":"span"}function nL(e,t,n,i,r){let l=i.classList,o=lN(r,"base");void 0!==o&&l.add(...o);let s=!1,a=8&t&&4&t;for(let e in void 0!==(o=lN(r,"underlineStrikethrough"))&&(8&n&&4&n?(s=!0,a||l.add(...o)):a&&l.remove(...o)),M){let i=M[e];if(void 0!==(o=lN(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 nK(e,t,n){let i=n.isComposing(),r=e+(i?b:""),l=on(),o=oi(l).$getDOMSlot(n,t,l),s=o.getFirstChild();if(null===s||s.nodeType!==Node.TEXT_NODE)return void o.insertChild(lZ().createTextNode(r));let a=s.nodeValue;if(a!==r)if(i||u){let[e,t,n]=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)]}(a,r);0!==t&&s.deleteData(e,t),s.insertData(e,n)}else s.nodeValue=r}function nz(e,t,n,i,r,l){nK(r,e,t);let o=l.theme.text;void 0!==o&&nL(0,0,i,e,o)}function nB(e,t){let n=lZ().createElement(t);return n.appendChild(e),n}function nR(e){return null!=e&&!0===e.__isInlineFormattable}class nW extends nS{__text;__format;__style;__mode;__detail;get __isInlineFormattable(){return!0}$config(){return this.config("text",{importDOM:{"#text":()=>({conversion:nj,priority:0}),b:()=>({conversion:nU,priority:0}),code:()=>({conversion:nq,priority:0}),em:()=>({conversion:nq,priority:0}),i:()=>({conversion:nq,priority:0}),mark:()=>({conversion:nq,priority:0}),s:()=>({conversion:nq,priority:0}),span:()=>({conversion:n$,priority:0}),strong:()=>({conversion:nq,priority:0}),sub:()=>({conversion:nq,priority:0}),sup:()=>({conversion:nq,priority:0}),u:()=>({conversion:nq,priority:0})}})}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text,this.__format=e.__format,this.__style=e.__style,this.__mode=e.__mode,this.__detail=e.__detail}constructor(e="",t){super(t),this.__text=e,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){return P[this.getLatest().__mode]}getStyle(){return this.getLatest().__style}isToken(){return 1===this.getLatest().__mode}isComposing(){return this.__key===lt()}isSegmented(){return 2===this.getLatest().__mode}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){let t=M[e];return 0!=(this.getFormat()&t)}isSimpleText(){return"text"===this.__type&&0===this.__mode}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return r5(this.getLatest().__format,e,t)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,t){let n=this.__format,i=nP(0,n),r=nI(0,n),l=null===i?r:i,o=lZ().createElement(l),s=o;this.hasFormat("code")&&o.setAttribute("spellcheck","false"),null!==i&&(s=lZ().createElement(r),o.appendChild(s)),nz(s,this,0,n,this.__text,e);let a=this.__style;return""!==a&&nF(o.style,a),o}updateDOM(e,t,n){let i=this.__text,l=e.__format,o=this.__format,s=nP(0,l),a=nP(0,o),u=nI(0,l),f=nI(0,o);if((null===s?u:s)!==(null===a?f:a))return!0;if(s===a&&u!==f){let e=t.firstChild;null==e&&r(48);let l=lZ().createElement(f);return nz(l,this,0,o,i,n),t.replaceChild(l,e),!1}let d=t;null!==a&&null!==s&&null==(d=t.firstChild)&&r(49),nK(i,d,this);let c=n.theme.text;void 0!==c&&l!==o&&nL(0,l,o,d,c);let h=e.__style,g=this.__style;return h!==g&&nF(t.style,g,h),!1}updateFromJSON(e){return super.updateFromJSON(e).setTextContent(e.text).setFormat(e.format).setDetail(e.detail).setMode(e.mode).setStyle(e.style)}
1exportDOM(e){let{element:t}=super.exportDOM(e);return l6(t)||r(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=nB(t,"b")),this.hasFormat("italic")&&(t=nB(t,"i")),this.hasFormat("strikethrough")&&(t=nB(t,"s")),this.hasFormat("underline")&&(t=nB(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?M[e]:e,t}setDetail(e){let t=this.getWritable();return t.__detail="string"==typeof e?O[e]:e,t}setStyle(e){let t=this.getWritable();return t.__style=e,t}toggleFormat(e){let t=r5(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=F[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){iZ();let n=e,i=t,r=iN(),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(!n9(r))return iv(o,n,o,i,"text","text");{let e=lt();e!==r.anchor.key&&e!==r.focus.key||le(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=iN();if(i&&n9(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(...e){let t;iZ();let n=this.getLatest(),i=n.getTextContent();if(""===i)return[];let r=n.__key,l=lt(),o=i.length;e.sort((e,t)=>e-t),e.push(o);let s=[],a=e.length;for(let t=0,n=0;t<o&&n<=a;n++){let r=e[n];r>t&&(s.push(i.slice(t,r)),t=r)}let u=s.length;if(1===u)return[n];let f=s[0],d=n.getParent(),c=n.getFormat(),h=n.getStyle(),g=n.__detail,_=!1,p=null,y=null,m=iN();if(n9(m)){let[e,t]=m.isBackward()?[m.focus,m.anchor]:[m.anchor,m.focus];"text"===e.type&&e.key===r&&(p=e),"text"===t.type&&t.key===r&&(y=t)}n.isSegmented()?((t=nY(f)).__format=c,t.__style=h,t.__detail=g,t.__state=ec(n,t),_=!0):t=n.setTextContent(f);let x=[t];for(let e=1;e<u;e++){let t=nY(s[e]);t.__format=c,t.__style=h,t.__detail=g,t.__state=ec(n,t);let i=t.__key;l===r&&le(i),x.push(t)}let C=p?p.offset:null,S=y?y.offset:null,v=0;for(let e of x){if(!p&&!y)break;let t=v+e.getTextContentSize();if(null!==p&&null!==C&&C<=t&&C>=v&&(p.set(e.getKey(),C-v,"text"),C<t&&(p=null)),null!==y&&null!==S&&S<=t&&S>=v){y.set(e.getKey(),S-v,"text");break}v=t}if(null!==d){let e=this.getPreviousSibling(),t=this.getNextSibling();null!==e&&r9(e),null!==t&&r9(t);let n=d.getWritable(),i=this.getIndexWithinParent();_?(n.splice(i,0,x),this.remove()):n.splice(i,1,x),n9(m)&&iE(m,d,i,u-1)}return x}mergeWithSibling(e){let t=e===this.getPreviousSibling();t||e===this.getNextSibling()||r(50);let n=this.__key,i=e.__key,l=this.__text,o=l.length;lt()===i&&le(n);let s=iN();if(n9(s)){let r=s.anchor,l=s.focus;null!==r&&r.key===i&&iA(r,t,n,e,o),null!==l&&l.key===i&&iA(l,t,n,e,o)}let a=e.__text,u=t?a+l:l+a;this.setTextContent(u);let f=this.getWritable();return e.remove(),f}isTextEntity(){return!1}}function n$(e){return{forChild:nX(e.style),node:null}}function nU(e){let t="normal"===e.style.fontWeight;return{forChild:nX(e.style,t?void 0:"bold"),node:null}}let nH=new WeakMap;function nj(e){null===e.parentElement&&r(129);let t=e.textContent||"";if(null!==function(e){let t,n=e.parentNode,i=[e];for(;null!==n&&void 0===(t=nH.get(n))&&!function(e){if(!l6(e))return!1;if("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++)nH.set(i[e],r);return r}(e))return{node:iK(t)};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=nJ(n,!1));){let e=n.textContent||"";if(e.length>
10){/[ \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=nJ(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 nJ(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(l6(n=e)){let e=n.style.display;if(""===e&&!l8(n)||""!==e&&!e.startsWith("inline"))return null}let i=n;for(;null!==(i=t?n.firstChild:n.lastChild);)n=i;if(r3(n))return n;if("BR"===n.nodeName)return null}}let nV={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function nq(e){let t=nV[e.nodeName.toLowerCase()];return void 0===t?{node:null}:{forChild:nX(e.style,t),node:null}}function nY(e=""){return l$(new nW(e))}function nG(e){return e instanceof nW}function nX(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=>((nG(e)||nR(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 nZ extends nW{$config(){return this.config("tab",{extends:nW})}constructor(e){super(" ",e),this.__detail=2}createDOM(e){let t=super.createDOM(e),n=lN(e.theme,"tab");return void 0!==n&&t.classList.add(...n),t}setTextContent(e){return super.setTextContent(" ")}spliceText(e,t,n,i){return""===n&&0===t||" "===n&&1===t||r(286),this}setDetail(e){return 2!==e&&r(127),this}setMode(e){return"normal"!==e&&r(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function nQ(){return l$(new nZ)}function n0(e){return e instanceof nZ}class n1{key;offset;type;_selection;constructor(e,t,n){this._selection=null,this.key=e,this.offset=t,this.type=n}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){return this.key===e.key?this.offset<e.offset:0>sr(sp(sa(this,"next")),sp(sa(e,"next")))}getNode(){let e=ln(this.key);return null===e&&r(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,iX()||(lt()===l&&le(e),null!==r&&(r.setCachedNodes(null),n9(r)&&(r._cachedIsBackward=null),r.dirty=!0)))}}function n2(e,t,n){return new n1(e,t,n)}function n3(e,t){let n=t.__key,i=e.offset,r="element";if(nG(t)){r="text";let e=t.getTextContentSize();i>e&&(i=e)}else if(!ru(t)){let e=t.getNextSibling();if(nG(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 n6(e,t){if(ru(t)){let n=t.getLastDescendant();ru(n)||nG(n)?n3(e,n):n3(e,t)}else n3(e,t)}function n4(e,t,n,i){let r=e.getNode(),l=r.getChildAtIndex(e.offset),o=nY();if(o.setFormat(n),o.setStyle(i),rO(l))l.splice(0,0,[o]);else if(null!==l){let e=lR(r)?rM().append(o):o;l.insertBefore(e)}else if(lR(r)){let e=r.getLastChild();ru(e)&&!e.isInline()&&e.isEmpty()?e.append(o):r.append(rM().append(o))}else r.append(o);e.is(t)&&t.set(o.__key,0,"text"),e.set(o.__key,0,"text")}function n5(e,t,n,i){let l=e.anchor.getNode();nG(l)||r(398);let o=e.anchor.offset,s=nY(t);s.setFormat(n),s.setStyle(i);let a=l.getParentOrThrow();if(0===o)a.isInline()&&!l.__prev?a.insertBefore(s):l.insertBefore(s,!1);else if(o===l.getTextContentSize())a.isInline()&&!l.__next?a.insertAfter(s):l.insertAfter(s,!1);else{let[e]=l.splitText(o);e.insertAfter(s,!1)}""===l.getTextContent()&&l.isAttached()&&l.remove(),s.selectEnd(),s.isComposing()&&"text"===e.anchor.type&&e.anchor.set(e.anchor.key,e.anchor.offset-t.length,e.anchor.type)}class n7{_nodes;_cachedNodes;dirty;constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!it(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 n7(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){let t,n=this.getNodes().filter(e=>null===oM(e)),i=n.length;if(0===i)return;let r=n[i-1];if(nG(r))t=r.select();else{let e=r.getIndexWithinParent()+1;t=r.getParentOrThrow().select(e,e)}
1t.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=ln(e);null!==t&&n.push(t)}return iX()||(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().filter(e=>null===oM(e));if((iN()||iw())===this&&e[0]){let t=o3(e[0],"next");sf(sn(t,t))}for(let t of e)t.remove();n8()}}function n8(){let e=lu();if(e.isEmpty()){let t=rM();e.append(t),t.select()}}function n9(e){return e instanceof ie}class ie{format;style;anchor;focus;_cachedNodes;_cachedIsBackward;dirty;constructor(e,t,n,i){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this._cachedIsBackward=null,this.format=n,this.style=i,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!n9(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(oQ(n)){let{origin:e}=n;0===t.length?r.add(e):(l.add(e),t.push(e))}else{let{origin:e}=n;ru(e)&&l.has(e)||t.push(e)}if(i&&t.push(i.caret.origin),oZ(e.focus)&&ru(e.focus.origin)&&null===e.focus.getNodeAtCaret())for(let n=o5(e.focus.origin,"previous");oQ(n)&&r.has(n.origin)&&!n.origin.isEmpty()&&n.origin.is(t[t.length-1]);n=o7(n))r.delete(n.origin),t.pop();for(;t.length>1;){let e=t[t.length-1];if(!ru(e)||l.has(e)||e.isEmpty()||r.has(e))break;t.pop()}if(0===t.length&&e.isCollapsed()){let n=sp(e.anchor),i=sp(e.anchor.getFlipped()),r=e=>oX(e)?e.origin:e.getNodeAtCaret(),l=r(n)||r(i)||(e.anchor.getNodeAtCaret()?n.origin:i.origin);t.push(l)}return t}(sx(sc(this),"next"));return iX()||(this._cachedNodes=t),t}setTextNodeRange(e,t,n,i){return this.anchor.set(e.__key,t,"text"),this.focus.set(n.__key,i,"text"),this}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]=is(this),a="",u=!0;for(let f=0;f<e.length;f++){let d=e[f];if(ru(d)&&!d.isInline()){u||(a+="\n");let e="";for(let t of oF(d)){let n=oP(d,t);null!==n&&(e+=n.getTextContent())}""!==e?(a+=e,u=!1):u=!d.isEmpty()}else if(u=!1,nG(d)){let e=d.getTextContent();d===t?d===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):d===n&&(e=l?e.slice(0,s):e.slice(0,o)),a+=e}else!rc(d)&&!rT(d)||d===n&&this.isCollapsed()||(a+=d.getTextContent())}return a}applyDOMRange(e){let t=i2(),n=t.getEditorState()._selection,i=iC(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n);if(null===i)return;let[r,l,o]=i;this.anchor.set(r.key,r.offset,r.type,!0),this.focus.set(l.key,l.offset,l.type,!0),o&&(this.dirty=!0),ep(this)}clone(){let e=this.anchor,t=this.focus;return new ie(n2(e.key,e.offset,e.type),n2(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=r5(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=M[e];return 0!=(this.format&t)}insertRawText(e){this.insertNodes(iK(e))}insertText(e){let t=this.format,n=this.style;if(!this.isCollapsed()){let i=(this.focus.isBefore(this.anchor)?this.focus:this.anchor).getNode();if(nG(i)&&(t=i.getFormat(),n=i.getStyle()),this.removeText(),this.format=t,this.style=n,""===e)return;if(null===lt())return"element"===this.anchor.type&&n4(this.anchor,this.focus,t,n),void n5(this,e,t,n)}"element"===this.anchor.type&&n4(this.anchor,this.focus,t,n);let i=this.anchor.getNode();nG(i)||r(398);let l=this.anchor.offset,o=i.getParentOrThrow(),s=i.getTextContentSize();if(r2(i)||0===l&&(!i.canInsertTextBefore()||!o.canInsertTextBefore()&&!i.__prev)||l===s&&(!i.canInsertTextAfter()||!o.canInsertTextAfter()&&!i.__next)){if(i.isSegmented()&&0!==l&&l!==s){if(null!==lt())i.setMode("normal").setFormat(t).setStyle(n);else{let e=nY(i.getTextContent());e.setFormat(t),e.setStyle(n),i.replace(e),e.select(l,l)}return void(""!==e&&this.insertText(e))}if(""===e)return;if(0===l){let r=i.getPreviousSibling();if(nG(r)&&r.canInsertTextAfter()&&!r2(r))r.select();else{let e=nY();e.setFormat(t),e.setStyle(n),o.canInsertTextBefore()?i.insertBefore(e):o.insertBefore(e),e.select()}return void this.insertText(e)}if(l===s){let r=i.getNextSibling();if(nG(r)&&r.canInsertTextBefore()&&!r2(r))r.select(0,0);else{let e=nY();e.setFormat(t),e.setStyle(n),o.canInsertTextAfter()?i.insertAfter(e):o.insertAfter(e),e.select(0,0)}return void this.insertText(e)}let r=nY(e);return r.setFormat(t),r.setStyle(n),i.replace(r),void r.select()}if(""===e)return;let a=o.isInline()&&0===l&&!i.__prev,u=o.isInline()&&l===s&&!i.__next,f=i.getFormat()!==t||i.getStyle()!==n;if(a||u||f){if(""!==i.getTextContent()||a||u)return void n5(this,e,t,n);i.setFormat(t),i.setStyle(n)}i.spliceText(l,0,e,!0),i.isComposing()&&"text"===this.anchor.type&&this.anchor.set(this.anchor.key,this.anchor.offset-e.length,this.anchor.type)}removeText(){let e=iN()===this;sd(this,function(e,t="removeEmptySlices"){let n,i;if(e.isCollapsed())return e;let l="root",o="next",s=t,a=sx(e,o),u=sg(a.anchor,l),f=sg(a.focus.getFlipped(),l),d=new Set,c=[];for(let e of a.iterNodeCarets(l))if(oQ(e))d.add(e.origin.getKey());else if(oZ(e)){let{origin:t}=e;ru(t)&&!d.has(t.getKey())||c.push(t)}let h=new Set;for(let e of c){let t=e.getParent();null===t||d.has(t.getKey())||h.add(t),r8(e)}for(let e of h)!e.canBeEmpty()&&!lR(e)&&e.isEmpty()&&e.isAttached()&&e.remove();for(let e of a.getTextSlices()){if(!e)continue;let{origin:t}=e.caret,n=t.getTextContentSize(),i=sh(o3(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=o6(n,o,t.offset)}n.is(u[0].origin)&&(u[0]=t),n.is(f[0].origin)&&(f[0]=t.getFlipped())}}for(let e of u)if(s_(e)){n=sp(e);break}for(let e of f)if(s_(e)){i=sp(e);break}let g=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)=>
1{let n;for(let r=i;r<e.length;r++){let i=e[r];if(lR(i))return;!n&&t(i)&&(n=i)}return n},f=u(o,ot),d=f&&u(s,e=>n.has(e.getKey())&&ot(e));return d&&oF(d).length>0?null:f&&d?[f,d]:null}(n,i,d);if(g){let[e,t]=g;o5(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)}}else if(i){let e=function(e){if(oQ(e)){let t=e.origin;if(ot(t))return t}else{let t=e.getParentAtCaret();if(t&&ot(t))return t}return null}(i),t=e&&e.getParent(),n=e&&e.getParents().findLast(lB);if(e&&t&&!rg(t)&&e.isEmpty()&&d.has(e.getKey())&&0===oF(e).length&&(!n||d.has(n.getKey()))){e.remove(!0);let n=t;for(;n&&!rg(n)&&n.isEmpty();){let e=n.getParent();if(e&&rg(e)&&1>=e.getChildrenSize())break;let t=n;n=e,t.remove(!0)}}}let _=[n,i,...u,...f].find(s_);if(_)return st(sm(sp(_),e.direction));r(269,JSON.stringify(u.map(e=>e.origin.__key)))}(sc(this))),e&&iN()!==this&&lf(this)}formatText(e,t=null){il(this,e,t)}insertNodes(e){var t;if(0===e.length)return;this.isCollapsed()||this.removeText();let n=this.anchor.getNode();if("element"===this.anchor.type&&ru(n)&&null!==oM(n)){let t=n.isShadowRoot()?n.getFirstChild()??n.append(rM()).getFirstChild():n.getFirstChild();if(n.isShadowRoot()&&null!==t&&!ru(t)){let e=rM();t.insertBefore(e),t=e}if(null!==t){t.selectStart();let n=iN();return n9(n)||r(369),n.insertNodes(e)}}if("element"===this.anchor.type&&lR(n)){let t=iW(e),i=t.getLastDescendant();return n.splice(this.anchor.offset,0,t.getChildren()),void(null!==i&&i.selectEnd())}let i=(this.isBackward()?this.focus:this.anchor).getNode(),l=oT(i,ot),o=e[e.length-1];if(ru(l)&&"__language"in l){if("__language"in e[0])this.insertText(e[0].getTextContent());else{let t=iB(this);l.splice(t,0,e),o.selectEnd()}return}if(!e.some(e=>(ru(e)||rc(e))&&!e.isInline())){ru(l)||r(211,i.constructor.name,i.getType());let t=iB(this);return l.splice(t,0,e),void o.selectEnd()}if(ru(l)&&null!==oM(l)){let t=iB(this),n=iz(e);l.splice(t,0,n);let i=n[n.length-1];return void(void 0!==i?i.selectEnd():l.select(t,t))}if(null===l){let t=iW(e),n=t.getLastDescendant(),i=sa(this.anchor,"next");for(let e of t.getChildren())i=sk(e,i);return void(null!==n&&n.selectEnd())}if(ru(l)&&!l.isParentRequired()&&!lR(l.getParentOrThrow())){let t=iB(this),n=iz(e);l.splice(t,0,n);let i=n[n.length-1];return void(void 0!==i?i.selectEnd():l.select(t,t))}let s=iW(e),a=s.getLastDescendant(),u=s.getChildren(),f=ru(l)&&l.isEmpty()?null:this.insertParagraph();f&&!l.isAttached()&&(l=oT(i=this.anchor.getNode(),ot));let d=u[u.length-1],c=u[0];ru(t=c)&&ot(t)&&!t.isEmpty()&&ru(l)&&(!l.isEmpty()||l.canMergeWhenEmpty())&&(ru(l)||r(211,i.constructor.name,i.getType()),l.append(...c.getChildren()),c=u[1]),c&&(null===l&&r(212,i.constructor.name,i.getType()),function(e,t){let n=t.getParentOrThrow().getLastChild(),i=t,l=[t];for(;i!==n;)i.getNextSibling()||r(140),l.push(i=i.getNextSibling());let o=e;for(let e of l)o=o.insertAfter(e)}(l,c));let h=oT(a,ot);f&&ru(h)&&(f.canMergeWhenEmpty()||ot(d))&&(h.append(...f.getChildren()),f.remove()),ru(l)&&l.isEmpty()&&l.remove(),a.selectEnd();let g=ru(l)?l.getLastChild():null;rT(g)&&h!==l&&g.remove()}insertParagraph(){let e=this.anchor.getNode();if("element"===this.anchor.type&&lR(e)){let t=rM();return e.splice(this.anchor.offset,0,[t]),t.select(),t}let t=iB(this),n=oT(this.anchor.getNode(),ot);if(null!==n&&null!==oM(n))return null;ru(n)||r(213);let i=n.getChildAtIndex(t),l=i?[i,...i.getNextSiblings()]:[],o=n.insertNewAfter(this,!1);return o?(o.append(...l),o.selectStart(),o):null}insertLineBreak(e){let t=rv();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]=is(this),o=this.isBackward(),[s,a]=o?[this.focus,this.anchor]:[this.anchor,this.focus],[u,f]=o?[l,r]:[r,l];if(0===t)return[];if(1===t){if(nG(n)&&!this.isCollapsed()){let e=n.splitText(u,f),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(nG(n)&&(u===n.getTextContentSize()?e.shift():0!==u&&([,n]=n.splitText(u),e[0]=n,s.set(n.getKey(),0,"text"))),nG(i)){let t=i.getTextContent().length;0===f?e.pop():f!==t&&([i]=i.splitText(f),e[e.length-1]=i,a.set(i.getKey(),i.getTextContentSize(),"text"))}return e}
1modify(e,t,n){if(i$(this,e,t,n))return;let i="move"===e,r=i2(),l=lJ(lK(r));if(!l)return;let o=r._blockCursorElement,s=r._rootElement,a=this.focus.getNode();null===s||null===o||!ru(a)||a.isInline()||a.canBeEmpty()||lj(o,r,s);let u=lA(r,this.focus.key),f=u;if("text"===this.focus.type&&(f=nG(a)?ol(a,u,r):null),this.dirty){let e=lA(r,this.anchor.key),t=e;if("text"===this.anchor.type){let n=this.anchor.getNode();t=nG(n)?ol(n,e,r):null}t&&f&&iD(l,t,this.anchor.offset,f,this.focus.offset)}if("character"===n&&nG(a)&&a.isUnmergeable()&&(t?0===this.focus.offset:this.focus.offset===a.getTextContentSize())){let e=o3(a,t?"previous":"next").getNodeAtCaret();if(nG(e)){if(!i){let n=e.getTextContentSize();return t?this.focus.set(e.__key,n-1,"text"):this.focus.set(e.__key,1,"text"),void(this.dirty=!0)}{let n=r.getElementByKey(e.getKey()),i=n?ol(e,n,r):null;if(i){let e=t?i.length:0;iD(l,i,e,i,e)}}}}if(function(e,t,n,i){e.modify(t,n,i)}(l,e,t?"backward":"forward",n),l.rangeCount>0){let e=lQ(l,r._rootElement),n=e||l.getRangeAt(0),o=this.anchor.getNode(),s=rg(o)?o:lz(o);this.applyDOMRange(n),this.dirty=!0,i||(id(this,t,s),(e?"backward"!==l.direction:l.anchorNode===n.startContainer&&l.anchorOffset===n.startOffset)||iu(this))}"lineboundary"===n&&i$(this,e,t,n,"decorators")}forwardDeletion(e,t,n){if(!n&&("element"===e.type&&ru(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(ru(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=se(sa(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(oQ(t))if(t.origin.isInline());else{if(t.origin.isShadowRoot()){if("merge-block"===e.type)break;if(ru(i.anchor.origin)&&i.anchor.origin.isEmpty()){let e=sp(t);sd(this,sn(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(oZ(t)){if(ru(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(rc(t.origin)){if(t.origin.isIsolated());else if(oF(t.origin).length>0){if(ru(i.anchor.origin)&&i.anchor.origin.isEmpty()){i.anchor.origin.remove();let e=ik();e.add(t.origin.getKey()),lf(e)}}else if("merge-next-block"===e.type&&(t.origin.isKeyboardSelectable()||!t.origin.isInline())&&ru(i.anchor.origin)&&i.anchor.origin.isEmpty()){i.anchor.origin.remove();let e=ik();e.add(t.origin.getKey()),lf(e)}else t.origin.remove();return}break}}if("merge-block"===e.type){let{caret:t,block:n}=e;if(oF(n).length>0)return;return t.origin.isEmpty()&&!n.isEmpty()&&t.origin.getParent()===n.getParent()?void t.origin.remove(!0):(sd(this,sn(!t.origin.isEmpty()&&n.isEmpty()?sh(o3(n,t.direction)):i.anchor,t)),this.removeText())}for(let e=t.getNode();null!==e;){if(null!==oM(e))return;if(ru(e)&&e.isShadowRoot())break;e=e.getParent()}}let r=this.focus;if(ic(this,e,"character"),this.isCollapsed()){if(e&&0===t.offset&&ia(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 ig(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 ig(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){let e=n.offset,o=i.offset,s=e<o,a=s?e:o,u=s?o:e,f=u-1;if(a!==f){var l;lh(l=r.getTextContent().slice(a,u))||ih(l)||(t?i.set(i.key,f,i.type):n.set(n.key,f,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()&&rg(e.getParent())&&null===e.getPreviousSibling()&&ia(this,e),n8()}}deleteLine(e){let t=iy(this.anchor);if(null!==t&&rc(oO(t)))return this.isCollapsed()||this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),void this.deleteCharacter(e);(this.isCollapsed()&&ic(this,e,"lineboundary"),this.isCollapsed())?this.deleteCharacter(e):oT(this.anchor.getNode(),ot)!==oT(this.focus.getNode(),ot)?(this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),this.deleteCharacter(e)):this.removeText()}
1deleteWord(e){if(this.isCollapsed()){let t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;ic(this,e,"word")}this.isCollapsed()?this.deleteCharacter(e):this.removeText()}isBackward(){let e=this._cachedIsBackward;if(null!==e)return e;let t=this.focus.isBefore(this.anchor);return iX()||(this._cachedIsBackward=t),t}getStartEndPoints(){return[this.anchor,this.focus]}}function it(e){return e instanceof n7}function ii(e,t){if(it(e)){for(let n of e.getNodes())nR(n)&&n.setFormat(t(n.getFormat()));return}if(e.isCollapsed())return e.setFormat(t(e.format)),void le(null);let n=[];for(let i of e.getNodes())nG(i)?n.push(i):ru(i)?i.setTextFormat(t(i.getTextFormat())):nR(i)&&i.setFormat(t(i.getFormat()));let i=n.length;if(0===i)return e.setFormat(t(e.format)),void le(null);let r=e.anchor,l=e.focus,o=e.isBackward(),s=o?l:r,a=o?r:l,u=0,f=n[0],d="element"===s.type?0:s.offset;if("text"===s.type&&d===f.getTextContentSize()&&(u=1,f=n[1],d=0),null==f)return;let c=i-1,h=n[c],g="text"===a.type?a.offset:h.getTextContentSize();if(f.is(h)){if(d===g)return;let n=t(f.getFormat());if(r2(f)||0===d&&g===f.getTextContentSize())f.setFormat(n);else{let e=f.splitText(d,g),t=0===d?e[0]:e[1];t.setFormat(n),"text"===s.type&&s.set(t.__key,0,"text"),"text"===a.type&&a.set(t.__key,g-d,"text")}return void(e.format=n)}0===d||r2(f)||([,f]=f.splitText(d),d=0);let _=t(f.getFormat());f.setFormat(_);let p=t(h.getFormat());g>
10&&(g===h.getTextContentSize()||r2(h)||([h]=h.splitText(g)),h.setFormat(p));for(let e=u+1;e<c;e++){let i=n[e];i.setFormat(t(i.getFormat()))}"text"===s.type&&s.set(f.__key,d,"text"),"text"===a.type&&a.set(h.__key,g,"text"),e.format=_|p}function ir(e,t){let n=[];for(let[e,i]of Object.entries(t))"boolean"==typeof i&&n.push([e,i]);0!==n.length&&ii(e,e=>{for(let[t,i]of n)e=r5(e,t,i?M[t]:0);return e})}function il(e,t,n=null){let i=null===n&&n9(e)?r5(e.format,t,null):n;ii(e,e=>r5(e,t,i))}function io(e){let t=e.offset;if("text"===e.type)return t;let n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function is(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]:[io(n),io(i)]}function ia(e,t){for(let n=t;n;n=n.getParent()){if(ru(n)){if(n.collapseAtStart(e))return!0;if(lR(n))break}if(n.getPreviousSibling())break}return!1}function iu(e){let t=e.focus,n=e.anchor,i=n.key,r=n.offset,l=n.type;n.set(t.key,t.offset,t.type,!0),t.set(i,r,l,!0)}function id(e,t,n){let i=e.getNodes(),r=i.filter(e=>lI(e,n));if(0===r.length||r.length===i.length)return!1;let l=t?r[0]:r[r.length-1],o=ru(l)?l:l.getParentOrThrow();return t?o.selectStart():o.selectEnd(),!0}function ic(e,t,n){if(i$(e,"extend",t,n))return;let i=i2(),r=lJ(lK(i));if(!r||"function"!=typeof r.modify)return;let l=i._blockCursorElement,o=i._rootElement,s=e.anchor,a=e.focus.getNode();null===o||null===l||!ru(a)||a.isInline()||a.canBeEmpty()||lj(l,i,o);let u=e=>{let t=e.getNode(),n=i.getElementByKey(e.key);return null!==n&&"text"===e.type&&nG(t)?ol(t,n,i):n},f=s.getNode(),d=u(s);if(null===d)return;let c=s.offset,h=e.isCollapsed(),g=e.focus,_=h?d:u(g);if(null===_)return;let p=g.offset;if(iD(r,_,p,_,p),function(e,t,n,i){e.modify(t,n,i)}(r,"move",t?"backward":"forward",n),0===r.rangeCount)return;let y=lQ(r,o)||r.getRangeAt(0),m=y.startContainer,x=y.startOffset;if(h&&"character"===n&&"text"===s.type&&nG(f)&&f.isUnmergeable()&&c===(t?0:f.getTextContentSize())){let n=o3(f,t?"previous":"next").getNodeAtCaret();if(nG(n)){let i=t?n.getTextContentSize()-1:1;return e.focus.set(n.__key,i,"text"),void(e.dirty=!0)}}if(h&&"character"===n&&"text"===s.type){let n=t?0:f.getTextContentSize(),i=m===d?x:c!==n?n:-1;if(i>=0)return void(i!==c&&(e.focus.set(s.key,i,"text"),e.dirty=!0))}let[C,S,v,T]=t?[m,x,d,c]:[d,c,m,x],k=rg(f)?f:lz(f);e.applyDOMRange({collapsed:!1,endContainer:v,endOffset:T,startContainer:C,startOffset:S}),e.dirty=!0,!id(e,t,k)&&t&&iu(e),"lineboundary"===n&&i$(e,"extend",t,n,"decorators")}let ih=(()=>{try{let e=RegExp("\\p{Emoji}","u"),t=e.test.bind(e);if(t("â¤ï¸")&&t("#ï¸â£")&&t("\uD83D\uDC4D"))return t}catch(e){}return()=>!1})();function ig(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 i_(e,t,n,i){let l,o=t,s=!1;if(l6(e)){let a=!1,u=e.childNodes,f=u.length,d=i._blockCursorElement;o===f&&f>0&&(a=!0,o=f-1),void 0!==ll(e,i)||o_(e,i)||(s=!0);let c=u[o],h=!1;if(c===d)c=u[o+1],h=!0;else if(null!==d){let n=d.parentNode;e===n&&t>Array.prototype.indexOf.call(n.children,d)&&o--}if(nG(l=lc(c)))o=o4(l,a?"next":"previous");else{let u=lc(e);if(null===u)return null;if(ru(u)){let s=i.getElementByKey(u.getKey());null===s&&r(214);let f=or(u,s,i);[u,o]=f.resolveChildIndex(u,s,e,t),ru(u)||r(215),a&&o>=u.getChildrenSize()&&(o=Math.max(0,u.getChildrenSize()-1));let d=u.getChildAtIndex(o);if(ru(d)&&function(e,t,n){let i=e.getParent();return null===n||null===i||!i.canBeEmpty()||i!==n.getNode()}(d,0,n)){let e=a?d.getLastDescendant():d.getFirstDescendant();u=null===e?d:ru(d=e)?d:d.getParentOrThrow(),o=0}nG(d)?(l=d,u=null,o=o4(d,a?"next":"previous")):d!==u&&a&&!h&&(ru(u)||r(216),o=Math.min(u.getChildrenSize(),o+1))}else{let n=oO(u),r=null!==n?n:u,l=r.getIndexWithinParent(),s=i.getElementByKey(u.getKey()),a="after";if(null!==s&&lc(e)===u){let n=or(u,s,i);n.element!==s?a=n.resolveLeafPosition(s,e,t):0===t&&rc(u)&&(a="before")}o="before"===a?l:l+1,u=r.getParentOrThrow()}if(ru(u))return[n2(u.__key,o,"element"),s]}}else l=lc(e);return nG(l)?[n2(l.__key,o4(l,o,"clamp"),"text"),s]:null}
1function ip(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&&ru(l)&&l.isInline()){let t=l.getPreviousSibling();nG(t)&&e.set(t.__key,t.getTextContent().length,"text")}}else ru(i)&&!n&&i.isInline()?e.set(i.__key,i.getChildrenSize(),"element"):nG(i)&&!r.isUnmergeable()&&e.set(i.__key,i.getTextContent().length,"text")}else if(i===r.getTextContent().length){let i=r.getNextSibling(),l=r.getParent();if(t&&ru(i)&&i.isInline())e.set(i.__key,0,"element");else if((n||t)&&null===i&&ru(l)&&l.isInline()&&!l.canInsertTextAfter()&&l.getTextContentSize()>1){let t=l.getNextSibling();nG(t)&&e.set(t.__key,0,"text")}}}function iy(e){let t=ln(e.key);return null===t?null:oA(t)}function im(e,t,n){let i=iy(e),r=iy(t);if(i===r||null!==i&&null!==r&&i.is(r))return!1;let l=n(i,r);if(null!==i)return ru(i)?t.set(i.getKey(),l?i.getChildrenSize():0,"element"):t.set(i.getKey(),l?i.getTextContentSize():0,"text"),!0;let o=oO(r);if(null===o)return!1;let s=o.getParent();if(null===s)return!1;let a=o.getIndexWithinParent();return t.set(s.getKey(),l?a+1:a,"element"),!0}function ix(e){let t=im(e.anchor,e.focus,(t,n)=>(function(e,t,n,i){if(null!==n&&null!==i){let e=oO(n),t=oO(i);if(null!==e&&e.is(t)){for(let t of oD(e).values()){if(t===n.getKey())break;if(t===i.getKey())return!1}return!0}return null===e||null===t||e.isBefore(t)}if(null!==n){let e=oO(n),i=ln(t.key);return null===e||null===i||!(!e.is(i)&&!e.isParentOf(i))||e.isBefore(i)}let r=oO(i),l=ln(e.key);return null!==r&&null!==l&&!r.is(l)&&!r.isParentOf(l)&&l.isBefore(r)})(e.anchor,e.focus,t,n));return t&&(e.dirty=!0),t}function iC(e,t,n,i,r,l){if(null===e||null===n||!rX(r,e,n))return null;let o=i_(e,t,n9(l)?l.anchor:null,r);if(null===o)return null;let s=i_(n,i,n9(l)?l.focus:null,r);if(null===s)return null;let[a,u]=o,[f,d]=s;if("element"===a.type&&"element"===f.type){let t=lc(e),i=lc(n);if(rc(t)&&rc(i))return null}let c=r._slotsUsed&&im(a,f,()=>0!=(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING));return function(e,t){if("text"===e.type&&"text"===t.type){let n=e.isBefore(t),i=e.is(t);ip(e,n,i),ip(t,!n,i),i&&t.set(e.key,e.offset,e.type)}}(a,f),[a,f,u||d||c]}function iS(e){return ru(e)&&!e.isInline()}function iv(e,t,n,i,r,l){let o=i0(),s=new ie(n2(e,t,r),n2(n,i,l),0,"");return s.dirty=!0,o._selection=s,s}function iT(){return new ie(n2("root",0,"element"),n2("root",0,"element"),0,"")}function ik(){return new n7(new Set)}function ib(e,t,n,i){let r,l,o,s,a=n._window;if(null===a)return null;let u=i||a.event,f=u?u.type:void 0,d="selectionchange"===f,c=!J&&(d||"beforeinput"===f||"compositionstart"===f||"compositionend"===f||"click"===f&&u&&3===u.detail||"drop"===f||void 0===f);if(n9(e)&&!c)return e.clone();{if(null===t)return null;let i=l0(t,n._rootElement);if(r=i.anchorNode,l=i.focusNode,o=i.anchorOffset,s=i.focusOffset,(d||void 0===f)&&n9(e)&&!rX(n,r,l))return e.clone()}let h=iC(r,o,l,s,n,e);if(null===h)return null;let[g,_,p]=h,y=0,m="";if(n9(e)){let t=e.anchor;if(g.key===t.key)y=e.format,m=e.style;else{let e=g.getNode();nG(e)?(y=e.getFormat(),m=e.getStyle()):ru(e)&&(y=e.getTextFormat(),m=e.getTextStyle())}}let x=new ie(g,_,y,m);return p&&(x.dirty=!0),x}function iN(){return i0()._selection}function iw(){return i2()._editorState._selection}function iE(e,t,n,i=1){let 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"),iM(e)}}else{let o=e.isBackward(),s=o?l:r,u=s.getNode(),f=o?r:l,d=f.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(d)){let e=f.offset;(n<=e&&i>0||n<e&&i<0)&&f.set(a,Math.max(0,e+i),"element")}}iM(e)}function iM(e){let t=e.anchor,n=t.offset,i=e.focus,r=i.offset,l=t.getNode(),o=i.getNode();if(e.isCollapsed()){if(!ru(l))return;let e=l.getChildrenSize(),r=n>=e,o=r?l.getChildAtIndex(e-1):l.getChildAtIndex(n);if(nG(o)){let e=0;r&&(e=o.getTextContentSize()),t.set(o.__key,e,"text"),i.set(o.__key,e,"text")}return}if(ru(l)){let e=l.getChildrenSize(),i=n>=e,r=i?l.getChildAtIndex(e-1):l.getChildAtIndex(n);if(nG(r)){let e=0;i&&(e=r.getTextContentSize()),t.set(r.__key,e,"text")}}if(ru(o)){let e=o.getChildrenSize(),t=r>=e,n=t?o.getChildAtIndex(e-1):o.getChildAtIndex(r);if(nG(n)){let e=0;t&&(e=n.getTextContentSize()),i.set(n.__key,e,"text")}}}function iO(e,t,n,i,r){let l=null,o=0,s=null;
1null!==i?(l=i.__key,nG(i)?(o=i.getTextContentSize(),s="text"):ru(i)&&(o=i.getChildrenSize(),s="element")):null!==r&&(l=r.__key,nG(r)?s="text":ru(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 iA(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 iD(e,t,n,i,r){try{e.setBaseAndExtent(t,n,i,r)}catch(e){}}function iF(e,t,n){let i=lA(e,t.getKey());if(ru(t)){let r=or(t,i,e);return[r.element,n+r.getFirstChildOffset()]}return[i,n]}function iP(e,t,n,i,r,l){let o,s=l.getRootNode(),a=r6(s)||lV(s)?l2(s):null;if(r.has("collaboration")&&a!==l||null!==a&&rG(a,a))return;let f=l0(i,l);if(!n9(t))return void(null!==e&&rX(n,f.anchorNode,f.focusNode)&&i.removeAllRanges());let d=t.anchor,c=t.focus,h=d.getNode(),g=c.getNode(),[_,p]=iF(n,h,d.offset),[y,m]=iF(n,g,c.offset),x=t.format,C=t.style,S=t.isCollapsed(),v=_,T=y,k=!1;if("text"===d.type?(v=nG(h)?ol(h,_,n):null,k=h.getFormat()!==x||h.getStyle()!==C):n9(e)&&"text"===e.anchor.type&&(k=!0),"text"===c.type&&(T=nG(g)?ol(g,y,n):null),null!==v&&null!==T){var b,N;if(S&&(null===e||k||n9(e)&&(e.format!==x||e.style!==C))&&(b=d.key,N=performance.now(),n._inputState.collapsedSelectionFormat={format:x,key:b,offset:p,style:C,timeStamp:N}),("Range"!==i.type||!S)&&f.anchorOffset===p&&f.focusOffset===m&&f.anchorNode===v&&f.focusNode===T){if(null===a||!l.contains(a)){let e=null!==a?rQ(a):null;null!==e&&e!==n||r.has(nM)||l.focus({preventScroll:!0})}if("element"!==d.type)return}if(iD(i,v,p,T,m),u&&t.isCollapsed()&&null!==l&&!r.has(nM)){let e=l1(l);if(null===e||!l.contains(e)){let e=l2(l.ownerDocument),t=null!==e?rQ(e):null;null!==t&&t!==n||l.focus({preventScroll:!0})}}if(!r.has(nE)&&t.isCollapsed()&&null!==l&&l===l1(l)){let e=n9(t)&&"element"===t.anchor.type?v.childNodes[p]||null:(void 0===o&&(o=function(e,t){let n=lQ(e,t);if(null!==n){let e=function(e){let t=e.startContainer.ownerDocument;if(null===t)return null;let n=t.createRange();try{return n.setStart(e.startContainer,e.startOffset),n.setEnd(e.endContainer,e.endOffset),n}catch(e){return null}}(n);if(null!==e)return e}return e.rangeCount>0?e.getRangeAt(0):null}(i,l)),o);if(null!==e){let t;if(r3(e)){let n=e.ownerDocument.createRange();n.selectNode(e),t=n.getBoundingClientRect()}else t=e.getBoundingClientRect();!function(e,t,n){let i=lF(n),r=lL(i);if(null===i||null===r)return;let l=n.getBoundingClientRect();if(t.bottom<l.top)return;let{top:o,bottom:s}=t,a=0,u=0,f=n;for(;null!==f;){let t=f===i.body;if(t){let t=r.visualViewport;if(t){let e=t.offsetTop;a=e,u=e+t.height}else a=0,u=lK(e).innerHeight;let n=r.getComputedStyle(i.documentElement),l=parseFloat(n.scrollPaddingTop),o=parseFloat(n.scrollPaddingBottom);isFinite(l)&&(a+=l),isFinite(o)&&(u-=o)}else{let e=f===n?l:f.getBoundingClientRect();a=e.top,u=e.bottom}let d=0;if(o<a?d=-(a-o):s>u&&(d=s-u),0!==d)if(t)r.scrollBy(0,d);else{let e=f.scrollTop;f.scrollTop+=d;let t=f.scrollTop-e;o-=t,s-=t}if(t)break;f=lD(f)}}(n,t,l)}}n._inputState.isSelectionChangeFromDOMUpdate=!0}}function iI(e){let t=iN()||iw();null===t&&(t=lu().selectEnd()),t.insertNodes(e)}function iL(e,t){for(let n of e.split(/(\r?\n|\t)/))"\n"===n||"\r\n"===n?t.linebreak():" "===n?t.tab():""!==n&&t.text(n)}function iK(e){let t=[];return iL(e,{linebreak:()=>t.push(rv()),tab:()=>t.push(nQ()),text:e=>t.push(nY(e))}),t}function iz(e){let t=[];for(let n of e)rT(n)||(!ru(n)&&!rc(n)||n.isInline()?t.push(n):ru(n)&&t.push(...iz(n.getChildren())));return t}function iB(e){let t=e;e.isCollapsed()||t.removeText();let n=iN();n9(n)&&(t=n),n9(t)||r(161);let i=t.anchor,l=i.getNode(),o=i.offset;for(;!ot(l)&&null===oM(l);){let e=l;if([l,o]=function(e,t){let n=e.getParent();if(!n){let e=rM();return lu().append(e),e.select(),[lu(),0]}if(nG(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(!ru(e)||0===t)return[n,e.getIndexWithinParent()];let i=e.getChildAtIndex(t);if(i){let n=new ie(n2(e.__key,t,"element"),n2(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 iR(e){var t;return rT(e)||ru(t=e)&&t.isInline()||rc(t)&&t.isInline()||nG(e)||e.isParentRequired()}function iW(e){let t=rM(),n=null;for(let i=0;i<e.length;i++){let r=e[i];if(iR(r)){if(null===n){n=r.createParentElementNode(),t.append(n);let l=e[i+1];if(rT(r)&&(void 0===l||!iR(l)))continue}n.append(r)}else t.append(r),n=null}return t}function i$(e,t,n,i,r="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=sa(e.focus,n?"previous":"next"),o="lineboundary"===i,s="move"===t,a=l,u="decorators-and-blocks"===r;if(!sy(a)){for(let e of a){u=!1;let{origin:t}=e;if(!rc(t)||t.isIsolated()||(a=e,!o||!t.isInline()))break}if(u)for(let e of se(l).iterNodeCarets("extend"===t?"shadowRoot":"root")){if(oQ(e))e.origin.isInline()||(a=e);else{if(ru(e.origin))continue;rc(e.origin)&&!e.origin.isInline()&&(a=e)}break}}if(a===l)return!1;if(s&&!o&&rc(a.origin)&&a.origin.isKeyboardSelectable()){let e=ik();return e.add(a.origin.getKey()),lf(e),!0}
1return a=sp(a),s&&su(e.anchor,a),su(e.focus,a),u||!o}let iU=null,iH=null,ij=!1,iJ=!1,iV=!1,iq=new Set,iY=0,iG={characterData:!0,childList:!0,subtree:!0};function iX(){return ij||null!==iU&&iU._readOnly}function iZ(){ij&&r(13)}function iQ(){iY>99&&r(14)}function i0(){return null===iU&&r(195,i6()),iU}function i1(e){null!==i0()&&null===iH&&(iH=e),iH!==e&&l(378)}function i2(){return null===iH&&r(337,i6()),iH}function i3(){i2()._dirtyType=2}function i6(){let e=0,t=new Set,n=rU.version;if("undefined"!=typeof window)for(let i of lG(document)){let r=r0(i);if(rZ(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: ${e} compatible editor(s) with version ${n}`;return t.size&&(i+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),i}function i4(e,t,n){let i=t.__type,r=rV(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 i5(e,t){return void 0!==e&&e.__key!==t&&e.isAttached()}function i7(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 i8(e){return i9(e,i2()._nodes)}function i9(e,t){let n=e.type,i=t.get(n);void 0===i&&r(17,n);let l=i.klass;e.type!==l.getType()&&r(18,l.name);let o=l.importJSON(e),s=e.children;if(ru(o)&&Array.isArray(s))for(let e=0;e<s.length;e++){let n=i9(s[e],t);o.append(n)}let a=e.$slots;if(a)for(let e in ow(o)||r(379,l.name),a)o$(o,e,i9(a[e],t));return o}function re(e,t,n){let i=iU,r=ij,l=iH;iU=t,ij=!0,iH=e;try{return n()}finally{iU=i,ij=r,iH=l}}function rt(e,t){let n=iV;iV=!0;try{!function(e,t){let n=e._pendingEditorState,i=e._rootElement,r=e._headless||null===i;if(null===n)return!e._updating&&e._deferred.length>0&&ri(e,e._deferred);let l=e._editorState,o=l._selection,s=n._selection,a=0!==e._dirtyType,u=iU,f=ij,d=iH,c=e._updating,h=e._observer,g=null;if(e._pendingEditorState=null,e._editorState=n,!r&&a&&null!==h){iH=e,iU=n,ij=!1,e._updating=!0;try{let t=e._dirtyType,i=e._dirtyElements,r=e._dirtyLeaves;h.disconnect(),g=function(e,t,n,i,r,l){ek="",eb=null,eN=null,ew=null,eW=2===i,ev=n,eS=n._config,eR=n._config.dom||rB,eT=n._nodes,eA=ev._listeners.mutation,eD=r,eF=l,eP=e._nodeMap,eI=e,eL=t._nodeMap,e$=t._readOnly,eK=U(n._keyToDOMMap),ez=function(){let e=new Map,t=t=>{for(let n of t){let t=eL.get(n);if(void 0===t)continue;let i=t.__parent;if(null===i)continue;let r=e.get(i);void 0===r&&(r=new Set,e.set(i,r)),r.add(n)}};return t(eD.keys()),t(eF),e}();let o=new Map;return eB=o,e5("root",null),ev=void 0,eT=void 0,eD=void 0,eF=void 0,eP=void 0,eI=void 0,eL=void 0,eS=void 0,eK=void 0,ez=void 0,eB=void 0,eR=rB,o}(l,n,e,t,i,r)}catch(t){if(t instanceof Error&&e._onError(t),iJ)throw t;return rz(e,null,i,n),Z(e),e._dirtyType=2,iJ=!0,rt(e,l),void(iJ=!1)}finally{h.observe(i,iG),e._updating=c,iU=u,ij=f,iH=d}}n._readOnly||(n._readOnly=!0);let _=e._dirtyLeaves,p=e._dirtyElements,y=e._normalizedNodes,m=e._updateTags;a&&(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=ls(e)),delete r[n])}(e,n);let x=r?null:lJ(lK(e));if(e._editable&&null!==x&&(a||null===s||s.dirty||!s.is(o))&&null!==i&&!m.has("skip-dom-selection")){iH=e,iU=n;try{if(null!==h&&h.disconnect(),a||null===s||s.dirty){let t=e._blockCursorElement;null!==t&&lj(t,e,i),iP(o,s,e,x,m,i)}!function(e,t,n){let i=e._blockCursorElement;if(n9(n)&&n.isCollapsed()&&"element"===n.anchor.type&&t.contains(l1(t))){let r=n.anchor,l=r.getNode(),o=r.offset,s=!1,a=null;if(o===l.getChildrenSize())lH(l.getChildAtIndex(o-1))&&(s=!0);else{let t=l.getChildAtIndex(o);if(null!==t&&lH(t)){let n=t.getPreviousSibling();(null===n||lH(n))&&(s=!0,a=e.getElementByKey(t.__key))}}if(s){let n=or(l,e.getElementByKey(l.__key),e).element;return null===i&&(e._blockCursorElement=i=function(e){let t=e.theme,n=lZ().createElement("div");n.contentEditable="false",n.setAttribute("data-lexical-cursor","true");let i=t.blockCursor;return void 0!==i&&("string"==typeof i&&(i=t.blockCursor=sM(i)),void 0!==i&&n.classList.add(...i)),n}(e._config)),t.style.caretColor="transparent",null===a?n.appendChild(i):n.insertBefore(i,a)}}null!==i&&lj(i,e,t)}(e,i,s)}finally{null!==h&&h.observe(i,iG),iH=d,iU=u}}null!==g&&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,g,m,_,l),n9(s)||null===s||null!==o&&o.is(s)||e.dispatchCommand(tn);let C=e._pendingDecorators;null!==C&&(e._decorators=C,e._pendingDecorators=null,rn("decorator",e,!0,C)),function(e,t,n){let i=la(t),r=la(n);i!==r&&rn("textcontent",e,!0,r)}(e,t||l,n),rn("update",e,!0,{dirtyElements:p,dirtyLeaves:_,editorState:n,mutatedNodes:g,normalizedNodes:y,prevEditorState:t||l,tags:m}
1),c||ri(e,e._deferred),function(e){let t=e._updates;if(0===t.length)return e._cascadeCount=0;if(iq.has(e)||(iq.add(e),setTimeout(()=>{iq.delete(e),e._cascadeCount=0},0)),e._cascadeCount++>99)return e._updates=[],e._cascadeCount=0,e._onWarn(Error(`One or more update listeners are endlessly enqueueing more updates. May have encountered infinite recursion caused by update listeners that trigger additional updates without a stop condition. Editor namespace: ${e._config.namespace}`));let n=t.shift();if(n){let[t,i]=n;rl(e,t,i)}}(e)}(e,t)}finally{iV=n}}function rn(e,t,n,...i){let r=t._updating;t._updating=n;try{let n=t._listeners[e];for(let[e,t]of Array.from(n)){t&&t();let r=e(...i);n.has(e)?n.set(e,r):r&&r()}}finally{t._updating=r}}function ri(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 rr(e,t){let n=e._updates,i=t||!1;for(;0!==n.length;){let t=n.shift();if(t){let n,[l,o]=t,s=e._pendingEditorState;void 0!==o&&(n=o.onUpdate,o.skipTransforms&&(i=!0),o.discrete&&(null===s&&r(191),s._flushSync=!0),n&&e._deferred.push(n),i7(e,o.tag)),null==s?rl(e,l,o):l()}}return i}function rl(e,t,n){var i;let l=e._updateTags,o,s=!1,a=!1;void 0!==n&&(o=n.onUpdate,i7(e,n.tag),s=n.skipTransforms||!1,a=n.discrete||!1),o&&e._deferred.push(o);let u=e._editorState,f=e._pendingEditorState,d=!1;(null===f||f._readOnly)&&(f=e._pendingEditorState=r_(f||u),d=!0),f._flushSync=a;let c=iU,h=ij,g=iH,_=e._updating;iU=f,ij=!1,e._updating=!0,iH=e;let p=e._headless||null===e.getRootElement();i=null,rH=null;try{d&&(p?null!==u._selection&&(f._selection=u._selection.clone()):f._selection=function(e,t){let n=e.getEditorState()._selection,i=lJ(lK(e));return n9(n)||null==n?ib(n,i,e,t):n.clone()}(e,n&&n.event||null));let i=e._compositionKey;t(),s=rr(e,s),function(e,t){let n=t.getEditorState()._selection,i=e._selection;if(n9(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)}}}(f,e),0!==e._dirtyType&&(s?function(e,t){let n=t._dirtyLeaves,i=e._nodeMap;for(let e of n){let t=i.get(e);nG(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&e_(t)}}(f,e):function(e,t){let n=t._dirtyLeaves,i=t._dirtyElements,r=e._nodeMap,l=lt(),o=new Map,s=n,a=s.size,u=i,f=u.size;for(;a>0||f>0;){if(a>0){for(let e of(t._dirtyLeaves=new Set,s)){let i=r.get(e);nG(i)&&i.isAttached()&&i.isSimpleText()&&!i.isUnmergeable()&&e_(i),void 0!==i&&i5(i,l)&&i4(t,i,o),n.add(e)}if((a=(s=t._dirtyLeaves).size)>0){iY++;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&&i5(a,l)&&i4(t,a,o)}a=(s=t._dirtyLeaves).size,f=(u=t._dirtyElements).size,iY++}t._dirtyLeaves=n,t._dirtyElements=i}(f,e),rr(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()||(ru(t)&&j(t,e,r,l,o,i),r.has(e)||i.delete(e),o.push(e)))}for(let e of n){let t=l.get(e);void 0===t||t.isAttached()||(ow(t)&&null!==t.__slots&&j(t,e,r,l,o,n),r.has(e)||n.delete(e),o.push(e))}for(let e of o)l.delete(e);let s=i2(),a=s._compositionKey;null===a||l.has(a)||(s._compositionKey=null)}(u,f,e._dirtyLeaves,e._dirtyElements)),i!==e._compositionKey&&(f._flushSync=!0);let l=f._selection;if(n9(l)){e._slotsUsed&&ix(l);let t=f._nodeMap,n=l.anchor.key,i=l.focus.key;void 0!==t.get(n)&&void 0!==t.get(i)||r(19)}else it(l)&&0===l._nodes.size&&(f._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=u,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void rt(e)}finally{iU=c,ij=h,iH=g,e._updating=_,iY=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}(f,e)?f._flushSync?(f._flushSync=!1,rt(e)):d&&rY(()=>{rt(e)}):(f._flushSync=!1,d&&(l.clear(),e._deferred=[],e._pendingEditorState=null))}function ro(e,t,n){iH===e&&void 0===n?iX()?rl(e,t,n):t():rl(e,t,n)}function rs(e){if(lR(e)){let t=null;for(let n of e.getChildren())t=n.isInline()?(t||n.replace(n.createParentElementNode())).append(n):null}}class ra extends nS{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;__slotHost;__slots;$config(){return this.config(Symbol.for("ElementNode"),{$transform:rs,extends:nS})}constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle="",this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__slotHost=e.__slotHost,null!==this.__slotHost&&null!==this.__parent&&r(384,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots),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 D[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()&&0===oF(this).length}isDirty(){let e=i2()._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=[];for(let t of oF(this)){let n=oP(this,t);ru(n)&&e.push(...n.getAllTextNodes())}let t=this.getFirstChild();for(;null!==t;){if(nG(t)&&e.push(t),ru(t)){let n=t.getAllTextNodes();e.push(...n)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;ru(e);){let t=e.getFirstChild();if(null===t)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;ru(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 ru(e)&&e.getLastDescendant()||e||null}let i=t[e];return ru(i)&&i.getFirstDescendant()||i||null}getFirstChild(){let e=this.getLatest().__first;return null===e?null:ln(e)}getFirstChildOrThrow(){let e=this.getFirstChild();return null===e&&r(45,this.__key),e}getLastChild(){let e=this.getLatest().__last;return null===e?null:ln(e)}getLastChildOrThrow(){let e=this.getLastChild();return null===e&&r(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=oR(this),t=this.getChildren(),n=t.length;for(let i=0;i<n;i++){let r=t[i];e+=r.getTextContent(),ru(r)&&i!==n-1&&!r.isInline()&&(e+="\n\n")}return e}getTextContentSize(){let e=function(e){let t=0;for(let n of oF(e)){let i=oP(e,n);null!==i&&(t+=i.getTextContentSize())}return t}(this),t=this.getChildren(),n=t.length;for(let i=0;i<n;i++){let r=t[i];e+=r.getTextContentSize(),ru(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=A[e];return 0!=(this.getFormat()&t)}return!1}hasTextFormat(e){let t=M[e];return 0!=(this.getTextFormat()&t)}getFormatFlags(e,t){return r5(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){iZ();let n=iN(),i=e,r=t,l=this.getChildrenSize();if(!this.canBeEmpty()){if(0===e&&0===t){let e=this.getFirstChild();if(nG(e)||ru(e))return e.select(0,0)}else if((void 0===e||e===l)&&(void 0===t||t===l)){let e=this.getLastChild();if(nG(e)||ru(e))return e.select()}}void 0===i&&(i=l),void 0===r&&(r=l);let o=this.__key;
1return n9(n)?(n.anchor.set(o,i,"element"),n.focus.set(o,r,"element"),n.dirty=!0,n):iv(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();return this.getChildren().forEach(e=>e.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){let t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=""!==e&&A[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,n){nx(this)&&r(324,this.__key,this.__type);let i=this.getChildrenSize(),l=this.getWritable();for(let l of(e+t<=i||r(226,String(e),String(t),String(i)),n));let o=l.__key,s=[],a=[],u=this.getChildAtIndex(e+t),f=null,d=i-t+n.length;if(0!==e)if(e===i)f=this.getLastChild();else{let t=this.getChildAtIndex(e);null!==t&&(f=t.getPreviousSibling())}if(t>0){let e=null===f?this.getFirstChild():f.getNextSibling();for(let n=0;n<t;n++){null===e&&r(100);let t=e.getNextSibling(),n=e.__key;r8(e.getWritable()),a.push(n),e=t}}let c=f;for(let e of n){null!==c&&e.is(c)&&(f=c=c.getPreviousSibling());let t=e.getWritable();t.__parent===o&&d--,r8(t);let n=e.__key;if(null===c)l.__first=n,t.__prev=null;else{let e=c.getWritable();e.__next=n,t.__prev=e.__key}e.__key===o&&r(76),t.__parent=o,s.push(n),c=e}if(e+t===i)null!==c&&(c.getWritable().__next=null,l.__last=c.__key);else if(null!==u){let e=u.getWritable();if(null!==c){let t=c.getWritable();e.__prev=c.__key,t.__next=u.__key}else e.__prev=null}if(l.__size=d,a.length){let e=iN();if(n9(e)){let t=new Set(a),n=new Set(s),{anchor:i,focus:r}=e;rf(i,t,n)&&iO(i,i.getNode(),this,f,u),rf(r,t,n)&&iO(r,r.getNode(),this,f,u),0!==d||this.canBeEmpty()||lR(this)||this.remove()}}return l}getDOMSlot(e){return new B(e)}exportDOM(e){let{element:t}=super.exportDOM(e);if(l6(t)){let e=this.getIndent();e>0&&(t.style.paddingInlineStart=40*e+"px",t.setAttribute("data-lexical-indent",String(e)));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||lR(this)||this.getChildren().some(nG)||(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=or(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)}}}function ru(e){return e instanceof ra}function rf(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 rd extends nS{__slotHost;__slots;constructor(e){super(e),this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__slotHost=e.__slotHost,null!==this.__slotHost&&null!==this.__parent&&r(383,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots)}decorate(e,t){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function rc(e){return e instanceof rd}class rh extends ra{__cachedText;$config(){return this.config("root",{extends:ra})}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){r(51)}getTextContent(){let e=this.__cachedText;
1return null!==e&&(iX()||0===i2()._dirtyType)?e:super.getTextContent()}remove(){r(52)}replace(e){r(53)}insertBefore(e){r(54)}insertAfter(e){r(55)}updateDOM(e,t){return!1}splice(e,t,n){for(let e of n)ru(e)||rc(e)||r(282);return super.splice(e,t,n)}static importJSON(e){return lu().updateFromJSON(e)}collapseAtStart(){return!0}}function rg(e){return e instanceof rh}function r_(e){return new rm(U(e._nodeMap),null,e._slotsUsed)}function rp(){return new rm(new Map([["root",new rh]]),null,!1)}function ry(e){return e instanceof rm}class rm{_nodeMap;_selection;_flushSync;_readOnly;_parsed;_slotsUsed;constructor(e,t=null,n=!1){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1,this._parsed=!1,this._slotsUsed=n}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(e,t){return re(t&&t.editor||null,this,e)}clone(e){let t=new rm(this._nodeMap,void 0===e?this._selection:e,this._slotsUsed);return t._readOnly=!0,t}toJSON(){return re(null,this,()=>({root:function e(t){let n=t.exportJSON(),i=t.constructor;if(n.type!==i.getType()&&r(130,i.name),ru(t)){let l=n.children;Array.isArray(l)||r(59,i.name);let o=t.getChildren();for(let t=0;t<o.length;t++){let n=e(o[t]);l.push(n)}}let l=oF(t);if(l.length>0){let o={};for(let n of l){let l=oP(t,n);null===l&&r(366,i.name,n),o[n]=e(l)}n.$slots=o}return n}(lu())}))}}class rx extends ra{$config(){return this.config("artificial",{extends:ra})}createDOM(e){return lZ().createElement("div")}}class rC extends nS{$config(){return this.config("linebreak",{importDOM:{br:e=>rk(e)||rb(e)?null:{conversion:rS,priority:0}}})}getTextContent(){return"\n"}createDOM(){return lZ().createElement("br")}updateDOM(){return!1}isInline(){return!0}}function rS(e){return{node:rv()}}function rv(){return l$(new rC)}function rT(e){return e instanceof rC}function rk(e){let t=e.parentElement;if(null!==t&&oe(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&rN(n)){let n=t.lastChild;if(n===e||n.previousSibling===e&&rN(n))return!0}}return!1}function rb(e){let t=e.parentElement;if(null!==t&&oe(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&rN(n))return!1;let i=t.lastChild;if(i===e||i.previousSibling===e&&rN(i))return!0}return!1}function rN(e){return r3(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}class rw extends ra{$config(){return this.config("paragraph",{extends:ra,importDOM:{p:()=>({conversion:rE,priority:0})}})}createDOM(e){let t=lZ().createElement("p"),n=lN(e.theme,"paragraph");return void 0!==n&&t.classList.add(...n),t}updateDOM(e,t,n){return!1}exportDOM(e){let{element:t}=super.exportDOM(e);if(l6(t)){this.isEmpty()&&t.append(lZ().createElement("br"));let e=this.getFormatType();e&&(t.style.textAlign=e)}return{element:t}}exportJSON(){let e=super.exportJSON();if(void 0===e.textFormat||void 0===e.textStyle){let t=this.getChildren().find(nG);t?(e.textFormat=t.getFormat(),e.textStyle=t.getStyle()):(e.textFormat=this.getTextFormat(),e.textStyle=this.getTextStyle())}return e}insertNewAfter(e,t){let n=rM();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||nG(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 rE(e){let t=rM();if(oh(t,e),od(e,t),""===t.getFormatType()){let n=e.getAttribute("align");n&&n&&n in A&&t.setFormat(n)}return oc(t,e),{node:t}}function rM(){return l$(new rw)}function rO(e){return e instanceof rw}function rA(e){console.warn(e)}let rD=0,rF=1,rP=3,rI=4,rL=-8,rK=-4;function rz(e,t,n,i,r){let l=e._keyToDOMMap;l.clear(),e._editorState=rp(),e._pendingEditorState=i,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,r&&r.preserveUpdateQueue||(e._updateTags=new Set,e._updates=[],e._cascadeCount=0),e._blockCursorElement=null,null!==e._inputState.handledSelectionCommandTimeoutId&&clearTimeout(e._inputState.handledSelectionCommandTimeoutId),e._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null};let o=e._observer;null!==o&&(o.disconnect(),e._observer=null),null!==t&&(t.textContent="",function(e,t){let n=`__lexicalKey_${t._key}`;delete e[n]}(t,e)),null!==n&&(n.textContent="",l.set("root",n),lr(n,e,"root"))}let rB={$createDOM:(e,t)=>e.createDOM(t._config,t),$decorateDOM:(e,t,n,i)=>{},$exportDOM:(e,t)=>{let n=rq(t,e.getType());return n&&void 0!==n.exportDOM?n.exportDOM(t,e):e.exportDOM(t)},$extractWithChild:(e,t,n,i,r)=>
1ru(e)&&e.extractWithChild(t,n,i),$getDOMSlot:(e,t,n)=>e.getDOMSlot(t),$getSlotTargetElement:(e,t,n,i)=>null,$shouldExclude:(e,t,n)=>ru(e)&&e.excludeFromCopy("html"),$shouldInclude:(e,t,n)=>!t||e.isSelected(t),$updateDOM:(e,t,n,i)=>e.updateDOM(t,n,i._config)};function rR(e){let t,n=e||{},i=iH,l=n.theme||{},o=void 0===e?i:n.parentEditor||null,s=n.disableEvents||!1,a=rp(),u=n.namespace||(null!==o?o._config.namespace:l_()),f=n.editorState,d=[rh,nW,rC,nZ,rw,rx,...n.nodes||[]],{onError:c,onWarn:h,html:g}=n,_=void 0===n.editable||n.editable;if(void 0===e&&null!==i)t=i._nodes;else{t=new Map;for(let e=0;e<d.length;e++){let i=d[e],l=null,o=null;if(i&&"object"==typeof i){let e=i;i=e.replace,l=e.with,o=e.withKlass||null}if("function"!=typeof i||!i.prototype||!(i===nS||i.prototype instanceof nS)){let t="<unknown>";try{t=JSON.parse(W)}catch(e){}r(365,String(e-d.length+(n.nodes?n.nodes.length:0)),"function"==typeof i?`${i.name}${"function"==typeof i.getType?` (type ${String(i.getType())})`:""}`:String(i),String(t))}ox(i);let s=i.getType(),a=function(e){let t=new Set,n=new Set;for(let{klass:i,ownNodeConfig:r}of oC(e)){let e=i.transform;if(!n.has(e)){n.add(e);let r=i.transform();r&&t.add(r)}if(r){let e=r.$transform;e&&t.add(e)}}return t}(i);t.set(s,{exportDOM:g&&g.export?g.export.get(i):void 0,klass:i,replace:l,replaceWithKlass:o,sharedNodeState:function(e){let t=new Map,n=new Set;for(let{ownNodeConfig:i}of oC("function"==typeof e?e:e.replace))if(i&&i.stateConfigs)for(let e of i.stateConfigs){let i;"stateConfig"in e?(i=e.stateConfig,e.flat&&n.add(i.key)):i=e,t.set(i.key,i)}return{flatKeys:n,sharedConfigMap:t}}(d[e]),transforms:a})}}let p=new rU(a,o,t,{disableEvents:s,dom:{...rB,...e&&e.dom},namespace:u,theme:l},c||console.error,h||rA,function(e,t){let n=new Map,i=new Set,r=e=>{Object.keys(e).forEach(t=>{let i=n.get(t);void 0===i&&(i=[],n.set(t,i)),i.push(e[t])})};return e.forEach(e=>{let t=e.klass.importDOM;if(null==t||i.has(t))return;i.add(t);let n=t.call(e.klass);null!==n&&r(n)}),t&&r(t),n}(t,g?g.import:void 0),_,e);return void 0!==f&&(p._pendingEditorState=f,p._dirtyType=2),p.registerCommand(tl,nr,rD),p.registerCommand(to,nl,rD),p.registerCommand(ts,no,rD),p.registerCommand(ta,ns,rD),p.registerCommand(tS,nf,rD),p}function rW(e,t){let n=e.get(t);e.delete(t),n&&n()}function r$(e,t,n){return e.set(t,n),rW.bind(null,e,t)}class rU{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_cascadeCount;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_onWarn;_htmlConversions;_window;_editable;_blockCursorElement;_slotsUsed;_inputState;_createEditorArgs;constructor(e,t,n,i,r,l,o,s,a){this._createEditorArgs=a,this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new H,this._updates=[],this._updating=!1,this._cascadeCount=0,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=i,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=l_(),this._onError=r,this._onWarn=l,this._htmlConversions=o,this._editable=s,this._headless=null!==t&&t._headless,this._window=null,this._blockCursorElement=null,this._slotsUsed=!1,this._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null}}isComposing(){return null!=this._compositionKey}registerUpdateListener(e){return r$(this._listeners.update,e)}
1registerEditableListener(e){return r$(this._listeners.editable,e)}registerDecoratorListener(e){return r$(this._listeners.decorator,e)}registerTextContentListener(e){return r$(this._listeners.textcontent,e)}registerRootListener(e){let t=this._listeners.root;return sD(r$(t,e,e(this._rootElement,null)||void 0),()=>(function(e,t,n){let i=e.get(t);i&&i(),e.set(t,t(...n)||void 0)})(t,e,[null,this._rootElement]))}registerCommand(e,t,n){void 0===n&&r(35);let i=this._commands;i.has(e)||i.set(e,[new $,new $,new $,new $,new $]);let l=i.get(e);void 0===l&&r(36,String(e));let o=7&n,s=l[o];return o!==n?s.addFront(t):s.addBack(t),()=>{s.delete(t),l.every(e=>0===e.size)&&i.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&&r(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){let n=this._editorState,i=oa(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=oa(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=ln(t);e&&e.markDirty()}},null===e._pendingEditorState?{tag:nb}: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 lO(this,e,...t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){let t=this._rootElement;if(e!==t){let n=lN(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=e,rz(this,t,e,i,{preserveUpdateQueue:!0}),null!==t&&(this._config.disableEvents||function(e){let t=t1.get(e);if(void 0===t)return np();let n=t2.get(t);if(void 0===n)return np();t1.delete(e);let i=r0(e);rZ(i)?(function(e){if(null!==e._parentEditor){let t=lg(e),n=t[t.length-1]._key;nc.get(n)===e&&nc.delete(n)}else nc.delete(e._key)}(i),n.editors.delete(i),n.hasShadowEditor=void 0,e.__lexicalEditor=null):i&&r(198);let l=nd(e);for(let e=0;e<l.length;e++)l[e]();e.__lexicalEventHandles=[]}(t),null!=n&&t.classList.remove(...n)),null!==e){let t=lL(e),i=e.style;i.userSelect="text",i.whiteSpace="pre-wrap",i.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=t,this._dirtyType=2,Z(this),this._updateTags.add(nb),rt(this),this._config.disableEvents||function(e,t){let n=e.ownerDocument;t1.set(e,n);let i=t2.get(n);void 0===i&&(i={editors:new Set,hasShadowEditor:void 0},t2.set(n,i)),i.editors.add(t),i.hasShadowEditor=void 0,e.__lexicalEditor=t;let r=nd(e);r.push(t3.register(n));for(let n=0;n<t0.length;n++){let[i,l]=t0[n],o="function"==typeof l?e=>{n_(e)||(ng(e),(t.isEditable()||"click"===i)&&l(e,t))}:e=>{if(n_(e))return;ng(e);let n=t.isEditable();switch(i){case"cut":return n&&lO(t,tU,e);case"copy":return lO(t,t$,e);case"paste":return n&&lO(t,th,e);case"dragstart":return n&&lO(t,tB,e);case"dragover":return n&&lO(t,tR,e);case"dragend":return n&&lO(t,tW,e);case"focus":return n&&lO(t,tY,e);case"blur":return n&&lO(t,tG,e);case"drop":return n&&lO(t,tK,e)}};r.push(tZ(e,i,o))}}(e,this),null!=n&&e.classList.add(...n)}else this._window=null,this._updateTags.add(nb),rt(this);rn("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&r(38);let n=e;n._readOnly&&((n=r_(e))._selection=e._selection?e._selection.clone():null),X(this);
1let i=this._pendingEditorState,l=void 0!==t?t.tag:null;null===i||i.isEmpty()||(null!=l&&this._updateTags.add(l),rt(this)),this._pendingEditorState=n,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||e._slotsUsed,ro(this,()=>{if(l&&this._updateTags.add(l),e._parsed)for(let[e,t]of n._nodeMap.entries())ru(t)?this._dirtyElements.set(e,!0):this._dirtyLeaves.add(e)},{discrete:!this._updating||void 0})}parseEditorState(e,t){return function(e,t,n){var i;let r=rp(),l=iU,o=ij,s=iH,a=t._dirtyElements,u=t._dirtyLeaves,f=t._cloneNotNeeded,d=t._dirtyType;t._dirtyElements=new Map,t._dirtyLeaves=new Set,t._cloneNotNeeded=new Set,t._dirtyType=0,iU=r,ij=!1,iH=t,i=null,rH=null;try{let i=t._nodes;i9(e.root,i),n&&n(),r._readOnly=!0,r._parsed=!0}catch(e){e instanceof Error&&t._onError(e)}finally{t._dirtyElements=a,t._dirtyLeaves=u,t._cloneNotNeeded=f,t._dirtyType=d,iU=l,ij=o,iH=s}return r}("string"==typeof e?JSON.parse(e):e,this,t)}read(...e){let[t,n]=1===e.length?["force-commit",e[0]]:e;return"force-commit"===t&&rt(this),("pending"===t?this._pendingEditorState||this._editorState:this.getEditorState()).read(n,{editor:this})}update(e,t){this._updating?this._updates.push([e,t]):rl(this,e,t)}focus(e,t={}){let n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),ro(this,()=>{var i;let r=iN(),l=lu();null!==r?r.dirty||lf(r.clone()):0!==l.getChildrenSize()&&("rootStart"===t.defaultSelection?l.selectStart():l.selectEnd()),lP("focus"),i=()=>{n.removeAttribute("autocapitalize"),e&&e()},iZ(),i2()._deferred.push(i)}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){let e=this._rootElement;null!==e&&e.blur();let t=lJ(this._window);null!==t&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,rn("editable",this,!0,e),this._slotsUsed&&this.update(()=>i3()))}toJSON(){return{editorState:this._editorState.toJSON()}}}rU.version=W;let rH=null,rj=Symbol("INTERNAL_SKIP_AFTER_CLONE_FROM"),rJ=1;function rV(e,t){let n=rq(e,t);return void 0===n&&r(30,t),n}function rq(e,t){return e._nodes.get(t)}let rY="function"==typeof queueMicrotask?queueMicrotask:e=>{Promise.resolve().then(e)};function rG(e,t){let n=void 0!==t?t:(()=>{let t=e.getRootNode();return r6(t)||lV(t)?l2(t):null})();if(!l6(n)||n.hasAttribute("data-lexical-slot"))return!1;let i=lo(n),r=n.nodeName;return nv(i)&&("INPUT"===r||"TEXTAREA"===r||"true"===n.contentEditable&&null==r0(n))}function rX(e,t,n){let i=e.getRootElement();if(!i)return!1;try{if(!t||!i.contains(t)||!i.contains(n))return!1}catch(e){return!1}return rQ(t)===e&&e.read("latest",()=>!rG(t))}function rZ(e){return e instanceof rU}function rQ(e){let t=e;for(;null!=t;){let e=r0(t);if(rZ(e))return e;t=lD(t)}return null}function r0(e){return e?e.__lexicalEditor:null}function r1(e){return n0(e)||e.isToken()}function r2(e){return r1(e)||e.isSegmented()}
1function r3(e){return l4(e)&&3===e.nodeType}function r6(e){return l4(e)&&9===e.nodeType}function r4(e){let t=e;for(;null!=t;){if(r3(t))return t;t=t.firstChild}return null}function r5(e,t,n){let i=M[t];if(null!==n&&(e&i)==(n&i))return e;let r=e^i;return"subscript"===t?r&=~M.superscript:"superscript"===t?r&=~M.subscript:"lowercase"===t?(r&=~M.uppercase,r&=~M.capitalize):"uppercase"===t?(r&=~M.lowercase,r&=~M.capitalize):"capitalize"===t&&(r&=~M.lowercase,r&=~M.uppercase),r}function r7(e,t){let n=function(){let e=rH;return rH=null,e}();if(null!=(t=t||n&&n.__key))return void(e.__key=t);iZ(),iQ();let i=i2(),r=i0(),l=""+rJ++;r._nodeMap.set(l,e),ru(e)?i._dirtyElements.set(l,!0):i._dirtyLeaves.add(l),i._cloneNotNeeded.add(l),0===i._dirtyType&&(i._dirtyType=1),e.__key=l}function r8(e){null!==oM(e)&&r(380,e.__key,String(oM(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 r9(e){iQ(),nx(e)&&r(323,e.__key,e.__type);let t=e.getLatest(),n=null!==t.__parent?t.__parent:oE(t)?t.__slotHost:null,i=i0(),l=i2(),o=i._nodeMap,s=l._dirtyElements;null!==n&&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=null!==e.__parent?e.__parent:oE(e)?e.__slotHost:null}}(n,o,s);let a=t.__key;0===l._dirtyType&&(l._dirtyType=1),ru(e)?s.set(a,!0):l._dirtyLeaves.add(a)}function le(e){iZ();let t=i2(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,null!==n){let e=ln(n);null!==e&&e.getWritable()}if(null!==e){let t=ln(e);null!==t&&t.getWritable()}}}function lt(){return iX()?null:i2()._compositionKey}function ln(e,t){let n=(t||i0())._nodeMap.get(e);return void 0===n?null:n}function li(e,t){let n=ll(e,i2());return void 0!==n?ln(n,t):null}function lr(e,t,n){e[`__lexicalKey_${t._key}`]=n}function ll(e,t){return e[`__lexicalKey_${t._key}`]}function lo(e,t){let n=e;for(;null!=n;){let e=li(n,t);if(null!==e)return e;n=lD(n)}return null}function ls(e){let t=Object.assign({},e._decorators);return e._pendingDecorators=t,t}function la(e){return e.read(()=>lu().getTextContent())}function lu(){return i0()._nodeMap.get("root")}function lf(e){iZ();let t=i0();null!==e&&(e.dirty=!0,e.setCachedNodes(null),n9(e)&&i2()._slotsUsed&&ix(e)),t._selection=e}function ld(){iZ(),X(i2())}function lc(e){let t=function(e,t){let n=e;for(;null!=n;){let e=ll(n,t);if(void 0!==e)return e;n=lD(n)}return null}(e,i2());return null===t?null:ln(t)}function lh(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function lg(e){let t=[];for(let n=e;null!==n;n=n._parentEditor)t.push(n);return t}function l_(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function lp(e){return r3(e)?e.nodeValue:null}function ly(e,t,n){let i=lJ(lK(t));if(null===i)return;let r=l0(i,t._rootElement),l=r.anchorNode,{anchorOffset:o,focusOffset:s}=r;if(null!==l){let t=lp(l),i=lo(l);if(null!==t&&nG(i)){if((t===b||t===N)&&n){let e=n.length;t=n,o=e,s=e}null!==t&&lm(i,t,o,s,e)}}}function lm(e,t,n,i,r){let l=e;if(l.isAttached()&&(r||!l.isDirty())){let o=l.isComposing();if(l.isToken()&&o)return;let s=t;if((o||r)&&(t.endsWith(b)&&(s=t.slice(0,-b.length)),r)){let e;for(;-1!==(e=s.indexOf(N));)s=s.slice(0,e)+s.slice(e+N.length),null!==n&&n>e&&(n=Math.max(e,n-N.length)),null!==i&&i>e&&(i=Math.max(e,i-N.length))}let a=l.getTextContent();if(r||s!==a){let t=iN();if(""===s){if(le(null),h||d||p)l.remove();else{let e=i2();lx(l,"",t),setTimeout(()=>{e.update(()=>{l.isAttached()&&""===l.getTextContent()&&l.remove()})},20)}return}let r=l.getParent(),a=iw(),u=l.getTextContentSize(),f=lt(),c=l.getKey();if(l.isToken()&&!o||null!==f&&c===f&&!o||n9(a)&&(null!==r&&!r.canInsertTextBefore()&&0===a.anchor.offset||a.anchor.key===e.__key&&0===a.anchor.offset&&!l.canInsertTextBefore()&&!o||a.focus.key===e.__key&&a.focus.offset===u&&!l.canInsertTextAfter()&&!o))return void l.markDirty();if(!n9(t)||null===n||null===i)return void lx(l,s,t);if(t.setTextNodeRange(l,n,l,i),l.isSegmented()){let e=nY(l.getTextContent());l.replace(e),l=e}lx(l,s,t)}}}function lx(e,t,n){if(e.setTextContent(t),n9(n)){let t=e.getKey(),i=!1;for(let r of["anchor","focus"]){let l=n[r];"text"===l.type&&l.key===t&&(l.offset=o4(e,l.offset,"clamp"),i=!0)}i&&(n._cachedNodes=null,n._cachedIsBackward=null)}}function lC(e,t,n){let i=t[n]||!1;return"any"===i||i===e[n]}
1function lS(e,t,n){if(!(lC(e,n,"altKey")&&lC(e,n,"ctrlKey")&&lC(e,n,"shiftKey")&&lC(e,n,"metaKey")))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${t}`;let i="Key"+t.toUpperCase();return e.code===i}let lv={ctrlKey:!a,metaKey:a},lT={altKey:a,ctrlKey:!a};function lk(e){return"Backspace"===e.key}function lb(e){let t=lu();if(n9(e)){let t=e.anchor,n=e.focus,i=t.getNode();if(rg(i))return t.set(i.getKey(),0,"element"),n.set(i.getKey(),i.getChildrenSize(),"element"),ep(e),e;let r=i.getTopLevelElementOrThrow(),l=r.getParent();return null===l?ru(r)&&(t.set(r.getKey(),0,"element"),n.set(r.getKey(),r.getChildrenSize(),"element"),ep(e)):(t.set(l.getKey(),0,"element"),n.set(l.getKey(),l.getChildrenSize(),"element"),ep(e)),e}{let e=t.select(0,t.getChildrenSize());return lf(ep(e)),e}}function lN(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=sM(r);return n[t]=e,e}return r}function lw(e,t,n,i,l){if(0===n.size)return;let o=i.__type,s=i.__key,a=t.get(o);void 0===a&&r(33,o);let u=a.klass,f=e.get(u);void 0===f&&(f=new Map,e.set(u,f));let d=f.get(s),c="destroyed"===d&&"created"===l;(void 0===d||c)&&f.set(s,c?"updated":l)}function lE(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 lM(e){let t=lK(e).event,n=t&&t.inputType;return"insertFromPaste"===n||"insertFromPasteAsQuotation"===n}function lO(e,t,...n){return function e(t,n,i,r){let l,o=lg(t);if(!iV)for(let e=0;e<o.length;e++)o[e]._updating||(o[e]._cascadeCount=0);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(ro(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[0],e)}function lA(e,t){let n=e._keyToDOMMap.get(t);return void 0===n&&r(75,t),n}function lD(e){let t=e.assignedSlot||e.parentElement;if(null!==t)return t;let n=e.parentNode;return lV(n)?n.host:null}function lF(e){return r6(e)?e:l6(e)?e.ownerDocument:null}function lP(e){iZ(),i2()._updateTags.add(e)}function lI(e,t){let n=e.getParent();for(;null!==n;){if(n.is(t))return!0;n=n.getParent()}return!1}function lL(e){let t=lF(e);return t?t.defaultView:null}function lK(e){let t=e._window;return null===t&&r(78),t}function lz(e){let t=e.getLatest();for(;null!==t&&!(null!==oM(t)&&ru(t));){let e=t.getParentOrThrow();if(lR(e))return e;t=e}return t}function lB(e){return ru(e)&&e.isShadowRoot()}function lR(e){return rg(e)||lB(e)}function lW(e,t=!1){let n=e.constructor.clone(e,rj);return r7(n,null),n.afterCloneFrom(e),t||n.resetOnCopyNodeFrom(e),n}function l$(e){let t=i2(),n=e.getType(),i=rq(t,n);void 0===i&&r(200,e.constructor.name,n);let{replace:l,replaceWithKlass:o}=i;if(null!==l){let t=l(e),i=t.constructor;return null!==o?t instanceof o||r(201,o.name,o.getType(),i.name,i.getType(),e.constructor.name,n):t instanceof e.constructor&&i!==e.constructor||r(202,i.name,i.getType(),e.constructor.name,n),t.__key===e.__key&&r(203,e.constructor.name,n,i.name,i.getType()),t}return e}function lU(e,t){!rg(e.getParent())||ru(t)||rc(t)||r(99)}function lH(e){if(!e||e.isInline())return!1;if(rc(e))return!0;if(ru(e)){if(e.isShadowRoot()){let t=e.getParent();return!(ru(t)&&t.isShadowRoot())}return!e.canBeEmpty()}return!1}
1function lj(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;let i=e.parentElement;null!==i&&i.removeChild(e)}function lJ(e){return o?(e||window).getSelection():null}function lV(e){return l5(e)&&"host"in e}let lq=[];function lY(e){let t=e.getRootNode();if(t===e||!lV(t))return lq;let n=[t],i=t.host;for(;;){let e=i.getRootNode();if(e===i||!lV(e))break;n.push(e),i=e.host}return n}function*lG(e){let t,n=[e];for(;t=n.pop();){let e;yield*t.querySelectorAll('[data-lexical-editor="true"]');let i=(r6(t)?t:t.ownerDocument).createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;e=i.nextNode();)e.shadowRoot&&n.push(e.shadowRoot)}}function lX(e){return null!==e?e.ownerDocument:document}function lZ(){let e=iH;return lX(null!==e?e._rootElement:null)}function lQ(e,t){if(null===t||"function"!=typeof e.getComposedRanges)return null;let n=lY(t);if(0===n.length)return null;let i=e.getComposedRanges;try{let t=i.call(e,{shadowRoots:n})[0];if(void 0!==t)return t}catch(e){}try{let t=i.apply(e,n)[0];if(void 0!==t)return t}catch(e){}return null}function l0(e,t){let n=lQ(e,t);return null===n?e:function(e,t){let{startContainer:n,startOffset:i,endContainer:r,endOffset:l}=e;return"backward"===t?{anchorNode:r,anchorOffset:l,direction:t,focusNode:n,focusOffset:i}:{anchorNode:n,anchorOffset:i,direction:t,focusNode:r,focusOffset:l}}(n,e.direction)}function l1(e){let t=e.getRootNode();return r6(t)||lV(t)?t.activeElement:null}function l2(e){let t=e.activeElement;for(;null!==t&&null!==t.shadowRoot;){let e=t.shadowRoot.activeElement;if(null===e)break;t=e}return t}function l3(e){let t=e.target;if(null!==t&&l6(t)&&null!==t.shadowRoot&&"function"==typeof e.composedPath){let t=e.composedPath();if(t.length>0)return t[0]}return t}function l6(e){return l4(e)&&1===e.nodeType}function l4(e){return"object"==typeof e&&null!==e&&"nodeType"in e&&"number"==typeof e.nodeType}function l5(e){return l4(e)&&11===e.nodeType}let l7=/^(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;function l8(e){return!(!l6(e)||!e.style.display.startsWith("inline"))||l7.test(e.nodeName)}let l9=/^(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;function oe(e){return(!l6(e)||!e.style.display.startsWith("inline"))&&l9.test(e.nodeName)}function ot(e){if(rc(e)&&!e.isInline())return!0;if(!ru(e)||lR(e))return!1;let t=e.getFirstChild(),n=null===t||rT(t)||nG(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}function on(){return i2()}function oi(e=on()){return e._config.dom||rB}function or(e,t,n=on()){let i=oi(n).$getDOMSlot(e,t,n);return ru(e)&&(i instanceof B||r(344,e.getKey(),e.getType())),i}function ol(e,t,n=on()){return r4(or(e,t,n).element)}let oo=new WeakMap,os=new Map;function oa(e){if(!e._readOnly&&e.isEmpty())return os;e._readOnly||r(192);let t=oo.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),oo.set(e,t)),t}function ou(e){let t=e.constructor.clone(e,rj);return t.afterCloneFrom(e),t}function of(e){var t;return(t=ou(e))[nm]=!0,t}function od(e,t){let n=e.getAttribute("data-lexical-indent");if(null!==n){let e=parseInt(n,10);if(Number.isFinite(e)&&e>=0)return void t.setIndent(e)}let i=Math.round((parseInt(e.style.paddingInlineStart,10)||0)/40);t.setIndent(i)}function oc(e,t){let n=t.getAttribute("dir");return"ltr"===n||"rtl"===n?e.setDirection(n):e}function oh(e,t){let n=t.style.textAlign;return n&&n in A?e.setFormat(n):e}function og(e){return!0===e.__lexicalUnmanaged}function o_(e,t){let n=e;for(;null!=n;){if(!0===n.__lexicalCapturedSelection)return!0;if(l6(n)&&n.hasAttribute("data-lexical-slot")||void 0!==ll(n,t))break;n=lD(n)}return!1}function op(e,t){return Object.prototype.hasOwnProperty.call(e,t)&&e[t]!==nS[t]}let oy=new WeakMap,om=Symbol("lexical.synthesizedGetType");function ox(e){let t=oy.get(e);if(t)return t;let n=null!=e.prototype&&I in e.prototype?e.prototype[I]():void 0,i=function(e){if(!(e===nS||e.prototype instanceof nS)){let t="<unknown>",n="<unknown>";try{t=e.getType()}catch(e){}try{rU.version&&(n=JSON.parse(rU.version))}catch(e){}r(290,e.name,t,n)}return e===rd||e===ra||e===nS}(e),l=!i&&op(e,"getType")?e.getType:void 0,o=!l||om in l?void 0:l.call(e),s,a=o;if(n)if(o)s=n[o];else{for(let[e,t]of Object.entries(n))a=e,s=t;if(!s)for(let e of Object.getOwnPropertySymbols(n)){let t=n[e];if(t){s=t;break}}}if(!i&&a){if(!op(e,"getType")){let t=function(){return this!==e?nS.getType.call(this):a};t[om]=!0,e.getType=t}if(op(e,"clone")||(e.clone=(t,n)=>{rH=t;let i=new e;return n!==rj&&i.afterCloneFrom(t),i}),op(e,"importJSON")||(e.importJSON=s&&s.$importJSON||(t=>(new e).updateFromJSON(t))),!op(e,"importDOM")&&s){let{importDOM:t}=s;t&&(e.importDOM=()=>t)}}let u={klass:e,ownNodeConfig:s,ownNodeType:a};return oy.set(e,u),u}function*oC(e){for(let t=e;t&&(t===nS||nv(t.prototype));){let e=ox(t);yield e,t=e.ownNodeConfig&&e.ownNodeConfig.extends||ob(t)}}function oS(e){let t=new Map,n=new Map;for(let i of e){let{ownNodeType:e}=ox(i);e&&(n.set(e,i),t.set(e,new Set))}for(let[e,i]of n)for(let{ownNodeType:n}of oC(i)){let i=n&&t.get(n);i&&i.add(e)}return t}function ov(e){let t=on();return iZ(),new(t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e))).klass}let oT=(e,t)=>{let n=e;for(;null!=n&&!rg(n);){if(t(n))return n;n=n.getParent()}return null};function ok(e,t){let n=[],i=e.__first;for(;null!==i;){let e=null===t?ln(i):t.get(i);null==e&&r(174),n.push(i),i=e.__next}return n}function ob(e){let t=Object.getPrototypeOf(e);if("function"==typeof t&&t!==Function.prototype)return t;let n=e.prototype&&Object.getPrototypeOf(e.prototype);return n?n.constructor:null}let oN=new Map;function ow(e){return ru(e)||rc(e)}function oE(e){return ru(e)||rc(e)}function oM(e){let t=e.getLatest();return oE(t)?t.__slotHost:null}function oO(e){let t=oM(e);if(null===t)return null;let n=ln(t);return ru(n)||rc(n)||r(370),n}function oA(e){let t=e.getLatest();for(;null!==t;){if(null!==oM(t))return t;t=t.getParent()}return null}function oD(e){let t=e.getLatest();return ow(t)&&null!==t.__slots?t.__slots:oN}function oF(e){return Array.from(oD(e).keys())}function oP(e,t){let n=oD(e).get(t);return void 0===n?null:ln(n)}let oI=["__proto__","constructor","prototype"],oL=Symbol("slotMapOwner");function oK(e){let t=e.__slots;return null!==t&&t[oL]===e||((t=new Map(t))[oL]=e,e.__slots=t),t}let oz=new WeakMap,oB=[];function oR(e){let t="";for(let n of oF(e)){let i=oP(e,n);null!==i&&(t+=i.getTextContent())}return t}function oW(e,t,n){let i=n.get(e),r=n.get(t);return void 0!==i?void 0!==r?i-r:-1:void 0!==r?1:e<t?-1:+(e>t)}function o$(e,t,n){"__proto__"!==t&&"constructor"!==t&&"prototype"!==t||r(373,t);let i=e.getLatest();if(null!==i.__slots&&i.__slots.get(t)===n.getLatest().__key)return i;(!ru(n)&&!rc(n)||n.isInline())&&r(374,n.__key);let l=e.getWritable(),o=oK(l),s=o.get(t);void 0!==s&&oU(s);let a=n.getWritable(),u=oO(a);if(null!==u){let e=function(e){let t=oO(e);if(null===t)return null;let n=e.getLatest().__key;for(let[e,i]of oD(t))if(i===n)return e;return null}(a);null!==e&&oK(u.getWritable()).delete(e),a.__slotHost=null}return r8(a),a.__slotHost=l.__key,o.set(t,a.__key),function(e){let t=e.__slots;if(null===t||t.size<2)return;let n=function(e){let t=oz.get(e);if(void 0===t){let n=function(e){for(let{ownNodeConfig:t}of oC(e)){let e=t&&t.slots;if(e)return e}return oB}(e),i=new Map;for(let t of n)oI.includes(t)&&r(371,e.name,t),i.has(t)&&r(372,e.
1name,t),i.set(t,i.size);t=i,oz.set(e,t)}return t}(e.constructor),i=null,l=!0;for(let e of t.keys()){if(null!==i&&oW(i,e,n)>0){l=!1;break}i=e}if(l)return;let o=Array.from(t).sort(([e],[t])=>oW(e,t,n));for(let[e,n]of(t.clear(),o))t.set(e,n)}(l),function(){let e=on();e._slotsUsed=!0,e._pendingEditorState&&(e._pendingEditorState._slotsUsed=!0)}(),l}function oU(e){let t=ln(e);if(null===t)return;let n=t.getWritable();oE(n)||r(377,e),n.__slotHost=null,n.remove()}let oH={next:"previous",previous:"next"};class oj{origin;constructor(e){this.origin=e}[Symbol.iterator](){return si({hasNext:oZ,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return o3(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return o3(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,n="next"){let i=n===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 i){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&&r(263,Array.from(s).join(" "))}else l.insert(e);l=o3(e,this.direction)}for(let e of s.values())e.remove();return this}}class oJ extends oj{type="child";getLatest(){let e=this.origin.getLatest();return e===this.origin?this:o5(e,this.direction)}getParentCaret(e="root"){return o3(oq(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=oH[this.direction];return o3(this.getNodeAtCaret(),e)||o5(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(e){return e instanceof oJ&&this.direction===e.direction&&this.origin.is(e.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}}let oV={root:rg,shadowRoot:lR};function oq(e,t="root"){return null===e||oV[t](e)?null:null===oM(e)?e:null}class oY extends oj{type="sibling";getLatest(){let e=this.origin.getLatest();return e===this.origin?this:o3(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return ru(this.origin)?o5(this.origin,this.direction):null}getParentCaret(e="root"){return o3(oq(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=oH[this.direction];return o3(this.getNodeAtCaret(),e)||o5(this.origin.getParentOrThrow(),e)}isSamePointCaret(e){return e instanceof oY&&this.direction===e.direction&&this.origin.is(e.origin)}isSameNodeCaret(e){return(e instanceof oY||e instanceof oG)&&this.direction===e.direction&&this.origin.is(e.origin)}}class oG extends oj{type="text";offset;constructor(e,t){super(e),this.offset=t}getLatest(){let e=this.origin.getLatest();return e===this.origin?this:o6(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e="root"){return o3(oq(this.getParentAtCaret(),e),this.direction)}getFlipped(){return o6(this.origin,oH[this.direction],this.offset)}isSamePointCaret(e){return e instanceof oG&&this.direction===e.direction&&this.origin.is(e.origin)&&this.offset===e.offset}isSameNodeCaret(e){return(e instanceof oY||e instanceof oG)&&this.direction===e.direction&&this.origin.is(e.origin)}getSiblingCaret(){return o3(this.origin,this.direction)}}function oX(e){return e instanceof oG}function oZ(e){return e instanceof oY}function oQ(e){return e instanceof oJ}let o0={next:class extends oG{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends oG{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},o1={next:class extends oY{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends oY{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},o2={next:class extends oJ{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends oJ{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function o3(e,t){return e?new o1[t](e):null}function o6(e,t,n){return e?new o0[t](e,o4(e,n)):null}function o4(e,t,n="error"){let i=e.getTextContentSize(),r="next"===t?i:"previous"===t?0:t;return(r<0||r>
1i)&&("clamp"!==n&&l(284,String(t),String(i),e.getKey()),r=r<0?0:i),r}function o5(e,t){return ru(e)?new o2[t](e):null}function o7(e){var t;return e&&((t=e.getAdjacentCaret())&&t.getChildCaret()||t)}class o8{type="node-caret-range";direction;anchor;focus;constructor(e,t,n){this.anchor=e,this.focus=t,this.direction=n}getLatest(){let e=this.anchor.getLatest(),t=this.focus.getLatest();return e===this.anchor&&t===this.focus?this:new o8(e,t,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){let e=e=>{let t=this[e].getLatest();return oX(t)?function(e,t){let{direction:n,origin:i}=e;return new o9(e,o4(i,"focus"===t?oH[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 o9(e,i.offset-e.offset),null]}return[t,n]}iterNodeCarets(e="root"){let t=oX(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),i=oX(n),r=t=>t.isSameNodeCaret(n)?null:o7(t)||t.getParentCaret(e);return si({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")}}class o9{type="slice";caret;distance;constructor(e,t){this.caret=e,this.distance=t}getSliceIndices(){let{distance:e,caret:{offset:t}}=this,n=t+e;return n<t?[n,t]:[t,n]}getTextContent(){let[e,t]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,t)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){let{caret:{origin:e,direction:t}}=this,[n,i]=this.getSliceIndices(),r=e.getTextContent();return o6(e.setTextContent(r.slice(0,n)+r.slice(i)),t,n)}}function se(e){return sn(e,o3(lu(),e.direction))}function st(e){return sn(e,e)}function sn(e,t){return e.direction!==t.direction&&r(265),new o8(e,t,e.direction)}function si(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 sr(e,t){let n=ss(e.origin,t.origin);switch(null===n&&r(275,e.origin.getKey(),t.origin.getKey()),n.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 sl(n)}}function sl(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 so(e){return ru(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function ss(e,t){if(e.is(t))return{commonAncestor:e,type:"same"};let n=new Map;for(let[t,i]=so(e);t;i=t,t=t.getParent())n.set(t,i);for(let[i,l]=so(t);i;l=i,i=i.getParent()){let o=n.get(i);if(void 0!==o)return null===o?(i.is(e)||r(276),{commonAncestor:i,type:"ancestor"}):null===l?(i.is(t)||r(277),{commonAncestor:i,type:"descendant"}):((ru(o)||o.is(e))&&(ru(l)||l.is(t))&&i.is(o.getParent())&&i.is(l.getParent())||r(278),{a:o,b:l,commonAncestor:i,type:"branch"})}return null}function sa(e,t){let{type:n,key:i,offset:l}=e,o=function(e){let t=ln(e);return null===t&&r(63,e),t}(e.key);return"text"===n?(nG(o)||r(266,o.getType(),i),o6(o,t,l)):(ru(o)||r(267,o.getType(),i),sC(o,e.offset,t))}function su(e,t){let{origin:n,direction:i}=t,l="next"===i;oX(t)?e.set(n.getKey(),t.offset,"text"):oZ(t)?nG(n)?e.set(n.getKey(),o4(n,i),"text"):e.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+ +!!l,"element"):(oQ(t)&&ru(n)||r(268),e.set(n.getKey(),l?0:n.getChildrenSize(),"element"))}function sf(e){let t=iN(),n=n9(t)?t:iT();return sd(n,e),lf(n),n}function sd(e,t){su(e.anchor,t.anchor),su(e.focus,t.focus)}function sc(e){let{anchor:t,focus:n}=e,i=sa(t,"next"),r=sa(n,"next"),l=0>=sr(i,r)?"next":"previous";return sn(sm(i,l),sm(r,l))}function sh(e){let{direction:t,origin:n}=e,i=o3(n,oH[t]).getNodeAtCaret();return i?o3(i,t):o5(n.getParentOrThrow(),t)}function sg(e,t="root"){let n=[e];for(let i=oQ(e)?e.getParentCaret(t):e.getSiblingCaret();null!==i;i=i.getParentCaret(t))n.push(sh(i));return n}function s_(e){return!!e&&e.origin.isAttached()}function sp(e){let t=function(e){let t=e;for(;oQ(t);){let e=o7(t);if(!oQ(e))break;t=e}return t}(e.getLatest()),{direction:n}=t;if(nG(t.origin))return oX(t)?t:o6(t.origin,n,n);let i=t.getAdjacentCaret();return oZ(i)&&nG(i.origin)?o6(i.origin,n,oH[n]):t}function sy(e){return oX(e)&&e.offset!==o4(e.origin,e.direction)}function sm(e,t){return e.direction===t?e:e.getFlipped()}
1function sx(e,t){return e.direction===t?e:sn(sm(e.focus,t),sm(e.anchor,t))}function sC(e,t,n){let i=o5(e,"next");for(let e=0;e<t;e++){let e=i.getAdjacentCaret();if(null===e)break;i=e}return sm(i,n)}function sS(e){let{origin:t,offset:n,direction:i}=e;if(n===o4(t,i))return e.getSiblingCaret();if(n===o4(t,oH[i]))return sh(e.getSiblingCaret());let[l]=t.splitText(n);return nG(l)||r(281),sm(o3(l,"next"),i)}function sv(e,t){return!0}function sT(e,{$copyElementNode:t=lW,$splitTextPointCaretNext:n=sS,rootMode:i="shadowRoot",$shouldSplit:r=sv,removeEmptyDestination:l=!1}={}){if(oX(e))return n(e);let o=e.getParentCaret(i);if(o){let{origin:n}=o;if(oQ(e)){let e=sh(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}function sk(e,t,n){let i=sm(t,"next");oX(i)&&(0===i.offset?i=o3(i.origin,"previous").getFlipped():i.offset===i.origin.getTextContentSize()&&(i=o3(i.origin,"next"))),i.origin.is(e)&&(oZ(i)||r(342,e.getKey(),e.getType()),i=sh(i)),(e.is(i.getNodeAtCaret())||e.is(i.getFlipped().getNodeAtCaret()))&&e.remove(!0);for(let e=i;e;e=sT(e,n))i=e;return oX(i)&&r(283),i.insert(e.isInline()?rM().append(e):e),sm(o3(e.getLatest(),"next"),t.direction)}function sb(e){return e}function sN(...e){return e}function sw(e){return e}function sE(e,t){if(!t||e===t)return e;for(let n in t)if(e[n]!==t[n])return{...e,...t};return e}function sM(...e){let t=[];for(let n of e)if(n&&"string"==typeof n)for(let[e]of n.matchAll(/\S+/g))t.push(e);return t}function sO(e,...t){let n=sM(...t);n.length>0&&e.classList.add(...n)}function sA(e,...t){let n=sM(...t);n.length>0&&e.classList.remove(...n)}function sD(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}function sF(e,t,n){return sD(...Object.entries(t).map(([t,i])=>tZ(e,t,i,n)))}}}]);
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.