@nebula.js/sn-text 1.2.7 → 1.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/sn-text.systemjs.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/sn-text v1.2.
|
|
2
|
+
* @nebula.js/sn-text v1.2.8
|
|
3
3
|
* Copyright (c) 2025 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
System.register(["@nebula.js/stardust","react-dom","react"],(function(e){"use strict";var t,n,r,o,i,l,a,s,u,c,d,p,f,m,g,h,v,b,y,x,_,E,C,S,w,k,T;return{setters:[function(e){t=e.useMemo,n=e.useEffect,r=e.useElement,o=e.useStaleLayout,i=e.useModel,l=e.useInteractionState,a=e.useEmitter,s=e.useTranslator,u=e.useState,c=e.useTheme,d=e.usePromise,p=e.useImperativeHandle},function(e){f=e.default,m=e},function(e){g=e.createContext,h=e.default,v=e,b=e.forwardRef,y=e.useContext,x=e.Children,_=e.isValidElement,E=e.cloneElement,C=e.useState,S=e.useEffect,w=e.useRef,k=e.useCallback,T=e.useMemo}],execute:function(){e("default",(function(e){const t=new QE,{flags:f}=e,m=[];return{qae:{properties:A,data:N(t)},component(){const e=r(),g=P(e),h=o(),v=i(),b=l(),y=a(),x=s(),[_,E]=u(!1),[C,S]=u(void 0),[w,k]=u(1),T=c(),[A,N]=u(!1),[R,O]=u(null);d((()=>new Promise((e=>{var t;const n={id:null==h||null===(t=h.qInfo)||void 0===t?void 0:t.qId,resolve:e};m.push(n)}))),[]);const M=e=>{e||k(0),v_(h)||(!0===e&&N(!0),E(e),y.emit("njs-internal-edit-change",e))};n((()=>{const e=e=>{!async function(e,t){!async function(e,t){try{if(e&&t){const n=t(await e.getProperties());await e.setProperties(n)}}catch(e){console.error(e)}}(e,(e=>{const{qHyperCubeDef:n}=e;if(n){var r;const e=null===(r=n.qMeasures)||void 0===r?void 0:r.filter((e=>!(null==t?void 0:t.find((t=>{var n;return t===(null==e||null===(n=e.qDef)||void 0===n?void 0:n.cId)})))));n.qMeasures=e,n.qInterColumnSortOrder=[]}return{...e,qHyperCubeDef:n}}))}(v,e)};return y.on("onNodeDestroyed",e),()=>{y.removeListener("onNodeDestroyed",e)}}),[y,v]),n((()=>{2===w&&b.edit&&b.select&&M(!0)}),[w,b]),n((()=>{h&&void 0===C&&(S(h.text||null),O(null==h?void 0:h.text))}),[h,C]),n((()=>{const n=()=>{b.edit&&b.select&&k((e=>e+1))},r=t=>{const n=document.getElementById(WE(v));e.contains(t.target)||null!=n&&n.contains(t.target)||(e=>{const t=document.getElementsByClassName("tekPopperMenu"),n=document.getElementById("tekTableMenu");if(null!=n&&n.contains(e))return!0;for(let n=0;n<t.length;n++)if(t[n].contains(e))return!0;return!1})(t.target)||M(!1)};if(!b.edit||!b.select){var o;M(!1);const e=(null==v?void 0:v.id)&&(null===(o=t.getSnTexts()[v.id])||void 0===o?void 0:o.propertiesHaveBeenModified);(A||e)&&(y.emit("saveDocument"),t.setPropertiesHaveBeenModified(v.id,!1))}return e.addEventListener("click",n),document.addEventListener("mousedown",r),()=>{e.removeEventListener("click",n),document.removeEventListener("mousedown",r)}}),[e,b,v]),n((()=>{YE({rootElement:g,layout:h,model:v,element:e,edit:_,initialData:C,emitter:y,lang:x.language(),flags:f,theme:T,interactionState:b,readyToPrint:m})}),[h,g,v,e,_,e,C,y,f,T,b]),n((()=>{!_&&A&&y.emit("saveDocument")}),[_,y,A]),n((()=>{if(h){const e=h;e.text&&e.text!==R&&(O(e.text),y.emit("reloadData",e.text))}}),[h,R,y]),p((()=>({updateActiveState(e){e?t.setSelectedModelId(v.id):v.id===t.getSelectedModelId()&&t.setSelectedModelId(void 0)}})),[])},ext:{definition:{type:"items",component:"accordion",items:{data:UE,settings:VE}},exportProperties:null,importProperties:null,support:{snapshot:!0,export:!0,sharing:!0,exportData:!0,viewData:!1}}}}));const A={version:"1.2.7",showTitles:!1,text:null,fontsUsed:[],components:[],qHyperCubeDef:{qDimensions:[],qMeasures:[],qSuppressZero:!1,qSuppressMissing:!0,qInitialDataFetch:[{qWidth:500,qHeight:10}]},disableNavMenu:!0,showDetails:!1},N=e=>{const t=()=>{e.setPropertiesHaveBeenModifiedForSelectedModel(!0)};return{targets:[{path:"/qHyperCubeDef",dimensions:{min:0,max:0},measures:{min:0,max:100,added(e){e.qDef={...e.qDef,qAggrFunc:"None"},t()},removed:t,replaced:t,moved:t}}]}};function R(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var O,M={};var L=function(){if(O)return M;O=1;var e=f;return M.createRoot=e.createRoot,M.hydrateRoot=e.hydrateRoot,M}();const P=e=>{const r=t((()=>L.createRoot(e)),[e]);return n((()=>()=>{null==r||r.unmount()}),[r]),r},I=g({layout:void 0,model:void 0,element:void 0,edit:!1,initialData:void 0,emitter:void 0,lang:"en",flags:{isEnabled:()=>!1},theme:null,readyToPrint:[]});var D,$,z,B,F,H,j,W,K,G,Y,U,V={},Q={},q={},J={};function X(){if(D)return J;D=1;let e={},t={},n={},r={},o={},i={},l={},a={},s={},u={},c={},d={},p={},f={},m={},g={},h={},v={},b={},y={},x={},_={},E={},C={},S={},w={},k={},T={},A={},N={},R={},O={},M={},L={},P={};function I(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let $="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,z=$&&"documentMode"in document?document.documentMode:null,B=$&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),F=$&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),H=!(!$||!("InputEvent"in window)||z)&&"getTargetRanges"in new window.InputEvent("input"),j=$&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),W=$&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,K=$&&/^(?=.*Chrome).*/i.test(navigator.userAgent),G=$&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!K,Y=j||W||G?" ":"",U=F?" ":Y,V=/^[^A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]*[\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]/,Q=/^[^\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]*[A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]/,q={bold:1,code:16,highlight:128,italic:2,strikethrough:4,subscript:32,superscript:64,underline:8},X={directionless:1,unmergeable:2},Z={center:2,end:6,justify:4,left:1,right:3,start:5},ee={2:"center",6:"end",4:"justify",1:"left",3:"right",5:"start"},te={normal:0,segmented:2,token:1},ne={0:"normal",2:"segmented",1:"token"},re=!1,oe=0;function ie(e){oe=e.timeStamp}function le(e,t,n){return t.__lexicalLineBreak===e||void 0!==e[`__lexicalKey_${n._key}`]}function ae(e,t,n){re=!0;let r=100<performance.now()-oe;try{kr(e,(()=>{let o=tr()||function(e){return e.getEditorState().read((()=>{let e=tr();return null!==e?e.clone():null}))}(e);var i=new Map,l=e.getRootElement(),a=e._editorState,s=e._blockCursorElement;let u=!1,c="";for(var d=0;d<t.length;d++){var p=t[d],f=p.type,m=p.target,g=Oe(m,a);if(!(null===g&&m!==l||Ar(g)))if("characterData"===f){if(p=r&&Rn(g))e:{f=m;var h=g;if(Bn(p=o)){var v=p.anchor.getNode();if(v.is(h)&&p.format!==v.getFormat()){p=!1;break e}}p=3===f.nodeType&&h.isAttached()}p&&(f=p=null,null!==(h=lt(e._window))&&h.anchorNode===m&&(p=h.anchorOffset,f=h.focusOffset),null!==(m=m.nodeValue)&&He(g,m,p,f,!1))}else if("childList"===f){for(u=!0,f=p.addedNodes,h=0;h<f.length;h++){var b=Re(v=f[h]),y=v.parentNode;null==y||v===s||null!==b||"BR"===v.nodeName&&le(v,y,e)||(F&&(b=v.innerText||v.nodeValue)&&(c+=b),y.removeChild(v))}if(0<(f=(p=p.removedNodes).length)){for(h=0,v=0;v<f;v++)("BR"===(y=p[v]).nodeName&&le(y,m,e)||s===y)&&(m.appendChild(y),h++);f!==h&&(m===l&&(g=a._nodeMap.get("root")),i.set(m,g))}}}if(0<i.size)for(let[t,n]of i)if(Rr(n))for(i=n.getChildrenKeys(),l=t.firstChild,a=0;a<i.length;a++)null!==(s=e.getElementByKey(i[a]))&&(null==l?(t.appendChild(s),l=s):l!==s&&t.replaceChild(s,l),l=l.nextSibling);else Rn(n)&&n.markDirty();if(0<(i=n.takeRecords()).length){for(l=0;l<i.length;l++)for(a=(s=i[l]).addedNodes,s=s.target,d=0;d<a.length;d++)null==(m=(g=a[d]).parentNode)||"BR"!==g.nodeName||le(g,s,e)||m.removeChild(g);n.takeRecords()}null!==o&&(u&&(o.dirty=!0,Ie(o)),F&&Ue(e)&&o.insertRawText(c))}))}finally{re=!1}}function se(e){let t=e._observer;if(null!==t){ae(e,t.takeRecords(),t)}}function ue(e){0===oe&&Xe(e).addEventListener("textInput",ie,!0),e._observer=new MutationObserver(((t,n)=>{ae(e,t,n)}))}function ce(e,t){let n=e.__mode,r=e.__format;e=e.__style;let o=t.__mode,i=t.__format;return t=t.__style,!(null!==n&&n!==o||null!==r&&r!==i||null!==e&&e!==t)}function de(e,t){let n=e.mergeWithSibling(t),r=vr()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function pe(e){if(""===e.__text&&e.isSimpleText()&&!e.isUnmergeable())e.remove();else{for(var t;null!==(t=e.getPreviousSibling())&&Rn(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(""!==t.__text){ce(t,e)&&(e=de(t,e));break}t.remove()}for(var n;null!==(n=e.getNextSibling())&&Rn(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(""!==n.__text){ce(e,n)&&de(e,n);break}n.remove()}}}function fe(e){return me(e.anchor),me(e.focus),e}function me(e){for(;"element"===e.type;){var t=e.getNode(),n=e.offset;if(n===t.getChildrenSize()?(t=t.getChildAtIndex(n-1),n=!0):(t=t.getChildAtIndex(n),n=!1),Rn(t)){e.set(t.__key,n?t.getTextContentSize():0,"text");break}if(!Rr(t))break;e.set(t.__key,n?t.getChildrenSize():0,"element")}}let ge=1,he="function"==typeof queueMicrotask?queueMicrotask:e=>{Promise.resolve().then(e)};function ve(e){let t=document.activeElement;if(null===t)return!1;let n=t.nodeName;return Ar(Oe(e))&&("INPUT"===n||"TEXTAREA"===n||"true"===t.contentEditable&&null==t.__lexicalEditor)}function be(e,t,n){let r=e.getRootElement();try{return null!==r&&r.contains(t)&&r.contains(n)&&null!==t&&!ve(t)&&ye(t)===e}catch(e){return!1}}function ye(e){for(;null!=e;){let t=e.__lexicalEditor;if(null!=t)return t;e=qe(e)}return null}function xe(e){return e.isToken()||e.isSegmented()}function _e(e){for(;null!=e;){if(3===e.nodeType)return e;e=e.firstChild}return null}function Ee(e,t,n){return!(e&(t=q[t]))||null!==n&&n&t?null===n||n&t?e|t:e:e^t}function Ce(e){return Rn(e)||mn(e)||Ar(e)}function Se(e,t){if(null!=t)e.__key=t;else{gr(),99<pr&&I(14),t=vr();var n=hr(),r=""+ge++;n._nodeMap.set(r,e),Rr(e)?t._dirtyElements.set(r,!0):t._dirtyLeaves.add(r),t._cloneNotNeeded.add(r),t._dirtyType=1,e.__key=r}}function we(e){var t=e.getParent();if(null!==t){let o=e.getWritable();t=t.getWritable();var n=e.getPreviousSibling();if(e=e.getNextSibling(),null===n)if(null!==e){var r=e.getWritable();t.__first=e.__key,r.__prev=null}else t.__first=null;else{if(r=n.getWritable(),null!==e){let t=e.getWritable();t.__prev=r.__key,r.__next=t.__key}else r.__next=null;o.__prev=null}null===e?null!==n?(e=n.getWritable(),t.__last=n.__key,e.__next=null):t.__last=null:(e=e.getWritable(),null!==n?((n=n.getWritable()).__next=e.__key,e.__prev=n.__key):e.__prev=null,o.__next=null),t.__size--,o.__parent=null}}function ke(e){99<pr&&I(14);var t=e.getLatest(),n=t.__parent,r=hr();let o=vr(),i=r._nodeMap;if(r=o._dirtyElements,null!==n)e:for(;null!==n&&!r.has(n);){let e=i.get(n);if(void 0===e)break;r.set(n,!1),n=e.__parent}t=t.__key,o._dirtyType=1,Rr(e)?r.set(t,!0):o._dirtyLeaves.add(t)}function Te(e){gr();var t=vr();let n=t._compositionKey;e!==n&&(t._compositionKey=e,null!==n&&(null!==(t=Ne(n))&&t.getWritable()),null!==e&&(null!==(e=Ne(e))&&e.getWritable()))}function Ae(){return mr()?null:vr()._compositionKey}function Ne(e,t){return void 0===(e=(t||hr())._nodeMap.get(e))?null:e}function Re(e,t){return void 0!==(e=e[`__lexicalKey_${vr()._key}`])?Ne(e,t):null}function Oe(e,t){for(;null!=e;){let n=Re(e,t);if(null!==n)return n;e=qe(e)}return null}function Me(e){let t=Object.assign({},e._decorators);return e._pendingDecorators=t}function Le(e){return e.read((()=>Pe().getTextContent()))}function Pe(){return hr()._nodeMap.get("root")}function Ie(e){gr();let t=hr();null!==e&&(e.dirty=!0,e._cachedNodes=null),t._selection=e}function De(e){var t,n=vr();e:{for(t=e;null!=t;){let e=t[`__lexicalKey_${n._key}`];if(void 0!==e){t=e;break e}t=qe(t)}t=null}return null===t?e===(n=n.getRootElement())?Ne("root"):null:Ne(t)}function $e(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function ze(e){let t=[];for(;null!==e;)t.push(e),e=e._parentEditor;return t}function Be(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function Fe(e,t,n){if(null!==(t=lt(t._window))){var r=t.anchorNode,{anchorOffset:o,focusOffset:i}=t;if(null!==r&&(t=3===r.nodeType?r.nodeValue:null,r=Oe(r),null!==t&&Rn(r))){if(t===Y&&n){t=n,i=o=n.length}null!==t&&He(r,t,o,i,e)}}}function He(e,t,n,r,o){let i=e;if(i.isAttached()&&(o||!i.isDirty())){let u=i.isComposing(),c=t;if((u||o)&&t[t.length-1]===Y&&(c=t.slice(0,-1)),t=i.getTextContent(),o||c!==t)if(""===c)if(Te(null),j||W||G)i.remove();else{let e=vr();setTimeout((()=>{e.update((()=>{i.isAttached()&&i.remove()}))}),20)}else{o=i.getParent(),t=nr();var l=i.getTextContentSize(),a=Ae(),s=i.getKey();i.isToken()||null!==a&&s===a&&!u||Bn(t)&&(null!==o&&!o.canInsertTextBefore()&&0===t.anchor.offset||t.anchor.key===e.__key&&0===t.anchor.offset&&!i.canInsertTextBefore()||t.focus.key===e.__key&&t.focus.offset===l&&!i.canInsertTextAfter())?i.markDirty():(Bn(e=tr())&&null!==n&&null!==r&&(e.setTextNodeRange(i,n,i,r),i.isSegmented()&&(n=Nn(n=i.getTextContent()),i.replace(n),i=n)),i.setTextContent(c))}}}function je(){var e=Pe();Ie(fe(e=e.select(0,e.getChildrenSize())))}function We(e,t){void 0===e.__lexicalClassNameCache&&(e.__lexicalClassNameCache={});let n=e.__lexicalClassNameCache,r=n[t];return void 0!==r?r:"string"==typeof(e=e[t])?(e=e.split(" "),n[t]=e):e}function Ke(e,t,n,r,o){0!==n.size&&(n=r.__type,r=r.__key,void 0===(t=t.get(n))&&I(33,n),n=t.klass,void 0===(t=e.get(n))&&(t=new Map,e.set(n,t)),n="destroyed"===(e=t.get(r))&&"created"===o,(void 0===e||n)&&t.set(r,n?"updated":o))}function Ge(e,t,n){let r=e.getParent(),o=n;return null!==r&&(t&&0===n?(o=e.getIndexWithinParent(),e=r):t||n!==e.getChildrenSize()||(o=e.getIndexWithinParent()+1,e=r)),e.getChildAtIndex(t?o-1:o)}function Ye(e,t){var n=e.offset;return"element"===e.type?Ge(e=e.getNode(),t,n):(e=e.getNode(),t&&0===n||!t&&n===e.getTextContentSize()?null===(n=t?e.getPreviousSibling():e.getNextSibling())?Ge(e.getParentOrThrow(),t,e.getIndexWithinParent()+(t?0:1)):n:null)}function Ue(e){return"insertFromPaste"===(e=(e=Xe(e).event)&&e.inputType)||"insertFromPasteAsQuotation"===e}function Ve(e){return!Lr(e)&&!e.isLastChild()&&!e.isInline()}function Qe(e,t){return void 0===(e=e._keyToDOMMap.get(t))&&I(75,t),e}function qe(e){return null!==(e=e.assignedSlot||e.parentElement)&&11===e.nodeType?e.host:e}function Je(e,t){for(e=e.getParent();null!==e;){if(e.is(t))return!0;e=e.getParent()}return!1}function Xe(e){return null===(e=e._window)&&I(78),e}function Ze(e){for(e=e.getParentOrThrow();null!==e&&!et(e);)e=e.getParentOrThrow();return e}function et(e){return Lr(e)||Rr(e)&&e.isShadowRoot()}function tt(e){return Se(e=e.constructor.clone(e),null),e}function nt(e){var t=vr();let n=e.constructor.getType();return void 0===(t=t._nodes.get(n))&&I(97),null!==(t=t.replace)?((t=t(e))instanceof e.constructor||I(98),t):e}function rt(e,t){!Lr(e=e.getParent())||Rr(t)||Ar(t)||I(99)}function ot(e){return(Ar(e)||Rr(e)&&!e.canBeEmpty())&&!e.isInline()}function it(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null,null!==(t=e.parentElement)&&t.removeChild(e)}function lt(e){return $?(e||window).getSelection():null}function at(e,t){let n=e.getChildAtIndex(t);null==n&&(n=e),et(e)&&I(102);let r=e=>{const t=e.getParentOrThrow(),o=et(t),i=e!==n||o?tt(e):e;if(o)return e.insertAfter(i),[e,i,i];const[l,a,s]=r(t);return e=e.getNextSiblings(),s.append(i,...e),[l,a,i]},[o,i]=r(n);return[o,i]}function st(e,t){for(;e!==Pe()&&null!=e;){if(t(e))return e;e=e.getParent()}return null}function ut(e){let t=[],n=[e];for(;0<n.length;){let r=n.pop();void 0===r&&I(112),Rr(r)&&n.unshift(...r.getChildren()),r!==e&&t.push(r)}return t}function ct(e,t,n,r,o,i){for(e=e.getFirstChild();null!==e;){let l=e.__key;e.__parent===t&&(Rr(e)&&ct(e,l,n,r,o,i),n.has(l)||i.delete(l),o.push(l)),e=e.getNextSibling()}}let dt,pt,ft,mt,gt,ht,vt,bt,yt,xt,_t="",Et="",Ct="",St=!1,wt=!1,kt=null;function Tt(e,t){let n=vt.get(e);if(null!==t){let n=Ht(e);n.parentNode===t&&t.removeChild(n)}bt.has(e)||pt._keyToDOMMap.delete(e),Rr(n)&&At(e=$t(n,vt),0,e.length-1,null),void 0!==n&&Ke(xt,ft,mt,n,"destroyed")}function At(e,t,n,r){for(;t<=n;++t){let n=e[t];void 0!==n&&Tt(n,r)}}function Nt(e,t){e.setProperty("text-align",t)}function Rt(e,t){var n=dt.theme.indent;if("string"==typeof n){let r=e.classList.contains(n);0<t&&!r?e.classList.add(n):1>t&&r&&e.classList.remove(n)}n=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||"40px",e.style.setProperty("padding-inline-start",0===t?"":`calc(${t} * ${n})`)}function Ot(e,t){e=e.style,0===t?Nt(e,""):1===t?Nt(e,"left"):2===t?Nt(e,"center"):3===t?Nt(e,"right"):4===t?Nt(e,"justify"):5===t?Nt(e,"start"):6===t&&Nt(e,"end")}function Mt(e,t,n){let r=bt.get(e);void 0===r&&I(60);let o=r.createDOM(dt,pt);var i=pt._keyToDOMMap;if(o["__lexicalKey_"+pt._key]=e,i.set(e,o),Rn(r)?o.setAttribute("data-lexical-text","true"):Ar(r)&&o.setAttribute("data-lexical-decorator","true"),Rr(r)){if(e=r.__indent,i=r.__size,0!==e&&Rt(o,e),0!==i){--i,e=$t(r,bt);var l=Et;Et="",Lt(e,r,0,i,o,null),Dt(r,o),Et=l}0!==(e=r.__format)&&Ot(o,e),r.isInline()||It(null,r,o),Ve(r)&&(_t+="\n\n",Ct+="\n\n")}else i=r.getTextContent(),Ar(r)?(null!==(l=r.decorate(pt,dt))&&Bt(e,l),o.contentEditable="false"):Rn(r)&&(r.isDirectionless()||(Et+=i)),_t+=i,Ct+=i;return null!==t&&(null!=n?t.insertBefore(o,n):null!=(n=t.__lexicalLineBreak)?t.insertBefore(o,n):t.appendChild(o)),Ke(xt,ft,mt,r,"created"),o}function Lt(e,t,n,r,o,i){let l=_t;for(_t="";n<=r;++n)Mt(e[n],o,i);Ve(t)&&(_t+="\n\n"),o.__lexicalTextContent=_t,_t=l+_t}function Pt(e,t){return mn(e=t.get(e))||Ar(e)&&e.isInline()}function It(e,t,n){e=null!==e&&(0===e.__size||Pt(e.__last,vt)),t=0===t.__size||Pt(t.__last,bt),e?t||(null!=(t=n.__lexicalLineBreak)&&n.removeChild(t),n.__lexicalLineBreak=null):t&&(t=document.createElement("br"),n.__lexicalLineBreak=t,n.appendChild(t))}function Dt(e,t){var n=t.__lexicalDir;if(t.__lexicalDirTextContent!==Et||n!==kt){let i=""===Et;if(i)var r=kt;else r=Et,r=V.test(r)?"rtl":Q.test(r)?"ltr":null;if(r!==n){let l=t.classList,a=dt.theme;var o=null!==n?a[n]:void 0;let s=null!==r?a[r]:void 0;void 0!==o&&("string"==typeof o&&(o=o.split(" "),o=a[n]=o),l.remove(...o)),null===r||i&&"ltr"===r?t.removeAttribute("dir"):(void 0!==s&&("string"==typeof s&&(n=s.split(" "),s=a[r]=n),void 0!==s&&l.add(...s)),t.dir=r),wt||(e.getWritable().__dir=r)}kt=r,t.__lexicalDirTextContent=Et,t.__lexicalDir=r}}function $t(e,t){let n=[];for(e=e.__first;null!==e;){let r=t.get(e);void 0===r&&I(101),n.push(e),e=r.__next}return n}function zt(e,t){var n=vt.get(e),r=bt.get(e);void 0!==n&&void 0!==r||I(61);var o=St||ht.has(e)||gt.has(e);let i=Qe(pt,e);if(n===r&&!o)return Rr(n)?(void 0!==(r=i.__lexicalTextContent)&&(_t+=r,Ct+=r),void 0!==(r=i.__lexicalDirTextContent)&&(Et+=r)):(r=n.getTextContent(),Rn(n)&&!n.isDirectionless()&&(Et+=r),Ct+=r,_t+=r),i;if(n!==r&&o&&Ke(xt,ft,mt,r,"updated"),r.updateDOM(n,i,dt))return r=Mt(e,null,null),null===t&&I(62),t.replaceChild(r,i),Tt(e,null),r;if(Rr(n)&&Rr(r)){if((e=r.__indent)!==n.__indent&&Rt(i,e),(e=r.__format)!==n.__format&&Ot(i,e),o){e=r,o=Et,Et="",t=_t;var l=n.__size,a=e.__size;if(_t="",1===l&&1===a){var s=n.__first,u=e.__first;if(s===u)zt(s,i);else{var c=Ht(s);u=Mt(u,null,null),i.replaceChild(u,c),Tt(s,null)}}else{u=$t(n,vt);var d=$t(e,bt);if(0===l)0!==a&&Lt(d,e,0,a-1,i,null);else if(0===a)0!==l&&(At(u,0,l-1,(s=null==i.__lexicalLineBreak)?null:i),s&&(i.textContent=""));else{var p=u;u=d,d=l-1,l=a-1;let t=i.firstChild,n=0;for(a=0;n<=d&&a<=l;){var f=p[n];let e=u[a];if(f===e)t=Ft(zt(e,i)),n++,a++;else{void 0===s&&(s=new Set(p)),void 0===c&&(c=new Set(u));let r=c.has(f),o=s.has(e);r?(o?((f=Qe(pt,e))===t?t=Ft(zt(e,i)):(null!=t?i.insertBefore(f,t):i.appendChild(f),zt(e,i)),n++):Mt(e,i,t),a++):(t=Ft(Ht(f)),Tt(f,i),n++)}}c=a>l,(s=n>d)&&!c?Lt(u,e,a,l,i,s=void 0===(s=u[l+1])?null:pt.getElementByKey(s)):c&&!s&&At(p,n,d,i)}}Ve(e)&&(_t+="\n\n"),i.__lexicalTextContent=_t,_t=t+_t,Dt(e,i),Et=o,Lr(r)||r.isInline()||It(n,r,i)}Ve(r)&&(_t+="\n\n",Ct+="\n\n")}else n=r.getTextContent(),Ar(r)?null!==(o=r.decorate(pt,dt))&&Bt(e,o):Rn(r)&&!r.isDirectionless()&&(Et+=n),_t+=n,Ct+=n;return!wt&&Lr(r)&&r.__cachedText!==Ct&&((r=r.getWritable()).__cachedText=Ct),i}function Bt(e,t){let n=pt._pendingDecorators,r=pt._decorators;if(null===n){if(r[e]===t)return;n=Me(pt)}n[e]=t}function Ft(e){return null!==(e=e.nextSibling)&&e===pt._blockCursorElement&&(e=e.nextSibling),e}function Ht(e){let t=yt.get(e);return void 0===t&&I(75,e),t}let jt=Object.freeze({}),Wt=[["keydown",function(e,t){if(Kt=e.timeStamp,Gt=e.keyCode,!t.isComposing()){var{keyCode:o,shiftKey:i,ctrlKey:l,metaKey:a,altKey:k}=e;if(!Cr(t,f,e)){if(39!==o||l||a||k)if(39!==o||k||i||!l&&!a)if(37!==o||l||a||k)if(37!==o||k||i||!l&&!a)if(38!==o||l||a)if(40!==o||l||a)if(13===o&&i)Jt=!0,Cr(t,x,e);else if(32===o)Cr(t,_,e);else if(B&&l&&79===o)e.preventDefault(),Jt=!0,Cr(t,r,!0);else if(13!==o||i)if(B?k||a||!(8===o||72===o&&l):l||k||a||8!==o)if(27===o)Cr(t,C,e);else if(B?i||k||a||!(46===o||68===o&&l):l||k||a||46!==o)if(8===o&&(B?k:l))e.preventDefault(),Cr(t,s,!0);else if(46===o&&(B?k:l))e.preventDefault(),Cr(t,s,!1);else if(B&&a&&8===o)e.preventDefault(),Cr(t,u,!0);else if(B&&a&&46===o)e.preventDefault(),Cr(t,u,!1);else if(66===o&&!k&&(B?a:l))e.preventDefault(),Cr(t,c,"bold");else if(85===o&&!k&&(B?a:l))e.preventDefault(),Cr(t,c,"underline");else if(73===o&&!k&&(B?a:l))e.preventDefault(),Cr(t,c,"italic");else if(9!==o||k||l||a)if(90===o&&!i&&(B?a:l))e.preventDefault(),Cr(t,d,void 0);else{var T=B?90===o&&a&&i:89===o&&l||90===o&&l&&i;T?(e.preventDefault(),Cr(t,p,void 0)):Wn(t._editorState._selection)?(T=!i&&(67===o&&(B?a:l)))?(e.preventDefault(),Cr(t,R,e)):(T=!i&&(88===o&&(B?a:l)))?(e.preventDefault(),Cr(t,O,e)):65===o&&(B?a:l)&&(e.preventDefault(),t.update((()=>{je()}))):!F&&65===o&&(B?a:l)&&(e.preventDefault(),t.update((()=>{je()})))}else Cr(t,w,e);else 46===o?Cr(t,S,e):(e.preventDefault(),Cr(t,n,!1));else 8===o?Cr(t,E,e):(e.preventDefault(),Cr(t,n,!0));else Jt=!1,Cr(t,x,e);else Cr(t,y,e);else Cr(t,b,e);else Cr(t,v,e);else Cr(t,h,e);else Cr(t,g,e);else Cr(t,m,e);(l||i||k||a)&&Cr(t,P,e)}}}],["pointerdown",function(e,t){let n=e.target;e=e.pointerType,n instanceof Node&&"touch"!==e&&kr(t,(()=>{Ar(Oe(n))||(qt=!0)}))}],["compositionstart",function(e,t){kr(t,(()=>{let n=tr();if(Bn(n)&&!t.isComposing()){let r=n.anchor,o=n.anchor.getNode();Te(r.key),(e.timeStamp<Kt+30||"element"===r.type||!n.isCollapsed()||o.getFormat()!==n.format||o.getStyle()!==n.style)&&Cr(t,i,U)}}))}],["compositionend",function(e,t){F?Xt=!0:kr(t,(()=>{on(t,e.data)}))}],["input",function(e,t){e.stopPropagation(),kr(t,(()=>{var n=tr(),r=e.data,o=rn(e);if(null!=r&&Bn(n)&&en(n,o,r,e.timeStamp,!1)){Xt&&(on(t,r),Xt=!1);var l=n.anchor,a=l.getNode();if(null===(o=lt(t._window)))return;let s=l.offset;(l=H&&!n.isCollapsed()&&Rn(a)&&null!==o.anchorNode)&&(l=(a=a.getTextContent().slice(0,s)+r+a.getTextContent().slice(s+n.focus.offset))===(3===(o=o.anchorNode).nodeType?o.nodeValue:null)),l||Cr(t,i,r),r=r.length,F&&1<r&&"insertCompositionText"===e.inputType&&!t.isComposing()&&(n.anchor.offset-=r),j||W||G||!t.isComposing()||(Kt=0,Te(null))}else Fe(!1,t,null!==r?r:void 0),Xt&&(on(t,r||void 0),Xt=!1);gr(),se(n=vr())})),Ut=null}],["click",function(e,n){kr(n,(()=>{let r=tr();var o=lt(n._window);let i=nr();if(o)if(Bn(r)){let t=r.anchor;var l=t.getNode();"element"===t.type&&0===t.offset&&r.isCollapsed()&&!Lr(l)&&1===Pe().getChildrenSize()&&l.getTopLevelElementOrThrow().isEmpty()&&null!==i&&r.is(i)?(o.removeAllRanges(),r.dirty=!0):3!==e.detail||r.isCollapsed()||l!==(o=r.focus.getNode())&&(Rr(l)?l.select(0):l.getParentOrThrow().select(0))}else"touch"===e.pointerType&&(null!==(l=o.anchorNode)&&(1===(l=l.nodeType)||3===l))&&Ie(o=er(i,o,n));Cr(n,t,e)}))}],["cut",jt],["copy",jt],["dragstart",jt],["dragover",jt],["dragend",jt],["paste",jt],["focus",jt],["blur",jt],["drop",jt]];H&&Wt.push(["beforeinput",(e,t)=>function(e,t){let f=e.inputType,m=rn(e);"deleteCompositionText"===f||F&&Ue(t)||"insertCompositionText"!==f&&kr(t,(()=>{let g=tr();if("deleteContentBackward"===f){if(null===g){var h=nr();if(!Bn(h))return;Ie(h.clone())}if(Bn(g))return void(229===Gt&&e.timeStamp<Kt+30&&t.isComposing()&&g.anchor.key===g.focus.key?(Te(null),Kt=0,setTimeout((()=>{kr(t,(()=>{Te(null)}))}),30),Bn(g)&&(h=g.anchor.getNode(),h.markDirty(),g.format=h.getFormat(),g.style=h.getStyle())):(e.preventDefault(),Cr(t,n,!0)))}if(Bn(g)){h=e.data,null!==Ut&&Fe(!1,t,Ut),g.dirty&&null===Ut||!g.isCollapsed()||Lr(g.anchor.getNode())||null===m||g.applyDOMRange(m),Ut=null;var v=g.focus,b=g.anchor.getNode();if(v=v.getNode(),"insertText"===f||"insertTranspose"===f)"\n"===h?(e.preventDefault(),Cr(t,r,!1)):"\n\n"===h?(e.preventDefault(),Cr(t,o,void 0)):null==h&&e.dataTransfer?(h=e.dataTransfer.getData("text/plain"),e.preventDefault(),g.insertRawText(h)):null!=h&&en(g,m,h,e.timeStamp,!0)?(e.preventDefault(),Cr(t,i,h)):Ut=h,Yt=e.timeStamp;else switch(e.preventDefault(),f){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Cr(t,i,e);break;case"insertFromComposition":Te(null),Cr(t,i,e);break;case"insertLineBreak":Te(null),Cr(t,r,!1);break;case"insertParagraph":Te(null),Jt&&!W?(Jt=!1,Cr(t,r,!1)):Cr(t,o,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Cr(t,l,e);break;case"deleteByComposition":(function(e,t){return e!==t||Rr(e)||Rr(t)||!e.isToken()||!t.isToken()})(b,v)&&Cr(t,a,e);break;case"deleteByDrag":case"deleteByCut":Cr(t,a,e);break;case"deleteContent":Cr(t,n,!1);break;case"deleteWordBackward":Cr(t,s,!0);break;case"deleteWordForward":Cr(t,s,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Cr(t,u,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Cr(t,u,!1);break;case"formatStrikeThrough":Cr(t,c,"strikethrough");break;case"formatBold":Cr(t,c,"bold");break;case"formatItalic":Cr(t,c,"italic");break;case"formatUnderline":Cr(t,c,"underline");break;case"historyUndo":Cr(t,d,void 0);break;case"historyRedo":Cr(t,p,void 0)}}}))}(e,t)]);let Kt=0,Gt=0,Yt=0,Ut=null,Vt=0,Qt=!1,qt=!1,Jt=!1,Xt=!1,Zt=[0,"",0,"root",0];function en(e,t,n,r,o){let i=e.anchor,l=e.focus,a=i.getNode();var s=vr();let u=lt(s._window),c=null!==u?u.anchorNode:null,d=i.key;s=s.getElementByKey(d);let p=n.length;return d!==l.key||!Rn(a)||(!o&&(!H||Yt<r+50)||a.isDirty()&&2>p||$e(n))&&i.offset!==l.offset&&!a.isComposing()||xe(a)||a.isDirty()&&1<p||(o||!H)&&null!==s&&!a.isComposing()&&c!==_e(s)||null!==u&&null!==t&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||a.getFormat()!==e.format||a.getStyle()!==e.style||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;e=e.anchor.offset;let n=t.getParentOrThrow(),r=t.isToken();return 0===e?((e=!t.canInsertTextBefore()||!n.canInsertTextBefore()||r)||(e=(Rn(t=t.getPreviousSibling())||Rr(t)&&t.isInline())&&!t.canInsertTextAfter()),e):e===t.getTextContentSize()&&(!t.canInsertTextAfter()||!n.canInsertTextAfter()||r)}(e,a)}function tn(e,t){return null!==e&&null!==e.nodeValue&&3===e.nodeType&&0!==t&&t!==e.nodeValue.length}function nn(t,n,r){let{anchorNode:o,anchorOffset:i,focusNode:l,focusOffset:a}=t;Qt&&(Qt=!1,tn(o,i)&&tn(l,a))||kr(n,(()=>{if(r){if(be(n,o,l)){var i=tr();if(Bn(i)){var a=i.anchor,s=a.getNode();if(i.isCollapsed()){"Range"===t.type&&t.anchorNode===t.focusNode&&(i.dirty=!0);var u=Xe(n).event;u=u?u.timeStamp:performance.now();let[e,r,o,l,c]=Zt;u<c+200&&a.offset===o&&a.key===l?(i.format=e,i.style=r):"text"===a.type?(i.format=s.getFormat(),i.style=s.getStyle()):"element"===a.type&&(i.format=0,i.style="")}else{a=255,s=!1;let e=(u=i.getNodes()).length;for(let t=0;t<e;t++){let e=u[t];if(Rn(e)&&(s=!0,0===(a&=e.getFormat())))break}i.format=s?a:0}}Cr(n,e,void 0)}}else Ie(null)}))}function rn(e){return e.getTargetRanges?0===(e=e.getTargetRanges()).length?null:e[0]:null}function on(e,t){var n=e._compositionKey;if(Te(null),null!==n&&null!=t){if(""===t)return t=Ne(n),void(null!==(e=_e(e.getElementByKey(n)))&&null!==e.nodeValue&&Rn(t)&&He(t,e.nodeValue,null,null,!0));if("\n"===t[t.length-1]&&Bn(n=tr()))return t=n.focus,n.anchor.set(t.key,t.offset,t.type),void Cr(e,x,null)}Fe(!0,e,t)}function ln(e){let t=e.__lexicalEventHandles;return void 0===t&&(t=[],e.__lexicalEventHandles=t),t}let an=new Map;function sn(e){let t=lt(null==(e=e.target)?null:9===e.nodeType?e.defaultView:e.ownerDocument.defaultView);if(null!==t){var n=ye(t.anchorNode);if(null!==n){qt&&(qt=!1,kr(n,(()=>{var e=nr(),r=t.anchorNode;null!==r&&(1===(r=r.nodeType)||3===r)&&Ie(e=er(e,t,n))})));var r=(e=(e=ze(n))[e.length-1])._key,o=an.get(r),i=o||e;i!==n&&nn(t,i,!1),nn(t,n,!0),n!==e?an.set(r,n):o&&an.delete(r)}}}function un(e,t,n){gr();var r=e.__key;let o=e.getParent();if(null!==o){var i=tr();if(Bn(i)&&Rr(e)){var{anchor:l,focus:a}=i,s=l.getNode(),u=a.getNode();Je(s,e)&&l.set(e.__key,0,"element"),Je(u,e)&&a.set(e.__key,0,"element")}if(u=!1,Bn(s=i)&&t){i=s.anchor;let t=s.focus;i.key===r&&(ir(i,e,o,e.getPreviousSibling(),e.getNextSibling()),u=!0),t.key===r&&(ir(t,e,o,e.getPreviousSibling(),e.getNextSibling()),u=!0)}else Wn(s)&&t&&e.isSelected()&&e.selectPrevious();Bn(s)&&t&&!u?(r=e.getIndexWithinParent(),we(e),rr(s,o,r,-1)):we(e),n||et(o)||o.canBeEmpty()||!o.isEmpty()||un(o,t),t&&Lr(o)&&o.isEmpty()&&o.selectEnd()}}class cn{static getType(){I(64,this.name)}static clone(){I(65,this.name)}constructor(e){this.__type=this.constructor.getType(),this.__next=this.__prev=this.__parent=null,Se(this,e)}getType(){return this.__type}isAttached(){for(var e=this.__key;null!==e;){if("root"===e)return!0;if(null===(e=Ne(e)))break;e=e.__parent}return!1}isSelected(e){if(null==(e=e||tr()))return!1;let t=e.getNodes().some((e=>e.__key===this.__key));return(Rn(this)||!Bn(e)||"element"!==e.anchor.type||"element"!==e.focus.type||e.anchor.key!==e.focus.key||e.anchor.offset!==e.focus.offset)&&t}getKey(){return this.__key}getIndexWithinParent(){var e=this.getParent();if(null===e)return-1;e=e.getFirstChild();let t=0;for(;null!==e;){if(this.is(e))return t;t++,e=e.getNextSibling()}return-1}getParent(){let e=this.getLatest().__parent;return null===e?null:Ne(e)}getParentOrThrow(){let e=this.getParent();return null===e&&I(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){let t=e.getParent();if(et(t))return e;e=t}return null}getTopLevelElementOrThrow(){let e=this.getTopLevelElement();return null===e&&I(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:Ne(e)}getPreviousSiblings(){let e=[];var t=this.getParent();if(null===t)return e;for(t=t.getFirstChild();null!==t&&!t.is(this);)e.push(t),t=t.getNextSibling();return e}getNextSibling(){let e=this.getLatest().__next;return null===e?null:Ne(e)}getNextSiblings(){let e=[],t=this.getNextSibling();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){let t=this.getParents();var n=e.getParents();Rr(this)&&t.unshift(this),Rr(e)&&n.unshift(e),e=t.length;var r=n.length;if(0===e||0===r||t[e-1]!==n[r-1])return null;for(n=new Set(n),r=0;r<e;r++){let e=t[r];if(n.has(e))return e}return null}is(e){return null!=e&&this.__key===e.__key}isBefore(e){if(this===e)return!1;if(e.isParentOf(this))return!0;if(this.isParentOf(e))return!1;var t=this.getCommonAncestor(e);let n=this;for(;;){var r=n.getParentOrThrow();if(r===t){r=n.getIndexWithinParent();break}n=r}for(n=e;;){if((e=n.getParentOrThrow())===t){t=n.getIndexWithinParent();break}n=e}return r<t}isParentOf(e){let t=this.__key;if(t===e.__key)return!1;for(;null!==e;){if(e.__key===t)return!0;e=e.getParent()}return!1}getNodesBetween(e){let t=this.isBefore(e),n=[],r=new Set;for(var o=this;;){var i=o.__key;if(r.has(i)||(r.add(i),n.push(o)),o===e)break;if(null!==(i=Rr(o)?t?o.getFirstChild():o.getLastChild():null))o=i;else if(null!==(i=t?o.getNextSibling():o.getPreviousSibling()))o=i;else{if(o=o.getParentOrThrow(),r.has(o.__key)||n.push(o),o===e)break;i=o;do{null===i&&I(68),o=t?i.getNextSibling():i.getPreviousSibling(),null!==(i=i.getParent())&&(null!==o||r.has(i.__key)||n.push(i))}while(null===o)}}return t||n.reverse(),n}isDirty(){let e=vr()._dirtyLeaves;return null!==e&&e.has(this.__key)}getLatest(){let e=Ne(this.__key);return null===e&&I(113),e}getWritable(){gr();var e=hr(),t=vr();e=e._nodeMap;let n=this.__key,r=this.getLatest(),o=r.__parent;t=t._cloneNotNeeded;var i=tr();return null!==i&&(i._cachedNodes=null),t.has(n)?(ke(r),r):((i=r.constructor.clone(r)).__parent=o,i.__next=r.__next,i.__prev=r.__prev,Rr(r)&&Rr(i)?(i.__first=r.__first,i.__last=r.__last,i.__size=r.__size,i.__indent=r.__indent,i.__format=r.__format,i.__dir=r.__dir):Rn(r)&&Rn(i)&&(i.__format=r.__format,i.__style=r.__style,i.__mode=r.__mode,i.__detail=r.__detail),t.add(n),i.__key=n,ke(i),e.set(n,i),i)}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(){I(70)}updateDOM(){I(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){I(72)}static importJSON(){I(18,this.name)}static transform(){return null}remove(e){un(this,!0,e)}replace(e,t){gr();var n=tr();null!==n&&(n=n.clone()),rt(this,e);let r=this.getLatest(),o=this.__key,i=e.__key,l=e.getWritable(),a=(e=this.getParentOrThrow().getWritable()).__size;we(l);let s=r.getPreviousSibling(),u=r.getNextSibling(),c=r.__prev,d=r.__next,p=r.__parent;return un(r,!1,!0),null===s?e.__first=i:s.getWritable().__next=i,l.__prev=c,null===u?e.__last=i:u.getWritable().__prev=i,l.__next=d,l.__parent=p,e.__size=a,t&&this.getChildren().forEach((e=>{l.append(e)})),Bn(n)&&(Ie(n),t=n.anchor,n=n.focus,t.key===o&&In(t,l),n.key===o&&In(n,l)),Ae()===o&&Te(i),l}insertAfter(e,t=!0){gr(),rt(this,e);var n=this.getWritable();let r=e.getWritable();var o=r.getParent();let i=tr();var l=!1,a=!1;if(null!==o){var s=e.getIndexWithinParent();we(r),Bn(i)&&(a=o.__key,l=i.anchor,o=i.focus,l="element"===l.type&&l.key===a&&l.offset===s+1,a="element"===o.type&&o.key===a&&o.offset===s+1)}o=this.getNextSibling(),s=this.getParentOrThrow().getWritable();let u=r.__key,c=n.__next;return null===o?s.__last=u:o.getWritable().__prev=u,s.__size++,n.__next=u,r.__next=c,r.__prev=n.__key,r.__parent=n.__parent,t&&Bn(i)&&(rr(i,s,(t=this.getIndexWithinParent())+1),n=s.__key,l&&i.anchor.set(n,t+2,"element"),a&&i.focus.set(n,t+2,"element")),e}insertBefore(e,t=!0){gr(),rt(this,e);var n=this.getWritable();let r=e.getWritable(),o=r.__key;we(r);let i=this.getPreviousSibling(),l=this.getParentOrThrow().getWritable(),a=n.__prev,s=this.getIndexWithinParent();return null===i?l.__first=o:i.getWritable().__next=o,l.__size++,n.__prev=o,r.__prev=a,r.__next=n.__key,r.__parent=n.__parent,n=tr(),t&&Bn(n)&&rr(n,t=this.getParentOrThrow(),s),e}isParentRequired(){return!1}createParentElementNode(){return Br()}selectPrevious(e,t){gr();let n=this.getPreviousSibling(),r=this.getParentOrThrow();return null===n?r.select(0,0):Rr(n)?n.select():Rn(n)?n.select(e,t):(e=n.getIndexWithinParent()+1,r.select(e,e))}selectNext(e,t){gr();let n=this.getNextSibling(),r=this.getParentOrThrow();return null===n?r.select():Rr(n)?n.select(0,0):Rn(n)?n.select(e,t):(e=n.getIndexWithinParent(),r.select(e,e))}markDirty(){this.getWritable()}}class dn extends cn{static getType(){return"linebreak"}static clone(e){return new dn(e.__key)}constructor(e){super(e)}getTextContent(){return"\n"}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:e=>{let t,n,r=e.parentElement;return null!==r&&((t=r.firstChild)===e||t.nextSibling===e&&3===t.nodeType&&null!==(t.textContent||"").match(/^[\s|\r?\n|\t]+$/))&&((n=r.lastChild)===e||n.previousSibling===e&&3===n.nodeType&&null!==(n.textContent||"").match(/^[\s|\r?\n|\t]+$/))?null:{conversion:pn,priority:0}}}}static importJSON(){return fn()}exportJSON(){return{type:"linebreak",version:1}}}function pn(){return{node:fn()}}function fn(){return nt(new dn)}function mn(e){return e instanceof dn}function gn(e,t){return 16&t?"code":128&t?"mark":32&t?"sub":64&t?"sup":null}function hn(e,t){return 1&t?"strong":2&t?"em":"span"}function vn(e,t,n,r,o){e=r.classList,void 0!==(r=We(o,"base"))&&e.add(...r);let i=!1,l=8&t&&4&t;var a=8&n&&4&n;void 0!==(r=We(o,"underlineStrikethrough"))&&(a?(i=!0,l||e.add(...r)):l&&e.remove(...r));for(let s in q)a=q[s],void 0!==(r=We(o,s))&&(n&a&&(!i||"underline"!==s&&"strikethrough"!==s)?(!(t&a)||l&&"underline"===s||"strikethrough"===s)&&e.add(...r):t&a&&e.remove(...r))}function bn(e,t,n){let r=t.firstChild;if(e+=(n=n.isComposing())?Y:"",null==r)t.textContent=e;else if((t=r.nodeValue)!==e)if(n||F){n=t.length;let o=e.length,i=0,l=0;for(;i<n&&i<o&&t[i]===e[i];)i++;for(;l+i<n&&l+i<o&&t[n-l-1]===e[o-l-1];)l++;e=[i,n-i-l,e.slice(i,o-l)];let[a,s,u]=e;0!==s&&r.deleteData(a,s),r.insertData(a,u)}else r.nodeValue=e}function yn(e,t){return(t=document.createElement(t)).appendChild(e),t}class xn extends cn{static getType(){return"text"}static clone(e){return new xn(e.__text,e.__key)}constructor(e,t){super(t),this.__text=e,this.__format=0,this.__style="",this.__detail=this.__mode=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){let e=this.getLatest();return ne[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return 1===this.getLatest().__mode}isComposing(){return this.__key===Ae()}isSegmented(){return 2===this.getLatest().__mode}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){return e=q[e],!!(this.getFormat()&e)}isSimpleText(){return"text"===this.__type&&0===this.__mode}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return Ee(this.getLatest().__format,e,t)}createDOM(e){var t=this.__format,n=gn(0,t);let r=hn(0,t),o=document.createElement(null===n?r:n),i=o;return null!==n&&(i=document.createElement(r),o.appendChild(i)),n=i,bn(this.__text,n,this),void 0!==(e=e.theme.text)&&vn(r,0,t,n,e),""!==(t=this.__style)&&(o.style.cssText=t),o}updateDOM(e,t,n){let r=this.__text;var o=e.__format,i=this.__format,l=gn(0,o);let a=gn(0,i);var s=hn(0,o);let u=hn(0,i);return(null===l?s:l)!==(null===a?u:a)||(l===a&&s!==u?(null==(o=t.firstChild)&&I(48),bn(r,e=l=document.createElement(u),this),void 0!==(n=n.theme.text)&&vn(u,0,i,e,n),t.replaceChild(l,o),!1):(s=t,null!==a&&null!==l&&(null==(s=t.firstChild)&&I(49)),bn(r,s,this),void 0!==(n=n.theme.text)&&o!==i&&vn(u,o,i,s,n),i=this.__style,e.__style!==i&&(t.style.cssText=i),!1))}static importDOM(){return{"#text":()=>({conversion:Sn,priority:0}),b:()=>({conversion:En,priority:0}),code:()=>({conversion:An,priority:0}),em:()=>({conversion:An,priority:0}),i:()=>({conversion:An,priority:0}),s:()=>({conversion:An,priority:0}),span:()=>({conversion:_n,priority:0}),strong:()=>({conversion:An,priority:0}),sub:()=>({conversion:An,priority:0}),sup:()=>({conversion:An,priority:0}),u:()=>({conversion:An,priority:0})}}static importJSON(e){let t=Nn(e.text);return t.setFormat(e.format),t.setDetail(e.detail),t.setMode(e.mode),t.setStyle(e.style),t}exportDOM(e){return({element:e}=super.exportDOM(e)),null!==e&&(this.hasFormat("bold")&&(e=yn(e,"b")),this.hasFormat("italic")&&(e=yn(e,"i")),this.hasFormat("strikethrough")&&(e=yn(e,"s")),this.hasFormat("underline")&&(e=yn(e,"u"))),{element:e}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(){}setFormat(e){let t=this.getWritable();return t.__format="string"==typeof e?q[e]:e,t}setDetail(e){let t=this.getWritable();return t.__detail="string"==typeof e?X[e]:e,t}setStyle(e){let t=this.getWritable();return t.__style=e,t}toggleFormat(e){return e=q[e],this.setFormat(this.getFormat()^e)}toggleDirectionless(){let e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){let e=this.getWritable();return e.__detail^=2,e}setMode(e){if(e=te[e],this.__mode===e)return this;let t=this.getWritable();return t.__mode=e,t}setTextContent(e){if(this.__text===e)return this;let t=this.getWritable();return t.__text=e,t}select(e,t){gr();let n=tr();var r=this.getTextContent();let o=this.__key;return"string"==typeof r?(r=r.length,void 0===e&&(e=r),void 0===t&&(t=r)):t=e=0,Bn(n)?((r=Ae())!==n.anchor.key&&r!==n.focus.key||Te(o),n.setTextNodeRange(this,e,this,t),n):Xn(o,e,o,t,"text","text")}spliceText(e,t,n,r){let o=this.getWritable(),i=o.__text,l=n.length,a=e;0>a&&(a=l+a,0>a&&(a=0));let s=tr();return r&&Bn(s)&&(e+=l,s.setTextNodeRange(o,e,o,e)),t=i.slice(0,a)+n+i.slice(a+t),o.__text=t,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){gr();var t=this.getLatest(),n=t.getTextContent(),r=t.__key,o=Ae(),i=new Set(e);e=[];for(var l=n.length,a="",s=0;s<l;s++)""!==a&&i.has(s)&&(e.push(a),a=""),a+=n[s];if(""!==a&&e.push(a),0===(i=e.length))return[];if(e[0]===n)return[t];var u=e[0];n=t.getParentOrThrow(),s=t.getFormat();let c=t.getStyle(),d=t.__detail;l=!1,t.isSegmented()?((a=Nn(u)).__format=s,a.__style=c,a.__detail=d,l=!0):(a=t.getWritable()).__text=u,t=tr(),a=[a],u=u.length;for(let n=1;n<i;n++){var p=e[n],f=p.length;(p=Nn(p).getWritable()).__format=s,p.__style=c,p.__detail=d;let i=p.__key;if(f=u+f,Bn(t)){let e=t.anchor,n=t.focus;e.key===r&&"text"===e.type&&e.offset>u&&e.offset<=f&&(e.key=i,e.offset-=u,t.dirty=!0),n.key===r&&"text"===n.type&&n.offset>u&&n.offset<=f&&(n.key=i,n.offset-=u,t.dirty=!0)}o===r&&Te(i),u=f,a.push(p)}return r=this.getPreviousSibling(),o=this.getNextSibling(),null!==r&&ke(r),null!==o&&ke(o),r=n.getWritable(),o=this.getIndexWithinParent(),l?(r.splice(o,0,a),this.remove()):r.splice(o,1,a),Bn(t)&&rr(t,n,o,i-1),a}mergeWithSibling(e){var t=e===this.getPreviousSibling();t||e===this.getNextSibling()||I(50);var n=this.__key;let r=e.__key,o=this.__text,i=o.length;Ae()===r&&Te(n);let l=tr();if(Bn(l)){let o=l.anchor,a=l.focus;null!==o&&o.key===r&&(lr(o,t,n,e,i),l.dirty=!0),null!==a&&a.key===r&&(lr(a,t,n,e,i),l.dirty=!0)}return n=e.__text,this.setTextContent(t?n+o:o+n),t=this.getWritable(),e.remove(),t}isTextEntity(){return!1}}function _n(e){let t="700"===e.style.fontWeight,n="line-through"===e.style.textDecoration,r="italic"===e.style.fontStyle,o="underline"===e.style.textDecoration,i=e.style.verticalAlign;return{forChild:e=>Rn(e)?(t&&e.toggleFormat("bold"),n&&e.toggleFormat("strikethrough"),r&&e.toggleFormat("italic"),o&&e.toggleFormat("underline"),"sub"===i&&e.toggleFormat("subscript"),"super"===i&&e.toggleFormat("superscript"),e):e,node:null}}function En(e){let t="normal"===e.style.fontWeight;return{forChild:e=>(Rn(e)&&!t&&e.toggleFormat("bold"),e),node:null}}let Cn=new WeakMap;function Sn(e){null===e.parentElement&&I(129);for(var t,n=e.textContent||"",r=e.parentNode,o=[e];null!==r&&void 0===(t=Cn.get(r))&&!("PRE"===r.nodeName||1===r.nodeType&&r.style.whiteSpace.startsWith("pre"));)o.push(r),r=r.parentNode;for(t=void 0===t?r:t,r=0;r<o.length;r++)Cn.set(o[r],t);if(null!==t){for(e=[],o=(n=n.split(/(\r?\n|\t)/)).length,t=0;t<o;t++)"\n"===(r=n[t])||"\r\n"===r?e.push(fn()):"\t"===r?e.push(Mn()):""!==r&&e.push(Nn(r));return{node:e}}if(""===(n=n.replace(/\r?\n|\t/gm," ").replace("\r","").replace(/\s+/g," ")))return{node:null};if(" "===n[0]){for(o=e,t=!0;null!==o&&null!==(o=kn(o,!1));)if(0<(r=o.textContent||"").length){r.match(/(?:\s|\r?\n|\t)$/)&&(n=n.slice(1)),t=!1;break}t&&(n=n.slice(1))}if(" "===n[n.length-1]){for(o=!0;null!==e&&null!==(e=kn(e,!0));)if(0<(e.textContent||"").replace(/^[\s|\r?\n|\t]+/,"").length){o=!1;break}o&&(n=n.slice(0,n.length-1))}return""===n?{node:null}:{node:Nn(n)}}let wn=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/,"i");function kn(e,t){for(;;){for(var n=void 0;null===(n=t?e.nextSibling:e.previousSibling);)if(null===(e=e.parentElement))return null;if(1===(e=n).nodeType&&(""===(n=e.style.display)&&null===e.nodeName.match(wn)||""!==n&&!n.startsWith("inline")))return null;for(;null!==(n=t?e.firstChild:e.lastChild);)e=n;if(3===e.nodeType)return e;if("BR"===e.nodeName)return null}}let Tn={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function An(e){let t=Tn[e.nodeName.toLowerCase()];return void 0===t?{node:null}:{forChild:e=>(Rn(e)&&!e.hasFormat(t)&&e.toggleFormat(t),e),node:null}}function Nn(e=""){return nt(new xn(e))}function Rn(e){return e instanceof xn}class On extends xn{static getType(){return"tab"}static clone(e){let t=new On(e.__key);return t.__text=e.__text,t.__format=e.__format,t.__style=e.__style,t}constructor(e){super("\t",e),this.__detail=2}static importDOM(){return null}static importJSON(e){let t=Mn();return t.setFormat(e.format),t.setStyle(e.style),t}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(){I(126)}setDetail(){I(127)}setMode(){I(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Mn(){return nt(new On)}class Ln{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){let t=this.getNode(),n=e.getNode(),r=this.offset;if(e=e.offset,Rr(t)){var o=t.getDescendantByIndex(r);t=null!=o?o:t}return Rr(n)&&(o=n.getDescendantByIndex(e),n=null!=o?o:n),t===n?r<e:t.isBefore(n)}getNode(){let e=Ne(this.key);return null===e&&I(20),e}set(e,t,n){let r=this._selection,o=this.key;this.key=e,this.offset=t,this.type=n,mr()||(Ae()===o&&Te(e),null!==r&&(r._cachedNodes=null,r.dirty=!0))}}function Pn(e,t){let n=t.__key,r=e.offset,o="element";if(Rn(t))o="text",r>(t=t.getTextContentSize())&&(r=t);else if(!Rr(t)){var i=t.getNextSibling();Rn(i)?(n=i.__key,r=0,o="text"):(i=t.getParent())&&(n=i.__key,r=t.getIndexWithinParent()+1)}e.set(n,r,o)}function In(e,t){if(Rr(t)){let n=t.getLastDescendant();Rr(n)||Rn(n)?Pn(e,n):Pn(e,t)}else Pn(e,t)}function Dn(e,t,n,r){let o=e.getNode(),i=o.getChildAtIndex(e.offset),l=Nn(),a=Lr(o)?Br().append(l):l;l.setFormat(n),l.setStyle(r),null===i?o.append(a):(i.insertBefore(a),"element"===t.type&&t.key===e.key&&t.offset!==e.offset&&t.set(t.key,t.offset+1,"element")),e.is(t)&&t.set(l.__key,0,"text"),e.set(l.__key,0,"text")}function $n(e,t,n,r){e.key=t,e.offset=n,e.type=r}class zn{constructor(e){this.dirty=!1,this._nodes=e,this._cachedNodes=null}is(e){if(!Wn(e))return!1;let t=this._nodes,n=e._nodes;return t.size===n.size&&Array.from(t).every((e=>n.has(e)))}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 zn(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(e,t){let n=this.getNodes(),r=n.length;var o=n[r-1];if(Rn(o))o=o.select();else{let e=o.getIndexWithinParent()+1;o=o.getParentOrThrow().select(e,e)}for(o.insertNodes(e,t),e=0;e<r;e++)n[e].remove();return!0}getNodes(){var e=this._cachedNodes;if(null!==e)return e;var t=this._nodes;e=[];for(let n of t)null!==(t=Ne(n))&&e.push(t);return mr()||(this._cachedNodes=e),e}getTextContent(){let e=this.getNodes(),t="";for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}}function Bn(e){return e instanceof jn}class Fn{constructor(e,t,n){this.gridKey=e,this.anchor=t,this.focus=n,this.dirty=!1,this._cachedNodes=null,t._selection=this,n._selection=this}is(e){return!!Hn(e)&&(this.gridKey===e.gridKey&&this.anchor.is(e.anchor)&&this.focus.is(e.focus))}set(e,t,n){this.dirty=!0,this.gridKey=e,this.anchor.key=t,this.focus.key=n,this._cachedNodes=null}clone(){return new Fn(this.gridKey,this.anchor,this.focus)}isCollapsed(){return!1}isBackward(){return this.focus.isBefore(this.anchor)}getCharacterOffsets(){return Gn(this)}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(e,t){let n=this.focus.getNode();return fe(n.select(0,n.getChildrenSize())).insertNodes(e,t)}getShape(){var e=Ne(this.anchor.key);null===e&&I(21);var t=e.getIndexWithinParent();e=e.getParentOrThrow().getIndexWithinParent();var n=Ne(this.focus.key);null===n&&I(22);var r=n.getIndexWithinParent();let o=n.getParentOrThrow().getIndexWithinParent();return n=Math.min(t,r),t=Math.max(t,r),r=Math.min(e,o),e=Math.max(e,o),{fromX:Math.min(n,t),fromY:Math.min(r,e),toX:Math.max(n,t),toY:Math.max(r,e)}}getNodes(){function e(e){let{cell:t,startColumn:n,startRow:r}=e;a=Math.min(a,n),s=Math.min(s,r),u=Math.max(u,n+t.__colSpan-1),c=Math.max(c,r+t.__rowSpan-1)}var t=this._cachedNodes;if(null!==t)return t;var n=this.anchor.getNode();t=this.focus.getNode(),n=st(n,Wr);var r=st(t,Wr);Wr(n)||I(103),Wr(r)||I(104),Ur(t=n.getParent())||I(105),Gr(t=t.getParent())||I(106);let[o,i,l]=ar(t,n,r),a=Math.min(i.startColumn,l.startColumn),s=Math.min(i.startRow,l.startRow),u=Math.max(i.startColumn+i.cell.__colSpan-1,l.startColumn+l.cell.__colSpan-1),c=Math.max(i.startRow+i.cell.__rowSpan-1,l.startRow+l.cell.__rowSpan-1);n=a,r=s;for(var d=a,p=s;a<n||s<r||u>d||c>p;){if(a<n){var f=p-r;--n;for(var m=0;m<=f;m++)e(o[r+m][n])}if(s<r)for(f=d-n,--r,m=0;m<=f;m++)e(o[r][n+m]);if(u>d)for(f=p-r,d+=1,m=0;m<=f;m++)e(o[r+m][d]);if(c>p)for(f=d-n,p+=1,m=0;m<=f;m++)e(o[p][n+m])}for(t=[t],n=null,r=s;r<=c;r++)for(d=a;d<=u;d++)({cell:p}=o[r][d]),Ur(f=p.getParent())||I(107),f!==n&&t.push(f),t.push(p,...ut(p)),n=f;return mr()||(this._cachedNodes=t),t}getTextContent(){let e=this.getNodes(),t="";for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}}function Hn(e){return e instanceof Fn}class jn{constructor(e,t,n,r){this.anchor=e,this.focus=t,this.dirty=!1,this.format=n,this.style=r,this._cachedNodes=null,e._selection=this,t._selection=this}is(e){return!!Bn(e)&&(this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style)}isBackward(){return this.focus.isBefore(this.anchor)}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){var e=this._cachedNodes;if(null!==e)return e;e=this.anchor;var t=this.focus,n=e.isBefore(t),r=n?e:t;n=n?t:e,e=r.getNode(),t=n.getNode();let o=r.offset;return r=n.offset,Rr(e)&&(n=e.getDescendantByIndex(o),e=null!=n?n:e),Rr(t)&&(null!==(n=t.getDescendantByIndex(r))&&n!==e&&t.getChildAtIndex(r)===n&&(n=n.getPreviousSibling()),t=null!=n?n:t),e=e.is(t)?Rr(e)&&0<e.getChildrenSize()?[]:[e]:e.getNodesBetween(t),mr()||(this._cachedNodes=e),e}setTextNodeRange(e,t,n,r){$n(this.anchor,e.__key,t,"text"),$n(this.focus,n.__key,r,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){let e=this.getNodes();if(0===e.length)return"";let t=e[0],n=e[e.length-1],r=this.anchor,o=this.focus,i=r.isBefore(o),[l,a]=Gn(this),s="",u=!0;for(let c=0;c<e.length;c++){let d=e[c];if(Rr(d)&&!d.isInline())u||(s+="\n"),u=!d.isEmpty();else if(u=!1,Rn(d)){let e=d.getTextContent();d===t?d===n?"element"===r.type&&"element"===o.type&&o.offset!==r.offset||(e=l<a?e.slice(l,a):e.slice(a,l)):e=i?e.slice(l):e.slice(a):d===n&&(e=i?e.slice(0,a):e.slice(0,l)),s+=e}else!Ar(d)&&!mn(d)||d===n&&this.isCollapsed()||(s+=d.getTextContent())}return s}applyDOMRange(e){let t=vr(),n=t.getEditorState()._selection;if(null!==(e=qn(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n))){var[r,o]=e;$n(this.anchor,r.key,r.offset,r.type),$n(this.focus,o.key,o.offset,o.type),this._cachedNodes=null}}clone(){let e=this.anchor,t=this.focus;return new jn(new Ln(e.key,e.offset,e.type),new Ln(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=Ee(this.format,e,null),this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){return!!(this.format&q[e])}insertRawText(e){let t=[],n=(e=e.split(/(\r?\n|\t)/)).length;for(let r=0;r<n;r++){let n=e[r];"\n"===n||"\r\n"===n?t.push(fn()):"\t"===n?t.push(Mn()):t.push(Nn(n))}this.insertNodes(t)}insertText(e){var t=this.anchor,n=this.focus,r=this.isCollapsed()||t.isBefore(n),o=this.format,i=this.style;r&&"element"===t.type?Dn(t,n,o,i):r||"element"!==n.type||Dn(n,t,o,i);var l=this.getNodes(),a=l.length,s=r?n:t;n=(r?t:n).offset;var u=s.offset;Rn(t=l[0])||I(26),r=t.getTextContent().length;var c=t.getParentOrThrow(),d=l[a-1];if(this.isCollapsed()&&n===r&&(t.isSegmented()||t.isToken()||!t.canInsertTextAfter()||!c.canInsertTextAfter()&&null===t.getNextSibling())){var p=t.getNextSibling();if(Rn(p)&&p.canInsertTextBefore()&&!xe(p)||((p=Nn()).setFormat(o),c.canInsertTextAfter()?t.insertAfter(p):c.insertAfter(p)),p.select(0,0),t=p,""!==e)return void this.insertText(e)}else if(this.isCollapsed()&&0===n&&(t.isSegmented()||t.isToken()||!t.canInsertTextBefore()||!c.canInsertTextBefore()&&null===t.getPreviousSibling())){if(Rn(p=t.getPreviousSibling())&&!xe(p)||((p=Nn()).setFormat(o),c.canInsertTextBefore()?t.insertBefore(p):c.insertBefore(p)),p.select(),t=p,""!==e)return void this.insertText(e)}else if(t.isSegmented()&&n!==r)(c=Nn(t.getTextContent())).setFormat(o),t.replace(c),t=c;else if(!(this.isCollapsed()||""===e||(p=d.getParent(),c.canInsertTextBefore()&&c.canInsertTextAfter()&&(!Rr(p)||p.canInsertTextBefore()&&p.canInsertTextAfter()))))return this.insertText(""),Qn(this.anchor,this.focus,null),void this.insertText(e);if(1===a)if(t.isToken())(e=Nn(e)).select(),t.replace(e);else{if(l=t.getFormat(),a=t.getStyle(),n===u&&(l!==o||a!==i)){if(""!==t.getTextContent())return(l=Nn(e)).setFormat(o),l.setStyle(i),l.select(),0===n?t.insertBefore(l,!1):([a]=t.splitText(n),a.insertAfter(l,!1)),void(l.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length));t.setFormat(o),t.setStyle(i)}""===(t=t.spliceText(n,u-n,e,!0)).getTextContent()?t.remove():"text"===this.anchor.type&&(t.isComposing()?this.anchor.offset-=e.length:(this.format=l,this.style=a))}else{if(o=new Set([...t.getParentKeys(),...d.getParentKeys()]),p=Rr(t)?t:t.getParentOrThrow(),i=Rr(d)?d:d.getParentOrThrow(),c=d,!p.is(i)&&i.isInline())do{c=i,i=i.getParentOrThrow()}while(i.isInline());"text"===s.type&&(0!==u||""===d.getTextContent())||"element"===s.type&&d.getIndexWithinParent()<u?Rn(d)&&!d.isToken()&&u!==d.getTextContentSize()?(d.isSegmented()&&(s=Nn(d.getTextContent()),d.replace(s),d=s),d=d.spliceText(0,u,""),o.add(d.__key)):(s=d.getParentOrThrow()).canBeEmpty()||1!==s.getChildrenSize()?d.remove():s.remove():o.add(d.__key),s=i.getChildren(),u=new Set(l),d=p.is(i),p=p.isInline()&&null===t.getNextSibling()?p:t;for(let e=s.length-1;0<=e;e--){let n=s[e];if(n.is(t)||Rr(n)&&n.isParentOf(t))break;n.isAttached()&&(!u.has(n)||n.is(c)?d||p.insertAfter(n,!1):n.remove())}if(!d)for(s=i,u=null;null!==s;)(0===(d=(i=s.getChildren()).length)||i[d-1].is(u))&&(o.delete(s.__key),u=s),s=s.getParent();for(t.isToken()?n===r?t.select():((e=Nn(e)).select(),t.replace(e)):""===(t=t.spliceText(n,r-n,e,!0)).getTextContent()?t.remove():t.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length),e=1;e<a;e++)t=l[e],o.has(t.__key)||t.remove()}}removeText(){this.insertText("")}formatText(e){if(this.isCollapsed())this.toggleFormat(e),Te(null);else{var t=this.getNodes(),n=[];for(var r of t)Rn(r)&&n.push(r);var o=n.length;if(0===o)this.toggleFormat(e),Te(null);else{r=this.anchor;var i=this.focus,l=this.isBackward();t=l?i:r,r=l?r:i;var a=0,s=n[0];if(i="element"===t.type?0:t.offset,"text"===t.type&&i===s.getTextContentSize()&&(a=1,s=n[1],i=0),null!=s){l=s.getFormatFlags(e,null);var u=o-1,c=n[u];if(o="text"===r.type?r.offset:c.getTextContentSize(),s.is(c))i!==o&&(0===i&&o===s.getTextContentSize()?s.setFormat(l):(e=s.splitText(i,o),(e=0===i?e[0]:e[1]).setFormat(l),"text"===t.type&&t.set(e.__key,0,"text"),"text"===r.type&&r.set(e.__key,o-i,"text")),this.format=l);else{0!==i&&([,s]=s.splitText(i),i=0),s.setFormat(l);var d=c.getFormatFlags(e,l);for(0<o&&(o!==c.getTextContentSize()&&([c]=c.splitText(o)),c.setFormat(d)),a+=1;a<u;a++){let t=n[a];if(!t.isToken()){let n=t.getFormatFlags(e,d);t.setFormat(n)}}"text"===t.type&&t.set(s.__key,i,"text"),"text"===r.type&&r.set(c.__key,o,"text"),this.format=l|d}}}}}insertNodes(e,t){if(!this.isCollapsed()){var n=this.isBackward()?this.anchor:this.focus,r=n.getNode().getNextSibling();if(r=r?r.getKey():null,n=(n=n.getNode().getPreviousSibling())?n.getKey():null,this.removeText(),this.isCollapsed()&&"element"===this.focus.type){if(this.focus.key===r&&0===this.focus.offset){var o=Nn();this.focus.getNode().insertBefore(o)}else this.focus.key===n&&this.focus.offset===this.focus.getNode().getChildrenSize()&&(o=Nn(),this.focus.getNode().insertAfter(o));o&&(this.focus.set(o.__key,0,"text"),this.anchor.set(o.__key,0,"text"))}}n=(o=this.anchor).offset;var i=o.getNode();r=i,"element"===o.type&&(r=null===(r=(o=o.getNode()).getChildAtIndex(n-1))?o:r),o=[];var l=i.getNextSiblings(),a=et(i)?null:i.getTopLevelElementOrThrow();if(Rn(i))if(r=i.getTextContent().length,0===n&&0!==r)r=null!==(r=i.getPreviousSibling())?r:i.getParentOrThrow(),o.push(i);else if(n===r)r=i;else{if(i.isToken())return!1;[r,i]=i.splitText(n),o.push(i)}i=r,o.push(...l),l=e[0];var s=!1,u=null;for(let t=0;t<e.length;t++){var c=e[t];if(et(r)||Ar(r)||!Rr(c)||c.isInline())s&&!Rr(c)&&!Ar(c)&&et(r.getParent())&&I(28);else{if(c.is(l)){if(Rr(r)&&r.isEmpty()&&r.canReplaceWith(c)){r.replace(c),r=c,s=!0;continue}if(Ce(s=c.getFirstDescendant())){for(var d=s.getParentOrThrow();d.isInline();)d=d.getParentOrThrow();if(s=(u=d.getChildren()).length,Rr(r)){var p=r.getFirstChild();for(let e=0;e<s;e++){let t=u[e];null===p?r.append(t):p.insertAfter(t),p=t}}else{for(p=s-1;0<=p;p--)r.insertAfter(u[p]);r=r.getParentOrThrow()}if(u=u[s-1],d.remove(),s=!0,d.is(c))continue}}Rn(r)&&(null===a&&I(27),r=a)}s=!1,Rr(r)&&!r.isInline()?(u=c,Ar(c)&&!c.isInline()?r=r.insertAfter(c,!1):Rr(c)?!c.canBeEmpty()&&c.isEmpty()||(Lr(r)?(null!==(d=r.getChildAtIndex(n))?d.insertBefore(c):r.append(c),r=c):c.isInline()?(r.append(c),r=c):r=r.insertAfter(c,!1)):(null!==(d=r.getFirstChild())?d.insertBefore(c):r.append(c),r=c)):!Rr(c)||Rr(c)&&c.isInline()||Ar(r)&&!r.isInline()?(u=c,Bn(this)&&Ar(c)&&(Rr(r)||Rn(r))&&!c.isInline()?(Rn(r)?(d=r.getParentOrThrow(),[r]=r.splitText(n),r=r.getIndexWithinParent()+1):(d=r,r=n),[,r]=at(d,r),r=r.insertBefore(c)):r=r.insertAfter(c,!1)):(c=r.getParentOrThrow(),mn(r)&&r.remove(),r=c,t--)}if(t&&(Rn(i)?i.select():Rn(e=r.getPreviousSibling())?e.select():(e=r.getIndexWithinParent(),r.getParentOrThrow().select(e,e))),Rr(r)){if(e=Rn(u)?u:Rr(u)&&u.isInline()?u.getLastDescendant():r.getLastDescendant(),t||(null===e?r.select():Rn(e)?""===e.getTextContent()?e.selectPrevious():e.select():e.selectNext()),0!==o.length)for(t=r,e=o.length-1;0<=e;e--)a=(n=o[e]).getParentOrThrow(),!Rr(r)||Jn(n)||Ar(n)&&(!n.isInline()||n.isIsolated())?Rr(r)||Jn(n)?Rr(n)&&!n.canInsertAfter(r)?(Rr(i=a.constructor.clone(a))||I(29),i.append(n),r.insertAfter(i)):r.insertAfter(n):(r.insertBefore(n),r=n):(t===r?r.append(n):r.insertBefore(n),r=n),a.isEmpty()&&!a.canBeEmpty()&&a.remove()}else t||(Rn(r)?r.select():(t=r.getParentOrThrow(),e=r.getIndexWithinParent()+1,t.select(e,e)));return!0}insertParagraph(){this.isCollapsed()||this.removeText();var e=this.anchor,t=e.offset,n=[];if("text"===e.type){var r=e.getNode(),o=r.getNextSiblings().reverse(),i=r.getParentOrThrow(),l=i.isInline(),a=l?i.getTextContentSize():r.getTextContentSize();0===t?o.push(r):(l&&(n=i.getNextSiblings()),t===a||l&&t===r.getTextContentSize()||([,r]=r.splitText(t),o.push(r)))}else{if(et(i=e.getNode()))return o=Br(),n=i.getChildAtIndex(t),o.select(),void(null!==n?n.insertBefore(o,!1):i.append(o));o=i.getChildren().slice(t).reverse()}if(r=o.length,0===t&&0<r&&i.isInline()){if(Rr(o=(n=i.getParentOrThrow()).insertNewAfter(this,!1)))for(n=n.getChildren(),i=0;i<n.length;i++)o.append(n[i])}else if(null===(l=i.insertNewAfter(this,!1)))this.insertLineBreak();else if(Rr(l))if(a=i.getFirstChild(),0===t&&(i.is(e.getNode())||a&&a.is(e.getNode()))&&0<r)i.insertBefore(l);else{if(i=null,t=n.length,e=l.getParentOrThrow(),0<t)for(a=0;a<t;a++)e.append(n[a]);if(0!==r)for(n=0;n<r;n++)t=o[n],null===i?l.append(t):i.insertBefore(t),i=t;l.canBeEmpty()||0!==l.getChildrenSize()?l.selectStart():(l.selectPrevious(),l.remove())}}insertLineBreak(e){let t=fn();var n=this.anchor;"element"===n.type&&(Lr(n=n.getNode())&&this.insertParagraph()),e?this.insertNodes([t],!0):this.insertNodes([t])&&t.selectNext(0,0)}getCharacterOffsets(){return Gn(this)}extract(){var e=this.getNodes(),t=e.length,n=t-1,r=this.anchor;let o=this.focus;var i=e[0];let l=e[n],[a,s]=Gn(this);return 0===t?[]:1===t?Rn(i)&&!this.isCollapsed()?(e=a>s?s:a,n=i.splitText(e,a>s?a:s),null!=(e=0===e?n[0]:n[1])?[e]:[]):[i]:(t=r.isBefore(o),Rn(i)&&((r=t?a:s)===i.getTextContentSize()?e.shift():0!==r&&([,i]=i.splitText(r),e[0]=i)),Rn(l)&&(i=l.getTextContent().length,0===(t=t?s:a)?e.pop():t!==i&&([l]=l.splitText(t),e[n]=l)),e)}modify(e,t,n){var r=this.focus,o=this.anchor,i="move"===e,l=Ye(r,t);if(Ar(l)&&!l.isIsolated())i&&l.isKeyboardSelectable()?((t=Zn()).add(l.__key),Ie(t)):Rn(e=t?l.getPreviousSibling():l.getNextSibling())?(l=e.__key,t=t?e.getTextContent().length:0,r.set(l,t,"text"),i&&o.set(l,t,"text")):(n=l.getParentOrThrow(),Rr(e)?(n=e.__key,l=t?e.getChildrenSize():0):(l=l.getIndexWithinParent(),n=n.__key,t||l++),r.set(n,l,"element"),i&&o.set(n,l,"element"));else if(r=lt((o=vr())._window)){var a=o._blockCursorElement,s=o._rootElement;if(null===s||null===a||!Rr(l)||l.isInline()||l.canBeEmpty()||it(a,o,s),r.modify(e,t?"backward":"forward",n),0<r.rangeCount&&(l=r.getRangeAt(0),o=Lr(o=this.anchor.getNode())?o:Ze(o),this.applyDOMRange(l),this.dirty=!0,!i)){for(i=this.getNodes(),e=[],n=!1,a=0;a<i.length;a++)Je(s=i[a],o)?e.push(s):n=!0;n&&0<e.length&&(t?Rr(t=e[0])?t.selectStart():t.getParentOrThrow().selectStart():Rr(t=e[e.length-1])?t.selectEnd():t.getParentOrThrow().selectEnd()),r.anchorNode===l.startContainer&&r.anchorOffset===l.startOffset||(t=this.focus,r=(i=this.anchor).key,l=i.offset,o=i.type,$n(i,t.key,t.offset,t.type),$n(t,r,l,o),this._cachedNodes=null)}}}deleteCharacter(t){let n=this.isCollapsed();if(this.isCollapsed()){var r=this.anchor,o=this.focus,i=r.getNode();if(!t&&("element"===r.type&&Rr(i)&&r.offset===i.getChildrenSize()||"text"===r.type&&r.offset===i.getTextContentSize())){var l=i.getParent();if(Rr(l=i.getNextSibling()||(null===l?null:l.getNextSibling()))&&l.isShadowRoot())return}if(Ar(l=Ye(o,t))&&!l.isIsolated())return void(l.isKeyboardSelectable()&&Rr(i)&&0===i.getChildrenSize()?(i.remove(),t=Zn(),t.add(l.__key),Ie(t)):(l.remove(),vr().dispatchCommand(e,void 0)));if(!t&&Rr(l)&&Rr(i)&&i.isEmpty())return i.remove(),void l.selectStart();if(this.modify("extend",t,"character"),this.isCollapsed()){if(t&&0===r.offset&&("element"===r.type?r.getNode():r.getNode().getParentOrThrow()).collapseAtStart(this))return}else{if(l="text"===o.type?o.getNode():null,i="text"===r.type?r.getNode():null,null!==l&&l.isSegmented()){if(r=o.offset,o=l.getTextContentSize(),l.is(i)||t&&r!==o||!t&&0!==r)return void Yn(l,t,r)}else if(null!==i&&i.isSegmented()&&(r=r.offset,o=i.getTextContentSize(),i.is(l)||t&&0!==r||!t&&r!==o))return void Yn(i,t,r);if(i=this.anchor,l=this.focus,(r=i.getNode())===(o=l.getNode())&&"text"===i.type&&"text"===l.type){var a=i.offset,s=l.offset;let e=a<s;(o=e?a:s)!==(a=(s=e?s:a)-1)&&($e(r=r.getTextContent().slice(o,s))||(t?l.offset=a:i.offset=a))}}}this.removeText(),t&&!n&&this.isCollapsed()&&"element"===this.anchor.type&&0===this.anchor.offset&&((t=this.anchor.getNode()).isEmpty()&&Lr(t.getParent())&&0===t.getIndexWithinParent()&&t.collapseAtStart(this))}deleteLine(e){this.isCollapsed()&&("text"===this.anchor.type&&this.modify("extend",e,"lineboundary"),0===(e?this.focus:this.anchor).offset&&this.modify("extend",e,"character")),this.removeText()}deleteWord(e){this.isCollapsed()&&this.modify("extend",e,"word"),this.removeText()}}function Wn(e){return e instanceof zn}function Kn(e){let t=e.offset;return"text"===e.type?t:t===(e=e.getNode()).getChildrenSize()?e.getTextContent().length:0}function Gn(e){let t=e.anchor;return e=e.focus,"element"===t.type&&"element"===e.type&&t.key===e.key&&t.offset===e.offset?[0,0]:[Kn(t),Kn(e)]}function Yn(e,t,n){let r=e.getTextContent().split(/(?=\s)/g),o=r.length,i=0,l=0;for(let e=0;e<o;e++){let a=e===o-1;if(l=i,i+=r[e].length,t&&i===n||i>n||a){r.splice(e,1),a&&(l=void 0);break}}""===(t=r.join("").trim())?e.remove():(e.setTextContent(t),e.select(l,l))}function Un(e,t,n,r){var o=t;if(1===e.nodeType){let a=!1;var i=e.childNodes,l=i.length;o===l&&(a=!0,o=l-1);let s=i[o];if(l=!1,s===r._blockCursorElement?(s=i[o+1],l=!0):null!==r._blockCursorElement&&o--,Rn(r=De(s)))o=a?r.getTextContentSize():0;else{if(null===(i=De(e)))return null;if(Rr(i)?((t=Rr(e=i.getChildAtIndex(o)))&&(t=e.getParent(),t=null===n||null===t||!t.canBeEmpty()||t!==n.getNode()),t&&(null===(n=a?e.getLastDescendant():e.getFirstDescendant())?(i=e,o=0):i=Rr(e=n)?e:e.getParentOrThrow()),Rn(e)?(r=e,i=null,o=a?e.getTextContentSize():0):e!==i&&a&&!l&&o++):(o=i.getIndexWithinParent(),o=0===t&&Ar(i)&&De(e)===i?o:o+1,i=i.getParentOrThrow()),Rr(i))return new Ln(i.__key,o,"element")}}else r=De(e);return Rn(r)?new Ln(r.__key,o,"text"):null}function Vn(e,t,n){var r=e.offset,o=e.getNode();0===r?(r=o.getPreviousSibling(),o=o.getParent(),t?(n||!t)&&null===r&&Rr(o)&&o.isInline()&&(Rn(t=o.getPreviousSibling())&&(e.key=t.__key,e.offset=t.getTextContent().length)):Rr(r)&&!n&&r.isInline()?(e.key=r.__key,e.offset=r.getChildrenSize(),e.type="element"):Rn(r)&&(e.key=r.__key,e.offset=r.getTextContent().length)):r===o.getTextContent().length&&(r=o.getNextSibling(),o=o.getParent(),t&&Rr(r)&&r.isInline()?(e.key=r.__key,e.offset=0,e.type="element"):(n||t)&&null===r&&Rr(o)&&o.isInline()&&!o.canInsertTextAfter()&&(Rn(t=o.getNextSibling())&&(e.key=t.__key,e.offset=0)))}function Qn(e,t,n){if("text"===e.type&&"text"===t.type){var r=e.isBefore(t);let o=e.is(t);Vn(e,r,o),Vn(t,!r,o),o&&(t.key=e.key,t.offset=e.offset,t.type=e.type),(r=vr()).isComposing()&&r._compositionKey!==e.key&&Bn(n)&&(r=n.anchor,n=n.focus,$n(e,r.key,r.offset,r.type),$n(t,n.key,n.offset,n.type))}}function qn(e,t,n,r,o,i){return null!==e&&null!==n&&be(o,e,n)?null===(t=Un(e,t,Bn(i)?i.anchor:null,o))||null===(r=Un(n,r,Bn(i)?i.focus:null,o))||"element"===t.type&&"element"===r.type&&(e=De(e),n=De(n),Ar(e)&&Ar(n))?null:(Qn(t,r,i),[t,r]):null}function Jn(e){return Rr(e)&&!e.isInline()}function Xn(e,t,n,r,o,i){let l=hr();return(e=new jn(new Ln(e,t,o),new Ln(n,r,i),0,"")).dirty=!0,l._selection=e}function Zn(){return new zn(new Set)}function er(e,t,n){var r=n._window;if(null===r)return null;var o=r.event,i=o?o.type:void 0;let l;if(r="selectionchange"===i,o=!re&&(r||"beforeinput"===i||"compositionstart"===i||"compositionend"===i||"click"===i&&o&&3===o.detail||"drop"===i||void 0===i),Bn(e)&&!o)return e.clone();if(null===t)return null;if(o=t.anchorNode,i=t.focusNode,l=t.anchorOffset,t=t.focusOffset,r&&Bn(e)&&!be(n,o,i))return e.clone();if(null===(n=qn(o,l,i,t,n,e)))return null;let[a,s]=n;return new jn(a,s,Bn(e)?e.format:0,Bn(e)?e.style:"")}function tr(){return hr()._selection}function nr(){return vr()._editorState._selection}function rr(e,t,n,r=1){var o=e.anchor,i=e.focus,l=o.getNode(),a=i.getNode();if(t.is(l)||t.is(a)){if(l=t.__key,e.isCollapsed())(n<=(t=o.offset)&&0<r||n<t&&0>r)&&(n=Math.max(0,t+r),o.set(l,n,"element"),i.set(l,n,"element"),or(e));else{let u=e.isBackward();var s=(a=u?i:o).getNode();i=(o=u?o:i).getNode(),t.is(s)&&((n<=(s=a.offset)&&0<r||n<s&&0>r)&&a.set(l,Math.max(0,s+r),"element")),t.is(i)&&((n<=(t=o.offset)&&0<r||n<t&&0>r)&&o.set(l,Math.max(0,t+r),"element"))}or(e)}}function or(e){var t=e.anchor,n=t.offset;let r=e.focus;var o=r.offset,i=t.getNode(),l=r.getNode();if(e.isCollapsed())Rr(i)&&(Rn(l=(o=n>=(l=i.getChildrenSize()))?i.getChildAtIndex(l-1):i.getChildAtIndex(n))&&(n=0,o&&(n=l.getTextContentSize()),t.set(l.__key,n,"text"),r.set(l.__key,n,"text")));else{if(Rr(i)){let r=i.getChildrenSize();Rn(n=(e=n>=r)?i.getChildAtIndex(r-1):i.getChildAtIndex(n))&&(i=0,e&&(i=n.getTextContentSize()),t.set(n.__key,i,"text"))}Rr(l)&&(Rn(o=(t=o>=(n=l.getChildrenSize()))?l.getChildAtIndex(n-1):l.getChildAtIndex(o))&&(l=0,t&&(l=o.getTextContentSize()),r.set(o.__key,l,"text")))}}function ir(e,t,n,r,o){let i=null,l=0,a=null;null!==r?(i=r.__key,Rn(r)?(l=r.getTextContentSize(),a="text"):Rr(r)&&(l=r.getChildrenSize(),a="element")):null!==o&&(i=o.__key,Rn(o)?a="text":Rr(o)&&(a="element")),null!==i&&null!==a?e.set(i,l,a):(l=t.getIndexWithinParent(),-1===l&&(l=n.getChildrenSize()),e.set(n.__key,l,"element"))}function lr(e,t,n,r,o){"text"===e.type?(e.key=n,t||(e.offset+=o)):e.offset>r.getIndexWithinParent()&&--e.offset}function ar(e,t,n){let r=[],o=null,i=null;e=e.getChildren();for(let c=0;c<e.length;c++){var l=e[c];Ur(l)||I(108);var a=l.getChildren();l=0;for(let e of a){for(Wr(e)||I(109);void 0!==r[c]&&void 0!==r[c][l];)l++;var s=l,u=e;let d={cell:u,startColumn:s,startRow:a=c},p=u.__rowSpan,f=u.__colSpan;for(let e=0;e<p;e++){void 0===r[a+e]&&(r[a+e]=[]);for(let t=0;t<f;t++)r[a+e][s+t]=d}t.is(u)&&(o=d),n.is(u)&&(i=d),l+=e.__colSpan}}return null===o&&I(110),null===i&&I(111),[r,o,i]}let sr=null,ur=null,cr=!1,dr=!1,pr=0,fr={characterData:!0,childList:!0,subtree:!0};function mr(){return cr||null!==sr&&sr._readOnly}function gr(){cr&&I(13)}function hr(){return null===sr&&I(15),sr}function vr(){return null===ur&&I(16),ur}function br(e,t,n){var r=t.__type;let o=e._nodes.get(r);for(void 0===o&&I(30,r),void 0===(e=n.get(r))&&(e=Array.from(o.transforms),n.set(r,e)),n=e.length,r=0;r<n&&(e[r](t),t.isAttached());r++);}function yr(e,t){var n=e.type,r=t.get(n);if(void 0===r&&I(17,n),n=r.klass,e.type!==n.getType()&&I(18,n.name),n=n.importJSON(e),e=e.children,Rr(n)&&Array.isArray(e))for(r=0;r<e.length;r++){let o=yr(e[r],t);n.append(o)}return n}function xr(e,t){let n=sr,r=cr,o=ur;sr=e,cr=!0,ur=null;try{return t()}finally{sr=n,cr=r,ur=o}}function _r(t,n){let r=t._pendingEditorState,o=t._rootElement,i=t._headless||null===o;if(null!==r){var l=t._editorState,a=l._selection,s=r._selection,u=0!==t._dirtyType,c=sr,d=cr,p=ur,f=t._updating,m=t._observer,g=null;if(t._pendingEditorState=null,t._editorState=r,!i&&u&&null!==m){ur=t,sr=r,cr=!1,t._updating=!0;try{let e=t._dirtyType,n=t._dirtyElements,o=t._dirtyLeaves;m.disconnect();var h=n,v=o;Et=Ct=_t="",St=2===e,kt=null,pt=t,dt=t._config,ft=t._nodes,mt=pt._listeners.mutation,gt=h,ht=v,vt=l._nodeMap,bt=r._nodeMap,wt=r._readOnly,yt=new Map(t._keyToDOMMap);let i=new Map;xt=i,zt("root",null),xt=yt=dt=bt=vt=ht=gt=ft=pt=void 0,g=i}catch(e){if(e instanceof Error&&t._onError(e),dr)throw e;return Fr(t,null,o,r),ue(t),t._dirtyType=2,dr=!0,_r(t,l),void(dr=!1)}finally{m.observe(o,fr),t._updating=f,sr=c,cr=d,ur=p}}r._readOnly||(r._readOnly=!0);var b=t._dirtyLeaves,y=t._dirtyElements,x=t._normalizedNodes,_=t._updateTags,E=t._deferred;u&&(t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements=new Map,t._normalizedNodes=new Set,t._updateTags=new Set);var C,S=t._decorators,w=t._pendingDecorators||S,k=r._nodeMap;for(C in w)k.has(C)||(w===S&&(w=Me(t)),delete w[C]);var T=i?null:lt(t._window);if(t._editable&&null!==T&&(u||null===s||s.dirty)){ur=t,sr=r;try{if(null!==m&&m.disconnect(),u||null===s||s.dirty){let e=t._blockCursorElement;null!==e&&it(e,t,o);e:{let e=T.anchorNode,n=T.focusNode,r=T.anchorOffset,i=T.focusOffset,l=document.activeElement;if(!(_.has("collaboration")&&l!==o||null!==l&&ve(l)))if(Bn(s)){var A=s.anchor,N=s.focus,R=A.key,O=N.key,M=Qe(t,R),L=Qe(t,O),P=A.offset,I=N.offset,D=s.format,$=s.style,z=s.isCollapsed(),B=M,F=L,H=!1;if("text"===A.type){B=_e(M);let e=A.getNode();H=e.getFormat()!==D||e.getStyle()!==$}else Bn(a)&&"text"===a.anchor.type&&(H=!0);if("text"===N.type&&(F=_e(L)),null!==B&&null!==F){if(z&&(null===a||H||Bn(a)&&(a.format!==D||a.style!==$))){var j=performance.now();Zt=[D,$,P,R,j]}if(r===P&&i===I&&e===B&&n===F&&("Range"!==T.type||!z)&&(null!==l&&o.contains(l)||o.focus({preventScroll:!0}),"element"!==A.type))break e;try{T.setBaseAndExtent(B,P,F,I)}catch(e){}if(!_.has("skip-scroll-into-view")&&s.isCollapsed()&&null!==o&&o===document.activeElement){let e=s instanceof jn&&"element"===s.anchor.type?B.childNodes[P]||null:0<T.rangeCount?T.getRangeAt(0):null;if(null!==e){let n;if(e instanceof Text){let t=document.createRange();t.selectNode(e),n=t.getBoundingClientRect()}else n=e.getBoundingClientRect();let r=o.ownerDocument,i=r.defaultView;if(null!==i)for(var W,K,{top:G,bottom:Y}=n,U=o;null!==U;){let e=U===r.body;if(e)W=0,K=Xe(t).innerHeight;else{let e=U.getBoundingClientRect();W=e.top,K=e.bottom}let n=0;if(G<W?n=-(W-G):Y>K&&(n=Y-K),0!==n)if(e)i.scrollBy(0,n);else{let e=U.scrollTop;U.scrollTop+=n;let t=U.scrollTop-e;G-=t,Y-=t}if(e)break;U=qe(U)}}}Qt=!0}}else null!==a&&be(t,e,n)&&T.removeAllRanges()}}e:{let e=t._blockCursorElement;if(Bn(s)&&s.isCollapsed()&&"element"===s.anchor.type&&o.contains(document.activeElement)){let n=s.anchor,r=n.getNode(),i=n.offset,l=r.getChildrenSize(),a=!1,u=null;if(i===l){ot(r.getChildAtIndex(i-1))&&(a=!0)}else{let e=r.getChildAtIndex(i);if(ot(e)){let n=e.getPreviousSibling();(null===n||ot(n))&&(a=!0,u=t.getElementByKey(e.__key))}}if(a){let n=t.getElementByKey(r.__key);if(null===e){let n=t._config.theme,r=document.createElement("div");r.contentEditable="false",r.setAttribute("data-lexical-cursor","true");let o=n.blockCursor;if(void 0!==o){if("string"==typeof o){let e=o.split(" ");o=n.blockCursor=e}void 0!==o&&r.classList.add(...o)}t._blockCursorElement=e=r}o.style.caretColor="transparent",null===u?n.appendChild(e):n.insertBefore(e,u);break e}}null!==e&&it(e,t,o)}null!==m&&m.observe(o,fr)}finally{ur=p,sr=c}}if(null!==g){var V=g;let e=Array.from(t._listeners.mutation),n=e.length;for(let t=0;t<n;t++){let[n,r]=e[t],o=V.get(r);void 0!==o&&n(o,{dirtyLeaves:b,updateTags:_})}}Bn(s)||null===s||null!==a&&a.is(s)||t.dispatchCommand(e,void 0);var Q=t._pendingDecorators;null!==Q&&(t._decorators=Q,t._pendingDecorators=null,Er("decorator",t,!0,Q));var q=Le(n||l),J=Le(r);if(q!==J&&Er("textcontent",t,!0,J),Er("update",t,!0,{dirtyElements:y,dirtyLeaves:b,editorState:r,normalizedNodes:x,prevEditorState:n||l,tags:_}),t._deferred=[],0!==E.length){let e=t._updating;t._updating=!0;try{for(let e=0;e<E.length;e++)E[e]()}finally{t._updating=e}}var X=t._updates;if(0!==X.length){let e=X.shift();if(e){let[n,r]=e;wr(t,n,r)}}}}function Er(e,t,n,...r){let o=t._updating;t._updating=n;try{let n=Array.from(t._listeners[e]);for(e=0;e<n.length;e++)n[e].apply(null,r)}finally{t._updating=o}}function Cr(e,t,n){if(!1===e._updating||ur!==e){let r=!1;return e.update((()=>{r=Cr(e,t,n)})),r}let r=ze(e);for(let i=4;0<=i;i--)for(let l=0;l<r.length;l++){var o=r[l]._commands.get(t);if(void 0!==o&&void 0!==(o=o[i])){let t=(o=Array.from(o)).length;for(let r=0;r<t;r++)if(!0===o[r](n,e))return!0}}return!1}function Sr(e,t){let n=e._updates;for(t=t||!1;0!==n.length;){var r=n.shift();if(r){let n,[o,i]=r;void 0!==i&&(r=i.onUpdate,n=i.tag,i.skipTransforms&&(t=!0),r&&e._deferred.push(r),n&&e._updateTags.add(n)),o()}}return t}function wr(e,t,n){let r=e._updateTags;var o,i=o=!1;if(void 0!==n){var l=n.onUpdate;null!=(o=n.tag)&&r.add(o),o=n.skipTransforms||!1,i=n.discrete||!1}l&&e._deferred.push(l),n=e._editorState;let a=!1;(null===(l=e._pendingEditorState)||l._readOnly)&&(l=e._pendingEditorState=new Dr(new Map((l||n)._nodeMap)),a=!0),l._flushSync=i,i=sr;let s=cr,u=ur,c=e._updating;sr=l,cr=!1,e._updating=!0,ur=e;try{a&&(e._headless?null!=n._selection&&(l._selection=n._selection.clone()):l._selection=function(e){let t=e.getEditorState()._selection,n=lt(e._window);return Wn(t)||Hn(t)?t.clone():er(t,n,e)}(e));let r=e._compositionKey;t(),o=Sr(e,o),function(e,t){if(t=t.getEditorState()._selection,Bn(e=e._selection)){var n=e.anchor;let r,o=e.focus;"text"===n.type&&(r=n.getNode(),r.selectionTransform(t,e)),"text"===o.type&&r!==(n=o.getNode())&&n.selectionTransform(t,e)}}(l,e),0!==e._dirtyType&&(o?function(e,t){t=t._dirtyLeaves,e=e._nodeMap;for(let n of t)Rn(t=e.get(n))&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&pe(t)}(l,e):function(e,t){let n=t._dirtyLeaves,r=t._dirtyElements;e=e._nodeMap;let o=Ae(),i=new Map;var l=n;let a=l.size;for(var s=r,u=s.size;0<a||0<u;){if(0<a){t._dirtyLeaves=new Set;for(let r of l)Rn(l=e.get(r))&&l.isAttached()&&l.isSimpleText()&&!l.isUnmergeable()&&pe(l),void 0!==l&&void 0!==l&&l.__key!==o&&l.isAttached()&&br(t,l,i),n.add(r);if(a=(l=t._dirtyLeaves).size,0<a){pr++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map;for(let n of s)s=n[0],u=n[1],("root"===s||u)&&(void 0!==(l=e.get(s))&&void 0!==l&&l.__key!==o&&l.isAttached()&&br(t,l,i),r.set(s,u));a=(l=t._dirtyLeaves).size,u=(s=t._dirtyElements).size,pr++}t._dirtyLeaves=n,t._dirtyElements=r}(l,e),Sr(e),function(e,t,n,r){e=e._nodeMap,t=t._nodeMap;let o=[];for(let[n]of r){let i=t.get(n);void 0===i||i.isAttached()||(Rr(i)&&ct(i,n,e,t,o,r),e.has(n)||r.delete(n),o.push(n))}for(let e of o)t.delete(e);for(let o of n)void 0===(r=t.get(o))||r.isAttached()||(e.has(o)||n.delete(o),t.delete(o))}(n,l,e._dirtyLeaves,e._dirtyElements)),r!==e._compositionKey&&(l._flushSync=!0);let i=l._selection;if(Bn(i)){let e=l._nodeMap,t=i.focus.key;void 0!==e.get(i.anchor.key)&&void 0!==e.get(t)||I(19)}else Wn(i)&&0===i._nodes.size&&(l._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=n,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void _r(e)}finally{sr=i,cr=s,ur=u,e._updating=c,pr=0}0!==e._dirtyType||function(e,t){if(t=t.getEditorState()._selection,e=e._selection,null!==e){if(e.dirty||!e.is(t))return!0}else if(null!==t)return!0;return!1}(l,e)?l._flushSync?(l._flushSync=!1,_r(e)):a&&he((()=>{_r(e)})):(l._flushSync=!1,a&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function kr(e,t,n){e._updating?e._updates.push([t,n]):wr(e,t,n)}class Tr extends cn{constructor(e){super(e)}decorate(){I(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Ar(e){return e instanceof Tr}class Nr extends cn{constructor(e){super(e),this.__last=this.__first=null,this.__indent=this.__format=this.__size=0,this.__dir=null}getFormat(){return this.getLatest().__format}getFormatType(){let e=this.getFormat();return ee[e]||""}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=vr()._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(Rn(t)&&e.push(t),Rr(t)){let n=t.getAllTextNodes();e.push(...n)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;null!==e;){if(Rr(e)){let t=e.getFirstChild();if(null!==t){e=t;continue}}break}return e}getLastDescendant(){let e=this.getLastChild();for(;null!==e;){if(Rr(e)){let t=e.getLastChild();if(null!==t){e=t;continue}}break}return e}getDescendantByIndex(e){let t=this.getChildren(),n=t.length;return e>=n?Rr(e=t[n-1])&&e.getLastDescendant()||e||null:Rr(e=t[e])&&e.getFirstDescendant()||e||null}getFirstChild(){let e=this.getLatest().__first;return null===e?null:Ne(e)}getFirstChildOrThrow(){let e=this.getFirstChild();return null===e&&I(45,this.__key),e}getLastChild(){let e=this.getLatest().__last;return null===e?null:Ne(e)}getLastChildOrThrow(){let e=this.getLastChild();return null===e&&I(96,this.__key),e}getChildAtIndex(e){var t=this.getChildrenSize();let n;if(e<t/2){for(n=this.getFirstChild(),t=0;null!==n&&t<=e;){if(t===e)return n;n=n.getNextSibling(),t++}return null}for(n=this.getLastChild(),--t;null!==n&&t>=e;){if(t===e)return n;n=n.getPreviousSibling(),t--}return null}getTextContent(){let e="",t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let o=t[r];e+=o.getTextContent(),Rr(o)&&r!==n-1&&!o.isInline()&&(e+="\n\n")}return e}getTextContentSize(){let e=0,t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let o=t[r];e+=o.getTextContentSize(),Rr(o)&&r!==n-1&&!o.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}hasFormat(e){return""!==e&&(e=Z[e],!!(this.getFormat()&e))}select(e,t){gr();let n=tr(),r=e,o=t;var i=this.getChildrenSize();if(!this.canBeEmpty())if(0===e&&0===t){if(Rn(e=this.getFirstChild())||Rr(e))return e.select(0,0)}else if(!(void 0!==e&&e!==i||void 0!==t&&t!==i)&&(Rn(e=this.getLastChild())||Rr(e)))return e.select();return void 0===r&&(r=i),void 0===o&&(o=i),i=this.__key,Bn(n)?(n.anchor.set(i,r,"element"),n.focus.set(i,o,"element"),n.dirty=!0,n):Xn(i,r,i,o,"element","element")}selectStart(){let e=this.getFirstDescendant();return Rr(e)||Rn(e)?e.select(0,0):null!==e?e.selectPrevious():this.select(0,0)}selectEnd(){let e=this.getLastDescendant();return Rr(e)||Rn(e)?e.select():null!==e?e.selectNext():this.select()}clear(){let e=this.getWritable();return this.getChildren().forEach((e=>e.remove())),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){let t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=""!==e?Z[e]:0,this}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,n){let r=n.length,o=this.getChildrenSize(),i=this.getWritable(),l=i.__key;var a=[],s=[];let u=this.getChildAtIndex(e+t),c=null,d=o-t+r;if(0!==e)if(e===o)c=this.getLastChild();else{var p=this.getChildAtIndex(e);null!==p&&(c=p.getPreviousSibling())}if(0<t){var f=null===c?this.getFirstChild():c.getNextSibling();for(p=0;p<t;p++){null===f&&I(100);var m=f.getNextSibling(),g=f.__key;we(f=f.getWritable()),s.push(g),f=m}}for(p=c,m=0;m<r;m++){g=n[m],null!==p&&g.is(p)&&(c=p=p.getPreviousSibling()),(f=g.getWritable()).__parent===l&&d--,we(f);let e=g.__key;null===p?(i.__first=e,f.__prev=null):((p=p.getWritable()).__next=e,f.__prev=p.__key),g.__key===l&&I(76),f.__parent=l,a.push(e),p=g}if(e+t===o?null!==p&&(p.getWritable().__next=null,i.__last=p.__key):null!==u&&(e=u.getWritable(),null!==p?(t=p.getWritable(),e.__prev=p.__key,t.__next=u.__key):e.__prev=null),i.__size=d,s.length&&Bn(e=tr())){s=new Set(s),a=new Set(a);let{anchor:t,focus:n}=e;Or(t,s,a)&&ir(t,t.getNode(),this,c,u),Or(n,s,a)&&ir(n,n.getNode(),this,c,u),0!==d||this.canBeEmpty()||et(this)||this.remove()}return i}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(){return null}canIndent(){return!0}collapseAtStart(){return!1}excludeFromCopy(){return!1}canExtractContents(){return!0}canReplaceWith(){return!0}canInsertAfter(){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(){return!1}extractWithChild(){return!1}}function Rr(e){return e instanceof Nr}function Or(e,t,n){for(e=e.getNode();e;){let r=e.__key;if(t.has(r)&&!n.has(r))return!0;e=e.getParent()}return!1}class Mr extends Nr{static getType(){return"root"}static clone(){return new Mr}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){I(51)}getTextContent(){let e=this.__cachedText;return!mr()&&0!==vr()._dirtyType||null===e?super.getTextContent():e}remove(){I(52)}replace(){I(53)}insertBefore(){I(54)}insertAfter(){I(55)}updateDOM(){return!1}append(...e){for(let t=0;t<e.length;t++){let n=e[t];Rr(n)||Ar(n)||I(56)}return super.append(...e)}static importJSON(e){let t=Pe();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function Lr(e){return e instanceof Mr}function Pr(){return new Dr(new Map([["root",new Mr]]))}function Ir(e){let t=e.exportJSON();var n=e.constructor;t.type!==n.getType()&&I(130,n.name);let r=t.children;if(Rr(e))for(Array.isArray(r)||I(59,n.name),e=e.getChildren(),n=0;n<e.length;n++){let t=Ir(e[n]);r.push(t)}return t}class Dr{constructor(e,t){this._nodeMap=e,this._selection=t||null,this._readOnly=this._flushSync=!1}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(e){return xr(this,e)}clone(e){return(e=new Dr(this._nodeMap,void 0===e?this._selection:e))._readOnly=!0,e}toJSON(){return xr(this,(()=>({root:Ir(Pe())})))}}class $r extends Nr{static getType(){return"paragraph"}static clone(e){return new $r(e.__key)}createDOM(e){let t=document.createElement("p");return void 0!==(e=We(e.theme,"paragraph"))&&t.classList.add(...e),t}updateDOM(){return!1}static importDOM(){return{p:()=>({conversion:zr,priority:0})}}exportDOM(e){if(({element:e}=super.exportDOM(e)),e&&this.isEmpty()&&e.append(document.createElement("br")),e){var t=this.getFormatType();e.style.textAlign=t,(t=this.getDirection())&&(e.dir=t),0<(t=this.getIndent())&&(e.style.textIndent=20*t+"px")}return{element:e}}static importJSON(e){let t=Br();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),type:"paragraph",version:1}}insertNewAfter(e,t){e=Br();let n=this.getDirection();return e.setDirection(n),this.insertAfter(e,t),e}collapseAtStart(){let e=this.getChildren();if(0===e.length||Rn(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 zr(e){let t=Br();return e.style&&(t.setFormat(e.style.textAlign),0<(e=parseInt(e.style.textIndent,10)/20)&&t.setIndent(e)),{node:t}}function Br(){return nt(new $r)}function Fr(e,t,n,r){let o=e._keyToDOMMap;o.clear(),e._editorState=Pr(),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,null!==(r=e._observer)&&(r.disconnect(),e._observer=null),null!==t&&(t.textContent=""),null!==n&&(n.textContent="",o.set("root",n))}class Hr{constructor(e,t,n,r,o,i,l){this._parentEditor=t,this._rootElement=null,this._editorState=e,this._compositionKey=this._pendingEditorState=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=Be(),this._onError=o,this._htmlConversions=i,this._editable=l,this._headless=null!==t&&t._headless,this._blockCursorElement=this._window=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&&I(35);let r=this._commands;r.has(e)||r.set(e,[new Set,new Set,new Set,new Set,new Set]);let o=r.get(e);void 0===o&&I(36,String(e));let i=o[n];return i.add(t),()=>{i.delete(t),o.every((e=>0===e.size))&&r.delete(e)}}registerMutationListener(e,t){void 0===this._nodes.get(e.getType())&&I(37,e.name);let n=this._listeners.mutation;return n.set(t,e),()=>{n.delete(t)}}registerNodeTransformToKlass(e,t){var n=e.getType();return void 0===(n=this._nodes.get(n))&&I(37,e.name),n.transforms.add(t),n}registerNodeTransform(e,t){var n=this.registerNodeTransformToKlass(e,t);let r=[n];return null!=(n=n.replaceWithKlass)&&(n=this.registerNodeTransformToKlass(n,t),r.push(n)),function(e,t){kr(e,(()=>{var e=hr();if(!e.isEmpty())if("root"===t)Pe().markDirty();else{e=e._nodeMap;for(let[,t]of e)t.markDirty()}}),null===e._pendingEditorState?{tag:"history-merge"}:void 0)}(this,e.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 Cr(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){let t=this._rootElement;if(e!==t){let i=We(this._config.theme,"root");var n=this._pendingEditorState||this._editorState;if(this._rootElement=e,Fr(this,t,e,n),null!==t){if(!this._config.disableEvents){0!==Vt&&(Vt--,0===Vt&&t.ownerDocument.removeEventListener("selectionchange",sn));var r=t.__lexicalEditor;if(null!=r){if(null!==r._parentEditor){var o=ze(r);o=o[o.length-1]._key,an.get(o)===r&&an.delete(o)}else an.delete(r._key);t.__lexicalEditor=null}for(r=ln(t),o=0;o<r.length;o++)r[o]();t.__lexicalEventHandles=[]}null!=i&&t.classList.remove(...i)}null!==e?(n=(n=e.ownerDocument)&&n.defaultView||null,(r=e.style).userSelect="text",r.whiteSpace="pre-wrap",r.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=n,this._dirtyType=2,ue(this),this._updateTags.add("history-merge"),_r(this),this._config.disableEvents||function(e,t){0===Vt&&e.ownerDocument.addEventListener("selectionchange",sn),Vt++,e.__lexicalEditor=t;let n=ln(e);for(let r=0;r<Wt.length;r++){let[o,i]=Wt[r],a="function"==typeof i?e=>{!0!==e._lexicalHandled&&(e._lexicalHandled=!0,t.isEditable()&&i(e,t))}:e=>{if(!0!==e._lexicalHandled&&(e._lexicalHandled=!0,t.isEditable()))switch(o){case"cut":return Cr(t,O,e);case"copy":return Cr(t,R,e);case"paste":return Cr(t,l,e);case"dragstart":return Cr(t,T,e);case"dragover":return Cr(t,A,e);case"dragend":return Cr(t,N,e);case"focus":return Cr(t,M,e);case"blur":return Cr(t,L,e);case"drop":return Cr(t,k,e)}};e.addEventListener(o,a),n.push((()=>{e.removeEventListener(o,a)}))}}(e,this),null!=i&&e.classList.add(...i)):(this._editorState=n,this._window=this._pendingEditorState=null),Er("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&I(38),se(this);let n=this._pendingEditorState,r=this._updateTags;t=void 0!==t?t.tag:null,null===n||n.isEmpty()||(null!=t&&r.add(t),_r(this)),this._pendingEditorState=e,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,null!=t&&r.add(t),_r(this)}parseEditorState(e,t){e="string"==typeof e?JSON.parse(e):e;let n=Pr(),r=sr,o=cr,i=ur,l=this._dirtyElements,a=this._dirtyLeaves,s=this._cloneNotNeeded,u=this._dirtyType;this._dirtyElements=new Map,this._dirtyLeaves=new Set,this._cloneNotNeeded=new Set,this._dirtyType=0,sr=n,cr=!1,ur=this;try{yr(e.root,this._nodes),t&&t(),n._readOnly=!0}catch(e){e instanceof Error&&this._onError(e)}finally{this._dirtyElements=l,this._dirtyLeaves=a,this._cloneNotNeeded=s,this._dirtyType=u,sr=r,cr=o,ur=i}return n}update(e,t){kr(this,e,t)}focus(e,t={}){let n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),kr(this,(()=>{let e=tr(),n=Pe();null!==e?e.dirty=!0:0!==n.getChildrenSize()&&("rootStart"===t.defaultSelection?n.selectStart():n.selectEnd())}),{onUpdate:()=>{n.removeAttribute("autocapitalize"),e&&e()},tag:"focus"}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){var e=this._rootElement;null!==e&&e.blur(),null!==(e=lt(this._window))&&e.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,Er("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}class jr extends Nr{constructor(e,t){super(t),this.__colSpan=e,this.__rowSpan=1}exportJSON(){return{...super.exportJSON(),colSpan:this.__colSpan,rowSpan:this.__rowSpan}}getColSpan(){return this.__colSpan}setColSpan(e){return this.getWritable().__colSpan=e,this}getRowSpan(){return this.__rowSpan}setRowSpan(e){return this.getWritable().__rowSpan=e,this}}function Wr(e){return e instanceof jr}class Kr extends Nr{}function Gr(e){return e instanceof Kr}class Yr extends Nr{}function Ur(e){return e instanceof Yr}return J.$addUpdateTag=function(e){gr(),vr()._updateTags.add(e)},J.$applyNodeReplacement=nt,J.$copyNode=tt,J.$createLineBreakNode=fn,J.$createNodeSelection=Zn,J.$createParagraphNode=Br,J.$createRangeSelection=function(){let e=new Ln("root",0,"element"),t=new Ln("root",0,"element");return new jn(e,t,0,"")},J.$createTabNode=Mn,J.$createTextNode=Nn,J.$getAdjacentNode=Ye,J.$getNearestNodeFromDOMNode=Oe,J.$getNearestRootOrShadowRoot=Ze,J.$getNodeByKey=Ne,J.$getPreviousSelection=nr,J.$getRoot=Pe,J.$getSelection=tr,J.$getTextContent=function(){let e=tr();return null===e?"":e.getTextContent()},J.$hasAncestor=Je,J.$hasUpdateTag=function(e){return vr()._updateTags.has(e)},J.$insertNodes=function(e,t){let n=tr()||nr();return null===n&&(n=Pe().selectEnd()),n.insertNodes(e,t)},J.$isBlockElementNode=Jn,J.$isDecoratorNode=Ar,J.$isElementNode=Rr,J.$isInlineElementOrDecoratorNode=function(e){return Rr(e)&&e.isInline()||Ar(e)&&e.isInline()},J.$isLeafNode=Ce,J.$isLineBreakNode=mn,J.$isNodeSelection=Wn,J.$isParagraphNode=function(e){return e instanceof $r},J.$isRangeSelection=Bn,J.$isRootNode=Lr,J.$isRootOrShadowRoot=et,J.$isTabNode=function(e){return e instanceof On},J.$isTextNode=Rn,J.$nodesOfType=function(e){var t=hr();let n=t._readOnly,r=e.getType();t=t._nodeMap;let o=[];for(let[,i]of t)i instanceof e&&i.__type===r&&(n||i.isAttached())&&o.push(i);return o},J.$normalizeSelection__EXPERIMENTAL=fe,J.$parseSerializedNode=function(e){return yr(e,vr()._nodes)},J.$setCompositionKey=Te,J.$setSelection=Ie,J.$splitNode=at,J.BLUR_COMMAND=L,J.CAN_REDO_COMMAND={},J.CAN_UNDO_COMMAND={},J.CLEAR_EDITOR_COMMAND={},J.CLEAR_HISTORY_COMMAND={},J.CLICK_COMMAND=t,J.COMMAND_PRIORITY_CRITICAL=4,J.COMMAND_PRIORITY_EDITOR=0,J.COMMAND_PRIORITY_HIGH=3,J.COMMAND_PRIORITY_LOW=1,J.COMMAND_PRIORITY_NORMAL=2,J.CONTROLLED_TEXT_INSERTION_COMMAND=i,J.COPY_COMMAND=R,J.CUT_COMMAND=O,J.DELETE_CHARACTER_COMMAND=n,J.DELETE_LINE_COMMAND=u,J.DELETE_WORD_COMMAND=s,J.DEPRECATED_$computeGridMap=ar,J.DEPRECATED_$createGridSelection=function(){let e=new Ln("root",0,"element"),t=new Ln("root",0,"element");return new Fn("root",e,t)},J.DEPRECATED_$getNodeTriplet=function(e){e instanceof jr||(e instanceof cn?Wr(e=st(e,Wr))||I(114):Wr(e=st(e.getNode(),Wr))||I(114));let t=e.getParent();Ur(t)||I(115);let n=t.getParent();return Gr(n)||I(116),[e,t,n]},J.DEPRECATED_$isGridCellNode=Wr,J.DEPRECATED_$isGridNode=Gr,J.DEPRECATED_$isGridRowNode=Ur,J.DEPRECATED_$isGridSelection=Hn,J.DEPRECATED_GridCellNode=jr,J.DEPRECATED_GridNode=Kr,J.DEPRECATED_GridRowNode=Yr,J.DRAGEND_COMMAND=N,J.DRAGOVER_COMMAND=A,J.DRAGSTART_COMMAND=T,J.DROP_COMMAND=k,J.DecoratorNode=Tr,J.ElementNode=Nr,J.FOCUS_COMMAND=M,J.FORMAT_ELEMENT_COMMAND={},J.FORMAT_TEXT_COMMAND=c,J.INDENT_CONTENT_COMMAND={},J.INSERT_LINE_BREAK_COMMAND=r,J.INSERT_PARAGRAPH_COMMAND=o,J.INSERT_TAB_COMMAND={},J.KEY_ARROW_DOWN_COMMAND=y,J.KEY_ARROW_LEFT_COMMAND=h,J.KEY_ARROW_RIGHT_COMMAND=m,J.KEY_ARROW_UP_COMMAND=b,J.KEY_BACKSPACE_COMMAND=E,J.KEY_DELETE_COMMAND=S,J.KEY_DOWN_COMMAND=f,J.KEY_ENTER_COMMAND=x,J.KEY_ESCAPE_COMMAND=C,J.KEY_MODIFIER_COMMAND=P,J.KEY_SPACE_COMMAND=_,J.KEY_TAB_COMMAND=w,J.LineBreakNode=dn,J.MOVE_TO_END=g,J.MOVE_TO_START=v,J.OUTDENT_CONTENT_COMMAND={},J.PASTE_COMMAND=l,J.ParagraphNode=$r,J.REDO_COMMAND=p,J.REMOVE_TEXT_COMMAND=a,J.RootNode=Mr,J.SELECTION_CHANGE_COMMAND=e,J.TabNode=On,J.TextNode=xn,J.UNDO_COMMAND=d,J.createCommand=function(){return{}},J.createEditor=function(e){var t=e||{},n=ur,r=t.theme||{};let o=void 0===e?n:t.parentEditor||null,i=t.disableEvents||!1,l=Pr(),a=t.namespace||(null!==o?o._config.namespace:Be()),s=t.editorState,u=[Mr,xn,dn,On,$r,...t.nodes||[]],c=t.onError;if(t=void 0===t.editable||t.editable,void 0===e&&null!==n)e=n._nodes;else for(e=new Map,n=0;n<u.length;n++){let t=u[n],r=null;var d=null;"function"!=typeof t&&(t=(d=t).replace,r=d.with,d=d.withKlass?d.withKlass:null);let o=t.getType(),i=t.transform(),l=new Set;null!==i&&l.add(i),e.set(o,{klass:t,replace:r,replaceWithKlass:d,transforms:l})}return r=new Hr(l,o,e,{disableEvents:i,namespace:a,theme:r},c||console.error,function(e){let t=new Map,n=new Set;return e.forEach((e=>{if(null!=(e=null!=e.klass.importDOM?e.klass.importDOM.bind(e.klass):null)&&!n.has(e)){n.add(e);var r=e();null!==r&&Object.keys(r).forEach((e=>{let n=t.get(e);void 0===n&&(n=[],t.set(e,n)),n.push(r[e])}))}})),t}(e),t),void 0!==s&&(r._pendingEditorState=s,r._dirtyType=2),r},J.getNearestEditorFromDOMNode=ye,J.isSelectionCapturedInDecoratorInput=ve,J.isSelectionWithinEditor=be,J}function Z(){if(z)return $;z=1;const e=X();return $=e}function ee(){if(H)return F;H=1;const e=function(){if(B)return q;B=1;var e=Z();let t=new Map;function n(e){for(;null!=e;){if(e.nodeType===Node.TEXT_NODE)return e;e=e.firstChild}return null}function r(e){let t=e.parentNode;if(null==t)throw Error("Should never happen");return[t,Array.from(t.childNodes).indexOf(e)]}function o(e){let t={};e=e.split(";");for(let n of e)if(""!==n){let[e,r]=n.split(/:([^]+)/);t[e.trim()]=r.trim()}return t}function i(e){let n=t.get(e);return void 0===n&&(n=o(e),t.set(e,n)),n}function l(e,n){var r=i("getStyle"in e?e.getStyle():e.style);n=Object.entries(n).reduce(((e,[t,n])=>(null===n?delete e[t]:e[t]=n,e)),{...r}),r=function(e){let t="";for(let n in e)n&&(t+=`${n}: ${e[n]};`);return t}(n),e.setStyle(r),t.set(r,n)}function a(t){for(;null!==t&&!e.$isRootOrShadowRoot(t);){let e=t.getLatest(),n=t.getParent();0===e.getChildrenSize()&&t.remove(!0),t=n}}function s(t,n,r,o,i=null){if(0!==n.length){var l=n[0],s=new Map,u=[];(l=e.$isElementNode(l)?l:l.getParentOrThrow()).isInline()&&(l=l.getParentOrThrow());for(var c=!1;null!==l;){var d=l.getPreviousSibling();if(null!==d){l=d,c=!0;break}if(l=l.getParentOrThrow(),e.$isRootOrShadowRoot(l))break}d=new Set;for(var p=0;p<r;p++){var f=n[p];e.$isElementNode(f)&&0===f.getChildrenSize()&&d.add(f.getKey())}var m=new Set;for(p=0;p<r;p++){var g=(f=n[p]).getParent();if(null!==g&&g.isInline()&&(g=g.getParent()),null!==g&&e.$isLeafNode(f)&&!m.has(f.getKey())){if(f=g.getKey(),void 0===s.get(f)){let t=o();t.setFormat(g.getFormatType()),t.setIndent(g.getIndent()),u.push(t),s.set(f,t),g.getChildren().forEach((n=>{t.append(n),m.add(n.getKey()),e.$isElementNode(n)&&n.getChildrenKeys().forEach((e=>m.add(e)))})),a(g)}}else d.has(f.getKey())&&((g=o()).setFormat(f.getFormatType()),g.setIndent(f.getIndent()),u.push(g),f.remove(!0))}if(null!==i)for(n=0;n<u.length;n++)i.append(u[n]);if(n=null,e.$isRootOrShadowRoot(l))if(c)if(null!==i)l.insertAfter(i);else for(i=u.length-1;0<=i;i--)l.insertAfter(u[i]);else if(c=l.getFirstChild(),e.$isElementNode(c)&&(l=c),null===c)if(i)l.append(i);else for(i=0;i<u.length;i++)c=u[i],l.append(c),n=c;else if(null!==i)c.insertBefore(i);else for(l=0;l<u.length;l++)i=u[l],c.insertBefore(i),n=i;else if(i)l.insertAfter(i);else for(i=u.length-1;0<=i;i--)c=u[i],l.insertAfter(c),n=c;u=e.$getPreviousSelection(),e.$isRangeSelection(u)&&u.anchor.getNode().isAttached()&&u.focus.getNode().isAttached()?e.$setSelection(u.clone()):null!==n?n.selectEnd():t.dirty=!0}}function u(e,t,n,r){e.modify(t?"extend":"move",n,r)}function c(t){return t=t.anchor.getNode(),"rtl"===(e.$isRootNode(t)?t:t.getParentOrThrow()).getDirection()}return q.$addNodeStyle=function(e){let n=o(e=e.getStyle());t.set(e,n)},q.$cloneWithProperties=function(t){let n=(t=t.getLatest()).constructor.clone(t);return n.__parent=t.__parent,n.__next=t.__next,n.__prev=t.__prev,e.$isElementNode(t)&&e.$isElementNode(n)?(n.__first=t.__first,n.__last=t.__last,n.__size=t.__size,n.__format=t.__format,n.__indent=t.__indent,n.__dir=t.__dir,n):(e.$isTextNode(t)&&e.$isTextNode(n)&&(n.__format=t.__format,n.__style=t.__style,n.__mode=t.__mode,n.__detail=t.__detail),n)},q.$getSelectionStyleValueForProperty=function(t,n,r=""){let o=null,l=t.getNodes();var a=t.anchor,s=t.focus,u=t.isBackward();let c=u?s.offset:a.offset;if(a=u?s.getNode():a.getNode(),""!==t.style&&null!==(t=i(t.style))&&n in t)return t[n];for(t=0;t<l.length;t++){var d=l[t];if((0===t||0!==c||!d.is(a))&&e.$isTextNode(d))if(s=n,u=r,s=null!==(d=i(d=d.getStyle()))&&d[s]||u,null===o)o=s;else if(o!==s){o="";break}}return null===o?r:o},q.$isAtNodeEnd=function(e){return"text"===e.type?e.offset===e.getNode().getTextContentSize():e.offset===e.getNode().getChildrenSize()},q.$isParentElementRTL=c,q.$moveCaretSelection=u,q.$moveCharacter=function(e,t,n){let r=c(e);u(e,t,n?!r:r,"character")},q.$patchStyleText=function(t,n){var r=t.getNodes();let o=r.length-1,i=r[0],a=r[o];if(t.isCollapsed())l(t,n);else{var s=t.anchor,u=t.focus,c=i.getTextContent().length,d=u.offset,p=s.offset,f=s.isBefore(u),m=f?p:d;t=f?d:p;var g=f?s.type:u.type,h=f?u.type:s.type;if(s=f?u.key:s.key,e.$isTextNode(i)&&m===c&&(u=i.getNextSibling(),e.$isTextNode(u)&&(m=p=0,i=u)),1===r.length)e.$isTextNode(i)&&(m="element"===g?0:p>d?d:p)!==(t="element"===h?c:p>d?p:d)&&(0===m&&t===c?(l(i,n),i.select(m,t)):(r=i.splitText(m,t),l(r=0===m?r[0]:r[1],n),r.select(0,t-m)));else for(e.$isTextNode(i)&&m<i.getTextContentSize()&&(0!==m&&(i=i.splitText(m)[1]),l(i,n)),e.$isTextNode(a)&&(m=a.getTextContent().length,a.__key!==s&&0!==t&&(t=m),t!==m&&([a]=a.splitText(t)),0!==t&&l(a,n)),t=1;t<o;t++)c=(m=r[t]).getKey(),e.$isTextNode(m)&&c!==i.getKey()&&c!==a.getKey()&&!m.isToken()&&l(m,n)}},q.$selectAll=function(t){let n=t.anchor;t=t.focus;var r=n.getNode().getTopLevelElementOrThrow().getParentOrThrow();let o=r.getFirstDescendant();r=r.getLastDescendant();let i="element",l="element",a=0;e.$isTextNode(o)?i="text":e.$isElementNode(o)||null===o||(o=o.getParentOrThrow()),e.$isTextNode(r)?(l="text",a=r.getTextContentSize()):e.$isElementNode(r)||null===r||(r=r.getParentOrThrow()),o&&r&&(n.set(o.getKey(),0,i),t.set(r.getKey(),a,l))},q.$setBlocksType=function(t,n){if("root"===t.anchor.key){n=n();var r=e.$getRoot();(t=r.getFirstChild())?t.replace(n,!0):r.append(n)}else for(r=t.getNodes(),t=t.anchor.getNode().getParentOrThrow(),-1===r.indexOf(t)&&r.push(t),t.isInline()&&(t=t.getParentOrThrow(),-1===r.indexOf(t)&&r.push(t)),t=0;t<r.length;t++){let l=r[t];var o=l;if(!e.$isElementNode(o)||e.$isRootOrShadowRoot(o))o=!1;else{var i=o.getFirstChild();i=null===i||e.$isTextNode(i)||i.isInline(),o=!o.isInline()&&!1!==o.canBeEmpty()&&i}o&&((o=n()).setFormat(l.getFormatType()),o.setIndent(l.getIndent()),l.replace(o,!0))}},q.$shouldOverrideDefaultCharacterSelection=function(t,n){return t=e.$getAdjacentNode(t.focus,n),e.$isDecoratorNode(t)&&!t.isIsolated()||e.$isElementNode(t)&&!t.isInline()&&!t.canBeEmpty()},q.$sliceSelectedTextNodeContent=function(t,n){if(n.isSelected()&&!n.isSegmented()&&!n.isToken()&&(e.$isRangeSelection(t)||e.DEPRECATED_$isGridSelection(t))){var r=t.anchor.getNode(),o=t.focus.getNode(),i=n.is(r),l=n.is(o);if(i||l){i=t.isBackward();let e,[a,s]=t.getCharacterOffsets();t=r.is(o),l=n.is(i?o:r),o=n.is(i?r:o),r=0,t?(r=a>s?s:a,e=a>s?a:s):l?(r=i?s:a,e=void 0):o&&(r=0,e=i=i?a:s),n.__text=n.__text.slice(r,e)}}return n},q.$wrapNodes=function(t,n,r=null){var o=t.getNodes();let i=o.length;var l=t.anchor;if(0===i||1===i&&"element"===l.type&&0===l.getNode().getChildrenSize()){o=(t="text"===l.type?l.getNode().getParentOrThrow():l.getNode()).getChildren();let e=n();e.setFormat(t.getFormatType()),e.setIndent(t.getIndent()),o.forEach((t=>e.append(t))),r&&(e=r.append(e)),t.replace(e)}else{l=null;var a=[];for(let u=0;u<i;u++){let i=o[u];e.$isRootOrShadowRoot(i)?(s(t,a,a.length,n,r),a=[],l=i):null===l||null!==l&&e.$hasAncestor(i,l)?a.push(i):(s(t,a,a.length,n,r),a=[i])}s(t,a,a.length,n,r)}},q.createDOMRange=function(t,o,i,l,a){let s=o.getKey(),u=l.getKey(),c=document.createRange(),d=t.getElementByKey(s);if(t=t.getElementByKey(u),e.$isTextNode(o)&&(d=n(d)),e.$isTextNode(l)&&(t=n(t)),void 0===o||void 0===l||null===d||null===t)return null;"BR"===d.nodeName&&([d,i]=r(d)),"BR"===t.nodeName&&([t,a]=r(t)),o=d.firstChild,d===t&&null!=o&&"BR"===o.nodeName&&0===i&&0===a&&(a=1);try{c.setStart(d,i),c.setEnd(t,a)}catch(e){return null}return!c.collapsed||i===a&&s===u||(c.setStart(t,a),c.setEnd(d,i)),c},q.createRectsFromDOMRange=function(e,t){var n=e.getRootElement();if(null===n)return[];e=n.getBoundingClientRect(),n=getComputedStyle(n),n=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight);let r,o=(t=Array.from(t.getClientRects())).length;t.sort(((e,t)=>{let n=e.top-t.top;return 3>=Math.abs(n)?e.left-t.left:n}));for(let i=0;i<o;i++){let l=t[i],a=l.width+n===e.width;r&&r.top<=l.top&&r.top+r.height>l.top&&r.left+r.width>l.left||a?(t.splice(i--,1),o--):r=l}return t},q.getStyleObjectFromCSS=i,q.trimTextContentFromAnchor=function(t,n,r){let o=n.getNode();if(e.$isElementNode(o)){var i=o.getDescendantByIndex(n.offset);null!==i&&(o=i)}for(;0<r&&null!==o;){var l=o.getPreviousSibling(),a=0;if(null===l){for(var s=(i=o.getParentOrThrow()).getPreviousSibling();null===s;){if(null===(i=i.getParent())){l=null;break}s=i.getPreviousSibling()}null!==i&&(a=i.isInline()?0:2,l=e.$isElementNode(s)?s.getLastDescendant():s)}if(""===(s=o.getTextContent())&&e.$isElementNode(o)&&!o.isInline()&&(s="\n\n"),i=o.getTextContentSize(),!e.$isTextNode(o)||r>=i)s=o.getParent(),o.remove(),null==s||0!==s.getChildrenSize()||e.$isRootNode(s)||s.remove(),r-=i+a,o=l;else{let u=o.getKey();a=t.getEditorState().read((()=>{const t=e.$getNodeByKey(u);return e.$isTextNode(t)&&t.isSimpleText()?t.getTextContent():null})),l=i-r;let c=s.slice(0,l);null!==a&&a!==s?(r=e.$getPreviousSelection(),i=o,o.isSimpleText()?o.setTextContent(a):(i=e.$createTextNode(a),o.replace(i)),e.$isRangeSelection(r)&&r.isCollapsed()&&(r=r.anchor.offset,i.select(r,r))):o.isSimpleText()?(a=n.key===u,(s=n.offset)<r&&(s=i),r=a?s-r:0,i=a?s:l,a&&0===r?([r]=o.splitText(r,i),r.remove()):([,r]=o.splitText(r,i),r.remove())):(r=e.$createTextNode(c),o.replace(r)),r=0}}},q}();return F=e}function te(){if(j)return Q;j=1;var e=ee(),t=Z();function n(e,t){for(let n of t)if(e.type.startsWith(n))return!0;return!1}function r(e,n){for(;e!==t.$getRoot()&&null!=e;){if(n(e))return e;e=e.getParent()}return null}function o(e){return 1===e.nodeType}return Q.$splitNode=t.$splitNode,Q.$dfs=function(e,n){let r=[];e=(e||t.$getRoot()).getLatest(),n=n||(t.$isElementNode(e)?e.getLastDescendant():e);for(var o=e,i=0;null!==(o=o.getParent());)i++;for(o=i;null!==e&&!e.is(n);)if(r.push({depth:o,node:e}),t.$isElementNode(e)&&0<e.getChildrenSize())e=e.getFirstChild(),o++;else for(i=null;null===i&&null!==e;)null===(i=e.getNextSibling())?(e=e.getParent(),o--):e=i;return null!==e&&e.is(n)&&r.push({depth:o,node:e}),r},Q.$findMatchingParent=r,Q.$getNearestBlockElementAncestorOrThrow=function(e){let n=r(e,(e=>t.$isElementNode(e)&&!e.isInline()));return t.$isElementNode(n)||function(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(4,e.__key),n},Q.$getNearestNodeOfType=function(e,t){for(;null!=e;){if(e instanceof t)return e;e=e.getParent()}return null},Q.$insertNodeToNearestRoot=function(e){var n=t.$getSelection()||t.$getPreviousSelection();if(t.$isRangeSelection(n)){var{focus:r}=n;if(n=r.getNode(),r=r.offset,t.$isRootOrShadowRoot(n))null==(r=n.getChildAtIndex(r))?n.append(e):r.insertBefore(e),e.selectNext();else{let o,i;t.$isTextNode(n)?(o=n.getParentOrThrow(),i=n.getIndexWithinParent(),0<r&&(i+=1,n.splitText(r))):(o=n,i=r),[,n]=t.$splitNode(o,i),n.insertBefore(e),n.selectStart()}}else t.$isNodeSelection(n)||t.DEPRECATED_$isGridSelection(n)?(n=n.getNodes())[n.length-1].getTopLevelElementOrThrow().insertAfter(e):t.$getRoot().append(e),n=t.$createParagraphNode(),e.insertAfter(n),n.select();return e.getLatest()},Q.$restoreEditorState=function(n,r){let o=new Map,i=n._pendingEditorState;for(let[n,i]of r._nodeMap){let r=e.$cloneWithProperties(i);t.$isTextNode(r)&&(r.__text=i.__text),o.set(n,r)}i&&(i._nodeMap=o),n._dirtyType=2,n=r._selection,t.$setSelection(null===n?null:n.clone())},Q.$wrapNodeInElement=function(e,t){return t=t(),e.replace(t),t.append(e),t},Q.addClassNamesToElement=function(e,...t){t.forEach((t=>{"string"==typeof t&&(t=t.split(" ").filter((e=>""!==e)),e.classList.add(...t))}))},Q.isHTMLAnchorElement=function(e){return o(e)&&"A"===e.tagName},Q.isHTMLElement=o,Q.isMimeType=n,Q.mediaFileReader=function(e,t){let r=e[Symbol.iterator]();return new Promise(((e,o)=>{let i=[],l=()=>{const{done:a,value:s}=r.next();if(a)return e(i);const u=new FileReader;u.addEventListener("error",o),u.addEventListener("load",(()=>{const e=u.result;"string"==typeof e&&i.push({file:s,result:e}),l()})),n(s,t)?u.readAsDataURL(s):l()};l()}))},Q.mergeRegister=function(...e){return()=>{e.forEach((e=>e()))}},Q.objectKlassEquals=function(e,t){return null!==e&&Object.getPrototypeOf(e).constructor.name===t.name},Q.registerNestedElementResolver=function(e,t,n,r){return e.registerNodeTransform(t,(e=>{e:{for(var o=e.getChildren(),i=0;i<o.length;i++)if(o[i]instanceof t){o=null;break e}for(o=e;null!==o;)if(i=o,(o=o.getParent())instanceof t){o={child:i,parent:o};break e}o=null}if(null!==o){const{child:t,parent:l}=o;if(t.is(e)){if(r(l,e),o=(e=t.getNextSiblings()).length,l.insertAfter(t),0!==o){i=n(l),t.insertAfter(i);for(let t=0;t<o;t++)i.append(e[t])}l.canBeEmpty()||0!==l.getChildrenSize()||l.remove()}}}))},Q.removeClassNamesFromElement=function(e,...t){t.forEach((t=>{"string"==typeof t&&e.classList.remove(...t.split(" "))}))},Q}function ne(){if(K)return W;K=1;const e=te();return W=e}function re(){if(U)return Y;U=1;const e=function(){if(G)return V;G=1;var e=ne(),t=Z();let n=new Set(["http:","https:","mailto:","sms:","tel:"]);class r extends t.ElementNode{static getType(){return"link"}static clone(e){return new r(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}constructor(e,t={},n){super(n);let{target:r=null,rel:o=null,title:i=null}=t;this.__url=e,this.__target=r,this.__rel=o,this.__title=i}createDOM(t){let n=document.createElement("a");return n.href=this.sanitizeUrl(this.__url),null!==this.__target&&(n.target=this.__target),null!==this.__rel&&(n.rel=this.__rel),null!==this.__title&&(n.title=this.__title),e.addClassNamesToElement(n,t.theme.link),n}updateDOM(e,t){let n=this.__url,r=this.__target,o=this.__rel,i=this.__title;return n!==e.__url&&(t.href=n),r!==e.__target&&(r?t.target=r:t.removeAttribute("target")),o!==e.__rel&&(o?t.rel=o:t.removeAttribute("rel")),i!==e.__title&&(i?t.title=i:t.removeAttribute("title")),!1}static importDOM(){return{a:()=>({conversion:o,priority:1})}}static importJSON(e){let t=i(e.url,{rel:e.rel,target:e.target,title:e.title});return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}sanitizeUrl(e){try{let t=new URL(e);if(!n.has(t.protocol))return"about:blank"}catch(e){}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(e){this.getWritable().__url=e}getTarget(){return this.getLatest().__target}setTarget(e){this.getWritable().__target=e}getRel(){return this.getLatest().__rel}setRel(e){this.getWritable().__rel=e}getTitle(){return this.getLatest().__title}setTitle(e){this.getWritable().__title=e}insertNewAfter(e,n=!0){return e=this.getParentOrThrow().insertNewAfter(e,n),t.$isElementNode(e)?(n=i(this.__url,{rel:this.__rel,target:this.__target,title:this.__title}),e.append(n),n):null}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,n){if(!t.$isRangeSelection(n))return!1;e=n.anchor.getNode();let r=n.focus.getNode();return this.isParentOf(e)&&this.isParentOf(r)&&0<n.getTextContent().length}}function o(t){let n=null;if(e.isHTMLAnchorElement(t)){let e=t.textContent;null!==e&&""!==e&&(n=i(t.getAttribute("href")||"",{rel:t.getAttribute("rel"),target:t.getAttribute("target"),title:t.getAttribute("title")}))}return{node:n}}function i(e,n){return t.$applyNodeReplacement(new r(e,n))}function l(e){return e instanceof r}class a extends r{static getType(){return"autolink"}static clone(e){return new a(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}static importJSON(e){let t=s(e.url,{rel:e.rel,target:e.target,title:e.title});return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),type:"autolink",version:1}}insertNewAfter(e,n=!0){return e=this.getParentOrThrow().insertNewAfter(e,n),t.$isElementNode(e)?(n=s(this.__url,{rel:this._rel,target:this.__target,title:this.__title}),e.append(n),n):null}}function s(e,n){return t.$applyNodeReplacement(new a(e,n))}let u=t.createCommand("TOGGLE_LINK_COMMAND");return V.$createAutoLinkNode=s,V.$createLinkNode=i,V.$isAutoLinkNode=function(e){return e instanceof a},V.$isLinkNode=l,V.AutoLinkNode=a,V.LinkNode=r,V.TOGGLE_LINK_COMMAND=u,V.toggleLink=function(e,n={}){let{target:r,title:o}=n,a=void 0===n.rel?"noreferrer":n.rel;if(n=t.$getSelection(),t.$isRangeSelection(n))if(n=n.extract(),null===e)n.forEach((e=>{if(l(e=e.getParent())){let t=e.getChildren();for(let n=0;n<t.length;n++)e.insertBefore(t[n]);e.remove()}}));else{if(1===n.length){var s=n[0];if(s=l(s)?s:function(e,t){for(;null!==e&&null!==(e=e.getParent())&&!t(e););return e}(s,l),null!==s)return s.setURL(e),void 0!==r&&s.setTarget(r),null!==a&&s.setRel(a),void(void 0!==o&&s.setTitle(o))}let u=null,c=null;n.forEach((n=>{var s=n.getParent();if(s!==c&&null!==s&&(!t.$isElementNode(n)||n.isInline()))if(l(s))c=s,s.setURL(e),void 0!==r&&s.setTarget(r),null!==a&&c.setRel(a),void 0!==o&&c.setTitle(o);else if(s.is(u)||(u=s,c=i(e,{rel:a,target:r}),l(s)?null===n.getPreviousSibling()?s.insertBefore(c):s.insertAfter(c):n.insertBefore(c)),l(n)){if(!n.is(c)){if(null!==c){s=n.getChildren();for(let e=0;e<s.length;e++)c.append(s[e])}n.remove()}}else null!==c&&c.append(n)}))}},V}();return Y=e}var oe,ie,le,ae=re(),se={};function ue(){if(oe)return se;oe=1;var e=Z(),t=ne();function n(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function r(e){let t=1;for(e=e.getParent();null!=e;){if(y(e)){if(k(e=e.getParent())){t++,e=e.getParent();continue}n(40)}break}return t}function o(e){k(e=e.getParent())||n(40);let t=e;for(;null!==t;)t=t.getParent(),k(t)&&(e=t);return e}function i(e){let t=[];e=e.getChildren().filter(y);for(let n=0;n<e.length;n++){let r=e[n],o=r.getFirstChild();k(o)?t=t.concat(i(o)):t.push(r)}return t}function l(e){return y(e)&&k(e.getFirstChild())}function a(e){return b().append(e)}function s(e,t){return y(e)&&(0===t.length||1===t.length&&e.is(t[0])&&0===e.getChildrenSize())}function u(e,t){e.splice(e.getChildrenSize(),0,t)}function c(e,t){if(k(e))return e;let n=e.getPreviousSibling(),r=e.getNextSibling(),o=b();return o.setFormat(e.getFormatType()),o.setIndent(e.getIndent()),u(o,e.getChildren()),k(n)&&t===n.getListType()?(n.append(o),e.remove(),k(r)&&t===r.getListType()&&(u(n,r.getChildren()),r.remove()),n):k(r)&&t===r.getListType()?(r.getFirstChildOrThrow().insertBefore(o),e.remove(),r):((t=w(t)).append(o),e.replace(t),p(t),t)}function d(e,t){var n=e.getLastChild();let r=t.getFirstChild();n&&r&&l(n)&&l(r)&&(d(n.getFirstChild(),r.getFirstChild()),r.remove()),0<(n=t.getChildren()).length&&(e.append(...n),p(e)),t.remove()}function p(e,t){if(void 0!==(e=t||e.getChildren()))for(t=0;t<e.length;t++){let l=e[t];if(y(l)){let e=l.getValue();var r=l,o=r.getParent(),i=1;for(null!=o&&(k(o)?i=o.getStart():n(44)),r=r.getPreviousSiblings(),o=0;o<r.length;o++){let e=r[o];y(e)&&!k(e.getFirstChild())&&i++}e!==i&&l.setValue(i)}}}function f(e){if(!l(e)){var t=e.getParent(),n=t?t.getParent():void 0,r=n?n.getParent():void 0;if(k(r)&&y(n)&&k(t)){var o=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(e.is(o))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(i))n.insertAfter(e),t.isEmpty()&&n.remove();else{var a=t.getListType();o=b();let r=w(a);o.append(r),e.getPreviousSiblings().forEach((e=>r.append(e))),i=b(),a=w(a),i.append(a),u(a,e.getNextSiblings()),n.insertBefore(o),n.insertAfter(i),n.replace(e)}p(t),p(r)}}}class m extends e.ElementNode{static getType(){return"listitem"}static clone(e){return new m(e.__value,e.__checked,e.__key)}constructor(e,t,n){super(n),this.__value=void 0===e?1:e,this.__checked=t}createDOM(e){let t=document.createElement("li"),n=this.getParent();return k(n)&&"check"===n.getListType()&&h(t,this,null),t.value=this.__value,g(t,e.theme,this),t}updateDOM(e,t,n){let r=this.getParent();return k(r)&&"check"===r.getListType()&&h(t,this,e),t.value=this.__value,g(t,n.theme,this),!1}static transform(){return e=>{let t=e.getParent();k(t)&&(p(t),"check"!==t.getListType()&&null!=e.getChecked()&&e.setChecked(void 0))}}static importDOM(){return{li:()=>({conversion:v,priority:0})}}static importJSON(e){let t=b();return t.setChecked(e.checked),t.setValue(e.value),t.setFormat(e.format),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...t){for(let n=0;n<t.length;n++){let r=t[n];if(e.$isElementNode(r)&&this.canMergeWith(r)){let e=r.getChildren();this.append(...e),r.remove()}else super.append(r)}return this}replace(e,t){if(y(e))return super.replace(e);this.setIndent(0);let n=this.getParentOrThrow();if(!k(n))return e;if(n.__first===this.getKey())n.insertBefore(e);else if(n.__last===this.getKey())n.insertAfter(e);else{let t=w(n.getListType()),r=this.getNextSibling();for(;r;){let e=r;r=r.getNextSibling(),t.append(e)}n.insertAfter(e),e.insertAfter(t)}return t&&this.getChildren().forEach((t=>{e.append(t)})),this.remove(),0===n.getChildrenSize()&&n.remove(),e}insertAfter(e,t=!0){var r=this.getParentOrThrow();k(r)||n(39);var o=this.getNextSiblings();if(y(e))return t=super.insertAfter(e,t),k(e=e.getParentOrThrow())&&p(e),t;if(k(e)){for(r=e,o=(e=e.getChildren()).length-1;0<=o;o--)r=e[o],this.insertAfter(r,t);return r}if(r.insertAfter(e,t),0!==o.length){let n=w(r.getListType());o.forEach((e=>n.append(e))),e.insertAfter(n,t)}return e}remove(e){let t=this.getPreviousSibling(),n=this.getNextSibling();super.remove(e),t&&n&&l(t)&&l(n)?(d(t.getFirstChild(),n.getFirstChild()),n.remove()):n&&(k(e=n.getParent())&&p(e))}insertNewAfter(e,t=!0){return e=b(null==this.__checked&&void 0),this.insertAfter(e,t),e}collapseAtStart(t){let n=e.$createParagraphNode();this.getChildren().forEach((e=>n.append(e)));var r=this.getParentOrThrow(),o=r.getParentOrThrow();let i=y(o);return 1===r.getChildrenSize()?i?(r.remove(),o.select()):(r.insertBefore(n),r.remove(),r=t.anchor,t=t.focus,o=n.getKey(),"element"===r.type&&r.getNode().is(this)&&r.set(o,r.offset,"element"),"element"===t.type&&t.getNode().is(this)&&t.set(o,t.offset,"element")):(r.insertBefore(n),this.remove()),!0}getValue(){return this.getLatest().__value}setValue(e){this.getWritable().__value=e}getChecked(){return this.getLatest().__checked}setChecked(e){this.getWritable().__checked=e}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){var e=this.getParent();if(null===e)return this.getLatest().__indent;e=e.getParentOrThrow();let t=0;for(;y(e);)e=e.getParentOrThrow().getParentOrThrow(),t++;return t}setIndent(e){"number"==typeof e&&-1<e||n(117);let t=this.getIndent();for(;t!==e;)if(t<e){e:{var r=new Set;if(l(this)||r.has(this.getKey()))break e;let e=this.getParent();var o=this.getNextSibling(),i=this.getPreviousSibling();if(l(o)&&l(i)){if(k(i=i.getFirstChild())){i.append(this);var a=o.getFirstChild();k(a)&&(u(i,a=a.getChildren()),o.remove(),r.add(o.getKey())),p(i)}}else l(o)?k(o=o.getFirstChild())&&(null!==(r=o.getFirstChild())&&r.insertBefore(this),p(o)):l(i)?k(o=i.getFirstChild())&&(o.append(this),p(o)):k(e)&&(r=b(),a=w(e.getListType()),r.append(a),a.append(this),i?i.insertAfter(r):o?o.insertBefore(r):e.append(r),p(a));k(e)&&p(e)}t++}else f(this),t--;return this}insertBefore(e){if(y(e)){let e=this.getParentOrThrow();if(k(e)){p(e,this.getNextSiblings())}}return super.insertBefore(e)}canInsertAfter(e){return y(e)}canReplaceWith(e){return y(e)}canMergeWith(t){return e.$isParagraphNode(t)||y(t)}extractWithChild(t,n){if(!e.$isRangeSelection(n))return!1;t=n.anchor.getNode();let r=n.focus.getNode();return this.isParentOf(t)&&this.isParentOf(r)&&this.getTextContent().length===n.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return w("bullet")}}function g(e,n,r){let o=[],i=[];var l=(n=n.list)?n.listitem:void 0;if(n&&n.nested)var a=n.nested.listitem;if(void 0!==l&&(l=l.split(" "),o.push(...l)),n){l=k(l=r.getParent())&&"check"===l.getListType();let e=r.getChecked();l&&!e||i.push(n.listitemUnchecked),l&&e||i.push(n.listitemChecked),l&&o.push(e?n.listitemChecked:n.listitemUnchecked)}void 0!==a&&(a=a.split(" "),r.getChildren().some((e=>k(e)))?o.push(...a):i.push(...a)),0<i.length&&t.removeClassNamesFromElement(e,...i),0<o.length&&t.addClassNamesToElement(e,...o)}function h(e,t,n){k(t.getFirstChild())?(e.removeAttribute("role"),e.removeAttribute("tabIndex"),e.removeAttribute("aria-checked")):(e.setAttribute("role","checkbox"),e.setAttribute("tabIndex","-1"),n&&t.__checked===n.__checked||e.setAttribute("aria-checked",t.getChecked()?"true":"false"))}function v(e){return{node:b(e=t.isHTMLElement(e)&&"true"===e.getAttribute("aria-checked"))}}function b(t){return e.$applyNodeReplacement(new m(void 0,t))}function y(e){return e instanceof m}class x extends e.ElementNode{static getType(){return"list"}static clone(e){return new x(e.__listType||S[e.__tag],e.__start,e.__key)}constructor(e,t,n){super(n),this.__listType=e=S[e]||e,this.__tag="number"===e?"ol":"ul",this.__start=t}getTag(){return this.__tag}setListType(e){let t=this.getWritable();t.__listType=e,t.__tag="number"===e?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(e){let t=document.createElement(this.__tag);return 1!==this.__start&&t.setAttribute("start",String(this.__start)),t.__lexicalListType=this.__listType,_(t,e.theme,this),t}updateDOM(e,t,n){return e.__tag!==this.__tag||(_(t,n.theme,this),!1)}static importDOM(){return{ol:()=>({conversion:C,priority:0}),ul:()=>({conversion:C,priority:0})}}static importJSON(e){let t=w(e.listType,e.start);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportDOM(e){return({element:e}=super.exportDOM(e)),e&&(1!==this.__start&&e.setAttribute("start",String(this.__start)),"check"===this.__listType&&e.setAttribute("__lexicalListType","check")),{element:e}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...t){for(let r=0;r<t.length;r++){var n=t[r];if(y(n))super.append(n);else{let t=b();k(n)?t.append(n):e.$isElementNode(n)?(n=e.$createTextNode(n.getTextContent()),t.append(n)):t.append(n),super.append(t)}}return p(this),this}extractWithChild(e){return y(e)}}function _(e,n,o){let i=[],l=[];var a=n.list;if(void 0!==a){let e=a[`${o.__tag}Depth`]||[],t=(n=r(o)-1)%e.length;var s=e[t];let u,c=a[o.__tag];if(void 0!==(a=a.nested)&&a.list&&(u=a.list),void 0!==c&&i.push(c),void 0!==s)for(s=s.split(" "),i.push(...s),s=0;s<e.length;s++)s!==t&&l.push(o.__tag+s);void 0!==u&&(o=u.split(" "),1<n?i.push(...o):l.push(...o))}0<l.length&&t.removeClassNamesFromElement(e,...l),0<i.length&&t.addClassNamesToElement(e,...i)}function E(e){let t=[];for(let r=0;r<e.length;r++){var n=e[r];y(n)?(t.push(n),1<(n=n.getChildren()).length&&n.forEach((e=>{k(e)&&t.push(a(e))}))):t.push(a(n))}return t}function C(e){let n=e.nodeName.toLowerCase(),r=null;return"ol"===n?r=w("number",e.start):"ul"===n&&(r=t.isHTMLElement(e)&&"check"===e.getAttribute("__lexicallisttype")?w("check"):w("bullet")),{after:E,node:r}}let S={ol:"number",ul:"bullet"};function w(t,n=1){return e.$applyNodeReplacement(new x(t,n))}function k(e){return e instanceof x}let T=e.createCommand("INSERT_UNORDERED_LIST_COMMAND"),A=e.createCommand("INSERT_ORDERED_LIST_COMMAND"),N=e.createCommand("INSERT_CHECK_LIST_COMMAND"),R=e.createCommand("REMOVE_LIST_COMMAND");return se.$createListItemNode=b,se.$createListNode=w,se.$getListDepth=r,se.$handleListInsertParagraph=function(){var t=e.$getSelection();if(!e.$isRangeSelection(t)||!t.isCollapsed())return!1;if(!y(t=t.anchor.getNode())||""!==t.getTextContent())return!1;var r=o(t),i=t.getParent();k(i)||n(40);let l,a=i.getParent();if(e.$isRootOrShadowRoot(a))l=e.$createParagraphNode(),r.insertAfter(l);else{if(!y(a))return!1;l=b(),a.insertAfter(l)}if(l.select(),0<(r=t.getNextSiblings()).length){let t=w(i.getListType());e.$isParagraphNode(l)?l.insertAfter(t):((i=b()).append(t),l.insertAfter(i)),r.forEach((e=>{e.remove(),t.append(e)}))}return function(e){for(;null==e.getNextSibling()&&null==e.getPreviousSibling();){let t=e.getParent();if(null==t||!y(e)&&!k(e))break;e=t}e.remove()}(t),!0},se.$isListItemNode=y,se.$isListNode=k,se.INSERT_CHECK_LIST_COMMAND=N,se.INSERT_ORDERED_LIST_COMMAND=A,se.INSERT_UNORDERED_LIST_COMMAND=T,se.ListItemNode=m,se.ListNode=x,se.REMOVE_LIST_COMMAND=R,se.insertList=function(t,n){t.update((()=>{var t=e.$getSelection();if(e.$isRangeSelection(t)||e.DEPRECATED_$isGridSelection(t)){var r=t.getNodes(),o=(t=t.anchor.getNode()).getParent();if(s(t,r))r=w(n),e.$isRootOrShadowRoot(o)?(t.replace(r),o=b(),e.$isElementNode(t)&&(o.setFormat(t.getFormatType()),o.setIndent(t.getIndent())),r.append(o)):y(t)&&(u(r,(t=t.getParentOrThrow()).getChildren()),t.replace(r));else for(t=new Set,o=0;o<r.length;o++){var i=r[o];if(e.$isElementNode(i)&&i.isEmpty()&&!t.has(i.getKey()))c(i,n);else if(e.$isLeafNode(i))for(i=i.getParent();null!=i;){let r=i.getKey();if(k(i)){if(!t.has(r)){var l=w(n);u(l,i.getChildren()),i.replace(l),p(l),t.add(r)}break}if(l=i.getParent(),e.$isRootOrShadowRoot(l)&&!t.has(r)){t.add(r),c(i,n);break}i=l}}}}))},se.removeList=function(n){n.update((()=>{let n=e.$getSelection();if(e.$isRangeSelection(n)){var r=new Set,l=n.getNodes(),a=n.anchor.getNode();if(s(a,l))r.add(o(a));else for(a=0;a<l.length;a++){var c=l[a];e.$isLeafNode(c)&&(null!=(c=t.$getNearestNodeOfType(c,m))&&r.add(o(c)))}for(let t of r){r=t,l=i(t);for(let t of l)u(l=e.$createParagraphNode(),t.getChildren()),r.insertAfter(l),r=l,t.__key===n.anchor.key&&n.anchor.set(l.getKey(),0,"element"),t.__key===n.focus.key&&n.focus.set(l.getKey(),0,"element"),t.remove();t.remove()}}}))},se}function ce(){if(le)return ie;le=1;const e=ue();return ie=e}var de,pe,fe,me,ge,he,ve=ce(),be={},ye={};function xe(){if(de)return ye;de=1;var e=h;let t=e.createContext(null);return ye.LexicalComposerContext=t,ye.createLexicalComposerContext=function(e,t){let n=null;return null!=e&&(n=e[1]),{getTheme:function(){return null!=t?t:null!=n?n.getTheme():null}}},ye.useLexicalComposerContext=function(){let n=e.useContext(t);return null==n&&function(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(8),n},ye}function _e(){if(fe)return pe;fe=1;const e=xe();return pe=e}function Ee(){if(me)return be;me=1;var e=_e(),t=Z(),n=h;let r="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;var o=r?n.useLayoutEffect:n.useEffect;let i={tag:"history-merge"};return be.LexicalComposer=function({initialConfig:l,children:a}){let s=n.useMemo((()=>{const{theme:n,namespace:o,editor__DEPRECATED:a,nodes:s,onError:u,editorState:c}=l,d=e.createLexicalComposerContext(null,n);let p=a||null;if(null===p){const e=t.createEditor({editable:l.editable,namespace:o,nodes:s,onError:t=>u(t,e),theme:n});!function(e,n){if(null!==n)if(void 0===n)e.update((()=>{var n=t.$getRoot();if(n.isEmpty()){let o=t.$createParagraphNode();n.append(o),n=r?document.activeElement:null,(null!==t.$getSelection()||null!==n&&n===e.getRootElement())&&o.select()}}),i);else if(null!==n)switch(typeof n){case"string":let r=e.parseEditorState(n);e.setEditorState(r,i);break;case"object":e.setEditorState(n,i);break;case"function":e.update((()=>{t.$getRoot().isEmpty()&&n(e)}),i)}}(e,c),p=e}return[p,d]}),[]);return o((()=>{let e=l.editable,[t]=s;t.setEditable(void 0===e||e)}),[]),n.createElement(e.LexicalComposerContext.Provider,{value:s},a)},be}var Ce,Se,we,ke,Te,Ae,Ne=function(){if(he)return ge;he=1;const e=Ee();return ge=e}(),Re={},Oe={};function Me(){if(Ce)return Oe;Ce=1;var e=ne(),t=Z();function n(e,n){let r=Date.now(),o=0;return(i,l,a,s,u,c)=>{let d=Date.now();if(c.has("historic"))return o=0,r=d,2;let p=function(e,n,r,o,i){if(null===e||0===r.size&&0===o.size&&!i)return 0;var l=n._selection,a=e._selection;if(i)return 1;if(!(t.$isRangeSelection(l)&&t.$isRangeSelection(a)&&a.isCollapsed()&&l.isCollapsed()))return 0;i=n._nodeMap;let s=[];for(let e of r)void 0!==(r=i.get(e))&&s.push(r);for(let[e,n]of o)n&&(void 0===(o=i.get(e))||t.$isRootNode(o)||s.push(o));return 0===s.length?0:1<s.length?(n=(o=n._nodeMap).get(l.anchor.key),a=o.get(a.anchor.key),n&&a&&!e._nodeMap.has(n.__key)&&t.$isTextNode(n)&&1===n.__text.length&&1===l.anchor.offset?2:0):(n=s[0],e=e._nodeMap.get(n.__key),t.$isTextNode(e)&&t.$isTextNode(n)&&e.__mode===n.__mode?(e=e.__text)===(n=n.__text)?0:(l=l.anchor,a=a.anchor,l.key!==a.key||"text"!==l.type?0:(l=l.offset,a=a.offset,1==(e=n.length-e.length)&&a===l-1?2:-1===e&&a===l+1?3:-1===e&&a===l?4:0)):0)}(i,l,s,u,e.isComposing()),f=(()=>{var f=null===a||a.editor===e,m=c.has("history-push");if(!m&&f&&c.has("history-merge"))return 0;if(null===i)return 1;var g=l._selection;if(!(0<s.size||0<u.size))return null!==g?0:2;if(!1===m&&0!==p&&p===o&&d<r+n&&f)return 0;if(1===s.size){{m=Array.from(s)[0],f=i._nodeMap.get(m),m=l._nodeMap.get(m),g=i._selection;let e=l._selection,n=!1;t.$isRangeSelection(g)&&t.$isRangeSelection(e)&&(n="element"===g.anchor.type&&"element"===g.focus.type&&"text"===e.anchor.type&&"text"===e.focus.type),f=!(n||!t.$isTextNode(f)||!t.$isTextNode(m))&&(f.__type===m.__type&&f.__text===m.__text&&f.__mode===m.__mode&&f.__detail===m.__detail&&f.__style===m.__style&&f.__format===m.__format&&f.__parent===m.__parent)}if(f)return 0}return 1})();return r=d,o=p,f}}return Oe.createEmptyHistoryState=function(){return{current:null,redoStack:[],undoStack:[]}},Oe.registerHistory=function(r,o,i){let l=n(r,i);i=({editorState:e,prevEditorState:n,dirtyLeaves:i,dirtyElements:a,tags:s})=>{const u=o.current,c=o.redoStack,d=o.undoStack,p=null===u?null:u.editorState;if(null===u||e!==p){if(1===(n=l(n,e,u,i,a,s)))0!==c.length&&(o.redoStack=[],r.dispatchCommand(t.CAN_REDO_COMMAND,!1)),null!==u&&(d.push({...u}),r.dispatchCommand(t.CAN_UNDO_COMMAND,!0));else if(2===n)return;o.current={editor:r,editorState:e}}};let a=e.mergeRegister(r.registerCommand(t.UNDO_COMMAND,(()=>{let e=o.redoStack,n=o.undoStack;if(0!==n.length){let i=o.current,l=n.pop();null!==i&&(e.push(i),r.dispatchCommand(t.CAN_REDO_COMMAND,!0)),0===n.length&&r.dispatchCommand(t.CAN_UNDO_COMMAND,!1),o.current=l||null,l&&l.editor.setEditorState(l.editorState,{tag:"historic"})}return!0}),t.COMMAND_PRIORITY_EDITOR),r.registerCommand(t.REDO_COMMAND,(()=>{let e=o.redoStack;var n=o.undoStack;if(0!==e.length){let i=o.current;null!==i&&(n.push(i),r.dispatchCommand(t.CAN_UNDO_COMMAND,!0)),n=e.pop(),0===e.length&&r.dispatchCommand(t.CAN_REDO_COMMAND,!1),o.current=n||null,n&&n.editor.setEditorState(n.editorState,{tag:"historic"})}return!0}),t.COMMAND_PRIORITY_EDITOR),r.registerCommand(t.CLEAR_EDITOR_COMMAND,(()=>(o.undoStack=[],o.redoStack=[],o.current=null,!1)),t.COMMAND_PRIORITY_EDITOR),r.registerCommand(t.CLEAR_HISTORY_COMMAND,(()=>(o.undoStack=[],o.redoStack=[],o.current=null,r.dispatchCommand(t.CAN_REDO_COMMAND,!1),r.dispatchCommand(t.CAN_UNDO_COMMAND,!1),!0)),t.COMMAND_PRIORITY_EDITOR),r.registerUpdateListener(i)),s=r.registerUpdateListener(i);return()=>{a(),s()}},Oe}function Le(){if(ke)return Re;ke=1;var e=_e(),t=function(){if(we)return Se;we=1;const e=Me();return Se=e}(),n=h;return Re.createEmptyHistoryState=t.createEmptyHistoryState,Re.HistoryPlugin=function({externalHistoryState:r}){let[o]=e.useLexicalComposerContext();return function(e,r,o=1e3){let i=n.useMemo((()=>r||t.createEmptyHistoryState()),[r]);n.useEffect((()=>t.registerHistory(e,i,o)),[o,e,i])}(o,r),null},Re}var Pe,Ie,De,$e=function(){if(Ae)return Te;Ae=1;const e=Le();return Te=e}(),ze={};function Be(){if(Pe)return ze;Pe=1;var e=ce(),t=_e(),n=h,r=ne(),o=Z();return ze.ListPlugin=function(){let[i]=t.useLexicalComposerContext();return n.useEffect((()=>{if(!i.hasNodes([e.ListNode,e.ListItemNode]))throw Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")}),[i]),function(t){n.useEffect((()=>r.mergeRegister(t.registerCommand(e.INSERT_ORDERED_LIST_COMMAND,(()=>(e.insertList(t,"number"),!0)),o.COMMAND_PRIORITY_LOW),t.registerCommand(e.INSERT_UNORDERED_LIST_COMMAND,(()=>(e.insertList(t,"bullet"),!0)),o.COMMAND_PRIORITY_LOW),t.registerCommand(e.REMOVE_LIST_COMMAND,(()=>(e.removeList(t),!0)),o.COMMAND_PRIORITY_LOW),t.registerCommand(o.INSERT_PARAGRAPH_COMMAND,(()=>!!e.$handleListInsertParagraph()),o.COMMAND_PRIORITY_LOW))),[t])}(i),null},ze}var Fe,He,je,We=function(){if(De)return Ie;De=1;const e=Be();return Ie=e}(),Ke={};function Ge(){if(Fe)return Ke;Fe=1;var e=_e(),t=ne(),n=Z(),r=h;function o(e){return e.registerCommand(n.KEY_TAB_COMMAND,(r=>{let o=n.$getSelection();return!!n.$isRangeSelection(o)&&(r.preventDefault(),r=function(e){var r=e.getNodes();if(0<function(e,t){let n=[];for(let r=0;r<e.length;r++){let o=t(e[r]);null!==o&&n.push(o)}return n}(r,(e=>n.$isBlockElementNode(e)&&e.canIndent()?e:null)).length)return!0;if(r=e.anchor,r=(e=(e=e.focus).isBefore(r)?e:r).getNode(),(r=t.$getNearestBlockElementAncestorOrThrow(r)).canIndent()){r=r.getKey();let t=n.$createRangeSelection();if(t.anchor.set(r,0,"element"),t.focus.set(r,0,"element"),t=n.$normalizeSelection__EXPERIMENTAL(t),t.anchor.is(e))return!0}return!1}(o)?r.shiftKey?n.OUTDENT_CONTENT_COMMAND:n.INDENT_CONTENT_COMMAND:n.INSERT_TAB_COMMAND,e.dispatchCommand(r,void 0))}),n.COMMAND_PRIORITY_EDITOR)}return Ke.TabIndentationPlugin=function(){let[t]=e.useLexicalComposerContext();return r.useEffect((()=>o(t))),null},Ke.registerTabIndentation=o,Ke}var Ye,Ue,Ve,Qe,qe,Je,Xe,Ze,et,tt=function(){if(je)return He;je=1;const e=Ge();return He=e}(),nt={},rt={},ot={};function it(){if(Ve)return Ue;Ve=1;const e=function(){if(Ye)return ot;Ye=1;var e=ee(),t=Z();function n(r,o,i,l=null){let a=null==l||o.isSelected(l),s=t.$isElementNode(o)&&o.excludeFromCopy("html");var u=o;null!==l&&(u=e.$cloneWithProperties(o),u=t.$isTextNode(u)&&null!=l?e.$sliceSelectedTextNodeContent(l,u):u);let c=t.$isElementNode(u)?u.getChildren():[],{element:d,after:p}=u.exportDOM(r);if(!d)return!1;let f=document.createDocumentFragment();for(let e=0;e<c.length;e++){let i=c[e],s=n(r,i,f,l);!a&&t.$isElementNode(o)&&s&&o.extractWithChild(i,l,"html")&&(a=!0)}return a&&!s?(d.append(f),i.append(d),p&&(r=p.call(u,d))&&d.replaceWith(r)):i.append(f),a}let r=new Set(["STYLE","SCRIPT"]);function o(e,n,i=new Map,l){let a=[];if(r.has(e.nodeName))return a;let s=null;var u,{nodeName:c}=e,d=n._htmlConversions.get(c.toLowerCase());if(c=null,void 0!==d)for(u of d)null!==(d=u(e))&&(null===c||c.priority<d.priority)&&(c=d);if(c=(u=null!==c?c.conversion:null)?u(e):null,u=null,null!==c){if(u=c.after,d=c.node,s=Array.isArray(d)?d[d.length-1]:d,null!==s){for(var[,p]of i)if(s=p(s,l),!s)break;s&&a.push(...Array.isArray(d)?d:[s])}null!=c.forChild&&i.set(e.nodeName,c.forChild)}for(e=e.childNodes,l=[],p=0;p<e.length;p++)l.push(...o(e[p],n,new Map(i),s));return null!=u&&(l=u(l)),null==s?a=a.concat(l):t.$isElementNode(s)&&s.append(...l),a}return ot.$generateHtmlFromNodes=function(e,r){if("undefined"==typeof document||"undefined"==typeof window)throw Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");let o=document.createElement("div"),i=t.$getRoot().getChildren();for(let t=0;t<i.length;t++)n(e,i[t],o,r);return o.innerHTML},ot.$generateNodesFromDOM=function(e,t){t=t.body?t.body.childNodes:[];let n=[];for(let l=0;l<t.length;l++){var i=t[l];r.has(i.nodeName)||null!==(i=o(i,e))&&(n=n.concat(i))}return n},ot}();return Ue=e}function lt(){if(Qe)return rt;Qe=1;var e=it(),t=ee(),n=ne(),r=Z();function o(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let i="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function l(t){let n=r.$getSelection();if(null==n)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(n)&&n.isCollapsed()||0===n.getNodes().length?"":e.$generateHtmlFromNodes(t,n)}function a(e){let t=r.$getSelection();if(null==t)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(t)&&t.isCollapsed()||0===t.getNodes().length?null:JSON.stringify(c(e,t))}function s(e,t,i){(r.DEPRECATED_$isGridSelection(i)||null!==n.$findMatchingParent(i.anchor.getNode(),(e=>r.DEPRECATED_$isGridCellNode(e)))&&null!==n.$findMatchingParent(i.focus.getNode(),(e=>r.DEPRECATED_$isGridCellNode(e))))&&1===t.length&&r.DEPRECATED_$isGridNode(t[0])?function(e,t,i,l){1===e.length&&r.DEPRECATED_$isGridNode(e[0])||o(42);var a=e[0];e=a.getChildren(),i=a.getFirstChildOrThrow().getChildrenSize();var s=a.getChildrenSize(),u=n.$findMatchingParent(t.anchor.getNode(),(e=>r.DEPRECATED_$isGridCellNode(e)));t=(a=u&&n.$findMatchingParent(u,(e=>r.DEPRECATED_$isGridRowNode(e))))&&n.$findMatchingParent(a,(e=>r.DEPRECATED_$isGridNode(e))),r.DEPRECATED_$isGridCellNode(u)&&r.DEPRECATED_$isGridRowNode(a)&&r.DEPRECATED_$isGridNode(t)||o(43);var c=a.getIndexWithinParent(),d=Math.min(t.getChildrenSize()-1,c+s-1);let p,f;s=u.getIndexWithinParent(),u=Math.min(a.getChildrenSize()-1,s+i-1),i=Math.min(s,u),a=Math.min(c,d),s=Math.max(s,u),c=Math.max(c,d),d=t.getChildren(),u=0;for(let t=a;t<=c;t++){var m=d[t];r.DEPRECATED_$isGridRowNode(m)||o(24);var g=e[u];r.DEPRECATED_$isGridRowNode(g)||o(24),m=m.getChildren(),g=g.getChildren();let n=0;for(let e=i;e<=s;e++){let l=m[e];r.DEPRECATED_$isGridCellNode(l)||o(25);let u=g[n];r.DEPRECATED_$isGridCellNode(u)||o(25),t===a&&e===i?p=l.getKey():t===c&&e===s&&(f=l.getKey());let d=l.getChildren();u.getChildren().forEach((e=>{r.$isTextNode(e)&&r.$createParagraphNode().append(e),l.append(e)})),d.forEach((e=>e.remove())),n++}u++}p&&f&&(e=r.DEPRECATED_$createGridSelection(),e.set(t.getKey(),p,f),r.$setSelection(e),l.dispatchCommand(r.SELECTION_CHANGE_COMMAND,void 0))}(t,i,!1,e):function(e,t){let n=[],i=null;for(let t=0;t<e.length;t++){let o=e[t],l=r.$isLineBreakNode(o);if(l||r.$isDecoratorNode(o)&&o.isInline()||r.$isElementNode(o)&&o.isInline()||r.$isTextNode(o)||o.isParentRequired()){if(null===i&&(i=o.createParentElementNode(),n.push(i),l))continue;null!==i&&i.append(o)}else n.push(o),i=null}r.$isRangeSelection(t)?t.insertNodes(n):r.DEPRECATED_$isGridSelection(t)&&(e=t.anchor.getNode(),r.DEPRECATED_$isGridCellNode(e)||o(41),e.append(...n))}(t,i)}function u(e,n,i,l=[]){let a=null==n||i.isSelected(n),s=r.$isElementNode(i)&&i.excludeFromCopy("html");var c=i;if(null!==n){var d=t.$cloneWithProperties(i);c=d=r.$isTextNode(d)&&null!=n?t.$sliceSelectedTextNodeContent(n,d):d}let p=r.$isElementNode(c)?c.getChildren():[];var f=c;d=f.exportJSON();var m=f.constructor;d.type!==m.getType()&&o(58,m.name);let g=d.children;for(r.$isElementNode(f)&&(Array.isArray(g)||o(59,m.name)),r.$isTextNode(c)&&(0<(c=c.__text).length?d.text=c:a=!1),c=0;c<p.length;c++)m=u(e,n,f=p[c],d.children),!a&&r.$isElementNode(i)&&m&&i.extractWithChild(f,n,"clone")&&(a=!0);if(a&&!s)l.push(d);else if(Array.isArray(d.children))for(e=0;e<d.children.length;e++)l.push(d.children[e]);return a}function c(e,t){let n=[],o=r.$getRoot().getChildren();for(let r=0;r<o.length;r++)u(e,t,o[r],n);return{namespace:e._config.namespace,nodes:n}}function d(e){let n=[];for(let o=0;o<e.length;o++){let i=r.$parseSerializedNode(e[o]);r.$isTextNode(i)&&t.$addNodeStyle(i),n.push(i)}return n}let p=null;function f(e,t){var n=i?(e._window||window).getSelection():null;if(!n)return!1;var o=n.anchorNode;if(n=n.focusNode,null!==o&&null!==n&&!r.isSelectionWithinEditor(e,o,n))return!1;if(t.preventDefault(),t=t.clipboardData,o=r.$getSelection(),null===t||null===o)return!1;n=l(e),e=a(e);let s="";return null!==o&&(s=o.getTextContent()),null!==n&&t.setData("text/html",n),null!==e&&t.setData("application/x-lexical-editor",e),t.setData("text/plain",s),!0}return rt.$generateJSONFromSelectedNodes=c,rt.$generateNodesFromSerializedNodes=d,rt.$getHtmlContent=l,rt.$getLexicalContent=a,rt.$insertDataTransferForPlainText=function(e,t){null!=(e=e.getData("text/plain")||e.getData("text/uri-list"))&&t.insertRawText(e)},rt.$insertDataTransferForRichText=function(t,n,o){var i=t.getData("application/x-lexical-editor");if(i)try{let e=JSON.parse(i);if(e.namespace===o._config.namespace&&Array.isArray(e.nodes)){return s(o,d(e.nodes),n)}}catch(e){}if(i=t.getData("text/html"))try{var l=(new DOMParser).parseFromString(i,"text/html"),a=e.$generateNodesFromDOM(o,l);return s(o,a,n)}catch(e){}if(null!=(t=t.getData("text/plain")||t.getData("text/uri-list")))if(r.$isRangeSelection(n))for(o=(t=t.split(/(\r?\n|\t)/)).length,l=0;l<o;l++)"\n"===(a=t[l])||"\r\n"===a?n.insertParagraph():"\t"===a?n.insertNodes([r.$createTabNode()]):n.insertText(a);else n.insertRawText(t)},rt.$insertGeneratedNodes=s,rt.copyToClipboard=async function(e,t){if(null!==p)return!1;if(null!==t)return new Promise((n=>{e.update((()=>{n(f(e,t))}))}));var o=e.getRootElement();let l=null==e._window?window.document:e._window.document,a=i?(e._window||window).getSelection():null;if(null===o||null===a)return!1;let s=l.createElement("span");return s.style.cssText="position: fixed; top: -1000px;",s.append(l.createTextNode("#")),o.append(s),(o=new Range).setStart(s,0),o.setEnd(s,1),a.removeAllRanges(),a.addRange(o),new Promise((t=>{let o=e.registerCommand(r.COPY_COMMAND,(r=>(n.objectKlassEquals(r,ClipboardEvent)&&(o(),null!==p&&(window.clearTimeout(p),p=null),t(f(e,r))),!0)),r.COMMAND_PRIORITY_CRITICAL);p=window.setTimeout((()=>{o(),p=null,t(!1)}),50),l.execCommand("copy"),s.remove()}))},rt}function at(){if(Xe)return nt;Xe=1;var e=function(){if(Je)return qe;Je=1;const e=lt();return qe=e}(),t=ee(),n=ne(),r=Z();function o(e,t){return void 0!==document.caretRangeFromPoint?null===(e=document.caretRangeFromPoint(e,t))?null:{node:e.startContainer,offset:e.startOffset}:"undefined"!==document.caretPositionFromPoint?null===(e=document.caretPositionFromPoint(e,t))?null:{node:e.offsetNode,offset:e.offset}:null}let i="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,l=i&&"documentMode"in document?document.documentMode:null,a=!(!i||!("InputEvent"in window)||l)&&"getTargetRanges"in new window.InputEvent("input"),s=i&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),u=i&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,c=i&&/^(?=.*Chrome).*/i.test(navigator.userAgent),d=i&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!c,p=r.createCommand("DRAG_DROP_PASTE_FILE");class f extends r.ElementNode{static getType(){return"quote"}static clone(e){return new f(e.__key)}constructor(e){super(e)}createDOM(e){let t=document.createElement("blockquote");return n.addClassNamesToElement(t,e.theme.quote),t}updateDOM(){return!1}static importDOM(){return{blockquote:()=>({conversion:b,priority:0})}}exportDOM(e){if(({element:e}=super.exportDOM(e)),e&&this.isEmpty()&&e.append(document.createElement("br")),e){var t=this.getFormatType();e.style.textAlign=t,(t=this.getDirection())&&(e.dir=t)}return{element:e}}static importJSON(e){let t=m();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(e,t){e=r.$createParagraphNode();let n=this.getDirection();return e.setDirection(n),this.insertAfter(e,t),e}collapseAtStart(){let e=r.$createParagraphNode();return this.getChildren().forEach((t=>e.append(t))),this.replace(e),!0}}function m(){return r.$applyNodeReplacement(new f)}class g extends r.ElementNode{static getType(){return"heading"}static clone(e){return new g(e.__tag,e.__key)}constructor(e,t){super(t),this.__tag=e}getTag(){return this.__tag}createDOM(e){let t=this.__tag,r=document.createElement(t);return void 0!==(e=e.theme.heading)&&n.addClassNamesToElement(r,e[t]),r}updateDOM(){return!1}static importDOM(){return{h1:()=>({conversion:v,priority:0}),h2:()=>({conversion:v,priority:0}),h3:()=>({conversion:v,priority:0}),h4:()=>({conversion:v,priority:0}),h5:()=>({conversion:v,priority:0}),h6:()=>({conversion:v,priority:0}),p:e=>null!==(e=e.firstChild)&&h(e)?{conversion:()=>({node:null}),priority:3}:null,span:e=>h(e)?{conversion:()=>({node:y("h1")}),priority:3}:null}}exportDOM(e){if(({element:e}=super.exportDOM(e)),e&&this.isEmpty()&&e.append(document.createElement("br")),e){var t=this.getFormatType();e.style.textAlign=t,(t=this.getDirection())&&(e.dir=t)}return{element:e}}static importJSON(e){let t=y(e.tag);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(e,t=!0){e=0<(e=e?e.anchor.offset:0)&&e<this.getTextContentSize()?y(this.getTag()):r.$createParagraphNode();let n=this.getDirection();return e.setDirection(n),this.insertAfter(e,t),e}collapseAtStart(){let e=this.isEmpty()?r.$createParagraphNode():y(this.getTag());return this.getChildren().forEach((t=>e.append(t))),this.replace(e),!0}extractWithChild(){return!0}}function h(e){return"span"===e.nodeName.toLowerCase()&&"26pt"===e.style.fontSize}function v(e){let t=e.nodeName.toLowerCase(),n=null;return"h1"!==t&&"h2"!==t&&"h3"!==t&&"h4"!==t&&"h5"!==t&&"h6"!==t||(n=y(t),null!==e.style&&n.setFormat(e.style.textAlign)),{node:n}}function b(e){let t=m();return null!==e.style&&t.setFormat(e.style.textAlign),{node:t}}function y(e){return r.$applyNodeReplacement(new g(e))}function x(e){let t=null;if(e instanceof DragEvent?t=e.dataTransfer:e instanceof ClipboardEvent&&(t=e.clipboardData),null===t)return[!1,[],!1];var n=t.types;return e=n.includes("Files"),n=n.includes("text/html")||n.includes("text/plain"),[e,Array.from(t.files),n]}function _(e){var t=r.$getSelection();if(!r.$isRangeSelection(t))return!1;let o=new Set;t=t.getNodes();for(let r=0;r<t.length;r++){var i=t[r],l=i.getKey();o.has(l)||(l=(i=n.$getNearestBlockElementAncestorOrThrow(i)).getKey(),i.canIndent()&&!o.has(l)&&(o.add(l),e(i)))}return 0<o.size}function E(e){return e=r.$getNearestNodeFromDOMNode(e),r.$isDecoratorNode(e)}return nt.$createHeadingNode=y,nt.$createQuoteNode=m,nt.$isHeadingNode=function(e){return e instanceof g},nt.$isQuoteNode=function(e){return e instanceof f},nt.DRAG_DROP_PASTE=p,nt.HeadingNode=g,nt.QuoteNode=f,nt.eventFiles=x,nt.registerRichText=function(i){return n.mergeRegister(i.registerCommand(r.CLICK_COMMAND,(()=>{const e=r.$getSelection();return!!r.$isNodeSelection(e)&&(e.clear(),!0)}),0),i.registerCommand(r.DELETE_CHARACTER_COMMAND,(e=>{const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(t.deleteCharacter(e),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.DELETE_WORD_COMMAND,(e=>{const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(t.deleteWord(e),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.DELETE_LINE_COMMAND,(e=>{const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(t.deleteLine(e),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.CONTROLLED_TEXT_INSERTION_COMMAND,(t=>{const n=r.$getSelection();if("string"==typeof t)r.$isRangeSelection(n)?n.insertText(t):r.DEPRECATED_$isGridSelection(n);else{if(!r.$isRangeSelection(n)&&!r.DEPRECATED_$isGridSelection(n))return!1;const o=t.dataTransfer;null!=o?e.$insertDataTransferForRichText(o,n,i):r.$isRangeSelection(n)&&(t=t.data)&&n.insertText(t)}return!0}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.REMOVE_TEXT_COMMAND,(()=>{const e=r.$getSelection();return!!r.$isRangeSelection(e)&&(e.removeText(),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.FORMAT_TEXT_COMMAND,(e=>{const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(t.formatText(e),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.FORMAT_ELEMENT_COMMAND,(e=>{var t=r.$getSelection();if(!r.$isRangeSelection(t)&&!r.$isNodeSelection(t))return!1;t=t.getNodes();for(const o of t)t=n.$findMatchingParent(o,(e=>r.$isElementNode(e)&&!e.isInline())),null!==t&&t.setFormat(e);return!0}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.INSERT_LINE_BREAK_COMMAND,(e=>{const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(t.insertLineBreak(e),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.INSERT_PARAGRAPH_COMMAND,(()=>{const e=r.$getSelection();return!!r.$isRangeSelection(e)&&(e.insertParagraph(),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.INSERT_TAB_COMMAND,(()=>(r.$insertNodes([r.$createTabNode()]),!0)),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.INDENT_CONTENT_COMMAND,(()=>_((e=>{const t=e.getIndent();e.setIndent(t+1)}))),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.OUTDENT_CONTENT_COMMAND,(()=>_((e=>{const t=e.getIndent();0<t&&e.setIndent(t-1)}))),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_ARROW_UP_COMMAND,(e=>{var t=r.$getSelection();if(r.$isNodeSelection(t)&&!E(e.target)){if(0<(e=t.getNodes()).length)return e[0].selectPrevious(),!0}else if(r.$isRangeSelection(t)&&(t=r.$getAdjacentNode(t.focus,!0),!e.shiftKey&&r.$isDecoratorNode(t)&&!t.isIsolated()&&!t.isInline()))return t.selectPrevious(),e.preventDefault(),!0;return!1}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_ARROW_DOWN_COMMAND,(e=>{var t=r.$getSelection();if(r.$isNodeSelection(t)){if(0<(e=t.getNodes()).length)return e[0].selectNext(0,0),!0}else if(r.$isRangeSelection(t)){let n=t.focus;if("root"===n.key&&n.offset===r.$getRoot().getChildrenSize())return e.preventDefault(),!0;if(t=r.$getAdjacentNode(t.focus,!1),!e.shiftKey&&r.$isDecoratorNode(t)&&!t.isIsolated()&&!t.isInline())return t.selectNext(),e.preventDefault(),!0}return!1}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_ARROW_LEFT_COMMAND,(e=>{const n=r.$getSelection();if(r.$isNodeSelection(n)){var o=n.getNodes();if(0<o.length)return e.preventDefault(),o[0].selectPrevious(),!0}return!!r.$isRangeSelection(n)&&(!!t.$shouldOverrideDefaultCharacterSelection(n,!0)&&(o=e.shiftKey,e.preventDefault(),t.$moveCharacter(n,o,!0),!0))}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_ARROW_RIGHT_COMMAND,(e=>{const n=r.$getSelection();if(r.$isNodeSelection(n)&&!E(e.target)){var o=n.getNodes();if(0<o.length)return e.preventDefault(),o[0].selectNext(0,0),!0}return!!r.$isRangeSelection(n)&&(o=e.shiftKey,!!t.$shouldOverrideDefaultCharacterSelection(n,!1)&&(e.preventDefault(),t.$moveCharacter(n,o,!1),!0))}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_BACKSPACE_COMMAND,(e=>{if(E(e.target))return!1;const t=r.$getSelection();if(!r.$isRangeSelection(t))return!1;e.preventDefault(),({anchor:e}=t);const o=e.getNode();return t.isCollapsed()&&0===e.offset&&!r.$isRootNode(o)&&0<n.$getNearestBlockElementAncestorOrThrow(o).getIndent()?i.dispatchCommand(r.OUTDENT_CONTENT_COMMAND,void 0):i.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_DELETE_COMMAND,(e=>{if(E(e.target))return!1;const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(e.preventDefault(),i.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!1))}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_ENTER_COMMAND,(e=>{const t=r.$getSelection();if(!r.$isRangeSelection(t))return!1;if(null!==e){if((u||s||d)&&a)return!1;if(e.preventDefault(),e.shiftKey)return i.dispatchCommand(r.INSERT_LINE_BREAK_COMMAND,!1)}return i.dispatchCommand(r.INSERT_PARAGRAPH_COMMAND,void 0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_ESCAPE_COMMAND,(()=>{const e=r.$getSelection();return!!r.$isRangeSelection(e)&&(i.blur(),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.DROP_COMMAND,(e=>{const[,t]=x(e);if(0<t.length){var n=o(e.clientX,e.clientY);if(null!==n){const{offset:e,node:o}=n;var l=r.$getNearestNodeFromDOMNode(o);if(null!==l){if(n=r.$createRangeSelection(),r.$isTextNode(l))n.anchor.set(l.getKey(),e,"text"),n.focus.set(l.getKey(),e,"text");else{const e=l.getParentOrThrow().getKey();l=l.getIndexWithinParent()+1,n.anchor.set(e,l,"element"),n.focus.set(e,l,"element")}n=r.$normalizeSelection__EXPERIMENTAL(n),r.$setSelection(n)}i.dispatchCommand(p,t)}return e.preventDefault(),!0}return e=r.$getSelection(),!!r.$isRangeSelection(e)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.DRAGSTART_COMMAND,(e=>{[e]=x(e);const t=r.$getSelection();return!(e&&!r.$isRangeSelection(t))}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.DRAGOVER_COMMAND,(e=>{var[t]=x(e);const n=r.$getSelection();return!(t&&!r.$isRangeSelection(n))&&(null!==(t=o(e.clientX,e.clientY))&&(t=r.$getNearestNodeFromDOMNode(t.node),r.$isDecoratorNode(t)&&e.preventDefault()),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.COPY_COMMAND,(t=>(e.copyToClipboard(i,n.objectKlassEquals(t,ClipboardEvent)?t:null),!0)),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.CUT_COMMAND,(t=>(async function(t,o){await e.copyToClipboard(o,n.objectKlassEquals(t,ClipboardEvent)?t:null),o.update((()=>{let e=r.$getSelection();r.$isRangeSelection(e)?e.removeText():r.$isNodeSelection(e)&&e.getNodes().forEach((e=>e.remove()))}))}(t,i),!0)),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.PASTE_COMMAND,(t=>{const[,n,o]=x(t);if(0<n.length&&!o)return i.dispatchCommand(p,n),!0;if(r.isSelectionCapturedInDecoratorInput(t.target))return!1;const l=r.$getSelection();return!(!r.$isRangeSelection(l)&&!r.DEPRECATED_$isGridSelection(l))&&(function(t,n){t.preventDefault(),n.update((()=>{let o=r.$getSelection(),i=t instanceof InputEvent||t instanceof KeyboardEvent?null:t.clipboardData;null!=i&&(r.$isRangeSelection(o)||r.DEPRECATED_$isGridSelection(o))&&e.$insertDataTransferForRichText(i,o,n)}),{tag:"paste"})}(t,i),!0)}),r.COMMAND_PRIORITY_EDITOR))},nt}function st(){if(et)return Ze;et=1;const e=at();return Ze=e}var ut,ct,dt,pt=st(),ft={};function mt(){if(ut)return ft;ut=1;var e=re(),t=_e(),n=ne(),r=Z(),o=h;function i(e,t){for(let n=0;n<t.length;n++){let r=t[n](e);if(r)return r}return null}let l=/[.,;\s]/;function a(e){var t;return e=e.getPreviousSibling(),r.$isElementNode(e)&&(e=e.getLastDescendant()),!(t=null===e||r.$isLineBreakNode(e))&&(t=r.$isTextNode(e))&&(e=e.getTextContent(),t=l.test(e[e.length-1])),t}function s(e){return e=e.getNextSibling(),r.$isElementNode(e)&&(e=e.getFirstDescendant()),null===e||r.$isLineBreakNode(e)||r.$isTextNode(e)&&l.test(e.getTextContent()[0])}function u(e,t,n){var o=e.getChildren();let l=o.length;for(let t=0;t<l;t++){let i=o[t];if(!r.$isTextNode(i)||!i.isSimpleText())return c(e),void n(null,e.getURL())}null===(t=i(o=e.getTextContent(),t))||t.text!==o?(c(e),n(null,e.getURL())):a(e)&&s(e)?((o=e.getURL())!==t.url&&(e.setURL(t.url),n(t.url,o)),t.attributes&&((o=e.getRel())!==t.attributes.rel&&(e.setRel(t.attributes.rel||null),n(t.attributes.rel||null,o)),(o=e.getTarget())!==t.attributes.target&&(e.setTarget(t.attributes.target||null),n(t.attributes.target||null,o)))):(c(e),n(null,e.getURL()))}function c(e){let t=e.getChildren();var n=t.length;for(--n;0<=n;n--)e.insertAfter(t[n]);return e.remove(),t.map((e=>e.getLatest()))}function d(t,d,p){o.useEffect((()=>{t.hasNodes([e.AutoLinkNode])||function(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(77);let o=(e,t)=>{p&&p(e,t)};return n.mergeRegister(t.registerNodeTransform(r.TextNode,(t=>{var n=t.getParentOrThrow(),f=t.getPreviousSibling();if(e.$isAutoLinkNode(n))u(n,d,o);else if(!e.$isLinkNode(n)){if(t.isSimpleText()&&(l.test(t.getTextContent()[0])||!e.$isAutoLinkNode(f))){f=n=t.getTextContent();let o=0,u=t;for(var m;(m=i(f,d))&&null!==m;){let i=m.index,c=m.length,d=i+c;var g=o+i,h=o+d,v=n,b=t;if((0<g?l.test(v[g-1]):a(b))&&(h<v.length?l.test(v[h]):s(b))){var y=void 0;0===o+i?[y,u]=u.splitText(o+c):[,y,u]=u.splitText(o+i,o+i+c),g=e.$createAutoLinkNode(m.url,m.attributes),(h=r.$createTextNode(m.text)).setFormat(y.getFormat()),h.setDetail(y.getDetail()),g.append(h),y.replace(g),p&&p(m.url,null),o=0}else o+=d;f=f.substring(d)}}n=t.getPreviousSibling(),m=t.getNextSibling(),y=t.getTextContent(),e.$isAutoLinkNode(n)&&!l.test(y[0])&&(n.append(t),u(n,d,o),t=n.getURL(),p&&p(null,t)),e.$isAutoLinkNode(m)&&!l.test(y[y.length-1])&&(c(m),u(m,d,o),t=m.getURL(),p&&p(null,t))}})))}),[t,d,p])}return ft.AutoLinkPlugin=function({matchers:e,onChange:n}){let[r]=t.useLexicalComposerContext();return d(r,e,n),null},ft.createLinkMatcherWithRegExp=function(e,t=e=>e){return n=>{let r=e.exec(n);return null===r?null:{index:r.index,length:r[0].length,text:r[0],url:t(n)}}},ft}var gt,ht,vt,bt,yt=function(){if(dt)return ct;dt=1;const e=mt();return ct=e}(),xt=_e();function _t(){if(ht)return gt;ht=1;var e=_e(),t=h,n="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?t.useLayoutEffect:t.useEffect;function r(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}return gt=function(){return function(r){let[o]=e.useLexicalComposerContext(),i=t.useMemo((()=>r(o)),[o,r]),l=t.useRef(i.initialValueFn()),[a,s]=t.useState(l.current);return n((()=>{let{initialValueFn:e,subscribe:t}=i,n=e();return l.current!==n&&(l.current=n,s(n)),t((e=>{l.current=e,s(e)}))}),[i,r]),a}(r)},gt}function Et(){if(bt)return vt;bt=1;const e=_t();return vt=e}var Ct=R(Et()),St=ne(),wt=Z(),kt=ee();const Tt={black:"#000",white:"#fff"},At="#e57373",Nt="#ef5350",Rt="#f44336",Ot="#d32f2f",Mt="#c62828",Lt="#f3e5f5",Pt="#ce93d8",It="#ba68c8",Dt="#ab47bc",$t="#9c27b0",zt="#7b1fa2",Bt="#e3f2fd",Ft="#90caf9",Ht="#42a5f5",jt="#1976d2",Wt="#1565c0",Kt="#4fc3f7",Gt="#29b6f6",Yt="#03a9f4",Ut="#0288d1",Vt="#01579b",Qt="#81c784",qt="#66bb6a",Jt="#4caf50",Xt="#388e3c",Zt="#2e7d32",en="#1b5e20",tn="#ffb74d",nn="#ffa726",rn="#ff9800",on="#f57c00",ln="#e65100",an={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function sn(){return sn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sn.apply(null,arguments)}function un(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function cn(e){if(!un(e))return e;const t={};return Object.keys(e).forEach((n=>{t[n]=cn(e[n])})),t}function dn(e,t,n={clone:!0}){const r=n.clone?sn({},e):e;return un(e)&&un(t)&&Object.keys(t).forEach((o=>{un(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&un(e[o])?r[o]=dn(e[o],t[o],n):n.clone?r[o]=un(t[o])?cn(t[o]):t[o]:r[o]=t[o]})),r}function pn(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}var fn,mn,gn={exports:{}},hn={};function vn(e){if("string"!=typeof e)throw new Error(pn(7));return e.charAt(0).toUpperCase()+e.slice(1)}function bn(e){return e&&e.ownerDocument||document}function yn(e){return bn(e).defaultView||window}function xn(e,t){"function"==typeof e?e(t):e&&(e.current=t)}mn||(mn=1,gn.exports=function(){if(fn)return hn;fn=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function g(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:switch(e=e.type){case r:case i:case o:case c:case d:return e;default:switch(e=e&&e.$$typeof){case s:case a:case u:case f:case p:case l:return e;default:return m}}case n:return m}}}return e=Symbol.for("react.module.reference"),hn.ContextConsumer=a,hn.ContextProvider=l,hn.Element=t,hn.ForwardRef=u,hn.Fragment=r,hn.Lazy=f,hn.Memo=p,hn.Portal=n,hn.Profiler=i,hn.StrictMode=o,hn.Suspense=c,hn.SuspenseList=d,hn.isAsyncMode=function(){return!1},hn.isConcurrentMode=function(){return!1},hn.isContextConsumer=function(e){return g(e)===a},hn.isContextProvider=function(e){return g(e)===l},hn.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},hn.isForwardRef=function(e){return g(e)===u},hn.isFragment=function(e){return g(e)===r},hn.isLazy=function(e){return g(e)===f},hn.isMemo=function(e){return g(e)===p},hn.isPortal=function(e){return g(e)===n},hn.isProfiler=function(e){return g(e)===i},hn.isStrictMode=function(e){return g(e)===o},hn.isSuspense=function(e){return g(e)===c},hn.isSuspenseList=function(e){return g(e)===d},hn.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===i||t===o||t===c||t===d||t===m||"object"==typeof t&&null!==t&&(t.$$typeof===f||t.$$typeof===p||t.$$typeof===l||t.$$typeof===a||t.$$typeof===u||t.$$typeof===e||void 0!==t.getModuleId)},hn.typeOf=g,hn}()),gn.exports;const _n="undefined"!=typeof window?v.useLayoutEffect:v.useEffect;let En=0;const Cn=v["useId".toString()];function Sn(e){if(void 0!==Cn){const t=Cn();return null!=e?e:t}return function(e){const[t,n]=v.useState(e),r=e||t;return v.useEffect((()=>{null==t&&(En+=1,n(`mui-${En}`))}),[t]),r}(e)}function wn(e){const t=v.useRef(e);return _n((()=>{t.current=e})),v.useRef(((...e)=>(0,t.current)(...e))).current}function kn(...e){return v.useMemo((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{xn(e,t)}))}),e)}class Tn{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Tn}start(e,t){this.clear(),this.currentId=setTimeout((()=>{this.currentId=null,t()}),e)}}let An=!0,Nn=!1;const Rn=new Tn,On={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function Mn(e){e.metaKey||e.altKey||e.ctrlKey||(An=!0)}function Ln(){An=!1}function Pn(){"hidden"===this.visibilityState&&Nn&&(An=!0)}function In(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(e){}return An||function(e){const{type:t,tagName:n}=e;return!("INPUT"!==n||!On[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function Dn(){const e=v.useCallback((e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",Mn,!0),t.addEventListener("mousedown",Ln,!0),t.addEventListener("pointerdown",Ln,!0),t.addEventListener("touchstart",Ln,!0),t.addEventListener("visibilitychange",Pn,!0))}),[]),t=v.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!In(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(Nn=!0,Rn.start(100,(()=>{Nn=!1})),t.current=!1,!0)},ref:e}}function $n(e,t){const n=sn({},t);return Object.keys(e).forEach((r=>{if(r.toString().match(/^(components|slots)$/))n[r]=sn({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const o=e[r]||{},i=t[r];n[r]={},i&&Object.keys(i)?o&&Object.keys(o)?(n[r]=sn({},i),Object.keys(o).forEach((e=>{n[r][e]=$n(o[e],i[e])}))):n[r]=i:n[r]=o}else void 0===n[r]&&(n[r]=e[r])})),n}function zn(e,t,n=void 0){const r={};return Object.keys(e).forEach((o=>{r[o]=e[o].reduce(((e,r)=>{if(r){const o=t(r);""!==o&&e.push(o),n&&n[r]&&e.push(n[r])}return e}),[]).join(" ")})),r}const Bn=e=>e,Fn=(()=>{let e=Bn;return{configure(t){e=t},generate:t=>e(t),reset(){e=Bn}}})(),Hn={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function jn(e,t,n="Mui"){const r=Hn[t];return r?`${n}-${r}`:`${Fn.generate(e)}-${t}`}function Wn(e,t,n="Mui"){const r={};return t.forEach((t=>{r[t]=jn(e,t,n)})),r}function Kn(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function Gn(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Gn(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Yn(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Gn(e))&&(r&&(r+=" "),r+=t);return r}var Un="$$material";function Vn(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Qn=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,qn=Vn((function(e){return Qn.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));var Jn=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)})),this.tags=[],this.ctr=0},e}(),Xn="-ms-",Zn="-moz-",er="-webkit-",tr="comm",nr="rule",rr="decl",or="@keyframes",ir=Math.abs,lr=String.fromCharCode,ar=Object.assign;function sr(e){return e.trim()}function ur(e,t,n){return e.replace(t,n)}function cr(e,t){return e.indexOf(t)}function dr(e,t){return 0|e.charCodeAt(t)}function pr(e,t,n){return e.slice(t,n)}function fr(e){return e.length}function mr(e){return e.length}function gr(e,t){return t.push(e),e}var hr=1,vr=1,br=0,yr=0,xr=0,_r="";function Er(e,t,n,r,o,i,l){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:hr,column:vr,length:l,return:""}}function Cr(e,t){return ar(Er("",null,null,"",null,null,0),e,{length:-e.length},t)}function Sr(){return xr=yr>0?dr(_r,--yr):0,vr--,10===xr&&(vr=1,hr--),xr}function wr(){return xr=yr<br?dr(_r,yr++):0,vr++,10===xr&&(vr=1,hr++),xr}function kr(){return dr(_r,yr)}function Tr(){return yr}function Ar(e,t){return pr(_r,e,t)}function Nr(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Rr(e){return hr=vr=1,br=fr(_r=e),yr=0,[]}function Or(e){return _r="",e}function Mr(e){return sr(Ar(yr-1,Ir(91===e?e+2:40===e?e+1:e)))}function Lr(e){for(;(xr=kr())&&xr<33;)wr();return Nr(e)>2||Nr(xr)>3?"":" "}function Pr(e,t){for(;--t&&wr()&&!(xr<48||xr>102||xr>57&&xr<65||xr>70&&xr<97););return Ar(e,Tr()+(t<6&&32==kr()&&32==wr()))}function Ir(e){for(;wr();)switch(xr){case e:return yr;case 34:case 39:34!==e&&39!==e&&Ir(xr);break;case 40:41===e&&Ir(e);break;case 92:wr()}return yr}function Dr(e,t){for(;wr()&&e+xr!==57&&(e+xr!==84||47!==kr()););return"/*"+Ar(t,yr-1)+"*"+lr(47===e?e:wr())}function $r(e){for(;!Nr(kr());)wr();return Ar(e,yr)}function zr(e){return Or(Br("",null,null,null,[""],e=Rr(e),0,[0],e))}function Br(e,t,n,r,o,i,l,a,s){for(var u=0,c=0,d=l,p=0,f=0,m=0,g=1,h=1,v=1,b=0,y="",x=o,_=i,E=r,C=y;h;)switch(m=b,b=wr()){case 40:if(108!=m&&58==dr(C,d-1)){-1!=cr(C+=ur(Mr(b),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:C+=Mr(b);break;case 9:case 10:case 13:case 32:C+=Lr(m);break;case 92:C+=Pr(Tr()-1,7);continue;case 47:switch(kr()){case 42:case 47:gr(Hr(Dr(wr(),Tr()),t,n),s);break;default:C+="/"}break;case 123*g:a[u++]=fr(C)*v;case 125*g:case 59:case 0:switch(b){case 0:case 125:h=0;case 59+c:-1==v&&(C=ur(C,/\f/g,"")),f>0&&fr(C)-d&&gr(f>32?jr(C+";",r,n,d-1):jr(ur(C," ","")+";",r,n,d-2),s);break;case 59:C+=";";default:if(gr(E=Fr(C,t,n,u,c,o,a,y,x=[],_=[],d),i),123===b)if(0===c)Br(C,t,E,E,x,i,d,a,_);else switch(99===p&&110===dr(C,3)?100:p){case 100:case 108:case 109:case 115:Br(e,E,E,r&&gr(Fr(e,E,E,0,0,o,a,y,o,x=[],d),_),o,_,d,a,r?x:_);break;default:Br(C,E,E,E,[""],_,0,a,_)}}u=c=f=0,g=v=1,y=C="",d=l;break;case 58:d=1+fr(C),f=m;default:if(g<1)if(123==b)--g;else if(125==b&&0==g++&&125==Sr())continue;switch(C+=lr(b),b*g){case 38:v=c>0?1:(C+="\f",-1);break;case 44:a[u++]=(fr(C)-1)*v,v=1;break;case 64:45===kr()&&(C+=Mr(wr())),p=kr(),c=d=fr(y=C+=$r(Tr())),b++;break;case 45:45===m&&2==fr(C)&&(g=0)}}return i}function Fr(e,t,n,r,o,i,l,a,s,u,c){for(var d=o-1,p=0===o?i:[""],f=mr(p),m=0,g=0,h=0;m<r;++m)for(var v=0,b=pr(e,d+1,d=ir(g=l[m])),y=e;v<f;++v)(y=sr(g>0?p[v]+" "+b:ur(b,/&\f/g,p[v])))&&(s[h++]=y);return Er(e,t,n,0===o?nr:a,s,u,c)}function Hr(e,t,n){return Er(e,t,n,tr,lr(xr),pr(e,2,-2),0)}function jr(e,t,n,r){return Er(e,t,n,rr,pr(e,0,r),pr(e,r+1,-1),r)}function Wr(e,t){for(var n="",r=mr(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Kr(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case rr:return e.return=e.return||e.value;case tr:return"";case or:return e.return=e.value+"{"+Wr(e.children,r)+"}";case nr:e.value=e.props.join(",")}return fr(n=Wr(e.children,r))?e.return=e.value+"{"+n+"}":""}var Gr=function(e,t,n){for(var r=0,o=0;r=o,o=kr(),38===r&&12===o&&(t[n]=1),!Nr(o);)wr();return Ar(e,yr)},Yr=function(e,t){return Or(function(e,t){var n=-1,r=44;do{switch(Nr(r)){case 0:38===r&&12===kr()&&(t[n]=1),e[n]+=Gr(yr-1,t,n);break;case 2:e[n]+=Mr(r);break;case 4:if(44===r){e[++n]=58===kr()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=lr(r)}}while(r=wr());return e}(Rr(e),t))},Ur=new WeakMap,Vr=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Ur.get(n))&&!r){Ur.set(e,!0);for(var o=[],i=Yr(t,o),l=n.props,a=0,s=0;a<i.length;a++)for(var u=0;u<l.length;u++,s++)e.props[s]=o[a]?i[a].replace(/&\f/g,l[u]):l[u]+" "+i[a]}}},Qr=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function qr(e,t){switch(function(e,t){return 45^dr(e,0)?(((t<<2^dr(e,0))<<2^dr(e,1))<<2^dr(e,2))<<2^dr(e,3):0}(e,t)){case 5103:return er+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return er+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return er+e+Zn+e+Xn+e+e;case 6828:case 4268:return er+e+Xn+e+e;case 6165:return er+e+Xn+"flex-"+e+e;case 5187:return er+e+ur(e,/(\w+).+(:[^]+)/,er+"box-$1$2"+Xn+"flex-$1$2")+e;case 5443:return er+e+Xn+"flex-item-"+ur(e,/flex-|-self/,"")+e;case 4675:return er+e+Xn+"flex-line-pack"+ur(e,/align-content|flex-|-self/,"")+e;case 5548:return er+e+Xn+ur(e,"shrink","negative")+e;case 5292:return er+e+Xn+ur(e,"basis","preferred-size")+e;case 6060:return er+"box-"+ur(e,"-grow","")+er+e+Xn+ur(e,"grow","positive")+e;case 4554:return er+ur(e,/([^-])(transform)/g,"$1"+er+"$2")+e;case 6187:return ur(ur(ur(e,/(zoom-|grab)/,er+"$1"),/(image-set)/,er+"$1"),e,"")+e;case 5495:case 3959:return ur(e,/(image-set\([^]*)/,er+"$1$`$1");case 4968:return ur(ur(e,/(.+:)(flex-)?(.*)/,er+"box-pack:$3"+Xn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+er+e+e;case 4095:case 3583:case 4068:case 2532:return ur(e,/(.+)-inline(.+)/,er+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(fr(e)-1-t>6)switch(dr(e,t+1)){case 109:if(45!==dr(e,t+4))break;case 102:return ur(e,/(.+:)(.+)-([^]+)/,"$1"+er+"$2-$3$1"+Zn+(108==dr(e,t+3)?"$3":"$2-$3"))+e;case 115:return~cr(e,"stretch")?qr(ur(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==dr(e,t+1))break;case 6444:switch(dr(e,fr(e)-3-(~cr(e,"!important")&&10))){case 107:return ur(e,":",":"+er)+e;case 101:return ur(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+er+(45===dr(e,14)?"inline-":"")+"box$3$1"+er+"$2$3$1"+Xn+"$2box$3")+e}break;case 5936:switch(dr(e,t+11)){case 114:return er+e+Xn+ur(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return er+e+Xn+ur(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return er+e+Xn+ur(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return er+e+Xn+e+e}return e}var Jr,Xr,Zr,eo,to=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case rr:e.return=qr(e.value,e.length);break;case or:return Wr([Cr(e,{value:ur(e.value,"@","@"+er)})],r);case nr:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Wr([Cr(e,{props:[ur(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Wr([Cr(e,{props:[ur(t,/:(plac\w+)/,":"+er+"input-$1")]}),Cr(e,{props:[ur(t,/:(plac\w+)/,":-moz-$1")]}),Cr(e,{props:[ur(t,/:(plac\w+)/,Xn+"input-$1")]})],r)}return""}))}}],no=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,o,i=e.stylisPlugins||to,l={},a=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)l[t[n]]=!0;a.push(e)}));var s,u,c=[Kr,(u=function(e){s.insert(e)},function(e){e.root||(e=e.return)&&u(e)})],d=function(e){var t=mr(e);return function(n,r,o,i){for(var l="",a=0;a<t;a++)l+=e[a](n,r,o,i)||"";return l}}([Vr,Qr].concat(i,c));o=function(e,t,n,r){s=n,function(e){Wr(zr(e),d)}(e?e+"{"+t.styles+"}":t.styles),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new Jn({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:l,registered:{},insert:o};return p.sheet.hydrate(a),p},ro={exports:{}},oo={};function io(){return Xr||(Xr=1,ro.exports=function(){if(Jr)return oo;Jr=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case s:case u:case r:case i:case o:case d:return e;default:switch(e=e&&e.$$typeof){case a:case c:case m:case f:case l:return e;default:return p}}case n:return p}}}function x(e){return y(e)===u}return oo.AsyncMode=s,oo.ConcurrentMode=u,oo.ContextConsumer=a,oo.ContextProvider=l,oo.Element=t,oo.ForwardRef=c,oo.Fragment=r,oo.Lazy=m,oo.Memo=f,oo.Portal=n,oo.Profiler=i,oo.StrictMode=o,oo.Suspense=d,oo.isAsyncMode=function(e){return x(e)||y(e)===s},oo.isConcurrentMode=x,oo.isContextConsumer=function(e){return y(e)===a},oo.isContextProvider=function(e){return y(e)===l},oo.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},oo.isForwardRef=function(e){return y(e)===c},oo.isFragment=function(e){return y(e)===r},oo.isLazy=function(e){return y(e)===m},oo.isMemo=function(e){return y(e)===f},oo.isPortal=function(e){return y(e)===n},oo.isProfiler=function(e){return y(e)===i},oo.isStrictMode=function(e){return y(e)===o},oo.isSuspense=function(e){return y(e)===d},oo.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===i||e===o||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===f||e.$$typeof===l||e.$$typeof===a||e.$$typeof===c||e.$$typeof===h||e.$$typeof===v||e.$$typeof===b||e.$$typeof===g)},oo.typeOf=y,oo}()),ro.exports}!function(){if(eo)return Zr;eo=1;var e=io(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};function i(n){return e.isMemo(n)?r:o[n.$$typeof]||t}o[e.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o[e.Memo]=r;var l=Object.defineProperty,a=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,c=Object.getPrototypeOf,d=Object.prototype;Zr=function e(t,r,o){if("string"!=typeof r){if(d){var p=c(r);p&&p!==d&&e(t,p,o)}var f=a(r);s&&(f=f.concat(s(r)));for(var m=i(t),g=i(r),h=0;h<f.length;++h){var v=f[h];if(!(n[v]||o&&o[v]||g&&g[v]||m&&m[v])){var b=u(r,v);try{l(t,v,b)}catch(e){}}}}return t}}();var lo=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},ao=function(e,t,n){lo(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}};var so={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},uo=/[A-Z]|^ms/g,co=/_EMO_([^_]+?)_([^]*?)_EMO_/g,po=function(e){return 45===e.charCodeAt(1)},fo=function(e){return null!=e&&"boolean"!=typeof e},mo=Vn((function(e){return po(e)?e:e.replace(uo,"-$&").toLowerCase()})),go=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(co,(function(e,t,n){return vo={name:t,styles:n,next:vo},t}))}return 1===so[e]||po(e)||"number"!=typeof t||0===t?t:t+"px"};function ho(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return vo={name:o.name,styles:o.styles,next:vo},o.name;var i=n;if(void 0!==i.styles){var l=i.next;if(void 0!==l)for(;void 0!==l;)vo={name:l.name,styles:l.styles,next:vo},l=l.next;return i.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=ho(e,t,n[o])+";";else for(var i in n){var l=n[i];if("object"!=typeof l){var a=l;null!=t&&void 0!==t[a]?r+=i+"{"+t[a]+"}":fo(a)&&(r+=mo(i)+":"+go(i,a)+";")}else if(!Array.isArray(l)||"string"!=typeof l[0]||null!=t&&void 0!==t[l[0]]){var s=ho(e,t,l);switch(i){case"animation":case"animationName":r+=mo(i)+":"+s+";";break;default:r+=i+"{"+s+"}"}}else for(var u=0;u<l.length;u++)fo(l[u])&&(r+=mo(i)+":"+go(i,l[u])+";")}return r}(e,t,n);case"function":if(void 0!==e){var a=vo,s=n(e);return vo=a,ho(e,t,s)}}var u=n;if(null==t)return u;var c=t[u];return void 0!==c?c:u}var vo,bo=/label:\s*([^\s;{]+)\s*(;|$)/g;function yo(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";vo=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=ho(n,t,i)):o+=i[0];for(var l=1;l<e.length;l++){if(o+=ho(n,t,e[l]),r)o+=i[l]}bo.lastIndex=0;for(var a,s="";null!==(a=bo.exec(o));)s+="-"+a[1];var u=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+s;return{name:u,styles:o,next:vo}}var xo=!!v.useInsertionEffect&&v.useInsertionEffect,_o=xo||function(e){return e()},Eo=xo||v.useLayoutEffect,Co=v.createContext("undefined"!=typeof HTMLElement?no({key:"css"}):null);Co.Provider;var So=function(e){return b((function(t,n){var r=y(Co);return e(t,r,n)}))},wo=v.createContext({}),ko=So((function(e,t){var n=yo([e.styles],void 0,v.useContext(wo)),r=v.useRef();return Eo((function(){var e=t.key+"-global",o=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),i=!1,l=document.querySelector('style[data-emotion="'+e+" "+n.name+'"]');return t.sheet.tags.length&&(o.before=t.sheet.tags[0]),null!==l&&(i=!0,l.setAttribute("data-emotion",e),o.hydrate([l])),r.current=[o,i],function(){o.flush()}}),[t]),Eo((function(){var e=r.current,o=e[0];if(e[1])e[1]=!1;else{if(void 0!==n.next&&ao(t,n.next,!0),o.tags.length){var i=o.tags[o.tags.length-1].nextElementSibling;o.before=i,o.flush()}t.insert("",n,o,!1)}}),[t,n.name]),null}));function To(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return yo(t)}var Ao=function(){var e=To.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},No=qn,Ro=function(e){return"theme"!==e},Oo=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?No:Ro},Mo=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},Lo=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return lo(t,n,r),_o((function(){return ao(t,n,r)})),null},Po=function e(t,n){var r,o,i=t.__emotion_real===t,l=i&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var a=Mo(t,n,i),s=a||Oo(l),u=!s("as");return function(){var c=arguments,d=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==c[0]||void 0===c[0].raw)d.push.apply(d,c);else{d.push(c[0][0]);for(var p=c.length,f=1;f<p;f++)d.push(c[f],c[0][f])}var m=So((function(e,t,n){var r,i,c,p,f=u&&e.as||l,m="",g=[],h=e;if(null==e.theme){for(var b in h={},e)h[b]=e[b];h.theme=v.useContext(wo)}"string"==typeof e.className?(r=t.registered,i=g,c=e.className,p="",c.split(" ").forEach((function(e){void 0!==r[e]?i.push(r[e]+";"):e&&(p+=e+" ")})),m=p):null!=e.className&&(m=e.className+" ");var y=yo(d.concat(g),t.registered,h);m+=t.key+"-"+y.name,void 0!==o&&(m+=" "+o);var x=u&&void 0===a?Oo(f):s,_={};for(var E in e)u&&"as"===E||x(E)&&(_[E]=e[E]);return _.className=m,_.ref=n,v.createElement(v.Fragment,null,v.createElement(Lo,{cache:t,serialized:y,isStringTag:"string"==typeof f}),v.createElement(f,_))}));return m.displayName=void 0!==r?r:"Styled("+("string"==typeof l?l:l.displayName||l.name||"Component")+")",m.defaultProps=t.defaultProps,m.__emotion_real=m,m.__emotion_base=l,m.__emotion_styles=d,m.__emotion_forwardProp=a,Object.defineProperty(m,"toString",{value:function(){return"."+o}}),m.withComponent=function(t,r){return e(t,sn({},n,r,{shouldForwardProp:Mo(m,r,!0)})).apply(void 0,d)},m}}.bind();["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){Po[e]=Po(e)}));var Io,Do,$o={exports:{}},zo={};var Bo=(Do||(Do=1,$o.exports=function(){if(Io)return zo;Io=1;var e=h,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function l(e,n,l){var a,s={},u=null,c=null;for(a in void 0!==l&&(u=""+l),void 0!==n.key&&(u=""+n.key),void 0!==n.ref&&(c=n.ref),n)r.call(n,a)&&!i.hasOwnProperty(a)&&(s[a]=n[a]);if(e&&e.defaultProps)for(a in n=e.defaultProps)void 0===s[a]&&(s[a]=n[a]);return{$$typeof:t,type:e,key:u,ref:c,props:s,_owner:o.current}}return zo.Fragment=n,zo.jsx=l,zo.jsxs=l,zo}()),$o.exports);function Fo(e){const{styles:t,defaultTheme:n={}}=e,r="function"==typeof t?e=>{return t(null==(r=e)||0===Object.keys(r).length?n:e);var r}:t;return Bo.jsx(ko,{styles:r})}
|
|
7
|
+
System.register(["@nebula.js/stardust","react-dom","react"],(function(e){"use strict";var t,n,r,o,i,l,a,s,u,c,d,p,f,m,g,h,v,b,y,x,_,E,C,S,w,k,T;return{setters:[function(e){t=e.useMemo,n=e.useEffect,r=e.useElement,o=e.useStaleLayout,i=e.useModel,l=e.useInteractionState,a=e.useEmitter,s=e.useTranslator,u=e.useState,c=e.useTheme,d=e.usePromise,p=e.useImperativeHandle},function(e){f=e.default,m=e},function(e){g=e.createContext,h=e.default,v=e,b=e.forwardRef,y=e.useContext,x=e.Children,_=e.isValidElement,E=e.cloneElement,C=e.useState,S=e.useEffect,w=e.useRef,k=e.useCallback,T=e.useMemo}],execute:function(){e("default",(function(e){const t=new QE,{flags:f}=e,m=[];return{qae:{properties:A,data:N(t)},component(){const e=r(),g=P(e),h=o(),v=i(),b=l(),y=a(),x=s(),[_,E]=u(!1),[C,S]=u(void 0),[w,k]=u(1),T=c(),[A,N]=u(!1),[R,O]=u(null);d((()=>new Promise((e=>{var t;const n={id:null==h||null===(t=h.qInfo)||void 0===t?void 0:t.qId,resolve:e};m.push(n)}))),[]);const M=e=>{e||k(0),v_(h)||(!0===e&&N(!0),E(e),y.emit("njs-internal-edit-change",e))};n((()=>{const e=e=>{!async function(e,t){!async function(e,t){try{if(e&&t){const n=t(await e.getProperties());await e.setProperties(n)}}catch(e){console.error(e)}}(e,(e=>{const{qHyperCubeDef:n}=e;if(n){var r;const e=null===(r=n.qMeasures)||void 0===r?void 0:r.filter((e=>!(null==t?void 0:t.find((t=>{var n;return t===(null==e||null===(n=e.qDef)||void 0===n?void 0:n.cId)})))));n.qMeasures=e,n.qInterColumnSortOrder=[]}return{...e,qHyperCubeDef:n}}))}(v,e)};return y.on("onNodeDestroyed",e),()=>{y.removeListener("onNodeDestroyed",e)}}),[y,v]),n((()=>{2===w&&b.edit&&b.select&&M(!0)}),[w,b]),n((()=>{h&&void 0===C&&(S(h.text||null),O(null==h?void 0:h.text))}),[h,C]),n((()=>{const n=()=>{b.edit&&b.select&&k((e=>e+1))},r=t=>{const n=document.getElementById(WE(v));e.contains(t.target)||null!=n&&n.contains(t.target)||(e=>{const t=document.getElementsByClassName("tekPopperMenu"),n=document.getElementById("tekTableMenu");if(null!=n&&n.contains(e))return!0;for(let n=0;n<t.length;n++)if(t[n].contains(e))return!0;return!1})(t.target)||M(!1)};if(!b.edit||!b.select){var o;M(!1);const e=(null==v?void 0:v.id)&&(null===(o=t.getSnTexts()[v.id])||void 0===o?void 0:o.propertiesHaveBeenModified);(A||e)&&(y.emit("saveDocument"),t.setPropertiesHaveBeenModified(v.id,!1))}return e.addEventListener("click",n),document.addEventListener("mousedown",r),()=>{e.removeEventListener("click",n),document.removeEventListener("mousedown",r)}}),[e,b,v]),n((()=>{YE({rootElement:g,layout:h,model:v,element:e,edit:_,initialData:C,emitter:y,lang:x.language(),flags:f,theme:T,interactionState:b,readyToPrint:m})}),[h,g,v,e,_,e,C,y,f,T,b]),n((()=>{!_&&A&&y.emit("saveDocument")}),[_,y,A]),n((()=>{if(h){const e=h;e.text&&e.text!==R&&(O(e.text),y.emit("reloadData",e.text))}}),[h,R,y]),p((()=>({updateActiveState(e){e?t.setSelectedModelId(v.id):v.id===t.getSelectedModelId()&&t.setSelectedModelId(void 0)}})),[])},ext:{definition:{type:"items",component:"accordion",items:{data:UE,settings:VE}},exportProperties:null,importProperties:null,support:{snapshot:!0,export:!0,sharing:!0,exportData:!0,viewData:!1}}}}));const A={version:"1.2.8",showTitles:!1,text:null,fontsUsed:[],components:[],qHyperCubeDef:{qDimensions:[],qMeasures:[],qSuppressZero:!1,qSuppressMissing:!0,qInitialDataFetch:[{qWidth:500,qHeight:10}]},disableNavMenu:!0,showDetails:!1},N=e=>{const t=()=>{e.setPropertiesHaveBeenModifiedForSelectedModel(!0)};return{targets:[{path:"/qHyperCubeDef",dimensions:{min:0,max:0},measures:{min:0,max:100,added(e){e.qDef={...e.qDef,qAggrFunc:"None"},t()},removed:t,replaced:t,moved:t}}]}};function R(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var O,M={};var L=function(){if(O)return M;O=1;var e=f;return M.createRoot=e.createRoot,M.hydrateRoot=e.hydrateRoot,M}();const P=e=>{const r=t((()=>L.createRoot(e)),[e]);return n((()=>()=>{null==r||r.unmount()}),[r]),r},I=g({layout:void 0,model:void 0,element:void 0,edit:!1,initialData:void 0,emitter:void 0,lang:"en",flags:{isEnabled:()=>!1},theme:null,readyToPrint:[]});var D,$,z,B,F,H,j,W,K,G,Y,U,V={},Q={},q={},J={};function X(){if(D)return J;D=1;let e={},t={},n={},r={},o={},i={},l={},a={},s={},u={},c={},d={},p={},f={},m={},g={},h={},v={},b={},y={},x={},_={},E={},C={},S={},w={},k={},T={},A={},N={},R={},O={},M={},L={},P={};function I(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let $="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,z=$&&"documentMode"in document?document.documentMode:null,B=$&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),F=$&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),H=!(!$||!("InputEvent"in window)||z)&&"getTargetRanges"in new window.InputEvent("input"),j=$&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),W=$&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,K=$&&/^(?=.*Chrome).*/i.test(navigator.userAgent),G=$&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!K,Y=j||W||G?" ":"",U=F?" ":Y,V=/^[^A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]*[\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]/,Q=/^[^\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]*[A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]/,q={bold:1,code:16,highlight:128,italic:2,strikethrough:4,subscript:32,superscript:64,underline:8},X={directionless:1,unmergeable:2},Z={center:2,end:6,justify:4,left:1,right:3,start:5},ee={2:"center",6:"end",4:"justify",1:"left",3:"right",5:"start"},te={normal:0,segmented:2,token:1},ne={0:"normal",2:"segmented",1:"token"},re=!1,oe=0;function ie(e){oe=e.timeStamp}function le(e,t,n){return t.__lexicalLineBreak===e||void 0!==e[`__lexicalKey_${n._key}`]}function ae(e,t,n){re=!0;let r=100<performance.now()-oe;try{kr(e,(()=>{let o=tr()||function(e){return e.getEditorState().read((()=>{let e=tr();return null!==e?e.clone():null}))}(e);var i=new Map,l=e.getRootElement(),a=e._editorState,s=e._blockCursorElement;let u=!1,c="";for(var d=0;d<t.length;d++){var p=t[d],f=p.type,m=p.target,g=Oe(m,a);if(!(null===g&&m!==l||Ar(g)))if("characterData"===f){if(p=r&&Rn(g))e:{f=m;var h=g;if(Bn(p=o)){var v=p.anchor.getNode();if(v.is(h)&&p.format!==v.getFormat()){p=!1;break e}}p=3===f.nodeType&&h.isAttached()}p&&(f=p=null,null!==(h=lt(e._window))&&h.anchorNode===m&&(p=h.anchorOffset,f=h.focusOffset),null!==(m=m.nodeValue)&&He(g,m,p,f,!1))}else if("childList"===f){for(u=!0,f=p.addedNodes,h=0;h<f.length;h++){var b=Re(v=f[h]),y=v.parentNode;null==y||v===s||null!==b||"BR"===v.nodeName&&le(v,y,e)||(F&&(b=v.innerText||v.nodeValue)&&(c+=b),y.removeChild(v))}if(0<(f=(p=p.removedNodes).length)){for(h=0,v=0;v<f;v++)("BR"===(y=p[v]).nodeName&&le(y,m,e)||s===y)&&(m.appendChild(y),h++);f!==h&&(m===l&&(g=a._nodeMap.get("root")),i.set(m,g))}}}if(0<i.size)for(let[t,n]of i)if(Rr(n))for(i=n.getChildrenKeys(),l=t.firstChild,a=0;a<i.length;a++)null!==(s=e.getElementByKey(i[a]))&&(null==l?(t.appendChild(s),l=s):l!==s&&t.replaceChild(s,l),l=l.nextSibling);else Rn(n)&&n.markDirty();if(0<(i=n.takeRecords()).length){for(l=0;l<i.length;l++)for(a=(s=i[l]).addedNodes,s=s.target,d=0;d<a.length;d++)null==(m=(g=a[d]).parentNode)||"BR"!==g.nodeName||le(g,s,e)||m.removeChild(g);n.takeRecords()}null!==o&&(u&&(o.dirty=!0,Ie(o)),F&&Ue(e)&&o.insertRawText(c))}))}finally{re=!1}}function se(e){let t=e._observer;if(null!==t){ae(e,t.takeRecords(),t)}}function ue(e){0===oe&&Xe(e).addEventListener("textInput",ie,!0),e._observer=new MutationObserver(((t,n)=>{ae(e,t,n)}))}function ce(e,t){let n=e.__mode,r=e.__format;e=e.__style;let o=t.__mode,i=t.__format;return t=t.__style,!(null!==n&&n!==o||null!==r&&r!==i||null!==e&&e!==t)}function de(e,t){let n=e.mergeWithSibling(t),r=vr()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function pe(e){if(""===e.__text&&e.isSimpleText()&&!e.isUnmergeable())e.remove();else{for(var t;null!==(t=e.getPreviousSibling())&&Rn(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(""!==t.__text){ce(t,e)&&(e=de(t,e));break}t.remove()}for(var n;null!==(n=e.getNextSibling())&&Rn(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(""!==n.__text){ce(e,n)&&de(e,n);break}n.remove()}}}function fe(e){return me(e.anchor),me(e.focus),e}function me(e){for(;"element"===e.type;){var t=e.getNode(),n=e.offset;if(n===t.getChildrenSize()?(t=t.getChildAtIndex(n-1),n=!0):(t=t.getChildAtIndex(n),n=!1),Rn(t)){e.set(t.__key,n?t.getTextContentSize():0,"text");break}if(!Rr(t))break;e.set(t.__key,n?t.getChildrenSize():0,"element")}}let ge=1,he="function"==typeof queueMicrotask?queueMicrotask:e=>{Promise.resolve().then(e)};function ve(e){let t=document.activeElement;if(null===t)return!1;let n=t.nodeName;return Ar(Oe(e))&&("INPUT"===n||"TEXTAREA"===n||"true"===t.contentEditable&&null==t.__lexicalEditor)}function be(e,t,n){let r=e.getRootElement();try{return null!==r&&r.contains(t)&&r.contains(n)&&null!==t&&!ve(t)&&ye(t)===e}catch(e){return!1}}function ye(e){for(;null!=e;){let t=e.__lexicalEditor;if(null!=t)return t;e=qe(e)}return null}function xe(e){return e.isToken()||e.isSegmented()}function _e(e){for(;null!=e;){if(3===e.nodeType)return e;e=e.firstChild}return null}function Ee(e,t,n){return!(e&(t=q[t]))||null!==n&&n&t?null===n||n&t?e|t:e:e^t}function Ce(e){return Rn(e)||mn(e)||Ar(e)}function Se(e,t){if(null!=t)e.__key=t;else{gr(),99<pr&&I(14),t=vr();var n=hr(),r=""+ge++;n._nodeMap.set(r,e),Rr(e)?t._dirtyElements.set(r,!0):t._dirtyLeaves.add(r),t._cloneNotNeeded.add(r),t._dirtyType=1,e.__key=r}}function we(e){var t=e.getParent();if(null!==t){let o=e.getWritable();t=t.getWritable();var n=e.getPreviousSibling();if(e=e.getNextSibling(),null===n)if(null!==e){var r=e.getWritable();t.__first=e.__key,r.__prev=null}else t.__first=null;else{if(r=n.getWritable(),null!==e){let t=e.getWritable();t.__prev=r.__key,r.__next=t.__key}else r.__next=null;o.__prev=null}null===e?null!==n?(e=n.getWritable(),t.__last=n.__key,e.__next=null):t.__last=null:(e=e.getWritable(),null!==n?((n=n.getWritable()).__next=e.__key,e.__prev=n.__key):e.__prev=null,o.__next=null),t.__size--,o.__parent=null}}function ke(e){99<pr&&I(14);var t=e.getLatest(),n=t.__parent,r=hr();let o=vr(),i=r._nodeMap;if(r=o._dirtyElements,null!==n)e:for(;null!==n&&!r.has(n);){let e=i.get(n);if(void 0===e)break;r.set(n,!1),n=e.__parent}t=t.__key,o._dirtyType=1,Rr(e)?r.set(t,!0):o._dirtyLeaves.add(t)}function Te(e){gr();var t=vr();let n=t._compositionKey;e!==n&&(t._compositionKey=e,null!==n&&(null!==(t=Ne(n))&&t.getWritable()),null!==e&&(null!==(e=Ne(e))&&e.getWritable()))}function Ae(){return mr()?null:vr()._compositionKey}function Ne(e,t){return void 0===(e=(t||hr())._nodeMap.get(e))?null:e}function Re(e,t){return void 0!==(e=e[`__lexicalKey_${vr()._key}`])?Ne(e,t):null}function Oe(e,t){for(;null!=e;){let n=Re(e,t);if(null!==n)return n;e=qe(e)}return null}function Me(e){let t=Object.assign({},e._decorators);return e._pendingDecorators=t}function Le(e){return e.read((()=>Pe().getTextContent()))}function Pe(){return hr()._nodeMap.get("root")}function Ie(e){gr();let t=hr();null!==e&&(e.dirty=!0,e._cachedNodes=null),t._selection=e}function De(e){var t,n=vr();e:{for(t=e;null!=t;){let e=t[`__lexicalKey_${n._key}`];if(void 0!==e){t=e;break e}t=qe(t)}t=null}return null===t?e===(n=n.getRootElement())?Ne("root"):null:Ne(t)}function $e(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function ze(e){let t=[];for(;null!==e;)t.push(e),e=e._parentEditor;return t}function Be(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function Fe(e,t,n){if(null!==(t=lt(t._window))){var r=t.anchorNode,{anchorOffset:o,focusOffset:i}=t;if(null!==r&&(t=3===r.nodeType?r.nodeValue:null,r=Oe(r),null!==t&&Rn(r))){if(t===Y&&n){t=n,i=o=n.length}null!==t&&He(r,t,o,i,e)}}}function He(e,t,n,r,o){let i=e;if(i.isAttached()&&(o||!i.isDirty())){let u=i.isComposing(),c=t;if((u||o)&&t[t.length-1]===Y&&(c=t.slice(0,-1)),t=i.getTextContent(),o||c!==t)if(""===c)if(Te(null),j||W||G)i.remove();else{let e=vr();setTimeout((()=>{e.update((()=>{i.isAttached()&&i.remove()}))}),20)}else{o=i.getParent(),t=nr();var l=i.getTextContentSize(),a=Ae(),s=i.getKey();i.isToken()||null!==a&&s===a&&!u||Bn(t)&&(null!==o&&!o.canInsertTextBefore()&&0===t.anchor.offset||t.anchor.key===e.__key&&0===t.anchor.offset&&!i.canInsertTextBefore()||t.focus.key===e.__key&&t.focus.offset===l&&!i.canInsertTextAfter())?i.markDirty():(Bn(e=tr())&&null!==n&&null!==r&&(e.setTextNodeRange(i,n,i,r),i.isSegmented()&&(n=Nn(n=i.getTextContent()),i.replace(n),i=n)),i.setTextContent(c))}}}function je(){var e=Pe();Ie(fe(e=e.select(0,e.getChildrenSize())))}function We(e,t){void 0===e.__lexicalClassNameCache&&(e.__lexicalClassNameCache={});let n=e.__lexicalClassNameCache,r=n[t];return void 0!==r?r:"string"==typeof(e=e[t])?(e=e.split(" "),n[t]=e):e}function Ke(e,t,n,r,o){0!==n.size&&(n=r.__type,r=r.__key,void 0===(t=t.get(n))&&I(33,n),n=t.klass,void 0===(t=e.get(n))&&(t=new Map,e.set(n,t)),n="destroyed"===(e=t.get(r))&&"created"===o,(void 0===e||n)&&t.set(r,n?"updated":o))}function Ge(e,t,n){let r=e.getParent(),o=n;return null!==r&&(t&&0===n?(o=e.getIndexWithinParent(),e=r):t||n!==e.getChildrenSize()||(o=e.getIndexWithinParent()+1,e=r)),e.getChildAtIndex(t?o-1:o)}function Ye(e,t){var n=e.offset;return"element"===e.type?Ge(e=e.getNode(),t,n):(e=e.getNode(),t&&0===n||!t&&n===e.getTextContentSize()?null===(n=t?e.getPreviousSibling():e.getNextSibling())?Ge(e.getParentOrThrow(),t,e.getIndexWithinParent()+(t?0:1)):n:null)}function Ue(e){return"insertFromPaste"===(e=(e=Xe(e).event)&&e.inputType)||"insertFromPasteAsQuotation"===e}function Ve(e){return!Lr(e)&&!e.isLastChild()&&!e.isInline()}function Qe(e,t){return void 0===(e=e._keyToDOMMap.get(t))&&I(75,t),e}function qe(e){return null!==(e=e.assignedSlot||e.parentElement)&&11===e.nodeType?e.host:e}function Je(e,t){for(e=e.getParent();null!==e;){if(e.is(t))return!0;e=e.getParent()}return!1}function Xe(e){return null===(e=e._window)&&I(78),e}function Ze(e){for(e=e.getParentOrThrow();null!==e&&!et(e);)e=e.getParentOrThrow();return e}function et(e){return Lr(e)||Rr(e)&&e.isShadowRoot()}function tt(e){return Se(e=e.constructor.clone(e),null),e}function nt(e){var t=vr();let n=e.constructor.getType();return void 0===(t=t._nodes.get(n))&&I(97),null!==(t=t.replace)?((t=t(e))instanceof e.constructor||I(98),t):e}function rt(e,t){!Lr(e=e.getParent())||Rr(t)||Ar(t)||I(99)}function ot(e){return(Ar(e)||Rr(e)&&!e.canBeEmpty())&&!e.isInline()}function it(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null,null!==(t=e.parentElement)&&t.removeChild(e)}function lt(e){return $?(e||window).getSelection():null}function at(e,t){let n=e.getChildAtIndex(t);null==n&&(n=e),et(e)&&I(102);let r=e=>{const t=e.getParentOrThrow(),o=et(t),i=e!==n||o?tt(e):e;if(o)return e.insertAfter(i),[e,i,i];const[l,a,s]=r(t);return e=e.getNextSiblings(),s.append(i,...e),[l,a,i]},[o,i]=r(n);return[o,i]}function st(e,t){for(;e!==Pe()&&null!=e;){if(t(e))return e;e=e.getParent()}return null}function ut(e){let t=[],n=[e];for(;0<n.length;){let r=n.pop();void 0===r&&I(112),Rr(r)&&n.unshift(...r.getChildren()),r!==e&&t.push(r)}return t}function ct(e,t,n,r,o,i){for(e=e.getFirstChild();null!==e;){let l=e.__key;e.__parent===t&&(Rr(e)&&ct(e,l,n,r,o,i),n.has(l)||i.delete(l),o.push(l)),e=e.getNextSibling()}}let dt,pt,ft,mt,gt,ht,vt,bt,yt,xt,_t="",Et="",Ct="",St=!1,wt=!1,kt=null;function Tt(e,t){let n=vt.get(e);if(null!==t){let n=Ht(e);n.parentNode===t&&t.removeChild(n)}bt.has(e)||pt._keyToDOMMap.delete(e),Rr(n)&&At(e=$t(n,vt),0,e.length-1,null),void 0!==n&&Ke(xt,ft,mt,n,"destroyed")}function At(e,t,n,r){for(;t<=n;++t){let n=e[t];void 0!==n&&Tt(n,r)}}function Nt(e,t){e.setProperty("text-align",t)}function Rt(e,t){var n=dt.theme.indent;if("string"==typeof n){let r=e.classList.contains(n);0<t&&!r?e.classList.add(n):1>t&&r&&e.classList.remove(n)}n=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||"40px",e.style.setProperty("padding-inline-start",0===t?"":`calc(${t} * ${n})`)}function Ot(e,t){e=e.style,0===t?Nt(e,""):1===t?Nt(e,"left"):2===t?Nt(e,"center"):3===t?Nt(e,"right"):4===t?Nt(e,"justify"):5===t?Nt(e,"start"):6===t&&Nt(e,"end")}function Mt(e,t,n){let r=bt.get(e);void 0===r&&I(60);let o=r.createDOM(dt,pt);var i=pt._keyToDOMMap;if(o["__lexicalKey_"+pt._key]=e,i.set(e,o),Rn(r)?o.setAttribute("data-lexical-text","true"):Ar(r)&&o.setAttribute("data-lexical-decorator","true"),Rr(r)){if(e=r.__indent,i=r.__size,0!==e&&Rt(o,e),0!==i){--i,e=$t(r,bt);var l=Et;Et="",Lt(e,r,0,i,o,null),Dt(r,o),Et=l}0!==(e=r.__format)&&Ot(o,e),r.isInline()||It(null,r,o),Ve(r)&&(_t+="\n\n",Ct+="\n\n")}else i=r.getTextContent(),Ar(r)?(null!==(l=r.decorate(pt,dt))&&Bt(e,l),o.contentEditable="false"):Rn(r)&&(r.isDirectionless()||(Et+=i)),_t+=i,Ct+=i;return null!==t&&(null!=n?t.insertBefore(o,n):null!=(n=t.__lexicalLineBreak)?t.insertBefore(o,n):t.appendChild(o)),Ke(xt,ft,mt,r,"created"),o}function Lt(e,t,n,r,o,i){let l=_t;for(_t="";n<=r;++n)Mt(e[n],o,i);Ve(t)&&(_t+="\n\n"),o.__lexicalTextContent=_t,_t=l+_t}function Pt(e,t){return mn(e=t.get(e))||Ar(e)&&e.isInline()}function It(e,t,n){e=null!==e&&(0===e.__size||Pt(e.__last,vt)),t=0===t.__size||Pt(t.__last,bt),e?t||(null!=(t=n.__lexicalLineBreak)&&n.removeChild(t),n.__lexicalLineBreak=null):t&&(t=document.createElement("br"),n.__lexicalLineBreak=t,n.appendChild(t))}function Dt(e,t){var n=t.__lexicalDir;if(t.__lexicalDirTextContent!==Et||n!==kt){let i=""===Et;if(i)var r=kt;else r=Et,r=V.test(r)?"rtl":Q.test(r)?"ltr":null;if(r!==n){let l=t.classList,a=dt.theme;var o=null!==n?a[n]:void 0;let s=null!==r?a[r]:void 0;void 0!==o&&("string"==typeof o&&(o=o.split(" "),o=a[n]=o),l.remove(...o)),null===r||i&&"ltr"===r?t.removeAttribute("dir"):(void 0!==s&&("string"==typeof s&&(n=s.split(" "),s=a[r]=n),void 0!==s&&l.add(...s)),t.dir=r),wt||(e.getWritable().__dir=r)}kt=r,t.__lexicalDirTextContent=Et,t.__lexicalDir=r}}function $t(e,t){let n=[];for(e=e.__first;null!==e;){let r=t.get(e);void 0===r&&I(101),n.push(e),e=r.__next}return n}function zt(e,t){var n=vt.get(e),r=bt.get(e);void 0!==n&&void 0!==r||I(61);var o=St||ht.has(e)||gt.has(e);let i=Qe(pt,e);if(n===r&&!o)return Rr(n)?(void 0!==(r=i.__lexicalTextContent)&&(_t+=r,Ct+=r),void 0!==(r=i.__lexicalDirTextContent)&&(Et+=r)):(r=n.getTextContent(),Rn(n)&&!n.isDirectionless()&&(Et+=r),Ct+=r,_t+=r),i;if(n!==r&&o&&Ke(xt,ft,mt,r,"updated"),r.updateDOM(n,i,dt))return r=Mt(e,null,null),null===t&&I(62),t.replaceChild(r,i),Tt(e,null),r;if(Rr(n)&&Rr(r)){if((e=r.__indent)!==n.__indent&&Rt(i,e),(e=r.__format)!==n.__format&&Ot(i,e),o){e=r,o=Et,Et="",t=_t;var l=n.__size,a=e.__size;if(_t="",1===l&&1===a){var s=n.__first,u=e.__first;if(s===u)zt(s,i);else{var c=Ht(s);u=Mt(u,null,null),i.replaceChild(u,c),Tt(s,null)}}else{u=$t(n,vt);var d=$t(e,bt);if(0===l)0!==a&&Lt(d,e,0,a-1,i,null);else if(0===a)0!==l&&(At(u,0,l-1,(s=null==i.__lexicalLineBreak)?null:i),s&&(i.textContent=""));else{var p=u;u=d,d=l-1,l=a-1;let t=i.firstChild,n=0;for(a=0;n<=d&&a<=l;){var f=p[n];let e=u[a];if(f===e)t=Ft(zt(e,i)),n++,a++;else{void 0===s&&(s=new Set(p)),void 0===c&&(c=new Set(u));let r=c.has(f),o=s.has(e);r?(o?((f=Qe(pt,e))===t?t=Ft(zt(e,i)):(null!=t?i.insertBefore(f,t):i.appendChild(f),zt(e,i)),n++):Mt(e,i,t),a++):(t=Ft(Ht(f)),Tt(f,i),n++)}}c=a>l,(s=n>d)&&!c?Lt(u,e,a,l,i,s=void 0===(s=u[l+1])?null:pt.getElementByKey(s)):c&&!s&&At(p,n,d,i)}}Ve(e)&&(_t+="\n\n"),i.__lexicalTextContent=_t,_t=t+_t,Dt(e,i),Et=o,Lr(r)||r.isInline()||It(n,r,i)}Ve(r)&&(_t+="\n\n",Ct+="\n\n")}else n=r.getTextContent(),Ar(r)?null!==(o=r.decorate(pt,dt))&&Bt(e,o):Rn(r)&&!r.isDirectionless()&&(Et+=n),_t+=n,Ct+=n;return!wt&&Lr(r)&&r.__cachedText!==Ct&&((r=r.getWritable()).__cachedText=Ct),i}function Bt(e,t){let n=pt._pendingDecorators,r=pt._decorators;if(null===n){if(r[e]===t)return;n=Me(pt)}n[e]=t}function Ft(e){return null!==(e=e.nextSibling)&&e===pt._blockCursorElement&&(e=e.nextSibling),e}function Ht(e){let t=yt.get(e);return void 0===t&&I(75,e),t}let jt=Object.freeze({}),Wt=[["keydown",function(e,t){if(Kt=e.timeStamp,Gt=e.keyCode,!t.isComposing()){var{keyCode:o,shiftKey:i,ctrlKey:l,metaKey:a,altKey:k}=e;if(!Cr(t,f,e)){if(39!==o||l||a||k)if(39!==o||k||i||!l&&!a)if(37!==o||l||a||k)if(37!==o||k||i||!l&&!a)if(38!==o||l||a)if(40!==o||l||a)if(13===o&&i)Jt=!0,Cr(t,x,e);else if(32===o)Cr(t,_,e);else if(B&&l&&79===o)e.preventDefault(),Jt=!0,Cr(t,r,!0);else if(13!==o||i)if(B?k||a||!(8===o||72===o&&l):l||k||a||8!==o)if(27===o)Cr(t,C,e);else if(B?i||k||a||!(46===o||68===o&&l):l||k||a||46!==o)if(8===o&&(B?k:l))e.preventDefault(),Cr(t,s,!0);else if(46===o&&(B?k:l))e.preventDefault(),Cr(t,s,!1);else if(B&&a&&8===o)e.preventDefault(),Cr(t,u,!0);else if(B&&a&&46===o)e.preventDefault(),Cr(t,u,!1);else if(66===o&&!k&&(B?a:l))e.preventDefault(),Cr(t,c,"bold");else if(85===o&&!k&&(B?a:l))e.preventDefault(),Cr(t,c,"underline");else if(73===o&&!k&&(B?a:l))e.preventDefault(),Cr(t,c,"italic");else if(9!==o||k||l||a)if(90===o&&!i&&(B?a:l))e.preventDefault(),Cr(t,d,void 0);else{var T=B?90===o&&a&&i:89===o&&l||90===o&&l&&i;T?(e.preventDefault(),Cr(t,p,void 0)):Wn(t._editorState._selection)?(T=!i&&(67===o&&(B?a:l)))?(e.preventDefault(),Cr(t,R,e)):(T=!i&&(88===o&&(B?a:l)))?(e.preventDefault(),Cr(t,O,e)):65===o&&(B?a:l)&&(e.preventDefault(),t.update((()=>{je()}))):!F&&65===o&&(B?a:l)&&(e.preventDefault(),t.update((()=>{je()})))}else Cr(t,w,e);else 46===o?Cr(t,S,e):(e.preventDefault(),Cr(t,n,!1));else 8===o?Cr(t,E,e):(e.preventDefault(),Cr(t,n,!0));else Jt=!1,Cr(t,x,e);else Cr(t,y,e);else Cr(t,b,e);else Cr(t,v,e);else Cr(t,h,e);else Cr(t,g,e);else Cr(t,m,e);(l||i||k||a)&&Cr(t,P,e)}}}],["pointerdown",function(e,t){let n=e.target;e=e.pointerType,n instanceof Node&&"touch"!==e&&kr(t,(()=>{Ar(Oe(n))||(qt=!0)}))}],["compositionstart",function(e,t){kr(t,(()=>{let n=tr();if(Bn(n)&&!t.isComposing()){let r=n.anchor,o=n.anchor.getNode();Te(r.key),(e.timeStamp<Kt+30||"element"===r.type||!n.isCollapsed()||o.getFormat()!==n.format||o.getStyle()!==n.style)&&Cr(t,i,U)}}))}],["compositionend",function(e,t){F?Xt=!0:kr(t,(()=>{on(t,e.data)}))}],["input",function(e,t){e.stopPropagation(),kr(t,(()=>{var n=tr(),r=e.data,o=rn(e);if(null!=r&&Bn(n)&&en(n,o,r,e.timeStamp,!1)){Xt&&(on(t,r),Xt=!1);var l=n.anchor,a=l.getNode();if(null===(o=lt(t._window)))return;let s=l.offset;(l=H&&!n.isCollapsed()&&Rn(a)&&null!==o.anchorNode)&&(l=(a=a.getTextContent().slice(0,s)+r+a.getTextContent().slice(s+n.focus.offset))===(3===(o=o.anchorNode).nodeType?o.nodeValue:null)),l||Cr(t,i,r),r=r.length,F&&1<r&&"insertCompositionText"===e.inputType&&!t.isComposing()&&(n.anchor.offset-=r),j||W||G||!t.isComposing()||(Kt=0,Te(null))}else Fe(!1,t,null!==r?r:void 0),Xt&&(on(t,r||void 0),Xt=!1);gr(),se(n=vr())})),Ut=null}],["click",function(e,n){kr(n,(()=>{let r=tr();var o=lt(n._window);let i=nr();if(o)if(Bn(r)){let t=r.anchor;var l=t.getNode();"element"===t.type&&0===t.offset&&r.isCollapsed()&&!Lr(l)&&1===Pe().getChildrenSize()&&l.getTopLevelElementOrThrow().isEmpty()&&null!==i&&r.is(i)?(o.removeAllRanges(),r.dirty=!0):3!==e.detail||r.isCollapsed()||l!==(o=r.focus.getNode())&&(Rr(l)?l.select(0):l.getParentOrThrow().select(0))}else"touch"===e.pointerType&&(null!==(l=o.anchorNode)&&(1===(l=l.nodeType)||3===l))&&Ie(o=er(i,o,n));Cr(n,t,e)}))}],["cut",jt],["copy",jt],["dragstart",jt],["dragover",jt],["dragend",jt],["paste",jt],["focus",jt],["blur",jt],["drop",jt]];H&&Wt.push(["beforeinput",(e,t)=>function(e,t){let f=e.inputType,m=rn(e);"deleteCompositionText"===f||F&&Ue(t)||"insertCompositionText"!==f&&kr(t,(()=>{let g=tr();if("deleteContentBackward"===f){if(null===g){var h=nr();if(!Bn(h))return;Ie(h.clone())}if(Bn(g))return void(229===Gt&&e.timeStamp<Kt+30&&t.isComposing()&&g.anchor.key===g.focus.key?(Te(null),Kt=0,setTimeout((()=>{kr(t,(()=>{Te(null)}))}),30),Bn(g)&&(h=g.anchor.getNode(),h.markDirty(),g.format=h.getFormat(),g.style=h.getStyle())):(e.preventDefault(),Cr(t,n,!0)))}if(Bn(g)){h=e.data,null!==Ut&&Fe(!1,t,Ut),g.dirty&&null===Ut||!g.isCollapsed()||Lr(g.anchor.getNode())||null===m||g.applyDOMRange(m),Ut=null;var v=g.focus,b=g.anchor.getNode();if(v=v.getNode(),"insertText"===f||"insertTranspose"===f)"\n"===h?(e.preventDefault(),Cr(t,r,!1)):"\n\n"===h?(e.preventDefault(),Cr(t,o,void 0)):null==h&&e.dataTransfer?(h=e.dataTransfer.getData("text/plain"),e.preventDefault(),g.insertRawText(h)):null!=h&&en(g,m,h,e.timeStamp,!0)?(e.preventDefault(),Cr(t,i,h)):Ut=h,Yt=e.timeStamp;else switch(e.preventDefault(),f){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Cr(t,i,e);break;case"insertFromComposition":Te(null),Cr(t,i,e);break;case"insertLineBreak":Te(null),Cr(t,r,!1);break;case"insertParagraph":Te(null),Jt&&!W?(Jt=!1,Cr(t,r,!1)):Cr(t,o,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Cr(t,l,e);break;case"deleteByComposition":(function(e,t){return e!==t||Rr(e)||Rr(t)||!e.isToken()||!t.isToken()})(b,v)&&Cr(t,a,e);break;case"deleteByDrag":case"deleteByCut":Cr(t,a,e);break;case"deleteContent":Cr(t,n,!1);break;case"deleteWordBackward":Cr(t,s,!0);break;case"deleteWordForward":Cr(t,s,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Cr(t,u,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Cr(t,u,!1);break;case"formatStrikeThrough":Cr(t,c,"strikethrough");break;case"formatBold":Cr(t,c,"bold");break;case"formatItalic":Cr(t,c,"italic");break;case"formatUnderline":Cr(t,c,"underline");break;case"historyUndo":Cr(t,d,void 0);break;case"historyRedo":Cr(t,p,void 0)}}}))}(e,t)]);let Kt=0,Gt=0,Yt=0,Ut=null,Vt=0,Qt=!1,qt=!1,Jt=!1,Xt=!1,Zt=[0,"",0,"root",0];function en(e,t,n,r,o){let i=e.anchor,l=e.focus,a=i.getNode();var s=vr();let u=lt(s._window),c=null!==u?u.anchorNode:null,d=i.key;s=s.getElementByKey(d);let p=n.length;return d!==l.key||!Rn(a)||(!o&&(!H||Yt<r+50)||a.isDirty()&&2>p||$e(n))&&i.offset!==l.offset&&!a.isComposing()||xe(a)||a.isDirty()&&1<p||(o||!H)&&null!==s&&!a.isComposing()&&c!==_e(s)||null!==u&&null!==t&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||a.getFormat()!==e.format||a.getStyle()!==e.style||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;e=e.anchor.offset;let n=t.getParentOrThrow(),r=t.isToken();return 0===e?((e=!t.canInsertTextBefore()||!n.canInsertTextBefore()||r)||(e=(Rn(t=t.getPreviousSibling())||Rr(t)&&t.isInline())&&!t.canInsertTextAfter()),e):e===t.getTextContentSize()&&(!t.canInsertTextAfter()||!n.canInsertTextAfter()||r)}(e,a)}function tn(e,t){return null!==e&&null!==e.nodeValue&&3===e.nodeType&&0!==t&&t!==e.nodeValue.length}function nn(t,n,r){let{anchorNode:o,anchorOffset:i,focusNode:l,focusOffset:a}=t;Qt&&(Qt=!1,tn(o,i)&&tn(l,a))||kr(n,(()=>{if(r){if(be(n,o,l)){var i=tr();if(Bn(i)){var a=i.anchor,s=a.getNode();if(i.isCollapsed()){"Range"===t.type&&t.anchorNode===t.focusNode&&(i.dirty=!0);var u=Xe(n).event;u=u?u.timeStamp:performance.now();let[e,r,o,l,c]=Zt;u<c+200&&a.offset===o&&a.key===l?(i.format=e,i.style=r):"text"===a.type?(i.format=s.getFormat(),i.style=s.getStyle()):"element"===a.type&&(i.format=0,i.style="")}else{a=255,s=!1;let e=(u=i.getNodes()).length;for(let t=0;t<e;t++){let e=u[t];if(Rn(e)&&(s=!0,0===(a&=e.getFormat())))break}i.format=s?a:0}}Cr(n,e,void 0)}}else Ie(null)}))}function rn(e){return e.getTargetRanges?0===(e=e.getTargetRanges()).length?null:e[0]:null}function on(e,t){var n=e._compositionKey;if(Te(null),null!==n&&null!=t){if(""===t)return t=Ne(n),void(null!==(e=_e(e.getElementByKey(n)))&&null!==e.nodeValue&&Rn(t)&&He(t,e.nodeValue,null,null,!0));if("\n"===t[t.length-1]&&Bn(n=tr()))return t=n.focus,n.anchor.set(t.key,t.offset,t.type),void Cr(e,x,null)}Fe(!0,e,t)}function ln(e){let t=e.__lexicalEventHandles;return void 0===t&&(t=[],e.__lexicalEventHandles=t),t}let an=new Map;function sn(e){let t=lt(null==(e=e.target)?null:9===e.nodeType?e.defaultView:e.ownerDocument.defaultView);if(null!==t){var n=ye(t.anchorNode);if(null!==n){qt&&(qt=!1,kr(n,(()=>{var e=nr(),r=t.anchorNode;null!==r&&(1===(r=r.nodeType)||3===r)&&Ie(e=er(e,t,n))})));var r=(e=(e=ze(n))[e.length-1])._key,o=an.get(r),i=o||e;i!==n&&nn(t,i,!1),nn(t,n,!0),n!==e?an.set(r,n):o&&an.delete(r)}}}function un(e,t,n){gr();var r=e.__key;let o=e.getParent();if(null!==o){var i=tr();if(Bn(i)&&Rr(e)){var{anchor:l,focus:a}=i,s=l.getNode(),u=a.getNode();Je(s,e)&&l.set(e.__key,0,"element"),Je(u,e)&&a.set(e.__key,0,"element")}if(u=!1,Bn(s=i)&&t){i=s.anchor;let t=s.focus;i.key===r&&(ir(i,e,o,e.getPreviousSibling(),e.getNextSibling()),u=!0),t.key===r&&(ir(t,e,o,e.getPreviousSibling(),e.getNextSibling()),u=!0)}else Wn(s)&&t&&e.isSelected()&&e.selectPrevious();Bn(s)&&t&&!u?(r=e.getIndexWithinParent(),we(e),rr(s,o,r,-1)):we(e),n||et(o)||o.canBeEmpty()||!o.isEmpty()||un(o,t),t&&Lr(o)&&o.isEmpty()&&o.selectEnd()}}class cn{static getType(){I(64,this.name)}static clone(){I(65,this.name)}constructor(e){this.__type=this.constructor.getType(),this.__next=this.__prev=this.__parent=null,Se(this,e)}getType(){return this.__type}isAttached(){for(var e=this.__key;null!==e;){if("root"===e)return!0;if(null===(e=Ne(e)))break;e=e.__parent}return!1}isSelected(e){if(null==(e=e||tr()))return!1;let t=e.getNodes().some((e=>e.__key===this.__key));return(Rn(this)||!Bn(e)||"element"!==e.anchor.type||"element"!==e.focus.type||e.anchor.key!==e.focus.key||e.anchor.offset!==e.focus.offset)&&t}getKey(){return this.__key}getIndexWithinParent(){var e=this.getParent();if(null===e)return-1;e=e.getFirstChild();let t=0;for(;null!==e;){if(this.is(e))return t;t++,e=e.getNextSibling()}return-1}getParent(){let e=this.getLatest().__parent;return null===e?null:Ne(e)}getParentOrThrow(){let e=this.getParent();return null===e&&I(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){let t=e.getParent();if(et(t))return e;e=t}return null}getTopLevelElementOrThrow(){let e=this.getTopLevelElement();return null===e&&I(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:Ne(e)}getPreviousSiblings(){let e=[];var t=this.getParent();if(null===t)return e;for(t=t.getFirstChild();null!==t&&!t.is(this);)e.push(t),t=t.getNextSibling();return e}getNextSibling(){let e=this.getLatest().__next;return null===e?null:Ne(e)}getNextSiblings(){let e=[],t=this.getNextSibling();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){let t=this.getParents();var n=e.getParents();Rr(this)&&t.unshift(this),Rr(e)&&n.unshift(e),e=t.length;var r=n.length;if(0===e||0===r||t[e-1]!==n[r-1])return null;for(n=new Set(n),r=0;r<e;r++){let e=t[r];if(n.has(e))return e}return null}is(e){return null!=e&&this.__key===e.__key}isBefore(e){if(this===e)return!1;if(e.isParentOf(this))return!0;if(this.isParentOf(e))return!1;var t=this.getCommonAncestor(e);let n=this;for(;;){var r=n.getParentOrThrow();if(r===t){r=n.getIndexWithinParent();break}n=r}for(n=e;;){if((e=n.getParentOrThrow())===t){t=n.getIndexWithinParent();break}n=e}return r<t}isParentOf(e){let t=this.__key;if(t===e.__key)return!1;for(;null!==e;){if(e.__key===t)return!0;e=e.getParent()}return!1}getNodesBetween(e){let t=this.isBefore(e),n=[],r=new Set;for(var o=this;;){var i=o.__key;if(r.has(i)||(r.add(i),n.push(o)),o===e)break;if(null!==(i=Rr(o)?t?o.getFirstChild():o.getLastChild():null))o=i;else if(null!==(i=t?o.getNextSibling():o.getPreviousSibling()))o=i;else{if(o=o.getParentOrThrow(),r.has(o.__key)||n.push(o),o===e)break;i=o;do{null===i&&I(68),o=t?i.getNextSibling():i.getPreviousSibling(),null!==(i=i.getParent())&&(null!==o||r.has(i.__key)||n.push(i))}while(null===o)}}return t||n.reverse(),n}isDirty(){let e=vr()._dirtyLeaves;return null!==e&&e.has(this.__key)}getLatest(){let e=Ne(this.__key);return null===e&&I(113),e}getWritable(){gr();var e=hr(),t=vr();e=e._nodeMap;let n=this.__key,r=this.getLatest(),o=r.__parent;t=t._cloneNotNeeded;var i=tr();return null!==i&&(i._cachedNodes=null),t.has(n)?(ke(r),r):((i=r.constructor.clone(r)).__parent=o,i.__next=r.__next,i.__prev=r.__prev,Rr(r)&&Rr(i)?(i.__first=r.__first,i.__last=r.__last,i.__size=r.__size,i.__indent=r.__indent,i.__format=r.__format,i.__dir=r.__dir):Rn(r)&&Rn(i)&&(i.__format=r.__format,i.__style=r.__style,i.__mode=r.__mode,i.__detail=r.__detail),t.add(n),i.__key=n,ke(i),e.set(n,i),i)}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(){I(70)}updateDOM(){I(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){I(72)}static importJSON(){I(18,this.name)}static transform(){return null}remove(e){un(this,!0,e)}replace(e,t){gr();var n=tr();null!==n&&(n=n.clone()),rt(this,e);let r=this.getLatest(),o=this.__key,i=e.__key,l=e.getWritable(),a=(e=this.getParentOrThrow().getWritable()).__size;we(l);let s=r.getPreviousSibling(),u=r.getNextSibling(),c=r.__prev,d=r.__next,p=r.__parent;return un(r,!1,!0),null===s?e.__first=i:s.getWritable().__next=i,l.__prev=c,null===u?e.__last=i:u.getWritable().__prev=i,l.__next=d,l.__parent=p,e.__size=a,t&&this.getChildren().forEach((e=>{l.append(e)})),Bn(n)&&(Ie(n),t=n.anchor,n=n.focus,t.key===o&&In(t,l),n.key===o&&In(n,l)),Ae()===o&&Te(i),l}insertAfter(e,t=!0){gr(),rt(this,e);var n=this.getWritable();let r=e.getWritable();var o=r.getParent();let i=tr();var l=!1,a=!1;if(null!==o){var s=e.getIndexWithinParent();we(r),Bn(i)&&(a=o.__key,l=i.anchor,o=i.focus,l="element"===l.type&&l.key===a&&l.offset===s+1,a="element"===o.type&&o.key===a&&o.offset===s+1)}o=this.getNextSibling(),s=this.getParentOrThrow().getWritable();let u=r.__key,c=n.__next;return null===o?s.__last=u:o.getWritable().__prev=u,s.__size++,n.__next=u,r.__next=c,r.__prev=n.__key,r.__parent=n.__parent,t&&Bn(i)&&(rr(i,s,(t=this.getIndexWithinParent())+1),n=s.__key,l&&i.anchor.set(n,t+2,"element"),a&&i.focus.set(n,t+2,"element")),e}insertBefore(e,t=!0){gr(),rt(this,e);var n=this.getWritable();let r=e.getWritable(),o=r.__key;we(r);let i=this.getPreviousSibling(),l=this.getParentOrThrow().getWritable(),a=n.__prev,s=this.getIndexWithinParent();return null===i?l.__first=o:i.getWritable().__next=o,l.__size++,n.__prev=o,r.__prev=a,r.__next=n.__key,r.__parent=n.__parent,n=tr(),t&&Bn(n)&&rr(n,t=this.getParentOrThrow(),s),e}isParentRequired(){return!1}createParentElementNode(){return Br()}selectPrevious(e,t){gr();let n=this.getPreviousSibling(),r=this.getParentOrThrow();return null===n?r.select(0,0):Rr(n)?n.select():Rn(n)?n.select(e,t):(e=n.getIndexWithinParent()+1,r.select(e,e))}selectNext(e,t){gr();let n=this.getNextSibling(),r=this.getParentOrThrow();return null===n?r.select():Rr(n)?n.select(0,0):Rn(n)?n.select(e,t):(e=n.getIndexWithinParent(),r.select(e,e))}markDirty(){this.getWritable()}}class dn extends cn{static getType(){return"linebreak"}static clone(e){return new dn(e.__key)}constructor(e){super(e)}getTextContent(){return"\n"}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:e=>{let t,n,r=e.parentElement;return null!==r&&((t=r.firstChild)===e||t.nextSibling===e&&3===t.nodeType&&null!==(t.textContent||"").match(/^[\s|\r?\n|\t]+$/))&&((n=r.lastChild)===e||n.previousSibling===e&&3===n.nodeType&&null!==(n.textContent||"").match(/^[\s|\r?\n|\t]+$/))?null:{conversion:pn,priority:0}}}}static importJSON(){return fn()}exportJSON(){return{type:"linebreak",version:1}}}function pn(){return{node:fn()}}function fn(){return nt(new dn)}function mn(e){return e instanceof dn}function gn(e,t){return 16&t?"code":128&t?"mark":32&t?"sub":64&t?"sup":null}function hn(e,t){return 1&t?"strong":2&t?"em":"span"}function vn(e,t,n,r,o){e=r.classList,void 0!==(r=We(o,"base"))&&e.add(...r);let i=!1,l=8&t&&4&t;var a=8&n&&4&n;void 0!==(r=We(o,"underlineStrikethrough"))&&(a?(i=!0,l||e.add(...r)):l&&e.remove(...r));for(let s in q)a=q[s],void 0!==(r=We(o,s))&&(n&a&&(!i||"underline"!==s&&"strikethrough"!==s)?(!(t&a)||l&&"underline"===s||"strikethrough"===s)&&e.add(...r):t&a&&e.remove(...r))}function bn(e,t,n){let r=t.firstChild;if(e+=(n=n.isComposing())?Y:"",null==r)t.textContent=e;else if((t=r.nodeValue)!==e)if(n||F){n=t.length;let o=e.length,i=0,l=0;for(;i<n&&i<o&&t[i]===e[i];)i++;for(;l+i<n&&l+i<o&&t[n-l-1]===e[o-l-1];)l++;e=[i,n-i-l,e.slice(i,o-l)];let[a,s,u]=e;0!==s&&r.deleteData(a,s),r.insertData(a,u)}else r.nodeValue=e}function yn(e,t){return(t=document.createElement(t)).appendChild(e),t}class xn extends cn{static getType(){return"text"}static clone(e){return new xn(e.__text,e.__key)}constructor(e,t){super(t),this.__text=e,this.__format=0,this.__style="",this.__detail=this.__mode=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){let e=this.getLatest();return ne[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return 1===this.getLatest().__mode}isComposing(){return this.__key===Ae()}isSegmented(){return 2===this.getLatest().__mode}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){return e=q[e],!!(this.getFormat()&e)}isSimpleText(){return"text"===this.__type&&0===this.__mode}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return Ee(this.getLatest().__format,e,t)}createDOM(e){var t=this.__format,n=gn(0,t);let r=hn(0,t),o=document.createElement(null===n?r:n),i=o;return null!==n&&(i=document.createElement(r),o.appendChild(i)),n=i,bn(this.__text,n,this),void 0!==(e=e.theme.text)&&vn(r,0,t,n,e),""!==(t=this.__style)&&(o.style.cssText=t),o}updateDOM(e,t,n){let r=this.__text;var o=e.__format,i=this.__format,l=gn(0,o);let a=gn(0,i);var s=hn(0,o);let u=hn(0,i);return(null===l?s:l)!==(null===a?u:a)||(l===a&&s!==u?(null==(o=t.firstChild)&&I(48),bn(r,e=l=document.createElement(u),this),void 0!==(n=n.theme.text)&&vn(u,0,i,e,n),t.replaceChild(l,o),!1):(s=t,null!==a&&null!==l&&(null==(s=t.firstChild)&&I(49)),bn(r,s,this),void 0!==(n=n.theme.text)&&o!==i&&vn(u,o,i,s,n),i=this.__style,e.__style!==i&&(t.style.cssText=i),!1))}static importDOM(){return{"#text":()=>({conversion:Sn,priority:0}),b:()=>({conversion:En,priority:0}),code:()=>({conversion:An,priority:0}),em:()=>({conversion:An,priority:0}),i:()=>({conversion:An,priority:0}),s:()=>({conversion:An,priority:0}),span:()=>({conversion:_n,priority:0}),strong:()=>({conversion:An,priority:0}),sub:()=>({conversion:An,priority:0}),sup:()=>({conversion:An,priority:0}),u:()=>({conversion:An,priority:0})}}static importJSON(e){let t=Nn(e.text);return t.setFormat(e.format),t.setDetail(e.detail),t.setMode(e.mode),t.setStyle(e.style),t}exportDOM(e){return({element:e}=super.exportDOM(e)),null!==e&&(this.hasFormat("bold")&&(e=yn(e,"b")),this.hasFormat("italic")&&(e=yn(e,"i")),this.hasFormat("strikethrough")&&(e=yn(e,"s")),this.hasFormat("underline")&&(e=yn(e,"u"))),{element:e}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(){}setFormat(e){let t=this.getWritable();return t.__format="string"==typeof e?q[e]:e,t}setDetail(e){let t=this.getWritable();return t.__detail="string"==typeof e?X[e]:e,t}setStyle(e){let t=this.getWritable();return t.__style=e,t}toggleFormat(e){return e=q[e],this.setFormat(this.getFormat()^e)}toggleDirectionless(){let e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){let e=this.getWritable();return e.__detail^=2,e}setMode(e){if(e=te[e],this.__mode===e)return this;let t=this.getWritable();return t.__mode=e,t}setTextContent(e){if(this.__text===e)return this;let t=this.getWritable();return t.__text=e,t}select(e,t){gr();let n=tr();var r=this.getTextContent();let o=this.__key;return"string"==typeof r?(r=r.length,void 0===e&&(e=r),void 0===t&&(t=r)):t=e=0,Bn(n)?((r=Ae())!==n.anchor.key&&r!==n.focus.key||Te(o),n.setTextNodeRange(this,e,this,t),n):Xn(o,e,o,t,"text","text")}spliceText(e,t,n,r){let o=this.getWritable(),i=o.__text,l=n.length,a=e;0>a&&(a=l+a,0>a&&(a=0));let s=tr();return r&&Bn(s)&&(e+=l,s.setTextNodeRange(o,e,o,e)),t=i.slice(0,a)+n+i.slice(a+t),o.__text=t,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){gr();var t=this.getLatest(),n=t.getTextContent(),r=t.__key,o=Ae(),i=new Set(e);e=[];for(var l=n.length,a="",s=0;s<l;s++)""!==a&&i.has(s)&&(e.push(a),a=""),a+=n[s];if(""!==a&&e.push(a),0===(i=e.length))return[];if(e[0]===n)return[t];var u=e[0];n=t.getParentOrThrow(),s=t.getFormat();let c=t.getStyle(),d=t.__detail;l=!1,t.isSegmented()?((a=Nn(u)).__format=s,a.__style=c,a.__detail=d,l=!0):(a=t.getWritable()).__text=u,t=tr(),a=[a],u=u.length;for(let n=1;n<i;n++){var p=e[n],f=p.length;(p=Nn(p).getWritable()).__format=s,p.__style=c,p.__detail=d;let i=p.__key;if(f=u+f,Bn(t)){let e=t.anchor,n=t.focus;e.key===r&&"text"===e.type&&e.offset>u&&e.offset<=f&&(e.key=i,e.offset-=u,t.dirty=!0),n.key===r&&"text"===n.type&&n.offset>u&&n.offset<=f&&(n.key=i,n.offset-=u,t.dirty=!0)}o===r&&Te(i),u=f,a.push(p)}return r=this.getPreviousSibling(),o=this.getNextSibling(),null!==r&&ke(r),null!==o&&ke(o),r=n.getWritable(),o=this.getIndexWithinParent(),l?(r.splice(o,0,a),this.remove()):r.splice(o,1,a),Bn(t)&&rr(t,n,o,i-1),a}mergeWithSibling(e){var t=e===this.getPreviousSibling();t||e===this.getNextSibling()||I(50);var n=this.__key;let r=e.__key,o=this.__text,i=o.length;Ae()===r&&Te(n);let l=tr();if(Bn(l)){let o=l.anchor,a=l.focus;null!==o&&o.key===r&&(lr(o,t,n,e,i),l.dirty=!0),null!==a&&a.key===r&&(lr(a,t,n,e,i),l.dirty=!0)}return n=e.__text,this.setTextContent(t?n+o:o+n),t=this.getWritable(),e.remove(),t}isTextEntity(){return!1}}function _n(e){let t="700"===e.style.fontWeight,n="line-through"===e.style.textDecoration,r="italic"===e.style.fontStyle,o="underline"===e.style.textDecoration,i=e.style.verticalAlign;return{forChild:e=>Rn(e)?(t&&e.toggleFormat("bold"),n&&e.toggleFormat("strikethrough"),r&&e.toggleFormat("italic"),o&&e.toggleFormat("underline"),"sub"===i&&e.toggleFormat("subscript"),"super"===i&&e.toggleFormat("superscript"),e):e,node:null}}function En(e){let t="normal"===e.style.fontWeight;return{forChild:e=>(Rn(e)&&!t&&e.toggleFormat("bold"),e),node:null}}let Cn=new WeakMap;function Sn(e){null===e.parentElement&&I(129);for(var t,n=e.textContent||"",r=e.parentNode,o=[e];null!==r&&void 0===(t=Cn.get(r))&&!("PRE"===r.nodeName||1===r.nodeType&&r.style.whiteSpace.startsWith("pre"));)o.push(r),r=r.parentNode;for(t=void 0===t?r:t,r=0;r<o.length;r++)Cn.set(o[r],t);if(null!==t){for(e=[],o=(n=n.split(/(\r?\n|\t)/)).length,t=0;t<o;t++)"\n"===(r=n[t])||"\r\n"===r?e.push(fn()):"\t"===r?e.push(Mn()):""!==r&&e.push(Nn(r));return{node:e}}if(""===(n=n.replace(/\r?\n|\t/gm," ").replace("\r","").replace(/\s+/g," ")))return{node:null};if(" "===n[0]){for(o=e,t=!0;null!==o&&null!==(o=kn(o,!1));)if(0<(r=o.textContent||"").length){r.match(/(?:\s|\r?\n|\t)$/)&&(n=n.slice(1)),t=!1;break}t&&(n=n.slice(1))}if(" "===n[n.length-1]){for(o=!0;null!==e&&null!==(e=kn(e,!0));)if(0<(e.textContent||"").replace(/^[\s|\r?\n|\t]+/,"").length){o=!1;break}o&&(n=n.slice(0,n.length-1))}return""===n?{node:null}:{node:Nn(n)}}let wn=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/,"i");function kn(e,t){for(;;){for(var n=void 0;null===(n=t?e.nextSibling:e.previousSibling);)if(null===(e=e.parentElement))return null;if(1===(e=n).nodeType&&(""===(n=e.style.display)&&null===e.nodeName.match(wn)||""!==n&&!n.startsWith("inline")))return null;for(;null!==(n=t?e.firstChild:e.lastChild);)e=n;if(3===e.nodeType)return e;if("BR"===e.nodeName)return null}}let Tn={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function An(e){let t=Tn[e.nodeName.toLowerCase()];return void 0===t?{node:null}:{forChild:e=>(Rn(e)&&!e.hasFormat(t)&&e.toggleFormat(t),e),node:null}}function Nn(e=""){return nt(new xn(e))}function Rn(e){return e instanceof xn}class On extends xn{static getType(){return"tab"}static clone(e){let t=new On(e.__key);return t.__text=e.__text,t.__format=e.__format,t.__style=e.__style,t}constructor(e){super("\t",e),this.__detail=2}static importDOM(){return null}static importJSON(e){let t=Mn();return t.setFormat(e.format),t.setStyle(e.style),t}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(){I(126)}setDetail(){I(127)}setMode(){I(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Mn(){return nt(new On)}class Ln{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){let t=this.getNode(),n=e.getNode(),r=this.offset;if(e=e.offset,Rr(t)){var o=t.getDescendantByIndex(r);t=null!=o?o:t}return Rr(n)&&(o=n.getDescendantByIndex(e),n=null!=o?o:n),t===n?r<e:t.isBefore(n)}getNode(){let e=Ne(this.key);return null===e&&I(20),e}set(e,t,n){let r=this._selection,o=this.key;this.key=e,this.offset=t,this.type=n,mr()||(Ae()===o&&Te(e),null!==r&&(r._cachedNodes=null,r.dirty=!0))}}function Pn(e,t){let n=t.__key,r=e.offset,o="element";if(Rn(t))o="text",r>(t=t.getTextContentSize())&&(r=t);else if(!Rr(t)){var i=t.getNextSibling();Rn(i)?(n=i.__key,r=0,o="text"):(i=t.getParent())&&(n=i.__key,r=t.getIndexWithinParent()+1)}e.set(n,r,o)}function In(e,t){if(Rr(t)){let n=t.getLastDescendant();Rr(n)||Rn(n)?Pn(e,n):Pn(e,t)}else Pn(e,t)}function Dn(e,t,n,r){let o=e.getNode(),i=o.getChildAtIndex(e.offset),l=Nn(),a=Lr(o)?Br().append(l):l;l.setFormat(n),l.setStyle(r),null===i?o.append(a):(i.insertBefore(a),"element"===t.type&&t.key===e.key&&t.offset!==e.offset&&t.set(t.key,t.offset+1,"element")),e.is(t)&&t.set(l.__key,0,"text"),e.set(l.__key,0,"text")}function $n(e,t,n,r){e.key=t,e.offset=n,e.type=r}class zn{constructor(e){this.dirty=!1,this._nodes=e,this._cachedNodes=null}is(e){if(!Wn(e))return!1;let t=this._nodes,n=e._nodes;return t.size===n.size&&Array.from(t).every((e=>n.has(e)))}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 zn(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(e,t){let n=this.getNodes(),r=n.length;var o=n[r-1];if(Rn(o))o=o.select();else{let e=o.getIndexWithinParent()+1;o=o.getParentOrThrow().select(e,e)}for(o.insertNodes(e,t),e=0;e<r;e++)n[e].remove();return!0}getNodes(){var e=this._cachedNodes;if(null!==e)return e;var t=this._nodes;e=[];for(let n of t)null!==(t=Ne(n))&&e.push(t);return mr()||(this._cachedNodes=e),e}getTextContent(){let e=this.getNodes(),t="";for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}}function Bn(e){return e instanceof jn}class Fn{constructor(e,t,n){this.gridKey=e,this.anchor=t,this.focus=n,this.dirty=!1,this._cachedNodes=null,t._selection=this,n._selection=this}is(e){return!!Hn(e)&&(this.gridKey===e.gridKey&&this.anchor.is(e.anchor)&&this.focus.is(e.focus))}set(e,t,n){this.dirty=!0,this.gridKey=e,this.anchor.key=t,this.focus.key=n,this._cachedNodes=null}clone(){return new Fn(this.gridKey,this.anchor,this.focus)}isCollapsed(){return!1}isBackward(){return this.focus.isBefore(this.anchor)}getCharacterOffsets(){return Gn(this)}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(e,t){let n=this.focus.getNode();return fe(n.select(0,n.getChildrenSize())).insertNodes(e,t)}getShape(){var e=Ne(this.anchor.key);null===e&&I(21);var t=e.getIndexWithinParent();e=e.getParentOrThrow().getIndexWithinParent();var n=Ne(this.focus.key);null===n&&I(22);var r=n.getIndexWithinParent();let o=n.getParentOrThrow().getIndexWithinParent();return n=Math.min(t,r),t=Math.max(t,r),r=Math.min(e,o),e=Math.max(e,o),{fromX:Math.min(n,t),fromY:Math.min(r,e),toX:Math.max(n,t),toY:Math.max(r,e)}}getNodes(){function e(e){let{cell:t,startColumn:n,startRow:r}=e;a=Math.min(a,n),s=Math.min(s,r),u=Math.max(u,n+t.__colSpan-1),c=Math.max(c,r+t.__rowSpan-1)}var t=this._cachedNodes;if(null!==t)return t;var n=this.anchor.getNode();t=this.focus.getNode(),n=st(n,Wr);var r=st(t,Wr);Wr(n)||I(103),Wr(r)||I(104),Ur(t=n.getParent())||I(105),Gr(t=t.getParent())||I(106);let[o,i,l]=ar(t,n,r),a=Math.min(i.startColumn,l.startColumn),s=Math.min(i.startRow,l.startRow),u=Math.max(i.startColumn+i.cell.__colSpan-1,l.startColumn+l.cell.__colSpan-1),c=Math.max(i.startRow+i.cell.__rowSpan-1,l.startRow+l.cell.__rowSpan-1);n=a,r=s;for(var d=a,p=s;a<n||s<r||u>d||c>p;){if(a<n){var f=p-r;--n;for(var m=0;m<=f;m++)e(o[r+m][n])}if(s<r)for(f=d-n,--r,m=0;m<=f;m++)e(o[r][n+m]);if(u>d)for(f=p-r,d+=1,m=0;m<=f;m++)e(o[r+m][d]);if(c>p)for(f=d-n,p+=1,m=0;m<=f;m++)e(o[p][n+m])}for(t=[t],n=null,r=s;r<=c;r++)for(d=a;d<=u;d++)({cell:p}=o[r][d]),Ur(f=p.getParent())||I(107),f!==n&&t.push(f),t.push(p,...ut(p)),n=f;return mr()||(this._cachedNodes=t),t}getTextContent(){let e=this.getNodes(),t="";for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}}function Hn(e){return e instanceof Fn}class jn{constructor(e,t,n,r){this.anchor=e,this.focus=t,this.dirty=!1,this.format=n,this.style=r,this._cachedNodes=null,e._selection=this,t._selection=this}is(e){return!!Bn(e)&&(this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style)}isBackward(){return this.focus.isBefore(this.anchor)}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){var e=this._cachedNodes;if(null!==e)return e;e=this.anchor;var t=this.focus,n=e.isBefore(t),r=n?e:t;n=n?t:e,e=r.getNode(),t=n.getNode();let o=r.offset;return r=n.offset,Rr(e)&&(n=e.getDescendantByIndex(o),e=null!=n?n:e),Rr(t)&&(null!==(n=t.getDescendantByIndex(r))&&n!==e&&t.getChildAtIndex(r)===n&&(n=n.getPreviousSibling()),t=null!=n?n:t),e=e.is(t)?Rr(e)&&0<e.getChildrenSize()?[]:[e]:e.getNodesBetween(t),mr()||(this._cachedNodes=e),e}setTextNodeRange(e,t,n,r){$n(this.anchor,e.__key,t,"text"),$n(this.focus,n.__key,r,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){let e=this.getNodes();if(0===e.length)return"";let t=e[0],n=e[e.length-1],r=this.anchor,o=this.focus,i=r.isBefore(o),[l,a]=Gn(this),s="",u=!0;for(let c=0;c<e.length;c++){let d=e[c];if(Rr(d)&&!d.isInline())u||(s+="\n"),u=!d.isEmpty();else if(u=!1,Rn(d)){let e=d.getTextContent();d===t?d===n?"element"===r.type&&"element"===o.type&&o.offset!==r.offset||(e=l<a?e.slice(l,a):e.slice(a,l)):e=i?e.slice(l):e.slice(a):d===n&&(e=i?e.slice(0,a):e.slice(0,l)),s+=e}else!Ar(d)&&!mn(d)||d===n&&this.isCollapsed()||(s+=d.getTextContent())}return s}applyDOMRange(e){let t=vr(),n=t.getEditorState()._selection;if(null!==(e=qn(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n))){var[r,o]=e;$n(this.anchor,r.key,r.offset,r.type),$n(this.focus,o.key,o.offset,o.type),this._cachedNodes=null}}clone(){let e=this.anchor,t=this.focus;return new jn(new Ln(e.key,e.offset,e.type),new Ln(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=Ee(this.format,e,null),this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){return!!(this.format&q[e])}insertRawText(e){let t=[],n=(e=e.split(/(\r?\n|\t)/)).length;for(let r=0;r<n;r++){let n=e[r];"\n"===n||"\r\n"===n?t.push(fn()):"\t"===n?t.push(Mn()):t.push(Nn(n))}this.insertNodes(t)}insertText(e){var t=this.anchor,n=this.focus,r=this.isCollapsed()||t.isBefore(n),o=this.format,i=this.style;r&&"element"===t.type?Dn(t,n,o,i):r||"element"!==n.type||Dn(n,t,o,i);var l=this.getNodes(),a=l.length,s=r?n:t;n=(r?t:n).offset;var u=s.offset;Rn(t=l[0])||I(26),r=t.getTextContent().length;var c=t.getParentOrThrow(),d=l[a-1];if(this.isCollapsed()&&n===r&&(t.isSegmented()||t.isToken()||!t.canInsertTextAfter()||!c.canInsertTextAfter()&&null===t.getNextSibling())){var p=t.getNextSibling();if(Rn(p)&&p.canInsertTextBefore()&&!xe(p)||((p=Nn()).setFormat(o),c.canInsertTextAfter()?t.insertAfter(p):c.insertAfter(p)),p.select(0,0),t=p,""!==e)return void this.insertText(e)}else if(this.isCollapsed()&&0===n&&(t.isSegmented()||t.isToken()||!t.canInsertTextBefore()||!c.canInsertTextBefore()&&null===t.getPreviousSibling())){if(Rn(p=t.getPreviousSibling())&&!xe(p)||((p=Nn()).setFormat(o),c.canInsertTextBefore()?t.insertBefore(p):c.insertBefore(p)),p.select(),t=p,""!==e)return void this.insertText(e)}else if(t.isSegmented()&&n!==r)(c=Nn(t.getTextContent())).setFormat(o),t.replace(c),t=c;else if(!(this.isCollapsed()||""===e||(p=d.getParent(),c.canInsertTextBefore()&&c.canInsertTextAfter()&&(!Rr(p)||p.canInsertTextBefore()&&p.canInsertTextAfter()))))return this.insertText(""),Qn(this.anchor,this.focus,null),void this.insertText(e);if(1===a)if(t.isToken())(e=Nn(e)).select(),t.replace(e);else{if(l=t.getFormat(),a=t.getStyle(),n===u&&(l!==o||a!==i)){if(""!==t.getTextContent())return(l=Nn(e)).setFormat(o),l.setStyle(i),l.select(),0===n?t.insertBefore(l,!1):([a]=t.splitText(n),a.insertAfter(l,!1)),void(l.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length));t.setFormat(o),t.setStyle(i)}""===(t=t.spliceText(n,u-n,e,!0)).getTextContent()?t.remove():"text"===this.anchor.type&&(t.isComposing()?this.anchor.offset-=e.length:(this.format=l,this.style=a))}else{if(o=new Set([...t.getParentKeys(),...d.getParentKeys()]),p=Rr(t)?t:t.getParentOrThrow(),i=Rr(d)?d:d.getParentOrThrow(),c=d,!p.is(i)&&i.isInline())do{c=i,i=i.getParentOrThrow()}while(i.isInline());"text"===s.type&&(0!==u||""===d.getTextContent())||"element"===s.type&&d.getIndexWithinParent()<u?Rn(d)&&!d.isToken()&&u!==d.getTextContentSize()?(d.isSegmented()&&(s=Nn(d.getTextContent()),d.replace(s),d=s),d=d.spliceText(0,u,""),o.add(d.__key)):(s=d.getParentOrThrow()).canBeEmpty()||1!==s.getChildrenSize()?d.remove():s.remove():o.add(d.__key),s=i.getChildren(),u=new Set(l),d=p.is(i),p=p.isInline()&&null===t.getNextSibling()?p:t;for(let e=s.length-1;0<=e;e--){let n=s[e];if(n.is(t)||Rr(n)&&n.isParentOf(t))break;n.isAttached()&&(!u.has(n)||n.is(c)?d||p.insertAfter(n,!1):n.remove())}if(!d)for(s=i,u=null;null!==s;)(0===(d=(i=s.getChildren()).length)||i[d-1].is(u))&&(o.delete(s.__key),u=s),s=s.getParent();for(t.isToken()?n===r?t.select():((e=Nn(e)).select(),t.replace(e)):""===(t=t.spliceText(n,r-n,e,!0)).getTextContent()?t.remove():t.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length),e=1;e<a;e++)t=l[e],o.has(t.__key)||t.remove()}}removeText(){this.insertText("")}formatText(e){if(this.isCollapsed())this.toggleFormat(e),Te(null);else{var t=this.getNodes(),n=[];for(var r of t)Rn(r)&&n.push(r);var o=n.length;if(0===o)this.toggleFormat(e),Te(null);else{r=this.anchor;var i=this.focus,l=this.isBackward();t=l?i:r,r=l?r:i;var a=0,s=n[0];if(i="element"===t.type?0:t.offset,"text"===t.type&&i===s.getTextContentSize()&&(a=1,s=n[1],i=0),null!=s){l=s.getFormatFlags(e,null);var u=o-1,c=n[u];if(o="text"===r.type?r.offset:c.getTextContentSize(),s.is(c))i!==o&&(0===i&&o===s.getTextContentSize()?s.setFormat(l):(e=s.splitText(i,o),(e=0===i?e[0]:e[1]).setFormat(l),"text"===t.type&&t.set(e.__key,0,"text"),"text"===r.type&&r.set(e.__key,o-i,"text")),this.format=l);else{0!==i&&([,s]=s.splitText(i),i=0),s.setFormat(l);var d=c.getFormatFlags(e,l);for(0<o&&(o!==c.getTextContentSize()&&([c]=c.splitText(o)),c.setFormat(d)),a+=1;a<u;a++){let t=n[a];if(!t.isToken()){let n=t.getFormatFlags(e,d);t.setFormat(n)}}"text"===t.type&&t.set(s.__key,i,"text"),"text"===r.type&&r.set(c.__key,o,"text"),this.format=l|d}}}}}insertNodes(e,t){if(!this.isCollapsed()){var n=this.isBackward()?this.anchor:this.focus,r=n.getNode().getNextSibling();if(r=r?r.getKey():null,n=(n=n.getNode().getPreviousSibling())?n.getKey():null,this.removeText(),this.isCollapsed()&&"element"===this.focus.type){if(this.focus.key===r&&0===this.focus.offset){var o=Nn();this.focus.getNode().insertBefore(o)}else this.focus.key===n&&this.focus.offset===this.focus.getNode().getChildrenSize()&&(o=Nn(),this.focus.getNode().insertAfter(o));o&&(this.focus.set(o.__key,0,"text"),this.anchor.set(o.__key,0,"text"))}}n=(o=this.anchor).offset;var i=o.getNode();r=i,"element"===o.type&&(r=null===(r=(o=o.getNode()).getChildAtIndex(n-1))?o:r),o=[];var l=i.getNextSiblings(),a=et(i)?null:i.getTopLevelElementOrThrow();if(Rn(i))if(r=i.getTextContent().length,0===n&&0!==r)r=null!==(r=i.getPreviousSibling())?r:i.getParentOrThrow(),o.push(i);else if(n===r)r=i;else{if(i.isToken())return!1;[r,i]=i.splitText(n),o.push(i)}i=r,o.push(...l),l=e[0];var s=!1,u=null;for(let t=0;t<e.length;t++){var c=e[t];if(et(r)||Ar(r)||!Rr(c)||c.isInline())s&&!Rr(c)&&!Ar(c)&&et(r.getParent())&&I(28);else{if(c.is(l)){if(Rr(r)&&r.isEmpty()&&r.canReplaceWith(c)){r.replace(c),r=c,s=!0;continue}if(Ce(s=c.getFirstDescendant())){for(var d=s.getParentOrThrow();d.isInline();)d=d.getParentOrThrow();if(s=(u=d.getChildren()).length,Rr(r)){var p=r.getFirstChild();for(let e=0;e<s;e++){let t=u[e];null===p?r.append(t):p.insertAfter(t),p=t}}else{for(p=s-1;0<=p;p--)r.insertAfter(u[p]);r=r.getParentOrThrow()}if(u=u[s-1],d.remove(),s=!0,d.is(c))continue}}Rn(r)&&(null===a&&I(27),r=a)}s=!1,Rr(r)&&!r.isInline()?(u=c,Ar(c)&&!c.isInline()?r=r.insertAfter(c,!1):Rr(c)?!c.canBeEmpty()&&c.isEmpty()||(Lr(r)?(null!==(d=r.getChildAtIndex(n))?d.insertBefore(c):r.append(c),r=c):c.isInline()?(r.append(c),r=c):r=r.insertAfter(c,!1)):(null!==(d=r.getFirstChild())?d.insertBefore(c):r.append(c),r=c)):!Rr(c)||Rr(c)&&c.isInline()||Ar(r)&&!r.isInline()?(u=c,Bn(this)&&Ar(c)&&(Rr(r)||Rn(r))&&!c.isInline()?(Rn(r)?(d=r.getParentOrThrow(),[r]=r.splitText(n),r=r.getIndexWithinParent()+1):(d=r,r=n),[,r]=at(d,r),r=r.insertBefore(c)):r=r.insertAfter(c,!1)):(c=r.getParentOrThrow(),mn(r)&&r.remove(),r=c,t--)}if(t&&(Rn(i)?i.select():Rn(e=r.getPreviousSibling())?e.select():(e=r.getIndexWithinParent(),r.getParentOrThrow().select(e,e))),Rr(r)){if(e=Rn(u)?u:Rr(u)&&u.isInline()?u.getLastDescendant():r.getLastDescendant(),t||(null===e?r.select():Rn(e)?""===e.getTextContent()?e.selectPrevious():e.select():e.selectNext()),0!==o.length)for(t=r,e=o.length-1;0<=e;e--)a=(n=o[e]).getParentOrThrow(),!Rr(r)||Jn(n)||Ar(n)&&(!n.isInline()||n.isIsolated())?Rr(r)||Jn(n)?Rr(n)&&!n.canInsertAfter(r)?(Rr(i=a.constructor.clone(a))||I(29),i.append(n),r.insertAfter(i)):r.insertAfter(n):(r.insertBefore(n),r=n):(t===r?r.append(n):r.insertBefore(n),r=n),a.isEmpty()&&!a.canBeEmpty()&&a.remove()}else t||(Rn(r)?r.select():(t=r.getParentOrThrow(),e=r.getIndexWithinParent()+1,t.select(e,e)));return!0}insertParagraph(){this.isCollapsed()||this.removeText();var e=this.anchor,t=e.offset,n=[];if("text"===e.type){var r=e.getNode(),o=r.getNextSiblings().reverse(),i=r.getParentOrThrow(),l=i.isInline(),a=l?i.getTextContentSize():r.getTextContentSize();0===t?o.push(r):(l&&(n=i.getNextSiblings()),t===a||l&&t===r.getTextContentSize()||([,r]=r.splitText(t),o.push(r)))}else{if(et(i=e.getNode()))return o=Br(),n=i.getChildAtIndex(t),o.select(),void(null!==n?n.insertBefore(o,!1):i.append(o));o=i.getChildren().slice(t).reverse()}if(r=o.length,0===t&&0<r&&i.isInline()){if(Rr(o=(n=i.getParentOrThrow()).insertNewAfter(this,!1)))for(n=n.getChildren(),i=0;i<n.length;i++)o.append(n[i])}else if(null===(l=i.insertNewAfter(this,!1)))this.insertLineBreak();else if(Rr(l))if(a=i.getFirstChild(),0===t&&(i.is(e.getNode())||a&&a.is(e.getNode()))&&0<r)i.insertBefore(l);else{if(i=null,t=n.length,e=l.getParentOrThrow(),0<t)for(a=0;a<t;a++)e.append(n[a]);if(0!==r)for(n=0;n<r;n++)t=o[n],null===i?l.append(t):i.insertBefore(t),i=t;l.canBeEmpty()||0!==l.getChildrenSize()?l.selectStart():(l.selectPrevious(),l.remove())}}insertLineBreak(e){let t=fn();var n=this.anchor;"element"===n.type&&(Lr(n=n.getNode())&&this.insertParagraph()),e?this.insertNodes([t],!0):this.insertNodes([t])&&t.selectNext(0,0)}getCharacterOffsets(){return Gn(this)}extract(){var e=this.getNodes(),t=e.length,n=t-1,r=this.anchor;let o=this.focus;var i=e[0];let l=e[n],[a,s]=Gn(this);return 0===t?[]:1===t?Rn(i)&&!this.isCollapsed()?(e=a>s?s:a,n=i.splitText(e,a>s?a:s),null!=(e=0===e?n[0]:n[1])?[e]:[]):[i]:(t=r.isBefore(o),Rn(i)&&((r=t?a:s)===i.getTextContentSize()?e.shift():0!==r&&([,i]=i.splitText(r),e[0]=i)),Rn(l)&&(i=l.getTextContent().length,0===(t=t?s:a)?e.pop():t!==i&&([l]=l.splitText(t),e[n]=l)),e)}modify(e,t,n){var r=this.focus,o=this.anchor,i="move"===e,l=Ye(r,t);if(Ar(l)&&!l.isIsolated())i&&l.isKeyboardSelectable()?((t=Zn()).add(l.__key),Ie(t)):Rn(e=t?l.getPreviousSibling():l.getNextSibling())?(l=e.__key,t=t?e.getTextContent().length:0,r.set(l,t,"text"),i&&o.set(l,t,"text")):(n=l.getParentOrThrow(),Rr(e)?(n=e.__key,l=t?e.getChildrenSize():0):(l=l.getIndexWithinParent(),n=n.__key,t||l++),r.set(n,l,"element"),i&&o.set(n,l,"element"));else if(r=lt((o=vr())._window)){var a=o._blockCursorElement,s=o._rootElement;if(null===s||null===a||!Rr(l)||l.isInline()||l.canBeEmpty()||it(a,o,s),r.modify(e,t?"backward":"forward",n),0<r.rangeCount&&(l=r.getRangeAt(0),o=Lr(o=this.anchor.getNode())?o:Ze(o),this.applyDOMRange(l),this.dirty=!0,!i)){for(i=this.getNodes(),e=[],n=!1,a=0;a<i.length;a++)Je(s=i[a],o)?e.push(s):n=!0;n&&0<e.length&&(t?Rr(t=e[0])?t.selectStart():t.getParentOrThrow().selectStart():Rr(t=e[e.length-1])?t.selectEnd():t.getParentOrThrow().selectEnd()),r.anchorNode===l.startContainer&&r.anchorOffset===l.startOffset||(t=this.focus,r=(i=this.anchor).key,l=i.offset,o=i.type,$n(i,t.key,t.offset,t.type),$n(t,r,l,o),this._cachedNodes=null)}}}deleteCharacter(t){let n=this.isCollapsed();if(this.isCollapsed()){var r=this.anchor,o=this.focus,i=r.getNode();if(!t&&("element"===r.type&&Rr(i)&&r.offset===i.getChildrenSize()||"text"===r.type&&r.offset===i.getTextContentSize())){var l=i.getParent();if(Rr(l=i.getNextSibling()||(null===l?null:l.getNextSibling()))&&l.isShadowRoot())return}if(Ar(l=Ye(o,t))&&!l.isIsolated())return void(l.isKeyboardSelectable()&&Rr(i)&&0===i.getChildrenSize()?(i.remove(),t=Zn(),t.add(l.__key),Ie(t)):(l.remove(),vr().dispatchCommand(e,void 0)));if(!t&&Rr(l)&&Rr(i)&&i.isEmpty())return i.remove(),void l.selectStart();if(this.modify("extend",t,"character"),this.isCollapsed()){if(t&&0===r.offset&&("element"===r.type?r.getNode():r.getNode().getParentOrThrow()).collapseAtStart(this))return}else{if(l="text"===o.type?o.getNode():null,i="text"===r.type?r.getNode():null,null!==l&&l.isSegmented()){if(r=o.offset,o=l.getTextContentSize(),l.is(i)||t&&r!==o||!t&&0!==r)return void Yn(l,t,r)}else if(null!==i&&i.isSegmented()&&(r=r.offset,o=i.getTextContentSize(),i.is(l)||t&&0!==r||!t&&r!==o))return void Yn(i,t,r);if(i=this.anchor,l=this.focus,(r=i.getNode())===(o=l.getNode())&&"text"===i.type&&"text"===l.type){var a=i.offset,s=l.offset;let e=a<s;(o=e?a:s)!==(a=(s=e?s:a)-1)&&($e(r=r.getTextContent().slice(o,s))||(t?l.offset=a:i.offset=a))}}}this.removeText(),t&&!n&&this.isCollapsed()&&"element"===this.anchor.type&&0===this.anchor.offset&&((t=this.anchor.getNode()).isEmpty()&&Lr(t.getParent())&&0===t.getIndexWithinParent()&&t.collapseAtStart(this))}deleteLine(e){this.isCollapsed()&&("text"===this.anchor.type&&this.modify("extend",e,"lineboundary"),0===(e?this.focus:this.anchor).offset&&this.modify("extend",e,"character")),this.removeText()}deleteWord(e){this.isCollapsed()&&this.modify("extend",e,"word"),this.removeText()}}function Wn(e){return e instanceof zn}function Kn(e){let t=e.offset;return"text"===e.type?t:t===(e=e.getNode()).getChildrenSize()?e.getTextContent().length:0}function Gn(e){let t=e.anchor;return e=e.focus,"element"===t.type&&"element"===e.type&&t.key===e.key&&t.offset===e.offset?[0,0]:[Kn(t),Kn(e)]}function Yn(e,t,n){let r=e.getTextContent().split(/(?=\s)/g),o=r.length,i=0,l=0;for(let e=0;e<o;e++){let a=e===o-1;if(l=i,i+=r[e].length,t&&i===n||i>n||a){r.splice(e,1),a&&(l=void 0);break}}""===(t=r.join("").trim())?e.remove():(e.setTextContent(t),e.select(l,l))}function Un(e,t,n,r){var o=t;if(1===e.nodeType){let a=!1;var i=e.childNodes,l=i.length;o===l&&(a=!0,o=l-1);let s=i[o];if(l=!1,s===r._blockCursorElement?(s=i[o+1],l=!0):null!==r._blockCursorElement&&o--,Rn(r=De(s)))o=a?r.getTextContentSize():0;else{if(null===(i=De(e)))return null;if(Rr(i)?((t=Rr(e=i.getChildAtIndex(o)))&&(t=e.getParent(),t=null===n||null===t||!t.canBeEmpty()||t!==n.getNode()),t&&(null===(n=a?e.getLastDescendant():e.getFirstDescendant())?(i=e,o=0):i=Rr(e=n)?e:e.getParentOrThrow()),Rn(e)?(r=e,i=null,o=a?e.getTextContentSize():0):e!==i&&a&&!l&&o++):(o=i.getIndexWithinParent(),o=0===t&&Ar(i)&&De(e)===i?o:o+1,i=i.getParentOrThrow()),Rr(i))return new Ln(i.__key,o,"element")}}else r=De(e);return Rn(r)?new Ln(r.__key,o,"text"):null}function Vn(e,t,n){var r=e.offset,o=e.getNode();0===r?(r=o.getPreviousSibling(),o=o.getParent(),t?(n||!t)&&null===r&&Rr(o)&&o.isInline()&&(Rn(t=o.getPreviousSibling())&&(e.key=t.__key,e.offset=t.getTextContent().length)):Rr(r)&&!n&&r.isInline()?(e.key=r.__key,e.offset=r.getChildrenSize(),e.type="element"):Rn(r)&&(e.key=r.__key,e.offset=r.getTextContent().length)):r===o.getTextContent().length&&(r=o.getNextSibling(),o=o.getParent(),t&&Rr(r)&&r.isInline()?(e.key=r.__key,e.offset=0,e.type="element"):(n||t)&&null===r&&Rr(o)&&o.isInline()&&!o.canInsertTextAfter()&&(Rn(t=o.getNextSibling())&&(e.key=t.__key,e.offset=0)))}function Qn(e,t,n){if("text"===e.type&&"text"===t.type){var r=e.isBefore(t);let o=e.is(t);Vn(e,r,o),Vn(t,!r,o),o&&(t.key=e.key,t.offset=e.offset,t.type=e.type),(r=vr()).isComposing()&&r._compositionKey!==e.key&&Bn(n)&&(r=n.anchor,n=n.focus,$n(e,r.key,r.offset,r.type),$n(t,n.key,n.offset,n.type))}}function qn(e,t,n,r,o,i){return null!==e&&null!==n&&be(o,e,n)?null===(t=Un(e,t,Bn(i)?i.anchor:null,o))||null===(r=Un(n,r,Bn(i)?i.focus:null,o))||"element"===t.type&&"element"===r.type&&(e=De(e),n=De(n),Ar(e)&&Ar(n))?null:(Qn(t,r,i),[t,r]):null}function Jn(e){return Rr(e)&&!e.isInline()}function Xn(e,t,n,r,o,i){let l=hr();return(e=new jn(new Ln(e,t,o),new Ln(n,r,i),0,"")).dirty=!0,l._selection=e}function Zn(){return new zn(new Set)}function er(e,t,n){var r=n._window;if(null===r)return null;var o=r.event,i=o?o.type:void 0;let l;if(r="selectionchange"===i,o=!re&&(r||"beforeinput"===i||"compositionstart"===i||"compositionend"===i||"click"===i&&o&&3===o.detail||"drop"===i||void 0===i),Bn(e)&&!o)return e.clone();if(null===t)return null;if(o=t.anchorNode,i=t.focusNode,l=t.anchorOffset,t=t.focusOffset,r&&Bn(e)&&!be(n,o,i))return e.clone();if(null===(n=qn(o,l,i,t,n,e)))return null;let[a,s]=n;return new jn(a,s,Bn(e)?e.format:0,Bn(e)?e.style:"")}function tr(){return hr()._selection}function nr(){return vr()._editorState._selection}function rr(e,t,n,r=1){var o=e.anchor,i=e.focus,l=o.getNode(),a=i.getNode();if(t.is(l)||t.is(a)){if(l=t.__key,e.isCollapsed())(n<=(t=o.offset)&&0<r||n<t&&0>r)&&(n=Math.max(0,t+r),o.set(l,n,"element"),i.set(l,n,"element"),or(e));else{let u=e.isBackward();var s=(a=u?i:o).getNode();i=(o=u?o:i).getNode(),t.is(s)&&((n<=(s=a.offset)&&0<r||n<s&&0>r)&&a.set(l,Math.max(0,s+r),"element")),t.is(i)&&((n<=(t=o.offset)&&0<r||n<t&&0>r)&&o.set(l,Math.max(0,t+r),"element"))}or(e)}}function or(e){var t=e.anchor,n=t.offset;let r=e.focus;var o=r.offset,i=t.getNode(),l=r.getNode();if(e.isCollapsed())Rr(i)&&(Rn(l=(o=n>=(l=i.getChildrenSize()))?i.getChildAtIndex(l-1):i.getChildAtIndex(n))&&(n=0,o&&(n=l.getTextContentSize()),t.set(l.__key,n,"text"),r.set(l.__key,n,"text")));else{if(Rr(i)){let r=i.getChildrenSize();Rn(n=(e=n>=r)?i.getChildAtIndex(r-1):i.getChildAtIndex(n))&&(i=0,e&&(i=n.getTextContentSize()),t.set(n.__key,i,"text"))}Rr(l)&&(Rn(o=(t=o>=(n=l.getChildrenSize()))?l.getChildAtIndex(n-1):l.getChildAtIndex(o))&&(l=0,t&&(l=o.getTextContentSize()),r.set(o.__key,l,"text")))}}function ir(e,t,n,r,o){let i=null,l=0,a=null;null!==r?(i=r.__key,Rn(r)?(l=r.getTextContentSize(),a="text"):Rr(r)&&(l=r.getChildrenSize(),a="element")):null!==o&&(i=o.__key,Rn(o)?a="text":Rr(o)&&(a="element")),null!==i&&null!==a?e.set(i,l,a):(l=t.getIndexWithinParent(),-1===l&&(l=n.getChildrenSize()),e.set(n.__key,l,"element"))}function lr(e,t,n,r,o){"text"===e.type?(e.key=n,t||(e.offset+=o)):e.offset>r.getIndexWithinParent()&&--e.offset}function ar(e,t,n){let r=[],o=null,i=null;e=e.getChildren();for(let c=0;c<e.length;c++){var l=e[c];Ur(l)||I(108);var a=l.getChildren();l=0;for(let e of a){for(Wr(e)||I(109);void 0!==r[c]&&void 0!==r[c][l];)l++;var s=l,u=e;let d={cell:u,startColumn:s,startRow:a=c},p=u.__rowSpan,f=u.__colSpan;for(let e=0;e<p;e++){void 0===r[a+e]&&(r[a+e]=[]);for(let t=0;t<f;t++)r[a+e][s+t]=d}t.is(u)&&(o=d),n.is(u)&&(i=d),l+=e.__colSpan}}return null===o&&I(110),null===i&&I(111),[r,o,i]}let sr=null,ur=null,cr=!1,dr=!1,pr=0,fr={characterData:!0,childList:!0,subtree:!0};function mr(){return cr||null!==sr&&sr._readOnly}function gr(){cr&&I(13)}function hr(){return null===sr&&I(15),sr}function vr(){return null===ur&&I(16),ur}function br(e,t,n){var r=t.__type;let o=e._nodes.get(r);for(void 0===o&&I(30,r),void 0===(e=n.get(r))&&(e=Array.from(o.transforms),n.set(r,e)),n=e.length,r=0;r<n&&(e[r](t),t.isAttached());r++);}function yr(e,t){var n=e.type,r=t.get(n);if(void 0===r&&I(17,n),n=r.klass,e.type!==n.getType()&&I(18,n.name),n=n.importJSON(e),e=e.children,Rr(n)&&Array.isArray(e))for(r=0;r<e.length;r++){let o=yr(e[r],t);n.append(o)}return n}function xr(e,t){let n=sr,r=cr,o=ur;sr=e,cr=!0,ur=null;try{return t()}finally{sr=n,cr=r,ur=o}}function _r(t,n){let r=t._pendingEditorState,o=t._rootElement,i=t._headless||null===o;if(null!==r){var l=t._editorState,a=l._selection,s=r._selection,u=0!==t._dirtyType,c=sr,d=cr,p=ur,f=t._updating,m=t._observer,g=null;if(t._pendingEditorState=null,t._editorState=r,!i&&u&&null!==m){ur=t,sr=r,cr=!1,t._updating=!0;try{let e=t._dirtyType,n=t._dirtyElements,o=t._dirtyLeaves;m.disconnect();var h=n,v=o;Et=Ct=_t="",St=2===e,kt=null,pt=t,dt=t._config,ft=t._nodes,mt=pt._listeners.mutation,gt=h,ht=v,vt=l._nodeMap,bt=r._nodeMap,wt=r._readOnly,yt=new Map(t._keyToDOMMap);let i=new Map;xt=i,zt("root",null),xt=yt=dt=bt=vt=ht=gt=ft=pt=void 0,g=i}catch(e){if(e instanceof Error&&t._onError(e),dr)throw e;return Fr(t,null,o,r),ue(t),t._dirtyType=2,dr=!0,_r(t,l),void(dr=!1)}finally{m.observe(o,fr),t._updating=f,sr=c,cr=d,ur=p}}r._readOnly||(r._readOnly=!0);var b=t._dirtyLeaves,y=t._dirtyElements,x=t._normalizedNodes,_=t._updateTags,E=t._deferred;u&&(t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements=new Map,t._normalizedNodes=new Set,t._updateTags=new Set);var C,S=t._decorators,w=t._pendingDecorators||S,k=r._nodeMap;for(C in w)k.has(C)||(w===S&&(w=Me(t)),delete w[C]);var T=i?null:lt(t._window);if(t._editable&&null!==T&&(u||null===s||s.dirty)){ur=t,sr=r;try{if(null!==m&&m.disconnect(),u||null===s||s.dirty){let e=t._blockCursorElement;null!==e&&it(e,t,o);e:{let e=T.anchorNode,n=T.focusNode,r=T.anchorOffset,i=T.focusOffset,l=document.activeElement;if(!(_.has("collaboration")&&l!==o||null!==l&&ve(l)))if(Bn(s)){var A=s.anchor,N=s.focus,R=A.key,O=N.key,M=Qe(t,R),L=Qe(t,O),P=A.offset,I=N.offset,D=s.format,$=s.style,z=s.isCollapsed(),B=M,F=L,H=!1;if("text"===A.type){B=_e(M);let e=A.getNode();H=e.getFormat()!==D||e.getStyle()!==$}else Bn(a)&&"text"===a.anchor.type&&(H=!0);if("text"===N.type&&(F=_e(L)),null!==B&&null!==F){if(z&&(null===a||H||Bn(a)&&(a.format!==D||a.style!==$))){var j=performance.now();Zt=[D,$,P,R,j]}if(r===P&&i===I&&e===B&&n===F&&("Range"!==T.type||!z)&&(null!==l&&o.contains(l)||o.focus({preventScroll:!0}),"element"!==A.type))break e;try{T.setBaseAndExtent(B,P,F,I)}catch(e){}if(!_.has("skip-scroll-into-view")&&s.isCollapsed()&&null!==o&&o===document.activeElement){let e=s instanceof jn&&"element"===s.anchor.type?B.childNodes[P]||null:0<T.rangeCount?T.getRangeAt(0):null;if(null!==e){let n;if(e instanceof Text){let t=document.createRange();t.selectNode(e),n=t.getBoundingClientRect()}else n=e.getBoundingClientRect();let r=o.ownerDocument,i=r.defaultView;if(null!==i)for(var W,K,{top:G,bottom:Y}=n,U=o;null!==U;){let e=U===r.body;if(e)W=0,K=Xe(t).innerHeight;else{let e=U.getBoundingClientRect();W=e.top,K=e.bottom}let n=0;if(G<W?n=-(W-G):Y>K&&(n=Y-K),0!==n)if(e)i.scrollBy(0,n);else{let e=U.scrollTop;U.scrollTop+=n;let t=U.scrollTop-e;G-=t,Y-=t}if(e)break;U=qe(U)}}}Qt=!0}}else null!==a&&be(t,e,n)&&T.removeAllRanges()}}e:{let e=t._blockCursorElement;if(Bn(s)&&s.isCollapsed()&&"element"===s.anchor.type&&o.contains(document.activeElement)){let n=s.anchor,r=n.getNode(),i=n.offset,l=r.getChildrenSize(),a=!1,u=null;if(i===l){ot(r.getChildAtIndex(i-1))&&(a=!0)}else{let e=r.getChildAtIndex(i);if(ot(e)){let n=e.getPreviousSibling();(null===n||ot(n))&&(a=!0,u=t.getElementByKey(e.__key))}}if(a){let n=t.getElementByKey(r.__key);if(null===e){let n=t._config.theme,r=document.createElement("div");r.contentEditable="false",r.setAttribute("data-lexical-cursor","true");let o=n.blockCursor;if(void 0!==o){if("string"==typeof o){let e=o.split(" ");o=n.blockCursor=e}void 0!==o&&r.classList.add(...o)}t._blockCursorElement=e=r}o.style.caretColor="transparent",null===u?n.appendChild(e):n.insertBefore(e,u);break e}}null!==e&&it(e,t,o)}null!==m&&m.observe(o,fr)}finally{ur=p,sr=c}}if(null!==g){var V=g;let e=Array.from(t._listeners.mutation),n=e.length;for(let t=0;t<n;t++){let[n,r]=e[t],o=V.get(r);void 0!==o&&n(o,{dirtyLeaves:b,updateTags:_})}}Bn(s)||null===s||null!==a&&a.is(s)||t.dispatchCommand(e,void 0);var Q=t._pendingDecorators;null!==Q&&(t._decorators=Q,t._pendingDecorators=null,Er("decorator",t,!0,Q));var q=Le(n||l),J=Le(r);if(q!==J&&Er("textcontent",t,!0,J),Er("update",t,!0,{dirtyElements:y,dirtyLeaves:b,editorState:r,normalizedNodes:x,prevEditorState:n||l,tags:_}),t._deferred=[],0!==E.length){let e=t._updating;t._updating=!0;try{for(let e=0;e<E.length;e++)E[e]()}finally{t._updating=e}}var X=t._updates;if(0!==X.length){let e=X.shift();if(e){let[n,r]=e;wr(t,n,r)}}}}function Er(e,t,n,...r){let o=t._updating;t._updating=n;try{let n=Array.from(t._listeners[e]);for(e=0;e<n.length;e++)n[e].apply(null,r)}finally{t._updating=o}}function Cr(e,t,n){if(!1===e._updating||ur!==e){let r=!1;return e.update((()=>{r=Cr(e,t,n)})),r}let r=ze(e);for(let i=4;0<=i;i--)for(let l=0;l<r.length;l++){var o=r[l]._commands.get(t);if(void 0!==o&&void 0!==(o=o[i])){let t=(o=Array.from(o)).length;for(let r=0;r<t;r++)if(!0===o[r](n,e))return!0}}return!1}function Sr(e,t){let n=e._updates;for(t=t||!1;0!==n.length;){var r=n.shift();if(r){let n,[o,i]=r;void 0!==i&&(r=i.onUpdate,n=i.tag,i.skipTransforms&&(t=!0),r&&e._deferred.push(r),n&&e._updateTags.add(n)),o()}}return t}function wr(e,t,n){let r=e._updateTags;var o,i=o=!1;if(void 0!==n){var l=n.onUpdate;null!=(o=n.tag)&&r.add(o),o=n.skipTransforms||!1,i=n.discrete||!1}l&&e._deferred.push(l),n=e._editorState;let a=!1;(null===(l=e._pendingEditorState)||l._readOnly)&&(l=e._pendingEditorState=new Dr(new Map((l||n)._nodeMap)),a=!0),l._flushSync=i,i=sr;let s=cr,u=ur,c=e._updating;sr=l,cr=!1,e._updating=!0,ur=e;try{a&&(e._headless?null!=n._selection&&(l._selection=n._selection.clone()):l._selection=function(e){let t=e.getEditorState()._selection,n=lt(e._window);return Wn(t)||Hn(t)?t.clone():er(t,n,e)}(e));let r=e._compositionKey;t(),o=Sr(e,o),function(e,t){if(t=t.getEditorState()._selection,Bn(e=e._selection)){var n=e.anchor;let r,o=e.focus;"text"===n.type&&(r=n.getNode(),r.selectionTransform(t,e)),"text"===o.type&&r!==(n=o.getNode())&&n.selectionTransform(t,e)}}(l,e),0!==e._dirtyType&&(o?function(e,t){t=t._dirtyLeaves,e=e._nodeMap;for(let n of t)Rn(t=e.get(n))&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&pe(t)}(l,e):function(e,t){let n=t._dirtyLeaves,r=t._dirtyElements;e=e._nodeMap;let o=Ae(),i=new Map;var l=n;let a=l.size;for(var s=r,u=s.size;0<a||0<u;){if(0<a){t._dirtyLeaves=new Set;for(let r of l)Rn(l=e.get(r))&&l.isAttached()&&l.isSimpleText()&&!l.isUnmergeable()&&pe(l),void 0!==l&&void 0!==l&&l.__key!==o&&l.isAttached()&&br(t,l,i),n.add(r);if(a=(l=t._dirtyLeaves).size,0<a){pr++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map;for(let n of s)s=n[0],u=n[1],("root"===s||u)&&(void 0!==(l=e.get(s))&&void 0!==l&&l.__key!==o&&l.isAttached()&&br(t,l,i),r.set(s,u));a=(l=t._dirtyLeaves).size,u=(s=t._dirtyElements).size,pr++}t._dirtyLeaves=n,t._dirtyElements=r}(l,e),Sr(e),function(e,t,n,r){e=e._nodeMap,t=t._nodeMap;let o=[];for(let[n]of r){let i=t.get(n);void 0===i||i.isAttached()||(Rr(i)&&ct(i,n,e,t,o,r),e.has(n)||r.delete(n),o.push(n))}for(let e of o)t.delete(e);for(let o of n)void 0===(r=t.get(o))||r.isAttached()||(e.has(o)||n.delete(o),t.delete(o))}(n,l,e._dirtyLeaves,e._dirtyElements)),r!==e._compositionKey&&(l._flushSync=!0);let i=l._selection;if(Bn(i)){let e=l._nodeMap,t=i.focus.key;void 0!==e.get(i.anchor.key)&&void 0!==e.get(t)||I(19)}else Wn(i)&&0===i._nodes.size&&(l._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=n,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void _r(e)}finally{sr=i,cr=s,ur=u,e._updating=c,pr=0}0!==e._dirtyType||function(e,t){if(t=t.getEditorState()._selection,e=e._selection,null!==e){if(e.dirty||!e.is(t))return!0}else if(null!==t)return!0;return!1}(l,e)?l._flushSync?(l._flushSync=!1,_r(e)):a&&he((()=>{_r(e)})):(l._flushSync=!1,a&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function kr(e,t,n){e._updating?e._updates.push([t,n]):wr(e,t,n)}class Tr extends cn{constructor(e){super(e)}decorate(){I(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Ar(e){return e instanceof Tr}class Nr extends cn{constructor(e){super(e),this.__last=this.__first=null,this.__indent=this.__format=this.__size=0,this.__dir=null}getFormat(){return this.getLatest().__format}getFormatType(){let e=this.getFormat();return ee[e]||""}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=vr()._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(Rn(t)&&e.push(t),Rr(t)){let n=t.getAllTextNodes();e.push(...n)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;null!==e;){if(Rr(e)){let t=e.getFirstChild();if(null!==t){e=t;continue}}break}return e}getLastDescendant(){let e=this.getLastChild();for(;null!==e;){if(Rr(e)){let t=e.getLastChild();if(null!==t){e=t;continue}}break}return e}getDescendantByIndex(e){let t=this.getChildren(),n=t.length;return e>=n?Rr(e=t[n-1])&&e.getLastDescendant()||e||null:Rr(e=t[e])&&e.getFirstDescendant()||e||null}getFirstChild(){let e=this.getLatest().__first;return null===e?null:Ne(e)}getFirstChildOrThrow(){let e=this.getFirstChild();return null===e&&I(45,this.__key),e}getLastChild(){let e=this.getLatest().__last;return null===e?null:Ne(e)}getLastChildOrThrow(){let e=this.getLastChild();return null===e&&I(96,this.__key),e}getChildAtIndex(e){var t=this.getChildrenSize();let n;if(e<t/2){for(n=this.getFirstChild(),t=0;null!==n&&t<=e;){if(t===e)return n;n=n.getNextSibling(),t++}return null}for(n=this.getLastChild(),--t;null!==n&&t>=e;){if(t===e)return n;n=n.getPreviousSibling(),t--}return null}getTextContent(){let e="",t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let o=t[r];e+=o.getTextContent(),Rr(o)&&r!==n-1&&!o.isInline()&&(e+="\n\n")}return e}getTextContentSize(){let e=0,t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let o=t[r];e+=o.getTextContentSize(),Rr(o)&&r!==n-1&&!o.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}hasFormat(e){return""!==e&&(e=Z[e],!!(this.getFormat()&e))}select(e,t){gr();let n=tr(),r=e,o=t;var i=this.getChildrenSize();if(!this.canBeEmpty())if(0===e&&0===t){if(Rn(e=this.getFirstChild())||Rr(e))return e.select(0,0)}else if(!(void 0!==e&&e!==i||void 0!==t&&t!==i)&&(Rn(e=this.getLastChild())||Rr(e)))return e.select();return void 0===r&&(r=i),void 0===o&&(o=i),i=this.__key,Bn(n)?(n.anchor.set(i,r,"element"),n.focus.set(i,o,"element"),n.dirty=!0,n):Xn(i,r,i,o,"element","element")}selectStart(){let e=this.getFirstDescendant();return Rr(e)||Rn(e)?e.select(0,0):null!==e?e.selectPrevious():this.select(0,0)}selectEnd(){let e=this.getLastDescendant();return Rr(e)||Rn(e)?e.select():null!==e?e.selectNext():this.select()}clear(){let e=this.getWritable();return this.getChildren().forEach((e=>e.remove())),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){let t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=""!==e?Z[e]:0,this}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,n){let r=n.length,o=this.getChildrenSize(),i=this.getWritable(),l=i.__key;var a=[],s=[];let u=this.getChildAtIndex(e+t),c=null,d=o-t+r;if(0!==e)if(e===o)c=this.getLastChild();else{var p=this.getChildAtIndex(e);null!==p&&(c=p.getPreviousSibling())}if(0<t){var f=null===c?this.getFirstChild():c.getNextSibling();for(p=0;p<t;p++){null===f&&I(100);var m=f.getNextSibling(),g=f.__key;we(f=f.getWritable()),s.push(g),f=m}}for(p=c,m=0;m<r;m++){g=n[m],null!==p&&g.is(p)&&(c=p=p.getPreviousSibling()),(f=g.getWritable()).__parent===l&&d--,we(f);let e=g.__key;null===p?(i.__first=e,f.__prev=null):((p=p.getWritable()).__next=e,f.__prev=p.__key),g.__key===l&&I(76),f.__parent=l,a.push(e),p=g}if(e+t===o?null!==p&&(p.getWritable().__next=null,i.__last=p.__key):null!==u&&(e=u.getWritable(),null!==p?(t=p.getWritable(),e.__prev=p.__key,t.__next=u.__key):e.__prev=null),i.__size=d,s.length&&Bn(e=tr())){s=new Set(s),a=new Set(a);let{anchor:t,focus:n}=e;Or(t,s,a)&&ir(t,t.getNode(),this,c,u),Or(n,s,a)&&ir(n,n.getNode(),this,c,u),0!==d||this.canBeEmpty()||et(this)||this.remove()}return i}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(){return null}canIndent(){return!0}collapseAtStart(){return!1}excludeFromCopy(){return!1}canExtractContents(){return!0}canReplaceWith(){return!0}canInsertAfter(){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(){return!1}extractWithChild(){return!1}}function Rr(e){return e instanceof Nr}function Or(e,t,n){for(e=e.getNode();e;){let r=e.__key;if(t.has(r)&&!n.has(r))return!0;e=e.getParent()}return!1}class Mr extends Nr{static getType(){return"root"}static clone(){return new Mr}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){I(51)}getTextContent(){let e=this.__cachedText;return!mr()&&0!==vr()._dirtyType||null===e?super.getTextContent():e}remove(){I(52)}replace(){I(53)}insertBefore(){I(54)}insertAfter(){I(55)}updateDOM(){return!1}append(...e){for(let t=0;t<e.length;t++){let n=e[t];Rr(n)||Ar(n)||I(56)}return super.append(...e)}static importJSON(e){let t=Pe();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function Lr(e){return e instanceof Mr}function Pr(){return new Dr(new Map([["root",new Mr]]))}function Ir(e){let t=e.exportJSON();var n=e.constructor;t.type!==n.getType()&&I(130,n.name);let r=t.children;if(Rr(e))for(Array.isArray(r)||I(59,n.name),e=e.getChildren(),n=0;n<e.length;n++){let t=Ir(e[n]);r.push(t)}return t}class Dr{constructor(e,t){this._nodeMap=e,this._selection=t||null,this._readOnly=this._flushSync=!1}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(e){return xr(this,e)}clone(e){return(e=new Dr(this._nodeMap,void 0===e?this._selection:e))._readOnly=!0,e}toJSON(){return xr(this,(()=>({root:Ir(Pe())})))}}class $r extends Nr{static getType(){return"paragraph"}static clone(e){return new $r(e.__key)}createDOM(e){let t=document.createElement("p");return void 0!==(e=We(e.theme,"paragraph"))&&t.classList.add(...e),t}updateDOM(){return!1}static importDOM(){return{p:()=>({conversion:zr,priority:0})}}exportDOM(e){if(({element:e}=super.exportDOM(e)),e&&this.isEmpty()&&e.append(document.createElement("br")),e){var t=this.getFormatType();e.style.textAlign=t,(t=this.getDirection())&&(e.dir=t),0<(t=this.getIndent())&&(e.style.textIndent=20*t+"px")}return{element:e}}static importJSON(e){let t=Br();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),type:"paragraph",version:1}}insertNewAfter(e,t){e=Br();let n=this.getDirection();return e.setDirection(n),this.insertAfter(e,t),e}collapseAtStart(){let e=this.getChildren();if(0===e.length||Rn(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 zr(e){let t=Br();return e.style&&(t.setFormat(e.style.textAlign),0<(e=parseInt(e.style.textIndent,10)/20)&&t.setIndent(e)),{node:t}}function Br(){return nt(new $r)}function Fr(e,t,n,r){let o=e._keyToDOMMap;o.clear(),e._editorState=Pr(),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,null!==(r=e._observer)&&(r.disconnect(),e._observer=null),null!==t&&(t.textContent=""),null!==n&&(n.textContent="",o.set("root",n))}class Hr{constructor(e,t,n,r,o,i,l){this._parentEditor=t,this._rootElement=null,this._editorState=e,this._compositionKey=this._pendingEditorState=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=Be(),this._onError=o,this._htmlConversions=i,this._editable=l,this._headless=null!==t&&t._headless,this._blockCursorElement=this._window=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&&I(35);let r=this._commands;r.has(e)||r.set(e,[new Set,new Set,new Set,new Set,new Set]);let o=r.get(e);void 0===o&&I(36,String(e));let i=o[n];return i.add(t),()=>{i.delete(t),o.every((e=>0===e.size))&&r.delete(e)}}registerMutationListener(e,t){void 0===this._nodes.get(e.getType())&&I(37,e.name);let n=this._listeners.mutation;return n.set(t,e),()=>{n.delete(t)}}registerNodeTransformToKlass(e,t){var n=e.getType();return void 0===(n=this._nodes.get(n))&&I(37,e.name),n.transforms.add(t),n}registerNodeTransform(e,t){var n=this.registerNodeTransformToKlass(e,t);let r=[n];return null!=(n=n.replaceWithKlass)&&(n=this.registerNodeTransformToKlass(n,t),r.push(n)),function(e,t){kr(e,(()=>{var e=hr();if(!e.isEmpty())if("root"===t)Pe().markDirty();else{e=e._nodeMap;for(let[,t]of e)t.markDirty()}}),null===e._pendingEditorState?{tag:"history-merge"}:void 0)}(this,e.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 Cr(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){let t=this._rootElement;if(e!==t){let i=We(this._config.theme,"root");var n=this._pendingEditorState||this._editorState;if(this._rootElement=e,Fr(this,t,e,n),null!==t){if(!this._config.disableEvents){0!==Vt&&(Vt--,0===Vt&&t.ownerDocument.removeEventListener("selectionchange",sn));var r=t.__lexicalEditor;if(null!=r){if(null!==r._parentEditor){var o=ze(r);o=o[o.length-1]._key,an.get(o)===r&&an.delete(o)}else an.delete(r._key);t.__lexicalEditor=null}for(r=ln(t),o=0;o<r.length;o++)r[o]();t.__lexicalEventHandles=[]}null!=i&&t.classList.remove(...i)}null!==e?(n=(n=e.ownerDocument)&&n.defaultView||null,(r=e.style).userSelect="text",r.whiteSpace="pre-wrap",r.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=n,this._dirtyType=2,ue(this),this._updateTags.add("history-merge"),_r(this),this._config.disableEvents||function(e,t){0===Vt&&e.ownerDocument.addEventListener("selectionchange",sn),Vt++,e.__lexicalEditor=t;let n=ln(e);for(let r=0;r<Wt.length;r++){let[o,i]=Wt[r],a="function"==typeof i?e=>{!0!==e._lexicalHandled&&(e._lexicalHandled=!0,t.isEditable()&&i(e,t))}:e=>{if(!0!==e._lexicalHandled&&(e._lexicalHandled=!0,t.isEditable()))switch(o){case"cut":return Cr(t,O,e);case"copy":return Cr(t,R,e);case"paste":return Cr(t,l,e);case"dragstart":return Cr(t,T,e);case"dragover":return Cr(t,A,e);case"dragend":return Cr(t,N,e);case"focus":return Cr(t,M,e);case"blur":return Cr(t,L,e);case"drop":return Cr(t,k,e)}};e.addEventListener(o,a),n.push((()=>{e.removeEventListener(o,a)}))}}(e,this),null!=i&&e.classList.add(...i)):(this._editorState=n,this._window=this._pendingEditorState=null),Er("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&I(38),se(this);let n=this._pendingEditorState,r=this._updateTags;t=void 0!==t?t.tag:null,null===n||n.isEmpty()||(null!=t&&r.add(t),_r(this)),this._pendingEditorState=e,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,null!=t&&r.add(t),_r(this)}parseEditorState(e,t){e="string"==typeof e?JSON.parse(e):e;let n=Pr(),r=sr,o=cr,i=ur,l=this._dirtyElements,a=this._dirtyLeaves,s=this._cloneNotNeeded,u=this._dirtyType;this._dirtyElements=new Map,this._dirtyLeaves=new Set,this._cloneNotNeeded=new Set,this._dirtyType=0,sr=n,cr=!1,ur=this;try{yr(e.root,this._nodes),t&&t(),n._readOnly=!0}catch(e){e instanceof Error&&this._onError(e)}finally{this._dirtyElements=l,this._dirtyLeaves=a,this._cloneNotNeeded=s,this._dirtyType=u,sr=r,cr=o,ur=i}return n}update(e,t){kr(this,e,t)}focus(e,t={}){let n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),kr(this,(()=>{let e=tr(),n=Pe();null!==e?e.dirty=!0:0!==n.getChildrenSize()&&("rootStart"===t.defaultSelection?n.selectStart():n.selectEnd())}),{onUpdate:()=>{n.removeAttribute("autocapitalize"),e&&e()},tag:"focus"}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){var e=this._rootElement;null!==e&&e.blur(),null!==(e=lt(this._window))&&e.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,Er("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}class jr extends Nr{constructor(e,t){super(t),this.__colSpan=e,this.__rowSpan=1}exportJSON(){return{...super.exportJSON(),colSpan:this.__colSpan,rowSpan:this.__rowSpan}}getColSpan(){return this.__colSpan}setColSpan(e){return this.getWritable().__colSpan=e,this}getRowSpan(){return this.__rowSpan}setRowSpan(e){return this.getWritable().__rowSpan=e,this}}function Wr(e){return e instanceof jr}class Kr extends Nr{}function Gr(e){return e instanceof Kr}class Yr extends Nr{}function Ur(e){return e instanceof Yr}return J.$addUpdateTag=function(e){gr(),vr()._updateTags.add(e)},J.$applyNodeReplacement=nt,J.$copyNode=tt,J.$createLineBreakNode=fn,J.$createNodeSelection=Zn,J.$createParagraphNode=Br,J.$createRangeSelection=function(){let e=new Ln("root",0,"element"),t=new Ln("root",0,"element");return new jn(e,t,0,"")},J.$createTabNode=Mn,J.$createTextNode=Nn,J.$getAdjacentNode=Ye,J.$getNearestNodeFromDOMNode=Oe,J.$getNearestRootOrShadowRoot=Ze,J.$getNodeByKey=Ne,J.$getPreviousSelection=nr,J.$getRoot=Pe,J.$getSelection=tr,J.$getTextContent=function(){let e=tr();return null===e?"":e.getTextContent()},J.$hasAncestor=Je,J.$hasUpdateTag=function(e){return vr()._updateTags.has(e)},J.$insertNodes=function(e,t){let n=tr()||nr();return null===n&&(n=Pe().selectEnd()),n.insertNodes(e,t)},J.$isBlockElementNode=Jn,J.$isDecoratorNode=Ar,J.$isElementNode=Rr,J.$isInlineElementOrDecoratorNode=function(e){return Rr(e)&&e.isInline()||Ar(e)&&e.isInline()},J.$isLeafNode=Ce,J.$isLineBreakNode=mn,J.$isNodeSelection=Wn,J.$isParagraphNode=function(e){return e instanceof $r},J.$isRangeSelection=Bn,J.$isRootNode=Lr,J.$isRootOrShadowRoot=et,J.$isTabNode=function(e){return e instanceof On},J.$isTextNode=Rn,J.$nodesOfType=function(e){var t=hr();let n=t._readOnly,r=e.getType();t=t._nodeMap;let o=[];for(let[,i]of t)i instanceof e&&i.__type===r&&(n||i.isAttached())&&o.push(i);return o},J.$normalizeSelection__EXPERIMENTAL=fe,J.$parseSerializedNode=function(e){return yr(e,vr()._nodes)},J.$setCompositionKey=Te,J.$setSelection=Ie,J.$splitNode=at,J.BLUR_COMMAND=L,J.CAN_REDO_COMMAND={},J.CAN_UNDO_COMMAND={},J.CLEAR_EDITOR_COMMAND={},J.CLEAR_HISTORY_COMMAND={},J.CLICK_COMMAND=t,J.COMMAND_PRIORITY_CRITICAL=4,J.COMMAND_PRIORITY_EDITOR=0,J.COMMAND_PRIORITY_HIGH=3,J.COMMAND_PRIORITY_LOW=1,J.COMMAND_PRIORITY_NORMAL=2,J.CONTROLLED_TEXT_INSERTION_COMMAND=i,J.COPY_COMMAND=R,J.CUT_COMMAND=O,J.DELETE_CHARACTER_COMMAND=n,J.DELETE_LINE_COMMAND=u,J.DELETE_WORD_COMMAND=s,J.DEPRECATED_$computeGridMap=ar,J.DEPRECATED_$createGridSelection=function(){let e=new Ln("root",0,"element"),t=new Ln("root",0,"element");return new Fn("root",e,t)},J.DEPRECATED_$getNodeTriplet=function(e){e instanceof jr||(e instanceof cn?Wr(e=st(e,Wr))||I(114):Wr(e=st(e.getNode(),Wr))||I(114));let t=e.getParent();Ur(t)||I(115);let n=t.getParent();return Gr(n)||I(116),[e,t,n]},J.DEPRECATED_$isGridCellNode=Wr,J.DEPRECATED_$isGridNode=Gr,J.DEPRECATED_$isGridRowNode=Ur,J.DEPRECATED_$isGridSelection=Hn,J.DEPRECATED_GridCellNode=jr,J.DEPRECATED_GridNode=Kr,J.DEPRECATED_GridRowNode=Yr,J.DRAGEND_COMMAND=N,J.DRAGOVER_COMMAND=A,J.DRAGSTART_COMMAND=T,J.DROP_COMMAND=k,J.DecoratorNode=Tr,J.ElementNode=Nr,J.FOCUS_COMMAND=M,J.FORMAT_ELEMENT_COMMAND={},J.FORMAT_TEXT_COMMAND=c,J.INDENT_CONTENT_COMMAND={},J.INSERT_LINE_BREAK_COMMAND=r,J.INSERT_PARAGRAPH_COMMAND=o,J.INSERT_TAB_COMMAND={},J.KEY_ARROW_DOWN_COMMAND=y,J.KEY_ARROW_LEFT_COMMAND=h,J.KEY_ARROW_RIGHT_COMMAND=m,J.KEY_ARROW_UP_COMMAND=b,J.KEY_BACKSPACE_COMMAND=E,J.KEY_DELETE_COMMAND=S,J.KEY_DOWN_COMMAND=f,J.KEY_ENTER_COMMAND=x,J.KEY_ESCAPE_COMMAND=C,J.KEY_MODIFIER_COMMAND=P,J.KEY_SPACE_COMMAND=_,J.KEY_TAB_COMMAND=w,J.LineBreakNode=dn,J.MOVE_TO_END=g,J.MOVE_TO_START=v,J.OUTDENT_CONTENT_COMMAND={},J.PASTE_COMMAND=l,J.ParagraphNode=$r,J.REDO_COMMAND=p,J.REMOVE_TEXT_COMMAND=a,J.RootNode=Mr,J.SELECTION_CHANGE_COMMAND=e,J.TabNode=On,J.TextNode=xn,J.UNDO_COMMAND=d,J.createCommand=function(){return{}},J.createEditor=function(e){var t=e||{},n=ur,r=t.theme||{};let o=void 0===e?n:t.parentEditor||null,i=t.disableEvents||!1,l=Pr(),a=t.namespace||(null!==o?o._config.namespace:Be()),s=t.editorState,u=[Mr,xn,dn,On,$r,...t.nodes||[]],c=t.onError;if(t=void 0===t.editable||t.editable,void 0===e&&null!==n)e=n._nodes;else for(e=new Map,n=0;n<u.length;n++){let t=u[n],r=null;var d=null;"function"!=typeof t&&(t=(d=t).replace,r=d.with,d=d.withKlass?d.withKlass:null);let o=t.getType(),i=t.transform(),l=new Set;null!==i&&l.add(i),e.set(o,{klass:t,replace:r,replaceWithKlass:d,transforms:l})}return r=new Hr(l,o,e,{disableEvents:i,namespace:a,theme:r},c||console.error,function(e){let t=new Map,n=new Set;return e.forEach((e=>{if(null!=(e=null!=e.klass.importDOM?e.klass.importDOM.bind(e.klass):null)&&!n.has(e)){n.add(e);var r=e();null!==r&&Object.keys(r).forEach((e=>{let n=t.get(e);void 0===n&&(n=[],t.set(e,n)),n.push(r[e])}))}})),t}(e),t),void 0!==s&&(r._pendingEditorState=s,r._dirtyType=2),r},J.getNearestEditorFromDOMNode=ye,J.isSelectionCapturedInDecoratorInput=ve,J.isSelectionWithinEditor=be,J}function Z(){if(z)return $;z=1;const e=X();return $=e}function ee(){if(H)return F;H=1;const e=function(){if(B)return q;B=1;var e=Z();let t=new Map;function n(e){for(;null!=e;){if(e.nodeType===Node.TEXT_NODE)return e;e=e.firstChild}return null}function r(e){let t=e.parentNode;if(null==t)throw Error("Should never happen");return[t,Array.from(t.childNodes).indexOf(e)]}function o(e){let t={};e=e.split(";");for(let n of e)if(""!==n){let[e,r]=n.split(/:([^]+)/);t[e.trim()]=r.trim()}return t}function i(e){let n=t.get(e);return void 0===n&&(n=o(e),t.set(e,n)),n}function l(e,n){var r=i("getStyle"in e?e.getStyle():e.style);n=Object.entries(n).reduce(((e,[t,n])=>(null===n?delete e[t]:e[t]=n,e)),{...r}),r=function(e){let t="";for(let n in e)n&&(t+=`${n}: ${e[n]};`);return t}(n),e.setStyle(r),t.set(r,n)}function a(t){for(;null!==t&&!e.$isRootOrShadowRoot(t);){let e=t.getLatest(),n=t.getParent();0===e.getChildrenSize()&&t.remove(!0),t=n}}function s(t,n,r,o,i=null){if(0!==n.length){var l=n[0],s=new Map,u=[];(l=e.$isElementNode(l)?l:l.getParentOrThrow()).isInline()&&(l=l.getParentOrThrow());for(var c=!1;null!==l;){var d=l.getPreviousSibling();if(null!==d){l=d,c=!0;break}if(l=l.getParentOrThrow(),e.$isRootOrShadowRoot(l))break}d=new Set;for(var p=0;p<r;p++){var f=n[p];e.$isElementNode(f)&&0===f.getChildrenSize()&&d.add(f.getKey())}var m=new Set;for(p=0;p<r;p++){var g=(f=n[p]).getParent();if(null!==g&&g.isInline()&&(g=g.getParent()),null!==g&&e.$isLeafNode(f)&&!m.has(f.getKey())){if(f=g.getKey(),void 0===s.get(f)){let t=o();t.setFormat(g.getFormatType()),t.setIndent(g.getIndent()),u.push(t),s.set(f,t),g.getChildren().forEach((n=>{t.append(n),m.add(n.getKey()),e.$isElementNode(n)&&n.getChildrenKeys().forEach((e=>m.add(e)))})),a(g)}}else d.has(f.getKey())&&((g=o()).setFormat(f.getFormatType()),g.setIndent(f.getIndent()),u.push(g),f.remove(!0))}if(null!==i)for(n=0;n<u.length;n++)i.append(u[n]);if(n=null,e.$isRootOrShadowRoot(l))if(c)if(null!==i)l.insertAfter(i);else for(i=u.length-1;0<=i;i--)l.insertAfter(u[i]);else if(c=l.getFirstChild(),e.$isElementNode(c)&&(l=c),null===c)if(i)l.append(i);else for(i=0;i<u.length;i++)c=u[i],l.append(c),n=c;else if(null!==i)c.insertBefore(i);else for(l=0;l<u.length;l++)i=u[l],c.insertBefore(i),n=i;else if(i)l.insertAfter(i);else for(i=u.length-1;0<=i;i--)c=u[i],l.insertAfter(c),n=c;u=e.$getPreviousSelection(),e.$isRangeSelection(u)&&u.anchor.getNode().isAttached()&&u.focus.getNode().isAttached()?e.$setSelection(u.clone()):null!==n?n.selectEnd():t.dirty=!0}}function u(e,t,n,r){e.modify(t?"extend":"move",n,r)}function c(t){return t=t.anchor.getNode(),"rtl"===(e.$isRootNode(t)?t:t.getParentOrThrow()).getDirection()}return q.$addNodeStyle=function(e){let n=o(e=e.getStyle());t.set(e,n)},q.$cloneWithProperties=function(t){let n=(t=t.getLatest()).constructor.clone(t);return n.__parent=t.__parent,n.__next=t.__next,n.__prev=t.__prev,e.$isElementNode(t)&&e.$isElementNode(n)?(n.__first=t.__first,n.__last=t.__last,n.__size=t.__size,n.__format=t.__format,n.__indent=t.__indent,n.__dir=t.__dir,n):(e.$isTextNode(t)&&e.$isTextNode(n)&&(n.__format=t.__format,n.__style=t.__style,n.__mode=t.__mode,n.__detail=t.__detail),n)},q.$getSelectionStyleValueForProperty=function(t,n,r=""){let o=null,l=t.getNodes();var a=t.anchor,s=t.focus,u=t.isBackward();let c=u?s.offset:a.offset;if(a=u?s.getNode():a.getNode(),""!==t.style&&null!==(t=i(t.style))&&n in t)return t[n];for(t=0;t<l.length;t++){var d=l[t];if((0===t||0!==c||!d.is(a))&&e.$isTextNode(d))if(s=n,u=r,s=null!==(d=i(d=d.getStyle()))&&d[s]||u,null===o)o=s;else if(o!==s){o="";break}}return null===o?r:o},q.$isAtNodeEnd=function(e){return"text"===e.type?e.offset===e.getNode().getTextContentSize():e.offset===e.getNode().getChildrenSize()},q.$isParentElementRTL=c,q.$moveCaretSelection=u,q.$moveCharacter=function(e,t,n){let r=c(e);u(e,t,n?!r:r,"character")},q.$patchStyleText=function(t,n){var r=t.getNodes();let o=r.length-1,i=r[0],a=r[o];if(t.isCollapsed())l(t,n);else{var s=t.anchor,u=t.focus,c=i.getTextContent().length,d=u.offset,p=s.offset,f=s.isBefore(u),m=f?p:d;t=f?d:p;var g=f?s.type:u.type,h=f?u.type:s.type;if(s=f?u.key:s.key,e.$isTextNode(i)&&m===c&&(u=i.getNextSibling(),e.$isTextNode(u)&&(m=p=0,i=u)),1===r.length)e.$isTextNode(i)&&(m="element"===g?0:p>d?d:p)!==(t="element"===h?c:p>d?p:d)&&(0===m&&t===c?(l(i,n),i.select(m,t)):(r=i.splitText(m,t),l(r=0===m?r[0]:r[1],n),r.select(0,t-m)));else for(e.$isTextNode(i)&&m<i.getTextContentSize()&&(0!==m&&(i=i.splitText(m)[1]),l(i,n)),e.$isTextNode(a)&&(m=a.getTextContent().length,a.__key!==s&&0!==t&&(t=m),t!==m&&([a]=a.splitText(t)),0!==t&&l(a,n)),t=1;t<o;t++)c=(m=r[t]).getKey(),e.$isTextNode(m)&&c!==i.getKey()&&c!==a.getKey()&&!m.isToken()&&l(m,n)}},q.$selectAll=function(t){let n=t.anchor;t=t.focus;var r=n.getNode().getTopLevelElementOrThrow().getParentOrThrow();let o=r.getFirstDescendant();r=r.getLastDescendant();let i="element",l="element",a=0;e.$isTextNode(o)?i="text":e.$isElementNode(o)||null===o||(o=o.getParentOrThrow()),e.$isTextNode(r)?(l="text",a=r.getTextContentSize()):e.$isElementNode(r)||null===r||(r=r.getParentOrThrow()),o&&r&&(n.set(o.getKey(),0,i),t.set(r.getKey(),a,l))},q.$setBlocksType=function(t,n){if("root"===t.anchor.key){n=n();var r=e.$getRoot();(t=r.getFirstChild())?t.replace(n,!0):r.append(n)}else for(r=t.getNodes(),t=t.anchor.getNode().getParentOrThrow(),-1===r.indexOf(t)&&r.push(t),t.isInline()&&(t=t.getParentOrThrow(),-1===r.indexOf(t)&&r.push(t)),t=0;t<r.length;t++){let l=r[t];var o=l;if(!e.$isElementNode(o)||e.$isRootOrShadowRoot(o))o=!1;else{var i=o.getFirstChild();i=null===i||e.$isTextNode(i)||i.isInline(),o=!o.isInline()&&!1!==o.canBeEmpty()&&i}o&&((o=n()).setFormat(l.getFormatType()),o.setIndent(l.getIndent()),l.replace(o,!0))}},q.$shouldOverrideDefaultCharacterSelection=function(t,n){return t=e.$getAdjacentNode(t.focus,n),e.$isDecoratorNode(t)&&!t.isIsolated()||e.$isElementNode(t)&&!t.isInline()&&!t.canBeEmpty()},q.$sliceSelectedTextNodeContent=function(t,n){if(n.isSelected()&&!n.isSegmented()&&!n.isToken()&&(e.$isRangeSelection(t)||e.DEPRECATED_$isGridSelection(t))){var r=t.anchor.getNode(),o=t.focus.getNode(),i=n.is(r),l=n.is(o);if(i||l){i=t.isBackward();let e,[a,s]=t.getCharacterOffsets();t=r.is(o),l=n.is(i?o:r),o=n.is(i?r:o),r=0,t?(r=a>s?s:a,e=a>s?a:s):l?(r=i?s:a,e=void 0):o&&(r=0,e=i=i?a:s),n.__text=n.__text.slice(r,e)}}return n},q.$wrapNodes=function(t,n,r=null){var o=t.getNodes();let i=o.length;var l=t.anchor;if(0===i||1===i&&"element"===l.type&&0===l.getNode().getChildrenSize()){o=(t="text"===l.type?l.getNode().getParentOrThrow():l.getNode()).getChildren();let e=n();e.setFormat(t.getFormatType()),e.setIndent(t.getIndent()),o.forEach((t=>e.append(t))),r&&(e=r.append(e)),t.replace(e)}else{l=null;var a=[];for(let u=0;u<i;u++){let i=o[u];e.$isRootOrShadowRoot(i)?(s(t,a,a.length,n,r),a=[],l=i):null===l||null!==l&&e.$hasAncestor(i,l)?a.push(i):(s(t,a,a.length,n,r),a=[i])}s(t,a,a.length,n,r)}},q.createDOMRange=function(t,o,i,l,a){let s=o.getKey(),u=l.getKey(),c=document.createRange(),d=t.getElementByKey(s);if(t=t.getElementByKey(u),e.$isTextNode(o)&&(d=n(d)),e.$isTextNode(l)&&(t=n(t)),void 0===o||void 0===l||null===d||null===t)return null;"BR"===d.nodeName&&([d,i]=r(d)),"BR"===t.nodeName&&([t,a]=r(t)),o=d.firstChild,d===t&&null!=o&&"BR"===o.nodeName&&0===i&&0===a&&(a=1);try{c.setStart(d,i),c.setEnd(t,a)}catch(e){return null}return!c.collapsed||i===a&&s===u||(c.setStart(t,a),c.setEnd(d,i)),c},q.createRectsFromDOMRange=function(e,t){var n=e.getRootElement();if(null===n)return[];e=n.getBoundingClientRect(),n=getComputedStyle(n),n=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight);let r,o=(t=Array.from(t.getClientRects())).length;t.sort(((e,t)=>{let n=e.top-t.top;return 3>=Math.abs(n)?e.left-t.left:n}));for(let i=0;i<o;i++){let l=t[i],a=l.width+n===e.width;r&&r.top<=l.top&&r.top+r.height>l.top&&r.left+r.width>l.left||a?(t.splice(i--,1),o--):r=l}return t},q.getStyleObjectFromCSS=i,q.trimTextContentFromAnchor=function(t,n,r){let o=n.getNode();if(e.$isElementNode(o)){var i=o.getDescendantByIndex(n.offset);null!==i&&(o=i)}for(;0<r&&null!==o;){var l=o.getPreviousSibling(),a=0;if(null===l){for(var s=(i=o.getParentOrThrow()).getPreviousSibling();null===s;){if(null===(i=i.getParent())){l=null;break}s=i.getPreviousSibling()}null!==i&&(a=i.isInline()?0:2,l=e.$isElementNode(s)?s.getLastDescendant():s)}if(""===(s=o.getTextContent())&&e.$isElementNode(o)&&!o.isInline()&&(s="\n\n"),i=o.getTextContentSize(),!e.$isTextNode(o)||r>=i)s=o.getParent(),o.remove(),null==s||0!==s.getChildrenSize()||e.$isRootNode(s)||s.remove(),r-=i+a,o=l;else{let u=o.getKey();a=t.getEditorState().read((()=>{const t=e.$getNodeByKey(u);return e.$isTextNode(t)&&t.isSimpleText()?t.getTextContent():null})),l=i-r;let c=s.slice(0,l);null!==a&&a!==s?(r=e.$getPreviousSelection(),i=o,o.isSimpleText()?o.setTextContent(a):(i=e.$createTextNode(a),o.replace(i)),e.$isRangeSelection(r)&&r.isCollapsed()&&(r=r.anchor.offset,i.select(r,r))):o.isSimpleText()?(a=n.key===u,(s=n.offset)<r&&(s=i),r=a?s-r:0,i=a?s:l,a&&0===r?([r]=o.splitText(r,i),r.remove()):([,r]=o.splitText(r,i),r.remove())):(r=e.$createTextNode(c),o.replace(r)),r=0}}},q}();return F=e}function te(){if(j)return Q;j=1;var e=ee(),t=Z();function n(e,t){for(let n of t)if(e.type.startsWith(n))return!0;return!1}function r(e,n){for(;e!==t.$getRoot()&&null!=e;){if(n(e))return e;e=e.getParent()}return null}function o(e){return 1===e.nodeType}return Q.$splitNode=t.$splitNode,Q.$dfs=function(e,n){let r=[];e=(e||t.$getRoot()).getLatest(),n=n||(t.$isElementNode(e)?e.getLastDescendant():e);for(var o=e,i=0;null!==(o=o.getParent());)i++;for(o=i;null!==e&&!e.is(n);)if(r.push({depth:o,node:e}),t.$isElementNode(e)&&0<e.getChildrenSize())e=e.getFirstChild(),o++;else for(i=null;null===i&&null!==e;)null===(i=e.getNextSibling())?(e=e.getParent(),o--):e=i;return null!==e&&e.is(n)&&r.push({depth:o,node:e}),r},Q.$findMatchingParent=r,Q.$getNearestBlockElementAncestorOrThrow=function(e){let n=r(e,(e=>t.$isElementNode(e)&&!e.isInline()));return t.$isElementNode(n)||function(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(4,e.__key),n},Q.$getNearestNodeOfType=function(e,t){for(;null!=e;){if(e instanceof t)return e;e=e.getParent()}return null},Q.$insertNodeToNearestRoot=function(e){var n=t.$getSelection()||t.$getPreviousSelection();if(t.$isRangeSelection(n)){var{focus:r}=n;if(n=r.getNode(),r=r.offset,t.$isRootOrShadowRoot(n))null==(r=n.getChildAtIndex(r))?n.append(e):r.insertBefore(e),e.selectNext();else{let o,i;t.$isTextNode(n)?(o=n.getParentOrThrow(),i=n.getIndexWithinParent(),0<r&&(i+=1,n.splitText(r))):(o=n,i=r),[,n]=t.$splitNode(o,i),n.insertBefore(e),n.selectStart()}}else t.$isNodeSelection(n)||t.DEPRECATED_$isGridSelection(n)?(n=n.getNodes())[n.length-1].getTopLevelElementOrThrow().insertAfter(e):t.$getRoot().append(e),n=t.$createParagraphNode(),e.insertAfter(n),n.select();return e.getLatest()},Q.$restoreEditorState=function(n,r){let o=new Map,i=n._pendingEditorState;for(let[n,i]of r._nodeMap){let r=e.$cloneWithProperties(i);t.$isTextNode(r)&&(r.__text=i.__text),o.set(n,r)}i&&(i._nodeMap=o),n._dirtyType=2,n=r._selection,t.$setSelection(null===n?null:n.clone())},Q.$wrapNodeInElement=function(e,t){return t=t(),e.replace(t),t.append(e),t},Q.addClassNamesToElement=function(e,...t){t.forEach((t=>{"string"==typeof t&&(t=t.split(" ").filter((e=>""!==e)),e.classList.add(...t))}))},Q.isHTMLAnchorElement=function(e){return o(e)&&"A"===e.tagName},Q.isHTMLElement=o,Q.isMimeType=n,Q.mediaFileReader=function(e,t){let r=e[Symbol.iterator]();return new Promise(((e,o)=>{let i=[],l=()=>{const{done:a,value:s}=r.next();if(a)return e(i);const u=new FileReader;u.addEventListener("error",o),u.addEventListener("load",(()=>{const e=u.result;"string"==typeof e&&i.push({file:s,result:e}),l()})),n(s,t)?u.readAsDataURL(s):l()};l()}))},Q.mergeRegister=function(...e){return()=>{e.forEach((e=>e()))}},Q.objectKlassEquals=function(e,t){return null!==e&&Object.getPrototypeOf(e).constructor.name===t.name},Q.registerNestedElementResolver=function(e,t,n,r){return e.registerNodeTransform(t,(e=>{e:{for(var o=e.getChildren(),i=0;i<o.length;i++)if(o[i]instanceof t){o=null;break e}for(o=e;null!==o;)if(i=o,(o=o.getParent())instanceof t){o={child:i,parent:o};break e}o=null}if(null!==o){const{child:t,parent:l}=o;if(t.is(e)){if(r(l,e),o=(e=t.getNextSiblings()).length,l.insertAfter(t),0!==o){i=n(l),t.insertAfter(i);for(let t=0;t<o;t++)i.append(e[t])}l.canBeEmpty()||0!==l.getChildrenSize()||l.remove()}}}))},Q.removeClassNamesFromElement=function(e,...t){t.forEach((t=>{"string"==typeof t&&e.classList.remove(...t.split(" "))}))},Q}function ne(){if(K)return W;K=1;const e=te();return W=e}function re(){if(U)return Y;U=1;const e=function(){if(G)return V;G=1;var e=ne(),t=Z();let n=new Set(["http:","https:","mailto:","sms:","tel:"]);class r extends t.ElementNode{static getType(){return"link"}static clone(e){return new r(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}constructor(e,t={},n){super(n);let{target:r=null,rel:o=null,title:i=null}=t;this.__url=e,this.__target=r,this.__rel=o,this.__title=i}createDOM(t){let n=document.createElement("a");return n.href=this.sanitizeUrl(this.__url),null!==this.__target&&(n.target=this.__target),null!==this.__rel&&(n.rel=this.__rel),null!==this.__title&&(n.title=this.__title),e.addClassNamesToElement(n,t.theme.link),n}updateDOM(e,t){let n=this.__url,r=this.__target,o=this.__rel,i=this.__title;return n!==e.__url&&(t.href=n),r!==e.__target&&(r?t.target=r:t.removeAttribute("target")),o!==e.__rel&&(o?t.rel=o:t.removeAttribute("rel")),i!==e.__title&&(i?t.title=i:t.removeAttribute("title")),!1}static importDOM(){return{a:()=>({conversion:o,priority:1})}}static importJSON(e){let t=i(e.url,{rel:e.rel,target:e.target,title:e.title});return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}sanitizeUrl(e){try{let t=new URL(e);if(!n.has(t.protocol))return"about:blank"}catch(e){}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(e){this.getWritable().__url=e}getTarget(){return this.getLatest().__target}setTarget(e){this.getWritable().__target=e}getRel(){return this.getLatest().__rel}setRel(e){this.getWritable().__rel=e}getTitle(){return this.getLatest().__title}setTitle(e){this.getWritable().__title=e}insertNewAfter(e,n=!0){return e=this.getParentOrThrow().insertNewAfter(e,n),t.$isElementNode(e)?(n=i(this.__url,{rel:this.__rel,target:this.__target,title:this.__title}),e.append(n),n):null}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,n){if(!t.$isRangeSelection(n))return!1;e=n.anchor.getNode();let r=n.focus.getNode();return this.isParentOf(e)&&this.isParentOf(r)&&0<n.getTextContent().length}}function o(t){let n=null;if(e.isHTMLAnchorElement(t)){let e=t.textContent;null!==e&&""!==e&&(n=i(t.getAttribute("href")||"",{rel:t.getAttribute("rel"),target:t.getAttribute("target"),title:t.getAttribute("title")}))}return{node:n}}function i(e,n){return t.$applyNodeReplacement(new r(e,n))}function l(e){return e instanceof r}class a extends r{static getType(){return"autolink"}static clone(e){return new a(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}static importJSON(e){let t=s(e.url,{rel:e.rel,target:e.target,title:e.title});return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),type:"autolink",version:1}}insertNewAfter(e,n=!0){return e=this.getParentOrThrow().insertNewAfter(e,n),t.$isElementNode(e)?(n=s(this.__url,{rel:this._rel,target:this.__target,title:this.__title}),e.append(n),n):null}}function s(e,n){return t.$applyNodeReplacement(new a(e,n))}let u=t.createCommand("TOGGLE_LINK_COMMAND");return V.$createAutoLinkNode=s,V.$createLinkNode=i,V.$isAutoLinkNode=function(e){return e instanceof a},V.$isLinkNode=l,V.AutoLinkNode=a,V.LinkNode=r,V.TOGGLE_LINK_COMMAND=u,V.toggleLink=function(e,n={}){let{target:r,title:o}=n,a=void 0===n.rel?"noreferrer":n.rel;if(n=t.$getSelection(),t.$isRangeSelection(n))if(n=n.extract(),null===e)n.forEach((e=>{if(l(e=e.getParent())){let t=e.getChildren();for(let n=0;n<t.length;n++)e.insertBefore(t[n]);e.remove()}}));else{if(1===n.length){var s=n[0];if(s=l(s)?s:function(e,t){for(;null!==e&&null!==(e=e.getParent())&&!t(e););return e}(s,l),null!==s)return s.setURL(e),void 0!==r&&s.setTarget(r),null!==a&&s.setRel(a),void(void 0!==o&&s.setTitle(o))}let u=null,c=null;n.forEach((n=>{var s=n.getParent();if(s!==c&&null!==s&&(!t.$isElementNode(n)||n.isInline()))if(l(s))c=s,s.setURL(e),void 0!==r&&s.setTarget(r),null!==a&&c.setRel(a),void 0!==o&&c.setTitle(o);else if(s.is(u)||(u=s,c=i(e,{rel:a,target:r}),l(s)?null===n.getPreviousSibling()?s.insertBefore(c):s.insertAfter(c):n.insertBefore(c)),l(n)){if(!n.is(c)){if(null!==c){s=n.getChildren();for(let e=0;e<s.length;e++)c.append(s[e])}n.remove()}}else null!==c&&c.append(n)}))}},V}();return Y=e}var oe,ie,le,ae=re(),se={};function ue(){if(oe)return se;oe=1;var e=Z(),t=ne();function n(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function r(e){let t=1;for(e=e.getParent();null!=e;){if(y(e)){if(k(e=e.getParent())){t++,e=e.getParent();continue}n(40)}break}return t}function o(e){k(e=e.getParent())||n(40);let t=e;for(;null!==t;)t=t.getParent(),k(t)&&(e=t);return e}function i(e){let t=[];e=e.getChildren().filter(y);for(let n=0;n<e.length;n++){let r=e[n],o=r.getFirstChild();k(o)?t=t.concat(i(o)):t.push(r)}return t}function l(e){return y(e)&&k(e.getFirstChild())}function a(e){return b().append(e)}function s(e,t){return y(e)&&(0===t.length||1===t.length&&e.is(t[0])&&0===e.getChildrenSize())}function u(e,t){e.splice(e.getChildrenSize(),0,t)}function c(e,t){if(k(e))return e;let n=e.getPreviousSibling(),r=e.getNextSibling(),o=b();return o.setFormat(e.getFormatType()),o.setIndent(e.getIndent()),u(o,e.getChildren()),k(n)&&t===n.getListType()?(n.append(o),e.remove(),k(r)&&t===r.getListType()&&(u(n,r.getChildren()),r.remove()),n):k(r)&&t===r.getListType()?(r.getFirstChildOrThrow().insertBefore(o),e.remove(),r):((t=w(t)).append(o),e.replace(t),p(t),t)}function d(e,t){var n=e.getLastChild();let r=t.getFirstChild();n&&r&&l(n)&&l(r)&&(d(n.getFirstChild(),r.getFirstChild()),r.remove()),0<(n=t.getChildren()).length&&(e.append(...n),p(e)),t.remove()}function p(e,t){if(void 0!==(e=t||e.getChildren()))for(t=0;t<e.length;t++){let l=e[t];if(y(l)){let e=l.getValue();var r=l,o=r.getParent(),i=1;for(null!=o&&(k(o)?i=o.getStart():n(44)),r=r.getPreviousSiblings(),o=0;o<r.length;o++){let e=r[o];y(e)&&!k(e.getFirstChild())&&i++}e!==i&&l.setValue(i)}}}function f(e){if(!l(e)){var t=e.getParent(),n=t?t.getParent():void 0,r=n?n.getParent():void 0;if(k(r)&&y(n)&&k(t)){var o=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(e.is(o))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(i))n.insertAfter(e),t.isEmpty()&&n.remove();else{var a=t.getListType();o=b();let r=w(a);o.append(r),e.getPreviousSiblings().forEach((e=>r.append(e))),i=b(),a=w(a),i.append(a),u(a,e.getNextSiblings()),n.insertBefore(o),n.insertAfter(i),n.replace(e)}p(t),p(r)}}}class m extends e.ElementNode{static getType(){return"listitem"}static clone(e){return new m(e.__value,e.__checked,e.__key)}constructor(e,t,n){super(n),this.__value=void 0===e?1:e,this.__checked=t}createDOM(e){let t=document.createElement("li"),n=this.getParent();return k(n)&&"check"===n.getListType()&&h(t,this,null),t.value=this.__value,g(t,e.theme,this),t}updateDOM(e,t,n){let r=this.getParent();return k(r)&&"check"===r.getListType()&&h(t,this,e),t.value=this.__value,g(t,n.theme,this),!1}static transform(){return e=>{let t=e.getParent();k(t)&&(p(t),"check"!==t.getListType()&&null!=e.getChecked()&&e.setChecked(void 0))}}static importDOM(){return{li:()=>({conversion:v,priority:0})}}static importJSON(e){let t=b();return t.setChecked(e.checked),t.setValue(e.value),t.setFormat(e.format),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...t){for(let n=0;n<t.length;n++){let r=t[n];if(e.$isElementNode(r)&&this.canMergeWith(r)){let e=r.getChildren();this.append(...e),r.remove()}else super.append(r)}return this}replace(e,t){if(y(e))return super.replace(e);this.setIndent(0);let n=this.getParentOrThrow();if(!k(n))return e;if(n.__first===this.getKey())n.insertBefore(e);else if(n.__last===this.getKey())n.insertAfter(e);else{let t=w(n.getListType()),r=this.getNextSibling();for(;r;){let e=r;r=r.getNextSibling(),t.append(e)}n.insertAfter(e),e.insertAfter(t)}return t&&this.getChildren().forEach((t=>{e.append(t)})),this.remove(),0===n.getChildrenSize()&&n.remove(),e}insertAfter(e,t=!0){var r=this.getParentOrThrow();k(r)||n(39);var o=this.getNextSiblings();if(y(e))return t=super.insertAfter(e,t),k(e=e.getParentOrThrow())&&p(e),t;if(k(e)){for(r=e,o=(e=e.getChildren()).length-1;0<=o;o--)r=e[o],this.insertAfter(r,t);return r}if(r.insertAfter(e,t),0!==o.length){let n=w(r.getListType());o.forEach((e=>n.append(e))),e.insertAfter(n,t)}return e}remove(e){let t=this.getPreviousSibling(),n=this.getNextSibling();super.remove(e),t&&n&&l(t)&&l(n)?(d(t.getFirstChild(),n.getFirstChild()),n.remove()):n&&(k(e=n.getParent())&&p(e))}insertNewAfter(e,t=!0){return e=b(null==this.__checked&&void 0),this.insertAfter(e,t),e}collapseAtStart(t){let n=e.$createParagraphNode();this.getChildren().forEach((e=>n.append(e)));var r=this.getParentOrThrow(),o=r.getParentOrThrow();let i=y(o);return 1===r.getChildrenSize()?i?(r.remove(),o.select()):(r.insertBefore(n),r.remove(),r=t.anchor,t=t.focus,o=n.getKey(),"element"===r.type&&r.getNode().is(this)&&r.set(o,r.offset,"element"),"element"===t.type&&t.getNode().is(this)&&t.set(o,t.offset,"element")):(r.insertBefore(n),this.remove()),!0}getValue(){return this.getLatest().__value}setValue(e){this.getWritable().__value=e}getChecked(){return this.getLatest().__checked}setChecked(e){this.getWritable().__checked=e}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){var e=this.getParent();if(null===e)return this.getLatest().__indent;e=e.getParentOrThrow();let t=0;for(;y(e);)e=e.getParentOrThrow().getParentOrThrow(),t++;return t}setIndent(e){"number"==typeof e&&-1<e||n(117);let t=this.getIndent();for(;t!==e;)if(t<e){e:{var r=new Set;if(l(this)||r.has(this.getKey()))break e;let e=this.getParent();var o=this.getNextSibling(),i=this.getPreviousSibling();if(l(o)&&l(i)){if(k(i=i.getFirstChild())){i.append(this);var a=o.getFirstChild();k(a)&&(u(i,a=a.getChildren()),o.remove(),r.add(o.getKey())),p(i)}}else l(o)?k(o=o.getFirstChild())&&(null!==(r=o.getFirstChild())&&r.insertBefore(this),p(o)):l(i)?k(o=i.getFirstChild())&&(o.append(this),p(o)):k(e)&&(r=b(),a=w(e.getListType()),r.append(a),a.append(this),i?i.insertAfter(r):o?o.insertBefore(r):e.append(r),p(a));k(e)&&p(e)}t++}else f(this),t--;return this}insertBefore(e){if(y(e)){let e=this.getParentOrThrow();if(k(e)){p(e,this.getNextSiblings())}}return super.insertBefore(e)}canInsertAfter(e){return y(e)}canReplaceWith(e){return y(e)}canMergeWith(t){return e.$isParagraphNode(t)||y(t)}extractWithChild(t,n){if(!e.$isRangeSelection(n))return!1;t=n.anchor.getNode();let r=n.focus.getNode();return this.isParentOf(t)&&this.isParentOf(r)&&this.getTextContent().length===n.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return w("bullet")}}function g(e,n,r){let o=[],i=[];var l=(n=n.list)?n.listitem:void 0;if(n&&n.nested)var a=n.nested.listitem;if(void 0!==l&&(l=l.split(" "),o.push(...l)),n){l=k(l=r.getParent())&&"check"===l.getListType();let e=r.getChecked();l&&!e||i.push(n.listitemUnchecked),l&&e||i.push(n.listitemChecked),l&&o.push(e?n.listitemChecked:n.listitemUnchecked)}void 0!==a&&(a=a.split(" "),r.getChildren().some((e=>k(e)))?o.push(...a):i.push(...a)),0<i.length&&t.removeClassNamesFromElement(e,...i),0<o.length&&t.addClassNamesToElement(e,...o)}function h(e,t,n){k(t.getFirstChild())?(e.removeAttribute("role"),e.removeAttribute("tabIndex"),e.removeAttribute("aria-checked")):(e.setAttribute("role","checkbox"),e.setAttribute("tabIndex","-1"),n&&t.__checked===n.__checked||e.setAttribute("aria-checked",t.getChecked()?"true":"false"))}function v(e){return{node:b(e=t.isHTMLElement(e)&&"true"===e.getAttribute("aria-checked"))}}function b(t){return e.$applyNodeReplacement(new m(void 0,t))}function y(e){return e instanceof m}class x extends e.ElementNode{static getType(){return"list"}static clone(e){return new x(e.__listType||S[e.__tag],e.__start,e.__key)}constructor(e,t,n){super(n),this.__listType=e=S[e]||e,this.__tag="number"===e?"ol":"ul",this.__start=t}getTag(){return this.__tag}setListType(e){let t=this.getWritable();t.__listType=e,t.__tag="number"===e?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(e){let t=document.createElement(this.__tag);return 1!==this.__start&&t.setAttribute("start",String(this.__start)),t.__lexicalListType=this.__listType,_(t,e.theme,this),t}updateDOM(e,t,n){return e.__tag!==this.__tag||(_(t,n.theme,this),!1)}static importDOM(){return{ol:()=>({conversion:C,priority:0}),ul:()=>({conversion:C,priority:0})}}static importJSON(e){let t=w(e.listType,e.start);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportDOM(e){return({element:e}=super.exportDOM(e)),e&&(1!==this.__start&&e.setAttribute("start",String(this.__start)),"check"===this.__listType&&e.setAttribute("__lexicalListType","check")),{element:e}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...t){for(let r=0;r<t.length;r++){var n=t[r];if(y(n))super.append(n);else{let t=b();k(n)?t.append(n):e.$isElementNode(n)?(n=e.$createTextNode(n.getTextContent()),t.append(n)):t.append(n),super.append(t)}}return p(this),this}extractWithChild(e){return y(e)}}function _(e,n,o){let i=[],l=[];var a=n.list;if(void 0!==a){let e=a[`${o.__tag}Depth`]||[],t=(n=r(o)-1)%e.length;var s=e[t];let u,c=a[o.__tag];if(void 0!==(a=a.nested)&&a.list&&(u=a.list),void 0!==c&&i.push(c),void 0!==s)for(s=s.split(" "),i.push(...s),s=0;s<e.length;s++)s!==t&&l.push(o.__tag+s);void 0!==u&&(o=u.split(" "),1<n?i.push(...o):l.push(...o))}0<l.length&&t.removeClassNamesFromElement(e,...l),0<i.length&&t.addClassNamesToElement(e,...i)}function E(e){let t=[];for(let r=0;r<e.length;r++){var n=e[r];y(n)?(t.push(n),1<(n=n.getChildren()).length&&n.forEach((e=>{k(e)&&t.push(a(e))}))):t.push(a(n))}return t}function C(e){let n=e.nodeName.toLowerCase(),r=null;return"ol"===n?r=w("number",e.start):"ul"===n&&(r=t.isHTMLElement(e)&&"check"===e.getAttribute("__lexicallisttype")?w("check"):w("bullet")),{after:E,node:r}}let S={ol:"number",ul:"bullet"};function w(t,n=1){return e.$applyNodeReplacement(new x(t,n))}function k(e){return e instanceof x}let T=e.createCommand("INSERT_UNORDERED_LIST_COMMAND"),A=e.createCommand("INSERT_ORDERED_LIST_COMMAND"),N=e.createCommand("INSERT_CHECK_LIST_COMMAND"),R=e.createCommand("REMOVE_LIST_COMMAND");return se.$createListItemNode=b,se.$createListNode=w,se.$getListDepth=r,se.$handleListInsertParagraph=function(){var t=e.$getSelection();if(!e.$isRangeSelection(t)||!t.isCollapsed())return!1;if(!y(t=t.anchor.getNode())||""!==t.getTextContent())return!1;var r=o(t),i=t.getParent();k(i)||n(40);let l,a=i.getParent();if(e.$isRootOrShadowRoot(a))l=e.$createParagraphNode(),r.insertAfter(l);else{if(!y(a))return!1;l=b(),a.insertAfter(l)}if(l.select(),0<(r=t.getNextSiblings()).length){let t=w(i.getListType());e.$isParagraphNode(l)?l.insertAfter(t):((i=b()).append(t),l.insertAfter(i)),r.forEach((e=>{e.remove(),t.append(e)}))}return function(e){for(;null==e.getNextSibling()&&null==e.getPreviousSibling();){let t=e.getParent();if(null==t||!y(e)&&!k(e))break;e=t}e.remove()}(t),!0},se.$isListItemNode=y,se.$isListNode=k,se.INSERT_CHECK_LIST_COMMAND=N,se.INSERT_ORDERED_LIST_COMMAND=A,se.INSERT_UNORDERED_LIST_COMMAND=T,se.ListItemNode=m,se.ListNode=x,se.REMOVE_LIST_COMMAND=R,se.insertList=function(t,n){t.update((()=>{var t=e.$getSelection();if(e.$isRangeSelection(t)||e.DEPRECATED_$isGridSelection(t)){var r=t.getNodes(),o=(t=t.anchor.getNode()).getParent();if(s(t,r))r=w(n),e.$isRootOrShadowRoot(o)?(t.replace(r),o=b(),e.$isElementNode(t)&&(o.setFormat(t.getFormatType()),o.setIndent(t.getIndent())),r.append(o)):y(t)&&(u(r,(t=t.getParentOrThrow()).getChildren()),t.replace(r));else for(t=new Set,o=0;o<r.length;o++){var i=r[o];if(e.$isElementNode(i)&&i.isEmpty()&&!t.has(i.getKey()))c(i,n);else if(e.$isLeafNode(i))for(i=i.getParent();null!=i;){let r=i.getKey();if(k(i)){if(!t.has(r)){var l=w(n);u(l,i.getChildren()),i.replace(l),p(l),t.add(r)}break}if(l=i.getParent(),e.$isRootOrShadowRoot(l)&&!t.has(r)){t.add(r),c(i,n);break}i=l}}}}))},se.removeList=function(n){n.update((()=>{let n=e.$getSelection();if(e.$isRangeSelection(n)){var r=new Set,l=n.getNodes(),a=n.anchor.getNode();if(s(a,l))r.add(o(a));else for(a=0;a<l.length;a++){var c=l[a];e.$isLeafNode(c)&&(null!=(c=t.$getNearestNodeOfType(c,m))&&r.add(o(c)))}for(let t of r){r=t,l=i(t);for(let t of l)u(l=e.$createParagraphNode(),t.getChildren()),r.insertAfter(l),r=l,t.__key===n.anchor.key&&n.anchor.set(l.getKey(),0,"element"),t.__key===n.focus.key&&n.focus.set(l.getKey(),0,"element"),t.remove();t.remove()}}}))},se}function ce(){if(le)return ie;le=1;const e=ue();return ie=e}var de,pe,fe,me,ge,he,ve=ce(),be={},ye={};function xe(){if(de)return ye;de=1;var e=h;let t=e.createContext(null);return ye.LexicalComposerContext=t,ye.createLexicalComposerContext=function(e,t){let n=null;return null!=e&&(n=e[1]),{getTheme:function(){return null!=t?t:null!=n?n.getTheme():null}}},ye.useLexicalComposerContext=function(){let n=e.useContext(t);return null==n&&function(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(8),n},ye}function _e(){if(fe)return pe;fe=1;const e=xe();return pe=e}function Ee(){if(me)return be;me=1;var e=_e(),t=Z(),n=h;let r="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;var o=r?n.useLayoutEffect:n.useEffect;let i={tag:"history-merge"};return be.LexicalComposer=function({initialConfig:l,children:a}){let s=n.useMemo((()=>{const{theme:n,namespace:o,editor__DEPRECATED:a,nodes:s,onError:u,editorState:c}=l,d=e.createLexicalComposerContext(null,n);let p=a||null;if(null===p){const e=t.createEditor({editable:l.editable,namespace:o,nodes:s,onError:t=>u(t,e),theme:n});!function(e,n){if(null!==n)if(void 0===n)e.update((()=>{var n=t.$getRoot();if(n.isEmpty()){let o=t.$createParagraphNode();n.append(o),n=r?document.activeElement:null,(null!==t.$getSelection()||null!==n&&n===e.getRootElement())&&o.select()}}),i);else if(null!==n)switch(typeof n){case"string":let r=e.parseEditorState(n);e.setEditorState(r,i);break;case"object":e.setEditorState(n,i);break;case"function":e.update((()=>{t.$getRoot().isEmpty()&&n(e)}),i)}}(e,c),p=e}return[p,d]}),[]);return o((()=>{let e=l.editable,[t]=s;t.setEditable(void 0===e||e)}),[]),n.createElement(e.LexicalComposerContext.Provider,{value:s},a)},be}var Ce,Se,we,ke,Te,Ae,Ne=function(){if(he)return ge;he=1;const e=Ee();return ge=e}(),Re={},Oe={};function Me(){if(Ce)return Oe;Ce=1;var e=ne(),t=Z();function n(e,n){let r=Date.now(),o=0;return(i,l,a,s,u,c)=>{let d=Date.now();if(c.has("historic"))return o=0,r=d,2;let p=function(e,n,r,o,i){if(null===e||0===r.size&&0===o.size&&!i)return 0;var l=n._selection,a=e._selection;if(i)return 1;if(!(t.$isRangeSelection(l)&&t.$isRangeSelection(a)&&a.isCollapsed()&&l.isCollapsed()))return 0;i=n._nodeMap;let s=[];for(let e of r)void 0!==(r=i.get(e))&&s.push(r);for(let[e,n]of o)n&&(void 0===(o=i.get(e))||t.$isRootNode(o)||s.push(o));return 0===s.length?0:1<s.length?(n=(o=n._nodeMap).get(l.anchor.key),a=o.get(a.anchor.key),n&&a&&!e._nodeMap.has(n.__key)&&t.$isTextNode(n)&&1===n.__text.length&&1===l.anchor.offset?2:0):(n=s[0],e=e._nodeMap.get(n.__key),t.$isTextNode(e)&&t.$isTextNode(n)&&e.__mode===n.__mode?(e=e.__text)===(n=n.__text)?0:(l=l.anchor,a=a.anchor,l.key!==a.key||"text"!==l.type?0:(l=l.offset,a=a.offset,1==(e=n.length-e.length)&&a===l-1?2:-1===e&&a===l+1?3:-1===e&&a===l?4:0)):0)}(i,l,s,u,e.isComposing()),f=(()=>{var f=null===a||a.editor===e,m=c.has("history-push");if(!m&&f&&c.has("history-merge"))return 0;if(null===i)return 1;var g=l._selection;if(!(0<s.size||0<u.size))return null!==g?0:2;if(!1===m&&0!==p&&p===o&&d<r+n&&f)return 0;if(1===s.size){{m=Array.from(s)[0],f=i._nodeMap.get(m),m=l._nodeMap.get(m),g=i._selection;let e=l._selection,n=!1;t.$isRangeSelection(g)&&t.$isRangeSelection(e)&&(n="element"===g.anchor.type&&"element"===g.focus.type&&"text"===e.anchor.type&&"text"===e.focus.type),f=!(n||!t.$isTextNode(f)||!t.$isTextNode(m))&&(f.__type===m.__type&&f.__text===m.__text&&f.__mode===m.__mode&&f.__detail===m.__detail&&f.__style===m.__style&&f.__format===m.__format&&f.__parent===m.__parent)}if(f)return 0}return 1})();return r=d,o=p,f}}return Oe.createEmptyHistoryState=function(){return{current:null,redoStack:[],undoStack:[]}},Oe.registerHistory=function(r,o,i){let l=n(r,i);i=({editorState:e,prevEditorState:n,dirtyLeaves:i,dirtyElements:a,tags:s})=>{const u=o.current,c=o.redoStack,d=o.undoStack,p=null===u?null:u.editorState;if(null===u||e!==p){if(1===(n=l(n,e,u,i,a,s)))0!==c.length&&(o.redoStack=[],r.dispatchCommand(t.CAN_REDO_COMMAND,!1)),null!==u&&(d.push({...u}),r.dispatchCommand(t.CAN_UNDO_COMMAND,!0));else if(2===n)return;o.current={editor:r,editorState:e}}};let a=e.mergeRegister(r.registerCommand(t.UNDO_COMMAND,(()=>{let e=o.redoStack,n=o.undoStack;if(0!==n.length){let i=o.current,l=n.pop();null!==i&&(e.push(i),r.dispatchCommand(t.CAN_REDO_COMMAND,!0)),0===n.length&&r.dispatchCommand(t.CAN_UNDO_COMMAND,!1),o.current=l||null,l&&l.editor.setEditorState(l.editorState,{tag:"historic"})}return!0}),t.COMMAND_PRIORITY_EDITOR),r.registerCommand(t.REDO_COMMAND,(()=>{let e=o.redoStack;var n=o.undoStack;if(0!==e.length){let i=o.current;null!==i&&(n.push(i),r.dispatchCommand(t.CAN_UNDO_COMMAND,!0)),n=e.pop(),0===e.length&&r.dispatchCommand(t.CAN_REDO_COMMAND,!1),o.current=n||null,n&&n.editor.setEditorState(n.editorState,{tag:"historic"})}return!0}),t.COMMAND_PRIORITY_EDITOR),r.registerCommand(t.CLEAR_EDITOR_COMMAND,(()=>(o.undoStack=[],o.redoStack=[],o.current=null,!1)),t.COMMAND_PRIORITY_EDITOR),r.registerCommand(t.CLEAR_HISTORY_COMMAND,(()=>(o.undoStack=[],o.redoStack=[],o.current=null,r.dispatchCommand(t.CAN_REDO_COMMAND,!1),r.dispatchCommand(t.CAN_UNDO_COMMAND,!1),!0)),t.COMMAND_PRIORITY_EDITOR),r.registerUpdateListener(i)),s=r.registerUpdateListener(i);return()=>{a(),s()}},Oe}function Le(){if(ke)return Re;ke=1;var e=_e(),t=function(){if(we)return Se;we=1;const e=Me();return Se=e}(),n=h;return Re.createEmptyHistoryState=t.createEmptyHistoryState,Re.HistoryPlugin=function({externalHistoryState:r}){let[o]=e.useLexicalComposerContext();return function(e,r,o=1e3){let i=n.useMemo((()=>r||t.createEmptyHistoryState()),[r]);n.useEffect((()=>t.registerHistory(e,i,o)),[o,e,i])}(o,r),null},Re}var Pe,Ie,De,$e=function(){if(Ae)return Te;Ae=1;const e=Le();return Te=e}(),ze={};function Be(){if(Pe)return ze;Pe=1;var e=ce(),t=_e(),n=h,r=ne(),o=Z();return ze.ListPlugin=function(){let[i]=t.useLexicalComposerContext();return n.useEffect((()=>{if(!i.hasNodes([e.ListNode,e.ListItemNode]))throw Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")}),[i]),function(t){n.useEffect((()=>r.mergeRegister(t.registerCommand(e.INSERT_ORDERED_LIST_COMMAND,(()=>(e.insertList(t,"number"),!0)),o.COMMAND_PRIORITY_LOW),t.registerCommand(e.INSERT_UNORDERED_LIST_COMMAND,(()=>(e.insertList(t,"bullet"),!0)),o.COMMAND_PRIORITY_LOW),t.registerCommand(e.REMOVE_LIST_COMMAND,(()=>(e.removeList(t),!0)),o.COMMAND_PRIORITY_LOW),t.registerCommand(o.INSERT_PARAGRAPH_COMMAND,(()=>!!e.$handleListInsertParagraph()),o.COMMAND_PRIORITY_LOW))),[t])}(i),null},ze}var Fe,He,je,We=function(){if(De)return Ie;De=1;const e=Be();return Ie=e}(),Ke={};function Ge(){if(Fe)return Ke;Fe=1;var e=_e(),t=ne(),n=Z(),r=h;function o(e){return e.registerCommand(n.KEY_TAB_COMMAND,(r=>{let o=n.$getSelection();return!!n.$isRangeSelection(o)&&(r.preventDefault(),r=function(e){var r=e.getNodes();if(0<function(e,t){let n=[];for(let r=0;r<e.length;r++){let o=t(e[r]);null!==o&&n.push(o)}return n}(r,(e=>n.$isBlockElementNode(e)&&e.canIndent()?e:null)).length)return!0;if(r=e.anchor,r=(e=(e=e.focus).isBefore(r)?e:r).getNode(),(r=t.$getNearestBlockElementAncestorOrThrow(r)).canIndent()){r=r.getKey();let t=n.$createRangeSelection();if(t.anchor.set(r,0,"element"),t.focus.set(r,0,"element"),t=n.$normalizeSelection__EXPERIMENTAL(t),t.anchor.is(e))return!0}return!1}(o)?r.shiftKey?n.OUTDENT_CONTENT_COMMAND:n.INDENT_CONTENT_COMMAND:n.INSERT_TAB_COMMAND,e.dispatchCommand(r,void 0))}),n.COMMAND_PRIORITY_EDITOR)}return Ke.TabIndentationPlugin=function(){let[t]=e.useLexicalComposerContext();return r.useEffect((()=>o(t))),null},Ke.registerTabIndentation=o,Ke}var Ye,Ue,Ve,Qe,qe,Je,Xe,Ze,et,tt=function(){if(je)return He;je=1;const e=Ge();return He=e}(),nt={},rt={},ot={};function it(){if(Ve)return Ue;Ve=1;const e=function(){if(Ye)return ot;Ye=1;var e=ee(),t=Z();function n(r,o,i,l=null){let a=null==l||o.isSelected(l),s=t.$isElementNode(o)&&o.excludeFromCopy("html");var u=o;null!==l&&(u=e.$cloneWithProperties(o),u=t.$isTextNode(u)&&null!=l?e.$sliceSelectedTextNodeContent(l,u):u);let c=t.$isElementNode(u)?u.getChildren():[],{element:d,after:p}=u.exportDOM(r);if(!d)return!1;let f=document.createDocumentFragment();for(let e=0;e<c.length;e++){let i=c[e],s=n(r,i,f,l);!a&&t.$isElementNode(o)&&s&&o.extractWithChild(i,l,"html")&&(a=!0)}return a&&!s?(d.append(f),i.append(d),p&&(r=p.call(u,d))&&d.replaceWith(r)):i.append(f),a}let r=new Set(["STYLE","SCRIPT"]);function o(e,n,i=new Map,l){let a=[];if(r.has(e.nodeName))return a;let s=null;var u,{nodeName:c}=e,d=n._htmlConversions.get(c.toLowerCase());if(c=null,void 0!==d)for(u of d)null!==(d=u(e))&&(null===c||c.priority<d.priority)&&(c=d);if(c=(u=null!==c?c.conversion:null)?u(e):null,u=null,null!==c){if(u=c.after,d=c.node,s=Array.isArray(d)?d[d.length-1]:d,null!==s){for(var[,p]of i)if(s=p(s,l),!s)break;s&&a.push(...Array.isArray(d)?d:[s])}null!=c.forChild&&i.set(e.nodeName,c.forChild)}for(e=e.childNodes,l=[],p=0;p<e.length;p++)l.push(...o(e[p],n,new Map(i),s));return null!=u&&(l=u(l)),null==s?a=a.concat(l):t.$isElementNode(s)&&s.append(...l),a}return ot.$generateHtmlFromNodes=function(e,r){if("undefined"==typeof document||"undefined"==typeof window)throw Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");let o=document.createElement("div"),i=t.$getRoot().getChildren();for(let t=0;t<i.length;t++)n(e,i[t],o,r);return o.innerHTML},ot.$generateNodesFromDOM=function(e,t){t=t.body?t.body.childNodes:[];let n=[];for(let l=0;l<t.length;l++){var i=t[l];r.has(i.nodeName)||null!==(i=o(i,e))&&(n=n.concat(i))}return n},ot}();return Ue=e}function lt(){if(Qe)return rt;Qe=1;var e=it(),t=ee(),n=ne(),r=Z();function o(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let i="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function l(t){let n=r.$getSelection();if(null==n)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(n)&&n.isCollapsed()||0===n.getNodes().length?"":e.$generateHtmlFromNodes(t,n)}function a(e){let t=r.$getSelection();if(null==t)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(t)&&t.isCollapsed()||0===t.getNodes().length?null:JSON.stringify(c(e,t))}function s(e,t,i){(r.DEPRECATED_$isGridSelection(i)||null!==n.$findMatchingParent(i.anchor.getNode(),(e=>r.DEPRECATED_$isGridCellNode(e)))&&null!==n.$findMatchingParent(i.focus.getNode(),(e=>r.DEPRECATED_$isGridCellNode(e))))&&1===t.length&&r.DEPRECATED_$isGridNode(t[0])?function(e,t,i,l){1===e.length&&r.DEPRECATED_$isGridNode(e[0])||o(42);var a=e[0];e=a.getChildren(),i=a.getFirstChildOrThrow().getChildrenSize();var s=a.getChildrenSize(),u=n.$findMatchingParent(t.anchor.getNode(),(e=>r.DEPRECATED_$isGridCellNode(e)));t=(a=u&&n.$findMatchingParent(u,(e=>r.DEPRECATED_$isGridRowNode(e))))&&n.$findMatchingParent(a,(e=>r.DEPRECATED_$isGridNode(e))),r.DEPRECATED_$isGridCellNode(u)&&r.DEPRECATED_$isGridRowNode(a)&&r.DEPRECATED_$isGridNode(t)||o(43);var c=a.getIndexWithinParent(),d=Math.min(t.getChildrenSize()-1,c+s-1);let p,f;s=u.getIndexWithinParent(),u=Math.min(a.getChildrenSize()-1,s+i-1),i=Math.min(s,u),a=Math.min(c,d),s=Math.max(s,u),c=Math.max(c,d),d=t.getChildren(),u=0;for(let t=a;t<=c;t++){var m=d[t];r.DEPRECATED_$isGridRowNode(m)||o(24);var g=e[u];r.DEPRECATED_$isGridRowNode(g)||o(24),m=m.getChildren(),g=g.getChildren();let n=0;for(let e=i;e<=s;e++){let l=m[e];r.DEPRECATED_$isGridCellNode(l)||o(25);let u=g[n];r.DEPRECATED_$isGridCellNode(u)||o(25),t===a&&e===i?p=l.getKey():t===c&&e===s&&(f=l.getKey());let d=l.getChildren();u.getChildren().forEach((e=>{r.$isTextNode(e)&&r.$createParagraphNode().append(e),l.append(e)})),d.forEach((e=>e.remove())),n++}u++}p&&f&&(e=r.DEPRECATED_$createGridSelection(),e.set(t.getKey(),p,f),r.$setSelection(e),l.dispatchCommand(r.SELECTION_CHANGE_COMMAND,void 0))}(t,i,!1,e):function(e,t){let n=[],i=null;for(let t=0;t<e.length;t++){let o=e[t],l=r.$isLineBreakNode(o);if(l||r.$isDecoratorNode(o)&&o.isInline()||r.$isElementNode(o)&&o.isInline()||r.$isTextNode(o)||o.isParentRequired()){if(null===i&&(i=o.createParentElementNode(),n.push(i),l))continue;null!==i&&i.append(o)}else n.push(o),i=null}r.$isRangeSelection(t)?t.insertNodes(n):r.DEPRECATED_$isGridSelection(t)&&(e=t.anchor.getNode(),r.DEPRECATED_$isGridCellNode(e)||o(41),e.append(...n))}(t,i)}function u(e,n,i,l=[]){let a=null==n||i.isSelected(n),s=r.$isElementNode(i)&&i.excludeFromCopy("html");var c=i;if(null!==n){var d=t.$cloneWithProperties(i);c=d=r.$isTextNode(d)&&null!=n?t.$sliceSelectedTextNodeContent(n,d):d}let p=r.$isElementNode(c)?c.getChildren():[];var f=c;d=f.exportJSON();var m=f.constructor;d.type!==m.getType()&&o(58,m.name);let g=d.children;for(r.$isElementNode(f)&&(Array.isArray(g)||o(59,m.name)),r.$isTextNode(c)&&(0<(c=c.__text).length?d.text=c:a=!1),c=0;c<p.length;c++)m=u(e,n,f=p[c],d.children),!a&&r.$isElementNode(i)&&m&&i.extractWithChild(f,n,"clone")&&(a=!0);if(a&&!s)l.push(d);else if(Array.isArray(d.children))for(e=0;e<d.children.length;e++)l.push(d.children[e]);return a}function c(e,t){let n=[],o=r.$getRoot().getChildren();for(let r=0;r<o.length;r++)u(e,t,o[r],n);return{namespace:e._config.namespace,nodes:n}}function d(e){let n=[];for(let o=0;o<e.length;o++){let i=r.$parseSerializedNode(e[o]);r.$isTextNode(i)&&t.$addNodeStyle(i),n.push(i)}return n}let p=null;function f(e,t){var n=i?(e._window||window).getSelection():null;if(!n)return!1;var o=n.anchorNode;if(n=n.focusNode,null!==o&&null!==n&&!r.isSelectionWithinEditor(e,o,n))return!1;if(t.preventDefault(),t=t.clipboardData,o=r.$getSelection(),null===t||null===o)return!1;n=l(e),e=a(e);let s="";return null!==o&&(s=o.getTextContent()),null!==n&&t.setData("text/html",n),null!==e&&t.setData("application/x-lexical-editor",e),t.setData("text/plain",s),!0}return rt.$generateJSONFromSelectedNodes=c,rt.$generateNodesFromSerializedNodes=d,rt.$getHtmlContent=l,rt.$getLexicalContent=a,rt.$insertDataTransferForPlainText=function(e,t){null!=(e=e.getData("text/plain")||e.getData("text/uri-list"))&&t.insertRawText(e)},rt.$insertDataTransferForRichText=function(t,n,o){var i=t.getData("application/x-lexical-editor");if(i)try{let e=JSON.parse(i);if(e.namespace===o._config.namespace&&Array.isArray(e.nodes)){return s(o,d(e.nodes),n)}}catch(e){}if(i=t.getData("text/html"))try{var l=(new DOMParser).parseFromString(i,"text/html"),a=e.$generateNodesFromDOM(o,l);return s(o,a,n)}catch(e){}if(null!=(t=t.getData("text/plain")||t.getData("text/uri-list")))if(r.$isRangeSelection(n))for(o=(t=t.split(/(\r?\n|\t)/)).length,l=0;l<o;l++)"\n"===(a=t[l])||"\r\n"===a?n.insertParagraph():"\t"===a?n.insertNodes([r.$createTabNode()]):n.insertText(a);else n.insertRawText(t)},rt.$insertGeneratedNodes=s,rt.copyToClipboard=async function(e,t){if(null!==p)return!1;if(null!==t)return new Promise((n=>{e.update((()=>{n(f(e,t))}))}));var o=e.getRootElement();let l=null==e._window?window.document:e._window.document,a=i?(e._window||window).getSelection():null;if(null===o||null===a)return!1;let s=l.createElement("span");return s.style.cssText="position: fixed; top: -1000px;",s.append(l.createTextNode("#")),o.append(s),(o=new Range).setStart(s,0),o.setEnd(s,1),a.removeAllRanges(),a.addRange(o),new Promise((t=>{let o=e.registerCommand(r.COPY_COMMAND,(r=>(n.objectKlassEquals(r,ClipboardEvent)&&(o(),null!==p&&(window.clearTimeout(p),p=null),t(f(e,r))),!0)),r.COMMAND_PRIORITY_CRITICAL);p=window.setTimeout((()=>{o(),p=null,t(!1)}),50),l.execCommand("copy"),s.remove()}))},rt}function at(){if(Xe)return nt;Xe=1;var e=function(){if(Je)return qe;Je=1;const e=lt();return qe=e}(),t=ee(),n=ne(),r=Z();function o(e,t){return void 0!==document.caretRangeFromPoint?null===(e=document.caretRangeFromPoint(e,t))?null:{node:e.startContainer,offset:e.startOffset}:"undefined"!==document.caretPositionFromPoint?null===(e=document.caretPositionFromPoint(e,t))?null:{node:e.offsetNode,offset:e.offset}:null}let i="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,l=i&&"documentMode"in document?document.documentMode:null,a=!(!i||!("InputEvent"in window)||l)&&"getTargetRanges"in new window.InputEvent("input"),s=i&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),u=i&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,c=i&&/^(?=.*Chrome).*/i.test(navigator.userAgent),d=i&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!c,p=r.createCommand("DRAG_DROP_PASTE_FILE");class f extends r.ElementNode{static getType(){return"quote"}static clone(e){return new f(e.__key)}constructor(e){super(e)}createDOM(e){let t=document.createElement("blockquote");return n.addClassNamesToElement(t,e.theme.quote),t}updateDOM(){return!1}static importDOM(){return{blockquote:()=>({conversion:b,priority:0})}}exportDOM(e){if(({element:e}=super.exportDOM(e)),e&&this.isEmpty()&&e.append(document.createElement("br")),e){var t=this.getFormatType();e.style.textAlign=t,(t=this.getDirection())&&(e.dir=t)}return{element:e}}static importJSON(e){let t=m();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(e,t){e=r.$createParagraphNode();let n=this.getDirection();return e.setDirection(n),this.insertAfter(e,t),e}collapseAtStart(){let e=r.$createParagraphNode();return this.getChildren().forEach((t=>e.append(t))),this.replace(e),!0}}function m(){return r.$applyNodeReplacement(new f)}class g extends r.ElementNode{static getType(){return"heading"}static clone(e){return new g(e.__tag,e.__key)}constructor(e,t){super(t),this.__tag=e}getTag(){return this.__tag}createDOM(e){let t=this.__tag,r=document.createElement(t);return void 0!==(e=e.theme.heading)&&n.addClassNamesToElement(r,e[t]),r}updateDOM(){return!1}static importDOM(){return{h1:()=>({conversion:v,priority:0}),h2:()=>({conversion:v,priority:0}),h3:()=>({conversion:v,priority:0}),h4:()=>({conversion:v,priority:0}),h5:()=>({conversion:v,priority:0}),h6:()=>({conversion:v,priority:0}),p:e=>null!==(e=e.firstChild)&&h(e)?{conversion:()=>({node:null}),priority:3}:null,span:e=>h(e)?{conversion:()=>({node:y("h1")}),priority:3}:null}}exportDOM(e){if(({element:e}=super.exportDOM(e)),e&&this.isEmpty()&&e.append(document.createElement("br")),e){var t=this.getFormatType();e.style.textAlign=t,(t=this.getDirection())&&(e.dir=t)}return{element:e}}static importJSON(e){let t=y(e.tag);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(e,t=!0){e=0<(e=e?e.anchor.offset:0)&&e<this.getTextContentSize()?y(this.getTag()):r.$createParagraphNode();let n=this.getDirection();return e.setDirection(n),this.insertAfter(e,t),e}collapseAtStart(){let e=this.isEmpty()?r.$createParagraphNode():y(this.getTag());return this.getChildren().forEach((t=>e.append(t))),this.replace(e),!0}extractWithChild(){return!0}}function h(e){return"span"===e.nodeName.toLowerCase()&&"26pt"===e.style.fontSize}function v(e){let t=e.nodeName.toLowerCase(),n=null;return"h1"!==t&&"h2"!==t&&"h3"!==t&&"h4"!==t&&"h5"!==t&&"h6"!==t||(n=y(t),null!==e.style&&n.setFormat(e.style.textAlign)),{node:n}}function b(e){let t=m();return null!==e.style&&t.setFormat(e.style.textAlign),{node:t}}function y(e){return r.$applyNodeReplacement(new g(e))}function x(e){let t=null;if(e instanceof DragEvent?t=e.dataTransfer:e instanceof ClipboardEvent&&(t=e.clipboardData),null===t)return[!1,[],!1];var n=t.types;return e=n.includes("Files"),n=n.includes("text/html")||n.includes("text/plain"),[e,Array.from(t.files),n]}function _(e){var t=r.$getSelection();if(!r.$isRangeSelection(t))return!1;let o=new Set;t=t.getNodes();for(let r=0;r<t.length;r++){var i=t[r],l=i.getKey();o.has(l)||(l=(i=n.$getNearestBlockElementAncestorOrThrow(i)).getKey(),i.canIndent()&&!o.has(l)&&(o.add(l),e(i)))}return 0<o.size}function E(e){return e=r.$getNearestNodeFromDOMNode(e),r.$isDecoratorNode(e)}return nt.$createHeadingNode=y,nt.$createQuoteNode=m,nt.$isHeadingNode=function(e){return e instanceof g},nt.$isQuoteNode=function(e){return e instanceof f},nt.DRAG_DROP_PASTE=p,nt.HeadingNode=g,nt.QuoteNode=f,nt.eventFiles=x,nt.registerRichText=function(i){return n.mergeRegister(i.registerCommand(r.CLICK_COMMAND,(()=>{const e=r.$getSelection();return!!r.$isNodeSelection(e)&&(e.clear(),!0)}),0),i.registerCommand(r.DELETE_CHARACTER_COMMAND,(e=>{const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(t.deleteCharacter(e),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.DELETE_WORD_COMMAND,(e=>{const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(t.deleteWord(e),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.DELETE_LINE_COMMAND,(e=>{const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(t.deleteLine(e),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.CONTROLLED_TEXT_INSERTION_COMMAND,(t=>{const n=r.$getSelection();if("string"==typeof t)r.$isRangeSelection(n)?n.insertText(t):r.DEPRECATED_$isGridSelection(n);else{if(!r.$isRangeSelection(n)&&!r.DEPRECATED_$isGridSelection(n))return!1;const o=t.dataTransfer;null!=o?e.$insertDataTransferForRichText(o,n,i):r.$isRangeSelection(n)&&(t=t.data)&&n.insertText(t)}return!0}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.REMOVE_TEXT_COMMAND,(()=>{const e=r.$getSelection();return!!r.$isRangeSelection(e)&&(e.removeText(),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.FORMAT_TEXT_COMMAND,(e=>{const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(t.formatText(e),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.FORMAT_ELEMENT_COMMAND,(e=>{var t=r.$getSelection();if(!r.$isRangeSelection(t)&&!r.$isNodeSelection(t))return!1;t=t.getNodes();for(const o of t)t=n.$findMatchingParent(o,(e=>r.$isElementNode(e)&&!e.isInline())),null!==t&&t.setFormat(e);return!0}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.INSERT_LINE_BREAK_COMMAND,(e=>{const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(t.insertLineBreak(e),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.INSERT_PARAGRAPH_COMMAND,(()=>{const e=r.$getSelection();return!!r.$isRangeSelection(e)&&(e.insertParagraph(),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.INSERT_TAB_COMMAND,(()=>(r.$insertNodes([r.$createTabNode()]),!0)),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.INDENT_CONTENT_COMMAND,(()=>_((e=>{const t=e.getIndent();e.setIndent(t+1)}))),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.OUTDENT_CONTENT_COMMAND,(()=>_((e=>{const t=e.getIndent();0<t&&e.setIndent(t-1)}))),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_ARROW_UP_COMMAND,(e=>{var t=r.$getSelection();if(r.$isNodeSelection(t)&&!E(e.target)){if(0<(e=t.getNodes()).length)return e[0].selectPrevious(),!0}else if(r.$isRangeSelection(t)&&(t=r.$getAdjacentNode(t.focus,!0),!e.shiftKey&&r.$isDecoratorNode(t)&&!t.isIsolated()&&!t.isInline()))return t.selectPrevious(),e.preventDefault(),!0;return!1}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_ARROW_DOWN_COMMAND,(e=>{var t=r.$getSelection();if(r.$isNodeSelection(t)){if(0<(e=t.getNodes()).length)return e[0].selectNext(0,0),!0}else if(r.$isRangeSelection(t)){let n=t.focus;if("root"===n.key&&n.offset===r.$getRoot().getChildrenSize())return e.preventDefault(),!0;if(t=r.$getAdjacentNode(t.focus,!1),!e.shiftKey&&r.$isDecoratorNode(t)&&!t.isIsolated()&&!t.isInline())return t.selectNext(),e.preventDefault(),!0}return!1}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_ARROW_LEFT_COMMAND,(e=>{const n=r.$getSelection();if(r.$isNodeSelection(n)){var o=n.getNodes();if(0<o.length)return e.preventDefault(),o[0].selectPrevious(),!0}return!!r.$isRangeSelection(n)&&(!!t.$shouldOverrideDefaultCharacterSelection(n,!0)&&(o=e.shiftKey,e.preventDefault(),t.$moveCharacter(n,o,!0),!0))}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_ARROW_RIGHT_COMMAND,(e=>{const n=r.$getSelection();if(r.$isNodeSelection(n)&&!E(e.target)){var o=n.getNodes();if(0<o.length)return e.preventDefault(),o[0].selectNext(0,0),!0}return!!r.$isRangeSelection(n)&&(o=e.shiftKey,!!t.$shouldOverrideDefaultCharacterSelection(n,!1)&&(e.preventDefault(),t.$moveCharacter(n,o,!1),!0))}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_BACKSPACE_COMMAND,(e=>{if(E(e.target))return!1;const t=r.$getSelection();if(!r.$isRangeSelection(t))return!1;e.preventDefault(),({anchor:e}=t);const o=e.getNode();return t.isCollapsed()&&0===e.offset&&!r.$isRootNode(o)&&0<n.$getNearestBlockElementAncestorOrThrow(o).getIndent()?i.dispatchCommand(r.OUTDENT_CONTENT_COMMAND,void 0):i.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_DELETE_COMMAND,(e=>{if(E(e.target))return!1;const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(e.preventDefault(),i.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!1))}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_ENTER_COMMAND,(e=>{const t=r.$getSelection();if(!r.$isRangeSelection(t))return!1;if(null!==e){if((u||s||d)&&a)return!1;if(e.preventDefault(),e.shiftKey)return i.dispatchCommand(r.INSERT_LINE_BREAK_COMMAND,!1)}return i.dispatchCommand(r.INSERT_PARAGRAPH_COMMAND,void 0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_ESCAPE_COMMAND,(()=>{const e=r.$getSelection();return!!r.$isRangeSelection(e)&&(i.blur(),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.DROP_COMMAND,(e=>{const[,t]=x(e);if(0<t.length){var n=o(e.clientX,e.clientY);if(null!==n){const{offset:e,node:o}=n;var l=r.$getNearestNodeFromDOMNode(o);if(null!==l){if(n=r.$createRangeSelection(),r.$isTextNode(l))n.anchor.set(l.getKey(),e,"text"),n.focus.set(l.getKey(),e,"text");else{const e=l.getParentOrThrow().getKey();l=l.getIndexWithinParent()+1,n.anchor.set(e,l,"element"),n.focus.set(e,l,"element")}n=r.$normalizeSelection__EXPERIMENTAL(n),r.$setSelection(n)}i.dispatchCommand(p,t)}return e.preventDefault(),!0}return e=r.$getSelection(),!!r.$isRangeSelection(e)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.DRAGSTART_COMMAND,(e=>{[e]=x(e);const t=r.$getSelection();return!(e&&!r.$isRangeSelection(t))}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.DRAGOVER_COMMAND,(e=>{var[t]=x(e);const n=r.$getSelection();return!(t&&!r.$isRangeSelection(n))&&(null!==(t=o(e.clientX,e.clientY))&&(t=r.$getNearestNodeFromDOMNode(t.node),r.$isDecoratorNode(t)&&e.preventDefault()),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.COPY_COMMAND,(t=>(e.copyToClipboard(i,n.objectKlassEquals(t,ClipboardEvent)?t:null),!0)),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.CUT_COMMAND,(t=>(async function(t,o){await e.copyToClipboard(o,n.objectKlassEquals(t,ClipboardEvent)?t:null),o.update((()=>{let e=r.$getSelection();r.$isRangeSelection(e)?e.removeText():r.$isNodeSelection(e)&&e.getNodes().forEach((e=>e.remove()))}))}(t,i),!0)),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.PASTE_COMMAND,(t=>{const[,n,o]=x(t);if(0<n.length&&!o)return i.dispatchCommand(p,n),!0;if(r.isSelectionCapturedInDecoratorInput(t.target))return!1;const l=r.$getSelection();return!(!r.$isRangeSelection(l)&&!r.DEPRECATED_$isGridSelection(l))&&(function(t,n){t.preventDefault(),n.update((()=>{let o=r.$getSelection(),i=t instanceof InputEvent||t instanceof KeyboardEvent?null:t.clipboardData;null!=i&&(r.$isRangeSelection(o)||r.DEPRECATED_$isGridSelection(o))&&e.$insertDataTransferForRichText(i,o,n)}),{tag:"paste"})}(t,i),!0)}),r.COMMAND_PRIORITY_EDITOR))},nt}function st(){if(et)return Ze;et=1;const e=at();return Ze=e}var ut,ct,dt,pt=st(),ft={};function mt(){if(ut)return ft;ut=1;var e=re(),t=_e(),n=ne(),r=Z(),o=h;function i(e,t){for(let n=0;n<t.length;n++){let r=t[n](e);if(r)return r}return null}let l=/[.,;\s]/;function a(e){var t;return e=e.getPreviousSibling(),r.$isElementNode(e)&&(e=e.getLastDescendant()),!(t=null===e||r.$isLineBreakNode(e))&&(t=r.$isTextNode(e))&&(e=e.getTextContent(),t=l.test(e[e.length-1])),t}function s(e){return e=e.getNextSibling(),r.$isElementNode(e)&&(e=e.getFirstDescendant()),null===e||r.$isLineBreakNode(e)||r.$isTextNode(e)&&l.test(e.getTextContent()[0])}function u(e,t,n){var o=e.getChildren();let l=o.length;for(let t=0;t<l;t++){let i=o[t];if(!r.$isTextNode(i)||!i.isSimpleText())return c(e),void n(null,e.getURL())}null===(t=i(o=e.getTextContent(),t))||t.text!==o?(c(e),n(null,e.getURL())):a(e)&&s(e)?((o=e.getURL())!==t.url&&(e.setURL(t.url),n(t.url,o)),t.attributes&&((o=e.getRel())!==t.attributes.rel&&(e.setRel(t.attributes.rel||null),n(t.attributes.rel||null,o)),(o=e.getTarget())!==t.attributes.target&&(e.setTarget(t.attributes.target||null),n(t.attributes.target||null,o)))):(c(e),n(null,e.getURL()))}function c(e){let t=e.getChildren();var n=t.length;for(--n;0<=n;n--)e.insertAfter(t[n]);return e.remove(),t.map((e=>e.getLatest()))}function d(t,d,p){o.useEffect((()=>{t.hasNodes([e.AutoLinkNode])||function(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(77);let o=(e,t)=>{p&&p(e,t)};return n.mergeRegister(t.registerNodeTransform(r.TextNode,(t=>{var n=t.getParentOrThrow(),f=t.getPreviousSibling();if(e.$isAutoLinkNode(n))u(n,d,o);else if(!e.$isLinkNode(n)){if(t.isSimpleText()&&(l.test(t.getTextContent()[0])||!e.$isAutoLinkNode(f))){f=n=t.getTextContent();let o=0,u=t;for(var m;(m=i(f,d))&&null!==m;){let i=m.index,c=m.length,d=i+c;var g=o+i,h=o+d,v=n,b=t;if((0<g?l.test(v[g-1]):a(b))&&(h<v.length?l.test(v[h]):s(b))){var y=void 0;0===o+i?[y,u]=u.splitText(o+c):[,y,u]=u.splitText(o+i,o+i+c),g=e.$createAutoLinkNode(m.url,m.attributes),(h=r.$createTextNode(m.text)).setFormat(y.getFormat()),h.setDetail(y.getDetail()),g.append(h),y.replace(g),p&&p(m.url,null),o=0}else o+=d;f=f.substring(d)}}n=t.getPreviousSibling(),m=t.getNextSibling(),y=t.getTextContent(),e.$isAutoLinkNode(n)&&!l.test(y[0])&&(n.append(t),u(n,d,o),t=n.getURL(),p&&p(null,t)),e.$isAutoLinkNode(m)&&!l.test(y[y.length-1])&&(c(m),u(m,d,o),t=m.getURL(),p&&p(null,t))}})))}),[t,d,p])}return ft.AutoLinkPlugin=function({matchers:e,onChange:n}){let[r]=t.useLexicalComposerContext();return d(r,e,n),null},ft.createLinkMatcherWithRegExp=function(e,t=e=>e){return n=>{let r=e.exec(n);return null===r?null:{index:r.index,length:r[0].length,text:r[0],url:t(n)}}},ft}var gt,ht,vt,bt,yt=function(){if(dt)return ct;dt=1;const e=mt();return ct=e}(),xt=_e();function _t(){if(ht)return gt;ht=1;var e=_e(),t=h,n="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?t.useLayoutEffect:t.useEffect;function r(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}return gt=function(){return function(r){let[o]=e.useLexicalComposerContext(),i=t.useMemo((()=>r(o)),[o,r]),l=t.useRef(i.initialValueFn()),[a,s]=t.useState(l.current);return n((()=>{let{initialValueFn:e,subscribe:t}=i,n=e();return l.current!==n&&(l.current=n,s(n)),t((e=>{l.current=e,s(e)}))}),[i,r]),a}(r)},gt}function Et(){if(bt)return vt;bt=1;const e=_t();return vt=e}var Ct=R(Et()),St=ne(),wt=Z(),kt=ee();const Tt={black:"#000",white:"#fff"},At="#e57373",Nt="#ef5350",Rt="#f44336",Ot="#d32f2f",Mt="#c62828",Lt="#f3e5f5",Pt="#ce93d8",It="#ba68c8",Dt="#ab47bc",$t="#9c27b0",zt="#7b1fa2",Bt="#e3f2fd",Ft="#90caf9",Ht="#42a5f5",jt="#1976d2",Wt="#1565c0",Kt="#4fc3f7",Gt="#29b6f6",Yt="#03a9f4",Ut="#0288d1",Vt="#01579b",Qt="#81c784",qt="#66bb6a",Jt="#4caf50",Xt="#388e3c",Zt="#2e7d32",en="#1b5e20",tn="#ffb74d",nn="#ffa726",rn="#ff9800",on="#f57c00",ln="#e65100",an={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function sn(){return sn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sn.apply(null,arguments)}function un(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function cn(e){if(!un(e))return e;const t={};return Object.keys(e).forEach((n=>{t[n]=cn(e[n])})),t}function dn(e,t,n={clone:!0}){const r=n.clone?sn({},e):e;return un(e)&&un(t)&&Object.keys(t).forEach((o=>{un(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&un(e[o])?r[o]=dn(e[o],t[o],n):n.clone?r[o]=un(t[o])?cn(t[o]):t[o]:r[o]=t[o]})),r}function pn(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}var fn,mn,gn={exports:{}},hn={};function vn(e){if("string"!=typeof e)throw new Error(pn(7));return e.charAt(0).toUpperCase()+e.slice(1)}function bn(e){return e&&e.ownerDocument||document}function yn(e){return bn(e).defaultView||window}function xn(e,t){"function"==typeof e?e(t):e&&(e.current=t)}mn||(mn=1,gn.exports=function(){if(fn)return hn;fn=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function g(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:switch(e=e.type){case r:case i:case o:case c:case d:return e;default:switch(e=e&&e.$$typeof){case s:case a:case u:case f:case p:case l:return e;default:return m}}case n:return m}}}return e=Symbol.for("react.module.reference"),hn.ContextConsumer=a,hn.ContextProvider=l,hn.Element=t,hn.ForwardRef=u,hn.Fragment=r,hn.Lazy=f,hn.Memo=p,hn.Portal=n,hn.Profiler=i,hn.StrictMode=o,hn.Suspense=c,hn.SuspenseList=d,hn.isAsyncMode=function(){return!1},hn.isConcurrentMode=function(){return!1},hn.isContextConsumer=function(e){return g(e)===a},hn.isContextProvider=function(e){return g(e)===l},hn.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},hn.isForwardRef=function(e){return g(e)===u},hn.isFragment=function(e){return g(e)===r},hn.isLazy=function(e){return g(e)===f},hn.isMemo=function(e){return g(e)===p},hn.isPortal=function(e){return g(e)===n},hn.isProfiler=function(e){return g(e)===i},hn.isStrictMode=function(e){return g(e)===o},hn.isSuspense=function(e){return g(e)===c},hn.isSuspenseList=function(e){return g(e)===d},hn.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===i||t===o||t===c||t===d||t===m||"object"==typeof t&&null!==t&&(t.$$typeof===f||t.$$typeof===p||t.$$typeof===l||t.$$typeof===a||t.$$typeof===u||t.$$typeof===e||void 0!==t.getModuleId)},hn.typeOf=g,hn}()),gn.exports;const _n="undefined"!=typeof window?v.useLayoutEffect:v.useEffect;let En=0;const Cn=v["useId".toString()];function Sn(e){if(void 0!==Cn){const t=Cn();return null!=e?e:t}return function(e){const[t,n]=v.useState(e),r=e||t;return v.useEffect((()=>{null==t&&(En+=1,n(`mui-${En}`))}),[t]),r}(e)}function wn(e){const t=v.useRef(e);return _n((()=>{t.current=e})),v.useRef(((...e)=>(0,t.current)(...e))).current}function kn(...e){return v.useMemo((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{xn(e,t)}))}),e)}class Tn{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Tn}start(e,t){this.clear(),this.currentId=setTimeout((()=>{this.currentId=null,t()}),e)}}let An=!0,Nn=!1;const Rn=new Tn,On={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function Mn(e){e.metaKey||e.altKey||e.ctrlKey||(An=!0)}function Ln(){An=!1}function Pn(){"hidden"===this.visibilityState&&Nn&&(An=!0)}function In(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(e){}return An||function(e){const{type:t,tagName:n}=e;return!("INPUT"!==n||!On[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function Dn(){const e=v.useCallback((e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",Mn,!0),t.addEventListener("mousedown",Ln,!0),t.addEventListener("pointerdown",Ln,!0),t.addEventListener("touchstart",Ln,!0),t.addEventListener("visibilitychange",Pn,!0))}),[]),t=v.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!In(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(Nn=!0,Rn.start(100,(()=>{Nn=!1})),t.current=!1,!0)},ref:e}}function $n(e,t){const n=sn({},t);return Object.keys(e).forEach((r=>{if(r.toString().match(/^(components|slots)$/))n[r]=sn({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const o=e[r]||{},i=t[r];n[r]={},i&&Object.keys(i)?o&&Object.keys(o)?(n[r]=sn({},i),Object.keys(o).forEach((e=>{n[r][e]=$n(o[e],i[e])}))):n[r]=i:n[r]=o}else void 0===n[r]&&(n[r]=e[r])})),n}function zn(e,t,n=void 0){const r={};return Object.keys(e).forEach((o=>{r[o]=e[o].reduce(((e,r)=>{if(r){const o=t(r);""!==o&&e.push(o),n&&n[r]&&e.push(n[r])}return e}),[]).join(" ")})),r}const Bn=e=>e,Fn=(()=>{let e=Bn;return{configure(t){e=t},generate:t=>e(t),reset(){e=Bn}}})(),Hn={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function jn(e,t,n="Mui"){const r=Hn[t];return r?`${n}-${r}`:`${Fn.generate(e)}-${t}`}function Wn(e,t,n="Mui"){const r={};return t.forEach((t=>{r[t]=jn(e,t,n)})),r}function Kn(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function Gn(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Gn(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Yn(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Gn(e))&&(r&&(r+=" "),r+=t);return r}var Un="$$material";function Vn(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Qn=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,qn=Vn((function(e){return Qn.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));var Jn=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)})),this.tags=[],this.ctr=0},e}(),Xn="-ms-",Zn="-moz-",er="-webkit-",tr="comm",nr="rule",rr="decl",or="@keyframes",ir=Math.abs,lr=String.fromCharCode,ar=Object.assign;function sr(e){return e.trim()}function ur(e,t,n){return e.replace(t,n)}function cr(e,t){return e.indexOf(t)}function dr(e,t){return 0|e.charCodeAt(t)}function pr(e,t,n){return e.slice(t,n)}function fr(e){return e.length}function mr(e){return e.length}function gr(e,t){return t.push(e),e}var hr=1,vr=1,br=0,yr=0,xr=0,_r="";function Er(e,t,n,r,o,i,l){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:hr,column:vr,length:l,return:""}}function Cr(e,t){return ar(Er("",null,null,"",null,null,0),e,{length:-e.length},t)}function Sr(){return xr=yr>0?dr(_r,--yr):0,vr--,10===xr&&(vr=1,hr--),xr}function wr(){return xr=yr<br?dr(_r,yr++):0,vr++,10===xr&&(vr=1,hr++),xr}function kr(){return dr(_r,yr)}function Tr(){return yr}function Ar(e,t){return pr(_r,e,t)}function Nr(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Rr(e){return hr=vr=1,br=fr(_r=e),yr=0,[]}function Or(e){return _r="",e}function Mr(e){return sr(Ar(yr-1,Ir(91===e?e+2:40===e?e+1:e)))}function Lr(e){for(;(xr=kr())&&xr<33;)wr();return Nr(e)>2||Nr(xr)>3?"":" "}function Pr(e,t){for(;--t&&wr()&&!(xr<48||xr>102||xr>57&&xr<65||xr>70&&xr<97););return Ar(e,Tr()+(t<6&&32==kr()&&32==wr()))}function Ir(e){for(;wr();)switch(xr){case e:return yr;case 34:case 39:34!==e&&39!==e&&Ir(xr);break;case 40:41===e&&Ir(e);break;case 92:wr()}return yr}function Dr(e,t){for(;wr()&&e+xr!==57&&(e+xr!==84||47!==kr()););return"/*"+Ar(t,yr-1)+"*"+lr(47===e?e:wr())}function $r(e){for(;!Nr(kr());)wr();return Ar(e,yr)}function zr(e){return Or(Br("",null,null,null,[""],e=Rr(e),0,[0],e))}function Br(e,t,n,r,o,i,l,a,s){for(var u=0,c=0,d=l,p=0,f=0,m=0,g=1,h=1,v=1,b=0,y="",x=o,_=i,E=r,C=y;h;)switch(m=b,b=wr()){case 40:if(108!=m&&58==dr(C,d-1)){-1!=cr(C+=ur(Mr(b),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:C+=Mr(b);break;case 9:case 10:case 13:case 32:C+=Lr(m);break;case 92:C+=Pr(Tr()-1,7);continue;case 47:switch(kr()){case 42:case 47:gr(Hr(Dr(wr(),Tr()),t,n),s);break;default:C+="/"}break;case 123*g:a[u++]=fr(C)*v;case 125*g:case 59:case 0:switch(b){case 0:case 125:h=0;case 59+c:-1==v&&(C=ur(C,/\f/g,"")),f>0&&fr(C)-d&&gr(f>32?jr(C+";",r,n,d-1):jr(ur(C," ","")+";",r,n,d-2),s);break;case 59:C+=";";default:if(gr(E=Fr(C,t,n,u,c,o,a,y,x=[],_=[],d),i),123===b)if(0===c)Br(C,t,E,E,x,i,d,a,_);else switch(99===p&&110===dr(C,3)?100:p){case 100:case 108:case 109:case 115:Br(e,E,E,r&&gr(Fr(e,E,E,0,0,o,a,y,o,x=[],d),_),o,_,d,a,r?x:_);break;default:Br(C,E,E,E,[""],_,0,a,_)}}u=c=f=0,g=v=1,y=C="",d=l;break;case 58:d=1+fr(C),f=m;default:if(g<1)if(123==b)--g;else if(125==b&&0==g++&&125==Sr())continue;switch(C+=lr(b),b*g){case 38:v=c>0?1:(C+="\f",-1);break;case 44:a[u++]=(fr(C)-1)*v,v=1;break;case 64:45===kr()&&(C+=Mr(wr())),p=kr(),c=d=fr(y=C+=$r(Tr())),b++;break;case 45:45===m&&2==fr(C)&&(g=0)}}return i}function Fr(e,t,n,r,o,i,l,a,s,u,c){for(var d=o-1,p=0===o?i:[""],f=mr(p),m=0,g=0,h=0;m<r;++m)for(var v=0,b=pr(e,d+1,d=ir(g=l[m])),y=e;v<f;++v)(y=sr(g>0?p[v]+" "+b:ur(b,/&\f/g,p[v])))&&(s[h++]=y);return Er(e,t,n,0===o?nr:a,s,u,c)}function Hr(e,t,n){return Er(e,t,n,tr,lr(xr),pr(e,2,-2),0)}function jr(e,t,n,r){return Er(e,t,n,rr,pr(e,0,r),pr(e,r+1,-1),r)}function Wr(e,t){for(var n="",r=mr(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Kr(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case rr:return e.return=e.return||e.value;case tr:return"";case or:return e.return=e.value+"{"+Wr(e.children,r)+"}";case nr:e.value=e.props.join(",")}return fr(n=Wr(e.children,r))?e.return=e.value+"{"+n+"}":""}var Gr=function(e,t,n){for(var r=0,o=0;r=o,o=kr(),38===r&&12===o&&(t[n]=1),!Nr(o);)wr();return Ar(e,yr)},Yr=function(e,t){return Or(function(e,t){var n=-1,r=44;do{switch(Nr(r)){case 0:38===r&&12===kr()&&(t[n]=1),e[n]+=Gr(yr-1,t,n);break;case 2:e[n]+=Mr(r);break;case 4:if(44===r){e[++n]=58===kr()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=lr(r)}}while(r=wr());return e}(Rr(e),t))},Ur=new WeakMap,Vr=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Ur.get(n))&&!r){Ur.set(e,!0);for(var o=[],i=Yr(t,o),l=n.props,a=0,s=0;a<i.length;a++)for(var u=0;u<l.length;u++,s++)e.props[s]=o[a]?i[a].replace(/&\f/g,l[u]):l[u]+" "+i[a]}}},Qr=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function qr(e,t){switch(function(e,t){return 45^dr(e,0)?(((t<<2^dr(e,0))<<2^dr(e,1))<<2^dr(e,2))<<2^dr(e,3):0}(e,t)){case 5103:return er+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return er+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return er+e+Zn+e+Xn+e+e;case 6828:case 4268:return er+e+Xn+e+e;case 6165:return er+e+Xn+"flex-"+e+e;case 5187:return er+e+ur(e,/(\w+).+(:[^]+)/,er+"box-$1$2"+Xn+"flex-$1$2")+e;case 5443:return er+e+Xn+"flex-item-"+ur(e,/flex-|-self/,"")+e;case 4675:return er+e+Xn+"flex-line-pack"+ur(e,/align-content|flex-|-self/,"")+e;case 5548:return er+e+Xn+ur(e,"shrink","negative")+e;case 5292:return er+e+Xn+ur(e,"basis","preferred-size")+e;case 6060:return er+"box-"+ur(e,"-grow","")+er+e+Xn+ur(e,"grow","positive")+e;case 4554:return er+ur(e,/([^-])(transform)/g,"$1"+er+"$2")+e;case 6187:return ur(ur(ur(e,/(zoom-|grab)/,er+"$1"),/(image-set)/,er+"$1"),e,"")+e;case 5495:case 3959:return ur(e,/(image-set\([^]*)/,er+"$1$`$1");case 4968:return ur(ur(e,/(.+:)(flex-)?(.*)/,er+"box-pack:$3"+Xn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+er+e+e;case 4095:case 3583:case 4068:case 2532:return ur(e,/(.+)-inline(.+)/,er+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(fr(e)-1-t>6)switch(dr(e,t+1)){case 109:if(45!==dr(e,t+4))break;case 102:return ur(e,/(.+:)(.+)-([^]+)/,"$1"+er+"$2-$3$1"+Zn+(108==dr(e,t+3)?"$3":"$2-$3"))+e;case 115:return~cr(e,"stretch")?qr(ur(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==dr(e,t+1))break;case 6444:switch(dr(e,fr(e)-3-(~cr(e,"!important")&&10))){case 107:return ur(e,":",":"+er)+e;case 101:return ur(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+er+(45===dr(e,14)?"inline-":"")+"box$3$1"+er+"$2$3$1"+Xn+"$2box$3")+e}break;case 5936:switch(dr(e,t+11)){case 114:return er+e+Xn+ur(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return er+e+Xn+ur(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return er+e+Xn+ur(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return er+e+Xn+e+e}return e}var Jr,Xr,Zr,eo,to=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case rr:e.return=qr(e.value,e.length);break;case or:return Wr([Cr(e,{value:ur(e.value,"@","@"+er)})],r);case nr:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Wr([Cr(e,{props:[ur(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Wr([Cr(e,{props:[ur(t,/:(plac\w+)/,":"+er+"input-$1")]}),Cr(e,{props:[ur(t,/:(plac\w+)/,":-moz-$1")]}),Cr(e,{props:[ur(t,/:(plac\w+)/,Xn+"input-$1")]})],r)}return""}))}}],no=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,o,i=e.stylisPlugins||to,l={},a=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)l[t[n]]=!0;a.push(e)}));var s,u,c=[Kr,(u=function(e){s.insert(e)},function(e){e.root||(e=e.return)&&u(e)})],d=function(e){var t=mr(e);return function(n,r,o,i){for(var l="",a=0;a<t;a++)l+=e[a](n,r,o,i)||"";return l}}([Vr,Qr].concat(i,c));o=function(e,t,n,r){s=n,function(e){Wr(zr(e),d)}(e?e+"{"+t.styles+"}":t.styles),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new Jn({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:l,registered:{},insert:o};return p.sheet.hydrate(a),p},ro={exports:{}},oo={};function io(){return Xr||(Xr=1,ro.exports=function(){if(Jr)return oo;Jr=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case s:case u:case r:case i:case o:case d:return e;default:switch(e=e&&e.$$typeof){case a:case c:case m:case f:case l:return e;default:return p}}case n:return p}}}function x(e){return y(e)===u}return oo.AsyncMode=s,oo.ConcurrentMode=u,oo.ContextConsumer=a,oo.ContextProvider=l,oo.Element=t,oo.ForwardRef=c,oo.Fragment=r,oo.Lazy=m,oo.Memo=f,oo.Portal=n,oo.Profiler=i,oo.StrictMode=o,oo.Suspense=d,oo.isAsyncMode=function(e){return x(e)||y(e)===s},oo.isConcurrentMode=x,oo.isContextConsumer=function(e){return y(e)===a},oo.isContextProvider=function(e){return y(e)===l},oo.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},oo.isForwardRef=function(e){return y(e)===c},oo.isFragment=function(e){return y(e)===r},oo.isLazy=function(e){return y(e)===m},oo.isMemo=function(e){return y(e)===f},oo.isPortal=function(e){return y(e)===n},oo.isProfiler=function(e){return y(e)===i},oo.isStrictMode=function(e){return y(e)===o},oo.isSuspense=function(e){return y(e)===d},oo.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===i||e===o||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===f||e.$$typeof===l||e.$$typeof===a||e.$$typeof===c||e.$$typeof===h||e.$$typeof===v||e.$$typeof===b||e.$$typeof===g)},oo.typeOf=y,oo}()),ro.exports}!function(){if(eo)return Zr;eo=1;var e=io(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};function i(n){return e.isMemo(n)?r:o[n.$$typeof]||t}o[e.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o[e.Memo]=r;var l=Object.defineProperty,a=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,c=Object.getPrototypeOf,d=Object.prototype;Zr=function e(t,r,o){if("string"!=typeof r){if(d){var p=c(r);p&&p!==d&&e(t,p,o)}var f=a(r);s&&(f=f.concat(s(r)));for(var m=i(t),g=i(r),h=0;h<f.length;++h){var v=f[h];if(!(n[v]||o&&o[v]||g&&g[v]||m&&m[v])){var b=u(r,v);try{l(t,v,b)}catch(e){}}}}return t}}();var lo=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},ao=function(e,t,n){lo(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}};var so={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},uo=/[A-Z]|^ms/g,co=/_EMO_([^_]+?)_([^]*?)_EMO_/g,po=function(e){return 45===e.charCodeAt(1)},fo=function(e){return null!=e&&"boolean"!=typeof e},mo=Vn((function(e){return po(e)?e:e.replace(uo,"-$&").toLowerCase()})),go=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(co,(function(e,t,n){return vo={name:t,styles:n,next:vo},t}))}return 1===so[e]||po(e)||"number"!=typeof t||0===t?t:t+"px"};function ho(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return vo={name:o.name,styles:o.styles,next:vo},o.name;var i=n;if(void 0!==i.styles){var l=i.next;if(void 0!==l)for(;void 0!==l;)vo={name:l.name,styles:l.styles,next:vo},l=l.next;return i.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=ho(e,t,n[o])+";";else for(var i in n){var l=n[i];if("object"!=typeof l){var a=l;null!=t&&void 0!==t[a]?r+=i+"{"+t[a]+"}":fo(a)&&(r+=mo(i)+":"+go(i,a)+";")}else if(!Array.isArray(l)||"string"!=typeof l[0]||null!=t&&void 0!==t[l[0]]){var s=ho(e,t,l);switch(i){case"animation":case"animationName":r+=mo(i)+":"+s+";";break;default:r+=i+"{"+s+"}"}}else for(var u=0;u<l.length;u++)fo(l[u])&&(r+=mo(i)+":"+go(i,l[u])+";")}return r}(e,t,n);case"function":if(void 0!==e){var a=vo,s=n(e);return vo=a,ho(e,t,s)}}var u=n;if(null==t)return u;var c=t[u];return void 0!==c?c:u}var vo,bo=/label:\s*([^\s;{]+)\s*(;|$)/g;function yo(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";vo=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=ho(n,t,i)):o+=i[0];for(var l=1;l<e.length;l++){if(o+=ho(n,t,e[l]),r)o+=i[l]}bo.lastIndex=0;for(var a,s="";null!==(a=bo.exec(o));)s+="-"+a[1];var u=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+s;return{name:u,styles:o,next:vo}}var xo=!!v.useInsertionEffect&&v.useInsertionEffect,_o=xo||function(e){return e()},Eo=xo||v.useLayoutEffect,Co=v.createContext("undefined"!=typeof HTMLElement?no({key:"css"}):null);Co.Provider;var So=function(e){return b((function(t,n){var r=y(Co);return e(t,r,n)}))},wo=v.createContext({}),ko=So((function(e,t){var n=yo([e.styles],void 0,v.useContext(wo)),r=v.useRef();return Eo((function(){var e=t.key+"-global",o=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),i=!1,l=document.querySelector('style[data-emotion="'+e+" "+n.name+'"]');return t.sheet.tags.length&&(o.before=t.sheet.tags[0]),null!==l&&(i=!0,l.setAttribute("data-emotion",e),o.hydrate([l])),r.current=[o,i],function(){o.flush()}}),[t]),Eo((function(){var e=r.current,o=e[0];if(e[1])e[1]=!1;else{if(void 0!==n.next&&ao(t,n.next,!0),o.tags.length){var i=o.tags[o.tags.length-1].nextElementSibling;o.before=i,o.flush()}t.insert("",n,o,!1)}}),[t,n.name]),null}));function To(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return yo(t)}var Ao=function(){var e=To.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},No=qn,Ro=function(e){return"theme"!==e},Oo=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?No:Ro},Mo=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},Lo=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return lo(t,n,r),_o((function(){return ao(t,n,r)})),null},Po=function e(t,n){var r,o,i=t.__emotion_real===t,l=i&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var a=Mo(t,n,i),s=a||Oo(l),u=!s("as");return function(){var c=arguments,d=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==c[0]||void 0===c[0].raw)d.push.apply(d,c);else{d.push(c[0][0]);for(var p=c.length,f=1;f<p;f++)d.push(c[f],c[0][f])}var m=So((function(e,t,n){var r,i,c,p,f=u&&e.as||l,m="",g=[],h=e;if(null==e.theme){for(var b in h={},e)h[b]=e[b];h.theme=v.useContext(wo)}"string"==typeof e.className?(r=t.registered,i=g,c=e.className,p="",c.split(" ").forEach((function(e){void 0!==r[e]?i.push(r[e]+";"):e&&(p+=e+" ")})),m=p):null!=e.className&&(m=e.className+" ");var y=yo(d.concat(g),t.registered,h);m+=t.key+"-"+y.name,void 0!==o&&(m+=" "+o);var x=u&&void 0===a?Oo(f):s,_={};for(var E in e)u&&"as"===E||x(E)&&(_[E]=e[E]);return _.className=m,_.ref=n,v.createElement(v.Fragment,null,v.createElement(Lo,{cache:t,serialized:y,isStringTag:"string"==typeof f}),v.createElement(f,_))}));return m.displayName=void 0!==r?r:"Styled("+("string"==typeof l?l:l.displayName||l.name||"Component")+")",m.defaultProps=t.defaultProps,m.__emotion_real=m,m.__emotion_base=l,m.__emotion_styles=d,m.__emotion_forwardProp=a,Object.defineProperty(m,"toString",{value:function(){return"."+o}}),m.withComponent=function(t,r){return e(t,sn({},n,r,{shouldForwardProp:Mo(m,r,!0)})).apply(void 0,d)},m}}.bind();["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){Po[e]=Po(e)}));var Io,Do,$o={exports:{}},zo={};var Bo=(Do||(Do=1,$o.exports=function(){if(Io)return zo;Io=1;var e=h,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function l(e,n,l){var a,s={},u=null,c=null;for(a in void 0!==l&&(u=""+l),void 0!==n.key&&(u=""+n.key),void 0!==n.ref&&(c=n.ref),n)r.call(n,a)&&!i.hasOwnProperty(a)&&(s[a]=n[a]);if(e&&e.defaultProps)for(a in n=e.defaultProps)void 0===s[a]&&(s[a]=n[a]);return{$$typeof:t,type:e,key:u,ref:c,props:s,_owner:o.current}}return zo.Fragment=n,zo.jsx=l,zo.jsxs=l,zo}()),$o.exports);function Fo(e){const{styles:t,defaultTheme:n={}}=e,r="function"==typeof t?e=>{return t(null==(r=e)||0===Object.keys(r).length?n:e);var r}:t;return Bo.jsx(ko,{styles:r})}
|
|
8
8
|
/**
|
|
9
9
|
* @mui/styled-engine v5.16.6
|
|
10
10
|
*
|