1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(null!=n)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[(new e.Error).stack],{"_sentryBundlerPluginAppKey:emailoctopus-sales":!0});var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b4ab4690-2111-49e5-bd55-7c7d0415edf5",e._sentryDebugIdIdentifier="sentry-dbid-b4ab4690-2111-49e5-bd55-7c7d0415edf5")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8875],{6102:(e,t,n)=>{let r;n.d(t,{A:()=>s});let i="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),l=new Uint8Array(16),o=[];for(let e=0;e<256;++e)o.push((e+256).toString(16).slice(1));let s=function(e,t,n){if(i&&!t&&!e)return i();var s=e,a=n;let u=(s=s||{}).random??s.rng?.()??function(){if(!r){if("u"<typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");r=crypto.getRandomValues.bind(crypto)}return r(l)}();if(u.length<16)throw Error("Random bytes length must be >= 16");if(u[6]=15&u[6]|64,u[8]=63&u[8]|128,t){if((a=a||0)<0||a+16>t.length)throw RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[a+e]=u[e];return t}return function(e,t=0){return(o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]).toLowerCase()}(u)}},7732:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r={default:function(){return y},useLinkStatus:function(){return x}};for(var i in r)Object.defineProperty(t,i,{enumerable:!0,get:r[i]});let l=n(99587),o=n(85891),s=l._(n(70755)),a=n(43),u=n(61453),f=n(71876),d=n(55161),c=n(92927),h=n(75944),g=n(84956),_=n(32270),p=n(36397);function y(e){var t;let r,i,l,[y,x]=(0,s.useOptimistic)(g.IDLE_LINK_STATUS),C=(0,s.useRef)(null),{href:S,as:v,children:T,prefetch:b=null,passHref:k,replace:N,shallow:w,scroll:E,onClick:M,onMouseEnter:O,onTouchStart:A,legacyBehavior:P=!1,onNavigate:D,transitionTypes:F,ref:L,unstable_dynamicOnHover:I,...K}=e;r=T,P&&("string"==typeof r||"number"==typeof r)&&(r=(0,o.jsx)("a",{children:r}));let R=s.default.useContext(u.AppRouterContext),B=!1!==b,z=!1===b?"none":!0===b?"full":"auto",W="none"!==z?"auto"===z?p.FetchStrategy.PPR:p.FetchStrategy.Full:p.FetchStrategy.PPR,U="string"==typeof(t=v||S)?t:(0,a.formatUrl)(t);if(P){if(r?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});i=s.default.Children.only(r)}let j=P?i&&"object"==typeof i&&i.ref:L,J,$=s.default.useCallback(e=>(null!==R&&(C.current=(0,g.mountLinkInstance)(e,U,R,W,B,x,J)),()=>{C.current&&((0,g.unmountLinkForCurrentNavigation)(C.current),C.current=null),(0,g.unmountPrefetchableInstance)(e)}),[B,U,R,W,x,J]),V={ref:(0,f.useMergedRef)($,j),onClick(e){P||"function"!=typeof M||M(e),P&&i.props&&"function"==typeof i.props.onClick&&i.props.onClick(e),!R||e.defaultPrevented||function(e,t,r,i,l,o,a,u="none"){{let f,{nodeName:d}=e.currentTarget;if("A"===d.toUpperCase()&&((f=e.currentTarget.getAttribute("target"))&&"_self"!==f||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which)||e.currentTarget.hasAttribute("download"))return;if(!(0,_.isLocalURL)(t)){i&&(e.preventDefault(),location.replace(t));return}if(e.preventDefault(),o){let e=!1;if(o({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:c}=n(83132);s.default.startTransition(()=>{c(t,i?"replace":"push",!1===l?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,r.current,a,u)})}}(e,U,C,N,E,D,F,z)},onMouseEnter(e){P||"function"!=typeof O||O(e),P&&i.props&&"function"==typeof i.props.onMouseEnter&&i.props.onMouseEnter(e),R&&B&&(0,g.onNavigationIntent)(e.currentTarget,!0===I)},onTouchStart:function(e){P||"function"!=typeof A||A(e),P&&i.props&&"function"==typeof i.props.onTouchStart&&i.props.onTouchStart(e),R&&B&&(0,g.onNavigationIntent)(e.currentTarget,!0===I)}};return(0,d.isAbsoluteUrl)(U)?V.href=U:P&&!k&&("a"!==i.type||"href"in i.props)||(V.href=(0,c.addBasePath)(U)),l=P?s.default.cloneElement(i,V):(0,o.jsx)("a",{...K,...V,children:r}),(0,o.jsx)(m.Provider,{value:y,children:l})}let m=(0,s.createContext)(g.IDLE_LINK_STATUS),x=()=>(0,s.useContext)(m);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esMo
1dule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},71876:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useMergedRef",{enumerable:!0,get:function(){return i}});let r=n(70755);function i(e,t){let n=(0,r.useRef)(null),i=(0,r.useRef)(null);return(0,r.useCallback)(r=>{if(null===r){let e=n.current;e&&(n.current=null,e());let t=i.current;t&&(i.current=null,t())}else e&&(n.current=l(e,r)),t&&(i.current=l(t,r))},[e,t])}function l(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let n=e(t);return"function"==typeof n?n:()=>e(null)}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},75187:(e,t,n)=>{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 i(e,...t){let n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;for(let n of(r.append("code",e),t))r.append("v",n);n.search=r.toString(),console.warn(`Minified Lexical warning #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}n.d(t,{$7r:()=>ty,$c$:()=>ne,$ey:()=>eH,$iu:()=>lW,A7V:()=>rL,AX0:()=>e2,AcJ:()=>rW,Ave:()=>lK,B$P:()=>iF,BtT:()=>ls,Bts:()=>lP,CHU:()=>iV,CaD:()=>en,Chh:()=>J,Cku:()=>nR,Csq:()=>lH,Cyw:()=>rE,Ey8:()=>n_,FAd:()=>p,FEN:()=>ej,FtC:()=>lY,FyW:()=>r9,GMe:()=>rg,GRK:()=>ni,GYG:()=>l6,GcU:()=>rl,Gew:()=>iJ,H2A:()=>n4,HEf:()=>l3,HYn:()=>tc,Huu:()=>e7,I2H:()=>tm,I2P:()=>nF,I8X:()=>j,IgX:()=>x,IlV:()=>lS,IqF:()=>i$,J61:()=>m,JAT:()=>iz,JM3:()=>e0,JjG:()=>rU,Jvg:()=>rX,K8K:()=>i2,KfJ:()=>tp,Kp7:()=>rw,LYZ:()=>r0,LZn:()=>w,MZu:()=>nN,MvL:()=>eL,NG9:()=>lU,NiT:()=>ig,O0w:()=>l0,OBE:()=>nq,OQi:()=>t9,OSq:()=>iZ,OXk:()=>tt,OpE:()=>lp,P6U:()=>lk,PiT:()=>tr,Q$N:()=>e9,RTZ:()=>nI,RTo:()=>e4,Rb_:()=>r3,S1w:()=>nQ,S3D:()=>y,SKc:()=>th,Sdt:()=>l4,Sr4:()=>tl,T40:()=>t7,TJt:()=>lA,Tc1:()=>l2,TeU:()=>S,TgX:()=>ts,U5P:()=>lt,UDz:()=>e5,V30:()=>eZ,VSO:()=>td,WKo:()=>no,WWb:()=>t_,WgU:()=>rj,WuB:()=>eU,XI_:()=>nt,XKQ:()=>eJ,YW5:()=>tn,Z$U:()=>rQ,ZB7:()=>l5,ZKf:()=>eX,_On:()=>i6,a9V:()=>i5,bM3:()=>e$,bMH:()=>t4,bSg:()=>rB,bbF:()=>e3,cmH:()=>ly,d8p:()=>eK,da8:()=>rJ,dxY:()=>ln,e1k:()=>iO,erb:()=>lN,ev7:()=>nw,fD3:()=>rI,fGB:()=>rb,fUS:()=>to,ff4:()=>rk,fwY:()=>t8,gCZ:()=>e8,guI:()=>eF,hVZ:()=>rO,haT:()=>rM,hi0:()=>eG,i0_:()=>i4,ieJ:()=>rV,jG6:()=>ie,jGx:()=>C,jZM:()=>rz,k1Q:()=>lZ,kBm:()=>t1,kFe:()=>nb,lJ7:()=>rR,lSZ:()=>l$,lVE:()=>l1,mB:()=>eq,mB$:()=>r7,mWO:()=>lM,n0X:()=>t3,n1P:()=>ip,nYP:()=>iQ,nsf:()=>is,o4q:()=>v,oqR:()=>eI,pGK:()=>lV,pJU:()=>ia,pTq:()=>iH,pd8:()=>lr,peL:()=>iX,phO:()=>lo,rN:()=>l_,rUs:()=>nY,riq:()=>ta,sTu:()=>nT,sWS:()=>lO,sby:()=>i0,scG:()=>r2,sik:()=>ti,sne:()=>nr,t5V:()=>tg,u5G:()=>tf,uTE:()=>nG,urt:()=>U,uwZ:()=>lb,v0B:()=>rD,vAA:()=>i1,vE9:()=>lQ,vJq:()=>nZ,viC:()=>eY,w$Z:()=>te,w3H:()=>i3,wH$:()=>ns,waI:()=>eV,wp6:()=>lR,xKE:()=>nn,xL4:()=>id,xQ8:()=>lB,y68:()=>nV,z8s:()=>nO});let l="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement,o=l&&"documentMode"in document?document.documentMode:null,s=l&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),a=l&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),u=!(!l||!("InputEvent"in window)||o)&&"getTargetRanges"in new window.InputEvent("input"),f=l&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),d=l&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,c=l&&/Android/.test(navigator.userAgent),h=l&&/^(?=.*Chrome).*/i.test(navigator.userAgent),g=l&&c&&h,_=l&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&s&&!h,p=1,y=2,m=4,x=8,C=16,S=32,v=64,T=f||d||_?"\xa0":"â",b=a?"\xa0":T,k="Ö-ß¿ï¬-﷽ﹰ-ﻼ",N="A-Za-z\xc0-\xd6\xd8-\xf6\xf8-ʸÌ-Öà -á¿¿ââ°-ï¬ï¸-﹯﻽-ï¿¿",w=(RegExp("^[^"+N+"]*["+k+"]"),RegExp("^[^"+k+"]*["+N+"]"),{bold:1,capitalize:1024,code:16,highlight:128,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512}),E={directionless:1,unmergeable:2},M={center:2,end:6,justify:4,left:1,right:3,start:5},O={2:"center",6:"end",4:"justify",1:"left",3:"right",5:"start"},A={normal:0,segmented:2,token:1},P={0:"normal",2:"segmented",1:"token"},D="$config",F=!1,L=0;function I(e){L=e.timeStamp}function K(e,t,n){let r="BR"===e.nodeName,i=t.__lexicalLineBreak;return i&&(e===i||r&&e.previousSibling===i)||r&&void 0!==iu(e,n)}function R(e,t,n){F=!0;let r=performance.now()-L>100;try{rS(e,()=>{let i=nZ()||e.getEditorState().read(()=>{let e=nZ();return null!==e?e.clone():null}),l=new Map,o=e.getRootElement(),s=e._editorState,u=e._blockCursorElement,f=!1,d="";for(let n=0;n<t.length;n++){let c=t[n],h=c.type,g=c.target,_=function(e,t,n,r){var i;for(let l=e;l&&(i=l,!0!==i.__lexicalUnmanaged);l=iR(l)){let e=iu(l,t);if(void 0!==e){let t=is(e,n);if(t)return rE(t)||!i0(l)?void 0:[l,t]}else if(l===r)return[r,i_(n)]}}(g,e,s,o);if(!_)continue;let[p,y]=_;if("characterData"===h)r&&nb(y)&&r4(g)&&function(e,t,n){if(nF(e)){let t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return r4(t)&&n.isAttached()}(i,g,y)&&function(e,t,n){let r=iX(ij(n)),i=null,l=null;null!==r&&r.anchorNode===e&&(i=r.anchorOffset,l=r.focusOffset);let o=e.nodeValue;null!==o&&iT(t,o,i,l,!1)}(g,y,e);else if("childList"===h){f=!0;let t=c.addedNodes;for(let n=0;n<t.length;n++){let r=t[n],i=ia(r),l=r.parentNode;if(null!=l&&r!==u&&null===i&&!K(r,l,e)){if(a){let e=(i0(r)?r.innerText:null)||r.nodeValue;e&&(d+=e)}l.removeChild(r)}}let n=c.removedNodes,r=n.length;if(r>0){let t=0;for(let i=0;i<r;i++){let r=n[i];(K(r,g,e)||u===r)&&(g.appendChild(r),t++)}r!==t&&l.set(p,y)}}}if(l.size>0)for(let[t,n]of l)n.reconcileObservedMutation(t,e);let c=n.takeRecords();if(c.length>0){for(let t=0;t<c.length;t++){let n=c[t],r=n.addedNodes,i=n.target;for(let t=0;t<r.length;t++){let n=r[t],l=n.parentNode;null==l||"BR"!==n.nodeName||K(n,i,e)||l.removeChild(n)}}n.takeRecords()}null!==i&&(f&&ip(i),a&&iL(e)&&i.insertRawText(d))})}finally{F=!1}}function B(e){let t=e._observer;null!==t&&R(e,t.takeRecords(),t)}function z(e){0===L&&ij(e).addEventListener("textInput",I,!0),e._observer=new MutationObserver((t,n)=>{R(e,t,n)})}class W{key;parse;unparse;isEqual;defaultValue;constructor(e,t){this.key=e,this.parse=t.parse.bind(t),this.unparse=(t.unparse||Y).bind(t),this.isEqual=(t.isEqual||Object.is).bind(t),this.defaultValue=this.parse(void 0)}}function U(e,t){return new W(e,t)}function j(e,t,n="latest"){let r=("latest"===n?e.getLatest():e).__state;return r?r.getValue(t):t.defaultValue}function J(e,t,n){let r;if(ro(),"function"==typeof n){let i=e.getLatest(),l=j(i,t);if(r=n(l),t.isEqual(l,r))return i}else r=n;let i=e.getWritable();return V(i).updateFromKnown(t,r),i}class ${node;knownState;unknownState;sharedNodeState;size;constructor(e,t,n,r=new Map,i){this.node=e,this.sharedNodeState=t,this.unknownState=n,this.knownState=r;const{sharedConfigMap:l}=this.sharedNodeState,o=void 0!==i?i:function(e,t,n){let r=n.size;if(t)for(let i in t){let t=e.get(i);t&&n.has(t)||r++}return r}(l,n,r);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 G(e)&&(t.$=e),t}getWritable(e){if(this.node===e)return this;let{sharedNodeState:t,unknownState:n}=this,r=new Map(this.knownState);return new $(e,t,function(e,t,n){let r;if(n)for(let[i,l]of Object.entries(n)){let n=e.get(i);n?t.has(n)||t.set(n,n.parse(l)):(r=r||{})[i]=l}return r}(t.sharedConfigMap,r,n),r,this.size)}updateFromKnown(e,t){let n=e.key;this.sharedNodeState.sharedConfigMap.set(n,e);let{knownState:r,unknownState:i}=this;r.has(e)||i&&n in i||(i&&(delete i[n],this.unknownState=G(i)),this.size++),r.set(e,t)}updateFromUnknown(e,t){let n=this.sharedNodeState.sharedConfigMap.get(e);n?this.updateFromKnown(n,n.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){let{knownState:t}=this;for(let e of t.keys())t.set(e,e.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(let[t,n]of Object.entries(e))this.updateFromUnknown(t,n)}}function V(e){let t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new $(t,H(t));return t.__state=n,n}function H(e){return e.__state?e.__state.sharedNodeState:rq(i4(),e.getType()).sharedNodeState}function G(e){if(e)for(let t in e)return e}function Y(e){return e}function q(e,t,n){for(let[r,i]of t.knownState){if(e.has(r.key))continue;e.add(r.key);let t=n?n.getValue(r):r.defaultValue;
1if(t!==i&&!r.isEqual(t,i))return!0}return!1}function X(e,t,n){let{unknownState:r}=t,i=n?n.unknownState:void 0;if(r){for(let[t,n]of Object.entries(r))if(!e.has(t)&&(e.add(t),n!==(i?i[t]:void 0)))return!0}return!1}function Z(e,t){let n=e.__state;return n&&n.node===e?n.getWritable(t):n}function Q(e,t){let n=e.__mode,r=e.__format,i=e.__style,l=t.__mode,o=t.__format,s=t.__style,a=e.__state,u=t.__state;return(null===n||n===l)&&(null===r||r===o)&&(null===i||i===s)&&(null===e.__state||a===u||function(e,t){if(e===t)return!0;if(e&&t&&e.size!==t.size)return!1;let n=new Set;return!(e&&q(n,e,t)||t&&q(n,t,e)||e&&X(n,e,t)||t&&X(n,t,e))}(a,u))}function ee(e,t){let n=e.mergeWithSibling(t),r=ru()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function et(e){let t,n,r=e;if(""!==r.__text||!r.isSimpleText()||r.isUnmergeable()){for(;null!==(t=r.getPreviousSibling())&&nb(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(""!==t.__text){Q(t,r)&&(r=ee(t,r));break}t.remove()}for(;null!==(n=r.getNextSibling())&&nb(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(""!==n.__text){Q(r,n)&&(r=ee(r,n));break}n.remove()}}else r.remove()}function en(e){return er(e.anchor),er(e.focus),e}function er(e){for(;"element"===e.type;){let t,n,r=e.getNode(),i=e.offset;if(i===r.getChildrenSize()?(t=r.getChildAtIndex(i-1),n=!0):(t=r.getChildAtIndex(i),n=!1),nb(t)){e.set(t.__key,n?t.getTextContentSize():0,"text",!0);break}if(!rk(t))break;e.set(t.__key,n?t.getChildrenSize():0,"element",!0)}}let ei,el,eo,es,ea,eu,ef,ed,ec,eh,eg="",e_=null,ep=null,ey=!1,em=!1;function ex(e,t){let n=ef.get(e);if(null!==t){let n=eD(e);n.parentNode===t&&t.removeChild(n)}if(ed.has(e)||el._keyToDOMMap.delete(e),rk(n)){let e=eM(n,ef);eC(e,0,e.length-1,null)}void 0!==n&&iP(eh,eo,es,n,"destroyed")}function eC(e,t,n,r){for(let i=t;i<=n;++i){let t=e[i];void 0!==t&&ex(t,r)}}function eS(e,t){e.setProperty("text-align",t)}function ev(e,t){let n=ei.theme.indent;if("string"==typeof n){let r=e.classList.contains(n);t>0&&!r?e.classList.add(n):t<1&&r&&e.classList.remove(n)}if(0===t)return void e.style.setProperty("padding-inline-start","");let r=getComputedStyle(el._rootElement||e).getPropertyValue("--lexical-indent-base-value")||"40px";e.style.setProperty("padding-inline-start",`calc(${t} * ${r})`)}function eT(e,t){let n=e.style;0===t?eS(n,""):1===t?eS(n,"left"):2===t?eS(n,"center"):3===t?eS(n,"right"):4===t?eS(n,"justify"):5===t?eS(n,"start"):6===t&&eS(n,"end")}function eb(e,t){let n=function(e){let t=e.__dir;if(null!==t)return t;if(rO(e))return null;let n=e.getParentOrThrow();return rO(n)&&null===n.__dir?"auto":null}(t);null!==n?e.dir=n:e.removeAttribute("dir")}function ek(e,t){var n;let i,l=ed.get(e);void 0===l&&r(60);let o=l.createDOM(ei,el);if(i=(n=el)._keyToDOMMap,o[`__lexicalKey_${n._key}`]=e,i.set(e,o),nb(l)?o.setAttribute("data-lexical-text","true"):rE(l)&&o.setAttribute("data-lexical-decorator","true"),rk(l)){let e=l.__indent,t=l.__size;eb(o,l),0!==e&&ev(o,e),0!==t&&eN(eM(l,ed),l,0,t-1,l.getDOMSlot(o));let n=l.__format;0!==n&&eT(o,n),l.isInline()||eE(null,l,o)}else{let t=l.getTextContent();if(rE(l)){let t=l.decorate(el,ei);null!==t&&eO(e,t),o.contentEditable="false"}eg+=t}return null!==t&&t.insertChild(o),iP(eh,eo,es,l,"created"),o}function eN(e,t,n,r,i){let l=eg;eg="";let o=n;for(;o<=r;++o){ek(e[o],i);let t=ed.get(e[o]);null!==t&&nb(t)?null===e_&&(e_=t.getFormat(),ep=t.getStyle()):rk(t)&&o<r&&!t.isInline()&&(eg+="\n\n")}i.element.__lexicalTextContent=eg,eg=l+eg}function ew(e,t){if(e){let n=e.__last;if(n){let e=t.get(n);if(e)return ns(e)?"line-break":rE(e)&&e.isInline()?"decorator":null}return"empty"}return null}function eE(e,t,n){let r=ew(e,ef),i=ew(t,ed);r!==i&&t.getDOMSlot(n).setManagedLineBreak(i)}function eM(e,t){let n=[],i=e.__first;for(;null!==i;){let e=t.get(i);void 0===e&&r(101),n.push(i),i=e.__next}return n}function eO(e,t){let n=el._pendingDecorators,r=el._decorators;if(null===n){if(r[e]===t)return;n=ic(el)}n[e]=t}function eA(e){let t=e.nextSibling;return null!==t&&t===el._blockCursorElement&&(t=t.nextSibling),t}function eP(e,t){let n=new Set;for(let r=t;r<e.length;r++)n.add(e[r]);return n}function eD(e){let t=ec.get(e);return void 0===t&&r(75,e),t}function eF(e){return{type:e}}let eL=eF("SELECTION_CHANGE_COMMAND"),eI=eF("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),eK=eF("CLICK_COMMAND"),eR=eF("BEFORE_INPUT_COMMAND"),eB=eF("INPUT_COMMAND"),ez=eF("COMPOSITION_START_COMMAND"),eW=eF("COMPOSITION_END_COMMAND"),eU=eF("DELETE_CHARACTER_COMMAND"),ej=eF("INSERT_LINE_BREAK_COMMAND"),eJ=eF("INSERT_PARAGRAPH_COMMAND"),e$=eF("CONTROLLED_TEXT_INSERTION_COMMAND"),eV=eF("PASTE_COMMAND"),eH=eF("REMOVE_TEXT_COMMAND"),eG=eF("DELETE_WORD_COMMAND"),eY=eF("DELETE_LINE_COMMAND"),eq=eF("FORMAT_TEXT_COMMAND"),eX=eF("UNDO_COMMAND"),eZ=eF("REDO_COMMAND"),eQ=eF("KEYDOWN_COMMAND"),e0=eF("KEY_ARROW_RIGHT_COMMAND"),e1=eF("MOVE_TO_END"),e2=eF("KEY_ARROW_LEFT_COMMAND"),e6=eF("MOVE_TO_START"),e5=eF("KEY_ARROW_UP_COMMAND"),e3=eF("KEY_ARROW_DOWN_COMMAND"),e4=eF("KEY_ENTER_COMMAND"),e7=eF("KEY_SPACE_COMMAND"),e8=eF("KEY_BACKSPACE_COMMAND"),e9=eF("KEY_ESCAPE_COMMAND"),te=eF("KEY_DELETE_COMMAND"),tt=eF("KEY_TAB_COMMAND"),tn=eF("INSERT_TAB_COMMAND"),tr=eF("INDENT_CONTENT_COMMAND"),ti=eF("OUTDENT_CONTENT_COMMAND"),tl=eF("DROP_COMMAND"),to=eF("FORMAT_ELEMENT_COMMAND"),ts=eF("DRAGSTART_COMMAND"),ta=eF("DRAGOVER_COMMAND"),tu=eF("DRAGEND_COMMAND"),tf=eF("COPY_COMMAND"),td=eF("CUT_COMMAND"),tc=eF("SELECT_ALL_COMMAND"),th=eF("CLEAR_EDITOR_COMMAND"),tg=eF("CLEAR_HISTORY_COMMAND"),t_=eF("CAN_REDO_COMMAND"),tp=eF("CAN_UNDO_COMMAND"),t
1y=eF("FOCUS_COMMAND"),tm=eF("BLUR_COMMAND"),tx=eF("KEY_MODIFIER_COMMAND"),tC=Object.freeze({}),tS=[["keydown",function(e,t){tv=e.timeStamp,tT=e.key,t.isComposing()||iI(t,eQ,e)}],["pointerdown",function(e,t){let n=e.target,r=e.pointerType;i1(n)&&"touch"!==r&&"pen"!==r&&0===e.button&&rS(t,()=>{rE(id(n))||(tM=!0)})}],["compositionstart",function(e,t){iI(t,ez,e)}],["compositionend",function(e,t){a?tA=!0:!d&&(f||_)?(tP=!0,tD=e.data):iI(t,eW,e)}],["input",function(e,t){e.stopPropagation(),rS(t,()=>{t.dispatchCommand(eB,e)},{event:e}),tk=null}],["click",function(e,t){rS(t,()=>{let n=nZ(),r=iX(ij(t)),i=nQ();if(r){if(nF(n)){let t=n.anchor,l=t.getNode();if("element"===t.type&&0===t.offset&&n.isCollapsed()&&!rO(l)&&1===ig().getChildrenSize()&&l.getTopLevelElementOrThrow().isEmpty()&&null!==i&&n.is(i))r.removeAllRanges(),n.dirty=!0;else if(3===e.detail&&!n.isCollapsed()&&l!==n.focus.getNode()){let e=ls(l,e=>rk(e)&&!e.isInline());rk(e)&&e.select(0)}}else if("touch"===e.pointerType||"pen"===e.pointerType){let n=r.anchorNode;(i0(n)||r4(n))&&ip(nX(i,r,t,e))}}iI(t,eK,e)})}],["cut",tC],["copy",tC],["dragstart",tC],["dragover",tC],["dragend",tC],["paste",tC],["focus",tC],["blur",tC],["drop",tC]];u&&tS.push(["beforeinput",(e,t)=>{let n;"deleteCompositionText"===(n=e.inputType)||a&&iL(t)||"insertCompositionText"!==n&&iI(t,eR,e)}]);let tv=0,tT=null,tb=0,tk=null,tN=new WeakMap,tw=new WeakMap,tE=!1,tM=!1,tO=!1,tA=!1,tP=!1,tD="",tF=null,tL=[0,"",0,"root",0];function tI(e,t,n,r,i){let l=e.anchor,o=e.focus,s=l.getNode(),a=ru(),f=iX(ij(a)),d=null!==f?f.anchorNode:null,c=l.key,h=a.getElementByKey(c),g=n.length;return c!==o.key||!nb(s)||(!i&&(!u||tb<r+50)||s.isDirty()&&g<2||im(n))&&l.offset!==o.offset&&!s.isComposing()||r3(s)||s.isDirty()&&g>1||(i||!u)&&null!==h&&!s.isComposing()&&d!==r8(h)||null!==f&&null!==t&&(!t.collapsed||t.startContainer!==f.anchorNode||t.startOffset!==f.anchorOffset)||!s.isComposing()&&(s.getFormat()!==e.format||s.getStyle()!==e.style)||function(e,t){let n;if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;let r=e.anchor.offset,i=t.getParentOrThrow(),l=r5(t);return 0===r?!t.canInsertTextBefore()||!i.canInsertTextBefore()&&!t.isComposing()||l||(nb(n=t.getPreviousSibling())||rk(n)&&n.isInline())&&!n.canInsertTextAfter():r===t.getTextContentSize()&&(!t.canInsertTextAfter()||!i.canInsertTextAfter()&&!t.isComposing()||l)}(e,s)}function tK(e,t){return r4(e)&&null!==e.nodeValue&&0!==t&&t!==e.nodeValue.length}function tR(e,t,n){let{anchorNode:i,anchorOffset:l,focusNode:o,focusOffset:s}=e;tE&&(tE=!1,tK(i,l)&&tK(o,s)&&!tF)||rS(t,()=>{if(!n)return void ip(null);if(!r0(t,i,o))return;let a=nZ();if(tF&&nF(a)&&a.isCollapsed()){let e=a.anchor,t=tF.anchor;(e.key===t.key&&e.offset===t.offset+1||1===e.offset&&t.getNode().is(e.getNode().getPreviousSibling()))&&ip(a=tF.clone())}if(tF=null,nF(a)){let n=a.anchor,i=n.getNode();if(a.isCollapsed()){"Range"===e.type&&e.anchorNode===e.focusNode&&(a.dirty=!0);let l=ij(t).event,o=l?l.timeStamp:performance.now(),[s,u,f,d,c]=tL,h=ig(),g=!1===t.isComposing()&&""===h.getTextContent();if(o<c+200&&n.offset===f&&n.key===d)tB(a,s,u);else if("text"===n.type)nb(i)||r(141),tz(a,i);else if("element"===n.type&&!g){rk(i)||r(259);let e=n.getNode();e.isEmpty()?tB(a,e.getTextFormat(),e.getTextStyle()):tB(a,0,"")}}else{let e=n.key,t=a.focus.key,r=a.getNodes(),i=r.length,o=a.isBackward(),u=o?s:l,f=o?l:s,d=o?t:e,c=o?e:t,h=2047,g=!1;for(let e=0;e<i;e++){let t=r[e],n=t.getTextContentSize();if(nb(t)&&0!==n&&(0!==e||t.__key!==d||u!==n)&&(e!==i-1||t.__key!==c||0!==f)&&(g=!0,0==(h&=t.getFormat())))break}a.format=g?h:0}}iI(t,eL,void 0)})}function tB(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function tz(e,t){tB(e,t.getFormat(),t.getStyle())}function tW(e){if(!e.getTargetRanges)return null;let t=e.getTargetRanges();return 0===t.length?null:t[0]}function tU(e){var t;let n=e.inputType,i=tW(e),l=ru(),o=nZ();if("deleteContentBackward"===n){if(null===o){let e=nQ();if(!nF(e))return!0;ip(e.clone())}if(nF(o)){let n=o.anchor.key===o.focus.key;if(t=e.timeStamp,"MediaLast"===tT&&t<tv+30&&l.isComposing()&&n){if(il(null),tv=0,setTimeout(()=>{rS(l,()=>{il(null)})}
1,30),nF(o)){let e=o.anchor.getNode();e.markDirty(),nb(e)||r(142),tz(o,e)}}else{il(null),e.preventDefault();let t=o.anchor.getNode(),r=t.getTextContent(),i=t.canInsertTextAfter(),s=0===o.anchor.offset&&o.focus.offset===r.length,a=g&&n&&!s&&i;if(a&&o.isCollapsed()&&(a=!rE(iF(o.anchor,!0))),!a){iI(l,eU,!0);let e=nZ();g&&nF(e)&&e.isCollapsed()&&(tF=e,setTimeout(()=>tF=null))}}return!0}}if(!nF(o))return!0;let s=e.data;null!==tk&&iv(!1,l,tk),o.dirty&&null===tk||!o.isCollapsed()||rO(o.anchor.getNode())||null===i||o.applyDOMRange(i),tk=null;let a=o.anchor,u=o.focus,f=a.getNode(),c=u.getNode();if("insertText"===n||"insertTranspose"===n){if("\n"===s)e.preventDefault(),iI(l,ej,!1);else if("\n\n"===s)e.preventDefault(),iI(l,eJ,void 0);else if(null==s&&e.dataTransfer){let t=e.dataTransfer.getData("text/plain");e.preventDefault(),o.insertRawText(t)}else null!=s&&tI(o,i,s,e.timeStamp,!0)?(e.preventDefault(),iI(l,e$,s)):tk=s;return tb=e.timeStamp,!0}switch(e.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":iI(l,e$,e);break;case"insertFromComposition":il(null),iI(l,e$,e);break;case"insertLineBreak":il(null),iI(l,ej,!1);break;case"insertParagraph":il(null),tO&&!d?(tO=!1,iI(l,ej,!1)):iI(l,eJ,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":iI(l,eV,e);break;case"deleteByComposition":(f!==c||rk(f)||rk(c)||!r5(f)||!r5(c))&&iI(l,eH,e);break;case"deleteByDrag":case"deleteByCut":iI(l,eH,e);break;case"deleteContent":iI(l,eU,!1);break;case"deleteWordBackward":iI(l,eG,!0);break;
1case"deleteWordForward":iI(l,eG,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":iI(l,eY,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":iI(l,eY,!1);break;case"formatStrikeThrough":iI(l,eq,"strikethrough");break;case"formatBold":iI(l,eq,"bold");break;case"formatItalic":iI(l,eq,"italic");break;case"formatUnderline":iI(l,eq,"underline");break;case"historyUndo":iI(l,eX,void 0);break;case"historyRedo":iI(l,eZ,void 0)}return!0}function tj(e){if(i0(e.target)&&rE(id(e.target)))return!0;let t=ru(),n=nZ(),r=e.data,i=tW(e);if(null!=r&&nF(n)&&tI(n,i,r,e.timeStamp,!1)){tA&&(tV(t,r),tA=!1);let i=n.anchor.getNode(),l=iX(ij(t));if(null===l)return!0;let o=n.isBackward(),s=o?n.anchor.offset:n.focus.offset,f=o?n.focus.offset:n.anchor.offset;u&&!n.isCollapsed()&&nb(i)&&null!==l.anchorNode&&i.getTextContent().slice(0,s)+r+i.getTextContent().slice(s+f)===iS(l.anchorNode)||iI(t,e$,r);let d=r.length;a&&d>1&&"insertCompositionText"===e.inputType&&!t.isComposing()&&(n.anchor.offset-=d),g&&t.isComposing()&&(tv=0,il(null))}else iv(!1,t,null!==r?r:void 0),tA&&(tV(t,r||void 0),tA=!1);return ro(),B(ru()),!0}function tJ(e){let t=ru(),n=nZ();if(nF(n)&&!t.isComposing()){let r=n.anchor,i=n.anchor.getNode();il(r.key),iz(nn),(e.timeStamp<tv+30||"element"===r.type||!n.isCollapsed()||i.getFormat()!==n.format||nb(i)&&i.getStyle()!==n.style)&&iI(t,e$,b)}return!0}function t$(e){return tV(ru(),e.data),iz(nr),!0}function tV(e,t){let n=e._compositionKey;if(il(null),null!==n&&null!=t){if(""===t){let t=is(n),r=r8(e.getElementByKey(n));if(null!==r&&null!==r.nodeValue&&nb(t)){let n=iX(ij(e)),i=null,l=null;null!==n&&n.anchorNode===r&&(i=n.anchorOffset,l=n.focusOffset),iT(t,r.nodeValue,i,l,!0)}return}if("\n"===t[t.length-1]){let t=nZ();if(nF(t)||nI(t)){if(nF(t)){let e=t.focus;t.anchor.set(e.key,e.offset,e.type)}return void iI(e,e4,null)}}}iv(!0,e,t)}function tH(e){let t=ru();if(null==e.key)return!0;if(tP){if(iM(e))return rS(t,()=>{tV(t,tD)}),tP=!1,tD="",!0;tP=!1,tD=""}if(iN(e,"ArrowRight",{shiftKey:"any"}))iI(t,e0,e);else if(iN(e,"ArrowRight",iw))iI(t,e1,e);else if(iN(e,"ArrowLeft",{shiftKey:"any"}))iI(t,e2,e);else if(iN(e,"ArrowLeft",iw))iI(t,e6,e);else if(iN(e,"ArrowUp",{altKey:"any",shiftKey:"any"}))iI(t,e5,e);else if(iN(e,"ArrowDown",{altKey:"any",shiftKey:"any"}))iI(t,e3,e);else if(iN(e,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0}))tO=!0,iI(t,e4,e);else if(" "===e.key)iI(t,e7,e);else if(s&&iN(e,"o",{ctrlKey:!0}))e.preventDefault(),tO=!0,iI(t,ej,!0);else if(iN(e,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"}))tO=!1,iI(t,e4,e);else if(iN(e,"Backspace",{shiftKey:"any"})||s&&iN(e,"h",{ctrlKey:!0}))iM(e)?iI(t,e8,e):(e.preventDefault(),iI(t,eU,!0));else if("Escape"===e.key)iI(t,e9,e);else if(iN(e,"Delete",{})||s&&iN(e,"d",{ctrlKey:!0}))"Delete"!==e.key?(e.preventDefault(),iI(t,eU,!1)):iI(t,te,e);else if(iN(e,"Backspace",iE))e.preventDefault(),iI(t,eG,!0);else if(iN(e,"Delete",iE))e.preventDefault(),iI(t,eG,!1);else if(s&&iN(e,"Backspace",{metaKey:!0}))e.preventDefault(),iI(t,eY,!0);else if(s&&(iN(e,"Delete",{metaKey:!0})||iN(e,"k",{ctrlKey:!0})))e.preventDefault(),iI(t,eY,!1);else if(iN(e,"b",iw))e.preventDefault(),iI(t,eq,"bold");else if(iN(e,"u",iw))e.preventDefault(),iI(t,eq,"underline");else if(iN(e,"i",iw))e.preventDefault(),iI(t,eq,"italic");else if(iN(e,"Tab",{shiftKey:"any"}))iI(t,tt,e);else if(iN(e,"z",iw))e.preventDefault(),iI(t,eX,void 0);else if(s?iN(e,"z",{metaKey:!0,shiftKey:!0}):iN(e,"y",{ctrlKey:!0})||iN(e,"z",{ctrlKey:!0,shiftKey:!0}))e.preventDefault(),iI(t,eZ,void 0);else{let n=t._editorState._selection;null===n||nF(n)?iN(e,"a",iw)&&(e.preventDefault(),iI(t,tc,e)):iN(e,"c",iw)?(e.preventDefault(),iI(t,tf,e)):iN(e,"x",iw)?(e.preventDefault(),iI(t,td,e)):iN(e,"a",iw)&&(e.preventDefault(),iI(t,tc,e))}return(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)&&t.dispatchCommand(tx,e),!0}function tG(e){let t=e.__lexicalEventHandles;return void 0===t&&(e.__lexicalEventHandles=t=[]),t}let tY=new Map;function tq(e){let t=iZ(e.target);if(null===t)return;let n=r2(t.anchorNode);if(null===n)return;tM&&(tM=!1,rS(n,()=>{let r=nQ(),i=t.anchorNode;(i0(i)||r4(i))&&ip(nX(r,t,n,e))}));let r=ix(n),i=r[r.length-1],l=i._key,o=tY.get(l),s=o||i;s!==n&&tR(t,s,!1),tR(t,n,!0),n!==i?tY.set(l,n):o&&tY.delete(l)}function tX(e){e._lexicalHandled=!0}function tZ(e){return!0===e._lexicalHandled}let tQ=()=>{};
1function t0(e,t,n){ro();let r=e.__key,i=e.getParent();if(null===i)return;let l=function(e){let t=nZ();if(!nF(t)||!rk(e))return t;let{anchor:n,focus:r}=t,i=n.getNode(),l=r.getNode();return iW(i,e)&&n.set(e.__key,0,"element"),iW(l,e)&&r.set(e.__key,0,"element"),t}(e),o=!1;if(nF(l)&&t){let t=l.anchor,n=l.focus;t.key===r&&(n2(t,e,i,e.getPreviousSibling(),e.getNextSibling()),o=!0),n.key===r&&(n2(n,e,i,e.getPreviousSibling(),e.getNextSibling()),o=!0)}else nI(l)&&t&&e.isSelected()&&e.selectPrevious();if(nF(l)&&t&&!o){let t=e.getIndexWithinParent();ir(e),n0(l,i,t,-1)}else ir(e);n||i$(i)||i.canBeEmpty()||!i.isEmpty()||t0(i,t),t&&l&&rO(i)&&i.isEmpty()&&i.selectEnd()}function t1(e){return e}let t2=Symbol.for("ephemeral");function t6(e){return e[t2]||!1}class t5{__type;__key;__parent;__prev;__next;__state;static getType(){let{ownNodeType:e}=ll(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||Object.getPrototypeOf(this.constructor);return Object.assign(t,{extends:n,type:e}),{[e]:t}}afterCloneFrom(e){this.__key===e.__key?(this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev,this.__state=e.__state):e.__state&&(this.__state=e.__state.getWritable(this))}static importDOM;constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",{configurable:!0,enumerable:!1,value:void 0,writable:!0}),it(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=is(e);if(null===t)break;e=t.__parent}return!1}isSelected(e){let t=e||nZ();if(null==t)return!1;let n=t.getNodes().some(e=>e.__key===this.__key);if(nb(this))return n;if(nF(t)&&"element"===t.anchor.type&&"element"===t.focus.type){if(t.isCollapsed())return!1;let e=this.getParent();if(rE(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:is(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(i$(t))return rk(e)||e===this&&rE(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:is(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:is(e)}getNextSiblings(){let e=[],t=this.getNextSibling();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){let t=rk(this)?this:this.getParent(),n=rk(e)?e:e.getParent(),r=t&&n?lI(t,n):null;return r?r.commonAncestor:null}is(e){return null!=e&&this.__key===e.__key}isBefore(e){let t=lI(this,e);return null!==t&&("descendant"===t.type||("branch"===t.type?-1===lF(t):("same"!==t.type&&"ancestor"!==t.type&&r(279),!1)))}isParentOf(e){let t=lI(this,e);return null!==t&&"ancestor"===t.type}getNodesBetween(e){let t=this.isBefore(e),n=[],i=new Set,l=this;for(;null!==l;){let o=l.__key;if(i.has(o)||(i.add(o),n.push(l)),l===e)break;let s=rk(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=ru()._dirtyLeaves;return null!==e&&e.has(this.__key)}getLatest(){if(t6(this))return this;let e=is(this.__key);return null===e&&r(113),e}getWritable(){if(t6(this))return this;ro();let e=ra(),t=ru(),n=e._nodeMap,r=this.__key,i=this.getLatest(),l=t._cloneNotNeeded,o=nZ();if(null!==o&&o.setCachedNodes(null),l.has(r))return ii(i),i;let s=le(i);return l.add(r),ii(s),n.set(r,s),s}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){r(70)}updateDOM(e,t,n){r(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){let e=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...e}}static importJSON(e){r(18,this.name)}updateFromJSON(e){return function(e,t){let n=e.getWritable(),r=t.$,i=r;for(let e of H(n).flatKeys)e in t&&(void 0!==i&&i!==r||(i={...r}),i[e]=t[e]);return(n.__state||i)&&V(e).updateFromJSON(i),n}(this,e)}static transform(){return null}remove(e){t0(this,!0,e)}replace(e,t){ro();let n=nZ();null!==n&&(n=n.clone()),iG(this,e);let i=this.getLatest(),l=this.__key,o=e.__key,s=e.getWritable(),a=this.getParentOrThrow().getWritable(),u=a.__size;ir(s);let f=i.getPreviousSibling(),d=i.getNextSibling(),c=i.__prev,h=i.__next,g=i.__parent;if((t0(i,!1,!0),null===f)?a.__first=o:f.getWritable().__next=o,(s.__prev=c,null===d)?a.__last=o:d.getWritable().__prev=o,s.__next=h,s.__parent=g,a.__size=u,t&&(rk(this)&&rk(s)||r(139),this.getChildren().forEac
1h(e=>{s.append(e)})),nF(n)){ip(n);let e=n.anchor,t=n.focus;e.key===l&&nP(e,s),t.key===l&&nP(t,s)}return io()===l&&il(o),s}insertAfter(e,t=!0){ro(),iG(this,e);let n=this.getWritable(),r=e.getWritable(),i=r.getParent(),l=nZ(),o=!1,s=!1;if(null!==i){let t=e.getIndexWithinParent();if(ir(r),nF(l)){let e=i.__key,n=l.anchor,r=l.focus;o="element"===n.type&&n.key===e&&n.offset===t+1,s="element"===r.type&&r.key===e&&r.offset===t+1}}let a=this.getNextSibling(),u=this.getParentOrThrow().getWritable(),f=r.__key,d=n.__next;if(null===a?u.__last=f:a.getWritable().__prev=f,u.__size++,n.__next=f,r.__next=d,r.__prev=n.__key,r.__parent=n.__parent,t&&nF(l)){let e=this.getIndexWithinParent();n0(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){ro(),iG(this,e);let n=this.getWritable(),r=e.getWritable(),i=r.__key;ir(r);let l=this.getPreviousSibling(),o=this.getParentOrThrow().getWritable(),s=n.__prev,a=this.getIndexWithinParent();null===l?o.__first=i:l.getWritable().__next=i,o.__size++,n.__prev=i,r.__prev=s,r.__next=n.__key,r.__parent=n.__parent;let u=nZ();return t&&nF(u)&&n0(u,this.getParentOrThrow(),a),e}isParentRequired(){return!1}createParentElementNode(){return rR()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){ro();let n=this.getPreviousSibling(),r=this.getParentOrThrow();if(null===n)return r.select(0,0);if(rk(n))return n.select();if(!nb(n)){let e=n.getIndexWithinParent()+1;return r.select(e,e)}return n.select(e,t)}selectNext(e,t){ro();let n=this.getNextSibling(),r=this.getParentOrThrow();if(null===n)return r.select();if(rk(n))return n.select(0,0);if(!nb(n)){let e=n.getIndexWithinParent();return r.select(e,e)}return n.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}}let t3="historic",t4="history-push",t7="history-merge",t8="paste",t9="skip-scroll-into-view",ne="skip-dom-selection",nt="skip-selection-focus",nn="composition-start",nr="composition-end";class ni extends t5{static getType(){return"linebreak"}static clone(e){return new ni(e.__key)}constructor(e){super(e)}getTextContent(){return"\n"}createDOM(){return document.createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:e=>(function(e){let t=e.parentElement;if(null!==t&&i5(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&na(n)){let n=t.lastChild;if(n===e||n.previousSibling===e&&na(n))return!0}}return!1})(e)||function(e){let t=e.parentElement;if(null!==t&&i5(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&na(n))return!1;let r=t.lastChild;if(r===e||r.previousSibling===e&&na(r))return!0}return!1}(e)?null:{conversion:nl,priority:0}}}static importJSON(e){return no().updateFromJSON(e)}}function nl(e){return{node:no()}}function no(){return iH(new ni)}function ns(e){return e instanceof ni}function na(e){return r4(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}function nu(e,t){return 16&t?"code":128&t?"mark":32&t?"sub":64&t?"sup":null}function nf(e,t){return 1&t?"strong":2&t?"em":"span"}function nd(e,t,n,r,i){let l=r.classList,o=iA(i,"base");void 0!==o&&l.add(...o);let s=!1,a=8&t&&4&t;for(let e in void 0!==(o=iA(i,"underlineStrikethrough"))&&(8&n&&4&n?(s=!0,a||l.add(...o)):a&&l.remove(...o)),w){let r=w[e];if(void 0!==(o=iA(i,e)))if(n&r){if(s&&("underline"===e||"strikethrough"===e)){t&r&&l.remove(...o);continue}(0==(t&r)||a&&"underline"===e||"strikethrough"===e)&&l.add(...o)}else t&r&&l.remove(...o)}}function nc(e,t,n){let r=t.firstChild,i=n.isComposing(),l=e+(i?T:"");if(null==r)t.textContent=l;else{let e=r.nodeValue;if(e!==l)if(i||a){let[t,n,i]=function(e,t){let n=e.length,r=t.length,i=0,l=0;for(;i<n&&i<r&&e[i]===t[i];)i++;for(;l+i<n&&l+i<r&&e[n-l-1]===t[r-l-1];)l++;return[i,n-i-l,t.slice(i,r-l)]}(e,l);0!==n&&r.deleteData(t,n),r.insertData(t,i)}else r.nodeValue=l}}function nh(e,t,n,r,i,l){nc(i,e,t);let o=l.theme.text;void 0!==o&&nd(0,0,r,e,o)}function ng(e,t){let n=document.createElement(t);return n.appendChild(e),n}class n_ extends t5{__text;__format;__style;__mode;__detail;static getType(){return"text"}static clone(e){return new n_(e.__text,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text,this.__format=e.__format,this.__style=e.__style,this.__mode=e.__mode,this.__detail=e.__detail}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===io()}isSegmented(){return 2===this.getLatest().__mode}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){let t=w[e];return 0!=(this.getFormat()&t)}isSimpleText(){return"text"===this.__type&&0===this.__mode}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return r9(this.getLatest().__format,e,t)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,t){let n=this.__format,r=nu(0,n),i=nf(0,n),l=null===r?i:r,o=document.createElement(l),s=o;
1this.hasFormat("code")&&o.setAttribute("spellcheck","false"),null!==r&&(s=document.createElement(i),o.appendChild(s)),nh(s,this,0,n,this.__text,e);let a=this.__style;return""!==a&&(o.style.cssText=a),o}updateDOM(e,t,n){let i=this.__text,l=e.__format,o=this.__format,s=nu(0,l),a=nu(0,o),u=nf(0,l),f=nf(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=document.createElement(f);return nh(l,this,0,o,i,n),t.replaceChild(l,e),!1}let d=t;null!==a&&null!==s&&null==(d=t.firstChild)&&r(49),nc(i,d,this);let c=n.theme.text;void 0!==c&&l!==o&&nd(0,l,o,d,c);let h=e.__style,g=this.__style;return h!==g&&(t.style.cssText=g),!1}static importDOM(){return{"#text":()=>({conversion:nx,priority:0}),b:()=>({conversion:ny,priority:0}),code:()=>({conversion:nv,priority:0}),em:()=>({conversion:nv,priority:0}),i:()=>({conversion:nv,priority:0}),mark:()=>({conversion:nv,priority:0}),s:()=>({conversion:nv,priority:0}),span:()=>({conversion:np,priority:0}),strong:()=>({conversion:nv,priority:0}),sub:()=>({conversion:nv,priority:0}),sup:()=>({conversion:nv,priority:0}),u:()=>({conversion:nv,priority:0})}}static importJSON(e){return nT().updateFromJSON(e)}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 i0(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=ng(t,"b")),this.hasFormat("italic")&&(t=ng(t,"i")),this.hasFormat("strikethrough")&&(t=ng(t,"s")),this.hasFormat("underline")&&(t=ng(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?w[e]:e,t}setDetail(e){let t=this.getWritable();return t.__detail="string"==typeof e?E[e]:e,t}setStyle(e){let t=this.getWritable();return t.__style=e,t}toggleFormat(e){let t=r9(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=A[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){ro();let n=e,r=t,i=nZ(),l=this.getTextContent(),o=this.__key;if("string"==typeof l){let e=l.length;void 0===n&&(n=e),void 0===r&&(r=e)}else n=0,r=0;if(!nF(i))return nH(o,n,o,r,"text","text");{let e=io();e!==i.anchor.key&&e!==i.focus.key||il(o),i.setTextNodeRange(this,n,this,r)}return i}selectStart(){return this.select(0,0)}selectEnd(){let e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,n,r){let i=this.getWritable(),l=i.__text,o=n.length,s=e;s<0&&(s=o+s)<0&&(s=0);let a=nZ();if(r&&nF(a)){let t=e+o;a.setTextNodeRange(i,t,i,t)}return i.__text=l.slice(0,s)+n+l.slice(s+t),i}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){let t;ro();let n=this.getLatest(),r=n.getTextContent();if(""===r)return[];let i=n.__key,l=io(),o=r.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 i=e[n];i>t&&(s.push(r.slice(t,i)),t=i)}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=nZ();if(nF(m)){let[e,t]=m.isBackward()?[m.focus,m.anchor]:[m.anchor,m.focus];"text"===e.type&&e.key===i&&(p=e),"text"===t.type&&t.key===i&&(y=t)}n.isSegmented()?((t=nT(f)).__format=c,t.__style=h,t.__detail=g,t.__state=Z(n,t),_=!0):t=n.setTextContent(f);let x=[t];for(let e=1;e<u;e++){let t=nT(s[e]);t.__format=c,t.__style=h,t.__detail=g,t.__state=Z(n,t);let r=t.__key;l===i&&il(r),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,t;e=this.getPreviousSibling(),t=this.getNextSibling(),null!==e&&ii(e),null!==t&&ii(t);let n=d.getWritable(),r=this.getIndexWithinParent();_?(n.splice(r,0,x),this.remove()):n.splice(r,1,x),nF(m)&&n0(m,d,r,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;io()===i&&il(n);let s=nZ();if(nF(s)){let r=s.anchor,l=s.focus;null!==r&&r.key===i&&n6(r,t,n,e,o),null!==l&&l.key===i&&n6(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 np(e){return{forChild:nk(e.style),node:null}}function ny(e){let t="normal"===e.style.fontWeight;return{forChild:nk(e.style,t?void 0:"bold"),node:null}}let nm=new WeakMap;function nx(e){null===e.parentElement&&r(129);let t=e.textContent||"";if(null!==function(e){let t,n=e.parentNode,r=[e];for(;null!==n&&void 0===(t=nm.get(n))&&!function(e){if(!i0(e))return!1;if("PRE"===e.nodeName)return!0;let t=e.style.whiteSpace;return"string"==typeof t&&t.startsWith("pre")}(n);)r.push(n),n=n.parentNode;let i=void 0===t?n:t;for(let e=0;e<r.length;e++)nm.set(r[e],i);return i}(e)){let e=t.split(/(\r?\n|\t)/),n=[],r=e.length;for(let t=0;t<r;t++){let r=e[t];"\n"===r||"\r\n"===r?n.push(no()):" "===r?n.push(nw()):""!==r&&n.push(nT(r))}return{node:n}}if(""===(t=t.replace(/\r/g,"").replace(/[ \t\n]+/g," ")))return{node:null};if(" "===t[0]){let n=e,r=!0;for(;null!==n&&null!==(n=nC(n,!1));){let e=n.textContent||"";if(e.length>
10){/[ \t\n]$/.test(e)&&(t=t.slice(1)),r=!1;break}}r&&(t=t.slice(1))}if(" "===t[t.length-1]){let n=e,r=!0;for(;null!==n&&null!==(n=nC(n,!0));)if((n.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){r=!1;break}r&&(t=t.slice(0,t.length-1))}return""===t?{node:null}:{node:nT(t)}}function nC(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(i0(n=e)){let e=n.style.display;if(""===e&&!i6(n)||""!==e&&!e.startsWith("inline"))return null}let r=n;for(;null!==(r=t?n.firstChild:n.lastChild);)n=r;if(r4(n))return n;if("BR"===n.nodeName)return null}}let nS={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function nv(e){let t=nS[e.nodeName.toLowerCase()];return void 0===t?{node:null}:{forChild:nk(e.style,t),node:null}}function nT(e=""){return iH(new n_(e))}function nb(e){return e instanceof n_}function nk(e,t){let n=e.fontWeight,r=e.textDecoration.split(" "),i="700"===n||"bold"===n,l=r.includes("line-through"),o="italic"===e.fontStyle,s=r.includes("underline"),a=e.verticalAlign;return e=>(nb(e)&&(i&&!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 nN extends n_{static getType(){return"tab"}static clone(e){return new nN(e.__key)}constructor(e){super(" ",e),this.__detail=2}static importDOM(){return null}createDOM(e){let t=super.createDOM(e),n=iA(e.theme,"tab");return void 0!==n&&t.classList.add(...n),t}static importJSON(e){return nw().updateFromJSON(e)}setTextContent(e){return" "!==e&&""!==e&&i(126),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 nw(){return iH(new nN)}function nE(e){return e instanceof nN}class nM{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>lD(l$(lK(this,"next")),l$(lK(e,"next")))}getNode(){let e=is(this.key);return null===e&&r(20),e}set(e,t,n,r){let i=this._selection,l=this.key;r&&this.key===e&&this.offset===t&&this.type===n||(this.key=e,this.offset=t,this.type=n,rl()||(io()===l&&il(e),null!==i&&(i.setCachedNodes(null),i.dirty=!0)))}}function nO(e,t,n){return new nM(e,t,n)}function nA(e,t){let n=t.__key,r=e.offset,i="element";if(nb(t)){i="text";let e=t.getTextContentSize();r>e&&(r=e)}else if(!rk(t)){let e=t.getNextSibling();if(nb(e))n=e.__key,r=0,i="text";else{let e=t.getParent();e&&(n=e.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,i)}function nP(e,t){if(rk(t)){let n=t.getLastDescendant();rk(n)||nb(n)?nA(e,n):nA(e,t)}else nA(e,t)}class nD{_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(!nI(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 nD(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){let t,n=this.getNodes(),r=n.length,i=n[r-1];if(nb(i))t=i.select();else{let e=i.getIndexWithinParent()+1;t=i.getParentOrThrow().select(e,e)}t.insertNodes(e);for(let e=0;e<r;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=is(e);
1null!==t&&n.push(t)}return rl()||(this._cachedNodes=n),n}getTextContent(){let e=this.getNodes(),t="";for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}deleteNodes(){let e=this.getNodes();if((nZ()||nQ())===this&&e[0]){let t=lS(e[0],"next");lB(lA(t,t))}for(let t of e)t.remove()}}function nF(e){return e instanceof nL}class nL{format;style;anchor;focus;_cachedNodes;dirty;constructor(e,t,n,r){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this.format=n,this.style=r,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!nF(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,r]=e.getTextSlices();n&&t.push(n.caret.origin);let i=new Set,l=new Set;for(let n of e)if(ly(n)){let{origin:e}=n;0===t.length?i.add(e):(l.add(e),t.push(e))}else{let{origin:e}=n;rk(e)&&l.has(e)||t.push(e)}if(r&&t.push(r.caret.origin),lp(e.focus)&&rk(e.focus.origin)&&null===e.focus.getNodeAtCaret())for(let n=lb(e.focu
1s.origin,"previous");ly(n)&&i.has(n.origin)&&!n.origin.isEmpty()&&n.origin.is(t[t.length-1]);n=lN(n))i.delete(n.origin),t.pop();for(;t.length>1;){let e=t[t.length-1];if(!rk(e)||l.has(e)||e.isEmpty()||i.has(e))break;t.pop()}if(0===t.length&&e.isCollapsed()){let n=l$(e.anchor),r=l$(e.anchor.getFlipped()),i=e=>l_(e)?e.origin:e.getNodeAtCaret(),l=i(n)||i(r)||(e.anchor.getNodeAtCaret()?n.origin:r.origin);t.push(l)}return t}(lG(lW(this),"next"));return rl()||(this._cachedNodes=t),t}setTextNodeRange(e,t,n,r){this.anchor.set(e.__key,t,"text"),this.focus.set(n.__key,r,"text")}getTextContent(){let e=this.getNodes();if(0===e.length)return"";let t=e[0],n=e[e.length-1],r=this.anchor,i=this.focus,l=r.isBefore(i),[o,s]=nR(this),a="",u=!0;for(let f=0;f<e.length;f++){let d=e[f];if(rk(d)&&!d.isInline())u||(a+="\n"),u=!d.isEmpty();else if(u=!1,nb(d)){let e=d.getTextContent();d===t?d===n?"element"===r.type&&"element"===i.type&&i.offset!==r.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!rE(d)&&!ns(d)||d===n&&this.isCollapsed()||(a+=d.getTextContent())}return a}applyDOMRange(e){let t=ru(),n=t.getEditorState()._selection,r=n$(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n);if(null===r)return;let[i,l]=r;this.anchor.set(i.key,i.offset,i.type,!0),this.focus.set(l.key,l.offset,l.type,!0),en(this)}clone(){let e=this.anchor,t=this.focus;return new nL(nO(e.key,e.offset,e.type),nO(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=r9(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=w[e];return 0!=(this.format&t)}insertRawText(e){let t=e.split(/(\r?\n|\t)/),n=[],r=t.length;for(let e=0;e<r;e++){let r=t[e];"\n"===r||"\r\n"===r?n.push(no()):" "===r?n.push(nw()):n.push(nT(r))}this.insertNodes(n)}insertText(e){let t=this.anchor,n=this.focus,i=this.format,l=this.style,o=t,s=n;!this.isCollapsed()&&n.isBefore(t)&&(o=n,s=t),"element"===o.type&&function(e,t,n,r){let i=e.getNode(),l=i.getChildAtIndex(e.offset),o=nT();if(o.setFormat(n),o.setStyle(r),rB(l))l.splice(0,0,[o]);else{let e=rO(i)?rR().append(o):o;null===l?i.append(e):l.insertBefore(e)}e.is(t)&&t.set(o.__key,0,"text"),e.set(o.__key,0,"text")}(o,s,i,l),"element"===s.type&&lR(s,l$(lK(s,"next")));let a=o.offset,u=s.offset,f=this.getNodes(),d=f.length,c=f[0];nb(c)||r(26);let h=c.getTextContent().length,g=c.getParentOrThrow(),_=f[d-1];if(1===d&&"element"===s.type&&(u=h,s.set(o.key,u,"text")),this.isCollapsed()&&a===h&&(r3(c)||!c.canInsertTextAfter()||!g.canInsertTextAfter()&&null===c.getNextSibling())){let t=c.getNextSibling();if(nb(t)&&t.canInsertTextBefore()&&!r3(t)||((t=nT()).setFormat(i),t.setStyle(l),g.canInsertTextAfter()?c.insertAfter(t):g.insertAfter(t)),t.select(0,0),c=t,""!==e)return void this.insertText(e)}else if(this.isCollapsed()&&0===a&&(r3(c)||!c.canInsertTextBefore()||!g.canInsertTextBefore()&&null===c.getPreviousSibling())){let t=c.getPreviousSibling();if(nb(t)&&!r3(t)||((t=nT()).setFormat(i),g.canInsertTextBefore()?c.insertBefore(t):g.insertBefore(t)),t.select(),c=t,""!==e)return void this.insertText(e)}else if(c.isSegmented()&&a!==h){let e=nT(c.getTextContent());e.setFormat(i),c.replace(e),c=e}else if(!this.isCollapsed()&&""!==e){let t=_.getParent();if(!g.canInsertTextBefore()||!g.canInsertTextAfter()||rk(t)&&(!t.canInsertTextBefore()||!t.canInsertTextAfter()))return this.insertText(""),nJ(this.anchor,this.focus),void this.insertText(e)}if(1===d){if(r5(c)){let t=nT(e);return t.select(),void c.replace(t)}let t=c.getFormat(),n=c.getStyle();if(a!==u||t===i&&n===l){if(nE(c)){let t=nT(e);return t.setFormat(i),t.setStyle(l),t.select(),void c.replace(t)}}else{if(""!==c.getTextContent()){let t=nT(e);if(t.setFormat(i),t.setStyle(l),t.select(),0===a)c.insertBefore(t,!1);else{let[e]=c.splitText(a);e.insertAfter(t,!1)}return void(t.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length))}c.setFormat(i),c.setStyle(l)}let r=u-a;""===(c=c.spliceText(a,r,e,!0)).getTextContent()?c.remove():"text"===this.anchor.type&&(this.format=t,this.style=n,c.isComposing()&&(this.anchor.offset-=e.length))}else{let t=new Set([...c.getParentKeys(),..._.getParentKeys()]),n=rk(c)?c:c.getParentOrThrow(),r=rk(_)?_:_.getParentOrThrow(),i=_;if(!n.is(r)&&r.isInline())do i=r,r=r.getParentOrThrow();while(r.isInline());if("text"===s.type&&(0!==u||""===_.getTextContent())||"element"===s.type&&_.getIndexWithinParent()<u)if(nb(_)&&!r5(_)&&u!==_.getTextContentSize()){if(_.isSegmented()){let e=nT(_.getTextContent());_.replace(e),_=e}rO(s.getNode())||"text"!==s.type||(_=_.spliceText(0,u,"")),t.add(_.__key)}else{let e=_.getParentOrThrow();e.canBeEmpty()||1!==e.getChildrenSize()?_.remove():e.remove()}else t.add(_.__key);let l=r.getChildren(),o=new Set(f),g=n.is(r),p=n.isInline()&&null===c.getNextSibling()?n:c;for(let e=l.length-1;e>=0;e--){let t=l[e];if(t.is(c)||rk(t)&&t.isParentOf(c))break;t.isAttached()&&(!o.has(t)||t.is(i)?g||p.insertAfter(t,!1):t.remove())}if(!g){let e=r,n=null;for(;null!==e;){let r=e.getChildren(),i=r.length;(0===i||r[i-1].is(n))&&(t.delete(e.__key),n=e),e=e.getParent()}}if(r5(c))if(a===h)c.select();else{let t=nT(e);t.select(),c.replace(t)}else""===(c=c.spliceText(a,h-a,e,!0)).getTextContent()?c.remove():"text"===this.anchor.type&&(this.format=c.getFormat(),this.style=c.getStyle(),c.isComposing()&&(this.anchor.offset-=e.length));for(let e=1;e<d;e++){let n=f[e],r=n.__key;t.has(r)||n.remove()}}}removeText(){let e=nZ()===this;lz(this,function(e,t="removeEmptySlices"){let n,i;if(e.isCollapsed())return e;let l="root",o="next",s=t,a=lG(e,o),u=lj(a.anchor,l),f=lj(a.focus.getFlipped(),l),d=new Set,c=[];for(let e of a.iterNodeCarets(l))if(ly(e))d.add(e.origin.getKey());else if(lp(e)){let{origin:t}=e;rk(t)&&!d.has(t.getKey())||c.push(t)}for(let e of c)e.remove();for(let e of a.getTextSlices()){if(!e)continue;let{origin:t}=e.caret,n=t.getTextContentSize(),r=lU(lS(t,o)),i=t.getMode();if(Math.abs(e.distance)===n&&"removeEmptySlices"===s||"token"===i&&0!==e.distance)r.remove();else if(0!==e.distance){s="removeEmptySlices";let t=e.removeTextSlice(),n=e.caret.origin;if("segmented"===i){let e=t.origin,n=nT(e.getTextContent()).setStyle(e.getStyle()).setFormat(e.getFormat());r.replaceOrInsert(n),t=lv(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(lJ(e)){n=l$(e);break}
1for(let e of f)if(lJ(e)){i=l$(e);break}let h=function(e,t,n){let r;if(!e||!t)return null;let i=e.getParentAtCaret(),l=t.getParentAtCaret();if(!i||!l)return null;let o=i.getParents().reverse();o.push(i);let s=l.getParents().reverse();s.push(l);let a=Math.min(o.length,s.length);for(r=0;r<a&&o[r]===s[r];r++);let u=(e,t)=>{let n;for(let i=r;i<e.length;i++){let r=e[i];if(i$(r))return;!n&&t(r)&&(n=r)}return n},f=u(o,i3),d=f&&u(s,e=>n.has(e.getKey())&&i3(e));return f&&d?[f,d]:null}(n,i,d);if(h){let[e,t]=h;lb(e,"previous").splice(0,t.getChildren());let n=t.getParent();for(t.remove(!0);n&&n.isEmpty();){let e=n;n=n.getParent(),e.remove(!0)}}let g=[n,i,...u,...f].find(lJ);if(g)return lO(lH(l$(g),e.direction));r(269,JSON.stringify(u.map(e=>e.origin.__key)))}(lW(this))),e&&nZ()!==this&&ip(this)}formatText(e,t=null){if(this.isCollapsed())return this.toggleFormat(e),void il(null);let n=this.getNodes(),r=[];for(let e of n)nb(e)&&r.push(e);let i=t=>{n.forEach(n=>{if(rk(n)){let r=n.getFormatFlags(e,t);n.setTextFormat(r)}})},l=r.length;if(0===l)return this.toggleFormat(e),il(null),void i(t);let o=this.anchor,s=this.focus,a=this.isBackward(),u=a?s:o,f=a?o:s,d=0,c=r[0],h="element"===u.type?0:u.offset;if("text"===u.type&&h===c.getTextContentSize()&&(d=1,c=r[1],h=0),null==c)return;let g=c.getFormatFlags(e,t);i(g);let _=l-1,p=r[_],y="text"===f.type?f.offset:p.getTextContentSize();if(c.is(p)){if(h===y)return;if(r3(c)||0===h&&y===c.getTextContentSize())c.setFormat(g);else{let e=c.splitText(h,y),t=0===h?e[0]:e[1];t.setFormat(g),"text"===u.type&&u.set(t.__key,0,"text"),"text"===f.type&&f.set(t.__key,y-h,"text")}return void(this.format=g)}0===h||r3(c)||([,c]=c.splitText(h),h=0),c.setFormat(g);let m=p.getFormatFlags(e,g);y>0&&(y===p.getTextContentSize()||r3(p)||([p]=p.splitText(y)),p.setFormat(m));for(let t=d+1;t<_;t++){let n=r[t],i=n.getFormatFlags(e,m);n.setFormat(i)}"text"===u.type&&u.set(c.__key,h,"text"),"text"===f.type&&f.set(p.__key,y,"text"),this.format=g|m}insertNodes(e){var t;if(0===e.length)return;if(this.isCollapsed()||this.removeText(),"root"===this.anchor.key){this.insertParagraph();let t=nZ();return nF(t)||r(134),t.insertNodes(e)}let n=(this.isBackward()?this.focus:this.anchor).getNode(),i=ls(n,i3),l=e[e.length-1];if(rk(i)&&"__language"in i){if("__language"in e[0])this.insertText(e[0].getTextContent());else{let t=n7(this);i.splice(t,0,e),l.selectEnd()}return}if(!e.some(e=>(rk(e)||rE(e))&&!e.isInline())){rk(i)||r(211,n.constructor.name,n.getType());let t=n7(this);return i.splice(t,0,e),void l.selectEnd()}let o=function(e){let t=rR(),n=null;for(let r=0;r<e.length;r++){let i=e[r],l=ns(i);if(l||rE(i)&&i.isInline()||rk(i)&&i.isInline()||nb(i)||i.isParentRequired()){if(null===n&&(n=i.createParentElementNode(),t.append(n),l))continue;null!==n&&n.append(i)}else t.append(i),n=null}return t}(e),s=o.getLastDescendant(),a=o.getChildren(),u=rk(i)&&i.isEmpty()?null:this.insertParagraph(),f=a[a.length-1],d=a[0];rk(t=d)&&i3(t)&&!t.isEmpty()&&rk(i)&&(!i.isEmpty()||i.canMergeWhenEmpty())&&(rk(i)||r(211,n.constructor.name,n.getType()),i.append(...d.getChildren()),d=a[1]),d&&(null===i&&r(212,n.constructor.name,n.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)}(i,d));let c=ls(s,i3);u&&rk(c)&&(u.canMergeWhenEmpty()||i3(f))&&(c.append(...u.getChildren()),u.remove()),rk(i)&&i.isEmpty()&&i.remove(),s.selectEnd();let h=rk(i)?i.getLastChild():null;ns(h)&&c!==i&&h.remove()}insertParagraph(){if("root"===this.anchor.key){let e=rR();return ig().splice(this.anchor.offset,0,[e]),e.select(),e}let e=n7(this),t=ls(this.anchor.getNode(),i3);rk(t)||r(213);let n=t.getChildAtIndex(e),i=n?[n,...n.getNextSiblings()]:[],l=t.insertNewAfter(this,!1);return l?(l.append(...i),l.selectStart(),l):null}insertLineBreak(e){let t=no();if(this.insertNodes([t]),e){let e=t.getParentOrThrow(),n=t.getIndexWithinParent();e.select(n,n)}}extract(){let e=[...this.getNodes()],t=e.length,n=e[0],r=e[t-1],[i,l]=nR(this),o=this.isBackward(),[s,a]=o?[this.focus,this.anchor]:[this.anchor,this.focus],[u,f]=o?[l,i]:[i,l];if(0===t)return[];if(1===t){if(nb(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(nb(n)&&(u===n.getTextContentSize()?e.shift():0!==u&&([,n]=n.splitText(u),e[0]=n,s.set(n.getKey(),0,"text"))),nb(r)){let t=r.getTextContent().length;0===f?e.pop():f!==t&&([r]=r.splitText(f),e[e.length-1]=r,a.set(r.getKey(),r.getTextContentSize(),"text"))}return e}
1modify(e,t,n){var r;if(n8(this,e,t,n))return;let i="move"===e,l=ru(),o=iX(ij(l));if(!o)return;let s=l._blockCursorElement,a=l._rootElement,u=this.focus.getNode();if(null===a||null===s||!rk(u)||u.isInline()||u.canBeEmpty()||iq(s,l,a),this.dirty){let e=iK(l,this.anchor.key),t=iK(l,this.focus.key);"text"===this.anchor.type&&(e=r8(e)),"text"===this.focus.type&&(t=r8(t)),e&&t&&n5(o,e,this.anchor.offset,t,this.focus.offset)}if(r=t?"backward":"forward",o.modify(e,r,n),o.rangeCount>0){let e=o.getRangeAt(0),n=this.anchor.getNode(),r=rO(n)?n:function(e){let t=e.getParentOrThrow();for(;null!==t&&!i$(t);)t=t.getParentOrThrow();return t}(n);if(this.applyDOMRange(e),this.dirty=!0,!i){let n,i,l,s,a,u=this.getNodes(),f=[],d=!1;for(let e=0;e<u.length;e++){let t=u[e];iW(t,r)?f.push(t):d=!0}if(d&&f.length>0)if(t){let e=f[0];rk(e)?e.selectStart():e.getParentOrThrow().selectStart()}else{let e=f[f.length-1];rk(e)?e.selectEnd():e.getParentOrThrow().selectEnd()}o.anchorNode===e.startContainer&&o.anchorOffset===e.startOffset||(n=this.focus,l=(i=this.anchor).key,s=i.offset,a=i.type,i.set(n.key,n.offset,n.type,!0),n.set(l,s,a,!0))}}"lineboundary"===n&&n8(this,e,t,n,"decorators")}forwardDeletion(e,t,n){if(!n&&("element"===e.type&&rk(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(rk(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(e){let t=this.isCollapsed();if(this.isCollapsed()){let t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;let r=lM(lK(t,e?"previous":"next"));if(r.getTextSlices().every(e=>null===e||0===e.distance)){let e={type:"initial"};for(let t of r.iterNodeCarets("shadowRoot"))if(ly(t))if(t.origin.isInline());else{if(t.origin.isShadowRoot()){if("merge-block"===e.type)break;if(rk(r.anchor.origin)&&r.anchor.origin.isEmpty()){let e=l$(t);lz(this,lA(e,e)),r.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(lp(t)){if(rk(t.origin)){if(t.origin.isInline()){if(!t.origin.isParentOf(r.anchor.origin))break}else e={block:t.origin,type:"merge-next-block"};continue}if(rE(t.origin)){if(t.origin.isIsolated());else if("merge-next-block"===e.type&&(t.origin.isKeyboardSelectable()||!t.origin.isInline())&&rk(r.anchor.origin)&&r.anchor.origin.isEmpty()){r.anchor.origin.remove();let e=nY();e.add(t.origin.getKey()),ip(e)}else t.origin.remove();return}break}}if("merge-block"===e.type){let{caret:t,block:n}=e;return lz(this,lA(!t.origin.isEmpty()&&n.isEmpty()?lU(lS(n,t.direction)):r.anchor,t)),this.removeText()}}let i=this.focus;if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&0===t.offset&&nB(this,t.getNode()))return}else{let r="text"===i.type?i.getNode():null;if(n="text"===t.type?t.getNode():null,null!==r&&r.isSegmented()){let t=i.offset,l=r.getTextContentSize();if(r.is(n)||e&&t!==l||!e&&0!==t)return void nW(r,e,t)}else if(null!==n&&n.isSegmented()){let i=t.offset,l=n.getTextContentSize();if(n.is(r)||e&&0!==i||!e&&i!==l)return void nW(n,e,i)}!function(e,t){let n=e.anchor,r=e.focus,i=n.getNode();if(i===r.getNode()&&"text"===n.type&&"text"===r.type){var l;let e=n.offset,o=r.offset,s=e<o,a=s?e:o,u=s?o:e,f=u-1;a===f||im(l=i.getTextContent().slice(a,u))||nz(l)||(t?r.set(r.key,f,r.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()&&rO(e.getParent())&&null===e.getPreviousSibling()&&nB(this,e)}}deleteLine(e){this.isCollapsed()&&this.modify("extend",e,"lineboundary"),this.isCollapsed()?this.deleteCharacter(e):this.removeText()}deleteWord(e){if(this.isCollapsed()){let t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;this.modify("extend",e,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function nI(e){return e instanceof nD}function nK(e){let t=e.offset;if("text"===e.type)return t;let n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function nR(e){let t=e.getStartEndPoints();if(null===t)return[0,0];let[n,r]=t;return"element"===n.type&&"element"===r.type&&n.key===r.key&&n.offset===r.offset?[0,0]:[nK(n),nK(r)]}function nB(e,t){for(let n=t;n;n=n.getParent()){if(rk(n)){if(n.collapseAtStart(e))return!0;
1if(i$(n))break}if(n.getPreviousSibling())break}return!1}let nz=(()=>{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 nW(e,t,n){let r=e.getTextContent().split(/(?=\s)/g),i=r.length,l=0,o=0;for(let e=0;e<i;e++){let s=e===i-1;if(o=l,l+=r[e].length,t&&l===n||l>n||s){r.splice(e,1),s&&(o=void 0);break}}let s=r.join("").trim();""===s?e.remove():(e.setTextContent(s),e.select(o,o))}function nU(e,t,n,i){let l,o=t;if(i0(e)){let s=!1,a=e.childNodes,u=a.length,f=i._blockCursorElement;o===u&&(s=!0,o=u-1);let d=a[o],c=!1;if(d===f)d=a[o+1],c=!0;else if(null!==f){let n=f.parentNode;e===n&&t>Array.prototype.indexOf.call(n.children,f)&&o--}if(nb(l=iy(d)))o=lT(l,s?"next":"previous");else{let a=iy(e);if(null===a)return null;if(rk(a)){let u,f=i.getElementByKey(a.getKey());null===f&&r(214);let d=a.getDOMSlot(f);[a,o]=d.resolveChildIndex(a,f,e,t),rk(a)||r(215),s&&o>=a.getChildrenSize()&&(o=Math.max(0,a.getChildrenSize()-1));let h=a.getChildAtIndex(o);if(rk(h)&&(u=h.getParent(),null===n||null===u||!u.canBeEmpty()||u!==n.getNode())){let e=s?h.getLastDescendant():h.getFirstDescendant();a=null===e||rk(h=e)?h:h.getParentOrThrow(),o=0}nb(h)?(l=h,a=null,o=lT(h,s?"next":"previous")):h!==a&&s&&!c&&(rk(a)||r(216),o=Math.min(a.getChildrenSize(),o+1))}else{let n=a.getIndexWithinParent();o=0===t&&rE(a)&&iy(e)===a?n:n+1,a=a.getParentOrThrow()}if(rk(a))return nO(a.__key,o,"element")}}else l=iy(e);return nb(l)?nO(l.__key,lT(l,o,"clamp"),"text"):null}function nj(e,t,n){let r=e.offset,i=e.getNode();if(0===r){let r=i.getPreviousSibling(),l=i.getParent();if(t){if((n||!t)&&null===r&&rk(l)&&l.isInline()){let t=l.getPreviousSibling();nb(t)&&e.set(t.__key,t.getTextContent().length,"text")}}else rk(r)&&!n&&r.isInline()?e.set(r.__key,r.getChildrenSize(),"element"):nb(r)&&e.set(r.__key,r.getTextContent().length,"text")}else if(r===i.getTextContent().length){let r=i.getNextSibling(),l=i.getParent();if(t&&rk(r)&&r.isInline())e.set(r.__key,0,"element");else if((n||t)&&null===r&&rk(l)&&l.isInline()&&!l.canInsertTextAfter()){let t=l.getNextSibling();nb(t)&&e.set(t.__key,0,"text")}}}function nJ(e,t,n){if("text"===e.type&&"text"===t.type){let n=e.isBefore(t),r=e.is(t);nj(e,n,r),nj(t,!n,r),r&&t.set(e.key,e.offset,e.type)}}function n$(e,t,n,r,i,l){if(null===e||null===n||!r0(i,e,n))return null;let o=nU(e,t,nF(l)?l.anchor:null,i);if(null===o)return null;let s=nU(n,r,nF(l)?l.focus:null,i);if(null===s)return null;if("element"===o.type&&"element"===s.type){let t=iy(e),r=iy(n);if(rE(t)&&rE(r))return null}return nJ(o,s),[o,s]}function nV(e){return rk(e)&&!e.isInline()}function nH(e,t,n,r,i,l){let o=ra(),s=new nL(nO(e,t,i),nO(n,r,l),0,"");return s.dirty=!0,o._selection=s,s}function nG(){return new nL(nO("root",0,"element"),nO("root",0,"element"),0,"")}function nY(){return new nD(new Set)}function nq(e,t){return nX(null,e,t,null)}function nX(e,t,n,r){let i,l,o,s,a=n._window;if(null===a)return null;let u=r||a.event,f=u?u.type:void 0,d="selectionchange"===f,c=!F&&(d||"beforeinput"===f||"compositionstart"===f||"compositionend"===f||"click"===f&&u&&3===u.detail||"drop"===f||void 0===f);if(nF(e)&&!c)return e.clone();if(null===t)return null;if(i=t.anchorNode,l=t.focusNode,o=t.anchorOffset,s=t.focusOffset,(d||void 0===f)&&nF(e)&&!r0(n,i,l))return e.clone();let h=n$(i,o,l,s,n,e);if(null===h)return null;let[g,_]=h,p=0,y="";if(nF(e)){let t=e.anchor;if(g.key===t.key)p=e.format,y=e.style;else{let e=g.getNode();nb(e)?(p=e.getFormat(),y=e.getStyle()):rk(e)&&(p=e.getTextFormat(),y=e.getTextStyle())}}return new nL(g,_,p,y)}function nZ(){return ra()._selection}function nQ(){return ru()._editorState._selection}function n0(e,t,n,r=1){let i=e.anchor,l=e.focus,o=i.getNode(),s=l.getNode();if(!t.is(o)&&!t.is(s))return;let a=t.__key;if(e.isCollapsed()){let t=i.offset;if(n<=t&&r>0||n<t&&r<0){let n=Math.max(0,t+r);i.set(a,n,"element"),l.set(a,n,"element"),n1(e)}}else{let o=e.isBackward(),s=o?l:i,u=s.getNode(),f=o?i:l,d=f.getNode();if(t.is(u)){let e=s.offset;(n<=e&&r>0||n<e&&r<0)&&s.set(a,Math.max(0,e+r),"element")}if(t.is(d)){let e=f.offset;(n<=e&&r>0||n<e&&r<0)&&f.set(a,Math.max(0,e+r),"element")}}n1(e)}function n1(e){let t=e.anchor,n=t.offset,r=e.focus,i=r.offset,l=t.getNode(),o=r.getNode();if(e.isCollapsed()){if(!rk(l))return;let e=l.getChildrenSize(),i=n>=e,o=i?l.getChildAtIndex(e-1):l.getChildAtIndex(n);if(nb(o)){let e=0;i&&(e=o.getTextContentSize()),t.set(o.__key,e,"text"),r.set(o.__key,e,"text")}return}if(rk(l)){let e=l.getChildrenSize(),r=n>=e,i=r?l.getChildAtIndex(e-1):l.getChildAtIndex(n);if(nb(i)){let e=0;r&&(e=i.getTextContentSize()),t.set(i.__key,e,"text")}}if(rk(o)){let e=o.getChildrenSize(),t=i>=e,n=t?o.getChildAtIndex(e-1):o.getChildAtIndex(i);if(nb(n)){let e=0;t&&(e=n.getTextContentSize()),r.set(n.__key,e,"text")}}}function n2(e,t,n,r,i){let l=null,o=0,s=null;null!==r?(l=r.__key,nb(r)?(o=r.getTextContentSize(),s="text"):rk(r)&&(o=r.getChildrenSize(),s="element")):null!==i&&(l=i.__key,nb(i)?s="text":rk(i)&&(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 n6(e,t,n,r,i){"text"===e.type?e.set(n,e.offset+(t?0:i),"text"):e.offset>r.getIndexWithinParent()&&e.set(e.key,e.offset-1,"element")}function n5(e,t,n,r,i){try{e.setBaseAndExtent(t,n,r,i)}catch(e){}}function n3(e,t,n){let r=iK(e,t.getKey());if(rk(t)){let e=t.getDOMSlot(r);return[e.element,n+e.getFirstChildOffset()]}return[r,n]}function n4(e){let t=nZ()||nQ();
1null===t&&(t=ig().selectEnd()),t.insertNodes(e)}function n7(e){let t=e;e.isCollapsed()||t.removeText();let n=nZ();nF(n)&&(t=n),nF(t)||r(161);let i=t.anchor,l=i.getNode(),o=i.offset;for(;!i3(l);){let e=l;if([l,o]=function(e,t){let n=e.getParent();if(!n){let e=rR();return ig().append(e),e.select(),[ig(),0]}if(nb(e)){let r=e.splitText(t);if(0===r.length)return[n,e.getIndexWithinParent()];let i=+(0!==t);return[n,r[0].getIndexWithinParent()+i]}if(!rk(e)||0===t)return[n,e.getIndexWithinParent()];let r=e.getChildAtIndex(t);if(r){let n=new nL(nO(e.__key,t,"element"),nO(e.__key,t,"element"),0,""),i=e.insertNewAfter(n);i&&i.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}(l,o),e.is(l))break}return o}function n8(e,t,n,r,i="decorators-and-blocks"){if("move"===t&&"character"===r&&!e.isCollapsed()){let[t,r]=n===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return r.set(t.key,t.offset,t.type),!0}let l=lK(e.focus,n?"previous":"next"),o="lineboundary"===r,s="move"===t,a=l,u="decorators-and-blocks"===i;if(!lV(a)){for(let e of a){u=!1;let{origin:t}=e;if(!rE(t)||t.isIsolated()||(a=e,!o||!t.isInline()))break}if(u)for(let e of lM(l).iterNodeCarets("extend"===t?"shadowRoot":"root")){if(ly(e))e.origin.isInline()||(a=e);else{if(rk(e.origin))continue;rE(e.origin)&&!e.origin.isInline()&&(a=e)}break}}if(a===l)return!1;if(s&&!o&&rE(a.origin)&&a.origin.isKeyboardSelectable()){let e=nY();return e.add(a.origin.getKey()),ip(e),!0}return a=l$(a),s&&lR(e.anchor,a),lR(e.focus,a),u||!o}let n9=null,re=null,rt=!1,rn=!1,rr=0,ri={characterData:!0,childList:!0,subtree:!0};function rl(){return rt||null!==n9&&n9._readOnly}function ro(){rt&&r(13)}function rs(){rr>99&&r(14)}
1function ra(){return null===n9&&r(195,rf()),n9}function ru(){return null===re&&r(196,rf()),re}function rf(){let e=0,t=new Set,n=rH.version;if("u">typeof window)for(let r of document.querySelectorAll("[contenteditable]")){let i=r6(r);if(r1(i))e++;else if(i){let e=String(i.constructor.version||"<0.17.1");e===n&&(e+=" (separately built, likely a bundler configuration issue)"),t.add(e)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),r}function rd(e,t,n){let r=t.__type,i=rq(e,r),l=n.get(r);void 0===l&&(l=Array.from(i.transforms),n.set(r,l));let o=l.length;for(let e=0;e<o&&(l[e](t),t.isAttached());e++);}function rc(e,t){return void 0!==e&&e.__key!==t&&e.isAttached()}function rh(e,t){if(!t)return;let n=e._updateTags,r=t;for(let e of(Array.isArray(t)||(r=[t]),r))n.add(e)}function rg(e){return r_(e,ru()._nodes)}function r_(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(rk(o)&&Array.isArray(s))for(let e=0;e<s.length;e++){let n=r_(s[e],t);o.append(n)}return o}function rp(e,t,n){let r=n9,i=rt,l=re;n9=t,rt=!0,re=e;try{return n()}finally{n9=r,rt=i,re=l}}function ry(e,t){let n,i,l=e._pendingEditorState,o=e._rootElement,s=e._headless||null===o;if(null===l)return;let u=e._editorState,f=u._selection,d=l._selection,c=0!==e._dirtyType,h=n9,g=rt,_=re,p=e._updating,y=e._observer,m=null;if(e._pendingEditorState=null,e._editorState=l,!s&&c&&null!==y){re=e,n9=l,rt=!1,e._updating=!0;try{let t,n=e._dirtyType,i=e._dirtyElements,o=e._dirtyLeaves;y.disconnect(),eg="",ey=2===n,el=e,ei=e._config,eo=e._nodes,es=el._listeners.mutation,ea=i,eu=o,ef=u._nodeMap,ed=l._nodeMap,em=l._readOnly,ec=new Map(e._keyToDOMMap),eh=t=new Map,function e(t,n){let i=ef.get(t),l=ed.get(t);void 0!==i&&void 0!==l||r(61);let o=ey||eu.has(t)||ea.has(t),s=iK(el,t);if(i===l&&!o){let e;if(rk(i)){let t=s.__lexicalTextContent;"string"==typeof t?e=t:s.__lexicalTextContent=e=i.getTextContent()}else e=i.getTextContent();return eg+=e,s}if(i!==l&&o&&iP(eh,eo,es,l,"updated"),l.updateDOM(i,s,ei)){let e=ek(t,null);return null===n&&r(62),n.replaceChild(e,s),ex(t,null),e}if(rk(i)){rk(l)||r(334,t);let n=l.__indent;(ey||n!==i.__indent)&&ev(s,n);let a=l.__format;if((ey||a!==i.__format)&&eT(s,a),o)(function(t,n,i){e_=null,ep=null,function(t,n,i){let l=eg,o=t.__size,s=n.__size;eg="";let a=i.element;if(1===o&&1===s){let r=t.__first,i=n.__first;if(r===i)e(r,a);else{let e=eD(r),t=ek(i,null);try{a.replaceChild(t,e)}catch(n){if("object"==typeof n&&null!=n)throw Error(`${n.toString()} Parent: ${a.tagName}, new child: {tag: ${t.tagName} key: ${i}}, old child: {tag: ${e.tagName}, key: ${r}}.`);throw n}ex(r,null)}let l=ed.get(i);nb(l)&&null===e_&&(e_=l.getFormat(),ep=l.getStyle())}else{let l=eM(t,ef),u=eM(n,ed);if(l.length!==o&&r(227),u.length!==s&&r(228),0===o)0!==s&&eN(u,0,0,s-1,i);else if(0===s){if(0!==o){let e=null==i.after&&null==i.before&&null==i.element.__lexicalLineBreak;eC(l,0,o-1,e?null:a),e&&(a.textContent="")}}else!function(t,n,r,i,l){let o=r-1,s=i-1,a,u,f=l.getFirstChild(),d=0,c=0;for(;d<=o&&c<=s;){let r=t[d],i=n[c];if(r===i)f=eA(e(i,l.element)),d++,c++;else{if(void 0===u&&(u=eP(n,c)),void 0===a)a=eP(t,d);else if(!a.has(r)){d++;continue}if(!u.has(r)){f=eA(eD(r)),ex(r,l.element),d++,a.delete(r);continue}if(a.has(i)){let t=iK(el,i);t!==f&&l.withBefore(f).insertChild(t),f=eA(e(i,l.element)),d++,c++}else ek(i,l.withBefore(f)),c++}let o=ed.get(i);null!==o&&nb(o)?null===e_&&(e_=o.getFormat(),ep=o.getStyle()):rk(o)&&c<=s&&!o.isInline()&&(eg+="\n\n")}let h=d>o,g=c>s;if(h&&!g){let e=n[s+1],t=void 0===e?null:el.getElementByKey(e);eN(n,0,c,s,l.withBefore(t))}else g&&!h&&eC(t,d,o,l.element)}(l,u,o,s,i)}a.__lexicalTextContent=eg,eg=l+eg}(t,n,n.getDOMSlot(i)),null==e_||e_===n.__textFormat||em||n.setTextFormat(e_),null==ep||ep===n.__textStyle||em||n.setTextStyle(ep)})(i,l,s),rO(l)||l.isInline()||eE(i,l,s);else{let e,t=s.__lexicalTextContent;"string"==typeof t?e=t:s.__lexicalTextContent=e=i.getTextContent(),eg+=e}if((ey||l.__dir!==i.__dir)&&(eb(s,l),rO(l)&&!ey))for(let e of l.getChildren())rk(e)&&eb(iK(el,e.getKey()),e)}else{let e=l.getTextContent();if(rE(l)){let e=l.decorate(el,ei);null!==e&&eO(t,e)}eg+=e}if(!em&&rO(l)&&l.__cachedText!==eg){let e=l.getWritable();e.__cachedText=eg,l=e}return s}("root",null),el=void 0,eo=void 0,ea=void 0,eu=void 0,ef=void 0,ed=void 0,ei=void 0,ec=void 0,eh=void 0,m=t}catch(t){if(t instanceof Error&&e._onError(t),rn)throw t;return r$(e,null,o,l),z(e),e._dirtyType=2,rn=!0,ry(e,u),void(rn=!1)}finally{y.observe(o,ri),e._updating=p,n9=h,rt=g,re=_}}l._readOnly||(l._readOnly=!0);let x=e._dirtyLeaves,C=e._dirtyElements,S=e._normalizedNodes,v=e._updateTags,T=e._deferred;c&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set),function(e,t){let n,r=e._decorators,i=e._pendingDecorators||r,l=t._nodeMap;for(n in i)l.has(n)||(i===r&&(i=ic(e)),delete i[n])}(e,l);let b=s?null:iX(ij(e));if(e._editable&&null!==b&&(c||null===d||d.dirty||!d.is(f))&&null!==o&&!v.has(ne)){re=e,n9=l;try{if(null!==y&&y.disconnect(),c||null===d||d.dirty){let t=e._blockCursorElement;null!==t&&iq(t,e,o),function(e,t,n,r,i,l){var o;let s=r.anchorNode,u=r.focusNode,f=r.anchorOffset,d=r.focusOffset,c=document.activeElement;if(i.has("collaboration")&&c!==l||null!==c&&rQ(c))return;if(!nF(t))return null!==e&&r0(n,s,u)&&r.removeAllRanges();let h=t.anchor,g=t.focus,_=h.getNode(),p=g.getNode(),[y,m]=n3(n,_,h.offset),[x,C]=n3(n,p,g.offset),S=t.format,v=t.style,T=t.isCollapsed(),b=y,k=x,N=!1;if("text"===h.type?(b=r8(y),N=_.getFormat()!==S||_.getStyle()!==v):nF(e)&&"text"===e.anchor.type&&(N=!0),"text"===g.type&&(k=r8(x)),null!==b&&null!==k&&(T&&(null===e||N||nF(e)&&(e.format!==S||e.style!==v))&&(o=h.key,tL=[S,v,m,o,performance.now()]),f!==m||d!==C||s!==b||u!==k||"Range"===r.type&&T||(null!==c&&l.contains(c)||i.has(nt)||l.focus({preventScroll:!0}),"element"===h.type))){if(n5(r,b,m,k,C),!a||!t.isCollapsed()||null===l||i.has(nt)||null!==document.activeElement&&l.contains(document.activeElement)||l.focus({preventScroll:!0}),!i.has(t9)&&t.isCollapsed()&&null!==l&&l===document.activeElement){let e=nF(t)&&"element"===t.anchor.type?b.childNodes[m]||null:r.rangeCount>0?r.getRangeAt(0):null;if(null!==e){let t;if(e instanceof Text){let n=document.createRange();n.selectNode(e),t=n.getBoundingClientRect()}else t=e.getBoundingClientRect();!function(e,t,n){let r=iB(n),i=iU(r);if(null===r||null===i)return;let{top:l,bottom:o}=t,s=0,a=0,u=n;for(;null!==u;){let t=u===r.body;if(t)s=0,a=ij(e).innerHeight;else{let e=u.getBoundingClientRect();s=e.top,a=e.bottom}let n=0;if(l<s?n=-(s-l):o>a&&(n=o-a),0!==n)if(t)i.scrollBy(0,n);else{let e=u.scrollTop;u.scrollTop+=n;let t=u.scrollTop-e;l-=t,o-=t}if(t)break;u=iR(u)}}(n,t,l)}}tE=!0}}(f,d,e,b,v,o)}!function(e,t,n){let r=e._blockCursorElement;
1if(nF(n)&&n.isCollapsed()&&"element"===n.anchor.type&&t.contains(document.activeElement)){let i=n.anchor,l=i.getNode(),o=i.offset,s=!1,a=null;if(o===l.getChildrenSize())iY(l.getChildAtIndex(o-1))&&(s=!0);else{let t=l.getChildAtIndex(o);if(null!==t&&iY(t)){let n=t.getPreviousSibling();(null===n||iY(n))&&(s=!0,a=e.getElementByKey(t.__key))}}if(s){let n,i,o,s=e.getElementByKey(l.__key);return null===r&&(n=e._config.theme,(i=document.createElement("div")).contentEditable="false",i.setAttribute("data-lexical-cursor","true"),o=n.blockCursor,void 0!==o&&("string"==typeof o&&(o=n.blockCursor=l6(o)),void 0!==o&&i.classList.add(...o)),e._blockCursorElement=r=i),t.style.caretColor="transparent",null===a?s.appendChild(r):s.insertBefore(r,a)}}null!==r&&iq(r,e,t)}(e,o,d)}finally{null!==y&&y.observe(o,ri),re=_,n9=h}}null!==m&&function(e,t,n,r,i){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:r,prevEditorState:i,updateTags:n})}}}(e,m,v,x,u),nF(d)||null===d||null!==f&&f.is(d)||e.dispatchCommand(eL,void 0);let k=e._pendingDecorators;null!==k&&(e._decorators=k,e._pendingDecorators=null,rm("decorator",e,!0,k)),n=ih(t||u),n!==(i=ih(l))&&rm("textcontent",e,!0,i),rm("update",e,!0,{dirtyElements:C,dirtyLeaves:x,editorState:l,mutatedNodes:m,normalizedNodes:S,prevEditorState:t||u,tags:v}),function(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}}}(e,T),function(e){let t=e._updates;if(0!==t.length){let n=t.shift();if(n){let[t,r]=n;rC(e,t,r)}}}(e)}function rm(e,t,n,...r){let i=t._updating;t._updating=n;try{let n=Array.from(t._listeners[e]);for(let e=0;e<n.length;e++)n[e].apply(null,r)}finally{t._updating=i}}function rx(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),rh(e,o.tag)),null==s?rC(e,l,o):l()}}return i}function rC(e,t,n){let i=e._updateTags,l,o=!1,s=!1;void 0!==n&&(l=n.onUpdate,rh(e,n.tag),o=n.skipTransforms||!1,s=n.discrete||!1),l&&e._deferred.push(l);let a=e._editorState,u=e._pendingEditorState,f=!1;(null===u||u._readOnly)&&(u=e._pendingEditorState=rA(u||a),f=!0),u._flushSync=s;let d=n9,c=rt,h=re,g=e._updating;n9=u,rt=!1,e._updating=!0,re=e;let _=e._headless||null===e.getRootElement();rG=null;try{var p;let i,l;f&&(_?null!==a._selection&&(u._selection=a._selection.clone()):u._selection=(p=n&&n.event||null,i=e.getEditorState()._selection,l=iX(ij(e)),nF(i)||null==i?nX(i,l,e,p):i.clone()));let s=e._compositionKey;t(),o=rx(e,o),function(e,t){let n=t.getEditorState()._selection,r=e._selection;if(nF(r)){let e,t=r.anchor,i=r.focus;if("text"===t.type&&(e=t.getNode()).selectionTransform(n,r),"text"===i.type){let t=i.getNode();e!==t&&t.selectionTransform(n,r)}}}(u,e),0!==e._dirtyType&&(o?function(e,t){let n=t._dirtyLeaves,r=e._nodeMap;for(let e of n){let t=r.get(e);nb(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&et(t)}}(u,e):function(e,t){let n=t._dirtyLeaves,r=t._dirtyElements,i=e._nodeMap,l=io(),o=new Map,s=n,a=s.size,u=r,f=u.size;for(;a>0||f>0;){if(a>0){for(let e of(t._dirtyLeaves=new Set,s)){let r=i.get(e);nb(r)&&r.isAttached()&&r.isSimpleText()&&!r.isUnmergeable()&&et(r),void 0!==r&&rc(r,l)&&rd(t,r,o),n.add(e)}if((a=(s=t._dirtyLeaves).size)>0){rr++;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(r.set(n,s),!s)continue;let a=i.get(n);void 0!==a&&rc(a,l)&&rd(t,a,o)}a=(s=t._dirtyLeaves).size,f=(u=t._dirtyElements).size,rr++}t._dirtyLeaves=n,t._dirtyElements=r}(u,e),rx(e),function(e,t,n,r){let i=e._nodeMap,l=t._nodeMap,o=[];for(let[e]of r){let t=l.get(e);void 0!==t&&(t.isAttached()||(rk(t)&&function e(t,n,r,i,l,o){let s=t.getFirstChild();for(;null!==s;){let t=s.__key;s.__parent===n&&(rk(s)&&e(s,t,r,i,l,o),r.has(t)||o.delete(t),l.push(t)),s=s.getNextSibling()}}(t,e,i,l,o,r),i.has(e)||r.delete(e),o.push(e)))}for(let e of o)l.delete(e);for(let e of n){let t=l.get(e);void 0===t||t.isAttached()||(i.has(e)||n.delete(e),l.delete(e))}}(a,u,e._dirtyLeaves,e._dirtyElements)),s!==e._compositionKey&&(u._flushSync=!0);let d=u._selection;if(nF(d)){let e=u._nodeMap,t=d.anchor.key,n=d.focus.key;void 0!==e.get(t)&&void 0!==e.get(n)||r(19)}else nI(d)&&0===d._nodes.size&&(u._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=a,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void ry(e)}finally{n9=d,rt=c,re=h,e._updating=g,rr=0}0!==e._dirtyType||e._deferred.length>0||function(e,t){let n=t.getEditorState()._selection,r=e._selection;if(null!==r){if(r.dirty||!r.is(n))return!0}else if(null!==n)return!0;return!1}(u,e)?u._flushSync?(u._flushSync=!1,ry(e)):f&&rZ(()=>{ry(e)}):(u._flushSync=!1,f&&(i.clear(),e._deferred=[],e._pendingEditorState=null))}function rS(e,t,n){re===e&&void 0===n?t():rC(e,t,n)}class rv{element;before;after;constructor(e,t,n){this.element=e,this.before=t||null,this.after=n||null}withBefore(e){return new rv(this.element,e,this.after)}withAfter(e){return new rv(this.element,this.before,e)}withElement(e){return this.element===e?this:new rv(e,this.before,this.after)}insertChild(e){let t=this.before||this.getManagedLineBreak();return null!==t&&t.parentElement!==this.element&&r(222),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&r(223),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&r(224),this.element.replaceChild(e,t),this}getFirstChild(){let e=this.after?this.after.nextSibling:this.element.firstChild;return e===this.before||e===this.getManagedLineBreak()?null:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){null===e?this.removeManagedLineBreak():this.insertManagedLineBreak("decorator"===e&&(_||d||f))}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,r=this.before,i=document.createElement("br");if(n.insertBefore(i,r),e){let e=document.createElement("img");e.setAttribute("data-lexical-linebreak","true"),e.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",e.alt="",n.insertBefore(e,i),n.__lexicalLineBreak=e}else n.__lexicalLineBreak=i}getFirstChildOffset(){let e=0;for(let t=this.after;null!==t;t=t.previousSibling)e++;return e}resolveChildIndex(e,t,n,r){if(n===this.element){let t=this.getFirstChildOffset();return[e,Math.min(t+e.getChildrenSize(),Math.max(t,r))]}let i=rT(t,n);i.push(r);let l=rT(t,this.element),o=e.getIndexWithinParent();for(let e=0;e<l.length;e++){let t=i[e],n=l[e];
1if(void 0===t||t<n)break;if(t>n){o+=1;break}}return[e.getParentOrThrow(),o]}}function rT(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()}class rb extends t5{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){return O[this.getFormat()]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){let e=[],t=this.getFirstChild();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){let e=[],t=this.getFirstChild();for(;null!==t;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return 0===this.getChildrenSize()}isDirty(){let e=ru()._dirtyElements;return null!==e&&e.has(this.__key)}isLastChild(){let e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return null!==t&&t.is(e)}getAllTextNodes(){let e=[],t=this.getFirstChild();for(;null!==t;){if(nb(t)&&e.push(t),rk(t)){let n=t.getAllTextNodes();e.push(...n)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;rk(e);){let t=e.getFirstChild();if(null===t)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;rk(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 rk(e)&&e.getLastDescendant()||e||null}let r=t[e];return rk(r)&&r.getFirstDescendant()||r||null}getFirstChild(){let e=this.getLatest().__first;return null===e?null:is(e)}getFirstChildOrThrow(){let e=this.getFirstChild();return null===e&&r(45,this.__key),e}getLastChild(){let e=this.getLatest().__last;return null===e?null:is(e)}getLastChildOrThrow(){let e=this.getLastChild();return null===e&&r(96,this.__key),e}getChildAtIndex(e){let t,n,r=this.getChildrenSize();if(e<r/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=r-1;null!==t&&n>=e;){if(n===e)return t;t=t.getPreviousSibling(),n--}return null}getTextContent(){let e="",t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContent(),rk(i)&&r!==n-1&&!i.isInline()&&(e+="\n\n")}return e}getTextContentSize(){let e=0,t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContentSize(),rk(i)&&r!==n-1&&!i.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(""!==e){let t=M[e];return 0!=(this.getFormat()&t)}return!1}hasTextFormat(e){let t=w[e];return 0!=(this.getTextFormat()&t)}getFormatFlags(e,t){return r9(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){ro();let n=nZ(),r=e,i=t,l=this.getChildrenSize();if(!this.canBeEmpty()){if(0===e&&0===t){let e=this.getFirstChild();if(nb(e)||rk(e))return e.select(0,0)}else if((void 0===e||e===l)&&(void 0===t||t===l)){let e=this.getLastChild();if(nb(e)||rk(e))return e.select()}}void 0===r&&(r=l),void 0===i&&(i=l);let o=this.__key;return nF(n)?(n.anchor.set(o,r,"element"),n.focus.set(o,i,"element"),n.dirty=!0,n):nH(o,r,o,i,"element","element")}selectStart(){let e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){let e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){let e=this.getWritable();
1return 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?M[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){t6(this)&&r(324,this.__key,this.__type);let i=this.getChildrenSize(),l=this.getWritable();e+t<=i||r(226,String(e),String(t),String(i));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;ir(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--,ir(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=nZ();if(nF(e)){let t=new Set(a),n=new Set(s),{anchor:r,focus:i}=e;rN(r,t,n)&&n2(r,r.getNode(),this,f,u),rN(i,t,n)&&n2(i,i.getNode(),this,f,u),0!==d||this.canBeEmpty()||i$(this)||this.remove()}}return l}getDOMSlot(e){return new rv(e)}exportDOM(e){let{element:t}=super.exportDOM(e);if(i0(t)){let e=this.getIndent();e>0&&(t.style.paddingInlineStart=40*e+"px");let n=this.getDirection();n&&(t.dir=n)}return{element:t}}exportJSON(){let e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},t=this.getTextFormat(),n=this.getTextStyle();return 0===t&&""===n||i$(this)||this.getChildren().some(nb)||(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=this.getDOMSlot(e),r=n.getFirstChild();for(let e=this.getFirstChild();e;e=e.getNextSibling()){let i=t.getElementByKey(e.getKey());null!==i&&(null==r?(n.insertChild(i),r=i):r!==i&&n.replaceChild(i,r),r=r.nextSibling)}}}function rk(e){return e instanceof rb}function rN(e,t,n){let r=e.getNode();for(;r;){let e=r.__key;if(t.has(e)&&!n.has(e))return!0;r=r.getParent()}return!1}class rw extends t5{decorate(e,t){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function rE(e){return e instanceof rw}class rM extends rb{__cachedText;static getType(){return"root"}static clone(){return new rM}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){r(51)}getTextContent(){let e=this.__cachedText;return(rl()||0===ru()._dirtyType)&&null!==e?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)rk(e)||rE(e)||r(282);return super.splice(e,t,n)}static importJSON(e){return ig().updateFromJSON(e)}collapseAtStart(){return!0}}function rO(e){return e instanceof rM}function rA(e){return new rF(new Map(e._nodeMap))}function rP(){return new rF(new Map([["root",new rM]]))}function rD(e){return e instanceof rF}class rF{_nodeMap;_selection;_flushSync;_readOnly;constructor(e,t){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(e,t){return rp(t&&t.editor||null,this,e)}clone(e){let t=new rF(this._nodeMap,void 0===e?this._selection:e);return t._readOnly=!0,t}toJSON(){return rp(null,this,()=>({root:function e(t){let n=t.exportJSON(),i=t.constructor;if(n.type!==i.getType()&&r(130,i.name),rk(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)}}return n}(ig())}))}}class rL extends rb{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class rI extends rb{static getType(){return"paragraph"}static clone(e){return new rI(e.__key)}createDOM(e){let t=document.createElement("p"),n=iA(e.theme,"paragraph");return void 0!==n&&t.classList.add(...n),t}updateDOM(e,t,n){return!1}static importDOM(){return{p:e=>({conversion:rK,priority:0})}}exportDOM(e){let{element:t}=super.exportDOM(e);if(i0(t)){this.isEmpty()&&t.append(document.createElement("br"));let e=this.getFormatType();e&&(t.style.textAlign=e)}return{element:t}}static importJSON(e){return rR().updateFromJSON(e)}exportJSON(){let e=super.exportJSON();if(void 0===e.textFormat||void 0===e.textStyle){let t=this.getChildren().find(nb);t?(e.textFormat=t.getFormat(),e.textStyle=t.getStyle()):(e.textFormat=this.getTextFormat(),e.textStyle=this.getTextStyle())}return e}insertNewAfter(e,t){let n=rR();n.setTextFormat(e.format),n.setTextStyle(e.style);let r=this.getDirection();return n.setDirection(r),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,t),n}collapseAtStart(){let e=this.getChildren();if(0===e.length||nb(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 rK(e){let t=rR();if(e.style&&(t.setFormat(e.style.textAlign),ln(e,t)),""===t.getFormatType()){let n=e.getAttribute("align");n&&n&&n in M&&t.setFormat(n)}return{node:t}}function rR(){return iH(new rI)}function rB(e){return e instanceof rI}let rz=0,rW=1,rU=2,rj=3,rJ=4;function r$(e,t,n,r){let i=e._keyToDOMMap;i.clear(),e._editorState=rP(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null;let l=e._observer;null!==l&&(l.disconnect(),e._observer=null),null!==t&&(t.textContent=""),null!==n&&(n.textContent="",i.set("root",n))}function rV(e){var t,n;let r,i,l,o,s=e||{},a=re,u=s.theme||{},f=void 0===e?a:s.parentEditor||null,d=s.disableEvents||!1,c=rP(),h=s.namespace||(null!==f?f._config.namespace:iC()),g=s.editorState,_=[rM,n_,ni,nN,rI,rL,...s.nodes||[]],{onError:p,html:y}=s,m=void 0===s.editable||s.editable;if(void 0===e&&null!==a)r=a._nodes;else{r=new Map;for(let e=0;e<_.length;e++){let t=_[e],n=null,i=null;if("function"!=typeof t){let e=t;t=e.replace,n=e.with,i=e.withKlass||null}ll(t);let l=t.getType(),o=function(e){let t=new Set,n=new Set,r=e;for(;r;){let{ownNodeConfig:e}=ll(r),i=r.transform;if(!n.has(i)){n.add(i);let e=r.transform();e&&t.add(e)}if(e){let n=e.$transform;n&&t.add(n),r=e.extends}else{let e=Object.getPrototypeOf(r);r=e.prototype instanceof t5&&e!==t5?e:void 0}}return t}(t);r.set(l,{exportDOM:y&&y.export?y.export.get(t):void 0,klass:t,replace:n,replaceWithKlass:i,sharedNodeState:function(e){let t=new Map,n=new Set;for(let r="function"==typeof e?e:e.replace;r.prototype&&void 0!==r.prototype.getType;r=Object.getPrototypeOf(r)){let{ownNodeConfig:e}=ll(r);if(e&&e.stateConfigs)for(let r of e.stateConfigs){let e;"stateConfig"in r?(e=r.stateConfig,r.flat&&n.add(e.key)):e=r,t.set(e.key,e)}}return{flatKeys:n,sharedConfigMap:t}}(_[e]),transforms:o})}}let x=new rH(c,f,r,{disableEvents:d,namespace:h,theme:u},p||console.error,(t=r,n=y?y.import:void 0,i=new Map,l=new Set,o=e=>{Object.keys(e).forEach(t=>{let n=i.get(t);void 0===n&&(n=[],i.set(t,n)),n.push(e[t])})}
1,t.forEach(e=>{let t=e.klass.importDOM;if(null==t||l.has(t))return;l.add(t);let n=t.call(e.klass);null!==n&&o(n)}),n&&o(n),i),m,e);return void 0!==g&&(x._pendingEditorState=g,x._dirtyType=2),x.registerCommand(eR,tU,rz),x.registerCommand(eB,tj,rz),x.registerCommand(ez,tJ,rz),x.registerCommand(eW,t$,rz),x.registerCommand(eQ,tH,rz),x}class rH{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_htmlConversions;_window;_editable;_blockCursorElement;_createEditorArgs;constructor(e,t,n,r,i,l,o,s){this._createEditorArgs=s,this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=iC(),this._onError=i,this._htmlConversions=l,this._editable=o,this._headless=null!==t&&t._headless,this._window=null,this._blockCursorElement=null}isComposing(){return null!=this._compositionKey}registerUpdateListener(e){let t=this._listeners.update;return t.add(e),()=>{t.delete(e)}}registerEditableListener(e){let t=this._listeners.editable;return t.add(e),()=>{t.delete(e)}}registerDecoratorListener(e){let t=this._listeners.decorator;return t.add(e),()=>{t.delete(e)}}registerTextContentListener(e){let t=this._listeners.textcontent;return t.add(e),()=>{t.delete(e)}}registerRootListener(e){let t=this._listeners.root;return e(this._rootElement,null),t.add(e),()=>{e(null,this._rootElement),t.delete(e)}}registerCommand(e,t,n){void 0===n&&r(35);let i=this._commands;i.has(e)||i.set(e,[new Set,new Set,new Set,new Set,new Set]);let l=i.get(e);void 0===l&&r(36,String(e));let o=l[n];return o.add(t),()=>{o.delete(t),l.every(e=>0===e.size)&&i.delete(e)}}registerMutationListener(e,t,n){let r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,i=this._listeners.mutation,l=i.get(t);void 0===l&&(l=new Set,i.set(t,l)),l.add(r);let o=n&&n.skipInitialization;return void 0!==o&&o||this.initializeMutationListener(t,r),()=>{l.delete(r),0===l.size&&i.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,r=i9(n).get(t.getType());if(!r)return;let i=new Map;for(let e of r.keys())i.set(e,"created");i.size>0&&e(i,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,t){let n=this.getRegisteredNode(e);return n.transforms.add(t),n}registerNodeTransform(e,t){let n=this.registerNodeTransformToKlass(e,t),r=[n],i=n.replaceWithKlass;if(null!=i){let e=this.registerNodeTransformToKlass(i,t);r.push(e)}return function(e,t){let n=i9(e.getEditorState()),r=[];for(let e of t){let t=n.get(e);t&&r.push(t)}0!==r.length&&e.update(()=>{for(let e of r)for(let t of e.keys()){let e=is(t);e&&e.markDirty()}},null===e._pendingEditorState?{tag:t7}:void 0)}(this,r.map(e=>e.klass.getType())),()=>{r.forEach(e=>e.transforms.delete(t))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return iI(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=iA(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=e,r$(this,t,e,i),null!==t&&(this._config.disableEvents||function(e){let t=tN.get(e);if(void 0===t)return tQ();let n=tw.get(t);if(void 0===n)return tQ();let i=n-1;i>=0||r(164),tN.delete(e),tw.set(t,i),0===i&&t.removeEventListener("selectionchange",tq);let l=r6(e);r1(l)?(!function(e){if(null!==e._parentEditor){let t=ix(e),n=t[t.length-1]._key;tY.get(n)===e&&tY.delete(n)}else tY.delete(e._key)}(l),e.__lexicalEditor=null):l&&r(198);let o=tG(e);for(let e=0;e<o.length;e++)o[e]();e.__lexicalEventHandles=[]}(t),null!=n&&t.classList.remove(...n)),null!==e){let t=iU(e),r=e.style;r.userSelect="text",r.whiteSpace="pre-wrap",r.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=t,this._dirtyType=2,z(this),this._updateTags.add(t7),ry(this),this._config.disableEvents||function(e,t){let n=e.ownerDocument;tN.set(e,n);
1let r=tw.get(n)??0;r<1&&n.addEventListener("selectionchange",tq),tw.set(n,r+1),e.__lexicalEditor=t;let i=tG(e);for(let n=0;n<tS.length;n++){let[r,l]=tS[n],o="function"==typeof l?e=>{tZ(e)||(tX(e),(t.isEditable()||"click"===r)&&l(e,t))}:e=>{if(tZ(e))return;tX(e);let n=t.isEditable();switch(r){case"cut":return n&&iI(t,td,e);case"copy":return iI(t,tf,e);case"paste":return n&&iI(t,eV,e);case"dragstart":return n&&iI(t,ts,e);case"dragover":return n&&iI(t,ta,e);case"dragend":return n&&iI(t,tu,e);case"focus":return n&&iI(t,ty,e);case"blur":return n&&iI(t,tm,e);case"drop":return n&&iI(t,tl,e)}};e.addEventListener(r,o),i.push(()=>{e.removeEventListener(r,o)})}}(e,this),null!=n&&e.classList.add(...n)}else this._window=null,this._updateTags.add(t7),ry(this);rm("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=rA(e))._selection=e._selection?e._selection.clone():null),B(this);let i=this._pendingEditorState,l=this._updateTags,o=void 0!==t?t.tag:null;null===i||i.isEmpty()||(null!=o&&l.add(o),ry(this)),this._pendingEditorState=n,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,null!=o&&l.add(o),this._updating||ry(this)}parseEditorState(e,t){return function(e,t,n){let r=rP(),i=n9,l=rt,o=re,s=t._dirtyElements,a=t._dirtyLeaves,u=t._cloneNotNeeded,f=t._dirtyType;t._dirtyElements=new Map,t._dirtyLeaves=new Set,t._cloneNotNeeded=new Set,t._dirtyType=0,n9=r,rt=!1,re=t,rG=null;try{let i=t._nodes;r_(e.root,i),n&&n(),r._readOnly=!0}catch(e){e instanceof Error&&t._onError(e)}finally{t._dirtyElements=s,t._dirtyLeaves=a,t._cloneNotNeeded=u,t._dirtyType=f,n9=i,rt=l,re=o}return r}("string"==typeof e?JSON.parse(e):e,this,t)}read(e){return ry(this),this.getEditorState().read(e,{editor:this})}update(e,t){this._updating?this._updates.push([e,t]):rC(this,e,t)}focus(e,t={}){let n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),rS(this,()=>{var r;let i=nZ(),l=ig();null!==i?i.dirty||ip(i.clone()):0!==l.getChildrenSize()&&("rootStart"===t.defaultSelection?l.selectStart():l.selectEnd()),iz("focus"),r=()=>{n.removeAttribute("autocapitalize"),e&&e()},ro(),ru()._deferred.push(r)}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){let e=this._rootElement;null!==e&&e.blur();let t=iX(this._window);null!==t&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,rm("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}rH.version="0.41.0+prod.esm";let rG=null,rY=1;function rq(e,t){let n=rX(e,t);return void 0===n&&r(30,t),n}function rX(e,t){return e._nodes.get(t)}let rZ="function"==typeof queueMicrotask?queueMicrotask:e=>{Promise.resolve().then(e)};function rQ(e){let t=document.activeElement;if(!i0(t))return!1;let n=t.nodeName;return rE(id(e))&&("INPUT"===n||"TEXTAREA"===n||"true"===t.contentEditable&&null==r6(t))}function r0(e,t,n){let r=e.getRootElement();try{return null!==r&&r.contains(t)&&r.contains(n)&&null!==t&&!rQ(t)&&r2(t)===e}catch(e){return!1}}function r1(e){return e instanceof rH}function r2(e){let t=e;for(;null!=t;){let e=r6(t);if(r1(e))return e;t=iR(t)}return null}function r6(e){return e?e.__lexicalEditor:null}function r5(e){return nE(e)||e.isToken()}function r3(e){return r5(e)||e.isSegmented()}function r4(e){return i1(e)&&3===e.nodeType}function r7(e){return i1(e)&&9===e.nodeType}function r8(e){let t=e;for(;null!=t;){if(r4(t))return t;t=t.firstChild}return null}function r9(e,t,n){let r=w[t];if(null!==n&&(e&r)==(n&r))return e;let i=e^r;return"subscript"===t?i&=~w.superscript:"superscript"===t?i&=~w.subscript:"lowercase"===t?(i&=~w.uppercase,i&=~w.capitalize):"uppercase"===t?(i&=~w.lowercase,i&=~w.capitalize):"capitalize"===t&&(i&=~w.lowercase,i&=~w.uppercase),i}function ie(e){return nb(e)||ns(e)||rE(e)}function it(e,t){let n,r=(n=rG,rG=null,n);if(null!=(t=t||r&&r.__key))return void(e.__key=t);ro(),rs();let i=ru(),l=ra(),o=""+rY++;l._nodeMap.set(o,e),rk(e)?i._dirtyElements.set(o,!0):i._dirtyLeaves.add(o),i._cloneNotNeeded.add(o),i._dirtyType=1,e.__key=o}function ir(e){let t=e.getParent();if(null!==t){let n=e.getWritable(),r=t.getWritable(),i=e.getPreviousSibling(),l=e.getNextSibling(),o=null!==l?l.__key:null,
1s=null!==i?i.__key:null,a=null!==i?i.getWritable():null,u=null!==l?l.getWritable():null;null===i&&(r.__first=o),null===l&&(r.__last=s),null!==a&&(a.__next=o),null!==u&&(u.__prev=s),n.__prev=null,n.__next=null,n.__parent=null,r.__size--}}function ii(e){rs(),t6(e)&&r(323,e.__key,e.__type);let t=e.getLatest(),n=t.__parent,i=ra(),l=ru(),o=i._nodeMap,s=l._dirtyElements;null!==n&&function(e,t,n){let r=e;for(;null!==r;){if(n.has(r))return;let e=t.get(r);if(void 0===e)break;n.set(r,!1),r=e.__parent}}(n,o,s);let a=t.__key;l._dirtyType=1,rk(e)?s.set(a,!0):l._dirtyLeaves.add(a)}function il(e){ro();let t=ru(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,null!==n){let e=is(n);null!==e&&e.getWritable()}if(null!==e){let t=is(e);null!==t&&t.getWritable()}}}function io(){return rl()?null:ru()._compositionKey}function is(e,t){let n=(t||ra())._nodeMap.get(e);return void 0===n?null:n}function ia(e,t){let n=iu(e,ru());return void 0!==n?is(n,t):null}function iu(e,t){return e[`__lexicalKey_${t._key}`]}function id(e,t){let n=e;for(;null!=n;){let e=ia(n,t);if(null!==e)return e;n=iR(n)}return null}function ic(e){let t=Object.assign({},e._decorators);return e._pendingDecorators=t,t}function ih(e){return e.read(()=>ig().getTextContent())}function ig(){return i_(ra())}function i_(e){return e._nodeMap.get("root")}function ip(e){ro();let t=ra();null!==e&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function iy(e){let t=ru(),n=function(e,t){let n=e;for(;null!=n;){let e=iu(n,t);if(void 0!==e)return e;n=iR(n)}return null}(e,t);return null===n?e===t.getRootElement()?is("root"):null:is(n)}function im(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function ix(e){let t=[],n=e;for(;null!==n;)t.push(n),n=n._parentEditor;return t}function iC(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function iS(e){return r4(e)?e.nodeValue:null}function iv(e,t,n){let r=iX(ij(t));if(null===r)return;let i=r.anchorNode,{anchorOffset:l,focusOffset:o}=r;if(null!==i){let t=iS(i),r=id(i);if(null!==t&&nb(r)){if((t===T||t===b)&&n){let e=n.length;t=n,l=e,o=e}null!==t&&iT(r,t,l,o,e)}}}function iT(e,t,n,r,i){let l=e;if(l.isAttached()&&(i||!l.isDirty())){let o=l.isComposing(),s=t;if((o||i)&&(t.endsWith(T)&&(s=t.slice(0,-T.length)),i)){let e;for(;-1!==(e=s.indexOf(b));)s=s.slice(0,e)+s.slice(e+b.length),null!==n&&n>e&&(n=Math.max(e,n-b.length)),null!==r&&r>e&&(r=Math.max(e,r-b.length))}let a=l.getTextContent();if(i||s!==a){if(""===s){if(il(null),f||d||_)l.remove();else{let e=ru();setTimeout(()=>{e.update(()=>{l.isAttached()&&l.remove()})},20)}return}let t=l.getParent(),i=nQ(),a=l.getTextContentSize(),u=io(),c=l.getKey();if(l.isToken()||null!==u&&c===u&&!o||nF(i)&&(null!==t&&!t.canInsertTextBefore()&&0===i.anchor.offset||i.anchor.key===e.__key&&0===i.anchor.offset&&!l.canInsertTextBefore()&&!o||i.focus.key===e.__key&&i.focus.offset===a&&!l.canInsertTextAfter()&&!o))return void l.markDirty();let h=nZ();if(!nF(h)||null===n||null===r)return void ib(l,s,h);if(h.setTextNodeRange(l,n,l,r),l.isSegmented()){let e=nT(l.getTextContent());l.replace(e),l=e}ib(l,s,h)}}}function ib(e,t,n){if(e.setTextContent(t),nF(n)){let t=e.getKey();for(let r of["anchor","focus"]){let i=n[r];"text"===i.type&&i.key===t&&(i.offset=lT(e,i.offset,"clamp"))}}}function ik(e,t,n){let r=t[n]||!1;return"any"===r||r===e[n]}function iN(e,t,n){if(!(ik(e,n,"altKey")&&ik(e,n,"ctrlKey")&&ik(e,n,"shiftKey")&&ik(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;let r="Key"+t.toUpperCase();return e.code===r}let iw={ctrlKey:!s,metaKey:s},iE={altKey:s,ctrlKey:!s};function iM(e){return"Backspace"===e.key}function iO(e){let t=ig();if(nF(e)){let t=e.anchor,n=e.focus,r=t.getNode().getTopLevelElementOrThrow().getParentOrThrow();return t.set(r.getKey(),0,"element"),n.set(r.getKey(),r.getChildrenSize(),"element"),en(e),e}{let e=t.select(0,t.getChildrenSize());return ip(en(e)),e}}function iA(e,t){void 0===e.__lexicalClassNameCache&&(e.__lexicalClassNameCache={});let n=e.__lexicalClassNameCache,r=n[t];if(void 0!==r)return r;let i=e[t];if("string"==typeof i){let e=l6(i);return n[t]=e,e}return i}function iP(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);
1void 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 iD(e,t,n){let r=e.getParent(),i=n,l=e;return null!==r&&(t&&0===n?(i=l.getIndexWithinParent(),l=r):t||n!==l.getChildrenSize()||(i=l.getIndexWithinParent()+1,l=r)),l.getChildAtIndex(t?i-1:i)}function iF(e,t){let n=e.offset;if("element"===e.type)return iD(e.getNode(),t,n);{let r=e.getNode();if(t&&0===n||!t&&n===r.getTextContentSize()){let e=t?r.getPreviousSibling():r.getNextSibling();return null===e?iD(r.getParentOrThrow(),t,r.getIndexWithinParent()+ +!t):e}}return null}function iL(e){let t=ij(e).event,n=t&&t.inputType;return"insertFromPaste"===n||"insertFromPasteAsQuotation"===n}function iI(e,t,n){return function(e,t,n){let r=ix(e);for(let i=4;i>=0;i--)for(let l=0;l<r.length;l++){let o=r[l],s=o._commands.get(t);if(void 0!==s){let t=s[i];if(void 0!==t){let r=Array.from(t),i=r.length,l=!1;if(rS(o,()=>{for(let t=0;t<i;t++)if(r[t](n,e))return void(l=!0)}),l)return l}}}return!1}(e,t,n)}function iK(e,t){let n=e._keyToDOMMap.get(t);return void 0===n&&r(75,t),n}function iR(e){let t=e.assignedSlot||e.parentElement;return i2(t)?t.host:t}function iB(e){return r7(e)?e:i0(e)?e.ownerDocument:null}function iz(e){ro(),ru()._updateTags.add(e)}function iW(e,t){let n=e.getParent();for(;null!==n;){if(n.is(t))return!0;n=n.getParent()}return!1}function iU(e){let t=iB(e);return t?t.defaultView:null}function ij(e){let t=e._window;return null===t&&r(78),t}function iJ(e){return rk(e)&&e.isInline()||rE(e)&&e.isInline()}function i$(e){return rO(e)||rk(e)&&e.isShadowRoot()}function iV(e){let t=e.constructor.clone(e);return it(t,null),t.afterCloneFrom(e),t}function iH(e){let t=ru(),n=e.getType(),i=rX(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 iG(e,t){!rO(e.getParent())||rk(t)||rE(t)||r(99)}function iY(e){return(rE(e)||rk(e)&&!e.canBeEmpty())&&!e.isInline()}function iq(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;let r=e.parentElement;null!==r&&r.removeChild(e)}function iX(e){return l?(e||window).getSelection():null}function iZ(e){let t=iU(e);return t?t.getSelection():null}function iQ(e){return i0(e)&&"A"===e.tagName}function i0(e){return i1(e)&&1===e.nodeType}function i1(e){return"object"==typeof e&&null!==e&&"nodeType"in e&&"number"==typeof e.nodeType}function i2(e){return i1(e)&&11===e.nodeType}function i6(e){let t=RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return null!==e.nodeName.match(t)}function i5(e){let t=RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return null!==e.nodeName.match(t)}function i3(e){if(rE(e)&&!e.isInline())return!0;if(!rk(e)||i$(e))return!1;let t=e.getFirstChild(),n=null===t||ns(t)||nb(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}function i4(){return ru()}let i7=new WeakMap,i8=new Map;function i9(e){if(!e._readOnly&&e.isEmpty())return i8;e._readOnly||r(192);let t=i7.get(e);return t||(t=function(e){let t=new Map;for(let[n,r]of e._nodeMap){let e=r.__type,i=t.get(e);i||(i=new Map,t.set(e,i)),i.set(n,r)}return t}(e),i7.set(e,t)),t}function le(e){let t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function lt(e){var t;return(t=le(e))[t2]=!0,t}function ln(e,t){let n=Math.round((parseInt(e.style.paddingInlineStart,10)||0)/40);t.setIndent(n)}function lr(e){e.__lexicalUnmanaged=!0}function li(e,t){return Object.prototype.hasOwnProperty.call(e,t)&&e[t]!==t5[t]}function ll(e){let t=D in e.prototype?e.prototype[D]():void 0,n=function(e){if(!(e===t5||e.prototype instanceof t5)){let t="<unknown>",n="<unknown>";try{t=e.getType()}catch(e){}try{rH.version&&(n=JSON.parse(rH.version))}catch(e){}r(290,e.name,t,n)}return e===rw||e===rb||e===t5}(e),i=!n&&li(e,"getType")?e.getType():void 0,l,o=i;if(t)if(i)l=t[i];else for(let[e,n]of Object.entries(t))o=e,l=n;if(!n&&o&&(li(e,"getType")||(e.getType=()=>o),li(e,"clone")||(e.clone=t=>(rG=t,new e)),li(e,"importJSON")||(e.importJSON=l&&l.$importJSON||(t=>(new e).updateFromJSON(t))),!li(e,"importDOM")&&l)){let{importDOM:t}=l;t&&(e.importDOM=()=>t)}return{ownNodeConfig:l,ownNodeType:o}}function lo(e){let t=i4();return ro(),new(t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e))).klass}let ls=(e,t)=>{let n=e;for(;null!=n&&!rO(n);){if(t(n))return n;n=n.getParent()}return null},la={next:"previous",previous:"next"};class lu{origin;constructor(e){this.origin=e}[Symbol.iterator](){return lP({hasNext:lp,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return lS(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return lS(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=lS(e,this.direction)}for(let e of s.values())e.remove();return this}}class lf extends lu{type="child";getLatest(){let e=this.origin.getLatest();return e===this.origin?this:lb(e,this.direction)}getParentCaret(e="root"){return lS(lc(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=la[this.direction];return lS(this.getNodeAtCaret(),e)||lb(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(e){return e instanceof lf&&this.direction===e.direction&&this.origin.is(e.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}}let ld={root:rO,shadowRoot:i$};function lc(e,t="root"){return ld[t](e)?null:e}class lh extends lu{type="sibling";getLatest(){let e=this.origin.getLatest();return e===this.origin?this:lS(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return rk(this.origin)?lb(this.origin,this.direction):null}getParentCaret(e="root"){return lS(lc(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=la[this.direction];return lS(this.getNodeAtCaret(),e)||lb(this.origin.getParentOrThrow(),e)}isSamePointCaret(e){return e instanceof lh&&this.direction===e.direction&&this.origin.is(e.origin)}isSameNodeCaret(e){return(e instanceof lh||e instanceof lg)&&this.direction===e.direction&&this.origin.is(e.origin)}}class lg extends lu{type="text";offset;constructor(e,t){super(e),this.offset=t}getLatest(){let e=this.origin.getLatest();return e===this.origin?this:lv(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e="root"){return lS(lc(this.getParentAtCaret(),e),this.direction)}getFlipped(){return lv(this.origin,la[this.direction],this.offset)}isSamePointCaret(e){return e instanceof lg&&this.direction===e.direction&&this.origin.is(e.origin)&&this.offset===e.offset}isSameNodeCaret(e){return(e instanceof lh||e instanceof lg)&&this.direction===e.direction&&this.origin.is(e.origin)}getSiblingCaret(){return lS(this.origin,this.direction)}}function l_(e){return e instanceof lg}function lp(e){return e instanceof lh}function ly(e){return e instanceof lf}let lm={next:class extends lg{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends lg{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},lx={next:class extends lh{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends lh{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},lC={next:class extends lf{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends lf{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function lS(e,t){return e?new lx[t](e):null}function lv(e,t,n){return e?new lm[t](e,lT(e,n)):null}function lT(e,t,n="error"){let r=e.getTextContentSize(),l="next"===t?r:"previous"===t?0:t;return(l<0||l>
1r)&&("clamp"!==n&&i(284,String(t),String(r),e.getKey()),l=l<0?0:r),l}function lb(e,t){return rk(e)?new lC[t](e):null}function lk(e){return e&&e.getChildCaret()||e}function lN(e){return e&&lk(e.getAdjacentCaret())}class lw{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 lw(e,t,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){let e=e=>{let t=this[e].getLatest();return l_(t)?function(e,t){let{direction:n,origin:r}=e;return new lE(e,lT(r,"focus"===t?la[n]:n)-e.offset)}(t,e):null},t=e("anchor"),n=e("focus");if(t&&n){let{caret:e}=t,{caret:r}=n;if(e.isSameNodeCaret(r))return[new lE(e,r.offset-e.offset),null]}return[t,n]}iterNodeCarets(e="root"){let t=l_(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),r=l_(n),i=t=>t.isSameNodeCaret(n)?null:lN(t)||t.getParentCaret(e);return lP({hasNext:e=>null!==e&&!(r&&n.isSameNodeCaret(e)),initial:t.isSameNodeCaret(n)?null:i(t),map:e=>e,step:i})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class lE{type="slice";caret;distance;constructor(e,t){this.caret=e,this.distance=t}getSliceIndices(){let{distance:e,caret:{offset:t}}=this,n=t+e;return n<t?[n,t]:[t,n]}getTextContent(){let[e,t]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,t)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){let{caret:{origin:e,direction:t}}=this,[n,r]=this.getSliceIndices(),i=e.getTextContent();return lv(e.setTextContent(i.slice(0,n)+i.slice(r)),t,n)}}function lM(e){return lA(e,lS(ig(),e.direction))}function lO(e){return lA(e,e)}function lA(e,t){return e.direction!==t.direction&&r(265),new lw(e,t,e.direction)}function lP(e){let{initial:t,hasNext:n,step:r,map:i}=e,l=t;return{[Symbol.iterator](){return this},next(){if(!n(l))return{done:!0,value:void 0};let e={done:!1,value:i(l)};return l=r(l),e}}}function lD(e,t){let n=lI(e.origin,t.origin);switch(null===n&&r(275,e.origin.getKey(),t.origin.getKey()),n.type){case"same":{let n="text"===e.type,r="text"===t.type;return n&&r?Math.sign(e.offset-t.offset):e.type===t.type?0:n?-1:r?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 lF(n)}}function lF(e){let{a:t,b:n}=e,r=t.__key,i=n.__key,l=t,o=n;for(;l&&o;l=l.getNextSibling(),o=o.getNextSibling()){if(l.__key===i)return -1;if(o.__key===r)return 1}return null===l?1:-1}function lL(e){return rk(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function lI(e,t){if(e.is(t))return{commonAncestor:e,type:"same"};let n=new Map;for(let[t,r]=lL(e);t;r=t,t=t.getParent())n.set(t,r);for(let[i,l]=lL(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"}):((rk(o)||o.is(e))&&(rk(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 lK(e,t){var n;let i,{type:l,key:o,offset:s}=e,a=(null===(i=is(n=e.key))&&r(63,n),i);return"text"===l?(nb(a)||r(266,a.getType(),o),lv(a,t,s)):(rk(a)||r(267,a.getType(),o),function(e,t,n){let r=lb(e,"next");for(let e=0;e<t;e++){let e=r.getAdjacentCaret();if(null===e)break;r=e}return lH(r,n)}(a,e.offset,t))}function lR(e,t){let{origin:n,direction:i}=t,l="next"===i;l_(t)?e.set(n.getKey(),t.offset,"text"):lp(t)?nb(n)?e.set(n.getKey(),lT(n,i),"text"):e.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+ +!!l,"element"):(ly(t)&&rk(n)||r(268),e.set(n.getKey(),l?0:n.getChildrenSize(),"element"))}function lB(e){let t=nZ(),n=nF(t)?t:nG();return lz(n,e),ip(n),n}function lz(e,t){lR(e.anchor,t.anchor),lR(e.focus,t.focus)}function lW(e){let{anchor:t,focus:n}=e,r=lK(t,"next"),i=lK(n,"next"),l=0>=lD(r,i)?"next":"previous";return lA(lH(r,l),lH(i,l))}function lU(e){let{direction:t,origin:n}=e,r=lS(n,la[t]).getNodeAtCaret();return r?lS(r,t):lb(n.getParentOrThrow(),t)}function lj(e,t="root"){let n=[e];for(let r=ly(e)?e.getParentCaret(t):e.getSiblingCaret();null!==r;
1r=r.getParentCaret(t))n.push(lU(r));return n}function lJ(e){return!!e&&e.origin.isAttached()}function l$(e){let t=function(e){let t=e;for(;ly(t);){let e=lN(t);if(!ly(e))break;t=e}return t}(e.getLatest()),{direction:n}=t;if(nb(t.origin))return l_(t)?t:lv(t.origin,n,n);let r=t.getAdjacentCaret();return lp(r)&&nb(r.origin)?lv(r.origin,n,la[n]):t}function lV(e){return l_(e)&&e.offset!==lT(e.origin,e.direction)}function lH(e,t){return e.direction===t?e:e.getFlipped()}function lG(e,t){return e.direction===t?e:lA(lH(e.focus,t),lH(e.anchor,t))}function lY(e,t="root"){let n=0,r=e,i=lN(r);for(;null===i;){if(n--,!(i=r.getParentCaret(t)))return null;i=lN(r=i)}return i&&[i,n]}function lq(e){let{origin:t,offset:n,direction:i}=e;if(n===lT(t,i))return e.getSiblingCaret();if(n===lT(t,la[i]))return lU(e.getSiblingCaret());let[l]=t.splitText(n);return nb(l)||r(281),lH(lS(l,"next"),i)}function lX(e,t){return!0}function lZ(e,{$copyElementNode:t=iV,$splitTextPointCaretNext:n=lq,rootMode:r="shadowRoot",$shouldSplit:i=lX}={}){if(l_(e))return n(e);let l=e.getParentCaret(r);if(l){let{origin:n}=l;if(ly(e)&&(!n.canBeEmpty()||!i(n,"first")))return lU(l);let r=function(e){let t=[];for(let n=e.getAdjacentCaret();n;n=n.getAdjacentCaret())t.push(n.origin);return t}(e);(r.length>0||n.canBeEmpty()&&i(n,"last"))&&l.insert(t(n).splice(0,0,r))}return l}function lQ(e){return e}function l0(...e){return e}function l1(e){return e}function l2(e,t){if(!t||e===t)return e;for(let n in t)if(e[n]!==t[n])return{...e,...t};return e}function l6(...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 l5(e,...t){let n=l6(...t);n.length>0&&e.classList.add(...n)}function l3(e,...t){let n=l6(...t);n.length>0&&e.classList.remove(...n)}function l4(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}}}]);
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.