@nebula.js/sn-text 1.4.6 → 1.4.7

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.
@@ -1,10 +1,10 @@
1
1
  /*
2
- * @nebula.js/sn-text v1.4.6
2
+ * @nebula.js/sn-text v1.4.7
3
3
  * Copyright (c) 2026 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,s,a,l,c,u,d,f,p,h,g,m,v,b,y,x,_,w,S,k,C,E,T,A,L,M,R,N,O;return{setters:[function(e){t=e.useMemo,n=e.useEffect,r=e.useState,o=e.usePromise,i=e.useElement,s=e.useStaleLayout,a=e.useModel,l=e.useInteractionState,c=e.useEmitter,u=e.useTranslator,d=e.useTheme,f=e.useImperativeHandle},function(e){p=e.default,h=e,g=e.flushSync,m=e.createPortal},function(e){v=e.createContext,b=e.useContext,y=e.default,x=e.useMemo,_=e.useLayoutEffect,w=e.useEffect,S=e.useState,k=e.useRef,C=e,E=e.forwardRef,T=e.isValidElement,A=e.cloneElement,L=e.Children,M=e.useCallback,R=e.Component,N=e.createElement,O=e.Suspense}],execute:function(){e("default",function(e){const t=new y$,{flags:o}=e;return{qae:{properties:P,data:I(t)},component(){const p=i(),h=$(p),g=s(),m=a(),v=l(),b=c(),[y,x]=r(null),_=u(),[w,S]=r(void 0),k=d(),{printingStatus:C}=x$({layout:g,flags:o});n(()=>{const e=e=>{!async function(e,t){await 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){const e=n.qMeasures?.filter(e=>{const n=t?.find(t=>t===e?.qDef?.cId);return!n});n.qMeasures=e,n.qInterColumnSortOrder=[]}return{...e,qHyperCubeDef:n}})}(m,e)};return b.on("onNodeDestroyed",e),()=>{b.removeListener("onNodeDestroyed",e)}},[b,m]),n(()=>{g&&void 0===w&&(S(g.text||null),x(g?.text))},[g,w]);const{edit:E}=_$({propertyPanelHandlerData:t,flags:o});n(()=>{m$({rootElement:h,layout:g,model:m,element:p,edit:E,initialData:w,emitter:b,lang:_.language(),flags:o,theme:k,interactionState:v,printingStatus:C,showMediaLibrary:e.anything?.sense?.showMediaLibrary})},[g,h,m,p,E,p,w,b,o,k,v]),n(()=>{if(g){const e=g;e.text&&e.text!==y&&(x(e.text),b.emit("reloadData",e.text))}},[g,y,b]),f(()=>({updateActiveState(e){e?t.setSelectedModelId(m?.id):m?.id===t.getSelectedModelId()&&t.setSelectedModelId(void 0)}}),[])},ext:{definition:{type:"items",component:"accordion",items:{data:v$,settings:b$}},exportProperties:null,importProperties:null,support:{snapshot:!0,export:!0,sharing:!0,exportData:!0,viewData:!1}}}});const P={version:"1.4.6",showTitles:!1,text:"",fontsUsed:[],components:[],qHyperCubeDef:{qDimensions:[],qMeasures:[],qSuppressZero:!1,qSuppressMissing:!0,qInitialDataFetch:[{qWidth:500,qHeight:10}]},disableNavMenu:!0,showDetails:!1,images:[]},I=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 z(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function j(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var D,F={};var B=function(){if(D)return F;D=1;var e=p;return F.createRoot=e.createRoot,F.hydrateRoot=e.hydrateRoot,F}();const $=e=>{const r=t(()=>B.createRoot(e),[e]);return n(()=>()=>{r?.unmount()},[r]),r},H=v({layout:void 0,model:void 0,element:void 0,edit:!1,initialData:void 0,emitter:void 0,lang:"en",flags:{isEnabled:()=>!1},theme:null,printingStatus:null,showMediaLibrary:void 0});function W(e){throw new Error(e)}const K="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,U=K&&"documentMode"in document?document.documentMode:null,G=K&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Y=K&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),V=!(!K||!("InputEvent"in window)||U)&&"getTargetRanges"in new window.InputEvent("input"),J=K&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),q=K&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,X=K&&/Android/.test(navigator.userAgent),Q=K&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Z=K&&X&&Q,ee=K&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&G&&!Q,te=0,ne=1,re=2,oe=1,ie=2,se=3,ae=4,le=5,ce=6,ue=J||q||ee?" ":"​",de="\n\n",fe=Y?" ":ue,pe={bold:1,capitalize:1024,code:16,highlight:128,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},he={directionless:1,unmergeable:2},ge={center:2,end:6,justify:4,left:1,right:3,start:5},me={[ie]:"center",[ce]:"end",[ae]:"justify",[oe]:"left",[se]:"right",[le]:"start"},ve={normal:0,segmented:2,token:1},be={[te]:"normal",[re]:"segmented",[ne]:"token"},ye="$config";function xe(e,t,n,r,o,i){let s=e.getFirstChild();for(;null!==s;){const e=s.__key;s.__parent===t&&(Vo(s)&&xe(s,e,n,r,o,i),n.has(e)||i.delete(e),o.push(e)),s=s.getNextSibling()}}let _e=!1,we=0;function Se(e){we=e.timeStamp}function ke(e,t,n){const r="BR"===e.nodeName,o=t.__lexicalLineBreak;return o&&(e===o||r&&e.previousSibling===o)||r&&void 0!==$i(e,n)}function Ce(e,t,n){const r=Ts(xs(n));let o=null,i=null;null!==r&&r.anchorNode===e&&(o=r.anchorOffset,i=r.focusOffset);const s=e.nodeValue;null!==s&&es(t,s,o,i,!1)}function Ee(e,t,n){if(Wr(e)){const t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return Li(t)&&n.isAttached()}function Te(e,t,n,r){for(let o=e;o&&!Hs(o);o=ms(o)){const e=$i(o,t);if(void 0!==e){const t=Fi(e,n);if(t)return Xo(t)||!Ls(o)?void 0:[o,t]}else if(o===r)return[r,Gi(n)]}}function Ae(e,t,n){_e=!0;const r=performance.now()-we>100;try{Ko(e,()=>{const o=ao()||function(e){return e.getEditorState().read(()=>{const e=ao();return null!==e?e.clone():null})}(e),i=new Map,s=e.getRootElement(),a=e._editorState,l=e._blockCursorElement;let c=!1,u="";for(let n=0;n<t.length;n++){const d=t[n],f=d.type,p=d.target,h=Te(p,e,a,s);if(!h)continue;const[g,m]=h;if("characterData"===f)r&&Or(m)&&Li(p)&&Ee(o,p,m)&&Ce(p,m,e);else if("childList"===f){c=!0;const t=d.addedNodes;for(let n=0;n<t.length;n++){const r=t[n],o=Bi(r),i=r.parentNode;if(null!=i&&r!==l&&null===o&&!ke(r,i,e)){if(Y){const e=(Ls(r)?r.innerText:null)||r.nodeValue;e&&(u+=e)}i.removeChild(r)}}const n=d.removedNodes,r=n.length;if(r>0){let t=0;for(let o=0;o<r;o++){const r=n[o];(ke(r,p,e)||l===r)&&(p.appendChild(r),t++)}r!==t&&i.set(g,m)}}}if(i.size>0)for(const[t,n]of i)n.reconcileObservedMutation(t,e);const d=n.takeRecords();if(d.length>0){for(let t=0;t<d.length;t++){const n=d[t],r=n.addedNodes,o=n.target;for(let t=0;t<r.length;t++){const n=r[t],i=n.parentNode;null==i||"BR"!==n.nodeName||ke(n,o,e)||i.removeChild(n)}}n.takeRecords()}null!==o&&(c&&Yi(o),Y&&ps(e)&&o.insertRawText(u))})}finally{_e=!1}}function Le(e){const t=e._observer;if(null!==t){Ae(e,t.takeRecords(),t)}}function Me(e){!function(e){0===we&&xs(e).addEventListener("textInput",Se,!0)}(e),e._observer=new MutationObserver((t,n)=>{Ae(e,t,n)})}function Re(e){const t=new Map,n=new Set;for(let r="function"==typeof e?e:e.replace;r.prototype&&void 0!==r.prototype.getType;r=Object.getPrototypeOf(r)){const{ownNodeConfig:e}=Gs(r);if(e&&e.stateConfigs)for(const r of e.stateConfigs){let e;"stateConfig"in r?(e=r.stateConfig,r.flat&&n.add(e.key)):e=r,t.set(e.key,e)}}return{flatKeys:n,sharedConfigMap:t}}class Ne{node;knownState;unknownState;sharedNodeState;size;constructor(e,t,n=void 0,r=new Map,o=void 0){this.node=e,this.sharedNodeState=t,this.unknownState=n,this.knownState=r;const{sharedConfigMap:i}=this.sharedNodeState,s=void 0!==o?o:function(e,t,n){let r=n.size;if(t)for(const o in t){const t=e.get(o);t&&n.has(t)||r++}return r}(i,n,r);void 0!==o&&s!==o&&W(`NodeState: size != computedSize (${String(o)} != ${String(s)})`);for(const e of r.keys())i.has(e.key)||W(`NodeState: sharedConfigMap missing knownState key ${e.key}`);this.size=s}getValue(e){const t=this.knownState.get(e);if(void 0!==t)return t;this.sharedNodeState.sharedConfigMap.set(e.key,e);let n=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){const t=this.unknownState[e.key];void 0!==t&&(n=e.parse(t)),this.updateFromKnown(e,n)}return n}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const e={...this.unknownState},t={};for(const[t,n]of this.knownState)t.isEqual(n,t.defaultValue)?delete e[t.key]:e[t.key]=t.unparse(n);for(const n of this.sharedNodeState.flatKeys)n in e&&(t[n]=e[n],delete e[n]);return Ie(e)&&(t.$=e),t}getWritable(e){if(this.node===e)return this;const{sharedNodeState:t,unknownState:n}=this,r=new Map(this.knownState);return new Ne(e,t,function(e,t,n){let r;if(n)for(const[o,i]of Object.entries(n)){const n=e.get(o);n?t.has(n)||t.set(n,n.parse(i)):(r=r||{},r[o]=i)}return r}(t.sharedConfigMap,r,n),r,this.size)}updateFromKnown(e,t){const n=e.key;this.sharedNodeState.sharedConfigMap.set(n,e);const{knownState:r,unknownState:o}=this;r.has(e)||o&&n in o||(o&&(delete o[n],this.unknownState=Ie(o)),this.size++),r.set(e,t)}updateFromUnknown(e,t){const n=this.sharedNodeState.sharedConfigMap.get(e);n?this.updateFromKnown(n,n.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){const{knownState:t}=this;for(const e of t.keys())t.set(e,e.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(const[t,n]of Object.entries(e))this.updateFromUnknown(t,n)}}function Oe(e){return e.__state?e.__state.sharedNodeState:bi(Is(),e.getType()).sharedNodeState}function Pe(e,t){const n=e.getWritable(),r=t.$;let o=r;for(const e of Oe(n).flatKeys)e in t&&(void 0!==o&&o!==r||(o={...r}),o[e]=t[e]);return(n.__state||o)&&function(e){const t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new Ne(t,Oe(t));return t.__state=n,n}(e).updateFromJSON(o),n}function Ie(e){if(e)for(const t in e)return e}function ze(e,t,n){for(const[r,o]of t.knownState){if(e.has(r.key))continue;e.add(r.key);const t=n?n.getValue(r):r.defaultValue;if(t!==o&&!r.isEqual(t,o))return!0}return!1}function je(e,t,n){const{unknownState:r}=t,o=n?n.unknownState:void 0;if(r)for(const[t,n]of Object.entries(r)){if(e.has(t))continue;e.add(t);if(n!==(o?o[t]:void 0))return!0}return!1}function De(e,t){const n=e.__state;return n&&n.node===e?n.getWritable(t):n}function Fe(e,t){const n=e.__mode,r=e.__format,o=e.__style,i=t.__mode,s=t.__format,a=t.__style,l=e.__state,c=t.__state;return(null===n||n===i)&&(null===r||r===s)&&(null===o||o===a)&&(null===e.__state||l===c||function(e,t){if(e===t)return!0;if(e&&t&&e.size!==t.size)return!1;const n=new Set;return!(e&&ze(n,e,t)||t&&ze(n,t,e)||e&&je(n,e,t)||t&&je(n,t,e))}(l,c))}function Be(e,t){const n=e.mergeWithSibling(t),r=Mo()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function $e(e){let t,n,r=e;if(""!==r.__text||!r.isSimpleText()||r.isUnmergeable()){for(;null!==(t=r.getPreviousSibling())&&Or(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(""!==t.__text){if(Fe(t,r)){r=Be(t,r);break}break}t.remove()}for(;null!==(n=r.getNextSibling())&&Or(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(""!==n.__text){if(Fe(r,n)){r=Be(r,n);break}break}n.remove()}}else r.remove()}function He(e){return We(e.anchor),We(e.focus),e}function We(e){for(;"element"===e.type;){const t=e.getNode(),n=e.offset;let r,o;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),o=!0):(r=t.getChildAtIndex(n),o=!1),Or(r)){e.set(r.__key,o?r.getTextContentSize():0,"text",!0);break}if(!Vo(r))break;e.set(r.__key,o?r.getChildrenSize():0,"element",!0)}}let Ke,Ue,Ge,Ye,Ve,Je,qe,Xe,Qe,Ze,et="",tt=null,nt=null,rt=!1,ot=!1;function it(e,t){const n=qe.get(e);if(null!==t){const n=St(e);n.parentNode===t&&t.removeChild(n)}if(Xe.has(e)||Ue._keyToDOMMap.delete(e),Vo(n)){const e=vt(n,qe);st(e,0,e.length-1,null)}void 0!==n&&cs(Ze,Ge,Ye,n,"destroyed")}function st(e,t,n,r){for(let o=t;o<=n;++o){const t=e[o];void 0!==t&&it(t,r)}}function at(e,t){e.setProperty("text-align",t)}const lt="40px";function ct(e,t){const n=Ke.theme.indent;if("string"==typeof n){const r=e.classList.contains(n);t>0&&!r?e.classList.add(n):t<1&&r&&e.classList.remove(n)}const r=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||lt;e.style.setProperty("padding-inline-start",0===t?"":`calc(${t} * ${r})`)}function ut(e,t){const n=e.style;0===t?at(n,""):1===t?at(n,"left"):2===t?at(n,"center"):3===t?at(n,"right"):4===t?at(n,"justify"):5===t?at(n,"start"):6===t&&at(n,"end")}function dt(e,t){const n=function(e){const t=e.__dir;if(null!==t)return t;if(Zo(e))return null;const n=e.getParentOrThrow();return Zo(n)&&null===n.__dir?"auto":null}(t);null!==n?e.dir=n:e.removeAttribute("dir")}function ft(e,t){const n=Xe.get(e);void 0===n&&W("createNode: node does not exist in nodeMap");const r=n.createDOM(Ke,Ue);if(function(e,t,n){const r=n._keyToDOMMap;(function(e,t,n){const r=`__lexicalKey_${t._key}`;e[r]=n})(t,n,e),r.set(e,t)}(e,r,Ue),Or(n)?r.setAttribute("data-lexical-text","true"):Xo(n)&&r.setAttribute("data-lexical-decorator","true"),Vo(n)){const e=n.__indent,t=n.__size;if(dt(r,n),0!==e&&ct(r,e),0!==t){const e=t-1;pt(vt(n,Xe),n,0,e,n.getDOMSlot(r))}const o=n.__format;0!==o&&ut(r,o),n.isInline()||gt(null,n,r)}else{const t=n.getTextContent();if(Xo(n)){const t=n.decorate(Ue,Ke);null!==t&&yt(e,t),r.contentEditable="false"}et+=t}return null!==t&&t.insertChild(r),Object.freeze(n),cs(Ze,Ge,Ye,n,"created"),r}function pt(e,t,n,r,o){const i=et;et="";let s=n;for(;s<=r;++s){ft(e[s],o);const t=Xe.get(e[s]);null!==t&&Or(t)?null===tt&&(tt=t.getFormat(),nt=t.getStyle()):Vo(t)&&s<r&&!t.isInline()&&(et+=de)}o.element.__lexicalTextContent=et,et=i+et}function ht(e,t){if(e){const n=e.__last;if(n){const e=t.get(n);if(e)return gr(e)?"line-break":Xo(e)&&e.isInline()?"decorator":null}return"empty"}return null}function gt(e,t,n){const r=ht(e,qe),o=ht(t,Xe);r!==o&&t.getDOMSlot(n).setManagedLineBreak(o)}function mt(e,t,n){var r;tt=null,nt=null,function(e,t,n){const r=et,o=e.__size,i=t.__size;et="";const s=n.element;if(1===o&&1===i){const n=e.__first,r=t.__first;if(n===r)bt(n,s);else{const e=St(n),t=ft(r,null);try{s.replaceChild(t,e)}catch(o){if("object"==typeof o&&null!=o){const i=`${o.toString()} Parent: ${s.tagName}, new child: {tag: ${t.tagName} key: ${r}}, old child: {tag: ${e.tagName}, key: ${n}}.`;throw new Error(i)}throw o}it(n,null)}const o=Xe.get(r);Or(o)&&null===tt&&(tt=o.getFormat(),nt=o.getStyle())}else{const r=vt(e,qe),a=vt(t,Xe);if(r.length!==o&&W("$reconcileChildren: prevChildren.length !== prevChildrenSize"),a.length!==i&&W("$reconcileChildren: nextChildren.length !== nextChildrenSize"),0===o)0!==i&&pt(a,0,0,i-1,n);else if(0===i){if(0!==o){const e=null==n.after&&null==n.before&&null==n.element.__lexicalLineBreak;st(r,0,o-1,e?null:s),e&&(s.textContent="")}}else!function(e,t,n,r,o,i){const s=r-1,a=o-1;let l,c,u=i.getFirstChild(),d=0,f=0;for(;d<=s&&f<=a;){const e=t[d],r=n[f];if(e===r)u=xt(bt(r,i.element)),d++,f++;else{if(void 0===c&&(c=_t(n,f)),void 0===l)l=_t(t,d);else if(!l.has(e)){d++;continue}if(!c.has(e)){u=xt(St(e)),it(e,i.element),d++,l.delete(e);continue}if(l.has(r)){const e=gs(Ue,r);e!==u&&i.withBefore(u).insertChild(e),u=xt(bt(r,i.element)),d++,f++}else ft(r,i.withBefore(u)),f++}const o=Xe.get(r);null!==o&&Or(o)?null===tt&&(tt=o.getFormat(),nt=o.getStyle()):Vo(o)&&f<=a&&!o.isInline()&&(et+=de)}const p=d>s,h=f>a;if(p&&!h){const e=n[a+1],t=void 0===e?null:Ue.getElementByKey(e);pt(n,0,f,a,i.withBefore(t))}else h&&!p&&st(t,d,s,i.element)}(0,r,a,o,i,n)}s.__lexicalTextContent=et,et=r+et}(e,t,t.getDOMSlot(n)),r=t,null==tt||tt===r.__textFormat||ot||r.setTextFormat(tt),function(e){null==nt||nt===e.__textStyle||ot||e.setTextStyle(nt)}(t)}function vt(e,t){const n=[];let r=e.__first;for(;null!==r;){const e=t.get(r);void 0===e&&W("createChildrenArray: node does not exist in nodeMap"),n.push(r),r=e.__next}return n}function bt(e,t){const n=qe.get(e);let r=Xe.get(e);void 0!==n&&void 0!==r||W("reconcileNode: prevNode or nextNode does not exist in nodeMap");const o=rt||Je.has(e)||Ve.has(e),i=gs(Ue,e);if(n===r&&!o){let e;if(Vo(n)){const t=i.__lexicalTextContent;"string"==typeof t?e=t:(e=n.getTextContent(),i.__lexicalTextContent=e)}else e=n.getTextContent();return et+=e,i}if(n!==r&&o&&cs(Ze,Ge,Ye,r,"updated"),r.updateDOM(n,i,Ke)){const n=ft(e,null);return null===t&&W("reconcileNode: parentDOM is null"),t.replaceChild(n,i),it(e,null),n}if(Vo(n)){Vo(r)||W(`Node with key ${e} changed from ElementNode to !ElementNode`);const t=r.__indent;(rt||t!==n.__indent)&&ct(i,t);const s=r.__format;if((rt||s!==n.__format)&&ut(i,s),o)mt(n,r,i),Zo(r)||r.isInline()||gt(n,r,i);else{const e=i.__lexicalTextContent;let t;"string"==typeof e?t=e:(t=n.getTextContent(),i.__lexicalTextContent=t),et+=t}if((rt||r.__dir!==n.__dir)&&(dt(i,r),Zo(r)&&!rt))for(const e of r.getChildren())if(Vo(e)){dt(gs(Ue,e.getKey()),e)}}else{const t=r.getTextContent();if(Xo(r)){const t=r.decorate(Ue,Ke);null!==t&&yt(e,t)}et+=t}if(!ot&&Zo(r)&&r.__cachedText!==et){const e=r.getWritable();e.__cachedText=et,r=e}return Object.freeze(r),i}function yt(e,t){let n=Ue._pendingDecorators;const r=Ue._decorators;if(null===n){if(r[e]===t)return;n=Wi(Ue)}n[e]=t}function xt(e){let t=e.nextSibling;return null!==t&&t===Ue._blockCursorElement&&(t=t.nextSibling),t}function _t(e,t){const n=new Set;for(let r=t;r<e.length;r++)n.add(e[r]);return n}function wt(e,t,n,r,o,i){et="",rt=2===r,Ue=n,Ke=n._config,Ge=n._nodes,Ye=Ue._listeners.mutation,Ve=o,Je=i,qe=e._nodeMap,Xe=t._nodeMap,ot=t._readOnly,Qe=new Map(n._keyToDOMMap);const s=new Map;return Ze=s,bt("root",null),Ue=void 0,Ge=void 0,Ve=void 0,Je=void 0,qe=void 0,Xe=void 0,Ke=void 0,Qe=void 0,Ze=void 0,s}function St(e){const t=Qe.get(e);return void 0===t&&W(`Reconciliation: could not find DOM element for node key ${e}`),t}function kt(e){return{type:e}}const Ct=kt("SELECTION_CHANGE_COMMAND"),Et=kt("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),Tt=kt("CLICK_COMMAND"),At=kt("BEFORE_INPUT_COMMAND"),Lt=kt("INPUT_COMMAND"),Mt=kt("COMPOSITION_START_COMMAND"),Rt=kt("COMPOSITION_END_COMMAND"),Nt=kt("DELETE_CHARACTER_COMMAND"),Ot=kt("INSERT_LINE_BREAK_COMMAND"),Pt=kt("INSERT_PARAGRAPH_COMMAND"),It=kt("CONTROLLED_TEXT_INSERTION_COMMAND"),zt=kt("PASTE_COMMAND"),jt=kt("REMOVE_TEXT_COMMAND"),Dt=kt("DELETE_WORD_COMMAND"),Ft=kt("DELETE_LINE_COMMAND"),Bt=kt("FORMAT_TEXT_COMMAND"),$t=kt("UNDO_COMMAND"),Ht=kt("REDO_COMMAND"),Wt=kt("KEYDOWN_COMMAND"),Kt=kt("KEY_ARROW_RIGHT_COMMAND"),Ut=kt("MOVE_TO_END"),Gt=kt("KEY_ARROW_LEFT_COMMAND"),Yt=kt("MOVE_TO_START"),Vt=kt("KEY_ARROW_UP_COMMAND"),Jt=kt("KEY_ARROW_DOWN_COMMAND"),qt=kt("KEY_ENTER_COMMAND"),Xt=kt("KEY_SPACE_COMMAND"),Qt=kt("KEY_BACKSPACE_COMMAND"),Zt=kt("KEY_ESCAPE_COMMAND"),en=kt("KEY_DELETE_COMMAND"),tn=kt("KEY_TAB_COMMAND"),nn=kt("INSERT_TAB_COMMAND"),rn=kt("INDENT_CONTENT_COMMAND"),on=kt("OUTDENT_CONTENT_COMMAND"),sn=kt("DROP_COMMAND"),an=kt("FORMAT_ELEMENT_COMMAND"),ln=kt("DRAGSTART_COMMAND"),cn=kt("DRAGOVER_COMMAND"),un=kt("DRAGEND_COMMAND"),dn=kt("COPY_COMMAND"),fn=kt("CUT_COMMAND"),pn=kt("SELECT_ALL_COMMAND"),hn=kt("CLEAR_EDITOR_COMMAND"),gn=kt("CLEAR_HISTORY_COMMAND"),mn=kt("CAN_REDO_COMMAND"),vn=kt("CAN_UNDO_COMMAND"),bn=kt("FOCUS_COMMAND"),yn=kt("BLUR_COMMAND"),xn=kt("KEY_MODIFIER_COMMAND"),_n=Object.freeze({}),wn=[["keydown",function(e,t){if(Sn=e.timeStamp,kn=e.key,t.isComposing())return;hs(t,Wt,e)}],["pointerdown",function(e,t){const n=e.target,r=e.pointerType;Ms(n)&&"touch"!==r&&"pen"!==r&&0===e.button&&Ko(t,()=>{_i(n)||(Mn=!0)})}],["compositionstart",function(e,t){hs(t,Mt,e)}],["compositionend",function(e,t){Y?Nn=!0:q||!J&&!ee?hs(t,Rt,e):(On=!0,Pn=e.data)}],["input",function(e,t){e.stopPropagation(),Ko(t,()=>{t.dispatchCommand(Lt,e)},{event:e}),En=null}],["click",function(e,t){Ko(t,()=>{const n=ao(),r=Ts(xs(t)),o=lo();if(r)if(Wr(n)){const t=n.anchor,i=t.getNode();if("element"===t.type&&0===t.offset&&n.isCollapsed()&&!Zo(i)&&1===Ui().getChildrenSize()&&i.getTopLevelElementOrThrow().isEmpty()&&null!==o&&n.is(o))r.removeAllRanges(),n.dirty=!0;else if(3===e.detail&&!n.isCollapsed()){if(i!==n.focus.getNode()){const e=Ys(i,e=>Vo(e)&&!e.isInline());Vo(e)&&e.select(0)}}}else if("touch"===e.pointerType||"pen"===e.pointerType){const n=r.anchorNode;if(Ls(n)||Li(n)){Yi(io(o,r,t,e))}}hs(t,Tt,e)})}],["cut",_n],["copy",_n],["dragstart",_n],["dragover",_n],["dragend",_n],["paste",_n],["focus",_n],["blur",_n],["drop",_n]];V&&wn.push(["beforeinput",(e,t)=>function(e,t){const n=e.inputType;if("deleteCompositionText"===n||Y&&ps(t))return;if("insertCompositionText"===n)return;hs(t,At,e)}(e,t)]);let Sn=0,kn=null,Cn=0,En=null;const Tn=new WeakMap,An=new WeakMap;let Ln=!1,Mn=!1,Rn=!1,Nn=!1,On=!1,Pn="",In=null,zn=[0,"",0,"root",0];function jn(e,t,n,r,o){const i=e.anchor,s=e.focus,a=i.getNode(),l=Mo(),c=Ts(xs(l)),u=null!==c?c.anchorNode:null,d=i.key,f=l.getElementByKey(d),p=n.length;return d!==s.key||!Or(a)||(!o&&(!V||Cn<r+50)||a.isDirty()&&p<2||Ji(n))&&i.offset!==s.offset&&!a.isComposing()||Ai(a)||a.isDirty()&&p>1||(o||!V)&&null!==f&&!a.isComposing()&&u!==Ri(f)||null!==c&&null!==t&&(!t.collapsed||t.startContainer!==c.anchorNode||t.startOffset!==c.anchorOffset)||a.getFormat()!==e.format||a.getStyle()!==e.style||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;const n=e.anchor.offset,r=t.getParentOrThrow(),o=Ti(t);return 0===n?!t.canInsertTextBefore()||!r.canInsertTextBefore()&&!t.isComposing()||o||function(e){const t=e.getPreviousSibling();return(Or(t)||Vo(t)&&t.isInline())&&!t.canInsertTextAfter()}(t):n===t.getTextContentSize()&&(!t.canInsertTextAfter()||!r.canInsertTextAfter()&&!t.isComposing()||o)}(e,a)}function Dn(e,t){return Li(e)&&null!==e.nodeValue&&0!==t&&t!==e.nodeValue.length}function Fn(e,t,n){const{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:s}=e;Ln&&(Ln=!1,Dn(r,o)&&Dn(i,s)&&!In)||Ko(t,()=>{if(!n)return void Yi(null);if(!Si(t,r,i))return;let a=ao();if(In&&Wr(a)&&a.isCollapsed()){const e=a.anchor,t=In.anchor;(e.key===t.key&&e.offset===t.offset+1||1===e.offset&&t.getNode().is(e.getNode().getPreviousSibling()))&&(a=In.clone(),Yi(a))}if(In=null,Wr(a)){const n=a.anchor,r=n.getNode();if(a.isCollapsed()){"Range"===e.type&&e.anchorNode===e.focusNode&&(a.dirty=!0);const o=xs(t).event,i=o?o.timeStamp:performance.now(),[s,l,c,u,d]=zn,f=Ui(),p=!1===t.isComposing()&&""===f.getTextContent();if(i<d+200&&n.offset===c&&n.key===u)Bn(a,s,l);else if("text"===n.type)Or(r)||W("Point.getNode() must return TextNode when type is text"),$n(a,r);else if("element"===n.type&&!p){Vo(r)||W("Point.getNode() must return ElementNode when type is element");const e=n.getNode();e.isEmpty()?function(e,t){const n=t.getTextFormat(),r=t.getTextStyle();Bn(e,n,r)}(a,e):Bn(a,0,"")}}else{const e=n.key,t=a.focus.key,r=a.getNodes(),i=r.length,l=a.isBackward(),c=l?s:o,u=l?o:s,d=l?t:e,f=l?e:t;let p=2047,h=!1;for(let e=0;e<i;e++){const t=r[e],n=t.getTextContentSize();if(Or(t)&&0!==n&&!(0===e&&t.__key===d&&c===n||e===i-1&&t.__key===f&&0===u)&&(h=!0,p&=t.getFormat(),0===p))break}a.format=h?p:0}}hs(t,Ct,void 0)})}function Bn(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function $n(e,t){Bn(e,t.getFormat(),t.getStyle())}function Hn(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return 0===t.length?null:t[0]}function Wn(e){const t=e.inputType,n=Hn(e),r=Mo(),o=ao();if("deleteContentBackward"===t){if(null===o){const e=lo();if(!Wr(e))return!0;Yi(e.clone())}if(Wr(o)){const t=o.anchor.key===o.focus.key;if(i=e.timeStamp,"MediaLast"===kn&&i<Sn+30&&r.isComposing()&&t){if(ji(null),Sn=0,setTimeout(()=>{Ko(r,()=>{ji(null)})},30),Wr(o)){const e=o.anchor.getNode();e.markDirty(),Or(e)||W("Anchor node must be a TextNode"),$n(o,e)}}else{ji(null),e.preventDefault();const n=o.anchor.getNode(),i=n.getTextContent(),s=n.canInsertTextAfter(),a=0===o.anchor.offset&&o.focus.offset===i.length;let l=Z&&t&&!a&&s;if(l&&o.isCollapsed()&&(l=!Xo(fs(o.anchor,!0))),!l){hs(r,Nt,!0);const e=ao();Z&&Wr(e)&&e.isCollapsed()&&(In=e,setTimeout(()=>In=null))}}return!0}}var i;if(!Wr(o))return!0;const s=e.data;null!==En&&Zi(!1,r,En),o.dirty&&null===En||!o.isCollapsed()||Zo(o.anchor.getNode())||null===n||o.applyDOMRange(n),En=null;const a=o.anchor,l=o.focus,c=a.getNode(),u=l.getNode();if("insertText"===t||"insertTranspose"===t){if("\n"===s)e.preventDefault(),hs(r,Ot,!1);else if(s===de)e.preventDefault(),hs(r,Pt,void 0);else if(null==s&&e.dataTransfer){const t=e.dataTransfer.getData("text/plain");e.preventDefault(),o.insertRawText(t)}else null!=s&&jn(o,n,s,e.timeStamp,!0)?(e.preventDefault(),hs(r,It,s)):En=s;return Cn=e.timeStamp,!0}switch(e.preventDefault(),t){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":hs(r,It,e);break;case"insertFromComposition":ji(null),hs(r,It,e);break;case"insertLineBreak":ji(null),hs(r,Ot,!1);break;case"insertParagraph":ji(null),Rn&&!q?(Rn=!1,hs(r,Ot,!1)):hs(r,Pt,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":hs(r,zt,e);break;case"deleteByComposition":(function(e,t){return e!==t||Vo(e)||Vo(t)||!Ti(e)||!Ti(t)})(c,u)&&hs(r,jt,e);break;case"deleteByDrag":case"deleteByCut":hs(r,jt,e);break;case"deleteContent":hs(r,Nt,!1);break;case"deleteWordBackward":hs(r,Dt,!0);break;case"deleteWordForward":hs(r,Dt,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":hs(r,Ft,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":hs(r,Ft,!1);break;case"formatStrikeThrough":hs(r,Bt,"strikethrough");break;case"formatBold":hs(r,Bt,"bold");break;case"formatItalic":hs(r,Bt,"italic");break;case"formatUnderline":hs(r,Bt,"underline");break;case"historyUndo":hs(r,$t,void 0);break;case"historyRedo":hs(r,Ht,void 0)}return!0}function Kn(e){if(Ls(e.target)&&_i(e.target))return!0;const t=Mo(),n=ao(),r=e.data,o=Hn(e);if(null!=r&&Wr(n)&&jn(n,o,r,e.timeStamp,!1)){Nn&&(Yn(t,r),Nn=!1);const o=n.anchor.getNode(),i=Ts(xs(t));if(null===i)return!0;const s=n.isBackward(),a=s?n.anchor.offset:n.focus.offset,l=s?n.focus.offset:n.anchor.offset;V&&!n.isCollapsed()&&Or(o)&&null!==i.anchorNode&&o.getTextContent().slice(0,a)+r+o.getTextContent().slice(a+l)===Qi(i.anchorNode)||hs(t,It,r);const c=r.length;Y&&c>1&&"insertCompositionText"===e.inputType&&!t.isComposing()&&(n.anchor.offset-=c),J||q||ee||!t.isComposing()||(Sn=0,ji(null))}else{Zi(!1,t,null!==r?r:void 0),Nn&&(Yn(t,r||void 0),Nn=!1)}return function(){To();const e=Mo();Le(e)}(),!0}function Un(e){const t=Mo(),n=ao();if(Wr(n)&&!t.isComposing()){const r=n.anchor,o=n.anchor.getNode();ji(r.key),(e.timeStamp<Sn+30||"element"===r.type||!n.isCollapsed()||o.getFormat()!==n.format||Or(o)&&o.getStyle()!==n.style)&&hs(t,It,fe)}return!0}function Gn(e){return Yn(Mo(),e.data),!0}function Yn(e,t){const n=e._compositionKey;if(ji(null),null!==n&&null!=t){if(""===t){const t=Fi(n),r=Ri(e.getElementByKey(n));return void(null!==r&&null!==r.nodeValue&&Or(t)&&es(t,r.nodeValue,null,null,!0))}if("\n"===t[t.length-1]){const t=ao();if(Wr(t)){const n=t.focus;return t.anchor.set(n.key,n.offset,n.type),void hs(e,qt,null)}}}Zi(!0,e,t)}function Vn(e){const t=Mo();if(null==e.key)return!0;if(On&&ss(e))return Ko(t,()=>{Yn(t,Pn)}),On=!1,Pn="",!0;if(function(e){return rs(e,"ArrowRight",{shiftKey:"any"})}(e))hs(t,Kt,e);else if(function(e){return rs(e,"ArrowRight",os)}(e))hs(t,Ut,e);else if(function(e){return rs(e,"ArrowLeft",{shiftKey:"any"})}(e))hs(t,Gt,e);else if(function(e){return rs(e,"ArrowLeft",os)}(e))hs(t,Yt,e);else if(function(e){return rs(e,"ArrowUp",{altKey:"any",shiftKey:"any"})}(e))hs(t,Vt,e);else if(function(e){return rs(e,"ArrowDown",{altKey:"any",shiftKey:"any"})}(e))hs(t,Jt,e);else if(function(e){return rs(e,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})}(e))Rn=!0,hs(t,qt,e);else if(function(e){return" "===e.key}(e))hs(t,Xt,e);else if(function(e){return G&&rs(e,"o",{ctrlKey:!0})}(e))e.preventDefault(),Rn=!0,hs(t,Ot,!0);else if(function(e){return rs(e,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})}(e))Rn=!1,hs(t,qt,e);else if(function(e){return rs(e,"Backspace",{shiftKey:"any"})||G&&rs(e,"h",{ctrlKey:!0})}(e))ss(e)?hs(t,Qt,e):(e.preventDefault(),hs(t,Nt,!0));else if(function(e){return"Escape"===e.key}(e))hs(t,Zt,e);else if(function(e){return rs(e,"Delete",{})||G&&rs(e,"d",{ctrlKey:!0})}(e))!function(e){return"Delete"===e.key}(e)?(e.preventDefault(),hs(t,Nt,!1)):hs(t,en,e);else if(function(e){return rs(e,"Backspace",is)}(e))e.preventDefault(),hs(t,Dt,!0);else if(function(e){return rs(e,"Delete",is)}(e))e.preventDefault(),hs(t,Dt,!1);else if(function(e){return G&&rs(e,"Backspace",{metaKey:!0})}(e))e.preventDefault(),hs(t,Ft,!0);else if(function(e){return G&&(rs(e,"Delete",{metaKey:!0})||rs(e,"k",{ctrlKey:!0}))}(e))e.preventDefault(),hs(t,Ft,!1);else if(function(e){return rs(e,"b",os)}(e))e.preventDefault(),hs(t,Bt,"bold");else if(function(e){return rs(e,"u",os)}(e))e.preventDefault(),hs(t,Bt,"underline");else if(function(e){return rs(e,"i",os)}(e))e.preventDefault(),hs(t,Bt,"italic");else if(function(e){return rs(e,"Tab",{shiftKey:"any"})}(e))hs(t,tn,e);else if(function(e){return rs(e,"z",os)}(e))e.preventDefault(),hs(t,$t,void 0);else if(function(e){if(G)return rs(e,"z",{metaKey:!0,shiftKey:!0});return rs(e,"y",{ctrlKey:!0})||rs(e,"z",{ctrlKey:!0,shiftKey:!0})}(e))e.preventDefault(),hs(t,Ht,void 0);else{const n=t._editorState._selection;null===n||Wr(n)?as(e)&&(e.preventDefault(),hs(t,pn,e)):!function(e){return rs(e,"c",os)}(e)?!function(e){return rs(e,"x",os)}(e)?as(e)&&(e.preventDefault(),hs(t,pn,e)):(e.preventDefault(),hs(t,fn,e)):(e.preventDefault(),hs(t,dn,e))}return function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey}(e)&&t.dispatchCommand(xn,e),!0}function Jn(e){let t=e.__lexicalEventHandles;return void 0===t&&(t=[],e.__lexicalEventHandles=t),t}const qn=new Map;function Xn(e){const t=function(e){const t=ys(e);return t?t.getSelection():null}(e.target);if(null===t)return;const n=Ci(t.anchorNode);if(null===n)return;Mn&&(Mn=!1,Ko(n,()=>{const r=lo(),o=t.anchorNode;if(Ls(o)||Li(o)){Yi(io(r,t,n,e))}}));const r=qi(n),o=r[r.length-1],i=o._key,s=qn.get(i),a=s||o;a!==n&&Fn(t,a,!1),Fn(t,n,!0),n!==o?qn.set(i,n):s&&qn.delete(i)}function Qn(e){e._lexicalHandled=!0}function Zn(e){return!0===e._lexicalHandled}const er=function(e){{let t=!1;return()=>{t||console.warn(e),t=!0}}}("Root element not registered");function tr(e){const t=Tn.get(e);if(void 0===t)return void er();const n=An.get(t);if(void 0===n)return void er();const r=n-1;r>=0||W("Root element count less than 0"),Tn.delete(e),An.set(t,r),0===r&&t.removeEventListener("selectionchange",Xn);const o=Ei(e);ki(o)?(!function(e){if(null!==e._parentEditor){const t=qi(e),n=t[t.length-1]._key;qn.get(n)===e&&qn.delete(n)}else qn.delete(e._key)}(o),e.__lexicalEditor=null):o&&W("Attempted to remove event handlers from a node that does not belong to this build of Lexical");const i=Jn(e);for(let e=0;e<i.length;e++)i[e]();e.__lexicalEventHandles=[]}function nr(e,t,n){To();const r=e.__key,o=e.getParent();if(null===o)return;const i=function(e){const t=ao();if(!Wr(t)||!Vo(e))return t;const{anchor:n,focus:r}=t,o=n.getNode(),i=r.getNode();bs(o,e)&&n.set(e.__key,0,"element");bs(i,e)&&r.set(e.__key,0,"element");return t}(e);let s=!1;if(Wr(i)&&t){const t=i.anchor,n=i.focus;t.key===r&&(fo(t,e,o,e.getPreviousSibling(),e.getNextSibling()),s=!0),n.key===r&&(fo(n,e,o,e.getPreviousSibling(),e.getNextSibling()),s=!0)}else Ur(i)&&t&&e.isSelected()&&e.selectPrevious();if(Wr(i)&&t&&!s){const t=e.getIndexWithinParent();Ii(e),co(i,o,t,-1)}else Ii(e);n||_s(o)||o.canBeEmpty()||!o.isEmpty()||nr(o,t),t&&i&&Zo(o)&&o.isEmpty()&&o.selectEnd()}const rr=Symbol.for("ephemeral");function or(e){return e[rr]||!1}class ir{__type;__key;__parent;__prev;__next;__state;static getType(){const{ownNodeType:e}=Gs(this);return void 0===e&&W(`LexicalNode: Node ${this.name} does not implement .getType().`),e}static clone(e){W(`LexicalNode: Node ${this.name} does not implement .clone().`)}$config(){return{}}config(e,t){const n=t.extends||Object.getPrototypeOf(this.constructor);return Object.assign(t,{extends:n,type:e}),{[e]:t}}afterCloneFrom(e){this.__key===e.__key?(this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev,this.__state=e.__state):e.__state&&(this.__state=e.__state.getWritable(this))}static importDOM;constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",{configurable:!0,enumerable:!1,value:void 0,writable:!0}),Pi(this,e),"root"!==this.__type&&function(e,t){const n=yi(Mo(),e);void 0===n&&W(`Create node: Attempted to create node ${t.name} that was not configured to be used on the editor.`);const r=n.klass;r!==t&&W(`Create node: Type ${e} in node ${t.name} does not match registered node ${r.name} with the same type`)}(this.__type,this.constructor)}getType(){return this.__type}isInline(){W(`LexicalNode: Node ${this.constructor.name} does not implement .isInline().`)}isAttached(){let e=this.__key;for(;null!==e;){if("root"===e)return!0;const t=Fi(e);if(null===t)break;e=t.__parent}return!1}isSelected(e){const t=e||ao();if(null==t)return!1;const n=t.getNodes().some(e=>e.__key===this.__key);if(Or(this))return n;if(Wr(t)&&"element"===t.anchor.type&&"element"===t.focus.type){if(t.isCollapsed())return!1;const e=this.getParent();if(Xo(this)&&this.isInline()&&e){const n=t.isBackward()?t.focus:t.anchor;if(e.is(n.getNode())&&n.offset===e.getChildrenSize()&&this.is(e.getLastChild()))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){const e=this.getParent();if(null===e)return-1;let t=e.getFirstChild(),n=0;for(;null!==t;){if(this.is(t))return n;n++,t=t.getNextSibling()}return-1}getParent(){const e=this.getLatest().__parent;return null===e?null:Fi(e)}getParentOrThrow(){const e=this.getParent();return null===e&&W(`Expected node ${this.__key} to have a parent.`),e}getTopLevelElement(){let e=this;for(;null!==e;){const t=e.getParent();if(_s(t))return Vo(e)||e===this&&Xo(e)||W("Children of root nodes must be elements or decorators"),e;e=t}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return null===e&&W(`Expected node ${this.__key} to have a top parent element.`),e}getParents(){const e=[];let t=this.getParent();for(;null!==t;)e.push(t),t=t.getParent();return e}getParentKeys(){const e=[];let t=this.getParent();for(;null!==t;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){const e=this.getLatest().__prev;return null===e?null:Fi(e)}getPreviousSiblings(){const e=[],t=this.getParent();if(null===t)return e;let n=t.getFirstChild();for(;null!==n&&!n.is(this);)e.push(n),n=n.getNextSibling();return e}getNextSibling(){const e=this.getLatest().__next;return null===e?null:Fi(e)}getNextSiblings(){const e=[];let t=this.getNextSibling();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){const t=Vo(this)?this:this.getParent(),n=Vo(e)?e:e.getParent(),r=t&&n?ka(t,n):null;return r?r.commonAncestor:null}is(e){return null!=e&&this.__key===e.__key}isBefore(e){const t=ka(this,e);return null!==t&&("descendant"===t.type||("branch"===t.type?-1===_a(t):("same"!==t.type&&"ancestor"!==t.type&&W("LexicalNode.isBefore: exhaustiveness check"),!1)))}isParentOf(e){const t=ka(this,e);return null!==t&&"ancestor"===t.type}getNodesBetween(e){const t=this.isBefore(e),n=[],r=new Set;let o=this;for(;null!==o;){const i=o.__key;if(r.has(i)||(r.add(i),n.push(o)),o===e)break;const s=Vo(o)?t?o.getFirstChild():o.getLastChild():null;if(null!==s){o=s;continue}const a=t?o.getNextSibling():o.getPreviousSibling();if(null!==a){o=a;continue}const l=o.getParentOrThrow();if(r.has(l.__key)||n.push(l),l===e)break;let c=null,u=l;do{if(null===u&&W("getNodesBetween: ancestor is null"),c=t?u.getNextSibling():u.getPreviousSibling(),u=u.getParent(),null===u)break;null!==c||r.has(u.__key)||n.push(u)}while(null===c);o=c}return t||n.reverse(),n}isDirty(){const e=Mo()._dirtyLeaves;return null!==e&&e.has(this.__key)}getLatest(){if(or(this))return this;const e=Fi(this.__key);return null===e&&W("Lexical node does not exist in active editor state. Avoid using the same node references between nested closures from editorState.read/editor.update."),e}getWritable(){if(or(this))return this;To();const e=Lo(),t=Mo(),n=e._nodeMap,r=this.__key,o=this.getLatest(),i=t._cloneNotNeeded,s=ao();if(null!==s&&s.setCachedNodes(null),i.has(r))return zi(o),o;const a=Fs(o);return i.add(r),zi(a),n.set(r,a),a}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){W("createDOM: base method not extended")}updateDOM(e,t,n){W("updateDOM: base method not extended")}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){const e=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...e}}static importJSON(e){W(`LexicalNode: Node ${this.name} does not implement .importJSON().`)}updateFromJSON(e){return Pe(this,e)}static transform(){return null}remove(e){nr(this,!0,e)}replace(e,t){To();let n=ao();null!==n&&(n=n.clone()),ks(this,e);const r=this.getLatest(),o=this.__key,i=e.__key,s=e.getWritable(),a=this.getParentOrThrow().getWritable(),l=a.__size;Ii(s);const c=r.getPreviousSibling(),u=r.getNextSibling(),d=r.__prev,f=r.__next,p=r.__parent;if(nr(r,!1,!0),null===c)a.__first=i;else{c.getWritable().__next=i}if(s.__prev=d,null===u)a.__last=i;else{u.getWritable().__prev=i}if(s.__next=f,s.__parent=p,a.__size=l,t&&(Vo(this)&&Vo(s)||W("includeChildren should only be true for ElementNodes"),this.getChildren().forEach(e=>{s.append(e)})),Wr(n)){Yi(n);const e=n.anchor,t=n.focus;e.key===o&&$r(e,s),t.key===o&&$r(t,s)}return Di()===o&&ji(i),s}insertAfter(e,t=!0){To(),ks(this,e);const n=this.getWritable(),r=e.getWritable(),o=r.getParent(),i=ao();let s=!1,a=!1;if(null!==o){const t=e.getIndexWithinParent();if(Ii(r),Wr(i)){const e=o.__key,n=i.anchor,r=i.focus;s="element"===n.type&&n.key===e&&n.offset===t+1,a="element"===r.type&&r.key===e&&r.offset===t+1}}const l=this.getNextSibling(),c=this.getParentOrThrow().getWritable(),u=r.__key,d=n.__next;if(null===l)c.__last=u;else{l.getWritable().__prev=u}if(c.__size++,n.__next=u,r.__next=d,r.__prev=n.__key,r.__parent=n.__parent,t&&Wr(i)){const e=this.getIndexWithinParent();co(i,c,e+1);const t=c.__key;s&&i.anchor.set(t,e+2,"element"),a&&i.focus.set(t,e+2,"element")}return e}insertBefore(e,t=!0){To(),ks(this,e);const n=this.getWritable(),r=e.getWritable(),o=r.__key;Ii(r);const i=this.getPreviousSibling(),s=this.getParentOrThrow().getWritable(),a=n.__prev,l=this.getIndexWithinParent();if(null===i)s.__first=o;else{i.getWritable().__next=o}s.__size++,n.__prev=o,r.__prev=a,r.__next=n.__key,r.__parent=n.__parent;const c=ao();if(t&&Wr(c)){co(c,this.getParentOrThrow(),l)}return e}isParentRequired(){return!1}createParentElementNode(){return ai()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){To();const n=this.getPreviousSibling(),r=this.getParentOrThrow();if(null===n)return r.select(0,0);if(Vo(n))return n.select();if(!Or(n)){const e=n.getIndexWithinParent()+1;return r.select(e,e)}return n.select(e,t)}selectNext(e,t){To();const n=this.getNextSibling(),r=this.getParentOrThrow();if(null===n)return r.select();if(Vo(n))return n.select(0,0);if(!Or(n)){const e=n.getIndexWithinParent();return r.select(e,e)}return n.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}}const sr="historic",ar="history-merge",lr="collaboration",cr="skip-scroll-into-view",ur="skip-dom-selection",dr="skip-selection-focus";class fr extends ir{static getType(){return"linebreak"}static clone(e){return new fr(e.__key)}constructor(e){super(e)}getTextContent(){return"\n"}createDOM(){return document.createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:e=>function(e){const t=e.parentElement;if(null!==t&&Os(t)){const n=t.firstChild;if(n===e||n.nextSibling===e&&mr(n)){const n=t.lastChild;if(n===e||n.previousSibling===e&&mr(n))return!0}}return!1}(e)||function(e){const t=e.parentElement;if(null!==t&&Os(t)){const n=t.firstChild;if(n===e||n.nextSibling===e&&mr(n))return!1;const r=t.lastChild;if(r===e||r.previousSibling===e&&mr(r))return!0}return!1}(e)?null:{conversion:pr,priority:0}}}static importJSON(e){return hr().updateFromJSON(e)}}function pr(e){return{node:hr()}}function hr(){return Ss(new fr)}function gr(e){return e instanceof fr}function mr(e){return Li(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}function vr(e,t){return 16&t?"code":128&t?"mark":32&t?"sub":64&t?"sup":null}function br(e,t){return 1&t?"strong":2&t?"em":"span"}function yr(e,t,n,r,o){const i=r.classList;let s=ls(o,"base");void 0!==s&&i.add(...s),s=ls(o,"underlineStrikethrough");let a=!1;const l=8&t&&4&t;void 0!==s&&(8&n&&4&n?(a=!0,l||i.add(...s)):l&&i.remove(...s));for(const e in pe){const r=pe[e];if(s=ls(o,e),void 0!==s)if(n&r){if(a&&("underline"===e||"strikethrough"===e)){t&r&&i.remove(...s);continue}(0===(t&r)||l&&"underline"===e||"strikethrough"===e)&&i.add(...s)}else t&r&&i.remove(...s)}}function xr(e,t,n){const r=t.firstChild,o=n.isComposing(),i=e+(o?ue:"");if(null==r)t.textContent=i;else{const e=r.nodeValue;if(e!==i)if(o||Y){const[t,n,o]=function(e,t){const n=e.length,r=t.length;let o=0,i=0;for(;o<n&&o<r&&e[o]===t[o];)o++;for(;i+o<n&&i+o<r&&e[n-i-1]===t[r-i-1];)i++;return[o,n-o-i,t.slice(o,r-i)]}(e,i);0!==n&&r.deleteData(t,n),r.insertData(t,o)}else r.nodeValue=i}}function _r(e,t,n,r,o,i){xr(o,e,t);const s=i.theme.text;void 0!==s&&yr(0,0,r,e,s)}function wr(e,t){const n=document.createElement(t);return n.appendChild(e),n}class Sr extends ir{__text;__format;__style;__mode;__detail;static getType(){return"text"}static clone(e){return new Sr(e.__text,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text,this.__format=e.__format,this.__style=e.__style,this.__mode=e.__mode,this.__detail=e.__detail}constructor(e="",t){super(t),this.__text=e,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const e=this.getLatest();return be[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return 1===this.getLatest().__mode}isComposing(){return this.__key===Di()}isSegmented(){return 2===this.getLatest().__mode}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){const t=pe[e];return 0!==(this.getFormat()&t)}isSimpleText(){return"text"===this.__type&&0===this.__mode}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return Ni(this.getLatest().__format,e,t)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,t){const n=this.__format,r=vr(0,n),o=br(0,n),i=null===r?o:r,s=document.createElement(i);let a=s;this.hasFormat("code")&&s.setAttribute("spellcheck","false"),null!==r&&(a=document.createElement(o),s.appendChild(a));_r(a,this,0,n,this.__text,e);const l=this.__style;return""!==l&&(s.style.cssText=l),s}updateDOM(e,t,n){const r=this.__text,o=e.__format,i=this.__format,s=vr(0,o),a=vr(0,i),l=br(0,o),c=br(0,i);if((null===s?l:s)!==(null===a?c:a))return!0;if(s===a&&l!==c){const e=t.firstChild;null==e&&W("updateDOM: prevInnerDOM is null or undefined");const o=document.createElement(c);return _r(o,this,0,i,r,n),t.replaceChild(o,e),!1}let u=t;null!==a&&null!==s&&(u=t.firstChild,null==u&&W("updateDOM: innerDOM is null or undefined")),xr(r,u,this);const d=n.theme.text;void 0!==d&&o!==i&&yr(0,o,i,u,d);const f=e.__style,p=this.__style;return f!==p&&(t.style.cssText=p),!1}static importDOM(){return{"#text":()=>({conversion:Ar,priority:0}),b:()=>({conversion:Cr,priority:0}),code:()=>({conversion:Rr,priority:0}),em:()=>({conversion:Rr,priority:0}),i:()=>({conversion:Rr,priority:0}),mark:()=>({conversion:Rr,priority:0}),s:()=>({conversion:Rr,priority:0}),span:()=>({conversion:kr,priority:0}),strong:()=>({conversion:Rr,priority:0}),sub:()=>({conversion:Rr,priority:0}),sup:()=>({conversion:Rr,priority:0}),u:()=>({conversion:Rr,priority:0})}}static importJSON(e){return Nr().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTextContent(e.text).setFormat(e.format).setDetail(e.detail).setMode(e.mode).setStyle(e.style)}exportDOM(e){let{element:t}=super.exportDOM(e);return Ls(t)||W("Expected TextNode createDOM to always return a HTMLElement"),t.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?t.style.textTransform="lowercase":this.hasFormat("uppercase")?t.style.textTransform="uppercase":this.hasFormat("capitalize")&&(t.style.textTransform="capitalize"),this.hasFormat("bold")&&(t=wr(t,"b")),this.hasFormat("italic")&&(t=wr(t,"i")),this.hasFormat("strikethrough")&&(t=wr(t,"s")),this.hasFormat("underline")&&(t=wr(t,"u")),{element:t}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(e,t){}setFormat(e){const t=this.getWritable();return t.__format="string"==typeof e?pe[e]:e,t}setDetail(e){const t=this.getWritable();return t.__detail="string"==typeof e?he[e]:e,t}setStyle(e){const t=this.getWritable();return t.__style=e,t}toggleFormat(e){const t=Ni(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){const e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){const e=this.getWritable();return e.__detail^=2,e}setMode(e){const t=ve[e];if(this.__mode===t)return this;const n=this.getWritable();return n.__mode=t,n}setTextContent(e){if(this.__text===e)return this;const t=this.getWritable();return t.__text=e,t}select(e,t){To();let n=e,r=t;const o=ao(),i=this.getTextContent(),s=this.__key;if("string"==typeof i){const e=i.length;void 0===n&&(n=e),void 0===r&&(r=e)}else n=0,r=0;if(!Wr(o))return no(s,n,s,r,"text","text");{const e=Di();e!==o.anchor.key&&e!==o.focus.key||ji(s),o.setTextNodeRange(this,n,this,r)}return o}selectStart(){return this.select(0,0)}selectEnd(){const e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,n,r){const o=this.getWritable(),i=o.__text,s=n.length;let a=e;a<0&&(a=s+a,a<0&&(a=0));const l=ao();if(r&&Wr(l)){const t=e+s;l.setTextNodeRange(o,t,o,t)}const c=i.slice(0,a)+n+i.slice(a+t);return o.__text=c,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){To();const t=this.getLatest(),n=t.getTextContent();if(""===n)return[];const r=t.__key,o=Di(),i=n.length;e.sort((e,t)=>e-t),e.push(i);const s=[],a=e.length;for(let t=0,r=0;t<i&&r<=a;r++){const o=e[r];o>t&&(s.push(n.slice(t,o)),t=o)}const l=s.length;if(1===l)return[t];const c=s[0],u=t.getParent();let d;const f=t.getFormat(),p=t.getStyle(),h=t.__detail;let g=!1,m=null,v=null;const b=ao();if(Wr(b)){const[e,t]=b.isBackward()?[b.focus,b.anchor]:[b.anchor,b.focus];"text"===e.type&&e.key===r&&(m=e),"text"===t.type&&t.key===r&&(v=t)}t.isSegmented()?(d=Nr(c),d.__format=f,d.__style=p,d.__detail=h,d.__state=De(t,d),g=!0):d=t.setTextContent(c);const y=[d];for(let e=1;e<l;e++){const n=Nr(s[e]);n.__format=f,n.__style=p,n.__detail=h,n.__state=De(t,n);const i=n.__key;o===r&&ji(i),y.push(n)}const x=m?m.offset:null,_=v?v.offset:null;let w=0;for(const e of y){if(!m&&!v)break;const t=w+e.getTextContentSize();if(null!==m&&null!==x&&x<=t&&x>=w&&(m.set(e.getKey(),x-w,"text"),x<t&&(m=null)),null!==v&&null!==_&&_<=t&&_>=w){v.set(e.getKey(),_-w,"text");break}w=t}if(null!==u){!function(e){const t=e.getPreviousSibling(),n=e.getNextSibling();null!==t&&zi(t);null!==n&&zi(n)}(this);const e=u.getWritable(),t=this.getIndexWithinParent();g?(e.splice(t,0,y),this.remove()):e.splice(t,1,y),Wr(b)&&co(b,u,t,l-1)}return y}mergeWithSibling(e){const t=e===this.getPreviousSibling();t||e===this.getNextSibling()||W("mergeWithSibling: sibling must be a previous or next sibling");const n=this.__key,r=e.__key,o=this.__text,i=o.length;Di()===r&&ji(n);const s=ao();if(Wr(s)){const o=s.anchor,a=s.focus;null!==o&&o.key===r&&po(o,t,n,e,i),null!==a&&a.key===r&&po(a,t,n,e,i)}const a=e.__text,l=t?a+o:o+a;this.setTextContent(l);const c=this.getWritable();return e.remove(),c}isTextEntity(){return!1}}function kr(e){return{forChild:Pr(e.style),node:null}}function Cr(e){const t=e,n="normal"===t.style.fontWeight;return{forChild:Pr(t.style,n?void 0:"bold"),node:null}}const Er=new WeakMap;function Tr(e){if(!Ls(e))return!1;if("PRE"===e.nodeName)return!0;const t=e.style.whiteSpace;return"string"==typeof t&&t.startsWith("pre")}function Ar(e){const t=e;null===e.parentElement&&W("Expected parentElement of Text not to be null");let n=t.textContent||"";if(null!==function(e){let t,n=e.parentNode;const r=[e];for(;null!==n&&void 0===(t=Er.get(n))&&!Tr(n);)r.push(n),n=n.parentNode;const o=void 0===t?n:t;for(let e=0;e<r.length;e++)Er.set(r[e],o);return o}(t)){const e=n.split(/(\r?\n|\t)/),t=[],r=e.length;for(let n=0;n<r;n++){const r=e[n];"\n"===r||"\r\n"===r?t.push(hr()):"\t"===r?t.push(zr()):""!==r&&t.push(Nr(r))}return{node:t}}if(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," "),""===n)return{node:null};if(" "===n[0]){let e=t,r=!0;for(;null!==e&&null!==(e=Lr(e,!1));){const t=e.textContent||"";if(t.length>0){/[ \t\n]$/.test(t)&&(n=n.slice(1)),r=!1;break}}r&&(n=n.slice(1))}if(" "===n[n.length-1]){let e=t,r=!0;for(;null!==e&&null!==(e=Lr(e,!0));){if((e.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){r=!1;break}}r&&(n=n.slice(0,n.length-1))}return""===n?{node:null}:{node:Nr(n)}}function Lr(e,t){let n=e;for(;;){let e;for(;null===(e=t?n.nextSibling:n.previousSibling);){const e=n.parentElement;if(null===e)return null;n=e}if(n=e,Ls(n)){const e=n.style.display;if(""===e&&!Ns(n)||""!==e&&!e.startsWith("inline"))return null}let r=n;for(;null!==(r=t?n.firstChild:n.lastChild);)n=r;if(Li(n))return n;if("BR"===n.nodeName)return null}}const Mr={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Rr(e){const t=Mr[e.nodeName.toLowerCase()];return void 0===t?{node:null}:{forChild:Pr(e.style,t),node:null}}function Nr(e=""){return Ss(new Sr(e))}function Or(e){return e instanceof Sr}function Pr(e,t){const n=e.fontWeight,r=e.textDecoration.split(" "),o="700"===n||"bold"===n,i=r.includes("line-through"),s="italic"===e.fontStyle,a=r.includes("underline"),l=e.verticalAlign;return e=>Or(e)?(o&&!e.hasFormat("bold")&&e.toggleFormat("bold"),i&&!e.hasFormat("strikethrough")&&e.toggleFormat("strikethrough"),s&&!e.hasFormat("italic")&&e.toggleFormat("italic"),a&&!e.hasFormat("underline")&&e.toggleFormat("underline"),"sub"!==l||e.hasFormat("subscript")||e.toggleFormat("subscript"),"super"!==l||e.hasFormat("superscript")||e.toggleFormat("superscript"),t&&!e.hasFormat(t)&&e.toggleFormat(t),e):e}class Ir extends Sr{static getType(){return"tab"}static clone(e){return new Ir(e.__key)}constructor(e){super("\t",e),this.__detail=2}static importDOM(){return null}createDOM(e){const t=super.createDOM(e),n=ls(e.theme,"tab");if(void 0!==n){t.classList.add(...n)}return t}static importJSON(e){return zr().updateFromJSON(e)}setTextContent(e){return"\t"!==e&&""!==e&&W("TabNode does not support setTextContent"),super.setTextContent("\t")}spliceText(e,t,n,r){return""===n&&0===t||"\t"===n&&1===t||W("TabNode does not support spliceText"),this}setDetail(e){return 2!==e&&W("TabNode does not support setDetail"),this}setMode(e){return"normal"!==e&&W("TabNode does not support setMode"),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function zr(){return Ss(new Ir)}function jr(e){return e instanceof Ir}class Dr{key;offset;type;_selection;constructor(e,t,n){Object.defineProperty(this,"_selection",{enumerable:!1,writable:!0}),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){if(this.key===e.key)return this.offset<e.offset;return xa(Oa(Ca(this,"next")),Oa(Ca(e,"next")))<0}getNode(){const e=Fi(this.key);return null===e&&W("Point.getNode: node not found"),e}set(e,t,n,r){const o=this._selection,i=this.key;if(!r||this.key!==e||this.offset!==t||this.type!==n){this.key=e,this.offset=t,this.type=n;{const t=Fi(e);("text"===n?Or(t):Vo(t))||W(`PointType.set: node with key ${e} is ${t?t.__type:"[not found]"} and can not be used for a ${n} point`)}Eo()||(Di()===i&&ji(e),null!==o&&(o.setCachedNodes(null),o.dirty=!0))}}}function Fr(e,t,n){return new Dr(e,t,n)}function Br(e,t){let n=t.__key,r=e.offset,o="element";if(Or(t)){o="text";const e=t.getTextContentSize();r>e&&(r=e)}else if(!Vo(t)){const e=t.getNextSibling();if(Or(e))n=e.__key,r=0,o="text";else{const e=t.getParent();e&&(n=e.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,o)}function $r(e,t){if(Vo(t)){const n=t.getLastDescendant();Vo(n)||Or(n)?Br(e,n):Br(e,t)}else Br(e,t)}class Hr{_nodes;_cachedNodes;dirty;constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!Ur(e))return!1;const t=this._nodes,n=e._nodes;return t.size===n.size&&Array.from(t).every(e=>n.has(e))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new Hr(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const t=this.getNodes(),n=t.length,r=t[n-1];let o;if(Or(r))o=r.select();else{const e=r.getIndexWithinParent()+1;o=r.getParentOrThrow().select(e,e)}o.insertNodes(e);for(let e=0;e<n;e++)t[e].remove()}getNodes(){const e=this._cachedNodes;if(null!==e)return e;const t=this._nodes,n=[];for(const e of t){const t=Fi(e);null!==t&&n.push(t)}return Eo()||(this._cachedNodes=n),n}getTextContent(){const e=this.getNodes();let t="";for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}deleteNodes(){const e=this.getNodes();if((ao()||lo())===this&&e[0]){const t=la(e[0],"next");Ta(ba(t,t))}for(const t of e)t.remove()}}function Wr(e){return e instanceof Kr}class Kr{format;style;anchor;focus;_cachedNodes;dirty;constructor(e,t,n,r){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this.format=n,this.style=r,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!Wr(e)&&(this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style)}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const e=this._cachedNodes;if(null!==e)return e;const t=function(e){const t=[],[n,r]=e.getTextSlices();n&&t.push(n.caret.origin);const o=new Set,i=new Set;for(const n of e)if(oa(n)){const{origin:e}=n;0===t.length?o.add(e):(i.add(e),t.push(e))}else{const{origin:e}=n;Vo(e)&&i.has(e)||t.push(e)}r&&t.push(r.caret.origin);if(ra(e.focus)&&Vo(e.focus.origin)&&null===e.focus.getNodeAtCaret())for(let n=fa(e.focus.origin,"previous");oa(n)&&o.has(n.origin)&&!n.origin.isEmpty()&&n.origin.is(t[t.length-1]);n=pa(n))o.delete(n.origin),t.pop();for(;t.length>1;){const e=t[t.length-1];if(!Vo(e)||i.has(e)||e.isEmpty()||o.has(e))break;t.pop()}if(0===t.length&&e.isCollapsed()){const n=Oa(e.anchor),r=Oa(e.anchor.getFlipped()),o=e=>na(e)?e.origin:e.getNodeAtCaret(),i=o(n)||o(r)||(e.anchor.getNodeAtCaret()?n.origin:r.origin);t.push(i)}return t}(za(La(this),"next"));return this.isCollapsed()&&t.length>1&&W(`RangeSelection.getNodes() returned ${String(t.length)} > 1 nodes in a collapsed selection`),Eo()||(this._cachedNodes=t),t}setTextNodeRange(e,t,n,r){this.anchor.set(e.__key,t,"text"),this.focus.set(n.__key,r,"text")}getTextContent(){const e=this.getNodes();if(0===e.length)return"";const t=e[0],n=e[e.length-1],r=this.anchor,o=this.focus,i=r.isBefore(o),[s,a]=Yr(this);let l="",c=!0;for(let u=0;u<e.length;u++){const d=e[u];if(Vo(d)&&!d.isInline())c||(l+="\n"),c=!d.isEmpty();else if(c=!1,Or(d)){let e=d.getTextContent();d===t?d===n?"element"===r.type&&"element"===o.type&&o.offset!==r.offset||(e=s<a?e.slice(s,a):e.slice(a,s)):e=i?e.slice(s):e.slice(a):d===n&&(e=i?e.slice(0,a):e.slice(0,s)),l+=e}else!Xo(d)&&!gr(d)||d===n&&this.isCollapsed()||(l+=d.getTextContent())}return l}applyDOMRange(e){const t=Mo(),n=t.getEditorState()._selection,r=eo(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n);if(null===r)return;const[o,i]=r;this.anchor.set(o.key,o.offset,o.type,!0),this.focus.set(i.key,i.offset,i.type,!0),He(this)}clone(){const e=this.anchor,t=this.focus;return new Kr(Fr(e.key,e.offset,e.type),Fr(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=Ni(this.format,e,null),this.dirty=!0}setFormat(e){this.format=e,this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){const t=pe[e];return 0!==(this.format&t)}insertRawText(e){const t=e.split(/(\r?\n|\t)/),n=[],r=t.length;for(let e=0;e<r;e++){const r=t[e];"\n"===r||"\r\n"===r?n.push(hr()):"\t"===r?n.push(zr()):n.push(Nr(r))}this.insertNodes(n)}insertText(e){const t=this.anchor,n=this.focus,r=this.format,o=this.style;let i=t,s=n;!this.isCollapsed()&&n.isBefore(t)&&(i=n,s=t),"element"===i.type&&function(e,t,n,r){const o=e.getNode(),i=o.getChildAtIndex(e.offset),s=Nr();if(s.setFormat(n),s.setStyle(r),li(i))i.splice(0,0,[s]);else{const e=Zo(o)?ai().append(s):s;null===i?o.append(e):i.insertBefore(e)}e.is(t)&&t.set(s.__key,0,"text"),e.set(s.__key,0,"text")}(i,s,r,o),"element"===s.type&&Ea(s,Oa(Ca(s,"next")));const a=i.offset;let l=s.offset;const c=this.getNodes(),u=c.length;let d=c[0];Or(d)||W("insertText: first node is not a text node");const f=d.getTextContent().length,p=d.getParentOrThrow();let h=c[u-1];if(1===u&&"element"===s.type&&(l=f,s.set(i.key,l,"text")),this.isCollapsed()&&a===f&&(Ai(d)||!d.canInsertTextAfter()||!p.canInsertTextAfter()&&null===d.getNextSibling())){let t=d.getNextSibling();if(Or(t)&&t.canInsertTextBefore()&&!Ai(t)||(t=Nr(),t.setFormat(r),t.setStyle(o),p.canInsertTextAfter()?d.insertAfter(t):p.insertAfter(t)),t.select(0,0),d=t,""!==e)return void this.insertText(e)}else if(this.isCollapsed()&&0===a&&(Ai(d)||!d.canInsertTextBefore()||!p.canInsertTextBefore()&&null===d.getPreviousSibling())){let t=d.getPreviousSibling();if(Or(t)&&!Ai(t)||(t=Nr(),t.setFormat(r),p.canInsertTextBefore()?d.insertBefore(t):p.insertBefore(t)),t.select(),d=t,""!==e)return void this.insertText(e)}else if(d.isSegmented()&&a!==f){const e=Nr(d.getTextContent());e.setFormat(r),d.replace(e),d=e}else if(!this.isCollapsed()&&""!==e){const t=h.getParent();if(!p.canInsertTextBefore()||!p.canInsertTextAfter()||Vo(t)&&(!t.canInsertTextBefore()||!t.canInsertTextAfter()))return this.insertText(""),Zr(this.anchor,this.focus,null),void this.insertText(e)}if(1===u){if(Ti(d)){const t=Nr(e);return t.select(),void d.replace(t)}const t=d.getFormat(),n=d.getStyle();if(a!==l||t===r&&n===o){if(jr(d)){const t=Nr(e);return t.setFormat(r),t.setStyle(o),t.select(),void d.replace(t)}}else{if(""!==d.getTextContent()){const t=Nr(e);if(t.setFormat(r),t.setStyle(o),t.select(),0===a)d.insertBefore(t,!1);else{const[e]=d.splitText(a);e.insertAfter(t,!1)}return void(t.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length))}d.setFormat(r),d.setStyle(o)}const i=l-a;d=d.spliceText(a,i,e,!0),""===d.getTextContent()?d.remove():"text"===this.anchor.type&&(d.isComposing()?this.anchor.offset-=e.length:(this.format=t,this.style=n))}else{const t=new Set([...d.getParentKeys(),...h.getParentKeys()]),n=Vo(d)?d:d.getParentOrThrow();let r=Vo(h)?h:h.getParentOrThrow(),o=h;if(!n.is(r)&&r.isInline())do{o=r,r=r.getParentOrThrow()}while(r.isInline());if("text"===s.type&&(0!==l||""===h.getTextContent())||"element"===s.type&&h.getIndexWithinParent()<l)if(Or(h)&&!Ti(h)&&l!==h.getTextContentSize()){if(h.isSegmented()){const e=Nr(h.getTextContent());h.replace(e),h=e}Zo(s.getNode())||"text"!==s.type||(h=h.spliceText(0,l,"")),t.add(h.__key)}else{const e=h.getParentOrThrow();e.canBeEmpty()||1!==e.getChildrenSize()?h.remove():e.remove()}else t.add(h.__key);const i=r.getChildren(),p=new Set(c),g=n.is(r),m=n.isInline()&&null===d.getNextSibling()?n:d;for(let e=i.length-1;e>=0;e--){const t=i[e];if(t.is(d)||Vo(t)&&t.isParentOf(d))break;t.isAttached()&&(!p.has(t)||t.is(o)?g||m.insertAfter(t,!1):t.remove())}if(!g){let e=r,n=null;for(;null!==e;){const r=e.getChildren(),o=r.length;(0===o||r[o-1].is(n))&&(t.delete(e.__key),n=e),e=e.getParent()}}if(Ti(d))if(a===f)d.select();else{const t=Nr(e);t.select(),d.replace(t)}else d=d.spliceText(a,f-a,e,!0),""===d.getTextContent()?d.remove():"text"===this.anchor.type&&(d.isComposing()?this.anchor.offset-=e.length:(this.format=d.getFormat(),this.style=d.getStyle()));for(let e=1;e<u;e++){const n=c[e],r=n.__key;t.has(r)||n.remove()}}}removeText(){const e=ao()===this,t=function(e,t="removeEmptySlices"){if(e.isCollapsed())return e;const n="root",r="next";let o=t;const i=za(e,r),s=Ra(i.anchor,n),a=Ra(i.focus.getFlipped(),n),l=new Set,c=[];for(const e of i.iterNodeCarets(n))if(oa(e))l.add(e.origin.getKey());else if(ra(e)){const{origin:t}=e;Vo(t)&&!l.has(t.getKey())||c.push(t)}for(const e of c)e.remove();for(const e of i.getTextSlices()){if(!e)continue;const{origin:t}=e.caret,n=t.getTextContentSize(),i=Ma(la(t,r)),l=t.getMode();if(Math.abs(e.distance)===n&&"removeEmptySlices"===o||"token"===l&&0!==e.distance)i.remove();else if(0!==e.distance){o="removeEmptySlices";let t=e.removeTextSlice();const n=e.caret.origin;if("segmented"===l){const e=t.origin,n=Nr(e.getTextContent()).setStyle(e.getStyle()).setFormat(e.getFormat());i.replaceOrInsert(n),t=ca(n,r,t.offset)}n.is(s[0].origin)&&(s[0]=t),n.is(a[0].origin)&&(a[0]=t.getFlipped())}}let u,d;for(const e of s)if(Na(e)){u=Oa(e);break}for(const e of a)if(Na(e)){d=Oa(e);break}const f=function(e,t,n){if(!e||!t)return null;const r=e.getParentAtCaret(),o=t.getParentAtCaret();if(!r||!o)return null;const i=r.getParents().reverse();i.push(r);const s=o.getParents().reverse();s.push(o);const a=Math.min(i.length,s.length);let l;for(l=0;l<a&&i[l]===s[l];l++);const c=(e,t)=>{let n;for(let r=l;r<e.length;r++){const o=e[r];if(_s(o))return;!n&&t(o)&&(n=o)}return n},u=c(i,Ps),d=u&&c(s,e=>n.has(e.getKey())&&Ps(e));return u&&d?[u,d]:null}(u,d,l);if(f){const[e,t]=f;fa(e,"previous").splice(0,t.getChildren()),t.remove()}const p=[u,d,...s,...a].find(Na);if(p){return va(Ia(Oa(p),e.direction))}W(`$removeTextFromCaretRange: selection was lost, could not find a new anchor given candidates with keys: ${JSON.stringify(s.map(e=>e.origin.__key))}`)}(La(this));Aa(this,t),e&&ao()!==this&&Yi(this)}formatText(e,t=null){if(this.isCollapsed())return this.toggleFormat(e),void ji(null);const n=this.getNodes(),r=[];for(const e of n)Or(e)&&r.push(e);const o=t=>{n.forEach(n=>{if(Vo(n)){const r=n.getFormatFlags(e,t);n.setTextFormat(r)}})},i=r.length;if(0===i)return this.toggleFormat(e),ji(null),void o(t);const s=this.anchor,a=this.focus,l=this.isBackward(),c=l?a:s,u=l?s:a;let d=0,f=r[0],p="element"===c.type?0:c.offset;if("text"===c.type&&p===f.getTextContentSize()&&(d=1,f=r[1],p=0),null==f)return;const h=f.getFormatFlags(e,t);o(h);const g=i-1;let m=r[g];const v="text"===u.type?u.offset:m.getTextContentSize();if(f.is(m)){if(p===v)return;if(Ai(f)||0===p&&v===f.getTextContentSize())f.setFormat(h);else{const e=f.splitText(p,v),t=0===p?e[0]:e[1];t.setFormat(h),"text"===c.type&&c.set(t.__key,0,"text"),"text"===u.type&&u.set(t.__key,v-p,"text")}return void(this.format=h)}0===p||Ai(f)||([,f]=f.splitText(p),p=0),f.setFormat(h);const b=m.getFormatFlags(e,h);v>0&&(v===m.getTextContentSize()||Ai(m)||([m]=m.splitText(v)),m.setFormat(b));for(let t=d+1;t<g;t++){const n=r[t],o=n.getFormatFlags(e,b);n.setFormat(o)}"text"===c.type&&c.set(f.__key,p,"text"),"text"===u.type&&u.set(m.__key,v,"text"),this.format=h|b}insertNodes(e){if(0===e.length)return;if(this.isCollapsed()||this.removeText(),"root"===this.anchor.key){this.insertParagraph();const t=ao();return Wr(t)||W("Expected RangeSelection after insertParagraph"),t.insertNodes(e)}const t=(this.isBackward()?this.focus:this.anchor).getNode(),n=Ys(t,Ps),r=e[e.length-1];if(Vo(n)&&"__language"in n){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const t=vo(this);n.splice(t,0,e),r.selectEnd()}return}if(!e.some(e=>(Vo(e)||Xo(e))&&!e.isInline())){Vo(n)||W(`Expected node ${t.constructor.name} of type ${t.getType()} to have a block ElementNode ancestor`);const o=vo(this);return n.splice(o,0,e),void r.selectEnd()}const o=function(e){const t=ai();let n=null;for(let r=0;r<e.length;r++){const o=e[r],i=gr(o);if(i||Xo(o)&&o.isInline()||Vo(o)&&o.isInline()||Or(o)||o.isParentRequired()){if(null===n&&(n=o.createParentElementNode(),t.append(n),i))continue;null!==n&&n.append(o)}else t.append(o),n=null}return t}(e),i=o.getLastDescendant(),s=o.getChildren(),a=!Vo(n)||!n.isEmpty()?this.insertParagraph():null,l=s[s.length-1];let c=s[0];(e=>Vo(e)&&Ps(e)&&!e.isEmpty()&&Vo(n)&&(!n.isEmpty()||n.canMergeWhenEmpty()))(c)&&(Vo(n)||W(`Expected node ${t.constructor.name} of type ${t.getType()} to have a block ElementNode ancestor`),n.append(...c.getChildren()),c=s[1]),c&&(null===n&&W(`Expected node ${t.constructor.name} of type ${t.getType()} to have a block ancestor`),function(e,t){const n=t.getParentOrThrow().getLastChild();let r=t;const o=[t];for(;r!==n;)r.getNextSibling()||W("insertRangeAfter: lastToInsert must be a later sibling of firstToInsert"),r=r.getNextSibling(),o.push(r);let i=e;for(const e of o)i=i.insertAfter(e)}(n,c));const u=Ys(i,Ps);a&&Vo(u)&&(a.canMergeWhenEmpty()||Ps(l))&&(u.append(...a.getChildren()),a.remove()),Vo(n)&&n.isEmpty()&&n.remove(),i.selectEnd();const d=Vo(n)?n.getLastChild():null;gr(d)&&u!==n&&d.remove()}insertParagraph(){if("root"===this.anchor.key){const e=ai();return Ui().splice(this.anchor.offset,0,[e]),e.select(),e}const e=vo(this),t=Ys(this.anchor.getNode(),Ps);Vo(t)||W("Expected ancestor to be a block ElementNode");const n=t.getChildAtIndex(e),r=n?[n,...n.getNextSiblings()]:[],o=t.insertNewAfter(this,!1);return o?(o.append(...r),o.selectStart(),o):null}insertLineBreak(e){const t=hr();if(this.insertNodes([t]),e){const e=t.getParentOrThrow(),n=t.getIndexWithinParent();e.select(n,n)}}extract(){const e=[...this.getNodes()],t=e.length;let n=e[0],r=e[t-1];const[o,i]=Yr(this),s=this.isBackward(),[a,l]=s?[this.focus,this.anchor]:[this.anchor,this.focus],[c,u]=s?[i,o]:[o,i];if(0===t)return[];if(1===t){if(Or(n)&&!this.isCollapsed()){const e=n.splitText(c,u),t=0===c?e[0]:e[1];return t?(a.set(t.getKey(),0,"text"),l.set(t.getKey(),t.getTextContentSize(),"text"),[t]):[]}return[n]}if(Or(n)&&(c===n.getTextContentSize()?e.shift():0!==c&&([,n]=n.splitText(c),e[0]=n,a.set(n.getKey(),0,"text"))),Or(r)){const t=r.getTextContent().length;0===u?e.pop():u!==t&&([r]=r.splitText(u),e[e.length-1]=r,l.set(r.getKey(),r.getTextContentSize(),"text"))}return e}modify(e,t,n){if(yo(this,e,t,n))return;const r="move"===e,o=Mo(),i=Ts(xs(o));if(!i)return;const s=o._blockCursorElement,a=o._rootElement,l=this.focus.getNode();if(null===a||null===s||!Vo(l)||l.isInline()||l.canBeEmpty()||Es(s,o,a),this.dirty){let e=gs(o,this.anchor.key),t=gs(o,this.focus.key);"text"===this.anchor.type&&(e=Ri(e)),"text"===this.focus.type&&(t=Ri(t)),e&&t&&ho(i,e,this.anchor.offset,t,this.focus.offset)}if(function(e,t,n,r){e.modify(t,n,r)}(i,e,t?"backward":"forward",n),i.rangeCount>0){const e=i.getRangeAt(0),n=this.anchor.getNode(),o=Zo(n)?n:function(e){let t=e.getParentOrThrow();for(;null!==t;){if(_s(t))return t;t=t.getParentOrThrow()}return t}(n);if(this.applyDOMRange(e),this.dirty=!0,!r){const n=this.getNodes(),r=[];let s=!1;for(let e=0;e<n.length;e++){const t=n[e];bs(t,o)?r.push(t):s=!0}if(s&&r.length>0)if(t){const e=r[0];Vo(e)?e.selectStart():e.getParentOrThrow().selectStart()}else{const e=r[r.length-1];Vo(e)?e.selectEnd():e.getParentOrThrow().selectEnd()}i.anchorNode===e.startContainer&&i.anchorOffset===e.startOffset||function(e){const t=e.focus,n=e.anchor,r=n.key,o=n.offset,i=n.type;n.set(t.key,t.offset,t.type,!0),t.set(r,o,i,!0)}(this)}}"lineboundary"===n&&yo(this,e,t,n,"decorators")}forwardDeletion(e,t,n){if(!n&&("element"===e.type&&Vo(t)&&e.offset===t.getChildrenSize()||"text"===e.type&&e.offset===t.getTextContentSize())){const e=t.getParent(),n=t.getNextSibling()||(null===e?null:e.getNextSibling());if(Vo(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(e){const t=this.isCollapsed();if(this.isCollapsed()){const t=this.anchor;let n=t.getNode();if(this.forwardDeletion(t,n,e))return;const r=ma(Ca(t,e?"previous":"next"));if(r.getTextSlices().every(e=>null===e||0===e.distance)){let e={type:"initial"};for(const t of r.iterNodeCarets("shadowRoot"))if(oa(t))if(t.origin.isInline());else{if(t.origin.isShadowRoot()){if("merge-block"===e.type)break;if(Vo(r.anchor.origin)&&r.anchor.origin.isEmpty()){const e=Oa(t);Aa(this,ba(e,e)),r.anchor.origin.remove()}return}"merge-next-block"!==e.type&&"merge-block"!==e.type||(e={block:e.block,caret:t,type:"merge-block"})}else{if("merge-block"===e.type)break;if(ra(t)){if(Vo(t.origin)){if(t.origin.isInline()){if(!t.origin.isParentOf(r.anchor.origin))break}else e={block:t.origin,type:"merge-next-block"};continue}if(Xo(t.origin)){if(t.origin.isIsolated());else if("merge-next-block"===e.type&&(t.origin.isKeyboardSelectable()||!t.origin.isInline())&&Vo(r.anchor.origin)&&r.anchor.origin.isEmpty()){r.anchor.origin.remove();const e=oo();e.add(t.origin.getKey()),Yi(e)}else t.origin.remove();return}break}}if("merge-block"===e.type){const{caret:t,block:n}=e;return Aa(this,ba(!t.origin.isEmpty()&&n.isEmpty()?Ma(la(n,t.direction)):r.anchor,t)),this.removeText()}}const o=this.focus;if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&0===t.offset&&Vr(this,t.getNode()))return}else{const r="text"===o.type?o.getNode():null;if(n="text"===t.type?t.getNode():null,null!==r&&r.isSegmented()){const t=o.offset,i=r.getTextContentSize();if(r.is(n)||e&&t!==i||!e&&0!==t)return void qr(r,e,t)}else if(null!==n&&n.isSegmented()){const o=t.offset,i=n.getTextContentSize();if(n.is(r)||e&&0!==o||!e&&o!==i)return void qr(n,e,o)}!function(e,t){const n=e.anchor,r=e.focus,o=n.getNode(),i=r.getNode();if(o===i&&"text"===n.type&&"text"===r.type){const e=n.offset,i=r.offset,s=e<i,a=s?e:i,l=s?i:e,c=l-1;if(a!==c){(function(e){e.length>1||W("shouldDeleteExactlyOneCodeUnit: expecting to be called only with sequences of two or more code units");return!(Ji(e)||Jr(e))})(o.getTextContent().slice(a,l))&&(t?r.set(r.key,c,r.type):n.set(n.key,c,n.type))}}}(this,e)}}if(this.removeText(),e&&!t&&this.isCollapsed()&&"element"===this.anchor.type&&0===this.anchor.offset){const e=this.anchor.getNode();e.isEmpty()&&Zo(e.getParent())&&null===e.getPreviousSibling()&&Vr(this,e)}}deleteLine(e){this.isCollapsed()&&this.modify("extend",e,"lineboundary"),this.isCollapsed()?this.deleteCharacter(e):this.removeText()}deleteWord(e){if(this.isCollapsed()){const t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;this.modify("extend",e,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function Ur(e){return e instanceof Hr}function Gr(e){const t=e.offset;if("text"===e.type)return t;const n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function Yr(e){const t=e.getStartEndPoints();if(null===t)return[0,0];const[n,r]=t;return"element"===n.type&&"element"===r.type&&n.key===r.key&&n.offset===r.offset?[0,0]:[Gr(n),Gr(r)]}function Vr(e,t){for(let n=t;n;n=n.getParent()){if(Vo(n)){if(n.collapseAtStart(e))return!0;if(_s(n))break}if(n.getPreviousSibling())break}return!1}const Jr=(()=>{try{const e=new RegExp("\\p{Emoji}","u"),t=e.test.bind(e);if(t("❤️")&&t("#️⃣")&&t("👍"))return t}catch(e){}return()=>!1})();function qr(e,t,n){const r=e,o=r.getTextContent().split(/(?=\s)/g),i=o.length;let s=0,a=0;for(let e=0;e<i;e++){const r=e===i-1;if(a=s,s+=o[e].length,t&&s===n||s>n||r){o.splice(e,1),r&&(a=void 0);break}}const l=o.join("").trim();""===l?r.remove():(r.setTextContent(l),r.select(a,a))}function Xr(e,t,n,r){let o,i=t;if(Ls(e)){let s=!1;const a=e.childNodes,l=a.length,c=r._blockCursorElement;i===l&&(s=!0,i=l-1);let u=a[i],d=!1;if(u===c)u=a[i+1],d=!0;else if(null!==c){const n=c.parentNode;if(e===n){t>Array.prototype.indexOf.call(n.children,c)&&i--}}if(o=Vi(u),Or(o))i=ua(o,s?"next":"previous");else{let a=Vi(e);if(null===a)return null;if(Vo(a)){const l=r.getElementByKey(a.getKey());null===l&&W("$internalResolveSelectionPoint: node in DOM but not keyToDOMMap");const c=a.getDOMSlot(l);[a,i]=c.resolveChildIndex(a,l,e,t),Vo(a)||W("$internalResolveSelectionPoint: resolvedElement is not an ElementNode"),s&&i>=a.getChildrenSize()&&(i=Math.max(0,a.getChildrenSize()-1));let u=a.getChildAtIndex(i);if(Vo(u)&&function(e,t,n){const r=e.getParent();return null===n||null===r||!r.canBeEmpty()||r!==n.getNode()}(u,0,n)){const e=s?u.getLastDescendant():u.getFirstDescendant();null===e?a=u:(u=e,a=Vo(u)?u:u.getParentOrThrow()),i=0}Or(u)?(o=u,a=null,i=ua(u,s?"next":"previous")):u!==a&&s&&!d&&(Vo(a)||W("invariant"),i=Math.min(a.getChildrenSize(),i+1))}else{const n=a.getIndexWithinParent();i=0===t&&Xo(a)&&Vi(e)===a?n:n+1,a=a.getParentOrThrow()}if(Vo(a))return Fr(a.__key,i,"element")}}else o=Vi(e);return Or(o)?Fr(o.__key,ua(o,i,"clamp"),"text"):null}function Qr(e,t,n){const r=e.offset,o=e.getNode();if(0===r){const r=o.getPreviousSibling(),i=o.getParent();if(t){if((n||!t)&&null===r&&Vo(i)&&i.isInline()){const t=i.getPreviousSibling();Or(t)&&e.set(t.__key,t.getTextContent().length,"text")}}else Vo(r)&&!n&&r.isInline()?e.set(r.__key,r.getChildrenSize(),"element"):Or(r)&&e.set(r.__key,r.getTextContent().length,"text")}else if(r===o.getTextContent().length){const r=o.getNextSibling(),i=o.getParent();if(t&&Vo(r)&&r.isInline())e.set(r.__key,0,"element");else if((n||t)&&null===r&&Vo(i)&&i.isInline()&&!i.canInsertTextAfter()){const t=i.getNextSibling();Or(t)&&e.set(t.__key,0,"text")}}}function Zr(e,t,n){if("text"===e.type&&"text"===t.type){const r=e.isBefore(t),o=e.is(t);Qr(e,r,o),Qr(t,!r,o),o&&t.set(e.key,e.offset,e.type);const i=Mo();if(i.isComposing()&&i._compositionKey!==e.key&&Wr(n)){const r=n.anchor,o=n.focus;e.set(r.key,r.offset,r.type,!0),t.set(o.key,o.offset,o.type,!0)}}}function eo(e,t,n,r,o,i){if(null===e||null===n||!Si(o,e,n))return null;const s=Xr(e,t,Wr(i)?i.anchor:null,o);if(null===s)return null;const a=Xr(n,r,Wr(i)?i.focus:null,o);if(null===a)return null;if(so("anchor",s),so("focus",a),"element"===s.type&&"element"===a.type){const t=Vi(e),r=Vi(n);if(Xo(t)&&Xo(r))return null}return Zr(s,a,i),[s,a]}function to(e){return Vo(e)&&!e.isInline()}function no(e,t,n,r,o,i){const s=Lo(),a=new Kr(Fr(e,t,o),Fr(n,r,i),0,"");return a.dirty=!0,s._selection=a,a}function ro(){const e=Fr("root",0,"element"),t=Fr("root",0,"element");return new Kr(e,t,0,"")}function oo(){return new Hr(new Set)}function io(e,t,n,r){const o=n._window;if(null===o)return null;const i=r||o.event,s=i?i.type:void 0,a="selectionchange"===s,l=!_e&&(a||"beforeinput"===s||"compositionstart"===s||"compositionend"===s||"click"===s&&i&&3===i.detail||"drop"===s||void 0===s);let c,u,d,f;if(Wr(e)&&!l)return e.clone();if(null===t)return null;if(c=t.anchorNode,u=t.focusNode,d=t.anchorOffset,f=t.focusOffset,(a||void 0===s)&&Wr(e)&&!Si(n,c,u))return e.clone();const p=eo(c,d,u,f,n,e);if(null===p)return null;const[h,g]=p;return new Kr(h,g,Wr(e)?e.format:0,Wr(e)?e.style:"")}function so(e,t){const n=Fi(t.key);if(void 0===n&&W(`$validatePoint: ${e} key ${t.key} not found in current editorState`),"text"===t.type){Or(n)||W(`$validatePoint: ${e} key ${t.key} is not a TextNode`);const r=n.getTextContentSize();t.offset<=r||W(`$validatePoint: ${e} point.offset > node.getTextContentSize() (${String(t.offset)} > ${String(r)})`)}else{Vo(n)||W(`$validatePoint: ${e} key ${t.key} is not an ElementNode`);const r=n.getChildrenSize();t.offset<=r||W(`$validatePoint: ${e} point.offset > node.getChildrenSize() (${String(t.offset)} > ${String(r)})`)}}function ao(){return Lo()._selection}function lo(){return Mo()._editorState._selection}function co(e,t,n,r=1){const o=e.anchor,i=e.focus,s=o.getNode(),a=i.getNode();if(!t.is(s)&&!t.is(a))return;const l=t.__key;if(e.isCollapsed()){const t=o.offset;if(n<=t&&r>0||n<t&&r<0){const n=Math.max(0,t+r);o.set(l,n,"element"),i.set(l,n,"element"),uo(e)}}else{const s=e.isBackward(),a=s?i:o,c=a.getNode(),u=s?o:i,d=u.getNode();if(t.is(c)){const e=a.offset;(n<=e&&r>0||n<e&&r<0)&&a.set(l,Math.max(0,e+r),"element")}if(t.is(d)){const e=u.offset;(n<=e&&r>0||n<e&&r<0)&&u.set(l,Math.max(0,e+r),"element")}}uo(e)}function uo(e){const t=e.anchor,n=t.offset,r=e.focus,o=r.offset,i=t.getNode(),s=r.getNode();if(e.isCollapsed()){if(!Vo(i))return;const e=i.getChildrenSize(),o=n>=e,s=o?i.getChildAtIndex(e-1):i.getChildAtIndex(n);if(Or(s)){let e=0;o&&(e=s.getTextContentSize()),t.set(s.__key,e,"text"),r.set(s.__key,e,"text")}return}if(Vo(i)){const e=i.getChildrenSize(),r=n>=e,o=r?i.getChildAtIndex(e-1):i.getChildAtIndex(n);if(Or(o)){let e=0;r&&(e=o.getTextContentSize()),t.set(o.__key,e,"text")}}if(Vo(s)){const e=s.getChildrenSize(),t=o>=e,n=t?s.getChildAtIndex(e-1):s.getChildAtIndex(o);if(Or(n)){let e=0;t&&(e=n.getTextContentSize()),r.set(n.__key,e,"text")}}}function fo(e,t,n,r,o){let i=null,s=0,a=null;null!==r?(i=r.__key,Or(r)?(s=r.getTextContentSize(),a="text"):Vo(r)&&(s=r.getChildrenSize(),a="element")):null!==o&&(i=o.__key,Or(o)?a="text":Vo(o)&&(a="element")),null!==i&&null!==a?e.set(i,s,a):(s=t.getIndexWithinParent(),-1===s&&(s=n.getChildrenSize()),e.set(n.__key,s,"element"))}function po(e,t,n,r,o){"text"===e.type?e.set(n,e.offset+(t?0:o),"text"):e.offset>r.getIndexWithinParent()&&e.set(e.key,e.offset-1,"element")}function ho(e,t,n,r,o){try{e.setBaseAndExtent(t,n,r,o)}catch(e){console.warn(e)}}function go(e,t,n,r,o,i,s){const a=r.anchorNode,l=r.focusNode,c=r.anchorOffset,u=r.focusOffset,d=document.activeElement;if(o.has(lr)&&d!==i||null!==d&&wi(d))return;if(!Wr(t))return void(null!==e&&Si(n,a,l)&&r.removeAllRanges());const f=t.anchor,p=t.focus,h=f.key,g=p.key,m=gs(n,h),v=gs(n,g),b=f.offset,y=p.offset,x=t.format,_=t.style,w=t.isCollapsed();let S=m,k=v,C=!1;if("text"===f.type){S=Ri(m);const e=f.getNode();C=e.getFormat()!==x||e.getStyle()!==_}else Wr(e)&&"text"===e.anchor.type&&(C=!0);if("text"===p.type&&(k=Ri(v)),null!==S&&null!==k&&(w&&(null===e||C||Wr(e)&&(e.format!==x||e.style!==_))&&function(e,t,n,r,o){zn=[e,t,n,r,o]}(x,_,b,h,performance.now()),c!==b||u!==y||a!==S||l!==k||"Range"===r.type&&w||(null!==d&&i.contains(d)||o.has(dr)||i.focus({preventScroll:!0}),"element"===f.type))){if(ho(r,S,b,k,y),!Y||!t.isCollapsed()||null===i||o.has(dr)||null!==document.activeElement&&i.contains(document.activeElement)||i.focus({preventScroll:!0}),!o.has(cr)&&t.isCollapsed()&&null!==i&&i===document.activeElement){const e=Wr(t)&&"element"===t.anchor.type?S.childNodes[b]||null:r.rangeCount>0?r.getRangeAt(0):null;if(null!==e){let t;if(e instanceof Text){const n=document.createRange();n.selectNode(e),t=n.getBoundingClientRect()}else t=e.getBoundingClientRect();!function(e,t,n){const r=vs(n),o=ys(r);if(null===r||null===o)return;let{top:i,bottom:s}=t,a=0,l=0,c=n;for(;null!==c;){const t=c===r.body;if(t)a=0,l=xs(e).innerHeight;else{const e=c.getBoundingClientRect();a=e.top,l=e.bottom}let n=0;if(i<a?n=-(a-i):s>l&&(n=s-l),0!==n)if(t)o.scrollBy(0,n);else{const e=c.scrollTop;c.scrollTop+=n;const t=c.scrollTop-e;i-=t,s-=t}if(t)break;c=ms(c)}}(n,t,i)}}Ln=!0}}function mo(e){let t=ao()||lo();null===t&&(t=Ui().selectEnd()),t.insertNodes(e)}function vo(e){let t=e;e.isCollapsed()||t.removeText();const n=ao();Wr(n)&&(t=n),Wr(t)||W("Unexpected dirty selection to be null");const r=t.anchor;let o=r.getNode(),i=r.offset;for(;!Ps(o);){const e=o;if([o,i]=bo(o,i),e.is(o))break}return i}function bo(e,t){const n=e.getParent();if(!n){const e=ai();return Ui().append(e),e.select(),[Ui(),0]}if(Or(e)){const r=e.splitText(t);if(0===r.length)return[n,e.getIndexWithinParent()];const o=0===t?0:1;return[n,r[0].getIndexWithinParent()+o]}if(!Vo(e)||0===t)return[n,e.getIndexWithinParent()];const r=e.getChildAtIndex(t);if(r){const n=new Kr(Fr(e.__key,t,"element"),Fr(e.__key,t,"element"),0,""),o=e.insertNewAfter(n);o&&o.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}function yo(e,t,n,r,o="decorators-and-blocks"){if("move"===t&&"character"===r&&!e.isCollapsed()){const[t,r]=n===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return r.set(t.key,t.offset,t.type),!0}const i=Ca(e.focus,n?"previous":"next"),s="lineboundary"===r,a="move"===t;let l=i,c="decorators-and-blocks"===o;if(!Pa(l)){for(const e of l){c=!1;const{origin:t}=e;if(!Xo(t)||t.isIsolated()||(l=e,!s||!t.isInline()))break}if(c)for(const e of ma(i).iterNodeCarets("extend"===t?"shadowRoot":"root")){if(oa(e))e.origin.isInline()||(l=e);else{if(Vo(e.origin))continue;Xo(e.origin)&&!e.origin.isInline()&&(l=e)}break}}if(l===i)return!1;if(a&&!s&&Xo(l.origin)&&l.origin.isKeyboardSelectable()){const e=oo();return e.add(l.origin.getKey()),Yi(e),!0}return l=Oa(l),a&&Ea(e.anchor,l),Ea(e.focus,l),c||!s}let xo=null,_o=null,wo=!1,So=!1,ko=0;const Co={characterData:!0,childList:!0,subtree:!0};function Eo(){return wo||null!==xo&&xo._readOnly}function To(){wo&&W("Cannot use method in read-only mode.")}function Ao(){ko>99&&W("One or more transforms are endlessly triggering additional transforms. May have encountered infinite recursion caused by transforms that have their preconditions too lose and/or conflict with each other.")}function Lo(){return null===xo&&W(`Unable to find an active editor state. State helpers or node methods can only be used synchronously during the callback of editor.update(), editor.read(), or editorState.read().${Ro()}`),xo}function Mo(){return null===_o&&W(`Unable to find an active editor. This method can only be used synchronously during the callback of editor.update() or editor.read().${Ro()}`),_o}function Ro(){let e=0;const t=new Set,n=pi.version;if("undefined"!=typeof window)for(const r of document.querySelectorAll("[contenteditable]")){const o=Ei(r);if(ki(o))e++;else if(o){let e=String(o.constructor.version||"<0.17.1");e===n&&(e+=" (separately built, likely a bundler configuration issue)"),t.add(e)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),r}function No(){return _o}function Oo(e,t,n){const r=t.__type,o=bi(e,r);let i=n.get(r);void 0===i&&(i=Array.from(o.transforms),n.set(r,i));const s=i.length;for(let e=0;e<s&&(i[e](t),t.isAttached());e++);}function Po(e,t){return void 0!==e&&e.__key!==t&&e.isAttached()}function Io(e,t){if(!t)return;const n=e._updateTags;let r=t;Array.isArray(t)||(r=[t]);for(const e of r)n.add(e)}function zo(e){return jo(e,Mo()._nodes)}function jo(e,t){const n=e.type,r=t.get(n);void 0===r&&W(`parseEditorState: type "${n}" + not found`);const o=r.klass;e.type!==o.getType()&&W(`LexicalNode: Node ${o.name} does not implement .importJSON().`);const i=o.importJSON(e),s=e.children;if(Vo(i)&&Array.isArray(s))for(let e=0;e<s.length;e++){const n=jo(s[e],t);i.append(n)}return i}function Do(e,t,n){const r=xo,o=wo,i=_o;xo=t,wo=!0,_o=e;try{return n()}finally{xo=r,wo=o,_o=i}}function Fo(e){const t=e._nodeMap;t.set=()=>{throw new Error("Cannot call set() on a frozen Lexical node map")},t.clear=()=>{throw new Error("Cannot call clear() on a frozen Lexical node map")},t.delete=()=>{throw new Error("Cannot call delete() on a frozen Lexical node map")}}function Bo(e,t){const n=e._pendingEditorState,r=e._rootElement,o=e._headless||null===r;if(null===n)return;const i=e._editorState,s=i._selection,a=n._selection,l=0!==e._dirtyType,c=xo,u=wo,d=_o,f=e._updating,p=e._observer;let h=null;if(e._pendingEditorState=null,e._editorState=n,!o&&l&&null!==p){_o=e,xo=n,wo=!1,e._updating=!0;try{const t=e._dirtyType,r=e._dirtyElements,o=e._dirtyLeaves;p.disconnect(),h=wt(i,n,e,t,r,o)}catch(t){if(t instanceof Error&&e._onError(t),So)throw t;return ui(e,null,r,n),Me(e),e._dirtyType=2,So=!0,Bo(e,i),void(So=!1)}finally{p.observe(r,Co),e._updating=f,xo=c,wo=u,_o=d}}n._readOnly||(n._readOnly=!0,Fo(n),Wr(a)&&(Object.freeze(a.anchor),Object.freeze(a.focus)),Object.freeze(a));const g=e._dirtyLeaves,m=e._dirtyElements,v=e._normalizedNodes,b=e._updateTags,y=e._deferred;l&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set),function(e,t){const n=e._decorators;let r=e._pendingDecorators||n;const o=t._nodeMap;let i;for(i in r)o.has(i)||(r===n&&(r=Wi(e)),delete r[i])}(e,n);const x=o?null:Ts(xs(e));if(e._editable&&null!==x&&(l||null===a||a.dirty||!a.is(s))&&null!==r&&!b.has(ur)){_o=e,xo=n;try{if(null!==p&&p.disconnect(),l||null===a||a.dirty){const t=e._blockCursorElement;null!==t&&Es(t,e,r),go(s,a,e,x,b,r)}!function(e,t,n){let r=e._blockCursorElement;if(Wr(n)&&n.isCollapsed()&&"element"===n.anchor.type&&t.contains(document.activeElement)){const o=n.anchor,i=o.getNode(),s=o.offset;let a=!1,l=null;if(s===i.getChildrenSize()){Cs(i.getChildAtIndex(s-1))&&(a=!0)}else{const t=i.getChildAtIndex(s);if(null!==t&&Cs(t)){const n=t.getPreviousSibling();(null===n||Cs(n))&&(a=!0,l=e.getElementByKey(t.__key))}}if(a){const n=e.getElementByKey(i.__key);return null===r&&(e._blockCursorElement=r=function(e){const t=e.theme,n=document.createElement("div");n.contentEditable="false",n.setAttribute("data-lexical-cursor","true");let r=t.blockCursor;if(void 0!==r){if("string"==typeof r){const e=$a(r);r=t.blockCursor=e}void 0!==r&&n.classList.add(...r)}return n}(e._config)),t.style.caretColor="transparent",void(null===l?n.appendChild(r):n.insertBefore(r,l))}}null!==r&&Es(r,e,t)}(e,r,a)}finally{null!==p&&p.observe(r,Co),_o=d,xo=c}}null!==h&&function(e,t,n,r,o){const i=Array.from(e._listeners.mutation),s=i.length;for(let e=0;e<s;e++){const[s,a]=i[e];for(const e of a){const i=t.get(e);void 0!==i&&s(i,{dirtyLeaves:r,prevEditorState:o,updateTags:n})}}}(e,h,b,g,i),Wr(a)||null===a||null!==s&&s.is(a)||e.dispatchCommand(Ct,void 0);const _=e._pendingDecorators;null!==_&&(e._decorators=_,e._pendingDecorators=null,$o("decorator",e,!0,_)),function(e,t,n){const r=Ki(t),o=Ki(n);r!==o&&$o("textcontent",e,!0,o)}(e,t||i,n),$o("update",e,!0,{dirtyElements:m,dirtyLeaves:g,editorState:n,mutatedNodes:h,normalizedNodes:v,prevEditorState:t||i,tags:b}),function(e,t){if(e._deferred=[],0!==t.length){const n=e._updating;e._updating=!0;try{for(let e=0;e<t.length;e++)t[e]()}finally{e._updating=n}}}(e,y),function(e){const t=e._updates;if(0!==t.length){const n=t.shift();if(n){const[t,r]=n;Wo(e,t,r)}}}(e)}function $o(e,t,n,...r){const o=t._updating;t._updating=n;try{const n=Array.from(t._listeners[e]);for(let e=0;e<n.length;e++)n[e].apply(null,r)}finally{t._updating=o}}function Ho(e,t){const n=e._updates;let r=t||!1;for(;0!==n.length;){const t=n.shift();if(t){const[n,o]=t,i=e._pendingEditorState;let s;void 0!==o&&(s=o.onUpdate,o.skipTransforms&&(r=!0),o.discrete&&(null===i&&W("Unexpected empty pending editor state on discrete nested update"),i._flushSync=!0),s&&e._deferred.push(s),Io(e,o.tag)),null==i?Wo(e,n,o):n()}}return r}function Wo(e,t,n){const r=e._updateTags;let o,i=!1,s=!1;void 0!==n&&(o=n.onUpdate,Io(e,n.tag),i=n.skipTransforms||!1,s=n.discrete||!1),o&&e._deferred.push(o);const a=e._editorState;let l=e._pendingEditorState,c=!1;(null===l||l._readOnly)&&(l=e._pendingEditorState=ei(l||a),c=!0),l._flushSync=s;const u=xo,d=wo,f=_o,p=e._updating;xo=l,wo=!1,e._updating=!0,_o=e;const h=e._headless||null===e.getRootElement();gi(null);try{c&&(h?null!==a._selection&&(l._selection=a._selection.clone()):l._selection=function(e,t){const n=e.getEditorState()._selection,r=Ts(xs(e));return Wr(n)||null==n?io(n,r,e,t):n.clone()}(e,n&&n.event||null));const r=e._compositionKey;t(),i=Ho(e,i),function(e,t){const n=t.getEditorState()._selection,r=e._selection;if(Wr(r)){const e=r.anchor,t=r.focus;let o;if("text"===e.type&&(o=e.getNode(),o.selectionTransform(n,r)),"text"===t.type){const e=t.getNode();o!==e&&e.selectionTransform(n,r)}}}(l,e),0!==e._dirtyType&&(i?function(e,t){const n=t._dirtyLeaves,r=e._nodeMap;for(const e of n){const t=r.get(e);Or(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&$e(t)}}(l,e):function(e,t){const n=t._dirtyLeaves,r=t._dirtyElements,o=e._nodeMap,i=Di(),s=new Map;let a=n,l=a.size,c=r,u=c.size;for(;l>0||u>0;){if(l>0){t._dirtyLeaves=new Set;for(const e of a){const r=o.get(e);Or(r)&&r.isAttached()&&r.isSimpleText()&&!r.isUnmergeable()&&$e(r),void 0!==r&&Po(r,i)&&Oo(t,r,s),n.add(e)}if(a=t._dirtyLeaves,l=a.size,l>0){ko++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map,c.delete("root")&&c.set("root",!0);for(const e of c){const n=e[0],a=e[1];if(r.set(n,a),!a)continue;const l=o.get(n);void 0!==l&&Po(l,i)&&Oo(t,l,s)}a=t._dirtyLeaves,l=a.size,c=t._dirtyElements,u=c.size,ko++}t._dirtyLeaves=n,t._dirtyElements=r}(l,e),Ho(e),function(e,t,n,r){const o=e._nodeMap,i=t._nodeMap,s=[];for(const[e]of r){const t=i.get(e);void 0!==t&&(t.isAttached()||(Vo(t)&&xe(t,e,o,i,s,r),o.has(e)||r.delete(e),s.push(e)))}for(const e of s)i.delete(e);for(const e of n){const t=i.get(e);void 0===t||t.isAttached()||(o.has(e)||n.delete(e),i.delete(e))}}(a,l,e._dirtyLeaves,e._dirtyElements));r!==e._compositionKey&&(l._flushSync=!0);const o=l._selection;if(Wr(o)){const e=l._nodeMap,t=o.anchor.key,n=o.focus.key;void 0!==e.get(t)&&void 0!==e.get(n)||W("updateEditor: selection has been lost because the previously selected nodes have been removed and selection wasn't moved to another node. Ensure selection changes after removing/replacing a selected node.")}else Ur(o)&&0===o._nodes.size&&(l._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=a,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void Bo(e)}finally{xo=u,wo=d,_o=f,e._updating=p,ko=0}const g=0!==e._dirtyType||e._deferred.length>0||function(e,t){const n=t.getEditorState()._selection,r=e._selection;if(null!==r){if(r.dirty||!r.is(n))return!0}else if(null!==n)return!0;return!1}(l,e);g?l._flushSync?(l._flushSync=!1,Bo(e)):c&&xi(()=>{Bo(e)}):(l._flushSync=!1,c&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function Ko(e,t,n){_o===e&&void 0===n?t():Wo(e,t,n)}class Uo{element;before;after;constructor(e,t,n){this.element=e,this.before=t||null,this.after=n||null}withBefore(e){return new Uo(this.element,e,this.after)}withAfter(e){return new Uo(this.element,this.before,e)}withElement(e){return this.element===e?this:new Uo(e,this.before,this.after)}insertChild(e){const t=this.before||this.getManagedLineBreak();return null!==t&&t.parentElement!==this.element&&W("ElementDOMSlot.insertChild: before is not in element"),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&W("ElementDOMSlot.removeChild: dom is not in element"),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&W("ElementDOMSlot.replaceChild: prevDom is not in element"),this.element.replaceChild(e,t),this}getFirstChild(){const e=this.after?this.after.nextSibling:this.element.firstChild;return e===this.before||e===this.getManagedLineBreak()?null:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(null===e)this.removeManagedLineBreak();else{const t="decorator"===e&&(ee||q||J);this.insertManagedLineBreak(t)}}removeManagedLineBreak(){const e=this.getManagedLineBreak();if(e){const t=this.element,n="IMG"===e.nodeName?e.nextSibling:null;n&&t.removeChild(n),t.removeChild(e),t.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){const t=this.getManagedLineBreak();if(t){if(e===("IMG"===t.nodeName))return;this.removeManagedLineBreak()}const n=this.element,r=this.before,o=document.createElement("br");if(n.insertBefore(o,r),e){const e=document.createElement("img");e.setAttribute("data-lexical-linebreak","true"),e.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",e.alt="",n.insertBefore(e,o),n.__lexicalLineBreak=e}else n.__lexicalLineBreak=o}getFirstChildOffset(){let e=0;for(let t=this.after;null!==t;t=t.previousSibling)e++;return e}resolveChildIndex(e,t,n,r){if(n===this.element){const t=this.getFirstChildOffset();return[e,Math.min(t+e.getChildrenSize(),Math.max(t,r))]}const o=Go(t,n);o.push(r);const i=Go(t,this.element);let s=e.getIndexWithinParent();for(let e=0;e<i.length;e++){const t=o[e],n=i[e];if(void 0===t||t<n)break;if(t>n){s+=1;break}}return[e.getParentOrThrow(),s]}}function Go(e,t){const n=[];let r=t;for(;r!==e&&null!==r;r=r.parentNode){let e=0;for(let t=r.previousSibling;null!==t;t=t.previousSibling)e++;n.push(e)}return r!==e&&W("indexPath: root is not a parent of child"),n.reverse()}class Yo extends ir{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const e=this.getFormat();return me[e]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const e=[];let t=this.getFirstChild();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){const e=[];let 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(){const e=Mo()._dirtyElements;return null!==e&&e.has(this.__key)}isLastChild(){const e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return null!==t&&t.is(e)}getAllTextNodes(){const e=[];let t=this.getFirstChild();for(;null!==t;){if(Or(t)&&e.push(t),Vo(t)){const n=t.getAllTextNodes();e.push(...n)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;Vo(e);){const t=e.getFirstChild();if(null===t)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;Vo(e);){const t=e.getLastChild();if(null===t)break;e=t}return e}getDescendantByIndex(e){const t=this.getChildren(),n=t.length;if(e>=n){const e=t[n-1];return Vo(e)&&e.getLastDescendant()||e||null}const r=t[e];return Vo(r)&&r.getFirstDescendant()||r||null}getFirstChild(){const e=this.getLatest().__first;return null===e?null:Fi(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return null===e&&W(`Expected node ${this.__key} to have a first child.`),e}getLastChild(){const e=this.getLatest().__last;return null===e?null:Fi(e)}getLastChildOrThrow(){const e=this.getLastChild();return null===e&&W(`Expected node ${this.__key} to have a last child.`),e}getChildAtIndex(e){const t=this.getChildrenSize();let n,r;if(e<t/2){for(n=this.getFirstChild(),r=0;null!==n&&r<=e;){if(r===e)return n;n=n.getNextSibling(),r++}return null}for(n=this.getLastChild(),r=t-1;null!==n&&r>=e;){if(r===e)return n;n=n.getPreviousSibling(),r--}return null}getTextContent(){let e="";const t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){const o=t[r];e+=o.getTextContent(),Vo(o)&&r!==n-1&&!o.isInline()&&(e+=de)}return e}getTextContentSize(){let e=0;const t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){const o=t[r];e+=o.getTextContentSize(),Vo(o)&&r!==n-1&&!o.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(""!==e){const t=ge[e];return 0!==(this.getFormat()&t)}return!1}hasTextFormat(e){const t=pe[e];return 0!==(this.getTextFormat()&t)}getFormatFlags(e,t){return Ni(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){To();const n=ao();let r=e,o=t;const i=this.getChildrenSize();if(!this.canBeEmpty())if(0===e&&0===t){const e=this.getFirstChild();if(Or(e)||Vo(e))return e.select(0,0)}else if(!(void 0!==e&&e!==i||void 0!==t&&t!==i)){const e=this.getLastChild();if(Or(e)||Vo(e))return e.select()}void 0===r&&(r=i),void 0===o&&(o=i);const s=this.__key;return Wr(n)?(n.anchor.set(s,r,"element"),n.focus.set(s,o,"element"),n.dirty=!0,n):no(s,r,s,o,"element","element")}selectStart(){const e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){const e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){const e=this.getWritable();return this.getChildren().forEach(e=>e.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){const t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=""!==e?ge[e]:0,this}setStyle(e){return this.getWritable().__style=e||"",this}setTextFormat(e){const t=this.getWritable();return t.__textFormat=e,t}setTextStyle(e){const t=this.getWritable();return t.__textStyle=e,t}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,n){or(this)&&W(`ElementNode.splice: Ephemeral nodes can not mutate their children (key ${this.__key} type ${this.__type})`);const r=this.getChildrenSize(),o=this.getWritable();e+t<=r||W(`ElementNode.splice: start + deleteCount > oldSize (${String(e)} + ${String(t)} > ${String(r)})`);const i=o.__key,s=[],a=[],l=this.getChildAtIndex(e+t);let c=null,u=r-t+n.length;if(0!==e)if(e===r)c=this.getLastChild();else{const t=this.getChildAtIndex(e);null!==t&&(c=t.getPreviousSibling())}if(t>0){let e=null===c?this.getFirstChild():c.getNextSibling();for(let n=0;n<t;n++){null===e&&W("splice: sibling not found");const t=e.getNextSibling(),n=e.__key;Ii(e.getWritable()),a.push(n),e=t}}let d=c;for(const e of n){null!==d&&e.is(d)&&(c=d=d.getPreviousSibling());const t=e.getWritable();t.__parent===i&&u--,Ii(t);const n=e.__key;if(null===d)o.__first=n,t.__prev=null;else{const e=d.getWritable();e.__next=n,t.__prev=e.__key}e.__key===i&&W("append: attempting to append self"),t.__parent=i,s.push(n),d=e}if(e+t===r){if(null!==d){d.getWritable().__next=null,o.__last=d.__key}}else if(null!==l){const e=l.getWritable();if(null!==d){const t=d.getWritable();e.__prev=d.__key,t.__next=l.__key}else e.__prev=null}if(o.__size=u,a.length){const e=ao();if(Wr(e)){const t=new Set(a),n=new Set(s),{anchor:r,focus:o}=e;Jo(r,t,n)&&fo(r,r.getNode(),this,c,l),Jo(o,t,n)&&fo(o,o.getNode(),this,c,l),0!==u||this.canBeEmpty()||_s(this)||this.remove()}}return o}getDOMSlot(e){return new Uo(e)}exportDOM(e){const{element:t}=super.exportDOM(e);if(Ls(t)){const e=this.getIndent();e>0&&(t.style.paddingInlineStart=40*e+"px");const n=this.getDirection();n&&(t.dir=n)}return{element:t}}exportJSON(){const e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},t=this.getTextFormat(),n=this.getTextStyle();return 0===t&&""===n||_s(this)||this.getChildren().some(Or)||(0!==t&&(e.textFormat=t),""!==n&&(e.textStyle=n)),e}updateFromJSON(e){return super.updateFromJSON(e).setFormat(e.format).setIndent(e.indent).setDirection(e.direction).setTextFormat(e.textFormat||0).setTextStyle(e.textStyle||"")}insertNewAfter(e,t){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,t,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,t){const n=this.getDOMSlot(e);let r=n.getFirstChild();for(let e=this.getFirstChild();e;e=e.getNextSibling()){const o=t.getElementByKey(e.getKey());null!==o&&(null==r?(n.insertChild(o),r=o):r!==o&&n.replaceChild(o,r),r=r.nextSibling)}}}function Vo(e){return e instanceof Yo}function Jo(e,t,n){let r=e.getNode();for(;r;){const e=r.__key;if(t.has(e)&&!n.has(e))return!0;r=r.getParent()}return!1}class qo extends ir{decorate(e,t){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Xo(e){return e instanceof qo}class Qo extends Yo{__cachedText;static getType(){return"root"}static clone(){return new Qo}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){W("getTopLevelElementOrThrow: root nodes are not top level elements")}getTextContent(){const e=this.__cachedText;return!Eo()&&0!==Mo()._dirtyType||null===e?super.getTextContent():e}remove(){W("remove: cannot be called on root nodes")}replace(e){W("replace: cannot be called on root nodes")}insertBefore(e){W("insertBefore: cannot be called on root nodes")}insertAfter(e){W("insertAfter: cannot be called on root nodes")}updateDOM(e,t){return!1}splice(e,t,n){for(const e of n)Vo(e)||Xo(e)||W("rootNode.splice: Only element or decorator nodes can be inserted to the root node");return super.splice(e,t,n)}static importJSON(e){return Ui().updateFromJSON(e)}collapseAtStart(){return!0}}function Zo(e){return e instanceof Qo}function ei(e){return new ri(new Map(e._nodeMap))}function ti(){return new ri(new Map([["root",new Qo]]))}function ni(e){const t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&W(`LexicalNode: Node ${n.name} does not match the serialized type. Check if .exportJSON() is implemented and it is returning the correct type.`),Vo(e)){const r=t.children;Array.isArray(r)||W(`LexicalNode: Node ${n.name} is an element but .exportJSON() does not have a children array.`);const o=e.getChildren();for(let e=0;e<o.length;e++){const t=ni(o[e]);r.push(t)}}return t}class ri{_nodeMap;_selection;_flushSync;_readOnly;constructor(e,t){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(e,t){return Do(t&&t.editor||null,this,e)}clone(e){const t=new ri(this._nodeMap,void 0===e?this._selection:e);return t._readOnly=!0,t}toJSON(){return Do(null,this,()=>({root:ni(Ui())}))}}class oi extends Yo{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class ii extends Yo{static getType(){return"paragraph"}static clone(e){return new ii(e.__key)}createDOM(e){const t=document.createElement("p"),n=ls(e.theme,"paragraph");if(void 0!==n){t.classList.add(...n)}return t}updateDOM(e,t,n){return!1}static importDOM(){return{p:e=>({conversion:si,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(Ls(t)){this.isEmpty()&&t.append(document.createElement("br"));const e=this.getFormatType();e&&(t.style.textAlign=e)}return{element:t}}static importJSON(e){return ai().updateFromJSON(e)}exportJSON(){const e=super.exportJSON();if(void 0===e.textFormat||void 0===e.textStyle){const t=this.getChildren().find(Or);t?(e.textFormat=t.getFormat(),e.textStyle=t.getStyle()):(e.textFormat=this.getTextFormat(),e.textStyle=this.getTextStyle())}return e}insertNewAfter(e,t){const n=ai();n.setTextFormat(e.format),n.setTextStyle(e.style);const r=this.getDirection();return n.setDirection(r),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,t),n}collapseAtStart(){const e=this.getChildren();if(0===e.length||Or(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 si(e){const t=ai();return e.style&&(t.setFormat(e.style.textAlign),$s(e,t)),{node:t}}function ai(){return Ss(new ii)}function li(e){return e instanceof ii}const ci=0;function ui(e,t,n,r){const o=e._keyToDOMMap;o.clear(),e._editorState=ti(),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;const i=e._observer;null!==i&&(i.disconnect(),e._observer=null),null!==t&&(t.textContent=""),null!==n&&(n.textContent="",o.set("root",n))}function di(e){const t=new Set,n=new Set;let r=e;for(;r;){const{ownNodeConfig:e}=Gs(r),o=r.transform;if(!n.has(o)){n.add(o);const e=r.transform();e&&t.add(e)}if(e){const n=e.$transform;n&&t.add(n),r=e.extends}else{const e=Object.getPrototypeOf(r);r=e.prototype instanceof ir&&e!==ir?e:void 0}}return t}function fi(e){const t=e||{},n=No(),r=t.theme||{},o=void 0===e?n:t.parentEditor||null,i=t.disableEvents||!1,s=ti(),a=t.namespace||(null!==o?o._config.namespace:Xi()),l=t.editorState,c=[Qo,Sr,fr,Ir,ii,oi,...t.nodes||[]],{onError:u,html:d}=t,f=void 0===t.editable||t.editable;let p;if(void 0===e&&null!==n)p=n._nodes;else{p=new Map;for(let e=0;e<c.length;e++){let t=c[e],n=null,r=null;if("function"!=typeof t){const e=t;t=e.replace,n=e.with,r=e.withKlass||null}Gs(t);{const e=t.name,o=Ks(t,"getType")&&t.getType();r?r.prototype instanceof t||W(`${r.name} doesn't extend the ${e}`):n&&console.warn(`Override for ${e} specifies 'replace' without 'withKlass'. 'withKlass' will be required in a future version.`),"RootNode"!==e&&"root"!==o&&"artificial"!==o&&t!==ir&&(["getType","clone"].forEach(n=>{Ks(t,n)||console.warn(`${e} must implement static "${n}" method`)}),!Ks(t,"importDOM")&&Us(t)&&console.warn(`${e} should implement "importDOM" if using a custom "exportDOM" method to ensure HTML serialization (important for copy & paste) works as expected`),Ks(t,"importJSON")||console.warn(`${e} should implement "importJSON" method to ensure JSON and default HTML serialization works as expected`))}const o=t.getType(),i=di(t);p.set(o,{exportDOM:d&&d.export?d.export.get(t):void 0,klass:t,replace:n,replaceWithKlass:r,sharedNodeState:Re(c[e]),transforms:i})}}const h=new pi(s,o,p,{disableEvents:i,namespace:a,theme:r},u||console.error,function(e,t){const n=new Map,r=new Set,o=e=>{Object.keys(e).forEach(t=>{let r=n.get(t);void 0===r&&(r=[],n.set(t,r)),r.push(e[t])})};return e.forEach(e=>{const t=e.klass.importDOM;if(null==t||r.has(t))return;r.add(t);const n=t.call(e.klass);null!==n&&o(n)}),t&&o(t),n}(p,d?d.import:void 0),f,e);return void 0!==l&&(h._pendingEditorState=l,h._dirtyType=2),function(e){e.registerCommand(At,Wn,ci),e.registerCommand(Lt,Kn,ci),e.registerCommand(Mt,Un,ci),e.registerCommand(Rt,Gn,ci),e.registerCommand(Wt,Vn,ci)}(h),h}class pi{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_htmlConversions;_window;_editable;_blockCursorElement;_createEditorArgs;constructor(e,t,n,r,o,i,s,a){this._createEditorArgs=a,this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new 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=Xi(),this._onError=o,this._htmlConversions=i,this._editable=s,this._headless=null!==t&&t._headless,this._window=null,this._blockCursorElement=null}isComposing(){return null!=this._compositionKey}registerUpdateListener(e){const t=this._listeners.update;return t.add(e),()=>{t.delete(e)}}registerEditableListener(e){const t=this._listeners.editable;return t.add(e),()=>{t.delete(e)}}registerDecoratorListener(e){const t=this._listeners.decorator;return t.add(e),()=>{t.delete(e)}}registerTextContentListener(e){const t=this._listeners.textcontent;return t.add(e),()=>{t.delete(e)}}registerRootListener(e){const 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&&W('Listener for type "command" requires a "priority".');const r=this._commands;r.has(e)||r.set(e,[new Set,new Set,new Set,new Set,new Set]);const o=r.get(e);void 0===o&&W(`registerCommand: Command ${String(e)} not found in command map`);const i=o[n];return i.add(t),()=>{i.delete(t),o.every(e=>0===e.size)&&r.delete(e)}}registerMutationListener(e,t,n){const r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,o=this._listeners.mutation;let i=o.get(t);void 0===i&&(i=new Set,o.set(t,i)),i.add(r);const s=n&&n.skipInitialization;return void 0!==s&&s||this.initializeMutationListener(t,r),()=>{i.delete(r),0===i.size&&o.delete(t)}}getRegisteredNode(e){const t=this._nodes.get(e.getType());return void 0===t&&W(`Node ${e.name} has not been registered. Ensure node has been passed to createEditor.`),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){const n=this._editorState,r=Ds(n).get(t.getType());if(!r)return;const o=new Map;for(const e of r.keys())o.set(e,"created");o.size>0&&e(o,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,t){const n=this.getRegisteredNode(e);return n.transforms.add(t),n}registerNodeTransform(e,t){const n=this.registerNodeTransformToKlass(e,t),r=[n],o=n.replaceWithKlass;if(null!=o){const e=this.registerNodeTransformToKlass(o,t);r.push(e)}return function(e,t){const n=Ds(e.getEditorState()),r=[];for(const e of t){const t=n.get(e);t&&r.push(t)}if(0===r.length)return;e.update(()=>{for(const e of r)for(const t of e.keys()){const e=Fi(t);e&&e.markDirty()}},null===e._pendingEditorState?{tag:ar}:void 0)}(this,r.map(e=>e.klass.getType())),()=>{r.forEach(e=>e.transforms.delete(t))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return hs(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const t=this._rootElement;if(e!==t){const n=ls(this._config.theme,"root"),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,ui(this,t,e,r),null!==t&&(this._config.disableEvents||tr(t),null!=n&&t.classList.remove(...n)),null!==e){const t=ys(e),r=e.style;r.userSelect="text",r.whiteSpace="pre-wrap",r.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=t,this._dirtyType=2,Me(this),this._updateTags.add(ar),Bo(this),this._config.disableEvents||function(e,t){const n=e.ownerDocument;Tn.set(e,n);const r=An.get(n)??0;r<1&&n.addEventListener("selectionchange",Xn),An.set(n,r+1),e.__lexicalEditor=t;const o=Jn(e);for(let n=0;n<wn.length;n++){const[r,i]=wn[n],s="function"==typeof i?e=>{Zn(e)||(Qn(e),(t.isEditable()||"click"===r)&&i(e,t))}:e=>{if(Zn(e))return;Qn(e);const n=t.isEditable();switch(r){case"cut":return n&&hs(t,fn,e);case"copy":return hs(t,dn,e);case"paste":return n&&hs(t,zt,e);case"dragstart":return n&&hs(t,ln,e);case"dragover":return n&&hs(t,cn,e);case"dragend":return n&&hs(t,un,e);case"focus":return n&&hs(t,bn,e);case"blur":return n&&hs(t,yn,e);case"drop":return n&&hs(t,sn,e)}};e.addEventListener(r,s),o.push(()=>{e.removeEventListener(r,s)})}}(e,this),null!=n&&e.classList.add(...n);{const t=e.parentElement;null!=t&&["flex","inline-flex"].includes(getComputedStyle(t).display)&&console.warn('When using "display: flex" or "display: inline-flex" on an element containing content editable, Chrome may have unwanted focusing behavior when clicking outside of it. Consider wrapping the content editable within a non-flex element.')}}else this._window=null,this._updateTags.add(ar),Bo(this);$o("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&W("setEditorState: the editor state is empty. Ensure the editor state's root node never becomes empty.");let n=e;n._readOnly&&(n=ei(e),n._selection=e._selection?e._selection.clone():null),Le(this);const r=this._pendingEditorState,o=this._updateTags,i=void 0!==t?t.tag:null;null===r||r.isEmpty()||(null!=i&&o.add(i),Bo(this)),this._pendingEditorState=n,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,null!=i&&o.add(i),this._updating||Bo(this)}parseEditorState(e,t){return function(e,t,n){const r=ti(),o=xo,i=wo,s=_o,a=t._dirtyElements,l=t._dirtyLeaves,c=t._cloneNotNeeded,u=t._dirtyType;t._dirtyElements=new Map,t._dirtyLeaves=new Set,t._cloneNotNeeded=new Set,t._dirtyType=0,xo=r,wo=!1,_o=t,gi(null);try{const o=t._nodes;jo(e.root,o),n&&n(),r._readOnly=!0,Fo(r)}catch(e){e instanceof Error&&t._onError(e)}finally{t._dirtyElements=a,t._dirtyLeaves=l,t._cloneNotNeeded=c,t._dirtyType=u,xo=o,wo=i,_o=s}return r}("string"==typeof e?JSON.parse(e):e,this,t)}read(e){return Bo(this),this.getEditorState().read(e,{editor:this})}update(e,t){!function(e,t,n){e._updating?e._updates.push([t,n]):Wo(e,t,n)}(this,e,t)}focus(e,t={}){const n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),Ko(this,()=>{const r=ao(),o=Ui();null!==r?r.dirty||Yi(r.clone()):0!==o.getChildrenSize()&&("rootStart"===t.defaultSelection?o.selectStart():o.selectEnd()),function(e){To();Mo()._updateTags.add(e)}("focus"),function(e){To();Mo()._deferred.push(e)}(()=>{n.removeAttribute("autocapitalize"),e&&e()})}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;null!==e&&e.blur();const t=Ts(this._window);null!==t&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,$o("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}pi.version="0.40.0+dev.esm";let hi=null;function gi(e){hi=e}let mi=1;function bi(e,t){const n=yi(e,t);return void 0===n&&W(`registeredNode: Type ${t} not found`),n}function yi(e,t){return e._nodes.get(t)}const xi="function"==typeof queueMicrotask?queueMicrotask:e=>{Promise.resolve().then(e)};function _i(e){return Xo(Hi(e))}function wi(e){const t=document.activeElement;if(!Ls(t))return!1;const n=t.nodeName;return Xo(Hi(e))&&("INPUT"===n||"TEXTAREA"===n||"true"===t.contentEditable&&null==Ei(t))}function Si(e,t,n){const r=e.getRootElement();try{return null!==r&&r.contains(t)&&r.contains(n)&&null!==t&&!wi(t)&&Ci(t)===e}catch(e){return!1}}function ki(e){return e instanceof pi}function Ci(e){let t=e;for(;null!=t;){const e=Ei(t);if(ki(e))return e;t=ms(t)}return null}function Ei(e){return e?e.__lexicalEditor:null}function Ti(e){return jr(e)||e.isToken()}function Ai(e){return Ti(e)||e.isSegmented()}function Li(e){return Ms(e)&&3===e.nodeType}function Mi(e){return Ms(e)&&9===e.nodeType}function Ri(e){let t=e;for(;null!=t;){if(Li(t))return t;t=t.firstChild}return null}function Ni(e,t,n){const r=pe[t];if(null!==n&&(e&r)===(n&r))return e;let o=e^r;return"subscript"===t?o&=-65:"superscript"===t?o&=-33:"lowercase"===t?(o&=-513,o&=-1025):"uppercase"===t?(o&=-257,o&=-1025):"capitalize"===t&&(o&=-257,o&=-513),o}function Oi(e){return Or(e)||gr(e)||Xo(e)}function Pi(e,t){const n=function(){const e=hi;return hi=null,e}();if(null!=(t=t||n&&n.__key))return function(e,t,n){const r=xo;if(!r)return;const o=r._nodeMap.get(t);n&&t!==n.__key&&W(`Lexical node with constructor ${e.constructor.name} (type ${e.getType()}) has an incorrect clone implementation, got ${String(t)} for nodeKey when expecting ${n.__key}`);o&&o.constructor!==e.constructor&&(e.constructor.name!==o.constructor.name?W(`Lexical node with constructor ${e.constructor.name} attempted to re-use key from node in active editor state with constructor ${o.constructor.name}. Keys must not be re-used when the type is changed.`):W(`Lexical node with constructor ${e.constructor.name} attempted to re-use key from node in active editor state with different constructor with the same name (possibly due to invalid Hot Module Replacement). Keys must not be re-used when the type is changed.`))}(e,t,n),void(e.__key=t);To(),Ao();const r=Mo(),o=Lo(),i=""+mi++;o._nodeMap.set(i,e),Vo(e)?r._dirtyElements.set(i,!0):r._dirtyLeaves.add(i),r._cloneNotNeeded.add(i),r._dirtyType=1,e.__key=i}function Ii(e){const t=e.getParent();if(null!==t){const n=e.getWritable(),r=t.getWritable(),o=e.getPreviousSibling(),i=e.getNextSibling(),s=null!==i?i.__key:null,a=null!==o?o.__key:null,l=null!==o?o.getWritable():null,c=null!==i?i.getWritable():null;null===o&&(r.__first=s),null===i&&(r.__last=a),null!==l&&(l.__next=s),null!==c&&(c.__prev=a),n.__prev=null,n.__next=null,n.__parent=null,r.__size--}}function zi(e){Ao(),or(e)&&W(`internalMarkNodeAsDirty: Ephemeral nodes must not be marked as dirty (key ${e.__key} type ${e.__type})`);const t=e.getLatest(),n=t.__parent,r=Lo(),o=Mo(),i=r._nodeMap,s=o._dirtyElements;null!==n&&function(e,t,n){let r=e;for(;null!==r;){if(n.has(r))return;const e=t.get(r);if(void 0===e)break;n.set(r,!1),r=e.__parent}}(n,i,s);const a=t.__key;o._dirtyType=1,Vo(e)?s.set(a,!0):o._dirtyLeaves.add(a)}function ji(e){To();const t=Mo(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,null!==n){const e=Fi(n);null!==e&&e.getWritable()}if(null!==e){const t=Fi(e);null!==t&&t.getWritable()}}}function Di(){if(Eo())return null;return Mo()._compositionKey}function Fi(e,t){const n=(t||Lo())._nodeMap.get(e);return void 0===n?null:n}function Bi(e,t){const n=$i(e,Mo());return void 0!==n?Fi(n,t):null}function $i(e,t){return e[`__lexicalKey_${t._key}`]}function Hi(e,t){let n=e;for(;null!=n;){const e=Bi(n,t);if(null!==e)return e;n=ms(n)}return null}function Wi(e){const t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function Ki(e){return e.read(()=>Ui().getTextContent())}function Ui(){return Gi(Lo())}function Gi(e){return e._nodeMap.get("root")}function Yi(e){To();const t=Lo();null!==e&&(Object.isFrozen(e)&&W("$setSelection called on frozen selection object. Ensure selection is cloned before passing in."),e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function Vi(e){const t=Mo(),n=function(e,t){let n=e;for(;null!=n;){const e=$i(n,t);if(void 0!==e)return e;n=ms(n)}return null}(e,t);if(null===n){return e===t.getRootElement()?Fi("root"):null}return Fi(n)}function Ji(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function qi(e){const t=[];let n=e;for(;null!==n;)t.push(n),n=n._parentEditor;return t}function Xi(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function Qi(e){return Li(e)?e.nodeValue:null}function Zi(e,t,n){const r=Ts(xs(t));if(null===r)return;const o=r.anchorNode;let{anchorOffset:i,focusOffset:s}=r;if(null!==o){let t=Qi(o);const r=Hi(o);if(null!==t&&Or(r)){if(t===ue&&n){const e=n.length;t=n,i=e,s=e}null!==t&&es(r,t,i,s,e)}}}function es(e,t,n,r,o){let i=e;if(i.isAttached()&&(o||!i.isDirty())){const s=i.isComposing();let a=t;(s||o)&&t[t.length-1]===ue&&(a=t.slice(0,-1));const l=i.getTextContent();if(o||a!==l){if(""===a){if(ji(null),J||q||ee)i.remove();else{const e=Mo();setTimeout(()=>{e.update(()=>{i.isAttached()&&i.remove()})},20)}return}const t=i.getParent(),o=lo(),l=i.getTextContentSize(),c=Di(),u=i.getKey();if(i.isToken()||null!==c&&u===c&&!s||Wr(o)&&(null!==t&&!t.canInsertTextBefore()&&0===o.anchor.offset||o.anchor.key===e.__key&&0===o.anchor.offset&&!i.canInsertTextBefore()&&!s||o.focus.key===e.__key&&o.focus.offset===l&&!i.canInsertTextAfter()&&!s))return void i.markDirty();const d=ao();if(!Wr(d)||null===n||null===r)return void ts(i,a,d);if(d.setTextNodeRange(i,n,i,r),i.isSegmented()){const e=Nr(i.getTextContent());i.replace(e),i=e}ts(i,a,d)}}}function ts(e,t,n){if(e.setTextContent(t),Wr(n)){const t=e.getKey();for(const r of["anchor","focus"]){const o=n[r];"text"===o.type&&o.key===t&&(o.offset=ua(e,o.offset,"clamp"))}}}function ns(e,t,n){const r=t[n]||!1;return"any"===r||r===e[n]}function rs(e,t,n){return function(e,t){return ns(e,t,"altKey")&&ns(e,t,"ctrlKey")&&ns(e,t,"shiftKey")&&ns(e,t,"metaKey")}(e,n)&&e.key.toLowerCase()===t.toLowerCase()}const os={ctrlKey:!G,metaKey:G},is={altKey:G,ctrlKey:!G};function ss(e){return"Backspace"===e.key}function as(e){return rs(e,"a",os)}function ls(e,t){void 0===e.__lexicalClassNameCache&&(e.__lexicalClassNameCache={});const n=e.__lexicalClassNameCache,r=n[t];if(void 0!==r)return r;const o=e[t];if("string"==typeof o){const e=$a(o);return n[t]=e,e}return o}function cs(e,t,n,r,o){if(0===n.size)return;const i=r.__type,s=r.__key,a=t.get(i);void 0===a&&W(`Type ${i} not in registeredNodes`);const l=a.klass;let c=e.get(l);void 0===c&&(c=new Map,e.set(l,c));const u=c.get(s),d="destroyed"===u&&"created"===o;(void 0===u||d)&&c.set(s,d?"updated":o)}function us(e){const t=e.getType(),n=Lo();if(n._readOnly){const e=Ds(n).get(t);return e?Array.from(e.values()):[]}const r=n._nodeMap,o=[];for(const[,n]of r)n instanceof e&&n.__type===t&&n.isAttached()&&o.push(n);return o}function ds(e,t,n){const r=e.getParent();let o=n,i=e;return null!==r&&(t&&0===n?(o=i.getIndexWithinParent(),i=r):t||n!==i.getChildrenSize()||(o=i.getIndexWithinParent()+1,i=r)),i.getChildAtIndex(t?o-1:o)}function fs(e,t){const n=e.offset;if("element"===e.type){return ds(e.getNode(),t,n)}{const r=e.getNode();if(t&&0===n||!t&&n===r.getTextContentSize()){const e=t?r.getPreviousSibling():r.getNextSibling();return null===e?ds(r.getParentOrThrow(),t,r.getIndexWithinParent()+(t?0:1)):e}}return null}function ps(e){const t=xs(e).event,n=t&&t.inputType;return"insertFromPaste"===n||"insertFromPasteAsQuotation"===n}function hs(e,t,n){return function(e,t,n){const r=qi(e);for(let o=4;o>=0;o--)for(let i=0;i<r.length;i++){const s=r[i],a=s._commands.get(t);if(void 0!==a){const t=a[o];if(void 0!==t){const r=Array.from(t),o=r.length;let i=!1;if(Ko(s,()=>{for(let t=0;t<o;t++)if(r[t](n,e))return void(i=!0)}),i)return i}}}return!1}(e,t,n)}function gs(e,t){const n=e._keyToDOMMap.get(t);return void 0===n&&W(`Reconciliation: could not find DOM element for node key ${t}`),n}function ms(e){const t=e.assignedSlot||e.parentElement;return Rs(t)?t.host:t}function vs(e){return Mi(e)?e:Ls(e)?e.ownerDocument:null}function bs(e,t){let n=e.getParent();for(;null!==n;){if(n.is(t))return!0;n=n.getParent()}return!1}function ys(e){const t=vs(e);return t?t.defaultView:null}function xs(e){const t=e._window;return null===t&&W("window object not found"),t}function _s(e){return Zo(e)||Vo(e)&&e.isShadowRoot()}function ws(e){const t=e.constructor.clone(e);return Pi(t,null),t.afterCloneFrom(e),t}function Ss(e){const t=Mo(),n=e.getType(),r=yi(t,n);void 0===r&&W(`$applyNodeReplacement node ${e.constructor.name} with type ${n} must be registered to the editor. You can do this by passing the node class via the "nodes" array in the editor config.`);const{replace:o,replaceWithKlass:i}=r;if(null!==o){const t=o(e),r=t.constructor;return null!==i?t instanceof i||W(`$applyNodeReplacement failed. Expected replacement node to be an instance of ${i.name} with type ${i.getType()} but returned ${r.name} with type ${r.getType()} from original node ${e.constructor.name} with type ${n}`):t instanceof e.constructor&&r!==e.constructor||W(`$applyNodeReplacement failed. Ensure replacement node ${r.name} with type ${r.getType()} is a subclass of the original node ${e.constructor.name} with type ${n}.`),t.__key===e.__key&&W(`$applyNodeReplacement failed. Ensure that the key argument is *not* used in your replace function (from node ${e.constructor.name} with type ${n} to node ${r.name} with type ${r.getType()}), Node keys must never be re-used except by the static clone method.`),t}return e}function ks(e,t){!Zo(e.getParent())||Vo(t)||Xo(t)||W("Only element or decorator nodes can be inserted in to the root node")}function Cs(e){return(Xo(e)||Vo(e)&&!e.canBeEmpty())&&!e.isInline()}function Es(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;const r=e.parentElement;null!==r&&r.removeChild(e)}function Ts(e){return K?(e||window).getSelection():null}function As(e){return Ls(e)&&"A"===e.tagName}function Ls(e){return Ms(e)&&1===e.nodeType}function Ms(e){return"object"==typeof e&&null!==e&&"nodeType"in e&&"number"==typeof e.nodeType}function Rs(e){return Ms(e)&&11===e.nodeType}function Ns(e){const t=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return null!==e.nodeName.match(t)}function Os(e){const t=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return null!==e.nodeName.match(t)}function Ps(e){if(Xo(e)&&!e.isInline())return!0;if(!Vo(e)||_s(e))return!1;const t=e.getFirstChild(),n=null===t||gr(t)||Or(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}function Is(){return Mo()}const zs=new WeakMap,js=new Map;function Ds(e){if(!e._readOnly&&e.isEmpty())return js;e._readOnly||W("getCachedTypeToNodeMap called with a writable EditorState");let t=zs.get(e);return t||(t=function(e){const t=new Map;for(const[n,r]of e._nodeMap){const e=r.__type;let o=t.get(e);o||(o=new Map,t.set(e,o)),o.set(n,r)}return t}(e),zs.set(e,t)),t}function Fs(e){const t=e.constructor,n=t.clone(e);return n.afterCloneFrom(e),n.__key!==e.__key&&W(`$cloneWithProperties: ${t.name}.clone(node) (with type '${t.getType()}') did not return a node with the same key, make sure to specify node.__key as the last argument to the constructor`),n.__parent===e.__parent&&n.__next===e.__next&&n.__prev===e.__prev||W(`$cloneWithProperties: ${t.name}.clone(node) (with type '${t.getType()}') overrode afterCloneFrom but did not call super.afterCloneFrom(prevNode)`),n}function Bs(e){return function(e){return e[rr]=!0,e}(Fs(e))}function $s(e,t){const n=parseInt(e.style.paddingInlineStart,10)||0,r=Math.round(n/40);t.setIndent(r)}function Hs(e){return!0===e.__lexicalUnmanaged}function Ws(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ks(e,t){return Ws(e,t)&&e[t]!==ir[t]}function Us(e){return Ws(e.prototype,"exportDOM")}function Gs(e){const t=ye in e.prototype?e.prototype[ye]():void 0,n=function(e){if(!(e===ir||e.prototype instanceof ir)){let t="<unknown>",n="<unknown>";try{t=e.getType()}catch(e){}try{pi.version&&(n=JSON.parse(pi.version))}catch(e){}W(`${e.name} (type ${t}) does not subclass LexicalNode from the lexical package used by this editor (version ${n}). All lexical and @lexical/* packages used by an editor must have identical versions. If you suspect the version does match, then the problem may be caused by multiple copies of the same lexical module (e.g. both esm and cjs, or included directly in multiple entrypoints).`)}return e===qo||e===Yo||e===ir}(e),r=!n&&Ks(e,"getType")?e.getType():void 0;let o,i=r;if(t)if(r)o=t[r];else for(const[e,n]of Object.entries(t))i=e,o=n;if(!n&&i&&(Ks(e,"getType")||(e.getType=()=>i),Ks(e,"clone")||(0===Sr.length&&0!==e.length&&W(`${e.name} (type ${i}) must implement a static clone method since its constructor has ${String(e.length)} required arguments (expecting 0). Use an explicit default in the first argument of your constructor(prop: T=X, nodeKey?: NodeKey).`),e.clone=t=>(gi(t),new e)),Ks(e,"importJSON")||(0===Sr.length&&0!==e.length&&W(`${e.name} (type ${i}) must implement a static importJSON method since its constructor has ${String(e.length)} required arguments (expecting 0). Use an explicit default in the first argument of your constructor(prop: T=X, nodeKey?: NodeKey).`),e.importJSON=o&&o.$importJSON||(t=>(new e).updateFromJSON(t))),!Ks(e,"importDOM")&&o)){const{importDOM:t}=o;t&&(e.importDOM=()=>t)}return{ownNodeConfig:o,ownNodeType:i}}const Ys=(e,t)=>{let n=e;for(;null!=n&&!Zo(n);){if(t(n))return n;n=n.getParent()}return null},Vs={next:"previous",previous:"next"};class Js{origin;constructor(e){this.origin=e}[Symbol.iterator](){return ya({hasNext:ra,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return la(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return la(this.origin,this.direction)}remove(){const e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,t){const n=this.getNodeAtCaret();return e.is(this.origin)||e.is(n)||(null===n?this.insert(e):n.replace(e,t)),this}splice(e,t,n="next"){const r=n===this.direction?t:Array.from(t).reverse();let o=this;const i=this.getParentAtCaret(),s=new Map;for(let t=o.getAdjacentCaret();null!==t&&s.size<e;t=t.getAdjacentCaret()){const e=t.origin.getWritable();s.set(e.getKey(),e)}for(const e of r){if(s.size>0){const t=o.getNodeAtCaret();if(t)if(s.delete(t.getKey()),s.delete(e.getKey()),t.is(e)||o.origin.is(e));else{const n=e.getParent();n&&n.is(i)&&e.remove(),t.replace(e)}else null===t&&W(`NodeCaret.splice: Underflow of expected nodesToRemove during splice (keys: ${Array.from(s).join(" ")})`)}else o.insert(e);o=la(e,this.direction)}for(const e of s.values())e.remove();return this}}class qs extends Js{type="child";getLatest(){const e=this.origin.getLatest();return e===this.origin?this:fa(e,this.direction)}getParentCaret(e="root"){return la(Zs(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=Qs(this.direction);return la(this.getNodeAtCaret(),e)||fa(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(e){return e instanceof qs&&this.direction===e.direction&&this.origin.is(e.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}}const Xs={root:Zo,shadowRoot:_s};function Qs(e){return Vs[e]}function Zs(e,t="root"){return Xs[t](e)?null:e}class ea extends Js{type="sibling";getLatest(){const e=this.origin.getLatest();return e===this.origin?this:la(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return Vo(this.origin)?fa(this.origin,this.direction):null}getParentCaret(e="root"){return la(Zs(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=Qs(this.direction);return la(this.getNodeAtCaret(),e)||fa(this.origin.getParentOrThrow(),e)}isSamePointCaret(e){return e instanceof ea&&this.direction===e.direction&&this.origin.is(e.origin)}isSameNodeCaret(e){return(e instanceof ea||e instanceof ta)&&this.direction===e.direction&&this.origin.is(e.origin)}}class ta extends Js{type="text";offset;constructor(e,t){super(e),this.offset=t}getLatest(){const e=this.origin.getLatest();return e===this.origin?this:ca(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e="root"){return la(Zs(this.getParentAtCaret(),e),this.direction)}getFlipped(){return ca(this.origin,Qs(this.direction),this.offset)}isSamePointCaret(e){return e instanceof ta&&this.direction===e.direction&&this.origin.is(e.origin)&&this.offset===e.offset}isSameNodeCaret(e){return(e instanceof ea||e instanceof ta)&&this.direction===e.direction&&this.origin.is(e.origin)}getSiblingCaret(){return la(this.origin,this.direction)}}function na(e){return e instanceof ta}function ra(e){return e instanceof ea}function oa(e){return e instanceof qs}const ia={next:class extends ta{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends ta{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},sa={next:class extends ea{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends ea{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},aa={next:class extends qs{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends qs{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function la(e,t){return e?new sa[t](e):null}function ca(e,t,n){return e?new ia[t](e,ua(e,n)):null}function ua(e,t,n="error"){const r=e.getTextContentSize();let o="next"===t?r:"previous"===t?0:t;return(o<0||o>r)&&("clamp"!==n&&W(`$getTextNodeOffset: invalid offset ${String(t)} for size ${String(r)} at key ${e.getKey()}`),o=o<0?0:r),o}function da(e,t){return new ga(e,t)}function fa(e,t){return Vo(e)?new aa[t](e):null}function pa(e){return e&&function(e){return e&&e.getChildCaret()||e}(e.getAdjacentCaret())}class ha{type="node-caret-range";direction;anchor;focus;constructor(e,t,n){this.anchor=e,this.focus=t,this.direction=n}getLatest(){const e=this.anchor.getLatest(),t=this.focus.getLatest();return e===this.anchor&&t===this.focus?this:new ha(e,t,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const e=e=>{const t=this[e].getLatest();return na(t)?function(e,t){const{direction:n,origin:r}=e,o=ua(r,"focus"===t?Qs(n):n);return da(e,o-e.offset)}(t,e):null},t=e("anchor"),n=e("focus");if(t&&n){const{caret:e}=t,{caret:r}=n;if(e.isSameNodeCaret(r))return[da(e,r.offset-e.offset),null]}return[t,n]}iterNodeCarets(e="root"){const t=na(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),r=na(n),o=t=>t.isSameNodeCaret(n)?null:pa(t)||t.getParentCaret(e);return ya({hasNext:e=>null!==e&&!(r&&n.isSameNodeCaret(e)),initial:t.isSameNodeCaret(n)?null:o(t),map:e=>e,step:o})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class ga{type="slice";caret;distance;constructor(e,t){this.caret=e,this.distance=t}getSliceIndices(){const{distance:e,caret:{offset:t}}=this,n=t+e;return n<t?[n,t]:[t,n]}getTextContent(){const[e,t]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,t)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:e,direction:t}}=this,[n,r]=this.getSliceIndices(),o=e.getTextContent();return ca(e.setTextContent(o.slice(0,n)+o.slice(r)),t,n)}}function ma(e){return ba(e,la(Ui(),e.direction))}function va(e){return ba(e,e)}function ba(e,t){return e.direction!==t.direction&&W("$getCaretRange: anchor and focus must be in the same direction"),new ha(e,t,e.direction)}function ya(e){const{initial:t,hasNext:n,step:r,map:o}=e;let i=t;return{[Symbol.iterator](){return this},next(){if(!n(i))return{done:!0,value:void 0};const e={done:!1,value:o(i)};return i=r(i),e}}}function xa(e,t){const n=ka(e.origin,t.origin);switch(null===n&&W(`$comparePointCaretNext: a (key ${e.origin.getKey()}) and b (key ${t.origin.getKey()}) do not have a common ancestor`),n.type){case"same":{const n="text"===e.type,r="text"===t.type;return n&&r?function(e,t){return Math.sign(e-t)}(e.offset,t.offset):e.type===t.type?0:n?-1:r?1:"child"===e.type?-1:1}case"ancestor":return"child"===e.type?-1:1;case"descendant":return"child"===t.type?1:-1;case"branch":return _a(n)}}function _a(e){const{a:t,b:n}=e,r=t.__key,o=n.__key;let i=t,s=n;for(;i&&s;i=i.getNextSibling(),s=s.getNextSibling()){if(i.__key===o)return-1;if(s.__key===r)return 1}return null===i?1:-1}function wa(e,t){return t.is(e)}function Sa(e){return Vo(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function ka(e,t){if(e.is(t))return{commonAncestor:e,type:"same"};const n=new Map;for(let[t,r]=Sa(e);t;r=t,t=t.getParent())n.set(t,r);for(let[r,o]=Sa(t);r;o=r,r=r.getParent()){const i=n.get(r);if(void 0!==i)return null===i?(wa(e,r)||W("$originComparison: ancestor logic error"),{commonAncestor:r,type:"ancestor"}):null===o?(wa(t,r)||W("$originComparison: descendant logic error"),{commonAncestor:r,type:"descendant"}):((Vo(i)||wa(e,i))&&(Vo(o)||wa(t,o))&&r.is(i.getParent())&&r.is(o.getParent())||W("$originComparison: branch logic error"),{a:i,b:o,commonAncestor:r,type:"branch"})}return null}function Ca(e,t){const{type:n,key:r,offset:o}=e,i=function(e){const t=Fi(e);return null===t&&W(`Expected node with key ${e} to exist but it's not in the nodeMap.`),t}(e.key);return"text"===n?(Or(i)||W(`$caretFromPoint: Node with type ${i.getType()} and key ${r} that does not inherit from TextNode encountered for text point`),ca(i,t,o)):(Vo(i)||W(`$caretFromPoint: Node with type ${i.getType()} and key ${r} that does not inherit from ElementNode encountered for element point`),function(e,t,n){let r=fa(e,"next");for(let e=0;e<t;e++){const e=r.getAdjacentCaret();if(null===e)break;r=e}return Ia(r,n)}(i,e.offset,t))}function Ea(e,t){const{origin:n,direction:r}=t,o="next"===r;na(t)?e.set(n.getKey(),t.offset,"text"):ra(t)?Or(n)?e.set(n.getKey(),ua(n,r),"text"):e.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+(o?1:0),"element"):(oa(t)&&Vo(n)||W("$setPointFromCaret: exhaustiveness check"),e.set(n.getKey(),o?0:n.getChildrenSize(),"element"))}function Ta(e){const t=ao(),n=Wr(t)?t:ro();return Aa(n,e),Yi(n),n}function Aa(e,t){Ea(e.anchor,t.anchor),Ea(e.focus,t.focus)}function La(e){const{anchor:t,focus:n}=e,r=Ca(t,"next"),o=Ca(n,"next"),i=xa(r,o)<=0?"next":"previous";return ba(Ia(r,i),Ia(o,i))}function Ma(e){const{direction:t,origin:n}=e,r=la(n,Qs(t)).getNodeAtCaret();return r?la(r,t):fa(n.getParentOrThrow(),t)}function Ra(e,t="root"){const n=[e];for(let r=oa(e)?e.getParentCaret(t):e.getSiblingCaret();null!==r;r=r.getParentCaret(t))n.push(Ma(r));return n}function Na(e){return!!e&&e.origin.isAttached()}function Oa(e){const t=function(e){let t=e;for(;oa(t);){const e=pa(t);if(!oa(e))break;t=e}return t}(e.getLatest()),{direction:n}=t;if(Or(t.origin))return na(t)?t:ca(t.origin,n,n);const r=t.getAdjacentCaret();return ra(r)&&Or(r.origin)?ca(r.origin,n,Qs(n)):t}function Pa(e){return na(e)&&e.offset!==ua(e.origin,e.direction)}function Ia(e,t){return e.direction===t?e:e.getFlipped()}function za(e,t){return e.direction===t?e:ba(Ia(e.focus,t),Ia(e.anchor,t))}function ja(e){const{origin:t,offset:n,direction:r}=e;if(n===ua(t,r))return e.getSiblingCaret();if(n===ua(t,Qs(r)))return Ma(e.getSiblingCaret());const[o]=t.splitText(n);return Or(o)||W("$splitTextPointCaret: splitText must return at least one TextNode"),Ia(la(o,"next"),r)}function Da(e,t){return!0}function Fa(e,{$copyElementNode:t=ws,$splitTextPointCaretNext:n=ja,rootMode:r="shadowRoot",$shouldSplit:o=Da}={}){if(na(e))return n(e);const i=e.getParentCaret(r);if(i){const{origin:n}=i;if(oa(e)&&(!n.canBeEmpty()||!o(n,"first")))return Ma(i);const r=function(e){const t=[];for(let n=e.getAdjacentCaret();n;n=n.getAdjacentCaret())t.push(n.origin);return t}(e);(r.length>0||n.canBeEmpty()&&o(n,"last"))&&i.insert(t(n).splice(0,0,r))}return i}function Ba(e,t){if(!t||e===t)return e;for(const n in t)if(e[n]!==t[n])return{...e,...t};return e}function $a(...e){const t=[];for(const n of e)if(n&&"string"==typeof n)for(const[e]of n.matchAll(/\S+/g))t.push(e);return t}function Ha(e,...t){const n=$a(...t);n.length>0&&e.classList.add(...n)}function Wa(e,...t){const n=$a(...t);n.length>0&&e.classList.remove(...n)}function Ka(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}function Ua(e){throw new Error(e)}const Ga=new Map;function Ya(e){const t={};if(!e)return t;const n=e.split(";");for(const e of n)if(""!==e){const[n,r]=e.split(/:([^]+)/);n&&r&&(t[n.trim()]=r.trim())}return t}function Va(e){let t=Ga.get(e);return void 0===t&&(t=Ya(e),Ga.set(e,t)),Object.freeze(t),t}function Ja(e){const t=Is().getElementByKey(e.getKey());if(null===t)return null;const n=t.ownerDocument.defaultView;return null===n?null:n.getComputedStyle(t)}function qa(e){return Ja(Zo(e)?e:e.getParentOrThrow())}function Xa(e){const t=qa(e);return null!==t&&"rtl"===t.direction}function Qa(e,t,n="self"){const r=e.getStartEndPoints();if(t.isSelected(e)&&!Ai(t)&&null!==r){const[o,i]=r,s=e.isBackward(),a=o.getNode(),l=i.getNode(),c=t.is(a),u=t.is(l);if(c||u){const[r,o]=Yr(e),i=a.is(l),c=t.is(s?l:a),u=t.is(s?a:l);let d,f=0;if(i)f=r>o?o:r,d=r>o?r:o;else if(c){f=s?o:r,d=void 0}else if(u){f=0,d=s?r:o}const p=t.__text.slice(f,d);p!==t.__text&&("clone"===n&&(t=Bs(t)),t.__text=p)}}return t}function Za(e){if("text"===e.type)return e.offset===e.getNode().getTextContentSize();const t=e.getNode();return Vo(t)||Ua("isAtNodeEnd: node must be a TextNode or ElementNode"),e.offset===t.getChildrenSize()}function el(e){const t=e.getStyle(),n=Ya(t);Ga.set(t,n)}function tl(e,t){(Wr(e)?e.isCollapsed():Or(e)||Vo(e))||Ua("$patchStyle must only be called with a TextNode, ElementNode, or collapsed RangeSelection");const n=Va(Wr(e)?e.style:Or(e)?e.getStyle():e.getTextStyle()),r=Object.entries(t).reduce((t,[r,o])=>("function"==typeof o?t[r]=o(n[r],e):null===o?delete t[r]:t[r]=o,t),{...n}),o=function(e){let t="";for(const n in e)n&&(t+=`${n}: ${e[n]};`);return t}(r);Wr(e)||Or(e)?e.setStyle(o):e.setTextStyle(o),Ga.set(o,r)}function nl(e,t){if(Wr(e)&&e.isCollapsed()){tl(e,t);const n=e.anchor.getNode();Vo(n)&&n.isEmpty()&&tl(n,t)}!function(e){const t=ao();if(!t)return;const n=new Map,r=e=>n.get(e.getKey())||[0,e.getTextContentSize()];if(Wr(t))for(const e of La(t).getTextSlices())e&&n.set(e.caret.origin.getKey(),e.getSliceIndices());const o=t.getNodes();for(const t of o){if(!Or(t)||!t.canHaveFormat())continue;const[n,o]=r(t);if(o!==n)if(Ai(t)||0===n&&o===t.getTextContentSize())e(t);else{e(t.splitText(n,o)[0===n?0:1])}}Wr(t)&&"text"===t.anchor.type&&"text"===t.focus.type&&t.anchor.key===t.focus.key&&function(e){if(e.isBackward()){const{anchor:t,focus:n}=e,{key:r,offset:o,type:i}=t;t.set(n.key,n.offset,n.type),n.set(r,o,i)}}(t)}(e=>{tl(e,t)});const n=e.getNodes();if(n.length>0){const e=new Set;for(const r of n){if(!Vo(r)||!r.canBeEmpty()||0!==r.getChildrenSize())continue;const n=r.getKey();e.has(n)||(e.add(n),tl(r,t))}}}function rl(e,t){const n=e.getFormatType(),r=e.getIndent();n!==t.getFormatType()&&t.setFormat(n),r!==t.getIndent()&&t.setIndent(r)}function ol(e){const t=il(e);return null!==t&&"vertical-rl"===t.writingMode}function il(e){const t=e.anchor.getNode();return Vo(t)?Ja(t):qa(t)}function sl(e,t){let n=ol(e)?!t:t;al(e)&&(n=!n);const r=Ca(e.focus,n?"previous":"next");if(Pa(r))return!1;for(const e of ma(r)){if(oa(e))return!e.origin.isInline();if(!Vo(e.origin)){if(Xo(e.origin))return!0;break}}return!1}function al(e){const t=il(e);return null!==t&&"rtl"===t.direction}function ll(e,t,n){const r=al(e);let o;o=ol(e)||r?!n:n,function(e,t,n,r){e.modify(t?"extend":"move",n,r)}(e,t,o,"character")}function cl(e,t,n){const r=Va(e.getStyle());return null!==r&&r[t]||n}function ul(e,t,n=""){let r=null;const o=e.getNodes(),i=e.anchor,s=e.focus,a=e.isBackward(),l=a?s.offset:i.offset,c=a?s.getNode():i.getNode();if(Wr(e)&&e.isCollapsed()&&""!==e.style){const n=Va(e.style);if(null!==n&&t in n)return n[t]}for(let e=0;e<o.length;e++){const i=o[e];if((0===e||0!==l||!i.is(c))&&Or(i)){const e=cl(i,t,n);if(null===r)r=e;else if(r!==e){r="";break}}}return null===r?n:r}function dl(e){throw new Error(e)}const fl="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,pl=fl&&"documentMode"in document?document.documentMode:null;function hl(e,t){let n=e;for(;null!=n;){if(n instanceof t)return n;n=n.getParent()}return null}function gl(e){const t=Ys(e,e=>Vo(e)&&!e.isInline());return Vo(t)||dl(`Expected node ${e.__key} to have closest block element node.`),t}function ml(e){const t=ao()||lo();let n;if(Wr(t))n=Ca(t.focus,"next");else{if(null!=t){const e=t.getNodes(),r=e[e.length-1];r&&(n=la(r,"next"))}n=n||fa(Ui(),"previous").getFlipped().insert(ai())}const r=function(e,t,n){let r=Ia(t,"next");for(let e=r;e;e=Fa(e,n))r=e;na(r)&&dl("$insertNodeToNearestRootAtCaret: An unattached TextNode can not be split");return r.insert(e.isInline()?ai().append(e):e),Ia(la(e.getLatest(),"next"),t.direction)}(e,n),o=pa(r);return Ta(va(oa(o)?Oa(o):r)),e.getLatest()}function vl(e,t){return null!==e&&Object.getPrototypeOf(e).constructor.name===t.name}fl&&"InputEvent"in window&&!pl&&new window.InputEvent("input");const bl=Symbol.for("preact-signals");function yl(){if(Sl>1)return void Sl--;let e,t=!1;for(;void 0!==_l;){let n=_l;for(_l=void 0,kl++;void 0!==n;){const r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&Ll(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(kl=0,Sl--,t)throw e}let xl,_l;function wl(e){const t=xl;xl=void 0;try{return e()}finally{xl=t}}let Sl=0,kl=0,Cl=0;function El(e){if(void 0===xl)return;let t=e.n;return void 0===t||t.t!==xl?(t={i:0,S:e,p:xl.s,n:void 0,t:xl,e:void 0,x:void 0,r:t},void 0!==xl.s&&(xl.s.n=t),xl.s=t,e.n=t,32&xl.f&&e.S(t),t):-1===t.i?(t.i=0,void 0!==t.n&&(t.n.p=t.p,void 0!==t.p&&(t.p.n=t.n),t.p=xl.s,t.n=void 0,xl.s.n=t,xl.s=t),t):void 0}function Tl(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function Al(e,t){return new Tl(e,t)}function Ll(e){for(let t=e.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Ml(e){for(let t=e.s;void 0!==t;t=t.n){const n=t.S.n;if(void 0!==n&&(t.r=n),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function Rl(e){let t,n=e.s;for(;void 0!==n;){const e=n.p;-1===n.i?(n.S.U(n),void 0!==e&&(e.n=n.n),void 0!==n.n&&(n.n.p=e)):t=n,n.S.n=n.r,void 0!==n.r&&(n.r=void 0),n=e}e.s=t}function Nl(e,t){Tl.call(this,void 0),this.x=e,this.s=void 0,this.g=Cl-1,this.f=4,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function Ol(e){const t=e.u;if(e.u=void 0,"function"==typeof t){Sl++;const n=xl;xl=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,Pl(e),t}finally{xl=n,yl()}}}function Pl(e){for(let t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Ol(e)}function Il(e){if(xl!==this)throw new Error("Out-of-order effect");Rl(this),xl=e,this.f&=-2,8&this.f&&Pl(this),yl()}function zl(e,t){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=null==t?void 0:t.name}function jl(e,t){const n=new zl(e,t);try{n.c()}catch(e){throw n.d(),e}const r=n.d.bind(n);return r[Symbol.dispose]=r,r}function Dl(e){return("function"==typeof e.nodes?e.nodes():e.nodes)||[]}function Fl(e){throw new Error(e)}function Bl(e,t){if(e&&t&&!Array.isArray(t)&&"object"==typeof e&&"object"==typeof t){const n=e,r=t;for(const e in r)n[e]=Bl(n[e],r[e]);return e}return t}Tl.prototype.brand=bl,Tl.prototype.h=function(){return!0},Tl.prototype.S=function(e){const t=this.t;t!==e&&void 0===e.e&&(e.x=t,this.t=e,void 0!==t?t.e=e:wl(()=>{var e;null==(e=this.W)||e.call(this)}))},Tl.prototype.U=function(e){if(void 0!==this.t){const t=e.e,n=e.x;void 0!==t&&(t.x=n,e.e=void 0),void 0!==n&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n,void 0===n&&wl(()=>{var e;null==(e=this.Z)||e.call(this)}))}},Tl.prototype.subscribe=function(e){return jl(()=>{const t=this.value,n=xl;xl=void 0;try{e(t)}finally{xl=n}},{name:"sub"})},Tl.prototype.valueOf=function(){return this.value},Tl.prototype.toString=function(){return this.value+""},Tl.prototype.toJSON=function(){return this.value},Tl.prototype.peek=function(){const e=xl;xl=void 0;try{return this.value}finally{xl=e}},Object.defineProperty(Tl.prototype,"value",{get(){const e=El(this);return void 0!==e&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(kl>100)throw new Error("Cycle detected");this.v=e,this.i++,Cl++,Sl++;try{for(let e=this.t;void 0!==e;e=e.x)e.t.N()}finally{yl()}}}}),Nl.prototype=new Tl,Nl.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;if(this.f&=-5,this.g===Cl)return!0;if(this.g=Cl,this.f|=1,this.i>0&&!Ll(this))return this.f&=-2,!0;const e=xl;try{Ml(this),xl=this;const e=this.x();(16&this.f||this.v!==e||0===this.i)&&(this.v=e,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return xl=e,Rl(this),this.f&=-2,!0},Nl.prototype.S=function(e){if(void 0===this.t){this.f|=36;for(let e=this.s;void 0!==e;e=e.n)e.S.S(e)}Tl.prototype.S.call(this,e)},Nl.prototype.U=function(e){if(void 0!==this.t&&(Tl.prototype.U.call(this,e),void 0===this.t)){this.f&=-33;for(let e=this.s;void 0!==e;e=e.n)e.S.U(e)}},Nl.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let e=this.t;void 0!==e;e=e.x)e.t.N()}},Object.defineProperty(Nl.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");const e=El(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),zl.prototype.c=function(){const e=this.S();try{if(8&this.f)return;if(void 0===this.x)return;const e=this.x();"function"==typeof e&&(this.u=e)}finally{e()}},zl.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Ol(this),Ml(this),Sl++;const e=xl;return xl=this,Il.bind(this,e)},zl.prototype.N=function(){2&this.f||(this.f|=2,this.o=_l,_l=this)},zl.prototype.d=function(){this.f|=8,1&this.f||Pl(this)},zl.prototype.dispose=function(){this.d()};const $l=0,Hl=1,Wl=2,Kl=3,Ul=4,Gl=5,Yl=6,Vl=7;function Jl(e){return e.id===$l}function ql(e){return e.id===Wl}function Xl(e){return function(e){return e.id===Hl}(e)||Fl(`LexicalBuilder: Can not apply a permanent mark from state id ${String(e.id)} (expected ${String(Hl)} temporary)`),Object.assign(e,{id:Wl})}const Ql=new Set;class Zl{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(e,t){this.builder=e,this.extension=t,this.configs=new Set,this.state={id:$l}}mergeConfigs(){let e=this.extension.config||{};const t=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):Ba;for(const n of this.configs)e=t(e,n);return e}init(e){const t=this.state;ql(t)||Fl(`ExtensionRep: Can not configure from state id ${String(t.id)}`);const n={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},r={...n,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},o=function(e,t,n){return Object.assign(e,{config:t,id:Kl,registerState:n})}(t,this.mergeConfigs(),n);let i;this.state=o,this.extension.init&&(i=this.extension.init(e,o.config,n)),this.state=function(e,t,n){return Object.assign(e,{id:Ul,initResult:t,registerState:n})}(o,i,r)}build(e){const t=this.state;let n;t.id!==Ul&&Fl(`ExtensionRep: register called in state id ${String(t.id)} (expected ${String(Gl)} initialized)`),this.extension.build&&(n=this.extension.build(e,t.config,t.registerState));const r={...t.registerState,getOutput:()=>n,getSignal:this.getSignal.bind(this)};this.state=function(e,t,n){return Object.assign(e,{id:Gl,output:t,registerState:n})}(t,n,r)}register(e,t){this._signal=t;const n=this.state;n.id!==Gl&&Fl(`ExtensionRep: register called in state id ${String(n.id)} (expected ${String(Gl)} built)`);const r=this.extension.register&&this.extension.register(e,n.config,n.registerState);return this.state=function(e){return Object.assign(e,{id:Yl})}(n),()=>{const e=this.state;e.id!==Vl&&Fl(`ExtensionRep: rollbackToBuiltState called in state id ${String(n.id)} (expected ${String(Vl)} afterRegistration)`),this.state=function(e){return Object.assign(e,{id:Gl})}(e),r&&r()}}afterRegistration(e){const t=this.state;let n;return t.id!==Yl&&Fl(`ExtensionRep: afterRegistration called in state id ${String(t.id)} (expected ${String(Yl)} registered)`),this.extension.afterRegistration&&(n=this.extension.afterRegistration(e,t.config,t.registerState)),this.state=function(e){return Object.assign(e,{id:Vl})}(t),n}getSignal(){return void 0===this._signal&&Fl("ExtensionRep.getSignal() called before register"),this._signal}getInitResult(){void 0===this.extension.init&&Fl(`ExtensionRep: getInitResult() called for Extension ${this.extension.name} that does not define init`);const e=this.state;return function(e){return e.id>=Ul}(e)||Fl(`ExtensionRep: getInitResult() called for ExtensionRep in state id ${String(e.id)} < ${String(Ul)} (initialized)`),e.initResult}getInitPeer(e){const t=this.builder.extensionNameMap.get(e);return t?t.getExtensionInitDependency():void 0}getExtensionInitDependency(){const e=this.state;return function(e){return e.id>=Kl}(e)||Fl(`ExtensionRep: getExtensionInitDependency called in state id ${String(e.id)} (expected >= ${String(Kl)} configured)`),{config:e.config}}getPeer(e){const t=this.builder.extensionNameMap.get(e);return t?t.getExtensionDependency():void 0}getInitDependency(e){const t=this.builder.getExtensionRep(e);return void 0===t&&Fl(`LexicalExtensionBuilder: Extension ${this.extension.name} missing dependency extension ${e.name} to be in registry`),t.getExtensionInitDependency()}getDependency(e){const t=this.builder.getExtensionRep(e);return void 0===t&&Fl(`LexicalExtensionBuilder: Extension ${this.extension.name} missing dependency extension ${e.name} to be in registry`),t.getExtensionDependency()}getState(){const e=this.state;return function(e){return e.id>=Vl}(e)||Fl(`ExtensionRep getState called in state id ${String(e.id)} (expected ${String(Vl)} afterRegistration)`),e}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||Ql}getPeerNameSet(){let e=this._peerNameSet;return e||(e=new Set((this.extension.peerDependencies||[]).map(([e])=>e)),this._peerNameSet=e),e}getExtensionDependency(){if(!this._dependency){const e=this.state;(function(e){return e.id>=Gl})(e)||Fl(`Extension ${this.extension.name} used as a dependency before build`),this._dependency={config:e.config,init:e.initResult,output:e.output}}return this._dependency}}const ec={tag:ar};function tc(){const e=Ui();e.isEmpty()&&e.append(ai())}const nc={config:{setOptions:ec,updateOptions:ec},init:({$initialEditorState:e=tc})=>({$initialEditorState:e,initialized:!1}),afterRegistration(e,{updateOptions:t,setOptions:n},r){const o=r.getInitResult();if(!o.initialized){o.initialized=!0;const{$initialEditorState:r}=o;if(r instanceof ri)e.setEditorState(r,n);else if("function"==typeof r)e.update(()=>{r(e)},t);else if(r&&("string"==typeof r||"object"==typeof r)){const t=e.parseEditorState(r);e.setEditorState(t,n)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[Qo,Sr,fr,Ir,ii]},rc=Symbol.for("@lexical/extension/LexicalBuilder");function oc(){}function ic(e){throw e}function sc(e){return Array.isArray(e)?e:[e]}const ac="0.40.0+dev.esm";class lc{roots;extensionNameMap;outgoingConfigEdges;incomingEdges;conflicts;_sortedExtensionReps;PACKAGE_VERSION;constructor(e){this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=ac,this.roots=e;for(const t of e)this.addExtension(t)}static fromExtensions(e){const t=[sc(nc)];for(const n of e)t.push(sc(n));return new lc(t)}static maybeFromEditor(e){const t=e[rc];return t&&(t.PACKAGE_VERSION!==ac&&Fl(`LexicalBuilder.fromEditor: The given editor was created with LexicalBuilder ${t.PACKAGE_VERSION} but this version is ${ac}. A project should have exactly one copy of LexicalBuilder`),t instanceof lc||Fl("LexicalBuilder.fromEditor: There are multiple copies of the same version of LexicalBuilder in your project, and this editor was created with another one. Your project, or one of its dependencies, has its package.json and/or bundler configured incorrectly.")),t}static fromEditor(e){const t=lc.maybeFromEditor(e);return void 0===t&&Fl("LexicalBuilder.fromEditor: The given editor was not created with LexicalBuilder"),t}constructEditor(){const{$initialEditorState:e,onError:t,...n}=this.buildCreateEditorArgs(),r=Object.assign(fi({...n,...t?{onError:e=>{t(e,r)}}:{}}),{[rc]:this});for(const e of this.sortedExtensionReps())e.build(r);return r}buildEditor(){let e=oc;function t(){try{e()}finally{e=oc}}const n=Object.assign(this.constructEditor(),{dispose:t,[Symbol.dispose]:t});return e=Ka(this.registerEditor(n),()=>n.setRootElement(null)),n}hasExtensionByName(e){return this.extensionNameMap.has(e)}getExtensionRep(e){const t=this.extensionNameMap.get(e.name);if(t)return t.extension!==e&&Fl(`LexicalBuilder: A registered extension with name ${e.name} exists but does not match the given extension`),t}addEdge(e,t,n){const r=this.outgoingConfigEdges.get(e);r?r.set(t,n):this.outgoingConfigEdges.set(e,new Map([[t,n]]));const o=this.incomingEdges.get(t);o?o.add(e):this.incomingEdges.set(t,new Set([e]))}addExtension(e){void 0!==this._sortedExtensionReps&&Fl("LexicalBuilder: addExtension called after finalization");const t=sc(e),[n]=t;"string"!=typeof n.name&&Fl("LexicalBuilder: extension name must be string, not "+typeof n.name);let r=this.extensionNameMap.get(n.name);if(void 0!==r&&r.extension!==n&&Fl(`LexicalBuilder: Multiple extensions registered with name ${n.name}, names must be unique`),!r){r=new Zl(this,n),this.extensionNameMap.set(n.name,r);const e=this.conflicts.get(n.name);"string"==typeof e&&Fl(`LexicalBuilder: extension ${n.name} conflicts with ${e}`);for(const e of n.conflictsWith||[])this.extensionNameMap.has(e)&&Fl(`LexicalBuilder: extension ${n.name} conflicts with ${e}`),this.conflicts.set(e,n.name);for(const e of n.dependencies||[]){const t=sc(e);this.addEdge(n.name,t[0].name,t.slice(1)),this.addExtension(t)}for(const[e,t]of n.peerDependencies||[])this.addEdge(n.name,e,t?[t]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;const e=[],t=(n,r)=>{let o=n.state;if(ql(o))return;const i=n.extension.name;var s;Jl(o)||Fl(`LexicalBuilder: Circular dependency detected for Extension ${i} from ${r||"[unknown]"}`),Jl(s=o)||Fl(`LexicalBuilder: Can not apply a temporary mark from state id ${String(s.id)} (expected ${String($l)} unmarked)`),o=Object.assign(s,{id:Hl}),n.state=o;const a=this.outgoingConfigEdges.get(i);if(a)for(const e of a.keys()){const n=this.extensionNameMap.get(e);n&&t(n,i)}o=Xl(o),n.state=o,e.push(n)};for(const e of this.extensionNameMap.values())Jl(e.state)&&t(e);for(const t of e)for(const[e,n]of this.outgoingConfigEdges.get(t.extension.name)||[])if(n.length>0){const t=this.extensionNameMap.get(e);if(t)for(const e of n)t.configs.add(e)}for(const[e,...t]of this.roots)if(t.length>0){const n=this.extensionNameMap.get(e.name);void 0===n&&Fl(`LexicalBuilder: Expecting existing ExtensionRep for ${e.name}`);for(const e of t)n.configs.add(e)}return this._sortedExtensionReps=e,this._sortedExtensionReps}registerEditor(e){const t=this.sortedExtensionReps(),n=new AbortController,r=[()=>n.abort()],o=n.signal;for(const n of t){const t=n.register(e,o);t&&r.push(t)}for(const n of t){const t=n.afterRegistration(e);t&&r.push(t)}return Ka(...r)}buildCreateEditorArgs(){const e={},t=new Set,n=new Map,r=new Map,o={},i={},s=this.sortedExtensionReps();for(const a of s){const{extension:s}=a;if(void 0!==s.onError&&(e.onError=s.onError),void 0!==s.disableEvents&&(e.disableEvents=s.disableEvents),void 0!==s.parentEditor&&(e.parentEditor=s.parentEditor),void 0!==s.editable&&(e.editable=s.editable),void 0!==s.namespace&&(e.namespace=s.namespace),void 0!==s.$initialEditorState&&(e.$initialEditorState=s.$initialEditorState),s.nodes)for(const e of Dl(s)){if("function"!=typeof e){const t=n.get(e.replace);t&&Fl(`LexicalBuilder: Extension ${s.name} can not register replacement for node ${e.replace.name} because ${t.extension.name} already did`),n.set(e.replace,a)}t.add(e)}if(s.html){if(s.html.export)for(const[e,t]of s.html.export.entries())r.set(e,t);s.html.import&&Object.assign(o,s.html.import)}s.theme&&Bl(i,s.theme)}Object.keys(i).length>0&&(e.theme=i),t.size&&(e.nodes=[...t]);const a=Object.keys(o).length>0,l=r.size>0;(a||l)&&(e.html={},a&&(e.html.import=o),l&&(e.html.export=r));for(const t of s)t.init(e);return e.onError||(e.onError=ic),e}}function cc(e,t){return Ka(e.registerCommand(tn,t=>{const n=ao();if(!Wr(n))return!1;t.preventDefault();const r=function(e){const t=e.getNodes().filter(e=>to(e)&&e.canIndent());if(t.length>0)return!0;const n=e.anchor,r=e.focus,o=r.isBefore(n)?r:n,i=gl(o.getNode());if(i.canIndent()){const e=i.getKey();let t=ro();if(t.anchor.set(e,0,"element"),t.focus.set(e,0,"element"),t=He(t),t.anchor.is(o))return!0}return!1}(n)?t.shiftKey?on:rn:nn;return e.dispatchCommand(r,void 0)},ci),e.registerCommand(rn,()=>{const e="number"==typeof t?t:t?t.peek():null;if(null==e)return!1;const n=ao();if(!Wr(n))return!1;const r=n.getNodes().map(e=>gl(e).getIndent());return Math.max(...r)+1>=e},4))}const uc=new Set(["http:","https:","mailto:","sms:","tel:"]);class dc extends Yo{__url;__target;__rel;__title;static getType(){return"link"}static clone(e){return new dc(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}constructor(e="",t={},n){super(n);const{target:r=null,rel:o=null,title:i=null}=t;this.__url=e,this.__target=r,this.__rel=o,this.__title=i}createDOM(e){const t=document.createElement("a");return this.updateLinkDOM(null,t,e),Ha(t,e.theme.link),t}updateLinkDOM(e,t,n){if(As(t)){e&&e.__url===this.__url||(t.href=this.sanitizeUrl(this.__url));for(const n of["target","rel","title"]){const r=`__${n}`,o=this[r];e&&e[r]===o||(o?t[n]=o:t.removeAttribute(n))}}}updateDOM(e,t,n){return this.updateLinkDOM(e,t,n),!1}static importDOM(){return{a:e=>({conversion:fc,priority:1})}}static importJSON(e){return pc().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setURL(e.url).setRel(e.rel||null).setTarget(e.target||null).setTitle(e.title||null)}sanitizeUrl(e){e=wc(e);try{const t=new URL(wc(e));if(!uc.has(t.protocol))return"about:blank"}catch(t){return e}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(e){const t=this.getWritable();return t.__url=e,t}getTarget(){return this.getLatest().__target}setTarget(e){const t=this.getWritable();return t.__target=e,t}getRel(){return this.getLatest().__rel}setRel(e){const t=this.getWritable();return t.__rel=e,t}getTitle(){return this.getLatest().__title}setTitle(e){const t=this.getWritable();return t.__title=e,t}insertNewAfter(e,t=!0){const n=pc(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(n,t),n}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,t,n){if(!Wr(t))return!1;const r=t.anchor.getNode(),o=t.focus.getNode();return this.isParentOf(r)&&this.isParentOf(o)&&t.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}}function fc(e){let t=null;if(As(e)){const n=e.textContent;(null!==n&&""!==n||e.children.length>0)&&(t=pc(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function pc(e="",t){return Ss(new dc(e,t))}function hc(e){return e instanceof dc}class gc extends dc{__isUnlinked;constructor(e="",t={},n){super(e,t,n),this.__isUnlinked=void 0!==t.isUnlinked&&null!==t.isUnlinked&&t.isUnlinked}static getType(){return"autolink"}static clone(e){return new gc(e.__url,{isUnlinked:e.__isUnlinked,rel:e.__rel,target:e.__target,title:e.__title},e.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(e){const t=this.getWritable();return t.__isUnlinked=e,t}createDOM(e){return this.__isUnlinked?document.createElement("span"):super.createDOM(e)}updateDOM(e,t,n){return super.updateDOM(e,t,n)||e.__isUnlinked!==this.__isUnlinked}static importJSON(e){return mc().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setIsUnlinked(e.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(e,t=!0){const n=this.getParentOrThrow().insertNewAfter(e,t);if(Vo(n)){const e=mc(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return n.append(e),e}return null}}function mc(e="",t){return Ss(new gc(e,t))}function vc(e){return e instanceof gc}const bc=kt("TOGGLE_LINK_COMMAND");function yc(e,t){if("element"===e.type){const n=e.getNode();Vo(n)||function(e){throw new Error(e)}("$getPointNode: element point is not an ElementNode");return n.getChildren()[e.offset+t]||null}return null}function xc(e,t={}){let n;if(e&&"object"==typeof e){const{url:r,...o}=e;n=r,t={...o,...t}}else n=e;const{target:r,title:o}=t,i=void 0===t.rel?"noreferrer":t.rel,s=ao();if(null===s||!Wr(s)&&!Ur(s))return;if(Ur(s)){const e=s.getNodes();if(0===e.length)return;return void e.forEach(e=>{if(null===n){const t=Ys(e,e=>!vc(e)&&hc(e));t&&(t.insertBefore(e),0===t.getChildren().length&&t.remove())}else{const t=Ys(e,e=>!vc(e)&&hc(e));if(t)t.setURL(n),void 0!==r&&t.setTarget(r),void 0!==i&&t.setRel(i);else{const t=pc(n,{rel:i,target:r});e.insertBefore(t),t.append(e)}}})}const a=s.extract();if(null===n){const e=new Set;return void a.forEach(t=>{const n=Ys(t,e=>!vc(e)&&hc(e));if(null!==n){const t=n.getKey();if(e.has(t))return;!function(e,t){const n=new Set(t.filter(t=>e.isParentOf(t)).map(e=>e.getKey())),r=e.getChildren(),o=r=>n.has(r.getKey())||Vo(r)&&t.some(t=>e.isParentOf(t)&&r.isParentOf(t)),i=r.filter(o);if(i.length===r.length)return r.forEach(t=>e.insertBefore(t)),void e.remove();const s=r.findIndex(o),a=r.findLastIndex(o),l=0===s,c=a===r.length-1;if(l)i.forEach(t=>e.insertBefore(t));else if(c)for(let t=i.length-1;t>=0;t--)e.insertAfter(i[t]);else{for(let t=i.length-1;t>=0;t--)e.insertAfter(i[t]);const t=r.slice(a+1);if(t.length>0){const n=pc(e.getURL(),{rel:e.getRel(),target:e.getTarget(),title:e.getTitle()});i[i.length-1].insertAfter(n),t.forEach(e=>n.append(e))}}}(n,a),e.add(t)}})}const l=new Set,c=e=>{l.has(e.getKey())||(l.add(e.getKey()),e.setURL(n),void 0!==r&&e.setTarget(r),void 0!==i&&e.setRel(i),void 0!==o&&e.setTitle(o))};if(1===a.length){const e=a[0],t=Ys(e,hc);if(null!==t)return c(t)}!function(e){const t=ao();if(!Wr(t))return e();const n=He(t),r=n.isBackward(),o=yc(n.anchor,r?-1:0),i=yc(n.focus,r?0:-1),s=e();if(o||i){const e=ao();if(Wr(e)){const t=e.clone();if(o){const e=o.getParent();e&&t.anchor.set(e.getKey(),o.getIndexWithinParent()+(r?1:0),"element")}if(i){const e=i.getParent();e&&t.focus.set(e.getKey(),i.getIndexWithinParent()+(r?0:1),"element")}Yi(He(t))}}}(()=>{let e=null;for(const t of a){if(!t.isAttached())continue;const s=Ys(t,hc);if(s){c(s);continue}if(Vo(t)){if(!t.isInline())continue;if(hc(t)){if(!(vc(t)||null!==e&&e.getParentOrThrow().isParentOf(t))){c(t),e=t;continue}for(const e of t.getChildren())t.insertBefore(e);t.remove();continue}}const a=t.getPreviousSibling();hc(a)&&a.is(e)?a.append(t):(e=pc(n,{rel:i,target:r,title:o}),t.insertAfter(e),e.append(t))}})}const _c=/^\+?[0-9\s()-]{5,}$/;function wc(e){return e.match(/^[a-z][a-z0-9+.-]*:/i)||e.match(/^[/#.]/)?e:e.includes("@")?`mailto:${e}`:_c.test(e)?`tel:${e}`:`https://${e}`}function Sc(e,t){for(let n=0;n<t.length;n++){const r=t[n](e);if(r)return r}return null}const kc=/[.,;\s]/;function Cc(e){return kc.test(e)}function Ec(e){return Cc(e[e.length-1])}function Tc(e){return Cc(e[0])}function Ac(e){let t=e.getPreviousSibling();return Vo(t)&&(t=t.getLastDescendant()),null===t||gr(t)||Or(t)&&Ec(t.getTextContent())}function Lc(e){let t=e.getNextSibling();return Vo(t)&&(t=t.getFirstDescendant()),null===t||gr(t)||Or(t)&&Tc(t.getTextContent())}function Mc(e,t,n,r){if(!(e>0?Cc(n[e-1]):Ac(r[0])))return!1;return t<n.length?Cc(n[t]):Lc(r[r.length-1])}function Rc(e,t,n){const r=[],o=[],i=[];let s=0,a=0;const l=[...e];for(;l.length>0;){const e=l[0],c=e.getTextContent().length,u=a;a+c<=t?(r.push(e),s+=c):u>=n?i.push(e):o.push(e),a+=c,l.shift()}return[s,r,o,i]}function Nc(e,t,n,r){const o=mc(r.url,r.attributes);if(1===e.length){let i,s=e[0];0===t?[i,s]=s.splitText(n):[,i,s]=s.splitText(t,n);const a=Nr(r.text);return a.setFormat(i.getFormat()),a.setDetail(i.getDetail()),a.setStyle(i.getStyle()),o.append(a),i.replace(o),s}if(e.length>1){const r=e[0];let i,s=r.getTextContent().length;0===t?i=r:[,i]=r.splitText(t);const a=[];let l;for(let t=1;t<e.length;t++){const r=e[t],o=r.getTextContent().length,i=s;if(i<n)if(s+o<=n)a.push(r);else{const[e,t]=r.splitText(n-i);a.push(e),l=t}s+=o}const c=ao(),u=c?c.getNodes().find(Or):void 0,d=Nr(i.getTextContent());return d.setFormat(i.getFormat()),d.setDetail(i.getDetail()),d.setStyle(i.getStyle()),o.append(d,...a),u&&u===i&&(Wr(c)?d.select(c.anchor.offset,c.focus.offset):Ur(c)&&d.select(0,d.getTextContent().length)),i.replace(o),l}}function Oc(e,t,n){const r=e.getChildren(),o=r.length;for(let t=0;t<o;t++){const o=r[t];if(!Or(o)||!o.isSimpleText())return Pc(e),void n(null,e.getURL())}const i=e.getTextContent(),s=Sc(i,t);if(null===s||s.text!==i)return Pc(e),void n(null,e.getURL());if(!Ac(e)||!Lc(e))return Pc(e),void n(null,e.getURL());const a=e.getURL();if(a!==s.url&&(e.setURL(s.url),n(s.url,a)),s.attributes){const t=e.getRel();t!==s.attributes.rel&&(e.setRel(s.attributes.rel||null),n(s.attributes.rel||null,t));const r=e.getTarget();r!==s.attributes.target&&(e.setTarget(s.attributes.target||null),n(s.attributes.target||null,r))}}function Pc(e){const t=e.getChildren();for(let n=t.length-1;n>=0;n--)e.insertAfter(t[n]);return e.remove(),t.map(e=>e.getLatest())}const Ic={changeHandlers:[],matchers:[]};function zc(e,t=Ic){const{matchers:n,changeHandlers:r}=t,o=(e,t)=>{for(const n of r)n(e,t)};return Ka(e.registerNodeTransform(Sr,e=>{const t=e.getParentOrThrow(),r=e.getPreviousSibling();if(vc(t)&&!t.getIsUnlinked())Oc(t,n,o);else if(!hc(t)){if(e.isSimpleText()&&(Tc(e.getTextContent())||!vc(r))){const t=function(e){const t=[e];let n=e.getNextSibling();for(;null!==n&&Or(n)&&n.isSimpleText()&&(t.push(n),!/[\s]/.test(n.getTextContent()));)n=n.getNextSibling();return t}(e);!function(e,t,n){for(const t of e){const e=t.getParent();if(vc(e)&&!e.getIsUnlinked())return}let r=[...e];const o=r.map(e=>e.getTextContent()).join("");let i,s=o,a=0;for(;(i=Sc(s,t))&&null!==i;){const e=i.index,t=e+i.length;if(Mc(a+e,a+t,o,r)){const[o,,l,c]=Rc(r,a+e,a+t);let u=!1;for(const e of l){const t=e.getParent();if(vc(t)&&!t.getIsUnlinked()){u=!0;break}}if(u){a+=t,s=s.substring(t);continue}const d=Nc(l,a+e-o,a+t-o,i);r=d?[d,...c]:c,n(i.url,null),a=0}else a+=t;s=s.substring(t)}}(t,n,o)}!function(e,t,n){const r=e.getParent(),o=e.getPreviousSibling(),i=e.getNextSibling(),s=e.getTextContent();if(!vc(r)||r.getIsUnlinked()){if(vc(o)&&!o.getIsUnlinked()&&o.is(e.getPreviousSibling())&&e.getParent()===o.getParent()){if(!Tc(s))return Pc(o),void n(null,o.getURL());if(a=s,o.isEmailURI()?/^\.[a-zA-Z]{2,}/.test(a):/^\.[a-zA-Z0-9]{1,}/.test(a)){const r=o.getTextContent()+s,i=Sc(r,t);null!==i&&i.text===r&&(o.append(e),Oc(o,t,n),n(null,o.getURL()))}}var a;!vc(i)||i.getIsUnlinked()||Ec(s)||i.is(e.getNextSibling())&&e.getParent()===i.getParent()&&(Pc(i),n(null,i.getURL()))}}(e,n,o)}}),e.registerCommand(bc,e=>{const t=ao();if(null!==e||!Wr(t))return!1;return t.extract().forEach(e=>{const t=e.getParent();vc(t)&&(t.setIsUnlinked(!t.getIsUnlinked()),t.markDirty())}),!1},1))}function jc(e){throw new Error(e)}function Dc(e){let t=1,n=e.getParent();for(;null!=n;){if(nu(n)){const e=n.getParent();if(cu(e)){t++,n=e.getParent();continue}jc("A ListItemNode must have a ListNode for a parent.")}return t}return t}function Fc(e){let t=e.getParent();cu(t)||jc("A ListItemNode must have a ListNode for a parent.");let n=t;for(;null!==n;)n=n.getParent(),cu(n)&&(t=n);return t}function Bc(e){let t=[];const n=e.getChildren().filter(nu);for(let e=0;e<n.length;e++){const r=n[e],o=r.getFirstChild();cu(o)?t=t.concat(Bc(o)):t.push(r)}return t}function $c(e){return nu(e)&&cu(e.getFirstChild())}function Hc(e){return tu().append(e)}function Wc(e,t){return nu(e)&&(0===t.length||1===t.length&&e.is(t[0])&&0===e.getChildrenSize())}function Kc(e){const t=ao();if(null!==t){let n=t.getNodes();if(Wr(t)){const r=t.getStartEndPoints();null===r&&jc("insertList: anchor should be defined");const[o]=r,i=o.getNode(),s=i.getParent();if(_s(i)){const e=i.getFirstChild();if(e)n=e.selectStart().getNodes();else{const e=ai();i.append(e),n=e.select().getNodes()}}else if(Wc(i,n)){const t=lu(e);if(_s(s)){i.replace(t);const e=tu();Vo(i)&&(e.setFormat(i.getFormatType()),e.setIndent(i.getIndent())),t.append(e)}else if(nu(i)){const e=i.getParentOrThrow();Uc(t,e.getChildren()),e.replace(t)}return}}const r=new Set;for(let t=0;t<n.length;t++){const o=n[t];if(Vo(o)&&o.isEmpty()&&!nu(o)&&!r.has(o.getKey())){Gc(o,e);continue}let i=Oi(o)?o.getParent():nu(o)&&o.isEmpty()?o:null;for(;null!=i;){const t=i.getKey();if(cu(i)){if(!r.has(t)){const n=lu(e);Uc(n,i.getChildren()),i.replace(n),r.add(t)}break}{const n=i.getParent();if(_s(n)&&!r.has(t)){r.add(t),Gc(i,e);break}i=n}}}}}function Uc(e,t){e.splice(e.getChildrenSize(),0,t)}function Gc(e,t){if(cu(e))return e;const n=e.getPreviousSibling(),r=e.getNextSibling(),o=tu();let i;if(Uc(o,e.getChildren()),cu(n)&&t===n.getListType())n.append(o),cu(r)&&t===r.getListType()&&(Uc(n,r.getChildren()),r.remove()),i=n;else if(cu(r)&&t===r.getListType())r.getFirstChildOrThrow().insertBefore(o),i=r;else{const n=lu(t);n.append(o),e.replace(n),i=n}o.setFormat(e.getFormatType()),o.setIndent(e.getIndent());const s=ao();return Wr(s)&&(i.getKey()===s.anchor.key&&s.anchor.set(o.getKey(),s.anchor.offset,"element"),i.getKey()===s.focus.key&&s.focus.set(o.getKey(),s.focus.offset,"element")),e.remove(),i}function Yc(e,t){const n=e.getLastChild(),r=t.getFirstChild();n&&r&&$c(n)&&$c(r)&&(Yc(n.getFirstChild(),r.getFirstChild()),r.remove());const o=t.getChildren();o.length>0&&e.append(...o),t.remove()}function Vc(e){const t="check"!==e.getListType();let n=e.getStart();for(const r of e.getChildren())nu(r)&&(r.getValue()!==n&&r.setValue(n),t&&null!=r.getLatest().__checked&&r.setChecked(void 0),cu(r.getFirstChild())||n++)}function Jc(e){const t=new Set;if($c(e)||t.has(e.getKey()))return;const n=e.getParent(),r=e.getNextSibling(),o=e.getPreviousSibling();if($c(r)&&$c(o)){const n=o.getFirstChild();if(cu(n)){n.append(e);const o=r.getFirstChild();if(cu(o)){Uc(n,o.getChildren()),r.remove(),t.add(r.getKey())}}}else if($c(r)){const t=r.getFirstChild();if(cu(t)){const n=t.getFirstChild();null!==n&&n.insertBefore(e)}}else if($c(o)){const t=o.getFirstChild();cu(t)&&t.append(e)}else if(cu(n)){const t=tu().setTextFormat(e.getTextFormat()).setTextStyle(e.getTextStyle()),i=lu(n.getListType()).setTextFormat(n.getTextFormat()).setTextStyle(n.getTextStyle());t.append(i),i.append(e),o?o.insertAfter(t):r?r.insertBefore(t):n.append(t)}}function qc(e){if($c(e))return;const t=e.getParent(),n=t?t.getParent():void 0;if(cu(n?n.getParent():void 0)&&nu(n)&&cu(t)){const r=t?t.getFirstChild():void 0,o=t?t.getLastChild():void 0;if(e.is(r))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(o))n.insertAfter(e),t.isEmpty()&&n.remove();else{const r=t.getListType(),o=tu(),i=lu(r);o.append(i),e.getPreviousSiblings().forEach(e=>i.append(e));const s=tu(),a=lu(r);s.append(a),Uc(a,e.getNextSiblings()),n.insertBefore(o),n.insertAfter(s),n.replace(e)}}}function Xc(){const e=ao();if(!Wr(e)||!e.isCollapsed())return!1;const t=e.anchor.getNode();let n=null;if(nu(t)&&0===t.getChildrenSize())n=t;else if(Or(t)){const e=t.getParent();nu(e)&&e.getChildren().every(e=>Or(e)&&""===e.getTextContent().trim())&&(n=e)}if(null===n)return!1;const r=Fc(n),o=n.getParent();cu(o)||jc("A ListItemNode must have a ListNode for a parent.");const i=o.getParent();let s;if(_s(i))s=ai(),r.insertAfter(s);else{if(!nu(i))return!1;s=tu(),i.insertAfter(s)}s.setTextStyle(e.style).setTextFormat(e.format).select();const a=n.getNextSiblings();if(a.length>0){const e=lu(o.getListType());if(nu(s)){const t=tu();t.append(e),s.insertAfter(t)}else s.insertAfter(e);e.append(...a)}return function(e){let t=e;for(;null==t.getNextSibling()&&null==t.getPreviousSibling();){const e=t.getParent();if(null==e||!nu(e)&&!cu(e))break;t=e}t.remove()}(n),!0}class Qc extends Yo{__value;__checked;$config(){return this.config("listitem",{$transform:e=>{if(null==e.__checked)return;const t=e.getParent();cu(t)&&"check"!==t.getListType()&&null!=e.getChecked()&&e.setChecked(void 0)},extends:Yo,importDOM:{li:()=>({conversion:Zc,priority:0})}})}constructor(e=1,t=void 0,n){super(n),this.__value=void 0===e?1:e,this.__checked=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__value=e.__value,this.__checked=e.__checked}createDOM(e){const t=document.createElement("li");return this.updateListItemDOM(null,t,e),t}updateListItemDOM(e,t,n){!function(e,t,n){const r=t.getParent();!cu(r)||"check"!==r.getListType()||cu(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"))}(t,this,e),t.value=this.__value,function(e,t,n){const r=[],o=[],i=t.list,s=i?i.listitem:void 0;let a;i&&i.nested&&(a=i.nested.listitem);void 0!==s&&r.push(...$a(s));if(i){const e=n.getParent(),t=cu(e)&&"check"===e.getListType(),s=n.getChecked();t&&!s||o.push(i.listitemUnchecked),t&&s||o.push(i.listitemChecked),t&&r.push(s?i.listitemChecked:i.listitemUnchecked)}if(void 0!==a){const e=$a(a);n.getChildren().some(e=>cu(e))?r.push(...e):o.push(...e)}o.length>0&&Wa(e,...o);r.length>0&&Ha(e,...r)}(t,n.theme,this);const r=e?e.__style:"",o=this.__style;r!==o&&(""===o?t.removeAttribute("style"):t.style.cssText=o),function(e,t,n){const r=Va(t.__textStyle);for(const t in r)e.style.setProperty(`--listitem-marker-${t}`,r[t]);if(n)for(const t in Va(n.__textStyle))t in r||e.style.removeProperty(`--listitem-marker-${t}`)}(t,this,e)}updateDOM(e,t,n){const r=t;return this.updateListItemDOM(e,r,n),!1}updateFromJSON(e){return super.updateFromJSON(e).setValue(e.value).setChecked(e.checked)}exportDOM(e){const t=this.createDOM(e._config),n=this.getFormatType();n&&(t.style.textAlign=n);const r=this.getDirection();return r&&(t.dir=r),{element:t}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...e){for(let t=0;t<e.length;t++){const n=e[t];if(Vo(n)&&this.canMergeWith(n)){const e=n.getChildren();this.append(...e),n.remove()}else super.append(n)}return this}replace(e,t){if(nu(e))return super.replace(e);this.setIndent(0);const n=this.getParentOrThrow();if(!cu(n))return e;if(n.__first===this.getKey())n.insertBefore(e);else if(n.__last===this.getKey())n.insertAfter(e);else{const t=lu(n.getListType());let r=this.getNextSibling();for(;r;){const e=r;r=r.getNextSibling(),t.append(e)}n.insertAfter(e),e.insertAfter(t)}return t&&(Vo(e)||jc("includeChildren should only be true for ElementNodes"),this.getChildren().forEach(t=>{e.append(t)})),this.remove(),0===n.getChildrenSize()&&n.remove(),e}insertAfter(e,t=!0){const n=this.getParentOrThrow();if(cu(n)||jc("insertAfter: list node is not parent of list item node"),nu(e))return super.insertAfter(e,t);const r=this.getNextSiblings();if(n.insertAfter(e,t),0!==r.length){const o=lu(n.getListType());r.forEach(e=>o.append(e)),e.insertAfter(o,t)}return e}remove(e){const t=this.getPreviousSibling(),n=this.getNextSibling();super.remove(e),t&&n&&$c(t)&&$c(n)&&(Yc(t.getFirstChild(),n.getFirstChild()),n.remove())}insertNewAfter(e,t=!0){const n=tu().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(n,t),n}collapseAtStart(e){const t=ai();this.getChildren().forEach(e=>t.append(e));const n=this.getParentOrThrow(),r=n.getParentOrThrow(),o=nu(r);if(1===n.getChildrenSize())if(o)n.remove(),r.select();else{n.insertBefore(t),n.remove();const r=e.anchor,o=e.focus,i=t.getKey();"element"===r.type&&r.getNode().is(this)&&r.set(i,r.offset,"element"),"element"===o.type&&o.getNode().is(this)&&o.set(i,o.offset,"element")}else n.insertBefore(t),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(e){const t=this.getWritable();return t.__value=e,t}getChecked(){const e=this.getLatest();let t;const n=this.getParent();return cu(n)&&(t=n.getListType()),"check"===t?Boolean(e.__checked):void 0}setChecked(e){const t=this.getWritable();return t.__checked=e,t}toggleChecked(){const e=this.getWritable();return e.setChecked(!e.__checked)}getIndent(){const e=this.getParent();if(null===e||!this.isAttached())return this.getLatest().__indent;let t=e.getParentOrThrow(),n=0;for(;nu(t);)t=t.getParentOrThrow().getParentOrThrow(),n++;return n}setIndent(e){"number"!=typeof e&&jc("Invalid indent value."),(e=Math.floor(e))>=0||jc("Indent value must be non-negative.");let t=this.getIndent();for(;t!==e;)t<e?(Jc(this),t++):(qc(this),t--);return this}canInsertAfter(e){return nu(e)}canReplaceWith(e){return nu(e)}canMergeWith(e){return nu(e)||li(e)}extractWithChild(e,t){if(!Wr(t))return!1;const n=t.anchor.getNode(),r=t.focus.getNode();return this.isParentOf(n)&&this.isParentOf(r)&&this.getTextContent().length===t.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return lu("bullet")}canMergeWhenEmpty(){return!0}}function Zc(e){if(e.classList.contains("task-list-item"))for(const t of e.children)if("INPUT"===t.tagName)return eu(t);if(e.classList.contains("joplin-checkbox"))for(const t of e.children)if(t.classList.contains("checkbox-wrapper")&&t.children.length>0&&"INPUT"===t.children[0].tagName)return eu(t.children[0]);const t=e.getAttribute("aria-checked");return{node:tu("true"===t||"false"!==t&&void 0)}}function eu(e){if(!("checkbox"===e.getAttribute("type")))return{node:null};return{node:tu(e.hasAttribute("checked"))}}function tu(e){return Ss(new Qc(void 0,e))}function nu(e){return e instanceof Qc}class ru extends Yo{__tag;__start;__listType;$config(){return this.config("list",{$transform:e=>{!function(e){const t=e.getNextSibling();cu(t)&&e.getListType()===t.getListType()&&Yc(e,t)}(e),Vc(e)},extends:Yo,importDOM:{ol:()=>({conversion:su,priority:0}),ul:()=>({conversion:su,priority:0})}})}constructor(e="number",t=1,n){super(n);const r=au[e]||e;this.__listType=r,this.__tag="number"===r?"ol":"ul",this.__start=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__listType=e.__listType,this.__tag=e.__tag,this.__start=e.__start}getTag(){return this.getLatest().__tag}setListType(e){const t=this.getWritable();return t.__listType=e,t.__tag="number"===e?"ol":"ul",t}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(e){const t=this.getWritable();return t.__start=e,t}createDOM(e,t){const n=this.__tag,r=document.createElement(n);return 1!==this.__start&&r.setAttribute("start",String(this.__start)),r.__lexicalListType=this.__listType,ou(r,e.theme,this),r}updateDOM(e,t,n){return e.__tag!==this.__tag||e.__listType!==this.__listType||(ou(t,n.theme,this),!1)}updateFromJSON(e){return super.updateFromJSON(e).setListType(e.listType).setStart(e.start)}exportDOM(e){const t=this.createDOM(e._config,e);return Ls(t)&&(1!==this.__start&&t.setAttribute("start",String(this.__start)),"check"===this.__listType&&t.setAttribute("__lexicalListType","check")),{element:t}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(e,t,n){let r=n;for(let e=0;e<n.length;e++){const t=n[e];nu(t)||(r===n&&(r=[...n]),r[e]=tu().append(!Vo(t)||cu(t)||t.isInline()?t:Nr(t.getTextContent())))}return super.splice(e,t,r)}extractWithChild(e){return nu(e)}}function ou(e,t,n){const r=[],o=[],i=t.list;if(void 0!==i){const e=i[`${n.__tag}Depth`]||[],t=Dc(n)-1,s=t%e.length,a=e[s],l=i[n.__tag];let c;const u=i.nested,d=i.checklist;if(void 0!==u&&u.list&&(c=u.list),void 0!==l&&r.push(l),void 0!==d&&"check"===n.__listType&&r.push(d),void 0!==a){r.push(...$a(a));for(let t=0;t<e.length;t++)t!==s&&o.push(n.__tag+t)}if(void 0!==c){const e=$a(c);t>1?r.push(...e):o.push(...e)}}o.length>0&&Wa(e,...o),r.length>0&&Ha(e,...r)}function iu(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];if(nu(r)){t.push(r);const e=r.getChildren();e.length>1&&e.forEach(e=>{cu(e)&&t.push(Hc(e))})}else t.push(Hc(r))}return t}function su(e){const t=e.nodeName.toLowerCase();let n=null;if("ol"===t){n=lu("number",e.start)}else"ul"===t&&(n=function(e){if("check"===e.getAttribute("__lexicallisttype")||e.classList.contains("contains-task-list")||"1"===e.getAttribute("data-is-checklist"))return!0;for(const t of e.childNodes)if(Ls(t)&&t.hasAttribute("aria-checked"))return!0;return!1}(e)?lu("check"):lu("bullet"));return{after:iu,node:n}}const au={ol:"number",ul:"bullet"};function lu(e="number",t=1){return Ss(new ru(e,t))}function cu(e){return e instanceof ru}const uu=kt("UPDATE_LIST_START_COMMAND"),du=kt("INSERT_UNORDERED_LIST_COMMAND"),fu=kt("INSERT_ORDERED_LIST_COMMAND"),pu=kt("REMOVE_LIST_COMMAND");function hu(e){const t=Ka(e.registerCommand(fu,()=>(Kc("number"),!0),1),e.registerCommand(uu,e=>{const{listNodeKey:t,newStart:n}=e,r=Fi(t);return!!cu(r)&&("number"===r.getListType()&&(r.setStart(n),Vc(r)),!0)},1),e.registerCommand(du,()=>(Kc("bullet"),!0),1),e.registerCommand(pu,()=>(function(){const e=ao();if(Wr(e)){const t=new Set,n=e.getNodes(),r=e.anchor.getNode();if(Wc(r,n))t.add(Fc(r));else for(let e=0;e<n.length;e++){const r=n[e];if(Oi(r)){const e=hl(r,Qc);null!=e&&t.add(Fc(e))}}for(const n of t){let t=n;const r=Bc(n);for(const n of r){const r=ai().setTextStyle(e.style).setTextFormat(e.format);Uc(r,n.getChildren()),t.insertAfter(r),t=r,n.__key===e.anchor.key&&Ea(e.anchor,Oa(fa(r,"next"))),n.__key===e.focus.key&&Ea(e.focus,Oa(fa(r,"next"))),n.remove()}n.remove()}}}(),!0),1),e.registerCommand(Pt,()=>Xc(),1),e.registerNodeTransform(Qc,e=>{const t=e.getFirstChild();if(t){if(Or(t)){const n=t.getStyle(),r=t.getFormat();e.getTextStyle()!==n&&e.setTextStyle(n),e.getTextFormat()!==r&&e.setTextFormat(r)}}else{const t=ao();Wr(t)&&(t.style!==e.getTextStyle()||t.format!==e.getTextFormat())&&t.isCollapsed()&&e.is(t.anchor.getNode())&&e.setTextStyle(t.style).setTextFormat(t.format)}}),e.registerNodeTransform(Sr,e=>{const t=e.getParent();if(nu(t)&&e.is(t.getFirstChild())){const n=e.getStyle(),r=e.getFormat();n===t.getTextStyle()&&r===t.getTextFormat()||t.setTextStyle(n).setTextFormat(r)}}));return t}function gu(e){const t=e=>{const t=e.getParent();if(cu(e.getFirstChild())||!cu(t))return;const n=Ys(e,e=>nu(e)&&cu(e.getParent())&&nu(e.getPreviousSibling()));if(null===n&&e.getIndent()>0)e.setIndent(0);else if(nu(n)){const r=n.getPreviousSibling();if(nu(r)){const n=function(e){let t=e,n=t.getFirstChild();for(;cu(n);){const e=n.getLastChild();if(!nu(e))break;t=e,n=t.getFirstChild()}return t}(r),o=n.getParent();if(cu(o)){const n=Dc(o);n+1<Dc(t)&&e.setIndent(n)}}}};return e.registerNodeTransform(ru,e=>{const n=[e];for(;n.length>0;){const e=n.shift();if(cu(e))for(const r of e.getChildren())if(nu(r)){t(r);const e=r.getFirstChild();cu(e)&&n.push(e)}}})}const mu=v(null);function vu(){const e=b(mu);return null==e&&function(e){throw new Error(e)}("LexicalComposerContext.useLexicalComposerContext: cannot find a LexicalComposerContext"),e}var bu,yu,xu={exports:{}},_u={};var wu=(yu||(yu=1,xu.exports=function(){if(bu)return _u;bu=1;var e=y,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 s(e,n,s){var a,l={},c=null,u=null;for(a in void 0!==s&&(c=""+s),void 0!==n.key&&(c=""+n.key),void 0!==n.ref&&(u=n.ref),n)r.call(n,a)&&!i.hasOwnProperty(a)&&(l[a]=n[a]);if(e&&e.defaultProps)for(a in n=e.defaultProps)void 0===l[a]&&(l[a]=n[a]);return{$$typeof:t,type:e,key:c,ref:u,props:l,_owner:o.current}}return _u.Fragment=n,_u.jsx=s,_u.jsxs=s,_u}()),xu.exports);const Su="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,ku=Su?_:w,Cu={tag:ar};function Eu({initialConfig:e,children:t}){const n=x(()=>{const{theme:t,namespace:n,nodes:r,onError:o,editorState:i,html:s}=e,a=function(e,t){return{getTheme:function(){return null!=t?t:null}}}(0,t),l=fi({editable:e.editable,html:s,namespace:n,nodes:r,onError:e=>o(e,l),theme:t});return function(e,t){if(null===t)return;if(void 0===t)e.update(()=>{const t=Ui();if(t.isEmpty()){const n=ai();t.append(n);const r=Su?document.activeElement:null;(null!==ao()||null!==r&&r===e.getRootElement())&&n.select()}},Cu);else if(null!==t)switch(typeof t){case"string":{const n=e.parseEditorState(t);e.setEditorState(n,Cu);break}case"object":e.setEditorState(t,Cu);break;case"function":e.update(()=>{Ui().isEmpty()&&t(e)},Cu)}}(l,i),[l,a]},[]);return ku(()=>{const t=e.editable,[r]=n;r.setEditable(void 0===t||t)},[]),wu.jsx(mu.Provider,{value:n,children:t})}function Tu(e,t,n,r,o){if(null===e||0===n.size&&0===r.size&&!o)return 0;const i=t._selection,s=e._selection;if(o)return 1;if(!(Wr(i)&&Wr(s)&&s.isCollapsed()&&i.isCollapsed()))return 0;const a=function(e,t,n){const r=e._nodeMap,o=[];for(const e of t){const t=r.get(e);void 0!==t&&o.push(t)}for(const[e,t]of n){if(!t)continue;const n=r.get(e);void 0===n||Zo(n)||o.push(n)}return o}(t,n,r);if(0===a.length)return 0;if(a.length>1){const n=t._nodeMap,r=n.get(i.anchor.key),o=n.get(s.anchor.key);return r&&o&&!e._nodeMap.has(r.__key)&&Or(r)&&1===r.__text.length&&1===i.anchor.offset?2:0}const l=a[0],c=e._nodeMap.get(l.__key);if(!Or(c)||!Or(l)||c.__mode!==l.__mode)return 0;const u=c.__text,d=l.__text;if(u===d)return 0;const f=i.anchor,p=s.anchor;if(f.key!==p.key||"text"!==f.type)return 0;const h=f.offset,g=p.offset,m=d.length-u.length;return 1===m&&g===h-1?2:-1===m&&g===h+1?3:-1===m&&g===h?4:0}function Au(e,t){let n=Date.now(),r=0;return(o,i,s,a,l,c)=>{const u=Date.now();if(c.has(sr))return r=0,n=u,2;const d=Tu(o,i,a,l,e.isComposing()),f=(()=>{const f=null===s||s.editor===e,p=c.has("history-push");if(!p&&f&&c.has(ar))return 0;if(null===o)return 1;const h=i._selection;if(!(a.size>0||l.size>0))return null!==h?0:2;const g="number"==typeof t?t:t.peek();if(!1===p&&0!==d&&d===r&&u<n+g&&f)return 0;if(1===a.size){if(function(e,t,n){const r=t._nodeMap.get(e),o=n._nodeMap.get(e),i=t._selection,s=n._selection;return!(Wr(i)&&Wr(s)&&"element"===i.anchor.type&&"element"===i.focus.type&&"text"===s.anchor.type&&"text"===s.focus.type||!Or(r)||!Or(o)||r.__parent!==o.__parent)&&JSON.stringify(t.read(()=>r.exportJSON()))===JSON.stringify(n.read(()=>o.exportJSON()))}(Array.from(a)[0],o,i))return 0}return 1})();return n=u,r=d,f}}function Lu(e){e.undoStack=[],e.redoStack=[],e.current=null}function Mu(e,t,n){const r=Au(e,n),o=Ka(e.registerCommand($t,()=>(function(e,t){const n=t.redoStack,r=t.undoStack;if(0!==r.length){const o=t.current,i=r.pop();null!==o&&(n.push(o),e.dispatchCommand(mn,!0)),0===r.length&&e.dispatchCommand(vn,!1),t.current=i||null,i&&i.editor.setEditorState(i.editorState,{tag:sr})}}(e,t),!0),ci),e.registerCommand(Ht,()=>(function(e,t){const n=t.redoStack,r=t.undoStack;if(0!==n.length){const o=t.current;null!==o&&(r.push(o),e.dispatchCommand(vn,!0));const i=n.pop();0===n.length&&e.dispatchCommand(mn,!1),t.current=i||null,i&&i.editor.setEditorState(i.editorState,{tag:sr})}}(e,t),!0),ci),e.registerCommand(hn,()=>(Lu(t),!1),ci),e.registerCommand(gn,()=>(Lu(t),e.dispatchCommand(mn,!1),e.dispatchCommand(vn,!1),!0),ci),e.registerUpdateListener(({editorState:n,prevEditorState:o,dirtyLeaves:i,dirtyElements:s,tags:a})=>{const l=t.current,c=t.redoStack,u=t.undoStack,d=null===l?null:l.editorState;if(null!==l&&n===d)return;const f=r(o,n,l,i,s,a);if(1===f)0!==c.length&&(t.redoStack=[],e.dispatchCommand(mn,!1)),null!==l&&(u.push({...l}),e.dispatchCommand(vn,!0));else if(2===f)return;t.current={editor:e,editorState:n}}));return o}function Ru({delay:e,externalHistoryState:t}){const[n]=vu();return function(e,t,n=1e3){const r=x(()=>t||{current:null,redoStack:[],undoStack:[]},[t]);w(()=>Mu(e,r,n),[n,e,r])}(n,t,e),null}function Nu({hasStrictIndent:e=!1}){const[t]=vu();return w(()=>{if(!t.hasNodes([ru,Qc]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[t]),w(()=>{if(e)return gu(t)},[t,e]),function(e){w(()=>hu(e),[e])}(t),null}function Ou({maxIndent:e}){const[t]=vu();return w(()=>cc(t,e),[t,e]),null}function Pu(e,t){const n=Mi(t)?t.body.childNodes:t.childNodes;let r=[];const o=[];for(const t of n)if(!zu.has(t.nodeName)){const n=ju(t,e,o,!1);null!==n&&(r=r.concat(n))}return function(e){for(const t of e)t.getNextSibling()instanceof oi&&t.insertAfter(hr());for(const t of e){const e=t.getChildren();for(const n of e)t.insertBefore(n);t.remove()}}(o),r}function Iu(e,t,n,r=null){let o=null===r||t.isSelected(r);const i=Vo(t)&&t.excludeFromCopy("html");let s=t;null!==r&&Or(t)&&(s=Qa(r,t,"clone"));const a=Vo(s)?s.getChildren():[],l=yi(e,s.getType());let c;c=l&&void 0!==l.exportDOM?l.exportDOM(e,s):s.exportDOM(e);const{element:u,after:d}=c;if(!u)return!1;const f=document.createDocumentFragment();for(let n=0;n<a.length;n++){const i=a[n],s=Iu(e,i,f,r);!o&&Vo(t)&&s&&t.extractWithChild(i,r,"html")&&(o=!0)}if(o&&!i){if((Ls(u)||Rs(u))&&u.append(f),n.append(u),d){const e=d.call(s,u);e&&(Rs(u)?u.replaceChildren(e):u.replaceWith(e))}}else n.append(f);return o}const zu=new Set(["STYLE","SCRIPT"]);function ju(e,t,n,r,o=new Map,i){let s=[];if(zu.has(e.nodeName))return s;let a=null;const l=function(e,t){const{nodeName:n}=e,r=t._htmlConversions.get(n.toLowerCase());let o=null;if(void 0!==r)for(const t of r){const n=t(e);null!==n&&(null===o||(o.priority||0)<=(n.priority||0))&&(o=n)}return null!==o?o.conversion:null}(e,t),c=l?l(e):null;let u=null;if(null!==c){u=c.after;const t=c.node;if(a=Array.isArray(t)?t[t.length-1]:t,null!==a){for(const[,e]of o)if(a=e(a,i),!a)break;a&&s.push(...Array.isArray(t)?t:[a])}null!=c.forChild&&o.set(e.nodeName,c.forChild)}const d=e.childNodes;let f=[];const p=(null==a||!_s(a))&&(null!=a&&to(a)||r);for(let e=0;e<d.length;e++)f.push(...ju(d[e],t,n,p,new Map(o),a));return null!=u&&(f=u(f)),Os(e)&&(f=Du(e,f,p?()=>{const e=new oi;return n.push(e),e}:ai)),null==a?f.length>0?s=s.concat(f):Os(e)&&function(e){if(null==e.nextSibling||null==e.previousSibling)return!1;return Ns(e.nextSibling)&&Ns(e.previousSibling)}(e)&&(s=s.concat(hr())):Vo(a)&&a.append(...f),s}function Du(e,t,n){const r=e.style.textAlign,o=[];let i=[];for(let e=0;e<t.length;e++){const s=t[e];if(to(s))r&&!s.getFormat()&&s.setFormat(r),o.push(s);else if(i.push(s),e===t.length-1||e<t.length-1&&to(t[e+1])){const e=n();e.setFormat(r),e.append(...i),o.push(e),i=[]}}return o}function Fu(e){throw new Error(e)}function Bu(e,t,n){const r=e.getData("application/x-lexical-editor");if(r)try{const e=JSON.parse(r);if(e.namespace===n._config.namespace&&Array.isArray(e.nodes)){const r=function(e){const t=[];for(let n=0;n<e.length;n++){const r=zo(e[n]);Or(r)&&el(r),t.push(r)}return t}(e.nodes);return $u(n,r,t)}}catch(e){console.error(e)}const o=e.getData("text/html"),i=e.getData("text/plain");if(o&&i!==o)try{const e=(new DOMParser).parseFromString(function(e){if(window.trustedTypes&&window.trustedTypes.createPolicy){return window.trustedTypes.createPolicy("lexical",{createHTML:e=>e}).createHTML(e)}return e}(o),"text/html");return $u(n,Pu(n,e),t)}catch(e){console.error(e)}const s=i||e.getData("text/uri-list");if(null!=s)if(Wr(t)){const e=s.split(/(\r?\n|\t)/);""===e[e.length-1]&&e.pop();for(let t=0;t<e.length;t++){const n=ao();if(Wr(n)){const r=e[t];"\n"===r||"\r\n"===r?n.insertParagraph():"\t"===r?n.insertNodes([zr()]):n.insertText(r)}}}else t.insertRawText(s)}function $u(e,t,n){e.dispatchCommand(Et,{nodes:t,selection:n})||(n.insertNodes(t),function(e){if(Wr(e)&&e.isCollapsed()){let t=null;const n=Ca(e.anchor,"previous");if(n)if(na(n))t=n.origin;else{const e=ba(n,fa(Ui(),"next").getFlipped());for(const n of e){if(Or(n.origin)){t=n.origin;break}if(Vo(n.origin)&&!n.origin.isInline())break}}if(t&&Or(t)){const n=t.getFormat(),r=t.getStyle();e.format===n&&e.style===r||(e.format=n,e.style=r,e.dirty=!0)}}}(n))}function Hu(e,t,n,r=[]){let o=null===t||n.isSelected(t);const i=Vo(n)&&n.excludeFromCopy("html");let s=n;null!==t&&Or(s)&&(s=Qa(t,s,"clone"));const a=Vo(s)?s.getChildren():[],l=function(e){const t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&Fu(`LexicalNode: Node ${n.name} does not implement .exportJSON().`),Vo(e)){const e=t.children;Array.isArray(e)||Fu(`LexicalNode: Node ${n.name} is an element but .exportJSON() does not have a children array.`)}return t}(s);Or(s)&&0===s.getTextContentSize()&&(o=!1);for(let r=0;r<a.length;r++){const i=a[r],s=Hu(e,t,i,l.children);!o&&Vo(n)&&s&&n.extractWithChild(i,t,"clone")&&(o=!0)}if(o&&!i)r.push(l);else if(Array.isArray(l.children))for(let e=0;e<l.children.length;e++){const t=l.children[e];r.push(t)}return o}let Wu=null;async function Ku(e,t,n){if(null!==Wu)return!1;if(null!==t)return new Promise((r,o)=>{e.update(()=>{r(Uu(e,t,n))})});const r=e.getRootElement(),o=e._window||window,i=o.document,s=Ts(o);if(null===r||null===s)return!1;const a=i.createElement("span");a.style.cssText="position: fixed; top: -1000px;",a.append(i.createTextNode("#")),r.append(a);const l=new Range;return l.setStart(a,0),l.setEnd(a,1),s.removeAllRanges(),s.addRange(l),new Promise((t,r)=>{const s=e.registerCommand(dn,r=>(vl(r,ClipboardEvent)&&(s(),null!==Wu&&(o.clearTimeout(Wu),Wu=null),t(Uu(e,r,n))),!0),4);Wu=o.setTimeout(()=>{s(),Wu=null,t(!1)},50),i.execCommand("copy"),a.remove()})}function Uu(e,t,n){if(void 0===n){const t=Ts(e._window),r=ao();if(!r||r.isCollapsed())return!1;if(!t)return!1;const o=t.anchorNode,i=t.focusNode;if(null!==o&&null!==i&&!Si(e,o,i))return!1;n=Yu(r)}t.preventDefault();const r=t.clipboardData;return null!==r&&(function(e,t){for(const[n]of Gu)void 0===t[n]&&e.setData(n,"");for(const n in t){const r=t[n];void 0!==r&&e.setData(n,r)}}(r,n),!0)}const Gu=[["text/html",function(e,t=ao()){return null==t&&Fu("Expected valid LexicalSelection"),Wr(t)&&t.isCollapsed()||0===t.getNodes().length?"":function(e,t){if("undefined"==typeof document||"undefined"==typeof window&&void 0===global.window)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const n=document.createElement("div"),r=Ui().getChildren();for(let o=0;o<r.length;o++)Iu(e,r[o],n,t);return n.innerHTML}(e,t)}],["application/x-lexical-editor",function(e,t=ao()){return null==t&&Fu("Expected valid LexicalSelection"),Wr(t)&&t.isCollapsed()||0===t.getNodes().length?null:JSON.stringify(function(e,t){const n=[],r=Ui().getChildren();for(let o=0;o<r.length;o++){Hu(e,t,r[o],n)}return{namespace:e._config.namespace,nodes:n}}(e,t))}]];function Yu(e=ao()){const t={"text/plain":e?e.getTextContent():""};if(e){const n=Is();for(const[r,o]of Gu){const i=o(n,e);null!==i&&(t[r]=i)}}return t}function Vu(e,t){if(void 0!==document.caretRangeFromPoint){const n=document.caretRangeFromPoint(e,t);return null===n?null:{node:n.startContainer,offset:n.startOffset}}if("undefined"!==document.caretPositionFromPoint){const n=document.caretPositionFromPoint(e,t);return null===n?null:{node:n.offsetNode,offset:n.offset}}return null}const Ju="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,qu=Ju&&"documentMode"in document?document.documentMode:null,Xu=Ju&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Qu=!(!Ju||!("InputEvent"in window)||qu)&&"getTargetRanges"in new window.InputEvent("input"),Zu=Ju&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),ed=Ju&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,td=Ju&&/^(?=.*Chrome).*/i.test(navigator.userAgent),nd=Ju&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&Xu&&!td,rd=kt("DRAG_DROP_PASTE_FILE");class od extends Yo{static getType(){return"quote"}static clone(e){return new od(e.__key)}createDOM(e){const t=document.createElement("blockquote");return Ha(t,e.theme.quote),t}updateDOM(e,t){return!1}static importDOM(){return{blockquote:e=>({conversion:ud,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(Ls(t)){this.isEmpty()&&t.append(document.createElement("br"));const e=this.getFormatType();e&&(t.style.textAlign=e);const n=this.getDirection();n&&(t.dir=n)}return{element:t}}static importJSON(e){return id().updateFromJSON(e)}insertNewAfter(e,t){const n=ai(),r=this.getDirection();return n.setDirection(r),this.insertAfter(n,t),n}collapseAtStart(){const e=ai();return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}canMergeWhenEmpty(){return!0}}function id(){return Ss(new od)}function sd(e){return e instanceof od}class ad extends Yo{__tag;static getType(){return"heading"}static clone(e){return new ad(e.__tag,e.__key)}constructor(e,t){super(t),this.__tag=e}getTag(){return this.__tag}setTag(e){const t=this.getWritable();return this.__tag=e,t}createDOM(e){const t=this.__tag,n=document.createElement(t),r=e.theme.heading;if(void 0!==r){Ha(n,r[t])}return n}updateDOM(e,t,n){return e.__tag!==this.__tag}static importDOM(){return{h1:e=>({conversion:cd,priority:0}),h2:e=>({conversion:cd,priority:0}),h3:e=>({conversion:cd,priority:0}),h4:e=>({conversion:cd,priority:0}),h5:e=>({conversion:cd,priority:0}),h6:e=>({conversion:cd,priority:0}),p:e=>{const t=e.firstChild;return null!==t&&ld(t)?{conversion:()=>({node:null}),priority:3}:null},span:e=>ld(e)?{conversion:e=>({node:dd("h1")}),priority:3}:null}}exportDOM(e){const{element:t}=super.exportDOM(e);if(Ls(t)){this.isEmpty()&&t.append(document.createElement("br"));const e=this.getFormatType();e&&(t.style.textAlign=e);const n=this.getDirection();n&&(t.dir=n)}return{element:t}}static importJSON(e){return dd(e.tag).updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTag(e.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(e,t=!0){const n=e?e.anchor.offset:0,r=this.getLastDescendant(),o=!r||e&&e.anchor.key===r.getKey()&&n===r.getTextContentSize()||!e?ai():dd(this.getTag()),i=this.getDirection();if(o.setDirection(i),this.insertAfter(o,t),0===n&&!this.isEmpty()&&e){const e=ai();e.select(),this.replace(e,!0)}return o}collapseAtStart(){const e=this.isEmpty()?ai():dd(this.getTag());return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}extractWithChild(){return!0}}function ld(e){return"span"===e.nodeName.toLowerCase()&&"26pt"===e.style.fontSize}function cd(e){const t=e.nodeName.toLowerCase();let n=null;return"h1"!==t&&"h2"!==t&&"h3"!==t&&"h4"!==t&&"h5"!==t&&"h6"!==t||(n=dd(t),null!==e.style&&($s(e,n),n.setFormat(e.style.textAlign))),{node:n}}function ud(e){const t=id();return null!==e.style&&(t.setFormat(e.style.textAlign),$s(e,t)),{node:t}}function dd(e="h1"){return Ss(new ad(e))}function fd(e){return e instanceof ad}function pd(e){let t=null;if(vl(e,DragEvent)?t=e.dataTransfer:vl(e,ClipboardEvent)&&(t=e.clipboardData),null===t)return[!1,[],!1];const n=t.types,r=n.includes("Files"),o=n.includes("text/html")||n.includes("text/plain");return[r,Array.from(t.files),o]}function hd(e){const t=ao();if(!Wr(t))return!1;const n=new Set,r=t.getNodes();for(let t=0;t<r.length;t++){const o=r[t],i=o.getKey();if(n.has(i))continue;const s=Ys(o,e=>Vo(e)&&!e.isInline());if(null===s)continue;const a=s.getKey();s.canIndent()&&!n.has(a)&&(n.add(a),e(s))}return n.size>0}function gd(e){return Xo(Hi(e))}function md(e){for(const t of["lowercase","uppercase","capitalize"])e.hasFormat(t)&&e.toggleFormat(t)}function vd(e){const t=Ka(e.registerCommand(Tt,e=>{const t=ao();return!!Ur(t)&&(t.clear(),!0)},ci),e.registerCommand(Nt,e=>{const t=ao();return Wr(t)?(t.deleteCharacter(e),!0):!!Ur(t)&&(t.deleteNodes(),!0)},ci),e.registerCommand(Dt,e=>{const t=ao();return!!Wr(t)&&(t.deleteWord(e),!0)},ci),e.registerCommand(Ft,e=>{const t=ao();return!!Wr(t)&&(t.deleteLine(e),!0)},ci),e.registerCommand(It,t=>{const n=ao();if("string"==typeof t)null!==n&&n.insertText(t);else{if(null===n)return!1;const r=t.dataTransfer;if(null!=r)Bu(r,n,e);else if(Wr(n)){const e=t.data;return e&&n.insertText(e),!0}}return!0},ci),e.registerCommand(jt,()=>{const e=ao();return!!Wr(e)&&(e.removeText(),!0)},ci),e.registerCommand(Bt,e=>{const t=ao();return!!Wr(t)&&(t.formatText(e),!0)},ci),e.registerCommand(an,e=>{const t=ao();if(!Wr(t)&&!Ur(t))return!1;const n=t.getNodes();for(const t of n){const n=Ys(t,e=>Vo(e)&&!e.isInline());null!==n&&n.setFormat(e)}return!0},ci),e.registerCommand(Ot,e=>{const t=ao();return!!Wr(t)&&(t.insertLineBreak(e),!0)},ci),e.registerCommand(Pt,()=>{const e=ao();return!!Wr(e)&&(e.insertParagraph(),!0)},ci),e.registerCommand(nn,()=>(mo([zr()]),!0),ci),e.registerCommand(rn,()=>hd(e=>{const t=e.getIndent();e.setIndent(t+1)}),ci),e.registerCommand(on,()=>hd(e=>{const t=e.getIndent();t>0&&e.setIndent(Math.max(0,t-1))}),ci),e.registerCommand(Vt,e=>{const t=ao();if(Ur(t)){const n=t.getNodes();if(n.length>0)return e.preventDefault(),n[0].selectPrevious(),!0}else if(Wr(t)){const n=fs(t.focus,!0);if(!e.shiftKey&&Xo(n)&&!n.isIsolated()&&!n.isInline())return n.selectPrevious(),e.preventDefault(),!0}return!1},ci),e.registerCommand(Jt,e=>{const t=ao();if(Ur(t)){const n=t.getNodes();if(n.length>0)return e.preventDefault(),n[0].selectNext(0,0),!0}else if(Wr(t)){if(function(e){const t=e.focus;return"root"===t.key&&t.offset===Ui().getChildrenSize()}(t))return e.preventDefault(),!0;const n=fs(t.focus,!1);if(!e.shiftKey&&Xo(n)&&!n.isIsolated()&&!n.isInline())return n.selectNext(),e.preventDefault(),!0}return!1},ci),e.registerCommand(Gt,e=>{const t=ao();if(Ur(t)){const n=t.getNodes();if(n.length>0)return e.preventDefault(),Xa(n[0])?n[0].selectNext(0,0):n[0].selectPrevious(),!0}if(!Wr(t))return!1;if(sl(t,!0)){const n=e.shiftKey;return e.preventDefault(),ll(t,n,!0),!0}return!1},ci),e.registerCommand(Kt,e=>{const t=ao();if(Ur(t)){const n=t.getNodes();if(n.length>0)return e.preventDefault(),Xa(n[0])?n[0].selectPrevious():n[0].selectNext(0,0),!0}if(!Wr(t))return!1;const n=e.shiftKey;return!!sl(t,!1)&&(e.preventDefault(),ll(t,n,!1),!0)},ci),e.registerCommand(Qt,t=>{if(gd(t.target))return!1;const n=ao();if(Wr(n)){if(function(e){if(!e.isCollapsed())return!1;const{anchor:t}=e;if(0!==t.offset)return!1;const n=t.getNode();if(Zo(n))return!1;const r=gl(n);return r.getIndent()>0&&(r.is(n)||n.is(r.getFirstDescendant()))}(n))return t.preventDefault(),e.dispatchCommand(on,void 0);if(ed&&"ko-KR"===navigator.language)return!1}else if(!Ur(n))return!1;return t.preventDefault(),e.dispatchCommand(Nt,!0)},ci),e.registerCommand(en,t=>{if(gd(t.target))return!1;const n=ao();return!(!Wr(n)&&!Ur(n))&&(t.preventDefault(),e.dispatchCommand(Nt,!1))},ci),e.registerCommand(qt,t=>{const n=ao();if(!Wr(n))return!1;if(md(n),null!==t){if((ed||Zu||nd)&&Qu)return!1;if(t.preventDefault(),t.shiftKey)return e.dispatchCommand(Ot,!1)}return e.dispatchCommand(Pt,void 0)},ci),e.registerCommand(Zt,()=>!!Wr(ao())&&(e.blur(),!0),ci),e.registerCommand(sn,t=>{const[,n]=pd(t);if(n.length>0){const r=Vu(t.clientX,t.clientY);if(null!==r){const{offset:t,node:o}=r,i=Hi(o);if(null!==i){const e=ro();if(Or(i))e.anchor.set(i.getKey(),t,"text"),e.focus.set(i.getKey(),t,"text");else{const t=i.getParentOrThrow().getKey(),n=i.getIndexWithinParent()+1;e.anchor.set(t,n,"element"),e.focus.set(t,n,"element")}Yi(He(e))}e.dispatchCommand(rd,n)}return t.preventDefault(),!0}return!!Wr(ao())},ci),e.registerCommand(ln,e=>{const[t]=pd(e),n=ao();return!(t&&!Wr(n))},ci),e.registerCommand(cn,e=>{const[t]=pd(e),n=ao();if(t&&!Wr(n))return!1;const r=Vu(e.clientX,e.clientY);if(null!==r){Xo(Hi(r.node))&&e.preventDefault()}return!0},ci),e.registerCommand(pn,()=>(function(e){const t=Ui();if(Wr(e)){const t=e.anchor,n=e.focus,r=t.getNode().getTopLevelElementOrThrow().getParentOrThrow();return t.set(r.getKey(),0,"element"),n.set(r.getKey(),r.getChildrenSize(),"element"),He(e),e}{const e=t.select(0,t.getChildrenSize());Yi(He(e))}}(),!0),ci),e.registerCommand(dn,t=>(Ku(e,vl(t,ClipboardEvent)?t:null),!0),ci),e.registerCommand(fn,t=>(async function(e,t){await Ku(t,vl(e,ClipboardEvent)?e:null),t.update(()=>{const e=ao();Wr(e)?e.removeText():Ur(e)&&e.getNodes().forEach(e=>e.remove())})}(t,e),!0),ci),e.registerCommand(zt,t=>{const[,n,r]=pd(t);if(n.length>0&&!r)return e.dispatchCommand(rd,n),!0;if(Ms(t.target)&&wi(t.target))return!1;return null!==ao()&&(function(e,t){e.preventDefault(),t.update(()=>{const n=ao(),r=vl(e,InputEvent)||vl(e,KeyboardEvent)?null:e.clipboardData;null!=r&&null!==n&&Bu(r,n,t)},{tag:"paste"})}(t,e),!0)},ci),e.registerCommand(Xt,e=>{const t=ao();return Wr(t)&&md(t),!1},ci),e.registerCommand(tn,e=>{const t=ao();return Wr(t)&&md(t),!1},ci));return t}function bd(e,t,n){w(()=>{e.hasNodes([gc])||function(e){throw new Error(e)}("LexicalAutoLinkPlugin: AutoLinkNode not registered on editor")}),w(()=>zc(e,{changeHandlers:n?[n]:[],matchers:t}),[e,t,n])}function yd({matchers:e,onChange:t}){const[n]=vu();return bd(n,e,t),null}const xd="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?_:w;function _d(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}function wd(){return function(e){const[t]=vu(),n=x(()=>e(t),[t,e]),[r,o]=S(()=>n.initialValueFn()),i=k(r);return xd(()=>{const{initialValueFn:e,subscribe:t}=n,r=e();return i.current!==r&&(i.current=r,o(r)),t(e=>{i.current=e,o(e)})},[n,e]),r}(_d)}const Sd={black:"#000",white:"#fff"},kd="#e57373",Cd="#ef5350",Ed="#f44336",Td="#d32f2f",Ad="#c62828",Ld="#f3e5f5",Md="#ce93d8",Rd="#ba68c8",Nd="#ab47bc",Od="#9c27b0",Pd="#7b1fa2",Id="#e3f2fd",zd="#90caf9",jd="#42a5f5",Dd="#1976d2",Fd="#1565c0",Bd="#4fc3f7",$d="#29b6f6",Hd="#03a9f4",Wd="#0288d1",Kd="#01579b",Ud="#81c784",Gd="#66bb6a",Yd="#4caf50",Vd="#388e3c",Jd="#2e7d32",qd="#1b5e20",Xd="#ffb74d",Qd="#ffa726",Zd="#ff9800",ef="#f57c00",tf="#e65100",nf={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 rf(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 of=Object.freeze({__proto__:null,default:rf}),sf="$$material";function af(){return af=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},af.apply(null,arguments)}function lf(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}var cf=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],n=64===e.charCodeAt(0)&&105===e.charCodeAt(1);if(n&&this._alreadyInsertedOrderInsensitiveRule&&console.error("You're attempting to insert the following rule:\n"+e+"\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."),this._alreadyInsertedOrderInsensitiveRule=this._alreadyInsertedOrderInsensitiveRule||!n,this.isSpeedy){var r=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{r.insertRule(e,r.cssRules.length)}catch(t){/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(e)||console.error('There was a problem inserting the following rule: "'+e+'"',t)}}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,this._alreadyInsertedOrderInsensitiveRule=!1},e}(),uf="-ms-",df="-moz-",ff="-webkit-",pf="comm",hf="rule",gf="decl",mf="@keyframes",vf=Math.abs,bf=String.fromCharCode,yf=Object.assign;function xf(e){return e.trim()}function _f(e,t,n){return e.replace(t,n)}function wf(e,t){return e.indexOf(t)}function Sf(e,t){return 0|e.charCodeAt(t)}function kf(e,t,n){return e.slice(t,n)}function Cf(e){return e.length}function Ef(e){return e.length}function Tf(e,t){return t.push(e),e}var Af=1,Lf=1,Mf=0,Rf=0,Nf=0,Of="";function Pf(e,t,n,r,o,i,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Af,column:Lf,length:s,return:""}}function If(e,t){return yf(Pf("",null,null,"",null,null,0),e,{length:-e.length},t)}function zf(){return Nf=Rf>0?Sf(Of,--Rf):0,Lf--,10===Nf&&(Lf=1,Af--),Nf}function jf(){return Nf=Rf<Mf?Sf(Of,Rf++):0,Lf++,10===Nf&&(Lf=1,Af++),Nf}function Df(){return Sf(Of,Rf)}function Ff(){return Rf}function Bf(e,t){return kf(Of,e,t)}function $f(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 Hf(e){return Af=Lf=1,Mf=Cf(Of=e),Rf=0,[]}function Wf(e){return Of="",e}function Kf(e){return xf(Bf(Rf-1,Yf(91===e?e+2:40===e?e+1:e)))}function Uf(e){for(;(Nf=Df())&&Nf<33;)jf();return $f(e)>2||$f(Nf)>3?"":" "}function Gf(e,t){for(;--t&&jf()&&!(Nf<48||Nf>102||Nf>57&&Nf<65||Nf>70&&Nf<97););return Bf(e,Ff()+(t<6&&32==Df()&&32==jf()))}function Yf(e){for(;jf();)switch(Nf){case e:return Rf;case 34:case 39:34!==e&&39!==e&&Yf(Nf);break;case 40:41===e&&Yf(e);break;case 92:jf()}return Rf}function Vf(e,t){for(;jf()&&e+Nf!==57&&(e+Nf!==84||47!==Df()););return"/*"+Bf(t,Rf-1)+"*"+bf(47===e?e:jf())}function Jf(e){for(;!$f(Df());)jf();return Bf(e,Rf)}function qf(e){return Wf(Xf("",null,null,null,[""],e=Hf(e),0,[0],e))}function Xf(e,t,n,r,o,i,s,a,l){for(var c=0,u=0,d=s,f=0,p=0,h=0,g=1,m=1,v=1,b=0,y="",x=o,_=i,w=r,S=y;m;)switch(h=b,b=jf()){case 40:if(108!=h&&58==Sf(S,d-1)){-1!=wf(S+=_f(Kf(b),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:S+=Kf(b);break;case 9:case 10:case 13:case 32:S+=Uf(h);break;case 92:S+=Gf(Ff()-1,7);continue;case 47:switch(Df()){case 42:case 47:Tf(Zf(Vf(jf(),Ff()),t,n),l);break;default:S+="/"}break;case 123*g:a[c++]=Cf(S)*v;case 125*g:case 59:case 0:switch(b){case 0:case 125:m=0;case 59+u:-1==v&&(S=_f(S,/\f/g,"")),p>0&&Cf(S)-d&&Tf(p>32?ep(S+";",r,n,d-1):ep(_f(S," ","")+";",r,n,d-2),l);break;case 59:S+=";";default:if(Tf(w=Qf(S,t,n,c,u,o,a,y,x=[],_=[],d),i),123===b)if(0===u)Xf(S,t,w,w,x,i,d,a,_);else switch(99===f&&110===Sf(S,3)?100:f){case 100:case 108:case 109:case 115:Xf(e,w,w,r&&Tf(Qf(e,w,w,0,0,o,a,y,o,x=[],d),_),o,_,d,a,r?x:_);break;default:Xf(S,w,w,w,[""],_,0,a,_)}}c=u=p=0,g=v=1,y=S="",d=s;break;case 58:d=1+Cf(S),p=h;default:if(g<1)if(123==b)--g;else if(125==b&&0==g++&&125==zf())continue;switch(S+=bf(b),b*g){case 38:v=u>0?1:(S+="\f",-1);break;case 44:a[c++]=(Cf(S)-1)*v,v=1;break;case 64:45===Df()&&(S+=Kf(jf())),f=Df(),u=d=Cf(y=S+=Jf(Ff())),b++;break;case 45:45===h&&2==Cf(S)&&(g=0)}}return i}function Qf(e,t,n,r,o,i,s,a,l,c,u){for(var d=o-1,f=0===o?i:[""],p=Ef(f),h=0,g=0,m=0;h<r;++h)for(var v=0,b=kf(e,d+1,d=vf(g=s[h])),y=e;v<p;++v)(y=xf(g>0?f[v]+" "+b:_f(b,/&\f/g,f[v])))&&(l[m++]=y);return Pf(e,t,n,0===o?hf:a,l,c,u)}function Zf(e,t,n){return Pf(e,t,n,pf,bf(Nf),kf(e,2,-2),0)}function ep(e,t,n,r){return Pf(e,t,n,gf,kf(e,0,r),kf(e,r+1,-1),r)}function tp(e,t){for(var n="",r=Ef(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function np(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case gf:return e.return=e.return||e.value;case pf:return"";case mf:return e.return=e.value+"{"+tp(e.children,r)+"}";case hf:e.value=e.props.join(",")}return Cf(n=tp(e.children,r))?e.return=e.value+"{"+n+"}":""}function rp(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var op=function(e,t,n){for(var r=0,o=0;r=o,o=Df(),38===r&&12===o&&(t[n]=1),!$f(o);)jf();return Bf(e,Rf)},ip=function(e,t){return Wf(function(e,t){var n=-1,r=44;do{switch($f(r)){case 0:38===r&&12===Df()&&(t[n]=1),e[n]+=op(Rf-1,t,n);break;case 2:e[n]+=Kf(r);break;case 4:if(44===r){e[++n]=58===Df()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=bf(r)}}while(r=jf());return e}(Hf(e),t))},sp=new WeakMap,ap=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)||sp.get(n))&&!r){sp.set(e,!0);for(var o=[],i=ip(t,o),s=n.props,a=0,l=0;a<i.length;a++)for(var c=0;c<s.length;c++,l++)e.props[l]=o[a]?i[a].replace(/&\f/g,s[c]):s[c]+" "+i[a]}}},lp=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}},cp=function(e){return"comm"===e.type&&e.children.indexOf("emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason")>-1},up=function(e){return 105===e.type.charCodeAt(1)&&64===e.type.charCodeAt(0)},dp=function(e){e.type="",e.value="",e.return="",e.children="",e.props=""},fp=function(e,t,n){up(e)&&(e.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),dp(e)):function(e,t){for(var n=e-1;n>=0;n--)if(!up(t[n]))return!0;return!1}(t,n)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),dp(e)))};function pp(e,t){switch(function(e,t){return 45^Sf(e,0)?(((t<<2^Sf(e,0))<<2^Sf(e,1))<<2^Sf(e,2))<<2^Sf(e,3):0}(e,t)){case 5103:return ff+"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 ff+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ff+e+df+e+uf+e+e;case 6828:case 4268:return ff+e+uf+e+e;case 6165:return ff+e+uf+"flex-"+e+e;case 5187:return ff+e+_f(e,/(\w+).+(:[^]+)/,ff+"box-$1$2"+uf+"flex-$1$2")+e;case 5443:return ff+e+uf+"flex-item-"+_f(e,/flex-|-self/,"")+e;case 4675:return ff+e+uf+"flex-line-pack"+_f(e,/align-content|flex-|-self/,"")+e;case 5548:return ff+e+uf+_f(e,"shrink","negative")+e;case 5292:return ff+e+uf+_f(e,"basis","preferred-size")+e;case 6060:return ff+"box-"+_f(e,"-grow","")+ff+e+uf+_f(e,"grow","positive")+e;case 4554:return ff+_f(e,/([^-])(transform)/g,"$1"+ff+"$2")+e;case 6187:return _f(_f(_f(e,/(zoom-|grab)/,ff+"$1"),/(image-set)/,ff+"$1"),e,"")+e;case 5495:case 3959:return _f(e,/(image-set\([^]*)/,ff+"$1$`$1");case 4968:return _f(_f(e,/(.+:)(flex-)?(.*)/,ff+"box-pack:$3"+uf+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ff+e+e;case 4095:case 3583:case 4068:case 2532:return _f(e,/(.+)-inline(.+)/,ff+"$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(Cf(e)-1-t>6)switch(Sf(e,t+1)){case 109:if(45!==Sf(e,t+4))break;case 102:return _f(e,/(.+:)(.+)-([^]+)/,"$1"+ff+"$2-$3$1"+df+(108==Sf(e,t+3)?"$3":"$2-$3"))+e;case 115:return~wf(e,"stretch")?pp(_f(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Sf(e,t+1))break;case 6444:switch(Sf(e,Cf(e)-3-(~wf(e,"!important")&&10))){case 107:return _f(e,":",":"+ff)+e;case 101:return _f(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ff+(45===Sf(e,14)?"inline-":"")+"box$3$1"+ff+"$2$3$1"+uf+"$2box$3")+e}break;case 5936:switch(Sf(e,t+11)){case 114:return ff+e+uf+_f(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ff+e+uf+_f(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ff+e+uf+_f(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ff+e+uf+e+e}return e}var hp,gp=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case gf:e.return=pp(e.value,e.length);break;case mf:return tp([If(e,{value:_f(e.value,"@","@"+ff)})],r);case hf: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 tp([If(e,{props:[_f(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return tp([If(e,{props:[_f(t,/:(plac\w+)/,":"+ff+"input-$1")]}),If(e,{props:[_f(t,/:(plac\w+)/,":-moz-$1")]}),If(e,{props:[_f(t,/:(plac\w+)/,uf+"input-$1")]})],r)}return""})}}],mp=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;hp=function(e){var t=e.match(mp);if(t)return t[t.length-1]};var vp,bp,yp,xp,_p=function(e){var t=e.key;if(!t)throw new Error("You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\nIf multiple caches share the same key they might \"fight\" for each other's style elements.");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=e.stylisPlugins||gp;if(/[^a-z-]/.test(t))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+t+'" was passed');var o,i,s={},a=[];o=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++)s[t[n]]=!0;a.push(e)});var l=[ap,lp];l.push(function(e){return function(t,n,r){if("rule"===t.type&&!e.compat){var o=t.value.match(/(:first|:nth|:nth-last)-child/g);if(o){for(var i=t.parent?t.parent.children:r,s=i.length-1;s>=0;s--){var a=i[s];if(a.line<t.line)break;if(a.column<t.column){if(cp(a))return;break}}o.forEach(function(e){console.error('The pseudo class "'+e+'" is potentially unsafe when doing server-side rendering. Try changing it to "'+e.split("-child")[0]+'-of-type".')})}}}}({get compat(){return f.compat}}),fp);var c,u=[np,function(e){e.root||(e.return?c.insert(e.return):e.value&&e.type!==pf&&c.insert(e.value+"{}"))}],d=function(e){var t=Ef(e);return function(n,r,o,i){for(var s="",a=0;a<t;a++)s+=e[a](n,r,o,i)||"";return s}}(l.concat(r,u));i=function(e,t,n,r){if(c=n,hp){var o=hp(t.styles);o&&(c={insert:function(e){n.insert(e+o)}})}!function(e){tp(qf(e),d)}(e?e+"{"+t.styles+"}":t.styles),r&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new cf({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:i};return f.sheet.hydrate(a),f},wp={exports:{}},Sp={};function kp(){return bp||(bp=1,wp.exports=function(){if(vp)return Sp;vp=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,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=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 f=e.$$typeof;switch(f){case t:switch(e=e.type){case l:case c:case r:case i:case o:case d:return e;default:switch(e=e&&e.$$typeof){case a:case u:case h:case p:case s:return e;default:return f}}case n:return f}}}function x(e){return y(e)===c}return Sp.AsyncMode=l,Sp.ConcurrentMode=c,Sp.ContextConsumer=a,Sp.ContextProvider=s,Sp.Element=t,Sp.ForwardRef=u,Sp.Fragment=r,Sp.Lazy=h,Sp.Memo=p,Sp.Portal=n,Sp.Profiler=i,Sp.StrictMode=o,Sp.Suspense=d,Sp.isAsyncMode=function(e){return x(e)||y(e)===l},Sp.isConcurrentMode=x,Sp.isContextConsumer=function(e){return y(e)===a},Sp.isContextProvider=function(e){return y(e)===s},Sp.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Sp.isForwardRef=function(e){return y(e)===u},Sp.isFragment=function(e){return y(e)===r},Sp.isLazy=function(e){return y(e)===h},Sp.isMemo=function(e){return y(e)===p},Sp.isPortal=function(e){return y(e)===n},Sp.isProfiler=function(e){return y(e)===i},Sp.isStrictMode=function(e){return y(e)===o},Sp.isSuspense=function(e){return y(e)===d},Sp.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===u||e.$$typeof===m||e.$$typeof===v||e.$$typeof===b||e.$$typeof===g)},Sp.typeOf=y,Sp}()),wp.exports}var Cp=function(){if(xp)return yp;xp=1;var e=kp(),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 s=Object.defineProperty,a=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,u=Object.getPrototypeOf,d=Object.prototype;return yp=function e(t,r,o){if("string"!=typeof r){if(d){var f=u(r);f&&f!==d&&e(t,f,o)}var p=a(r);l&&(p=p.concat(l(r)));for(var h=i(t),g=i(r),m=0;m<p.length;++m){var v=p[m];if(!(n[v]||o&&o[v]||g&&g[v]||h&&h[v])){var b=c(r,v);try{s(t,v,b)}catch(e){}}}}return t},yp}(),Ep=z(Cp);function Tp(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}var Ap=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Lp=function(e,t,n){Ap(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 Mp={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},Rp="You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences",Np="You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).",Op=/[A-Z]|^ms/g,Pp=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ip=function(e){return 45===e.charCodeAt(1)},zp=function(e){return null!=e&&"boolean"!=typeof e},jp=rp(function(e){return Ip(e)?e:e.replace(Op,"-$&").toLowerCase()}),Dp=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Pp,function(e,t,n){return Yp={name:t,styles:n,next:Yp},t})}return 1===Mp[e]||Ip(e)||"number"!=typeof t||0===t?t:t+"px"},Fp=/(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,Bp=["normal","none","initial","inherit","unset"],$p=Dp,Hp=/^-ms-/,Wp=/-(.)/g,Kp={};Dp=function(e,t){if("content"===e&&("string"!=typeof t||-1===Bp.indexOf(t)&&!Fp.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0))))throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\""+t+"\"'`");var n=$p(e,t);return""===n||Ip(e)||-1===e.indexOf("-")||void 0!==Kp[e]||(Kp[e]=!0,console.error("Using kebab-case for css properties in objects is not supported. Did you mean "+e.replace(Hp,"ms-").replace(Wp,function(e,t){return t.toUpperCase()})+"?")),n};var Up="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Gp(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles){if("NO_COMPONENT_SELECTOR"===String(r))throw new Error(Up);return r}switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return Yp={name:o.name,styles:o.styles,next:Yp},o.name;var i=n;if(void 0!==i.styles){var s=i.next;if(void 0!==s)for(;void 0!==s;)Yp={name:s.name,styles:s.styles,next:Yp},s=s.next;return i.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Gp(e,t,n[o])+";";else for(var i in n){var s=n[i];if("object"!=typeof s){var a=s;null!=t&&void 0!==t[a]?r+=i+"{"+t[a]+"}":zp(a)&&(r+=jp(i)+":"+Dp(i,a)+";")}else{if("NO_COMPONENT_SELECTOR"===i)throw new Error(Up);if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var l=Gp(e,t,s);switch(i){case"animation":case"animationName":r+=jp(i)+":"+l+";";break;default:"undefined"===i&&console.error(Np),r+=i+"{"+l+"}"}}else for(var c=0;c<s.length;c++)zp(s[c])&&(r+=jp(i)+":"+Dp(i,s[c])+";")}}return r}(e,t,n);case"function":if(void 0!==e){var a=Yp,l=n(e);return Yp=a,Gp(e,t,l)}console.error("Functions that are interpolated in css calls will be stringified.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`");break;case"string":var c=[],u=n.replace(Pp,function(e,t,n){var r="animation"+c.length;return c.push("const "+r+" = keyframes`"+n.replace(/^@keyframes animation-\w+/,"")+"`"),"${"+r+"}"});c.length&&console.error("`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\nInstead of doing this:\n\n"+[].concat(c,["`"+u+"`"]).join("\n")+"\n\nYou should wrap it with `css` like this:\n\ncss`"+u+"`")}var d=n;if(null==t)return d;var f=t[d];return void 0!==f?f:d}var Yp,Vp=/label:\s*([^\s;{]+)\s*(;|$)/g;function Jp(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="";Yp=void 0;var i=e[0];if(null==i||void 0===i.raw)r=!1,o+=Gp(n,t,i);else{var s=i;void 0===s[0]&&console.error(Rp),o+=s[0]}for(var a=1;a<e.length;a++)if(o+=Gp(n,t,e[a]),r){var l=i;void 0===l[a]&&console.error(Rp),o+=l[a]}Vp.lastIndex=0;for(var c,u="";null!==(c=Vp.exec(o));)u+="-"+c[1];var d=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)+u;return{name:d,styles:o,next:Yp,toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}}}var qp=!!C.useInsertionEffect&&C.useInsertionEffect,Xp=qp||function(e){return e()},Qp=qp||C.useLayoutEffect,Zp=C.createContext("undefined"!=typeof HTMLElement?_p({key:"css"}):null);Zp.displayName="EmotionCacheContext";var eh=Zp.Provider,th=function(e){return E(function(t,n){var r=b(Zp);return e(t,r,n)})},nh=C.createContext({});nh.displayName="EmotionThemeContext";var rh={}.hasOwnProperty,oh=function(e){var t=e.split(".");return t[t.length-1]},ih=function(e){var t=/^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(e);return t||(t=/^([A-Za-z0-9$.]+)@/.exec(e))?oh(t[1]):void 0},sh=new Set(["renderWithHooks","processChild","finishClassComponent","renderToString"]),ah=function(e){return e.replace(/\$/g,"-")},lh="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",ch="__EMOTION_LABEL_PLEASE_DO_NOT_USE__",uh=function(e,t){if("string"==typeof t.css&&-1!==t.css.indexOf(":"))throw new Error("Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`"+t.css+"`");var n={};for(var r in t)rh.call(t,r)&&(n[r]=t[r]);if(n[lh]=e,"undefined"!=typeof globalThis&&globalThis.EMOTION_RUNTIME_AUTO_LABEL&&t.css&&("object"!=typeof t.css||!("name"in t.css)||"string"!=typeof t.css.name||-1===t.css.name.indexOf("-"))){var o=function(e){if(e)for(var t=e.split("\n"),n=0;n<t.length;n++){var r=ih(t[n]);if(r){if(sh.has(r))break;if(/^[A-Z]/.test(r))return ah(r)}}}((new Error).stack);o&&(n[ch]=o)}return n},dh=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Ap(t,n,r),Xp(function(){return Lp(t,n,r)}),null},fh=th(function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var o=e[lh],i=[r],s="";"string"==typeof e.className?s=Tp(t.registered,i,e.className):null!=e.className&&(s=e.className+" ");var a=Jp(i,void 0,C.useContext(nh));if(-1===a.name.indexOf("-")){var l=e[ch];l&&(a=Jp([a,"label:"+l+";"]))}s+=t.key+"-"+a.name;var c={};for(var u in e)rh.call(e,u)&&"css"!==u&&u!==lh&&u!==ch&&(c[u]=e[u]);return c.className=s,n&&(c.ref=n),C.createElement(C.Fragment,null,C.createElement(dh,{cache:t,serialized:a,isStringTag:"string"==typeof o}),C.createElement(o,c))});fh.displayName="EmotionCssPropInternal";var ph,hh,gh=fh,mh=function(e,t){var n=arguments;if(null==t||!rh.call(t,"css"))return C.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=gh,o[1]=uh(e,t);for(var i=2;i<r;i++)o[i]=n[i];return C.createElement.apply(null,o)};ph=mh||(mh={}),hh||(hh=ph.JSX||(ph.JSX={}));var vh=!1,bh=th(function(e,t){!vh&&("className"in e&&e.className||"css"in e&&e.css)&&(console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?"),vh=!0);var n=Jp([e.styles],void 0,C.useContext(nh)),r=C.useRef();return Qp(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,s=document.querySelector('style[data-emotion="'+e+" "+n.name+'"]');return t.sheet.tags.length&&(o.before=t.sheet.tags[0]),null!==s&&(i=!0,s.setAttribute("data-emotion",e),o.hydrate([s])),r.current=[o,i],function(){o.flush()}},[t]),Qp(function(){var e=r.current,o=e[0];if(e[1])e[1]=!1;else{if(void 0!==n.next&&Lp(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 yh(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Jp(t)}function xh(){var e=yh.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_"}}}bh.displayName="EmotionGlobal";var _h=function e(t){for(var n=t.length,r=0,o="";r<n;r++){var i=t[r];if(null!=i){var s=void 0;switch(typeof i){case"boolean":break;case"object":if(Array.isArray(i))s=e(i);else for(var a in void 0!==i.styles&&void 0!==i.name&&console.error("You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component."),s="",i)i[a]&&a&&(s&&(s+=" "),s+=a);break;default:s=i}s&&(o&&(o+=" "),o+=s)}}return o};var wh=function(e){var t=e.cache,n=e.serializedArr;return Xp(function(){for(var e=0;e<n.length;e++)Lp(t,n[e],!1)}),null},Sh=th(function(e,t){var n=!1,r=[],o=function(){if(n)throw new Error("css can only be used during render");for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];var s=Jp(o,t.registered);return r.push(s),Ap(t,s,!1),t.key+"-"+s.name},i={css:o,cx:function(){if(n)throw new Error("cx can only be used during render");for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return function(e,t,n){var r=[],o=Tp(e,r,n);return r.length<2?n:o+t(r)}(t.registered,o,_h(r))},theme:C.useContext(nh)},s=e.children(i);return n=!0,C.createElement(C.Fragment,null,C.createElement(wh,{cache:t,serializedArr:r}),s)});Sh.displayName="EmotionClassNames";var kh="undefined"!=typeof document,Ch="undefined"!=typeof jest||"undefined"!=typeof vi;if(kh&&!Ch){var Eh="undefined"!=typeof globalThis?globalThis:kh?window:global,Th="__EMOTION_REACT_"+"11.14.0".split(".")[0]+"__";Eh[Th]&&console.warn("You are loading @emotion/react when it is already loaded. Running multiple instances may cause problems. This can happen if multiple versions are used, or if multiple builds of the same version are used."),Eh[Th]=!0}var Ah=/^((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|popover|popoverTarget|popoverTargetAction|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)-.*))$/,Lh=rp(function(e){return Ah.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),Mh=function(e){return"theme"!==e},Rh=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Lh:Mh},Nh=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},Oh="You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences",Ph=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Ap(t,n,r),Xp(function(){return Lp(t,n,r)}),null},Ih=function e(t,n){if(void 0===t)throw new Error("You are trying to create a styled element with an undefined component.\nYou may have forgotten to import it.");var r,o,i=t.__emotion_real===t,s=i&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var a=Nh(t,n,i),l=a||Rh(s),c=!l("as");return function(){var u=arguments,d=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==u[0]||void 0===u[0].raw)d.push.apply(d,u);else{var f=u[0];void 0===f[0]&&console.error(Oh),d.push(f[0]);for(var p=u.length,h=1;h<p;h++)void 0===f[h]&&console.error(Oh),d.push(u[h],f[h])}var g=th(function(e,t,n){var r=c&&e.as||s,i="",u=[],f=e;if(null==e.theme){for(var p in f={},e)f[p]=e[p];f.theme=C.useContext(nh)}"string"==typeof e.className?i=Tp(t.registered,u,e.className):null!=e.className&&(i=e.className+" ");var h=Jp(d.concat(u),t.registered,f);i+=t.key+"-"+h.name,void 0!==o&&(i+=" "+o);var g=c&&void 0===a?Rh(r):l,m={};for(var v in e)c&&"as"===v||g(v)&&(m[v]=e[v]);return m.className=i,n&&(m.ref=n),C.createElement(C.Fragment,null,C.createElement(Ph,{cache:t,serialized:h,isStringTag:"string"==typeof r}),C.createElement(r,m))});return g.displayName=void 0!==r?r:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",g.defaultProps=t.defaultProps,g.__emotion_real=g,g.__emotion_base=s,g.__emotion_styles=d,g.__emotion_forwardProp=a,Object.defineProperty(g,"toString",{value:function(){return void 0===o?"NO_COMPONENT_SELECTOR":"."+o}}),g.withComponent=function(t,r){return e(t,af({},n,r,{shouldForwardProp:Nh(g,r,!0)})).apply(void 0,d)},g}}.bind(null);["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){Ih[e]=Ih(e)});var zh,jh,Dh,Fh,Bh,$h={exports:{}};function Hh(){if(jh)return zh;jh=1;return zh="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Wh(){if(Fh)return Dh;Fh=1;var e=Hh();function t(){}function n(){}return n.resetWarningCache=t,Dh=function(){function r(t,n,r,o,i,s){if(s!==e){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function o(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i}}function Kh(){return Bh||(Bh=1,$h.exports=Wh()()),$h.exports}var Uh=z(Kh());const Gh=new Map;function Yh(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 wu.jsx(bh,{styles:r})}
7
+ System.register(["@nebula.js/stardust","react-dom","react"],function(e){"use strict";var t,n,r,o,i,s,a,l,c,u,d,f,p,h,g,m,v,b,y,x,_,w,S,k,C,E,T,A,L,M,R,N,O;return{setters:[function(e){t=e.useMemo,n=e.useEffect,r=e.useState,o=e.usePromise,i=e.useElement,s=e.useStaleLayout,a=e.useModel,l=e.useInteractionState,c=e.useEmitter,u=e.useTranslator,d=e.useTheme,f=e.useImperativeHandle},function(e){p=e.default,h=e,g=e.flushSync,m=e.createPortal},function(e){v=e.createContext,b=e.useContext,y=e.default,x=e.useMemo,_=e.useLayoutEffect,w=e.useEffect,S=e.useState,k=e.useRef,C=e,E=e.forwardRef,T=e.isValidElement,A=e.cloneElement,L=e.Children,M=e.useCallback,R=e.Component,N=e.createElement,O=e.Suspense}],execute:function(){e("default",function(e){const t=new y$,{flags:o}=e;return{qae:{properties:P,data:I(t)},component(){const p=i(),h=$(p),g=s(),m=a(),v=l(),b=c(),[y,x]=r(null),_=u(),[w,S]=r(void 0),k=d(),{printingStatus:C}=x$({layout:g,flags:o});n(()=>{const e=e=>{!async function(e,t){await 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){const e=n.qMeasures?.filter(e=>{const n=t?.find(t=>t===e?.qDef?.cId);return!n});n.qMeasures=e,n.qInterColumnSortOrder=[]}return{...e,qHyperCubeDef:n}})}(m,e)};return b.on("onNodeDestroyed",e),()=>{b.removeListener("onNodeDestroyed",e)}},[b,m]),n(()=>{g&&void 0===w&&(S(g.text||null),x(g?.text))},[g,w]);const{edit:E}=_$({propertyPanelHandlerData:t,flags:o});n(()=>{m$({rootElement:h,layout:g,model:m,element:p,edit:E,initialData:w,emitter:b,lang:_.language(),flags:o,theme:k,interactionState:v,printingStatus:C,showMediaLibrary:e.anything?.sense?.showMediaLibrary})},[g,h,m,p,E,p,w,b,o,k,v]),n(()=>{if(g){const e=g;e.text&&e.text!==y&&(x(e.text),b.emit("reloadData",e.text))}},[g,y,b]),f(()=>({updateActiveState(e){e?t.setSelectedModelId(m?.id):m?.id===t.getSelectedModelId()&&t.setSelectedModelId(void 0)}}),[])},ext:{definition:{type:"items",component:"accordion",items:{data:v$,settings:b$}},exportProperties:null,importProperties:null,support:{snapshot:!0,export:!0,sharing:!0,exportData:!0,viewData:!1}}}});const P={version:"1.4.7",showTitles:!1,text:"",fontsUsed:[],components:[],qHyperCubeDef:{qDimensions:[],qMeasures:[],qSuppressZero:!1,qSuppressMissing:!0,qInitialDataFetch:[{qWidth:500,qHeight:10}]},disableNavMenu:!0,showDetails:!1,images:[]},I=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 z(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function j(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var D,F={};var B=function(){if(D)return F;D=1;var e=p;return F.createRoot=e.createRoot,F.hydrateRoot=e.hydrateRoot,F}();const $=e=>{const r=t(()=>B.createRoot(e),[e]);return n(()=>()=>{r?.unmount()},[r]),r},H=v({layout:void 0,model:void 0,element:void 0,edit:!1,initialData:void 0,emitter:void 0,lang:"en",flags:{isEnabled:()=>!1},theme:null,printingStatus:null,showMediaLibrary:void 0});function W(e){throw new Error(e)}const K="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,U=K&&"documentMode"in document?document.documentMode:null,G=K&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Y=K&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),V=!(!K||!("InputEvent"in window)||U)&&"getTargetRanges"in new window.InputEvent("input"),J=K&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),q=K&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,X=K&&/Android/.test(navigator.userAgent),Q=K&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Z=K&&X&&Q,ee=K&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&G&&!Q,te=0,ne=1,re=2,oe=1,ie=2,se=3,ae=4,le=5,ce=6,ue=J||q||ee?" ":"​",de="\n\n",fe=Y?" ":ue,pe={bold:1,capitalize:1024,code:16,highlight:128,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},he={directionless:1,unmergeable:2},ge={center:2,end:6,justify:4,left:1,right:3,start:5},me={[ie]:"center",[ce]:"end",[ae]:"justify",[oe]:"left",[se]:"right",[le]:"start"},ve={normal:0,segmented:2,token:1},be={[te]:"normal",[re]:"segmented",[ne]:"token"},ye="$config";function xe(e,t,n,r,o,i){let s=e.getFirstChild();for(;null!==s;){const e=s.__key;s.__parent===t&&(Vo(s)&&xe(s,e,n,r,o,i),n.has(e)||i.delete(e),o.push(e)),s=s.getNextSibling()}}let _e=!1,we=0;function Se(e){we=e.timeStamp}function ke(e,t,n){const r="BR"===e.nodeName,o=t.__lexicalLineBreak;return o&&(e===o||r&&e.previousSibling===o)||r&&void 0!==$i(e,n)}function Ce(e,t,n){const r=Ts(xs(n));let o=null,i=null;null!==r&&r.anchorNode===e&&(o=r.anchorOffset,i=r.focusOffset);const s=e.nodeValue;null!==s&&es(t,s,o,i,!1)}function Ee(e,t,n){if(Wr(e)){const t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return Li(t)&&n.isAttached()}function Te(e,t,n,r){for(let o=e;o&&!Hs(o);o=ms(o)){const e=$i(o,t);if(void 0!==e){const t=Fi(e,n);if(t)return Xo(t)||!Ls(o)?void 0:[o,t]}else if(o===r)return[r,Gi(n)]}}function Ae(e,t,n){_e=!0;const r=performance.now()-we>100;try{Ko(e,()=>{const o=ao()||function(e){return e.getEditorState().read(()=>{const e=ao();return null!==e?e.clone():null})}(e),i=new Map,s=e.getRootElement(),a=e._editorState,l=e._blockCursorElement;let c=!1,u="";for(let n=0;n<t.length;n++){const d=t[n],f=d.type,p=d.target,h=Te(p,e,a,s);if(!h)continue;const[g,m]=h;if("characterData"===f)r&&Or(m)&&Li(p)&&Ee(o,p,m)&&Ce(p,m,e);else if("childList"===f){c=!0;const t=d.addedNodes;for(let n=0;n<t.length;n++){const r=t[n],o=Bi(r),i=r.parentNode;if(null!=i&&r!==l&&null===o&&!ke(r,i,e)){if(Y){const e=(Ls(r)?r.innerText:null)||r.nodeValue;e&&(u+=e)}i.removeChild(r)}}const n=d.removedNodes,r=n.length;if(r>0){let t=0;for(let o=0;o<r;o++){const r=n[o];(ke(r,p,e)||l===r)&&(p.appendChild(r),t++)}r!==t&&i.set(g,m)}}}if(i.size>0)for(const[t,n]of i)n.reconcileObservedMutation(t,e);const d=n.takeRecords();if(d.length>0){for(let t=0;t<d.length;t++){const n=d[t],r=n.addedNodes,o=n.target;for(let t=0;t<r.length;t++){const n=r[t],i=n.parentNode;null==i||"BR"!==n.nodeName||ke(n,o,e)||i.removeChild(n)}}n.takeRecords()}null!==o&&(c&&Yi(o),Y&&ps(e)&&o.insertRawText(u))})}finally{_e=!1}}function Le(e){const t=e._observer;if(null!==t){Ae(e,t.takeRecords(),t)}}function Me(e){!function(e){0===we&&xs(e).addEventListener("textInput",Se,!0)}(e),e._observer=new MutationObserver((t,n)=>{Ae(e,t,n)})}function Re(e){const t=new Map,n=new Set;for(let r="function"==typeof e?e:e.replace;r.prototype&&void 0!==r.prototype.getType;r=Object.getPrototypeOf(r)){const{ownNodeConfig:e}=Gs(r);if(e&&e.stateConfigs)for(const r of e.stateConfigs){let e;"stateConfig"in r?(e=r.stateConfig,r.flat&&n.add(e.key)):e=r,t.set(e.key,e)}}return{flatKeys:n,sharedConfigMap:t}}class Ne{node;knownState;unknownState;sharedNodeState;size;constructor(e,t,n=void 0,r=new Map,o=void 0){this.node=e,this.sharedNodeState=t,this.unknownState=n,this.knownState=r;const{sharedConfigMap:i}=this.sharedNodeState,s=void 0!==o?o:function(e,t,n){let r=n.size;if(t)for(const o in t){const t=e.get(o);t&&n.has(t)||r++}return r}(i,n,r);void 0!==o&&s!==o&&W(`NodeState: size != computedSize (${String(o)} != ${String(s)})`);for(const e of r.keys())i.has(e.key)||W(`NodeState: sharedConfigMap missing knownState key ${e.key}`);this.size=s}getValue(e){const t=this.knownState.get(e);if(void 0!==t)return t;this.sharedNodeState.sharedConfigMap.set(e.key,e);let n=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){const t=this.unknownState[e.key];void 0!==t&&(n=e.parse(t)),this.updateFromKnown(e,n)}return n}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const e={...this.unknownState},t={};for(const[t,n]of this.knownState)t.isEqual(n,t.defaultValue)?delete e[t.key]:e[t.key]=t.unparse(n);for(const n of this.sharedNodeState.flatKeys)n in e&&(t[n]=e[n],delete e[n]);return Ie(e)&&(t.$=e),t}getWritable(e){if(this.node===e)return this;const{sharedNodeState:t,unknownState:n}=this,r=new Map(this.knownState);return new Ne(e,t,function(e,t,n){let r;if(n)for(const[o,i]of Object.entries(n)){const n=e.get(o);n?t.has(n)||t.set(n,n.parse(i)):(r=r||{},r[o]=i)}return r}(t.sharedConfigMap,r,n),r,this.size)}updateFromKnown(e,t){const n=e.key;this.sharedNodeState.sharedConfigMap.set(n,e);const{knownState:r,unknownState:o}=this;r.has(e)||o&&n in o||(o&&(delete o[n],this.unknownState=Ie(o)),this.size++),r.set(e,t)}updateFromUnknown(e,t){const n=this.sharedNodeState.sharedConfigMap.get(e);n?this.updateFromKnown(n,n.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){const{knownState:t}=this;for(const e of t.keys())t.set(e,e.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(const[t,n]of Object.entries(e))this.updateFromUnknown(t,n)}}function Oe(e){return e.__state?e.__state.sharedNodeState:bi(Is(),e.getType()).sharedNodeState}function Pe(e,t){const n=e.getWritable(),r=t.$;let o=r;for(const e of Oe(n).flatKeys)e in t&&(void 0!==o&&o!==r||(o={...r}),o[e]=t[e]);return(n.__state||o)&&function(e){const t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new Ne(t,Oe(t));return t.__state=n,n}(e).updateFromJSON(o),n}function Ie(e){if(e)for(const t in e)return e}function ze(e,t,n){for(const[r,o]of t.knownState){if(e.has(r.key))continue;e.add(r.key);const t=n?n.getValue(r):r.defaultValue;if(t!==o&&!r.isEqual(t,o))return!0}return!1}function je(e,t,n){const{unknownState:r}=t,o=n?n.unknownState:void 0;if(r)for(const[t,n]of Object.entries(r)){if(e.has(t))continue;e.add(t);if(n!==(o?o[t]:void 0))return!0}return!1}function De(e,t){const n=e.__state;return n&&n.node===e?n.getWritable(t):n}function Fe(e,t){const n=e.__mode,r=e.__format,o=e.__style,i=t.__mode,s=t.__format,a=t.__style,l=e.__state,c=t.__state;return(null===n||n===i)&&(null===r||r===s)&&(null===o||o===a)&&(null===e.__state||l===c||function(e,t){if(e===t)return!0;if(e&&t&&e.size!==t.size)return!1;const n=new Set;return!(e&&ze(n,e,t)||t&&ze(n,t,e)||e&&je(n,e,t)||t&&je(n,t,e))}(l,c))}function Be(e,t){const n=e.mergeWithSibling(t),r=Mo()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function $e(e){let t,n,r=e;if(""!==r.__text||!r.isSimpleText()||r.isUnmergeable()){for(;null!==(t=r.getPreviousSibling())&&Or(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(""!==t.__text){if(Fe(t,r)){r=Be(t,r);break}break}t.remove()}for(;null!==(n=r.getNextSibling())&&Or(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(""!==n.__text){if(Fe(r,n)){r=Be(r,n);break}break}n.remove()}}else r.remove()}function He(e){return We(e.anchor),We(e.focus),e}function We(e){for(;"element"===e.type;){const t=e.getNode(),n=e.offset;let r,o;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),o=!0):(r=t.getChildAtIndex(n),o=!1),Or(r)){e.set(r.__key,o?r.getTextContentSize():0,"text",!0);break}if(!Vo(r))break;e.set(r.__key,o?r.getChildrenSize():0,"element",!0)}}let Ke,Ue,Ge,Ye,Ve,Je,qe,Xe,Qe,Ze,et="",tt=null,nt=null,rt=!1,ot=!1;function it(e,t){const n=qe.get(e);if(null!==t){const n=St(e);n.parentNode===t&&t.removeChild(n)}if(Xe.has(e)||Ue._keyToDOMMap.delete(e),Vo(n)){const e=vt(n,qe);st(e,0,e.length-1,null)}void 0!==n&&cs(Ze,Ge,Ye,n,"destroyed")}function st(e,t,n,r){for(let o=t;o<=n;++o){const t=e[o];void 0!==t&&it(t,r)}}function at(e,t){e.setProperty("text-align",t)}const lt="40px";function ct(e,t){const n=Ke.theme.indent;if("string"==typeof n){const r=e.classList.contains(n);t>0&&!r?e.classList.add(n):t<1&&r&&e.classList.remove(n)}const r=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||lt;e.style.setProperty("padding-inline-start",0===t?"":`calc(${t} * ${r})`)}function ut(e,t){const n=e.style;0===t?at(n,""):1===t?at(n,"left"):2===t?at(n,"center"):3===t?at(n,"right"):4===t?at(n,"justify"):5===t?at(n,"start"):6===t&&at(n,"end")}function dt(e,t){const n=function(e){const t=e.__dir;if(null!==t)return t;if(Zo(e))return null;const n=e.getParentOrThrow();return Zo(n)&&null===n.__dir?"auto":null}(t);null!==n?e.dir=n:e.removeAttribute("dir")}function ft(e,t){const n=Xe.get(e);void 0===n&&W("createNode: node does not exist in nodeMap");const r=n.createDOM(Ke,Ue);if(function(e,t,n){const r=n._keyToDOMMap;(function(e,t,n){const r=`__lexicalKey_${t._key}`;e[r]=n})(t,n,e),r.set(e,t)}(e,r,Ue),Or(n)?r.setAttribute("data-lexical-text","true"):Xo(n)&&r.setAttribute("data-lexical-decorator","true"),Vo(n)){const e=n.__indent,t=n.__size;if(dt(r,n),0!==e&&ct(r,e),0!==t){const e=t-1;pt(vt(n,Xe),n,0,e,n.getDOMSlot(r))}const o=n.__format;0!==o&&ut(r,o),n.isInline()||gt(null,n,r)}else{const t=n.getTextContent();if(Xo(n)){const t=n.decorate(Ue,Ke);null!==t&&yt(e,t),r.contentEditable="false"}et+=t}return null!==t&&t.insertChild(r),Object.freeze(n),cs(Ze,Ge,Ye,n,"created"),r}function pt(e,t,n,r,o){const i=et;et="";let s=n;for(;s<=r;++s){ft(e[s],o);const t=Xe.get(e[s]);null!==t&&Or(t)?null===tt&&(tt=t.getFormat(),nt=t.getStyle()):Vo(t)&&s<r&&!t.isInline()&&(et+=de)}o.element.__lexicalTextContent=et,et=i+et}function ht(e,t){if(e){const n=e.__last;if(n){const e=t.get(n);if(e)return gr(e)?"line-break":Xo(e)&&e.isInline()?"decorator":null}return"empty"}return null}function gt(e,t,n){const r=ht(e,qe),o=ht(t,Xe);r!==o&&t.getDOMSlot(n).setManagedLineBreak(o)}function mt(e,t,n){var r;tt=null,nt=null,function(e,t,n){const r=et,o=e.__size,i=t.__size;et="";const s=n.element;if(1===o&&1===i){const n=e.__first,r=t.__first;if(n===r)bt(n,s);else{const e=St(n),t=ft(r,null);try{s.replaceChild(t,e)}catch(o){if("object"==typeof o&&null!=o){const i=`${o.toString()} Parent: ${s.tagName}, new child: {tag: ${t.tagName} key: ${r}}, old child: {tag: ${e.tagName}, key: ${n}}.`;throw new Error(i)}throw o}it(n,null)}const o=Xe.get(r);Or(o)&&null===tt&&(tt=o.getFormat(),nt=o.getStyle())}else{const r=vt(e,qe),a=vt(t,Xe);if(r.length!==o&&W("$reconcileChildren: prevChildren.length !== prevChildrenSize"),a.length!==i&&W("$reconcileChildren: nextChildren.length !== nextChildrenSize"),0===o)0!==i&&pt(a,0,0,i-1,n);else if(0===i){if(0!==o){const e=null==n.after&&null==n.before&&null==n.element.__lexicalLineBreak;st(r,0,o-1,e?null:s),e&&(s.textContent="")}}else!function(e,t,n,r,o,i){const s=r-1,a=o-1;let l,c,u=i.getFirstChild(),d=0,f=0;for(;d<=s&&f<=a;){const e=t[d],r=n[f];if(e===r)u=xt(bt(r,i.element)),d++,f++;else{if(void 0===c&&(c=_t(n,f)),void 0===l)l=_t(t,d);else if(!l.has(e)){d++;continue}if(!c.has(e)){u=xt(St(e)),it(e,i.element),d++,l.delete(e);continue}if(l.has(r)){const e=gs(Ue,r);e!==u&&i.withBefore(u).insertChild(e),u=xt(bt(r,i.element)),d++,f++}else ft(r,i.withBefore(u)),f++}const o=Xe.get(r);null!==o&&Or(o)?null===tt&&(tt=o.getFormat(),nt=o.getStyle()):Vo(o)&&f<=a&&!o.isInline()&&(et+=de)}const p=d>s,h=f>a;if(p&&!h){const e=n[a+1],t=void 0===e?null:Ue.getElementByKey(e);pt(n,0,f,a,i.withBefore(t))}else h&&!p&&st(t,d,s,i.element)}(0,r,a,o,i,n)}s.__lexicalTextContent=et,et=r+et}(e,t,t.getDOMSlot(n)),r=t,null==tt||tt===r.__textFormat||ot||r.setTextFormat(tt),function(e){null==nt||nt===e.__textStyle||ot||e.setTextStyle(nt)}(t)}function vt(e,t){const n=[];let r=e.__first;for(;null!==r;){const e=t.get(r);void 0===e&&W("createChildrenArray: node does not exist in nodeMap"),n.push(r),r=e.__next}return n}function bt(e,t){const n=qe.get(e);let r=Xe.get(e);void 0!==n&&void 0!==r||W("reconcileNode: prevNode or nextNode does not exist in nodeMap");const o=rt||Je.has(e)||Ve.has(e),i=gs(Ue,e);if(n===r&&!o){let e;if(Vo(n)){const t=i.__lexicalTextContent;"string"==typeof t?e=t:(e=n.getTextContent(),i.__lexicalTextContent=e)}else e=n.getTextContent();return et+=e,i}if(n!==r&&o&&cs(Ze,Ge,Ye,r,"updated"),r.updateDOM(n,i,Ke)){const n=ft(e,null);return null===t&&W("reconcileNode: parentDOM is null"),t.replaceChild(n,i),it(e,null),n}if(Vo(n)){Vo(r)||W(`Node with key ${e} changed from ElementNode to !ElementNode`);const t=r.__indent;(rt||t!==n.__indent)&&ct(i,t);const s=r.__format;if((rt||s!==n.__format)&&ut(i,s),o)mt(n,r,i),Zo(r)||r.isInline()||gt(n,r,i);else{const e=i.__lexicalTextContent;let t;"string"==typeof e?t=e:(t=n.getTextContent(),i.__lexicalTextContent=t),et+=t}if((rt||r.__dir!==n.__dir)&&(dt(i,r),Zo(r)&&!rt))for(const e of r.getChildren())if(Vo(e)){dt(gs(Ue,e.getKey()),e)}}else{const t=r.getTextContent();if(Xo(r)){const t=r.decorate(Ue,Ke);null!==t&&yt(e,t)}et+=t}if(!ot&&Zo(r)&&r.__cachedText!==et){const e=r.getWritable();e.__cachedText=et,r=e}return Object.freeze(r),i}function yt(e,t){let n=Ue._pendingDecorators;const r=Ue._decorators;if(null===n){if(r[e]===t)return;n=Wi(Ue)}n[e]=t}function xt(e){let t=e.nextSibling;return null!==t&&t===Ue._blockCursorElement&&(t=t.nextSibling),t}function _t(e,t){const n=new Set;for(let r=t;r<e.length;r++)n.add(e[r]);return n}function wt(e,t,n,r,o,i){et="",rt=2===r,Ue=n,Ke=n._config,Ge=n._nodes,Ye=Ue._listeners.mutation,Ve=o,Je=i,qe=e._nodeMap,Xe=t._nodeMap,ot=t._readOnly,Qe=new Map(n._keyToDOMMap);const s=new Map;return Ze=s,bt("root",null),Ue=void 0,Ge=void 0,Ve=void 0,Je=void 0,qe=void 0,Xe=void 0,Ke=void 0,Qe=void 0,Ze=void 0,s}function St(e){const t=Qe.get(e);return void 0===t&&W(`Reconciliation: could not find DOM element for node key ${e}`),t}function kt(e){return{type:e}}const Ct=kt("SELECTION_CHANGE_COMMAND"),Et=kt("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),Tt=kt("CLICK_COMMAND"),At=kt("BEFORE_INPUT_COMMAND"),Lt=kt("INPUT_COMMAND"),Mt=kt("COMPOSITION_START_COMMAND"),Rt=kt("COMPOSITION_END_COMMAND"),Nt=kt("DELETE_CHARACTER_COMMAND"),Ot=kt("INSERT_LINE_BREAK_COMMAND"),Pt=kt("INSERT_PARAGRAPH_COMMAND"),It=kt("CONTROLLED_TEXT_INSERTION_COMMAND"),zt=kt("PASTE_COMMAND"),jt=kt("REMOVE_TEXT_COMMAND"),Dt=kt("DELETE_WORD_COMMAND"),Ft=kt("DELETE_LINE_COMMAND"),Bt=kt("FORMAT_TEXT_COMMAND"),$t=kt("UNDO_COMMAND"),Ht=kt("REDO_COMMAND"),Wt=kt("KEYDOWN_COMMAND"),Kt=kt("KEY_ARROW_RIGHT_COMMAND"),Ut=kt("MOVE_TO_END"),Gt=kt("KEY_ARROW_LEFT_COMMAND"),Yt=kt("MOVE_TO_START"),Vt=kt("KEY_ARROW_UP_COMMAND"),Jt=kt("KEY_ARROW_DOWN_COMMAND"),qt=kt("KEY_ENTER_COMMAND"),Xt=kt("KEY_SPACE_COMMAND"),Qt=kt("KEY_BACKSPACE_COMMAND"),Zt=kt("KEY_ESCAPE_COMMAND"),en=kt("KEY_DELETE_COMMAND"),tn=kt("KEY_TAB_COMMAND"),nn=kt("INSERT_TAB_COMMAND"),rn=kt("INDENT_CONTENT_COMMAND"),on=kt("OUTDENT_CONTENT_COMMAND"),sn=kt("DROP_COMMAND"),an=kt("FORMAT_ELEMENT_COMMAND"),ln=kt("DRAGSTART_COMMAND"),cn=kt("DRAGOVER_COMMAND"),un=kt("DRAGEND_COMMAND"),dn=kt("COPY_COMMAND"),fn=kt("CUT_COMMAND"),pn=kt("SELECT_ALL_COMMAND"),hn=kt("CLEAR_EDITOR_COMMAND"),gn=kt("CLEAR_HISTORY_COMMAND"),mn=kt("CAN_REDO_COMMAND"),vn=kt("CAN_UNDO_COMMAND"),bn=kt("FOCUS_COMMAND"),yn=kt("BLUR_COMMAND"),xn=kt("KEY_MODIFIER_COMMAND"),_n=Object.freeze({}),wn=[["keydown",function(e,t){if(Sn=e.timeStamp,kn=e.key,t.isComposing())return;hs(t,Wt,e)}],["pointerdown",function(e,t){const n=e.target,r=e.pointerType;Ms(n)&&"touch"!==r&&"pen"!==r&&0===e.button&&Ko(t,()=>{_i(n)||(Mn=!0)})}],["compositionstart",function(e,t){hs(t,Mt,e)}],["compositionend",function(e,t){Y?Nn=!0:q||!J&&!ee?hs(t,Rt,e):(On=!0,Pn=e.data)}],["input",function(e,t){e.stopPropagation(),Ko(t,()=>{t.dispatchCommand(Lt,e)},{event:e}),En=null}],["click",function(e,t){Ko(t,()=>{const n=ao(),r=Ts(xs(t)),o=lo();if(r)if(Wr(n)){const t=n.anchor,i=t.getNode();if("element"===t.type&&0===t.offset&&n.isCollapsed()&&!Zo(i)&&1===Ui().getChildrenSize()&&i.getTopLevelElementOrThrow().isEmpty()&&null!==o&&n.is(o))r.removeAllRanges(),n.dirty=!0;else if(3===e.detail&&!n.isCollapsed()){if(i!==n.focus.getNode()){const e=Ys(i,e=>Vo(e)&&!e.isInline());Vo(e)&&e.select(0)}}}else if("touch"===e.pointerType||"pen"===e.pointerType){const n=r.anchorNode;if(Ls(n)||Li(n)){Yi(io(o,r,t,e))}}hs(t,Tt,e)})}],["cut",_n],["copy",_n],["dragstart",_n],["dragover",_n],["dragend",_n],["paste",_n],["focus",_n],["blur",_n],["drop",_n]];V&&wn.push(["beforeinput",(e,t)=>function(e,t){const n=e.inputType;if("deleteCompositionText"===n||Y&&ps(t))return;if("insertCompositionText"===n)return;hs(t,At,e)}(e,t)]);let Sn=0,kn=null,Cn=0,En=null;const Tn=new WeakMap,An=new WeakMap;let Ln=!1,Mn=!1,Rn=!1,Nn=!1,On=!1,Pn="",In=null,zn=[0,"",0,"root",0];function jn(e,t,n,r,o){const i=e.anchor,s=e.focus,a=i.getNode(),l=Mo(),c=Ts(xs(l)),u=null!==c?c.anchorNode:null,d=i.key,f=l.getElementByKey(d),p=n.length;return d!==s.key||!Or(a)||(!o&&(!V||Cn<r+50)||a.isDirty()&&p<2||Ji(n))&&i.offset!==s.offset&&!a.isComposing()||Ai(a)||a.isDirty()&&p>1||(o||!V)&&null!==f&&!a.isComposing()&&u!==Ri(f)||null!==c&&null!==t&&(!t.collapsed||t.startContainer!==c.anchorNode||t.startOffset!==c.anchorOffset)||a.getFormat()!==e.format||a.getStyle()!==e.style||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;const n=e.anchor.offset,r=t.getParentOrThrow(),o=Ti(t);return 0===n?!t.canInsertTextBefore()||!r.canInsertTextBefore()&&!t.isComposing()||o||function(e){const t=e.getPreviousSibling();return(Or(t)||Vo(t)&&t.isInline())&&!t.canInsertTextAfter()}(t):n===t.getTextContentSize()&&(!t.canInsertTextAfter()||!r.canInsertTextAfter()&&!t.isComposing()||o)}(e,a)}function Dn(e,t){return Li(e)&&null!==e.nodeValue&&0!==t&&t!==e.nodeValue.length}function Fn(e,t,n){const{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:s}=e;Ln&&(Ln=!1,Dn(r,o)&&Dn(i,s)&&!In)||Ko(t,()=>{if(!n)return void Yi(null);if(!Si(t,r,i))return;let a=ao();if(In&&Wr(a)&&a.isCollapsed()){const e=a.anchor,t=In.anchor;(e.key===t.key&&e.offset===t.offset+1||1===e.offset&&t.getNode().is(e.getNode().getPreviousSibling()))&&(a=In.clone(),Yi(a))}if(In=null,Wr(a)){const n=a.anchor,r=n.getNode();if(a.isCollapsed()){"Range"===e.type&&e.anchorNode===e.focusNode&&(a.dirty=!0);const o=xs(t).event,i=o?o.timeStamp:performance.now(),[s,l,c,u,d]=zn,f=Ui(),p=!1===t.isComposing()&&""===f.getTextContent();if(i<d+200&&n.offset===c&&n.key===u)Bn(a,s,l);else if("text"===n.type)Or(r)||W("Point.getNode() must return TextNode when type is text"),$n(a,r);else if("element"===n.type&&!p){Vo(r)||W("Point.getNode() must return ElementNode when type is element");const e=n.getNode();e.isEmpty()?function(e,t){const n=t.getTextFormat(),r=t.getTextStyle();Bn(e,n,r)}(a,e):Bn(a,0,"")}}else{const e=n.key,t=a.focus.key,r=a.getNodes(),i=r.length,l=a.isBackward(),c=l?s:o,u=l?o:s,d=l?t:e,f=l?e:t;let p=2047,h=!1;for(let e=0;e<i;e++){const t=r[e],n=t.getTextContentSize();if(Or(t)&&0!==n&&!(0===e&&t.__key===d&&c===n||e===i-1&&t.__key===f&&0===u)&&(h=!0,p&=t.getFormat(),0===p))break}a.format=h?p:0}}hs(t,Ct,void 0)})}function Bn(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function $n(e,t){Bn(e,t.getFormat(),t.getStyle())}function Hn(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return 0===t.length?null:t[0]}function Wn(e){const t=e.inputType,n=Hn(e),r=Mo(),o=ao();if("deleteContentBackward"===t){if(null===o){const e=lo();if(!Wr(e))return!0;Yi(e.clone())}if(Wr(o)){const t=o.anchor.key===o.focus.key;if(i=e.timeStamp,"MediaLast"===kn&&i<Sn+30&&r.isComposing()&&t){if(ji(null),Sn=0,setTimeout(()=>{Ko(r,()=>{ji(null)})},30),Wr(o)){const e=o.anchor.getNode();e.markDirty(),Or(e)||W("Anchor node must be a TextNode"),$n(o,e)}}else{ji(null),e.preventDefault();const n=o.anchor.getNode(),i=n.getTextContent(),s=n.canInsertTextAfter(),a=0===o.anchor.offset&&o.focus.offset===i.length;let l=Z&&t&&!a&&s;if(l&&o.isCollapsed()&&(l=!Xo(fs(o.anchor,!0))),!l){hs(r,Nt,!0);const e=ao();Z&&Wr(e)&&e.isCollapsed()&&(In=e,setTimeout(()=>In=null))}}return!0}}var i;if(!Wr(o))return!0;const s=e.data;null!==En&&Zi(!1,r,En),o.dirty&&null===En||!o.isCollapsed()||Zo(o.anchor.getNode())||null===n||o.applyDOMRange(n),En=null;const a=o.anchor,l=o.focus,c=a.getNode(),u=l.getNode();if("insertText"===t||"insertTranspose"===t){if("\n"===s)e.preventDefault(),hs(r,Ot,!1);else if(s===de)e.preventDefault(),hs(r,Pt,void 0);else if(null==s&&e.dataTransfer){const t=e.dataTransfer.getData("text/plain");e.preventDefault(),o.insertRawText(t)}else null!=s&&jn(o,n,s,e.timeStamp,!0)?(e.preventDefault(),hs(r,It,s)):En=s;return Cn=e.timeStamp,!0}switch(e.preventDefault(),t){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":hs(r,It,e);break;case"insertFromComposition":ji(null),hs(r,It,e);break;case"insertLineBreak":ji(null),hs(r,Ot,!1);break;case"insertParagraph":ji(null),Rn&&!q?(Rn=!1,hs(r,Ot,!1)):hs(r,Pt,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":hs(r,zt,e);break;case"deleteByComposition":(function(e,t){return e!==t||Vo(e)||Vo(t)||!Ti(e)||!Ti(t)})(c,u)&&hs(r,jt,e);break;case"deleteByDrag":case"deleteByCut":hs(r,jt,e);break;case"deleteContent":hs(r,Nt,!1);break;case"deleteWordBackward":hs(r,Dt,!0);break;case"deleteWordForward":hs(r,Dt,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":hs(r,Ft,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":hs(r,Ft,!1);break;case"formatStrikeThrough":hs(r,Bt,"strikethrough");break;case"formatBold":hs(r,Bt,"bold");break;case"formatItalic":hs(r,Bt,"italic");break;case"formatUnderline":hs(r,Bt,"underline");break;case"historyUndo":hs(r,$t,void 0);break;case"historyRedo":hs(r,Ht,void 0)}return!0}function Kn(e){if(Ls(e.target)&&_i(e.target))return!0;const t=Mo(),n=ao(),r=e.data,o=Hn(e);if(null!=r&&Wr(n)&&jn(n,o,r,e.timeStamp,!1)){Nn&&(Yn(t,r),Nn=!1);const o=n.anchor.getNode(),i=Ts(xs(t));if(null===i)return!0;const s=n.isBackward(),a=s?n.anchor.offset:n.focus.offset,l=s?n.focus.offset:n.anchor.offset;V&&!n.isCollapsed()&&Or(o)&&null!==i.anchorNode&&o.getTextContent().slice(0,a)+r+o.getTextContent().slice(a+l)===Qi(i.anchorNode)||hs(t,It,r);const c=r.length;Y&&c>1&&"insertCompositionText"===e.inputType&&!t.isComposing()&&(n.anchor.offset-=c),J||q||ee||!t.isComposing()||(Sn=0,ji(null))}else{Zi(!1,t,null!==r?r:void 0),Nn&&(Yn(t,r||void 0),Nn=!1)}return function(){To();const e=Mo();Le(e)}(),!0}function Un(e){const t=Mo(),n=ao();if(Wr(n)&&!t.isComposing()){const r=n.anchor,o=n.anchor.getNode();ji(r.key),(e.timeStamp<Sn+30||"element"===r.type||!n.isCollapsed()||o.getFormat()!==n.format||Or(o)&&o.getStyle()!==n.style)&&hs(t,It,fe)}return!0}function Gn(e){return Yn(Mo(),e.data),!0}function Yn(e,t){const n=e._compositionKey;if(ji(null),null!==n&&null!=t){if(""===t){const t=Fi(n),r=Ri(e.getElementByKey(n));return void(null!==r&&null!==r.nodeValue&&Or(t)&&es(t,r.nodeValue,null,null,!0))}if("\n"===t[t.length-1]){const t=ao();if(Wr(t)){const n=t.focus;return t.anchor.set(n.key,n.offset,n.type),void hs(e,qt,null)}}}Zi(!0,e,t)}function Vn(e){const t=Mo();if(null==e.key)return!0;if(On&&ss(e))return Ko(t,()=>{Yn(t,Pn)}),On=!1,Pn="",!0;if(function(e){return rs(e,"ArrowRight",{shiftKey:"any"})}(e))hs(t,Kt,e);else if(function(e){return rs(e,"ArrowRight",os)}(e))hs(t,Ut,e);else if(function(e){return rs(e,"ArrowLeft",{shiftKey:"any"})}(e))hs(t,Gt,e);else if(function(e){return rs(e,"ArrowLeft",os)}(e))hs(t,Yt,e);else if(function(e){return rs(e,"ArrowUp",{altKey:"any",shiftKey:"any"})}(e))hs(t,Vt,e);else if(function(e){return rs(e,"ArrowDown",{altKey:"any",shiftKey:"any"})}(e))hs(t,Jt,e);else if(function(e){return rs(e,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})}(e))Rn=!0,hs(t,qt,e);else if(function(e){return" "===e.key}(e))hs(t,Xt,e);else if(function(e){return G&&rs(e,"o",{ctrlKey:!0})}(e))e.preventDefault(),Rn=!0,hs(t,Ot,!0);else if(function(e){return rs(e,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})}(e))Rn=!1,hs(t,qt,e);else if(function(e){return rs(e,"Backspace",{shiftKey:"any"})||G&&rs(e,"h",{ctrlKey:!0})}(e))ss(e)?hs(t,Qt,e):(e.preventDefault(),hs(t,Nt,!0));else if(function(e){return"Escape"===e.key}(e))hs(t,Zt,e);else if(function(e){return rs(e,"Delete",{})||G&&rs(e,"d",{ctrlKey:!0})}(e))!function(e){return"Delete"===e.key}(e)?(e.preventDefault(),hs(t,Nt,!1)):hs(t,en,e);else if(function(e){return rs(e,"Backspace",is)}(e))e.preventDefault(),hs(t,Dt,!0);else if(function(e){return rs(e,"Delete",is)}(e))e.preventDefault(),hs(t,Dt,!1);else if(function(e){return G&&rs(e,"Backspace",{metaKey:!0})}(e))e.preventDefault(),hs(t,Ft,!0);else if(function(e){return G&&(rs(e,"Delete",{metaKey:!0})||rs(e,"k",{ctrlKey:!0}))}(e))e.preventDefault(),hs(t,Ft,!1);else if(function(e){return rs(e,"b",os)}(e))e.preventDefault(),hs(t,Bt,"bold");else if(function(e){return rs(e,"u",os)}(e))e.preventDefault(),hs(t,Bt,"underline");else if(function(e){return rs(e,"i",os)}(e))e.preventDefault(),hs(t,Bt,"italic");else if(function(e){return rs(e,"Tab",{shiftKey:"any"})}(e))hs(t,tn,e);else if(function(e){return rs(e,"z",os)}(e))e.preventDefault(),hs(t,$t,void 0);else if(function(e){if(G)return rs(e,"z",{metaKey:!0,shiftKey:!0});return rs(e,"y",{ctrlKey:!0})||rs(e,"z",{ctrlKey:!0,shiftKey:!0})}(e))e.preventDefault(),hs(t,Ht,void 0);else{const n=t._editorState._selection;null===n||Wr(n)?as(e)&&(e.preventDefault(),hs(t,pn,e)):!function(e){return rs(e,"c",os)}(e)?!function(e){return rs(e,"x",os)}(e)?as(e)&&(e.preventDefault(),hs(t,pn,e)):(e.preventDefault(),hs(t,fn,e)):(e.preventDefault(),hs(t,dn,e))}return function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey}(e)&&t.dispatchCommand(xn,e),!0}function Jn(e){let t=e.__lexicalEventHandles;return void 0===t&&(t=[],e.__lexicalEventHandles=t),t}const qn=new Map;function Xn(e){const t=function(e){const t=ys(e);return t?t.getSelection():null}(e.target);if(null===t)return;const n=Ci(t.anchorNode);if(null===n)return;Mn&&(Mn=!1,Ko(n,()=>{const r=lo(),o=t.anchorNode;if(Ls(o)||Li(o)){Yi(io(r,t,n,e))}}));const r=qi(n),o=r[r.length-1],i=o._key,s=qn.get(i),a=s||o;a!==n&&Fn(t,a,!1),Fn(t,n,!0),n!==o?qn.set(i,n):s&&qn.delete(i)}function Qn(e){e._lexicalHandled=!0}function Zn(e){return!0===e._lexicalHandled}const er=function(e){{let t=!1;return()=>{t||console.warn(e),t=!0}}}("Root element not registered");function tr(e){const t=Tn.get(e);if(void 0===t)return void er();const n=An.get(t);if(void 0===n)return void er();const r=n-1;r>=0||W("Root element count less than 0"),Tn.delete(e),An.set(t,r),0===r&&t.removeEventListener("selectionchange",Xn);const o=Ei(e);ki(o)?(!function(e){if(null!==e._parentEditor){const t=qi(e),n=t[t.length-1]._key;qn.get(n)===e&&qn.delete(n)}else qn.delete(e._key)}(o),e.__lexicalEditor=null):o&&W("Attempted to remove event handlers from a node that does not belong to this build of Lexical");const i=Jn(e);for(let e=0;e<i.length;e++)i[e]();e.__lexicalEventHandles=[]}function nr(e,t,n){To();const r=e.__key,o=e.getParent();if(null===o)return;const i=function(e){const t=ao();if(!Wr(t)||!Vo(e))return t;const{anchor:n,focus:r}=t,o=n.getNode(),i=r.getNode();bs(o,e)&&n.set(e.__key,0,"element");bs(i,e)&&r.set(e.__key,0,"element");return t}(e);let s=!1;if(Wr(i)&&t){const t=i.anchor,n=i.focus;t.key===r&&(fo(t,e,o,e.getPreviousSibling(),e.getNextSibling()),s=!0),n.key===r&&(fo(n,e,o,e.getPreviousSibling(),e.getNextSibling()),s=!0)}else Ur(i)&&t&&e.isSelected()&&e.selectPrevious();if(Wr(i)&&t&&!s){const t=e.getIndexWithinParent();Ii(e),co(i,o,t,-1)}else Ii(e);n||_s(o)||o.canBeEmpty()||!o.isEmpty()||nr(o,t),t&&i&&Zo(o)&&o.isEmpty()&&o.selectEnd()}const rr=Symbol.for("ephemeral");function or(e){return e[rr]||!1}class ir{__type;__key;__parent;__prev;__next;__state;static getType(){const{ownNodeType:e}=Gs(this);return void 0===e&&W(`LexicalNode: Node ${this.name} does not implement .getType().`),e}static clone(e){W(`LexicalNode: Node ${this.name} does not implement .clone().`)}$config(){return{}}config(e,t){const n=t.extends||Object.getPrototypeOf(this.constructor);return Object.assign(t,{extends:n,type:e}),{[e]:t}}afterCloneFrom(e){this.__key===e.__key?(this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev,this.__state=e.__state):e.__state&&(this.__state=e.__state.getWritable(this))}static importDOM;constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",{configurable:!0,enumerable:!1,value:void 0,writable:!0}),Pi(this,e),"root"!==this.__type&&function(e,t){const n=yi(Mo(),e);void 0===n&&W(`Create node: Attempted to create node ${t.name} that was not configured to be used on the editor.`);const r=n.klass;r!==t&&W(`Create node: Type ${e} in node ${t.name} does not match registered node ${r.name} with the same type`)}(this.__type,this.constructor)}getType(){return this.__type}isInline(){W(`LexicalNode: Node ${this.constructor.name} does not implement .isInline().`)}isAttached(){let e=this.__key;for(;null!==e;){if("root"===e)return!0;const t=Fi(e);if(null===t)break;e=t.__parent}return!1}isSelected(e){const t=e||ao();if(null==t)return!1;const n=t.getNodes().some(e=>e.__key===this.__key);if(Or(this))return n;if(Wr(t)&&"element"===t.anchor.type&&"element"===t.focus.type){if(t.isCollapsed())return!1;const e=this.getParent();if(Xo(this)&&this.isInline()&&e){const n=t.isBackward()?t.focus:t.anchor;if(e.is(n.getNode())&&n.offset===e.getChildrenSize()&&this.is(e.getLastChild()))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){const e=this.getParent();if(null===e)return-1;let t=e.getFirstChild(),n=0;for(;null!==t;){if(this.is(t))return n;n++,t=t.getNextSibling()}return-1}getParent(){const e=this.getLatest().__parent;return null===e?null:Fi(e)}getParentOrThrow(){const e=this.getParent();return null===e&&W(`Expected node ${this.__key} to have a parent.`),e}getTopLevelElement(){let e=this;for(;null!==e;){const t=e.getParent();if(_s(t))return Vo(e)||e===this&&Xo(e)||W("Children of root nodes must be elements or decorators"),e;e=t}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return null===e&&W(`Expected node ${this.__key} to have a top parent element.`),e}getParents(){const e=[];let t=this.getParent();for(;null!==t;)e.push(t),t=t.getParent();return e}getParentKeys(){const e=[];let t=this.getParent();for(;null!==t;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){const e=this.getLatest().__prev;return null===e?null:Fi(e)}getPreviousSiblings(){const e=[],t=this.getParent();if(null===t)return e;let n=t.getFirstChild();for(;null!==n&&!n.is(this);)e.push(n),n=n.getNextSibling();return e}getNextSibling(){const e=this.getLatest().__next;return null===e?null:Fi(e)}getNextSiblings(){const e=[];let t=this.getNextSibling();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){const t=Vo(this)?this:this.getParent(),n=Vo(e)?e:e.getParent(),r=t&&n?ka(t,n):null;return r?r.commonAncestor:null}is(e){return null!=e&&this.__key===e.__key}isBefore(e){const t=ka(this,e);return null!==t&&("descendant"===t.type||("branch"===t.type?-1===_a(t):("same"!==t.type&&"ancestor"!==t.type&&W("LexicalNode.isBefore: exhaustiveness check"),!1)))}isParentOf(e){const t=ka(this,e);return null!==t&&"ancestor"===t.type}getNodesBetween(e){const t=this.isBefore(e),n=[],r=new Set;let o=this;for(;null!==o;){const i=o.__key;if(r.has(i)||(r.add(i),n.push(o)),o===e)break;const s=Vo(o)?t?o.getFirstChild():o.getLastChild():null;if(null!==s){o=s;continue}const a=t?o.getNextSibling():o.getPreviousSibling();if(null!==a){o=a;continue}const l=o.getParentOrThrow();if(r.has(l.__key)||n.push(l),l===e)break;let c=null,u=l;do{if(null===u&&W("getNodesBetween: ancestor is null"),c=t?u.getNextSibling():u.getPreviousSibling(),u=u.getParent(),null===u)break;null!==c||r.has(u.__key)||n.push(u)}while(null===c);o=c}return t||n.reverse(),n}isDirty(){const e=Mo()._dirtyLeaves;return null!==e&&e.has(this.__key)}getLatest(){if(or(this))return this;const e=Fi(this.__key);return null===e&&W("Lexical node does not exist in active editor state. Avoid using the same node references between nested closures from editorState.read/editor.update."),e}getWritable(){if(or(this))return this;To();const e=Lo(),t=Mo(),n=e._nodeMap,r=this.__key,o=this.getLatest(),i=t._cloneNotNeeded,s=ao();if(null!==s&&s.setCachedNodes(null),i.has(r))return zi(o),o;const a=Fs(o);return i.add(r),zi(a),n.set(r,a),a}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){W("createDOM: base method not extended")}updateDOM(e,t,n){W("updateDOM: base method not extended")}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){const e=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...e}}static importJSON(e){W(`LexicalNode: Node ${this.name} does not implement .importJSON().`)}updateFromJSON(e){return Pe(this,e)}static transform(){return null}remove(e){nr(this,!0,e)}replace(e,t){To();let n=ao();null!==n&&(n=n.clone()),ks(this,e);const r=this.getLatest(),o=this.__key,i=e.__key,s=e.getWritable(),a=this.getParentOrThrow().getWritable(),l=a.__size;Ii(s);const c=r.getPreviousSibling(),u=r.getNextSibling(),d=r.__prev,f=r.__next,p=r.__parent;if(nr(r,!1,!0),null===c)a.__first=i;else{c.getWritable().__next=i}if(s.__prev=d,null===u)a.__last=i;else{u.getWritable().__prev=i}if(s.__next=f,s.__parent=p,a.__size=l,t&&(Vo(this)&&Vo(s)||W("includeChildren should only be true for ElementNodes"),this.getChildren().forEach(e=>{s.append(e)})),Wr(n)){Yi(n);const e=n.anchor,t=n.focus;e.key===o&&$r(e,s),t.key===o&&$r(t,s)}return Di()===o&&ji(i),s}insertAfter(e,t=!0){To(),ks(this,e);const n=this.getWritable(),r=e.getWritable(),o=r.getParent(),i=ao();let s=!1,a=!1;if(null!==o){const t=e.getIndexWithinParent();if(Ii(r),Wr(i)){const e=o.__key,n=i.anchor,r=i.focus;s="element"===n.type&&n.key===e&&n.offset===t+1,a="element"===r.type&&r.key===e&&r.offset===t+1}}const l=this.getNextSibling(),c=this.getParentOrThrow().getWritable(),u=r.__key,d=n.__next;if(null===l)c.__last=u;else{l.getWritable().__prev=u}if(c.__size++,n.__next=u,r.__next=d,r.__prev=n.__key,r.__parent=n.__parent,t&&Wr(i)){const e=this.getIndexWithinParent();co(i,c,e+1);const t=c.__key;s&&i.anchor.set(t,e+2,"element"),a&&i.focus.set(t,e+2,"element")}return e}insertBefore(e,t=!0){To(),ks(this,e);const n=this.getWritable(),r=e.getWritable(),o=r.__key;Ii(r);const i=this.getPreviousSibling(),s=this.getParentOrThrow().getWritable(),a=n.__prev,l=this.getIndexWithinParent();if(null===i)s.__first=o;else{i.getWritable().__next=o}s.__size++,n.__prev=o,r.__prev=a,r.__next=n.__key,r.__parent=n.__parent;const c=ao();if(t&&Wr(c)){co(c,this.getParentOrThrow(),l)}return e}isParentRequired(){return!1}createParentElementNode(){return ai()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){To();const n=this.getPreviousSibling(),r=this.getParentOrThrow();if(null===n)return r.select(0,0);if(Vo(n))return n.select();if(!Or(n)){const e=n.getIndexWithinParent()+1;return r.select(e,e)}return n.select(e,t)}selectNext(e,t){To();const n=this.getNextSibling(),r=this.getParentOrThrow();if(null===n)return r.select();if(Vo(n))return n.select(0,0);if(!Or(n)){const e=n.getIndexWithinParent();return r.select(e,e)}return n.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}}const sr="historic",ar="history-merge",lr="collaboration",cr="skip-scroll-into-view",ur="skip-dom-selection",dr="skip-selection-focus";class fr extends ir{static getType(){return"linebreak"}static clone(e){return new fr(e.__key)}constructor(e){super(e)}getTextContent(){return"\n"}createDOM(){return document.createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:e=>function(e){const t=e.parentElement;if(null!==t&&Os(t)){const n=t.firstChild;if(n===e||n.nextSibling===e&&mr(n)){const n=t.lastChild;if(n===e||n.previousSibling===e&&mr(n))return!0}}return!1}(e)||function(e){const t=e.parentElement;if(null!==t&&Os(t)){const n=t.firstChild;if(n===e||n.nextSibling===e&&mr(n))return!1;const r=t.lastChild;if(r===e||r.previousSibling===e&&mr(r))return!0}return!1}(e)?null:{conversion:pr,priority:0}}}static importJSON(e){return hr().updateFromJSON(e)}}function pr(e){return{node:hr()}}function hr(){return Ss(new fr)}function gr(e){return e instanceof fr}function mr(e){return Li(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}function vr(e,t){return 16&t?"code":128&t?"mark":32&t?"sub":64&t?"sup":null}function br(e,t){return 1&t?"strong":2&t?"em":"span"}function yr(e,t,n,r,o){const i=r.classList;let s=ls(o,"base");void 0!==s&&i.add(...s),s=ls(o,"underlineStrikethrough");let a=!1;const l=8&t&&4&t;void 0!==s&&(8&n&&4&n?(a=!0,l||i.add(...s)):l&&i.remove(...s));for(const e in pe){const r=pe[e];if(s=ls(o,e),void 0!==s)if(n&r){if(a&&("underline"===e||"strikethrough"===e)){t&r&&i.remove(...s);continue}(0===(t&r)||l&&"underline"===e||"strikethrough"===e)&&i.add(...s)}else t&r&&i.remove(...s)}}function xr(e,t,n){const r=t.firstChild,o=n.isComposing(),i=e+(o?ue:"");if(null==r)t.textContent=i;else{const e=r.nodeValue;if(e!==i)if(o||Y){const[t,n,o]=function(e,t){const n=e.length,r=t.length;let o=0,i=0;for(;o<n&&o<r&&e[o]===t[o];)o++;for(;i+o<n&&i+o<r&&e[n-i-1]===t[r-i-1];)i++;return[o,n-o-i,t.slice(o,r-i)]}(e,i);0!==n&&r.deleteData(t,n),r.insertData(t,o)}else r.nodeValue=i}}function _r(e,t,n,r,o,i){xr(o,e,t);const s=i.theme.text;void 0!==s&&yr(0,0,r,e,s)}function wr(e,t){const n=document.createElement(t);return n.appendChild(e),n}class Sr extends ir{__text;__format;__style;__mode;__detail;static getType(){return"text"}static clone(e){return new Sr(e.__text,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text,this.__format=e.__format,this.__style=e.__style,this.__mode=e.__mode,this.__detail=e.__detail}constructor(e="",t){super(t),this.__text=e,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const e=this.getLatest();return be[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return 1===this.getLatest().__mode}isComposing(){return this.__key===Di()}isSegmented(){return 2===this.getLatest().__mode}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){const t=pe[e];return 0!==(this.getFormat()&t)}isSimpleText(){return"text"===this.__type&&0===this.__mode}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return Ni(this.getLatest().__format,e,t)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,t){const n=this.__format,r=vr(0,n),o=br(0,n),i=null===r?o:r,s=document.createElement(i);let a=s;this.hasFormat("code")&&s.setAttribute("spellcheck","false"),null!==r&&(a=document.createElement(o),s.appendChild(a));_r(a,this,0,n,this.__text,e);const l=this.__style;return""!==l&&(s.style.cssText=l),s}updateDOM(e,t,n){const r=this.__text,o=e.__format,i=this.__format,s=vr(0,o),a=vr(0,i),l=br(0,o),c=br(0,i);if((null===s?l:s)!==(null===a?c:a))return!0;if(s===a&&l!==c){const e=t.firstChild;null==e&&W("updateDOM: prevInnerDOM is null or undefined");const o=document.createElement(c);return _r(o,this,0,i,r,n),t.replaceChild(o,e),!1}let u=t;null!==a&&null!==s&&(u=t.firstChild,null==u&&W("updateDOM: innerDOM is null or undefined")),xr(r,u,this);const d=n.theme.text;void 0!==d&&o!==i&&yr(0,o,i,u,d);const f=e.__style,p=this.__style;return f!==p&&(t.style.cssText=p),!1}static importDOM(){return{"#text":()=>({conversion:Ar,priority:0}),b:()=>({conversion:Cr,priority:0}),code:()=>({conversion:Rr,priority:0}),em:()=>({conversion:Rr,priority:0}),i:()=>({conversion:Rr,priority:0}),mark:()=>({conversion:Rr,priority:0}),s:()=>({conversion:Rr,priority:0}),span:()=>({conversion:kr,priority:0}),strong:()=>({conversion:Rr,priority:0}),sub:()=>({conversion:Rr,priority:0}),sup:()=>({conversion:Rr,priority:0}),u:()=>({conversion:Rr,priority:0})}}static importJSON(e){return Nr().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTextContent(e.text).setFormat(e.format).setDetail(e.detail).setMode(e.mode).setStyle(e.style)}exportDOM(e){let{element:t}=super.exportDOM(e);return Ls(t)||W("Expected TextNode createDOM to always return a HTMLElement"),t.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?t.style.textTransform="lowercase":this.hasFormat("uppercase")?t.style.textTransform="uppercase":this.hasFormat("capitalize")&&(t.style.textTransform="capitalize"),this.hasFormat("bold")&&(t=wr(t,"b")),this.hasFormat("italic")&&(t=wr(t,"i")),this.hasFormat("strikethrough")&&(t=wr(t,"s")),this.hasFormat("underline")&&(t=wr(t,"u")),{element:t}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(e,t){}setFormat(e){const t=this.getWritable();return t.__format="string"==typeof e?pe[e]:e,t}setDetail(e){const t=this.getWritable();return t.__detail="string"==typeof e?he[e]:e,t}setStyle(e){const t=this.getWritable();return t.__style=e,t}toggleFormat(e){const t=Ni(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){const e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){const e=this.getWritable();return e.__detail^=2,e}setMode(e){const t=ve[e];if(this.__mode===t)return this;const n=this.getWritable();return n.__mode=t,n}setTextContent(e){if(this.__text===e)return this;const t=this.getWritable();return t.__text=e,t}select(e,t){To();let n=e,r=t;const o=ao(),i=this.getTextContent(),s=this.__key;if("string"==typeof i){const e=i.length;void 0===n&&(n=e),void 0===r&&(r=e)}else n=0,r=0;if(!Wr(o))return no(s,n,s,r,"text","text");{const e=Di();e!==o.anchor.key&&e!==o.focus.key||ji(s),o.setTextNodeRange(this,n,this,r)}return o}selectStart(){return this.select(0,0)}selectEnd(){const e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,n,r){const o=this.getWritable(),i=o.__text,s=n.length;let a=e;a<0&&(a=s+a,a<0&&(a=0));const l=ao();if(r&&Wr(l)){const t=e+s;l.setTextNodeRange(o,t,o,t)}const c=i.slice(0,a)+n+i.slice(a+t);return o.__text=c,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){To();const t=this.getLatest(),n=t.getTextContent();if(""===n)return[];const r=t.__key,o=Di(),i=n.length;e.sort((e,t)=>e-t),e.push(i);const s=[],a=e.length;for(let t=0,r=0;t<i&&r<=a;r++){const o=e[r];o>t&&(s.push(n.slice(t,o)),t=o)}const l=s.length;if(1===l)return[t];const c=s[0],u=t.getParent();let d;const f=t.getFormat(),p=t.getStyle(),h=t.__detail;let g=!1,m=null,v=null;const b=ao();if(Wr(b)){const[e,t]=b.isBackward()?[b.focus,b.anchor]:[b.anchor,b.focus];"text"===e.type&&e.key===r&&(m=e),"text"===t.type&&t.key===r&&(v=t)}t.isSegmented()?(d=Nr(c),d.__format=f,d.__style=p,d.__detail=h,d.__state=De(t,d),g=!0):d=t.setTextContent(c);const y=[d];for(let e=1;e<l;e++){const n=Nr(s[e]);n.__format=f,n.__style=p,n.__detail=h,n.__state=De(t,n);const i=n.__key;o===r&&ji(i),y.push(n)}const x=m?m.offset:null,_=v?v.offset:null;let w=0;for(const e of y){if(!m&&!v)break;const t=w+e.getTextContentSize();if(null!==m&&null!==x&&x<=t&&x>=w&&(m.set(e.getKey(),x-w,"text"),x<t&&(m=null)),null!==v&&null!==_&&_<=t&&_>=w){v.set(e.getKey(),_-w,"text");break}w=t}if(null!==u){!function(e){const t=e.getPreviousSibling(),n=e.getNextSibling();null!==t&&zi(t);null!==n&&zi(n)}(this);const e=u.getWritable(),t=this.getIndexWithinParent();g?(e.splice(t,0,y),this.remove()):e.splice(t,1,y),Wr(b)&&co(b,u,t,l-1)}return y}mergeWithSibling(e){const t=e===this.getPreviousSibling();t||e===this.getNextSibling()||W("mergeWithSibling: sibling must be a previous or next sibling");const n=this.__key,r=e.__key,o=this.__text,i=o.length;Di()===r&&ji(n);const s=ao();if(Wr(s)){const o=s.anchor,a=s.focus;null!==o&&o.key===r&&po(o,t,n,e,i),null!==a&&a.key===r&&po(a,t,n,e,i)}const a=e.__text,l=t?a+o:o+a;this.setTextContent(l);const c=this.getWritable();return e.remove(),c}isTextEntity(){return!1}}function kr(e){return{forChild:Pr(e.style),node:null}}function Cr(e){const t=e,n="normal"===t.style.fontWeight;return{forChild:Pr(t.style,n?void 0:"bold"),node:null}}const Er=new WeakMap;function Tr(e){if(!Ls(e))return!1;if("PRE"===e.nodeName)return!0;const t=e.style.whiteSpace;return"string"==typeof t&&t.startsWith("pre")}function Ar(e){const t=e;null===e.parentElement&&W("Expected parentElement of Text not to be null");let n=t.textContent||"";if(null!==function(e){let t,n=e.parentNode;const r=[e];for(;null!==n&&void 0===(t=Er.get(n))&&!Tr(n);)r.push(n),n=n.parentNode;const o=void 0===t?n:t;for(let e=0;e<r.length;e++)Er.set(r[e],o);return o}(t)){const e=n.split(/(\r?\n|\t)/),t=[],r=e.length;for(let n=0;n<r;n++){const r=e[n];"\n"===r||"\r\n"===r?t.push(hr()):"\t"===r?t.push(zr()):""!==r&&t.push(Nr(r))}return{node:t}}if(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," "),""===n)return{node:null};if(" "===n[0]){let e=t,r=!0;for(;null!==e&&null!==(e=Lr(e,!1));){const t=e.textContent||"";if(t.length>0){/[ \t\n]$/.test(t)&&(n=n.slice(1)),r=!1;break}}r&&(n=n.slice(1))}if(" "===n[n.length-1]){let e=t,r=!0;for(;null!==e&&null!==(e=Lr(e,!0));){if((e.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){r=!1;break}}r&&(n=n.slice(0,n.length-1))}return""===n?{node:null}:{node:Nr(n)}}function Lr(e,t){let n=e;for(;;){let e;for(;null===(e=t?n.nextSibling:n.previousSibling);){const e=n.parentElement;if(null===e)return null;n=e}if(n=e,Ls(n)){const e=n.style.display;if(""===e&&!Ns(n)||""!==e&&!e.startsWith("inline"))return null}let r=n;for(;null!==(r=t?n.firstChild:n.lastChild);)n=r;if(Li(n))return n;if("BR"===n.nodeName)return null}}const Mr={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Rr(e){const t=Mr[e.nodeName.toLowerCase()];return void 0===t?{node:null}:{forChild:Pr(e.style,t),node:null}}function Nr(e=""){return Ss(new Sr(e))}function Or(e){return e instanceof Sr}function Pr(e,t){const n=e.fontWeight,r=e.textDecoration.split(" "),o="700"===n||"bold"===n,i=r.includes("line-through"),s="italic"===e.fontStyle,a=r.includes("underline"),l=e.verticalAlign;return e=>Or(e)?(o&&!e.hasFormat("bold")&&e.toggleFormat("bold"),i&&!e.hasFormat("strikethrough")&&e.toggleFormat("strikethrough"),s&&!e.hasFormat("italic")&&e.toggleFormat("italic"),a&&!e.hasFormat("underline")&&e.toggleFormat("underline"),"sub"!==l||e.hasFormat("subscript")||e.toggleFormat("subscript"),"super"!==l||e.hasFormat("superscript")||e.toggleFormat("superscript"),t&&!e.hasFormat(t)&&e.toggleFormat(t),e):e}class Ir extends Sr{static getType(){return"tab"}static clone(e){return new Ir(e.__key)}constructor(e){super("\t",e),this.__detail=2}static importDOM(){return null}createDOM(e){const t=super.createDOM(e),n=ls(e.theme,"tab");if(void 0!==n){t.classList.add(...n)}return t}static importJSON(e){return zr().updateFromJSON(e)}setTextContent(e){return"\t"!==e&&""!==e&&W("TabNode does not support setTextContent"),super.setTextContent("\t")}spliceText(e,t,n,r){return""===n&&0===t||"\t"===n&&1===t||W("TabNode does not support spliceText"),this}setDetail(e){return 2!==e&&W("TabNode does not support setDetail"),this}setMode(e){return"normal"!==e&&W("TabNode does not support setMode"),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function zr(){return Ss(new Ir)}function jr(e){return e instanceof Ir}class Dr{key;offset;type;_selection;constructor(e,t,n){Object.defineProperty(this,"_selection",{enumerable:!1,writable:!0}),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){if(this.key===e.key)return this.offset<e.offset;return xa(Oa(Ca(this,"next")),Oa(Ca(e,"next")))<0}getNode(){const e=Fi(this.key);return null===e&&W("Point.getNode: node not found"),e}set(e,t,n,r){const o=this._selection,i=this.key;if(!r||this.key!==e||this.offset!==t||this.type!==n){this.key=e,this.offset=t,this.type=n;{const t=Fi(e);("text"===n?Or(t):Vo(t))||W(`PointType.set: node with key ${e} is ${t?t.__type:"[not found]"} and can not be used for a ${n} point`)}Eo()||(Di()===i&&ji(e),null!==o&&(o.setCachedNodes(null),o.dirty=!0))}}}function Fr(e,t,n){return new Dr(e,t,n)}function Br(e,t){let n=t.__key,r=e.offset,o="element";if(Or(t)){o="text";const e=t.getTextContentSize();r>e&&(r=e)}else if(!Vo(t)){const e=t.getNextSibling();if(Or(e))n=e.__key,r=0,o="text";else{const e=t.getParent();e&&(n=e.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,o)}function $r(e,t){if(Vo(t)){const n=t.getLastDescendant();Vo(n)||Or(n)?Br(e,n):Br(e,t)}else Br(e,t)}class Hr{_nodes;_cachedNodes;dirty;constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!Ur(e))return!1;const t=this._nodes,n=e._nodes;return t.size===n.size&&Array.from(t).every(e=>n.has(e))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new Hr(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const t=this.getNodes(),n=t.length,r=t[n-1];let o;if(Or(r))o=r.select();else{const e=r.getIndexWithinParent()+1;o=r.getParentOrThrow().select(e,e)}o.insertNodes(e);for(let e=0;e<n;e++)t[e].remove()}getNodes(){const e=this._cachedNodes;if(null!==e)return e;const t=this._nodes,n=[];for(const e of t){const t=Fi(e);null!==t&&n.push(t)}return Eo()||(this._cachedNodes=n),n}getTextContent(){const e=this.getNodes();let t="";for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}deleteNodes(){const e=this.getNodes();if((ao()||lo())===this&&e[0]){const t=la(e[0],"next");Ta(ba(t,t))}for(const t of e)t.remove()}}function Wr(e){return e instanceof Kr}class Kr{format;style;anchor;focus;_cachedNodes;dirty;constructor(e,t,n,r){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this.format=n,this.style=r,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!Wr(e)&&(this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style)}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const e=this._cachedNodes;if(null!==e)return e;const t=function(e){const t=[],[n,r]=e.getTextSlices();n&&t.push(n.caret.origin);const o=new Set,i=new Set;for(const n of e)if(oa(n)){const{origin:e}=n;0===t.length?o.add(e):(i.add(e),t.push(e))}else{const{origin:e}=n;Vo(e)&&i.has(e)||t.push(e)}r&&t.push(r.caret.origin);if(ra(e.focus)&&Vo(e.focus.origin)&&null===e.focus.getNodeAtCaret())for(let n=fa(e.focus.origin,"previous");oa(n)&&o.has(n.origin)&&!n.origin.isEmpty()&&n.origin.is(t[t.length-1]);n=pa(n))o.delete(n.origin),t.pop();for(;t.length>1;){const e=t[t.length-1];if(!Vo(e)||i.has(e)||e.isEmpty()||o.has(e))break;t.pop()}if(0===t.length&&e.isCollapsed()){const n=Oa(e.anchor),r=Oa(e.anchor.getFlipped()),o=e=>na(e)?e.origin:e.getNodeAtCaret(),i=o(n)||o(r)||(e.anchor.getNodeAtCaret()?n.origin:r.origin);t.push(i)}return t}(za(La(this),"next"));return this.isCollapsed()&&t.length>1&&W(`RangeSelection.getNodes() returned ${String(t.length)} > 1 nodes in a collapsed selection`),Eo()||(this._cachedNodes=t),t}setTextNodeRange(e,t,n,r){this.anchor.set(e.__key,t,"text"),this.focus.set(n.__key,r,"text")}getTextContent(){const e=this.getNodes();if(0===e.length)return"";const t=e[0],n=e[e.length-1],r=this.anchor,o=this.focus,i=r.isBefore(o),[s,a]=Yr(this);let l="",c=!0;for(let u=0;u<e.length;u++){const d=e[u];if(Vo(d)&&!d.isInline())c||(l+="\n"),c=!d.isEmpty();else if(c=!1,Or(d)){let e=d.getTextContent();d===t?d===n?"element"===r.type&&"element"===o.type&&o.offset!==r.offset||(e=s<a?e.slice(s,a):e.slice(a,s)):e=i?e.slice(s):e.slice(a):d===n&&(e=i?e.slice(0,a):e.slice(0,s)),l+=e}else!Xo(d)&&!gr(d)||d===n&&this.isCollapsed()||(l+=d.getTextContent())}return l}applyDOMRange(e){const t=Mo(),n=t.getEditorState()._selection,r=eo(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n);if(null===r)return;const[o,i]=r;this.anchor.set(o.key,o.offset,o.type,!0),this.focus.set(i.key,i.offset,i.type,!0),He(this)}clone(){const e=this.anchor,t=this.focus;return new Kr(Fr(e.key,e.offset,e.type),Fr(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=Ni(this.format,e,null),this.dirty=!0}setFormat(e){this.format=e,this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){const t=pe[e];return 0!==(this.format&t)}insertRawText(e){const t=e.split(/(\r?\n|\t)/),n=[],r=t.length;for(let e=0;e<r;e++){const r=t[e];"\n"===r||"\r\n"===r?n.push(hr()):"\t"===r?n.push(zr()):n.push(Nr(r))}this.insertNodes(n)}insertText(e){const t=this.anchor,n=this.focus,r=this.format,o=this.style;let i=t,s=n;!this.isCollapsed()&&n.isBefore(t)&&(i=n,s=t),"element"===i.type&&function(e,t,n,r){const o=e.getNode(),i=o.getChildAtIndex(e.offset),s=Nr();if(s.setFormat(n),s.setStyle(r),li(i))i.splice(0,0,[s]);else{const e=Zo(o)?ai().append(s):s;null===i?o.append(e):i.insertBefore(e)}e.is(t)&&t.set(s.__key,0,"text"),e.set(s.__key,0,"text")}(i,s,r,o),"element"===s.type&&Ea(s,Oa(Ca(s,"next")));const a=i.offset;let l=s.offset;const c=this.getNodes(),u=c.length;let d=c[0];Or(d)||W("insertText: first node is not a text node");const f=d.getTextContent().length,p=d.getParentOrThrow();let h=c[u-1];if(1===u&&"element"===s.type&&(l=f,s.set(i.key,l,"text")),this.isCollapsed()&&a===f&&(Ai(d)||!d.canInsertTextAfter()||!p.canInsertTextAfter()&&null===d.getNextSibling())){let t=d.getNextSibling();if(Or(t)&&t.canInsertTextBefore()&&!Ai(t)||(t=Nr(),t.setFormat(r),t.setStyle(o),p.canInsertTextAfter()?d.insertAfter(t):p.insertAfter(t)),t.select(0,0),d=t,""!==e)return void this.insertText(e)}else if(this.isCollapsed()&&0===a&&(Ai(d)||!d.canInsertTextBefore()||!p.canInsertTextBefore()&&null===d.getPreviousSibling())){let t=d.getPreviousSibling();if(Or(t)&&!Ai(t)||(t=Nr(),t.setFormat(r),p.canInsertTextBefore()?d.insertBefore(t):p.insertBefore(t)),t.select(),d=t,""!==e)return void this.insertText(e)}else if(d.isSegmented()&&a!==f){const e=Nr(d.getTextContent());e.setFormat(r),d.replace(e),d=e}else if(!this.isCollapsed()&&""!==e){const t=h.getParent();if(!p.canInsertTextBefore()||!p.canInsertTextAfter()||Vo(t)&&(!t.canInsertTextBefore()||!t.canInsertTextAfter()))return this.insertText(""),Zr(this.anchor,this.focus,null),void this.insertText(e)}if(1===u){if(Ti(d)){const t=Nr(e);return t.select(),void d.replace(t)}const t=d.getFormat(),n=d.getStyle();if(a!==l||t===r&&n===o){if(jr(d)){const t=Nr(e);return t.setFormat(r),t.setStyle(o),t.select(),void d.replace(t)}}else{if(""!==d.getTextContent()){const t=Nr(e);if(t.setFormat(r),t.setStyle(o),t.select(),0===a)d.insertBefore(t,!1);else{const[e]=d.splitText(a);e.insertAfter(t,!1)}return void(t.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length))}d.setFormat(r),d.setStyle(o)}const i=l-a;d=d.spliceText(a,i,e,!0),""===d.getTextContent()?d.remove():"text"===this.anchor.type&&(d.isComposing()?this.anchor.offset-=e.length:(this.format=t,this.style=n))}else{const t=new Set([...d.getParentKeys(),...h.getParentKeys()]),n=Vo(d)?d:d.getParentOrThrow();let r=Vo(h)?h:h.getParentOrThrow(),o=h;if(!n.is(r)&&r.isInline())do{o=r,r=r.getParentOrThrow()}while(r.isInline());if("text"===s.type&&(0!==l||""===h.getTextContent())||"element"===s.type&&h.getIndexWithinParent()<l)if(Or(h)&&!Ti(h)&&l!==h.getTextContentSize()){if(h.isSegmented()){const e=Nr(h.getTextContent());h.replace(e),h=e}Zo(s.getNode())||"text"!==s.type||(h=h.spliceText(0,l,"")),t.add(h.__key)}else{const e=h.getParentOrThrow();e.canBeEmpty()||1!==e.getChildrenSize()?h.remove():e.remove()}else t.add(h.__key);const i=r.getChildren(),p=new Set(c),g=n.is(r),m=n.isInline()&&null===d.getNextSibling()?n:d;for(let e=i.length-1;e>=0;e--){const t=i[e];if(t.is(d)||Vo(t)&&t.isParentOf(d))break;t.isAttached()&&(!p.has(t)||t.is(o)?g||m.insertAfter(t,!1):t.remove())}if(!g){let e=r,n=null;for(;null!==e;){const r=e.getChildren(),o=r.length;(0===o||r[o-1].is(n))&&(t.delete(e.__key),n=e),e=e.getParent()}}if(Ti(d))if(a===f)d.select();else{const t=Nr(e);t.select(),d.replace(t)}else d=d.spliceText(a,f-a,e,!0),""===d.getTextContent()?d.remove():"text"===this.anchor.type&&(d.isComposing()?this.anchor.offset-=e.length:(this.format=d.getFormat(),this.style=d.getStyle()));for(let e=1;e<u;e++){const n=c[e],r=n.__key;t.has(r)||n.remove()}}}removeText(){const e=ao()===this,t=function(e,t="removeEmptySlices"){if(e.isCollapsed())return e;const n="root",r="next";let o=t;const i=za(e,r),s=Ra(i.anchor,n),a=Ra(i.focus.getFlipped(),n),l=new Set,c=[];for(const e of i.iterNodeCarets(n))if(oa(e))l.add(e.origin.getKey());else if(ra(e)){const{origin:t}=e;Vo(t)&&!l.has(t.getKey())||c.push(t)}for(const e of c)e.remove();for(const e of i.getTextSlices()){if(!e)continue;const{origin:t}=e.caret,n=t.getTextContentSize(),i=Ma(la(t,r)),l=t.getMode();if(Math.abs(e.distance)===n&&"removeEmptySlices"===o||"token"===l&&0!==e.distance)i.remove();else if(0!==e.distance){o="removeEmptySlices";let t=e.removeTextSlice();const n=e.caret.origin;if("segmented"===l){const e=t.origin,n=Nr(e.getTextContent()).setStyle(e.getStyle()).setFormat(e.getFormat());i.replaceOrInsert(n),t=ca(n,r,t.offset)}n.is(s[0].origin)&&(s[0]=t),n.is(a[0].origin)&&(a[0]=t.getFlipped())}}let u,d;for(const e of s)if(Na(e)){u=Oa(e);break}for(const e of a)if(Na(e)){d=Oa(e);break}const f=function(e,t,n){if(!e||!t)return null;const r=e.getParentAtCaret(),o=t.getParentAtCaret();if(!r||!o)return null;const i=r.getParents().reverse();i.push(r);const s=o.getParents().reverse();s.push(o);const a=Math.min(i.length,s.length);let l;for(l=0;l<a&&i[l]===s[l];l++);const c=(e,t)=>{let n;for(let r=l;r<e.length;r++){const o=e[r];if(_s(o))return;!n&&t(o)&&(n=o)}return n},u=c(i,Ps),d=u&&c(s,e=>n.has(e.getKey())&&Ps(e));return u&&d?[u,d]:null}(u,d,l);if(f){const[e,t]=f;fa(e,"previous").splice(0,t.getChildren()),t.remove()}const p=[u,d,...s,...a].find(Na);if(p){return va(Ia(Oa(p),e.direction))}W(`$removeTextFromCaretRange: selection was lost, could not find a new anchor given candidates with keys: ${JSON.stringify(s.map(e=>e.origin.__key))}`)}(La(this));Aa(this,t),e&&ao()!==this&&Yi(this)}formatText(e,t=null){if(this.isCollapsed())return this.toggleFormat(e),void ji(null);const n=this.getNodes(),r=[];for(const e of n)Or(e)&&r.push(e);const o=t=>{n.forEach(n=>{if(Vo(n)){const r=n.getFormatFlags(e,t);n.setTextFormat(r)}})},i=r.length;if(0===i)return this.toggleFormat(e),ji(null),void o(t);const s=this.anchor,a=this.focus,l=this.isBackward(),c=l?a:s,u=l?s:a;let d=0,f=r[0],p="element"===c.type?0:c.offset;if("text"===c.type&&p===f.getTextContentSize()&&(d=1,f=r[1],p=0),null==f)return;const h=f.getFormatFlags(e,t);o(h);const g=i-1;let m=r[g];const v="text"===u.type?u.offset:m.getTextContentSize();if(f.is(m)){if(p===v)return;if(Ai(f)||0===p&&v===f.getTextContentSize())f.setFormat(h);else{const e=f.splitText(p,v),t=0===p?e[0]:e[1];t.setFormat(h),"text"===c.type&&c.set(t.__key,0,"text"),"text"===u.type&&u.set(t.__key,v-p,"text")}return void(this.format=h)}0===p||Ai(f)||([,f]=f.splitText(p),p=0),f.setFormat(h);const b=m.getFormatFlags(e,h);v>0&&(v===m.getTextContentSize()||Ai(m)||([m]=m.splitText(v)),m.setFormat(b));for(let t=d+1;t<g;t++){const n=r[t],o=n.getFormatFlags(e,b);n.setFormat(o)}"text"===c.type&&c.set(f.__key,p,"text"),"text"===u.type&&u.set(m.__key,v,"text"),this.format=h|b}insertNodes(e){if(0===e.length)return;if(this.isCollapsed()||this.removeText(),"root"===this.anchor.key){this.insertParagraph();const t=ao();return Wr(t)||W("Expected RangeSelection after insertParagraph"),t.insertNodes(e)}const t=(this.isBackward()?this.focus:this.anchor).getNode(),n=Ys(t,Ps),r=e[e.length-1];if(Vo(n)&&"__language"in n){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const t=vo(this);n.splice(t,0,e),r.selectEnd()}return}if(!e.some(e=>(Vo(e)||Xo(e))&&!e.isInline())){Vo(n)||W(`Expected node ${t.constructor.name} of type ${t.getType()} to have a block ElementNode ancestor`);const o=vo(this);return n.splice(o,0,e),void r.selectEnd()}const o=function(e){const t=ai();let n=null;for(let r=0;r<e.length;r++){const o=e[r],i=gr(o);if(i||Xo(o)&&o.isInline()||Vo(o)&&o.isInline()||Or(o)||o.isParentRequired()){if(null===n&&(n=o.createParentElementNode(),t.append(n),i))continue;null!==n&&n.append(o)}else t.append(o),n=null}return t}(e),i=o.getLastDescendant(),s=o.getChildren(),a=!Vo(n)||!n.isEmpty()?this.insertParagraph():null,l=s[s.length-1];let c=s[0];(e=>Vo(e)&&Ps(e)&&!e.isEmpty()&&Vo(n)&&(!n.isEmpty()||n.canMergeWhenEmpty()))(c)&&(Vo(n)||W(`Expected node ${t.constructor.name} of type ${t.getType()} to have a block ElementNode ancestor`),n.append(...c.getChildren()),c=s[1]),c&&(null===n&&W(`Expected node ${t.constructor.name} of type ${t.getType()} to have a block ancestor`),function(e,t){const n=t.getParentOrThrow().getLastChild();let r=t;const o=[t];for(;r!==n;)r.getNextSibling()||W("insertRangeAfter: lastToInsert must be a later sibling of firstToInsert"),r=r.getNextSibling(),o.push(r);let i=e;for(const e of o)i=i.insertAfter(e)}(n,c));const u=Ys(i,Ps);a&&Vo(u)&&(a.canMergeWhenEmpty()||Ps(l))&&(u.append(...a.getChildren()),a.remove()),Vo(n)&&n.isEmpty()&&n.remove(),i.selectEnd();const d=Vo(n)?n.getLastChild():null;gr(d)&&u!==n&&d.remove()}insertParagraph(){if("root"===this.anchor.key){const e=ai();return Ui().splice(this.anchor.offset,0,[e]),e.select(),e}const e=vo(this),t=Ys(this.anchor.getNode(),Ps);Vo(t)||W("Expected ancestor to be a block ElementNode");const n=t.getChildAtIndex(e),r=n?[n,...n.getNextSiblings()]:[],o=t.insertNewAfter(this,!1);return o?(o.append(...r),o.selectStart(),o):null}insertLineBreak(e){const t=hr();if(this.insertNodes([t]),e){const e=t.getParentOrThrow(),n=t.getIndexWithinParent();e.select(n,n)}}extract(){const e=[...this.getNodes()],t=e.length;let n=e[0],r=e[t-1];const[o,i]=Yr(this),s=this.isBackward(),[a,l]=s?[this.focus,this.anchor]:[this.anchor,this.focus],[c,u]=s?[i,o]:[o,i];if(0===t)return[];if(1===t){if(Or(n)&&!this.isCollapsed()){const e=n.splitText(c,u),t=0===c?e[0]:e[1];return t?(a.set(t.getKey(),0,"text"),l.set(t.getKey(),t.getTextContentSize(),"text"),[t]):[]}return[n]}if(Or(n)&&(c===n.getTextContentSize()?e.shift():0!==c&&([,n]=n.splitText(c),e[0]=n,a.set(n.getKey(),0,"text"))),Or(r)){const t=r.getTextContent().length;0===u?e.pop():u!==t&&([r]=r.splitText(u),e[e.length-1]=r,l.set(r.getKey(),r.getTextContentSize(),"text"))}return e}modify(e,t,n){if(yo(this,e,t,n))return;const r="move"===e,o=Mo(),i=Ts(xs(o));if(!i)return;const s=o._blockCursorElement,a=o._rootElement,l=this.focus.getNode();if(null===a||null===s||!Vo(l)||l.isInline()||l.canBeEmpty()||Es(s,o,a),this.dirty){let e=gs(o,this.anchor.key),t=gs(o,this.focus.key);"text"===this.anchor.type&&(e=Ri(e)),"text"===this.focus.type&&(t=Ri(t)),e&&t&&ho(i,e,this.anchor.offset,t,this.focus.offset)}if(function(e,t,n,r){e.modify(t,n,r)}(i,e,t?"backward":"forward",n),i.rangeCount>0){const e=i.getRangeAt(0),n=this.anchor.getNode(),o=Zo(n)?n:function(e){let t=e.getParentOrThrow();for(;null!==t;){if(_s(t))return t;t=t.getParentOrThrow()}return t}(n);if(this.applyDOMRange(e),this.dirty=!0,!r){const n=this.getNodes(),r=[];let s=!1;for(let e=0;e<n.length;e++){const t=n[e];bs(t,o)?r.push(t):s=!0}if(s&&r.length>0)if(t){const e=r[0];Vo(e)?e.selectStart():e.getParentOrThrow().selectStart()}else{const e=r[r.length-1];Vo(e)?e.selectEnd():e.getParentOrThrow().selectEnd()}i.anchorNode===e.startContainer&&i.anchorOffset===e.startOffset||function(e){const t=e.focus,n=e.anchor,r=n.key,o=n.offset,i=n.type;n.set(t.key,t.offset,t.type,!0),t.set(r,o,i,!0)}(this)}}"lineboundary"===n&&yo(this,e,t,n,"decorators")}forwardDeletion(e,t,n){if(!n&&("element"===e.type&&Vo(t)&&e.offset===t.getChildrenSize()||"text"===e.type&&e.offset===t.getTextContentSize())){const e=t.getParent(),n=t.getNextSibling()||(null===e?null:e.getNextSibling());if(Vo(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(e){const t=this.isCollapsed();if(this.isCollapsed()){const t=this.anchor;let n=t.getNode();if(this.forwardDeletion(t,n,e))return;const r=ma(Ca(t,e?"previous":"next"));if(r.getTextSlices().every(e=>null===e||0===e.distance)){let e={type:"initial"};for(const t of r.iterNodeCarets("shadowRoot"))if(oa(t))if(t.origin.isInline());else{if(t.origin.isShadowRoot()){if("merge-block"===e.type)break;if(Vo(r.anchor.origin)&&r.anchor.origin.isEmpty()){const e=Oa(t);Aa(this,ba(e,e)),r.anchor.origin.remove()}return}"merge-next-block"!==e.type&&"merge-block"!==e.type||(e={block:e.block,caret:t,type:"merge-block"})}else{if("merge-block"===e.type)break;if(ra(t)){if(Vo(t.origin)){if(t.origin.isInline()){if(!t.origin.isParentOf(r.anchor.origin))break}else e={block:t.origin,type:"merge-next-block"};continue}if(Xo(t.origin)){if(t.origin.isIsolated());else if("merge-next-block"===e.type&&(t.origin.isKeyboardSelectable()||!t.origin.isInline())&&Vo(r.anchor.origin)&&r.anchor.origin.isEmpty()){r.anchor.origin.remove();const e=oo();e.add(t.origin.getKey()),Yi(e)}else t.origin.remove();return}break}}if("merge-block"===e.type){const{caret:t,block:n}=e;return Aa(this,ba(!t.origin.isEmpty()&&n.isEmpty()?Ma(la(n,t.direction)):r.anchor,t)),this.removeText()}}const o=this.focus;if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&0===t.offset&&Vr(this,t.getNode()))return}else{const r="text"===o.type?o.getNode():null;if(n="text"===t.type?t.getNode():null,null!==r&&r.isSegmented()){const t=o.offset,i=r.getTextContentSize();if(r.is(n)||e&&t!==i||!e&&0!==t)return void qr(r,e,t)}else if(null!==n&&n.isSegmented()){const o=t.offset,i=n.getTextContentSize();if(n.is(r)||e&&0!==o||!e&&o!==i)return void qr(n,e,o)}!function(e,t){const n=e.anchor,r=e.focus,o=n.getNode(),i=r.getNode();if(o===i&&"text"===n.type&&"text"===r.type){const e=n.offset,i=r.offset,s=e<i,a=s?e:i,l=s?i:e,c=l-1;if(a!==c){(function(e){e.length>1||W("shouldDeleteExactlyOneCodeUnit: expecting to be called only with sequences of two or more code units");return!(Ji(e)||Jr(e))})(o.getTextContent().slice(a,l))&&(t?r.set(r.key,c,r.type):n.set(n.key,c,n.type))}}}(this,e)}}if(this.removeText(),e&&!t&&this.isCollapsed()&&"element"===this.anchor.type&&0===this.anchor.offset){const e=this.anchor.getNode();e.isEmpty()&&Zo(e.getParent())&&null===e.getPreviousSibling()&&Vr(this,e)}}deleteLine(e){this.isCollapsed()&&this.modify("extend",e,"lineboundary"),this.isCollapsed()?this.deleteCharacter(e):this.removeText()}deleteWord(e){if(this.isCollapsed()){const t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;this.modify("extend",e,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function Ur(e){return e instanceof Hr}function Gr(e){const t=e.offset;if("text"===e.type)return t;const n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function Yr(e){const t=e.getStartEndPoints();if(null===t)return[0,0];const[n,r]=t;return"element"===n.type&&"element"===r.type&&n.key===r.key&&n.offset===r.offset?[0,0]:[Gr(n),Gr(r)]}function Vr(e,t){for(let n=t;n;n=n.getParent()){if(Vo(n)){if(n.collapseAtStart(e))return!0;if(_s(n))break}if(n.getPreviousSibling())break}return!1}const Jr=(()=>{try{const e=new RegExp("\\p{Emoji}","u"),t=e.test.bind(e);if(t("❤️")&&t("#️⃣")&&t("👍"))return t}catch(e){}return()=>!1})();function qr(e,t,n){const r=e,o=r.getTextContent().split(/(?=\s)/g),i=o.length;let s=0,a=0;for(let e=0;e<i;e++){const r=e===i-1;if(a=s,s+=o[e].length,t&&s===n||s>n||r){o.splice(e,1),r&&(a=void 0);break}}const l=o.join("").trim();""===l?r.remove():(r.setTextContent(l),r.select(a,a))}function Xr(e,t,n,r){let o,i=t;if(Ls(e)){let s=!1;const a=e.childNodes,l=a.length,c=r._blockCursorElement;i===l&&(s=!0,i=l-1);let u=a[i],d=!1;if(u===c)u=a[i+1],d=!0;else if(null!==c){const n=c.parentNode;if(e===n){t>Array.prototype.indexOf.call(n.children,c)&&i--}}if(o=Vi(u),Or(o))i=ua(o,s?"next":"previous");else{let a=Vi(e);if(null===a)return null;if(Vo(a)){const l=r.getElementByKey(a.getKey());null===l&&W("$internalResolveSelectionPoint: node in DOM but not keyToDOMMap");const c=a.getDOMSlot(l);[a,i]=c.resolveChildIndex(a,l,e,t),Vo(a)||W("$internalResolveSelectionPoint: resolvedElement is not an ElementNode"),s&&i>=a.getChildrenSize()&&(i=Math.max(0,a.getChildrenSize()-1));let u=a.getChildAtIndex(i);if(Vo(u)&&function(e,t,n){const r=e.getParent();return null===n||null===r||!r.canBeEmpty()||r!==n.getNode()}(u,0,n)){const e=s?u.getLastDescendant():u.getFirstDescendant();null===e?a=u:(u=e,a=Vo(u)?u:u.getParentOrThrow()),i=0}Or(u)?(o=u,a=null,i=ua(u,s?"next":"previous")):u!==a&&s&&!d&&(Vo(a)||W("invariant"),i=Math.min(a.getChildrenSize(),i+1))}else{const n=a.getIndexWithinParent();i=0===t&&Xo(a)&&Vi(e)===a?n:n+1,a=a.getParentOrThrow()}if(Vo(a))return Fr(a.__key,i,"element")}}else o=Vi(e);return Or(o)?Fr(o.__key,ua(o,i,"clamp"),"text"):null}function Qr(e,t,n){const r=e.offset,o=e.getNode();if(0===r){const r=o.getPreviousSibling(),i=o.getParent();if(t){if((n||!t)&&null===r&&Vo(i)&&i.isInline()){const t=i.getPreviousSibling();Or(t)&&e.set(t.__key,t.getTextContent().length,"text")}}else Vo(r)&&!n&&r.isInline()?e.set(r.__key,r.getChildrenSize(),"element"):Or(r)&&e.set(r.__key,r.getTextContent().length,"text")}else if(r===o.getTextContent().length){const r=o.getNextSibling(),i=o.getParent();if(t&&Vo(r)&&r.isInline())e.set(r.__key,0,"element");else if((n||t)&&null===r&&Vo(i)&&i.isInline()&&!i.canInsertTextAfter()){const t=i.getNextSibling();Or(t)&&e.set(t.__key,0,"text")}}}function Zr(e,t,n){if("text"===e.type&&"text"===t.type){const r=e.isBefore(t),o=e.is(t);Qr(e,r,o),Qr(t,!r,o),o&&t.set(e.key,e.offset,e.type);const i=Mo();if(i.isComposing()&&i._compositionKey!==e.key&&Wr(n)){const r=n.anchor,o=n.focus;e.set(r.key,r.offset,r.type,!0),t.set(o.key,o.offset,o.type,!0)}}}function eo(e,t,n,r,o,i){if(null===e||null===n||!Si(o,e,n))return null;const s=Xr(e,t,Wr(i)?i.anchor:null,o);if(null===s)return null;const a=Xr(n,r,Wr(i)?i.focus:null,o);if(null===a)return null;if(so("anchor",s),so("focus",a),"element"===s.type&&"element"===a.type){const t=Vi(e),r=Vi(n);if(Xo(t)&&Xo(r))return null}return Zr(s,a,i),[s,a]}function to(e){return Vo(e)&&!e.isInline()}function no(e,t,n,r,o,i){const s=Lo(),a=new Kr(Fr(e,t,o),Fr(n,r,i),0,"");return a.dirty=!0,s._selection=a,a}function ro(){const e=Fr("root",0,"element"),t=Fr("root",0,"element");return new Kr(e,t,0,"")}function oo(){return new Hr(new Set)}function io(e,t,n,r){const o=n._window;if(null===o)return null;const i=r||o.event,s=i?i.type:void 0,a="selectionchange"===s,l=!_e&&(a||"beforeinput"===s||"compositionstart"===s||"compositionend"===s||"click"===s&&i&&3===i.detail||"drop"===s||void 0===s);let c,u,d,f;if(Wr(e)&&!l)return e.clone();if(null===t)return null;if(c=t.anchorNode,u=t.focusNode,d=t.anchorOffset,f=t.focusOffset,(a||void 0===s)&&Wr(e)&&!Si(n,c,u))return e.clone();const p=eo(c,d,u,f,n,e);if(null===p)return null;const[h,g]=p;return new Kr(h,g,Wr(e)?e.format:0,Wr(e)?e.style:"")}function so(e,t){const n=Fi(t.key);if(void 0===n&&W(`$validatePoint: ${e} key ${t.key} not found in current editorState`),"text"===t.type){Or(n)||W(`$validatePoint: ${e} key ${t.key} is not a TextNode`);const r=n.getTextContentSize();t.offset<=r||W(`$validatePoint: ${e} point.offset > node.getTextContentSize() (${String(t.offset)} > ${String(r)})`)}else{Vo(n)||W(`$validatePoint: ${e} key ${t.key} is not an ElementNode`);const r=n.getChildrenSize();t.offset<=r||W(`$validatePoint: ${e} point.offset > node.getChildrenSize() (${String(t.offset)} > ${String(r)})`)}}function ao(){return Lo()._selection}function lo(){return Mo()._editorState._selection}function co(e,t,n,r=1){const o=e.anchor,i=e.focus,s=o.getNode(),a=i.getNode();if(!t.is(s)&&!t.is(a))return;const l=t.__key;if(e.isCollapsed()){const t=o.offset;if(n<=t&&r>0||n<t&&r<0){const n=Math.max(0,t+r);o.set(l,n,"element"),i.set(l,n,"element"),uo(e)}}else{const s=e.isBackward(),a=s?i:o,c=a.getNode(),u=s?o:i,d=u.getNode();if(t.is(c)){const e=a.offset;(n<=e&&r>0||n<e&&r<0)&&a.set(l,Math.max(0,e+r),"element")}if(t.is(d)){const e=u.offset;(n<=e&&r>0||n<e&&r<0)&&u.set(l,Math.max(0,e+r),"element")}}uo(e)}function uo(e){const t=e.anchor,n=t.offset,r=e.focus,o=r.offset,i=t.getNode(),s=r.getNode();if(e.isCollapsed()){if(!Vo(i))return;const e=i.getChildrenSize(),o=n>=e,s=o?i.getChildAtIndex(e-1):i.getChildAtIndex(n);if(Or(s)){let e=0;o&&(e=s.getTextContentSize()),t.set(s.__key,e,"text"),r.set(s.__key,e,"text")}return}if(Vo(i)){const e=i.getChildrenSize(),r=n>=e,o=r?i.getChildAtIndex(e-1):i.getChildAtIndex(n);if(Or(o)){let e=0;r&&(e=o.getTextContentSize()),t.set(o.__key,e,"text")}}if(Vo(s)){const e=s.getChildrenSize(),t=o>=e,n=t?s.getChildAtIndex(e-1):s.getChildAtIndex(o);if(Or(n)){let e=0;t&&(e=n.getTextContentSize()),r.set(n.__key,e,"text")}}}function fo(e,t,n,r,o){let i=null,s=0,a=null;null!==r?(i=r.__key,Or(r)?(s=r.getTextContentSize(),a="text"):Vo(r)&&(s=r.getChildrenSize(),a="element")):null!==o&&(i=o.__key,Or(o)?a="text":Vo(o)&&(a="element")),null!==i&&null!==a?e.set(i,s,a):(s=t.getIndexWithinParent(),-1===s&&(s=n.getChildrenSize()),e.set(n.__key,s,"element"))}function po(e,t,n,r,o){"text"===e.type?e.set(n,e.offset+(t?0:o),"text"):e.offset>r.getIndexWithinParent()&&e.set(e.key,e.offset-1,"element")}function ho(e,t,n,r,o){try{e.setBaseAndExtent(t,n,r,o)}catch(e){console.warn(e)}}function go(e,t,n,r,o,i,s){const a=r.anchorNode,l=r.focusNode,c=r.anchorOffset,u=r.focusOffset,d=document.activeElement;if(o.has(lr)&&d!==i||null!==d&&wi(d))return;if(!Wr(t))return void(null!==e&&Si(n,a,l)&&r.removeAllRanges());const f=t.anchor,p=t.focus,h=f.key,g=p.key,m=gs(n,h),v=gs(n,g),b=f.offset,y=p.offset,x=t.format,_=t.style,w=t.isCollapsed();let S=m,k=v,C=!1;if("text"===f.type){S=Ri(m);const e=f.getNode();C=e.getFormat()!==x||e.getStyle()!==_}else Wr(e)&&"text"===e.anchor.type&&(C=!0);if("text"===p.type&&(k=Ri(v)),null!==S&&null!==k&&(w&&(null===e||C||Wr(e)&&(e.format!==x||e.style!==_))&&function(e,t,n,r,o){zn=[e,t,n,r,o]}(x,_,b,h,performance.now()),c!==b||u!==y||a!==S||l!==k||"Range"===r.type&&w||(null!==d&&i.contains(d)||o.has(dr)||i.focus({preventScroll:!0}),"element"===f.type))){if(ho(r,S,b,k,y),!Y||!t.isCollapsed()||null===i||o.has(dr)||null!==document.activeElement&&i.contains(document.activeElement)||i.focus({preventScroll:!0}),!o.has(cr)&&t.isCollapsed()&&null!==i&&i===document.activeElement){const e=Wr(t)&&"element"===t.anchor.type?S.childNodes[b]||null:r.rangeCount>0?r.getRangeAt(0):null;if(null!==e){let t;if(e instanceof Text){const n=document.createRange();n.selectNode(e),t=n.getBoundingClientRect()}else t=e.getBoundingClientRect();!function(e,t,n){const r=vs(n),o=ys(r);if(null===r||null===o)return;let{top:i,bottom:s}=t,a=0,l=0,c=n;for(;null!==c;){const t=c===r.body;if(t)a=0,l=xs(e).innerHeight;else{const e=c.getBoundingClientRect();a=e.top,l=e.bottom}let n=0;if(i<a?n=-(a-i):s>l&&(n=s-l),0!==n)if(t)o.scrollBy(0,n);else{const e=c.scrollTop;c.scrollTop+=n;const t=c.scrollTop-e;i-=t,s-=t}if(t)break;c=ms(c)}}(n,t,i)}}Ln=!0}}function mo(e){let t=ao()||lo();null===t&&(t=Ui().selectEnd()),t.insertNodes(e)}function vo(e){let t=e;e.isCollapsed()||t.removeText();const n=ao();Wr(n)&&(t=n),Wr(t)||W("Unexpected dirty selection to be null");const r=t.anchor;let o=r.getNode(),i=r.offset;for(;!Ps(o);){const e=o;if([o,i]=bo(o,i),e.is(o))break}return i}function bo(e,t){const n=e.getParent();if(!n){const e=ai();return Ui().append(e),e.select(),[Ui(),0]}if(Or(e)){const r=e.splitText(t);if(0===r.length)return[n,e.getIndexWithinParent()];const o=0===t?0:1;return[n,r[0].getIndexWithinParent()+o]}if(!Vo(e)||0===t)return[n,e.getIndexWithinParent()];const r=e.getChildAtIndex(t);if(r){const n=new Kr(Fr(e.__key,t,"element"),Fr(e.__key,t,"element"),0,""),o=e.insertNewAfter(n);o&&o.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}function yo(e,t,n,r,o="decorators-and-blocks"){if("move"===t&&"character"===r&&!e.isCollapsed()){const[t,r]=n===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return r.set(t.key,t.offset,t.type),!0}const i=Ca(e.focus,n?"previous":"next"),s="lineboundary"===r,a="move"===t;let l=i,c="decorators-and-blocks"===o;if(!Pa(l)){for(const e of l){c=!1;const{origin:t}=e;if(!Xo(t)||t.isIsolated()||(l=e,!s||!t.isInline()))break}if(c)for(const e of ma(i).iterNodeCarets("extend"===t?"shadowRoot":"root")){if(oa(e))e.origin.isInline()||(l=e);else{if(Vo(e.origin))continue;Xo(e.origin)&&!e.origin.isInline()&&(l=e)}break}}if(l===i)return!1;if(a&&!s&&Xo(l.origin)&&l.origin.isKeyboardSelectable()){const e=oo();return e.add(l.origin.getKey()),Yi(e),!0}return l=Oa(l),a&&Ea(e.anchor,l),Ea(e.focus,l),c||!s}let xo=null,_o=null,wo=!1,So=!1,ko=0;const Co={characterData:!0,childList:!0,subtree:!0};function Eo(){return wo||null!==xo&&xo._readOnly}function To(){wo&&W("Cannot use method in read-only mode.")}function Ao(){ko>99&&W("One or more transforms are endlessly triggering additional transforms. May have encountered infinite recursion caused by transforms that have their preconditions too lose and/or conflict with each other.")}function Lo(){return null===xo&&W(`Unable to find an active editor state. State helpers or node methods can only be used synchronously during the callback of editor.update(), editor.read(), or editorState.read().${Ro()}`),xo}function Mo(){return null===_o&&W(`Unable to find an active editor. This method can only be used synchronously during the callback of editor.update() or editor.read().${Ro()}`),_o}function Ro(){let e=0;const t=new Set,n=pi.version;if("undefined"!=typeof window)for(const r of document.querySelectorAll("[contenteditable]")){const o=Ei(r);if(ki(o))e++;else if(o){let e=String(o.constructor.version||"<0.17.1");e===n&&(e+=" (separately built, likely a bundler configuration issue)"),t.add(e)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),r}function No(){return _o}function Oo(e,t,n){const r=t.__type,o=bi(e,r);let i=n.get(r);void 0===i&&(i=Array.from(o.transforms),n.set(r,i));const s=i.length;for(let e=0;e<s&&(i[e](t),t.isAttached());e++);}function Po(e,t){return void 0!==e&&e.__key!==t&&e.isAttached()}function Io(e,t){if(!t)return;const n=e._updateTags;let r=t;Array.isArray(t)||(r=[t]);for(const e of r)n.add(e)}function zo(e){return jo(e,Mo()._nodes)}function jo(e,t){const n=e.type,r=t.get(n);void 0===r&&W(`parseEditorState: type "${n}" + not found`);const o=r.klass;e.type!==o.getType()&&W(`LexicalNode: Node ${o.name} does not implement .importJSON().`);const i=o.importJSON(e),s=e.children;if(Vo(i)&&Array.isArray(s))for(let e=0;e<s.length;e++){const n=jo(s[e],t);i.append(n)}return i}function Do(e,t,n){const r=xo,o=wo,i=_o;xo=t,wo=!0,_o=e;try{return n()}finally{xo=r,wo=o,_o=i}}function Fo(e){const t=e._nodeMap;t.set=()=>{throw new Error("Cannot call set() on a frozen Lexical node map")},t.clear=()=>{throw new Error("Cannot call clear() on a frozen Lexical node map")},t.delete=()=>{throw new Error("Cannot call delete() on a frozen Lexical node map")}}function Bo(e,t){const n=e._pendingEditorState,r=e._rootElement,o=e._headless||null===r;if(null===n)return;const i=e._editorState,s=i._selection,a=n._selection,l=0!==e._dirtyType,c=xo,u=wo,d=_o,f=e._updating,p=e._observer;let h=null;if(e._pendingEditorState=null,e._editorState=n,!o&&l&&null!==p){_o=e,xo=n,wo=!1,e._updating=!0;try{const t=e._dirtyType,r=e._dirtyElements,o=e._dirtyLeaves;p.disconnect(),h=wt(i,n,e,t,r,o)}catch(t){if(t instanceof Error&&e._onError(t),So)throw t;return ui(e,null,r,n),Me(e),e._dirtyType=2,So=!0,Bo(e,i),void(So=!1)}finally{p.observe(r,Co),e._updating=f,xo=c,wo=u,_o=d}}n._readOnly||(n._readOnly=!0,Fo(n),Wr(a)&&(Object.freeze(a.anchor),Object.freeze(a.focus)),Object.freeze(a));const g=e._dirtyLeaves,m=e._dirtyElements,v=e._normalizedNodes,b=e._updateTags,y=e._deferred;l&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set),function(e,t){const n=e._decorators;let r=e._pendingDecorators||n;const o=t._nodeMap;let i;for(i in r)o.has(i)||(r===n&&(r=Wi(e)),delete r[i])}(e,n);const x=o?null:Ts(xs(e));if(e._editable&&null!==x&&(l||null===a||a.dirty||!a.is(s))&&null!==r&&!b.has(ur)){_o=e,xo=n;try{if(null!==p&&p.disconnect(),l||null===a||a.dirty){const t=e._blockCursorElement;null!==t&&Es(t,e,r),go(s,a,e,x,b,r)}!function(e,t,n){let r=e._blockCursorElement;if(Wr(n)&&n.isCollapsed()&&"element"===n.anchor.type&&t.contains(document.activeElement)){const o=n.anchor,i=o.getNode(),s=o.offset;let a=!1,l=null;if(s===i.getChildrenSize()){Cs(i.getChildAtIndex(s-1))&&(a=!0)}else{const t=i.getChildAtIndex(s);if(null!==t&&Cs(t)){const n=t.getPreviousSibling();(null===n||Cs(n))&&(a=!0,l=e.getElementByKey(t.__key))}}if(a){const n=e.getElementByKey(i.__key);return null===r&&(e._blockCursorElement=r=function(e){const t=e.theme,n=document.createElement("div");n.contentEditable="false",n.setAttribute("data-lexical-cursor","true");let r=t.blockCursor;if(void 0!==r){if("string"==typeof r){const e=$a(r);r=t.blockCursor=e}void 0!==r&&n.classList.add(...r)}return n}(e._config)),t.style.caretColor="transparent",void(null===l?n.appendChild(r):n.insertBefore(r,l))}}null!==r&&Es(r,e,t)}(e,r,a)}finally{null!==p&&p.observe(r,Co),_o=d,xo=c}}null!==h&&function(e,t,n,r,o){const i=Array.from(e._listeners.mutation),s=i.length;for(let e=0;e<s;e++){const[s,a]=i[e];for(const e of a){const i=t.get(e);void 0!==i&&s(i,{dirtyLeaves:r,prevEditorState:o,updateTags:n})}}}(e,h,b,g,i),Wr(a)||null===a||null!==s&&s.is(a)||e.dispatchCommand(Ct,void 0);const _=e._pendingDecorators;null!==_&&(e._decorators=_,e._pendingDecorators=null,$o("decorator",e,!0,_)),function(e,t,n){const r=Ki(t),o=Ki(n);r!==o&&$o("textcontent",e,!0,o)}(e,t||i,n),$o("update",e,!0,{dirtyElements:m,dirtyLeaves:g,editorState:n,mutatedNodes:h,normalizedNodes:v,prevEditorState:t||i,tags:b}),function(e,t){if(e._deferred=[],0!==t.length){const n=e._updating;e._updating=!0;try{for(let e=0;e<t.length;e++)t[e]()}finally{e._updating=n}}}(e,y),function(e){const t=e._updates;if(0!==t.length){const n=t.shift();if(n){const[t,r]=n;Wo(e,t,r)}}}(e)}function $o(e,t,n,...r){const o=t._updating;t._updating=n;try{const n=Array.from(t._listeners[e]);for(let e=0;e<n.length;e++)n[e].apply(null,r)}finally{t._updating=o}}function Ho(e,t){const n=e._updates;let r=t||!1;for(;0!==n.length;){const t=n.shift();if(t){const[n,o]=t,i=e._pendingEditorState;let s;void 0!==o&&(s=o.onUpdate,o.skipTransforms&&(r=!0),o.discrete&&(null===i&&W("Unexpected empty pending editor state on discrete nested update"),i._flushSync=!0),s&&e._deferred.push(s),Io(e,o.tag)),null==i?Wo(e,n,o):n()}}return r}function Wo(e,t,n){const r=e._updateTags;let o,i=!1,s=!1;void 0!==n&&(o=n.onUpdate,Io(e,n.tag),i=n.skipTransforms||!1,s=n.discrete||!1),o&&e._deferred.push(o);const a=e._editorState;let l=e._pendingEditorState,c=!1;(null===l||l._readOnly)&&(l=e._pendingEditorState=ei(l||a),c=!0),l._flushSync=s;const u=xo,d=wo,f=_o,p=e._updating;xo=l,wo=!1,e._updating=!0,_o=e;const h=e._headless||null===e.getRootElement();gi(null);try{c&&(h?null!==a._selection&&(l._selection=a._selection.clone()):l._selection=function(e,t){const n=e.getEditorState()._selection,r=Ts(xs(e));return Wr(n)||null==n?io(n,r,e,t):n.clone()}(e,n&&n.event||null));const r=e._compositionKey;t(),i=Ho(e,i),function(e,t){const n=t.getEditorState()._selection,r=e._selection;if(Wr(r)){const e=r.anchor,t=r.focus;let o;if("text"===e.type&&(o=e.getNode(),o.selectionTransform(n,r)),"text"===t.type){const e=t.getNode();o!==e&&e.selectionTransform(n,r)}}}(l,e),0!==e._dirtyType&&(i?function(e,t){const n=t._dirtyLeaves,r=e._nodeMap;for(const e of n){const t=r.get(e);Or(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&$e(t)}}(l,e):function(e,t){const n=t._dirtyLeaves,r=t._dirtyElements,o=e._nodeMap,i=Di(),s=new Map;let a=n,l=a.size,c=r,u=c.size;for(;l>0||u>0;){if(l>0){t._dirtyLeaves=new Set;for(const e of a){const r=o.get(e);Or(r)&&r.isAttached()&&r.isSimpleText()&&!r.isUnmergeable()&&$e(r),void 0!==r&&Po(r,i)&&Oo(t,r,s),n.add(e)}if(a=t._dirtyLeaves,l=a.size,l>0){ko++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map,c.delete("root")&&c.set("root",!0);for(const e of c){const n=e[0],a=e[1];if(r.set(n,a),!a)continue;const l=o.get(n);void 0!==l&&Po(l,i)&&Oo(t,l,s)}a=t._dirtyLeaves,l=a.size,c=t._dirtyElements,u=c.size,ko++}t._dirtyLeaves=n,t._dirtyElements=r}(l,e),Ho(e),function(e,t,n,r){const o=e._nodeMap,i=t._nodeMap,s=[];for(const[e]of r){const t=i.get(e);void 0!==t&&(t.isAttached()||(Vo(t)&&xe(t,e,o,i,s,r),o.has(e)||r.delete(e),s.push(e)))}for(const e of s)i.delete(e);for(const e of n){const t=i.get(e);void 0===t||t.isAttached()||(o.has(e)||n.delete(e),i.delete(e))}}(a,l,e._dirtyLeaves,e._dirtyElements));r!==e._compositionKey&&(l._flushSync=!0);const o=l._selection;if(Wr(o)){const e=l._nodeMap,t=o.anchor.key,n=o.focus.key;void 0!==e.get(t)&&void 0!==e.get(n)||W("updateEditor: selection has been lost because the previously selected nodes have been removed and selection wasn't moved to another node. Ensure selection changes after removing/replacing a selected node.")}else Ur(o)&&0===o._nodes.size&&(l._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=a,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void Bo(e)}finally{xo=u,wo=d,_o=f,e._updating=p,ko=0}const g=0!==e._dirtyType||e._deferred.length>0||function(e,t){const n=t.getEditorState()._selection,r=e._selection;if(null!==r){if(r.dirty||!r.is(n))return!0}else if(null!==n)return!0;return!1}(l,e);g?l._flushSync?(l._flushSync=!1,Bo(e)):c&&xi(()=>{Bo(e)}):(l._flushSync=!1,c&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function Ko(e,t,n){_o===e&&void 0===n?t():Wo(e,t,n)}class Uo{element;before;after;constructor(e,t,n){this.element=e,this.before=t||null,this.after=n||null}withBefore(e){return new Uo(this.element,e,this.after)}withAfter(e){return new Uo(this.element,this.before,e)}withElement(e){return this.element===e?this:new Uo(e,this.before,this.after)}insertChild(e){const t=this.before||this.getManagedLineBreak();return null!==t&&t.parentElement!==this.element&&W("ElementDOMSlot.insertChild: before is not in element"),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&W("ElementDOMSlot.removeChild: dom is not in element"),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&W("ElementDOMSlot.replaceChild: prevDom is not in element"),this.element.replaceChild(e,t),this}getFirstChild(){const e=this.after?this.after.nextSibling:this.element.firstChild;return e===this.before||e===this.getManagedLineBreak()?null:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(null===e)this.removeManagedLineBreak();else{const t="decorator"===e&&(ee||q||J);this.insertManagedLineBreak(t)}}removeManagedLineBreak(){const e=this.getManagedLineBreak();if(e){const t=this.element,n="IMG"===e.nodeName?e.nextSibling:null;n&&t.removeChild(n),t.removeChild(e),t.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){const t=this.getManagedLineBreak();if(t){if(e===("IMG"===t.nodeName))return;this.removeManagedLineBreak()}const n=this.element,r=this.before,o=document.createElement("br");if(n.insertBefore(o,r),e){const e=document.createElement("img");e.setAttribute("data-lexical-linebreak","true"),e.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",e.alt="",n.insertBefore(e,o),n.__lexicalLineBreak=e}else n.__lexicalLineBreak=o}getFirstChildOffset(){let e=0;for(let t=this.after;null!==t;t=t.previousSibling)e++;return e}resolveChildIndex(e,t,n,r){if(n===this.element){const t=this.getFirstChildOffset();return[e,Math.min(t+e.getChildrenSize(),Math.max(t,r))]}const o=Go(t,n);o.push(r);const i=Go(t,this.element);let s=e.getIndexWithinParent();for(let e=0;e<i.length;e++){const t=o[e],n=i[e];if(void 0===t||t<n)break;if(t>n){s+=1;break}}return[e.getParentOrThrow(),s]}}function Go(e,t){const n=[];let r=t;for(;r!==e&&null!==r;r=r.parentNode){let e=0;for(let t=r.previousSibling;null!==t;t=t.previousSibling)e++;n.push(e)}return r!==e&&W("indexPath: root is not a parent of child"),n.reverse()}class Yo extends ir{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const e=this.getFormat();return me[e]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const e=[];let t=this.getFirstChild();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){const e=[];let 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(){const e=Mo()._dirtyElements;return null!==e&&e.has(this.__key)}isLastChild(){const e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return null!==t&&t.is(e)}getAllTextNodes(){const e=[];let t=this.getFirstChild();for(;null!==t;){if(Or(t)&&e.push(t),Vo(t)){const n=t.getAllTextNodes();e.push(...n)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;Vo(e);){const t=e.getFirstChild();if(null===t)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;Vo(e);){const t=e.getLastChild();if(null===t)break;e=t}return e}getDescendantByIndex(e){const t=this.getChildren(),n=t.length;if(e>=n){const e=t[n-1];return Vo(e)&&e.getLastDescendant()||e||null}const r=t[e];return Vo(r)&&r.getFirstDescendant()||r||null}getFirstChild(){const e=this.getLatest().__first;return null===e?null:Fi(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return null===e&&W(`Expected node ${this.__key} to have a first child.`),e}getLastChild(){const e=this.getLatest().__last;return null===e?null:Fi(e)}getLastChildOrThrow(){const e=this.getLastChild();return null===e&&W(`Expected node ${this.__key} to have a last child.`),e}getChildAtIndex(e){const t=this.getChildrenSize();let n,r;if(e<t/2){for(n=this.getFirstChild(),r=0;null!==n&&r<=e;){if(r===e)return n;n=n.getNextSibling(),r++}return null}for(n=this.getLastChild(),r=t-1;null!==n&&r>=e;){if(r===e)return n;n=n.getPreviousSibling(),r--}return null}getTextContent(){let e="";const t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){const o=t[r];e+=o.getTextContent(),Vo(o)&&r!==n-1&&!o.isInline()&&(e+=de)}return e}getTextContentSize(){let e=0;const t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){const o=t[r];e+=o.getTextContentSize(),Vo(o)&&r!==n-1&&!o.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(""!==e){const t=ge[e];return 0!==(this.getFormat()&t)}return!1}hasTextFormat(e){const t=pe[e];return 0!==(this.getTextFormat()&t)}getFormatFlags(e,t){return Ni(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){To();const n=ao();let r=e,o=t;const i=this.getChildrenSize();if(!this.canBeEmpty())if(0===e&&0===t){const e=this.getFirstChild();if(Or(e)||Vo(e))return e.select(0,0)}else if(!(void 0!==e&&e!==i||void 0!==t&&t!==i)){const e=this.getLastChild();if(Or(e)||Vo(e))return e.select()}void 0===r&&(r=i),void 0===o&&(o=i);const s=this.__key;return Wr(n)?(n.anchor.set(s,r,"element"),n.focus.set(s,o,"element"),n.dirty=!0,n):no(s,r,s,o,"element","element")}selectStart(){const e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){const e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){const e=this.getWritable();return this.getChildren().forEach(e=>e.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){const t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=""!==e?ge[e]:0,this}setStyle(e){return this.getWritable().__style=e||"",this}setTextFormat(e){const t=this.getWritable();return t.__textFormat=e,t}setTextStyle(e){const t=this.getWritable();return t.__textStyle=e,t}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,n){or(this)&&W(`ElementNode.splice: Ephemeral nodes can not mutate their children (key ${this.__key} type ${this.__type})`);const r=this.getChildrenSize(),o=this.getWritable();e+t<=r||W(`ElementNode.splice: start + deleteCount > oldSize (${String(e)} + ${String(t)} > ${String(r)})`);const i=o.__key,s=[],a=[],l=this.getChildAtIndex(e+t);let c=null,u=r-t+n.length;if(0!==e)if(e===r)c=this.getLastChild();else{const t=this.getChildAtIndex(e);null!==t&&(c=t.getPreviousSibling())}if(t>0){let e=null===c?this.getFirstChild():c.getNextSibling();for(let n=0;n<t;n++){null===e&&W("splice: sibling not found");const t=e.getNextSibling(),n=e.__key;Ii(e.getWritable()),a.push(n),e=t}}let d=c;for(const e of n){null!==d&&e.is(d)&&(c=d=d.getPreviousSibling());const t=e.getWritable();t.__parent===i&&u--,Ii(t);const n=e.__key;if(null===d)o.__first=n,t.__prev=null;else{const e=d.getWritable();e.__next=n,t.__prev=e.__key}e.__key===i&&W("append: attempting to append self"),t.__parent=i,s.push(n),d=e}if(e+t===r){if(null!==d){d.getWritable().__next=null,o.__last=d.__key}}else if(null!==l){const e=l.getWritable();if(null!==d){const t=d.getWritable();e.__prev=d.__key,t.__next=l.__key}else e.__prev=null}if(o.__size=u,a.length){const e=ao();if(Wr(e)){const t=new Set(a),n=new Set(s),{anchor:r,focus:o}=e;Jo(r,t,n)&&fo(r,r.getNode(),this,c,l),Jo(o,t,n)&&fo(o,o.getNode(),this,c,l),0!==u||this.canBeEmpty()||_s(this)||this.remove()}}return o}getDOMSlot(e){return new Uo(e)}exportDOM(e){const{element:t}=super.exportDOM(e);if(Ls(t)){const e=this.getIndent();e>0&&(t.style.paddingInlineStart=40*e+"px");const n=this.getDirection();n&&(t.dir=n)}return{element:t}}exportJSON(){const e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},t=this.getTextFormat(),n=this.getTextStyle();return 0===t&&""===n||_s(this)||this.getChildren().some(Or)||(0!==t&&(e.textFormat=t),""!==n&&(e.textStyle=n)),e}updateFromJSON(e){return super.updateFromJSON(e).setFormat(e.format).setIndent(e.indent).setDirection(e.direction).setTextFormat(e.textFormat||0).setTextStyle(e.textStyle||"")}insertNewAfter(e,t){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,t,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,t){const n=this.getDOMSlot(e);let r=n.getFirstChild();for(let e=this.getFirstChild();e;e=e.getNextSibling()){const o=t.getElementByKey(e.getKey());null!==o&&(null==r?(n.insertChild(o),r=o):r!==o&&n.replaceChild(o,r),r=r.nextSibling)}}}function Vo(e){return e instanceof Yo}function Jo(e,t,n){let r=e.getNode();for(;r;){const e=r.__key;if(t.has(e)&&!n.has(e))return!0;r=r.getParent()}return!1}class qo extends ir{decorate(e,t){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Xo(e){return e instanceof qo}class Qo extends Yo{__cachedText;static getType(){return"root"}static clone(){return new Qo}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){W("getTopLevelElementOrThrow: root nodes are not top level elements")}getTextContent(){const e=this.__cachedText;return!Eo()&&0!==Mo()._dirtyType||null===e?super.getTextContent():e}remove(){W("remove: cannot be called on root nodes")}replace(e){W("replace: cannot be called on root nodes")}insertBefore(e){W("insertBefore: cannot be called on root nodes")}insertAfter(e){W("insertAfter: cannot be called on root nodes")}updateDOM(e,t){return!1}splice(e,t,n){for(const e of n)Vo(e)||Xo(e)||W("rootNode.splice: Only element or decorator nodes can be inserted to the root node");return super.splice(e,t,n)}static importJSON(e){return Ui().updateFromJSON(e)}collapseAtStart(){return!0}}function Zo(e){return e instanceof Qo}function ei(e){return new ri(new Map(e._nodeMap))}function ti(){return new ri(new Map([["root",new Qo]]))}function ni(e){const t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&W(`LexicalNode: Node ${n.name} does not match the serialized type. Check if .exportJSON() is implemented and it is returning the correct type.`),Vo(e)){const r=t.children;Array.isArray(r)||W(`LexicalNode: Node ${n.name} is an element but .exportJSON() does not have a children array.`);const o=e.getChildren();for(let e=0;e<o.length;e++){const t=ni(o[e]);r.push(t)}}return t}class ri{_nodeMap;_selection;_flushSync;_readOnly;constructor(e,t){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(e,t){return Do(t&&t.editor||null,this,e)}clone(e){const t=new ri(this._nodeMap,void 0===e?this._selection:e);return t._readOnly=!0,t}toJSON(){return Do(null,this,()=>({root:ni(Ui())}))}}class oi extends Yo{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class ii extends Yo{static getType(){return"paragraph"}static clone(e){return new ii(e.__key)}createDOM(e){const t=document.createElement("p"),n=ls(e.theme,"paragraph");if(void 0!==n){t.classList.add(...n)}return t}updateDOM(e,t,n){return!1}static importDOM(){return{p:e=>({conversion:si,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(Ls(t)){this.isEmpty()&&t.append(document.createElement("br"));const e=this.getFormatType();e&&(t.style.textAlign=e)}return{element:t}}static importJSON(e){return ai().updateFromJSON(e)}exportJSON(){const e=super.exportJSON();if(void 0===e.textFormat||void 0===e.textStyle){const t=this.getChildren().find(Or);t?(e.textFormat=t.getFormat(),e.textStyle=t.getStyle()):(e.textFormat=this.getTextFormat(),e.textStyle=this.getTextStyle())}return e}insertNewAfter(e,t){const n=ai();n.setTextFormat(e.format),n.setTextStyle(e.style);const r=this.getDirection();return n.setDirection(r),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,t),n}collapseAtStart(){const e=this.getChildren();if(0===e.length||Or(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 si(e){const t=ai();return e.style&&(t.setFormat(e.style.textAlign),$s(e,t)),{node:t}}function ai(){return Ss(new ii)}function li(e){return e instanceof ii}const ci=0;function ui(e,t,n,r){const o=e._keyToDOMMap;o.clear(),e._editorState=ti(),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;const i=e._observer;null!==i&&(i.disconnect(),e._observer=null),null!==t&&(t.textContent=""),null!==n&&(n.textContent="",o.set("root",n))}function di(e){const t=new Set,n=new Set;let r=e;for(;r;){const{ownNodeConfig:e}=Gs(r),o=r.transform;if(!n.has(o)){n.add(o);const e=r.transform();e&&t.add(e)}if(e){const n=e.$transform;n&&t.add(n),r=e.extends}else{const e=Object.getPrototypeOf(r);r=e.prototype instanceof ir&&e!==ir?e:void 0}}return t}function fi(e){const t=e||{},n=No(),r=t.theme||{},o=void 0===e?n:t.parentEditor||null,i=t.disableEvents||!1,s=ti(),a=t.namespace||(null!==o?o._config.namespace:Xi()),l=t.editorState,c=[Qo,Sr,fr,Ir,ii,oi,...t.nodes||[]],{onError:u,html:d}=t,f=void 0===t.editable||t.editable;let p;if(void 0===e&&null!==n)p=n._nodes;else{p=new Map;for(let e=0;e<c.length;e++){let t=c[e],n=null,r=null;if("function"!=typeof t){const e=t;t=e.replace,n=e.with,r=e.withKlass||null}Gs(t);{const e=t.name,o=Ks(t,"getType")&&t.getType();r?r.prototype instanceof t||W(`${r.name} doesn't extend the ${e}`):n&&console.warn(`Override for ${e} specifies 'replace' without 'withKlass'. 'withKlass' will be required in a future version.`),"RootNode"!==e&&"root"!==o&&"artificial"!==o&&t!==ir&&(["getType","clone"].forEach(n=>{Ks(t,n)||console.warn(`${e} must implement static "${n}" method`)}),!Ks(t,"importDOM")&&Us(t)&&console.warn(`${e} should implement "importDOM" if using a custom "exportDOM" method to ensure HTML serialization (important for copy & paste) works as expected`),Ks(t,"importJSON")||console.warn(`${e} should implement "importJSON" method to ensure JSON and default HTML serialization works as expected`))}const o=t.getType(),i=di(t);p.set(o,{exportDOM:d&&d.export?d.export.get(t):void 0,klass:t,replace:n,replaceWithKlass:r,sharedNodeState:Re(c[e]),transforms:i})}}const h=new pi(s,o,p,{disableEvents:i,namespace:a,theme:r},u||console.error,function(e,t){const n=new Map,r=new Set,o=e=>{Object.keys(e).forEach(t=>{let r=n.get(t);void 0===r&&(r=[],n.set(t,r)),r.push(e[t])})};return e.forEach(e=>{const t=e.klass.importDOM;if(null==t||r.has(t))return;r.add(t);const n=t.call(e.klass);null!==n&&o(n)}),t&&o(t),n}(p,d?d.import:void 0),f,e);return void 0!==l&&(h._pendingEditorState=l,h._dirtyType=2),function(e){e.registerCommand(At,Wn,ci),e.registerCommand(Lt,Kn,ci),e.registerCommand(Mt,Un,ci),e.registerCommand(Rt,Gn,ci),e.registerCommand(Wt,Vn,ci)}(h),h}class pi{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_htmlConversions;_window;_editable;_blockCursorElement;_createEditorArgs;constructor(e,t,n,r,o,i,s,a){this._createEditorArgs=a,this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new 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=Xi(),this._onError=o,this._htmlConversions=i,this._editable=s,this._headless=null!==t&&t._headless,this._window=null,this._blockCursorElement=null}isComposing(){return null!=this._compositionKey}registerUpdateListener(e){const t=this._listeners.update;return t.add(e),()=>{t.delete(e)}}registerEditableListener(e){const t=this._listeners.editable;return t.add(e),()=>{t.delete(e)}}registerDecoratorListener(e){const t=this._listeners.decorator;return t.add(e),()=>{t.delete(e)}}registerTextContentListener(e){const t=this._listeners.textcontent;return t.add(e),()=>{t.delete(e)}}registerRootListener(e){const 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&&W('Listener for type "command" requires a "priority".');const r=this._commands;r.has(e)||r.set(e,[new Set,new Set,new Set,new Set,new Set]);const o=r.get(e);void 0===o&&W(`registerCommand: Command ${String(e)} not found in command map`);const i=o[n];return i.add(t),()=>{i.delete(t),o.every(e=>0===e.size)&&r.delete(e)}}registerMutationListener(e,t,n){const r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,o=this._listeners.mutation;let i=o.get(t);void 0===i&&(i=new Set,o.set(t,i)),i.add(r);const s=n&&n.skipInitialization;return void 0!==s&&s||this.initializeMutationListener(t,r),()=>{i.delete(r),0===i.size&&o.delete(t)}}getRegisteredNode(e){const t=this._nodes.get(e.getType());return void 0===t&&W(`Node ${e.name} has not been registered. Ensure node has been passed to createEditor.`),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){const n=this._editorState,r=Ds(n).get(t.getType());if(!r)return;const o=new Map;for(const e of r.keys())o.set(e,"created");o.size>0&&e(o,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,t){const n=this.getRegisteredNode(e);return n.transforms.add(t),n}registerNodeTransform(e,t){const n=this.registerNodeTransformToKlass(e,t),r=[n],o=n.replaceWithKlass;if(null!=o){const e=this.registerNodeTransformToKlass(o,t);r.push(e)}return function(e,t){const n=Ds(e.getEditorState()),r=[];for(const e of t){const t=n.get(e);t&&r.push(t)}if(0===r.length)return;e.update(()=>{for(const e of r)for(const t of e.keys()){const e=Fi(t);e&&e.markDirty()}},null===e._pendingEditorState?{tag:ar}:void 0)}(this,r.map(e=>e.klass.getType())),()=>{r.forEach(e=>e.transforms.delete(t))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return hs(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const t=this._rootElement;if(e!==t){const n=ls(this._config.theme,"root"),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,ui(this,t,e,r),null!==t&&(this._config.disableEvents||tr(t),null!=n&&t.classList.remove(...n)),null!==e){const t=ys(e),r=e.style;r.userSelect="text",r.whiteSpace="pre-wrap",r.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=t,this._dirtyType=2,Me(this),this._updateTags.add(ar),Bo(this),this._config.disableEvents||function(e,t){const n=e.ownerDocument;Tn.set(e,n);const r=An.get(n)??0;r<1&&n.addEventListener("selectionchange",Xn),An.set(n,r+1),e.__lexicalEditor=t;const o=Jn(e);for(let n=0;n<wn.length;n++){const[r,i]=wn[n],s="function"==typeof i?e=>{Zn(e)||(Qn(e),(t.isEditable()||"click"===r)&&i(e,t))}:e=>{if(Zn(e))return;Qn(e);const n=t.isEditable();switch(r){case"cut":return n&&hs(t,fn,e);case"copy":return hs(t,dn,e);case"paste":return n&&hs(t,zt,e);case"dragstart":return n&&hs(t,ln,e);case"dragover":return n&&hs(t,cn,e);case"dragend":return n&&hs(t,un,e);case"focus":return n&&hs(t,bn,e);case"blur":return n&&hs(t,yn,e);case"drop":return n&&hs(t,sn,e)}};e.addEventListener(r,s),o.push(()=>{e.removeEventListener(r,s)})}}(e,this),null!=n&&e.classList.add(...n);{const t=e.parentElement;null!=t&&["flex","inline-flex"].includes(getComputedStyle(t).display)&&console.warn('When using "display: flex" or "display: inline-flex" on an element containing content editable, Chrome may have unwanted focusing behavior when clicking outside of it. Consider wrapping the content editable within a non-flex element.')}}else this._window=null,this._updateTags.add(ar),Bo(this);$o("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&W("setEditorState: the editor state is empty. Ensure the editor state's root node never becomes empty.");let n=e;n._readOnly&&(n=ei(e),n._selection=e._selection?e._selection.clone():null),Le(this);const r=this._pendingEditorState,o=this._updateTags,i=void 0!==t?t.tag:null;null===r||r.isEmpty()||(null!=i&&o.add(i),Bo(this)),this._pendingEditorState=n,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,null!=i&&o.add(i),this._updating||Bo(this)}parseEditorState(e,t){return function(e,t,n){const r=ti(),o=xo,i=wo,s=_o,a=t._dirtyElements,l=t._dirtyLeaves,c=t._cloneNotNeeded,u=t._dirtyType;t._dirtyElements=new Map,t._dirtyLeaves=new Set,t._cloneNotNeeded=new Set,t._dirtyType=0,xo=r,wo=!1,_o=t,gi(null);try{const o=t._nodes;jo(e.root,o),n&&n(),r._readOnly=!0,Fo(r)}catch(e){e instanceof Error&&t._onError(e)}finally{t._dirtyElements=a,t._dirtyLeaves=l,t._cloneNotNeeded=c,t._dirtyType=u,xo=o,wo=i,_o=s}return r}("string"==typeof e?JSON.parse(e):e,this,t)}read(e){return Bo(this),this.getEditorState().read(e,{editor:this})}update(e,t){!function(e,t,n){e._updating?e._updates.push([t,n]):Wo(e,t,n)}(this,e,t)}focus(e,t={}){const n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),Ko(this,()=>{const r=ao(),o=Ui();null!==r?r.dirty||Yi(r.clone()):0!==o.getChildrenSize()&&("rootStart"===t.defaultSelection?o.selectStart():o.selectEnd()),function(e){To();Mo()._updateTags.add(e)}("focus"),function(e){To();Mo()._deferred.push(e)}(()=>{n.removeAttribute("autocapitalize"),e&&e()})}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;null!==e&&e.blur();const t=Ts(this._window);null!==t&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,$o("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}pi.version="0.40.0+dev.esm";let hi=null;function gi(e){hi=e}let mi=1;function bi(e,t){const n=yi(e,t);return void 0===n&&W(`registeredNode: Type ${t} not found`),n}function yi(e,t){return e._nodes.get(t)}const xi="function"==typeof queueMicrotask?queueMicrotask:e=>{Promise.resolve().then(e)};function _i(e){return Xo(Hi(e))}function wi(e){const t=document.activeElement;if(!Ls(t))return!1;const n=t.nodeName;return Xo(Hi(e))&&("INPUT"===n||"TEXTAREA"===n||"true"===t.contentEditable&&null==Ei(t))}function Si(e,t,n){const r=e.getRootElement();try{return null!==r&&r.contains(t)&&r.contains(n)&&null!==t&&!wi(t)&&Ci(t)===e}catch(e){return!1}}function ki(e){return e instanceof pi}function Ci(e){let t=e;for(;null!=t;){const e=Ei(t);if(ki(e))return e;t=ms(t)}return null}function Ei(e){return e?e.__lexicalEditor:null}function Ti(e){return jr(e)||e.isToken()}function Ai(e){return Ti(e)||e.isSegmented()}function Li(e){return Ms(e)&&3===e.nodeType}function Mi(e){return Ms(e)&&9===e.nodeType}function Ri(e){let t=e;for(;null!=t;){if(Li(t))return t;t=t.firstChild}return null}function Ni(e,t,n){const r=pe[t];if(null!==n&&(e&r)===(n&r))return e;let o=e^r;return"subscript"===t?o&=-65:"superscript"===t?o&=-33:"lowercase"===t?(o&=-513,o&=-1025):"uppercase"===t?(o&=-257,o&=-1025):"capitalize"===t&&(o&=-257,o&=-513),o}function Oi(e){return Or(e)||gr(e)||Xo(e)}function Pi(e,t){const n=function(){const e=hi;return hi=null,e}();if(null!=(t=t||n&&n.__key))return function(e,t,n){const r=xo;if(!r)return;const o=r._nodeMap.get(t);n&&t!==n.__key&&W(`Lexical node with constructor ${e.constructor.name} (type ${e.getType()}) has an incorrect clone implementation, got ${String(t)} for nodeKey when expecting ${n.__key}`);o&&o.constructor!==e.constructor&&(e.constructor.name!==o.constructor.name?W(`Lexical node with constructor ${e.constructor.name} attempted to re-use key from node in active editor state with constructor ${o.constructor.name}. Keys must not be re-used when the type is changed.`):W(`Lexical node with constructor ${e.constructor.name} attempted to re-use key from node in active editor state with different constructor with the same name (possibly due to invalid Hot Module Replacement). Keys must not be re-used when the type is changed.`))}(e,t,n),void(e.__key=t);To(),Ao();const r=Mo(),o=Lo(),i=""+mi++;o._nodeMap.set(i,e),Vo(e)?r._dirtyElements.set(i,!0):r._dirtyLeaves.add(i),r._cloneNotNeeded.add(i),r._dirtyType=1,e.__key=i}function Ii(e){const t=e.getParent();if(null!==t){const n=e.getWritable(),r=t.getWritable(),o=e.getPreviousSibling(),i=e.getNextSibling(),s=null!==i?i.__key:null,a=null!==o?o.__key:null,l=null!==o?o.getWritable():null,c=null!==i?i.getWritable():null;null===o&&(r.__first=s),null===i&&(r.__last=a),null!==l&&(l.__next=s),null!==c&&(c.__prev=a),n.__prev=null,n.__next=null,n.__parent=null,r.__size--}}function zi(e){Ao(),or(e)&&W(`internalMarkNodeAsDirty: Ephemeral nodes must not be marked as dirty (key ${e.__key} type ${e.__type})`);const t=e.getLatest(),n=t.__parent,r=Lo(),o=Mo(),i=r._nodeMap,s=o._dirtyElements;null!==n&&function(e,t,n){let r=e;for(;null!==r;){if(n.has(r))return;const e=t.get(r);if(void 0===e)break;n.set(r,!1),r=e.__parent}}(n,i,s);const a=t.__key;o._dirtyType=1,Vo(e)?s.set(a,!0):o._dirtyLeaves.add(a)}function ji(e){To();const t=Mo(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,null!==n){const e=Fi(n);null!==e&&e.getWritable()}if(null!==e){const t=Fi(e);null!==t&&t.getWritable()}}}function Di(){if(Eo())return null;return Mo()._compositionKey}function Fi(e,t){const n=(t||Lo())._nodeMap.get(e);return void 0===n?null:n}function Bi(e,t){const n=$i(e,Mo());return void 0!==n?Fi(n,t):null}function $i(e,t){return e[`__lexicalKey_${t._key}`]}function Hi(e,t){let n=e;for(;null!=n;){const e=Bi(n,t);if(null!==e)return e;n=ms(n)}return null}function Wi(e){const t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function Ki(e){return e.read(()=>Ui().getTextContent())}function Ui(){return Gi(Lo())}function Gi(e){return e._nodeMap.get("root")}function Yi(e){To();const t=Lo();null!==e&&(Object.isFrozen(e)&&W("$setSelection called on frozen selection object. Ensure selection is cloned before passing in."),e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function Vi(e){const t=Mo(),n=function(e,t){let n=e;for(;null!=n;){const e=$i(n,t);if(void 0!==e)return e;n=ms(n)}return null}(e,t);if(null===n){return e===t.getRootElement()?Fi("root"):null}return Fi(n)}function Ji(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function qi(e){const t=[];let n=e;for(;null!==n;)t.push(n),n=n._parentEditor;return t}function Xi(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function Qi(e){return Li(e)?e.nodeValue:null}function Zi(e,t,n){const r=Ts(xs(t));if(null===r)return;const o=r.anchorNode;let{anchorOffset:i,focusOffset:s}=r;if(null!==o){let t=Qi(o);const r=Hi(o);if(null!==t&&Or(r)){if(t===ue&&n){const e=n.length;t=n,i=e,s=e}null!==t&&es(r,t,i,s,e)}}}function es(e,t,n,r,o){let i=e;if(i.isAttached()&&(o||!i.isDirty())){const s=i.isComposing();let a=t;(s||o)&&t[t.length-1]===ue&&(a=t.slice(0,-1));const l=i.getTextContent();if(o||a!==l){if(""===a){if(ji(null),J||q||ee)i.remove();else{const e=Mo();setTimeout(()=>{e.update(()=>{i.isAttached()&&i.remove()})},20)}return}const t=i.getParent(),o=lo(),l=i.getTextContentSize(),c=Di(),u=i.getKey();if(i.isToken()||null!==c&&u===c&&!s||Wr(o)&&(null!==t&&!t.canInsertTextBefore()&&0===o.anchor.offset||o.anchor.key===e.__key&&0===o.anchor.offset&&!i.canInsertTextBefore()&&!s||o.focus.key===e.__key&&o.focus.offset===l&&!i.canInsertTextAfter()&&!s))return void i.markDirty();const d=ao();if(!Wr(d)||null===n||null===r)return void ts(i,a,d);if(d.setTextNodeRange(i,n,i,r),i.isSegmented()){const e=Nr(i.getTextContent());i.replace(e),i=e}ts(i,a,d)}}}function ts(e,t,n){if(e.setTextContent(t),Wr(n)){const t=e.getKey();for(const r of["anchor","focus"]){const o=n[r];"text"===o.type&&o.key===t&&(o.offset=ua(e,o.offset,"clamp"))}}}function ns(e,t,n){const r=t[n]||!1;return"any"===r||r===e[n]}function rs(e,t,n){return function(e,t){return ns(e,t,"altKey")&&ns(e,t,"ctrlKey")&&ns(e,t,"shiftKey")&&ns(e,t,"metaKey")}(e,n)&&e.key.toLowerCase()===t.toLowerCase()}const os={ctrlKey:!G,metaKey:G},is={altKey:G,ctrlKey:!G};function ss(e){return"Backspace"===e.key}function as(e){return rs(e,"a",os)}function ls(e,t){void 0===e.__lexicalClassNameCache&&(e.__lexicalClassNameCache={});const n=e.__lexicalClassNameCache,r=n[t];if(void 0!==r)return r;const o=e[t];if("string"==typeof o){const e=$a(o);return n[t]=e,e}return o}function cs(e,t,n,r,o){if(0===n.size)return;const i=r.__type,s=r.__key,a=t.get(i);void 0===a&&W(`Type ${i} not in registeredNodes`);const l=a.klass;let c=e.get(l);void 0===c&&(c=new Map,e.set(l,c));const u=c.get(s),d="destroyed"===u&&"created"===o;(void 0===u||d)&&c.set(s,d?"updated":o)}function us(e){const t=e.getType(),n=Lo();if(n._readOnly){const e=Ds(n).get(t);return e?Array.from(e.values()):[]}const r=n._nodeMap,o=[];for(const[,n]of r)n instanceof e&&n.__type===t&&n.isAttached()&&o.push(n);return o}function ds(e,t,n){const r=e.getParent();let o=n,i=e;return null!==r&&(t&&0===n?(o=i.getIndexWithinParent(),i=r):t||n!==i.getChildrenSize()||(o=i.getIndexWithinParent()+1,i=r)),i.getChildAtIndex(t?o-1:o)}function fs(e,t){const n=e.offset;if("element"===e.type){return ds(e.getNode(),t,n)}{const r=e.getNode();if(t&&0===n||!t&&n===r.getTextContentSize()){const e=t?r.getPreviousSibling():r.getNextSibling();return null===e?ds(r.getParentOrThrow(),t,r.getIndexWithinParent()+(t?0:1)):e}}return null}function ps(e){const t=xs(e).event,n=t&&t.inputType;return"insertFromPaste"===n||"insertFromPasteAsQuotation"===n}function hs(e,t,n){return function(e,t,n){const r=qi(e);for(let o=4;o>=0;o--)for(let i=0;i<r.length;i++){const s=r[i],a=s._commands.get(t);if(void 0!==a){const t=a[o];if(void 0!==t){const r=Array.from(t),o=r.length;let i=!1;if(Ko(s,()=>{for(let t=0;t<o;t++)if(r[t](n,e))return void(i=!0)}),i)return i}}}return!1}(e,t,n)}function gs(e,t){const n=e._keyToDOMMap.get(t);return void 0===n&&W(`Reconciliation: could not find DOM element for node key ${t}`),n}function ms(e){const t=e.assignedSlot||e.parentElement;return Rs(t)?t.host:t}function vs(e){return Mi(e)?e:Ls(e)?e.ownerDocument:null}function bs(e,t){let n=e.getParent();for(;null!==n;){if(n.is(t))return!0;n=n.getParent()}return!1}function ys(e){const t=vs(e);return t?t.defaultView:null}function xs(e){const t=e._window;return null===t&&W("window object not found"),t}function _s(e){return Zo(e)||Vo(e)&&e.isShadowRoot()}function ws(e){const t=e.constructor.clone(e);return Pi(t,null),t.afterCloneFrom(e),t}function Ss(e){const t=Mo(),n=e.getType(),r=yi(t,n);void 0===r&&W(`$applyNodeReplacement node ${e.constructor.name} with type ${n} must be registered to the editor. You can do this by passing the node class via the "nodes" array in the editor config.`);const{replace:o,replaceWithKlass:i}=r;if(null!==o){const t=o(e),r=t.constructor;return null!==i?t instanceof i||W(`$applyNodeReplacement failed. Expected replacement node to be an instance of ${i.name} with type ${i.getType()} but returned ${r.name} with type ${r.getType()} from original node ${e.constructor.name} with type ${n}`):t instanceof e.constructor&&r!==e.constructor||W(`$applyNodeReplacement failed. Ensure replacement node ${r.name} with type ${r.getType()} is a subclass of the original node ${e.constructor.name} with type ${n}.`),t.__key===e.__key&&W(`$applyNodeReplacement failed. Ensure that the key argument is *not* used in your replace function (from node ${e.constructor.name} with type ${n} to node ${r.name} with type ${r.getType()}), Node keys must never be re-used except by the static clone method.`),t}return e}function ks(e,t){!Zo(e.getParent())||Vo(t)||Xo(t)||W("Only element or decorator nodes can be inserted in to the root node")}function Cs(e){return(Xo(e)||Vo(e)&&!e.canBeEmpty())&&!e.isInline()}function Es(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;const r=e.parentElement;null!==r&&r.removeChild(e)}function Ts(e){return K?(e||window).getSelection():null}function As(e){return Ls(e)&&"A"===e.tagName}function Ls(e){return Ms(e)&&1===e.nodeType}function Ms(e){return"object"==typeof e&&null!==e&&"nodeType"in e&&"number"==typeof e.nodeType}function Rs(e){return Ms(e)&&11===e.nodeType}function Ns(e){const t=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return null!==e.nodeName.match(t)}function Os(e){const t=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return null!==e.nodeName.match(t)}function Ps(e){if(Xo(e)&&!e.isInline())return!0;if(!Vo(e)||_s(e))return!1;const t=e.getFirstChild(),n=null===t||gr(t)||Or(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}function Is(){return Mo()}const zs=new WeakMap,js=new Map;function Ds(e){if(!e._readOnly&&e.isEmpty())return js;e._readOnly||W("getCachedTypeToNodeMap called with a writable EditorState");let t=zs.get(e);return t||(t=function(e){const t=new Map;for(const[n,r]of e._nodeMap){const e=r.__type;let o=t.get(e);o||(o=new Map,t.set(e,o)),o.set(n,r)}return t}(e),zs.set(e,t)),t}function Fs(e){const t=e.constructor,n=t.clone(e);return n.afterCloneFrom(e),n.__key!==e.__key&&W(`$cloneWithProperties: ${t.name}.clone(node) (with type '${t.getType()}') did not return a node with the same key, make sure to specify node.__key as the last argument to the constructor`),n.__parent===e.__parent&&n.__next===e.__next&&n.__prev===e.__prev||W(`$cloneWithProperties: ${t.name}.clone(node) (with type '${t.getType()}') overrode afterCloneFrom but did not call super.afterCloneFrom(prevNode)`),n}function Bs(e){return function(e){return e[rr]=!0,e}(Fs(e))}function $s(e,t){const n=parseInt(e.style.paddingInlineStart,10)||0,r=Math.round(n/40);t.setIndent(r)}function Hs(e){return!0===e.__lexicalUnmanaged}function Ws(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ks(e,t){return Ws(e,t)&&e[t]!==ir[t]}function Us(e){return Ws(e.prototype,"exportDOM")}function Gs(e){const t=ye in e.prototype?e.prototype[ye]():void 0,n=function(e){if(!(e===ir||e.prototype instanceof ir)){let t="<unknown>",n="<unknown>";try{t=e.getType()}catch(e){}try{pi.version&&(n=JSON.parse(pi.version))}catch(e){}W(`${e.name} (type ${t}) does not subclass LexicalNode from the lexical package used by this editor (version ${n}). All lexical and @lexical/* packages used by an editor must have identical versions. If you suspect the version does match, then the problem may be caused by multiple copies of the same lexical module (e.g. both esm and cjs, or included directly in multiple entrypoints).`)}return e===qo||e===Yo||e===ir}(e),r=!n&&Ks(e,"getType")?e.getType():void 0;let o,i=r;if(t)if(r)o=t[r];else for(const[e,n]of Object.entries(t))i=e,o=n;if(!n&&i&&(Ks(e,"getType")||(e.getType=()=>i),Ks(e,"clone")||(0===Sr.length&&0!==e.length&&W(`${e.name} (type ${i}) must implement a static clone method since its constructor has ${String(e.length)} required arguments (expecting 0). Use an explicit default in the first argument of your constructor(prop: T=X, nodeKey?: NodeKey).`),e.clone=t=>(gi(t),new e)),Ks(e,"importJSON")||(0===Sr.length&&0!==e.length&&W(`${e.name} (type ${i}) must implement a static importJSON method since its constructor has ${String(e.length)} required arguments (expecting 0). Use an explicit default in the first argument of your constructor(prop: T=X, nodeKey?: NodeKey).`),e.importJSON=o&&o.$importJSON||(t=>(new e).updateFromJSON(t))),!Ks(e,"importDOM")&&o)){const{importDOM:t}=o;t&&(e.importDOM=()=>t)}return{ownNodeConfig:o,ownNodeType:i}}const Ys=(e,t)=>{let n=e;for(;null!=n&&!Zo(n);){if(t(n))return n;n=n.getParent()}return null},Vs={next:"previous",previous:"next"};class Js{origin;constructor(e){this.origin=e}[Symbol.iterator](){return ya({hasNext:ra,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return la(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return la(this.origin,this.direction)}remove(){const e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,t){const n=this.getNodeAtCaret();return e.is(this.origin)||e.is(n)||(null===n?this.insert(e):n.replace(e,t)),this}splice(e,t,n="next"){const r=n===this.direction?t:Array.from(t).reverse();let o=this;const i=this.getParentAtCaret(),s=new Map;for(let t=o.getAdjacentCaret();null!==t&&s.size<e;t=t.getAdjacentCaret()){const e=t.origin.getWritable();s.set(e.getKey(),e)}for(const e of r){if(s.size>0){const t=o.getNodeAtCaret();if(t)if(s.delete(t.getKey()),s.delete(e.getKey()),t.is(e)||o.origin.is(e));else{const n=e.getParent();n&&n.is(i)&&e.remove(),t.replace(e)}else null===t&&W(`NodeCaret.splice: Underflow of expected nodesToRemove during splice (keys: ${Array.from(s).join(" ")})`)}else o.insert(e);o=la(e,this.direction)}for(const e of s.values())e.remove();return this}}class qs extends Js{type="child";getLatest(){const e=this.origin.getLatest();return e===this.origin?this:fa(e,this.direction)}getParentCaret(e="root"){return la(Zs(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=Qs(this.direction);return la(this.getNodeAtCaret(),e)||fa(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(e){return e instanceof qs&&this.direction===e.direction&&this.origin.is(e.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}}const Xs={root:Zo,shadowRoot:_s};function Qs(e){return Vs[e]}function Zs(e,t="root"){return Xs[t](e)?null:e}class ea extends Js{type="sibling";getLatest(){const e=this.origin.getLatest();return e===this.origin?this:la(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return Vo(this.origin)?fa(this.origin,this.direction):null}getParentCaret(e="root"){return la(Zs(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=Qs(this.direction);return la(this.getNodeAtCaret(),e)||fa(this.origin.getParentOrThrow(),e)}isSamePointCaret(e){return e instanceof ea&&this.direction===e.direction&&this.origin.is(e.origin)}isSameNodeCaret(e){return(e instanceof ea||e instanceof ta)&&this.direction===e.direction&&this.origin.is(e.origin)}}class ta extends Js{type="text";offset;constructor(e,t){super(e),this.offset=t}getLatest(){const e=this.origin.getLatest();return e===this.origin?this:ca(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e="root"){return la(Zs(this.getParentAtCaret(),e),this.direction)}getFlipped(){return ca(this.origin,Qs(this.direction),this.offset)}isSamePointCaret(e){return e instanceof ta&&this.direction===e.direction&&this.origin.is(e.origin)&&this.offset===e.offset}isSameNodeCaret(e){return(e instanceof ea||e instanceof ta)&&this.direction===e.direction&&this.origin.is(e.origin)}getSiblingCaret(){return la(this.origin,this.direction)}}function na(e){return e instanceof ta}function ra(e){return e instanceof ea}function oa(e){return e instanceof qs}const ia={next:class extends ta{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends ta{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},sa={next:class extends ea{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends ea{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},aa={next:class extends qs{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends qs{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function la(e,t){return e?new sa[t](e):null}function ca(e,t,n){return e?new ia[t](e,ua(e,n)):null}function ua(e,t,n="error"){const r=e.getTextContentSize();let o="next"===t?r:"previous"===t?0:t;return(o<0||o>r)&&("clamp"!==n&&W(`$getTextNodeOffset: invalid offset ${String(t)} for size ${String(r)} at key ${e.getKey()}`),o=o<0?0:r),o}function da(e,t){return new ga(e,t)}function fa(e,t){return Vo(e)?new aa[t](e):null}function pa(e){return e&&function(e){return e&&e.getChildCaret()||e}(e.getAdjacentCaret())}class ha{type="node-caret-range";direction;anchor;focus;constructor(e,t,n){this.anchor=e,this.focus=t,this.direction=n}getLatest(){const e=this.anchor.getLatest(),t=this.focus.getLatest();return e===this.anchor&&t===this.focus?this:new ha(e,t,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const e=e=>{const t=this[e].getLatest();return na(t)?function(e,t){const{direction:n,origin:r}=e,o=ua(r,"focus"===t?Qs(n):n);return da(e,o-e.offset)}(t,e):null},t=e("anchor"),n=e("focus");if(t&&n){const{caret:e}=t,{caret:r}=n;if(e.isSameNodeCaret(r))return[da(e,r.offset-e.offset),null]}return[t,n]}iterNodeCarets(e="root"){const t=na(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),r=na(n),o=t=>t.isSameNodeCaret(n)?null:pa(t)||t.getParentCaret(e);return ya({hasNext:e=>null!==e&&!(r&&n.isSameNodeCaret(e)),initial:t.isSameNodeCaret(n)?null:o(t),map:e=>e,step:o})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class ga{type="slice";caret;distance;constructor(e,t){this.caret=e,this.distance=t}getSliceIndices(){const{distance:e,caret:{offset:t}}=this,n=t+e;return n<t?[n,t]:[t,n]}getTextContent(){const[e,t]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,t)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:e,direction:t}}=this,[n,r]=this.getSliceIndices(),o=e.getTextContent();return ca(e.setTextContent(o.slice(0,n)+o.slice(r)),t,n)}}function ma(e){return ba(e,la(Ui(),e.direction))}function va(e){return ba(e,e)}function ba(e,t){return e.direction!==t.direction&&W("$getCaretRange: anchor and focus must be in the same direction"),new ha(e,t,e.direction)}function ya(e){const{initial:t,hasNext:n,step:r,map:o}=e;let i=t;return{[Symbol.iterator](){return this},next(){if(!n(i))return{done:!0,value:void 0};const e={done:!1,value:o(i)};return i=r(i),e}}}function xa(e,t){const n=ka(e.origin,t.origin);switch(null===n&&W(`$comparePointCaretNext: a (key ${e.origin.getKey()}) and b (key ${t.origin.getKey()}) do not have a common ancestor`),n.type){case"same":{const n="text"===e.type,r="text"===t.type;return n&&r?function(e,t){return Math.sign(e-t)}(e.offset,t.offset):e.type===t.type?0:n?-1:r?1:"child"===e.type?-1:1}case"ancestor":return"child"===e.type?-1:1;case"descendant":return"child"===t.type?1:-1;case"branch":return _a(n)}}function _a(e){const{a:t,b:n}=e,r=t.__key,o=n.__key;let i=t,s=n;for(;i&&s;i=i.getNextSibling(),s=s.getNextSibling()){if(i.__key===o)return-1;if(s.__key===r)return 1}return null===i?1:-1}function wa(e,t){return t.is(e)}function Sa(e){return Vo(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function ka(e,t){if(e.is(t))return{commonAncestor:e,type:"same"};const n=new Map;for(let[t,r]=Sa(e);t;r=t,t=t.getParent())n.set(t,r);for(let[r,o]=Sa(t);r;o=r,r=r.getParent()){const i=n.get(r);if(void 0!==i)return null===i?(wa(e,r)||W("$originComparison: ancestor logic error"),{commonAncestor:r,type:"ancestor"}):null===o?(wa(t,r)||W("$originComparison: descendant logic error"),{commonAncestor:r,type:"descendant"}):((Vo(i)||wa(e,i))&&(Vo(o)||wa(t,o))&&r.is(i.getParent())&&r.is(o.getParent())||W("$originComparison: branch logic error"),{a:i,b:o,commonAncestor:r,type:"branch"})}return null}function Ca(e,t){const{type:n,key:r,offset:o}=e,i=function(e){const t=Fi(e);return null===t&&W(`Expected node with key ${e} to exist but it's not in the nodeMap.`),t}(e.key);return"text"===n?(Or(i)||W(`$caretFromPoint: Node with type ${i.getType()} and key ${r} that does not inherit from TextNode encountered for text point`),ca(i,t,o)):(Vo(i)||W(`$caretFromPoint: Node with type ${i.getType()} and key ${r} that does not inherit from ElementNode encountered for element point`),function(e,t,n){let r=fa(e,"next");for(let e=0;e<t;e++){const e=r.getAdjacentCaret();if(null===e)break;r=e}return Ia(r,n)}(i,e.offset,t))}function Ea(e,t){const{origin:n,direction:r}=t,o="next"===r;na(t)?e.set(n.getKey(),t.offset,"text"):ra(t)?Or(n)?e.set(n.getKey(),ua(n,r),"text"):e.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+(o?1:0),"element"):(oa(t)&&Vo(n)||W("$setPointFromCaret: exhaustiveness check"),e.set(n.getKey(),o?0:n.getChildrenSize(),"element"))}function Ta(e){const t=ao(),n=Wr(t)?t:ro();return Aa(n,e),Yi(n),n}function Aa(e,t){Ea(e.anchor,t.anchor),Ea(e.focus,t.focus)}function La(e){const{anchor:t,focus:n}=e,r=Ca(t,"next"),o=Ca(n,"next"),i=xa(r,o)<=0?"next":"previous";return ba(Ia(r,i),Ia(o,i))}function Ma(e){const{direction:t,origin:n}=e,r=la(n,Qs(t)).getNodeAtCaret();return r?la(r,t):fa(n.getParentOrThrow(),t)}function Ra(e,t="root"){const n=[e];for(let r=oa(e)?e.getParentCaret(t):e.getSiblingCaret();null!==r;r=r.getParentCaret(t))n.push(Ma(r));return n}function Na(e){return!!e&&e.origin.isAttached()}function Oa(e){const t=function(e){let t=e;for(;oa(t);){const e=pa(t);if(!oa(e))break;t=e}return t}(e.getLatest()),{direction:n}=t;if(Or(t.origin))return na(t)?t:ca(t.origin,n,n);const r=t.getAdjacentCaret();return ra(r)&&Or(r.origin)?ca(r.origin,n,Qs(n)):t}function Pa(e){return na(e)&&e.offset!==ua(e.origin,e.direction)}function Ia(e,t){return e.direction===t?e:e.getFlipped()}function za(e,t){return e.direction===t?e:ba(Ia(e.focus,t),Ia(e.anchor,t))}function ja(e){const{origin:t,offset:n,direction:r}=e;if(n===ua(t,r))return e.getSiblingCaret();if(n===ua(t,Qs(r)))return Ma(e.getSiblingCaret());const[o]=t.splitText(n);return Or(o)||W("$splitTextPointCaret: splitText must return at least one TextNode"),Ia(la(o,"next"),r)}function Da(e,t){return!0}function Fa(e,{$copyElementNode:t=ws,$splitTextPointCaretNext:n=ja,rootMode:r="shadowRoot",$shouldSplit:o=Da}={}){if(na(e))return n(e);const i=e.getParentCaret(r);if(i){const{origin:n}=i;if(oa(e)&&(!n.canBeEmpty()||!o(n,"first")))return Ma(i);const r=function(e){const t=[];for(let n=e.getAdjacentCaret();n;n=n.getAdjacentCaret())t.push(n.origin);return t}(e);(r.length>0||n.canBeEmpty()&&o(n,"last"))&&i.insert(t(n).splice(0,0,r))}return i}function Ba(e,t){if(!t||e===t)return e;for(const n in t)if(e[n]!==t[n])return{...e,...t};return e}function $a(...e){const t=[];for(const n of e)if(n&&"string"==typeof n)for(const[e]of n.matchAll(/\S+/g))t.push(e);return t}function Ha(e,...t){const n=$a(...t);n.length>0&&e.classList.add(...n)}function Wa(e,...t){const n=$a(...t);n.length>0&&e.classList.remove(...n)}function Ka(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}function Ua(e){throw new Error(e)}const Ga=new Map;function Ya(e){const t={};if(!e)return t;const n=e.split(";");for(const e of n)if(""!==e){const[n,r]=e.split(/:([^]+)/);n&&r&&(t[n.trim()]=r.trim())}return t}function Va(e){let t=Ga.get(e);return void 0===t&&(t=Ya(e),Ga.set(e,t)),Object.freeze(t),t}function Ja(e){const t=Is().getElementByKey(e.getKey());if(null===t)return null;const n=t.ownerDocument.defaultView;return null===n?null:n.getComputedStyle(t)}function qa(e){return Ja(Zo(e)?e:e.getParentOrThrow())}function Xa(e){const t=qa(e);return null!==t&&"rtl"===t.direction}function Qa(e,t,n="self"){const r=e.getStartEndPoints();if(t.isSelected(e)&&!Ai(t)&&null!==r){const[o,i]=r,s=e.isBackward(),a=o.getNode(),l=i.getNode(),c=t.is(a),u=t.is(l);if(c||u){const[r,o]=Yr(e),i=a.is(l),c=t.is(s?l:a),u=t.is(s?a:l);let d,f=0;if(i)f=r>o?o:r,d=r>o?r:o;else if(c){f=s?o:r,d=void 0}else if(u){f=0,d=s?r:o}const p=t.__text.slice(f,d);p!==t.__text&&("clone"===n&&(t=Bs(t)),t.__text=p)}}return t}function Za(e){if("text"===e.type)return e.offset===e.getNode().getTextContentSize();const t=e.getNode();return Vo(t)||Ua("isAtNodeEnd: node must be a TextNode or ElementNode"),e.offset===t.getChildrenSize()}function el(e){const t=e.getStyle(),n=Ya(t);Ga.set(t,n)}function tl(e,t){(Wr(e)?e.isCollapsed():Or(e)||Vo(e))||Ua("$patchStyle must only be called with a TextNode, ElementNode, or collapsed RangeSelection");const n=Va(Wr(e)?e.style:Or(e)?e.getStyle():e.getTextStyle()),r=Object.entries(t).reduce((t,[r,o])=>("function"==typeof o?t[r]=o(n[r],e):null===o?delete t[r]:t[r]=o,t),{...n}),o=function(e){let t="";for(const n in e)n&&(t+=`${n}: ${e[n]};`);return t}(r);Wr(e)||Or(e)?e.setStyle(o):e.setTextStyle(o),Ga.set(o,r)}function nl(e,t){if(Wr(e)&&e.isCollapsed()){tl(e,t);const n=e.anchor.getNode();Vo(n)&&n.isEmpty()&&tl(n,t)}!function(e){const t=ao();if(!t)return;const n=new Map,r=e=>n.get(e.getKey())||[0,e.getTextContentSize()];if(Wr(t))for(const e of La(t).getTextSlices())e&&n.set(e.caret.origin.getKey(),e.getSliceIndices());const o=t.getNodes();for(const t of o){if(!Or(t)||!t.canHaveFormat())continue;const[n,o]=r(t);if(o!==n)if(Ai(t)||0===n&&o===t.getTextContentSize())e(t);else{e(t.splitText(n,o)[0===n?0:1])}}Wr(t)&&"text"===t.anchor.type&&"text"===t.focus.type&&t.anchor.key===t.focus.key&&function(e){if(e.isBackward()){const{anchor:t,focus:n}=e,{key:r,offset:o,type:i}=t;t.set(n.key,n.offset,n.type),n.set(r,o,i)}}(t)}(e=>{tl(e,t)});const n=e.getNodes();if(n.length>0){const e=new Set;for(const r of n){if(!Vo(r)||!r.canBeEmpty()||0!==r.getChildrenSize())continue;const n=r.getKey();e.has(n)||(e.add(n),tl(r,t))}}}function rl(e,t){const n=e.getFormatType(),r=e.getIndent();n!==t.getFormatType()&&t.setFormat(n),r!==t.getIndent()&&t.setIndent(r)}function ol(e){const t=il(e);return null!==t&&"vertical-rl"===t.writingMode}function il(e){const t=e.anchor.getNode();return Vo(t)?Ja(t):qa(t)}function sl(e,t){let n=ol(e)?!t:t;al(e)&&(n=!n);const r=Ca(e.focus,n?"previous":"next");if(Pa(r))return!1;for(const e of ma(r)){if(oa(e))return!e.origin.isInline();if(!Vo(e.origin)){if(Xo(e.origin))return!0;break}}return!1}function al(e){const t=il(e);return null!==t&&"rtl"===t.direction}function ll(e,t,n){const r=al(e);let o;o=ol(e)||r?!n:n,function(e,t,n,r){e.modify(t?"extend":"move",n,r)}(e,t,o,"character")}function cl(e,t,n){const r=Va(e.getStyle());return null!==r&&r[t]||n}function ul(e,t,n=""){let r=null;const o=e.getNodes(),i=e.anchor,s=e.focus,a=e.isBackward(),l=a?s.offset:i.offset,c=a?s.getNode():i.getNode();if(Wr(e)&&e.isCollapsed()&&""!==e.style){const n=Va(e.style);if(null!==n&&t in n)return n[t]}for(let e=0;e<o.length;e++){const i=o[e];if((0===e||0!==l||!i.is(c))&&Or(i)){const e=cl(i,t,n);if(null===r)r=e;else if(r!==e){r="";break}}}return null===r?n:r}function dl(e){throw new Error(e)}const fl="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,pl=fl&&"documentMode"in document?document.documentMode:null;function hl(e,t){let n=e;for(;null!=n;){if(n instanceof t)return n;n=n.getParent()}return null}function gl(e){const t=Ys(e,e=>Vo(e)&&!e.isInline());return Vo(t)||dl(`Expected node ${e.__key} to have closest block element node.`),t}function ml(e){const t=ao()||lo();let n;if(Wr(t))n=Ca(t.focus,"next");else{if(null!=t){const e=t.getNodes(),r=e[e.length-1];r&&(n=la(r,"next"))}n=n||fa(Ui(),"previous").getFlipped().insert(ai())}const r=function(e,t,n){let r=Ia(t,"next");for(let e=r;e;e=Fa(e,n))r=e;na(r)&&dl("$insertNodeToNearestRootAtCaret: An unattached TextNode can not be split");return r.insert(e.isInline()?ai().append(e):e),Ia(la(e.getLatest(),"next"),t.direction)}(e,n),o=pa(r);return Ta(va(oa(o)?Oa(o):r)),e.getLatest()}function vl(e,t){return null!==e&&Object.getPrototypeOf(e).constructor.name===t.name}fl&&"InputEvent"in window&&!pl&&new window.InputEvent("input");const bl=Symbol.for("preact-signals");function yl(){if(Sl>1)return void Sl--;let e,t=!1;for(;void 0!==_l;){let n=_l;for(_l=void 0,kl++;void 0!==n;){const r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&Ll(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(kl=0,Sl--,t)throw e}let xl,_l;function wl(e){const t=xl;xl=void 0;try{return e()}finally{xl=t}}let Sl=0,kl=0,Cl=0;function El(e){if(void 0===xl)return;let t=e.n;return void 0===t||t.t!==xl?(t={i:0,S:e,p:xl.s,n:void 0,t:xl,e:void 0,x:void 0,r:t},void 0!==xl.s&&(xl.s.n=t),xl.s=t,e.n=t,32&xl.f&&e.S(t),t):-1===t.i?(t.i=0,void 0!==t.n&&(t.n.p=t.p,void 0!==t.p&&(t.p.n=t.n),t.p=xl.s,t.n=void 0,xl.s.n=t,xl.s=t),t):void 0}function Tl(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function Al(e,t){return new Tl(e,t)}function Ll(e){for(let t=e.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Ml(e){for(let t=e.s;void 0!==t;t=t.n){const n=t.S.n;if(void 0!==n&&(t.r=n),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function Rl(e){let t,n=e.s;for(;void 0!==n;){const e=n.p;-1===n.i?(n.S.U(n),void 0!==e&&(e.n=n.n),void 0!==n.n&&(n.n.p=e)):t=n,n.S.n=n.r,void 0!==n.r&&(n.r=void 0),n=e}e.s=t}function Nl(e,t){Tl.call(this,void 0),this.x=e,this.s=void 0,this.g=Cl-1,this.f=4,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function Ol(e){const t=e.u;if(e.u=void 0,"function"==typeof t){Sl++;const n=xl;xl=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,Pl(e),t}finally{xl=n,yl()}}}function Pl(e){for(let t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Ol(e)}function Il(e){if(xl!==this)throw new Error("Out-of-order effect");Rl(this),xl=e,this.f&=-2,8&this.f&&Pl(this),yl()}function zl(e,t){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=null==t?void 0:t.name}function jl(e,t){const n=new zl(e,t);try{n.c()}catch(e){throw n.d(),e}const r=n.d.bind(n);return r[Symbol.dispose]=r,r}function Dl(e){return("function"==typeof e.nodes?e.nodes():e.nodes)||[]}function Fl(e){throw new Error(e)}function Bl(e,t){if(e&&t&&!Array.isArray(t)&&"object"==typeof e&&"object"==typeof t){const n=e,r=t;for(const e in r)n[e]=Bl(n[e],r[e]);return e}return t}Tl.prototype.brand=bl,Tl.prototype.h=function(){return!0},Tl.prototype.S=function(e){const t=this.t;t!==e&&void 0===e.e&&(e.x=t,this.t=e,void 0!==t?t.e=e:wl(()=>{var e;null==(e=this.W)||e.call(this)}))},Tl.prototype.U=function(e){if(void 0!==this.t){const t=e.e,n=e.x;void 0!==t&&(t.x=n,e.e=void 0),void 0!==n&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n,void 0===n&&wl(()=>{var e;null==(e=this.Z)||e.call(this)}))}},Tl.prototype.subscribe=function(e){return jl(()=>{const t=this.value,n=xl;xl=void 0;try{e(t)}finally{xl=n}},{name:"sub"})},Tl.prototype.valueOf=function(){return this.value},Tl.prototype.toString=function(){return this.value+""},Tl.prototype.toJSON=function(){return this.value},Tl.prototype.peek=function(){const e=xl;xl=void 0;try{return this.value}finally{xl=e}},Object.defineProperty(Tl.prototype,"value",{get(){const e=El(this);return void 0!==e&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(kl>100)throw new Error("Cycle detected");this.v=e,this.i++,Cl++,Sl++;try{for(let e=this.t;void 0!==e;e=e.x)e.t.N()}finally{yl()}}}}),Nl.prototype=new Tl,Nl.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;if(this.f&=-5,this.g===Cl)return!0;if(this.g=Cl,this.f|=1,this.i>0&&!Ll(this))return this.f&=-2,!0;const e=xl;try{Ml(this),xl=this;const e=this.x();(16&this.f||this.v!==e||0===this.i)&&(this.v=e,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return xl=e,Rl(this),this.f&=-2,!0},Nl.prototype.S=function(e){if(void 0===this.t){this.f|=36;for(let e=this.s;void 0!==e;e=e.n)e.S.S(e)}Tl.prototype.S.call(this,e)},Nl.prototype.U=function(e){if(void 0!==this.t&&(Tl.prototype.U.call(this,e),void 0===this.t)){this.f&=-33;for(let e=this.s;void 0!==e;e=e.n)e.S.U(e)}},Nl.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let e=this.t;void 0!==e;e=e.x)e.t.N()}},Object.defineProperty(Nl.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");const e=El(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),zl.prototype.c=function(){const e=this.S();try{if(8&this.f)return;if(void 0===this.x)return;const e=this.x();"function"==typeof e&&(this.u=e)}finally{e()}},zl.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Ol(this),Ml(this),Sl++;const e=xl;return xl=this,Il.bind(this,e)},zl.prototype.N=function(){2&this.f||(this.f|=2,this.o=_l,_l=this)},zl.prototype.d=function(){this.f|=8,1&this.f||Pl(this)},zl.prototype.dispose=function(){this.d()};const $l=0,Hl=1,Wl=2,Kl=3,Ul=4,Gl=5,Yl=6,Vl=7;function Jl(e){return e.id===$l}function ql(e){return e.id===Wl}function Xl(e){return function(e){return e.id===Hl}(e)||Fl(`LexicalBuilder: Can not apply a permanent mark from state id ${String(e.id)} (expected ${String(Hl)} temporary)`),Object.assign(e,{id:Wl})}const Ql=new Set;class Zl{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(e,t){this.builder=e,this.extension=t,this.configs=new Set,this.state={id:$l}}mergeConfigs(){let e=this.extension.config||{};const t=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):Ba;for(const n of this.configs)e=t(e,n);return e}init(e){const t=this.state;ql(t)||Fl(`ExtensionRep: Can not configure from state id ${String(t.id)}`);const n={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},r={...n,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},o=function(e,t,n){return Object.assign(e,{config:t,id:Kl,registerState:n})}(t,this.mergeConfigs(),n);let i;this.state=o,this.extension.init&&(i=this.extension.init(e,o.config,n)),this.state=function(e,t,n){return Object.assign(e,{id:Ul,initResult:t,registerState:n})}(o,i,r)}build(e){const t=this.state;let n;t.id!==Ul&&Fl(`ExtensionRep: register called in state id ${String(t.id)} (expected ${String(Gl)} initialized)`),this.extension.build&&(n=this.extension.build(e,t.config,t.registerState));const r={...t.registerState,getOutput:()=>n,getSignal:this.getSignal.bind(this)};this.state=function(e,t,n){return Object.assign(e,{id:Gl,output:t,registerState:n})}(t,n,r)}register(e,t){this._signal=t;const n=this.state;n.id!==Gl&&Fl(`ExtensionRep: register called in state id ${String(n.id)} (expected ${String(Gl)} built)`);const r=this.extension.register&&this.extension.register(e,n.config,n.registerState);return this.state=function(e){return Object.assign(e,{id:Yl})}(n),()=>{const e=this.state;e.id!==Vl&&Fl(`ExtensionRep: rollbackToBuiltState called in state id ${String(n.id)} (expected ${String(Vl)} afterRegistration)`),this.state=function(e){return Object.assign(e,{id:Gl})}(e),r&&r()}}afterRegistration(e){const t=this.state;let n;return t.id!==Yl&&Fl(`ExtensionRep: afterRegistration called in state id ${String(t.id)} (expected ${String(Yl)} registered)`),this.extension.afterRegistration&&(n=this.extension.afterRegistration(e,t.config,t.registerState)),this.state=function(e){return Object.assign(e,{id:Vl})}(t),n}getSignal(){return void 0===this._signal&&Fl("ExtensionRep.getSignal() called before register"),this._signal}getInitResult(){void 0===this.extension.init&&Fl(`ExtensionRep: getInitResult() called for Extension ${this.extension.name} that does not define init`);const e=this.state;return function(e){return e.id>=Ul}(e)||Fl(`ExtensionRep: getInitResult() called for ExtensionRep in state id ${String(e.id)} < ${String(Ul)} (initialized)`),e.initResult}getInitPeer(e){const t=this.builder.extensionNameMap.get(e);return t?t.getExtensionInitDependency():void 0}getExtensionInitDependency(){const e=this.state;return function(e){return e.id>=Kl}(e)||Fl(`ExtensionRep: getExtensionInitDependency called in state id ${String(e.id)} (expected >= ${String(Kl)} configured)`),{config:e.config}}getPeer(e){const t=this.builder.extensionNameMap.get(e);return t?t.getExtensionDependency():void 0}getInitDependency(e){const t=this.builder.getExtensionRep(e);return void 0===t&&Fl(`LexicalExtensionBuilder: Extension ${this.extension.name} missing dependency extension ${e.name} to be in registry`),t.getExtensionInitDependency()}getDependency(e){const t=this.builder.getExtensionRep(e);return void 0===t&&Fl(`LexicalExtensionBuilder: Extension ${this.extension.name} missing dependency extension ${e.name} to be in registry`),t.getExtensionDependency()}getState(){const e=this.state;return function(e){return e.id>=Vl}(e)||Fl(`ExtensionRep getState called in state id ${String(e.id)} (expected ${String(Vl)} afterRegistration)`),e}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||Ql}getPeerNameSet(){let e=this._peerNameSet;return e||(e=new Set((this.extension.peerDependencies||[]).map(([e])=>e)),this._peerNameSet=e),e}getExtensionDependency(){if(!this._dependency){const e=this.state;(function(e){return e.id>=Gl})(e)||Fl(`Extension ${this.extension.name} used as a dependency before build`),this._dependency={config:e.config,init:e.initResult,output:e.output}}return this._dependency}}const ec={tag:ar};function tc(){const e=Ui();e.isEmpty()&&e.append(ai())}const nc={config:{setOptions:ec,updateOptions:ec},init:({$initialEditorState:e=tc})=>({$initialEditorState:e,initialized:!1}),afterRegistration(e,{updateOptions:t,setOptions:n},r){const o=r.getInitResult();if(!o.initialized){o.initialized=!0;const{$initialEditorState:r}=o;if(r instanceof ri)e.setEditorState(r,n);else if("function"==typeof r)e.update(()=>{r(e)},t);else if(r&&("string"==typeof r||"object"==typeof r)){const t=e.parseEditorState(r);e.setEditorState(t,n)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[Qo,Sr,fr,Ir,ii]},rc=Symbol.for("@lexical/extension/LexicalBuilder");function oc(){}function ic(e){throw e}function sc(e){return Array.isArray(e)?e:[e]}const ac="0.40.0+dev.esm";class lc{roots;extensionNameMap;outgoingConfigEdges;incomingEdges;conflicts;_sortedExtensionReps;PACKAGE_VERSION;constructor(e){this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=ac,this.roots=e;for(const t of e)this.addExtension(t)}static fromExtensions(e){const t=[sc(nc)];for(const n of e)t.push(sc(n));return new lc(t)}static maybeFromEditor(e){const t=e[rc];return t&&(t.PACKAGE_VERSION!==ac&&Fl(`LexicalBuilder.fromEditor: The given editor was created with LexicalBuilder ${t.PACKAGE_VERSION} but this version is ${ac}. A project should have exactly one copy of LexicalBuilder`),t instanceof lc||Fl("LexicalBuilder.fromEditor: There are multiple copies of the same version of LexicalBuilder in your project, and this editor was created with another one. Your project, or one of its dependencies, has its package.json and/or bundler configured incorrectly.")),t}static fromEditor(e){const t=lc.maybeFromEditor(e);return void 0===t&&Fl("LexicalBuilder.fromEditor: The given editor was not created with LexicalBuilder"),t}constructEditor(){const{$initialEditorState:e,onError:t,...n}=this.buildCreateEditorArgs(),r=Object.assign(fi({...n,...t?{onError:e=>{t(e,r)}}:{}}),{[rc]:this});for(const e of this.sortedExtensionReps())e.build(r);return r}buildEditor(){let e=oc;function t(){try{e()}finally{e=oc}}const n=Object.assign(this.constructEditor(),{dispose:t,[Symbol.dispose]:t});return e=Ka(this.registerEditor(n),()=>n.setRootElement(null)),n}hasExtensionByName(e){return this.extensionNameMap.has(e)}getExtensionRep(e){const t=this.extensionNameMap.get(e.name);if(t)return t.extension!==e&&Fl(`LexicalBuilder: A registered extension with name ${e.name} exists but does not match the given extension`),t}addEdge(e,t,n){const r=this.outgoingConfigEdges.get(e);r?r.set(t,n):this.outgoingConfigEdges.set(e,new Map([[t,n]]));const o=this.incomingEdges.get(t);o?o.add(e):this.incomingEdges.set(t,new Set([e]))}addExtension(e){void 0!==this._sortedExtensionReps&&Fl("LexicalBuilder: addExtension called after finalization");const t=sc(e),[n]=t;"string"!=typeof n.name&&Fl("LexicalBuilder: extension name must be string, not "+typeof n.name);let r=this.extensionNameMap.get(n.name);if(void 0!==r&&r.extension!==n&&Fl(`LexicalBuilder: Multiple extensions registered with name ${n.name}, names must be unique`),!r){r=new Zl(this,n),this.extensionNameMap.set(n.name,r);const e=this.conflicts.get(n.name);"string"==typeof e&&Fl(`LexicalBuilder: extension ${n.name} conflicts with ${e}`);for(const e of n.conflictsWith||[])this.extensionNameMap.has(e)&&Fl(`LexicalBuilder: extension ${n.name} conflicts with ${e}`),this.conflicts.set(e,n.name);for(const e of n.dependencies||[]){const t=sc(e);this.addEdge(n.name,t[0].name,t.slice(1)),this.addExtension(t)}for(const[e,t]of n.peerDependencies||[])this.addEdge(n.name,e,t?[t]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;const e=[],t=(n,r)=>{let o=n.state;if(ql(o))return;const i=n.extension.name;var s;Jl(o)||Fl(`LexicalBuilder: Circular dependency detected for Extension ${i} from ${r||"[unknown]"}`),Jl(s=o)||Fl(`LexicalBuilder: Can not apply a temporary mark from state id ${String(s.id)} (expected ${String($l)} unmarked)`),o=Object.assign(s,{id:Hl}),n.state=o;const a=this.outgoingConfigEdges.get(i);if(a)for(const e of a.keys()){const n=this.extensionNameMap.get(e);n&&t(n,i)}o=Xl(o),n.state=o,e.push(n)};for(const e of this.extensionNameMap.values())Jl(e.state)&&t(e);for(const t of e)for(const[e,n]of this.outgoingConfigEdges.get(t.extension.name)||[])if(n.length>0){const t=this.extensionNameMap.get(e);if(t)for(const e of n)t.configs.add(e)}for(const[e,...t]of this.roots)if(t.length>0){const n=this.extensionNameMap.get(e.name);void 0===n&&Fl(`LexicalBuilder: Expecting existing ExtensionRep for ${e.name}`);for(const e of t)n.configs.add(e)}return this._sortedExtensionReps=e,this._sortedExtensionReps}registerEditor(e){const t=this.sortedExtensionReps(),n=new AbortController,r=[()=>n.abort()],o=n.signal;for(const n of t){const t=n.register(e,o);t&&r.push(t)}for(const n of t){const t=n.afterRegistration(e);t&&r.push(t)}return Ka(...r)}buildCreateEditorArgs(){const e={},t=new Set,n=new Map,r=new Map,o={},i={},s=this.sortedExtensionReps();for(const a of s){const{extension:s}=a;if(void 0!==s.onError&&(e.onError=s.onError),void 0!==s.disableEvents&&(e.disableEvents=s.disableEvents),void 0!==s.parentEditor&&(e.parentEditor=s.parentEditor),void 0!==s.editable&&(e.editable=s.editable),void 0!==s.namespace&&(e.namespace=s.namespace),void 0!==s.$initialEditorState&&(e.$initialEditorState=s.$initialEditorState),s.nodes)for(const e of Dl(s)){if("function"!=typeof e){const t=n.get(e.replace);t&&Fl(`LexicalBuilder: Extension ${s.name} can not register replacement for node ${e.replace.name} because ${t.extension.name} already did`),n.set(e.replace,a)}t.add(e)}if(s.html){if(s.html.export)for(const[e,t]of s.html.export.entries())r.set(e,t);s.html.import&&Object.assign(o,s.html.import)}s.theme&&Bl(i,s.theme)}Object.keys(i).length>0&&(e.theme=i),t.size&&(e.nodes=[...t]);const a=Object.keys(o).length>0,l=r.size>0;(a||l)&&(e.html={},a&&(e.html.import=o),l&&(e.html.export=r));for(const t of s)t.init(e);return e.onError||(e.onError=ic),e}}function cc(e,t){return Ka(e.registerCommand(tn,t=>{const n=ao();if(!Wr(n))return!1;t.preventDefault();const r=function(e){const t=e.getNodes().filter(e=>to(e)&&e.canIndent());if(t.length>0)return!0;const n=e.anchor,r=e.focus,o=r.isBefore(n)?r:n,i=gl(o.getNode());if(i.canIndent()){const e=i.getKey();let t=ro();if(t.anchor.set(e,0,"element"),t.focus.set(e,0,"element"),t=He(t),t.anchor.is(o))return!0}return!1}(n)?t.shiftKey?on:rn:nn;return e.dispatchCommand(r,void 0)},ci),e.registerCommand(rn,()=>{const e="number"==typeof t?t:t?t.peek():null;if(null==e)return!1;const n=ao();if(!Wr(n))return!1;const r=n.getNodes().map(e=>gl(e).getIndent());return Math.max(...r)+1>=e},4))}const uc=new Set(["http:","https:","mailto:","sms:","tel:"]);class dc extends Yo{__url;__target;__rel;__title;static getType(){return"link"}static clone(e){return new dc(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}constructor(e="",t={},n){super(n);const{target:r=null,rel:o=null,title:i=null}=t;this.__url=e,this.__target=r,this.__rel=o,this.__title=i}createDOM(e){const t=document.createElement("a");return this.updateLinkDOM(null,t,e),Ha(t,e.theme.link),t}updateLinkDOM(e,t,n){if(As(t)){e&&e.__url===this.__url||(t.href=this.sanitizeUrl(this.__url));for(const n of["target","rel","title"]){const r=`__${n}`,o=this[r];e&&e[r]===o||(o?t[n]=o:t.removeAttribute(n))}}}updateDOM(e,t,n){return this.updateLinkDOM(e,t,n),!1}static importDOM(){return{a:e=>({conversion:fc,priority:1})}}static importJSON(e){return pc().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setURL(e.url).setRel(e.rel||null).setTarget(e.target||null).setTitle(e.title||null)}sanitizeUrl(e){e=wc(e);try{const t=new URL(wc(e));if(!uc.has(t.protocol))return"about:blank"}catch(t){return e}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(e){const t=this.getWritable();return t.__url=e,t}getTarget(){return this.getLatest().__target}setTarget(e){const t=this.getWritable();return t.__target=e,t}getRel(){return this.getLatest().__rel}setRel(e){const t=this.getWritable();return t.__rel=e,t}getTitle(){return this.getLatest().__title}setTitle(e){const t=this.getWritable();return t.__title=e,t}insertNewAfter(e,t=!0){const n=pc(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(n,t),n}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,t,n){if(!Wr(t))return!1;const r=t.anchor.getNode(),o=t.focus.getNode();return this.isParentOf(r)&&this.isParentOf(o)&&t.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}}function fc(e){let t=null;if(As(e)){const n=e.textContent;(null!==n&&""!==n||e.children.length>0)&&(t=pc(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function pc(e="",t){return Ss(new dc(e,t))}function hc(e){return e instanceof dc}class gc extends dc{__isUnlinked;constructor(e="",t={},n){super(e,t,n),this.__isUnlinked=void 0!==t.isUnlinked&&null!==t.isUnlinked&&t.isUnlinked}static getType(){return"autolink"}static clone(e){return new gc(e.__url,{isUnlinked:e.__isUnlinked,rel:e.__rel,target:e.__target,title:e.__title},e.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(e){const t=this.getWritable();return t.__isUnlinked=e,t}createDOM(e){return this.__isUnlinked?document.createElement("span"):super.createDOM(e)}updateDOM(e,t,n){return super.updateDOM(e,t,n)||e.__isUnlinked!==this.__isUnlinked}static importJSON(e){return mc().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setIsUnlinked(e.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(e,t=!0){const n=this.getParentOrThrow().insertNewAfter(e,t);if(Vo(n)){const e=mc(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return n.append(e),e}return null}}function mc(e="",t){return Ss(new gc(e,t))}function vc(e){return e instanceof gc}const bc=kt("TOGGLE_LINK_COMMAND");function yc(e,t){if("element"===e.type){const n=e.getNode();Vo(n)||function(e){throw new Error(e)}("$getPointNode: element point is not an ElementNode");return n.getChildren()[e.offset+t]||null}return null}function xc(e,t={}){let n;if(e&&"object"==typeof e){const{url:r,...o}=e;n=r,t={...o,...t}}else n=e;const{target:r,title:o}=t,i=void 0===t.rel?"noreferrer":t.rel,s=ao();if(null===s||!Wr(s)&&!Ur(s))return;if(Ur(s)){const e=s.getNodes();if(0===e.length)return;return void e.forEach(e=>{if(null===n){const t=Ys(e,e=>!vc(e)&&hc(e));t&&(t.insertBefore(e),0===t.getChildren().length&&t.remove())}else{const t=Ys(e,e=>!vc(e)&&hc(e));if(t)t.setURL(n),void 0!==r&&t.setTarget(r),void 0!==i&&t.setRel(i);else{const t=pc(n,{rel:i,target:r});e.insertBefore(t),t.append(e)}}})}const a=s.extract();if(null===n){const e=new Set;return void a.forEach(t=>{const n=Ys(t,e=>!vc(e)&&hc(e));if(null!==n){const t=n.getKey();if(e.has(t))return;!function(e,t){const n=new Set(t.filter(t=>e.isParentOf(t)).map(e=>e.getKey())),r=e.getChildren(),o=r=>n.has(r.getKey())||Vo(r)&&t.some(t=>e.isParentOf(t)&&r.isParentOf(t)),i=r.filter(o);if(i.length===r.length)return r.forEach(t=>e.insertBefore(t)),void e.remove();const s=r.findIndex(o),a=r.findLastIndex(o),l=0===s,c=a===r.length-1;if(l)i.forEach(t=>e.insertBefore(t));else if(c)for(let t=i.length-1;t>=0;t--)e.insertAfter(i[t]);else{for(let t=i.length-1;t>=0;t--)e.insertAfter(i[t]);const t=r.slice(a+1);if(t.length>0){const n=pc(e.getURL(),{rel:e.getRel(),target:e.getTarget(),title:e.getTitle()});i[i.length-1].insertAfter(n),t.forEach(e=>n.append(e))}}}(n,a),e.add(t)}})}const l=new Set,c=e=>{l.has(e.getKey())||(l.add(e.getKey()),e.setURL(n),void 0!==r&&e.setTarget(r),void 0!==i&&e.setRel(i),void 0!==o&&e.setTitle(o))};if(1===a.length){const e=a[0],t=Ys(e,hc);if(null!==t)return c(t)}!function(e){const t=ao();if(!Wr(t))return e();const n=He(t),r=n.isBackward(),o=yc(n.anchor,r?-1:0),i=yc(n.focus,r?0:-1),s=e();if(o||i){const e=ao();if(Wr(e)){const t=e.clone();if(o){const e=o.getParent();e&&t.anchor.set(e.getKey(),o.getIndexWithinParent()+(r?1:0),"element")}if(i){const e=i.getParent();e&&t.focus.set(e.getKey(),i.getIndexWithinParent()+(r?0:1),"element")}Yi(He(t))}}}(()=>{let e=null;for(const t of a){if(!t.isAttached())continue;const s=Ys(t,hc);if(s){c(s);continue}if(Vo(t)){if(!t.isInline())continue;if(hc(t)){if(!(vc(t)||null!==e&&e.getParentOrThrow().isParentOf(t))){c(t),e=t;continue}for(const e of t.getChildren())t.insertBefore(e);t.remove();continue}}const a=t.getPreviousSibling();hc(a)&&a.is(e)?a.append(t):(e=pc(n,{rel:i,target:r,title:o}),t.insertAfter(e),e.append(t))}})}const _c=/^\+?[0-9\s()-]{5,}$/;function wc(e){return e.match(/^[a-z][a-z0-9+.-]*:/i)||e.match(/^[/#.]/)?e:e.includes("@")?`mailto:${e}`:_c.test(e)?`tel:${e}`:`https://${e}`}function Sc(e,t){for(let n=0;n<t.length;n++){const r=t[n](e);if(r)return r}return null}const kc=/[.,;\s]/;function Cc(e){return kc.test(e)}function Ec(e){return Cc(e[e.length-1])}function Tc(e){return Cc(e[0])}function Ac(e){let t=e.getPreviousSibling();return Vo(t)&&(t=t.getLastDescendant()),null===t||gr(t)||Or(t)&&Ec(t.getTextContent())}function Lc(e){let t=e.getNextSibling();return Vo(t)&&(t=t.getFirstDescendant()),null===t||gr(t)||Or(t)&&Tc(t.getTextContent())}function Mc(e,t,n,r){if(!(e>0?Cc(n[e-1]):Ac(r[0])))return!1;return t<n.length?Cc(n[t]):Lc(r[r.length-1])}function Rc(e,t,n){const r=[],o=[],i=[];let s=0,a=0;const l=[...e];for(;l.length>0;){const e=l[0],c=e.getTextContent().length,u=a;a+c<=t?(r.push(e),s+=c):u>=n?i.push(e):o.push(e),a+=c,l.shift()}return[s,r,o,i]}function Nc(e,t,n,r){const o=mc(r.url,r.attributes);if(1===e.length){let i,s=e[0];0===t?[i,s]=s.splitText(n):[,i,s]=s.splitText(t,n);const a=Nr(r.text);return a.setFormat(i.getFormat()),a.setDetail(i.getDetail()),a.setStyle(i.getStyle()),o.append(a),i.replace(o),s}if(e.length>1){const r=e[0];let i,s=r.getTextContent().length;0===t?i=r:[,i]=r.splitText(t);const a=[];let l;for(let t=1;t<e.length;t++){const r=e[t],o=r.getTextContent().length,i=s;if(i<n)if(s+o<=n)a.push(r);else{const[e,t]=r.splitText(n-i);a.push(e),l=t}s+=o}const c=ao(),u=c?c.getNodes().find(Or):void 0,d=Nr(i.getTextContent());return d.setFormat(i.getFormat()),d.setDetail(i.getDetail()),d.setStyle(i.getStyle()),o.append(d,...a),u&&u===i&&(Wr(c)?d.select(c.anchor.offset,c.focus.offset):Ur(c)&&d.select(0,d.getTextContent().length)),i.replace(o),l}}function Oc(e,t,n){const r=e.getChildren(),o=r.length;for(let t=0;t<o;t++){const o=r[t];if(!Or(o)||!o.isSimpleText())return Pc(e),void n(null,e.getURL())}const i=e.getTextContent(),s=Sc(i,t);if(null===s||s.text!==i)return Pc(e),void n(null,e.getURL());if(!Ac(e)||!Lc(e))return Pc(e),void n(null,e.getURL());const a=e.getURL();if(a!==s.url&&(e.setURL(s.url),n(s.url,a)),s.attributes){const t=e.getRel();t!==s.attributes.rel&&(e.setRel(s.attributes.rel||null),n(s.attributes.rel||null,t));const r=e.getTarget();r!==s.attributes.target&&(e.setTarget(s.attributes.target||null),n(s.attributes.target||null,r))}}function Pc(e){const t=e.getChildren();for(let n=t.length-1;n>=0;n--)e.insertAfter(t[n]);return e.remove(),t.map(e=>e.getLatest())}const Ic={changeHandlers:[],matchers:[]};function zc(e,t=Ic){const{matchers:n,changeHandlers:r}=t,o=(e,t)=>{for(const n of r)n(e,t)};return Ka(e.registerNodeTransform(Sr,e=>{const t=e.getParentOrThrow(),r=e.getPreviousSibling();if(vc(t)&&!t.getIsUnlinked())Oc(t,n,o);else if(!hc(t)){if(e.isSimpleText()&&(Tc(e.getTextContent())||!vc(r))){const t=function(e){const t=[e];let n=e.getNextSibling();for(;null!==n&&Or(n)&&n.isSimpleText()&&(t.push(n),!/[\s]/.test(n.getTextContent()));)n=n.getNextSibling();return t}(e);!function(e,t,n){for(const t of e){const e=t.getParent();if(vc(e)&&!e.getIsUnlinked())return}let r=[...e];const o=r.map(e=>e.getTextContent()).join("");let i,s=o,a=0;for(;(i=Sc(s,t))&&null!==i;){const e=i.index,t=e+i.length;if(Mc(a+e,a+t,o,r)){const[o,,l,c]=Rc(r,a+e,a+t);let u=!1;for(const e of l){const t=e.getParent();if(vc(t)&&!t.getIsUnlinked()){u=!0;break}}if(u){a+=t,s=s.substring(t);continue}const d=Nc(l,a+e-o,a+t-o,i);r=d?[d,...c]:c,n(i.url,null),a=0}else a+=t;s=s.substring(t)}}(t,n,o)}!function(e,t,n){const r=e.getParent(),o=e.getPreviousSibling(),i=e.getNextSibling(),s=e.getTextContent();if(!vc(r)||r.getIsUnlinked()){if(vc(o)&&!o.getIsUnlinked()&&o.is(e.getPreviousSibling())&&e.getParent()===o.getParent()){if(!Tc(s))return Pc(o),void n(null,o.getURL());if(a=s,o.isEmailURI()?/^\.[a-zA-Z]{2,}/.test(a):/^\.[a-zA-Z0-9]{1,}/.test(a)){const r=o.getTextContent()+s,i=Sc(r,t);null!==i&&i.text===r&&(o.append(e),Oc(o,t,n),n(null,o.getURL()))}}var a;!vc(i)||i.getIsUnlinked()||Ec(s)||i.is(e.getNextSibling())&&e.getParent()===i.getParent()&&(Pc(i),n(null,i.getURL()))}}(e,n,o)}}),e.registerCommand(bc,e=>{const t=ao();if(null!==e||!Wr(t))return!1;return t.extract().forEach(e=>{const t=e.getParent();vc(t)&&(t.setIsUnlinked(!t.getIsUnlinked()),t.markDirty())}),!1},1))}function jc(e){throw new Error(e)}function Dc(e){let t=1,n=e.getParent();for(;null!=n;){if(nu(n)){const e=n.getParent();if(cu(e)){t++,n=e.getParent();continue}jc("A ListItemNode must have a ListNode for a parent.")}return t}return t}function Fc(e){let t=e.getParent();cu(t)||jc("A ListItemNode must have a ListNode for a parent.");let n=t;for(;null!==n;)n=n.getParent(),cu(n)&&(t=n);return t}function Bc(e){let t=[];const n=e.getChildren().filter(nu);for(let e=0;e<n.length;e++){const r=n[e],o=r.getFirstChild();cu(o)?t=t.concat(Bc(o)):t.push(r)}return t}function $c(e){return nu(e)&&cu(e.getFirstChild())}function Hc(e){return tu().append(e)}function Wc(e,t){return nu(e)&&(0===t.length||1===t.length&&e.is(t[0])&&0===e.getChildrenSize())}function Kc(e){const t=ao();if(null!==t){let n=t.getNodes();if(Wr(t)){const r=t.getStartEndPoints();null===r&&jc("insertList: anchor should be defined");const[o]=r,i=o.getNode(),s=i.getParent();if(_s(i)){const e=i.getFirstChild();if(e)n=e.selectStart().getNodes();else{const e=ai();i.append(e),n=e.select().getNodes()}}else if(Wc(i,n)){const t=lu(e);if(_s(s)){i.replace(t);const e=tu();Vo(i)&&(e.setFormat(i.getFormatType()),e.setIndent(i.getIndent())),t.append(e)}else if(nu(i)){const e=i.getParentOrThrow();Uc(t,e.getChildren()),e.replace(t)}return}}const r=new Set;for(let t=0;t<n.length;t++){const o=n[t];if(Vo(o)&&o.isEmpty()&&!nu(o)&&!r.has(o.getKey())){Gc(o,e);continue}let i=Oi(o)?o.getParent():nu(o)&&o.isEmpty()?o:null;for(;null!=i;){const t=i.getKey();if(cu(i)){if(!r.has(t)){const n=lu(e);Uc(n,i.getChildren()),i.replace(n),r.add(t)}break}{const n=i.getParent();if(_s(n)&&!r.has(t)){r.add(t),Gc(i,e);break}i=n}}}}}function Uc(e,t){e.splice(e.getChildrenSize(),0,t)}function Gc(e,t){if(cu(e))return e;const n=e.getPreviousSibling(),r=e.getNextSibling(),o=tu();let i;if(Uc(o,e.getChildren()),cu(n)&&t===n.getListType())n.append(o),cu(r)&&t===r.getListType()&&(Uc(n,r.getChildren()),r.remove()),i=n;else if(cu(r)&&t===r.getListType())r.getFirstChildOrThrow().insertBefore(o),i=r;else{const n=lu(t);n.append(o),e.replace(n),i=n}o.setFormat(e.getFormatType()),o.setIndent(e.getIndent());const s=ao();return Wr(s)&&(i.getKey()===s.anchor.key&&s.anchor.set(o.getKey(),s.anchor.offset,"element"),i.getKey()===s.focus.key&&s.focus.set(o.getKey(),s.focus.offset,"element")),e.remove(),i}function Yc(e,t){const n=e.getLastChild(),r=t.getFirstChild();n&&r&&$c(n)&&$c(r)&&(Yc(n.getFirstChild(),r.getFirstChild()),r.remove());const o=t.getChildren();o.length>0&&e.append(...o),t.remove()}function Vc(e){const t="check"!==e.getListType();let n=e.getStart();for(const r of e.getChildren())nu(r)&&(r.getValue()!==n&&r.setValue(n),t&&null!=r.getLatest().__checked&&r.setChecked(void 0),cu(r.getFirstChild())||n++)}function Jc(e){const t=new Set;if($c(e)||t.has(e.getKey()))return;const n=e.getParent(),r=e.getNextSibling(),o=e.getPreviousSibling();if($c(r)&&$c(o)){const n=o.getFirstChild();if(cu(n)){n.append(e);const o=r.getFirstChild();if(cu(o)){Uc(n,o.getChildren()),r.remove(),t.add(r.getKey())}}}else if($c(r)){const t=r.getFirstChild();if(cu(t)){const n=t.getFirstChild();null!==n&&n.insertBefore(e)}}else if($c(o)){const t=o.getFirstChild();cu(t)&&t.append(e)}else if(cu(n)){const t=tu().setTextFormat(e.getTextFormat()).setTextStyle(e.getTextStyle()),i=lu(n.getListType()).setTextFormat(n.getTextFormat()).setTextStyle(n.getTextStyle());t.append(i),i.append(e),o?o.insertAfter(t):r?r.insertBefore(t):n.append(t)}}function qc(e){if($c(e))return;const t=e.getParent(),n=t?t.getParent():void 0;if(cu(n?n.getParent():void 0)&&nu(n)&&cu(t)){const r=t?t.getFirstChild():void 0,o=t?t.getLastChild():void 0;if(e.is(r))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(o))n.insertAfter(e),t.isEmpty()&&n.remove();else{const r=t.getListType(),o=tu(),i=lu(r);o.append(i),e.getPreviousSiblings().forEach(e=>i.append(e));const s=tu(),a=lu(r);s.append(a),Uc(a,e.getNextSiblings()),n.insertBefore(o),n.insertAfter(s),n.replace(e)}}}function Xc(){const e=ao();if(!Wr(e)||!e.isCollapsed())return!1;const t=e.anchor.getNode();let n=null;if(nu(t)&&0===t.getChildrenSize())n=t;else if(Or(t)){const e=t.getParent();nu(e)&&e.getChildren().every(e=>Or(e)&&""===e.getTextContent().trim())&&(n=e)}if(null===n)return!1;const r=Fc(n),o=n.getParent();cu(o)||jc("A ListItemNode must have a ListNode for a parent.");const i=o.getParent();let s;if(_s(i))s=ai(),r.insertAfter(s);else{if(!nu(i))return!1;s=tu(),i.insertAfter(s)}s.setTextStyle(e.style).setTextFormat(e.format).select();const a=n.getNextSiblings();if(a.length>0){const e=lu(o.getListType());if(nu(s)){const t=tu();t.append(e),s.insertAfter(t)}else s.insertAfter(e);e.append(...a)}return function(e){let t=e;for(;null==t.getNextSibling()&&null==t.getPreviousSibling();){const e=t.getParent();if(null==e||!nu(e)&&!cu(e))break;t=e}t.remove()}(n),!0}class Qc extends Yo{__value;__checked;$config(){return this.config("listitem",{$transform:e=>{if(null==e.__checked)return;const t=e.getParent();cu(t)&&"check"!==t.getListType()&&null!=e.getChecked()&&e.setChecked(void 0)},extends:Yo,importDOM:{li:()=>({conversion:Zc,priority:0})}})}constructor(e=1,t=void 0,n){super(n),this.__value=void 0===e?1:e,this.__checked=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__value=e.__value,this.__checked=e.__checked}createDOM(e){const t=document.createElement("li");return this.updateListItemDOM(null,t,e),t}updateListItemDOM(e,t,n){!function(e,t,n){const r=t.getParent();!cu(r)||"check"!==r.getListType()||cu(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"))}(t,this,e),t.value=this.__value,function(e,t,n){const r=[],o=[],i=t.list,s=i?i.listitem:void 0;let a;i&&i.nested&&(a=i.nested.listitem);void 0!==s&&r.push(...$a(s));if(i){const e=n.getParent(),t=cu(e)&&"check"===e.getListType(),s=n.getChecked();t&&!s||o.push(i.listitemUnchecked),t&&s||o.push(i.listitemChecked),t&&r.push(s?i.listitemChecked:i.listitemUnchecked)}if(void 0!==a){const e=$a(a);n.getChildren().some(e=>cu(e))?r.push(...e):o.push(...e)}o.length>0&&Wa(e,...o);r.length>0&&Ha(e,...r)}(t,n.theme,this);const r=e?e.__style:"",o=this.__style;r!==o&&(""===o?t.removeAttribute("style"):t.style.cssText=o),function(e,t,n){const r=Va(t.__textStyle);for(const t in r)e.style.setProperty(`--listitem-marker-${t}`,r[t]);if(n)for(const t in Va(n.__textStyle))t in r||e.style.removeProperty(`--listitem-marker-${t}`)}(t,this,e)}updateDOM(e,t,n){const r=t;return this.updateListItemDOM(e,r,n),!1}updateFromJSON(e){return super.updateFromJSON(e).setValue(e.value).setChecked(e.checked)}exportDOM(e){const t=this.createDOM(e._config),n=this.getFormatType();n&&(t.style.textAlign=n);const r=this.getDirection();return r&&(t.dir=r),{element:t}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...e){for(let t=0;t<e.length;t++){const n=e[t];if(Vo(n)&&this.canMergeWith(n)){const e=n.getChildren();this.append(...e),n.remove()}else super.append(n)}return this}replace(e,t){if(nu(e))return super.replace(e);this.setIndent(0);const n=this.getParentOrThrow();if(!cu(n))return e;if(n.__first===this.getKey())n.insertBefore(e);else if(n.__last===this.getKey())n.insertAfter(e);else{const t=lu(n.getListType());let r=this.getNextSibling();for(;r;){const e=r;r=r.getNextSibling(),t.append(e)}n.insertAfter(e),e.insertAfter(t)}return t&&(Vo(e)||jc("includeChildren should only be true for ElementNodes"),this.getChildren().forEach(t=>{e.append(t)})),this.remove(),0===n.getChildrenSize()&&n.remove(),e}insertAfter(e,t=!0){const n=this.getParentOrThrow();if(cu(n)||jc("insertAfter: list node is not parent of list item node"),nu(e))return super.insertAfter(e,t);const r=this.getNextSiblings();if(n.insertAfter(e,t),0!==r.length){const o=lu(n.getListType());r.forEach(e=>o.append(e)),e.insertAfter(o,t)}return e}remove(e){const t=this.getPreviousSibling(),n=this.getNextSibling();super.remove(e),t&&n&&$c(t)&&$c(n)&&(Yc(t.getFirstChild(),n.getFirstChild()),n.remove())}insertNewAfter(e,t=!0){const n=tu().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(n,t),n}collapseAtStart(e){const t=ai();this.getChildren().forEach(e=>t.append(e));const n=this.getParentOrThrow(),r=n.getParentOrThrow(),o=nu(r);if(1===n.getChildrenSize())if(o)n.remove(),r.select();else{n.insertBefore(t),n.remove();const r=e.anchor,o=e.focus,i=t.getKey();"element"===r.type&&r.getNode().is(this)&&r.set(i,r.offset,"element"),"element"===o.type&&o.getNode().is(this)&&o.set(i,o.offset,"element")}else n.insertBefore(t),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(e){const t=this.getWritable();return t.__value=e,t}getChecked(){const e=this.getLatest();let t;const n=this.getParent();return cu(n)&&(t=n.getListType()),"check"===t?Boolean(e.__checked):void 0}setChecked(e){const t=this.getWritable();return t.__checked=e,t}toggleChecked(){const e=this.getWritable();return e.setChecked(!e.__checked)}getIndent(){const e=this.getParent();if(null===e||!this.isAttached())return this.getLatest().__indent;let t=e.getParentOrThrow(),n=0;for(;nu(t);)t=t.getParentOrThrow().getParentOrThrow(),n++;return n}setIndent(e){"number"!=typeof e&&jc("Invalid indent value."),(e=Math.floor(e))>=0||jc("Indent value must be non-negative.");let t=this.getIndent();for(;t!==e;)t<e?(Jc(this),t++):(qc(this),t--);return this}canInsertAfter(e){return nu(e)}canReplaceWith(e){return nu(e)}canMergeWith(e){return nu(e)||li(e)}extractWithChild(e,t){if(!Wr(t))return!1;const n=t.anchor.getNode(),r=t.focus.getNode();return this.isParentOf(n)&&this.isParentOf(r)&&this.getTextContent().length===t.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return lu("bullet")}canMergeWhenEmpty(){return!0}}function Zc(e){if(e.classList.contains("task-list-item"))for(const t of e.children)if("INPUT"===t.tagName)return eu(t);if(e.classList.contains("joplin-checkbox"))for(const t of e.children)if(t.classList.contains("checkbox-wrapper")&&t.children.length>0&&"INPUT"===t.children[0].tagName)return eu(t.children[0]);const t=e.getAttribute("aria-checked");return{node:tu("true"===t||"false"!==t&&void 0)}}function eu(e){if(!("checkbox"===e.getAttribute("type")))return{node:null};return{node:tu(e.hasAttribute("checked"))}}function tu(e){return Ss(new Qc(void 0,e))}function nu(e){return e instanceof Qc}class ru extends Yo{__tag;__start;__listType;$config(){return this.config("list",{$transform:e=>{!function(e){const t=e.getNextSibling();cu(t)&&e.getListType()===t.getListType()&&Yc(e,t)}(e),Vc(e)},extends:Yo,importDOM:{ol:()=>({conversion:su,priority:0}),ul:()=>({conversion:su,priority:0})}})}constructor(e="number",t=1,n){super(n);const r=au[e]||e;this.__listType=r,this.__tag="number"===r?"ol":"ul",this.__start=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__listType=e.__listType,this.__tag=e.__tag,this.__start=e.__start}getTag(){return this.getLatest().__tag}setListType(e){const t=this.getWritable();return t.__listType=e,t.__tag="number"===e?"ol":"ul",t}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(e){const t=this.getWritable();return t.__start=e,t}createDOM(e,t){const n=this.__tag,r=document.createElement(n);return 1!==this.__start&&r.setAttribute("start",String(this.__start)),r.__lexicalListType=this.__listType,ou(r,e.theme,this),r}updateDOM(e,t,n){return e.__tag!==this.__tag||e.__listType!==this.__listType||(ou(t,n.theme,this),!1)}updateFromJSON(e){return super.updateFromJSON(e).setListType(e.listType).setStart(e.start)}exportDOM(e){const t=this.createDOM(e._config,e);return Ls(t)&&(1!==this.__start&&t.setAttribute("start",String(this.__start)),"check"===this.__listType&&t.setAttribute("__lexicalListType","check")),{element:t}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(e,t,n){let r=n;for(let e=0;e<n.length;e++){const t=n[e];nu(t)||(r===n&&(r=[...n]),r[e]=tu().append(!Vo(t)||cu(t)||t.isInline()?t:Nr(t.getTextContent())))}return super.splice(e,t,r)}extractWithChild(e){return nu(e)}}function ou(e,t,n){const r=[],o=[],i=t.list;if(void 0!==i){const e=i[`${n.__tag}Depth`]||[],t=Dc(n)-1,s=t%e.length,a=e[s],l=i[n.__tag];let c;const u=i.nested,d=i.checklist;if(void 0!==u&&u.list&&(c=u.list),void 0!==l&&r.push(l),void 0!==d&&"check"===n.__listType&&r.push(d),void 0!==a){r.push(...$a(a));for(let t=0;t<e.length;t++)t!==s&&o.push(n.__tag+t)}if(void 0!==c){const e=$a(c);t>1?r.push(...e):o.push(...e)}}o.length>0&&Wa(e,...o),r.length>0&&Ha(e,...r)}function iu(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];if(nu(r)){t.push(r);const e=r.getChildren();e.length>1&&e.forEach(e=>{cu(e)&&t.push(Hc(e))})}else t.push(Hc(r))}return t}function su(e){const t=e.nodeName.toLowerCase();let n=null;if("ol"===t){n=lu("number",e.start)}else"ul"===t&&(n=function(e){if("check"===e.getAttribute("__lexicallisttype")||e.classList.contains("contains-task-list")||"1"===e.getAttribute("data-is-checklist"))return!0;for(const t of e.childNodes)if(Ls(t)&&t.hasAttribute("aria-checked"))return!0;return!1}(e)?lu("check"):lu("bullet"));return{after:iu,node:n}}const au={ol:"number",ul:"bullet"};function lu(e="number",t=1){return Ss(new ru(e,t))}function cu(e){return e instanceof ru}const uu=kt("UPDATE_LIST_START_COMMAND"),du=kt("INSERT_UNORDERED_LIST_COMMAND"),fu=kt("INSERT_ORDERED_LIST_COMMAND"),pu=kt("REMOVE_LIST_COMMAND");function hu(e){const t=Ka(e.registerCommand(fu,()=>(Kc("number"),!0),1),e.registerCommand(uu,e=>{const{listNodeKey:t,newStart:n}=e,r=Fi(t);return!!cu(r)&&("number"===r.getListType()&&(r.setStart(n),Vc(r)),!0)},1),e.registerCommand(du,()=>(Kc("bullet"),!0),1),e.registerCommand(pu,()=>(function(){const e=ao();if(Wr(e)){const t=new Set,n=e.getNodes(),r=e.anchor.getNode();if(Wc(r,n))t.add(Fc(r));else for(let e=0;e<n.length;e++){const r=n[e];if(Oi(r)){const e=hl(r,Qc);null!=e&&t.add(Fc(e))}}for(const n of t){let t=n;const r=Bc(n);for(const n of r){const r=ai().setTextStyle(e.style).setTextFormat(e.format);Uc(r,n.getChildren()),t.insertAfter(r),t=r,n.__key===e.anchor.key&&Ea(e.anchor,Oa(fa(r,"next"))),n.__key===e.focus.key&&Ea(e.focus,Oa(fa(r,"next"))),n.remove()}n.remove()}}}(),!0),1),e.registerCommand(Pt,()=>Xc(),1),e.registerNodeTransform(Qc,e=>{const t=e.getFirstChild();if(t){if(Or(t)){const n=t.getStyle(),r=t.getFormat();e.getTextStyle()!==n&&e.setTextStyle(n),e.getTextFormat()!==r&&e.setTextFormat(r)}}else{const t=ao();Wr(t)&&(t.style!==e.getTextStyle()||t.format!==e.getTextFormat())&&t.isCollapsed()&&e.is(t.anchor.getNode())&&e.setTextStyle(t.style).setTextFormat(t.format)}}),e.registerNodeTransform(Sr,e=>{const t=e.getParent();if(nu(t)&&e.is(t.getFirstChild())){const n=e.getStyle(),r=e.getFormat();n===t.getTextStyle()&&r===t.getTextFormat()||t.setTextStyle(n).setTextFormat(r)}}));return t}function gu(e){const t=e=>{const t=e.getParent();if(cu(e.getFirstChild())||!cu(t))return;const n=Ys(e,e=>nu(e)&&cu(e.getParent())&&nu(e.getPreviousSibling()));if(null===n&&e.getIndent()>0)e.setIndent(0);else if(nu(n)){const r=n.getPreviousSibling();if(nu(r)){const n=function(e){let t=e,n=t.getFirstChild();for(;cu(n);){const e=n.getLastChild();if(!nu(e))break;t=e,n=t.getFirstChild()}return t}(r),o=n.getParent();if(cu(o)){const n=Dc(o);n+1<Dc(t)&&e.setIndent(n)}}}};return e.registerNodeTransform(ru,e=>{const n=[e];for(;n.length>0;){const e=n.shift();if(cu(e))for(const r of e.getChildren())if(nu(r)){t(r);const e=r.getFirstChild();cu(e)&&n.push(e)}}})}const mu=v(null);function vu(){const e=b(mu);return null==e&&function(e){throw new Error(e)}("LexicalComposerContext.useLexicalComposerContext: cannot find a LexicalComposerContext"),e}var bu,yu,xu={exports:{}},_u={};var wu=(yu||(yu=1,xu.exports=function(){if(bu)return _u;bu=1;var e=y,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 s(e,n,s){var a,l={},c=null,u=null;for(a in void 0!==s&&(c=""+s),void 0!==n.key&&(c=""+n.key),void 0!==n.ref&&(u=n.ref),n)r.call(n,a)&&!i.hasOwnProperty(a)&&(l[a]=n[a]);if(e&&e.defaultProps)for(a in n=e.defaultProps)void 0===l[a]&&(l[a]=n[a]);return{$$typeof:t,type:e,key:c,ref:u,props:l,_owner:o.current}}return _u.Fragment=n,_u.jsx=s,_u.jsxs=s,_u}()),xu.exports);const Su="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,ku=Su?_:w,Cu={tag:ar};function Eu({initialConfig:e,children:t}){const n=x(()=>{const{theme:t,namespace:n,nodes:r,onError:o,editorState:i,html:s}=e,a=function(e,t){return{getTheme:function(){return null!=t?t:null}}}(0,t),l=fi({editable:e.editable,html:s,namespace:n,nodes:r,onError:e=>o(e,l),theme:t});return function(e,t){if(null===t)return;if(void 0===t)e.update(()=>{const t=Ui();if(t.isEmpty()){const n=ai();t.append(n);const r=Su?document.activeElement:null;(null!==ao()||null!==r&&r===e.getRootElement())&&n.select()}},Cu);else if(null!==t)switch(typeof t){case"string":{const n=e.parseEditorState(t);e.setEditorState(n,Cu);break}case"object":e.setEditorState(t,Cu);break;case"function":e.update(()=>{Ui().isEmpty()&&t(e)},Cu)}}(l,i),[l,a]},[]);return ku(()=>{const t=e.editable,[r]=n;r.setEditable(void 0===t||t)},[]),wu.jsx(mu.Provider,{value:n,children:t})}function Tu(e,t,n,r,o){if(null===e||0===n.size&&0===r.size&&!o)return 0;const i=t._selection,s=e._selection;if(o)return 1;if(!(Wr(i)&&Wr(s)&&s.isCollapsed()&&i.isCollapsed()))return 0;const a=function(e,t,n){const r=e._nodeMap,o=[];for(const e of t){const t=r.get(e);void 0!==t&&o.push(t)}for(const[e,t]of n){if(!t)continue;const n=r.get(e);void 0===n||Zo(n)||o.push(n)}return o}(t,n,r);if(0===a.length)return 0;if(a.length>1){const n=t._nodeMap,r=n.get(i.anchor.key),o=n.get(s.anchor.key);return r&&o&&!e._nodeMap.has(r.__key)&&Or(r)&&1===r.__text.length&&1===i.anchor.offset?2:0}const l=a[0],c=e._nodeMap.get(l.__key);if(!Or(c)||!Or(l)||c.__mode!==l.__mode)return 0;const u=c.__text,d=l.__text;if(u===d)return 0;const f=i.anchor,p=s.anchor;if(f.key!==p.key||"text"!==f.type)return 0;const h=f.offset,g=p.offset,m=d.length-u.length;return 1===m&&g===h-1?2:-1===m&&g===h+1?3:-1===m&&g===h?4:0}function Au(e,t){let n=Date.now(),r=0;return(o,i,s,a,l,c)=>{const u=Date.now();if(c.has(sr))return r=0,n=u,2;const d=Tu(o,i,a,l,e.isComposing()),f=(()=>{const f=null===s||s.editor===e,p=c.has("history-push");if(!p&&f&&c.has(ar))return 0;if(null===o)return 1;const h=i._selection;if(!(a.size>0||l.size>0))return null!==h?0:2;const g="number"==typeof t?t:t.peek();if(!1===p&&0!==d&&d===r&&u<n+g&&f)return 0;if(1===a.size){if(function(e,t,n){const r=t._nodeMap.get(e),o=n._nodeMap.get(e),i=t._selection,s=n._selection;return!(Wr(i)&&Wr(s)&&"element"===i.anchor.type&&"element"===i.focus.type&&"text"===s.anchor.type&&"text"===s.focus.type||!Or(r)||!Or(o)||r.__parent!==o.__parent)&&JSON.stringify(t.read(()=>r.exportJSON()))===JSON.stringify(n.read(()=>o.exportJSON()))}(Array.from(a)[0],o,i))return 0}return 1})();return n=u,r=d,f}}function Lu(e){e.undoStack=[],e.redoStack=[],e.current=null}function Mu(e,t,n){const r=Au(e,n),o=Ka(e.registerCommand($t,()=>(function(e,t){const n=t.redoStack,r=t.undoStack;if(0!==r.length){const o=t.current,i=r.pop();null!==o&&(n.push(o),e.dispatchCommand(mn,!0)),0===r.length&&e.dispatchCommand(vn,!1),t.current=i||null,i&&i.editor.setEditorState(i.editorState,{tag:sr})}}(e,t),!0),ci),e.registerCommand(Ht,()=>(function(e,t){const n=t.redoStack,r=t.undoStack;if(0!==n.length){const o=t.current;null!==o&&(r.push(o),e.dispatchCommand(vn,!0));const i=n.pop();0===n.length&&e.dispatchCommand(mn,!1),t.current=i||null,i&&i.editor.setEditorState(i.editorState,{tag:sr})}}(e,t),!0),ci),e.registerCommand(hn,()=>(Lu(t),!1),ci),e.registerCommand(gn,()=>(Lu(t),e.dispatchCommand(mn,!1),e.dispatchCommand(vn,!1),!0),ci),e.registerUpdateListener(({editorState:n,prevEditorState:o,dirtyLeaves:i,dirtyElements:s,tags:a})=>{const l=t.current,c=t.redoStack,u=t.undoStack,d=null===l?null:l.editorState;if(null!==l&&n===d)return;const f=r(o,n,l,i,s,a);if(1===f)0!==c.length&&(t.redoStack=[],e.dispatchCommand(mn,!1)),null!==l&&(u.push({...l}),e.dispatchCommand(vn,!0));else if(2===f)return;t.current={editor:e,editorState:n}}));return o}function Ru({delay:e,externalHistoryState:t}){const[n]=vu();return function(e,t,n=1e3){const r=x(()=>t||{current:null,redoStack:[],undoStack:[]},[t]);w(()=>Mu(e,r,n),[n,e,r])}(n,t,e),null}function Nu({hasStrictIndent:e=!1}){const[t]=vu();return w(()=>{if(!t.hasNodes([ru,Qc]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[t]),w(()=>{if(e)return gu(t)},[t,e]),function(e){w(()=>hu(e),[e])}(t),null}function Ou({maxIndent:e}){const[t]=vu();return w(()=>cc(t,e),[t,e]),null}function Pu(e,t){const n=Mi(t)?t.body.childNodes:t.childNodes;let r=[];const o=[];for(const t of n)if(!zu.has(t.nodeName)){const n=ju(t,e,o,!1);null!==n&&(r=r.concat(n))}return function(e){for(const t of e)t.getNextSibling()instanceof oi&&t.insertAfter(hr());for(const t of e){const e=t.getChildren();for(const n of e)t.insertBefore(n);t.remove()}}(o),r}function Iu(e,t,n,r=null){let o=null===r||t.isSelected(r);const i=Vo(t)&&t.excludeFromCopy("html");let s=t;null!==r&&Or(t)&&(s=Qa(r,t,"clone"));const a=Vo(s)?s.getChildren():[],l=yi(e,s.getType());let c;c=l&&void 0!==l.exportDOM?l.exportDOM(e,s):s.exportDOM(e);const{element:u,after:d}=c;if(!u)return!1;const f=document.createDocumentFragment();for(let n=0;n<a.length;n++){const i=a[n],s=Iu(e,i,f,r);!o&&Vo(t)&&s&&t.extractWithChild(i,r,"html")&&(o=!0)}if(o&&!i){if((Ls(u)||Rs(u))&&u.append(f),n.append(u),d){const e=d.call(s,u);e&&(Rs(u)?u.replaceChildren(e):u.replaceWith(e))}}else n.append(f);return o}const zu=new Set(["STYLE","SCRIPT"]);function ju(e,t,n,r,o=new Map,i){let s=[];if(zu.has(e.nodeName))return s;let a=null;const l=function(e,t){const{nodeName:n}=e,r=t._htmlConversions.get(n.toLowerCase());let o=null;if(void 0!==r)for(const t of r){const n=t(e);null!==n&&(null===o||(o.priority||0)<=(n.priority||0))&&(o=n)}return null!==o?o.conversion:null}(e,t),c=l?l(e):null;let u=null;if(null!==c){u=c.after;const t=c.node;if(a=Array.isArray(t)?t[t.length-1]:t,null!==a){for(const[,e]of o)if(a=e(a,i),!a)break;a&&s.push(...Array.isArray(t)?t:[a])}null!=c.forChild&&o.set(e.nodeName,c.forChild)}const d=e.childNodes;let f=[];const p=(null==a||!_s(a))&&(null!=a&&to(a)||r);for(let e=0;e<d.length;e++)f.push(...ju(d[e],t,n,p,new Map(o),a));return null!=u&&(f=u(f)),Os(e)&&(f=Du(e,f,p?()=>{const e=new oi;return n.push(e),e}:ai)),null==a?f.length>0?s=s.concat(f):Os(e)&&function(e){if(null==e.nextSibling||null==e.previousSibling)return!1;return Ns(e.nextSibling)&&Ns(e.previousSibling)}(e)&&(s=s.concat(hr())):Vo(a)&&a.append(...f),s}function Du(e,t,n){const r=e.style.textAlign,o=[];let i=[];for(let e=0;e<t.length;e++){const s=t[e];if(to(s))r&&!s.getFormat()&&s.setFormat(r),o.push(s);else if(i.push(s),e===t.length-1||e<t.length-1&&to(t[e+1])){const e=n();e.setFormat(r),e.append(...i),o.push(e),i=[]}}return o}function Fu(e){throw new Error(e)}function Bu(e,t,n){const r=e.getData("application/x-lexical-editor");if(r)try{const e=JSON.parse(r);if(e.namespace===n._config.namespace&&Array.isArray(e.nodes)){const r=function(e){const t=[];for(let n=0;n<e.length;n++){const r=zo(e[n]);Or(r)&&el(r),t.push(r)}return t}(e.nodes);return $u(n,r,t)}}catch(e){console.error(e)}const o=e.getData("text/html"),i=e.getData("text/plain");if(o&&i!==o)try{const e=(new DOMParser).parseFromString(function(e){if(window.trustedTypes&&window.trustedTypes.createPolicy){return window.trustedTypes.createPolicy("lexical",{createHTML:e=>e}).createHTML(e)}return e}(o),"text/html");return $u(n,Pu(n,e),t)}catch(e){console.error(e)}const s=i||e.getData("text/uri-list");if(null!=s)if(Wr(t)){const e=s.split(/(\r?\n|\t)/);""===e[e.length-1]&&e.pop();for(let t=0;t<e.length;t++){const n=ao();if(Wr(n)){const r=e[t];"\n"===r||"\r\n"===r?n.insertParagraph():"\t"===r?n.insertNodes([zr()]):n.insertText(r)}}}else t.insertRawText(s)}function $u(e,t,n){e.dispatchCommand(Et,{nodes:t,selection:n})||(n.insertNodes(t),function(e){if(Wr(e)&&e.isCollapsed()){let t=null;const n=Ca(e.anchor,"previous");if(n)if(na(n))t=n.origin;else{const e=ba(n,fa(Ui(),"next").getFlipped());for(const n of e){if(Or(n.origin)){t=n.origin;break}if(Vo(n.origin)&&!n.origin.isInline())break}}if(t&&Or(t)){const n=t.getFormat(),r=t.getStyle();e.format===n&&e.style===r||(e.format=n,e.style=r,e.dirty=!0)}}}(n))}function Hu(e,t,n,r=[]){let o=null===t||n.isSelected(t);const i=Vo(n)&&n.excludeFromCopy("html");let s=n;null!==t&&Or(s)&&(s=Qa(t,s,"clone"));const a=Vo(s)?s.getChildren():[],l=function(e){const t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&Fu(`LexicalNode: Node ${n.name} does not implement .exportJSON().`),Vo(e)){const e=t.children;Array.isArray(e)||Fu(`LexicalNode: Node ${n.name} is an element but .exportJSON() does not have a children array.`)}return t}(s);Or(s)&&0===s.getTextContentSize()&&(o=!1);for(let r=0;r<a.length;r++){const i=a[r],s=Hu(e,t,i,l.children);!o&&Vo(n)&&s&&n.extractWithChild(i,t,"clone")&&(o=!0)}if(o&&!i)r.push(l);else if(Array.isArray(l.children))for(let e=0;e<l.children.length;e++){const t=l.children[e];r.push(t)}return o}let Wu=null;async function Ku(e,t,n){if(null!==Wu)return!1;if(null!==t)return new Promise((r,o)=>{e.update(()=>{r(Uu(e,t,n))})});const r=e.getRootElement(),o=e._window||window,i=o.document,s=Ts(o);if(null===r||null===s)return!1;const a=i.createElement("span");a.style.cssText="position: fixed; top: -1000px;",a.append(i.createTextNode("#")),r.append(a);const l=new Range;return l.setStart(a,0),l.setEnd(a,1),s.removeAllRanges(),s.addRange(l),new Promise((t,r)=>{const s=e.registerCommand(dn,r=>(vl(r,ClipboardEvent)&&(s(),null!==Wu&&(o.clearTimeout(Wu),Wu=null),t(Uu(e,r,n))),!0),4);Wu=o.setTimeout(()=>{s(),Wu=null,t(!1)},50),i.execCommand("copy"),a.remove()})}function Uu(e,t,n){if(void 0===n){const t=Ts(e._window),r=ao();if(!r||r.isCollapsed())return!1;if(!t)return!1;const o=t.anchorNode,i=t.focusNode;if(null!==o&&null!==i&&!Si(e,o,i))return!1;n=Yu(r)}t.preventDefault();const r=t.clipboardData;return null!==r&&(function(e,t){for(const[n]of Gu)void 0===t[n]&&e.setData(n,"");for(const n in t){const r=t[n];void 0!==r&&e.setData(n,r)}}(r,n),!0)}const Gu=[["text/html",function(e,t=ao()){return null==t&&Fu("Expected valid LexicalSelection"),Wr(t)&&t.isCollapsed()||0===t.getNodes().length?"":function(e,t){if("undefined"==typeof document||"undefined"==typeof window&&void 0===global.window)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const n=document.createElement("div"),r=Ui().getChildren();for(let o=0;o<r.length;o++)Iu(e,r[o],n,t);return n.innerHTML}(e,t)}],["application/x-lexical-editor",function(e,t=ao()){return null==t&&Fu("Expected valid LexicalSelection"),Wr(t)&&t.isCollapsed()||0===t.getNodes().length?null:JSON.stringify(function(e,t){const n=[],r=Ui().getChildren();for(let o=0;o<r.length;o++){Hu(e,t,r[o],n)}return{namespace:e._config.namespace,nodes:n}}(e,t))}]];function Yu(e=ao()){const t={"text/plain":e?e.getTextContent():""};if(e){const n=Is();for(const[r,o]of Gu){const i=o(n,e);null!==i&&(t[r]=i)}}return t}function Vu(e,t){if(void 0!==document.caretRangeFromPoint){const n=document.caretRangeFromPoint(e,t);return null===n?null:{node:n.startContainer,offset:n.startOffset}}if("undefined"!==document.caretPositionFromPoint){const n=document.caretPositionFromPoint(e,t);return null===n?null:{node:n.offsetNode,offset:n.offset}}return null}const Ju="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,qu=Ju&&"documentMode"in document?document.documentMode:null,Xu=Ju&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Qu=!(!Ju||!("InputEvent"in window)||qu)&&"getTargetRanges"in new window.InputEvent("input"),Zu=Ju&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),ed=Ju&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,td=Ju&&/^(?=.*Chrome).*/i.test(navigator.userAgent),nd=Ju&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&Xu&&!td,rd=kt("DRAG_DROP_PASTE_FILE");class od extends Yo{static getType(){return"quote"}static clone(e){return new od(e.__key)}createDOM(e){const t=document.createElement("blockquote");return Ha(t,e.theme.quote),t}updateDOM(e,t){return!1}static importDOM(){return{blockquote:e=>({conversion:ud,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(Ls(t)){this.isEmpty()&&t.append(document.createElement("br"));const e=this.getFormatType();e&&(t.style.textAlign=e);const n=this.getDirection();n&&(t.dir=n)}return{element:t}}static importJSON(e){return id().updateFromJSON(e)}insertNewAfter(e,t){const n=ai(),r=this.getDirection();return n.setDirection(r),this.insertAfter(n,t),n}collapseAtStart(){const e=ai();return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}canMergeWhenEmpty(){return!0}}function id(){return Ss(new od)}function sd(e){return e instanceof od}class ad extends Yo{__tag;static getType(){return"heading"}static clone(e){return new ad(e.__tag,e.__key)}constructor(e,t){super(t),this.__tag=e}getTag(){return this.__tag}setTag(e){const t=this.getWritable();return this.__tag=e,t}createDOM(e){const t=this.__tag,n=document.createElement(t),r=e.theme.heading;if(void 0!==r){Ha(n,r[t])}return n}updateDOM(e,t,n){return e.__tag!==this.__tag}static importDOM(){return{h1:e=>({conversion:cd,priority:0}),h2:e=>({conversion:cd,priority:0}),h3:e=>({conversion:cd,priority:0}),h4:e=>({conversion:cd,priority:0}),h5:e=>({conversion:cd,priority:0}),h6:e=>({conversion:cd,priority:0}),p:e=>{const t=e.firstChild;return null!==t&&ld(t)?{conversion:()=>({node:null}),priority:3}:null},span:e=>ld(e)?{conversion:e=>({node:dd("h1")}),priority:3}:null}}exportDOM(e){const{element:t}=super.exportDOM(e);if(Ls(t)){this.isEmpty()&&t.append(document.createElement("br"));const e=this.getFormatType();e&&(t.style.textAlign=e);const n=this.getDirection();n&&(t.dir=n)}return{element:t}}static importJSON(e){return dd(e.tag).updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTag(e.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(e,t=!0){const n=e?e.anchor.offset:0,r=this.getLastDescendant(),o=!r||e&&e.anchor.key===r.getKey()&&n===r.getTextContentSize()||!e?ai():dd(this.getTag()),i=this.getDirection();if(o.setDirection(i),this.insertAfter(o,t),0===n&&!this.isEmpty()&&e){const e=ai();e.select(),this.replace(e,!0)}return o}collapseAtStart(){const e=this.isEmpty()?ai():dd(this.getTag());return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}extractWithChild(){return!0}}function ld(e){return"span"===e.nodeName.toLowerCase()&&"26pt"===e.style.fontSize}function cd(e){const t=e.nodeName.toLowerCase();let n=null;return"h1"!==t&&"h2"!==t&&"h3"!==t&&"h4"!==t&&"h5"!==t&&"h6"!==t||(n=dd(t),null!==e.style&&($s(e,n),n.setFormat(e.style.textAlign))),{node:n}}function ud(e){const t=id();return null!==e.style&&(t.setFormat(e.style.textAlign),$s(e,t)),{node:t}}function dd(e="h1"){return Ss(new ad(e))}function fd(e){return e instanceof ad}function pd(e){let t=null;if(vl(e,DragEvent)?t=e.dataTransfer:vl(e,ClipboardEvent)&&(t=e.clipboardData),null===t)return[!1,[],!1];const n=t.types,r=n.includes("Files"),o=n.includes("text/html")||n.includes("text/plain");return[r,Array.from(t.files),o]}function hd(e){const t=ao();if(!Wr(t))return!1;const n=new Set,r=t.getNodes();for(let t=0;t<r.length;t++){const o=r[t],i=o.getKey();if(n.has(i))continue;const s=Ys(o,e=>Vo(e)&&!e.isInline());if(null===s)continue;const a=s.getKey();s.canIndent()&&!n.has(a)&&(n.add(a),e(s))}return n.size>0}function gd(e){return Xo(Hi(e))}function md(e){for(const t of["lowercase","uppercase","capitalize"])e.hasFormat(t)&&e.toggleFormat(t)}function vd(e){const t=Ka(e.registerCommand(Tt,e=>{const t=ao();return!!Ur(t)&&(t.clear(),!0)},ci),e.registerCommand(Nt,e=>{const t=ao();return Wr(t)?(t.deleteCharacter(e),!0):!!Ur(t)&&(t.deleteNodes(),!0)},ci),e.registerCommand(Dt,e=>{const t=ao();return!!Wr(t)&&(t.deleteWord(e),!0)},ci),e.registerCommand(Ft,e=>{const t=ao();return!!Wr(t)&&(t.deleteLine(e),!0)},ci),e.registerCommand(It,t=>{const n=ao();if("string"==typeof t)null!==n&&n.insertText(t);else{if(null===n)return!1;const r=t.dataTransfer;if(null!=r)Bu(r,n,e);else if(Wr(n)){const e=t.data;return e&&n.insertText(e),!0}}return!0},ci),e.registerCommand(jt,()=>{const e=ao();return!!Wr(e)&&(e.removeText(),!0)},ci),e.registerCommand(Bt,e=>{const t=ao();return!!Wr(t)&&(t.formatText(e),!0)},ci),e.registerCommand(an,e=>{const t=ao();if(!Wr(t)&&!Ur(t))return!1;const n=t.getNodes();for(const t of n){const n=Ys(t,e=>Vo(e)&&!e.isInline());null!==n&&n.setFormat(e)}return!0},ci),e.registerCommand(Ot,e=>{const t=ao();return!!Wr(t)&&(t.insertLineBreak(e),!0)},ci),e.registerCommand(Pt,()=>{const e=ao();return!!Wr(e)&&(e.insertParagraph(),!0)},ci),e.registerCommand(nn,()=>(mo([zr()]),!0),ci),e.registerCommand(rn,()=>hd(e=>{const t=e.getIndent();e.setIndent(t+1)}),ci),e.registerCommand(on,()=>hd(e=>{const t=e.getIndent();t>0&&e.setIndent(Math.max(0,t-1))}),ci),e.registerCommand(Vt,e=>{const t=ao();if(Ur(t)){const n=t.getNodes();if(n.length>0)return e.preventDefault(),n[0].selectPrevious(),!0}else if(Wr(t)){const n=fs(t.focus,!0);if(!e.shiftKey&&Xo(n)&&!n.isIsolated()&&!n.isInline())return n.selectPrevious(),e.preventDefault(),!0}return!1},ci),e.registerCommand(Jt,e=>{const t=ao();if(Ur(t)){const n=t.getNodes();if(n.length>0)return e.preventDefault(),n[0].selectNext(0,0),!0}else if(Wr(t)){if(function(e){const t=e.focus;return"root"===t.key&&t.offset===Ui().getChildrenSize()}(t))return e.preventDefault(),!0;const n=fs(t.focus,!1);if(!e.shiftKey&&Xo(n)&&!n.isIsolated()&&!n.isInline())return n.selectNext(),e.preventDefault(),!0}return!1},ci),e.registerCommand(Gt,e=>{const t=ao();if(Ur(t)){const n=t.getNodes();if(n.length>0)return e.preventDefault(),Xa(n[0])?n[0].selectNext(0,0):n[0].selectPrevious(),!0}if(!Wr(t))return!1;if(sl(t,!0)){const n=e.shiftKey;return e.preventDefault(),ll(t,n,!0),!0}return!1},ci),e.registerCommand(Kt,e=>{const t=ao();if(Ur(t)){const n=t.getNodes();if(n.length>0)return e.preventDefault(),Xa(n[0])?n[0].selectPrevious():n[0].selectNext(0,0),!0}if(!Wr(t))return!1;const n=e.shiftKey;return!!sl(t,!1)&&(e.preventDefault(),ll(t,n,!1),!0)},ci),e.registerCommand(Qt,t=>{if(gd(t.target))return!1;const n=ao();if(Wr(n)){if(function(e){if(!e.isCollapsed())return!1;const{anchor:t}=e;if(0!==t.offset)return!1;const n=t.getNode();if(Zo(n))return!1;const r=gl(n);return r.getIndent()>0&&(r.is(n)||n.is(r.getFirstDescendant()))}(n))return t.preventDefault(),e.dispatchCommand(on,void 0);if(ed&&"ko-KR"===navigator.language)return!1}else if(!Ur(n))return!1;return t.preventDefault(),e.dispatchCommand(Nt,!0)},ci),e.registerCommand(en,t=>{if(gd(t.target))return!1;const n=ao();return!(!Wr(n)&&!Ur(n))&&(t.preventDefault(),e.dispatchCommand(Nt,!1))},ci),e.registerCommand(qt,t=>{const n=ao();if(!Wr(n))return!1;if(md(n),null!==t){if((ed||Zu||nd)&&Qu)return!1;if(t.preventDefault(),t.shiftKey)return e.dispatchCommand(Ot,!1)}return e.dispatchCommand(Pt,void 0)},ci),e.registerCommand(Zt,()=>!!Wr(ao())&&(e.blur(),!0),ci),e.registerCommand(sn,t=>{const[,n]=pd(t);if(n.length>0){const r=Vu(t.clientX,t.clientY);if(null!==r){const{offset:t,node:o}=r,i=Hi(o);if(null!==i){const e=ro();if(Or(i))e.anchor.set(i.getKey(),t,"text"),e.focus.set(i.getKey(),t,"text");else{const t=i.getParentOrThrow().getKey(),n=i.getIndexWithinParent()+1;e.anchor.set(t,n,"element"),e.focus.set(t,n,"element")}Yi(He(e))}e.dispatchCommand(rd,n)}return t.preventDefault(),!0}return!!Wr(ao())},ci),e.registerCommand(ln,e=>{const[t]=pd(e),n=ao();return!(t&&!Wr(n))},ci),e.registerCommand(cn,e=>{const[t]=pd(e),n=ao();if(t&&!Wr(n))return!1;const r=Vu(e.clientX,e.clientY);if(null!==r){Xo(Hi(r.node))&&e.preventDefault()}return!0},ci),e.registerCommand(pn,()=>(function(e){const t=Ui();if(Wr(e)){const t=e.anchor,n=e.focus,r=t.getNode().getTopLevelElementOrThrow().getParentOrThrow();return t.set(r.getKey(),0,"element"),n.set(r.getKey(),r.getChildrenSize(),"element"),He(e),e}{const e=t.select(0,t.getChildrenSize());Yi(He(e))}}(),!0),ci),e.registerCommand(dn,t=>(Ku(e,vl(t,ClipboardEvent)?t:null),!0),ci),e.registerCommand(fn,t=>(async function(e,t){await Ku(t,vl(e,ClipboardEvent)?e:null),t.update(()=>{const e=ao();Wr(e)?e.removeText():Ur(e)&&e.getNodes().forEach(e=>e.remove())})}(t,e),!0),ci),e.registerCommand(zt,t=>{const[,n,r]=pd(t);if(n.length>0&&!r)return e.dispatchCommand(rd,n),!0;if(Ms(t.target)&&wi(t.target))return!1;return null!==ao()&&(function(e,t){e.preventDefault(),t.update(()=>{const n=ao(),r=vl(e,InputEvent)||vl(e,KeyboardEvent)?null:e.clipboardData;null!=r&&null!==n&&Bu(r,n,t)},{tag:"paste"})}(t,e),!0)},ci),e.registerCommand(Xt,e=>{const t=ao();return Wr(t)&&md(t),!1},ci),e.registerCommand(tn,e=>{const t=ao();return Wr(t)&&md(t),!1},ci));return t}function bd(e,t,n){w(()=>{e.hasNodes([gc])||function(e){throw new Error(e)}("LexicalAutoLinkPlugin: AutoLinkNode not registered on editor")}),w(()=>zc(e,{changeHandlers:n?[n]:[],matchers:t}),[e,t,n])}function yd({matchers:e,onChange:t}){const[n]=vu();return bd(n,e,t),null}const xd="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?_:w;function _d(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}function wd(){return function(e){const[t]=vu(),n=x(()=>e(t),[t,e]),[r,o]=S(()=>n.initialValueFn()),i=k(r);return xd(()=>{const{initialValueFn:e,subscribe:t}=n,r=e();return i.current!==r&&(i.current=r,o(r)),t(e=>{i.current=e,o(e)})},[n,e]),r}(_d)}const Sd={black:"#000",white:"#fff"},kd="#e57373",Cd="#ef5350",Ed="#f44336",Td="#d32f2f",Ad="#c62828",Ld="#f3e5f5",Md="#ce93d8",Rd="#ba68c8",Nd="#ab47bc",Od="#9c27b0",Pd="#7b1fa2",Id="#e3f2fd",zd="#90caf9",jd="#42a5f5",Dd="#1976d2",Fd="#1565c0",Bd="#4fc3f7",$d="#29b6f6",Hd="#03a9f4",Wd="#0288d1",Kd="#01579b",Ud="#81c784",Gd="#66bb6a",Yd="#4caf50",Vd="#388e3c",Jd="#2e7d32",qd="#1b5e20",Xd="#ffb74d",Qd="#ffa726",Zd="#ff9800",ef="#f57c00",tf="#e65100",nf={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 rf(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 of=Object.freeze({__proto__:null,default:rf}),sf="$$material";function af(){return af=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},af.apply(null,arguments)}function lf(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}var cf=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],n=64===e.charCodeAt(0)&&105===e.charCodeAt(1);if(n&&this._alreadyInsertedOrderInsensitiveRule&&console.error("You're attempting to insert the following rule:\n"+e+"\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."),this._alreadyInsertedOrderInsensitiveRule=this._alreadyInsertedOrderInsensitiveRule||!n,this.isSpeedy){var r=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{r.insertRule(e,r.cssRules.length)}catch(t){/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(e)||console.error('There was a problem inserting the following rule: "'+e+'"',t)}}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,this._alreadyInsertedOrderInsensitiveRule=!1},e}(),uf="-ms-",df="-moz-",ff="-webkit-",pf="comm",hf="rule",gf="decl",mf="@keyframes",vf=Math.abs,bf=String.fromCharCode,yf=Object.assign;function xf(e){return e.trim()}function _f(e,t,n){return e.replace(t,n)}function wf(e,t){return e.indexOf(t)}function Sf(e,t){return 0|e.charCodeAt(t)}function kf(e,t,n){return e.slice(t,n)}function Cf(e){return e.length}function Ef(e){return e.length}function Tf(e,t){return t.push(e),e}var Af=1,Lf=1,Mf=0,Rf=0,Nf=0,Of="";function Pf(e,t,n,r,o,i,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Af,column:Lf,length:s,return:""}}function If(e,t){return yf(Pf("",null,null,"",null,null,0),e,{length:-e.length},t)}function zf(){return Nf=Rf>0?Sf(Of,--Rf):0,Lf--,10===Nf&&(Lf=1,Af--),Nf}function jf(){return Nf=Rf<Mf?Sf(Of,Rf++):0,Lf++,10===Nf&&(Lf=1,Af++),Nf}function Df(){return Sf(Of,Rf)}function Ff(){return Rf}function Bf(e,t){return kf(Of,e,t)}function $f(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 Hf(e){return Af=Lf=1,Mf=Cf(Of=e),Rf=0,[]}function Wf(e){return Of="",e}function Kf(e){return xf(Bf(Rf-1,Yf(91===e?e+2:40===e?e+1:e)))}function Uf(e){for(;(Nf=Df())&&Nf<33;)jf();return $f(e)>2||$f(Nf)>3?"":" "}function Gf(e,t){for(;--t&&jf()&&!(Nf<48||Nf>102||Nf>57&&Nf<65||Nf>70&&Nf<97););return Bf(e,Ff()+(t<6&&32==Df()&&32==jf()))}function Yf(e){for(;jf();)switch(Nf){case e:return Rf;case 34:case 39:34!==e&&39!==e&&Yf(Nf);break;case 40:41===e&&Yf(e);break;case 92:jf()}return Rf}function Vf(e,t){for(;jf()&&e+Nf!==57&&(e+Nf!==84||47!==Df()););return"/*"+Bf(t,Rf-1)+"*"+bf(47===e?e:jf())}function Jf(e){for(;!$f(Df());)jf();return Bf(e,Rf)}function qf(e){return Wf(Xf("",null,null,null,[""],e=Hf(e),0,[0],e))}function Xf(e,t,n,r,o,i,s,a,l){for(var c=0,u=0,d=s,f=0,p=0,h=0,g=1,m=1,v=1,b=0,y="",x=o,_=i,w=r,S=y;m;)switch(h=b,b=jf()){case 40:if(108!=h&&58==Sf(S,d-1)){-1!=wf(S+=_f(Kf(b),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:S+=Kf(b);break;case 9:case 10:case 13:case 32:S+=Uf(h);break;case 92:S+=Gf(Ff()-1,7);continue;case 47:switch(Df()){case 42:case 47:Tf(Zf(Vf(jf(),Ff()),t,n),l);break;default:S+="/"}break;case 123*g:a[c++]=Cf(S)*v;case 125*g:case 59:case 0:switch(b){case 0:case 125:m=0;case 59+u:-1==v&&(S=_f(S,/\f/g,"")),p>0&&Cf(S)-d&&Tf(p>32?ep(S+";",r,n,d-1):ep(_f(S," ","")+";",r,n,d-2),l);break;case 59:S+=";";default:if(Tf(w=Qf(S,t,n,c,u,o,a,y,x=[],_=[],d),i),123===b)if(0===u)Xf(S,t,w,w,x,i,d,a,_);else switch(99===f&&110===Sf(S,3)?100:f){case 100:case 108:case 109:case 115:Xf(e,w,w,r&&Tf(Qf(e,w,w,0,0,o,a,y,o,x=[],d),_),o,_,d,a,r?x:_);break;default:Xf(S,w,w,w,[""],_,0,a,_)}}c=u=p=0,g=v=1,y=S="",d=s;break;case 58:d=1+Cf(S),p=h;default:if(g<1)if(123==b)--g;else if(125==b&&0==g++&&125==zf())continue;switch(S+=bf(b),b*g){case 38:v=u>0?1:(S+="\f",-1);break;case 44:a[c++]=(Cf(S)-1)*v,v=1;break;case 64:45===Df()&&(S+=Kf(jf())),f=Df(),u=d=Cf(y=S+=Jf(Ff())),b++;break;case 45:45===h&&2==Cf(S)&&(g=0)}}return i}function Qf(e,t,n,r,o,i,s,a,l,c,u){for(var d=o-1,f=0===o?i:[""],p=Ef(f),h=0,g=0,m=0;h<r;++h)for(var v=0,b=kf(e,d+1,d=vf(g=s[h])),y=e;v<p;++v)(y=xf(g>0?f[v]+" "+b:_f(b,/&\f/g,f[v])))&&(l[m++]=y);return Pf(e,t,n,0===o?hf:a,l,c,u)}function Zf(e,t,n){return Pf(e,t,n,pf,bf(Nf),kf(e,2,-2),0)}function ep(e,t,n,r){return Pf(e,t,n,gf,kf(e,0,r),kf(e,r+1,-1),r)}function tp(e,t){for(var n="",r=Ef(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function np(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case gf:return e.return=e.return||e.value;case pf:return"";case mf:return e.return=e.value+"{"+tp(e.children,r)+"}";case hf:e.value=e.props.join(",")}return Cf(n=tp(e.children,r))?e.return=e.value+"{"+n+"}":""}function rp(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var op=function(e,t,n){for(var r=0,o=0;r=o,o=Df(),38===r&&12===o&&(t[n]=1),!$f(o);)jf();return Bf(e,Rf)},ip=function(e,t){return Wf(function(e,t){var n=-1,r=44;do{switch($f(r)){case 0:38===r&&12===Df()&&(t[n]=1),e[n]+=op(Rf-1,t,n);break;case 2:e[n]+=Kf(r);break;case 4:if(44===r){e[++n]=58===Df()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=bf(r)}}while(r=jf());return e}(Hf(e),t))},sp=new WeakMap,ap=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)||sp.get(n))&&!r){sp.set(e,!0);for(var o=[],i=ip(t,o),s=n.props,a=0,l=0;a<i.length;a++)for(var c=0;c<s.length;c++,l++)e.props[l]=o[a]?i[a].replace(/&\f/g,s[c]):s[c]+" "+i[a]}}},lp=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}},cp=function(e){return"comm"===e.type&&e.children.indexOf("emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason")>-1},up=function(e){return 105===e.type.charCodeAt(1)&&64===e.type.charCodeAt(0)},dp=function(e){e.type="",e.value="",e.return="",e.children="",e.props=""},fp=function(e,t,n){up(e)&&(e.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),dp(e)):function(e,t){for(var n=e-1;n>=0;n--)if(!up(t[n]))return!0;return!1}(t,n)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),dp(e)))};function pp(e,t){switch(function(e,t){return 45^Sf(e,0)?(((t<<2^Sf(e,0))<<2^Sf(e,1))<<2^Sf(e,2))<<2^Sf(e,3):0}(e,t)){case 5103:return ff+"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 ff+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ff+e+df+e+uf+e+e;case 6828:case 4268:return ff+e+uf+e+e;case 6165:return ff+e+uf+"flex-"+e+e;case 5187:return ff+e+_f(e,/(\w+).+(:[^]+)/,ff+"box-$1$2"+uf+"flex-$1$2")+e;case 5443:return ff+e+uf+"flex-item-"+_f(e,/flex-|-self/,"")+e;case 4675:return ff+e+uf+"flex-line-pack"+_f(e,/align-content|flex-|-self/,"")+e;case 5548:return ff+e+uf+_f(e,"shrink","negative")+e;case 5292:return ff+e+uf+_f(e,"basis","preferred-size")+e;case 6060:return ff+"box-"+_f(e,"-grow","")+ff+e+uf+_f(e,"grow","positive")+e;case 4554:return ff+_f(e,/([^-])(transform)/g,"$1"+ff+"$2")+e;case 6187:return _f(_f(_f(e,/(zoom-|grab)/,ff+"$1"),/(image-set)/,ff+"$1"),e,"")+e;case 5495:case 3959:return _f(e,/(image-set\([^]*)/,ff+"$1$`$1");case 4968:return _f(_f(e,/(.+:)(flex-)?(.*)/,ff+"box-pack:$3"+uf+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ff+e+e;case 4095:case 3583:case 4068:case 2532:return _f(e,/(.+)-inline(.+)/,ff+"$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(Cf(e)-1-t>6)switch(Sf(e,t+1)){case 109:if(45!==Sf(e,t+4))break;case 102:return _f(e,/(.+:)(.+)-([^]+)/,"$1"+ff+"$2-$3$1"+df+(108==Sf(e,t+3)?"$3":"$2-$3"))+e;case 115:return~wf(e,"stretch")?pp(_f(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Sf(e,t+1))break;case 6444:switch(Sf(e,Cf(e)-3-(~wf(e,"!important")&&10))){case 107:return _f(e,":",":"+ff)+e;case 101:return _f(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ff+(45===Sf(e,14)?"inline-":"")+"box$3$1"+ff+"$2$3$1"+uf+"$2box$3")+e}break;case 5936:switch(Sf(e,t+11)){case 114:return ff+e+uf+_f(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ff+e+uf+_f(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ff+e+uf+_f(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ff+e+uf+e+e}return e}var hp,gp=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case gf:e.return=pp(e.value,e.length);break;case mf:return tp([If(e,{value:_f(e.value,"@","@"+ff)})],r);case hf: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 tp([If(e,{props:[_f(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return tp([If(e,{props:[_f(t,/:(plac\w+)/,":"+ff+"input-$1")]}),If(e,{props:[_f(t,/:(plac\w+)/,":-moz-$1")]}),If(e,{props:[_f(t,/:(plac\w+)/,uf+"input-$1")]})],r)}return""})}}],mp=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;hp=function(e){var t=e.match(mp);if(t)return t[t.length-1]};var vp,bp,yp,xp,_p=function(e){var t=e.key;if(!t)throw new Error("You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\nIf multiple caches share the same key they might \"fight\" for each other's style elements.");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=e.stylisPlugins||gp;if(/[^a-z-]/.test(t))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+t+'" was passed');var o,i,s={},a=[];o=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++)s[t[n]]=!0;a.push(e)});var l=[ap,lp];l.push(function(e){return function(t,n,r){if("rule"===t.type&&!e.compat){var o=t.value.match(/(:first|:nth|:nth-last)-child/g);if(o){for(var i=t.parent?t.parent.children:r,s=i.length-1;s>=0;s--){var a=i[s];if(a.line<t.line)break;if(a.column<t.column){if(cp(a))return;break}}o.forEach(function(e){console.error('The pseudo class "'+e+'" is potentially unsafe when doing server-side rendering. Try changing it to "'+e.split("-child")[0]+'-of-type".')})}}}}({get compat(){return f.compat}}),fp);var c,u=[np,function(e){e.root||(e.return?c.insert(e.return):e.value&&e.type!==pf&&c.insert(e.value+"{}"))}],d=function(e){var t=Ef(e);return function(n,r,o,i){for(var s="",a=0;a<t;a++)s+=e[a](n,r,o,i)||"";return s}}(l.concat(r,u));i=function(e,t,n,r){if(c=n,hp){var o=hp(t.styles);o&&(c={insert:function(e){n.insert(e+o)}})}!function(e){tp(qf(e),d)}(e?e+"{"+t.styles+"}":t.styles),r&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new cf({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:i};return f.sheet.hydrate(a),f},wp={exports:{}},Sp={};function kp(){return bp||(bp=1,wp.exports=function(){if(vp)return Sp;vp=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,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=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 f=e.$$typeof;switch(f){case t:switch(e=e.type){case l:case c:case r:case i:case o:case d:return e;default:switch(e=e&&e.$$typeof){case a:case u:case h:case p:case s:return e;default:return f}}case n:return f}}}function x(e){return y(e)===c}return Sp.AsyncMode=l,Sp.ConcurrentMode=c,Sp.ContextConsumer=a,Sp.ContextProvider=s,Sp.Element=t,Sp.ForwardRef=u,Sp.Fragment=r,Sp.Lazy=h,Sp.Memo=p,Sp.Portal=n,Sp.Profiler=i,Sp.StrictMode=o,Sp.Suspense=d,Sp.isAsyncMode=function(e){return x(e)||y(e)===l},Sp.isConcurrentMode=x,Sp.isContextConsumer=function(e){return y(e)===a},Sp.isContextProvider=function(e){return y(e)===s},Sp.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Sp.isForwardRef=function(e){return y(e)===u},Sp.isFragment=function(e){return y(e)===r},Sp.isLazy=function(e){return y(e)===h},Sp.isMemo=function(e){return y(e)===p},Sp.isPortal=function(e){return y(e)===n},Sp.isProfiler=function(e){return y(e)===i},Sp.isStrictMode=function(e){return y(e)===o},Sp.isSuspense=function(e){return y(e)===d},Sp.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===u||e.$$typeof===m||e.$$typeof===v||e.$$typeof===b||e.$$typeof===g)},Sp.typeOf=y,Sp}()),wp.exports}var Cp=function(){if(xp)return yp;xp=1;var e=kp(),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 s=Object.defineProperty,a=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,u=Object.getPrototypeOf,d=Object.prototype;return yp=function e(t,r,o){if("string"!=typeof r){if(d){var f=u(r);f&&f!==d&&e(t,f,o)}var p=a(r);l&&(p=p.concat(l(r)));for(var h=i(t),g=i(r),m=0;m<p.length;++m){var v=p[m];if(!(n[v]||o&&o[v]||g&&g[v]||h&&h[v])){var b=c(r,v);try{s(t,v,b)}catch(e){}}}}return t},yp}(),Ep=z(Cp);function Tp(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}var Ap=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Lp=function(e,t,n){Ap(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 Mp={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},Rp="You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences",Np="You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).",Op=/[A-Z]|^ms/g,Pp=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ip=function(e){return 45===e.charCodeAt(1)},zp=function(e){return null!=e&&"boolean"!=typeof e},jp=rp(function(e){return Ip(e)?e:e.replace(Op,"-$&").toLowerCase()}),Dp=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Pp,function(e,t,n){return Yp={name:t,styles:n,next:Yp},t})}return 1===Mp[e]||Ip(e)||"number"!=typeof t||0===t?t:t+"px"},Fp=/(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,Bp=["normal","none","initial","inherit","unset"],$p=Dp,Hp=/^-ms-/,Wp=/-(.)/g,Kp={};Dp=function(e,t){if("content"===e&&("string"!=typeof t||-1===Bp.indexOf(t)&&!Fp.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0))))throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\""+t+"\"'`");var n=$p(e,t);return""===n||Ip(e)||-1===e.indexOf("-")||void 0!==Kp[e]||(Kp[e]=!0,console.error("Using kebab-case for css properties in objects is not supported. Did you mean "+e.replace(Hp,"ms-").replace(Wp,function(e,t){return t.toUpperCase()})+"?")),n};var Up="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Gp(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles){if("NO_COMPONENT_SELECTOR"===String(r))throw new Error(Up);return r}switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return Yp={name:o.name,styles:o.styles,next:Yp},o.name;var i=n;if(void 0!==i.styles){var s=i.next;if(void 0!==s)for(;void 0!==s;)Yp={name:s.name,styles:s.styles,next:Yp},s=s.next;return i.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Gp(e,t,n[o])+";";else for(var i in n){var s=n[i];if("object"!=typeof s){var a=s;null!=t&&void 0!==t[a]?r+=i+"{"+t[a]+"}":zp(a)&&(r+=jp(i)+":"+Dp(i,a)+";")}else{if("NO_COMPONENT_SELECTOR"===i)throw new Error(Up);if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var l=Gp(e,t,s);switch(i){case"animation":case"animationName":r+=jp(i)+":"+l+";";break;default:"undefined"===i&&console.error(Np),r+=i+"{"+l+"}"}}else for(var c=0;c<s.length;c++)zp(s[c])&&(r+=jp(i)+":"+Dp(i,s[c])+";")}}return r}(e,t,n);case"function":if(void 0!==e){var a=Yp,l=n(e);return Yp=a,Gp(e,t,l)}console.error("Functions that are interpolated in css calls will be stringified.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`");break;case"string":var c=[],u=n.replace(Pp,function(e,t,n){var r="animation"+c.length;return c.push("const "+r+" = keyframes`"+n.replace(/^@keyframes animation-\w+/,"")+"`"),"${"+r+"}"});c.length&&console.error("`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\nInstead of doing this:\n\n"+[].concat(c,["`"+u+"`"]).join("\n")+"\n\nYou should wrap it with `css` like this:\n\ncss`"+u+"`")}var d=n;if(null==t)return d;var f=t[d];return void 0!==f?f:d}var Yp,Vp=/label:\s*([^\s;{]+)\s*(;|$)/g;function Jp(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="";Yp=void 0;var i=e[0];if(null==i||void 0===i.raw)r=!1,o+=Gp(n,t,i);else{var s=i;void 0===s[0]&&console.error(Rp),o+=s[0]}for(var a=1;a<e.length;a++)if(o+=Gp(n,t,e[a]),r){var l=i;void 0===l[a]&&console.error(Rp),o+=l[a]}Vp.lastIndex=0;for(var c,u="";null!==(c=Vp.exec(o));)u+="-"+c[1];var d=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)+u;return{name:d,styles:o,next:Yp,toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}}}var qp=!!C.useInsertionEffect&&C.useInsertionEffect,Xp=qp||function(e){return e()},Qp=qp||C.useLayoutEffect,Zp=C.createContext("undefined"!=typeof HTMLElement?_p({key:"css"}):null);Zp.displayName="EmotionCacheContext";var eh=Zp.Provider,th=function(e){return E(function(t,n){var r=b(Zp);return e(t,r,n)})},nh=C.createContext({});nh.displayName="EmotionThemeContext";var rh={}.hasOwnProperty,oh=function(e){var t=e.split(".");return t[t.length-1]},ih=function(e){var t=/^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(e);return t||(t=/^([A-Za-z0-9$.]+)@/.exec(e))?oh(t[1]):void 0},sh=new Set(["renderWithHooks","processChild","finishClassComponent","renderToString"]),ah=function(e){return e.replace(/\$/g,"-")},lh="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",ch="__EMOTION_LABEL_PLEASE_DO_NOT_USE__",uh=function(e,t){if("string"==typeof t.css&&-1!==t.css.indexOf(":"))throw new Error("Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`"+t.css+"`");var n={};for(var r in t)rh.call(t,r)&&(n[r]=t[r]);if(n[lh]=e,"undefined"!=typeof globalThis&&globalThis.EMOTION_RUNTIME_AUTO_LABEL&&t.css&&("object"!=typeof t.css||!("name"in t.css)||"string"!=typeof t.css.name||-1===t.css.name.indexOf("-"))){var o=function(e){if(e)for(var t=e.split("\n"),n=0;n<t.length;n++){var r=ih(t[n]);if(r){if(sh.has(r))break;if(/^[A-Z]/.test(r))return ah(r)}}}((new Error).stack);o&&(n[ch]=o)}return n},dh=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Ap(t,n,r),Xp(function(){return Lp(t,n,r)}),null},fh=th(function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var o=e[lh],i=[r],s="";"string"==typeof e.className?s=Tp(t.registered,i,e.className):null!=e.className&&(s=e.className+" ");var a=Jp(i,void 0,C.useContext(nh));if(-1===a.name.indexOf("-")){var l=e[ch];l&&(a=Jp([a,"label:"+l+";"]))}s+=t.key+"-"+a.name;var c={};for(var u in e)rh.call(e,u)&&"css"!==u&&u!==lh&&u!==ch&&(c[u]=e[u]);return c.className=s,n&&(c.ref=n),C.createElement(C.Fragment,null,C.createElement(dh,{cache:t,serialized:a,isStringTag:"string"==typeof o}),C.createElement(o,c))});fh.displayName="EmotionCssPropInternal";var ph,hh,gh=fh,mh=function(e,t){var n=arguments;if(null==t||!rh.call(t,"css"))return C.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=gh,o[1]=uh(e,t);for(var i=2;i<r;i++)o[i]=n[i];return C.createElement.apply(null,o)};ph=mh||(mh={}),hh||(hh=ph.JSX||(ph.JSX={}));var vh=!1,bh=th(function(e,t){!vh&&("className"in e&&e.className||"css"in e&&e.css)&&(console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?"),vh=!0);var n=Jp([e.styles],void 0,C.useContext(nh)),r=C.useRef();return Qp(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,s=document.querySelector('style[data-emotion="'+e+" "+n.name+'"]');return t.sheet.tags.length&&(o.before=t.sheet.tags[0]),null!==s&&(i=!0,s.setAttribute("data-emotion",e),o.hydrate([s])),r.current=[o,i],function(){o.flush()}},[t]),Qp(function(){var e=r.current,o=e[0];if(e[1])e[1]=!1;else{if(void 0!==n.next&&Lp(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 yh(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Jp(t)}function xh(){var e=yh.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_"}}}bh.displayName="EmotionGlobal";var _h=function e(t){for(var n=t.length,r=0,o="";r<n;r++){var i=t[r];if(null!=i){var s=void 0;switch(typeof i){case"boolean":break;case"object":if(Array.isArray(i))s=e(i);else for(var a in void 0!==i.styles&&void 0!==i.name&&console.error("You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component."),s="",i)i[a]&&a&&(s&&(s+=" "),s+=a);break;default:s=i}s&&(o&&(o+=" "),o+=s)}}return o};var wh=function(e){var t=e.cache,n=e.serializedArr;return Xp(function(){for(var e=0;e<n.length;e++)Lp(t,n[e],!1)}),null},Sh=th(function(e,t){var n=!1,r=[],o=function(){if(n)throw new Error("css can only be used during render");for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];var s=Jp(o,t.registered);return r.push(s),Ap(t,s,!1),t.key+"-"+s.name},i={css:o,cx:function(){if(n)throw new Error("cx can only be used during render");for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return function(e,t,n){var r=[],o=Tp(e,r,n);return r.length<2?n:o+t(r)}(t.registered,o,_h(r))},theme:C.useContext(nh)},s=e.children(i);return n=!0,C.createElement(C.Fragment,null,C.createElement(wh,{cache:t,serializedArr:r}),s)});Sh.displayName="EmotionClassNames";var kh="undefined"!=typeof document,Ch="undefined"!=typeof jest||"undefined"!=typeof vi;if(kh&&!Ch){var Eh="undefined"!=typeof globalThis?globalThis:kh?window:global,Th="__EMOTION_REACT_"+"11.14.0".split(".")[0]+"__";Eh[Th]&&console.warn("You are loading @emotion/react when it is already loaded. Running multiple instances may cause problems. This can happen if multiple versions are used, or if multiple builds of the same version are used."),Eh[Th]=!0}var Ah=/^((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|popover|popoverTarget|popoverTargetAction|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)-.*))$/,Lh=rp(function(e){return Ah.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),Mh=function(e){return"theme"!==e},Rh=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Lh:Mh},Nh=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},Oh="You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences",Ph=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Ap(t,n,r),Xp(function(){return Lp(t,n,r)}),null},Ih=function e(t,n){if(void 0===t)throw new Error("You are trying to create a styled element with an undefined component.\nYou may have forgotten to import it.");var r,o,i=t.__emotion_real===t,s=i&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var a=Nh(t,n,i),l=a||Rh(s),c=!l("as");return function(){var u=arguments,d=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==u[0]||void 0===u[0].raw)d.push.apply(d,u);else{var f=u[0];void 0===f[0]&&console.error(Oh),d.push(f[0]);for(var p=u.length,h=1;h<p;h++)void 0===f[h]&&console.error(Oh),d.push(u[h],f[h])}var g=th(function(e,t,n){var r=c&&e.as||s,i="",u=[],f=e;if(null==e.theme){for(var p in f={},e)f[p]=e[p];f.theme=C.useContext(nh)}"string"==typeof e.className?i=Tp(t.registered,u,e.className):null!=e.className&&(i=e.className+" ");var h=Jp(d.concat(u),t.registered,f);i+=t.key+"-"+h.name,void 0!==o&&(i+=" "+o);var g=c&&void 0===a?Rh(r):l,m={};for(var v in e)c&&"as"===v||g(v)&&(m[v]=e[v]);return m.className=i,n&&(m.ref=n),C.createElement(C.Fragment,null,C.createElement(Ph,{cache:t,serialized:h,isStringTag:"string"==typeof r}),C.createElement(r,m))});return g.displayName=void 0!==r?r:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",g.defaultProps=t.defaultProps,g.__emotion_real=g,g.__emotion_base=s,g.__emotion_styles=d,g.__emotion_forwardProp=a,Object.defineProperty(g,"toString",{value:function(){return void 0===o?"NO_COMPONENT_SELECTOR":"."+o}}),g.withComponent=function(t,r){return e(t,af({},n,r,{shouldForwardProp:Nh(g,r,!0)})).apply(void 0,d)},g}}.bind(null);["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){Ih[e]=Ih(e)});var zh,jh,Dh,Fh,Bh,$h={exports:{}};function Hh(){if(jh)return zh;jh=1;return zh="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Wh(){if(Fh)return Dh;Fh=1;var e=Hh();function t(){}function n(){}return n.resetWarningCache=t,Dh=function(){function r(t,n,r,o,i,s){if(s!==e){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function o(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i}}function Kh(){return Bh||(Bh=1,$h.exports=Wh()()),$h.exports}var Uh=z(Kh());const Gh=new Map;function Yh(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 wu.jsx(bh,{styles:r})}
8
8
  /**
9
9
  * @mui/styled-engine v5.18.0
10
10
  *
@@ -96,6 +96,6 @@ System.register(["@nebula.js/stardust","react-dom","react"],function(e){"use str
96
96
  *
97
97
  * This source code is licensed under the MIT license found in the
98
98
  * LICENSE file in the root directory of this source tree.
99
- */function iM(){if(tM)return HE;tM=1,Object.defineProperty(HE,"__esModule",{value:!0}),HE.default=function(t){return(0,e.createStyles)(t)};var e=oM;return HE}var sM,aM,lM={},cM={};function uM(){if(sM)return cM;sM=1;var e=nb();Object.defineProperty(cM,"__esModule",{value:!0}),cM.default=void 0;var t=(0,e(DE()).default)();return cM.default=t,cM}function dM(){if(aM)return lM;aM=1;var e=nb();Object.defineProperty(lM,"__esModule",{value:!0}),lM.default=void 0;var t=e(Ob()),n=oM,r=e(uM());var o=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,n.makeStyles)(e,(0,t.default)({defaultTheme:r.default},o))};return lM.default=o,lM}var fM,pM,hM={},gM={};function mM(){if(fM)return gM;fM=1;var e=nb();Object.defineProperty(gM,"__esModule",{value:!0}),gM.isUnitless=function(e){return String(parseFloat(e)).length===String(e).length},gM.getUnit=n,gM.toUnitless=r,gM.convertLength=function(e){return function(t,o){var i=n(t);if(i===o)return t;var s=r(t);if("px"!==i)if("em"===i)s=r(t)*r(e);else if("rem"===i)return s=r(t)*r(e),t;var a=s;if("px"!==o)if("em"===o)a=s/r(e);else{if("rem"!==o)return t;a=s/r(e)}return parseFloat(a.toFixed(5))+o}},gM.alignProperty=function(e){var t=e.size,n=e.grid,r=t-t%n,o=r+n;return t-r<o-t?r:o},gM.fontGrid=function(e){var t=e.lineHeight,n=e.pixels,r=e.htmlFontSize;return n/(t*r)},gM.responsiveProperty=function(e){var n=e.cssProperty,r=e.min,o=e.max,i=e.unit,s=void 0===i?"rem":i,a=e.breakpoints,l=void 0===a?[600,960,1280]:a,c=e.transform,u=void 0===c?null:c,d=(0,t.default)({},n,"".concat(r).concat(s)),f=(o-r)/l[l.length-1];return l.forEach(function(e){var o=r+f*e;null!==u&&(o=u(o)),d["@media (min-width:".concat(e,"px)")]=(0,t.default)({},n,"".concat(Math.round(1e4*o)/1e4).concat(s))}),d};var t=e(ek());function n(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function r(e){return parseFloat(e)}return gM}function vM(){if(pM)return hM;pM=1;var e=nb();Object.defineProperty(hM,"__esModule",{value:!0}),hM.default=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.breakpoints,s=void 0===i?["sm","md","lg"]:i,a=o.disableAlign,l=void 0!==a&&a,c=o.factor,u=void 0===c?2:c,d=o.variants,f=void 0===d?["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]:d,p=(0,t.default)({},e);p.typography=(0,t.default)({},p.typography);var h=p.typography,g=(0,r.convertLength)(h.htmlFontSize),m=s.map(function(e){return p.breakpoints.values[e]});return f.forEach(function(e){var o=h[e],i=parseFloat(g(o.fontSize,"rem"));if(!(i<=1)){var s=i,a=1+(s-1)/u,c=o.lineHeight;if(!(0,r.isUnitless)(c)&&!l)throw new Error((0,n.formatMuiErrorMessage)(6));(0,r.isUnitless)(c)||(c=parseFloat(g(c,"rem"))/parseFloat(i));var d=null;l||(d=function(e){return(0,r.alignProperty)({size:e,grid:(0,r.fontGrid)({pixels:4,lineHeight:c,htmlFontSize:h.htmlFontSize})})}),h[e]=(0,t.default)({},o,(0,r.responsiveProperty)({cssProperty:"fontSize",min:a,max:s,unit:"rem",breakpoints:m,transform:d}))}}),p};var t=e(Ob()),n=WS,r=mM();return hM}var bM,yM={};function xM(){if(bM)return yM;bM=1;var e=nb();Object.defineProperty(yM,"__esModule",{value:!0}),yM.default=void 0;var t=e(Ob()),n=oM,r=e(uM()),o=function(e){var o=(0,n.styled)(e);return function(e,n){return o(e,(0,t.default)({defaultTheme:r.default},n))}};return yM.default=o,yM}var _M,wM={};function SM(){if(_M)return wM;_M=1;var e=nb();Object.defineProperty(wM,"__esModule",{value:!0}),wM.default=function(){return(0,t.useTheme)()||n.default};var t=oM;e(y);var n=e(uM());return wM}var kM,CM={};function EM(){if(kM)return CM;kM=1;var e=nb();Object.defineProperty(CM,"__esModule",{value:!0}),CM.default=void 0;var t=e(Ob()),n=oM,r=e(uM());var o=function(e,o){return(0,n.withStyles)(e,(0,t.default)({defaultTheme:r.default},o))};return CM.default=o,CM}var TM,AM,LM={};function MM(){if(TM)return LM;TM=1;var e=nb();Object.defineProperty(LM,"__esModule",{value:!0}),LM.default=void 0;var t=oM,n=e(uM()),r=(0,t.withThemeCreator)({defaultTheme:n.default});return LM.default=r,LM}function RM(){return AM||(AM=1,function(e){var t=nb(),n=(xS||(xS=1,function(e){var t=kS().default;function n(r,o){if("function"==typeof WeakMap)var i=new WeakMap,s=new WeakMap;return(e.exports=n=function(e,n){if(!n&&e&&e.__esModule)return e;var r,o,a={__proto__:null,default:e};if(null===e||"object"!=t(e)&&"function"!=typeof e)return a;if(r=n?s:i){if(r.has(e))return r.get(e);r.set(e,a)}for(var l in e)"default"!==l&&{}.hasOwnProperty.call(e,l)&&((o=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,l))&&(o.get||o.set)?r(a,l,o):a[l]=e[l]);return a},e.exports.__esModule=!0,e.exports.default=e.exports)(r,o)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(wS)),wS.exports);Object.defineProperty(e,"__esModule",{value:!0});var r={createTheme:!0,createMuiTheme:!0,unstable_createMuiStrictModeTheme:!0,createStyles:!0,makeStyles:!0,responsiveFontSizes:!0,styled:!0,useTheme:!0,withStyles:!0,withTheme:!0,createGenerateClassName:!0,jssPreset:!0,ServerStyleSheets:!0,StylesProvider:!0,MuiThemeProvider:!0,ThemeProvider:!0};Object.defineProperty(e,"createTheme",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"createMuiTheme",{enumerable:!0,get:function(){return i.createMuiTheme}}),Object.defineProperty(e,"unstable_createMuiStrictModeTheme",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"createStyles",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"makeStyles",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"responsiveFontSizes",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"styled",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"useTheme",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"withStyles",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"withTheme",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"createGenerateClassName",{enumerable:!0,get:function(){return g.createGenerateClassName}}),Object.defineProperty(e,"jssPreset",{enumerable:!0,get:function(){return g.jssPreset}}),Object.defineProperty(e,"ServerStyleSheets",{enumerable:!0,get:function(){return g.ServerStyleSheets}}),Object.defineProperty(e,"StylesProvider",{enumerable:!0,get:function(){return g.StylesProvider}}),Object.defineProperty(e,"MuiThemeProvider",{enumerable:!0,get:function(){return g.ThemeProvider}}),Object.defineProperty(e,"ThemeProvider",{enumerable:!0,get:function(){return g.ThemeProvider}});var o=KS();Object.keys(o).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))});var i=n(DE()),s=t($E()),a=t(iM()),l=t(dM()),c=t(vM()),u=t(xM()),d=OE();Object.keys(d).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return d[t]}}))});var f=t(SM()),p=t(EM()),h=t(MM()),g=oM}(_S)),_S}var NM=RM();NM.alpha(Jw.GREYSCALE_0,.05),NM.alpha(Jw.GREEN_PALE,.5),NM.alpha(Jw.BLUE_PALE,.5),NM.alpha(Jw.GREEN_PALE,.5),NM.alpha(Jw.BLUE_PALE,.5),NM.alpha(Jw.GREEN_PALE,.5),NM.alpha(Jw.BLUE_PALE,.5),NM.alpha(Jw.GREEN_PALE,.5),NM.alpha(Jw.BLUE_PALE,.5),NM.alpha(Jw.GREEN_PALE,.5),NM.alpha(Jw.BLUE_PALE,.5);const OM=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:wu.jsx("path",{d:"m7.999 9.001-2.858-2.86a.2.2 0 0 0-.282 0l-.718.719a.2.2 0 0 0 0 .282L7 10.001l.859.858a.2.2 0 0 0 .282 0L9 10l2.859-2.859a.2.2 0 0 0 0-.282l-.718-.718a.2.2 0 0 0-.283 0L8 9Z"})}));var PM=Object.defineProperty,IM=(e,t)=>{for(var n in t)PM(e,n,{get:t[n],enumerable:!0})},zM=(e,t,n)=>((e,t,n)=>t in e?PM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),jM={};IM(jM,{af:()=>KM,ak:()=>UM,am:()=>GM,an:()=>YM,ar:()=>VM,ars:()=>JM,as:()=>qM,asa:()=>XM,ast:()=>QM,az:()=>ZM,bal:()=>eR,be:()=>tR,bem:()=>nR,bez:()=>rR,bg:()=>oR,bho:()=>iR,blo:()=>sR,bm:()=>aR,bn:()=>lR,bo:()=>cR,br:()=>uR,brx:()=>dR,bs:()=>fR,ca:()=>pR,ce:()=>hR,ceb:()=>gR,cgg:()=>mR,chr:()=>vR,ckb:()=>bR,cs:()=>yR,cy:()=>xR,da:()=>_R,de:()=>wR,doi:()=>SR,dsb:()=>kR,dv:()=>CR,dz:()=>ER,ee:()=>TR,el:()=>AR,en:()=>LR,eo:()=>MR,es:()=>RR,et:()=>NR,eu:()=>OR,fa:()=>PR,ff:()=>IR,fi:()=>zR,fil:()=>jR,fo:()=>DR,fr:()=>FR,fur:()=>BR,fy:()=>$R,ga:()=>HR,gd:()=>WR,gl:()=>KR,gsw:()=>UR,gu:()=>GR,guw:()=>YR,gv:()=>VR,ha:()=>JR,haw:()=>qR,he:()=>XR,hi:()=>QR,hnj:()=>ZR,hr:()=>eN,hsb:()=>tN,hu:()=>nN,hy:()=>rN,ia:()=>oN,id:()=>iN,ig:()=>sN,ii:()=>aN,io:()=>lN,is:()=>cN,it:()=>uN,iu:()=>dN,ja:()=>fN,jbo:()=>pN,jgo:()=>hN,jmc:()=>gN,jv:()=>mN,jw:()=>vN,ka:()=>bN,kab:()=>yN,kaj:()=>xN,kcg:()=>_N,kde:()=>wN,kea:()=>SN,kk:()=>kN,kkj:()=>CN,kl:()=>EN,km:()=>TN,kn:()=>AN,ko:()=>LN,ks:()=>MN,ksb:()=>RN,ksh:()=>NN,ku:()=>ON,kw:()=>PN,ky:()=>IN,lag:()=>zN,lb:()=>jN,lg:()=>DN,lij:()=>FN,lkt:()=>BN,ln:()=>$N,lo:()=>HN,lt:()=>WN,lv:()=>KN,mas:()=>UN,mg:()=>GN,mgo:()=>YN,mk:()=>VN,ml:()=>JN,mn:()=>qN,mo:()=>XN,mr:()=>QN,ms:()=>ZN,mt:()=>eO,my:()=>tO,nah:()=>nO,naq:()=>rO,nb:()=>oO,nd:()=>iO,ne:()=>sO,nl:()=>aO,nn:()=>lO,nnh:()=>cO,no:()=>uO,nqo:()=>dO,nr:()=>fO,nso:()=>pO,ny:()=>hO,nyn:()=>gO,om:()=>mO,or:()=>vO,os:()=>bO,osa:()=>yO,pa:()=>xO,pap:()=>_O,pcm:()=>wO,pl:()=>SO,prg:()=>kO,ps:()=>CO,pt:()=>EO,pt_PT:()=>TO,rm:()=>AO,ro:()=>LO,rof:()=>MO,ru:()=>RO,rwk:()=>NO,sah:()=>OO,saq:()=>PO,sat:()=>IO,sc:()=>zO,scn:()=>jO,sd:()=>DO,sdh:()=>FO,se:()=>BO,seh:()=>$O,ses:()=>HO,sg:()=>WO,sh:()=>KO,shi:()=>UO,si:()=>GO,sk:()=>YO,sl:()=>VO,sma:()=>JO,smi:()=>qO,smj:()=>XO,smn:()=>QO,sms:()=>ZO,sn:()=>eP,so:()=>tP,sq:()=>nP,sr:()=>rP,ss:()=>oP,ssy:()=>iP,st:()=>sP,su:()=>aP,sv:()=>lP,sw:()=>cP,syr:()=>uP,ta:()=>dP,te:()=>fP,teo:()=>pP,th:()=>hP,ti:()=>gP,tig:()=>mP,tk:()=>vP,tl:()=>bP,tn:()=>yP,to:()=>xP,tpi:()=>_P,tr:()=>wP,ts:()=>SP,tzm:()=>kP,ug:()=>CP,uk:()=>EP,und:()=>TP,ur:()=>AP,uz:()=>LP,ve:()=>MP,vec:()=>RP,vi:()=>NP,vo:()=>OP,vun:()=>PP,wa:()=>IP,wae:()=>zP,wo:()=>jP,xh:()=>DP,xog:()=>FP,yi:()=>BP,yo:()=>$P,yue:()=>HP,zh:()=>WP,zu:()=>KP});var DM=(e,t)=>t?"other":1==e?"one":"other",FM=(e,t)=>t?"other":0==e||1==e?"one":"other",BM=(e,t)=>t?"other":e>=0&&e<=1?"one":"other",$M=(e,t)=>{const n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},HM=(e,t)=>"other",WM=(e,t)=>t?"other":1==e?"one":2==e?"two":"other",KM=DM,UM=FM,GM=BM,YM=DM,VM=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":0==e?"zero":1==e?"one":2==e?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},JM=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":0==e?"zero":1==e?"one":2==e?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},qM=(e,t)=>t?1==e||5==e||7==e||8==e||9==e||10==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other",XM=DM,QM=$M,ZM=(e,t)=>{const n=String(e).split(".")[0],r=n.slice(-1),o=n.slice(-2),i=n.slice(-3);return t?1==r||2==r||5==r||7==r||8==r||20==o||50==o||70==o||80==o?"one":3==r||4==r||100==i||200==i||300==i||400==i||500==i||600==i||700==i||800==i||900==i?"few":0==n||6==r||40==o||60==o||90==o?"many":"other":1==e?"one":"other"},eR=(e,t)=>1==e?"one":"other",tR=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-1),i=r&&n[0].slice(-2);return t?2!=o&&3!=o||12==i||13==i?"other":"few":1==o&&11!=i?"one":o>=2&&o<=4&&(i<12||i>14)?"few":r&&0==o||o>=5&&o<=9||i>=11&&i<=14?"many":"other"},nR=DM,rR=DM,oR=DM,iR=FM,sR=(e,t)=>{const n=String(e).split(".")[0];return t?0==n?"zero":1==n?"one":2==n||3==n||4==n||5==n||6==n?"few":"other":0==e?"zero":1==e?"one":"other"},aR=HM,lR=(e,t)=>t?1==e||5==e||7==e||8==e||9==e||10==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other",cR=HM,uR=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-1),i=r&&n[0].slice(-2),s=r&&n[0].slice(-6);return t?"other":1==o&&11!=i&&71!=i&&91!=i?"one":2==o&&12!=i&&72!=i&&92!=i?"two":(3==o||4==o||9==o)&&(i<10||i>19)&&(i<70||i>79)&&(i<90||i>99)?"few":0!=e&&r&&0==s?"many":"other"},dR=DM,fR=(e,t)=>{const n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),a=r.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?"other":i&&1==s&&11!=a||1==l&&11!=c?"one":i&&s>=2&&s<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},pR=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-6);return t?1==e||3==e?"one":2==e?"two":4==e?"few":"other":1==e&&o?"one":0!=r&&0==i&&o?"many":"other"},hR=DM,gR=(e,t)=>{const n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),a=o.slice(-1);return t?"other":i&&(1==r||2==r||3==r)||i&&4!=s&&6!=s&&9!=s||!i&&4!=a&&6!=a&&9!=a?"one":"other"},mR=DM,vR=DM,bR=DM,yR=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1];return t?"other":1==e&&o?"one":r>=2&&r<=4&&o?"few":o?"other":"many"},xR=(e,t)=>t?0==e||7==e||8==e||9==e?"zero":1==e?"one":2==e?"two":3==e||4==e?"few":5==e||6==e?"many":"other":0==e?"zero":1==e?"one":2==e?"two":3==e?"few":6==e?"many":"other",_R=(e,t)=>{const n=String(e).split("."),r=n[0],o=Number(n[0])==e;return t||1!=e&&(o||0!=r&&1!=r)?"other":"one"},wR=$M,SR=BM,kR=(e,t)=>{const n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-2),a=o.slice(-2);return t?"other":i&&1==s||1==a?"one":i&&2==s||2==a?"two":i&&(3==s||4==s)||3==a||4==a?"few":"other"},CR=DM,ER=HM,TR=DM,AR=DM,LR=(e,t)=>{const n=String(e).split("."),r=!n[1],o=Number(n[0])==e,i=o&&n[0].slice(-1),s=o&&n[0].slice(-2);return t?1==i&&11!=s?"one":2==i&&12!=s?"two":3==i&&13!=s?"few":"other":1==e&&r?"one":"other"},MR=DM,RR=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-6);return t?"other":1==e?"one":0!=r&&0==i&&o?"many":"other"},NR=$M,OR=DM,PR=BM,IR=(e,t)=>t?"other":e>=0&&e<2?"one":"other",zR=$M,jR=(e,t)=>{const n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),a=o.slice(-1);return t?1==e?"one":"other":i&&(1==r||2==r||3==r)||i&&4!=s&&6!=s&&9!=s||!i&&4!=a&&6!=a&&9!=a?"one":"other"},DR=DM,FR=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-6);return t?1==e?"one":"other":e>=0&&e<2?"one":0!=r&&0==i&&o?"many":"other"},BR=DM,$R=$M,HR=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e;return t?1==e?"one":"other":1==e?"one":2==e?"two":r&&e>=3&&e<=6?"few":r&&e>=7&&e<=10?"many":"other"},WR=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e;return t?1==e||11==e?"one":2==e||12==e?"two":3==e||13==e?"few":"other":1==e||11==e?"one":2==e||12==e?"two":r&&e>=3&&e<=10||r&&e>=13&&e<=19?"few":"other"},KR=$M,UR=DM,GR=(e,t)=>t?1==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other",YR=FM,VR=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-1),s=r.slice(-2);return t?"other":o&&1==i?"one":o&&2==i?"two":!o||0!=s&&20!=s&&40!=s&&60!=s&&80!=s?o?"other":"many":"few"},JR=DM,qR=DM,XR=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1];return t?"other":1==r&&o||0==r&&!o?"one":2==r&&o?"two":"other"},QR=(e,t)=>t?1==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other",ZR=HM,eN=(e,t)=>{const n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),a=r.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?"other":i&&1==s&&11!=a||1==l&&11!=c?"one":i&&s>=2&&s<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},tN=(e,t)=>{const n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-2),a=o.slice(-2);return t?"other":i&&1==s||1==a?"one":i&&2==s||2==a?"two":i&&(3==s||4==s)||3==a||4==a?"few":"other"},nN=(e,t)=>t?1==e||5==e?"one":"other":1==e?"one":"other",rN=(e,t)=>t?1==e?"one":"other":e>=0&&e<2?"one":"other",oN=$M,iN=HM,sN=HM,aN=HM,lN=$M,cN=(e,t)=>{const n=String(e).split("."),r=n[0],o=(n[1]||"").replace(/0+$/,""),i=Number(n[0])==e,s=r.slice(-1),a=r.slice(-2);return t?"other":i&&1==s&&11!=a||o%10==1&&o%100!=11?"one":"other"},uN=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-6);return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&o?"one":0!=r&&0==i&&o?"many":"other"},dN=WM,fN=HM,pN=HM,hN=DM,gN=DM,mN=HM,vN=HM,bN=(e,t)=>{const n=String(e).split(".")[0],r=n.slice(-2);return t?1==n?"one":0==n||r>=2&&r<=20||40==r||60==r||80==r?"many":"other":1==e?"one":"other"},yN=(e,t)=>t?"other":e>=0&&e<2?"one":"other",xN=DM,_N=DM,wN=HM,SN=HM,kN=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-1);return t?6==o||9==o||r&&0==o&&0!=e?"many":"other":1==e?"one":"other"},CN=DM,EN=DM,TN=HM,AN=BM,LN=HM,MN=DM,RN=DM,NN=(e,t)=>t?"other":0==e?"zero":1==e?"one":"other",ON=DM,PN=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-2),i=r&&n[0].slice(-3),s=r&&n[0].slice(-5),a=r&&n[0].slice(-6);return t?r&&e>=1&&e<=4||o>=1&&o<=4||o>=21&&o<=24||o>=41&&o<=44||o>=61&&o<=64||o>=81&&o<=84?"one":5==e||5==o?"many":"other":0==e?"zero":1==e?"one":2==o||22==o||42==o||62==o||82==o||r&&0==i&&(s>=1e3&&s<=2e4||4e4==s||6e4==s||8e4==s)||0!=e&&1e5==a?"two":3==o||23==o||43==o||63==o||83==o?"few":1==e||1!=o&&21!=o&&41!=o&&61!=o&&81!=o?"other":"many"},IN=DM,zN=(e,t)=>{const n=String(e).split(".")[0];return t?"other":0==e?"zero":0!=n&&1!=n||0==e?"other":"one"},jN=DM,DN=DM,FN=(e,t)=>{const n=String(e).split("."),r=!n[1],o=Number(n[0])==e;return t?11==e||8==e||o&&e>=80&&e<=89||o&&e>=800&&e<=899?"many":"other":1==e&&r?"one":"other"},BN=HM,$N=FM,HN=(e,t)=>t&&1==e?"one":"other",WN=(e,t)=>{const n=String(e).split("."),r=n[1]||"",o=Number(n[0])==e,i=o&&n[0].slice(-1),s=o&&n[0].slice(-2);return t?"other":1==i&&(s<11||s>19)?"one":i>=2&&i<=9&&(s<11||s>19)?"few":0!=r?"many":"other"},KN=(e,t)=>{const n=String(e).split("."),r=n[1]||"",o=r.length,i=Number(n[0])==e,s=i&&n[0].slice(-1),a=i&&n[0].slice(-2),l=r.slice(-2),c=r.slice(-1);return t?"other":i&&0==s||a>=11&&a<=19||2==o&&l>=11&&l<=19?"zero":1==s&&11!=a||2==o&&1==c&&11!=l||2!=o&&1==c?"one":"other"},UN=DM,GN=FM,YN=DM,VN=(e,t)=>{const n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),a=r.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?1==s&&11!=a?"one":2==s&&12!=a?"two":7!=s&&8!=s||17==a||18==a?"other":"many":i&&1==s&&11!=a||1==l&&11!=c?"one":"other"},JN=DM,qN=DM,XN=(e,t)=>{const n=String(e).split("."),r=!n[1],o=Number(n[0])==e&&n[0].slice(-2);return t?1==e?"one":"other":1==e&&r?"one":!r||0==e||1!=e&&o>=1&&o<=19?"few":"other"},QN=(e,t)=>t?1==e?"one":2==e||3==e?"two":4==e?"few":"other":1==e?"one":"other",ZN=(e,t)=>t&&1==e?"one":"other",eO=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":1==e?"one":2==e?"two":0==e||r>=3&&r<=10?"few":r>=11&&r<=19?"many":"other"},tO=HM,nO=DM,rO=WM,oO=DM,iO=DM,sO=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e;return t?r&&e>=1&&e<=4?"one":"other":1==e?"one":"other"},aO=$M,lO=DM,cO=DM,uO=DM,dO=HM,fO=DM,pO=FM,hO=DM,gO=DM,mO=DM,vO=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e;return t?1==e||5==e||r&&e>=7&&e<=9?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":1==e?"one":"other"},bO=DM,yO=HM,xO=FM,_O=DM,wO=BM,SO=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-1),s=r.slice(-2);return t?"other":1==e&&o?"one":o&&i>=2&&i<=4&&(s<12||s>14)?"few":o&&1!=r&&(0==i||1==i)||o&&i>=5&&i<=9||o&&s>=12&&s<=14?"many":"other"},kO=(e,t)=>{const n=String(e).split("."),r=n[1]||"",o=r.length,i=Number(n[0])==e,s=i&&n[0].slice(-1),a=i&&n[0].slice(-2),l=r.slice(-2),c=r.slice(-1);return t?"other":i&&0==s||a>=11&&a<=19||2==o&&l>=11&&l<=19?"zero":1==s&&11!=a||2==o&&1==c&&11!=l||2!=o&&1==c?"one":"other"},CO=DM,EO=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-6);return t?"other":0==r||1==r?"one":0!=r&&0==i&&o?"many":"other"},TO=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-6);return t?"other":1==e&&o?"one":0!=r&&0==i&&o?"many":"other"},AO=DM,LO=(e,t)=>{const n=String(e).split("."),r=!n[1],o=Number(n[0])==e&&n[0].slice(-2);return t?1==e?"one":"other":1==e&&r?"one":!r||0==e||1!=e&&o>=1&&o<=19?"few":"other"},MO=DM,RO=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-1),s=r.slice(-2);return t?"other":o&&1==i&&11!=s?"one":o&&i>=2&&i<=4&&(s<12||s>14)?"few":o&&0==i||o&&i>=5&&i<=9||o&&s>=11&&s<=14?"many":"other"},NO=DM,OO=HM,PO=DM,IO=WM,zO=(e,t)=>{const n=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&n?"one":"other"},jO=(e,t)=>{const n=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&n?"one":"other"},DO=DM,FO=DM,BO=WM,$O=DM,HO=HM,WO=HM,KO=(e,t)=>{const n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),a=r.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?"other":i&&1==s&&11!=a||1==l&&11!=c?"one":i&&s>=2&&s<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},UO=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e;return t?"other":e>=0&&e<=1?"one":r&&e>=2&&e<=10?"few":"other"},GO=(e,t)=>{const n=String(e).split("."),r=n[0],o=n[1]||"";return t?"other":0==e||1==e||0==r&&1==o?"one":"other"},YO=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1];return t?"other":1==e&&o?"one":r>=2&&r<=4&&o?"few":o?"other":"many"},VO=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-2);return t?"other":o&&1==i?"one":o&&2==i?"two":o&&(3==i||4==i)||!o?"few":"other"},JO=WM,qO=WM,XO=WM,QO=WM,ZO=WM,eP=DM,tP=DM,nP=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-1),i=r&&n[0].slice(-2);return t?1==e?"one":4==o&&14!=i?"many":"other":1==e?"one":"other"},rP=(e,t)=>{const n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),a=r.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?"other":i&&1==s&&11!=a||1==l&&11!=c?"one":i&&s>=2&&s<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},oP=DM,iP=DM,sP=DM,aP=HM,lP=(e,t)=>{const n=String(e).split("."),r=!n[1],o=Number(n[0])==e,i=o&&n[0].slice(-1),s=o&&n[0].slice(-2);return t?1!=i&&2!=i||11==s||12==s?"other":"one":1==e&&r?"one":"other"},cP=$M,uP=DM,dP=DM,fP=DM,pP=DM,hP=HM,gP=FM,mP=DM,vP=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-1);return t?6==r||9==r||10==e?"few":"other":1==e?"one":"other"},bP=(e,t)=>{const n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),a=o.slice(-1);return t?1==e?"one":"other":i&&(1==r||2==r||3==r)||i&&4!=s&&6!=s&&9!=s||!i&&4!=a&&6!=a&&9!=a?"one":"other"},yP=DM,xP=HM,_P=HM,wP=DM,SP=DM,kP=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e;return t?"other":0==e||1==e||r&&e>=11&&e<=99?"one":"other"},CP=DM,EP=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1],i=Number(n[0])==e,s=i&&n[0].slice(-1),a=i&&n[0].slice(-2),l=r.slice(-1),c=r.slice(-2);return t?3==s&&13!=a?"few":"other":o&&1==l&&11!=c?"one":o&&l>=2&&l<=4&&(c<12||c>14)?"few":o&&0==l||o&&l>=5&&l<=9||o&&c>=11&&c<=14?"many":"other"},TP=HM,AP=$M,LP=DM,MP=DM,RP=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-6);return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&o?"one":0!=r&&0==i&&o?"many":"other"},NP=(e,t)=>t&&1==e?"one":"other",OP=DM,PP=DM,IP=FM,zP=DM,jP=HM,DP=DM,FP=DM,BP=$M,$P=HM,HP=HM,WP=HM,KP=BM,UP={},GP=Array.prototype.slice,YP=function(e){return("0"+e.toString()).substr(-2)},VP=function(e){var t=typeof e;return"function"===t||"object"===t},JP=function(e){return"function"===typeof e},qP=function(e){return null!=e},XP=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},QP=function(e){return"string"==typeof e||"[object String]"===Object.prototype.toString.call(e)},ZP=function(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)},eI=function(e){return!0===e||!1===e},tI=function(e){return null===e},nI=function(e,t,n){return void 0===n||0===+n?Math[e](t):(t=+t,n=+n,isNaN(t)||"number"!=typeof n||n%1!=0?NaN:(t=t.toString().split("e"),+((t=(t=Math[e](+(t[0]+"e"+(t[1]?+t[1]-n:-n)))).toString().split("e"))[0]+"e"+(t[1]?+t[1]+n:n))))},rI=function(e,t){return JP(e)?e(t):e},oI=function(e,t){var n,r;for(n in t)t.hasOwnProperty(n)&&(r=t[n],QP(r)||ZP(r)||eI(r)||XP(r)||tI(r)?e[n]=r:(null==e[n]&&(e[n]={}),oI(e[n],r)));return e},iI={day_names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbr_day_names:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],month_names:[null,"January","February","March","April","May","June","July","August","September","October","November","December"],abbr_month_names:[null,"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],meridian:["AM","PM"]},sI={precision:3,separator:".",delimiter:",",strip_insignificant_zeros:!1},aI={unit:"$",precision:2,format:"%u%n",sign_first:!0,delimiter:",",separator:"."},lI={unit:"%",precision:3,format:"%n%u",separator:".",delimiter:""},cI=[null,"kb","mb","gb","tb"],uI={defaultLocale:"en",locale:"en",defaultSeparator:".",placeholder:/(?:\{\{|%\{)(.*?)(?:\}\}?)/gm,fallbacks:!1,translations:{},missingBehaviour:"message",missingTranslationPrefix:""};UP.reset=function(){var e;for(e in uI)this[e]=uI[e]},UP.initializeOptions=function(){var e;for(e in uI)qP(this[e])||(this[e]=uI[e])},UP.initializeOptions(),UP.locales={},UP.locales.get=function(e){var t=this[e]||this[UP.locale]||this.default;return JP(t)&&(t=t(e)),!1===XP(t)&&(t=[t]),t},UP.locales.default=function(e){var t=[],n=[];return e&&t.push(e),!e&&UP.locale&&t.push(UP.locale),UP.fallbacks&&UP.defaultLocale&&t.push(UP.defaultLocale),t.forEach(function(e){var t=e.split("-"),r=null,o=null;3===t.length?(r=[t[0],t[1]].join("-"),o=t[0]):2===t.length&&(r=t[0]),-1===n.indexOf(e)&&n.push(e),UP.fallbacks&&[r,o].forEach(function(t){null!=t&&t!==e&&-1===n.indexOf(t)&&n.push(t)})}),t.length||t.push("en"),n},UP.pluralization={},UP.pluralization.get=function(e){return this[e]||this[UP.locale]||this.default},UP.pluralization.default=function(e){switch(e){case 0:return["zero","other"];case 1:return["one"];default:return["other"]}},UP.currentLocale=function(){return this.locale||this.defaultLocale},UP.isSet=qP,UP.lookup=function(e,t){t=t||{};var n,r,o,i,s=this.locales.get(t.locale).slice();for(o=this.getFullScope(e,t);s.length;)if(n=s.shift(),r=o.split(t.separator||this.defaultSeparator),i=this.translations[n]){for(;r.length&&null!=(i=i[r.shift()]););if(null!=i)return i}if(qP(t.defaultValue))return rI(t.defaultValue,e)},UP.pluralizationLookupWithoutFallback=function(e,t,n){var r,o,i=this.pluralization.get(t)(e);if(n&&VP(n))for(;i.length;)if(r=i.shift(),qP(n[r])){o=n[r];break}return o},UP.pluralizationLookup=function(e,t,n){n=n||{};var r,o,i,s,a=this.locales.get(n.locale).slice();for(t=this.getFullScope(t,n);a.length;)if(r=a.shift(),o=t.split(n.separator||this.defaultSeparator),i=this.translations[r]){for(;o.length&&(i=i[o.shift()],VP(i));)0===o.length&&(s=this.pluralizationLookupWithoutFallback(e,r,i));if(null!=s)break}return null==s&&qP(n.defaultValue)&&(s=VP(n.defaultValue)?this.pluralizationLookupWithoutFallback(e,n.locale,n.defaultValue):n.defaultValue,i=n.defaultValue),{message:s,translations:i}},UP.meridian=function(){var e=this.lookup("time"),t=this.lookup("date");return e&&e.am&&e.pm?[e.am,e.pm]:t&&t.meridian?t.meridian:iI.meridian},UP.prepareOptions=function(){for(var e,t=GP.call(arguments),n={};t.length;)if("object"==typeof(e=t.shift()))for(var r in e)e.hasOwnProperty(r)&&(qP(n[r])||(n[r]=e[r]));return n},UP.createTranslationOptions=function(e,t){var n=[{scope:e}];return qP(t.defaults)&&(n=n.concat(t.defaults)),qP(t.defaultValue)&&n.push({message:t.defaultValue}),n},UP.translate=function(e,t){t=t||{};var n,r=this.createTranslationOptions(e,t),o=e,i=this.prepareOptions(t);return delete i.defaultValue,r.some(function(t){if(qP(t.scope)?(o=t.scope,n=this.lookup(o,i)):qP(t.message)&&(n=rI(t.message,e)),null!=n)return!0},this)?("string"==typeof n?n=this.interpolate(n,t):XP(n)?n=n.map(function(e){return"string"==typeof e?this.interpolate(e,t):e},this):VP(n)&&qP(t.count)&&(n=this.pluralize(t.count,o,t)),n):this.missingTranslation(e,t)},UP.interpolate=function(e,t){if(null==e)return e;t=t||{};var n,r,o,i,s=e.match(this.placeholder);if(!s)return e;for(;s.length;)o=(n=s.shift()).replace(this.placeholder,"$1"),r=qP(t[o])?t[o].toString().replace(/\$/gm,"_#$#_"):o in t?this.nullPlaceholder(n,e,t):this.missingPlaceholder(n,e,t),i=new RegExp(n.replace(/{/gm,"\\{").replace(/}/gm,"\\}")),e=e.replace(i,r);return e.replace(/_#\$#_/g,"$")},UP.pluralize=function(e,t,n){var r,o;return n=this.prepareOptions({count:String(e)},n),void 0===(o=this.pluralizationLookup(e,t,n)).translations||null==o.translations?this.missingTranslation(t,n):void 0!==o.message&&null!=o.message?this.interpolate(o.message,n):(r=this.pluralization.get(n.locale),this.missingTranslation(t+"."+r(e)[0],n))},UP.missingTranslation=function(e,t){if("guess"===this.missingBehaviour){var n=e.split(".").slice(-1)[0];return(this.missingTranslationPrefix.length>0?this.missingTranslationPrefix:"")+n.replace(/_/g," ").replace(/([a-z])([A-Z])/g,function(e,t,n){return t+" "+n.toLowerCase()})}return'[missing "'+[null!=t&&null!=t.locale?t.locale:this.currentLocale(),this.getFullScope(e,t)].join(t.separator||this.defaultSeparator)+'" translation]'},UP.missingPlaceholder=function(e,t,n){return"[missing "+e+" value]"},UP.nullPlaceholder=function(){return UP.missingPlaceholder.apply(UP,arguments)},UP.toNumber=function(e,t){t=this.prepareOptions(t,this.lookup("number.format"),sI);var n,r,o=e<0,i=function(e,t){return nI("round",e,-t).toFixed(t)}(Math.abs(e),t.precision).toString(),s=i.split("."),a=[],l=t.format||"%n",c=o?"-":"";for(e=s[0],n=s[1];e.length>0;)a.unshift(e.substr(Math.max(0,e.length-3),3)),e=e.substr(0,e.length-3);return r=a.join(t.delimiter),t.strip_insignificant_zeros&&n&&(n=n.replace(/0+$/,"")),t.precision>0&&n&&(r+=t.separator+n),r=(l=t.sign_first?"%s"+l:l.replace("%n","%s%n")).replace("%u",t.unit).replace("%n",r).replace("%s",c)},UP.toCurrency=function(e,t){return t=this.prepareOptions(t,this.lookup("number.currency.format",t),this.lookup("number.format",t),aI),this.toNumber(e,t)},UP.localize=function(e,t,n){switch(n||(n={}),e){case"currency":return this.toCurrency(t,n);case"number":return e=this.lookup("number.format",n),this.toNumber(t,e);case"percentage":return this.toPercentage(t,n);default:var r;return r=e.match(/^(date|time)/)?this.toTime(e,t,n):t.toString(),this.interpolate(r,n)}},UP.parseDate=function(e){var t,n,r;if(null==e)return e;if("object"==typeof e)return e;if(t=e.toString().match(/(\d{4})-(\d{2})-(\d{2})(?:[ T](\d{2}):(\d{2}):(\d{2})([\.,]\d{1,3})?)?(Z|\+00:?00)?/)){for(var o=1;o<=6;o++)t[o]=parseInt(t[o],10)||0;t[2]-=1,r=t[7]?1e3*("0"+t[7]):null,n=t[8]?new Date(Date.UTC(t[1],t[2],t[3],t[4],t[5],t[6],r)):new Date(t[1],t[2],t[3],t[4],t[5],t[6],r)}else"number"==typeof e?(n=new Date).setTime(e):e.match(/([A-Z][a-z]{2}) ([A-Z][a-z]{2}) (\d+) (\d+:\d+:\d+) ([+-]\d+) (\d+)/)?(n=new Date).setTime(Date.parse([RegExp.$1,RegExp.$2,RegExp.$3,RegExp.$6,RegExp.$4,RegExp.$5].join(" "))):(e.match(/\d+ \d+:\d+:\d+ [+-]\d+ \d+/),(n=new Date).setTime(Date.parse(e)));return n},UP.strftime=function(e,t,n){n=this.lookup("date",n);var r=UP.meridian();if(n||(n={}),n=this.prepareOptions(n,iI),isNaN(e.getTime()))throw new Error("I18n.strftime() requires a valid date object, but received an invalid date.");var o=e.getDay(),i=e.getDate(),s=e.getFullYear(),a=e.getMonth()+1,l=e.getHours(),c=l,u=l>11?1:0,d=e.getSeconds(),f=e.getMinutes(),p=e.getTimezoneOffset(),h=Math.floor(Math.abs(p/60)),g=Math.abs(p)-60*h,m=(p>0?"-":"+")+(h.toString().length<2?"0"+h:h)+(g.toString().length<2?"0"+g:g);return c>12?c-=12:0===c&&(c=12),t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%a",n.abbr_day_names[o])).replace("%A",n.day_names[o])).replace("%b",n.abbr_month_names[a])).replace("%B",n.month_names[a])).replace("%d",YP(i))).replace("%e",i)).replace("%-d",i)).replace("%H",YP(l))).replace("%-H",l)).replace("%k",l)).replace("%I",YP(c))).replace("%-I",c)).replace("%l",c)).replace("%m",YP(a))).replace("%-m",a)).replace("%M",YP(f))).replace("%-M",f)).replace("%p",r[u])).replace("%P",r[u].toLowerCase())).replace("%S",YP(d))).replace("%-S",d)).replace("%w",o)).replace("%y",YP(s))).replace("%-y",YP(s).replace(/^0+/,""))).replace("%Y",s)).replace("%z",m)).replace("%Z",m)},UP.toTime=function(e,t,n){var r=this.parseDate(t),o=this.lookup(e,n);if(null==r)return r;var i=r.toString();return i.match(/invalid/i)?i:o?this.strftime(r,o,n):i},UP.toPercentage=function(e,t){return t=this.prepareOptions(t,this.lookup("number.percentage.format",t),this.lookup("number.format",t),lI),this.toNumber(e,t)},UP.toHumanSize=function(e,t){for(var n,r,o,i=e,s=0;i>=1024&&s<4;)i/=1024,s+=1;return 0===s?(o=this.getFullScope("number.human.storage_units.units.byte",t),n=this.t(o,{count:i}),r=0):(o=this.getFullScope("number.human.storage_units.units."+cI[s],t),n=this.t(o),r=i-Math.floor(i)===0?0:1),t=this.prepareOptions(t,{unit:n,precision:r,format:"%n%u",delimiter:""}),this.toNumber(i,t)},UP.getFullScope=function(e,t){return t=t||{},XP(e)&&(e=e.join(t.separator||this.defaultSeparator)),t.scope&&(e=[t.scope,e].join(t.separator||this.defaultSeparator)),e},UP.extend=function(e,t){return void 0===e&&void 0===t?{}:oI(e,t)},UP.t=UP.translate.bind(UP),UP.l=UP.localize.bind(UP),UP.p=UP.pluralize.bind(UP);IM({},{DEFAULT_LANGUAGE:()=>fI,DEFAULT_LANGUAGE_SHORT:()=>pI,flattenParams:()=>wI,flattenTranslationsJSON:()=>mI,format:()=>SI,formatWithKeys:()=>kI,getLongLanguageDesc:()=>_I,getShortLanguageDesc:()=>xI,parseLangFromUrl:()=>vI,resolveLocale:()=>yI,updateLangAttribute:()=>CI});var dI=[{short:"es",long:"es-ES",label:"Spanish",translatedLabel:"Common.Spanish"},{short:"sv",long:"sv-SE",label:"Swedish",translatedLabel:"Common.Swedish"},{short:"ja",long:"ja-JP",label:"Japanese",translatedLabel:"Common.Japanese"},{short:"en",long:"en-US",label:"English",translatedLabel:"Common.English"},{short:"de",long:"de-DE",label:"German",translatedLabel:"Common.German"},{short:"fr",long:"fr-FR",label:"French",translatedLabel:"Common.French"},{short:"it",long:"it-IT",label:"Italian",translatedLabel:"Common.Italian"},{short:"nl",long:"nl-NL",label:"Dutch",translatedLabel:"Common.Dutch"},{short:"pt",long:"pt-BR",label:"Brazilian Portuguese",translatedLabel:"Common.BrazilianPortuguese"},{short:"ru",long:"ru-RU",label:"Russian",translatedLabel:"Common.Russian"},{short:"zh-CN",long:"zh-CN",label:"Simplified Chinese",translatedLabel:"Common.SimplifiedChinese"},{short:"zh-TW",long:"zh-TW",label:"Traditional Chinese",translatedLabel:"Common.TraditionalChinese"},{short:"pl",long:"pl-PL",label:"Polish",translatedLabel:"Common.Polish"},{short:"tr",long:"tr-TR",label:"Turkish",translatedLabel:"Common.Turkish"},{short:"ko",long:"ko-KR",label:"Korean",translatedLabel:"Common.Korean"},{short:"qps-ploc",long:"qps-ploc",label:'qps-ploc (f.k.a. "pseudo")'},{short:"zz",long:"zz",label:"zz"}],fI="en-US",pI="en",hI=["zh-cn","zh-tw","qps-ploc"],gI=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),mI=e=>(console.warn("Deprecated, use `buildUtils.flattenTranslationsJSON` instead"),gI(e)?Object.keys(e).reduce((t,n)=>{const r=e[n],o=gI(r)&&r.value;return o&&(t[n]=o),t},{}):{}),vI=()=>{var e;return null!=(e=new URLSearchParams(window.location.search).get("lang"))?e:void 0},bI=e=>{if(!e)return;"zh-hk"!==e.toLocaleLowerCase()&&"zh-mo"!==e.toLocaleLowerCase()||(e="zh-TW");const t=e.toLowerCase();if(hI.includes(e.toLocaleLowerCase()))return dI.find(({long:e})=>e.toLowerCase()===t);const[n]=t.split("-");return dI.find(({short:e})=>e.toLowerCase()===n||e.toLowerCase()===t)},yI=(...e)=>{for(const t of e){const e=bI(t);if(e)return e.short}},xI=e=>{const t=bI(e);return t?t.short:(console.warn(`Language '${e}' not supported, falling back to '${pI}'`),pI)},_I=e=>{const t=bI(e);return t?t.long:(console.warn(`Language '${e}' not supported, falling back to '${fI}'`),fI)},wI=e=>Array.isArray(e[0])?e[0]:e,SI=(e,...t)=>{var n;return null==(n=e.match(/\{(\d+)\}/g))?void 0:n.length,e.replace(/\{(\d+)\}/g,(e,n)=>void 0!==t[n]?String(t[n]):e)},kI=(e,t)=>e.replace(/(\{)(\w+)(\})/g,(e,n,r)=>{var o;return t[r],null!=(o=t[r])?o:e}),CI=e=>{const t=xI(e);document.documentElement.setAttribute("lang",t)},EI=class e{static configure(t,n=fI){e.translations=t,e.language=_I(n),e.languageShort=xI(n),CI(e.language),e.onTranslationsChangeListeners.forEach(e=>{e()}),e.i18nProvider=UP,UP.missingTranslation=e=>e,UP.defaultSeparator=null,UP.locale=e.language,UP.translations={[e.language]:e.translationsPlurals};const r=e.languageShort.split("-")[0];UP.pluralization[e.language]=e=>{try{const t=jM[r](e),n=[t];return"few"!==t&&"many"!==t||n.push("other"),n}catch(t){switch(e){case 0:return["zero","other"];case 1:return["one"];default:return["other"]}}}}static getWithKeys(t,n){var r;let o=null!=(r=e.translations[t])?r:t;return n&&Object.keys(n).length>0&&(o=kI(o,n)),o}static getPlural(t,n,r){return e.i18nProvider.t(t,{count:n,...r})}static append(t){Object.assign(e.translations,t),e.onTranslationsChangeListeners.forEach(e=>{e()})}static appendPlurals(t){Object.assign(e.translationsPlurals,t),e.onTranslationsChangeListeners.forEach(e=>{e()})}static onTranslationsChange(t){return e.onTranslationsChangeListeners.push(t),()=>{e.onTranslationsChangeListeners.splice(e.onTranslationsChangeListeners.indexOf(t))}}};zM(EI,"translations",{}),zM(EI,"translationsPlurals",{}),zM(EI,"language"),zM(EI,"languageShort"),zM(EI,"onTranslationsChangeListeners",[]),zM(EI,"i18nProvider"),zM(EI,"get",(e,...t)=>{var n;const r=wI(t);let o=null!=(n=EI.translations[e])?n:e;return r.length>0&&(o=SI(o,...r)),o});var TI=EI;var AI=function(){const[e,t]=S(0);return w(()=>{const n=TI.onTranslationsChange(()=>{t(e+1)});return()=>{n()}},[]),TI.get},LI=TI;function MI({defaultSelection:e}){const[t]=vu();return w(()=>{t.focus(()=>{const e=document.activeElement,n=t.getRootElement();null===n||null!==e&&n.contains(e)||n.focus({preventScroll:!0})},{defaultSelection:e})},[e,t]),null}function RI(e,t=!0){if(e)return!1;let n=Ui().getTextContent();return t&&(n=n.trim()),""===n}function NI(e){return()=>function(e){if(!RI(e,!1))return!1;const t=Ui().getChildren(),n=t.length;if(n>1)return!1;for(let e=0;e<n;e++){const n=t[e];if(Xo(n))return!1;if(Vo(n)){if(!li(n))return!1;if(0!==n.__indent)return!1;const t=n.getChildren(),r=t.length;for(let n=0;n<r;n++)if(!Or(t[e]))return!1}}return!0}(e)}const OI="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?_:w;function PI({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:r,ariaDescribedBy:o,ariaErrorMessage:i,ariaExpanded:s,ariaInvalid:a,ariaLabel:l,ariaLabelledBy:c,ariaMultiline:u,ariaOwns:d,ariaRequired:f,autoCapitalize:p,className:h,id:g,role:m="textbox",spellCheck:v=!0,style:b,tabIndex:y,"data-testid":_,...w},k){const[C,E]=S(e.isEditable()),T=M(t=>{t&&t.ownerDocument&&t.ownerDocument.defaultView?e.setRootElement(t):e.setRootElement(null)},[e]),A=x(()=>function(...e){return t=>{for(const n of e)"function"==typeof n?n(t):null!=n&&(n.current=t)}}(k,T),[T,k]);return OI(()=>(E(e.isEditable()),e.registerEditableListener(e=>{E(e)})),[e]),wu.jsx("div",{"aria-activedescendant":C?t:void 0,"aria-autocomplete":C?n:"none","aria-controls":C?r:void 0,"aria-describedby":o,...null!=i?{"aria-errormessage":i}:{},"aria-expanded":C&&"combobox"===m?!!s:void 0,...null!=a?{"aria-invalid":a}:{},"aria-label":l,"aria-labelledby":c,"aria-multiline":u,"aria-owns":C?d:void 0,"aria-readonly":!C||void 0,"aria-required":f,autoCapitalize:p,className:h,contentEditable:C,"data-testid":_,id:g,ref:A,role:m,spellCheck:v,style:b,tabIndex:y,...w})}const II=E(PI);function zI(e){return e.getEditorState().read(NI(e.isComposing()))}const jI=E(DI);function DI(e,t){const{placeholder:n,...r}=e,[o]=vu();return wu.jsxs(wu.Fragment,{children:[wu.jsx(II,{editor:o,...r,ref:t}),null!=n&&wu.jsx(FI,{editor:o,content:n})]})}function FI({content:e,editor:t}){const n=function(e){const[t,n]=S(()=>zI(e));return OI(()=>{function t(){const t=zI(e);n(t)}return t(),Ka(e.registerUpdateListener(()=>{t()}),e.registerEditableListener(()=>{t()}))},[e]),t}(t),[r,o]=S(t.isEditable());if(_(()=>(o(t.isEditable()),t.registerEditableListener(e=>{o(e)})),[t]),!n)return null;let i=null;return"function"==typeof e?i=e(r):null!==e&&(i=e),null===i?null:wu.jsx("div",{"aria-hidden":!0,children:i})}const BI=v(null),$I={didCatch:!1,error:null};class HI extends R{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=$I}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(...e){const{error:t}=this.state;null!==t&&(this.props.onReset?.({args:e,reason:"imperative-api"}),this.setState($I))}componentDidCatch(e,t){this.props.onError?.(e,t)}componentDidUpdate(e,t){const{didCatch:n}=this.state,{resetKeys:r}=this.props;n&&null!==t.error&&function(e=[],t=[]){return e.length!==t.length||e.some((e,n)=>!Object.is(e,t[n]))}(e.resetKeys,r)&&(this.props.onReset?.({next:r,prev:e.resetKeys,reason:"keys"}),this.setState($I))}render(){const{children:e,fallbackRender:t,FallbackComponent:n,fallback:r}=this.props,{didCatch:o,error:i}=this.state;let s=e;if(o){const e={error:i,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof t)s=t(e);else if(n)s=N(n,e);else{if(void 0===r)throw i;s=r}}return N(BI.Provider,{value:{didCatch:o,error:i,resetErrorBoundary:this.resetErrorBoundary}},s)}}function WI({children:e,onError:t}){return wu.jsx(HI,{fallback:wu.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:t,children:e})}const KI={name:"@lexical/react/ReactProvider"};function UI(e){throw new Error(e)}const GI="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?_:w;function YI({editor:e,ErrorBoundary:t}){return function(e,t){const[n,r]=S(()=>e.getDecorators());return GI(()=>e.registerDecoratorListener(e=>{g(()=>{r(e)})}),[e]),w(()=>{r(e.getDecorators())},[e]),x(()=>{const r=[],o=Object.keys(n);for(let i=0;i<o.length;i++){const s=o[i],a=wu.jsx(t,{onError:t=>e._onError(t),children:wu.jsx(O,{fallback:null,children:n[s]})}),l=e.getElementByKey(s);null!==l&&r.push(m(a,l,s))}return r},[t,n,e])}(e,t)}function VI({editor:e,ErrorBoundary:t}){return function(e){const t=lc.maybeFromEditor(e);if(t&&t.hasExtensionByName(KI.name)){for(const e of["@lexical/plain-text","@lexical/rich-text"])t.hasExtensionByName(e)&&UI(`LexicalBuilder: @lexical/react legacy text plugins conflict with the ${e} extension. Remove the legacy <RichTextPlugin/> or <PlainTextPlugin/> component.`);return!0}return!1}(e)?null:wu.jsx(YI,{editor:e,ErrorBoundary:t})}function JI(e){return e.getEditorState().read(NI(e.isComposing()))}function qI(e){GI(()=>Ka(vd(e),function(e){const t=window.location.origin,n=n=>{if(n.origin!==t)return;const r=e.getRootElement();if(document.activeElement!==r)return;const o=n.data;if("string"==typeof o){let t;try{t=JSON.parse(o)}catch(e){return}if(t&&"nuanria_messaging"===t.protocol&&"request"===t.type){const r=t.payload;if(r&&"makeChanges"===r.functionId){const t=r.args;if(t){const[r,o,i,s,a]=t;e.update(()=>{const e=ao();if(Wr(e)){const t=e.anchor;let l=t.getNode(),c=0,u=0;if(Or(l)&&r>=0&&o>=0&&(c=r,u=r+o,e.setTextNodeRange(l,c,l,u)),c===u&&""===i||(e.insertRawText(i),l=t.getNode()),Or(l)){c=s,u=s+a;const t=l.getTextContentSize();c=c>t?t:c,u=u>t?t:u,e.setTextNodeRange(l,c,l,u)}n.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}(e)),[e])}function XI({contentEditable:e,placeholder:t=null,ErrorBoundary:n}){const[r]=vu();return qI(r),wu.jsxs(wu.Fragment,{children:[e,wu.jsx(QI,{content:t}),wu.jsx(VI,{editor:r,ErrorBoundary:n})]})}function QI({content:e}){const[t]=vu(),n=function(e){const[t,n]=S(()=>JI(e));return GI(()=>{function t(){const t=JI(e);n(t)}return t(),Ka(e.registerUpdateListener(()=>{t()}),e.registerEditableListener(()=>{t()}))},[e]),t}(t),r=wd();return n?"function"==typeof e?e(r):e:null}const ZI=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:wu.jsx("path",{d:"m2.604 7.672-.276.96h2.004l-.276-.96a42 42 0 0 1-.372-1.284L3.348 5.08H3.3q-.156.66-.336 1.32-.168.648-.36 1.272m-2.628 4.176L2.532 4h1.632l2.556 7.848H5.256l-.612-2.124h-2.64l-.612 2.124zm9.23.144q-.768 0-1.26-.48-.48-.48-.48-1.248 0-.948.828-1.464.828-.528 2.64-.72a1.4 1.4 0 0 0-.252-.804q-.228-.348-.828-.348-.432 0-.852.168-.408.168-.804.408l-.504-.924a6 6 0 0 1 1.104-.54 3.8 3.8 0 0 1 1.32-.228q1.104 0 1.644.66.552.648.552 1.884v3.492h-1.14l-.096-.648h-.048a4.3 4.3 0 0 1-.852.564q-.444.228-.972.228m.444-1.08q.36 0 .648-.168.3-.18.636-.48v-1.32q-1.2.156-1.668.468-.468.3-.468.744 0 .396.24.576t.612.18M14 1h1v14h-1zm-1 0h3v1h-3zm0 13h3v1h-3z"})})),ez=E((e,t)=>wu.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[wu.jsx("path",{d:"M0 1h16v2H0zm15 4v2H1V5zM0 11V9h16v2zm3 4v-2h10v2z"}),wu.jsx("use",{transform:"matrix(-1 0 0 1 16 0)"})]})),tz=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:wu.jsx("path",{fillRule:"evenodd",d:"M15 1v1H0V1zm-2 5H0V5h13zM0 9h16v1H0zm0 4h10v1H0z",clipRule:"evenodd"})})),nz=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:wu.jsx("path",{d:"M16 1v2H1V1zM3 5h13v2H3zm13 6H0V9h16zm0 4H6v-2h10z"})})),rz=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:wu.jsx("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5z"})})),oz=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:wu.jsx("path",{d:"M2.5 10a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3M16 12H7v-1h9zM2.5 3a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3M16 5H7V4h9z"})})),iz=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:wu.jsx("path",{d:"M5 13v1.382L7.764 13H14a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1H2a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1zm-1 3v-2H2a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H8zM4 6v1h8V6zm0 3v1h7V9z"})})),sz=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:wu.jsx("path",{d:"M2.05 9q.372 0 .72.09.349.089.623.274.273.186.436.468t.163.66a1.38 1.38 0 0 1-.284.86 2.3 2.3 0 0 1-.304.333l-.174.155-.18.152-1.243 1.004H4V14H.114v-.963l2.095-1.72.123-.115q.114-.116.195-.235a.7.7 0 0 0 .122-.399.54.54 0 0 0-.182-.422.7.7 0 0 0-.486-.163.7.7 0 0 0-.52.204.83.83 0 0 0-.217.406l-.022.127L0 10.568l.031-.18q.06-.263.193-.48a1.8 1.8 0 0 1 .452-.492 2 2 0 0 1 .626-.31Q1.655 9 2.05 9M16 12H6v-1h10zM3 7H1.697V3.328l-1.022.72L0 3.208 1.807 2H3zm13-2H6V4h10z"})})),az=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:wu.jsx("path",{d:"M5.52 11.938 4.5 15H1L6.425 1h3.238L15 15h-3.5l-1.02-3.062zm.73-2.188h3.5L8 4.5z"})})),lz=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:wu.jsx("path",{fillRule:"evenodd",d:"M12.483 4.4c0 1.376-.726 2.562-1.77 3.097C12.056 8.083 13 9.475 13 11.1c0 2.154-1.66 3.9-3.707 3.9H3V1h6.466c1.666 0 3.017 1.522 3.017 3.4m-6.897 2h2.91a1.6 1.6 0 0 0 0-3.2h-2.91zm0 6.4h3.1a1.9 1.9 0 0 0 0-3.8h-3.1z",clipRule:"evenodd"})})),cz=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:wu.jsx("path",{d:"M4.145 0h1.71l2.391 6.833-.785.784L7.245 7h-4.49l-1.283 3.665-.944-.33zm-1.04 6h3.79l-1.75-5h-.29zm9.066-.321a1 1 0 0 0-1.414 0l-6.364 6.364a1 1 0 0 0 0 1.414l2.25 2.25A1 1 0 0 0 7.35 16h6.471v-1h-3.114l4.686-4.686a1 1 0 0 0 0-1.414zm-2.2 8.643L9.293 15H7.35L5.1 12.75l1.65-1.65zm.707-.708-3.22-3.221 4.006-4.007 3.222 3.221z"})})),uz=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:wu.jsx("path",{d:"M8.5 0a7.99 7.99 0 0 1 6.34 3.12c1.167 1.514 1.714 3.535 1.268 5.395-.444 1.85-1.776 2.609-3.192 2.897a7 7 0 0 1-1.24.113l-.683.012c-.681.018-1.276.086-1.653.484-.577.511-.487.996-.255 1.464l.106.2.281.49c.259.484.383.957-.253 1.43-.435.324-1 .408-1.54.353A8.001 8.001 0 0 1 8.5 0m0 1a7 7 0 0 0-.315 13.993.54.54 0 0 0 .235-.063c.166-.09.182-.272.088-.437-.084-.146-.175-.29-.254-.438a3 3 0 0 1-.297-.758 1.94 1.94 0 0 1 .05-1.06c.124-.365.35-.674.64-.937.519-.525 1.201-.68 1.765-.733l.294-.02.344-.012.389-.007c.466-.006.862-.011 1.278-.096.855-.174 1.538-.52 1.971-1.128q.091-.126.173-.28c1-1.887.164-4.339-1.317-5.878A6.98 6.98 0 0 0 8.5 1m-4 4a2 2 0 1 1 0 4 2 2 0 0 1 0-4M13 6.5a1 1 0 1 1 0 2 1 1 0 0 1 0-2m-1-3a1 1 0 1 1 0 2 1 1 0 0 1 0-2M8 2a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3"})})),dz=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:wu.jsx("path",{d:"M14 5H2V3h12zm-9 8H2V6h3zm1 0V6h4v7zm5 0V6h3v7zM0 2a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1zm1 0v12h14V2z"})})),fz=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:wu.jsx("path",{d:"M7.041 14.855A.2.2 0 0 1 6.85 15H5.265a.2.2 0 0 1-.192-.255l3.886-13.6A.2.2 0 0 1 9.15 1h1.584a.2.2 0 0 1 .192.255z"})})),pz=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:wu.jsx("path",{d:"m9.354 7.146-.708.708a2.33 2.33 0 0 0-3.292 0l-2.75 2.75a1.975 1.975 0 0 0 2.792 2.793l2.75-2.75.708.707-2.75 2.75a2.975 2.975 0 0 1-4.208-4.208l2.75-2.75a3.33 3.33 0 0 1 4.708 0m4.75-5.25a2.975 2.975 0 0 1 0 4.208l-2.75 2.75a3.33 3.33 0 0 1-4.708 0l.708-.708c.909.91 2.383.91 3.292 0l2.75-2.75a1.975 1.975 0 1 0-2.793-2.792l-2.75 2.75-.707-.708 2.75-2.75a2.975 2.975 0 0 1 4.207 0Z"})})),hz=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:wu.jsx("path",{d:"M13 1v7.059c0 1.714-.364 2.924-1.273 3.73C10.91 12.598 9.455 13 8 13c-1.545 0-3-.403-3.818-1.21C3.455 10.983 3 9.773 3 8.059V1h2.455v7.059c0 .302 0 .706.09 1.008.091.303.182.605.364.807s.364.504.727.605c.273.1.91.202 1.455.202.909 0 1.727-.202 2-.706.364-.404.454-1.11.454-2.017V1zM3 14h10v1H3z"})}));var gz,mz,vz={exports:{}},bz={};function yz(e){return yz="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yz(e)}var xz=(mz||(mz=1,vz.exports=function(){if(gz)return bz;gz=1;var e=y,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 s(e,n,s){var a,l={},c=null,u=null;for(a in void 0!==s&&(c=""+s),void 0!==n.key&&(c=""+n.key),void 0!==n.ref&&(u=n.ref),n)r.call(n,a)&&!i.hasOwnProperty(a)&&(l[a]=n[a]);if(e&&e.defaultProps)for(a in n=e.defaultProps)void 0===l[a]&&(l[a]=n[a]);return{$$typeof:t,type:e,key:c,ref:u,props:l,_owner:o.current}}return bz.Fragment=n,bz.jsx=s,bz.jsxs=s,bz}()),vz.exports);const _z=/((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/,wz=[e=>{const t=_z.exec(e);if(null===t)return null;const n=t[0];return{index:t.index,length:n.length,text:n,url:n.startsWith("http")?n:`https://${n}`,attributes:{target:"_blank"}}},function(e,t=e=>e){return n=>{const r=e.exec(n);return null===r?null:{index:r.index,length:r[0].length,text:r[0],url:t(r[0])}}}(/(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/,e=>`mailto:${e}`)];function Sz(){return xz.jsx(yd,{matchers:wz})}const kz=()=>{const[e]=vu(),t=wd(),n=M(n=>{for(const[r,o]of n)"updated"!==o&&"created"!==o||e.getEditorState().read(()=>{const n=t?"pointer":"",o=e.getElementByKey(r);o&&(o.style.cursor=n)})},[t,e]);return w(()=>Ka(e.registerMutationListener(dc,e=>{n(e)}),e.registerMutationListener(gc,e=>{n(e)}),e.registerCommand(Tt,t=>(t.metaKey&&t.target&&e.getEditorState().read(()=>{const e=ao();let t;if(Wr(e)&&(t=e.focus.getNode().getParent()),Ur(e)&&(t=e.getNodes()[0]),vc(t)||hc(t)){const e=t.getURL();setTimeout(()=>{const t=window.open(e,"_blank");t?.focus()},0)}}),!1),ci)),[e,n]),null};function Cz(e){const{anchor:t,focus:n}=e,r=t.getNode(),o=n.getNode();return r===o?r:e.isBackward()?Za(n)?r:o:Za(t)?r:o}const Ez=new Set(["http:","https:","mailto:","sms:","tel:"]),Tz=e=>{const t=e;return t.password="",t.username="",t};function Az(e){try{const t=new URL(e);return Ez.has(t.protocol)?{url:Tz(t).toString(),target:"_blank"}:{url:"about:blank"}}catch{return{url:e,target:"_blank"}}}const Lz=/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%/.\w-_]*)?\??(?:[-+=&;%@.\w_]*)#?(?:[\w]*))?)/;function Mz(e){return"https://"===e||Lz.test(e)}const Rz=Gb(aw)(({theme:e})=>({background:e.palette.common.white,display:"flex",alignItems:"center",padding:e.spacing(1)})),Nz=({anchorEl:e,link:t,onChanged:n,onOpened:r})=>{const o=Boolean(e),i=k(null),[s,a]=S(t);w(()=>{a(t)},[t]);const l=M(()=>{n(s),window.open(Az(s).url,"_blank"),r()},[s,r,n]),c=M(e=>{e.preventDefault(),e.stopPropagation(),n(s)},[s,n]),u=M(e=>{"Enter"===e.key&&(e.preventDefault(),e.stopPropagation(),n(s))},[s,n]),d=M(e=>{e.preventDefault(),a(e.currentTarget.value)},[]);return xz.jsx(k_,{open:o,anchorEl:e,placement:"bottom-start",sx:{zIndex:1},transition:!0,children:({TransitionProps:e})=>xz.jsx(fw,{...e,children:xz.jsx(by,{className:"tekPopperMenu",children:xz.jsxs(Rz,{direction:"row",children:[xz.jsx(F_,{ref:i,placeholder:t,margin:"dense",size:"small",value:s,onChange:d,onKeyDown:u}),xz.jsx($y,{onClick:l,children:xz.jsx(Gw,{})}),xz.jsx($y,{onClick:c,children:xz.jsx(Yw,{})})]})})})})},Oz=()=>{const[e]=vu(),t=wd(),[n,r]=S(null),[o,i]=S(""),s=k(!1),a=M(()=>{if(s.current)return s.current=!1,!1;const t=ao();if(Wr(t)){const n=Cz(t),o=n.getParent();if(vc(o)||vc(n))return r(null),i(""),!1;let s;if(hc(o)&&(s=o),hc(n)&&(s=n),hc(s)){const t=e.getElementByKey(s.getKey());return i(s.getURL()),r(t),!0}r(null),i("")}return!1},[e]),l=M(t=>{s.current=!0,e.update(()=>{e.dispatchCommand(bc,Az(t))},{onUpdate:()=>{r(null)}})},[e]),c=M(()=>{r(null)},[]);return w(()=>Ka(e.registerCommand(Ct,()=>a(),1),e.registerCommand(Tt,()=>a(),1)),[e,a]),t?xz.jsx(Nz,{anchorEl:n,link:o,onChanged:l,onOpened:c}):null};function Pz(){return xz.jsx(Vw,{validateUrl:Mz})}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('.tek__editor__container {\n color: #000;\n position: relative;\n line-height: 1.25;\n font-weight: 400;\n text-align: left;\n resize: none;\n height: 100%;\n overflow-y: auto;\n}\n.tek__editor__container {\n -ms-overflow-style: none; /* Internet Explorer and Edge */\n scrollbar-width: none; /* Firefox */\n}\n.tek__editor__container::-webkit-scrollbar {\n display: none;\n}\n\n.tek__editor__container__scrollbar:hover {\n -ms-overflow-style: auto;\n scrollbar-width: thin;\n scrollbar-color: lightgray transparent;\n}\n.tek__editor__container__scrollbar:hover::-webkit-scrollbar {\n display: block;\n}\n\n.tek__editor__Wrapper {\n position: relative;\n background-color: transparent;\n flex: 1;\n height: 100%;\n}\n\n.tek__editor__input {\n font-size: 16px;\n caret-color: rgb(5, 5, 5);\n position: relative;\n tab-size: 1;\n outline: 0;\n caret-color: #444;\n min-height: 0px;\n color: #404040;\n display: block;\n background-color: transparent;\n}\n\n.tek__editor__placeholder {\n color: #999;\n overflow: hidden;\n position: absolute;\n text-overflow: ellipsis;\n top: 0px;\n left: 0px;\n font-size: 16px;\n user-select: none;\n display: inline-block;\n pointer-events: none;\n}\n\n.tek__editor__logo {\n display: flex;\n flex: 1;\n align-items: center;\n justify-content: center;\n color: #999;\n overflow: hidden;\n}\n\n.tek__editor__paragraph {\n margin: 0 0 0 0;\n position: relative;\n cursor: auto;\n}\n\n.tek__ltr {\n text-align: left;\n}\n\n.tek__rtl {\n text-align: right;\n}\n\n.tek__h1 {\n font-size: 28px;\n color: rgb(5, 5, 5);\n font-weight: bold;\n margin: 0px 0px 0.5em;\n}\n.tek__h2 {\n font-size: 16px;\n color: rgb(101, 103, 107);\n font-weight: 700;\n margin: 0px 0px 0.25em;\n text-transform: uppercase;\n}\n.tek__h3 {\n font-size: 12px;\n text-transform: uppercase;\n margin: 0px 0px 0.25em;\n}\n\n.tek__textBase {\n -webkit-user-select: text;\n user-select: text;\n}\n\n.tek__textBold {\n font-weight: bold;\n}\n\n.tek__textItalic {\n font-style: italic;\n}\n\n.tek__textUnderline {\n text-decoration: underline;\n}\n\n.tek__ol1 {\n padding: 0;\n margin: 0;\n list-style-position: inside;\n}\n.tek__ol2 {\n padding: 0;\n margin: 0;\n list-style-type: upper-alpha;\n list-style-position: inside;\n}\n.tek__ol3 {\n padding: 0;\n margin: 0;\n list-style-type: lower-alpha;\n list-style-position: inside;\n}\n.tek__ol4 {\n padding: 0;\n margin: 0;\n list-style-type: upper-roman;\n list-style-position: inside;\n}\n.tek__ol5 {\n padding: 0;\n margin: 0;\n list-style-type: lower-roman;\n list-style-position: inside;\n}\n.tek__ul {\n padding: 0;\n margin: 0;\n list-style-position: inside;\n}\n.tek__listItem {\n margin: 0 12px;\n}\n.tek__nestedListItem {\n list-style-type: none;\n}\n.tek__nestedListItem:before,\n.tek__nestedListItem:after {\n display: none;\n}\n\n.tek__quote {\n margin: 0;\n margin-left: 12px;\n margin-bottom: 10px;\n font-size: 15px;\n color: rgb(101, 103, 107);\n border-left-color: rgb(206, 208, 212);\n border-left-width: 4px;\n border-left-style: solid;\n padding-left: 16px;\n}\n\n.tek__table {\n border-collapse: collapse;\n border-spacing: 0;\n table-layout: fixed;\n position: relative;\n margin-top: 8px;\n margin-bottom: 8px;\n padding: 0;\n overflow: hidden;\n}\n\n.tek__tableCell {\n border: 1px solid rgb(206, 208, 212);\n vertical-align: center;\n text-align: start;\n padding: 6px 8px;\n position: relative;\n cursor: default;\n outline: none;\n margin: 8px;\n line-height: 1.25;\n}\n\n.tek__tableCellNoBorder {\n border: none;\n background: transparent;\n vertical-align: center;\n text-align: start;\n padding: 6px 8px;\n position: relative;\n cursor: default;\n outline: none;\n margin: 8px;\n}\n\n.tek__tableCellNoBorderEditMode {\n border: none;\n background: transparent;\n vertical-align: center;\n text-align: start;\n padding: 6px 8px;\n position: relative;\n cursor: default;\n outline: none;\n margin: 8px;\n}\n\n.tek__resizer {\n position: absolute;\n width: 6px;\n right: 0;\n top: 0;\n bottom: 0;\n cursor: col-resize;\n user-select: none;\n background-color: #009845;\n pointer-events: all;\n z-index: 2;\n opacity: 0;\n transition: opacity 0.3s ease; /* Transition effect */\n transform: translate(-3px, 0);\n}\n.tek__resizer:hover {\n opacity: 0.2;\n}\n\n.tek__resizeContainer {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 100%;\n z-index: 1;\n user-select: none;\n pointer-events: none;\n margin: 0;\n padding: 0;\n}\n\n.tek__tableActionButton {\n position: absolute;\n top: 0;\n left: 0;\n pointer-events: none;\n background-color: "white";\n user-select: none;\n}\n\n.tek__tekCellHighlight {\n background-color: rgba(100, 149, 237, 0.1);\n}\n\n.tek__resizeIndicatorDisplay {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: 0;\n background-color: #54565a;\n color: white;\n text-align: center;\n font-size: 12px;\n padding: 2px;\n overflow: hidden;\n border-radius: 4px;\n width: 48px;\n height: 16px;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n}\n\n.tek__leftResizerIndicator {\n left: -54px;\n}\n\n.tek__rightResizerIndicator {\n right: -54px;\n}\n');const Iz=({children:e})=>xz.jsx(Vb,{theme:bS(),children:e}),zz={namespace:"text-editor-kit",theme:{ltr:"tek__ltr",rtl:"tek__rtl",paragraph:"tek__editor__paragraph",placeholder:"text_editor__placeholder",quote:"tek__quote",table:"tek__table",tableCell:"tek__tableCell",heading:{h1:"tek__h1",h2:"tek__h2",h3:"tek__h3"},text:{base:"tek__textBase",bold:"tek__textBold",italic:"tek__textItalic",underline:"tek__textUnderline"},list:{listitem:"tek__listItem",nested:{listitem:"tek__nestedListItem"},olDepth:["tek__ol1","tek__ol2","tek__ol3","tek__ol4","tek__ol5"],ul:"tek__ul"},image:"tek__image"},nodes:[ad,od,ru,Qc,dc,gc],onError:e=>{console.log(e)}},jz=({children:e,initialConfig:t,flags:n})=>xz.jsx(Iz,{children:xz.jsx("div",{className:"tek__editor__Wrapper",children:xz.jsx(Eu,{initialConfig:t||zz,children:xz.jsxs("div",{className:"tek__editor__container"+(n?.isEnabled("QB_26358_SN_TEXT_SCROLLBAR")?" tek__editor__container__scrollbar":""),children:[e,xz.jsx(Nu,{}),xz.jsx(Ou,{}),xz.jsx(Pz,{}),xz.jsx(Sz,{}),xz.jsx(Oz,{}),xz.jsx(kz,{}),xz.jsx(Ru,{})]})})})});let Dz=class e extends Yo{__hasBorders;static getType(){return"TekCellNode"}static clone(t){return new e(t.__hasBorders,t.__key)}static importJSON(t){return new e(void 0===t.hasBorders||t.hasBorders)}constructor(e,t){super(t),this.__hasBorders=e}exportJSON(){return{...super.exportJSON(),hasBorders:this.__hasBorders,type:"TekCellNode",version:1}}createDOM(e,t){const n=document.createElement("td");return n.classList.add(e.theme.tableCell||""),this.__hasBorders||(t.isEditable()?n.classList.add("tek__tableCellNoBorderEditMode"):n.classList.add("tek__tableCellNoBorder")),n}updateDOM(e,t){return this.__hasBorders?t.classList.remove("tek__tableCellNoBorder"):t.classList.add("tek__tableCellNoBorder"),this.__hasBorders!==e.__hasBorders}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}toggleBorders(){this.getWritable().__hasBorders=!this.__hasBorders}};const Fz=e=>new Dz(e),Bz=e=>e instanceof Dz;let $z=class e extends Yo{__needsUpdate;__hasBorders;__width;static getType(){return"TekTableNode"}static clone(t){return new e(t.__hasBorders,t.__width,t.__key)}static importJSON(t){const n=void 0===t.hasBorders||t.hasBorders,r=void 0===t.width?"100%":t.width;return new e(n,r)}constructor(e,t,n){super(n),this.__needsUpdate=!1,this.__hasBorders=e,this.__width=t}exportJSON(){return{...super.exportJSON(),hasBorders:this.__hasBorders,width:this.__width,type:"TekTableNode",version:1}}createDOM(e){const t=document.createElement("table");return t.classList.add(e.theme.table||""),t.style.width=this.__width,t}updateDOM(e){const t=this.__needsUpdate;try{e.__needsUpdate&&(this.getWritable().__needsUpdate=!1)}catch{}return t||this.__width!==e.__width}markNeedsUpdate(){this.getWritable().__needsUpdate=!0}canBeEmpty(){return!1}canExtractContents(){return!1}isShadowRoot(){return!0}canSelectBefore(){return!0}canIndent(){return!1}getResizeNode(){return this.getChildAtIndex(1)}toggleBorders(){this.getWritable().__hasBorders=!this.__hasBorders}setWidth(e){this.getWritable().__width=e}isValid(){const e=this.getChildren();return!(e.length<3)&&"TekColGroupNode"===e[0].getType()&&"TEK_TABLE_RESIZE_NODE"===e[1].getType()&&"TekRowNode"===e[2].getType()}};function Hz(e){return e instanceof $z}let Wz=class e extends Yo{static getType(){return"TekRowNode"}static clone(t){return new e(t.__key)}static importJSON(){return new e}exportJSON(){return{...super.exportJSON(),type:"TekRowNode",version:1}}createDOM(){return document.createElement("tr")}updateDOM(){return!1}isShadowRoot(){return!0}canBeEmpty(){return!1}canIndent(){return!1}};function Kz(e){return e instanceof Wz}const Uz=e=>{let t=e;for(;null!==t;)if(t=t.getParent(),Bz(t))return t;return null},Gz=e=>{let t=e;for(;null!==t;){if(Hz(t))return t;t=t?.getParent()}return null},Yz=(e,t)=>{const n=Gz(e);if(n){const e=t.getElementByKey(n.getKey());if(e)return e}return null},Vz=e=>{const t=e?.getChildAtIndex(2);return t},Jz=e=>{const t=e.getParent();if(Kz(t)){const n=t.getChildren();for(let t=0;t<n.length;t++)if(n[t]===e)return t}return-1},qz=(e,t)=>e?.01*parseFloat(e.getAttribute("width")||"0")*t.offsetWidth:0,Xz=(e,t)=>{const n=e/t.offsetWidth;return`${Math.min(100*n,100).toFixed(2)}%`},Qz=e=>e?e.getChildren().filter(e=>Kz(e)):[],Zz=e=>{let t=!1;return Qz(e).forEach(e=>{e.getChildren().forEach(e=>{const n=e;n.clear(),n.append(ai()),t=!0})}),t},ej=e=>{const t=ao();if(Wr(t)||Ur(t)){const n=t.getNodes().filter(e=>Bz(e));if(n.length>0){e.preventDefault(),e.stopPropagation();const r=t.getNodes().some(e=>Hz(e)),o=Gz(n[0]),i=Qz(o),s=i[0]?.getChildren();if(s.length*i.length===n.length&&r)return o?.selectPrevious(),o?.remove(),!1;if(Wr(t)){const e=t.focus.getNode();if(Hz(e))return Zz(e)}return n.forEach(e=>{e.clear(),e.append(ai())}),(()=>{const e=ao();let t=!1;if(Wr(e)){const n=e.anchor.getNode(),r=e.focus.getNode();let o=Gz(n);!o&&Hz(r)&&(o=r),Hz(o)&&(t=Zz(o))}return t})()}if(Wr(t)){const e=t.focus.getNode();if(Hz(e))return Zz(e)}}return!1},tj=e=>{if(e){const t=Gz(e);if(Hz(t)){const n=e.getParent(),r=Qz(t).findIndex(e=>e===n),o=n?.getChildren().findIndex(t=>t===e);return{i:r,j:o,tableNode:t,row:n}}}return{i:0,j:0,tableNode:null,row:null}},nj=e=>{let t=e;for(;null!==t;)if(t=t.getParent(),Bz(t))return t;return null},rj=e=>{const t=[];return Qz(e).forEach(e=>{const n=e.getChildren();t.push(...n)}),t},oj=(e,t)=>{rj(e).forEach(e=>{const n=t.getElementByKey(e.getKey());n?.classList.add("tek__tekCellHighlight")})},ij=kt("UPDATE_COL_WIDTHS_COMMAND"),sj=kt("BEGIN_COL_RESIZE"),aj=kt("END_COL_RESIZE"),lj=kt("INSERT_TEK_TABLE_COMMAND"),cj=({colKey:e,startX:t,onMouseDown:n})=>{const r=M(t=>{n(t,e)},[e,n]);return xz.jsx("div",{role:"button","aria-label":"resize",tabIndex:-1,className:"tek__resizer",style:{left:`${t}%`},onMouseDown:r})},uj=(e,t)=>{const n=document.createElement("div");return n.classList.add("tek__resizeIndicatorDisplay"),n.classList.add(e),n.id=t,n},dj=e=>`${parseFloat(e.getAttribute("width")||"0").toFixed(2)}%`,fj=({nodeKey:e,colWidths:t})=>{const[n]=vu(),r=wd(),[o,i]=S(null),s=k(null),a=k(null),l=k(null),c=k(null),u=M(t=>{const n=Fi(e);if(n){const e=n.getParent();if(Hz(e)){const n=Vz(e);if("TekRowNode"===n?.getType()){const e=n.getChildren(),r=[];let o=0;e.forEach((e,n)=>{const i=parseFloat(t[n]);o+=i,r.push({key:e.getKey(),startX:o})}),i(r)}}}},[e]),d=M(e=>{if(s.current){const{clientX:t,col:n,tableElement:r,curColWidth:o,resizer:i,left:a,nxt:u,parentDomNode:d,currentTableWidth:f}=s.current,p=e.clientX-t,h=Xz(a+p,r);if(u){const e=o+p;if(e<60)return;const t=Xz(e,r),a=s.current.nxtColWidth-p,d=Xz(a,r);if(a<60)return;n.setAttribute("width",t),u.setAttribute("width",d),i.style.left=h,l.current&&(l.current.innerText=t),c.current&&(c.current.innerText=d)}else if(d){i.style.left="100%";const e=f+p,{clampedWidths:t,fullyClamped:n,clampedTableWidth:o}=((e,t)=>{const n=[],r=e.rows[0];let o=0,i=0;for(let e=0;e<r.cells.length;e++){const s=Math.max(r.cells[e].offsetWidth,60);60===s&&o++,i+=s;const a=s/t,l=Math.min(100*a,100);n.push(`${l.toFixed(2)}%`)}return{clampedWidths:n,fullyClamped:o===r.cells.length,clampedTableWidth:i}})(r,e),s=Xz(e,d),a=Xz(o,d);r.style.width=!n||p>0?s:a,r.querySelectorAll(":scope > colgroup col").forEach((e,n)=>{e.setAttribute("width",t[n])}),n||l.current&&(l.current.innerText=s)}}},[]),f=M(()=>{if(document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",f),s.current){s.current.resizer.style.opacity="",l.current=null,c.current=null;const e=(e=>{const t=e.rows[0],n=[];for(let r=0;r<t.cells.length;r++){const o=Math.max(t.cells[r].offsetWidth,60);n.push(Xz(o,e))}return n})(s.current.tableElement);s.current.tableElement.querySelectorAll(":scope > colgroup col").forEach((t,n)=>{t.setAttribute("width",e[n])}),(e=>{const t=document.getElementById("leftGripper"),n=document.getElementById("rightGripper");t&&e.removeChild(t),n&&e.removeChild(n)})(s.current.resizer),n.dispatchCommand(aj,void 0)}s.current=null,a.current=null,n.update(()=>{const t=Fi(e),r=Yz(t,n),s=t?.getParent();if(r&&s){const t=r.querySelectorAll(":scope > colgroup col"),a=[];t.forEach(e=>{a.push(e.getAttribute("width")||"0")}),s.setWidth(r.style.width);let l=0;if(o){const e=o.map((e,t)=>{const n={...e};return l+=parseFloat(a[t]),n.startX=l,n});i(e)}n.dispatchCommand(ij,{colWidths:a,nodeKey:e})}})},[d,n,e,o]),p=M((e,t)=>{e.preventDefault(),e.stopPropagation(),document.addEventListener("mousemove",d,{passive:!0}),document.addEventListener("mouseup",f),n.getEditorState().read(()=>{const r=Fi(t),o=Yz(r,n);if(Bz(r)){const t=Jz(r);if(-1!==t&&o){const r=o.querySelectorAll(":scope > colgroup col"),i=r[t],a=r.length>t+1?r[t+1]:null,u=qz(i,o),d=e.target,f=.01*parseFloat(d.style.left),p=o.offsetWidth*f,h=qz(a,o),g=o.parentElement,m=.01*parseFloat(o.style.width),v=(g?.offsetWidth||0)*m,b=((e,t,n)=>{const r=uj("tek__leftResizerIndicator","leftGripper");r.innerText=dj(e);let o=null;return t?(o=uj("tek__rightResizerIndicator","rightGripper"),o.innerText=dj(t)):r.innerText=n.style.width,{left:r,right:o}})(i,a,o);l.current=b.left,c.current=b.right,d.appendChild(b.left),b.right&&d.appendChild(b.right),d.style.opacity="1",s.current={resizer:d,curColWidth:u,col:i,tableElement:o,clientX:e.clientX,left:p,nxt:a,nxtColWidth:h,parentDomNode:g,currentTableWidth:v},n.dispatchCommand(sj,void 0)}}})},[n,d,f]);return w(()=>{n.getEditorState().read(()=>{u(t)})},[u,n,t]),xz.jsx(xz.Fragment,{children:o&&r?o.map(e=>xz.jsx(cj,{colKey:e.key,startX:e.startX,onMouseDown:p},e.key)):null})},pj="TEK_TABLE_RESIZE_NODE";let hj=class e extends qo{__colWidths;static getType(){return pj}static clone(t){return new e(t.__colWidths,t.__key)}static importJSON(t){return new e(t.colWidths)}constructor(e,t){super(t),this.__colWidths=e}exportJSON(){return{colWidths:this.__colWidths,type:pj,version:1}}createDOM(){const e=document.createElement("div");return e.classList.add("tek__resizeContainer"),e}updateDOM(){return!1}setColWidths(e){this.getWritable().__colWidths=e}removeCol(e){this.getWritable().__colWidths.splice(e,1)}decorate(){return xz.jsx(fj,{nodeKey:this.__key,colWidths:this.__colWidths})}isInline(){return!0}isIsolated(){return!0}isKeyboardSelectable(){return!1}};const gj=e=>e instanceof hj,mj=({nodeKey:e,colWidths:t})=>{const[n]=vu(),[r,o]=S(t);return w(()=>{n.getEditorState().read(()=>{const t=Fi(e),n=t?.getParent();if(Hz(n)){const e=n.getResizeNode();if(gj(e)){const t=e.__colWidths.map(e=>e);o(t)}}})},[n,e]),xz.jsx(xz.Fragment,{children:r.map((t,n)=>xz.jsx("col",{span:1,width:t},`${e}.${n}`))})};class vj extends qo{__colWidths;static getType(){return"TekColGroupNode"}static clone(e){return new vj(e.__colWidths,e.__key)}static importJSON(e){return new vj(e.colWidths)}constructor(e,t){super(t),this.__colWidths=e}exportJSON(){return{colWidths:this.__colWidths,type:"TekColGroupNode",version:1}}createDOM(){return document.createElement("colgroup")}setColWidths(e){this.getWritable().__colWidths=e}removeCol(e){this.getWritable().__colWidths.splice(e,1)}updateDOM(){return!1}decorate(){return xz.jsx(mj,{nodeKey:this.__key,colWidths:this.__colWidths})}isInline(){return!0}isIsolated(){return!0}isKeyboardSelectable(){return!1}}class bj extends qo{__formatStyle;constructor(e,t){super(t),this.__formatStyle=e}setFormatStyle(e){this.getWritable().__formatStyle=e}hasStyle(e){return void 0!==this.__formatStyle[e]&&""!==this.__formatStyle[e]}getTextFormatStyle(e,t){return this.hasStyle(e)?this.__formatStyle[e]:t}}const yj=[$z,Dz,Wz,vj,hj],xj=(e,t)=>{const n=100/e,r=Array(e).fill(`${n}%`),o=t?.getChildAtIndex(0),i=t?.getChildAtIndex(1);o.setColWidths(r),i.setColWidths(r),t?.markNeedsUpdate()},_j=()=>{const e=ao();if(Wr(e)){const t=e.anchor.getNode(),n=Uz(t);if(n){const e=Jz(n),t=Gz(n),r=Qz(t),o=(r[0]?.getChildren().length||1)-1;if(0===o)return t?.selectPrevious(),void t?.remove();r.forEach(t=>{t.getChildAtIndex(e)?.remove()}),xj(o,t)}}},wj=()=>{const e=ao();if(Wr(e)){const t=e.anchor.getNode(),n=Uz(t),r=Gz(n);if(r&&3===r.getChildren().length)return Yi(null),void r.remove();if(n){const{row:e}=tj(n);Yi(null),e?.remove()}}},Sj=()=>{const e=ao();if(Wr(e)){const t=e.anchor.getNode(),n=Gz(t),r=Vz(n);if(Kz(r)&&n){const e=r.getChildren().length,t=new Wz;for(let r=0;r<e;r++){const e=Fz(n?.__hasBorders);e.append(ai()),t.append(e)}n?.append(t)}}},kj=()=>{const e=ao();if(Wr(e)){const t=e.anchor.getNode(),n=Gz(t);if(Hz(n)){const e=Qz(n);let t=null;const r=(e[0]?.getChildren().length||-1)+1;for(let r=0;r<e.length;r++){const o=Fz(n.__hasBorders);o.append(ai()),e[r].append(o),t=o}return xj(r,n),t}}return null},Cj=Gb($y)({backgroundColor:"white",boxShadow:"0 2px 4px rgba(0,0,0,0.15)"}),Ej=({onDeleteAction:e,onAction:t,onClick:n})=>{const[r]=vu(),[o,i]=S(null),s=AI(),a=Boolean(o),l=M((e,t,n)=>{e.preventDefault(),e.stopPropagation(),r.update(()=>{t()},{onUpdate:()=>{i(null),n()}})},[r]),c=M(e=>{e.preventDefault(),e.stopPropagation(),n(),i(e.currentTarget)},[n]),u=M(()=>{i(null)},[]),d=M(e=>{l(e,Sj,t)},[l,t]),f=M(e=>{l(e,kj,t)},[l,t]),p=M(t=>{l(t,wj,e)},[l,e]),h=M(t=>{l(t,_j,e)},[l,e]),g=M(()=>{r.update(()=>{(()=>{const e=ao();if(Wr(e)){const t=e.anchor.getNode(),n=Gz(t);Hz(n)&&(n.selectPrevious(),n.remove())}})()},{onUpdate:()=>{i(null),e()}})},[r,e]),m=M(e=>{e.preventDefault(),e.stopPropagation(),r.update(()=>{(()=>{const e=ao();if(Wr(e)){const t=e.anchor.getNode(),n=Gz(t);n&&(n.toggleBorders(),rj(n).forEach(e=>{e.toggleBorders()}))}})()})},[r]);return w(()=>Ka(r.registerCommand(Ct,()=>(i(null),!1),4)),[r]),xz.jsx(ew,{onClickAway:u,mouseEvent:"onMouseDown",touchEvent:"onTouchStart",children:xz.jsxs("div",{children:[xz.jsx(Cj,{size:"small",onClick:c,children:xz.jsx(OM,{height:12})}),xz.jsx(k_,{sx:{zIndex:1},open:a,anchorEl:o,placement:"auto-end",children:xz.jsx(by,{id:"tekTableMenu",className:"tekPopperMenu",children:xz.jsxs(Lw,{dense:!0,children:[xz.jsx(Pw,{onClick:m,children:s("ToggleBorders")}),xz.jsx(sw,{}),xz.jsx(Pw,{onClick:d,children:s("AddNewRow")}),xz.jsx(Pw,{onClick:f,children:s("AddNewColumn")}),xz.jsx(sw,{}),xz.jsx(Pw,{onClick:p,children:s("DeleteRow")}),xz.jsx(Pw,{onClick:h,children:s("DeleteCol")}),xz.jsx(sw,{}),xz.jsx(Pw,{onClick:g,children:s("DeleteTable")})]})})})]})})},Tj=()=>{const[e]=vu(),t=wd(),[n,r]=S(null),[o,i]=S(!1),s=Boolean(n),a=C.useContext(nh),l=k(null),c=M(()=>{o||e.update(()=>{const t=ao();if(Wr(t)){const n=Uz(t.anchor.getNode());if(Bz(n)){const t=e.getElementByKey(n.getKey());r(t)}else r(null)}})},[e,o]);w(()=>{const e=e=>{0!==e.buttons?null===l.current&&(l.current=setTimeout(()=>{i(!0),r(null)},300)):(i(!1),clearTimeout(l.current),l.current=null)};return document.addEventListener("mousemove",e),()=>{document.removeEventListener("mousemove",e)}},[]),w(()=>Ka(e.registerCommand(Ct,()=>(c(),!1),ci),e.registerCommand(sj,()=>(r(null),!0),4),e.registerCommand(aj,()=>(c(),!0),4)),[e,c]),w(()=>{r(null)},[t]);const u=M(()=>{r(null)},[]),d=M(()=>{r(null),setTimeout(()=>{c()},0)},[c]),f=M(()=>{clearTimeout(l.current)},[]);return xz.jsx(k_,{open:!!s&&t,anchorEl:n,placement:"top-end",sx:{zIndex:1},disablePortal:!0,modifiers:[{name:"offset",options:{offset:[-6,-parseInt(a.components?.MuiButton?.styleOverrides?.sizeSmall?.height||"24",10)]}}],children:xz.jsx(Ej,{onDeleteAction:u,onAction:d,onClick:f})})},Aj=e=>{const t=[];for(const[n,r]of e)if("created"===r){const e=Fi(n),r=e?.getParent();Zo(r)&&null!==e&&t.push(e)}if(t.length>0){const e=ai();t[0].insertBefore(e),e.select(),t.forEach(e=>{e.remove()})}},Lj=()=>{const[e]=vu(),t=wd();return w(()=>Ka(e.registerMutationListener(Dz,t=>{e.update(()=>{Aj(t)})}),e.registerMutationListener(Wz,t=>{e.update(()=>{Aj(t)})}),e.registerMutationListener($z,t=>{e.update(()=>{for(const[e,n]of t)if("created"===n||"updated"===n){const t=Fi(e);if(Hz(t)&&!t.isValid()){const e=ai();t.insertBefore(e),e.select(),t.remove()}}})}),e.registerCommand(lj,()=>(e.update(()=>{const e=(()=>{const e=["50%","50%"],t=new $z(!0,"100%"),n=new vj(e),r=new hj(e),o=[];for(let t=0;t<2;t++){const t=new Wz;for(let n=0;n<e.length;n++){const e=Fz(!0),n=ai();e.append(n),t.append(e)}o.push(t)}return t.append(n,r,...o),t})();ml(e)}),!0),ci),e.registerCommand(ij,({colWidths:e,nodeKey:t})=>{const n=Fi(t);if(gj(n)){n.setColWidths(e);const t=n.getParent(),r=t?.getChildAtIndex(0);(function(e){return e instanceof vj})(r)&&r.setColWidths(e)}return!0},4),e.registerCommand(qt,t=>t?.shiftKey?(t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),e.update(()=>{(()=>{const e=ao();if(Wr(e)){const t=e.focus.getNode(),n=Gz(t),r=nj(t);if(Hz(n)){const e=ai();e.append(Nr("")),n.insertBefore(e,!1),e.select()}}})()}),!0):!!t?.ctrlKey&&(t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),e.update(()=>{(()=>{const e=ao();if(Wr(e)){const t=e.focus.getNode(),n=Gz(t);if(Hz(n)){const e=ai();e.append(Nr("")),n.insertBefore(e),n.insertAfter(e),n.selectNext()}}})()}),!0),4),e.registerCommand(Qt,e=>ej(e),4),e.registerCommand(en,e=>ej(e),4),e.registerCommand(tn,e=>{const t=ao();if(Wr(t)){const n=t.focus.getNode(),{depth:r,tekCell:o}=(e=>{let t=e,n=0;for(;null!==t;){if(t=t.getParent(),Bz(t))return{depth:n,tekCell:t};n++}return{depth:Number.MAX_SAFE_INTEGER,tekCell:null}})(n);if(r<=1)return e.preventDefault(),((e,t)=>{const{i:n,j:r,tableNode:o,row:i}=e,s=t?1:-1;if(i&&o){const e=i.getChildAtIndex(r+s);if(e)e.getChildAtIndex(0).selectEnd();else{let e=0;t||0!==r||(e=i.getChildren().length-1);const a=o.getChildAtIndex(n+2+s);if(Kz(a)){const t=a?.getChildAtIndex(e);(t?.getChildAtIndex(0)).selectEnd()}}}})(tj(o),!e.shiftKey),!0}return!1},ci),e.registerCommand(fn,e=>{const t=e?.target,n=ao();if(t.classList.contains("tek__table")&&Wr(n)&&Hz(n.anchor.getNode()))return e?.preventDefault(),e?.stopPropagation(),!0;if(Wr(n)){const t=n.getNodes().some(e=>Bz(e)),r=n.getNodes().some(e=>Hz(e));if(t&&!r)return e?.preventDefault(),e?.stopPropagation(),!0}return!1},4)),[e]),w(()=>e.registerCommand(Ct,()=>(t&&e.update(()=>{(e=>{const t=ao(),n=[];if(us($z).forEach(e=>{const t=rj(e);n.push(...t)}),Wr(t)){t.getNodes().filter(e=>Hz(e)).forEach(t=>{oj(t,e)});const n=t.focus.getNode();if(Hz(n))return void oj(n,e)}if(Wr(t)||Ur(t)){const r=new Set(t.getNodes().map(e=>nj(e)));for(let t=0;t<n.length;t++){const o=e.getElementByKey(n[t].getKey());r.has(n[t])?o?.classList.add("tek__tekCellHighlight"):o?.classList.remove("tek__tekCellHighlight")}}})(e)},{tag:"history-merge"}),!1),4),[e,t]),w(()=>{e.update(()=>{t||(e=>{const t=[];us($z).forEach(e=>{const n=rj(e);t.push(...n)}),t.forEach(t=>{const n=e.getElementByKey(t.getKey());n?.classList.remove("tek__tekCellHighlight")})})(e)})},[t,e]),null},Mj=()=>xz.jsxs(xz.Fragment,{children:[xz.jsx(Lj,{}),xz.jsx(Tj,{})]}),Rj=()=>{const e=wd(),t=AI();return e?xz.jsx("div",{className:"tek__editor__placeholder",children:t("EnterText")}):xz.jsx("div",{className:"tek__editor__logo",children:xz.jsx(ZI,{height:32})})},Nj=({showPlaceholder:e})=>xz.jsxs("div",{style:{position:"relative"},children:[xz.jsx(MI,{}),xz.jsx(XI,{contentEditable:xz.jsx(jI,{className:"tek__editor__input"}),placeholder:!1!==e?xz.jsx(Rj,{}):null,ErrorBoundary:WI})]}),Oj=Gb(aw)(({theme:e})=>({background:e.palette.common.white,height:e.spacing(4),display:"flex",alignItems:"center",paddingInline:e.spacing(.5),overflow:"auto",scrollbarWidth:"thin",width:"fit-content","&::-webkit-scrollbar":{height:"0.2em"},"&::-webkit-scrollbar-track":{background:"#f1f1f1"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#AAA"},"&::-webkit-scrollbar-thumb:hover":{background:"#AAA"}})),Pj=["Source Sans Pro, sans-serif","American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],Ij="#404040",zj="16px",jj=v({textFormat:{bold:!1,italic:!1,underline:!1},blockFormat:{blockType:"normal",fontName:Pj[0],fontSize:"16px",fontColor:"#404040",align:"left",isLink:!1}}),Dj=({children:e})=>{const t=(()=>{const[e]=vu(),[t,n]=S(!1),[r,o]=S(!1),[i,s]=S(!1),[a,l]=S("paragraph"),[c,u]=S(Pj[0]),[d,f]=S(zj),[p,h]=S(Ij),[g,m]=S("left"),[v,b]=S(!1),y=M(()=>{const t=ao();if(Wr(t)){const r=t.anchor.getNode();let i="root"===r.getKey()?r:Ys(r,e=>{const t=e.getParent();return null!==t&&_s(t)});null===i&&(i=r.getTopLevelElementOrThrow());const a=i.getKey();let c=i;if(null!==e.getElementByKey(a))if(cu(i)){const e=hl(r,ru),t=e?e.getListType():i.getListType();l(t)}else{const e=fd(i)?i.getTag():i.getType();l(e)}if(cu(i)||fd(i)){const e=hl(i,ii);e&&(c=e)}const d=Cz(t);if(hc(d.getParent())||hc(d)?b(!0):b(!1),li(c)){const e=c.getFormatType();m(""===e?"left":e)}n(t.hasFormat("bold")),o(t.hasFormat("italic")),s(t.hasFormat("underline"));const p=ul(t,"font-family",Pj[0]),g=ul(t,"font-size",zj);u(""===p?Pj[0]:p),f(""!==g&&g?g:zj),h(ul(t,"color",Ij))}else Ur(t)&&t.getNodes().forEach(e=>{if(function(e){return e instanceof bj}(e)){n(e.hasStyle("fontWeight")),o(e.hasStyle("fontStyle")),s(e.hasStyle("textDecoration")),h(e.getTextFormatStyle("color",Ij));const t=e.getTextFormatStyle("fontSize",zj),r=e.getTextFormatStyle("fontFamily",Pj[0]);f(t),u(r);const i=e.getParent();if(null!==i){const e=(e=>{if(nu(e)){const t=hl(e,ru);return t?t.getListType():"bullet"}return fd(e)?e.getTag():e.getType()})(i);l(e)}}})},[e]);return w(()=>Ka(e.registerUpdateListener(({editorState:e})=>{e.read(()=>{y()})}),e.registerCommand(Ct,()=>(e.getEditorState().read(()=>{y()}),!1),ci)),[e,y]),{textFormat:{bold:t,italic:r,underline:i},blockFormat:{blockType:a,fontName:c,fontSize:d,fontColor:p,align:g,isLink:v}}})();return xz.jsx(jj.Provider,{value:t,children:e})},Fj=({children:e})=>xz.jsx(Dj,{children:xz.jsx(Oj,{sx:{display:{xs:"none",sm:"flex",md:"flex",lg:"flex"}},direction:"row",children:e})}),Bj=({anchorEl:e,children:t})=>{const n=Boolean(e);return xz.jsx(k_,{open:n,anchorEl:e,placement:"bottom-start",transition:!0,sx:{zIndex:1},children:({TransitionProps:e})=>xz.jsx(fw,{...e,children:xz.jsx(by,{className:"tekPopperMenu",children:t})})})},$j=Gb(Yy)({fontSize:12,textOverflow:"ellipsis"}),Hj=({startIcon:e,value:t,onClick:n,compact:r})=>xz.jsx(Uw,{title:t,PopperProps:{disablePortal:!0},children:xz.jsx(Q_,{style:{textTransform:"none",textOverflow:"ellipsis",flexShrink:0},size:"small",variant:"text",onClick:n,startIcon:r?void 0:e,endIcon:xz.jsx(rz,{height:12}),children:r?e:xz.jsx($j,{children:t})})}),Wj=Gb(Pw,{shouldForwardProp:e=>"active"!==e})(({theme:e,active:t})=>({background:t?e.palette.grey[200]:void 0})),Kj=[{text:"AlignLeft",align:"left",icon:()=>xz.jsx(tz,{height:12}),"data-testid":"editor-toolbar-alignLeft-btn"},{text:"AlignCenter",align:"center",icon:()=>xz.jsx(ez,{height:12}),"data-testid":"editor-toolbar-alignCenter-btn"},{text:"AlignRight",align:"right",icon:()=>xz.jsx(nz,{height:12}),"data-testid":"editor-toolbar-alignRight-btn"}],Uj=({compact:e=!1})=>{const[t]=vu(),[n,r]=S(null),{blockFormat:o}=b(jj),i=AI(),s=x(()=>Kj.find(e=>e.align===o.align)||Kj[0],[o.align]),a=M(e=>{e.preventDefault(),e.stopPropagation(),r(n?null:e.currentTarget)},[n]),l=M(()=>{r(null)},[]),c=M(e=>{r(null),t.dispatchCommand(an,e),t.focus()},[t]);return xz.jsx(ew,{onClickAway:l,mouseEvent:"onMouseDown",touchEvent:"onTouchStart",children:xz.jsxs("div",{children:[xz.jsx(Hj,{value:i(s.text),startIcon:s.icon(),onClick:a,compact:e,"data-testid":"editor-toolbar-align-btn"}),xz.jsx(Bj,{anchorEl:n,children:xz.jsx(Lw,{dense:!0,children:Kj.map(e=>xz.jsxs(Wj,{value:e.text,dense:!0,active:e.align===o.align,onClick:()=>{c(e.align)},children:[xz.jsx(ww,{children:e.icon()}),xz.jsx($j,{children:i(e.text)})]},e.align))})})]})})},Gj=({text:e,icon:t})=>xz.jsxs(xz.Fragment,{children:[xz.jsx(ww,{children:t}),xz.jsx($j,{children:e})]}),Yj=({text:e,icon:t})=>xz.jsxs(xz.Fragment,{children:[xz.jsx(ww,{children:xz.jsx($j,{fontWeight:"bold",children:t})}),xz.jsx($j,{children:e})]}),Vj=[{text:"Heading1",icon:"H1",tag:"h1"},{text:"Heading2",icon:"H2",tag:"h2"},{text:"Heading3",icon:"H3",tag:"h3"}],Jj=(e,t,n)=>({icon:xz.jsx("span",{style:{fontSize:12,fontWeight:"bold"},children:t}),text:n(e)}),qj=({compact:e=!1})=>{const[t]=vu(),{blockFormat:n}=b(jj),[r,o]=S(null),i=AI(),s=x(()=>{let e={icon:xz.jsx(az,{height:12}),text:i("Paragraph")};return"h1"===n.blockType&&(e=Jj("Heading1","H1",i)),"h2"===n.blockType&&(e=Jj("Heading2","H2",i)),"h3"===n.blockType&&(e=Jj("Heading3","H3",i)),"quote"===n.blockType&&(e.icon=xz.jsx(iz,{height:12}),e.text=i("Quote")),"bullet"===n.blockType&&(e.icon=xz.jsx(oz,{height:12}),e.text=i("UnorderedList")),"number"===n.blockType&&(e.icon=xz.jsx(sz,{height:12}),e.text=i("OrderedList")),e},[n,i]),a=M(()=>{o(null)},[]),l=M(e=>{t.update(()=>{const n=ao();Wr(n)?(nl(n,{"font-size":null}),function(e,t,n=rl){if(null===e)return;const r=e.getStartEndPoints(),o=new Map;let i=null;if(r){const[e,t]=r;i=ro(),i.anchor.set(e.key,e.offset,e.type),i.focus.set(t.key,t.offset,t.type);const n=Ys(e.getNode(),Ps),s=Ys(t.getNode(),Ps);Vo(n)&&o.set(n.getKey(),n),Vo(s)&&o.set(s.getKey(),s)}for(const t of e.getNodes())if(Vo(t)&&Ps(t))o.set(t.getKey(),t);else if(null===r){const e=Ys(t,Ps);Vo(e)&&o.set(e.getKey(),e)}for(const[e,r]of o){const o=t();n(r,o),r.replace(o,!0),i&&(e===i.anchor.key&&i.anchor.set(o.getKey(),i.anchor.offset,i.anchor.type),e===i.focus.key&&i.focus.set(o.getKey(),i.focus.offset,i.focus.type))}i&&e.is(ao())&&Yi(i)}(n,e)):Ur(n)&&n.getNodes().forEach(t=>{const n=t.getParent();n?.replace(e(),!0)}),t.focus()})},[t]),c=M((e,n)=>{o(null),t.update(()=>{const r=ao();Wr(r)&&r.getNodes().forEach(r=>{const o=r.getParent();o&&o.getType()!==e&&t.dispatchCommand(n,void 0)})}),t.focus()},[t]),u=M(e=>{o(null),l(()=>dd(e))},[l]),d=M(()=>{o(null),l(()=>ai())},[l]),f=M(()=>{o(null),l(()=>id())},[l]);return xz.jsx(ew,{onClickAway:a,mouseEvent:"onMouseDown",touchEvent:"onTouchStart",children:xz.jsxs("div",{children:[xz.jsx(Hj,{onClick:e=>{e.preventDefault(),e.stopPropagation(),o(r?null:e.currentTarget)},value:s.text,startIcon:s.icon,compact:e}),xz.jsx(Bj,{anchorEl:r,children:xz.jsxs(Lw,{dense:!0,children:[xz.jsx(Pw,{dense:!0,onClick:d,children:xz.jsx(Gj,{text:i("Paragraph"),icon:xz.jsx(az,{height:12})})}),xz.jsx(Pw,{dense:!0,onClick:f,children:xz.jsx(Gj,{text:i("Quote"),icon:xz.jsx(iz,{height:12})})}),Vj.map(e=>xz.jsx(Pw,{dense:!0,onClick:()=>{u(e.tag)},children:xz.jsx(Yj,{text:i(e.text),icon:e.icon})},e.text)),xz.jsx(sw,{}),xz.jsx(Pw,{dense:!0,onClick:()=>{c("bullet",du)},children:xz.jsx(Gj,{text:i("UnorderedList"),icon:xz.jsx(oz,{height:12})})}),xz.jsx(Pw,{dense:!0,onClick:()=>{c("number",fu)},children:xz.jsx(Gj,{text:i("OrderedList"),icon:xz.jsx(sz,{height:12})})})]})})]})})},Xj=Gb(Q_,{shouldForwardProp:e=>"active"!==e})(({theme:e,active:t})=>({width:e.spacing(3),height:e.spacing(3),padding:0,background:t?e.palette.grey[300]:void 0})),Qj=(e,t)=>{const n=n=>{const r=AI();return xz.jsx(Uw,{title:r(t),PopperProps:{disablePortal:!0},children:xz.jsx("div",{children:xz.jsx(e,{...n,"aria-label":r(t)})})})};return n.displayName=`withToolTip(${e.displayName||e.name})`,n},Zj=({format:e,icon:t,...n})=>{const r=b(jj),[o]=vu(),i=M(()=>{o.dispatchCommand(Bt,e)},[o,e]);return xz.jsx(Xj,{...n,active:r.textFormat[e],onClick:i,size:"small",variant:"text",children:t})},eD=Qj(Zj,"Bold"),tD=()=>xz.jsx(eD,{format:"bold","data-testid":"editor-toolbar-bold-btn",icon:xz.jsx(lz,{height:12})}),nD=kt("APPLY_TEXT_FORMAT"),rD=kt("CLEAR_TEXT_FORMAT"),oD=Qj(Xj,"ClearFormat"),iD=()=>{const[e]=vu(),t=M(()=>{e.update(()=>{const t=ao();if(Wr(t)){const{anchor:e,focus:n}=t,r=t.getNodes();if(e.key===n.key&&e.offset===n.offset)return;r.forEach((t,o)=>{try{if(Or(t)){let i=t;0===o&&0!==e.offset&&(i=i.splitText(e.offset)[1]||i),o===r.length-1&&(i=i.splitText(n.offset)[0]||i),""!==i.__style&&i.setStyle(""),0!==i.__format&&(i.setFormat(0),gl(i).setFormat(""));const s=i.getParent();(fd(s)||sd(s))&&s.replace(ai(),!0)}else(fd(t)||sd(t))&&t.replace(ai(),!0)}catch{}})}e.dispatchCommand(rD,void 0)})},[e]);return xz.jsx(oD,{"data-testid":"editor-toolbar-clearFormat-btn",onClick:t,children:xz.jsx(cz,{height:12})})};var sD,aD={},lD=function(){if(sD)return aD;sD=1;var e={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:255,g:255,b:255,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},t=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i,n=/^rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(\d(\.\d+)?)\)$/i,r=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i,o=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i,i=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i,s=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i,a=Math.floor,l=Math.round,c=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n,r,o,i,s,c,u,d,f,p,h,g,m=0,v=0,b=0,y=1;if(this._invalid=!1,arguments[0]instanceof t)m=arguments[0]._r,v=arguments[0]._g,b=arguments[0]._b,y=arguments[0]._a,this._invalid=arguments[0]._invalid;else if(arguments.length<3)if("string"==typeof arguments[0])if(h=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(g=arguments[0]))m=parseInt(h[1],10),v=parseInt(h[2],10),b=parseInt(h[3],10);else if(h=/^argb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(g))y=parseFloat(l(h[1]/2.55)/100),m=parseInt(h[2],10),v=parseInt(h[3],10),b=parseInt(h[4],10);else if(h=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(g))m=parseInt(h[1],10),v=parseInt(h[2],10),b=parseInt(h[3],10),y=parseFloat(h[4]);else if(h=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(g))m=parseInt(h[1],16),v=parseInt(h[2],16),b=parseInt(h[3],16),y=1;else if(h=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i.exec(g))m=parseInt(h[1]+h[1],16),v=parseInt(h[2]+h[2],16),b=parseInt(h[3]+h[3],16),y=1;else if(h=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(g)){switch(n=parseFloat(h[1]),r=parseFloat(h[3]),i=parseFloat(h[5]),r=(r/=100)<0?0:r>1?1:r,u=(n=(n%=360)<0?0:n>360?360:n)/60,d=(c=(i=(i/=100)<0?0:i>1?1:i)<=.5?2*i*r:(2-2*i)*r)*(1-Math.abs(u%2-1)),f=[],u=Math.floor(u)){case 0:f=[c,d,0];break;case 1:f=[d,c,0];break;case 2:f=[0,c,d];break;case 3:f=[0,d,c];break;case 4:f=[d,0,c];break;case 5:f=[c,0,d];break;default:f=[0,0,0]}p=i-.5*c,m=f[0]+p,v=f[1]+p,b=f[2]+p,m=l(255*m),v=l(255*v),b=l(255*b),y=1}else if(h=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(g)){switch(n=parseFloat(h[1]),r=parseFloat(h[3]),i=parseFloat(h[5]),y=parseFloat(h[7]),r=(r/=100)<0?0:r>1?1:r,u=(n=(n%=360)<0?0:n>360?360:n)/60,d=(c=(i=(i/=100)<0?0:i>1?1:i)<=.5?2*i*r:(2-2*i)*r)*(1-Math.abs(u%2-1)),f=[],u=Math.floor(u)){case 0:f=[c,d,0];break;case 1:f=[d,c,0];break;case 2:f=[0,c,d];break;case 3:f=[0,d,c];break;case 4:f=[d,0,c];break;case 5:f=[c,0,d];break;default:f=[0,0,0]}p=i-.5*c,m=f[0]+p,v=f[1]+p,b=f[2]+p,m=l(255*m),v=l(255*v),b=l(255*b)}else if(h=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(g)){switch(n=parseFloat(h[1]),r=parseFloat(h[3]),s=parseFloat(h[5]),u=(n=(n%=360)<0?0:n>360?360:n)/60,d=(c=(s=(s/=100)<0?0:s>1?1:s)*(r=(r/=100)<0?0:r>1?1:r))*(1-Math.abs(u%2-1)),f=[],u=Math.floor(u)){case 0:f=[c,d,0];break;case 1:f=[d,c,0];break;case 2:f=[0,c,d];break;case 3:f=[0,d,c];break;case 4:f=[d,0,c];break;case 5:f=[c,0,d];break;default:f=[0,0,0]}p=s-c,m=f[0]+p,v=f[1]+p,b=f[2]+p,m=l(255*m),v=l(255*v),b=l(255*b),y=1}else e[g.toLowerCase()]?(o=g.toLowerCase(),m=e[o].r,v=e[o].g,b=e[o].b,y="number"==typeof e[o].a?e[o].a:1):this._invalid=!0;else"number"==typeof arguments[0]&&arguments[0]>=0&&"argb"===arguments[1]?(y=(4278190080&arguments[0])>>>24,y/=255,m=(16711680&arguments[0])>>16,v=(65280&arguments[0])>>8,b=255&arguments[0]):"number"==typeof arguments[0]&&arguments[0]>=0?(m=(16711680&arguments[0])>>16,v=(65280&arguments[0])>>8,b=255&arguments[0]):this._invalid=!0;else arguments.length>=3?(m=arguments[0],v=arguments[1],b=arguments[2],y=arguments.length>=4?arguments[3]:1):this._invalid=!0;Number.isNaN(+m+v+b+y)&&(this._invalid=!0),this._r=a(m),this._g=a(v),this._b=a(b),this._a=y,this._spaces={}}var n,r;return n=t,(r=[{key:"isInvalid",value:function(){return this._invalid}},{key:"setAlpha",value:function(e){this._a=e,this._spaces={}}},{key:"getAlpha",value:function(){return this._a}},{key:"toRGB",value:function(){return this._spaces.rgb||(this._spaces.rgb=t.toRGB(this)),this._spaces.rgb}},{key:"toRGBA",value:function(){return this._spaces.rgba||(this._spaces.rgba=t.toRGBA(this)),this._spaces.rgba}},{key:"toString",value:function(){return this._spaces.rgb||(this._spaces.rgb=t.toRGB(this)),this._spaces.rgb}},{key:"toHex",value:function(){return this._spaces.hex||(this._spaces.hex=t.toHex(this)),this._spaces.hex}},{key:"toHSL",value:function(e){return this._spaces.hsl||(this._spaces.hsl=t.toHSL(this,e)),this._spaces.hsl}},{key:"toHSLA",value:function(e){return this._spaces.hsla||(this._spaces.hsla=t.toHSLA(this,e)),this._spaces.hsla}},{key:"toHSV",value:function(){var e=this.toHSVComponents();return"hsv(".concat(e.h,",").concat(e.s,",").concat(e.v,")")}},{key:"toHSVComponents",value:function(){return this._spaces.hsvComp||(this._spaces.hsvComp=t.toHSVComponents(this)),this._spaces.hsvComp}},{key:"toNumber",value:function(){return this._spaces.num||(this._spaces.num=t.toNumber(this)),this._spaces.num}},{key:"isDark",value:function(){return this.isInvalid()||this.getLuminance()<125}},{key:"getLuminance",value:function(){return void 0===this._lumi&&(this._lumi=.299*this._r+.587*this._g+.114*this._b),this._lumi}},{key:"shiftLuminance",value:function(e){var t=this.toHSLA(),n=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(t),r=parseFloat(n[1]),o=parseFloat(n[3]),i=parseFloat(n[5]),s=parseFloat(n[7]);return i+=e,i=Math.max(0,Math.min(i,100)),"hsla(".concat(r,",").concat(o,",").concat(i,",").concat(s,")")}},{key:"isEqual",value:function(e){return e instanceof t||(e=new t(e)),this._r===e._r&&this._g===e._g&&this._b===e._b}},{key:"blend",value:function(e,t){var n=a(this._r+(e._r-this._r)*t),r=a(this._g+(e._g-this._g)*t),o=a(this._b+(e._b-this._b)*t),i=a(this._a+(e._a-this._a)*t);return"rgba(".concat([n,r,o,i].join(","),")")}},{key:"createShiftedColor",value:function(e){(void 0===e||Number.isNaN(+e))&&(e=1);var n=this.getLuminance(),r=this._g<126?1:1+this._g/512;return new t(this.shiftLuminance(20*(n*r<220?.8+1/(n+1)*4:-(.8+n/255*1))*e))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==yz(o=function(e){if("object"!=yz(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=yz(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?o:String(o),r)}var o}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}();return c.toRGB=function(e){if(e instanceof c)return"rgb(".concat([e._r,e._g,e._b].join(","),")");"string"==typeof e&&(e=c.toNumber(e));var t=(65280&e)>>8,n=255&e;return"rgb(".concat((16711680&e)>>16,",").concat(t,",").concat(n,")")},c.toRGBA=function(e,t){if(e instanceof c)return"rgba(".concat([e._r,e._g,e._b,void 0!==t?t:e._a].join(","),")");"string"==typeof e&&(e=c.toNumber(e));var n=(65280&e)>>8,r=255&e;return"rgba(".concat((16711680&e)>>16,",").concat(n,",").concat(r,",").concat(void 0!==t?t:e._a,")")},c.toHex=function(e){var t,n,r;return e instanceof c?(t=e._r.toString(16),n=e._g.toString(16),r=e._b.toString(16),1===t.length&&(t="0".concat(t)),1===n.length&&(n="0".concat(n)),1===r.length&&(r="0".concat(r)),"#".concat([t,n,r].join(""))):("string"==typeof e&&(e=c.toNumber(e)),t=((16711680&e)>>16).toString(16),n=((65280&e)>>8).toString(16),r=(255&e).toString(16),1===t.length&&(t="0".concat(t)),1===n.length&&(n="0".concat(n)),1===r.length&&(r="0".concat(r)),"#".concat(t).concat(n).concat(r))},c.toHSL=function(e,t){var n,r,o,i=0;"string"==typeof e&&(e=new c(e));var s=e._r/255,a=e._g/255,l=e._b/255,u=Math.max(s,a,l),d=Math.min(s,a,l);if(r=t?.21*s+.72*a+.07*l:(u+d)/2,u===d)n=0,i=0;else{switch(o=u-d,n=r>.5?o/(2-u-d):o/(u+d),u){case s:i=(a-l)/o+(a<l?6:0);break;case a:i=(l-s)/o+2;break;case l:i=(s-a)/o+4}i/=6}return"hsl(".concat(360*i,",").concat(100*n,",").concat(100*r,")")},c.toHSLA=function(e,t){var n,r,o,i=0;"string"==typeof e&&(e=new c(e));var s=e._r/255,a=e._g/255,l=e._b/255,u=e._a,d=Math.max(s,a,l),f=Math.min(s,a,l);if(r=t?.21*s+.72*a+.07*l:(d+f)/2,d===f)n=0,i=0;else{switch(o=d-f,n=r>.5?o/(2-d-f):o/(d+f),d){case s:i=(a-l)/o+(a<l?6:0);break;case a:i=(l-s)/o+2;break;case l:i=(s-a)/o+4}i/=6}return"hsla(".concat(360*i,",").concat(100*n,",").concat(100*r,",").concat(u,")")},c.toHSVComponents=function(e){var t,n,r=0;"string"==typeof e&&(e=new c(e));var o=e._r/255,i=e._g/255,s=e._b/255,a=Math.max(o,i,s),l=Math.min(o,i,s),u=a;if(a===l)t=0,r=0;else{switch(t=0===(n=a-l)?0:n/u,a){case o:r=(i-s)/n+(i<s?6:0);break;case i:r=(s-o)/n+2;break;case s:r=(o-i)/n+4}r/=6}return{h:360*r%360,s:100*t,v:100*u}},c.toNumber=function(){if(1===arguments.length&&arguments[0]instanceof c)return(arguments[0]._r<<16)+(arguments[0]._g<<8)+arguments[0]._b;var e,t,n=0,r=0,o=0;return 1===arguments.length&&"string"==typeof arguments[0]&&((e=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i.exec(t=arguments[0]))?(n=parseInt(e[1],10),r=parseInt(e[2],10),o=parseInt(e[3],10)):(e=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(t))?(n=parseInt(e[1],16),r=parseInt(e[2],16),o=parseInt(e[3],16)):(e=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i.exec(t))&&(n=parseInt(e[1]+e[1],16),r=parseInt(e[2]+e[2],16),o=parseInt(e[3]+e[3],16))),(n<<16)+(r<<8)+o},c.blend=function(e,t,n){var r=(16711680&(e=c.toNumber(e)))>>16,o=(65280&e)>>8,i=255&e;return(r+(((16711680&(t=c.toNumber(t)))>>16)-r)*n<<16)+(o+(((65280&t)>>8)-o)*n<<8)+(i+((255&t)-i)*n)},c.getBlend=function(e,t,n){var r=e._r+(t._r-e._r)*n,o=e._g+(t._g-e._g)*n,i=e._b+(t._b-e._b)*n,s=e._a+(t._a-e._a)*n;return new c(r,o,i,s)},c.isCSSColor=function(a){return!(arguments.length>1||"string"!=typeof a)&&(t.test(a)||n.test(a)||r.test(a)||o.test(a)||i.test(a)||s.test(a)||e[a.toLowerCase()])},c.getBestContrast=function(e,t,n){var r=e.getLuminance();return Math.abs(r-t.getLuminance())>Math.abs(r-n.getLuminance())?t:n},c.getContrast=function(e,t){if(e&&t){var n=e.getLuminance()/100,r=t.getLuminance()/100;return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}},c.isDark=function(){var e={getLuminance:c.prototype.getLuminance,isInvalid:c.prototype.isInvalid};return c.prototype.init.apply(e,[].slice.call(arguments)),c.prototype.isDark.call(e)},c.useDarkLabel=function(e,t){return e._a>.5?!e.isDark():!t},aD.Color=c,aD}();const cD=Gb(aw)(({theme:e})=>({display:"flex",flex:4,flexDirection:"row",flexWrap:"wrap",backgroundColor:e.palette.background.default,borderRadius:"4px",padding:e.spacing(.5),alignItems:"center",justifyContent:"space-around"})),uD=Gb(H_)(({theme:e})=>({display:"flex",width:e.spacing(3.8),height:e.spacing(3.8),borderRadius:"4px",margin:e.spacing(.1),borderWidth:"1px",borderColor:e.palette.grey[500],borderStyle:"solid",justifyContent:"center",alignItems:"center"})),dD=({palette:e,color:t,onColorChange:n})=>{const[r,o]=S(t),i=Lb(),s=M(e=>{o(e),n(e)},[n]);return xz.jsx(cD,{children:e.map(e=>xz.jsx(uD,{style:{backgroundColor:e},onClick:t=>{t.preventDefault(),t.stopPropagation(),s(e)},children:e===r?xz.jsx(Yw,{height:12,color:i.palette.getContrastText(e)}):null},e))})};function fD(e,t,n){return Math.max(t,Math.min(n,e))}const pD=(e,t)=>{const n=new lD.Color(e).toHSVComponents(),r=window.getComputedStyle(t),o=parseInt(r.width,10),i=parseInt(r.height,10);return{left:o*(n.s/100)+"px",top:i*((100-n.v)/100)+"px"}},hD=(e,t)=>{const{left:n,top:r,width:o,height:i}=e.currentTarget.getBoundingClientRect(),s=fD(e.clientX-n,0,o)/o*100,a=100-fD(e.clientY-r,0,i)/i*100,l=new lD.Color(t).toHSVComponents();return l.s=s,l.v=a,l},gD=Gb(aw)(({theme:e})=>({width:e.spacing(32),height:e.spacing(24),padding:e.spacing(1),display:"flex",flexDirection:"column"})),mD=Gb(H_)({flex:4,backgroundImage:"linear-gradient(transparent, black), linear-gradient(to right, white, transparent)",position:"relative",cursor:"crosshair",borderRadius:"4px"}),vD=Gb(H_)(({theme:e})=>({flex:.5,marginTop:e.spacing(.5),marginBottom:e.spacing(.5),borderRadius:"4px",cursor:"crosshair",position:"relative",backgroundImage:"linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000 );"})),bD=Gb(H_)({width:"16px",height:"16px",borderRadius:"2px"}),yD=Gb(aw)({flexDirection:"row",alignItems:"center"}),xD=Gb(H_)({position:"absolute",width:"8px",height:"8px",backgroundColor:"black",left:0,top:0,borderRadius:"16px",border:"1px solid white",cursor:"pointer",transform:"translate(-50%, -50%)"}),_D=({onClick:e,onClose:t,startColor:n,palette:r})=>{const[o,i]=S(n),s=k(n),[a,l]=S(!0),[c,u]=S(o),d=k(null),f=k(null),p=k({left:0,top:0,on:!1,clientX:0,clientY:0}),[h,g]=S({left:"0",top:"0"});w(()=>{r.some(e=>e===n)||l(!1)},[n,r]);const m=M(e=>{if(!d.current&&(d.current=e,e)){const t=pD(o,e);g(t)}},[o]),v=x(()=>`hsl(${new lD.Color(o).toHSVComponents().h}, 100%, 50%)`,[o]),b=M(t=>{t.preventDefault(),t.stopPropagation();const n=hD(t,s.current),r=`hsv(${n.h},${n.s},${n.v})`,o=new lD.Color(r);if(s.current=o.toHex(),f.current&&d.current){const e=d.current.getBoundingClientRect(),n=t.clientX-e.left,r=t.clientY-e.top;f.current.style.left=`${n}px`,f.current.style.top=`${r}px`}e(s.current),u(s.current),i(s.current)},[e]),y=M(t=>{t.preventDefault(),t.stopPropagation();const n=((e,t)=>{const{width:n,left:r}=e.target.getBoundingClientRect(),o=fD(e.clientX-r,0,n),i=Math.round(o/n*360),s=o/n*100,a=new lD.Color(t).toHSVComponents();return a.h=i,a.s=s,a})(t,s.current),r=`hsv(${n.h},${n.s},${n.v})`,o=new lD.Color(r);s.current=o.toHex(),e(s.current),u(s.current),i(s.current)},[e]),_=M(t=>{s.current=t,e(s.current),i(s.current),u(t)},[e]),C=M(t=>{if(u(t.target.value),!new lD.Color(t.target.value).isInvalid()&&(s.current=t.target.value,i(t.target.value),t.target.value.startsWith("#")&&7===t.target.value.length?e(s.current,{tag:"collaboration"}):t.target.value.startsWith("#")||e(s.current,{tag:"collaboration"}),d.current)){const e=pD(s.current,d.current);g(e)}},[e]);return xz.jsxs(gD,{children:[a?xz.jsx(dD,{palette:r,color:o,onColorChange:_}):xz.jsxs(xz.Fragment,{children:[xz.jsx(mD,{style:{backgroundColor:v},ref:m,onMouseDown:e=>{if(e.preventDefault(),e.stopPropagation(),f.current&&e.target===f.current){const{left:t,top:n}=f.current.style,r=parseInt(t||"0",10),o=parseInt(n||"0",10);f.current.style.cursor="pointer",d.current&&(d.current.style.cursor="pointer"),p.current={left:r,top:o,on:!0,clientX:e.clientX,clientY:e.clientY}}},onMouseMove:e=>{if(e.preventDefault(),e.stopPropagation(),p.current.on&&f.current&&d.current){const t=e.clientX-p.current.clientX,n=e.clientY-p.current.clientY,r=p.current.left+t,o=p.current.top+n,a=hD(e,s.current),l=`hsv(${a.h},${a.s},${a.v})`,c=new lD.Color(l).toHex();f.current.style.left=`${r}px`,f.current.style.top=`${o}px`,f.current.style.backgroundColor=c,s.current=c,u(s.current),i(c)}},onMouseUp:t=>{t.preventDefault(),t.stopPropagation(),p.current.on?e(s.current):b(t),d.current&&(d.current.style.cursor="crosshair"),f.current&&(f.current.style.cursor="pointer"),p.current.on=!1},children:xz.jsx(xD,{ref:f,style:{...h,backgroundColor:o}})}),xz.jsx(vD,{onClick:y})]}),xz.jsxs(yD,{children:[xz.jsx(bD,{style:{backgroundColor:o}}),xz.jsx(F_,{style:{flex:1},value:c,onChange:C}),xz.jsx($y,{onClick:()=>{l(!a)},children:xz.jsx(uz,{height:12})}),xz.jsx($y,{onClick:t,children:xz.jsx(Yw,{height:12})})]})]})},wD=["#404040","#ffffff","#99CFCD","#83AF9B","#C4CFDA","#10CFC9","#006580","#87205D","#8A85C6","#A16090","#AC4D58","#E0BD8D","#E1DAD5","#b0afae","#7b7a78","#000000","#C8C7A9"],SD=Qj(Q_,"Color"),kD=({colorPalette:e=wD})=>{const[t]=vu(),[n,r]=S(null),{blockFormat:o}=b(jj),i=M((e,n)=>{t.update(()=>{const t=ao();Wr(t)&&nl(t,{color:e})},n),t.dispatchCommand(nD,{styleKey:"color",styleValue:e})},[t]),s=()=>{r(null)};return xz.jsx(ew,{onClickAway:s,mouseEvent:"onMouseDown",touchEvent:"onTouchStart",children:xz.jsxs("div",{children:[xz.jsx(SD,{variant:"text",size:"small",endIcon:xz.jsx(rz,{height:12}),onClick:e=>{e.preventDefault(),e.stopPropagation(),r(n?null:e.currentTarget)},children:xz.jsx(H_,{sx:{backgroundColor:o.fontColor,width:12,height:12}})}),xz.jsx(Bj,{anchorEl:n,children:xz.jsx(_D,{onClick:i,onClose:s,startColor:o.fontColor,palette:e})})]})})};Qj(Xj,"Export");const CD=({compact:e=!1,fonts:t=Pj})=>{const[n]=vu(),[r,o]=S(null),{blockFormat:i}=b(jj),s=x(()=>t,[t]),a=M(e=>{o(null);const{fontName:t}=e.currentTarget.dataset;n.update(()=>{const e=ao();Wr(e)&&nl(e,{"font-family":t||Pj[0]}),n.dispatchCommand(nD,{styleKey:"fontFamily",styleValue:t||Pj[0]}),n.focus()})},[n]);return xz.jsx(ew,{onClickAway:()=>{o(null)},mouseEvent:"onMouseDown",touchEvent:"onTouchStart",children:xz.jsxs("div",{children:[xz.jsx(Hj,{onClick:e=>{e.preventDefault(),e.stopPropagation(),o(r?null:e.currentTarget)},value:i.fontName,startIcon:xz.jsx("span",{style:{fontFamily:"Times New Roman, serif",fontSize:16,fontWeight:"lighter"},children:"T"}),compact:e}),xz.jsx(Bj,{anchorEl:r,children:xz.jsx(Lw,{dense:!0,style:{maxHeight:200,overflow:"auto"},children:s.map(e=>xz.jsx(Wj,{"data-font-name":e,onClick:a,active:e===i.fontName,children:xz.jsx($j,{children:e})},e))})})]})})},ED=e=>parseInt(e,10),TD=({fontSize:e,onSelected:t})=>{const[n,r]=S(""),o=M(e=>{e.preventDefault(),e.stopPropagation(),r(e.target.value)},[]),i=M(()=>{const e=ED(n);e&&t(`${e}px`)},[t,n]),s=M(e=>{"Enter"===e.key&&(e.preventDefault(),i())},[i]);return xz.jsxs(aw,{direction:"row",children:[xz.jsx(F_,{value:n,sx:{ml:1,flex:1},placeholder:e,onChange:o,onKeyDown:s}),xz.jsx($y,{disabled:!ED(n),onClick:i,children:xz.jsx(Yw,{height:12})})]})},AD=["8px","9px","10px","11px","12px","14px","16px","20px","24px","32px"],LD=({compact:e=!1})=>{const[t]=vu(),[n,r]=S(null),{blockFormat:o}=b(jj),i=M(e=>{e.preventDefault(),e.stopPropagation(),r(n?null:e.currentTarget)},[n]),s=M(()=>{r(null)},[]),a=M(e=>{r(null),e.length>0&&t.update(()=>{const n=ao();Wr(n)&&nl(n,{"font-size":e}),t.dispatchCommand(nD,{styleKey:"fontSize",styleValue:e})})},[t]),l=M(e=>{const{fontSize:t}=e.currentTarget.dataset;a(t||"16px")},[a]),c=M(e=>{a(e)},[a]);return xz.jsx(ew,{onClickAway:s,mouseEvent:"onMouseDown",touchEvent:"onTouchStart",children:xz.jsxs("div",{children:[xz.jsx(Hj,{startIcon:e?xz.jsx($j,{children:o.fontSize}):void 0,value:o.fontSize,onClick:i,compact:e}),xz.jsxs(Bj,{anchorEl:n,children:[xz.jsx(TD,{fontSize:o.fontSize,onSelected:c}),xz.jsx(sw,{}),xz.jsx(Lw,{dense:!0,style:{maxHeight:200,overflow:"auto"},children:AD.map(e=>xz.jsx(Pw,{"data-font-size":e,onClick:l,children:xz.jsx($j,{children:e})},e))})]})]})})},MD=Qj(Xj,"InsertTable"),RD=()=>{const[e]=vu(),t=M(()=>{e.dispatchCommand(lj,void 0)},[e]);return xz.jsx(MD,{onClick:t,"data-testid":"editor-toolbar-insertTable-btn",children:xz.jsx(dz,{height:12})})},ND=Qj(Zj,"Italic"),OD=()=>xz.jsx(ND,{"data-testid":"editor-toolbar-italic-btn",format:"italic",icon:xz.jsx(fz,{height:12})}),PD=Qj(Xj,"InsertHyperlink"),ID=()=>{const[e]=vu(),{blockFormat:t}=b(jj),n=M(()=>{t.isLink?e.dispatchCommand(bc,null):e.dispatchCommand(bc,Az("https://"))},[e,t.isLink]);return xz.jsx(PD,{"data-testid":"editor-toolbar-link-btn",onClick:n,children:xz.jsx(pz,{height:12})})};Qj(Xj,"Toggle");const zD=Qj(Zj,"Underline"),jD=()=>xz.jsx(zD,{"data-testid":"editor-toolbar-underline-btn",format:"underline",icon:xz.jsx(hz,{height:12})}),DD=()=>xz.jsx(sw,{flexItem:!0,orientation:"vertical",sx:{mx:.5,my:1}});var FD={AddNewColumn:{value:"Spalte hinzufügen",comment:"Menu option to add column to table",version:"+vQaijK7E48vJ9H9MJsd3Q=="},AddNewRow:{value:"Zeile hinzufügen",comment:"Menu option to add row to table",version:"o5g9uoLTxIYAznEdFR0ioA=="},AlignCenter:{value:"Zentrieren",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)",version:"33xAsCk52eZdrns6ESQAYQ=="},AlignLeft:{value:"Linksbündig",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)",version:"Xy6widnhx5lnasAS62KjOw=="},AlignRight:{value:"Rechtsbündig",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)",version:"uRJLJvO4eCo/vRYCoR/eCQ=="},BoldText:{value:"Fett",comment:"Bold text label in toolbar menu label. (dfk 221011)",version:"EmmVb6LoUIGAXaw+1ubcXg=="},ChangeTextAlignment:{value:"Textausrichtung",comment:"Change text alignment label in toolbar menu label. (dfk 221011)",version:"IzmYkHFKuHvhNY4z6j3BSA=="},ChangeTextSize:{value:"Schriftgröße",comment:"Change text size in toolbar menu label. (dfk 221011)",version:"aEi5MBJWXKnW/bq2ny1Jzw=="},ClearFormat:{value:"Format löschen",comment:"Clear the selected text format",version:"Q2OEIvJHrH8MsE4RQNfMWQ=="},Color:{value:"Schriftfarbe",comment:"Button label for color picker",version:"ZSR6BBl1PNHGAiXYyfyFOw=="},DeleteCol:{value:"Spalte löschen",comment:"Menu option to delete column to table",version:"KdwEyWDvorWo9POIi4ZsEg=="},DeleteRow:{value:"Zeile löschen",comment:"Menu option to delete row to table",version:"HNt6G95YEKMB64vvyDklHA=="},DeleteTable:{value:"Tabelle löschen",comment:"Menu option to delete table",version:"t1C38w3fJ267Gr6tdoHuQQ=="},EnterText:{value:"Geben Sie Text ein...",comment:"Prompt to user when the text object is empty",version:"PgCz8azF8kkBE7eC4afWjg=="},Heading1:{value:"Überschrift 1",comment:"HTML Header 1 format for the text",version:"hnjaVlzIU3eTAQZeaBzzzA=="},Heading2:{value:"Überschrift 2",comment:"HTML Header 2 format for the text",version:"pYerzmSdfRZrsIWHcPZJrA=="},Heading3:{value:"Überschrift 3",comment:"HTML Header 2 format for the text",version:"xHJCPRmh19YJg/dKSmbuFA=="},InsertHyperlink:{value:"Link einfügen",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)",version:"ej9rwxwF6Vh7XrQ28DuWmQ=="},InsertImage:{value:"Bild einfügen",comment:"Label for toolbar menu option to insert an image. (tew 260205)",version:"WkGyZIiaf2vkOz3sLRe8yw=="},InsertTable:{value:"Tabelle einfügen",comment:"Label for toolbar menu option to insert a table. (tew 260205)",version:"MDUMiPnfA3w0N2bSdGExNg=="},ItalicizeText:{value:"Kursiv",comment:"Italicize text label in toolbar menu label. (dfk 221011)",version:"1qaKn3zXIiq9tmUO81pOmw=="},LargeText:{value:"Großer Text",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)",version:"Ga4ivSCgHaK3NyfLFnD/hw=="},LinkTo:{value:"Link zu",comment:"Generic link label. (dfk 221011)",version:"+3NC9+yOccLuyYnxJrdFcQ=="},MediumText:{value:"Mittlerer Text",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)",version:"duW4rbX+lr/NEogVsD8MfQ=="},OrderedList:{value:"Sortierte Liste",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"FddCEQTnAmH1gV8D430F/g=="},Paragraph:{value:"Absatz",comment:"Paragraph format for the text",version:"pHFeBq44ok2V7M2esInoFA=="},SetTextListStyle:{value:"Listenstil",comment:"Set text list style label in toolbar menu label. (dfk 221011)",version:"aIB7vJ7tZ0Nddeg4AaZriQ=="},SmallText:{value:"Kleiner Text",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)",version:"KW+o3yZafqHkbzyid96v4g=="},ToggleBorders:{value:"Rahmen wechseln",comment:"Menu option to toggle table borders",version:"X8/Cbk95LroUwE8LKSnn+A=="},URLLink:{value:"URL-Link",comment:"URL link label. (dfk 221011)",version:"NuOom1L7yZrPKpIzy2/XXg=="},UnderlineText:{value:"Unterstreichen",comment:"Underline text label in toolbar menu label. (dfk 221011)",version:"5ob75WGKK4whhNVPsicswQ=="},UnorderedList:{value:"Unsortierte Liste",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"GIyyLYfHs+U9DgkelqqdpA=="}},BD={AlignLeft:{value:"Align left",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)"},AlignCenter:{value:"Align center",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)"},AlignRight:{value:"Align right",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)"},SmallText:{value:"Small text",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)"},MediumText:{value:"Medium text",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)"},LargeText:{value:"Large text",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)"},UnorderedList:{value:"Unordered list",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)"},OrderedList:{value:"Ordered list",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)"},ChangeTextSize:{value:"Text size",comment:"Change text size in toolbar menu label. (dfk 221011)"},BoldText:{value:"Bold",comment:"Bold text label in toolbar menu label. (dfk 221011)"},ItalicizeText:{value:"Italic",comment:"Italicize text label in toolbar menu label. (dfk 221011)"},UnderlineText:{value:"Underline",comment:"Underline text label in toolbar menu label. (dfk 221011)"},ChangeTextAlignment:{value:"Text alignment",comment:"Change text alignment label in toolbar menu label. (dfk 221011)"},SetTextListStyle:{value:"List style",comment:"Set text list style label in toolbar menu label. (dfk 221011)"},InsertHyperlink:{value:"Insert link",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)"},LinkTo:{value:"Link to",comment:"Generic link label. (dfk 221011)"},URLLink:{value:"URL link",comment:"URL link label. (dfk 221011)"},Paragraph:{value:"Paragraph",comment:"Paragraph format for the text"},Heading1:{value:"Heading 1",comment:"HTML Header 1 format for the text"},Heading2:{value:"Heading 2",comment:"HTML Header 2 format for the text"},Heading3:{value:"Heading 3",comment:"HTML Header 2 format for the text"},Color:{value:"Font color",comment:"Button label for color picker"},ToggleBorders:{value:"Toggle borders",comment:"Menu option to toggle table borders"},AddNewRow:{value:"Add row",comment:"Menu option to add row to table"},AddNewColumn:{value:"Add column",comment:"Menu option to add column to table"},DeleteRow:{value:"Delete row",comment:"Menu option to delete row to table"},DeleteCol:{value:"Delete column",comment:"Menu option to delete column to table"},DeleteTable:{value:"Delete table",comment:"Menu option to delete table"},ClearFormat:{value:"Clear format",comment:"Clear the selected text format"},EnterText:{value:"Enter some text...",comment:"Prompt to user when the text object is empty"},InsertTable:{value:"Insert table",comment:"Label for toolbar menu option to insert a table. (tew 260205)"},InsertImage:{value:"Insert image",comment:"Label for toolbar menu option to insert an image. (tew 260205)"}},$D={AddNewColumn:{value:"Añadir columna",comment:"Menu option to add column to table",version:"+vQaijK7E48vJ9H9MJsd3Q=="},AddNewRow:{value:"Añadir fila",comment:"Menu option to add row to table",version:"o5g9uoLTxIYAznEdFR0ioA=="},AlignCenter:{value:"Alinear centrado",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)",version:"33xAsCk52eZdrns6ESQAYQ=="},AlignLeft:{value:"Alinear a la izquierda",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)",version:"Xy6widnhx5lnasAS62KjOw=="},AlignRight:{value:"Alinear a la derecha",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)",version:"uRJLJvO4eCo/vRYCoR/eCQ=="},BoldText:{value:"Negrita",comment:"Bold text label in toolbar menu label. (dfk 221011)",version:"EmmVb6LoUIGAXaw+1ubcXg=="},ChangeTextAlignment:{value:"Alineación de texto",comment:"Change text alignment label in toolbar menu label. (dfk 221011)",version:"IzmYkHFKuHvhNY4z6j3BSA=="},ChangeTextSize:{value:"Tamaño de texto",comment:"Change text size in toolbar menu label. (dfk 221011)",version:"aEi5MBJWXKnW/bq2ny1Jzw=="},ClearFormat:{value:"Borrar formato",comment:"Clear the selected text format",version:"Q2OEIvJHrH8MsE4RQNfMWQ=="},Color:{value:"Color de fuente",comment:"Button label for color picker",version:"ZSR6BBl1PNHGAiXYyfyFOw=="},DeleteCol:{value:"Eliminar columna",comment:"Menu option to delete column to table",version:"KdwEyWDvorWo9POIi4ZsEg=="},DeleteRow:{value:"Eliminar fila",comment:"Menu option to delete row to table",version:"HNt6G95YEKMB64vvyDklHA=="},DeleteTable:{value:"Eliminar tabla",comment:"Menu option to delete table",version:"t1C38w3fJ267Gr6tdoHuQQ=="},EnterText:{value:"Escriba algún texto...",comment:"Prompt to user when the text object is empty",version:"PgCz8azF8kkBE7eC4afWjg=="},Heading1:{value:"Cabecera 1",comment:"HTML Header 1 format for the text",version:"hnjaVlzIU3eTAQZeaBzzzA=="},Heading2:{value:"Cabecera 2",comment:"HTML Header 2 format for the text",version:"pYerzmSdfRZrsIWHcPZJrA=="},Heading3:{value:"Cabecera 3",comment:"HTML Header 2 format for the text",version:"xHJCPRmh19YJg/dKSmbuFA=="},InsertHyperlink:{value:"Insertar enlace",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)",version:"ej9rwxwF6Vh7XrQ28DuWmQ=="},InsertImage:{value:"Insertar imagen",comment:"Label for toolbar menu option to insert an image. (tew 260205)",version:"WkGyZIiaf2vkOz3sLRe8yw=="},InsertTable:{value:"Insertar tabla",comment:"Label for toolbar menu option to insert a table. (tew 260205)",version:"MDUMiPnfA3w0N2bSdGExNg=="},ItalicizeText:{value:"Cursiva",comment:"Italicize text label in toolbar menu label. (dfk 221011)",version:"1qaKn3zXIiq9tmUO81pOmw=="},LargeText:{value:"Texto grande",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)",version:"Ga4ivSCgHaK3NyfLFnD/hw=="},LinkTo:{value:"Enlazar a",comment:"Generic link label. (dfk 221011)",version:"+3NC9+yOccLuyYnxJrdFcQ=="},MediumText:{value:"Texto mediano",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)",version:"duW4rbX+lr/NEogVsD8MfQ=="},OrderedList:{value:"Lista ordenada",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"FddCEQTnAmH1gV8D430F/g=="},Paragraph:{value:"Párrafo",comment:"Paragraph format for the text",version:"pHFeBq44ok2V7M2esInoFA=="},SetTextListStyle:{value:"Estilo de lista",comment:"Set text list style label in toolbar menu label. (dfk 221011)",version:"aIB7vJ7tZ0Nddeg4AaZriQ=="},SmallText:{value:"Texto pequeño",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)",version:"KW+o3yZafqHkbzyid96v4g=="},ToggleBorders:{value:"Ajustar bordes",comment:"Menu option to toggle table borders",version:"X8/Cbk95LroUwE8LKSnn+A=="},URLLink:{value:"Enlace URL",comment:"URL link label. (dfk 221011)",version:"NuOom1L7yZrPKpIzy2/XXg=="},UnderlineText:{value:"Subrayado",comment:"Underline text label in toolbar menu label. (dfk 221011)",version:"5ob75WGKK4whhNVPsicswQ=="},UnorderedList:{value:"Lista no ordenada",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"GIyyLYfHs+U9DgkelqqdpA=="}},HD={AddNewColumn:{value:"Ajouter une colonne",comment:"Menu option to add column to table",version:"+vQaijK7E48vJ9H9MJsd3Q=="},AddNewRow:{value:"Ajouter une ligne",comment:"Menu option to add row to table",version:"o5g9uoLTxIYAznEdFR0ioA=="},AlignCenter:{value:"Centrer",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)",version:"33xAsCk52eZdrns6ESQAYQ=="},AlignLeft:{value:"Aligner à gauche",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)",version:"Xy6widnhx5lnasAS62KjOw=="},AlignRight:{value:"Aligner à droite",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)",version:"uRJLJvO4eCo/vRYCoR/eCQ=="},BoldText:{value:"Gras",comment:"Bold text label in toolbar menu label. (dfk 221011)",version:"EmmVb6LoUIGAXaw+1ubcXg=="},ChangeTextAlignment:{value:"Alignement du texte",comment:"Change text alignment label in toolbar menu label. (dfk 221011)",version:"IzmYkHFKuHvhNY4z6j3BSA=="},ChangeTextSize:{value:"Taille du texte",comment:"Change text size in toolbar menu label. (dfk 221011)",version:"aEi5MBJWXKnW/bq2ny1Jzw=="},ClearFormat:{value:"Effacer le format",comment:"Clear the selected text format",version:"Q2OEIvJHrH8MsE4RQNfMWQ=="},Color:{value:"Couleur de police",comment:"Button label for color picker",version:"ZSR6BBl1PNHGAiXYyfyFOw=="},DeleteCol:{value:"Supprimer une colonne",comment:"Menu option to delete column to table",version:"KdwEyWDvorWo9POIi4ZsEg=="},DeleteRow:{value:"Supprimer une ligne",comment:"Menu option to delete row to table",version:"HNt6G95YEKMB64vvyDklHA=="},DeleteTable:{value:"Supprimer la table",comment:"Menu option to delete table",version:"t1C38w3fJ267Gr6tdoHuQQ=="},EnterText:{value:"Saisissez un texte...",comment:"Prompt to user when the text object is empty",version:"PgCz8azF8kkBE7eC4afWjg=="},Heading1:{value:"En-tête 1",comment:"HTML Header 1 format for the text",version:"hnjaVlzIU3eTAQZeaBzzzA=="},Heading2:{value:"En-tête 2",comment:"HTML Header 2 format for the text",version:"pYerzmSdfRZrsIWHcPZJrA=="},Heading3:{value:"En-tête 3",comment:"HTML Header 2 format for the text",version:"xHJCPRmh19YJg/dKSmbuFA=="},InsertHyperlink:{value:"Insérer un lien",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)",version:"ej9rwxwF6Vh7XrQ28DuWmQ=="},InsertImage:{value:"Insérer une image",comment:"Label for toolbar menu option to insert an image. (tew 260205)",version:"WkGyZIiaf2vkOz3sLRe8yw=="},InsertTable:{value:"Insérer une table",comment:"Label for toolbar menu option to insert a table. (tew 260205)",version:"MDUMiPnfA3w0N2bSdGExNg=="},ItalicizeText:{value:"Italique",comment:"Italicize text label in toolbar menu label. (dfk 221011)",version:"1qaKn3zXIiq9tmUO81pOmw=="},LargeText:{value:"Texte de grande taille",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)",version:"Ga4ivSCgHaK3NyfLFnD/hw=="},LinkTo:{value:"Lien vers",comment:"Generic link label. (dfk 221011)",version:"+3NC9+yOccLuyYnxJrdFcQ=="},MediumText:{value:"Texte de taille moyenne",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)",version:"duW4rbX+lr/NEogVsD8MfQ=="},OrderedList:{value:"Liste triée",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"FddCEQTnAmH1gV8D430F/g=="},Paragraph:{value:"Paragraphe",comment:"Paragraph format for the text",version:"pHFeBq44ok2V7M2esInoFA=="},SetTextListStyle:{value:"Style de liste",comment:"Set text list style label in toolbar menu label. (dfk 221011)",version:"aIB7vJ7tZ0Nddeg4AaZriQ=="},SmallText:{value:"Texte de petite taille",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)",version:"KW+o3yZafqHkbzyid96v4g=="},ToggleBorders:{value:"Basculer les bords",comment:"Menu option to toggle table borders",version:"X8/Cbk95LroUwE8LKSnn+A=="},URLLink:{value:"Lien URL",comment:"URL link label. (dfk 221011)",version:"NuOom1L7yZrPKpIzy2/XXg=="},UnderlineText:{value:"Souligner",comment:"Underline text label in toolbar menu label. (dfk 221011)",version:"5ob75WGKK4whhNVPsicswQ=="},UnorderedList:{value:"Liste non triée",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"GIyyLYfHs+U9DgkelqqdpA=="}},WD={AddNewColumn:{value:"Aggiungi colonna",comment:"Menu option to add column to table",version:"+vQaijK7E48vJ9H9MJsd3Q=="},AddNewRow:{value:"Aggiungi riga",comment:"Menu option to add row to table",version:"o5g9uoLTxIYAznEdFR0ioA=="},AlignCenter:{value:"Allinea al centro",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)",version:"33xAsCk52eZdrns6ESQAYQ=="},AlignLeft:{value:"Allinea a sinistra",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)",version:"Xy6widnhx5lnasAS62KjOw=="},AlignRight:{value:"Allinea a destra",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)",version:"uRJLJvO4eCo/vRYCoR/eCQ=="},BoldText:{value:"Grassetto",comment:"Bold text label in toolbar menu label. (dfk 221011)",version:"EmmVb6LoUIGAXaw+1ubcXg=="},ChangeTextAlignment:{value:"Allineamento testo",comment:"Change text alignment label in toolbar menu label. (dfk 221011)",version:"IzmYkHFKuHvhNY4z6j3BSA=="},ChangeTextSize:{value:"Dimensione testo",comment:"Change text size in toolbar menu label. (dfk 221011)",version:"aEi5MBJWXKnW/bq2ny1Jzw=="},ClearFormat:{value:"Cancella formato",comment:"Clear the selected text format",version:"Q2OEIvJHrH8MsE4RQNfMWQ=="},Color:{value:"Colore carattere",comment:"Button label for color picker",version:"ZSR6BBl1PNHGAiXYyfyFOw=="},DeleteCol:{value:"Elimina colonna",comment:"Menu option to delete column to table",version:"KdwEyWDvorWo9POIi4ZsEg=="},DeleteRow:{value:"Elimina riga",comment:"Menu option to delete row to table",version:"HNt6G95YEKMB64vvyDklHA=="},DeleteTable:{value:"Elimina tabella",comment:"Menu option to delete table",version:"t1C38w3fJ267Gr6tdoHuQQ=="},EnterText:{value:"Inserisci del testo...",comment:"Prompt to user when the text object is empty",version:"PgCz8azF8kkBE7eC4afWjg=="},Heading1:{value:"Intestazione 1",comment:"HTML Header 1 format for the text",version:"hnjaVlzIU3eTAQZeaBzzzA=="},Heading2:{value:"Intestazione 2",comment:"HTML Header 2 format for the text",version:"pYerzmSdfRZrsIWHcPZJrA=="},Heading3:{value:"Intestazione 3",comment:"HTML Header 2 format for the text",version:"xHJCPRmh19YJg/dKSmbuFA=="},InsertHyperlink:{value:"Inserisci collegamento",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)",version:"ej9rwxwF6Vh7XrQ28DuWmQ=="},InsertImage:{value:"Inserisci immagine",comment:"Label for toolbar menu option to insert an image. (tew 260205)",version:"WkGyZIiaf2vkOz3sLRe8yw=="},InsertTable:{value:"Inserisci tabella",comment:"Label for toolbar menu option to insert a table. (tew 260205)",version:"MDUMiPnfA3w0N2bSdGExNg=="},ItalicizeText:{value:"Corsivo",comment:"Italicize text label in toolbar menu label. (dfk 221011)",version:"1qaKn3zXIiq9tmUO81pOmw=="},LargeText:{value:"Testo grande",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)",version:"Ga4ivSCgHaK3NyfLFnD/hw=="},LinkTo:{value:"Collega a",comment:"Generic link label. (dfk 221011)",version:"+3NC9+yOccLuyYnxJrdFcQ=="},MediumText:{value:"Testo medio",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)",version:"duW4rbX+lr/NEogVsD8MfQ=="},OrderedList:{value:"Elenco ordinato",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"FddCEQTnAmH1gV8D430F/g=="},Paragraph:{value:"Paragrafo",comment:"Paragraph format for the text",version:"pHFeBq44ok2V7M2esInoFA=="},SetTextListStyle:{value:"Stile elenco",comment:"Set text list style label in toolbar menu label. (dfk 221011)",version:"aIB7vJ7tZ0Nddeg4AaZriQ=="},SmallText:{value:"Testo piccolo",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)",version:"KW+o3yZafqHkbzyid96v4g=="},ToggleBorders:{value:"Attiva/Disattiva bordi",comment:"Menu option to toggle table borders",version:"X8/Cbk95LroUwE8LKSnn+A=="},URLLink:{value:"Collegamento URL",comment:"URL link label. (dfk 221011)",version:"NuOom1L7yZrPKpIzy2/XXg=="},UnderlineText:{value:"Sottolineato",comment:"Underline text label in toolbar menu label. (dfk 221011)",version:"5ob75WGKK4whhNVPsicswQ=="},UnorderedList:{value:"Elenco non ordinato",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"GIyyLYfHs+U9DgkelqqdpA=="}},KD={AddNewColumn:{value:"列を追加",comment:"Menu option to add column to table",version:"+vQaijK7E48vJ9H9MJsd3Q=="},AddNewRow:{value:"行を追加",comment:"Menu option to add row to table",version:"o5g9uoLTxIYAznEdFR0ioA=="},AlignCenter:{value:"中央揃え",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)",version:"33xAsCk52eZdrns6ESQAYQ=="},AlignLeft:{value:"左揃え",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)",version:"Xy6widnhx5lnasAS62KjOw=="},AlignRight:{value:"右揃え",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)",version:"uRJLJvO4eCo/vRYCoR/eCQ=="},BoldText:{value:"太字",comment:"Bold text label in toolbar menu label. (dfk 221011)",version:"EmmVb6LoUIGAXaw+1ubcXg=="},ChangeTextAlignment:{value:"テキストの配置",comment:"Change text alignment label in toolbar menu label. (dfk 221011)",version:"IzmYkHFKuHvhNY4z6j3BSA=="},ChangeTextSize:{value:"テキスト サイズ",comment:"Change text size in toolbar menu label. (dfk 221011)",version:"aEi5MBJWXKnW/bq2ny1Jzw=="},ClearFormat:{value:"書式をクリア",comment:"Clear the selected text format",version:"Q2OEIvJHrH8MsE4RQNfMWQ=="},Color:{value:"フォントの色",comment:"Button label for color picker",version:"ZSR6BBl1PNHGAiXYyfyFOw=="},DeleteCol:{value:"列を削除",comment:"Menu option to delete column to table",version:"KdwEyWDvorWo9POIi4ZsEg=="},DeleteRow:{value:"行を削除",comment:"Menu option to delete row to table",version:"HNt6G95YEKMB64vvyDklHA=="},DeleteTable:{value:"テーブルを削除",comment:"Menu option to delete table",version:"t1C38w3fJ267Gr6tdoHuQQ=="},EnterText:{value:"テキストを入力してください...",comment:"Prompt to user when the text object is empty",version:"PgCz8azF8kkBE7eC4afWjg=="},Heading1:{value:"見出し 1",comment:"HTML Header 1 format for the text",version:"hnjaVlzIU3eTAQZeaBzzzA=="},Heading2:{value:"見出し 2",comment:"HTML Header 2 format for the text",version:"pYerzmSdfRZrsIWHcPZJrA=="},Heading3:{value:"見出し 3",comment:"HTML Header 2 format for the text",version:"xHJCPRmh19YJg/dKSmbuFA=="},InsertHyperlink:{value:"リンクを挿入",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)",version:"ej9rwxwF6Vh7XrQ28DuWmQ=="},InsertImage:{value:"画像を挿入",comment:"Label for toolbar menu option to insert an image. (tew 260205)",version:"WkGyZIiaf2vkOz3sLRe8yw=="},InsertTable:{value:"テーブルを挿入",comment:"Label for toolbar menu option to insert a table. (tew 260205)",version:"MDUMiPnfA3w0N2bSdGExNg=="},ItalicizeText:{value:"斜体",comment:"Italicize text label in toolbar menu label. (dfk 221011)",version:"1qaKn3zXIiq9tmUO81pOmw=="},LargeText:{value:"テキスト大",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)",version:"Ga4ivSCgHaK3NyfLFnD/hw=="},LinkTo:{value:"リンク先",comment:"Generic link label. (dfk 221011)",version:"+3NC9+yOccLuyYnxJrdFcQ=="},MediumText:{value:"テキスト中",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)",version:"duW4rbX+lr/NEogVsD8MfQ=="},OrderedList:{value:"順序付きリスト",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"FddCEQTnAmH1gV8D430F/g=="},Paragraph:{value:"段落",comment:"Paragraph format for the text",version:"pHFeBq44ok2V7M2esInoFA=="},SetTextListStyle:{value:"リスト スタイル",comment:"Set text list style label in toolbar menu label. (dfk 221011)",version:"aIB7vJ7tZ0Nddeg4AaZriQ=="},SmallText:{value:"テキスト小",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)",version:"KW+o3yZafqHkbzyid96v4g=="},ToggleBorders:{value:"境界線の切り替え",comment:"Menu option to toggle table borders",version:"X8/Cbk95LroUwE8LKSnn+A=="},URLLink:{value:"URL リンク",comment:"URL link label. (dfk 221011)",version:"NuOom1L7yZrPKpIzy2/XXg=="},UnderlineText:{value:"下線",comment:"Underline text label in toolbar menu label. (dfk 221011)",version:"5ob75WGKK4whhNVPsicswQ=="},UnorderedList:{value:"順序なしリスト",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"GIyyLYfHs+U9DgkelqqdpA=="}},UD={AddNewColumn:{value:"열 추가",comment:"Menu option to add column to table",version:"+vQaijK7E48vJ9H9MJsd3Q=="},AddNewRow:{value:"행 추가",comment:"Menu option to add row to table",version:"o5g9uoLTxIYAznEdFR0ioA=="},AlignCenter:{value:"중앙 맞춤",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)",version:"33xAsCk52eZdrns6ESQAYQ=="},AlignLeft:{value:"왼쪽 맞춤",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)",version:"Xy6widnhx5lnasAS62KjOw=="},AlignRight:{value:"오른쪽 맞춤",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)",version:"uRJLJvO4eCo/vRYCoR/eCQ=="},BoldText:{value:"굵게",comment:"Bold text label in toolbar menu label. (dfk 221011)",version:"EmmVb6LoUIGAXaw+1ubcXg=="},ChangeTextAlignment:{value:"텍스트 맞춤",comment:"Change text alignment label in toolbar menu label. (dfk 221011)",version:"IzmYkHFKuHvhNY4z6j3BSA=="},ChangeTextSize:{value:"텍스트 크기",comment:"Change text size in toolbar menu label. (dfk 221011)",version:"aEi5MBJWXKnW/bq2ny1Jzw=="},ClearFormat:{value:"형식 지우기",comment:"Clear the selected text format",version:"Q2OEIvJHrH8MsE4RQNfMWQ=="},Color:{value:"글꼴 색",comment:"Button label for color picker",version:"ZSR6BBl1PNHGAiXYyfyFOw=="},DeleteCol:{value:"열 삭제",comment:"Menu option to delete column to table",version:"KdwEyWDvorWo9POIi4ZsEg=="},DeleteRow:{value:"행 삭제",comment:"Menu option to delete row to table",version:"HNt6G95YEKMB64vvyDklHA=="},DeleteTable:{value:"테이블 삭제",comment:"Menu option to delete table",version:"t1C38w3fJ267Gr6tdoHuQQ=="},EnterText:{value:"텍스트 입력...",comment:"Prompt to user when the text object is empty",version:"PgCz8azF8kkBE7eC4afWjg=="},Heading1:{value:"머리글 1",comment:"HTML Header 1 format for the text",version:"hnjaVlzIU3eTAQZeaBzzzA=="},Heading2:{value:"머리글 2",comment:"HTML Header 2 format for the text",version:"pYerzmSdfRZrsIWHcPZJrA=="},Heading3:{value:"머리글 3",comment:"HTML Header 2 format for the text",version:"xHJCPRmh19YJg/dKSmbuFA=="},InsertHyperlink:{value:"링크 삽입",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)",version:"ej9rwxwF6Vh7XrQ28DuWmQ=="},InsertImage:{value:"이미지 삽입",comment:"Label for toolbar menu option to insert an image. (tew 260205)",version:"WkGyZIiaf2vkOz3sLRe8yw=="},InsertTable:{value:"테이블 삽입",comment:"Label for toolbar menu option to insert a table. (tew 260205)",version:"MDUMiPnfA3w0N2bSdGExNg=="},ItalicizeText:{value:"기울임꼴",comment:"Italicize text label in toolbar menu label. (dfk 221011)",version:"1qaKn3zXIiq9tmUO81pOmw=="},LargeText:{value:"큰 텍스트",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)",version:"Ga4ivSCgHaK3NyfLFnD/hw=="},LinkTo:{value:"연결 대상",comment:"Generic link label. (dfk 221011)",version:"+3NC9+yOccLuyYnxJrdFcQ=="},MediumText:{value:"중간 텍스트",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)",version:"duW4rbX+lr/NEogVsD8MfQ=="},OrderedList:{value:"순서가 지정된 목록",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"FddCEQTnAmH1gV8D430F/g=="},Paragraph:{value:"단락",comment:"Paragraph format for the text",version:"pHFeBq44ok2V7M2esInoFA=="},SetTextListStyle:{value:"목록 스타일",comment:"Set text list style label in toolbar menu label. (dfk 221011)",version:"aIB7vJ7tZ0Nddeg4AaZriQ=="},SmallText:{value:"작은 텍스트",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)",version:"KW+o3yZafqHkbzyid96v4g=="},ToggleBorders:{value:"테두리 설정/해제",comment:"Menu option to toggle table borders",version:"X8/Cbk95LroUwE8LKSnn+A=="},URLLink:{value:"URL 링크",comment:"URL link label. (dfk 221011)",version:"NuOom1L7yZrPKpIzy2/XXg=="},UnderlineText:{value:"밑줄",comment:"Underline text label in toolbar menu label. (dfk 221011)",version:"5ob75WGKK4whhNVPsicswQ=="},UnorderedList:{value:"순서가 지정되지 않은 목록",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"GIyyLYfHs+U9DgkelqqdpA=="}},GD={AddNewColumn:{value:"Kolom toevoegen",comment:"Menu option to add column to table",version:"+vQaijK7E48vJ9H9MJsd3Q=="},AddNewRow:{value:"Rij toevoegen",comment:"Menu option to add row to table",version:"o5g9uoLTxIYAznEdFR0ioA=="},AlignCenter:{value:"Op midden uitlijnen",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)",version:"33xAsCk52eZdrns6ESQAYQ=="},AlignLeft:{value:"Links uitlijnen",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)",version:"Xy6widnhx5lnasAS62KjOw=="},AlignRight:{value:"Rechts uitlijnen",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)",version:"uRJLJvO4eCo/vRYCoR/eCQ=="},BoldText:{value:"Vet",comment:"Bold text label in toolbar menu label. (dfk 221011)",version:"EmmVb6LoUIGAXaw+1ubcXg=="},ChangeTextAlignment:{value:"Tekstuitlijning",comment:"Change text alignment label in toolbar menu label. (dfk 221011)",version:"IzmYkHFKuHvhNY4z6j3BSA=="},ChangeTextSize:{value:"Tekstgrootte",comment:"Change text size in toolbar menu label. (dfk 221011)",version:"aEi5MBJWXKnW/bq2ny1Jzw=="},ClearFormat:{value:"Opmaak wissen",comment:"Clear the selected text format",version:"Q2OEIvJHrH8MsE4RQNfMWQ=="},Color:{value:"Tekstkleur",comment:"Button label for color picker",version:"ZSR6BBl1PNHGAiXYyfyFOw=="},DeleteCol:{value:"Kolom verwijderen",comment:"Menu option to delete column to table",version:"KdwEyWDvorWo9POIi4ZsEg=="},DeleteRow:{value:"Rij verwijderen",comment:"Menu option to delete row to table",version:"HNt6G95YEKMB64vvyDklHA=="},DeleteTable:{value:"Tabel verwijderen",comment:"Menu option to delete table",version:"t1C38w3fJ267Gr6tdoHuQQ=="},EnterText:{value:"Geef tekst op...",comment:"Prompt to user when the text object is empty",version:"PgCz8azF8kkBE7eC4afWjg=="},Heading1:{value:"Koptekst 1",comment:"HTML Header 1 format for the text",version:"hnjaVlzIU3eTAQZeaBzzzA=="},Heading2:{value:"Koptekst 2",comment:"HTML Header 2 format for the text",version:"pYerzmSdfRZrsIWHcPZJrA=="},Heading3:{value:"Koptekst 3",comment:"HTML Header 2 format for the text",version:"xHJCPRmh19YJg/dKSmbuFA=="},InsertHyperlink:{value:"Koppeling invoegen",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)",version:"ej9rwxwF6Vh7XrQ28DuWmQ=="},InsertImage:{value:"Afbeelding invoegen",comment:"Label for toolbar menu option to insert an image. (tew 260205)",version:"WkGyZIiaf2vkOz3sLRe8yw=="},InsertTable:{value:"Tabel invoegen",comment:"Label for toolbar menu option to insert a table. (tew 260205)",version:"MDUMiPnfA3w0N2bSdGExNg=="},ItalicizeText:{value:"Cursief",comment:"Italicize text label in toolbar menu label. (dfk 221011)",version:"1qaKn3zXIiq9tmUO81pOmw=="},LargeText:{value:"Tekst groot",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)",version:"Ga4ivSCgHaK3NyfLFnD/hw=="},LinkTo:{value:"Koppelen met",comment:"Generic link label. (dfk 221011)",version:"+3NC9+yOccLuyYnxJrdFcQ=="},MediumText:{value:"Tekst medium",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)",version:"duW4rbX+lr/NEogVsD8MfQ=="},OrderedList:{value:"Geordende lijst",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"FddCEQTnAmH1gV8D430F/g=="},Paragraph:{value:"Alinea",comment:"Paragraph format for the text",version:"pHFeBq44ok2V7M2esInoFA=="},SetTextListStyle:{value:"Lijststijl",comment:"Set text list style label in toolbar menu label. (dfk 221011)",version:"aIB7vJ7tZ0Nddeg4AaZriQ=="},SmallText:{value:"Tekst klein",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)",version:"KW+o3yZafqHkbzyid96v4g=="},ToggleBorders:{value:"Randen in-/uitschakelen",comment:"Menu option to toggle table borders",version:"X8/Cbk95LroUwE8LKSnn+A=="},URLLink:{value:"URL-koppeling",comment:"URL link label. (dfk 221011)",version:"NuOom1L7yZrPKpIzy2/XXg=="},UnderlineText:{value:"Onderstrepen",comment:"Underline text label in toolbar menu label. (dfk 221011)",version:"5ob75WGKK4whhNVPsicswQ=="},UnorderedList:{value:"Ongeordende lijst",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"GIyyLYfHs+U9DgkelqqdpA=="}},YD={AddNewColumn:{value:"Dodaj kolumnę",comment:"Menu option to add column to table",version:"+vQaijK7E48vJ9H9MJsd3Q=="},AddNewRow:{value:"Dodaj wiersz",comment:"Menu option to add row to table",version:"o5g9uoLTxIYAznEdFR0ioA=="},AlignCenter:{value:"Wyrównaj do środka",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)",version:"33xAsCk52eZdrns6ESQAYQ=="},AlignLeft:{value:"Wyrównaj do lewej",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)",version:"Xy6widnhx5lnasAS62KjOw=="},AlignRight:{value:"Wyrównaj do prawej",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)",version:"uRJLJvO4eCo/vRYCoR/eCQ=="},BoldText:{value:"Pogrubienie",comment:"Bold text label in toolbar menu label. (dfk 221011)",version:"EmmVb6LoUIGAXaw+1ubcXg=="},ChangeTextAlignment:{value:"Wyrównanie tekstu",comment:"Change text alignment label in toolbar menu label. (dfk 221011)",version:"IzmYkHFKuHvhNY4z6j3BSA=="},ChangeTextSize:{value:"Wielkość tekstu",comment:"Change text size in toolbar menu label. (dfk 221011)",version:"aEi5MBJWXKnW/bq2ny1Jzw=="},ClearFormat:{value:"Wyczyść format",comment:"Clear the selected text format",version:"Q2OEIvJHrH8MsE4RQNfMWQ=="},Color:{value:"Kolor czcionki",comment:"Button label for color picker",version:"ZSR6BBl1PNHGAiXYyfyFOw=="},DeleteCol:{value:"Usuń kolumnę",comment:"Menu option to delete column to table",version:"KdwEyWDvorWo9POIi4ZsEg=="},DeleteRow:{value:"Usuń wiersz",comment:"Menu option to delete row to table",version:"HNt6G95YEKMB64vvyDklHA=="},DeleteTable:{value:"Usuń tabelę",comment:"Menu option to delete table",version:"t1C38w3fJ267Gr6tdoHuQQ=="},EnterText:{value:"Wprowadź tekst...",comment:"Prompt to user when the text object is empty",version:"PgCz8azF8kkBE7eC4afWjg=="},Heading1:{value:"Nagłówek 1",comment:"HTML Header 1 format for the text",version:"hnjaVlzIU3eTAQZeaBzzzA=="},Heading2:{value:"Nagłówek 2",comment:"HTML Header 2 format for the text",version:"pYerzmSdfRZrsIWHcPZJrA=="},Heading3:{value:"Nagłówek 3",comment:"HTML Header 2 format for the text",version:"xHJCPRmh19YJg/dKSmbuFA=="},InsertHyperlink:{value:"Wstaw łącze",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)",version:"ej9rwxwF6Vh7XrQ28DuWmQ=="},InsertImage:{value:"Wstaw grafikę",comment:"Label for toolbar menu option to insert an image. (tew 260205)",version:"WkGyZIiaf2vkOz3sLRe8yw=="},InsertTable:{value:"Wstaw tabelę",comment:"Label for toolbar menu option to insert a table. (tew 260205)",version:"MDUMiPnfA3w0N2bSdGExNg=="},ItalicizeText:{value:"Kursywa",comment:"Italicize text label in toolbar menu label. (dfk 221011)",version:"1qaKn3zXIiq9tmUO81pOmw=="},LargeText:{value:"Duży tekst",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)",version:"Ga4ivSCgHaK3NyfLFnD/hw=="},LinkTo:{value:"Łącze do:",comment:"Generic link label. (dfk 221011)",version:"+3NC9+yOccLuyYnxJrdFcQ=="},MediumText:{value:"Średni tekst",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)",version:"duW4rbX+lr/NEogVsD8MfQ=="},OrderedList:{value:"Lista uporządkowana",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"FddCEQTnAmH1gV8D430F/g=="},Paragraph:{value:"Akapit",comment:"Paragraph format for the text",version:"pHFeBq44ok2V7M2esInoFA=="},SetTextListStyle:{value:"Styl listy",comment:"Set text list style label in toolbar menu label. (dfk 221011)",version:"aIB7vJ7tZ0Nddeg4AaZriQ=="},SmallText:{value:"Mały tekst",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)",version:"KW+o3yZafqHkbzyid96v4g=="},ToggleBorders:{value:"Przełącz obramowania",comment:"Menu option to toggle table borders",version:"X8/Cbk95LroUwE8LKSnn+A=="},URLLink:{value:"Łącze URL",comment:"URL link label. (dfk 221011)",version:"NuOom1L7yZrPKpIzy2/XXg=="},UnderlineText:{value:"Podkreślenie",comment:"Underline text label in toolbar menu label. (dfk 221011)",version:"5ob75WGKK4whhNVPsicswQ=="},UnorderedList:{value:"Lista nieuporządkowana",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"GIyyLYfHs+U9DgkelqqdpA=="}},VD={AddNewColumn:{value:"Adicionar coluna",comment:"Menu option to add column to table",version:"+vQaijK7E48vJ9H9MJsd3Q=="},AddNewRow:{value:"Adicionar linha",comment:"Menu option to add row to table",version:"o5g9uoLTxIYAznEdFR0ioA=="},AlignCenter:{value:"Alinhar centro",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)",version:"33xAsCk52eZdrns6ESQAYQ=="},AlignLeft:{value:"Alinhar à esquerda",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)",version:"Xy6widnhx5lnasAS62KjOw=="},AlignRight:{value:"Alinhar à direita",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)",version:"uRJLJvO4eCo/vRYCoR/eCQ=="},BoldText:{value:"Negrito",comment:"Bold text label in toolbar menu label. (dfk 221011)",version:"EmmVb6LoUIGAXaw+1ubcXg=="},ChangeTextAlignment:{value:"Alinhamento do texto",comment:"Change text alignment label in toolbar menu label. (dfk 221011)",version:"IzmYkHFKuHvhNY4z6j3BSA=="},ChangeTextSize:{value:"Tamanho do texto",comment:"Change text size in toolbar menu label. (dfk 221011)",version:"aEi5MBJWXKnW/bq2ny1Jzw=="},ClearFormat:{value:"Limpar formato",comment:"Clear the selected text format",version:"Q2OEIvJHrH8MsE4RQNfMWQ=="},Color:{value:"Cor da fonte",comment:"Button label for color picker",version:"ZSR6BBl1PNHGAiXYyfyFOw=="},DeleteCol:{value:"Excluir coluna",comment:"Menu option to delete column to table",version:"KdwEyWDvorWo9POIi4ZsEg=="},DeleteRow:{value:"Excluir linha",comment:"Menu option to delete row to table",version:"HNt6G95YEKMB64vvyDklHA=="},DeleteTable:{value:"Excluir tabela",comment:"Menu option to delete table",version:"t1C38w3fJ267Gr6tdoHuQQ=="},EnterText:{value:"Digite algum texto...",comment:"Prompt to user when the text object is empty",version:"PgCz8azF8kkBE7eC4afWjg=="},Heading1:{value:"Cabeçalho 1",comment:"HTML Header 1 format for the text",version:"hnjaVlzIU3eTAQZeaBzzzA=="},Heading2:{value:"Cabeçallho 2",comment:"HTML Header 2 format for the text",version:"pYerzmSdfRZrsIWHcPZJrA=="},Heading3:{value:"Cabeçalho 3",comment:"HTML Header 2 format for the text",version:"xHJCPRmh19YJg/dKSmbuFA=="},InsertHyperlink:{value:"Inserir link",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)",version:"ej9rwxwF6Vh7XrQ28DuWmQ=="},InsertImage:{value:"Inserir imagem",comment:"Label for toolbar menu option to insert an image. (tew 260205)",version:"WkGyZIiaf2vkOz3sLRe8yw=="},InsertTable:{value:"Inserir tabela",comment:"Label for toolbar menu option to insert a table. (tew 260205)",version:"MDUMiPnfA3w0N2bSdGExNg=="},ItalicizeText:{value:"Itálico",comment:"Italicize text label in toolbar menu label. (dfk 221011)",version:"1qaKn3zXIiq9tmUO81pOmw=="},LargeText:{value:"Texto grande",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)",version:"Ga4ivSCgHaK3NyfLFnD/hw=="},LinkTo:{value:"Link para",comment:"Generic link label. (dfk 221011)",version:"+3NC9+yOccLuyYnxJrdFcQ=="},MediumText:{value:"Texto médio",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)",version:"duW4rbX+lr/NEogVsD8MfQ=="},OrderedList:{value:"Lista ordenada",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"FddCEQTnAmH1gV8D430F/g=="},Paragraph:{value:"Parágrafo",comment:"Paragraph format for the text",version:"pHFeBq44ok2V7M2esInoFA=="},SetTextListStyle:{value:"Estilo em lista",comment:"Set text list style label in toolbar menu label. (dfk 221011)",version:"aIB7vJ7tZ0Nddeg4AaZriQ=="},SmallText:{value:"Texto pequeno",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)",version:"KW+o3yZafqHkbzyid96v4g=="},ToggleBorders:{value:"Alternar bordas",comment:"Menu option to toggle table borders",version:"X8/Cbk95LroUwE8LKSnn+A=="},URLLink:{value:"Link da URL",comment:"URL link label. (dfk 221011)",version:"NuOom1L7yZrPKpIzy2/XXg=="},UnderlineText:{value:"Sublinhado",comment:"Underline text label in toolbar menu label. (dfk 221011)",version:"5ob75WGKK4whhNVPsicswQ=="},UnorderedList:{value:"Lista não ordenada",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"GIyyLYfHs+U9DgkelqqdpA=="}},JD={AddNewColumn:{value:"Добавить столбец",comment:"Menu option to add column to table",version:"+vQaijK7E48vJ9H9MJsd3Q=="},AddNewRow:{value:"Добавить строку",comment:"Menu option to add row to table",version:"o5g9uoLTxIYAznEdFR0ioA=="},AlignCenter:{value:"Выровнять по центру",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)",version:"33xAsCk52eZdrns6ESQAYQ=="},AlignLeft:{value:"Выровнять по левой стороне",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)",version:"Xy6widnhx5lnasAS62KjOw=="},AlignRight:{value:"Выровнять по правой стороне",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)",version:"uRJLJvO4eCo/vRYCoR/eCQ=="},BoldText:{value:"Полужирный",comment:"Bold text label in toolbar menu label. (dfk 221011)",version:"EmmVb6LoUIGAXaw+1ubcXg=="},ChangeTextAlignment:{value:"Выравнивание текста",comment:"Change text alignment label in toolbar menu label. (dfk 221011)",version:"IzmYkHFKuHvhNY4z6j3BSA=="},ChangeTextSize:{value:"Размер текста",comment:"Change text size in toolbar menu label. (dfk 221011)",version:"aEi5MBJWXKnW/bq2ny1Jzw=="},ClearFormat:{value:"Очистить формат",comment:"Clear the selected text format",version:"Q2OEIvJHrH8MsE4RQNfMWQ=="},Color:{value:"Цвет шрифта",comment:"Button label for color picker",version:"ZSR6BBl1PNHGAiXYyfyFOw=="},DeleteCol:{value:"Удалить столбец",comment:"Menu option to delete column to table",version:"KdwEyWDvorWo9POIi4ZsEg=="},DeleteRow:{value:"Удалить строку",comment:"Menu option to delete row to table",version:"HNt6G95YEKMB64vvyDklHA=="},DeleteTable:{value:"Удалить таблицу",comment:"Menu option to delete table",version:"t1C38w3fJ267Gr6tdoHuQQ=="},EnterText:{value:"Введите текст...",comment:"Prompt to user when the text object is empty",version:"PgCz8azF8kkBE7eC4afWjg=="},Heading1:{value:"Заголовок 1",comment:"HTML Header 1 format for the text",version:"hnjaVlzIU3eTAQZeaBzzzA=="},Heading2:{value:"Заголовок 2",comment:"HTML Header 2 format for the text",version:"pYerzmSdfRZrsIWHcPZJrA=="},Heading3:{value:"Заголовок 3",comment:"HTML Header 2 format for the text",version:"xHJCPRmh19YJg/dKSmbuFA=="},InsertHyperlink:{value:"Вставить ссылку",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)",version:"ej9rwxwF6Vh7XrQ28DuWmQ=="},InsertImage:{value:"Вставить изображение",comment:"Label for toolbar menu option to insert an image. (tew 260205)",version:"WkGyZIiaf2vkOz3sLRe8yw=="},InsertTable:{value:"Вставить таблицу",comment:"Label for toolbar menu option to insert a table. (tew 260205)",version:"MDUMiPnfA3w0N2bSdGExNg=="},ItalicizeText:{value:"Курсив",comment:"Italicize text label in toolbar menu label. (dfk 221011)",version:"1qaKn3zXIiq9tmUO81pOmw=="},LargeText:{value:"Крупный текст",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)",version:"Ga4ivSCgHaK3NyfLFnD/hw=="},LinkTo:{value:"Ссылка на",comment:"Generic link label. (dfk 221011)",version:"+3NC9+yOccLuyYnxJrdFcQ=="},MediumText:{value:"Средний текст",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)",version:"duW4rbX+lr/NEogVsD8MfQ=="},OrderedList:{value:"Упорядоченный список",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"FddCEQTnAmH1gV8D430F/g=="},Paragraph:{value:"Абзац",comment:"Paragraph format for the text",version:"pHFeBq44ok2V7M2esInoFA=="},SetTextListStyle:{value:"Стиль списка",comment:"Set text list style label in toolbar menu label. (dfk 221011)",version:"aIB7vJ7tZ0Nddeg4AaZriQ=="},SmallText:{value:"Мелкий текст",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)",version:"KW+o3yZafqHkbzyid96v4g=="},ToggleBorders:{value:"Переключить границы",comment:"Menu option to toggle table borders",version:"X8/Cbk95LroUwE8LKSnn+A=="},URLLink:{value:"URL-ссылка",comment:"URL link label. (dfk 221011)",version:"NuOom1L7yZrPKpIzy2/XXg=="},UnderlineText:{value:"Подчеркивание",comment:"Underline text label in toolbar menu label. (dfk 221011)",version:"5ob75WGKK4whhNVPsicswQ=="},UnorderedList:{value:"Неупорядоченный список",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"GIyyLYfHs+U9DgkelqqdpA=="}},qD={AddNewColumn:{value:"Lägg till kolumn",comment:"Menu option to add column to table",version:"+vQaijK7E48vJ9H9MJsd3Q=="},AddNewRow:{value:"Lägg till rad",comment:"Menu option to add row to table",version:"o5g9uoLTxIYAznEdFR0ioA=="},AlignCenter:{value:"Centrera",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)",version:"33xAsCk52eZdrns6ESQAYQ=="},AlignLeft:{value:"Vänsterjustera",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)",version:"Xy6widnhx5lnasAS62KjOw=="},AlignRight:{value:"Högerjustera",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)",version:"uRJLJvO4eCo/vRYCoR/eCQ=="},BoldText:{value:"Fetstil",comment:"Bold text label in toolbar menu label. (dfk 221011)",version:"EmmVb6LoUIGAXaw+1ubcXg=="},ChangeTextAlignment:{value:"Textjustering",comment:"Change text alignment label in toolbar menu label. (dfk 221011)",version:"IzmYkHFKuHvhNY4z6j3BSA=="},ChangeTextSize:{value:"Textstorlek",comment:"Change text size in toolbar menu label. (dfk 221011)",version:"aEi5MBJWXKnW/bq2ny1Jzw=="},ClearFormat:{value:"Rensa format",comment:"Clear the selected text format",version:"Q2OEIvJHrH8MsE4RQNfMWQ=="},Color:{value:"Teckenfärg",comment:"Button label for color picker",version:"ZSR6BBl1PNHGAiXYyfyFOw=="},DeleteCol:{value:"Ta bort kolumn",comment:"Menu option to delete column to table",version:"KdwEyWDvorWo9POIi4ZsEg=="},DeleteRow:{value:"Ta bort rad",comment:"Menu option to delete row to table",version:"HNt6G95YEKMB64vvyDklHA=="},DeleteTable:{value:"Ta bort tabell",comment:"Menu option to delete table",version:"t1C38w3fJ267Gr6tdoHuQQ=="},EnterText:{value:"Skriv in text...",comment:"Prompt to user when the text object is empty",version:"PgCz8azF8kkBE7eC4afWjg=="},Heading1:{value:"Rubrik 1",comment:"HTML Header 1 format for the text",version:"hnjaVlzIU3eTAQZeaBzzzA=="},Heading2:{value:"Rubrik 2",comment:"HTML Header 2 format for the text",version:"pYerzmSdfRZrsIWHcPZJrA=="},Heading3:{value:"Rubrik 3",comment:"HTML Header 2 format for the text",version:"xHJCPRmh19YJg/dKSmbuFA=="},InsertHyperlink:{value:"Infoga länk",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)",version:"ej9rwxwF6Vh7XrQ28DuWmQ=="},InsertImage:{value:"Infoga bild",comment:"Label for toolbar menu option to insert an image. (tew 260205)",version:"WkGyZIiaf2vkOz3sLRe8yw=="},InsertTable:{value:"Infoga tabell",comment:"Label for toolbar menu option to insert a table. (tew 260205)",version:"MDUMiPnfA3w0N2bSdGExNg=="},ItalicizeText:{value:"Kursiv",comment:"Italicize text label in toolbar menu label. (dfk 221011)",version:"1qaKn3zXIiq9tmUO81pOmw=="},LargeText:{value:"Stor text",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)",version:"Ga4ivSCgHaK3NyfLFnD/hw=="},LinkTo:{value:"Länka till",comment:"Generic link label. (dfk 221011)",version:"+3NC9+yOccLuyYnxJrdFcQ=="},MediumText:{value:"Medelstor text",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)",version:"duW4rbX+lr/NEogVsD8MfQ=="},OrderedList:{value:"Sorterad lista",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"FddCEQTnAmH1gV8D430F/g=="},Paragraph:{value:"Stycke",comment:"Paragraph format for the text",version:"pHFeBq44ok2V7M2esInoFA=="},SetTextListStyle:{value:"Som lista",comment:"Set text list style label in toolbar menu label. (dfk 221011)",version:"aIB7vJ7tZ0Nddeg4AaZriQ=="},SmallText:{value:"Liten text",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)",version:"KW+o3yZafqHkbzyid96v4g=="},ToggleBorders:{value:"Kantlinjer på/av",comment:"Menu option to toggle table borders",version:"X8/Cbk95LroUwE8LKSnn+A=="},URLLink:{value:"URL-länk",comment:"URL link label. (dfk 221011)",version:"NuOom1L7yZrPKpIzy2/XXg=="},UnderlineText:{value:"Understrykning",comment:"Underline text label in toolbar menu label. (dfk 221011)",version:"5ob75WGKK4whhNVPsicswQ=="},UnorderedList:{value:"Osorterad lista",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"GIyyLYfHs+U9DgkelqqdpA=="}},XD={AddNewColumn:{value:"Sütun ekle",comment:"Menu option to add column to table",version:"+vQaijK7E48vJ9H9MJsd3Q=="},AddNewRow:{value:"Satır ekle",comment:"Menu option to add row to table",version:"o5g9uoLTxIYAznEdFR0ioA=="},AlignCenter:{value:"Ortaya hizala",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)",version:"33xAsCk52eZdrns6ESQAYQ=="},AlignLeft:{value:"Sola hizala",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)",version:"Xy6widnhx5lnasAS62KjOw=="},AlignRight:{value:"Sağa hizala",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)",version:"uRJLJvO4eCo/vRYCoR/eCQ=="},BoldText:{value:"Kalın",comment:"Bold text label in toolbar menu label. (dfk 221011)",version:"EmmVb6LoUIGAXaw+1ubcXg=="},ChangeTextAlignment:{value:"Metin hizalaması",comment:"Change text alignment label in toolbar menu label. (dfk 221011)",version:"IzmYkHFKuHvhNY4z6j3BSA=="},ChangeTextSize:{value:"Metin boyutu",comment:"Change text size in toolbar menu label. (dfk 221011)",version:"aEi5MBJWXKnW/bq2ny1Jzw=="},ClearFormat:{value:"Biçimi temizle",comment:"Clear the selected text format",version:"Q2OEIvJHrH8MsE4RQNfMWQ=="},Color:{value:"Yazı tipi rengi",comment:"Button label for color picker",version:"ZSR6BBl1PNHGAiXYyfyFOw=="},DeleteCol:{value:"Sütun sil",comment:"Menu option to delete column to table",version:"KdwEyWDvorWo9POIi4ZsEg=="},DeleteRow:{value:"Satır sil",comment:"Menu option to delete row to table",version:"HNt6G95YEKMB64vvyDklHA=="},DeleteTable:{value:"Tabloyu sil",comment:"Menu option to delete table",version:"t1C38w3fJ267Gr6tdoHuQQ=="},EnterText:{value:"Metin girin...",comment:"Prompt to user when the text object is empty",version:"PgCz8azF8kkBE7eC4afWjg=="},Heading1:{value:"Başlık 1",comment:"HTML Header 1 format for the text",version:"hnjaVlzIU3eTAQZeaBzzzA=="},Heading2:{value:"Başlık 2",comment:"HTML Header 2 format for the text",version:"pYerzmSdfRZrsIWHcPZJrA=="},Heading3:{value:"Başlık 3",comment:"HTML Header 2 format for the text",version:"xHJCPRmh19YJg/dKSmbuFA=="},InsertHyperlink:{value:"Bağlantı ekle",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)",version:"ej9rwxwF6Vh7XrQ28DuWmQ=="},InsertImage:{value:"Görüntü ekle",comment:"Label for toolbar menu option to insert an image. (tew 260205)",version:"WkGyZIiaf2vkOz3sLRe8yw=="},InsertTable:{value:"Tablo ekle",comment:"Label for toolbar menu option to insert a table. (tew 260205)",version:"MDUMiPnfA3w0N2bSdGExNg=="},ItalicizeText:{value:"İtalik",comment:"Italicize text label in toolbar menu label. (dfk 221011)",version:"1qaKn3zXIiq9tmUO81pOmw=="},LargeText:{value:"Büyük metin",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)",version:"Ga4ivSCgHaK3NyfLFnD/hw=="},LinkTo:{value:"Bağlantı:",comment:"Generic link label. (dfk 221011)",version:"+3NC9+yOccLuyYnxJrdFcQ=="},MediumText:{value:"Orta boy metin",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)",version:"duW4rbX+lr/NEogVsD8MfQ=="},OrderedList:{value:"Sıralı liste",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"FddCEQTnAmH1gV8D430F/g=="},Paragraph:{value:"Paragraf",comment:"Paragraph format for the text",version:"pHFeBq44ok2V7M2esInoFA=="},SetTextListStyle:{value:"Liste stili",comment:"Set text list style label in toolbar menu label. (dfk 221011)",version:"aIB7vJ7tZ0Nddeg4AaZriQ=="},SmallText:{value:"Küçük metin",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)",version:"KW+o3yZafqHkbzyid96v4g=="},ToggleBorders:{value:"Kenarlıkları değiştir",comment:"Menu option to toggle table borders",version:"X8/Cbk95LroUwE8LKSnn+A=="},URLLink:{value:"URL bağlantısı",comment:"URL link label. (dfk 221011)",version:"NuOom1L7yZrPKpIzy2/XXg=="},UnderlineText:{value:"Altını çiz",comment:"Underline text label in toolbar menu label. (dfk 221011)",version:"5ob75WGKK4whhNVPsicswQ=="},UnorderedList:{value:"Sırasız liste",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"GIyyLYfHs+U9DgkelqqdpA=="}};const QD={de:FD,es:$D,en:BD,fr:HD,it:WD,ja:KD,ko:UD,nl:GD,pl:YD,pt:VD,ru:JD,sv:qD,tr:XD,"de-de":FD,"es-es":$D,"en-us":BD,"fr-fr":HD,"it-it":WD,"ja-jp":KD,"ko-kr":UD,"nl-nl":GD,"pl-pl":YD,"pt-br":VD,"ru-ru":JD,"sv-se":qD,"tr-tr":XD,"zh-cn":{AddNewColumn:{value:"添加列",comment:"Menu option to add column to table",version:"+vQaijK7E48vJ9H9MJsd3Q=="},AddNewRow:{value:"添加行",comment:"Menu option to add row to table",version:"o5g9uoLTxIYAznEdFR0ioA=="},AlignCenter:{value:"居中对齐",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)",version:"33xAsCk52eZdrns6ESQAYQ=="},AlignLeft:{value:"靠左对齐",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)",version:"Xy6widnhx5lnasAS62KjOw=="},AlignRight:{value:"靠右对齐",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)",version:"uRJLJvO4eCo/vRYCoR/eCQ=="},BoldText:{value:"加粗",comment:"Bold text label in toolbar menu label. (dfk 221011)",version:"EmmVb6LoUIGAXaw+1ubcXg=="},ChangeTextAlignment:{value:"文本对齐",comment:"Change text alignment label in toolbar menu label. (dfk 221011)",version:"IzmYkHFKuHvhNY4z6j3BSA=="},ChangeTextSize:{value:"文本大小",comment:"Change text size in toolbar menu label. (dfk 221011)",version:"aEi5MBJWXKnW/bq2ny1Jzw=="},ClearFormat:{value:"清除格式",comment:"Clear the selected text format",version:"Q2OEIvJHrH8MsE4RQNfMWQ=="},Color:{value:"字体颜色",comment:"Button label for color picker",version:"ZSR6BBl1PNHGAiXYyfyFOw=="},DeleteCol:{value:"删除列",comment:"Menu option to delete column to table",version:"KdwEyWDvorWo9POIi4ZsEg=="},DeleteRow:{value:"删除行",comment:"Menu option to delete row to table",version:"HNt6G95YEKMB64vvyDklHA=="},DeleteTable:{value:"删除表格",comment:"Menu option to delete table",version:"t1C38w3fJ267Gr6tdoHuQQ=="},EnterText:{value:"输入一些文本...",comment:"Prompt to user when the text object is empty",version:"PgCz8azF8kkBE7eC4afWjg=="},Heading1:{value:"标题 1",comment:"HTML Header 1 format for the text",version:"hnjaVlzIU3eTAQZeaBzzzA=="},Heading2:{value:"标题 2",comment:"HTML Header 2 format for the text",version:"pYerzmSdfRZrsIWHcPZJrA=="},Heading3:{value:"标题 3",comment:"HTML Header 2 format for the text",version:"xHJCPRmh19YJg/dKSmbuFA=="},InsertHyperlink:{value:"插入链接",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)",version:"ej9rwxwF6Vh7XrQ28DuWmQ=="},InsertImage:{value:"插入图像",comment:"Label for toolbar menu option to insert an image. (tew 260205)",version:"WkGyZIiaf2vkOz3sLRe8yw=="},InsertTable:{value:"插入表格",comment:"Label for toolbar menu option to insert a table. (tew 260205)",version:"MDUMiPnfA3w0N2bSdGExNg=="},ItalicizeText:{value:"斜体",comment:"Italicize text label in toolbar menu label. (dfk 221011)",version:"1qaKn3zXIiq9tmUO81pOmw=="},LargeText:{value:"大型文本",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)",version:"Ga4ivSCgHaK3NyfLFnD/hw=="},LinkTo:{value:"链接到",comment:"Generic link label. (dfk 221011)",version:"+3NC9+yOccLuyYnxJrdFcQ=="},MediumText:{value:"中型文本",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)",version:"duW4rbX+lr/NEogVsD8MfQ=="},OrderedList:{value:"有序列表",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"FddCEQTnAmH1gV8D430F/g=="},Paragraph:{value:"段落",comment:"Paragraph format for the text",version:"pHFeBq44ok2V7M2esInoFA=="},SetTextListStyle:{value:"列表样式",comment:"Set text list style label in toolbar menu label. (dfk 221011)",version:"aIB7vJ7tZ0Nddeg4AaZriQ=="},SmallText:{value:"小型文本",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)",version:"KW+o3yZafqHkbzyid96v4g=="},ToggleBorders:{value:"切换边框",comment:"Menu option to toggle table borders",version:"X8/Cbk95LroUwE8LKSnn+A=="},URLLink:{value:"URL 链接",comment:"URL link label. (dfk 221011)",version:"NuOom1L7yZrPKpIzy2/XXg=="},UnderlineText:{value:"下划线",comment:"Underline text label in toolbar menu label. (dfk 221011)",version:"5ob75WGKK4whhNVPsicswQ=="},UnorderedList:{value:"无序列表",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"GIyyLYfHs+U9DgkelqqdpA=="}},"zh-tw":{AddNewColumn:{value:"新增欄",comment:"Menu option to add column to table",version:"+vQaijK7E48vJ9H9MJsd3Q=="},AddNewRow:{value:"新增列",comment:"Menu option to add row to table",version:"o5g9uoLTxIYAznEdFR0ioA=="},AlignCenter:{value:"置中對齊",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)",version:"33xAsCk52eZdrns6ESQAYQ=="},AlignLeft:{value:"靠左對齊",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)",version:"Xy6widnhx5lnasAS62KjOw=="},AlignRight:{value:"靠右對齊",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)",version:"uRJLJvO4eCo/vRYCoR/eCQ=="},BoldText:{value:"粗體",comment:"Bold text label in toolbar menu label. (dfk 221011)",version:"EmmVb6LoUIGAXaw+1ubcXg=="},ChangeTextAlignment:{value:"文字對齊方式",comment:"Change text alignment label in toolbar menu label. (dfk 221011)",version:"IzmYkHFKuHvhNY4z6j3BSA=="},ChangeTextSize:{value:"文字大小",comment:"Change text size in toolbar menu label. (dfk 221011)",version:"aEi5MBJWXKnW/bq2ny1Jzw=="},ClearFormat:{value:"清除格式",comment:"Clear the selected text format",version:"Q2OEIvJHrH8MsE4RQNfMWQ=="},Color:{value:"字型色彩",comment:"Button label for color picker",version:"ZSR6BBl1PNHGAiXYyfyFOw=="},DeleteCol:{value:"刪除欄",comment:"Menu option to delete column to table",version:"KdwEyWDvorWo9POIi4ZsEg=="},DeleteRow:{value:"刪除列",comment:"Menu option to delete row to table",version:"HNt6G95YEKMB64vvyDklHA=="},DeleteTable:{value:"刪除表格",comment:"Menu option to delete table",version:"t1C38w3fJ267Gr6tdoHuQQ=="},EnterText:{value:"輸入一些文字...",comment:"Prompt to user when the text object is empty",version:"PgCz8azF8kkBE7eC4afWjg=="},Heading1:{value:"標頭 1",comment:"HTML Header 1 format for the text",version:"hnjaVlzIU3eTAQZeaBzzzA=="},Heading2:{value:"標頭 2",comment:"HTML Header 2 format for the text",version:"pYerzmSdfRZrsIWHcPZJrA=="},Heading3:{value:"標頭 3",comment:"HTML Header 2 format for the text",version:"xHJCPRmh19YJg/dKSmbuFA=="},InsertHyperlink:{value:"插入連結",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)",version:"ej9rwxwF6Vh7XrQ28DuWmQ=="},InsertImage:{value:"插入影像",comment:"Label for toolbar menu option to insert an image. (tew 260205)",version:"WkGyZIiaf2vkOz3sLRe8yw=="},InsertTable:{value:"插入表格",comment:"Label for toolbar menu option to insert a table. (tew 260205)",version:"MDUMiPnfA3w0N2bSdGExNg=="},ItalicizeText:{value:"斜體字",comment:"Italicize text label in toolbar menu label. (dfk 221011)",version:"1qaKn3zXIiq9tmUO81pOmw=="},LargeText:{value:"大型文字",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)",version:"Ga4ivSCgHaK3NyfLFnD/hw=="},LinkTo:{value:"連結至",comment:"Generic link label. (dfk 221011)",version:"+3NC9+yOccLuyYnxJrdFcQ=="},MediumText:{value:"中型文字",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)",version:"duW4rbX+lr/NEogVsD8MfQ=="},OrderedList:{value:"排序清單",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"FddCEQTnAmH1gV8D430F/g=="},Paragraph:{value:"段落",comment:"Paragraph format for the text",version:"pHFeBq44ok2V7M2esInoFA=="},SetTextListStyle:{value:"清單樣式",comment:"Set text list style label in toolbar menu label. (dfk 221011)",version:"aIB7vJ7tZ0Nddeg4AaZriQ=="},SmallText:{value:"小型文字",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)",version:"KW+o3yZafqHkbzyid96v4g=="},ToggleBorders:{value:"切換框線",comment:"Menu option to toggle table borders",version:"X8/Cbk95LroUwE8LKSnn+A=="},URLLink:{value:"URL 連結",comment:"URL link label. (dfk 221011)",version:"NuOom1L7yZrPKpIzy2/XXg=="},UnderlineText:{value:"底線",comment:"Underline text label in toolbar menu label. (dfk 221011)",version:"5ob75WGKK4whhNVPsicswQ=="},UnorderedList:{value:"未排序清單",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"GIyyLYfHs+U9DgkelqqdpA=="}}};function ZD(e,t){return e.getEditorState().read(()=>{const e=Fi(t);return null!==e&&e.isSelected()})}function eF(e){const[t]=vu(),[n,r]=S(()=>ZD(t,e));w(()=>{let n=!0;const o=t.registerUpdateListener(()=>{n&&r(ZD(t,e))});return()=>{n=!1,o()}},[t,e]);return[n,M(n=>{t.update(()=>{let t=ao();Ur(t)||(t=oo(),Yi(t)),Ur(t)&&(n?t.add(e):t.delete(e))})},[t,e]),M(()=>{t.update(()=>{const e=ao();Ur(e)&&e.clear()})},[t])]}var tF,nF={};var rF=function(){if(tF)return nF;tF=1;var e={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:255,g:255,b:255,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},t=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i,n=/^rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(\d(\.\d+)?)\)$/i,r=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i,o=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i,i=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i,s=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i,a=Math.floor,l=Math.round,c=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n,r,o,i,s,c,u,d,f,p,h,g,m=0,v=0,b=0,y=1;if(this._invalid=!1,arguments[0]instanceof t)m=arguments[0]._r,v=arguments[0]._g,b=arguments[0]._b,y=arguments[0]._a,this._invalid=arguments[0]._invalid;else if(arguments.length<3)if("string"==typeof arguments[0])if(h=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(g=arguments[0]))m=parseInt(h[1],10),v=parseInt(h[2],10),b=parseInt(h[3],10);else if(h=/^argb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(g))y=parseFloat(l(h[1]/2.55)/100),m=parseInt(h[2],10),v=parseInt(h[3],10),b=parseInt(h[4],10);else if(h=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(g))m=parseInt(h[1],10),v=parseInt(h[2],10),b=parseInt(h[3],10),y=parseFloat(h[4]);else if(h=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(g))m=parseInt(h[1],16),v=parseInt(h[2],16),b=parseInt(h[3],16),y=1;else if(h=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i.exec(g))m=parseInt(h[1]+h[1],16),v=parseInt(h[2]+h[2],16),b=parseInt(h[3]+h[3],16),y=1;else if(h=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(g)){switch(n=parseFloat(h[1]),r=parseFloat(h[3]),i=parseFloat(h[5]),r=(r/=100)<0?0:r>1?1:r,u=(n=(n%=360)<0?0:n>360?360:n)/60,d=(c=(i=(i/=100)<0?0:i>1?1:i)<=.5?2*i*r:(2-2*i)*r)*(1-Math.abs(u%2-1)),f=[],u=Math.floor(u)){case 0:f=[c,d,0];break;case 1:f=[d,c,0];break;case 2:f=[0,c,d];break;case 3:f=[0,d,c];break;case 4:f=[d,0,c];break;case 5:f=[c,0,d];break;default:f=[0,0,0]}p=i-.5*c,m=f[0]+p,v=f[1]+p,b=f[2]+p,m=l(255*m),v=l(255*v),b=l(255*b),y=1}else if(h=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(g)){switch(n=parseFloat(h[1]),r=parseFloat(h[3]),i=parseFloat(h[5]),y=parseFloat(h[7]),r=(r/=100)<0?0:r>1?1:r,u=(n=(n%=360)<0?0:n>360?360:n)/60,d=(c=(i=(i/=100)<0?0:i>1?1:i)<=.5?2*i*r:(2-2*i)*r)*(1-Math.abs(u%2-1)),f=[],u=Math.floor(u)){case 0:f=[c,d,0];break;case 1:f=[d,c,0];break;case 2:f=[0,c,d];break;case 3:f=[0,d,c];break;case 4:f=[d,0,c];break;case 5:f=[c,0,d];break;default:f=[0,0,0]}p=i-.5*c,m=f[0]+p,v=f[1]+p,b=f[2]+p,m=l(255*m),v=l(255*v),b=l(255*b)}else if(h=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(g)){switch(n=parseFloat(h[1]),r=parseFloat(h[3]),s=parseFloat(h[5]),u=(n=(n%=360)<0?0:n>360?360:n)/60,d=(c=(s=(s/=100)<0?0:s>1?1:s)*(r=(r/=100)<0?0:r>1?1:r))*(1-Math.abs(u%2-1)),f=[],u=Math.floor(u)){case 0:f=[c,d,0];break;case 1:f=[d,c,0];break;case 2:f=[0,c,d];break;case 3:f=[0,d,c];break;case 4:f=[d,0,c];break;case 5:f=[c,0,d];break;default:f=[0,0,0]}p=s-c,m=f[0]+p,v=f[1]+p,b=f[2]+p,m=l(255*m),v=l(255*v),b=l(255*b),y=1}else e[g.toLowerCase()]?(o=g.toLowerCase(),m=e[o].r,v=e[o].g,b=e[o].b,y="number"==typeof e[o].a?e[o].a:1):this._invalid=!0;else"number"==typeof arguments[0]&&arguments[0]>=0&&"argb"===arguments[1]?(y=(4278190080&arguments[0])>>>24,y/=255,m=(16711680&arguments[0])>>16,v=(65280&arguments[0])>>8,b=255&arguments[0]):"number"==typeof arguments[0]&&arguments[0]>=0?(m=(16711680&arguments[0])>>16,v=(65280&arguments[0])>>8,b=255&arguments[0]):this._invalid=!0;else arguments.length>=3?(m=arguments[0],v=arguments[1],b=arguments[2],y=arguments.length>=4?arguments[3]:1):this._invalid=!0;Number.isNaN(+m+v+b+y)&&(this._invalid=!0),this._r=a(m),this._g=a(v),this._b=a(b),this._a=y,this._spaces={}}var n,r;return n=t,(r=[{key:"isInvalid",value:function(){return this._invalid}},{key:"setAlpha",value:function(e){this._a=e,this._spaces={}}},{key:"getAlpha",value:function(){return this._a}},{key:"toRGB",value:function(){return this._spaces.rgb||(this._spaces.rgb=t.toRGB(this)),this._spaces.rgb}},{key:"toRGBA",value:function(){return this._spaces.rgba||(this._spaces.rgba=t.toRGBA(this)),this._spaces.rgba}},{key:"toString",value:function(){return this._spaces.rgb||(this._spaces.rgb=t.toRGB(this)),this._spaces.rgb}},{key:"toHex",value:function(){return this._spaces.hex||(this._spaces.hex=t.toHex(this)),this._spaces.hex}},{key:"toHSL",value:function(e){return this._spaces.hsl||(this._spaces.hsl=t.toHSL(this,e)),this._spaces.hsl}},{key:"toHSLA",value:function(e){return this._spaces.hsla||(this._spaces.hsla=t.toHSLA(this,e)),this._spaces.hsla}},{key:"toHSV",value:function(){var e=this.toHSVComponents();return"hsv(".concat(e.h,",").concat(e.s,",").concat(e.v,")")}},{key:"toHSVComponents",value:function(){return this._spaces.hsvComp||(this._spaces.hsvComp=t.toHSVComponents(this)),this._spaces.hsvComp}},{key:"toNumber",value:function(){return this._spaces.num||(this._spaces.num=t.toNumber(this)),this._spaces.num}},{key:"isDark",value:function(){return this.isInvalid()||this.getLuminance()<125}},{key:"getLuminance",value:function(){return void 0===this._lumi&&(this._lumi=.299*this._r+.587*this._g+.114*this._b),this._lumi}},{key:"shiftLuminance",value:function(e){var t=this.toHSLA(),n=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(t),r=parseFloat(n[1]),o=parseFloat(n[3]),i=parseFloat(n[5]),s=parseFloat(n[7]);return i+=e,i=Math.max(0,Math.min(i,100)),"hsla(".concat(r,",").concat(o,",").concat(i,",").concat(s,")")}},{key:"isEqual",value:function(e){return e instanceof t||(e=new t(e)),this._r===e._r&&this._g===e._g&&this._b===e._b}},{key:"blend",value:function(e,t){var n=a(this._r+(e._r-this._r)*t),r=a(this._g+(e._g-this._g)*t),o=a(this._b+(e._b-this._b)*t),i=a(this._a+(e._a-this._a)*t);return"rgba(".concat([n,r,o,i].join(","),")")}},{key:"createShiftedColor",value:function(e){(void 0===e||Number.isNaN(+e))&&(e=1);var n=this.getLuminance(),r=this._g<126?1:1+this._g/512;return new t(this.shiftLuminance(20*(n*r<220?.8+1/(n+1)*4:-(.8+n/255*1))*e))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(o=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key,"string"))?o:String(o),r)}var o}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}();return c.toRGB=function(e){if(e instanceof c)return"rgb(".concat([e._r,e._g,e._b].join(","),")");"string"==typeof e&&(e=c.toNumber(e));var t=(65280&e)>>8,n=255&e;return"rgb(".concat((16711680&e)>>16,",").concat(t,",").concat(n,")")},c.toRGBA=function(e,t){if(e instanceof c)return"rgba(".concat([e._r,e._g,e._b,void 0!==t?t:e._a].join(","),")");"string"==typeof e&&(e=c.toNumber(e));var n=(65280&e)>>8,r=255&e;return"rgba(".concat((16711680&e)>>16,",").concat(n,",").concat(r,",").concat(void 0!==t?t:e._a,")")},c.toHex=function(e){var t,n,r;return e instanceof c?(t=e._r.toString(16),n=e._g.toString(16),r=e._b.toString(16),1===t.length&&(t="0".concat(t)),1===n.length&&(n="0".concat(n)),1===r.length&&(r="0".concat(r)),"#".concat([t,n,r].join(""))):("string"==typeof e&&(e=c.toNumber(e)),t=((16711680&e)>>16).toString(16),n=((65280&e)>>8).toString(16),r=(255&e).toString(16),1===t.length&&(t="0".concat(t)),1===n.length&&(n="0".concat(n)),1===r.length&&(r="0".concat(r)),"#".concat(t).concat(n).concat(r))},c.toHSL=function(e,t){var n,r,o,i=0;"string"==typeof e&&(e=new c(e));var s=e._r/255,a=e._g/255,l=e._b/255,u=Math.max(s,a,l),d=Math.min(s,a,l);if(r=t?.21*s+.72*a+.07*l:(u+d)/2,u===d)n=0,i=0;else{switch(o=u-d,n=r>.5?o/(2-u-d):o/(u+d),u){case s:i=(a-l)/o+(a<l?6:0);break;case a:i=(l-s)/o+2;break;case l:i=(s-a)/o+4}i/=6}return"hsl(".concat(360*i,",").concat(100*n,",").concat(100*r,")")},c.toHSLA=function(e,t){var n,r,o,i=0;"string"==typeof e&&(e=new c(e));var s=e._r/255,a=e._g/255,l=e._b/255,u=e._a,d=Math.max(s,a,l),f=Math.min(s,a,l);if(r=t?.21*s+.72*a+.07*l:(d+f)/2,d===f)n=0,i=0;else{switch(o=d-f,n=r>.5?o/(2-d-f):o/(d+f),d){case s:i=(a-l)/o+(a<l?6:0);break;case a:i=(l-s)/o+2;break;case l:i=(s-a)/o+4}i/=6}return"hsla(".concat(360*i,",").concat(100*n,",").concat(100*r,",").concat(u,")")},c.toHSVComponents=function(e){var t,n,r=0;"string"==typeof e&&(e=new c(e));var o=e._r/255,i=e._g/255,s=e._b/255,a=Math.max(o,i,s),l=Math.min(o,i,s),u=a;if(a===l)t=0,r=0;else{switch(t=0===(n=a-l)?0:n/u,a){case o:r=(i-s)/n+(i<s?6:0);break;case i:r=(s-o)/n+2;break;case s:r=(o-i)/n+4}r/=6}return{h:360*r%360,s:100*t,v:100*u}},c.toNumber=function(){if(1===arguments.length&&arguments[0]instanceof c)return(arguments[0]._r<<16)+(arguments[0]._g<<8)+arguments[0]._b;var e,t,n=0,r=0,o=0;return 1===arguments.length&&"string"==typeof arguments[0]&&((e=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i.exec(t=arguments[0]))?(n=parseInt(e[1],10),r=parseInt(e[2],10),o=parseInt(e[3],10)):(e=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(t))?(n=parseInt(e[1],16),r=parseInt(e[2],16),o=parseInt(e[3],16)):(e=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i.exec(t))&&(n=parseInt(e[1]+e[1],16),r=parseInt(e[2]+e[2],16),o=parseInt(e[3]+e[3],16))),(n<<16)+(r<<8)+o},c.blend=function(e,t,n){var r=(16711680&(e=c.toNumber(e)))>>16,o=(65280&e)>>8,i=255&e;return(r+(((16711680&(t=c.toNumber(t)))>>16)-r)*n<<16)+(o+(((65280&t)>>8)-o)*n<<8)+(i+((255&t)-i)*n)},c.getBlend=function(e,t,n){var r=e._r+(t._r-e._r)*n,o=e._g+(t._g-e._g)*n,i=e._b+(t._b-e._b)*n,s=e._a+(t._a-e._a)*n;return new c(r,o,i,s)},c.isCSSColor=function(a){return!(arguments.length>1||"string"!=typeof a)&&(t.test(a)||n.test(a)||r.test(a)||o.test(a)||i.test(a)||s.test(a)||e[a.toLowerCase()])},c.getBestContrast=function(e,t,n){var r=e.getLuminance();return Math.abs(r-t.getLuminance())>Math.abs(r-n.getLuminance())?t:n},c.getContrast=function(e,t){if(e&&t){var n=e.getLuminance()/100,r=t.getLuminance()/100;return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}},c.isDark=function(){var e={getLuminance:c.prototype.getLuminance,isInvalid:c.prototype.isInvalid};return c.prototype.init.apply(e,[].slice.call(arguments)),c.prototype.isDark.call(e)},c.useDarkLabel=function(e,t){return e._a>.5?!e.isDark():!t},nF.Color=c,nF}();function oF(e){return{fontWeight:e.fontWeight,fontStyle:e.fontStyle,textDecoration:e.textDecoration,color:e.color,fontSize:e.fontSize,fontFamily:e.fontFamily}}function iF(e,t){return t?.getNodes().some(t=>t.getKey()===e)}var sF,aF;var lF=function(){if(aF)return sF;aF=1;var e={};function t(){t.init.call(this)}return e.isObject=function(e){return"object"==typeof e&&null!==e},e.isNumber=function(e){return"number"==typeof e},e.isUndefined=function(e){return void 0===e},e.isFunction=function(e){return"function"==typeof e},sF=t,t.EventEmitter=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},t.prototype.setMaxListeners=function(t){if(!e.isNumber(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},t.prototype.emit=function(t){var n,r,o,i,s,a;if(this._events||(this._events={}),"error"===t&&!this._events.error)throw(n=arguments[1])instanceof Error?n:Error('Uncaught, unspecified "error" event.');if(r=this._events[t],e.isUndefined(r))return!1;if(e.isFunction(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(o=arguments.length,i=new Array(o-1),s=1;s<o;s++)i[s-1]=arguments[s];r.apply(this,i)}else if(e.isObject(r)){for(o=arguments.length,i=new Array(o-1),s=1;s<o;s++)i[s-1]=arguments[s];for(o=(a=r.slice()).length,s=0;s<o;s++)a[s].apply(this,i)}return!0},t.prototype.addListener=function(n,r){var o;if(!e.isFunction(r))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",n,e.isFunction(r.listener)?r.listener:r),this._events[n]?e.isObject(this._events[n])?this._events[n].push(r):this._events[n]=[this._events[n],r]:this._events[n]=r,e.isObject(this._events[n])&&!this._events[n].warned)&&((o=e.isUndefined(this._maxListeners)?t.defaultMaxListeners:this._maxListeners)&&o>0&&this._events[n].length>o&&(this._events[n].warned=!0,e.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[n].length),e.isFunction(console.trace)&&console.trace()));return this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(t,n){if(!e.isFunction(n))throw TypeError("listener must be a function");var r=!1;function o(){this.removeListener(t,o),r||(r=!0,n.apply(this,arguments))}return o.listener=n,this.on(t,o),this},t.prototype.removeListener=function(t,n){var r,o,i,s;if(!e.isFunction(n))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(i=(r=this._events[t]).length,o=-1,r===n||e.isFunction(r.listener)&&r.listener===n)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,n);else if(e.isObject(r)){for(s=i;s-- >0;)if(r[s]===n||r[s].listener&&r[s].listener===n){o=s;break}if(o<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(o,1),this._events.removeListener&&this.emit("removeListener",t,n)}return this},t.prototype.removeAllListeners=function(t){var n,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(n in this._events)"removeListener"!==n&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],e.isFunction(r))this.removeListener(t,r);else if(Array.isArray(r))for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},t.prototype.listeners=function(t){return this._events&&this._events[t]?e.isFunction(this._events[t])?[this._events[t]]:this._events[t].slice():[]},t.listenerCount=function(t,n){return t._events&&t._events[n]?e.isFunction(t._events[n])?1:t._events[n].length:0},sF}();let cF=[];const uF=new lF.EventEmitter;uF.isSelected=e=>{const t=e?.qDef?.cId;return-1!==cF.indexOf(t)},uF.setSelected=e=>{cF!==e&&(cF=e,uF.emit("change"))};function dF({cId:e,initStyle:t,nodeKey:n}){const{layout:r,theme:o,flags:i}=b(H),[s]=vu(),a=wd(),[l,c,u]=eF(n),d=k(null),[f,p]=S(t);w(()=>{p(t)},[t]);const h=x(()=>{let e;return l?e="rgba(0, 152, 69, 0.25)":a&&(e="rgba(0, 0, 0, 0.075)"),{backgroundColor:e}},[l,a]),g=x(()=>r&&o?function(e,t){const{qHyperCube:n}=t;if(n){const t=n.qMeasureInfo?.findIndex(t=>t.cId===e);if(void 0!==t&&-1!==t){const e=n?.qDataPages?.[0]?.qMatrix?.[0][t];if(1===e?.qAttrExps?.qValues?.length){const t=e.qAttrExps.qValues[0]?.qText;if(t){const n=new rF.Color(t);return{value:e?.qText||"",expressionColor:n.toHex()}}}return{value:e?.qText||""}}}return{value:""}}(e,r):{value:""},[r,e,o]);w(()=>Ka(s.registerCommand(Bt,e=>(s.update(()=>{const t=e,r=ao();if(Wr(r)&&l){if(iF(n,r)){const e=((e,t)=>{const n={};switch(e){case"bold":n.fontWeight=t;break;case"italic":n.fontStyle=t;break;case"underline":n.textDecoration=t}return n})(t,r.hasFormat(t)?t:"");p(t=>({...t,...e}))}}else if(l&&Ur(r)&&iF(n,r)&&d.current){const e=oF(d.current.style);p(((e,t)=>{const n={};switch(e){case"bold":t.fontWeight?"bold"===t.fontWeight&&(n.fontWeight=""):n.fontWeight="bold";break;case"italic":n.fontStyle="italic"===t.fontStyle?"":"italic";break;case"underline":n.textDecoration="underline"===t.textDecoration?"":"underline"}return{...t,...n}})(t,e))}}),!1),3),s.registerCommand(nD,e=>(s.getEditorState().read(()=>{if("color"===e.styleKey&&g.expressionColor)return!1;if(d.current&&l){const t=ao();if(iF(n,t)){const t=oF(d.current?.style);t[e.styleKey]=e.styleValue,p(t)}}}),!1),ci),s.registerCommand(rD,()=>(s.getEditorState().read(()=>{if(d.current&&l){const e=ao();if(iF(n,e)){const e={};g.expressionColor&&(e.color=g.expressionColor),p(e)}}}),!1),ci),s.registerCommand(Ct,()=>(i?.isEnabled("GV_661_SN_TEXT_REMOVE_ICON_ANALYSIS_MODE")&&s.update(()=>{const e=[],t=ao(),n=t?.getNodes();n?.forEach(t=>{t?.getExpressionId&&e.push(t?.getExpressionId())}),uF.setSelected(e)}),!1),1)),[s,c,u,l,n,g]),w(()=>{a||(u(),i?.isEnabled("GV_661_SN_TEXT_REMOVE_ICON_ANALYSIS_MODE")&&uF.setSelected([]))},[a,u,i]),w(()=>{s.update(()=>{!function(e,t){const n=Fi(e);n&&"setFormatStyle"in n&&"function"==typeof n.setFormatStyle&&n.setFormatStyle(t)}(n,f)})},[f,s,n]);const m=M(e=>{if(a){const t=e.currentTarget.getBoundingClientRect(),r=e.clientX-t.left;r>3?(e.preventDefault(),e.stopPropagation(),u(),c(!0)):r<t.width&&s.update(()=>{const e=ao();if(Ur(e)){const t=Fi(n);t?.selectPrevious(),e.delete(n)}})}},[a,u,c,s,n]);return wu.jsx("span",{style:{...h,...f,color:g.expressionColor?g.expressionColor:f.color},onClick:m,ref:d,id:e,children:g.value})}const fF="qlik.expression.node";class pF extends bj{static getType(){return fF}static clone(e){return new pF(e.__expressionId,e.__formatStyle,e.__key)}static importJSON(e){const t=function(e,t){return new pF(e,t)}(e.expressionId,e.formatStyle);return t}getExpressionId(){return this.__expressionId}exportJSON(){return{expressionId:this.getExpressionId(),formatStyle:this.__formatStyle,type:fF,version:1}}setExported(){this.getWritable().__exported=!0}constructor(e,t,n){super(t,n),this.__expressionId=e}createDOM(){return document.createElement("span")}exportDOM(e){return super.exportDOM(e)}updateDOM(){return!1}decorate(){return wu.jsx(dF,{cId:this.__expressionId,initStyle:this.__formatStyle,nodeKey:this.__key})}isInline(){return!0}isKeyboardSelectable(){return!0}}function hF(e){return e instanceof pF}const gF="ImageNode",mF=kt("INSERT_IMAGE_COMMAND"),vF=()=>{const e={getChar(e){let t,n=e;return n>9?(t=65+n-10,t>90&&(t+=6)):n=`${n}`.charCodeAt(0),!t||[48,111,79,105,73,108].indexOf(t)>-1?this.getChar(n+1):String.fromCharCode(t)},base62(e){const t=this.getChar(e%62),n=Math.floor(e/62);return n>0?this.base62(n)+t:t},id(){return this.base62(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};return e.id()},bF=(e,t=new Set,n=new Set)=>{const r=e;if(r.type===gF)r.id||(r.id=vF()),t.add(r.id),r.tempUrlDef&&(n.add({id:r.id,url:{qStaticContentUrlDef:{qUrl:r.tempUrlDef}}}),delete r.tempUrl,delete r.tempUrlDef);else if("children"in r&&Array.isArray(r.children))for(const e of r.children)bF(e,t,n);return{imageIds:t,newPropertyImages:n}},yF=(e,t)=>e?.images?.find(e=>e.id===t)?.url.qStaticContentUrl.qUrl||"";async function xF(e,t,n){try{const r=await t.getProperties();if(r.text=JSON.stringify(e),n?.isEnabled("TLV_801_SN_TEXT_IMAGE_SUPPORT")){const{images:t,jsonData:n}=((e,t)=>{const n=e,r=t.images||[];let o=new Set;if(n.root){const e=bF(n.root);o=e.imageIds,e.newPropertyImages.forEach(e=>{r.push(e)})}const i=[],s=new Set;return r.forEach(e=>{o.has(e.id)&&!s.has(e.id)&&(s.add(e.id),i.push(e))}),{images:i,jsonData:n}})(e,r);r.images=t,r.text=JSON.stringify(n)}await t.setProperties(r)}catch(e){console.error(e)}}function _F(){const[e]=vu(),t=wd(),{edit:n,model:r,emitter:o,flags:i}=b(H);return w(()=>{const t=()=>{r&&xF(e.getEditorState().toJSON(),r,i)},n=t=>{const n=e.parseEditorState(t);t!==JSON.stringify(e.getEditorState().toJSON())&&e.setEditorState(n)};return o?.on("saveDocument",t),o?.on("reloadData",n),()=>{o?.removeListener("saveDocument",t),o?.removeListener("reloadData",n)}},[o,r]),w(()=>{e.setEditable(n)},[n]),w(()=>{t&&e.focus()},[t,e]),null}class wF{constructor(){this.nodeStore=new Map,this.pendingDeletes=[]}update(e,t){if("updated"===t||"created"===t){const n=Fi(e);if(hF(n)&&(this.nodeStore.set(e,n),"created"===t)){const e=this.pendingDeletes.findIndex(e=>n.getExpressionId()===e);-1!==e&&this.pendingDeletes.splice(e,1)}}else if("destroyed"===t){const t=this.nodeStore.get(e);t&&(this.pendingDeletes.push(t.getExpressionId()),this.nodeStore.delete(e))}}sync(){const e=this.pendingDeletes;return this.pendingDeletes=[],e}}function SF(){const{layout:e,emitter:t}=b(H),[n]=vu(),r=k(new wF),o=wd();return w(()=>{const e=n.registerMutationListener(pF,e=>{n.getEditorState().read(()=>{for(const[t,n]of e)r.current.update(t,n)})});return()=>{e()}},[n]),w(()=>{e&&n.update(()=>{const t=e,n=t.qHyperCube?.qMeasureInfo;if(n){const e=us(pF),t=((e,t)=>{const n=e.reduce((e,n)=>{const r=t.find(e=>e.cId===n.getExpressionId());return r||e.push(n),e},[]);return n})(e,n);if(t.forEach(e=>{e.remove()}),n.length>e.length){const e=ao(),{cId:t}=n[n.length-1],r=new pF(t,{}),o=Nr(" "),i=Nr("");Wr(e)?e.insertNodes([i,r,o]):ml(r)}}})},[e,n]),w(()=>n.registerCommand(Wt,e=>("Backspace"===e.key&&n.update(()=>{const e=ao();Ur(e)&&e.getNodes().forEach(e=>{hF(e)&&(e.selectPrevious(),e.remove())})}),!1),1),[n]),w(()=>{if(!o){const e=r.current.sync();e.length>0&&t?.emit("onNodeDestroyed",e)}},[o,t]),null}const kF=/"/g;function CF(){const{model:e,emitter:t}=b(H),[n]=vu(),r=k(new Map);return w(()=>{const o=n.registerMutationListener(Sr,e=>{e.forEach((e,t)=>{if("destroyed"===e)r.current.delete(t);else{const e=n.getElementByKey(t)?.style.fontFamily;e&&r.current.set(t,e)}})});async function i(){if(e){!async function(e,t){try{const n=await t.getProperties();n.fontsUsed=e,await t.setProperties(n)}catch(e){console.error(e)}}(Array.from(new Set(r.current.values())).map(e=>e.replace(kF,"")),e)}}return t?.on("saveDocument",i),()=>{t?.removeListener("saveDocument",i),o()}},[n,t,e]),null}function EF(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var TF,AF="top",LF="top-right",MF="right",RF="bottom-right",NF="bottom",OF="bottom-left",PF="left",IF="top-left";EF(EF(EF(EF(EF(EF(EF(EF(EF(EF(TF={},"equal-equal",[AF,NF]),"equal-higher",[NF,RF]),"equal-lower",[AF,LF]),"equal-void",[AF,NF]),"higher-equal",[PF,OF,AF,LF]),"higher-higher-acute",[NF,OF,PF,LF]),"higher-higher-obtuse",[NF,AF]),"higher-lower-negative",[AF,LF,MF]),"higher-lower-positive",[NF,OF,PF]),"higher-void",[AF]),EF(EF(EF(EF(EF(EF(EF(EF(EF(EF(TF,"lower-equal",[AF]),"lower-higher-negative",[AF,IF]),"lower-higher-positive",[RF]),"lower-lower-acute",[AF,IF,PF,LF,MF]),"lower-lower-obtuse",[AF,NF]),"lower-void",[AF]),"void-equal",[AF]),"void-higher",[AF,NF]),"void-lower",[AF,NF,PF]),"void-void",[AF]),EF(TF,"unclassified",[AF,NF,MF,PF,LF,RF,OF,IF]);var zF,jF,DF=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],FF=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];var BF=function(){if(jF)return zF;jF=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),i=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!i)return!1;for(r in n);return void 0===r||e.call(n,r)},s=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},a=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return zF=function e(){var t,n,r,l,c,u,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=a(d,n),d!==(l=a(t,n))&&(h&&l&&(i(l)||(c=o(l)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},s(d,{name:n,newValue:e(h,u,l)})):void 0!==l&&s(d,{name:n,newValue:l}));return d},zF}();function $F(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function HF(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function WF(){}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}(BF);var KF=1/.7,UF="\\s*([+-]?\\d+)\\s*",GF="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",YF="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",VF=/^#([0-9a-f]{3,8})$/,JF=new RegExp(`^rgb\\(${UF},${UF},${UF}\\)$`),qF=new RegExp(`^rgb\\(${YF},${YF},${YF}\\)$`),XF=new RegExp(`^rgba\\(${UF},${UF},${UF},${GF}\\)$`),QF=new RegExp(`^rgba\\(${YF},${YF},${YF},${GF}\\)$`),ZF=new RegExp(`^hsl\\(${GF},${YF},${YF}\\)$`),eB=new RegExp(`^hsla\\(${GF},${YF},${YF},${GF}\\)$`),tB={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function nB(){return this.rgb().formatHex()}function rB(){return this.rgb().formatRgb()}function oB(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=VF.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?iB(t):3===n?new cB(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?sB(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?sB(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=JF.exec(e))?new cB(t[1],t[2],t[3],1):(t=qF.exec(e))?new cB(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=XF.exec(e))?sB(t[1],t[2],t[3],t[4]):(t=QF.exec(e))?sB(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=ZF.exec(e))?gB(t[1],t[2]/100,t[3]/100,1):(t=eB.exec(e))?gB(t[1],t[2]/100,t[3]/100,t[4]):tB.hasOwnProperty(e)?iB(tB[e]):"transparent"===e?new cB(NaN,NaN,NaN,0):null}function iB(e){return new cB(e>>16&255,e>>8&255,255&e,1)}function sB(e,t,n,r){return r<=0&&(e=t=n=NaN),new cB(e,t,n,r)}function aB(e){return e instanceof WF||(e=oB(e)),e?new cB((e=e.rgb()).r,e.g,e.b,e.opacity):new cB}function lB(e,t,n,r){return 1===arguments.length?aB(e):new cB(e,t,n,null==r?1:r)}function cB(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function uB(){return`#${hB(this.r)}${hB(this.g)}${hB(this.b)}`}function dB(){const e=fB(this.opacity);return`${1===e?"rgb(":"rgba("}${pB(this.r)}, ${pB(this.g)}, ${pB(this.b)}${1===e?")":`, ${e})`}`}function fB(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function pB(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function hB(e){return((e=pB(e))<16?"0":"")+e.toString(16)}function gB(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new vB(e,t,n,r)}function mB(e){if(e instanceof vB)return new vB(e.h,e.s,e.l,e.opacity);if(e instanceof WF||(e=oB(e)),!e)return new vB;if(e instanceof vB)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,a=i-o,l=(i+o)/2;return a?(s=t===i?(n-r)/a+6*(n<r):n===i?(r-t)/a+2:(t-n)/a+4,a/=l<.5?i+o:2-i-o,s*=60):a=l>0&&l<1?0:s,new vB(s,a,l,e.opacity)}function vB(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function bB(e){return(e=(e||0)%360)<0?e+360:e}function yB(e){return Math.max(0,Math.min(1,e||0))}function xB(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}$F(WF,oB,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:nB,formatHex:nB,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return mB(this).formatHsl()},formatRgb:rB,toString:rB}),$F(cB,lB,HF(WF,{brighter(e){return e=null==e?KF:Math.pow(KF,e),new cB(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new cB(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new cB(pB(this.r),pB(this.g),pB(this.b),fB(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:uB,formatHex:uB,formatHex8:function(){return`#${hB(this.r)}${hB(this.g)}${hB(this.b)}${hB(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:dB,toString:dB})),$F(vB,function(e,t,n,r){return 1===arguments.length?mB(e):new vB(e,t,n,null==r?1:r)},HF(WF,{brighter(e){return e=null==e?KF:Math.pow(KF,e),new vB(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new vB(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new cB(xB(e>=240?e-240:e+120,o,r),xB(e,o,r),xB(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new vB(bB(this.h),yB(this.s),yB(this.l),fB(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=fB(this.opacity);return`${1===e?"hsl(":"hsla("}${bB(this.h)}, ${100*yB(this.s)}%, ${100*yB(this.l)}%${1===e?")":`, ${e})`}`}}));const _B=Math.PI/180,wB=180/Math.PI,SB=4/29,kB=6/29,CB=3*kB*kB;function EB(e){if(e instanceof TB)return new TB(e.l,e.a,e.b,e.opacity);if(e instanceof NB)return OB(e);e instanceof cB||(e=aB(e));var t,n,r=RB(e.r),o=RB(e.g),i=RB(e.b),s=AB((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=s:(t=AB((.4360747*r+.3850649*o+.1430804*i)/.96422),n=AB((.0139322*r+.0971045*o+.7141733*i)/.82521)),new TB(116*s-16,500*(t-s),200*(s-n),e.opacity)}function TB(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function AB(e){return e>.008856451679035631?Math.pow(e,1/3):e/CB+SB}function LB(e){return e>kB?e*e*e:CB*(e-SB)}function MB(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function RB(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function NB(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function OB(e){if(isNaN(e.h))return new TB(e.l,0,0,e.opacity);var t=e.h*_B;return new TB(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}$F(TB,function(e,t,n,r){return 1===arguments.length?EB(e):new TB(e,t,n,null==r?1:r)},HF(WF,{brighter(e){return new TB(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new TB(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new cB(MB(3.1338561*(t=.96422*LB(t))-1.6168667*(e=1*LB(e))-.4906146*(n=.82521*LB(n))),MB(-.9787684*t+1.9161415*e+.033454*n),MB(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),$F(NB,function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof NB)return new NB(e.h,e.c,e.l,e.opacity);if(e instanceof TB||(e=EB(e)),0===e.a&&0===e.b)return new NB(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*wB;return new NB(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new NB(e,t,n,null==r?1:r)},HF(WF,{brighter(e){return new NB(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new NB(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return OB(this).rgb()}}));var PB=e=>()=>e;function IB(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):PB(isNaN(e)?t:e)}!function e(t){var n=function(e){return 1==(e=+e)?IB:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):PB(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=lB(e)).r,(t=lB(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),s=IB(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=s(t),e+""}}return r.gamma=e,r}(1);var zB,jB="center",DB="bottom";function FB(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function BB(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=HB)):void 0===t&&(t=$B);for(var n,r,o,i,s,a=new UB(e),l=[a];n=l.pop();)if((o=t(n.data))&&(s=(o=Array.from(o)).length))for(n.children=o,i=s-1;i>=0;--i)l.push(r=o[i]=new UB(o[i])),r.parent=n,r.depth=n.depth+1;return a.eachBefore(KB)}function $B(e){return e.children}function HB(e){return Array.isArray(e)?e[1]:null}function WB(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function KB(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function UB(e){this.data=e,this.depth=this.height=0,this.parent=null}[{key:"NoDataExist",alignment:jB,condition:function(e){var t=e.layoutService;if(!t)return!1;var n=t.meta.size;return n.x*n.y==0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:jB,condition:function(e){var t=e.layoutService;return!!t&&t.getHyperCubeValue("qMeasureInfo").every(function(e){return"NaN"===e.qMin&&"NaN"===e.qMax})}},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:jB,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var n=t.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:jB},{key:"DataRangeIncludingZero",alignment:DB},{key:"LimitedData",alignment:DB},{key:"NegativeOrZeroValues",alignment:DB}].reduce(function(e,t){return e[t.key]=t,e},{}),UB.prototype=BB.prototype={constructor:UB,count:function(){return this.eachAfter(FB)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,o,i=this,s=[i],a=[],l=-1;i=s.pop();)if(a.push(i),n=i.children)for(r=0,o=n.length;r<o;++r)s.push(n[r]);for(;i=a.pop();)e.call(t,i,++l,this);return this},eachBefore:function(e,t){for(var n,r,o=this,i=[o],s=-1;o=i.pop();)if(e.call(t,o,++s,this),n=o.children)for(r=n.length-1;r>=0;--r)i.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,o=r&&r.length;--o>=0;)n+=r[o].value;t.value=n})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),o=null;for(e=n.pop(),t=r.pop();e===t;)o=e,e=n.pop(),t=r.pop();return o}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var o=r.length;e!==n;)r.splice(o,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function(){return BB(this).eachBefore(WB)},[Symbol.iterator]:function*(){var e,t,n,r,o=this,i=[o];do{for(e=i.reverse(),i=[];o=e.pop();)if(yield o,t=o.children)for(n=0,r=t.length;n<r;++n)i.push(t[n])}while(i.length)}},zB=function(e){
99
+ */function iM(){if(tM)return HE;tM=1,Object.defineProperty(HE,"__esModule",{value:!0}),HE.default=function(t){return(0,e.createStyles)(t)};var e=oM;return HE}var sM,aM,lM={},cM={};function uM(){if(sM)return cM;sM=1;var e=nb();Object.defineProperty(cM,"__esModule",{value:!0}),cM.default=void 0;var t=(0,e(DE()).default)();return cM.default=t,cM}function dM(){if(aM)return lM;aM=1;var e=nb();Object.defineProperty(lM,"__esModule",{value:!0}),lM.default=void 0;var t=e(Ob()),n=oM,r=e(uM());var o=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,n.makeStyles)(e,(0,t.default)({defaultTheme:r.default},o))};return lM.default=o,lM}var fM,pM,hM={},gM={};function mM(){if(fM)return gM;fM=1;var e=nb();Object.defineProperty(gM,"__esModule",{value:!0}),gM.isUnitless=function(e){return String(parseFloat(e)).length===String(e).length},gM.getUnit=n,gM.toUnitless=r,gM.convertLength=function(e){return function(t,o){var i=n(t);if(i===o)return t;var s=r(t);if("px"!==i)if("em"===i)s=r(t)*r(e);else if("rem"===i)return s=r(t)*r(e),t;var a=s;if("px"!==o)if("em"===o)a=s/r(e);else{if("rem"!==o)return t;a=s/r(e)}return parseFloat(a.toFixed(5))+o}},gM.alignProperty=function(e){var t=e.size,n=e.grid,r=t-t%n,o=r+n;return t-r<o-t?r:o},gM.fontGrid=function(e){var t=e.lineHeight,n=e.pixels,r=e.htmlFontSize;return n/(t*r)},gM.responsiveProperty=function(e){var n=e.cssProperty,r=e.min,o=e.max,i=e.unit,s=void 0===i?"rem":i,a=e.breakpoints,l=void 0===a?[600,960,1280]:a,c=e.transform,u=void 0===c?null:c,d=(0,t.default)({},n,"".concat(r).concat(s)),f=(o-r)/l[l.length-1];return l.forEach(function(e){var o=r+f*e;null!==u&&(o=u(o)),d["@media (min-width:".concat(e,"px)")]=(0,t.default)({},n,"".concat(Math.round(1e4*o)/1e4).concat(s))}),d};var t=e(ek());function n(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function r(e){return parseFloat(e)}return gM}function vM(){if(pM)return hM;pM=1;var e=nb();Object.defineProperty(hM,"__esModule",{value:!0}),hM.default=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.breakpoints,s=void 0===i?["sm","md","lg"]:i,a=o.disableAlign,l=void 0!==a&&a,c=o.factor,u=void 0===c?2:c,d=o.variants,f=void 0===d?["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]:d,p=(0,t.default)({},e);p.typography=(0,t.default)({},p.typography);var h=p.typography,g=(0,r.convertLength)(h.htmlFontSize),m=s.map(function(e){return p.breakpoints.values[e]});return f.forEach(function(e){var o=h[e],i=parseFloat(g(o.fontSize,"rem"));if(!(i<=1)){var s=i,a=1+(s-1)/u,c=o.lineHeight;if(!(0,r.isUnitless)(c)&&!l)throw new Error((0,n.formatMuiErrorMessage)(6));(0,r.isUnitless)(c)||(c=parseFloat(g(c,"rem"))/parseFloat(i));var d=null;l||(d=function(e){return(0,r.alignProperty)({size:e,grid:(0,r.fontGrid)({pixels:4,lineHeight:c,htmlFontSize:h.htmlFontSize})})}),h[e]=(0,t.default)({},o,(0,r.responsiveProperty)({cssProperty:"fontSize",min:a,max:s,unit:"rem",breakpoints:m,transform:d}))}}),p};var t=e(Ob()),n=WS,r=mM();return hM}var bM,yM={};function xM(){if(bM)return yM;bM=1;var e=nb();Object.defineProperty(yM,"__esModule",{value:!0}),yM.default=void 0;var t=e(Ob()),n=oM,r=e(uM()),o=function(e){var o=(0,n.styled)(e);return function(e,n){return o(e,(0,t.default)({defaultTheme:r.default},n))}};return yM.default=o,yM}var _M,wM={};function SM(){if(_M)return wM;_M=1;var e=nb();Object.defineProperty(wM,"__esModule",{value:!0}),wM.default=function(){return(0,t.useTheme)()||n.default};var t=oM;e(y);var n=e(uM());return wM}var kM,CM={};function EM(){if(kM)return CM;kM=1;var e=nb();Object.defineProperty(CM,"__esModule",{value:!0}),CM.default=void 0;var t=e(Ob()),n=oM,r=e(uM());var o=function(e,o){return(0,n.withStyles)(e,(0,t.default)({defaultTheme:r.default},o))};return CM.default=o,CM}var TM,AM,LM={};function MM(){if(TM)return LM;TM=1;var e=nb();Object.defineProperty(LM,"__esModule",{value:!0}),LM.default=void 0;var t=oM,n=e(uM()),r=(0,t.withThemeCreator)({defaultTheme:n.default});return LM.default=r,LM}function RM(){return AM||(AM=1,function(e){var t=nb(),n=(xS||(xS=1,function(e){var t=kS().default;function n(r,o){if("function"==typeof WeakMap)var i=new WeakMap,s=new WeakMap;return(e.exports=n=function(e,n){if(!n&&e&&e.__esModule)return e;var r,o,a={__proto__:null,default:e};if(null===e||"object"!=t(e)&&"function"!=typeof e)return a;if(r=n?s:i){if(r.has(e))return r.get(e);r.set(e,a)}for(var l in e)"default"!==l&&{}.hasOwnProperty.call(e,l)&&((o=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,l))&&(o.get||o.set)?r(a,l,o):a[l]=e[l]);return a},e.exports.__esModule=!0,e.exports.default=e.exports)(r,o)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(wS)),wS.exports);Object.defineProperty(e,"__esModule",{value:!0});var r={createTheme:!0,createMuiTheme:!0,unstable_createMuiStrictModeTheme:!0,createStyles:!0,makeStyles:!0,responsiveFontSizes:!0,styled:!0,useTheme:!0,withStyles:!0,withTheme:!0,createGenerateClassName:!0,jssPreset:!0,ServerStyleSheets:!0,StylesProvider:!0,MuiThemeProvider:!0,ThemeProvider:!0};Object.defineProperty(e,"createTheme",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"createMuiTheme",{enumerable:!0,get:function(){return i.createMuiTheme}}),Object.defineProperty(e,"unstable_createMuiStrictModeTheme",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"createStyles",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"makeStyles",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"responsiveFontSizes",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"styled",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"useTheme",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"withStyles",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"withTheme",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"createGenerateClassName",{enumerable:!0,get:function(){return g.createGenerateClassName}}),Object.defineProperty(e,"jssPreset",{enumerable:!0,get:function(){return g.jssPreset}}),Object.defineProperty(e,"ServerStyleSheets",{enumerable:!0,get:function(){return g.ServerStyleSheets}}),Object.defineProperty(e,"StylesProvider",{enumerable:!0,get:function(){return g.StylesProvider}}),Object.defineProperty(e,"MuiThemeProvider",{enumerable:!0,get:function(){return g.ThemeProvider}}),Object.defineProperty(e,"ThemeProvider",{enumerable:!0,get:function(){return g.ThemeProvider}});var o=KS();Object.keys(o).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))});var i=n(DE()),s=t($E()),a=t(iM()),l=t(dM()),c=t(vM()),u=t(xM()),d=OE();Object.keys(d).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return d[t]}}))});var f=t(SM()),p=t(EM()),h=t(MM()),g=oM}(_S)),_S}var NM=RM();NM.alpha(Jw.GREYSCALE_0,.05),NM.alpha(Jw.GREEN_PALE,.5),NM.alpha(Jw.BLUE_PALE,.5),NM.alpha(Jw.GREEN_PALE,.5),NM.alpha(Jw.BLUE_PALE,.5),NM.alpha(Jw.GREEN_PALE,.5),NM.alpha(Jw.BLUE_PALE,.5),NM.alpha(Jw.GREEN_PALE,.5),NM.alpha(Jw.BLUE_PALE,.5),NM.alpha(Jw.GREEN_PALE,.5),NM.alpha(Jw.BLUE_PALE,.5);const OM=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:wu.jsx("path",{d:"m7.999 9.001-2.858-2.86a.2.2 0 0 0-.282 0l-.718.719a.2.2 0 0 0 0 .282L7 10.001l.859.858a.2.2 0 0 0 .282 0L9 10l2.859-2.859a.2.2 0 0 0 0-.282l-.718-.718a.2.2 0 0 0-.283 0L8 9Z"})}));var PM=Object.defineProperty,IM=(e,t)=>{for(var n in t)PM(e,n,{get:t[n],enumerable:!0})},zM=(e,t,n)=>((e,t,n)=>t in e?PM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),jM={};IM(jM,{af:()=>KM,ak:()=>UM,am:()=>GM,an:()=>YM,ar:()=>VM,ars:()=>JM,as:()=>qM,asa:()=>XM,ast:()=>QM,az:()=>ZM,bal:()=>eR,be:()=>tR,bem:()=>nR,bez:()=>rR,bg:()=>oR,bho:()=>iR,blo:()=>sR,bm:()=>aR,bn:()=>lR,bo:()=>cR,br:()=>uR,brx:()=>dR,bs:()=>fR,ca:()=>pR,ce:()=>hR,ceb:()=>gR,cgg:()=>mR,chr:()=>vR,ckb:()=>bR,cs:()=>yR,cy:()=>xR,da:()=>_R,de:()=>wR,doi:()=>SR,dsb:()=>kR,dv:()=>CR,dz:()=>ER,ee:()=>TR,el:()=>AR,en:()=>LR,eo:()=>MR,es:()=>RR,et:()=>NR,eu:()=>OR,fa:()=>PR,ff:()=>IR,fi:()=>zR,fil:()=>jR,fo:()=>DR,fr:()=>FR,fur:()=>BR,fy:()=>$R,ga:()=>HR,gd:()=>WR,gl:()=>KR,gsw:()=>UR,gu:()=>GR,guw:()=>YR,gv:()=>VR,ha:()=>JR,haw:()=>qR,he:()=>XR,hi:()=>QR,hnj:()=>ZR,hr:()=>eN,hsb:()=>tN,hu:()=>nN,hy:()=>rN,ia:()=>oN,id:()=>iN,ig:()=>sN,ii:()=>aN,io:()=>lN,is:()=>cN,it:()=>uN,iu:()=>dN,ja:()=>fN,jbo:()=>pN,jgo:()=>hN,jmc:()=>gN,jv:()=>mN,jw:()=>vN,ka:()=>bN,kab:()=>yN,kaj:()=>xN,kcg:()=>_N,kde:()=>wN,kea:()=>SN,kk:()=>kN,kkj:()=>CN,kl:()=>EN,km:()=>TN,kn:()=>AN,ko:()=>LN,ks:()=>MN,ksb:()=>RN,ksh:()=>NN,ku:()=>ON,kw:()=>PN,ky:()=>IN,lag:()=>zN,lb:()=>jN,lg:()=>DN,lij:()=>FN,lkt:()=>BN,ln:()=>$N,lo:()=>HN,lt:()=>WN,lv:()=>KN,mas:()=>UN,mg:()=>GN,mgo:()=>YN,mk:()=>VN,ml:()=>JN,mn:()=>qN,mo:()=>XN,mr:()=>QN,ms:()=>ZN,mt:()=>eO,my:()=>tO,nah:()=>nO,naq:()=>rO,nb:()=>oO,nd:()=>iO,ne:()=>sO,nl:()=>aO,nn:()=>lO,nnh:()=>cO,no:()=>uO,nqo:()=>dO,nr:()=>fO,nso:()=>pO,ny:()=>hO,nyn:()=>gO,om:()=>mO,or:()=>vO,os:()=>bO,osa:()=>yO,pa:()=>xO,pap:()=>_O,pcm:()=>wO,pl:()=>SO,prg:()=>kO,ps:()=>CO,pt:()=>EO,pt_PT:()=>TO,rm:()=>AO,ro:()=>LO,rof:()=>MO,ru:()=>RO,rwk:()=>NO,sah:()=>OO,saq:()=>PO,sat:()=>IO,sc:()=>zO,scn:()=>jO,sd:()=>DO,sdh:()=>FO,se:()=>BO,seh:()=>$O,ses:()=>HO,sg:()=>WO,sh:()=>KO,shi:()=>UO,si:()=>GO,sk:()=>YO,sl:()=>VO,sma:()=>JO,smi:()=>qO,smj:()=>XO,smn:()=>QO,sms:()=>ZO,sn:()=>eP,so:()=>tP,sq:()=>nP,sr:()=>rP,ss:()=>oP,ssy:()=>iP,st:()=>sP,su:()=>aP,sv:()=>lP,sw:()=>cP,syr:()=>uP,ta:()=>dP,te:()=>fP,teo:()=>pP,th:()=>hP,ti:()=>gP,tig:()=>mP,tk:()=>vP,tl:()=>bP,tn:()=>yP,to:()=>xP,tpi:()=>_P,tr:()=>wP,ts:()=>SP,tzm:()=>kP,ug:()=>CP,uk:()=>EP,und:()=>TP,ur:()=>AP,uz:()=>LP,ve:()=>MP,vec:()=>RP,vi:()=>NP,vo:()=>OP,vun:()=>PP,wa:()=>IP,wae:()=>zP,wo:()=>jP,xh:()=>DP,xog:()=>FP,yi:()=>BP,yo:()=>$P,yue:()=>HP,zh:()=>WP,zu:()=>KP});var DM=(e,t)=>t?"other":1==e?"one":"other",FM=(e,t)=>t?"other":0==e||1==e?"one":"other",BM=(e,t)=>t?"other":e>=0&&e<=1?"one":"other",$M=(e,t)=>{const n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},HM=(e,t)=>"other",WM=(e,t)=>t?"other":1==e?"one":2==e?"two":"other",KM=DM,UM=FM,GM=BM,YM=DM,VM=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":0==e?"zero":1==e?"one":2==e?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},JM=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":0==e?"zero":1==e?"one":2==e?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},qM=(e,t)=>t?1==e||5==e||7==e||8==e||9==e||10==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other",XM=DM,QM=$M,ZM=(e,t)=>{const n=String(e).split(".")[0],r=n.slice(-1),o=n.slice(-2),i=n.slice(-3);return t?1==r||2==r||5==r||7==r||8==r||20==o||50==o||70==o||80==o?"one":3==r||4==r||100==i||200==i||300==i||400==i||500==i||600==i||700==i||800==i||900==i?"few":0==n||6==r||40==o||60==o||90==o?"many":"other":1==e?"one":"other"},eR=(e,t)=>1==e?"one":"other",tR=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-1),i=r&&n[0].slice(-2);return t?2!=o&&3!=o||12==i||13==i?"other":"few":1==o&&11!=i?"one":o>=2&&o<=4&&(i<12||i>14)?"few":r&&0==o||o>=5&&o<=9||i>=11&&i<=14?"many":"other"},nR=DM,rR=DM,oR=DM,iR=FM,sR=(e,t)=>{const n=String(e).split(".")[0];return t?0==n?"zero":1==n?"one":2==n||3==n||4==n||5==n||6==n?"few":"other":0==e?"zero":1==e?"one":"other"},aR=HM,lR=(e,t)=>t?1==e||5==e||7==e||8==e||9==e||10==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other",cR=HM,uR=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-1),i=r&&n[0].slice(-2),s=r&&n[0].slice(-6);return t?"other":1==o&&11!=i&&71!=i&&91!=i?"one":2==o&&12!=i&&72!=i&&92!=i?"two":(3==o||4==o||9==o)&&(i<10||i>19)&&(i<70||i>79)&&(i<90||i>99)?"few":0!=e&&r&&0==s?"many":"other"},dR=DM,fR=(e,t)=>{const n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),a=r.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?"other":i&&1==s&&11!=a||1==l&&11!=c?"one":i&&s>=2&&s<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},pR=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-6);return t?1==e||3==e?"one":2==e?"two":4==e?"few":"other":1==e&&o?"one":0!=r&&0==i&&o?"many":"other"},hR=DM,gR=(e,t)=>{const n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),a=o.slice(-1);return t?"other":i&&(1==r||2==r||3==r)||i&&4!=s&&6!=s&&9!=s||!i&&4!=a&&6!=a&&9!=a?"one":"other"},mR=DM,vR=DM,bR=DM,yR=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1];return t?"other":1==e&&o?"one":r>=2&&r<=4&&o?"few":o?"other":"many"},xR=(e,t)=>t?0==e||7==e||8==e||9==e?"zero":1==e?"one":2==e?"two":3==e||4==e?"few":5==e||6==e?"many":"other":0==e?"zero":1==e?"one":2==e?"two":3==e?"few":6==e?"many":"other",_R=(e,t)=>{const n=String(e).split("."),r=n[0],o=Number(n[0])==e;return t||1!=e&&(o||0!=r&&1!=r)?"other":"one"},wR=$M,SR=BM,kR=(e,t)=>{const n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-2),a=o.slice(-2);return t?"other":i&&1==s||1==a?"one":i&&2==s||2==a?"two":i&&(3==s||4==s)||3==a||4==a?"few":"other"},CR=DM,ER=HM,TR=DM,AR=DM,LR=(e,t)=>{const n=String(e).split("."),r=!n[1],o=Number(n[0])==e,i=o&&n[0].slice(-1),s=o&&n[0].slice(-2);return t?1==i&&11!=s?"one":2==i&&12!=s?"two":3==i&&13!=s?"few":"other":1==e&&r?"one":"other"},MR=DM,RR=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-6);return t?"other":1==e?"one":0!=r&&0==i&&o?"many":"other"},NR=$M,OR=DM,PR=BM,IR=(e,t)=>t?"other":e>=0&&e<2?"one":"other",zR=$M,jR=(e,t)=>{const n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),a=o.slice(-1);return t?1==e?"one":"other":i&&(1==r||2==r||3==r)||i&&4!=s&&6!=s&&9!=s||!i&&4!=a&&6!=a&&9!=a?"one":"other"},DR=DM,FR=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-6);return t?1==e?"one":"other":e>=0&&e<2?"one":0!=r&&0==i&&o?"many":"other"},BR=DM,$R=$M,HR=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e;return t?1==e?"one":"other":1==e?"one":2==e?"two":r&&e>=3&&e<=6?"few":r&&e>=7&&e<=10?"many":"other"},WR=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e;return t?1==e||11==e?"one":2==e||12==e?"two":3==e||13==e?"few":"other":1==e||11==e?"one":2==e||12==e?"two":r&&e>=3&&e<=10||r&&e>=13&&e<=19?"few":"other"},KR=$M,UR=DM,GR=(e,t)=>t?1==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other",YR=FM,VR=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-1),s=r.slice(-2);return t?"other":o&&1==i?"one":o&&2==i?"two":!o||0!=s&&20!=s&&40!=s&&60!=s&&80!=s?o?"other":"many":"few"},JR=DM,qR=DM,XR=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1];return t?"other":1==r&&o||0==r&&!o?"one":2==r&&o?"two":"other"},QR=(e,t)=>t?1==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other",ZR=HM,eN=(e,t)=>{const n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),a=r.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?"other":i&&1==s&&11!=a||1==l&&11!=c?"one":i&&s>=2&&s<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},tN=(e,t)=>{const n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-2),a=o.slice(-2);return t?"other":i&&1==s||1==a?"one":i&&2==s||2==a?"two":i&&(3==s||4==s)||3==a||4==a?"few":"other"},nN=(e,t)=>t?1==e||5==e?"one":"other":1==e?"one":"other",rN=(e,t)=>t?1==e?"one":"other":e>=0&&e<2?"one":"other",oN=$M,iN=HM,sN=HM,aN=HM,lN=$M,cN=(e,t)=>{const n=String(e).split("."),r=n[0],o=(n[1]||"").replace(/0+$/,""),i=Number(n[0])==e,s=r.slice(-1),a=r.slice(-2);return t?"other":i&&1==s&&11!=a||o%10==1&&o%100!=11?"one":"other"},uN=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-6);return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&o?"one":0!=r&&0==i&&o?"many":"other"},dN=WM,fN=HM,pN=HM,hN=DM,gN=DM,mN=HM,vN=HM,bN=(e,t)=>{const n=String(e).split(".")[0],r=n.slice(-2);return t?1==n?"one":0==n||r>=2&&r<=20||40==r||60==r||80==r?"many":"other":1==e?"one":"other"},yN=(e,t)=>t?"other":e>=0&&e<2?"one":"other",xN=DM,_N=DM,wN=HM,SN=HM,kN=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-1);return t?6==o||9==o||r&&0==o&&0!=e?"many":"other":1==e?"one":"other"},CN=DM,EN=DM,TN=HM,AN=BM,LN=HM,MN=DM,RN=DM,NN=(e,t)=>t?"other":0==e?"zero":1==e?"one":"other",ON=DM,PN=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-2),i=r&&n[0].slice(-3),s=r&&n[0].slice(-5),a=r&&n[0].slice(-6);return t?r&&e>=1&&e<=4||o>=1&&o<=4||o>=21&&o<=24||o>=41&&o<=44||o>=61&&o<=64||o>=81&&o<=84?"one":5==e||5==o?"many":"other":0==e?"zero":1==e?"one":2==o||22==o||42==o||62==o||82==o||r&&0==i&&(s>=1e3&&s<=2e4||4e4==s||6e4==s||8e4==s)||0!=e&&1e5==a?"two":3==o||23==o||43==o||63==o||83==o?"few":1==e||1!=o&&21!=o&&41!=o&&61!=o&&81!=o?"other":"many"},IN=DM,zN=(e,t)=>{const n=String(e).split(".")[0];return t?"other":0==e?"zero":0!=n&&1!=n||0==e?"other":"one"},jN=DM,DN=DM,FN=(e,t)=>{const n=String(e).split("."),r=!n[1],o=Number(n[0])==e;return t?11==e||8==e||o&&e>=80&&e<=89||o&&e>=800&&e<=899?"many":"other":1==e&&r?"one":"other"},BN=HM,$N=FM,HN=(e,t)=>t&&1==e?"one":"other",WN=(e,t)=>{const n=String(e).split("."),r=n[1]||"",o=Number(n[0])==e,i=o&&n[0].slice(-1),s=o&&n[0].slice(-2);return t?"other":1==i&&(s<11||s>19)?"one":i>=2&&i<=9&&(s<11||s>19)?"few":0!=r?"many":"other"},KN=(e,t)=>{const n=String(e).split("."),r=n[1]||"",o=r.length,i=Number(n[0])==e,s=i&&n[0].slice(-1),a=i&&n[0].slice(-2),l=r.slice(-2),c=r.slice(-1);return t?"other":i&&0==s||a>=11&&a<=19||2==o&&l>=11&&l<=19?"zero":1==s&&11!=a||2==o&&1==c&&11!=l||2!=o&&1==c?"one":"other"},UN=DM,GN=FM,YN=DM,VN=(e,t)=>{const n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),a=r.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?1==s&&11!=a?"one":2==s&&12!=a?"two":7!=s&&8!=s||17==a||18==a?"other":"many":i&&1==s&&11!=a||1==l&&11!=c?"one":"other"},JN=DM,qN=DM,XN=(e,t)=>{const n=String(e).split("."),r=!n[1],o=Number(n[0])==e&&n[0].slice(-2);return t?1==e?"one":"other":1==e&&r?"one":!r||0==e||1!=e&&o>=1&&o<=19?"few":"other"},QN=(e,t)=>t?1==e?"one":2==e||3==e?"two":4==e?"few":"other":1==e?"one":"other",ZN=(e,t)=>t&&1==e?"one":"other",eO=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":1==e?"one":2==e?"two":0==e||r>=3&&r<=10?"few":r>=11&&r<=19?"many":"other"},tO=HM,nO=DM,rO=WM,oO=DM,iO=DM,sO=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e;return t?r&&e>=1&&e<=4?"one":"other":1==e?"one":"other"},aO=$M,lO=DM,cO=DM,uO=DM,dO=HM,fO=DM,pO=FM,hO=DM,gO=DM,mO=DM,vO=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e;return t?1==e||5==e||r&&e>=7&&e<=9?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":1==e?"one":"other"},bO=DM,yO=HM,xO=FM,_O=DM,wO=BM,SO=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-1),s=r.slice(-2);return t?"other":1==e&&o?"one":o&&i>=2&&i<=4&&(s<12||s>14)?"few":o&&1!=r&&(0==i||1==i)||o&&i>=5&&i<=9||o&&s>=12&&s<=14?"many":"other"},kO=(e,t)=>{const n=String(e).split("."),r=n[1]||"",o=r.length,i=Number(n[0])==e,s=i&&n[0].slice(-1),a=i&&n[0].slice(-2),l=r.slice(-2),c=r.slice(-1);return t?"other":i&&0==s||a>=11&&a<=19||2==o&&l>=11&&l<=19?"zero":1==s&&11!=a||2==o&&1==c&&11!=l||2!=o&&1==c?"one":"other"},CO=DM,EO=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-6);return t?"other":0==r||1==r?"one":0!=r&&0==i&&o?"many":"other"},TO=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-6);return t?"other":1==e&&o?"one":0!=r&&0==i&&o?"many":"other"},AO=DM,LO=(e,t)=>{const n=String(e).split("."),r=!n[1],o=Number(n[0])==e&&n[0].slice(-2);return t?1==e?"one":"other":1==e&&r?"one":!r||0==e||1!=e&&o>=1&&o<=19?"few":"other"},MO=DM,RO=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-1),s=r.slice(-2);return t?"other":o&&1==i&&11!=s?"one":o&&i>=2&&i<=4&&(s<12||s>14)?"few":o&&0==i||o&&i>=5&&i<=9||o&&s>=11&&s<=14?"many":"other"},NO=DM,OO=HM,PO=DM,IO=WM,zO=(e,t)=>{const n=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&n?"one":"other"},jO=(e,t)=>{const n=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&n?"one":"other"},DO=DM,FO=DM,BO=WM,$O=DM,HO=HM,WO=HM,KO=(e,t)=>{const n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),a=r.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?"other":i&&1==s&&11!=a||1==l&&11!=c?"one":i&&s>=2&&s<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},UO=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e;return t?"other":e>=0&&e<=1?"one":r&&e>=2&&e<=10?"few":"other"},GO=(e,t)=>{const n=String(e).split("."),r=n[0],o=n[1]||"";return t?"other":0==e||1==e||0==r&&1==o?"one":"other"},YO=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1];return t?"other":1==e&&o?"one":r>=2&&r<=4&&o?"few":o?"other":"many"},VO=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-2);return t?"other":o&&1==i?"one":o&&2==i?"two":o&&(3==i||4==i)||!o?"few":"other"},JO=WM,qO=WM,XO=WM,QO=WM,ZO=WM,eP=DM,tP=DM,nP=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-1),i=r&&n[0].slice(-2);return t?1==e?"one":4==o&&14!=i?"many":"other":1==e?"one":"other"},rP=(e,t)=>{const n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),a=r.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?"other":i&&1==s&&11!=a||1==l&&11!=c?"one":i&&s>=2&&s<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},oP=DM,iP=DM,sP=DM,aP=HM,lP=(e,t)=>{const n=String(e).split("."),r=!n[1],o=Number(n[0])==e,i=o&&n[0].slice(-1),s=o&&n[0].slice(-2);return t?1!=i&&2!=i||11==s||12==s?"other":"one":1==e&&r?"one":"other"},cP=$M,uP=DM,dP=DM,fP=DM,pP=DM,hP=HM,gP=FM,mP=DM,vP=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-1);return t?6==r||9==r||10==e?"few":"other":1==e?"one":"other"},bP=(e,t)=>{const n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),a=o.slice(-1);return t?1==e?"one":"other":i&&(1==r||2==r||3==r)||i&&4!=s&&6!=s&&9!=s||!i&&4!=a&&6!=a&&9!=a?"one":"other"},yP=DM,xP=HM,_P=HM,wP=DM,SP=DM,kP=(e,t)=>{const n=String(e).split("."),r=Number(n[0])==e;return t?"other":0==e||1==e||r&&e>=11&&e<=99?"one":"other"},CP=DM,EP=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1],i=Number(n[0])==e,s=i&&n[0].slice(-1),a=i&&n[0].slice(-2),l=r.slice(-1),c=r.slice(-2);return t?3==s&&13!=a?"few":"other":o&&1==l&&11!=c?"one":o&&l>=2&&l<=4&&(c<12||c>14)?"few":o&&0==l||o&&l>=5&&l<=9||o&&c>=11&&c<=14?"many":"other"},TP=HM,AP=$M,LP=DM,MP=DM,RP=(e,t)=>{const n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-6);return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&o?"one":0!=r&&0==i&&o?"many":"other"},NP=(e,t)=>t&&1==e?"one":"other",OP=DM,PP=DM,IP=FM,zP=DM,jP=HM,DP=DM,FP=DM,BP=$M,$P=HM,HP=HM,WP=HM,KP=BM,UP={},GP=Array.prototype.slice,YP=function(e){return("0"+e.toString()).substr(-2)},VP=function(e){var t=typeof e;return"function"===t||"object"===t},JP=function(e){return"function"===typeof e},qP=function(e){return null!=e},XP=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},QP=function(e){return"string"==typeof e||"[object String]"===Object.prototype.toString.call(e)},ZP=function(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)},eI=function(e){return!0===e||!1===e},tI=function(e){return null===e},nI=function(e,t,n){return void 0===n||0===+n?Math[e](t):(t=+t,n=+n,isNaN(t)||"number"!=typeof n||n%1!=0?NaN:(t=t.toString().split("e"),+((t=(t=Math[e](+(t[0]+"e"+(t[1]?+t[1]-n:-n)))).toString().split("e"))[0]+"e"+(t[1]?+t[1]+n:n))))},rI=function(e,t){return JP(e)?e(t):e},oI=function(e,t){var n,r;for(n in t)t.hasOwnProperty(n)&&(r=t[n],QP(r)||ZP(r)||eI(r)||XP(r)||tI(r)?e[n]=r:(null==e[n]&&(e[n]={}),oI(e[n],r)));return e},iI={day_names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbr_day_names:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],month_names:[null,"January","February","March","April","May","June","July","August","September","October","November","December"],abbr_month_names:[null,"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],meridian:["AM","PM"]},sI={precision:3,separator:".",delimiter:",",strip_insignificant_zeros:!1},aI={unit:"$",precision:2,format:"%u%n",sign_first:!0,delimiter:",",separator:"."},lI={unit:"%",precision:3,format:"%n%u",separator:".",delimiter:""},cI=[null,"kb","mb","gb","tb"],uI={defaultLocale:"en",locale:"en",defaultSeparator:".",placeholder:/(?:\{\{|%\{)(.*?)(?:\}\}?)/gm,fallbacks:!1,translations:{},missingBehaviour:"message",missingTranslationPrefix:""};UP.reset=function(){var e;for(e in uI)this[e]=uI[e]},UP.initializeOptions=function(){var e;for(e in uI)qP(this[e])||(this[e]=uI[e])},UP.initializeOptions(),UP.locales={},UP.locales.get=function(e){var t=this[e]||this[UP.locale]||this.default;return JP(t)&&(t=t(e)),!1===XP(t)&&(t=[t]),t},UP.locales.default=function(e){var t=[],n=[];return e&&t.push(e),!e&&UP.locale&&t.push(UP.locale),UP.fallbacks&&UP.defaultLocale&&t.push(UP.defaultLocale),t.forEach(function(e){var t=e.split("-"),r=null,o=null;3===t.length?(r=[t[0],t[1]].join("-"),o=t[0]):2===t.length&&(r=t[0]),-1===n.indexOf(e)&&n.push(e),UP.fallbacks&&[r,o].forEach(function(t){null!=t&&t!==e&&-1===n.indexOf(t)&&n.push(t)})}),t.length||t.push("en"),n},UP.pluralization={},UP.pluralization.get=function(e){return this[e]||this[UP.locale]||this.default},UP.pluralization.default=function(e){switch(e){case 0:return["zero","other"];case 1:return["one"];default:return["other"]}},UP.currentLocale=function(){return this.locale||this.defaultLocale},UP.isSet=qP,UP.lookup=function(e,t){t=t||{};var n,r,o,i,s=this.locales.get(t.locale).slice();for(o=this.getFullScope(e,t);s.length;)if(n=s.shift(),r=o.split(t.separator||this.defaultSeparator),i=this.translations[n]){for(;r.length&&null!=(i=i[r.shift()]););if(null!=i)return i}if(qP(t.defaultValue))return rI(t.defaultValue,e)},UP.pluralizationLookupWithoutFallback=function(e,t,n){var r,o,i=this.pluralization.get(t)(e);if(n&&VP(n))for(;i.length;)if(r=i.shift(),qP(n[r])){o=n[r];break}return o},UP.pluralizationLookup=function(e,t,n){n=n||{};var r,o,i,s,a=this.locales.get(n.locale).slice();for(t=this.getFullScope(t,n);a.length;)if(r=a.shift(),o=t.split(n.separator||this.defaultSeparator),i=this.translations[r]){for(;o.length&&(i=i[o.shift()],VP(i));)0===o.length&&(s=this.pluralizationLookupWithoutFallback(e,r,i));if(null!=s)break}return null==s&&qP(n.defaultValue)&&(s=VP(n.defaultValue)?this.pluralizationLookupWithoutFallback(e,n.locale,n.defaultValue):n.defaultValue,i=n.defaultValue),{message:s,translations:i}},UP.meridian=function(){var e=this.lookup("time"),t=this.lookup("date");return e&&e.am&&e.pm?[e.am,e.pm]:t&&t.meridian?t.meridian:iI.meridian},UP.prepareOptions=function(){for(var e,t=GP.call(arguments),n={};t.length;)if("object"==typeof(e=t.shift()))for(var r in e)e.hasOwnProperty(r)&&(qP(n[r])||(n[r]=e[r]));return n},UP.createTranslationOptions=function(e,t){var n=[{scope:e}];return qP(t.defaults)&&(n=n.concat(t.defaults)),qP(t.defaultValue)&&n.push({message:t.defaultValue}),n},UP.translate=function(e,t){t=t||{};var n,r=this.createTranslationOptions(e,t),o=e,i=this.prepareOptions(t);return delete i.defaultValue,r.some(function(t){if(qP(t.scope)?(o=t.scope,n=this.lookup(o,i)):qP(t.message)&&(n=rI(t.message,e)),null!=n)return!0},this)?("string"==typeof n?n=this.interpolate(n,t):XP(n)?n=n.map(function(e){return"string"==typeof e?this.interpolate(e,t):e},this):VP(n)&&qP(t.count)&&(n=this.pluralize(t.count,o,t)),n):this.missingTranslation(e,t)},UP.interpolate=function(e,t){if(null==e)return e;t=t||{};var n,r,o,i,s=e.match(this.placeholder);if(!s)return e;for(;s.length;)o=(n=s.shift()).replace(this.placeholder,"$1"),r=qP(t[o])?t[o].toString().replace(/\$/gm,"_#$#_"):o in t?this.nullPlaceholder(n,e,t):this.missingPlaceholder(n,e,t),i=new RegExp(n.replace(/{/gm,"\\{").replace(/}/gm,"\\}")),e=e.replace(i,r);return e.replace(/_#\$#_/g,"$")},UP.pluralize=function(e,t,n){var r,o;return n=this.prepareOptions({count:String(e)},n),void 0===(o=this.pluralizationLookup(e,t,n)).translations||null==o.translations?this.missingTranslation(t,n):void 0!==o.message&&null!=o.message?this.interpolate(o.message,n):(r=this.pluralization.get(n.locale),this.missingTranslation(t+"."+r(e)[0],n))},UP.missingTranslation=function(e,t){if("guess"===this.missingBehaviour){var n=e.split(".").slice(-1)[0];return(this.missingTranslationPrefix.length>0?this.missingTranslationPrefix:"")+n.replace(/_/g," ").replace(/([a-z])([A-Z])/g,function(e,t,n){return t+" "+n.toLowerCase()})}return'[missing "'+[null!=t&&null!=t.locale?t.locale:this.currentLocale(),this.getFullScope(e,t)].join(t.separator||this.defaultSeparator)+'" translation]'},UP.missingPlaceholder=function(e,t,n){return"[missing "+e+" value]"},UP.nullPlaceholder=function(){return UP.missingPlaceholder.apply(UP,arguments)},UP.toNumber=function(e,t){t=this.prepareOptions(t,this.lookup("number.format"),sI);var n,r,o=e<0,i=function(e,t){return nI("round",e,-t).toFixed(t)}(Math.abs(e),t.precision).toString(),s=i.split("."),a=[],l=t.format||"%n",c=o?"-":"";for(e=s[0],n=s[1];e.length>0;)a.unshift(e.substr(Math.max(0,e.length-3),3)),e=e.substr(0,e.length-3);return r=a.join(t.delimiter),t.strip_insignificant_zeros&&n&&(n=n.replace(/0+$/,"")),t.precision>0&&n&&(r+=t.separator+n),r=(l=t.sign_first?"%s"+l:l.replace("%n","%s%n")).replace("%u",t.unit).replace("%n",r).replace("%s",c)},UP.toCurrency=function(e,t){return t=this.prepareOptions(t,this.lookup("number.currency.format",t),this.lookup("number.format",t),aI),this.toNumber(e,t)},UP.localize=function(e,t,n){switch(n||(n={}),e){case"currency":return this.toCurrency(t,n);case"number":return e=this.lookup("number.format",n),this.toNumber(t,e);case"percentage":return this.toPercentage(t,n);default:var r;return r=e.match(/^(date|time)/)?this.toTime(e,t,n):t.toString(),this.interpolate(r,n)}},UP.parseDate=function(e){var t,n,r;if(null==e)return e;if("object"==typeof e)return e;if(t=e.toString().match(/(\d{4})-(\d{2})-(\d{2})(?:[ T](\d{2}):(\d{2}):(\d{2})([\.,]\d{1,3})?)?(Z|\+00:?00)?/)){for(var o=1;o<=6;o++)t[o]=parseInt(t[o],10)||0;t[2]-=1,r=t[7]?1e3*("0"+t[7]):null,n=t[8]?new Date(Date.UTC(t[1],t[2],t[3],t[4],t[5],t[6],r)):new Date(t[1],t[2],t[3],t[4],t[5],t[6],r)}else"number"==typeof e?(n=new Date).setTime(e):e.match(/([A-Z][a-z]{2}) ([A-Z][a-z]{2}) (\d+) (\d+:\d+:\d+) ([+-]\d+) (\d+)/)?(n=new Date).setTime(Date.parse([RegExp.$1,RegExp.$2,RegExp.$3,RegExp.$6,RegExp.$4,RegExp.$5].join(" "))):(e.match(/\d+ \d+:\d+:\d+ [+-]\d+ \d+/),(n=new Date).setTime(Date.parse(e)));return n},UP.strftime=function(e,t,n){n=this.lookup("date",n);var r=UP.meridian();if(n||(n={}),n=this.prepareOptions(n,iI),isNaN(e.getTime()))throw new Error("I18n.strftime() requires a valid date object, but received an invalid date.");var o=e.getDay(),i=e.getDate(),s=e.getFullYear(),a=e.getMonth()+1,l=e.getHours(),c=l,u=l>11?1:0,d=e.getSeconds(),f=e.getMinutes(),p=e.getTimezoneOffset(),h=Math.floor(Math.abs(p/60)),g=Math.abs(p)-60*h,m=(p>0?"-":"+")+(h.toString().length<2?"0"+h:h)+(g.toString().length<2?"0"+g:g);return c>12?c-=12:0===c&&(c=12),t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%a",n.abbr_day_names[o])).replace("%A",n.day_names[o])).replace("%b",n.abbr_month_names[a])).replace("%B",n.month_names[a])).replace("%d",YP(i))).replace("%e",i)).replace("%-d",i)).replace("%H",YP(l))).replace("%-H",l)).replace("%k",l)).replace("%I",YP(c))).replace("%-I",c)).replace("%l",c)).replace("%m",YP(a))).replace("%-m",a)).replace("%M",YP(f))).replace("%-M",f)).replace("%p",r[u])).replace("%P",r[u].toLowerCase())).replace("%S",YP(d))).replace("%-S",d)).replace("%w",o)).replace("%y",YP(s))).replace("%-y",YP(s).replace(/^0+/,""))).replace("%Y",s)).replace("%z",m)).replace("%Z",m)},UP.toTime=function(e,t,n){var r=this.parseDate(t),o=this.lookup(e,n);if(null==r)return r;var i=r.toString();return i.match(/invalid/i)?i:o?this.strftime(r,o,n):i},UP.toPercentage=function(e,t){return t=this.prepareOptions(t,this.lookup("number.percentage.format",t),this.lookup("number.format",t),lI),this.toNumber(e,t)},UP.toHumanSize=function(e,t){for(var n,r,o,i=e,s=0;i>=1024&&s<4;)i/=1024,s+=1;return 0===s?(o=this.getFullScope("number.human.storage_units.units.byte",t),n=this.t(o,{count:i}),r=0):(o=this.getFullScope("number.human.storage_units.units."+cI[s],t),n=this.t(o),r=i-Math.floor(i)===0?0:1),t=this.prepareOptions(t,{unit:n,precision:r,format:"%n%u",delimiter:""}),this.toNumber(i,t)},UP.getFullScope=function(e,t){return t=t||{},XP(e)&&(e=e.join(t.separator||this.defaultSeparator)),t.scope&&(e=[t.scope,e].join(t.separator||this.defaultSeparator)),e},UP.extend=function(e,t){return void 0===e&&void 0===t?{}:oI(e,t)},UP.t=UP.translate.bind(UP),UP.l=UP.localize.bind(UP),UP.p=UP.pluralize.bind(UP);IM({},{DEFAULT_LANGUAGE:()=>fI,DEFAULT_LANGUAGE_SHORT:()=>pI,flattenParams:()=>wI,flattenTranslationsJSON:()=>mI,format:()=>SI,formatWithKeys:()=>kI,getLongLanguageDesc:()=>_I,getShortLanguageDesc:()=>xI,parseLangFromUrl:()=>vI,resolveLocale:()=>yI,updateLangAttribute:()=>CI});var dI=[{short:"es",long:"es-ES",label:"Spanish",translatedLabel:"Common.Spanish"},{short:"sv",long:"sv-SE",label:"Swedish",translatedLabel:"Common.Swedish"},{short:"ja",long:"ja-JP",label:"Japanese",translatedLabel:"Common.Japanese"},{short:"en",long:"en-US",label:"English",translatedLabel:"Common.English"},{short:"de",long:"de-DE",label:"German",translatedLabel:"Common.German"},{short:"fr",long:"fr-FR",label:"French",translatedLabel:"Common.French"},{short:"it",long:"it-IT",label:"Italian",translatedLabel:"Common.Italian"},{short:"nl",long:"nl-NL",label:"Dutch",translatedLabel:"Common.Dutch"},{short:"pt",long:"pt-BR",label:"Brazilian Portuguese",translatedLabel:"Common.BrazilianPortuguese"},{short:"ru",long:"ru-RU",label:"Russian",translatedLabel:"Common.Russian"},{short:"zh-CN",long:"zh-CN",label:"Simplified Chinese",translatedLabel:"Common.SimplifiedChinese"},{short:"zh-TW",long:"zh-TW",label:"Traditional Chinese",translatedLabel:"Common.TraditionalChinese"},{short:"pl",long:"pl-PL",label:"Polish",translatedLabel:"Common.Polish"},{short:"tr",long:"tr-TR",label:"Turkish",translatedLabel:"Common.Turkish"},{short:"ko",long:"ko-KR",label:"Korean",translatedLabel:"Common.Korean"},{short:"qps-ploc",long:"qps-ploc",label:'qps-ploc (f.k.a. "pseudo")'},{short:"zz",long:"zz",label:"zz"}],fI="en-US",pI="en",hI=["zh-cn","zh-tw","qps-ploc"],gI=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),mI=e=>(console.warn("Deprecated, use `buildUtils.flattenTranslationsJSON` instead"),gI(e)?Object.keys(e).reduce((t,n)=>{const r=e[n],o=gI(r)&&r.value;return o&&(t[n]=o),t},{}):{}),vI=()=>{var e;return null!=(e=new URLSearchParams(window.location.search).get("lang"))?e:void 0},bI=e=>{if(!e)return;"zh-hk"!==e.toLocaleLowerCase()&&"zh-mo"!==e.toLocaleLowerCase()||(e="zh-TW");const t=e.toLowerCase();if(hI.includes(e.toLocaleLowerCase()))return dI.find(({long:e})=>e.toLowerCase()===t);const[n]=t.split("-");return dI.find(({short:e})=>e.toLowerCase()===n||e.toLowerCase()===t)},yI=(...e)=>{for(const t of e){const e=bI(t);if(e)return e.short}},xI=e=>{const t=bI(e);return t?t.short:(console.warn(`Language '${e}' not supported, falling back to '${pI}'`),pI)},_I=e=>{const t=bI(e);return t?t.long:(console.warn(`Language '${e}' not supported, falling back to '${fI}'`),fI)},wI=e=>Array.isArray(e[0])?e[0]:e,SI=(e,...t)=>{var n;return null==(n=e.match(/\{(\d+)\}/g))?void 0:n.length,e.replace(/\{(\d+)\}/g,(e,n)=>void 0!==t[n]?String(t[n]):e)},kI=(e,t)=>e.replace(/(\{)(\w+)(\})/g,(e,n,r)=>{var o;return t[r],null!=(o=t[r])?o:e}),CI=e=>{const t=xI(e);document.documentElement.setAttribute("lang",t)},EI=class e{static configure(t,n=fI){e.translations=t,e.language=_I(n),e.languageShort=xI(n),CI(e.language),e.onTranslationsChangeListeners.forEach(e=>{e()}),e.i18nProvider=UP,UP.missingTranslation=e=>e,UP.defaultSeparator=null,UP.locale=e.language,UP.translations={[e.language]:e.translationsPlurals};const r=e.languageShort.split("-")[0];UP.pluralization[e.language]=e=>{try{const t=jM[r](e),n=[t];return"few"!==t&&"many"!==t||n.push("other"),n}catch(t){switch(e){case 0:return["zero","other"];case 1:return["one"];default:return["other"]}}}}static getWithKeys(t,n){var r;let o=null!=(r=e.translations[t])?r:t;return n&&Object.keys(n).length>0&&(o=kI(o,n)),o}static getPlural(t,n,r){return e.i18nProvider.t(t,{count:n,...r})}static append(t){Object.assign(e.translations,t),e.onTranslationsChangeListeners.forEach(e=>{e()})}static appendPlurals(t){Object.assign(e.translationsPlurals,t),e.onTranslationsChangeListeners.forEach(e=>{e()})}static onTranslationsChange(t){return e.onTranslationsChangeListeners.push(t),()=>{e.onTranslationsChangeListeners.splice(e.onTranslationsChangeListeners.indexOf(t))}}};zM(EI,"translations",{}),zM(EI,"translationsPlurals",{}),zM(EI,"language"),zM(EI,"languageShort"),zM(EI,"onTranslationsChangeListeners",[]),zM(EI,"i18nProvider"),zM(EI,"get",(e,...t)=>{var n;const r=wI(t);let o=null!=(n=EI.translations[e])?n:e;return r.length>0&&(o=SI(o,...r)),o});var TI=EI;var AI=function(){const[e,t]=S(0);return w(()=>{const n=TI.onTranslationsChange(()=>{t(e+1)});return()=>{n()}},[]),TI.get},LI=TI;function MI({defaultSelection:e}){const[t]=vu();return w(()=>{t.focus(()=>{const e=document.activeElement,n=t.getRootElement();null===n||null!==e&&n.contains(e)||n.focus({preventScroll:!0})},{defaultSelection:e})},[e,t]),null}function RI(e,t=!0){if(e)return!1;let n=Ui().getTextContent();return t&&(n=n.trim()),""===n}function NI(e){return()=>function(e){if(!RI(e,!1))return!1;const t=Ui().getChildren(),n=t.length;if(n>1)return!1;for(let e=0;e<n;e++){const n=t[e];if(Xo(n))return!1;if(Vo(n)){if(!li(n))return!1;if(0!==n.__indent)return!1;const t=n.getChildren(),r=t.length;for(let n=0;n<r;n++)if(!Or(t[e]))return!1}}return!0}(e)}const OI="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?_:w;function PI({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:r,ariaDescribedBy:o,ariaErrorMessage:i,ariaExpanded:s,ariaInvalid:a,ariaLabel:l,ariaLabelledBy:c,ariaMultiline:u,ariaOwns:d,ariaRequired:f,autoCapitalize:p,className:h,id:g,role:m="textbox",spellCheck:v=!0,style:b,tabIndex:y,"data-testid":_,...w},k){const[C,E]=S(e.isEditable()),T=M(t=>{t&&t.ownerDocument&&t.ownerDocument.defaultView?e.setRootElement(t):e.setRootElement(null)},[e]),A=x(()=>function(...e){return t=>{for(const n of e)"function"==typeof n?n(t):null!=n&&(n.current=t)}}(k,T),[T,k]);return OI(()=>(E(e.isEditable()),e.registerEditableListener(e=>{E(e)})),[e]),wu.jsx("div",{"aria-activedescendant":C?t:void 0,"aria-autocomplete":C?n:"none","aria-controls":C?r:void 0,"aria-describedby":o,...null!=i?{"aria-errormessage":i}:{},"aria-expanded":C&&"combobox"===m?!!s:void 0,...null!=a?{"aria-invalid":a}:{},"aria-label":l,"aria-labelledby":c,"aria-multiline":u,"aria-owns":C?d:void 0,"aria-readonly":!C||void 0,"aria-required":f,autoCapitalize:p,className:h,contentEditable:C,"data-testid":_,id:g,ref:A,role:m,spellCheck:v,style:b,tabIndex:y,...w})}const II=E(PI);function zI(e){return e.getEditorState().read(NI(e.isComposing()))}const jI=E(DI);function DI(e,t){const{placeholder:n,...r}=e,[o]=vu();return wu.jsxs(wu.Fragment,{children:[wu.jsx(II,{editor:o,...r,ref:t}),null!=n&&wu.jsx(FI,{editor:o,content:n})]})}function FI({content:e,editor:t}){const n=function(e){const[t,n]=S(()=>zI(e));return OI(()=>{function t(){const t=zI(e);n(t)}return t(),Ka(e.registerUpdateListener(()=>{t()}),e.registerEditableListener(()=>{t()}))},[e]),t}(t),[r,o]=S(t.isEditable());if(_(()=>(o(t.isEditable()),t.registerEditableListener(e=>{o(e)})),[t]),!n)return null;let i=null;return"function"==typeof e?i=e(r):null!==e&&(i=e),null===i?null:wu.jsx("div",{"aria-hidden":!0,children:i})}const BI=v(null),$I={didCatch:!1,error:null};class HI extends R{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=$I}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(...e){const{error:t}=this.state;null!==t&&(this.props.onReset?.({args:e,reason:"imperative-api"}),this.setState($I))}componentDidCatch(e,t){this.props.onError?.(e,t)}componentDidUpdate(e,t){const{didCatch:n}=this.state,{resetKeys:r}=this.props;n&&null!==t.error&&function(e=[],t=[]){return e.length!==t.length||e.some((e,n)=>!Object.is(e,t[n]))}(e.resetKeys,r)&&(this.props.onReset?.({next:r,prev:e.resetKeys,reason:"keys"}),this.setState($I))}render(){const{children:e,fallbackRender:t,FallbackComponent:n,fallback:r}=this.props,{didCatch:o,error:i}=this.state;let s=e;if(o){const e={error:i,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof t)s=t(e);else if(n)s=N(n,e);else{if(void 0===r)throw i;s=r}}return N(BI.Provider,{value:{didCatch:o,error:i,resetErrorBoundary:this.resetErrorBoundary}},s)}}function WI({children:e,onError:t}){return wu.jsx(HI,{fallback:wu.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:t,children:e})}const KI={name:"@lexical/react/ReactProvider"};function UI(e){throw new Error(e)}const GI="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?_:w;function YI({editor:e,ErrorBoundary:t}){return function(e,t){const[n,r]=S(()=>e.getDecorators());return GI(()=>e.registerDecoratorListener(e=>{g(()=>{r(e)})}),[e]),w(()=>{r(e.getDecorators())},[e]),x(()=>{const r=[],o=Object.keys(n);for(let i=0;i<o.length;i++){const s=o[i],a=wu.jsx(t,{onError:t=>e._onError(t),children:wu.jsx(O,{fallback:null,children:n[s]})}),l=e.getElementByKey(s);null!==l&&r.push(m(a,l,s))}return r},[t,n,e])}(e,t)}function VI({editor:e,ErrorBoundary:t}){return function(e){const t=lc.maybeFromEditor(e);if(t&&t.hasExtensionByName(KI.name)){for(const e of["@lexical/plain-text","@lexical/rich-text"])t.hasExtensionByName(e)&&UI(`LexicalBuilder: @lexical/react legacy text plugins conflict with the ${e} extension. Remove the legacy <RichTextPlugin/> or <PlainTextPlugin/> component.`);return!0}return!1}(e)?null:wu.jsx(YI,{editor:e,ErrorBoundary:t})}function JI(e){return e.getEditorState().read(NI(e.isComposing()))}function qI(e){GI(()=>Ka(vd(e),function(e){const t=window.location.origin,n=n=>{if(n.origin!==t)return;const r=e.getRootElement();if(document.activeElement!==r)return;const o=n.data;if("string"==typeof o){let t;try{t=JSON.parse(o)}catch(e){return}if(t&&"nuanria_messaging"===t.protocol&&"request"===t.type){const r=t.payload;if(r&&"makeChanges"===r.functionId){const t=r.args;if(t){const[r,o,i,s,a]=t;e.update(()=>{const e=ao();if(Wr(e)){const t=e.anchor;let l=t.getNode(),c=0,u=0;if(Or(l)&&r>=0&&o>=0&&(c=r,u=r+o,e.setTextNodeRange(l,c,l,u)),c===u&&""===i||(e.insertRawText(i),l=t.getNode()),Or(l)){c=s,u=s+a;const t=l.getTextContentSize();c=c>t?t:c,u=u>t?t:u,e.setTextNodeRange(l,c,l,u)}n.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}(e)),[e])}function XI({contentEditable:e,placeholder:t=null,ErrorBoundary:n}){const[r]=vu();return qI(r),wu.jsxs(wu.Fragment,{children:[e,wu.jsx(QI,{content:t}),wu.jsx(VI,{editor:r,ErrorBoundary:n})]})}function QI({content:e}){const[t]=vu(),n=function(e){const[t,n]=S(()=>JI(e));return GI(()=>{function t(){const t=JI(e);n(t)}return t(),Ka(e.registerUpdateListener(()=>{t()}),e.registerEditableListener(()=>{t()}))},[e]),t}(t),r=wd();return n?"function"==typeof e?e(r):e:null}const ZI=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:wu.jsx("path",{d:"m2.604 7.672-.276.96h2.004l-.276-.96a42 42 0 0 1-.372-1.284L3.348 5.08H3.3q-.156.66-.336 1.32-.168.648-.36 1.272m-2.628 4.176L2.532 4h1.632l2.556 7.848H5.256l-.612-2.124h-2.64l-.612 2.124zm9.23.144q-.768 0-1.26-.48-.48-.48-.48-1.248 0-.948.828-1.464.828-.528 2.64-.72a1.4 1.4 0 0 0-.252-.804q-.228-.348-.828-.348-.432 0-.852.168-.408.168-.804.408l-.504-.924a6 6 0 0 1 1.104-.54 3.8 3.8 0 0 1 1.32-.228q1.104 0 1.644.66.552.648.552 1.884v3.492h-1.14l-.096-.648h-.048a4.3 4.3 0 0 1-.852.564q-.444.228-.972.228m.444-1.08q.36 0 .648-.168.3-.18.636-.48v-1.32q-1.2.156-1.668.468-.468.3-.468.744 0 .396.24.576t.612.18M14 1h1v14h-1zm-1 0h3v1h-3zm0 13h3v1h-3z"})})),ez=E((e,t)=>wu.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[wu.jsx("path",{d:"M0 1h16v2H0zm15 4v2H1V5zM0 11V9h16v2zm3 4v-2h10v2z"}),wu.jsx("use",{transform:"matrix(-1 0 0 1 16 0)"})]})),tz=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:wu.jsx("path",{fillRule:"evenodd",d:"M15 1v1H0V1zm-2 5H0V5h13zM0 9h16v1H0zm0 4h10v1H0z",clipRule:"evenodd"})})),nz=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:wu.jsx("path",{d:"M16 1v2H1V1zM3 5h13v2H3zm13 6H0V9h16zm0 4H6v-2h10z"})})),rz=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:wu.jsx("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5z"})})),oz=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:wu.jsx("path",{d:"M2.5 10a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3M16 12H7v-1h9zM2.5 3a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3M16 5H7V4h9z"})})),iz=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:wu.jsx("path",{d:"M5 13v1.382L7.764 13H14a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1H2a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1zm-1 3v-2H2a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H8zM4 6v1h8V6zm0 3v1h7V9z"})})),sz=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:wu.jsx("path",{d:"M2.05 9q.372 0 .72.09.349.089.623.274.273.186.436.468t.163.66a1.38 1.38 0 0 1-.284.86 2.3 2.3 0 0 1-.304.333l-.174.155-.18.152-1.243 1.004H4V14H.114v-.963l2.095-1.72.123-.115q.114-.116.195-.235a.7.7 0 0 0 .122-.399.54.54 0 0 0-.182-.422.7.7 0 0 0-.486-.163.7.7 0 0 0-.52.204.83.83 0 0 0-.217.406l-.022.127L0 10.568l.031-.18q.06-.263.193-.48a1.8 1.8 0 0 1 .452-.492 2 2 0 0 1 .626-.31Q1.655 9 2.05 9M16 12H6v-1h10zM3 7H1.697V3.328l-1.022.72L0 3.208 1.807 2H3zm13-2H6V4h10z"})})),az=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:wu.jsx("path",{d:"M5.52 11.938 4.5 15H1L6.425 1h3.238L15 15h-3.5l-1.02-3.062zm.73-2.188h3.5L8 4.5z"})})),lz=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:wu.jsx("path",{fillRule:"evenodd",d:"M12.483 4.4c0 1.376-.726 2.562-1.77 3.097C12.056 8.083 13 9.475 13 11.1c0 2.154-1.66 3.9-3.707 3.9H3V1h6.466c1.666 0 3.017 1.522 3.017 3.4m-6.897 2h2.91a1.6 1.6 0 0 0 0-3.2h-2.91zm0 6.4h3.1a1.9 1.9 0 0 0 0-3.8h-3.1z",clipRule:"evenodd"})})),cz=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:wu.jsx("path",{d:"M4.145 0h1.71l2.391 6.833-.785.784L7.245 7h-4.49l-1.283 3.665-.944-.33zm-1.04 6h3.79l-1.75-5h-.29zm9.066-.321a1 1 0 0 0-1.414 0l-6.364 6.364a1 1 0 0 0 0 1.414l2.25 2.25A1 1 0 0 0 7.35 16h6.471v-1h-3.114l4.686-4.686a1 1 0 0 0 0-1.414zm-2.2 8.643L9.293 15H7.35L5.1 12.75l1.65-1.65zm.707-.708-3.22-3.221 4.006-4.007 3.222 3.221z"})})),uz=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:wu.jsx("path",{d:"M8.5 0a7.99 7.99 0 0 1 6.34 3.12c1.167 1.514 1.714 3.535 1.268 5.395-.444 1.85-1.776 2.609-3.192 2.897a7 7 0 0 1-1.24.113l-.683.012c-.681.018-1.276.086-1.653.484-.577.511-.487.996-.255 1.464l.106.2.281.49c.259.484.383.957-.253 1.43-.435.324-1 .408-1.54.353A8.001 8.001 0 0 1 8.5 0m0 1a7 7 0 0 0-.315 13.993.54.54 0 0 0 .235-.063c.166-.09.182-.272.088-.437-.084-.146-.175-.29-.254-.438a3 3 0 0 1-.297-.758 1.94 1.94 0 0 1 .05-1.06c.124-.365.35-.674.64-.937.519-.525 1.201-.68 1.765-.733l.294-.02.344-.012.389-.007c.466-.006.862-.011 1.278-.096.855-.174 1.538-.52 1.971-1.128q.091-.126.173-.28c1-1.887.164-4.339-1.317-5.878A6.98 6.98 0 0 0 8.5 1m-4 4a2 2 0 1 1 0 4 2 2 0 0 1 0-4M13 6.5a1 1 0 1 1 0 2 1 1 0 0 1 0-2m-1-3a1 1 0 1 1 0 2 1 1 0 0 1 0-2M8 2a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3"})})),dz=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:wu.jsx("path",{d:"M14 5H2V3h12zm-9 8H2V6h3zm1 0V6h4v7zm5 0V6h3v7zM0 2a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1zm1 0v12h14V2z"})})),fz=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:wu.jsx("path",{d:"M7.041 14.855A.2.2 0 0 1 6.85 15H5.265a.2.2 0 0 1-.192-.255l3.886-13.6A.2.2 0 0 1 9.15 1h1.584a.2.2 0 0 1 .192.255z"})})),pz=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:wu.jsx("path",{d:"m9.354 7.146-.708.708a2.33 2.33 0 0 0-3.292 0l-2.75 2.75a1.975 1.975 0 0 0 2.792 2.793l2.75-2.75.708.707-2.75 2.75a2.975 2.975 0 0 1-4.208-4.208l2.75-2.75a3.33 3.33 0 0 1 4.708 0m4.75-5.25a2.975 2.975 0 0 1 0 4.208l-2.75 2.75a3.33 3.33 0 0 1-4.708 0l.708-.708c.909.91 2.383.91 3.292 0l2.75-2.75a1.975 1.975 0 1 0-2.793-2.792l-2.75 2.75-.707-.708 2.75-2.75a2.975 2.975 0 0 1 4.207 0Z"})})),hz=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:wu.jsx("path",{d:"M13 1v7.059c0 1.714-.364 2.924-1.273 3.73C10.91 12.598 9.455 13 8 13c-1.545 0-3-.403-3.818-1.21C3.455 10.983 3 9.773 3 8.059V1h2.455v7.059c0 .302 0 .706.09 1.008.091.303.182.605.364.807s.364.504.727.605c.273.1.91.202 1.455.202.909 0 1.727-.202 2-.706.364-.404.454-1.11.454-2.017V1zM3 14h10v1H3z"})}));var gz,mz,vz={exports:{}},bz={};function yz(e){return yz="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yz(e)}var xz=(mz||(mz=1,vz.exports=function(){if(gz)return bz;gz=1;var e=y,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 s(e,n,s){var a,l={},c=null,u=null;for(a in void 0!==s&&(c=""+s),void 0!==n.key&&(c=""+n.key),void 0!==n.ref&&(u=n.ref),n)r.call(n,a)&&!i.hasOwnProperty(a)&&(l[a]=n[a]);if(e&&e.defaultProps)for(a in n=e.defaultProps)void 0===l[a]&&(l[a]=n[a]);return{$$typeof:t,type:e,key:c,ref:u,props:l,_owner:o.current}}return bz.Fragment=n,bz.jsx=s,bz.jsxs=s,bz}()),vz.exports);const _z=/((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/,wz=[e=>{const t=_z.exec(e);if(null===t)return null;const n=t[0];return{index:t.index,length:n.length,text:n,url:n.startsWith("http")?n:`https://${n}`,attributes:{target:"_blank"}}},function(e,t=e=>e){return n=>{const r=e.exec(n);return null===r?null:{index:r.index,length:r[0].length,text:r[0],url:t(r[0])}}}(/(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/,e=>`mailto:${e}`)];function Sz(){return xz.jsx(yd,{matchers:wz})}const kz=()=>{const[e]=vu(),t=wd(),n=M(n=>{for(const[r,o]of n)"updated"!==o&&"created"!==o||e.getEditorState().read(()=>{const n=t?"pointer":"",o=e.getElementByKey(r);o&&(o.style.cursor=n)})},[t,e]);return w(()=>Ka(e.registerMutationListener(dc,e=>{n(e)}),e.registerMutationListener(gc,e=>{n(e)}),e.registerCommand(Tt,t=>(t.metaKey&&t.target&&e.getEditorState().read(()=>{const e=ao();let t;if(Wr(e)&&(t=e.focus.getNode().getParent()),Ur(e)&&(t=e.getNodes()[0]),vc(t)||hc(t)){const e=t.getURL();setTimeout(()=>{const t=window.open(e,"_blank");t?.focus()},0)}}),!1),ci)),[e,n]),null};function Cz(e){const{anchor:t,focus:n}=e,r=t.getNode(),o=n.getNode();return r===o?r:e.isBackward()?Za(n)?r:o:Za(t)?r:o}const Ez=new Set(["http:","https:","mailto:","sms:","tel:"]),Tz=e=>{const t=e;return t.password="",t.username="",t};function Az(e){try{const t=new URL(e);return Ez.has(t.protocol)?{url:Tz(t).toString(),target:"_blank"}:{url:"about:blank"}}catch{return{url:e,target:"_blank"}}}const Lz=/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%/.\w-_]*)?\??(?:[-+=&;%@.\w_]*)#?(?:[\w]*))?)/;function Mz(e){return"https://"===e||Lz.test(e)}const Rz=Gb(aw)(({theme:e})=>({background:e.palette.common.white,display:"flex",alignItems:"center",padding:e.spacing(1)})),Nz=({anchorEl:e,link:t,onChanged:n,onOpened:r})=>{const o=Boolean(e),i=k(null),[s,a]=S(t);w(()=>{a(t)},[t]);const l=M(()=>{n(s),window.open(Az(s).url,"_blank"),r()},[s,r,n]),c=M(e=>{e.preventDefault(),e.stopPropagation(),n(s)},[s,n]),u=M(e=>{"Enter"===e.key&&(e.preventDefault(),e.stopPropagation(),n(s))},[s,n]),d=M(e=>{e.preventDefault(),a(e.currentTarget.value)},[]);return xz.jsx(k_,{open:o,anchorEl:e,placement:"bottom-start",sx:{zIndex:2},transition:!0,children:({TransitionProps:e})=>xz.jsx(fw,{...e,children:xz.jsx(by,{className:"tekPopperMenu",children:xz.jsxs(Rz,{direction:"row",children:[xz.jsx(F_,{ref:i,placeholder:t,margin:"dense",size:"small",value:s,onChange:d,onKeyDown:u}),xz.jsx($y,{onClick:l,children:xz.jsx(Gw,{})}),xz.jsx($y,{onClick:c,children:xz.jsx(Yw,{})})]})})})})},Oz=()=>{const[e]=vu(),t=wd(),[n,r]=S(null),[o,i]=S(""),s=k(!1),a=M(()=>{if(s.current)return s.current=!1,!1;const t=ao();if(Wr(t)){const n=Cz(t),o=n.getParent();if(vc(o)||vc(n))return r(null),i(""),!1;let s;if(hc(o)&&(s=o),hc(n)&&(s=n),hc(s)){const t=e.getElementByKey(s.getKey());return i(s.getURL()),r(t),!0}r(null),i("")}return!1},[e]),l=M(t=>{s.current=!0,e.update(()=>{e.dispatchCommand(bc,Az(t))},{onUpdate:()=>{r(null)}})},[e]),c=M(()=>{r(null)},[]);return w(()=>Ka(e.registerCommand(Ct,()=>a(),1),e.registerCommand(Tt,()=>a(),1)),[e,a]),t?xz.jsx(Nz,{anchorEl:n,link:o,onChanged:l,onOpened:c}):null};function Pz(){return xz.jsx(Vw,{validateUrl:Mz})}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('.tek__editor__container {\n color: #000;\n position: relative;\n line-height: 1.25;\n font-weight: 400;\n text-align: left;\n resize: none;\n height: 100%;\n overflow-y: auto;\n}\n.tek__editor__container {\n -ms-overflow-style: none; /* Internet Explorer and Edge */\n scrollbar-width: none; /* Firefox */\n}\n.tek__editor__container::-webkit-scrollbar {\n display: none;\n}\n\n.tek__editor__container__scrollbar:hover {\n -ms-overflow-style: auto;\n scrollbar-width: thin;\n scrollbar-color: lightgray transparent;\n}\n.tek__editor__container__scrollbar:hover::-webkit-scrollbar {\n display: block;\n}\n\n.tek__editor__Wrapper {\n position: relative;\n background-color: transparent;\n flex: 1;\n height: 100%;\n}\n\n.tek__editor__input {\n font-size: 16px;\n caret-color: rgb(5, 5, 5);\n position: relative;\n tab-size: 1;\n outline: 0;\n caret-color: #444;\n min-height: 0px;\n color: #404040;\n display: block;\n background-color: transparent;\n}\n\n.tek__editor__placeholder {\n color: #999;\n overflow: hidden;\n position: absolute;\n text-overflow: ellipsis;\n top: 0px;\n left: 0px;\n font-size: 16px;\n user-select: none;\n display: inline-block;\n pointer-events: none;\n}\n\n.tek__editor__logo {\n display: flex;\n flex: 1;\n align-items: center;\n justify-content: center;\n color: #999;\n overflow: hidden;\n}\n\n.tek__editor__paragraph {\n margin: 0 0 0 0;\n position: relative;\n cursor: auto;\n}\n\n.tek__ltr {\n text-align: left;\n}\n\n.tek__rtl {\n text-align: right;\n}\n\n.tek__h1 {\n font-size: 28px;\n color: rgb(5, 5, 5);\n font-weight: bold;\n margin: 0px 0px 0.5em;\n}\n.tek__h2 {\n font-size: 16px;\n color: rgb(101, 103, 107);\n font-weight: 700;\n margin: 0px 0px 0.25em;\n text-transform: uppercase;\n}\n.tek__h3 {\n font-size: 12px;\n text-transform: uppercase;\n margin: 0px 0px 0.25em;\n}\n\n.tek__textBase {\n -webkit-user-select: text;\n user-select: text;\n}\n\n.tek__textBold {\n font-weight: bold;\n}\n\n.tek__textItalic {\n font-style: italic;\n}\n\n.tek__textUnderline {\n text-decoration: underline;\n}\n\n.tek__ol1 {\n padding: 0;\n margin: 0;\n list-style-position: inside;\n}\n.tek__ol2 {\n padding: 0;\n margin: 0;\n list-style-type: upper-alpha;\n list-style-position: inside;\n}\n.tek__ol3 {\n padding: 0;\n margin: 0;\n list-style-type: lower-alpha;\n list-style-position: inside;\n}\n.tek__ol4 {\n padding: 0;\n margin: 0;\n list-style-type: upper-roman;\n list-style-position: inside;\n}\n.tek__ol5 {\n padding: 0;\n margin: 0;\n list-style-type: lower-roman;\n list-style-position: inside;\n}\n.tek__ul {\n padding: 0;\n margin: 0;\n list-style-position: inside;\n}\n.tek__listItem {\n margin: 0 12px;\n}\n.tek__nestedListItem {\n list-style-type: none;\n}\n.tek__nestedListItem:before,\n.tek__nestedListItem:after {\n display: none;\n}\n\n.tek__quote {\n margin: 0;\n margin-left: 12px;\n margin-bottom: 10px;\n font-size: 15px;\n color: rgb(101, 103, 107);\n border-left-color: rgb(206, 208, 212);\n border-left-width: 4px;\n border-left-style: solid;\n padding-left: 16px;\n}\n\n.tek__table {\n border-collapse: collapse;\n border-spacing: 0;\n table-layout: fixed;\n position: relative;\n margin-top: 8px;\n margin-bottom: 8px;\n padding: 0;\n overflow: hidden;\n}\n\n.tek__tableCell {\n border: 1px solid rgb(206, 208, 212);\n vertical-align: center;\n text-align: start;\n padding: 6px 8px;\n position: relative;\n cursor: default;\n outline: none;\n margin: 8px;\n line-height: 1.25;\n}\n\n.tek__tableCellNoBorder {\n border: none;\n background: transparent;\n vertical-align: center;\n text-align: start;\n padding: 6px 8px;\n position: relative;\n cursor: default;\n outline: none;\n margin: 8px;\n}\n\n.tek__tableCellNoBorderEditMode {\n border: none;\n background: transparent;\n vertical-align: center;\n text-align: start;\n padding: 6px 8px;\n position: relative;\n cursor: default;\n outline: none;\n margin: 8px;\n}\n\n.tek__resizer {\n position: absolute;\n width: 6px;\n right: 0;\n top: 0;\n bottom: 0;\n cursor: col-resize;\n user-select: none;\n background-color: #009845;\n pointer-events: all;\n z-index: 2;\n opacity: 0;\n transition: opacity 0.3s ease; /* Transition effect */\n transform: translate(-3px, 0);\n}\n.tek__resizer:hover {\n opacity: 0.2;\n}\n\n.tek__resizeContainer {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 100%;\n z-index: 1;\n user-select: none;\n pointer-events: none;\n margin: 0;\n padding: 0;\n}\n\n.tek__tableActionButton {\n position: absolute;\n top: 0;\n left: 0;\n pointer-events: none;\n background-color: "white";\n user-select: none;\n}\n\n.tek__tekCellHighlight {\n background-color: rgba(100, 149, 237, 0.1);\n}\n\n.tek__resizeIndicatorDisplay {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: 0;\n background-color: #54565a;\n color: white;\n text-align: center;\n font-size: 12px;\n padding: 2px;\n overflow: hidden;\n border-radius: 4px;\n width: 48px;\n height: 16px;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n}\n\n.tek__leftResizerIndicator {\n left: -54px;\n}\n\n.tek__rightResizerIndicator {\n right: -54px;\n}\n');const Iz=({children:e})=>xz.jsx(Vb,{theme:bS(),children:e}),zz={namespace:"text-editor-kit",theme:{ltr:"tek__ltr",rtl:"tek__rtl",paragraph:"tek__editor__paragraph",placeholder:"text_editor__placeholder",quote:"tek__quote",table:"tek__table",tableCell:"tek__tableCell",heading:{h1:"tek__h1",h2:"tek__h2",h3:"tek__h3"},text:{base:"tek__textBase",bold:"tek__textBold",italic:"tek__textItalic",underline:"tek__textUnderline"},list:{listitem:"tek__listItem",nested:{listitem:"tek__nestedListItem"},olDepth:["tek__ol1","tek__ol2","tek__ol3","tek__ol4","tek__ol5"],ul:"tek__ul"},image:"tek__image"},nodes:[ad,od,ru,Qc,dc,gc],onError:e=>{console.log(e)}},jz=({children:e,initialConfig:t,flags:n})=>xz.jsx(Iz,{children:xz.jsx("div",{className:"tek__editor__Wrapper",children:xz.jsx(Eu,{initialConfig:t||zz,children:xz.jsxs("div",{className:"tek__editor__container"+(n?.isEnabled("QB_26358_SN_TEXT_SCROLLBAR")?" tek__editor__container__scrollbar":""),children:[e,xz.jsx(Nu,{}),xz.jsx(Ou,{}),xz.jsx(Pz,{}),xz.jsx(Sz,{}),xz.jsx(Oz,{}),xz.jsx(kz,{}),xz.jsx(Ru,{})]})})})});let Dz=class e extends Yo{__hasBorders;static getType(){return"TekCellNode"}static clone(t){return new e(t.__hasBorders,t.__key)}static importJSON(t){return new e(void 0===t.hasBorders||t.hasBorders)}constructor(e,t){super(t),this.__hasBorders=e}exportJSON(){return{...super.exportJSON(),hasBorders:this.__hasBorders,type:"TekCellNode",version:1}}createDOM(e,t){const n=document.createElement("td");return n.classList.add(e.theme.tableCell||""),this.__hasBorders||(t.isEditable()?n.classList.add("tek__tableCellNoBorderEditMode"):n.classList.add("tek__tableCellNoBorder")),n}updateDOM(e,t){return this.__hasBorders?t.classList.remove("tek__tableCellNoBorder"):t.classList.add("tek__tableCellNoBorder"),this.__hasBorders!==e.__hasBorders}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}toggleBorders(){this.getWritable().__hasBorders=!this.__hasBorders}};const Fz=e=>new Dz(e),Bz=e=>e instanceof Dz;let $z=class e extends Yo{__needsUpdate;__hasBorders;__width;static getType(){return"TekTableNode"}static clone(t){return new e(t.__hasBorders,t.__width,t.__key)}static importJSON(t){const n=void 0===t.hasBorders||t.hasBorders,r=void 0===t.width?"100%":t.width;return new e(n,r)}constructor(e,t,n){super(n),this.__needsUpdate=!1,this.__hasBorders=e,this.__width=t}exportJSON(){return{...super.exportJSON(),hasBorders:this.__hasBorders,width:this.__width,type:"TekTableNode",version:1}}createDOM(e){const t=document.createElement("table");return t.classList.add(e.theme.table||""),t.style.width=this.__width,t}updateDOM(e){const t=this.__needsUpdate;try{e.__needsUpdate&&(this.getWritable().__needsUpdate=!1)}catch{}return t||this.__width!==e.__width}markNeedsUpdate(){this.getWritable().__needsUpdate=!0}canBeEmpty(){return!1}canExtractContents(){return!1}isShadowRoot(){return!0}canSelectBefore(){return!0}canIndent(){return!1}getResizeNode(){return this.getChildAtIndex(1)}toggleBorders(){this.getWritable().__hasBorders=!this.__hasBorders}setWidth(e){this.getWritable().__width=e}isValid(){const e=this.getChildren();return!(e.length<3)&&"TekColGroupNode"===e[0].getType()&&"TEK_TABLE_RESIZE_NODE"===e[1].getType()&&"TekRowNode"===e[2].getType()}};function Hz(e){return e instanceof $z}let Wz=class e extends Yo{static getType(){return"TekRowNode"}static clone(t){return new e(t.__key)}static importJSON(){return new e}exportJSON(){return{...super.exportJSON(),type:"TekRowNode",version:1}}createDOM(){return document.createElement("tr")}updateDOM(){return!1}isShadowRoot(){return!0}canBeEmpty(){return!1}canIndent(){return!1}};function Kz(e){return e instanceof Wz}const Uz=e=>{let t=e;for(;null!==t;)if(t=t.getParent(),Bz(t))return t;return null},Gz=e=>{let t=e;for(;null!==t;){if(Hz(t))return t;t=t?.getParent()}return null},Yz=(e,t)=>{const n=Gz(e);if(n){const e=t.getElementByKey(n.getKey());if(e)return e}return null},Vz=e=>{const t=e?.getChildAtIndex(2);return t},Jz=e=>{const t=e.getParent();if(Kz(t)){const n=t.getChildren();for(let t=0;t<n.length;t++)if(n[t]===e)return t}return-1},qz=(e,t)=>e?.01*parseFloat(e.getAttribute("width")||"0")*t.offsetWidth:0,Xz=(e,t)=>{const n=e/t.offsetWidth;return`${Math.min(100*n,100).toFixed(2)}%`},Qz=e=>e?e.getChildren().filter(e=>Kz(e)):[],Zz=e=>{let t=!1;return Qz(e).forEach(e=>{e.getChildren().forEach(e=>{const n=e;n.clear(),n.append(ai()),t=!0})}),t},ej=e=>{const t=ao();if(Wr(t)||Ur(t)){const n=t.getNodes().filter(e=>Bz(e));if(n.length>0){e.preventDefault(),e.stopPropagation();const r=t.getNodes().some(e=>Hz(e)),o=Gz(n[0]),i=Qz(o),s=i[0]?.getChildren();if(s.length*i.length===n.length&&r)return o?.selectPrevious(),o?.remove(),!1;if(Wr(t)){const e=t.focus.getNode();if(Hz(e))return Zz(e)}return n.forEach(e=>{e.clear(),e.append(ai())}),(()=>{const e=ao();let t=!1;if(Wr(e)){const n=e.anchor.getNode(),r=e.focus.getNode();let o=Gz(n);!o&&Hz(r)&&(o=r),Hz(o)&&(t=Zz(o))}return t})()}if(Wr(t)){const e=t.focus.getNode();if(Hz(e))return Zz(e)}}return!1},tj=e=>{if(e){const t=Gz(e);if(Hz(t)){const n=e.getParent(),r=Qz(t).findIndex(e=>e===n),o=n?.getChildren().findIndex(t=>t===e);return{i:r,j:o,tableNode:t,row:n}}}return{i:0,j:0,tableNode:null,row:null}},nj=e=>{let t=e;for(;null!==t;)if(t=t.getParent(),Bz(t))return t;return null},rj=e=>{const t=[];return Qz(e).forEach(e=>{const n=e.getChildren();t.push(...n)}),t},oj=(e,t)=>{rj(e).forEach(e=>{const n=t.getElementByKey(e.getKey());n?.classList.add("tek__tekCellHighlight")})},ij=kt("UPDATE_COL_WIDTHS_COMMAND"),sj=kt("BEGIN_COL_RESIZE"),aj=kt("END_COL_RESIZE"),lj=kt("INSERT_TEK_TABLE_COMMAND"),cj=({colKey:e,startX:t,onMouseDown:n})=>{const r=M(t=>{n(t,e)},[e,n]);return xz.jsx("div",{role:"button","aria-label":"resize",tabIndex:-1,className:"tek__resizer",style:{left:`${t}%`},onMouseDown:r})},uj=(e,t)=>{const n=document.createElement("div");return n.classList.add("tek__resizeIndicatorDisplay"),n.classList.add(e),n.id=t,n},dj=e=>`${parseFloat(e.getAttribute("width")||"0").toFixed(2)}%`,fj=({nodeKey:e,colWidths:t})=>{const[n]=vu(),r=wd(),[o,i]=S(null),s=k(null),a=k(null),l=k(null),c=k(null),u=M(t=>{const n=Fi(e);if(n){const e=n.getParent();if(Hz(e)){const n=Vz(e);if("TekRowNode"===n?.getType()){const e=n.getChildren(),r=[];let o=0;e.forEach((e,n)=>{const i=parseFloat(t[n]);o+=i,r.push({key:e.getKey(),startX:o})}),i(r)}}}},[e]),d=M(e=>{if(s.current){const{clientX:t,col:n,tableElement:r,curColWidth:o,resizer:i,left:a,nxt:u,parentDomNode:d,currentTableWidth:f}=s.current,p=e.clientX-t,h=Xz(a+p,r);if(u){const e=o+p;if(e<60)return;const t=Xz(e,r),a=s.current.nxtColWidth-p,d=Xz(a,r);if(a<60)return;n.setAttribute("width",t),u.setAttribute("width",d),i.style.left=h,l.current&&(l.current.innerText=t),c.current&&(c.current.innerText=d)}else if(d){i.style.left="100%";const e=f+p,{clampedWidths:t,fullyClamped:n,clampedTableWidth:o}=((e,t)=>{const n=[],r=e.rows[0];let o=0,i=0;for(let e=0;e<r.cells.length;e++){const s=Math.max(r.cells[e].offsetWidth,60);60===s&&o++,i+=s;const a=s/t,l=Math.min(100*a,100);n.push(`${l.toFixed(2)}%`)}return{clampedWidths:n,fullyClamped:o===r.cells.length,clampedTableWidth:i}})(r,e),s=Xz(e,d),a=Xz(o,d);r.style.width=!n||p>0?s:a,r.querySelectorAll(":scope > colgroup col").forEach((e,n)=>{e.setAttribute("width",t[n])}),n||l.current&&(l.current.innerText=s)}}},[]),f=M(()=>{if(document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",f),s.current){s.current.resizer.style.opacity="",l.current=null,c.current=null;const e=(e=>{const t=e.rows[0],n=[];for(let r=0;r<t.cells.length;r++){const o=Math.max(t.cells[r].offsetWidth,60);n.push(Xz(o,e))}return n})(s.current.tableElement);s.current.tableElement.querySelectorAll(":scope > colgroup col").forEach((t,n)=>{t.setAttribute("width",e[n])}),(e=>{const t=document.getElementById("leftGripper"),n=document.getElementById("rightGripper");t&&e.removeChild(t),n&&e.removeChild(n)})(s.current.resizer),n.dispatchCommand(aj,void 0)}s.current=null,a.current=null,n.update(()=>{const t=Fi(e),r=Yz(t,n),s=t?.getParent();if(r&&s){const t=r.querySelectorAll(":scope > colgroup col"),a=[];t.forEach(e=>{a.push(e.getAttribute("width")||"0")}),s.setWidth(r.style.width);let l=0;if(o){const e=o.map((e,t)=>{const n={...e};return l+=parseFloat(a[t]),n.startX=l,n});i(e)}n.dispatchCommand(ij,{colWidths:a,nodeKey:e})}})},[d,n,e,o]),p=M((e,t)=>{e.preventDefault(),e.stopPropagation(),document.addEventListener("mousemove",d,{passive:!0}),document.addEventListener("mouseup",f),n.getEditorState().read(()=>{const r=Fi(t),o=Yz(r,n);if(Bz(r)){const t=Jz(r);if(-1!==t&&o){const r=o.querySelectorAll(":scope > colgroup col"),i=r[t],a=r.length>t+1?r[t+1]:null,u=qz(i,o),d=e.target,f=.01*parseFloat(d.style.left),p=o.offsetWidth*f,h=qz(a,o),g=o.parentElement,m=.01*parseFloat(o.style.width),v=(g?.offsetWidth||0)*m,b=((e,t,n)=>{const r=uj("tek__leftResizerIndicator","leftGripper");r.innerText=dj(e);let o=null;return t?(o=uj("tek__rightResizerIndicator","rightGripper"),o.innerText=dj(t)):r.innerText=n.style.width,{left:r,right:o}})(i,a,o);l.current=b.left,c.current=b.right,d.appendChild(b.left),b.right&&d.appendChild(b.right),d.style.opacity="1",s.current={resizer:d,curColWidth:u,col:i,tableElement:o,clientX:e.clientX,left:p,nxt:a,nxtColWidth:h,parentDomNode:g,currentTableWidth:v},n.dispatchCommand(sj,void 0)}}})},[n,d,f]);return w(()=>{n.getEditorState().read(()=>{u(t)})},[u,n,t]),xz.jsx(xz.Fragment,{children:o&&r?o.map(e=>xz.jsx(cj,{colKey:e.key,startX:e.startX,onMouseDown:p},e.key)):null})},pj="TEK_TABLE_RESIZE_NODE";let hj=class e extends qo{__colWidths;static getType(){return pj}static clone(t){return new e(t.__colWidths,t.__key)}static importJSON(t){return new e(t.colWidths)}constructor(e,t){super(t),this.__colWidths=e}exportJSON(){return{colWidths:this.__colWidths,type:pj,version:1}}createDOM(){const e=document.createElement("div");return e.classList.add("tek__resizeContainer"),e}updateDOM(){return!1}setColWidths(e){this.getWritable().__colWidths=e}removeCol(e){this.getWritable().__colWidths.splice(e,1)}decorate(){return xz.jsx(fj,{nodeKey:this.__key,colWidths:this.__colWidths})}isInline(){return!0}isIsolated(){return!0}isKeyboardSelectable(){return!1}};const gj=e=>e instanceof hj,mj=({nodeKey:e,colWidths:t})=>{const[n]=vu(),[r,o]=S(t);return w(()=>{n.getEditorState().read(()=>{const t=Fi(e),n=t?.getParent();if(Hz(n)){const e=n.getResizeNode();if(gj(e)){const t=e.__colWidths.map(e=>e);o(t)}}})},[n,e]),xz.jsx(xz.Fragment,{children:r.map((t,n)=>xz.jsx("col",{span:1,width:t},`${e}.${n}`))})};class vj extends qo{__colWidths;static getType(){return"TekColGroupNode"}static clone(e){return new vj(e.__colWidths,e.__key)}static importJSON(e){return new vj(e.colWidths)}constructor(e,t){super(t),this.__colWidths=e}exportJSON(){return{colWidths:this.__colWidths,type:"TekColGroupNode",version:1}}createDOM(){return document.createElement("colgroup")}setColWidths(e){this.getWritable().__colWidths=e}removeCol(e){this.getWritable().__colWidths.splice(e,1)}updateDOM(){return!1}decorate(){return xz.jsx(mj,{nodeKey:this.__key,colWidths:this.__colWidths})}isInline(){return!0}isIsolated(){return!0}isKeyboardSelectable(){return!1}}class bj extends qo{__formatStyle;constructor(e,t){super(t),this.__formatStyle=e}setFormatStyle(e){this.getWritable().__formatStyle=e}hasStyle(e){return void 0!==this.__formatStyle[e]&&""!==this.__formatStyle[e]}getTextFormatStyle(e,t){return this.hasStyle(e)?this.__formatStyle[e]:t}}const yj=[$z,Dz,Wz,vj,hj],xj=(e,t)=>{const n=100/e,r=Array(e).fill(`${n}%`),o=t?.getChildAtIndex(0),i=t?.getChildAtIndex(1);o.setColWidths(r),i.setColWidths(r),t?.markNeedsUpdate()},_j=()=>{const e=ao();if(Wr(e)){const t=e.anchor.getNode(),n=Uz(t);if(n){const e=Jz(n),t=Gz(n),r=Qz(t),o=(r[0]?.getChildren().length||1)-1;if(0===o)return t?.selectPrevious(),void t?.remove();r.forEach(t=>{t.getChildAtIndex(e)?.remove()}),xj(o,t)}}},wj=()=>{const e=ao();if(Wr(e)){const t=e.anchor.getNode(),n=Uz(t),r=Gz(n);if(r&&3===r.getChildren().length)return Yi(null),void r.remove();if(n){const{row:e}=tj(n);Yi(null),e?.remove()}}},Sj=()=>{const e=ao();if(Wr(e)){const t=e.anchor.getNode(),n=Gz(t),r=Vz(n);if(Kz(r)&&n){const e=r.getChildren().length,t=new Wz;for(let r=0;r<e;r++){const e=Fz(n?.__hasBorders);e.append(ai()),t.append(e)}n?.append(t)}}},kj=()=>{const e=ao();if(Wr(e)){const t=e.anchor.getNode(),n=Gz(t);if(Hz(n)){const e=Qz(n);let t=null;const r=(e[0]?.getChildren().length||-1)+1;for(let r=0;r<e.length;r++){const o=Fz(n.__hasBorders);o.append(ai()),e[r].append(o),t=o}return xj(r,n),t}}return null},Cj=Gb($y)({backgroundColor:"white",boxShadow:"0 2px 4px rgba(0,0,0,0.15)"}),Ej=({onDeleteAction:e,onAction:t,onClick:n})=>{const[r]=vu(),[o,i]=S(null),s=AI(),a=Boolean(o),l=M((e,t,n)=>{e.preventDefault(),e.stopPropagation(),r.update(()=>{t()},{onUpdate:()=>{i(null),n()}})},[r]),c=M(e=>{e.preventDefault(),e.stopPropagation(),n(),i(e.currentTarget)},[n]),u=M(()=>{i(null)},[]),d=M(e=>{l(e,Sj,t)},[l,t]),f=M(e=>{l(e,kj,t)},[l,t]),p=M(t=>{l(t,wj,e)},[l,e]),h=M(t=>{l(t,_j,e)},[l,e]),g=M(()=>{r.update(()=>{(()=>{const e=ao();if(Wr(e)){const t=e.anchor.getNode(),n=Gz(t);Hz(n)&&(n.selectPrevious(),n.remove())}})()},{onUpdate:()=>{i(null),e()}})},[r,e]),m=M(e=>{e.preventDefault(),e.stopPropagation(),r.update(()=>{(()=>{const e=ao();if(Wr(e)){const t=e.anchor.getNode(),n=Gz(t);n&&(n.toggleBorders(),rj(n).forEach(e=>{e.toggleBorders()}))}})()})},[r]);return w(()=>Ka(r.registerCommand(Ct,()=>(i(null),!1),4)),[r]),xz.jsx(ew,{onClickAway:u,mouseEvent:"onMouseDown",touchEvent:"onTouchStart",children:xz.jsxs("div",{children:[xz.jsx(Cj,{size:"small",onClick:c,children:xz.jsx(OM,{height:12})}),xz.jsx(k_,{sx:{zIndex:2},open:a,anchorEl:o,placement:"auto-end",children:xz.jsx(by,{id:"tekTableMenu",className:"tekPopperMenu",children:xz.jsxs(Lw,{dense:!0,children:[xz.jsx(Pw,{onClick:m,children:s("ToggleBorders")}),xz.jsx(sw,{}),xz.jsx(Pw,{onClick:d,children:s("AddNewRow")}),xz.jsx(Pw,{onClick:f,children:s("AddNewColumn")}),xz.jsx(sw,{}),xz.jsx(Pw,{onClick:p,children:s("DeleteRow")}),xz.jsx(Pw,{onClick:h,children:s("DeleteCol")}),xz.jsx(sw,{}),xz.jsx(Pw,{onClick:g,children:s("DeleteTable")})]})})})]})})},Tj=()=>{const[e]=vu(),t=wd(),[n,r]=S(null),[o,i]=S(!1),s=Boolean(n),a=C.useContext(nh),l=k(null),c=M(()=>{o||e.update(()=>{const t=ao();if(Wr(t)){const n=Uz(t.anchor.getNode());if(Bz(n)){const t=e.getElementByKey(n.getKey());r(t)}else r(null)}})},[e,o]);w(()=>{const e=e=>{0!==e.buttons?null===l.current&&(l.current=setTimeout(()=>{i(!0),r(null)},300)):(i(!1),clearTimeout(l.current),l.current=null)};return document.addEventListener("mousemove",e),()=>{document.removeEventListener("mousemove",e)}},[]),w(()=>Ka(e.registerCommand(Ct,()=>(c(),!1),ci),e.registerCommand(sj,()=>(r(null),!0),4),e.registerCommand(aj,()=>(c(),!0),4)),[e,c]),w(()=>{r(null)},[t]);const u=M(()=>{r(null)},[]),d=M(()=>{r(null),setTimeout(()=>{c()},0)},[c]),f=M(()=>{clearTimeout(l.current)},[]);return xz.jsx(k_,{open:!!s&&t,anchorEl:n,placement:"top-end",sx:{zIndex:2},disablePortal:!0,modifiers:[{name:"offset",options:{offset:[-6,-parseInt(a.components?.MuiButton?.styleOverrides?.sizeSmall?.height||"24",10)]}}],children:xz.jsx(Ej,{onDeleteAction:u,onAction:d,onClick:f})})},Aj=e=>{const t=[];for(const[n,r]of e)if("created"===r){const e=Fi(n),r=e?.getParent();Zo(r)&&null!==e&&t.push(e)}if(t.length>0){const e=ai();t[0].insertBefore(e),e.select(),t.forEach(e=>{e.remove()})}},Lj=()=>{const[e]=vu(),t=wd();return w(()=>Ka(e.registerMutationListener(Dz,t=>{e.update(()=>{Aj(t)})}),e.registerMutationListener(Wz,t=>{e.update(()=>{Aj(t)})}),e.registerMutationListener($z,t=>{e.update(()=>{for(const[e,n]of t)if("created"===n||"updated"===n){const t=Fi(e);if(Hz(t)&&!t.isValid()){const e=ai();t.insertBefore(e),e.select(),t.remove()}}})}),e.registerCommand(lj,()=>(e.update(()=>{const e=(()=>{const e=["50%","50%"],t=new $z(!0,"100%"),n=new vj(e),r=new hj(e),o=[];for(let t=0;t<2;t++){const t=new Wz;for(let n=0;n<e.length;n++){const e=Fz(!0),n=ai();e.append(n),t.append(e)}o.push(t)}return t.append(n,r,...o),t})();ml(e)}),!0),ci),e.registerCommand(ij,({colWidths:e,nodeKey:t})=>{const n=Fi(t);if(gj(n)){n.setColWidths(e);const t=n.getParent(),r=t?.getChildAtIndex(0);(function(e){return e instanceof vj})(r)&&r.setColWidths(e)}return!0},4),e.registerCommand(qt,t=>t?.shiftKey?(t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),e.update(()=>{(()=>{const e=ao();if(Wr(e)){const t=e.focus.getNode(),n=Gz(t),r=nj(t);if(Hz(n)){const e=ai();e.append(Nr("")),n.insertBefore(e,!1),e.select()}}})()}),!0):!!t?.ctrlKey&&(t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),e.update(()=>{(()=>{const e=ao();if(Wr(e)){const t=e.focus.getNode(),n=Gz(t);if(Hz(n)){const e=ai();e.append(Nr("")),n.insertBefore(e),n.insertAfter(e),n.selectNext()}}})()}),!0),4),e.registerCommand(Qt,e=>ej(e),4),e.registerCommand(en,e=>ej(e),4),e.registerCommand(tn,e=>{const t=ao();if(Wr(t)){const n=t.focus.getNode(),{depth:r,tekCell:o}=(e=>{let t=e,n=0;for(;null!==t;){if(t=t.getParent(),Bz(t))return{depth:n,tekCell:t};n++}return{depth:Number.MAX_SAFE_INTEGER,tekCell:null}})(n);if(r<=1)return e.preventDefault(),((e,t)=>{const{i:n,j:r,tableNode:o,row:i}=e,s=t?1:-1;if(i&&o){const e=i.getChildAtIndex(r+s);if(e)e.getChildAtIndex(0).selectEnd();else{let e=0;t||0!==r||(e=i.getChildren().length-1);const a=o.getChildAtIndex(n+2+s);if(Kz(a)){const t=a?.getChildAtIndex(e);(t?.getChildAtIndex(0)).selectEnd()}}}})(tj(o),!e.shiftKey),!0}return!1},ci),e.registerCommand(fn,e=>{const t=e?.target,n=ao();if(t.classList.contains("tek__table")&&Wr(n)&&Hz(n.anchor.getNode()))return e?.preventDefault(),e?.stopPropagation(),!0;if(Wr(n)){const t=n.getNodes().some(e=>Bz(e)),r=n.getNodes().some(e=>Hz(e));if(t&&!r)return e?.preventDefault(),e?.stopPropagation(),!0}return!1},4)),[e]),w(()=>e.registerCommand(Ct,()=>(t&&e.update(()=>{(e=>{const t=ao(),n=[];if(us($z).forEach(e=>{const t=rj(e);n.push(...t)}),Wr(t)){t.getNodes().filter(e=>Hz(e)).forEach(t=>{oj(t,e)});const n=t.focus.getNode();if(Hz(n))return void oj(n,e)}if(Wr(t)||Ur(t)){const r=new Set(t.getNodes().map(e=>nj(e)));for(let t=0;t<n.length;t++){const o=e.getElementByKey(n[t].getKey());r.has(n[t])?o?.classList.add("tek__tekCellHighlight"):o?.classList.remove("tek__tekCellHighlight")}}})(e)},{tag:"history-merge"}),!1),4),[e,t]),w(()=>{e.update(()=>{t||(e=>{const t=[];us($z).forEach(e=>{const n=rj(e);t.push(...n)}),t.forEach(t=>{const n=e.getElementByKey(t.getKey());n?.classList.remove("tek__tekCellHighlight")})})(e)})},[t,e]),null},Mj=()=>xz.jsxs(xz.Fragment,{children:[xz.jsx(Lj,{}),xz.jsx(Tj,{})]}),Rj=()=>{const e=wd(),t=AI();return e?xz.jsx("div",{className:"tek__editor__placeholder",children:t("EnterText")}):xz.jsx("div",{className:"tek__editor__logo",children:xz.jsx(ZI,{height:32})})},Nj=({showPlaceholder:e})=>xz.jsxs("div",{style:{position:"relative"},children:[xz.jsx(MI,{}),xz.jsx(XI,{contentEditable:xz.jsx(jI,{className:"tek__editor__input"}),placeholder:!1!==e?xz.jsx(Rj,{}):null,ErrorBoundary:WI})]}),Oj=Gb(aw)(({theme:e})=>({background:e.palette.common.white,height:e.spacing(4),display:"flex",alignItems:"center",paddingInline:e.spacing(.5),overflow:"auto",scrollbarWidth:"thin",width:"fit-content","&::-webkit-scrollbar":{height:"0.2em"},"&::-webkit-scrollbar-track":{background:"#f1f1f1"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#AAA"},"&::-webkit-scrollbar-thumb:hover":{background:"#AAA"}})),Pj=["Source Sans Pro, sans-serif","American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],Ij="#404040",zj="16px",jj=v({textFormat:{bold:!1,italic:!1,underline:!1},blockFormat:{blockType:"normal",fontName:Pj[0],fontSize:"16px",fontColor:"#404040",align:"left",isLink:!1}}),Dj=({children:e})=>{const t=(()=>{const[e]=vu(),[t,n]=S(!1),[r,o]=S(!1),[i,s]=S(!1),[a,l]=S("paragraph"),[c,u]=S(Pj[0]),[d,f]=S(zj),[p,h]=S(Ij),[g,m]=S("left"),[v,b]=S(!1),y=M(()=>{const t=ao();if(Wr(t)){const r=t.anchor.getNode();let i="root"===r.getKey()?r:Ys(r,e=>{const t=e.getParent();return null!==t&&_s(t)});null===i&&(i=r.getTopLevelElementOrThrow());const a=i.getKey();let c=i;if(null!==e.getElementByKey(a))if(cu(i)){const e=hl(r,ru),t=e?e.getListType():i.getListType();l(t)}else{const e=fd(i)?i.getTag():i.getType();l(e)}if(cu(i)||fd(i)){const e=hl(i,ii);e&&(c=e)}const d=Cz(t);if(hc(d.getParent())||hc(d)?b(!0):b(!1),li(c)){const e=c.getFormatType();m(""===e?"left":e)}n(t.hasFormat("bold")),o(t.hasFormat("italic")),s(t.hasFormat("underline"));const p=ul(t,"font-family",Pj[0]),g=ul(t,"font-size",zj);u(""===p?Pj[0]:p),f(""!==g&&g?g:zj),h(ul(t,"color",Ij))}else Ur(t)&&t.getNodes().forEach(e=>{if(function(e){return e instanceof bj}(e)){n(e.hasStyle("fontWeight")),o(e.hasStyle("fontStyle")),s(e.hasStyle("textDecoration")),h(e.getTextFormatStyle("color",Ij));const t=e.getTextFormatStyle("fontSize",zj),r=e.getTextFormatStyle("fontFamily",Pj[0]);f(t),u(r);const i=e.getParent();if(null!==i){const e=(e=>{if(nu(e)){const t=hl(e,ru);return t?t.getListType():"bullet"}return fd(e)?e.getTag():e.getType()})(i);l(e)}}})},[e]);return w(()=>Ka(e.registerUpdateListener(({editorState:e})=>{e.read(()=>{y()})}),e.registerCommand(Ct,()=>(e.getEditorState().read(()=>{y()}),!1),ci)),[e,y]),{textFormat:{bold:t,italic:r,underline:i},blockFormat:{blockType:a,fontName:c,fontSize:d,fontColor:p,align:g,isLink:v}}})();return xz.jsx(jj.Provider,{value:t,children:e})},Fj=({children:e})=>xz.jsx(Dj,{children:xz.jsx(Oj,{sx:{display:{xs:"none",sm:"flex",md:"flex",lg:"flex"}},direction:"row",children:e})}),Bj=({anchorEl:e,children:t})=>{const n=Boolean(e);return xz.jsx(k_,{open:n,anchorEl:e,placement:"bottom-start",transition:!0,sx:{zIndex:2},children:({TransitionProps:e})=>xz.jsx(fw,{...e,children:xz.jsx(by,{className:"tekPopperMenu",children:t})})})},$j=Gb(Yy)({fontSize:12,textOverflow:"ellipsis"}),Hj=({startIcon:e,value:t,onClick:n,compact:r})=>xz.jsx(Uw,{title:t,PopperProps:{disablePortal:!0},children:xz.jsx(Q_,{style:{textTransform:"none",textOverflow:"ellipsis",flexShrink:0},size:"small",variant:"text",onClick:n,startIcon:r?void 0:e,endIcon:xz.jsx(rz,{height:12}),children:r?e:xz.jsx($j,{children:t})})}),Wj=Gb(Pw,{shouldForwardProp:e=>"active"!==e})(({theme:e,active:t})=>({background:t?e.palette.grey[200]:void 0})),Kj=[{text:"AlignLeft",align:"left",icon:()=>xz.jsx(tz,{height:12}),"data-testid":"editor-toolbar-alignLeft-btn"},{text:"AlignCenter",align:"center",icon:()=>xz.jsx(ez,{height:12}),"data-testid":"editor-toolbar-alignCenter-btn"},{text:"AlignRight",align:"right",icon:()=>xz.jsx(nz,{height:12}),"data-testid":"editor-toolbar-alignRight-btn"}],Uj=({compact:e=!1})=>{const[t]=vu(),[n,r]=S(null),{blockFormat:o}=b(jj),i=AI(),s=x(()=>Kj.find(e=>e.align===o.align)||Kj[0],[o.align]),a=M(e=>{e.preventDefault(),e.stopPropagation(),r(n?null:e.currentTarget)},[n]),l=M(()=>{r(null)},[]),c=M(e=>{r(null),t.dispatchCommand(an,e),t.focus()},[t]);return xz.jsx(ew,{onClickAway:l,mouseEvent:"onMouseDown",touchEvent:"onTouchStart",children:xz.jsxs("div",{children:[xz.jsx(Hj,{value:i(s.text),startIcon:s.icon(),onClick:a,compact:e,"data-testid":"editor-toolbar-align-btn"}),xz.jsx(Bj,{anchorEl:n,children:xz.jsx(Lw,{dense:!0,children:Kj.map(e=>xz.jsxs(Wj,{value:e.text,dense:!0,active:e.align===o.align,onClick:()=>{c(e.align)},children:[xz.jsx(ww,{children:e.icon()}),xz.jsx($j,{children:i(e.text)})]},e.align))})})]})})},Gj=({text:e,icon:t})=>xz.jsxs(xz.Fragment,{children:[xz.jsx(ww,{children:t}),xz.jsx($j,{children:e})]}),Yj=({text:e,icon:t})=>xz.jsxs(xz.Fragment,{children:[xz.jsx(ww,{children:xz.jsx($j,{fontWeight:"bold",children:t})}),xz.jsx($j,{children:e})]}),Vj=[{text:"Heading1",icon:"H1",tag:"h1"},{text:"Heading2",icon:"H2",tag:"h2"},{text:"Heading3",icon:"H3",tag:"h3"}],Jj=(e,t,n)=>({icon:xz.jsx("span",{style:{fontSize:12,fontWeight:"bold"},children:t}),text:n(e)}),qj=({compact:e=!1})=>{const[t]=vu(),{blockFormat:n}=b(jj),[r,o]=S(null),i=AI(),s=x(()=>{let e={icon:xz.jsx(az,{height:12}),text:i("Paragraph")};return"h1"===n.blockType&&(e=Jj("Heading1","H1",i)),"h2"===n.blockType&&(e=Jj("Heading2","H2",i)),"h3"===n.blockType&&(e=Jj("Heading3","H3",i)),"quote"===n.blockType&&(e.icon=xz.jsx(iz,{height:12}),e.text=i("Quote")),"bullet"===n.blockType&&(e.icon=xz.jsx(oz,{height:12}),e.text=i("UnorderedList")),"number"===n.blockType&&(e.icon=xz.jsx(sz,{height:12}),e.text=i("OrderedList")),e},[n,i]),a=M(()=>{o(null)},[]),l=M(e=>{t.update(()=>{const n=ao();Wr(n)?(nl(n,{"font-size":null}),function(e,t,n=rl){if(null===e)return;const r=e.getStartEndPoints(),o=new Map;let i=null;if(r){const[e,t]=r;i=ro(),i.anchor.set(e.key,e.offset,e.type),i.focus.set(t.key,t.offset,t.type);const n=Ys(e.getNode(),Ps),s=Ys(t.getNode(),Ps);Vo(n)&&o.set(n.getKey(),n),Vo(s)&&o.set(s.getKey(),s)}for(const t of e.getNodes())if(Vo(t)&&Ps(t))o.set(t.getKey(),t);else if(null===r){const e=Ys(t,Ps);Vo(e)&&o.set(e.getKey(),e)}for(const[e,r]of o){const o=t();n(r,o),r.replace(o,!0),i&&(e===i.anchor.key&&i.anchor.set(o.getKey(),i.anchor.offset,i.anchor.type),e===i.focus.key&&i.focus.set(o.getKey(),i.focus.offset,i.focus.type))}i&&e.is(ao())&&Yi(i)}(n,e)):Ur(n)&&n.getNodes().forEach(t=>{const n=t.getParent();n?.replace(e(),!0)}),t.focus()})},[t]),c=M((e,n)=>{o(null),t.update(()=>{const r=ao();Wr(r)&&r.getNodes().forEach(r=>{const o=r.getParent();o&&o.getType()!==e&&t.dispatchCommand(n,void 0)})}),t.focus()},[t]),u=M(e=>{o(null),l(()=>dd(e))},[l]),d=M(()=>{o(null),l(()=>ai())},[l]),f=M(()=>{o(null),l(()=>id())},[l]);return xz.jsx(ew,{onClickAway:a,mouseEvent:"onMouseDown",touchEvent:"onTouchStart",children:xz.jsxs("div",{children:[xz.jsx(Hj,{onClick:e=>{e.preventDefault(),e.stopPropagation(),o(r?null:e.currentTarget)},value:s.text,startIcon:s.icon,compact:e}),xz.jsx(Bj,{anchorEl:r,children:xz.jsxs(Lw,{dense:!0,children:[xz.jsx(Pw,{dense:!0,onClick:d,children:xz.jsx(Gj,{text:i("Paragraph"),icon:xz.jsx(az,{height:12})})}),xz.jsx(Pw,{dense:!0,onClick:f,children:xz.jsx(Gj,{text:i("Quote"),icon:xz.jsx(iz,{height:12})})}),Vj.map(e=>xz.jsx(Pw,{dense:!0,onClick:()=>{u(e.tag)},children:xz.jsx(Yj,{text:i(e.text),icon:e.icon})},e.text)),xz.jsx(sw,{}),xz.jsx(Pw,{dense:!0,onClick:()=>{c("bullet",du)},children:xz.jsx(Gj,{text:i("UnorderedList"),icon:xz.jsx(oz,{height:12})})}),xz.jsx(Pw,{dense:!0,onClick:()=>{c("number",fu)},children:xz.jsx(Gj,{text:i("OrderedList"),icon:xz.jsx(sz,{height:12})})})]})})]})})},Xj=Gb(Q_,{shouldForwardProp:e=>"active"!==e})(({theme:e,active:t})=>({width:e.spacing(3),height:e.spacing(3),padding:0,background:t?e.palette.grey[300]:void 0})),Qj=(e,t)=>{const n=n=>{const r=AI();return xz.jsx(Uw,{title:r(t),PopperProps:{disablePortal:!0},children:xz.jsx("div",{children:xz.jsx(e,{...n,"aria-label":r(t)})})})};return n.displayName=`withToolTip(${e.displayName||e.name})`,n},Zj=({format:e,icon:t,...n})=>{const r=b(jj),[o]=vu(),i=M(()=>{o.dispatchCommand(Bt,e)},[o,e]);return xz.jsx(Xj,{...n,active:r.textFormat[e],onClick:i,size:"small",variant:"text",children:t})},eD=Qj(Zj,"Bold"),tD=()=>xz.jsx(eD,{format:"bold","data-testid":"editor-toolbar-bold-btn",icon:xz.jsx(lz,{height:12})}),nD=kt("APPLY_TEXT_FORMAT"),rD=kt("CLEAR_TEXT_FORMAT"),oD=Qj(Xj,"ClearFormat"),iD=()=>{const[e]=vu(),t=M(()=>{e.update(()=>{const t=ao();if(Wr(t)){const{anchor:e,focus:n}=t,r=t.getNodes();if(e.key===n.key&&e.offset===n.offset)return;r.forEach((t,o)=>{try{if(Or(t)){let i=t;0===o&&0!==e.offset&&(i=i.splitText(e.offset)[1]||i),o===r.length-1&&(i=i.splitText(n.offset)[0]||i),""!==i.__style&&i.setStyle(""),0!==i.__format&&(i.setFormat(0),gl(i).setFormat(""));const s=i.getParent();(fd(s)||sd(s))&&s.replace(ai(),!0)}else(fd(t)||sd(t))&&t.replace(ai(),!0)}catch{}})}e.dispatchCommand(rD,void 0)})},[e]);return xz.jsx(oD,{"data-testid":"editor-toolbar-clearFormat-btn",onClick:t,children:xz.jsx(cz,{height:12})})};var sD,aD={},lD=function(){if(sD)return aD;sD=1;var e={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:255,g:255,b:255,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},t=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i,n=/^rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(\d(\.\d+)?)\)$/i,r=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i,o=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i,i=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i,s=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i,a=Math.floor,l=Math.round,c=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n,r,o,i,s,c,u,d,f,p,h,g,m=0,v=0,b=0,y=1;if(this._invalid=!1,arguments[0]instanceof t)m=arguments[0]._r,v=arguments[0]._g,b=arguments[0]._b,y=arguments[0]._a,this._invalid=arguments[0]._invalid;else if(arguments.length<3)if("string"==typeof arguments[0])if(h=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(g=arguments[0]))m=parseInt(h[1],10),v=parseInt(h[2],10),b=parseInt(h[3],10);else if(h=/^argb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(g))y=parseFloat(l(h[1]/2.55)/100),m=parseInt(h[2],10),v=parseInt(h[3],10),b=parseInt(h[4],10);else if(h=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(g))m=parseInt(h[1],10),v=parseInt(h[2],10),b=parseInt(h[3],10),y=parseFloat(h[4]);else if(h=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(g))m=parseInt(h[1],16),v=parseInt(h[2],16),b=parseInt(h[3],16),y=1;else if(h=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i.exec(g))m=parseInt(h[1]+h[1],16),v=parseInt(h[2]+h[2],16),b=parseInt(h[3]+h[3],16),y=1;else if(h=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(g)){switch(n=parseFloat(h[1]),r=parseFloat(h[3]),i=parseFloat(h[5]),r=(r/=100)<0?0:r>1?1:r,u=(n=(n%=360)<0?0:n>360?360:n)/60,d=(c=(i=(i/=100)<0?0:i>1?1:i)<=.5?2*i*r:(2-2*i)*r)*(1-Math.abs(u%2-1)),f=[],u=Math.floor(u)){case 0:f=[c,d,0];break;case 1:f=[d,c,0];break;case 2:f=[0,c,d];break;case 3:f=[0,d,c];break;case 4:f=[d,0,c];break;case 5:f=[c,0,d];break;default:f=[0,0,0]}p=i-.5*c,m=f[0]+p,v=f[1]+p,b=f[2]+p,m=l(255*m),v=l(255*v),b=l(255*b),y=1}else if(h=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(g)){switch(n=parseFloat(h[1]),r=parseFloat(h[3]),i=parseFloat(h[5]),y=parseFloat(h[7]),r=(r/=100)<0?0:r>1?1:r,u=(n=(n%=360)<0?0:n>360?360:n)/60,d=(c=(i=(i/=100)<0?0:i>1?1:i)<=.5?2*i*r:(2-2*i)*r)*(1-Math.abs(u%2-1)),f=[],u=Math.floor(u)){case 0:f=[c,d,0];break;case 1:f=[d,c,0];break;case 2:f=[0,c,d];break;case 3:f=[0,d,c];break;case 4:f=[d,0,c];break;case 5:f=[c,0,d];break;default:f=[0,0,0]}p=i-.5*c,m=f[0]+p,v=f[1]+p,b=f[2]+p,m=l(255*m),v=l(255*v),b=l(255*b)}else if(h=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(g)){switch(n=parseFloat(h[1]),r=parseFloat(h[3]),s=parseFloat(h[5]),u=(n=(n%=360)<0?0:n>360?360:n)/60,d=(c=(s=(s/=100)<0?0:s>1?1:s)*(r=(r/=100)<0?0:r>1?1:r))*(1-Math.abs(u%2-1)),f=[],u=Math.floor(u)){case 0:f=[c,d,0];break;case 1:f=[d,c,0];break;case 2:f=[0,c,d];break;case 3:f=[0,d,c];break;case 4:f=[d,0,c];break;case 5:f=[c,0,d];break;default:f=[0,0,0]}p=s-c,m=f[0]+p,v=f[1]+p,b=f[2]+p,m=l(255*m),v=l(255*v),b=l(255*b),y=1}else e[g.toLowerCase()]?(o=g.toLowerCase(),m=e[o].r,v=e[o].g,b=e[o].b,y="number"==typeof e[o].a?e[o].a:1):this._invalid=!0;else"number"==typeof arguments[0]&&arguments[0]>=0&&"argb"===arguments[1]?(y=(4278190080&arguments[0])>>>24,y/=255,m=(16711680&arguments[0])>>16,v=(65280&arguments[0])>>8,b=255&arguments[0]):"number"==typeof arguments[0]&&arguments[0]>=0?(m=(16711680&arguments[0])>>16,v=(65280&arguments[0])>>8,b=255&arguments[0]):this._invalid=!0;else arguments.length>=3?(m=arguments[0],v=arguments[1],b=arguments[2],y=arguments.length>=4?arguments[3]:1):this._invalid=!0;Number.isNaN(+m+v+b+y)&&(this._invalid=!0),this._r=a(m),this._g=a(v),this._b=a(b),this._a=y,this._spaces={}}var n,r;return n=t,(r=[{key:"isInvalid",value:function(){return this._invalid}},{key:"setAlpha",value:function(e){this._a=e,this._spaces={}}},{key:"getAlpha",value:function(){return this._a}},{key:"toRGB",value:function(){return this._spaces.rgb||(this._spaces.rgb=t.toRGB(this)),this._spaces.rgb}},{key:"toRGBA",value:function(){return this._spaces.rgba||(this._spaces.rgba=t.toRGBA(this)),this._spaces.rgba}},{key:"toString",value:function(){return this._spaces.rgb||(this._spaces.rgb=t.toRGB(this)),this._spaces.rgb}},{key:"toHex",value:function(){return this._spaces.hex||(this._spaces.hex=t.toHex(this)),this._spaces.hex}},{key:"toHSL",value:function(e){return this._spaces.hsl||(this._spaces.hsl=t.toHSL(this,e)),this._spaces.hsl}},{key:"toHSLA",value:function(e){return this._spaces.hsla||(this._spaces.hsla=t.toHSLA(this,e)),this._spaces.hsla}},{key:"toHSV",value:function(){var e=this.toHSVComponents();return"hsv(".concat(e.h,",").concat(e.s,",").concat(e.v,")")}},{key:"toHSVComponents",value:function(){return this._spaces.hsvComp||(this._spaces.hsvComp=t.toHSVComponents(this)),this._spaces.hsvComp}},{key:"toNumber",value:function(){return this._spaces.num||(this._spaces.num=t.toNumber(this)),this._spaces.num}},{key:"isDark",value:function(){return this.isInvalid()||this.getLuminance()<125}},{key:"getLuminance",value:function(){return void 0===this._lumi&&(this._lumi=.299*this._r+.587*this._g+.114*this._b),this._lumi}},{key:"shiftLuminance",value:function(e){var t=this.toHSLA(),n=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(t),r=parseFloat(n[1]),o=parseFloat(n[3]),i=parseFloat(n[5]),s=parseFloat(n[7]);return i+=e,i=Math.max(0,Math.min(i,100)),"hsla(".concat(r,",").concat(o,",").concat(i,",").concat(s,")")}},{key:"isEqual",value:function(e){return e instanceof t||(e=new t(e)),this._r===e._r&&this._g===e._g&&this._b===e._b}},{key:"blend",value:function(e,t){var n=a(this._r+(e._r-this._r)*t),r=a(this._g+(e._g-this._g)*t),o=a(this._b+(e._b-this._b)*t),i=a(this._a+(e._a-this._a)*t);return"rgba(".concat([n,r,o,i].join(","),")")}},{key:"createShiftedColor",value:function(e){(void 0===e||Number.isNaN(+e))&&(e=1);var n=this.getLuminance(),r=this._g<126?1:1+this._g/512;return new t(this.shiftLuminance(20*(n*r<220?.8+1/(n+1)*4:-(.8+n/255*1))*e))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==yz(o=function(e){if("object"!=yz(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=yz(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?o:String(o),r)}var o}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}();return c.toRGB=function(e){if(e instanceof c)return"rgb(".concat([e._r,e._g,e._b].join(","),")");"string"==typeof e&&(e=c.toNumber(e));var t=(65280&e)>>8,n=255&e;return"rgb(".concat((16711680&e)>>16,",").concat(t,",").concat(n,")")},c.toRGBA=function(e,t){if(e instanceof c)return"rgba(".concat([e._r,e._g,e._b,void 0!==t?t:e._a].join(","),")");"string"==typeof e&&(e=c.toNumber(e));var n=(65280&e)>>8,r=255&e;return"rgba(".concat((16711680&e)>>16,",").concat(n,",").concat(r,",").concat(void 0!==t?t:e._a,")")},c.toHex=function(e){var t,n,r;return e instanceof c?(t=e._r.toString(16),n=e._g.toString(16),r=e._b.toString(16),1===t.length&&(t="0".concat(t)),1===n.length&&(n="0".concat(n)),1===r.length&&(r="0".concat(r)),"#".concat([t,n,r].join(""))):("string"==typeof e&&(e=c.toNumber(e)),t=((16711680&e)>>16).toString(16),n=((65280&e)>>8).toString(16),r=(255&e).toString(16),1===t.length&&(t="0".concat(t)),1===n.length&&(n="0".concat(n)),1===r.length&&(r="0".concat(r)),"#".concat(t).concat(n).concat(r))},c.toHSL=function(e,t){var n,r,o,i=0;"string"==typeof e&&(e=new c(e));var s=e._r/255,a=e._g/255,l=e._b/255,u=Math.max(s,a,l),d=Math.min(s,a,l);if(r=t?.21*s+.72*a+.07*l:(u+d)/2,u===d)n=0,i=0;else{switch(o=u-d,n=r>.5?o/(2-u-d):o/(u+d),u){case s:i=(a-l)/o+(a<l?6:0);break;case a:i=(l-s)/o+2;break;case l:i=(s-a)/o+4}i/=6}return"hsl(".concat(360*i,",").concat(100*n,",").concat(100*r,")")},c.toHSLA=function(e,t){var n,r,o,i=0;"string"==typeof e&&(e=new c(e));var s=e._r/255,a=e._g/255,l=e._b/255,u=e._a,d=Math.max(s,a,l),f=Math.min(s,a,l);if(r=t?.21*s+.72*a+.07*l:(d+f)/2,d===f)n=0,i=0;else{switch(o=d-f,n=r>.5?o/(2-d-f):o/(d+f),d){case s:i=(a-l)/o+(a<l?6:0);break;case a:i=(l-s)/o+2;break;case l:i=(s-a)/o+4}i/=6}return"hsla(".concat(360*i,",").concat(100*n,",").concat(100*r,",").concat(u,")")},c.toHSVComponents=function(e){var t,n,r=0;"string"==typeof e&&(e=new c(e));var o=e._r/255,i=e._g/255,s=e._b/255,a=Math.max(o,i,s),l=Math.min(o,i,s),u=a;if(a===l)t=0,r=0;else{switch(t=0===(n=a-l)?0:n/u,a){case o:r=(i-s)/n+(i<s?6:0);break;case i:r=(s-o)/n+2;break;case s:r=(o-i)/n+4}r/=6}return{h:360*r%360,s:100*t,v:100*u}},c.toNumber=function(){if(1===arguments.length&&arguments[0]instanceof c)return(arguments[0]._r<<16)+(arguments[0]._g<<8)+arguments[0]._b;var e,t,n=0,r=0,o=0;return 1===arguments.length&&"string"==typeof arguments[0]&&((e=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i.exec(t=arguments[0]))?(n=parseInt(e[1],10),r=parseInt(e[2],10),o=parseInt(e[3],10)):(e=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(t))?(n=parseInt(e[1],16),r=parseInt(e[2],16),o=parseInt(e[3],16)):(e=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i.exec(t))&&(n=parseInt(e[1]+e[1],16),r=parseInt(e[2]+e[2],16),o=parseInt(e[3]+e[3],16))),(n<<16)+(r<<8)+o},c.blend=function(e,t,n){var r=(16711680&(e=c.toNumber(e)))>>16,o=(65280&e)>>8,i=255&e;return(r+(((16711680&(t=c.toNumber(t)))>>16)-r)*n<<16)+(o+(((65280&t)>>8)-o)*n<<8)+(i+((255&t)-i)*n)},c.getBlend=function(e,t,n){var r=e._r+(t._r-e._r)*n,o=e._g+(t._g-e._g)*n,i=e._b+(t._b-e._b)*n,s=e._a+(t._a-e._a)*n;return new c(r,o,i,s)},c.isCSSColor=function(a){return!(arguments.length>1||"string"!=typeof a)&&(t.test(a)||n.test(a)||r.test(a)||o.test(a)||i.test(a)||s.test(a)||e[a.toLowerCase()])},c.getBestContrast=function(e,t,n){var r=e.getLuminance();return Math.abs(r-t.getLuminance())>Math.abs(r-n.getLuminance())?t:n},c.getContrast=function(e,t){if(e&&t){var n=e.getLuminance()/100,r=t.getLuminance()/100;return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}},c.isDark=function(){var e={getLuminance:c.prototype.getLuminance,isInvalid:c.prototype.isInvalid};return c.prototype.init.apply(e,[].slice.call(arguments)),c.prototype.isDark.call(e)},c.useDarkLabel=function(e,t){return e._a>.5?!e.isDark():!t},aD.Color=c,aD}();const cD=Gb(aw)(({theme:e})=>({display:"flex",flex:4,flexDirection:"row",flexWrap:"wrap",backgroundColor:e.palette.background.default,borderRadius:"4px",padding:e.spacing(.5),alignItems:"center",justifyContent:"space-around"})),uD=Gb(H_)(({theme:e})=>({display:"flex",width:e.spacing(3.8),height:e.spacing(3.8),borderRadius:"4px",margin:e.spacing(.1),borderWidth:"1px",borderColor:e.palette.grey[500],borderStyle:"solid",justifyContent:"center",alignItems:"center"})),dD=({palette:e,color:t,onColorChange:n})=>{const[r,o]=S(t),i=Lb(),s=M(e=>{o(e),n(e)},[n]);return xz.jsx(cD,{children:e.map(e=>xz.jsx(uD,{style:{backgroundColor:e},onClick:t=>{t.preventDefault(),t.stopPropagation(),s(e)},children:e===r?xz.jsx(Yw,{height:12,color:i.palette.getContrastText(e)}):null},e))})};function fD(e,t,n){return Math.max(t,Math.min(n,e))}const pD=(e,t)=>{const n=new lD.Color(e).toHSVComponents(),r=window.getComputedStyle(t),o=parseInt(r.width,10),i=parseInt(r.height,10);return{left:o*(n.s/100)+"px",top:i*((100-n.v)/100)+"px"}},hD=(e,t)=>{const{left:n,top:r,width:o,height:i}=e.currentTarget.getBoundingClientRect(),s=fD(e.clientX-n,0,o)/o*100,a=100-fD(e.clientY-r,0,i)/i*100,l=new lD.Color(t).toHSVComponents();return l.s=s,l.v=a,l},gD=Gb(aw)(({theme:e})=>({width:e.spacing(32),height:e.spacing(24),padding:e.spacing(1),display:"flex",flexDirection:"column"})),mD=Gb(H_)({flex:4,backgroundImage:"linear-gradient(transparent, black), linear-gradient(to right, white, transparent)",position:"relative",cursor:"crosshair",borderRadius:"4px"}),vD=Gb(H_)(({theme:e})=>({flex:.5,marginTop:e.spacing(.5),marginBottom:e.spacing(.5),borderRadius:"4px",cursor:"crosshair",position:"relative",backgroundImage:"linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000 );"})),bD=Gb(H_)({width:"16px",height:"16px",borderRadius:"2px"}),yD=Gb(aw)({flexDirection:"row",alignItems:"center"}),xD=Gb(H_)({position:"absolute",width:"8px",height:"8px",backgroundColor:"black",left:0,top:0,borderRadius:"16px",border:"1px solid white",cursor:"pointer",transform:"translate(-50%, -50%)"}),_D=({onClick:e,onClose:t,startColor:n,palette:r})=>{const[o,i]=S(n),s=k(n),[a,l]=S(!0),[c,u]=S(o),d=k(null),f=k(null),p=k({left:0,top:0,on:!1,clientX:0,clientY:0}),[h,g]=S({left:"0",top:"0"});w(()=>{r.some(e=>e===n)||l(!1)},[n,r]);const m=M(e=>{if(!d.current&&(d.current=e,e)){const t=pD(o,e);g(t)}},[o]),v=x(()=>`hsl(${new lD.Color(o).toHSVComponents().h}, 100%, 50%)`,[o]),b=M(t=>{t.preventDefault(),t.stopPropagation();const n=hD(t,s.current),r=`hsv(${n.h},${n.s},${n.v})`,o=new lD.Color(r);if(s.current=o.toHex(),f.current&&d.current){const e=d.current.getBoundingClientRect(),n=t.clientX-e.left,r=t.clientY-e.top;f.current.style.left=`${n}px`,f.current.style.top=`${r}px`}e(s.current),u(s.current),i(s.current)},[e]),y=M(t=>{t.preventDefault(),t.stopPropagation();const n=((e,t)=>{const{width:n,left:r}=e.target.getBoundingClientRect(),o=fD(e.clientX-r,0,n),i=Math.round(o/n*360),s=o/n*100,a=new lD.Color(t).toHSVComponents();return a.h=i,a.s=s,a})(t,s.current),r=`hsv(${n.h},${n.s},${n.v})`,o=new lD.Color(r);s.current=o.toHex(),e(s.current),u(s.current),i(s.current)},[e]),_=M(t=>{s.current=t,e(s.current),i(s.current),u(t)},[e]),C=M(t=>{if(u(t.target.value),!new lD.Color(t.target.value).isInvalid()&&(s.current=t.target.value,i(t.target.value),t.target.value.startsWith("#")&&7===t.target.value.length?e(s.current,{tag:"collaboration"}):t.target.value.startsWith("#")||e(s.current,{tag:"collaboration"}),d.current)){const e=pD(s.current,d.current);g(e)}},[e]);return xz.jsxs(gD,{children:[a?xz.jsx(dD,{palette:r,color:o,onColorChange:_}):xz.jsxs(xz.Fragment,{children:[xz.jsx(mD,{style:{backgroundColor:v},ref:m,onMouseDown:e=>{if(e.preventDefault(),e.stopPropagation(),f.current&&e.target===f.current){const{left:t,top:n}=f.current.style,r=parseInt(t||"0",10),o=parseInt(n||"0",10);f.current.style.cursor="pointer",d.current&&(d.current.style.cursor="pointer"),p.current={left:r,top:o,on:!0,clientX:e.clientX,clientY:e.clientY}}},onMouseMove:e=>{if(e.preventDefault(),e.stopPropagation(),p.current.on&&f.current&&d.current){const t=e.clientX-p.current.clientX,n=e.clientY-p.current.clientY,r=p.current.left+t,o=p.current.top+n,a=hD(e,s.current),l=`hsv(${a.h},${a.s},${a.v})`,c=new lD.Color(l).toHex();f.current.style.left=`${r}px`,f.current.style.top=`${o}px`,f.current.style.backgroundColor=c,s.current=c,u(s.current),i(c)}},onMouseUp:t=>{t.preventDefault(),t.stopPropagation(),p.current.on?e(s.current):b(t),d.current&&(d.current.style.cursor="crosshair"),f.current&&(f.current.style.cursor="pointer"),p.current.on=!1},children:xz.jsx(xD,{ref:f,style:{...h,backgroundColor:o}})}),xz.jsx(vD,{onClick:y})]}),xz.jsxs(yD,{children:[xz.jsx(bD,{style:{backgroundColor:o}}),xz.jsx(F_,{style:{flex:1},value:c,onChange:C}),xz.jsx($y,{onClick:()=>{l(!a)},children:xz.jsx(uz,{height:12})}),xz.jsx($y,{onClick:t,children:xz.jsx(Yw,{height:12})})]})]})},wD=["#404040","#ffffff","#99CFCD","#83AF9B","#C4CFDA","#10CFC9","#006580","#87205D","#8A85C6","#A16090","#AC4D58","#E0BD8D","#E1DAD5","#b0afae","#7b7a78","#000000","#C8C7A9"],SD=Qj(Q_,"Color"),kD=({colorPalette:e=wD})=>{const[t]=vu(),[n,r]=S(null),{blockFormat:o}=b(jj),i=M((e,n)=>{t.update(()=>{const t=ao();Wr(t)&&nl(t,{color:e})},n),t.dispatchCommand(nD,{styleKey:"color",styleValue:e})},[t]),s=()=>{r(null)};return xz.jsx(ew,{onClickAway:s,mouseEvent:"onMouseDown",touchEvent:"onTouchStart",children:xz.jsxs("div",{children:[xz.jsx(SD,{variant:"text",size:"small",endIcon:xz.jsx(rz,{height:12}),onClick:e=>{e.preventDefault(),e.stopPropagation(),r(n?null:e.currentTarget)},children:xz.jsx(H_,{sx:{backgroundColor:o.fontColor,width:12,height:12}})}),xz.jsx(Bj,{anchorEl:n,children:xz.jsx(_D,{onClick:i,onClose:s,startColor:o.fontColor,palette:e})})]})})};Qj(Xj,"Export");const CD=({compact:e=!1,fonts:t=Pj})=>{const[n]=vu(),[r,o]=S(null),{blockFormat:i}=b(jj),s=x(()=>t,[t]),a=M(e=>{o(null);const{fontName:t}=e.currentTarget.dataset;n.update(()=>{const e=ao();Wr(e)&&nl(e,{"font-family":t||Pj[0]}),n.dispatchCommand(nD,{styleKey:"fontFamily",styleValue:t||Pj[0]}),n.focus()})},[n]);return xz.jsx(ew,{onClickAway:()=>{o(null)},mouseEvent:"onMouseDown",touchEvent:"onTouchStart",children:xz.jsxs("div",{children:[xz.jsx(Hj,{onClick:e=>{e.preventDefault(),e.stopPropagation(),o(r?null:e.currentTarget)},value:i.fontName,startIcon:xz.jsx("span",{style:{fontFamily:"Times New Roman, serif",fontSize:16,fontWeight:"lighter"},children:"T"}),compact:e}),xz.jsx(Bj,{anchorEl:r,children:xz.jsx(Lw,{dense:!0,style:{maxHeight:200,overflow:"auto"},children:s.map(e=>xz.jsx(Wj,{"data-font-name":e,onClick:a,active:e===i.fontName,children:xz.jsx($j,{children:e})},e))})})]})})},ED=e=>parseInt(e,10),TD=({fontSize:e,onSelected:t})=>{const[n,r]=S(""),o=M(e=>{e.preventDefault(),e.stopPropagation(),r(e.target.value)},[]),i=M(()=>{const e=ED(n);e&&t(`${e}px`)},[t,n]),s=M(e=>{"Enter"===e.key&&(e.preventDefault(),i())},[i]);return xz.jsxs(aw,{direction:"row",children:[xz.jsx(F_,{value:n,sx:{ml:1,flex:1},placeholder:e,onChange:o,onKeyDown:s}),xz.jsx($y,{disabled:!ED(n),onClick:i,children:xz.jsx(Yw,{height:12})})]})},AD=["8px","9px","10px","11px","12px","14px","16px","20px","24px","32px"],LD=({compact:e=!1})=>{const[t]=vu(),[n,r]=S(null),{blockFormat:o}=b(jj),i=M(e=>{e.preventDefault(),e.stopPropagation(),r(n?null:e.currentTarget)},[n]),s=M(()=>{r(null)},[]),a=M(e=>{r(null),e.length>0&&t.update(()=>{const n=ao();Wr(n)&&nl(n,{"font-size":e}),t.dispatchCommand(nD,{styleKey:"fontSize",styleValue:e})})},[t]),l=M(e=>{const{fontSize:t}=e.currentTarget.dataset;a(t||"16px")},[a]),c=M(e=>{a(e)},[a]);return xz.jsx(ew,{onClickAway:s,mouseEvent:"onMouseDown",touchEvent:"onTouchStart",children:xz.jsxs("div",{children:[xz.jsx(Hj,{startIcon:e?xz.jsx($j,{children:o.fontSize}):void 0,value:o.fontSize,onClick:i,compact:e}),xz.jsxs(Bj,{anchorEl:n,children:[xz.jsx(TD,{fontSize:o.fontSize,onSelected:c}),xz.jsx(sw,{}),xz.jsx(Lw,{dense:!0,style:{maxHeight:200,overflow:"auto"},children:AD.map(e=>xz.jsx(Pw,{"data-font-size":e,onClick:l,children:xz.jsx($j,{children:e})},e))})]})]})})},MD=Qj(Xj,"InsertTable"),RD=()=>{const[e]=vu(),t=M(()=>{e.dispatchCommand(lj,void 0)},[e]);return xz.jsx(MD,{onClick:t,"data-testid":"editor-toolbar-insertTable-btn",children:xz.jsx(dz,{height:12})})},ND=Qj(Zj,"Italic"),OD=()=>xz.jsx(ND,{"data-testid":"editor-toolbar-italic-btn",format:"italic",icon:xz.jsx(fz,{height:12})}),PD=Qj(Xj,"InsertHyperlink"),ID=()=>{const[e]=vu(),{blockFormat:t}=b(jj),n=M(()=>{t.isLink?e.dispatchCommand(bc,null):e.dispatchCommand(bc,Az("https://"))},[e,t.isLink]);return xz.jsx(PD,{"data-testid":"editor-toolbar-link-btn",onClick:n,children:xz.jsx(pz,{height:12})})};Qj(Xj,"Toggle");const zD=Qj(Zj,"Underline"),jD=()=>xz.jsx(zD,{"data-testid":"editor-toolbar-underline-btn",format:"underline",icon:xz.jsx(hz,{height:12})}),DD=()=>xz.jsx(sw,{flexItem:!0,orientation:"vertical",sx:{mx:.5,my:1}});var FD={AddNewColumn:{value:"Spalte hinzufügen",comment:"Menu option to add column to table",version:"+vQaijK7E48vJ9H9MJsd3Q=="},AddNewRow:{value:"Zeile hinzufügen",comment:"Menu option to add row to table",version:"o5g9uoLTxIYAznEdFR0ioA=="},AlignCenter:{value:"Zentrieren",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)",version:"33xAsCk52eZdrns6ESQAYQ=="},AlignLeft:{value:"Linksbündig",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)",version:"Xy6widnhx5lnasAS62KjOw=="},AlignRight:{value:"Rechtsbündig",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)",version:"uRJLJvO4eCo/vRYCoR/eCQ=="},BoldText:{value:"Fett",comment:"Bold text label in toolbar menu label. (dfk 221011)",version:"EmmVb6LoUIGAXaw+1ubcXg=="},ChangeTextAlignment:{value:"Textausrichtung",comment:"Change text alignment label in toolbar menu label. (dfk 221011)",version:"IzmYkHFKuHvhNY4z6j3BSA=="},ChangeTextSize:{value:"Schriftgröße",comment:"Change text size in toolbar menu label. (dfk 221011)",version:"aEi5MBJWXKnW/bq2ny1Jzw=="},ClearFormat:{value:"Format löschen",comment:"Clear the selected text format",version:"Q2OEIvJHrH8MsE4RQNfMWQ=="},Color:{value:"Schriftfarbe",comment:"Button label for color picker",version:"ZSR6BBl1PNHGAiXYyfyFOw=="},DeleteCol:{value:"Spalte löschen",comment:"Menu option to delete column to table",version:"KdwEyWDvorWo9POIi4ZsEg=="},DeleteRow:{value:"Zeile löschen",comment:"Menu option to delete row to table",version:"HNt6G95YEKMB64vvyDklHA=="},DeleteTable:{value:"Tabelle löschen",comment:"Menu option to delete table",version:"t1C38w3fJ267Gr6tdoHuQQ=="},EnterText:{value:"Geben Sie Text ein...",comment:"Prompt to user when the text object is empty",version:"PgCz8azF8kkBE7eC4afWjg=="},Heading1:{value:"Überschrift 1",comment:"HTML Header 1 format for the text",version:"hnjaVlzIU3eTAQZeaBzzzA=="},Heading2:{value:"Überschrift 2",comment:"HTML Header 2 format for the text",version:"pYerzmSdfRZrsIWHcPZJrA=="},Heading3:{value:"Überschrift 3",comment:"HTML Header 2 format for the text",version:"xHJCPRmh19YJg/dKSmbuFA=="},InsertHyperlink:{value:"Link einfügen",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)",version:"ej9rwxwF6Vh7XrQ28DuWmQ=="},InsertImage:{value:"Bild einfügen",comment:"Label for toolbar menu option to insert an image. (tew 260205)",version:"WkGyZIiaf2vkOz3sLRe8yw=="},InsertTable:{value:"Tabelle einfügen",comment:"Label for toolbar menu option to insert a table. (tew 260205)",version:"MDUMiPnfA3w0N2bSdGExNg=="},ItalicizeText:{value:"Kursiv",comment:"Italicize text label in toolbar menu label. (dfk 221011)",version:"1qaKn3zXIiq9tmUO81pOmw=="},LargeText:{value:"Großer Text",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)",version:"Ga4ivSCgHaK3NyfLFnD/hw=="},LinkTo:{value:"Link zu",comment:"Generic link label. (dfk 221011)",version:"+3NC9+yOccLuyYnxJrdFcQ=="},MediumText:{value:"Mittlerer Text",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)",version:"duW4rbX+lr/NEogVsD8MfQ=="},OrderedList:{value:"Sortierte Liste",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"FddCEQTnAmH1gV8D430F/g=="},Paragraph:{value:"Absatz",comment:"Paragraph format for the text",version:"pHFeBq44ok2V7M2esInoFA=="},SetTextListStyle:{value:"Listenstil",comment:"Set text list style label in toolbar menu label. (dfk 221011)",version:"aIB7vJ7tZ0Nddeg4AaZriQ=="},SmallText:{value:"Kleiner Text",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)",version:"KW+o3yZafqHkbzyid96v4g=="},ToggleBorders:{value:"Rahmen wechseln",comment:"Menu option to toggle table borders",version:"X8/Cbk95LroUwE8LKSnn+A=="},URLLink:{value:"URL-Link",comment:"URL link label. (dfk 221011)",version:"NuOom1L7yZrPKpIzy2/XXg=="},UnderlineText:{value:"Unterstreichen",comment:"Underline text label in toolbar menu label. (dfk 221011)",version:"5ob75WGKK4whhNVPsicswQ=="},UnorderedList:{value:"Unsortierte Liste",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"GIyyLYfHs+U9DgkelqqdpA=="}},BD={AlignLeft:{value:"Align left",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)"},AlignCenter:{value:"Align center",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)"},AlignRight:{value:"Align right",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)"},SmallText:{value:"Small text",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)"},MediumText:{value:"Medium text",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)"},LargeText:{value:"Large text",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)"},UnorderedList:{value:"Unordered list",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)"},OrderedList:{value:"Ordered list",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)"},ChangeTextSize:{value:"Text size",comment:"Change text size in toolbar menu label. (dfk 221011)"},BoldText:{value:"Bold",comment:"Bold text label in toolbar menu label. (dfk 221011)"},ItalicizeText:{value:"Italic",comment:"Italicize text label in toolbar menu label. (dfk 221011)"},UnderlineText:{value:"Underline",comment:"Underline text label in toolbar menu label. (dfk 221011)"},ChangeTextAlignment:{value:"Text alignment",comment:"Change text alignment label in toolbar menu label. (dfk 221011)"},SetTextListStyle:{value:"List style",comment:"Set text list style label in toolbar menu label. (dfk 221011)"},InsertHyperlink:{value:"Insert link",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)"},LinkTo:{value:"Link to",comment:"Generic link label. (dfk 221011)"},URLLink:{value:"URL link",comment:"URL link label. (dfk 221011)"},Paragraph:{value:"Paragraph",comment:"Paragraph format for the text"},Heading1:{value:"Heading 1",comment:"HTML Header 1 format for the text"},Heading2:{value:"Heading 2",comment:"HTML Header 2 format for the text"},Heading3:{value:"Heading 3",comment:"HTML Header 2 format for the text"},Color:{value:"Font color",comment:"Button label for color picker"},ToggleBorders:{value:"Toggle borders",comment:"Menu option to toggle table borders"},AddNewRow:{value:"Add row",comment:"Menu option to add row to table"},AddNewColumn:{value:"Add column",comment:"Menu option to add column to table"},DeleteRow:{value:"Delete row",comment:"Menu option to delete row to table"},DeleteCol:{value:"Delete column",comment:"Menu option to delete column to table"},DeleteTable:{value:"Delete table",comment:"Menu option to delete table"},ClearFormat:{value:"Clear format",comment:"Clear the selected text format"},EnterText:{value:"Enter some text...",comment:"Prompt to user when the text object is empty"},InsertTable:{value:"Insert table",comment:"Label for toolbar menu option to insert a table. (tew 260205)"},InsertImage:{value:"Insert image",comment:"Label for toolbar menu option to insert an image. (tew 260205)"}},$D={AddNewColumn:{value:"Añadir columna",comment:"Menu option to add column to table",version:"+vQaijK7E48vJ9H9MJsd3Q=="},AddNewRow:{value:"Añadir fila",comment:"Menu option to add row to table",version:"o5g9uoLTxIYAznEdFR0ioA=="},AlignCenter:{value:"Alinear centrado",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)",version:"33xAsCk52eZdrns6ESQAYQ=="},AlignLeft:{value:"Alinear a la izquierda",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)",version:"Xy6widnhx5lnasAS62KjOw=="},AlignRight:{value:"Alinear a la derecha",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)",version:"uRJLJvO4eCo/vRYCoR/eCQ=="},BoldText:{value:"Negrita",comment:"Bold text label in toolbar menu label. (dfk 221011)",version:"EmmVb6LoUIGAXaw+1ubcXg=="},ChangeTextAlignment:{value:"Alineación de texto",comment:"Change text alignment label in toolbar menu label. (dfk 221011)",version:"IzmYkHFKuHvhNY4z6j3BSA=="},ChangeTextSize:{value:"Tamaño de texto",comment:"Change text size in toolbar menu label. (dfk 221011)",version:"aEi5MBJWXKnW/bq2ny1Jzw=="},ClearFormat:{value:"Borrar formato",comment:"Clear the selected text format",version:"Q2OEIvJHrH8MsE4RQNfMWQ=="},Color:{value:"Color de fuente",comment:"Button label for color picker",version:"ZSR6BBl1PNHGAiXYyfyFOw=="},DeleteCol:{value:"Eliminar columna",comment:"Menu option to delete column to table",version:"KdwEyWDvorWo9POIi4ZsEg=="},DeleteRow:{value:"Eliminar fila",comment:"Menu option to delete row to table",version:"HNt6G95YEKMB64vvyDklHA=="},DeleteTable:{value:"Eliminar tabla",comment:"Menu option to delete table",version:"t1C38w3fJ267Gr6tdoHuQQ=="},EnterText:{value:"Escriba algún texto...",comment:"Prompt to user when the text object is empty",version:"PgCz8azF8kkBE7eC4afWjg=="},Heading1:{value:"Cabecera 1",comment:"HTML Header 1 format for the text",version:"hnjaVlzIU3eTAQZeaBzzzA=="},Heading2:{value:"Cabecera 2",comment:"HTML Header 2 format for the text",version:"pYerzmSdfRZrsIWHcPZJrA=="},Heading3:{value:"Cabecera 3",comment:"HTML Header 2 format for the text",version:"xHJCPRmh19YJg/dKSmbuFA=="},InsertHyperlink:{value:"Insertar enlace",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)",version:"ej9rwxwF6Vh7XrQ28DuWmQ=="},InsertImage:{value:"Insertar imagen",comment:"Label for toolbar menu option to insert an image. (tew 260205)",version:"WkGyZIiaf2vkOz3sLRe8yw=="},InsertTable:{value:"Insertar tabla",comment:"Label for toolbar menu option to insert a table. (tew 260205)",version:"MDUMiPnfA3w0N2bSdGExNg=="},ItalicizeText:{value:"Cursiva",comment:"Italicize text label in toolbar menu label. (dfk 221011)",version:"1qaKn3zXIiq9tmUO81pOmw=="},LargeText:{value:"Texto grande",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)",version:"Ga4ivSCgHaK3NyfLFnD/hw=="},LinkTo:{value:"Enlazar a",comment:"Generic link label. (dfk 221011)",version:"+3NC9+yOccLuyYnxJrdFcQ=="},MediumText:{value:"Texto mediano",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)",version:"duW4rbX+lr/NEogVsD8MfQ=="},OrderedList:{value:"Lista ordenada",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"FddCEQTnAmH1gV8D430F/g=="},Paragraph:{value:"Párrafo",comment:"Paragraph format for the text",version:"pHFeBq44ok2V7M2esInoFA=="},SetTextListStyle:{value:"Estilo de lista",comment:"Set text list style label in toolbar menu label. (dfk 221011)",version:"aIB7vJ7tZ0Nddeg4AaZriQ=="},SmallText:{value:"Texto pequeño",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)",version:"KW+o3yZafqHkbzyid96v4g=="},ToggleBorders:{value:"Ajustar bordes",comment:"Menu option to toggle table borders",version:"X8/Cbk95LroUwE8LKSnn+A=="},URLLink:{value:"Enlace URL",comment:"URL link label. (dfk 221011)",version:"NuOom1L7yZrPKpIzy2/XXg=="},UnderlineText:{value:"Subrayado",comment:"Underline text label in toolbar menu label. (dfk 221011)",version:"5ob75WGKK4whhNVPsicswQ=="},UnorderedList:{value:"Lista no ordenada",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"GIyyLYfHs+U9DgkelqqdpA=="}},HD={AddNewColumn:{value:"Ajouter une colonne",comment:"Menu option to add column to table",version:"+vQaijK7E48vJ9H9MJsd3Q=="},AddNewRow:{value:"Ajouter une ligne",comment:"Menu option to add row to table",version:"o5g9uoLTxIYAznEdFR0ioA=="},AlignCenter:{value:"Centrer",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)",version:"33xAsCk52eZdrns6ESQAYQ=="},AlignLeft:{value:"Aligner à gauche",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)",version:"Xy6widnhx5lnasAS62KjOw=="},AlignRight:{value:"Aligner à droite",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)",version:"uRJLJvO4eCo/vRYCoR/eCQ=="},BoldText:{value:"Gras",comment:"Bold text label in toolbar menu label. (dfk 221011)",version:"EmmVb6LoUIGAXaw+1ubcXg=="},ChangeTextAlignment:{value:"Alignement du texte",comment:"Change text alignment label in toolbar menu label. (dfk 221011)",version:"IzmYkHFKuHvhNY4z6j3BSA=="},ChangeTextSize:{value:"Taille du texte",comment:"Change text size in toolbar menu label. (dfk 221011)",version:"aEi5MBJWXKnW/bq2ny1Jzw=="},ClearFormat:{value:"Effacer le format",comment:"Clear the selected text format",version:"Q2OEIvJHrH8MsE4RQNfMWQ=="},Color:{value:"Couleur de police",comment:"Button label for color picker",version:"ZSR6BBl1PNHGAiXYyfyFOw=="},DeleteCol:{value:"Supprimer une colonne",comment:"Menu option to delete column to table",version:"KdwEyWDvorWo9POIi4ZsEg=="},DeleteRow:{value:"Supprimer une ligne",comment:"Menu option to delete row to table",version:"HNt6G95YEKMB64vvyDklHA=="},DeleteTable:{value:"Supprimer la table",comment:"Menu option to delete table",version:"t1C38w3fJ267Gr6tdoHuQQ=="},EnterText:{value:"Saisissez un texte...",comment:"Prompt to user when the text object is empty",version:"PgCz8azF8kkBE7eC4afWjg=="},Heading1:{value:"En-tête 1",comment:"HTML Header 1 format for the text",version:"hnjaVlzIU3eTAQZeaBzzzA=="},Heading2:{value:"En-tête 2",comment:"HTML Header 2 format for the text",version:"pYerzmSdfRZrsIWHcPZJrA=="},Heading3:{value:"En-tête 3",comment:"HTML Header 2 format for the text",version:"xHJCPRmh19YJg/dKSmbuFA=="},InsertHyperlink:{value:"Insérer un lien",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)",version:"ej9rwxwF6Vh7XrQ28DuWmQ=="},InsertImage:{value:"Insérer une image",comment:"Label for toolbar menu option to insert an image. (tew 260205)",version:"WkGyZIiaf2vkOz3sLRe8yw=="},InsertTable:{value:"Insérer une table",comment:"Label for toolbar menu option to insert a table. (tew 260205)",version:"MDUMiPnfA3w0N2bSdGExNg=="},ItalicizeText:{value:"Italique",comment:"Italicize text label in toolbar menu label. (dfk 221011)",version:"1qaKn3zXIiq9tmUO81pOmw=="},LargeText:{value:"Texte de grande taille",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)",version:"Ga4ivSCgHaK3NyfLFnD/hw=="},LinkTo:{value:"Lien vers",comment:"Generic link label. (dfk 221011)",version:"+3NC9+yOccLuyYnxJrdFcQ=="},MediumText:{value:"Texte de taille moyenne",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)",version:"duW4rbX+lr/NEogVsD8MfQ=="},OrderedList:{value:"Liste triée",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"FddCEQTnAmH1gV8D430F/g=="},Paragraph:{value:"Paragraphe",comment:"Paragraph format for the text",version:"pHFeBq44ok2V7M2esInoFA=="},SetTextListStyle:{value:"Style de liste",comment:"Set text list style label in toolbar menu label. (dfk 221011)",version:"aIB7vJ7tZ0Nddeg4AaZriQ=="},SmallText:{value:"Texte de petite taille",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)",version:"KW+o3yZafqHkbzyid96v4g=="},ToggleBorders:{value:"Basculer les bords",comment:"Menu option to toggle table borders",version:"X8/Cbk95LroUwE8LKSnn+A=="},URLLink:{value:"Lien URL",comment:"URL link label. (dfk 221011)",version:"NuOom1L7yZrPKpIzy2/XXg=="},UnderlineText:{value:"Souligner",comment:"Underline text label in toolbar menu label. (dfk 221011)",version:"5ob75WGKK4whhNVPsicswQ=="},UnorderedList:{value:"Liste non triée",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"GIyyLYfHs+U9DgkelqqdpA=="}},WD={AddNewColumn:{value:"Aggiungi colonna",comment:"Menu option to add column to table",version:"+vQaijK7E48vJ9H9MJsd3Q=="},AddNewRow:{value:"Aggiungi riga",comment:"Menu option to add row to table",version:"o5g9uoLTxIYAznEdFR0ioA=="},AlignCenter:{value:"Allinea al centro",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)",version:"33xAsCk52eZdrns6ESQAYQ=="},AlignLeft:{value:"Allinea a sinistra",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)",version:"Xy6widnhx5lnasAS62KjOw=="},AlignRight:{value:"Allinea a destra",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)",version:"uRJLJvO4eCo/vRYCoR/eCQ=="},BoldText:{value:"Grassetto",comment:"Bold text label in toolbar menu label. (dfk 221011)",version:"EmmVb6LoUIGAXaw+1ubcXg=="},ChangeTextAlignment:{value:"Allineamento testo",comment:"Change text alignment label in toolbar menu label. (dfk 221011)",version:"IzmYkHFKuHvhNY4z6j3BSA=="},ChangeTextSize:{value:"Dimensione testo",comment:"Change text size in toolbar menu label. (dfk 221011)",version:"aEi5MBJWXKnW/bq2ny1Jzw=="},ClearFormat:{value:"Cancella formato",comment:"Clear the selected text format",version:"Q2OEIvJHrH8MsE4RQNfMWQ=="},Color:{value:"Colore carattere",comment:"Button label for color picker",version:"ZSR6BBl1PNHGAiXYyfyFOw=="},DeleteCol:{value:"Elimina colonna",comment:"Menu option to delete column to table",version:"KdwEyWDvorWo9POIi4ZsEg=="},DeleteRow:{value:"Elimina riga",comment:"Menu option to delete row to table",version:"HNt6G95YEKMB64vvyDklHA=="},DeleteTable:{value:"Elimina tabella",comment:"Menu option to delete table",version:"t1C38w3fJ267Gr6tdoHuQQ=="},EnterText:{value:"Inserisci del testo...",comment:"Prompt to user when the text object is empty",version:"PgCz8azF8kkBE7eC4afWjg=="},Heading1:{value:"Intestazione 1",comment:"HTML Header 1 format for the text",version:"hnjaVlzIU3eTAQZeaBzzzA=="},Heading2:{value:"Intestazione 2",comment:"HTML Header 2 format for the text",version:"pYerzmSdfRZrsIWHcPZJrA=="},Heading3:{value:"Intestazione 3",comment:"HTML Header 2 format for the text",version:"xHJCPRmh19YJg/dKSmbuFA=="},InsertHyperlink:{value:"Inserisci collegamento",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)",version:"ej9rwxwF6Vh7XrQ28DuWmQ=="},InsertImage:{value:"Inserisci immagine",comment:"Label for toolbar menu option to insert an image. (tew 260205)",version:"WkGyZIiaf2vkOz3sLRe8yw=="},InsertTable:{value:"Inserisci tabella",comment:"Label for toolbar menu option to insert a table. (tew 260205)",version:"MDUMiPnfA3w0N2bSdGExNg=="},ItalicizeText:{value:"Corsivo",comment:"Italicize text label in toolbar menu label. (dfk 221011)",version:"1qaKn3zXIiq9tmUO81pOmw=="},LargeText:{value:"Testo grande",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)",version:"Ga4ivSCgHaK3NyfLFnD/hw=="},LinkTo:{value:"Collega a",comment:"Generic link label. (dfk 221011)",version:"+3NC9+yOccLuyYnxJrdFcQ=="},MediumText:{value:"Testo medio",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)",version:"duW4rbX+lr/NEogVsD8MfQ=="},OrderedList:{value:"Elenco ordinato",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"FddCEQTnAmH1gV8D430F/g=="},Paragraph:{value:"Paragrafo",comment:"Paragraph format for the text",version:"pHFeBq44ok2V7M2esInoFA=="},SetTextListStyle:{value:"Stile elenco",comment:"Set text list style label in toolbar menu label. (dfk 221011)",version:"aIB7vJ7tZ0Nddeg4AaZriQ=="},SmallText:{value:"Testo piccolo",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)",version:"KW+o3yZafqHkbzyid96v4g=="},ToggleBorders:{value:"Attiva/Disattiva bordi",comment:"Menu option to toggle table borders",version:"X8/Cbk95LroUwE8LKSnn+A=="},URLLink:{value:"Collegamento URL",comment:"URL link label. (dfk 221011)",version:"NuOom1L7yZrPKpIzy2/XXg=="},UnderlineText:{value:"Sottolineato",comment:"Underline text label in toolbar menu label. (dfk 221011)",version:"5ob75WGKK4whhNVPsicswQ=="},UnorderedList:{value:"Elenco non ordinato",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"GIyyLYfHs+U9DgkelqqdpA=="}},KD={AddNewColumn:{value:"列を追加",comment:"Menu option to add column to table",version:"+vQaijK7E48vJ9H9MJsd3Q=="},AddNewRow:{value:"行を追加",comment:"Menu option to add row to table",version:"o5g9uoLTxIYAznEdFR0ioA=="},AlignCenter:{value:"中央揃え",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)",version:"33xAsCk52eZdrns6ESQAYQ=="},AlignLeft:{value:"左揃え",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)",version:"Xy6widnhx5lnasAS62KjOw=="},AlignRight:{value:"右揃え",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)",version:"uRJLJvO4eCo/vRYCoR/eCQ=="},BoldText:{value:"太字",comment:"Bold text label in toolbar menu label. (dfk 221011)",version:"EmmVb6LoUIGAXaw+1ubcXg=="},ChangeTextAlignment:{value:"テキストの配置",comment:"Change text alignment label in toolbar menu label. (dfk 221011)",version:"IzmYkHFKuHvhNY4z6j3BSA=="},ChangeTextSize:{value:"テキスト サイズ",comment:"Change text size in toolbar menu label. (dfk 221011)",version:"aEi5MBJWXKnW/bq2ny1Jzw=="},ClearFormat:{value:"書式をクリア",comment:"Clear the selected text format",version:"Q2OEIvJHrH8MsE4RQNfMWQ=="},Color:{value:"フォントの色",comment:"Button label for color picker",version:"ZSR6BBl1PNHGAiXYyfyFOw=="},DeleteCol:{value:"列を削除",comment:"Menu option to delete column to table",version:"KdwEyWDvorWo9POIi4ZsEg=="},DeleteRow:{value:"行を削除",comment:"Menu option to delete row to table",version:"HNt6G95YEKMB64vvyDklHA=="},DeleteTable:{value:"テーブルを削除",comment:"Menu option to delete table",version:"t1C38w3fJ267Gr6tdoHuQQ=="},EnterText:{value:"テキストを入力してください...",comment:"Prompt to user when the text object is empty",version:"PgCz8azF8kkBE7eC4afWjg=="},Heading1:{value:"見出し 1",comment:"HTML Header 1 format for the text",version:"hnjaVlzIU3eTAQZeaBzzzA=="},Heading2:{value:"見出し 2",comment:"HTML Header 2 format for the text",version:"pYerzmSdfRZrsIWHcPZJrA=="},Heading3:{value:"見出し 3",comment:"HTML Header 2 format for the text",version:"xHJCPRmh19YJg/dKSmbuFA=="},InsertHyperlink:{value:"リンクを挿入",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)",version:"ej9rwxwF6Vh7XrQ28DuWmQ=="},InsertImage:{value:"画像を挿入",comment:"Label for toolbar menu option to insert an image. (tew 260205)",version:"WkGyZIiaf2vkOz3sLRe8yw=="},InsertTable:{value:"テーブルを挿入",comment:"Label for toolbar menu option to insert a table. (tew 260205)",version:"MDUMiPnfA3w0N2bSdGExNg=="},ItalicizeText:{value:"斜体",comment:"Italicize text label in toolbar menu label. (dfk 221011)",version:"1qaKn3zXIiq9tmUO81pOmw=="},LargeText:{value:"テキスト大",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)",version:"Ga4ivSCgHaK3NyfLFnD/hw=="},LinkTo:{value:"リンク先",comment:"Generic link label. (dfk 221011)",version:"+3NC9+yOccLuyYnxJrdFcQ=="},MediumText:{value:"テキスト中",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)",version:"duW4rbX+lr/NEogVsD8MfQ=="},OrderedList:{value:"順序付きリスト",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"FddCEQTnAmH1gV8D430F/g=="},Paragraph:{value:"段落",comment:"Paragraph format for the text",version:"pHFeBq44ok2V7M2esInoFA=="},SetTextListStyle:{value:"リスト スタイル",comment:"Set text list style label in toolbar menu label. (dfk 221011)",version:"aIB7vJ7tZ0Nddeg4AaZriQ=="},SmallText:{value:"テキスト小",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)",version:"KW+o3yZafqHkbzyid96v4g=="},ToggleBorders:{value:"境界線の切り替え",comment:"Menu option to toggle table borders",version:"X8/Cbk95LroUwE8LKSnn+A=="},URLLink:{value:"URL リンク",comment:"URL link label. (dfk 221011)",version:"NuOom1L7yZrPKpIzy2/XXg=="},UnderlineText:{value:"下線",comment:"Underline text label in toolbar menu label. (dfk 221011)",version:"5ob75WGKK4whhNVPsicswQ=="},UnorderedList:{value:"順序なしリスト",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"GIyyLYfHs+U9DgkelqqdpA=="}},UD={AddNewColumn:{value:"열 추가",comment:"Menu option to add column to table",version:"+vQaijK7E48vJ9H9MJsd3Q=="},AddNewRow:{value:"행 추가",comment:"Menu option to add row to table",version:"o5g9uoLTxIYAznEdFR0ioA=="},AlignCenter:{value:"중앙 맞춤",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)",version:"33xAsCk52eZdrns6ESQAYQ=="},AlignLeft:{value:"왼쪽 맞춤",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)",version:"Xy6widnhx5lnasAS62KjOw=="},AlignRight:{value:"오른쪽 맞춤",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)",version:"uRJLJvO4eCo/vRYCoR/eCQ=="},BoldText:{value:"굵게",comment:"Bold text label in toolbar menu label. (dfk 221011)",version:"EmmVb6LoUIGAXaw+1ubcXg=="},ChangeTextAlignment:{value:"텍스트 맞춤",comment:"Change text alignment label in toolbar menu label. (dfk 221011)",version:"IzmYkHFKuHvhNY4z6j3BSA=="},ChangeTextSize:{value:"텍스트 크기",comment:"Change text size in toolbar menu label. (dfk 221011)",version:"aEi5MBJWXKnW/bq2ny1Jzw=="},ClearFormat:{value:"형식 지우기",comment:"Clear the selected text format",version:"Q2OEIvJHrH8MsE4RQNfMWQ=="},Color:{value:"글꼴 색",comment:"Button label for color picker",version:"ZSR6BBl1PNHGAiXYyfyFOw=="},DeleteCol:{value:"열 삭제",comment:"Menu option to delete column to table",version:"KdwEyWDvorWo9POIi4ZsEg=="},DeleteRow:{value:"행 삭제",comment:"Menu option to delete row to table",version:"HNt6G95YEKMB64vvyDklHA=="},DeleteTable:{value:"테이블 삭제",comment:"Menu option to delete table",version:"t1C38w3fJ267Gr6tdoHuQQ=="},EnterText:{value:"텍스트 입력...",comment:"Prompt to user when the text object is empty",version:"PgCz8azF8kkBE7eC4afWjg=="},Heading1:{value:"머리글 1",comment:"HTML Header 1 format for the text",version:"hnjaVlzIU3eTAQZeaBzzzA=="},Heading2:{value:"머리글 2",comment:"HTML Header 2 format for the text",version:"pYerzmSdfRZrsIWHcPZJrA=="},Heading3:{value:"머리글 3",comment:"HTML Header 2 format for the text",version:"xHJCPRmh19YJg/dKSmbuFA=="},InsertHyperlink:{value:"링크 삽입",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)",version:"ej9rwxwF6Vh7XrQ28DuWmQ=="},InsertImage:{value:"이미지 삽입",comment:"Label for toolbar menu option to insert an image. (tew 260205)",version:"WkGyZIiaf2vkOz3sLRe8yw=="},InsertTable:{value:"테이블 삽입",comment:"Label for toolbar menu option to insert a table. (tew 260205)",version:"MDUMiPnfA3w0N2bSdGExNg=="},ItalicizeText:{value:"기울임꼴",comment:"Italicize text label in toolbar menu label. (dfk 221011)",version:"1qaKn3zXIiq9tmUO81pOmw=="},LargeText:{value:"큰 텍스트",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)",version:"Ga4ivSCgHaK3NyfLFnD/hw=="},LinkTo:{value:"연결 대상",comment:"Generic link label. (dfk 221011)",version:"+3NC9+yOccLuyYnxJrdFcQ=="},MediumText:{value:"중간 텍스트",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)",version:"duW4rbX+lr/NEogVsD8MfQ=="},OrderedList:{value:"순서가 지정된 목록",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"FddCEQTnAmH1gV8D430F/g=="},Paragraph:{value:"단락",comment:"Paragraph format for the text",version:"pHFeBq44ok2V7M2esInoFA=="},SetTextListStyle:{value:"목록 스타일",comment:"Set text list style label in toolbar menu label. (dfk 221011)",version:"aIB7vJ7tZ0Nddeg4AaZriQ=="},SmallText:{value:"작은 텍스트",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)",version:"KW+o3yZafqHkbzyid96v4g=="},ToggleBorders:{value:"테두리 설정/해제",comment:"Menu option to toggle table borders",version:"X8/Cbk95LroUwE8LKSnn+A=="},URLLink:{value:"URL 링크",comment:"URL link label. (dfk 221011)",version:"NuOom1L7yZrPKpIzy2/XXg=="},UnderlineText:{value:"밑줄",comment:"Underline text label in toolbar menu label. (dfk 221011)",version:"5ob75WGKK4whhNVPsicswQ=="},UnorderedList:{value:"순서가 지정되지 않은 목록",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"GIyyLYfHs+U9DgkelqqdpA=="}},GD={AddNewColumn:{value:"Kolom toevoegen",comment:"Menu option to add column to table",version:"+vQaijK7E48vJ9H9MJsd3Q=="},AddNewRow:{value:"Rij toevoegen",comment:"Menu option to add row to table",version:"o5g9uoLTxIYAznEdFR0ioA=="},AlignCenter:{value:"Op midden uitlijnen",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)",version:"33xAsCk52eZdrns6ESQAYQ=="},AlignLeft:{value:"Links uitlijnen",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)",version:"Xy6widnhx5lnasAS62KjOw=="},AlignRight:{value:"Rechts uitlijnen",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)",version:"uRJLJvO4eCo/vRYCoR/eCQ=="},BoldText:{value:"Vet",comment:"Bold text label in toolbar menu label. (dfk 221011)",version:"EmmVb6LoUIGAXaw+1ubcXg=="},ChangeTextAlignment:{value:"Tekstuitlijning",comment:"Change text alignment label in toolbar menu label. (dfk 221011)",version:"IzmYkHFKuHvhNY4z6j3BSA=="},ChangeTextSize:{value:"Tekstgrootte",comment:"Change text size in toolbar menu label. (dfk 221011)",version:"aEi5MBJWXKnW/bq2ny1Jzw=="},ClearFormat:{value:"Opmaak wissen",comment:"Clear the selected text format",version:"Q2OEIvJHrH8MsE4RQNfMWQ=="},Color:{value:"Tekstkleur",comment:"Button label for color picker",version:"ZSR6BBl1PNHGAiXYyfyFOw=="},DeleteCol:{value:"Kolom verwijderen",comment:"Menu option to delete column to table",version:"KdwEyWDvorWo9POIi4ZsEg=="},DeleteRow:{value:"Rij verwijderen",comment:"Menu option to delete row to table",version:"HNt6G95YEKMB64vvyDklHA=="},DeleteTable:{value:"Tabel verwijderen",comment:"Menu option to delete table",version:"t1C38w3fJ267Gr6tdoHuQQ=="},EnterText:{value:"Geef tekst op...",comment:"Prompt to user when the text object is empty",version:"PgCz8azF8kkBE7eC4afWjg=="},Heading1:{value:"Koptekst 1",comment:"HTML Header 1 format for the text",version:"hnjaVlzIU3eTAQZeaBzzzA=="},Heading2:{value:"Koptekst 2",comment:"HTML Header 2 format for the text",version:"pYerzmSdfRZrsIWHcPZJrA=="},Heading3:{value:"Koptekst 3",comment:"HTML Header 2 format for the text",version:"xHJCPRmh19YJg/dKSmbuFA=="},InsertHyperlink:{value:"Koppeling invoegen",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)",version:"ej9rwxwF6Vh7XrQ28DuWmQ=="},InsertImage:{value:"Afbeelding invoegen",comment:"Label for toolbar menu option to insert an image. (tew 260205)",version:"WkGyZIiaf2vkOz3sLRe8yw=="},InsertTable:{value:"Tabel invoegen",comment:"Label for toolbar menu option to insert a table. (tew 260205)",version:"MDUMiPnfA3w0N2bSdGExNg=="},ItalicizeText:{value:"Cursief",comment:"Italicize text label in toolbar menu label. (dfk 221011)",version:"1qaKn3zXIiq9tmUO81pOmw=="},LargeText:{value:"Tekst groot",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)",version:"Ga4ivSCgHaK3NyfLFnD/hw=="},LinkTo:{value:"Koppelen met",comment:"Generic link label. (dfk 221011)",version:"+3NC9+yOccLuyYnxJrdFcQ=="},MediumText:{value:"Tekst medium",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)",version:"duW4rbX+lr/NEogVsD8MfQ=="},OrderedList:{value:"Geordende lijst",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"FddCEQTnAmH1gV8D430F/g=="},Paragraph:{value:"Alinea",comment:"Paragraph format for the text",version:"pHFeBq44ok2V7M2esInoFA=="},SetTextListStyle:{value:"Lijststijl",comment:"Set text list style label in toolbar menu label. (dfk 221011)",version:"aIB7vJ7tZ0Nddeg4AaZriQ=="},SmallText:{value:"Tekst klein",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)",version:"KW+o3yZafqHkbzyid96v4g=="},ToggleBorders:{value:"Randen in-/uitschakelen",comment:"Menu option to toggle table borders",version:"X8/Cbk95LroUwE8LKSnn+A=="},URLLink:{value:"URL-koppeling",comment:"URL link label. (dfk 221011)",version:"NuOom1L7yZrPKpIzy2/XXg=="},UnderlineText:{value:"Onderstrepen",comment:"Underline text label in toolbar menu label. (dfk 221011)",version:"5ob75WGKK4whhNVPsicswQ=="},UnorderedList:{value:"Ongeordende lijst",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"GIyyLYfHs+U9DgkelqqdpA=="}},YD={AddNewColumn:{value:"Dodaj kolumnę",comment:"Menu option to add column to table",version:"+vQaijK7E48vJ9H9MJsd3Q=="},AddNewRow:{value:"Dodaj wiersz",comment:"Menu option to add row to table",version:"o5g9uoLTxIYAznEdFR0ioA=="},AlignCenter:{value:"Wyrównaj do środka",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)",version:"33xAsCk52eZdrns6ESQAYQ=="},AlignLeft:{value:"Wyrównaj do lewej",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)",version:"Xy6widnhx5lnasAS62KjOw=="},AlignRight:{value:"Wyrównaj do prawej",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)",version:"uRJLJvO4eCo/vRYCoR/eCQ=="},BoldText:{value:"Pogrubienie",comment:"Bold text label in toolbar menu label. (dfk 221011)",version:"EmmVb6LoUIGAXaw+1ubcXg=="},ChangeTextAlignment:{value:"Wyrównanie tekstu",comment:"Change text alignment label in toolbar menu label. (dfk 221011)",version:"IzmYkHFKuHvhNY4z6j3BSA=="},ChangeTextSize:{value:"Wielkość tekstu",comment:"Change text size in toolbar menu label. (dfk 221011)",version:"aEi5MBJWXKnW/bq2ny1Jzw=="},ClearFormat:{value:"Wyczyść format",comment:"Clear the selected text format",version:"Q2OEIvJHrH8MsE4RQNfMWQ=="},Color:{value:"Kolor czcionki",comment:"Button label for color picker",version:"ZSR6BBl1PNHGAiXYyfyFOw=="},DeleteCol:{value:"Usuń kolumnę",comment:"Menu option to delete column to table",version:"KdwEyWDvorWo9POIi4ZsEg=="},DeleteRow:{value:"Usuń wiersz",comment:"Menu option to delete row to table",version:"HNt6G95YEKMB64vvyDklHA=="},DeleteTable:{value:"Usuń tabelę",comment:"Menu option to delete table",version:"t1C38w3fJ267Gr6tdoHuQQ=="},EnterText:{value:"Wprowadź tekst...",comment:"Prompt to user when the text object is empty",version:"PgCz8azF8kkBE7eC4afWjg=="},Heading1:{value:"Nagłówek 1",comment:"HTML Header 1 format for the text",version:"hnjaVlzIU3eTAQZeaBzzzA=="},Heading2:{value:"Nagłówek 2",comment:"HTML Header 2 format for the text",version:"pYerzmSdfRZrsIWHcPZJrA=="},Heading3:{value:"Nagłówek 3",comment:"HTML Header 2 format for the text",version:"xHJCPRmh19YJg/dKSmbuFA=="},InsertHyperlink:{value:"Wstaw łącze",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)",version:"ej9rwxwF6Vh7XrQ28DuWmQ=="},InsertImage:{value:"Wstaw grafikę",comment:"Label for toolbar menu option to insert an image. (tew 260205)",version:"WkGyZIiaf2vkOz3sLRe8yw=="},InsertTable:{value:"Wstaw tabelę",comment:"Label for toolbar menu option to insert a table. (tew 260205)",version:"MDUMiPnfA3w0N2bSdGExNg=="},ItalicizeText:{value:"Kursywa",comment:"Italicize text label in toolbar menu label. (dfk 221011)",version:"1qaKn3zXIiq9tmUO81pOmw=="},LargeText:{value:"Duży tekst",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)",version:"Ga4ivSCgHaK3NyfLFnD/hw=="},LinkTo:{value:"Łącze do:",comment:"Generic link label. (dfk 221011)",version:"+3NC9+yOccLuyYnxJrdFcQ=="},MediumText:{value:"Średni tekst",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)",version:"duW4rbX+lr/NEogVsD8MfQ=="},OrderedList:{value:"Lista uporządkowana",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"FddCEQTnAmH1gV8D430F/g=="},Paragraph:{value:"Akapit",comment:"Paragraph format for the text",version:"pHFeBq44ok2V7M2esInoFA=="},SetTextListStyle:{value:"Styl listy",comment:"Set text list style label in toolbar menu label. (dfk 221011)",version:"aIB7vJ7tZ0Nddeg4AaZriQ=="},SmallText:{value:"Mały tekst",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)",version:"KW+o3yZafqHkbzyid96v4g=="},ToggleBorders:{value:"Przełącz obramowania",comment:"Menu option to toggle table borders",version:"X8/Cbk95LroUwE8LKSnn+A=="},URLLink:{value:"Łącze URL",comment:"URL link label. (dfk 221011)",version:"NuOom1L7yZrPKpIzy2/XXg=="},UnderlineText:{value:"Podkreślenie",comment:"Underline text label in toolbar menu label. (dfk 221011)",version:"5ob75WGKK4whhNVPsicswQ=="},UnorderedList:{value:"Lista nieuporządkowana",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"GIyyLYfHs+U9DgkelqqdpA=="}},VD={AddNewColumn:{value:"Adicionar coluna",comment:"Menu option to add column to table",version:"+vQaijK7E48vJ9H9MJsd3Q=="},AddNewRow:{value:"Adicionar linha",comment:"Menu option to add row to table",version:"o5g9uoLTxIYAznEdFR0ioA=="},AlignCenter:{value:"Alinhar centro",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)",version:"33xAsCk52eZdrns6ESQAYQ=="},AlignLeft:{value:"Alinhar à esquerda",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)",version:"Xy6widnhx5lnasAS62KjOw=="},AlignRight:{value:"Alinhar à direita",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)",version:"uRJLJvO4eCo/vRYCoR/eCQ=="},BoldText:{value:"Negrito",comment:"Bold text label in toolbar menu label. (dfk 221011)",version:"EmmVb6LoUIGAXaw+1ubcXg=="},ChangeTextAlignment:{value:"Alinhamento do texto",comment:"Change text alignment label in toolbar menu label. (dfk 221011)",version:"IzmYkHFKuHvhNY4z6j3BSA=="},ChangeTextSize:{value:"Tamanho do texto",comment:"Change text size in toolbar menu label. (dfk 221011)",version:"aEi5MBJWXKnW/bq2ny1Jzw=="},ClearFormat:{value:"Limpar formato",comment:"Clear the selected text format",version:"Q2OEIvJHrH8MsE4RQNfMWQ=="},Color:{value:"Cor da fonte",comment:"Button label for color picker",version:"ZSR6BBl1PNHGAiXYyfyFOw=="},DeleteCol:{value:"Excluir coluna",comment:"Menu option to delete column to table",version:"KdwEyWDvorWo9POIi4ZsEg=="},DeleteRow:{value:"Excluir linha",comment:"Menu option to delete row to table",version:"HNt6G95YEKMB64vvyDklHA=="},DeleteTable:{value:"Excluir tabela",comment:"Menu option to delete table",version:"t1C38w3fJ267Gr6tdoHuQQ=="},EnterText:{value:"Digite algum texto...",comment:"Prompt to user when the text object is empty",version:"PgCz8azF8kkBE7eC4afWjg=="},Heading1:{value:"Cabeçalho 1",comment:"HTML Header 1 format for the text",version:"hnjaVlzIU3eTAQZeaBzzzA=="},Heading2:{value:"Cabeçallho 2",comment:"HTML Header 2 format for the text",version:"pYerzmSdfRZrsIWHcPZJrA=="},Heading3:{value:"Cabeçalho 3",comment:"HTML Header 2 format for the text",version:"xHJCPRmh19YJg/dKSmbuFA=="},InsertHyperlink:{value:"Inserir link",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)",version:"ej9rwxwF6Vh7XrQ28DuWmQ=="},InsertImage:{value:"Inserir imagem",comment:"Label for toolbar menu option to insert an image. (tew 260205)",version:"WkGyZIiaf2vkOz3sLRe8yw=="},InsertTable:{value:"Inserir tabela",comment:"Label for toolbar menu option to insert a table. (tew 260205)",version:"MDUMiPnfA3w0N2bSdGExNg=="},ItalicizeText:{value:"Itálico",comment:"Italicize text label in toolbar menu label. (dfk 221011)",version:"1qaKn3zXIiq9tmUO81pOmw=="},LargeText:{value:"Texto grande",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)",version:"Ga4ivSCgHaK3NyfLFnD/hw=="},LinkTo:{value:"Link para",comment:"Generic link label. (dfk 221011)",version:"+3NC9+yOccLuyYnxJrdFcQ=="},MediumText:{value:"Texto médio",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)",version:"duW4rbX+lr/NEogVsD8MfQ=="},OrderedList:{value:"Lista ordenada",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"FddCEQTnAmH1gV8D430F/g=="},Paragraph:{value:"Parágrafo",comment:"Paragraph format for the text",version:"pHFeBq44ok2V7M2esInoFA=="},SetTextListStyle:{value:"Estilo em lista",comment:"Set text list style label in toolbar menu label. (dfk 221011)",version:"aIB7vJ7tZ0Nddeg4AaZriQ=="},SmallText:{value:"Texto pequeno",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)",version:"KW+o3yZafqHkbzyid96v4g=="},ToggleBorders:{value:"Alternar bordas",comment:"Menu option to toggle table borders",version:"X8/Cbk95LroUwE8LKSnn+A=="},URLLink:{value:"Link da URL",comment:"URL link label. (dfk 221011)",version:"NuOom1L7yZrPKpIzy2/XXg=="},UnderlineText:{value:"Sublinhado",comment:"Underline text label in toolbar menu label. (dfk 221011)",version:"5ob75WGKK4whhNVPsicswQ=="},UnorderedList:{value:"Lista não ordenada",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"GIyyLYfHs+U9DgkelqqdpA=="}},JD={AddNewColumn:{value:"Добавить столбец",comment:"Menu option to add column to table",version:"+vQaijK7E48vJ9H9MJsd3Q=="},AddNewRow:{value:"Добавить строку",comment:"Menu option to add row to table",version:"o5g9uoLTxIYAznEdFR0ioA=="},AlignCenter:{value:"Выровнять по центру",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)",version:"33xAsCk52eZdrns6ESQAYQ=="},AlignLeft:{value:"Выровнять по левой стороне",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)",version:"Xy6widnhx5lnasAS62KjOw=="},AlignRight:{value:"Выровнять по правой стороне",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)",version:"uRJLJvO4eCo/vRYCoR/eCQ=="},BoldText:{value:"Полужирный",comment:"Bold text label in toolbar menu label. (dfk 221011)",version:"EmmVb6LoUIGAXaw+1ubcXg=="},ChangeTextAlignment:{value:"Выравнивание текста",comment:"Change text alignment label in toolbar menu label. (dfk 221011)",version:"IzmYkHFKuHvhNY4z6j3BSA=="},ChangeTextSize:{value:"Размер текста",comment:"Change text size in toolbar menu label. (dfk 221011)",version:"aEi5MBJWXKnW/bq2ny1Jzw=="},ClearFormat:{value:"Очистить формат",comment:"Clear the selected text format",version:"Q2OEIvJHrH8MsE4RQNfMWQ=="},Color:{value:"Цвет шрифта",comment:"Button label for color picker",version:"ZSR6BBl1PNHGAiXYyfyFOw=="},DeleteCol:{value:"Удалить столбец",comment:"Menu option to delete column to table",version:"KdwEyWDvorWo9POIi4ZsEg=="},DeleteRow:{value:"Удалить строку",comment:"Menu option to delete row to table",version:"HNt6G95YEKMB64vvyDklHA=="},DeleteTable:{value:"Удалить таблицу",comment:"Menu option to delete table",version:"t1C38w3fJ267Gr6tdoHuQQ=="},EnterText:{value:"Введите текст...",comment:"Prompt to user when the text object is empty",version:"PgCz8azF8kkBE7eC4afWjg=="},Heading1:{value:"Заголовок 1",comment:"HTML Header 1 format for the text",version:"hnjaVlzIU3eTAQZeaBzzzA=="},Heading2:{value:"Заголовок 2",comment:"HTML Header 2 format for the text",version:"pYerzmSdfRZrsIWHcPZJrA=="},Heading3:{value:"Заголовок 3",comment:"HTML Header 2 format for the text",version:"xHJCPRmh19YJg/dKSmbuFA=="},InsertHyperlink:{value:"Вставить ссылку",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)",version:"ej9rwxwF6Vh7XrQ28DuWmQ=="},InsertImage:{value:"Вставить изображение",comment:"Label for toolbar menu option to insert an image. (tew 260205)",version:"WkGyZIiaf2vkOz3sLRe8yw=="},InsertTable:{value:"Вставить таблицу",comment:"Label for toolbar menu option to insert a table. (tew 260205)",version:"MDUMiPnfA3w0N2bSdGExNg=="},ItalicizeText:{value:"Курсив",comment:"Italicize text label in toolbar menu label. (dfk 221011)",version:"1qaKn3zXIiq9tmUO81pOmw=="},LargeText:{value:"Крупный текст",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)",version:"Ga4ivSCgHaK3NyfLFnD/hw=="},LinkTo:{value:"Ссылка на",comment:"Generic link label. (dfk 221011)",version:"+3NC9+yOccLuyYnxJrdFcQ=="},MediumText:{value:"Средний текст",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)",version:"duW4rbX+lr/NEogVsD8MfQ=="},OrderedList:{value:"Упорядоченный список",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"FddCEQTnAmH1gV8D430F/g=="},Paragraph:{value:"Абзац",comment:"Paragraph format for the text",version:"pHFeBq44ok2V7M2esInoFA=="},SetTextListStyle:{value:"Стиль списка",comment:"Set text list style label in toolbar menu label. (dfk 221011)",version:"aIB7vJ7tZ0Nddeg4AaZriQ=="},SmallText:{value:"Мелкий текст",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)",version:"KW+o3yZafqHkbzyid96v4g=="},ToggleBorders:{value:"Переключить границы",comment:"Menu option to toggle table borders",version:"X8/Cbk95LroUwE8LKSnn+A=="},URLLink:{value:"URL-ссылка",comment:"URL link label. (dfk 221011)",version:"NuOom1L7yZrPKpIzy2/XXg=="},UnderlineText:{value:"Подчеркивание",comment:"Underline text label in toolbar menu label. (dfk 221011)",version:"5ob75WGKK4whhNVPsicswQ=="},UnorderedList:{value:"Неупорядоченный список",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"GIyyLYfHs+U9DgkelqqdpA=="}},qD={AddNewColumn:{value:"Lägg till kolumn",comment:"Menu option to add column to table",version:"+vQaijK7E48vJ9H9MJsd3Q=="},AddNewRow:{value:"Lägg till rad",comment:"Menu option to add row to table",version:"o5g9uoLTxIYAznEdFR0ioA=="},AlignCenter:{value:"Centrera",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)",version:"33xAsCk52eZdrns6ESQAYQ=="},AlignLeft:{value:"Vänsterjustera",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)",version:"Xy6widnhx5lnasAS62KjOw=="},AlignRight:{value:"Högerjustera",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)",version:"uRJLJvO4eCo/vRYCoR/eCQ=="},BoldText:{value:"Fetstil",comment:"Bold text label in toolbar menu label. (dfk 221011)",version:"EmmVb6LoUIGAXaw+1ubcXg=="},ChangeTextAlignment:{value:"Textjustering",comment:"Change text alignment label in toolbar menu label. (dfk 221011)",version:"IzmYkHFKuHvhNY4z6j3BSA=="},ChangeTextSize:{value:"Textstorlek",comment:"Change text size in toolbar menu label. (dfk 221011)",version:"aEi5MBJWXKnW/bq2ny1Jzw=="},ClearFormat:{value:"Rensa format",comment:"Clear the selected text format",version:"Q2OEIvJHrH8MsE4RQNfMWQ=="},Color:{value:"Teckenfärg",comment:"Button label for color picker",version:"ZSR6BBl1PNHGAiXYyfyFOw=="},DeleteCol:{value:"Ta bort kolumn",comment:"Menu option to delete column to table",version:"KdwEyWDvorWo9POIi4ZsEg=="},DeleteRow:{value:"Ta bort rad",comment:"Menu option to delete row to table",version:"HNt6G95YEKMB64vvyDklHA=="},DeleteTable:{value:"Ta bort tabell",comment:"Menu option to delete table",version:"t1C38w3fJ267Gr6tdoHuQQ=="},EnterText:{value:"Skriv in text...",comment:"Prompt to user when the text object is empty",version:"PgCz8azF8kkBE7eC4afWjg=="},Heading1:{value:"Rubrik 1",comment:"HTML Header 1 format for the text",version:"hnjaVlzIU3eTAQZeaBzzzA=="},Heading2:{value:"Rubrik 2",comment:"HTML Header 2 format for the text",version:"pYerzmSdfRZrsIWHcPZJrA=="},Heading3:{value:"Rubrik 3",comment:"HTML Header 2 format for the text",version:"xHJCPRmh19YJg/dKSmbuFA=="},InsertHyperlink:{value:"Infoga länk",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)",version:"ej9rwxwF6Vh7XrQ28DuWmQ=="},InsertImage:{value:"Infoga bild",comment:"Label for toolbar menu option to insert an image. (tew 260205)",version:"WkGyZIiaf2vkOz3sLRe8yw=="},InsertTable:{value:"Infoga tabell",comment:"Label for toolbar menu option to insert a table. (tew 260205)",version:"MDUMiPnfA3w0N2bSdGExNg=="},ItalicizeText:{value:"Kursiv",comment:"Italicize text label in toolbar menu label. (dfk 221011)",version:"1qaKn3zXIiq9tmUO81pOmw=="},LargeText:{value:"Stor text",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)",version:"Ga4ivSCgHaK3NyfLFnD/hw=="},LinkTo:{value:"Länka till",comment:"Generic link label. (dfk 221011)",version:"+3NC9+yOccLuyYnxJrdFcQ=="},MediumText:{value:"Medelstor text",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)",version:"duW4rbX+lr/NEogVsD8MfQ=="},OrderedList:{value:"Sorterad lista",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"FddCEQTnAmH1gV8D430F/g=="},Paragraph:{value:"Stycke",comment:"Paragraph format for the text",version:"pHFeBq44ok2V7M2esInoFA=="},SetTextListStyle:{value:"Som lista",comment:"Set text list style label in toolbar menu label. (dfk 221011)",version:"aIB7vJ7tZ0Nddeg4AaZriQ=="},SmallText:{value:"Liten text",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)",version:"KW+o3yZafqHkbzyid96v4g=="},ToggleBorders:{value:"Kantlinjer på/av",comment:"Menu option to toggle table borders",version:"X8/Cbk95LroUwE8LKSnn+A=="},URLLink:{value:"URL-länk",comment:"URL link label. (dfk 221011)",version:"NuOom1L7yZrPKpIzy2/XXg=="},UnderlineText:{value:"Understrykning",comment:"Underline text label in toolbar menu label. (dfk 221011)",version:"5ob75WGKK4whhNVPsicswQ=="},UnorderedList:{value:"Osorterad lista",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"GIyyLYfHs+U9DgkelqqdpA=="}},XD={AddNewColumn:{value:"Sütun ekle",comment:"Menu option to add column to table",version:"+vQaijK7E48vJ9H9MJsd3Q=="},AddNewRow:{value:"Satır ekle",comment:"Menu option to add row to table",version:"o5g9uoLTxIYAznEdFR0ioA=="},AlignCenter:{value:"Ortaya hizala",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)",version:"33xAsCk52eZdrns6ESQAYQ=="},AlignLeft:{value:"Sola hizala",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)",version:"Xy6widnhx5lnasAS62KjOw=="},AlignRight:{value:"Sağa hizala",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)",version:"uRJLJvO4eCo/vRYCoR/eCQ=="},BoldText:{value:"Kalın",comment:"Bold text label in toolbar menu label. (dfk 221011)",version:"EmmVb6LoUIGAXaw+1ubcXg=="},ChangeTextAlignment:{value:"Metin hizalaması",comment:"Change text alignment label in toolbar menu label. (dfk 221011)",version:"IzmYkHFKuHvhNY4z6j3BSA=="},ChangeTextSize:{value:"Metin boyutu",comment:"Change text size in toolbar menu label. (dfk 221011)",version:"aEi5MBJWXKnW/bq2ny1Jzw=="},ClearFormat:{value:"Biçimi temizle",comment:"Clear the selected text format",version:"Q2OEIvJHrH8MsE4RQNfMWQ=="},Color:{value:"Yazı tipi rengi",comment:"Button label for color picker",version:"ZSR6BBl1PNHGAiXYyfyFOw=="},DeleteCol:{value:"Sütun sil",comment:"Menu option to delete column to table",version:"KdwEyWDvorWo9POIi4ZsEg=="},DeleteRow:{value:"Satır sil",comment:"Menu option to delete row to table",version:"HNt6G95YEKMB64vvyDklHA=="},DeleteTable:{value:"Tabloyu sil",comment:"Menu option to delete table",version:"t1C38w3fJ267Gr6tdoHuQQ=="},EnterText:{value:"Metin girin...",comment:"Prompt to user when the text object is empty",version:"PgCz8azF8kkBE7eC4afWjg=="},Heading1:{value:"Başlık 1",comment:"HTML Header 1 format for the text",version:"hnjaVlzIU3eTAQZeaBzzzA=="},Heading2:{value:"Başlık 2",comment:"HTML Header 2 format for the text",version:"pYerzmSdfRZrsIWHcPZJrA=="},Heading3:{value:"Başlık 3",comment:"HTML Header 2 format for the text",version:"xHJCPRmh19YJg/dKSmbuFA=="},InsertHyperlink:{value:"Bağlantı ekle",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)",version:"ej9rwxwF6Vh7XrQ28DuWmQ=="},InsertImage:{value:"Görüntü ekle",comment:"Label for toolbar menu option to insert an image. (tew 260205)",version:"WkGyZIiaf2vkOz3sLRe8yw=="},InsertTable:{value:"Tablo ekle",comment:"Label for toolbar menu option to insert a table. (tew 260205)",version:"MDUMiPnfA3w0N2bSdGExNg=="},ItalicizeText:{value:"İtalik",comment:"Italicize text label in toolbar menu label. (dfk 221011)",version:"1qaKn3zXIiq9tmUO81pOmw=="},LargeText:{value:"Büyük metin",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)",version:"Ga4ivSCgHaK3NyfLFnD/hw=="},LinkTo:{value:"Bağlantı:",comment:"Generic link label. (dfk 221011)",version:"+3NC9+yOccLuyYnxJrdFcQ=="},MediumText:{value:"Orta boy metin",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)",version:"duW4rbX+lr/NEogVsD8MfQ=="},OrderedList:{value:"Sıralı liste",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"FddCEQTnAmH1gV8D430F/g=="},Paragraph:{value:"Paragraf",comment:"Paragraph format for the text",version:"pHFeBq44ok2V7M2esInoFA=="},SetTextListStyle:{value:"Liste stili",comment:"Set text list style label in toolbar menu label. (dfk 221011)",version:"aIB7vJ7tZ0Nddeg4AaZriQ=="},SmallText:{value:"Küçük metin",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)",version:"KW+o3yZafqHkbzyid96v4g=="},ToggleBorders:{value:"Kenarlıkları değiştir",comment:"Menu option to toggle table borders",version:"X8/Cbk95LroUwE8LKSnn+A=="},URLLink:{value:"URL bağlantısı",comment:"URL link label. (dfk 221011)",version:"NuOom1L7yZrPKpIzy2/XXg=="},UnderlineText:{value:"Altını çiz",comment:"Underline text label in toolbar menu label. (dfk 221011)",version:"5ob75WGKK4whhNVPsicswQ=="},UnorderedList:{value:"Sırasız liste",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"GIyyLYfHs+U9DgkelqqdpA=="}};const QD={de:FD,es:$D,en:BD,fr:HD,it:WD,ja:KD,ko:UD,nl:GD,pl:YD,pt:VD,ru:JD,sv:qD,tr:XD,"de-de":FD,"es-es":$D,"en-us":BD,"fr-fr":HD,"it-it":WD,"ja-jp":KD,"ko-kr":UD,"nl-nl":GD,"pl-pl":YD,"pt-br":VD,"ru-ru":JD,"sv-se":qD,"tr-tr":XD,"zh-cn":{AddNewColumn:{value:"添加列",comment:"Menu option to add column to table",version:"+vQaijK7E48vJ9H9MJsd3Q=="},AddNewRow:{value:"添加行",comment:"Menu option to add row to table",version:"o5g9uoLTxIYAznEdFR0ioA=="},AlignCenter:{value:"居中对齐",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)",version:"33xAsCk52eZdrns6ESQAYQ=="},AlignLeft:{value:"靠左对齐",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)",version:"Xy6widnhx5lnasAS62KjOw=="},AlignRight:{value:"靠右对齐",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)",version:"uRJLJvO4eCo/vRYCoR/eCQ=="},BoldText:{value:"加粗",comment:"Bold text label in toolbar menu label. (dfk 221011)",version:"EmmVb6LoUIGAXaw+1ubcXg=="},ChangeTextAlignment:{value:"文本对齐",comment:"Change text alignment label in toolbar menu label. (dfk 221011)",version:"IzmYkHFKuHvhNY4z6j3BSA=="},ChangeTextSize:{value:"文本大小",comment:"Change text size in toolbar menu label. (dfk 221011)",version:"aEi5MBJWXKnW/bq2ny1Jzw=="},ClearFormat:{value:"清除格式",comment:"Clear the selected text format",version:"Q2OEIvJHrH8MsE4RQNfMWQ=="},Color:{value:"字体颜色",comment:"Button label for color picker",version:"ZSR6BBl1PNHGAiXYyfyFOw=="},DeleteCol:{value:"删除列",comment:"Menu option to delete column to table",version:"KdwEyWDvorWo9POIi4ZsEg=="},DeleteRow:{value:"删除行",comment:"Menu option to delete row to table",version:"HNt6G95YEKMB64vvyDklHA=="},DeleteTable:{value:"删除表格",comment:"Menu option to delete table",version:"t1C38w3fJ267Gr6tdoHuQQ=="},EnterText:{value:"输入一些文本...",comment:"Prompt to user when the text object is empty",version:"PgCz8azF8kkBE7eC4afWjg=="},Heading1:{value:"标题 1",comment:"HTML Header 1 format for the text",version:"hnjaVlzIU3eTAQZeaBzzzA=="},Heading2:{value:"标题 2",comment:"HTML Header 2 format for the text",version:"pYerzmSdfRZrsIWHcPZJrA=="},Heading3:{value:"标题 3",comment:"HTML Header 2 format for the text",version:"xHJCPRmh19YJg/dKSmbuFA=="},InsertHyperlink:{value:"插入链接",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)",version:"ej9rwxwF6Vh7XrQ28DuWmQ=="},InsertImage:{value:"插入图像",comment:"Label for toolbar menu option to insert an image. (tew 260205)",version:"WkGyZIiaf2vkOz3sLRe8yw=="},InsertTable:{value:"插入表格",comment:"Label for toolbar menu option to insert a table. (tew 260205)",version:"MDUMiPnfA3w0N2bSdGExNg=="},ItalicizeText:{value:"斜体",comment:"Italicize text label in toolbar menu label. (dfk 221011)",version:"1qaKn3zXIiq9tmUO81pOmw=="},LargeText:{value:"大型文本",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)",version:"Ga4ivSCgHaK3NyfLFnD/hw=="},LinkTo:{value:"链接到",comment:"Generic link label. (dfk 221011)",version:"+3NC9+yOccLuyYnxJrdFcQ=="},MediumText:{value:"中型文本",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)",version:"duW4rbX+lr/NEogVsD8MfQ=="},OrderedList:{value:"有序列表",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"FddCEQTnAmH1gV8D430F/g=="},Paragraph:{value:"段落",comment:"Paragraph format for the text",version:"pHFeBq44ok2V7M2esInoFA=="},SetTextListStyle:{value:"列表样式",comment:"Set text list style label in toolbar menu label. (dfk 221011)",version:"aIB7vJ7tZ0Nddeg4AaZriQ=="},SmallText:{value:"小型文本",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)",version:"KW+o3yZafqHkbzyid96v4g=="},ToggleBorders:{value:"切换边框",comment:"Menu option to toggle table borders",version:"X8/Cbk95LroUwE8LKSnn+A=="},URLLink:{value:"URL 链接",comment:"URL link label. (dfk 221011)",version:"NuOom1L7yZrPKpIzy2/XXg=="},UnderlineText:{value:"下划线",comment:"Underline text label in toolbar menu label. (dfk 221011)",version:"5ob75WGKK4whhNVPsicswQ=="},UnorderedList:{value:"无序列表",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"GIyyLYfHs+U9DgkelqqdpA=="}},"zh-tw":{AddNewColumn:{value:"新增欄",comment:"Menu option to add column to table",version:"+vQaijK7E48vJ9H9MJsd3Q=="},AddNewRow:{value:"新增列",comment:"Menu option to add row to table",version:"o5g9uoLTxIYAznEdFR0ioA=="},AlignCenter:{value:"置中對齊",comment:"Align center text format dropdown in toolbar menu label. (dfk 221011)",version:"33xAsCk52eZdrns6ESQAYQ=="},AlignLeft:{value:"靠左對齊",comment:"Align left text format dropdown in toolbar menu label. (dfk 221011)",version:"Xy6widnhx5lnasAS62KjOw=="},AlignRight:{value:"靠右對齊",comment:"Align right text format dropdown in toolbar menu label. (dfk 221011)",version:"uRJLJvO4eCo/vRYCoR/eCQ=="},BoldText:{value:"粗體",comment:"Bold text label in toolbar menu label. (dfk 221011)",version:"EmmVb6LoUIGAXaw+1ubcXg=="},ChangeTextAlignment:{value:"文字對齊方式",comment:"Change text alignment label in toolbar menu label. (dfk 221011)",version:"IzmYkHFKuHvhNY4z6j3BSA=="},ChangeTextSize:{value:"文字大小",comment:"Change text size in toolbar menu label. (dfk 221011)",version:"aEi5MBJWXKnW/bq2ny1Jzw=="},ClearFormat:{value:"清除格式",comment:"Clear the selected text format",version:"Q2OEIvJHrH8MsE4RQNfMWQ=="},Color:{value:"字型色彩",comment:"Button label for color picker",version:"ZSR6BBl1PNHGAiXYyfyFOw=="},DeleteCol:{value:"刪除欄",comment:"Menu option to delete column to table",version:"KdwEyWDvorWo9POIi4ZsEg=="},DeleteRow:{value:"刪除列",comment:"Menu option to delete row to table",version:"HNt6G95YEKMB64vvyDklHA=="},DeleteTable:{value:"刪除表格",comment:"Menu option to delete table",version:"t1C38w3fJ267Gr6tdoHuQQ=="},EnterText:{value:"輸入一些文字...",comment:"Prompt to user when the text object is empty",version:"PgCz8azF8kkBE7eC4afWjg=="},Heading1:{value:"標頭 1",comment:"HTML Header 1 format for the text",version:"hnjaVlzIU3eTAQZeaBzzzA=="},Heading2:{value:"標頭 2",comment:"HTML Header 2 format for the text",version:"pYerzmSdfRZrsIWHcPZJrA=="},Heading3:{value:"標頭 3",comment:"HTML Header 2 format for the text",version:"xHJCPRmh19YJg/dKSmbuFA=="},InsertHyperlink:{value:"插入連結",comment:"Insert hyperlink label in toolbar menu label. (dfk 221011)",version:"ej9rwxwF6Vh7XrQ28DuWmQ=="},InsertImage:{value:"插入影像",comment:"Label for toolbar menu option to insert an image. (tew 260205)",version:"WkGyZIiaf2vkOz3sLRe8yw=="},InsertTable:{value:"插入表格",comment:"Label for toolbar menu option to insert a table. (tew 260205)",version:"MDUMiPnfA3w0N2bSdGExNg=="},ItalicizeText:{value:"斜體字",comment:"Italicize text label in toolbar menu label. (dfk 221011)",version:"1qaKn3zXIiq9tmUO81pOmw=="},LargeText:{value:"大型文字",comment:"Large text in text size dropdown in toolbar menu label. (dfk 221011)",version:"Ga4ivSCgHaK3NyfLFnD/hw=="},LinkTo:{value:"連結至",comment:"Generic link label. (dfk 221011)",version:"+3NC9+yOccLuyYnxJrdFcQ=="},MediumText:{value:"中型文字",comment:"Medium text in text size dropdown in toolbar menu label. (dfk 221011)",version:"duW4rbX+lr/NEogVsD8MfQ=="},OrderedList:{value:"排序清單",comment:"Ordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"FddCEQTnAmH1gV8D430F/g=="},Paragraph:{value:"段落",comment:"Paragraph format for the text",version:"pHFeBq44ok2V7M2esInoFA=="},SetTextListStyle:{value:"清單樣式",comment:"Set text list style label in toolbar menu label. (dfk 221011)",version:"aIB7vJ7tZ0Nddeg4AaZriQ=="},SmallText:{value:"小型文字",comment:"Small text in text size dropdown in toolbar menu label. (dfk 221011)",version:"KW+o3yZafqHkbzyid96v4g=="},ToggleBorders:{value:"切換框線",comment:"Menu option to toggle table borders",version:"X8/Cbk95LroUwE8LKSnn+A=="},URLLink:{value:"URL 連結",comment:"URL link label. (dfk 221011)",version:"NuOom1L7yZrPKpIzy2/XXg=="},UnderlineText:{value:"底線",comment:"Underline text label in toolbar menu label. (dfk 221011)",version:"5ob75WGKK4whhNVPsicswQ=="},UnorderedList:{value:"未排序清單",comment:"Unordered list in list format dropdown in toolbar menu label. (dfk 221011)",version:"GIyyLYfHs+U9DgkelqqdpA=="}}};function ZD(e,t){return e.getEditorState().read(()=>{const e=Fi(t);return null!==e&&e.isSelected()})}function eF(e){const[t]=vu(),[n,r]=S(()=>ZD(t,e));w(()=>{let n=!0;const o=t.registerUpdateListener(()=>{n&&r(ZD(t,e))});return()=>{n=!1,o()}},[t,e]);return[n,M(n=>{t.update(()=>{let t=ao();Ur(t)||(t=oo(),Yi(t)),Ur(t)&&(n?t.add(e):t.delete(e))})},[t,e]),M(()=>{t.update(()=>{const e=ao();Ur(e)&&e.clear()})},[t])]}var tF,nF={};var rF=function(){if(tF)return nF;tF=1;var e={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:255,g:255,b:255,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},t=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i,n=/^rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(\d(\.\d+)?)\)$/i,r=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i,o=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i,i=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i,s=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i,a=Math.floor,l=Math.round,c=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n,r,o,i,s,c,u,d,f,p,h,g,m=0,v=0,b=0,y=1;if(this._invalid=!1,arguments[0]instanceof t)m=arguments[0]._r,v=arguments[0]._g,b=arguments[0]._b,y=arguments[0]._a,this._invalid=arguments[0]._invalid;else if(arguments.length<3)if("string"==typeof arguments[0])if(h=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(g=arguments[0]))m=parseInt(h[1],10),v=parseInt(h[2],10),b=parseInt(h[3],10);else if(h=/^argb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(g))y=parseFloat(l(h[1]/2.55)/100),m=parseInt(h[2],10),v=parseInt(h[3],10),b=parseInt(h[4],10);else if(h=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(g))m=parseInt(h[1],10),v=parseInt(h[2],10),b=parseInt(h[3],10),y=parseFloat(h[4]);else if(h=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(g))m=parseInt(h[1],16),v=parseInt(h[2],16),b=parseInt(h[3],16),y=1;else if(h=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i.exec(g))m=parseInt(h[1]+h[1],16),v=parseInt(h[2]+h[2],16),b=parseInt(h[3]+h[3],16),y=1;else if(h=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(g)){switch(n=parseFloat(h[1]),r=parseFloat(h[3]),i=parseFloat(h[5]),r=(r/=100)<0?0:r>1?1:r,u=(n=(n%=360)<0?0:n>360?360:n)/60,d=(c=(i=(i/=100)<0?0:i>1?1:i)<=.5?2*i*r:(2-2*i)*r)*(1-Math.abs(u%2-1)),f=[],u=Math.floor(u)){case 0:f=[c,d,0];break;case 1:f=[d,c,0];break;case 2:f=[0,c,d];break;case 3:f=[0,d,c];break;case 4:f=[d,0,c];break;case 5:f=[c,0,d];break;default:f=[0,0,0]}p=i-.5*c,m=f[0]+p,v=f[1]+p,b=f[2]+p,m=l(255*m),v=l(255*v),b=l(255*b),y=1}else if(h=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(g)){switch(n=parseFloat(h[1]),r=parseFloat(h[3]),i=parseFloat(h[5]),y=parseFloat(h[7]),r=(r/=100)<0?0:r>1?1:r,u=(n=(n%=360)<0?0:n>360?360:n)/60,d=(c=(i=(i/=100)<0?0:i>1?1:i)<=.5?2*i*r:(2-2*i)*r)*(1-Math.abs(u%2-1)),f=[],u=Math.floor(u)){case 0:f=[c,d,0];break;case 1:f=[d,c,0];break;case 2:f=[0,c,d];break;case 3:f=[0,d,c];break;case 4:f=[d,0,c];break;case 5:f=[c,0,d];break;default:f=[0,0,0]}p=i-.5*c,m=f[0]+p,v=f[1]+p,b=f[2]+p,m=l(255*m),v=l(255*v),b=l(255*b)}else if(h=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(g)){switch(n=parseFloat(h[1]),r=parseFloat(h[3]),s=parseFloat(h[5]),u=(n=(n%=360)<0?0:n>360?360:n)/60,d=(c=(s=(s/=100)<0?0:s>1?1:s)*(r=(r/=100)<0?0:r>1?1:r))*(1-Math.abs(u%2-1)),f=[],u=Math.floor(u)){case 0:f=[c,d,0];break;case 1:f=[d,c,0];break;case 2:f=[0,c,d];break;case 3:f=[0,d,c];break;case 4:f=[d,0,c];break;case 5:f=[c,0,d];break;default:f=[0,0,0]}p=s-c,m=f[0]+p,v=f[1]+p,b=f[2]+p,m=l(255*m),v=l(255*v),b=l(255*b),y=1}else e[g.toLowerCase()]?(o=g.toLowerCase(),m=e[o].r,v=e[o].g,b=e[o].b,y="number"==typeof e[o].a?e[o].a:1):this._invalid=!0;else"number"==typeof arguments[0]&&arguments[0]>=0&&"argb"===arguments[1]?(y=(4278190080&arguments[0])>>>24,y/=255,m=(16711680&arguments[0])>>16,v=(65280&arguments[0])>>8,b=255&arguments[0]):"number"==typeof arguments[0]&&arguments[0]>=0?(m=(16711680&arguments[0])>>16,v=(65280&arguments[0])>>8,b=255&arguments[0]):this._invalid=!0;else arguments.length>=3?(m=arguments[0],v=arguments[1],b=arguments[2],y=arguments.length>=4?arguments[3]:1):this._invalid=!0;Number.isNaN(+m+v+b+y)&&(this._invalid=!0),this._r=a(m),this._g=a(v),this._b=a(b),this._a=y,this._spaces={}}var n,r;return n=t,(r=[{key:"isInvalid",value:function(){return this._invalid}},{key:"setAlpha",value:function(e){this._a=e,this._spaces={}}},{key:"getAlpha",value:function(){return this._a}},{key:"toRGB",value:function(){return this._spaces.rgb||(this._spaces.rgb=t.toRGB(this)),this._spaces.rgb}},{key:"toRGBA",value:function(){return this._spaces.rgba||(this._spaces.rgba=t.toRGBA(this)),this._spaces.rgba}},{key:"toString",value:function(){return this._spaces.rgb||(this._spaces.rgb=t.toRGB(this)),this._spaces.rgb}},{key:"toHex",value:function(){return this._spaces.hex||(this._spaces.hex=t.toHex(this)),this._spaces.hex}},{key:"toHSL",value:function(e){return this._spaces.hsl||(this._spaces.hsl=t.toHSL(this,e)),this._spaces.hsl}},{key:"toHSLA",value:function(e){return this._spaces.hsla||(this._spaces.hsla=t.toHSLA(this,e)),this._spaces.hsla}},{key:"toHSV",value:function(){var e=this.toHSVComponents();return"hsv(".concat(e.h,",").concat(e.s,",").concat(e.v,")")}},{key:"toHSVComponents",value:function(){return this._spaces.hsvComp||(this._spaces.hsvComp=t.toHSVComponents(this)),this._spaces.hsvComp}},{key:"toNumber",value:function(){return this._spaces.num||(this._spaces.num=t.toNumber(this)),this._spaces.num}},{key:"isDark",value:function(){return this.isInvalid()||this.getLuminance()<125}},{key:"getLuminance",value:function(){return void 0===this._lumi&&(this._lumi=.299*this._r+.587*this._g+.114*this._b),this._lumi}},{key:"shiftLuminance",value:function(e){var t=this.toHSLA(),n=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(t),r=parseFloat(n[1]),o=parseFloat(n[3]),i=parseFloat(n[5]),s=parseFloat(n[7]);return i+=e,i=Math.max(0,Math.min(i,100)),"hsla(".concat(r,",").concat(o,",").concat(i,",").concat(s,")")}},{key:"isEqual",value:function(e){return e instanceof t||(e=new t(e)),this._r===e._r&&this._g===e._g&&this._b===e._b}},{key:"blend",value:function(e,t){var n=a(this._r+(e._r-this._r)*t),r=a(this._g+(e._g-this._g)*t),o=a(this._b+(e._b-this._b)*t),i=a(this._a+(e._a-this._a)*t);return"rgba(".concat([n,r,o,i].join(","),")")}},{key:"createShiftedColor",value:function(e){(void 0===e||Number.isNaN(+e))&&(e=1);var n=this.getLuminance(),r=this._g<126?1:1+this._g/512;return new t(this.shiftLuminance(20*(n*r<220?.8+1/(n+1)*4:-(.8+n/255*1))*e))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(o=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key,"string"))?o:String(o),r)}var o}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}();return c.toRGB=function(e){if(e instanceof c)return"rgb(".concat([e._r,e._g,e._b].join(","),")");"string"==typeof e&&(e=c.toNumber(e));var t=(65280&e)>>8,n=255&e;return"rgb(".concat((16711680&e)>>16,",").concat(t,",").concat(n,")")},c.toRGBA=function(e,t){if(e instanceof c)return"rgba(".concat([e._r,e._g,e._b,void 0!==t?t:e._a].join(","),")");"string"==typeof e&&(e=c.toNumber(e));var n=(65280&e)>>8,r=255&e;return"rgba(".concat((16711680&e)>>16,",").concat(n,",").concat(r,",").concat(void 0!==t?t:e._a,")")},c.toHex=function(e){var t,n,r;return e instanceof c?(t=e._r.toString(16),n=e._g.toString(16),r=e._b.toString(16),1===t.length&&(t="0".concat(t)),1===n.length&&(n="0".concat(n)),1===r.length&&(r="0".concat(r)),"#".concat([t,n,r].join(""))):("string"==typeof e&&(e=c.toNumber(e)),t=((16711680&e)>>16).toString(16),n=((65280&e)>>8).toString(16),r=(255&e).toString(16),1===t.length&&(t="0".concat(t)),1===n.length&&(n="0".concat(n)),1===r.length&&(r="0".concat(r)),"#".concat(t).concat(n).concat(r))},c.toHSL=function(e,t){var n,r,o,i=0;"string"==typeof e&&(e=new c(e));var s=e._r/255,a=e._g/255,l=e._b/255,u=Math.max(s,a,l),d=Math.min(s,a,l);if(r=t?.21*s+.72*a+.07*l:(u+d)/2,u===d)n=0,i=0;else{switch(o=u-d,n=r>.5?o/(2-u-d):o/(u+d),u){case s:i=(a-l)/o+(a<l?6:0);break;case a:i=(l-s)/o+2;break;case l:i=(s-a)/o+4}i/=6}return"hsl(".concat(360*i,",").concat(100*n,",").concat(100*r,")")},c.toHSLA=function(e,t){var n,r,o,i=0;"string"==typeof e&&(e=new c(e));var s=e._r/255,a=e._g/255,l=e._b/255,u=e._a,d=Math.max(s,a,l),f=Math.min(s,a,l);if(r=t?.21*s+.72*a+.07*l:(d+f)/2,d===f)n=0,i=0;else{switch(o=d-f,n=r>.5?o/(2-d-f):o/(d+f),d){case s:i=(a-l)/o+(a<l?6:0);break;case a:i=(l-s)/o+2;break;case l:i=(s-a)/o+4}i/=6}return"hsla(".concat(360*i,",").concat(100*n,",").concat(100*r,",").concat(u,")")},c.toHSVComponents=function(e){var t,n,r=0;"string"==typeof e&&(e=new c(e));var o=e._r/255,i=e._g/255,s=e._b/255,a=Math.max(o,i,s),l=Math.min(o,i,s),u=a;if(a===l)t=0,r=0;else{switch(t=0===(n=a-l)?0:n/u,a){case o:r=(i-s)/n+(i<s?6:0);break;case i:r=(s-o)/n+2;break;case s:r=(o-i)/n+4}r/=6}return{h:360*r%360,s:100*t,v:100*u}},c.toNumber=function(){if(1===arguments.length&&arguments[0]instanceof c)return(arguments[0]._r<<16)+(arguments[0]._g<<8)+arguments[0]._b;var e,t,n=0,r=0,o=0;return 1===arguments.length&&"string"==typeof arguments[0]&&((e=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i.exec(t=arguments[0]))?(n=parseInt(e[1],10),r=parseInt(e[2],10),o=parseInt(e[3],10)):(e=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(t))?(n=parseInt(e[1],16),r=parseInt(e[2],16),o=parseInt(e[3],16)):(e=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i.exec(t))&&(n=parseInt(e[1]+e[1],16),r=parseInt(e[2]+e[2],16),o=parseInt(e[3]+e[3],16))),(n<<16)+(r<<8)+o},c.blend=function(e,t,n){var r=(16711680&(e=c.toNumber(e)))>>16,o=(65280&e)>>8,i=255&e;return(r+(((16711680&(t=c.toNumber(t)))>>16)-r)*n<<16)+(o+(((65280&t)>>8)-o)*n<<8)+(i+((255&t)-i)*n)},c.getBlend=function(e,t,n){var r=e._r+(t._r-e._r)*n,o=e._g+(t._g-e._g)*n,i=e._b+(t._b-e._b)*n,s=e._a+(t._a-e._a)*n;return new c(r,o,i,s)},c.isCSSColor=function(a){return!(arguments.length>1||"string"!=typeof a)&&(t.test(a)||n.test(a)||r.test(a)||o.test(a)||i.test(a)||s.test(a)||e[a.toLowerCase()])},c.getBestContrast=function(e,t,n){var r=e.getLuminance();return Math.abs(r-t.getLuminance())>Math.abs(r-n.getLuminance())?t:n},c.getContrast=function(e,t){if(e&&t){var n=e.getLuminance()/100,r=t.getLuminance()/100;return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}},c.isDark=function(){var e={getLuminance:c.prototype.getLuminance,isInvalid:c.prototype.isInvalid};return c.prototype.init.apply(e,[].slice.call(arguments)),c.prototype.isDark.call(e)},c.useDarkLabel=function(e,t){return e._a>.5?!e.isDark():!t},nF.Color=c,nF}();function oF(e){return{fontWeight:e.fontWeight,fontStyle:e.fontStyle,textDecoration:e.textDecoration,color:e.color,fontSize:e.fontSize,fontFamily:e.fontFamily}}function iF(e,t){return t?.getNodes().some(t=>t.getKey()===e)}var sF,aF;var lF=function(){if(aF)return sF;aF=1;var e={};function t(){t.init.call(this)}return e.isObject=function(e){return"object"==typeof e&&null!==e},e.isNumber=function(e){return"number"==typeof e},e.isUndefined=function(e){return void 0===e},e.isFunction=function(e){return"function"==typeof e},sF=t,t.EventEmitter=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},t.prototype.setMaxListeners=function(t){if(!e.isNumber(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},t.prototype.emit=function(t){var n,r,o,i,s,a;if(this._events||(this._events={}),"error"===t&&!this._events.error)throw(n=arguments[1])instanceof Error?n:Error('Uncaught, unspecified "error" event.');if(r=this._events[t],e.isUndefined(r))return!1;if(e.isFunction(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(o=arguments.length,i=new Array(o-1),s=1;s<o;s++)i[s-1]=arguments[s];r.apply(this,i)}else if(e.isObject(r)){for(o=arguments.length,i=new Array(o-1),s=1;s<o;s++)i[s-1]=arguments[s];for(o=(a=r.slice()).length,s=0;s<o;s++)a[s].apply(this,i)}return!0},t.prototype.addListener=function(n,r){var o;if(!e.isFunction(r))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",n,e.isFunction(r.listener)?r.listener:r),this._events[n]?e.isObject(this._events[n])?this._events[n].push(r):this._events[n]=[this._events[n],r]:this._events[n]=r,e.isObject(this._events[n])&&!this._events[n].warned)&&((o=e.isUndefined(this._maxListeners)?t.defaultMaxListeners:this._maxListeners)&&o>0&&this._events[n].length>o&&(this._events[n].warned=!0,e.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[n].length),e.isFunction(console.trace)&&console.trace()));return this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(t,n){if(!e.isFunction(n))throw TypeError("listener must be a function");var r=!1;function o(){this.removeListener(t,o),r||(r=!0,n.apply(this,arguments))}return o.listener=n,this.on(t,o),this},t.prototype.removeListener=function(t,n){var r,o,i,s;if(!e.isFunction(n))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(i=(r=this._events[t]).length,o=-1,r===n||e.isFunction(r.listener)&&r.listener===n)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,n);else if(e.isObject(r)){for(s=i;s-- >0;)if(r[s]===n||r[s].listener&&r[s].listener===n){o=s;break}if(o<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(o,1),this._events.removeListener&&this.emit("removeListener",t,n)}return this},t.prototype.removeAllListeners=function(t){var n,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(n in this._events)"removeListener"!==n&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],e.isFunction(r))this.removeListener(t,r);else if(Array.isArray(r))for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},t.prototype.listeners=function(t){return this._events&&this._events[t]?e.isFunction(this._events[t])?[this._events[t]]:this._events[t].slice():[]},t.listenerCount=function(t,n){return t._events&&t._events[n]?e.isFunction(t._events[n])?1:t._events[n].length:0},sF}();let cF=[];const uF=new lF.EventEmitter;uF.isSelected=e=>{const t=e?.qDef?.cId;return-1!==cF.indexOf(t)},uF.setSelected=e=>{cF!==e&&(cF=e,uF.emit("change"))};function dF({cId:e,initStyle:t,nodeKey:n}){const{layout:r,theme:o,flags:i}=b(H),[s]=vu(),a=wd(),[l,c,u]=eF(n),d=k(null),[f,p]=S(t);w(()=>{p(t)},[t]);const h=x(()=>{let e;return l?e="rgba(0, 152, 69, 0.25)":a&&(e="rgba(0, 0, 0, 0.075)"),{backgroundColor:e}},[l,a]),g=x(()=>r&&o?function(e,t){const{qHyperCube:n}=t;if(n){const t=n.qMeasureInfo?.findIndex(t=>t.cId===e);if(void 0!==t&&-1!==t){const e=n?.qDataPages?.[0]?.qMatrix?.[0][t];if(1===e?.qAttrExps?.qValues?.length){const t=e.qAttrExps.qValues[0]?.qText;if(t){const n=new rF.Color(t);return{value:e?.qText||"",expressionColor:n.toHex()}}}return{value:e?.qText||""}}}return{value:""}}(e,r):{value:""},[r,e,o]);w(()=>Ka(s.registerCommand(Bt,e=>(s.update(()=>{const t=e,r=ao();if(Wr(r)&&l){if(iF(n,r)){const e=((e,t)=>{const n={};switch(e){case"bold":n.fontWeight=t;break;case"italic":n.fontStyle=t;break;case"underline":n.textDecoration=t}return n})(t,r.hasFormat(t)?t:"");p(t=>({...t,...e}))}}else if(l&&Ur(r)&&iF(n,r)&&d.current){const e=oF(d.current.style);p(((e,t)=>{const n={};switch(e){case"bold":t.fontWeight?"bold"===t.fontWeight&&(n.fontWeight=""):n.fontWeight="bold";break;case"italic":n.fontStyle="italic"===t.fontStyle?"":"italic";break;case"underline":n.textDecoration="underline"===t.textDecoration?"":"underline"}return{...t,...n}})(t,e))}}),!1),3),s.registerCommand(nD,e=>(s.getEditorState().read(()=>{if("color"===e.styleKey&&g.expressionColor)return!1;if(d.current&&l){const t=ao();if(iF(n,t)){const t=oF(d.current?.style);t[e.styleKey]=e.styleValue,p(t)}}}),!1),ci),s.registerCommand(rD,()=>(s.getEditorState().read(()=>{if(d.current&&l){const e=ao();if(iF(n,e)){const e={};g.expressionColor&&(e.color=g.expressionColor),p(e)}}}),!1),ci),s.registerCommand(Ct,()=>(i?.isEnabled("GV_661_SN_TEXT_REMOVE_ICON_ANALYSIS_MODE")&&s.update(()=>{const e=[],t=ao(),n=t?.getNodes();n?.forEach(t=>{t?.getExpressionId&&e.push(t?.getExpressionId())}),uF.setSelected(e)}),!1),1)),[s,c,u,l,n,g]),w(()=>{a||(u(),i?.isEnabled("GV_661_SN_TEXT_REMOVE_ICON_ANALYSIS_MODE")&&uF.setSelected([]))},[a,u,i]),w(()=>{s.update(()=>{!function(e,t){const n=Fi(e);n&&"setFormatStyle"in n&&"function"==typeof n.setFormatStyle&&n.setFormatStyle(t)}(n,f)})},[f,s,n]);const m=M(e=>{if(a){const t=e.currentTarget.getBoundingClientRect(),r=e.clientX-t.left;r>3?(e.preventDefault(),e.stopPropagation(),u(),c(!0)):r<t.width&&s.update(()=>{const e=ao();if(Ur(e)){const t=Fi(n);t?.selectPrevious(),e.delete(n)}})}},[a,u,c,s,n]);return wu.jsx("span",{style:{...h,...f,color:g.expressionColor?g.expressionColor:f.color},onClick:m,ref:d,id:e,children:g.value})}const fF="qlik.expression.node";class pF extends bj{static getType(){return fF}static clone(e){return new pF(e.__expressionId,e.__formatStyle,e.__key)}static importJSON(e){const t=function(e,t){return new pF(e,t)}(e.expressionId,e.formatStyle);return t}getExpressionId(){return this.__expressionId}exportJSON(){return{expressionId:this.getExpressionId(),formatStyle:this.__formatStyle,type:fF,version:1}}setExported(){this.getWritable().__exported=!0}constructor(e,t,n){super(t,n),this.__expressionId=e}createDOM(){return document.createElement("span")}exportDOM(e){return super.exportDOM(e)}updateDOM(){return!1}decorate(){return wu.jsx(dF,{cId:this.__expressionId,initStyle:this.__formatStyle,nodeKey:this.__key})}isInline(){return!0}isKeyboardSelectable(){return!0}}function hF(e){return e instanceof pF}const gF="ImageNode",mF=kt("INSERT_IMAGE_COMMAND"),vF=()=>{const e={getChar(e){let t,n=e;return n>9?(t=65+n-10,t>90&&(t+=6)):n=`${n}`.charCodeAt(0),!t||[48,111,79,105,73,108].indexOf(t)>-1?this.getChar(n+1):String.fromCharCode(t)},base62(e){const t=this.getChar(e%62),n=Math.floor(e/62);return n>0?this.base62(n)+t:t},id(){return this.base62(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};return e.id()},bF=(e,t=new Set,n=new Set)=>{const r=e;if(r.type===gF)r.id||(r.id=vF()),t.add(r.id),r.tempUrlDef&&(n.add({id:r.id,url:{qStaticContentUrlDef:{qUrl:r.tempUrlDef}}}),delete r.tempUrl,delete r.tempUrlDef);else if("children"in r&&Array.isArray(r.children))for(const e of r.children)bF(e,t,n);return{imageIds:t,newPropertyImages:n}},yF=(e,t)=>e?.images?.find(e=>e.id===t)?.url.qStaticContentUrl.qUrl||"";async function xF(e,t,n){try{const r=await t.getProperties();if(r.text=JSON.stringify(e),n?.isEnabled("TLV_801_SN_TEXT_IMAGE_SUPPORT")){const{images:t,jsonData:n}=((e,t)=>{const n=e,r=t.images||[];let o=new Set;if(n.root){const e=bF(n.root);o=e.imageIds,e.newPropertyImages.forEach(e=>{r.push(e)})}const i=[],s=new Set;return r.forEach(e=>{o.has(e.id)&&!s.has(e.id)&&(s.add(e.id),i.push(e))}),{images:i,jsonData:n}})(e,r);r.images=t,r.text=JSON.stringify(n)}await t.setProperties(r)}catch(e){console.error(e)}}function _F(){const[e]=vu(),t=wd(),{edit:n,model:r,emitter:o,flags:i}=b(H);return w(()=>{const t=()=>{r&&xF(e.getEditorState().toJSON(),r,i)},n=t=>{const n=e.parseEditorState(t);t!==JSON.stringify(e.getEditorState().toJSON())&&e.setEditorState(n)};return o?.on("saveDocument",t),o?.on("reloadData",n),()=>{o?.removeListener("saveDocument",t),o?.removeListener("reloadData",n)}},[o,r]),w(()=>{e.setEditable(n)},[n]),w(()=>{t&&e.focus()},[t,e]),null}class wF{constructor(){this.nodeStore=new Map,this.pendingDeletes=[]}update(e,t){if("updated"===t||"created"===t){const n=Fi(e);if(hF(n)&&(this.nodeStore.set(e,n),"created"===t)){const e=this.pendingDeletes.findIndex(e=>n.getExpressionId()===e);-1!==e&&this.pendingDeletes.splice(e,1)}}else if("destroyed"===t){const t=this.nodeStore.get(e);t&&(this.pendingDeletes.push(t.getExpressionId()),this.nodeStore.delete(e))}}sync(){const e=this.pendingDeletes;return this.pendingDeletes=[],e}}function SF(){const{layout:e,emitter:t}=b(H),[n]=vu(),r=k(new wF),o=wd();return w(()=>{const e=n.registerMutationListener(pF,e=>{n.getEditorState().read(()=>{for(const[t,n]of e)r.current.update(t,n)})});return()=>{e()}},[n]),w(()=>{e&&n.update(()=>{const t=e,n=t.qHyperCube?.qMeasureInfo;if(n){const e=us(pF),t=((e,t)=>{const n=e.reduce((e,n)=>{const r=t.find(e=>e.cId===n.getExpressionId());return r||e.push(n),e},[]);return n})(e,n);if(t.forEach(e=>{e.remove()}),n.length>e.length){const e=ao(),{cId:t}=n[n.length-1],r=new pF(t,{}),o=Nr(" "),i=Nr("");Wr(e)?e.insertNodes([i,r,o]):ml(r)}}})},[e,n]),w(()=>n.registerCommand(Wt,e=>("Backspace"===e.key&&n.update(()=>{const e=ao();Ur(e)&&e.getNodes().forEach(e=>{hF(e)&&(e.selectPrevious(),e.remove())})}),!1),1),[n]),w(()=>{if(!o){const e=r.current.sync();e.length>0&&t?.emit("onNodeDestroyed",e)}},[o,t]),null}const kF=/"/g;function CF(){const{model:e,emitter:t}=b(H),[n]=vu(),r=k(new Map);return w(()=>{const o=n.registerMutationListener(Sr,e=>{e.forEach((e,t)=>{if("destroyed"===e)r.current.delete(t);else{const e=n.getElementByKey(t)?.style.fontFamily;e&&r.current.set(t,e)}})});async function i(){if(e){!async function(e,t){try{const n=await t.getProperties();n.fontsUsed=e,await t.setProperties(n)}catch(e){console.error(e)}}(Array.from(new Set(r.current.values())).map(e=>e.replace(kF,"")),e)}}return t?.on("saveDocument",i),()=>{t?.removeListener("saveDocument",i),o()}},[n,t,e]),null}function EF(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var TF,AF="top",LF="top-right",MF="right",RF="bottom-right",NF="bottom",OF="bottom-left",PF="left",IF="top-left";EF(EF(EF(EF(EF(EF(EF(EF(EF(EF(TF={},"equal-equal",[AF,NF]),"equal-higher",[NF,RF]),"equal-lower",[AF,LF]),"equal-void",[AF,NF]),"higher-equal",[PF,OF,AF,LF]),"higher-higher-acute",[NF,OF,PF,LF]),"higher-higher-obtuse",[NF,AF]),"higher-lower-negative",[AF,LF,MF]),"higher-lower-positive",[NF,OF,PF]),"higher-void",[AF]),EF(EF(EF(EF(EF(EF(EF(EF(EF(EF(TF,"lower-equal",[AF]),"lower-higher-negative",[AF,IF]),"lower-higher-positive",[RF]),"lower-lower-acute",[AF,IF,PF,LF,MF]),"lower-lower-obtuse",[AF,NF]),"lower-void",[AF]),"void-equal",[AF]),"void-higher",[AF,NF]),"void-lower",[AF,NF,PF]),"void-void",[AF]),EF(TF,"unclassified",[AF,NF,MF,PF,LF,RF,OF,IF]);var zF,jF,DF=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],FF=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];var BF=function(){if(jF)return zF;jF=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),i=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!i)return!1;for(r in n);return void 0===r||e.call(n,r)},s=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},a=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return zF=function e(){var t,n,r,l,c,u,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=a(d,n),d!==(l=a(t,n))&&(h&&l&&(i(l)||(c=o(l)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},s(d,{name:n,newValue:e(h,u,l)})):void 0!==l&&s(d,{name:n,newValue:l}));return d},zF}();function $F(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function HF(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function WF(){}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}(BF);var KF=1/.7,UF="\\s*([+-]?\\d+)\\s*",GF="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",YF="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",VF=/^#([0-9a-f]{3,8})$/,JF=new RegExp(`^rgb\\(${UF},${UF},${UF}\\)$`),qF=new RegExp(`^rgb\\(${YF},${YF},${YF}\\)$`),XF=new RegExp(`^rgba\\(${UF},${UF},${UF},${GF}\\)$`),QF=new RegExp(`^rgba\\(${YF},${YF},${YF},${GF}\\)$`),ZF=new RegExp(`^hsl\\(${GF},${YF},${YF}\\)$`),eB=new RegExp(`^hsla\\(${GF},${YF},${YF},${GF}\\)$`),tB={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function nB(){return this.rgb().formatHex()}function rB(){return this.rgb().formatRgb()}function oB(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=VF.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?iB(t):3===n?new cB(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?sB(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?sB(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=JF.exec(e))?new cB(t[1],t[2],t[3],1):(t=qF.exec(e))?new cB(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=XF.exec(e))?sB(t[1],t[2],t[3],t[4]):(t=QF.exec(e))?sB(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=ZF.exec(e))?gB(t[1],t[2]/100,t[3]/100,1):(t=eB.exec(e))?gB(t[1],t[2]/100,t[3]/100,t[4]):tB.hasOwnProperty(e)?iB(tB[e]):"transparent"===e?new cB(NaN,NaN,NaN,0):null}function iB(e){return new cB(e>>16&255,e>>8&255,255&e,1)}function sB(e,t,n,r){return r<=0&&(e=t=n=NaN),new cB(e,t,n,r)}function aB(e){return e instanceof WF||(e=oB(e)),e?new cB((e=e.rgb()).r,e.g,e.b,e.opacity):new cB}function lB(e,t,n,r){return 1===arguments.length?aB(e):new cB(e,t,n,null==r?1:r)}function cB(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function uB(){return`#${hB(this.r)}${hB(this.g)}${hB(this.b)}`}function dB(){const e=fB(this.opacity);return`${1===e?"rgb(":"rgba("}${pB(this.r)}, ${pB(this.g)}, ${pB(this.b)}${1===e?")":`, ${e})`}`}function fB(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function pB(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function hB(e){return((e=pB(e))<16?"0":"")+e.toString(16)}function gB(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new vB(e,t,n,r)}function mB(e){if(e instanceof vB)return new vB(e.h,e.s,e.l,e.opacity);if(e instanceof WF||(e=oB(e)),!e)return new vB;if(e instanceof vB)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,a=i-o,l=(i+o)/2;return a?(s=t===i?(n-r)/a+6*(n<r):n===i?(r-t)/a+2:(t-n)/a+4,a/=l<.5?i+o:2-i-o,s*=60):a=l>0&&l<1?0:s,new vB(s,a,l,e.opacity)}function vB(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function bB(e){return(e=(e||0)%360)<0?e+360:e}function yB(e){return Math.max(0,Math.min(1,e||0))}function xB(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}$F(WF,oB,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:nB,formatHex:nB,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return mB(this).formatHsl()},formatRgb:rB,toString:rB}),$F(cB,lB,HF(WF,{brighter(e){return e=null==e?KF:Math.pow(KF,e),new cB(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new cB(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new cB(pB(this.r),pB(this.g),pB(this.b),fB(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:uB,formatHex:uB,formatHex8:function(){return`#${hB(this.r)}${hB(this.g)}${hB(this.b)}${hB(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:dB,toString:dB})),$F(vB,function(e,t,n,r){return 1===arguments.length?mB(e):new vB(e,t,n,null==r?1:r)},HF(WF,{brighter(e){return e=null==e?KF:Math.pow(KF,e),new vB(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new vB(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new cB(xB(e>=240?e-240:e+120,o,r),xB(e,o,r),xB(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new vB(bB(this.h),yB(this.s),yB(this.l),fB(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=fB(this.opacity);return`${1===e?"hsl(":"hsla("}${bB(this.h)}, ${100*yB(this.s)}%, ${100*yB(this.l)}%${1===e?")":`, ${e})`}`}}));const _B=Math.PI/180,wB=180/Math.PI,SB=4/29,kB=6/29,CB=3*kB*kB;function EB(e){if(e instanceof TB)return new TB(e.l,e.a,e.b,e.opacity);if(e instanceof NB)return OB(e);e instanceof cB||(e=aB(e));var t,n,r=RB(e.r),o=RB(e.g),i=RB(e.b),s=AB((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=s:(t=AB((.4360747*r+.3850649*o+.1430804*i)/.96422),n=AB((.0139322*r+.0971045*o+.7141733*i)/.82521)),new TB(116*s-16,500*(t-s),200*(s-n),e.opacity)}function TB(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function AB(e){return e>.008856451679035631?Math.pow(e,1/3):e/CB+SB}function LB(e){return e>kB?e*e*e:CB*(e-SB)}function MB(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function RB(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function NB(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function OB(e){if(isNaN(e.h))return new TB(e.l,0,0,e.opacity);var t=e.h*_B;return new TB(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}$F(TB,function(e,t,n,r){return 1===arguments.length?EB(e):new TB(e,t,n,null==r?1:r)},HF(WF,{brighter(e){return new TB(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new TB(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new cB(MB(3.1338561*(t=.96422*LB(t))-1.6168667*(e=1*LB(e))-.4906146*(n=.82521*LB(n))),MB(-.9787684*t+1.9161415*e+.033454*n),MB(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),$F(NB,function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof NB)return new NB(e.h,e.c,e.l,e.opacity);if(e instanceof TB||(e=EB(e)),0===e.a&&0===e.b)return new NB(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*wB;return new NB(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new NB(e,t,n,null==r?1:r)},HF(WF,{brighter(e){return new NB(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new NB(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return OB(this).rgb()}}));var PB=e=>()=>e;function IB(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):PB(isNaN(e)?t:e)}!function e(t){var n=function(e){return 1==(e=+e)?IB:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):PB(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=lB(e)).r,(t=lB(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),s=IB(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=s(t),e+""}}return r.gamma=e,r}(1);var zB,jB="center",DB="bottom";function FB(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function BB(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=HB)):void 0===t&&(t=$B);for(var n,r,o,i,s,a=new UB(e),l=[a];n=l.pop();)if((o=t(n.data))&&(s=(o=Array.from(o)).length))for(n.children=o,i=s-1;i>=0;--i)l.push(r=o[i]=new UB(o[i])),r.parent=n,r.depth=n.depth+1;return a.eachBefore(KB)}function $B(e){return e.children}function HB(e){return Array.isArray(e)?e[1]:null}function WB(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function KB(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function UB(e){this.data=e,this.depth=this.height=0,this.parent=null}[{key:"NoDataExist",alignment:jB,condition:function(e){var t=e.layoutService;if(!t)return!1;var n=t.meta.size;return n.x*n.y==0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:jB,condition:function(e){var t=e.layoutService;return!!t&&t.getHyperCubeValue("qMeasureInfo").every(function(e){return"NaN"===e.qMin&&"NaN"===e.qMax})}},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:jB,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var n=t.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:jB},{key:"DataRangeIncludingZero",alignment:DB},{key:"LimitedData",alignment:DB},{key:"NegativeOrZeroValues",alignment:DB}].reduce(function(e,t){return e[t.key]=t,e},{}),UB.prototype=BB.prototype={constructor:UB,count:function(){return this.eachAfter(FB)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,o,i=this,s=[i],a=[],l=-1;i=s.pop();)if(a.push(i),n=i.children)for(r=0,o=n.length;r<o;++r)s.push(n[r]);for(;i=a.pop();)e.call(t,i,++l,this);return this},eachBefore:function(e,t){for(var n,r,o=this,i=[o],s=-1;o=i.pop();)if(e.call(t,o,++s,this),n=o.children)for(r=n.length-1;r>=0;--r)i.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,o=r&&r.length;--o>=0;)n+=r[o].value;t.value=n})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),o=null;for(e=n.pop(),t=r.pop();e===t;)o=e,e=n.pop(),t=r.pop();return o}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var o=r.length;e!==n;)r.splice(o,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function(){return BB(this).eachBefore(WB)},[Symbol.iterator]:function*(){var e,t,n,r,o=this,i=[o];do{for(e=i.reverse(),i=[];o=e.pop();)if(yield o,t=o.children)for(n=0,r=t.length;n<r;++n)i.push(t[n])}while(i.length)}},zB=function(e){
100
100
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
101
- e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,s,a,l,c,u,d,f=e.length,p=e.search(/[0-9\-\+#]/),h=p>0?e.substring(0,p):"",g=e.split("").reverse().join(""),m=g.search(/[0-9\-\+#]/),v=f-m,b=e.substring(v,v+1),y=v+("."===b||","===b?1:0),x=m>0?e.substring(y,f):"";if(n=(t="-"===(e=e.substring(p,y)).charAt(0)?-t:+t)<0?t=-t:0,o=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",i=r&&r[1]&&r[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",a=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=a)&&(t=(+t).toFixed(a+1)),u=e[0].split(i),e[0]=u.join(""),(s=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-s;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(g="",v=(d=t[0]).length%l,f=d.length,y=0;y<f;y++)g+=d.charAt(y),!((y-v+1)%l)&&y<f-l&&(g+=i);t[0]=g}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+x}},zB({exports:{}});const GB=e=>`text-toolbar.${e?.id}`,YB=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:wu.jsx("path",{d:"M3.5 7a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3m0-1a.5.5 0 1 1 0-1 .5.5 0 0 1 0 1M1 2a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1zm14 1v4.293L13.207 5.5a1 1 0 0 0-1.414 0L8 9.293 7.207 8.5a1 1 0 0 0-1.414 0l-4.5 4.5H1V3zm0 5.707V13h-3.293l-3-3L12.5 6.207zM10.293 13H2.707L6.5 9.207z"})})),VB=Qj(Xj,"InsertImage"),JB=()=>{const{flags:e,showMediaLibrary:t}=b(H),[n]=vu(),r=M(()=>{t?.({onConfirm:(e,t)=>{n.dispatchCommand(mF,{method:"mediaLibrary",tempUrl:e,tempUrlDef:t})},onCancel:()=>{}})},[n,t]);return t&&e?.isEnabled("TLV_801_SN_TEXT_IMAGE_SUPPORT")?wu.jsx(VB,{onClick:r,"data-testid":"editor-toolbar-insertImage-btn",children:wu.jsx(YB,{height:12})}):null};function qB(){const{element:e,edit:t,model:n,flags:r,theme:o}=b(H),i=x(()=>{const t=e?.closest(".qv-inner-object");return t||e},[e]),s=x(()=>function(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?FF:DF}(r),[r]),a=x(()=>(e=>{const t=e?.getDataColorPickerPalettes();if(t&&t?.length>0)return["#404040",...t[0].colors.filter(e=>"none"!==e)]})(o),[o]);return wu.jsx(k_,{open:t,anchorEl:i,placement:"top",transition:!0,sx:{zIndex:1},id:GB(n),children:({TransitionProps:e})=>wu.jsx(fw,{...e,children:wu.jsx(by,{sx:{borderRadius:1,padding:.25},children:wu.jsxs(Fj,{children:[wu.jsx(qj,{compact:!0}),wu.jsx(DD,{}),wu.jsx(CD,{compact:!0,fonts:s}),wu.jsx(LD,{compact:!0}),wu.jsx(DD,{}),wu.jsx(tD,{}),wu.jsx(OD,{}),wu.jsx(jD,{}),wu.jsx(ID,{}),wu.jsx(kD,{colorPalette:a}),wu.jsx(DD,{}),wu.jsx(Uj,{compact:!0}),wu.jsx(DD,{}),wu.jsx(iD,{}),wu.jsx(DD,{}),wu.jsx(RD,{}),wu.jsx(JB,{})]})})})})}function XB(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}XB(".hideScrollBar {\n overflow-y: scroll;\n -ms-overflow-style: none; /* Internet Explorer and Edge */\n scrollbar-width: none; /* Firefox */\n height: 100%;\n position: relative;\n}\n\n.hideScrollBar::-webkit-scrollbar {\n display: none;\n}\n");XB(".tek__editor__container span.tek__image {\n display: inline-block;\n position: relative;\n user-select: none;\n max-width: 100%;\n overflow: hidden;\n}\n\n.tek__editor__container .tek__image img.focused {\n user-select: none;\n}\n\n.tek__editor__container .tek__image img.focused {\n cursor: grab;\n outline: 2px solid var(--sprout-selected-border-default-color);\n outline-offset: -3px;\n}\n\n.tek__editor__container .tek__image img.focused.draggable:active {\n cursor: grabbing;\n}\n\n.tek__editor__container .tek__image .tek__image_resizer {\n display: block;\n width: 6px;\n height: 6px;\n position: absolute;\n background-color: var(--sprout-selected-border-default-color);\n}\n\n.tek__editor__container .tek__image .tek__image_resizer.tek__image_resizer_n {\n top: -2px;\n left: 48%;\n cursor: n-resize;\n}\n\n.tek__editor__container .tek__image .tek__image_resizer.tek__image_resizer_ne {\n top: -2px;\n right: -1px;\n cursor: ne-resize;\n}\n\n.tek__editor__container .tek__image .tek__image_resizer.tek__image_resizer_e {\n bottom: 48%;\n right: -1px;\n cursor: e-resize;\n}\n\n.tek__editor__container .tek__image .tek__image_resizer.tek__image_resizer_se {\n bottom: 4px;\n right: -1px;\n cursor: nwse-resize;\n}\n\n.tek__editor__container .tek__image .tek__image_resizer.tek__image_resizer_s {\n bottom: 4px;\n left: 48%;\n cursor: s-resize;\n}\n\n.tek__editor__container .tek__image .tek__image_resizer.tek__image_resizer_sw {\n bottom: 4px;\n left: -1px;\n cursor: sw-resize;\n}\n\n.tek__editor__container .tek__image .tek__image_resizer.tek__image_resizer_w {\n bottom: 48%;\n left: -1px;\n cursor: w-resize;\n}\n\n.tek__editor__container .tek__image .tek__image_resizer.tek__image_resizer_nw {\n top: -2px;\n left: -1px;\n cursor: nw-resize;\n}\n\n.tek__editor__container .image_control_wrapper__resizing {\n touch-action: none;\n}\n");const QB=1,ZB=8,e$=2,t$=4;function n$({onResizeStart:e,onResizeEnd:t,imageRef:n,maxWidth:r,editor:o}){const i=k(null),s=k({direction:0,isResizing:!1,ratio:0,startHeight:0,startWidth:0,startX:0,startY:0,currentHeight:0,currentWidth:0}),a=k({priority:"",value:"default"}),l=o.getRootElement();let c=r;c||(c=null!==l?l.getBoundingClientRect().width:100);const u=null!==l?l.getBoundingClientRect().height:100,d=(t,r)=>{const o=n.current,c=i.current;if(null!==o&&null!==c){const{width:n,height:i}=o.getBoundingClientRect(),u=s.current;u.startWidth=n,u.startHeight=i,u.ratio=n/i,u.currentWidth=n,u.currentHeight=i,u.startX=t.clientX,u.startY=t.clientY,u.isResizing=!0,u.direction=r,(e=>{let t;t=e===QB||e===t$?"ew":e===ZB||e===e$?"ns":e&ZB&&e&t$||e&e$&&e&QB?"nwse":"nesw",null!==l&&l.style.setProperty("cursor",`${t}-resize`,"important"),null!==document.body&&(document.body.style.setProperty("cursor",`${t}-resize`,"important"),a.current.value=document.body.style.getPropertyValue("-webkit-user-select"),a.current.priority=document.body.style.getPropertyPriority("-webkit-user-select"),document.body.style.setProperty("-webkit-user-select","none","important"))})(r),e(),c.classList.add("image_control_wrapper__resizing"),o.style.height=`${i}px`,o.style.width=`${n}px`,document.addEventListener("pointermove",f),document.addEventListener("pointerup",p)}},f=e=>{const t=n.current,r=s.current,o=r.direction&(QB|t$),i=r.direction&(e$|ZB);if(null!==t&&r.isResizing)if(o&&i){let n=Math.floor(r.startX-e.clientX);n=r.direction&QB?-n:n;const o=r$(r.startWidth+n,20,c),i=o/r.ratio;t.style.width=`${o}px`,t.style.height=`${i}px`,r.currentHeight=i,r.currentWidth=o}else if(i){let n=Math.floor(r.startY-e.clientY);n=r.direction&e$?-n:n;const o=r$(r.startHeight+n,20,u);t.style.height=`${o}px`,r.currentHeight=o}else{let n=Math.floor(r.startX-e.clientX);n=r.direction&QB?-n:n;const o=r$(r.startWidth+n,20,c);t.style.width=`${o}px`,r.currentWidth=o}},p=()=>{const e=n.current,r=s.current,o=i.current;if(null!==e&&null!==o&&r.isResizing){const e=r.currentWidth,n=r.currentHeight;r.startWidth=0,r.startHeight=0,r.ratio=0,r.startX=0,r.startY=0,r.currentWidth=0,r.currentHeight=0,r.isResizing=!1,o.classList.remove("image_control_wrapper__resizing"),null!==l&&l.style.setProperty("cursor","default"),null!==document.body&&(document.body.style.setProperty("cursor","default"),document.body.style.setProperty("-webkit-user-select",a.current.value,a.current.priority)),t(e,n),document.removeEventListener("pointermove",f),document.removeEventListener("pointerup",p)}};return wu.jsxs("div",{ref:i,"data-testid":"sn-text-image-resizer",children:[wu.jsx("div",{className:"tek__image_resizer tek__image_resizer_n",onPointerDown:e=>{d(e,ZB)}}),wu.jsx("div",{className:"tek__image_resizer tek__image_resizer_ne",onPointerDown:e=>{d(e,ZB|QB)}}),wu.jsx("div",{className:"tek__image_resizer tek__image_resizer_e",onPointerDown:e=>{d(e,QB)}}),wu.jsx("div",{className:"tek__image_resizer tek__image_resizer_se",onPointerDown:e=>{d(e,e$|QB)}}),wu.jsx("div",{className:"tek__image_resizer tek__image_resizer_s",onPointerDown:e=>{d(e,e$)}}),wu.jsx("div",{className:"tek__image_resizer tek__image_resizer_sw",onPointerDown:e=>{d(e,e$|t$)}}),wu.jsx("div",{className:"tek__image_resizer tek__image_resizer_w",onPointerDown:e=>{d(e,t$)}}),wu.jsx("div",{className:"tek__image_resizer tek__image_resizer_nw",onPointerDown:e=>{d(e,ZB|t$)}})]})}const r$=(e,t,n)=>Math.min(Math.max(e,t),n),o$=new Map,i$=({altText:e,className:t,imageRef:n,src:r,width:o,height:i,maxWidth:s,maxHeight:a,onError:l,onLoad:c})=>{const u=(e=>{let t=o$.get(e);if(t&&"error"in t&&"boolean"==typeof t.error)return t;if(!t)throw t=new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({error:!1,height:n.naturalHeight,width:n.naturalWidth})},n.onerror=()=>{t({error:!0})}}).then(t=>(o$.set(e,t),t)),o$.set(e,t),t;throw t})(r);w(()=>{u.error&&l()},[u.error,l]);const d=(()=>{if(u.error)return{height:100,maxWidth:s,width:100};let e=!1,t="inherit"===o?u.width:o,n="inherit"===i?u.height:i;if(s&&t>s){const r=s/t;t=s,n=Math.round(n*r),e=!0}if(a&&n>a){const r=a/n;n=a,t=Math.round(t*r),e=!0}return{height:e?n:i,maxWidth:s,width:e?t:o}})();return wu.jsx("img",{className:t||void 0,src:r,alt:e,ref:n,style:d,onError:l,draggable:"false","data-testid":"sn-text-image",onLoad:c})};function s$({tempUrl:e,imageId:t,altText:n,width:r,height:o,resizable:i,nodeKey:s}){const a=k(null),[l,c,u]=eF(s),[d,f]=S(!1),[p]=vu(),h=wd(),{layout:g,printingStatus:m}=b(H),v=void 0,y=x(()=>e||yF(g,t),[e,g,t]);w(()=>{!h&&l&&u()},[h,l,u]);const _=M(e=>{const t=e;return!!d||t.target===a.current&&(t.shiftKey?c(!l):(u(),c(!0)),!0)},[d,l,c,u]),C=M(()=>!!l&&(Yi(null),p.focus(),!0),[l,p]);w(()=>Ka(p.registerCommand(Tt,_,1),p.registerCommand(ln,e=>e.target===a.current&&(e.preventDefault(),!0),1),p.registerCommand(Zt,C,1)),[p,_,C]);const E=l&&!d&&h,T=(l||d)&&h;return wu.jsx(O,{fallback:null,children:wu.jsxs(wu.Fragment,{children:[wu.jsx("div",{draggable:E,"data-testid":"sn-text-image-container",children:wu.jsx(i$,{className:`${T?"focused":""} ${E?"draggable":""}`,src:y,altText:n,imageRef:a,width:r,height:o,maxWidth:v,onLoad:()=>m?.resolve(t,!1),onError:()=>m?.resolve(t,!1)})}),i&&l&&T?wu.jsx(n$,{editor:p,imageRef:a,maxWidth:v,onResizeStart:()=>{f(!0)},onResizeEnd:(e,t)=>{setTimeout(()=>{f(!1)},200),p.update(()=>{const n=Fi(s);n?.getType()===gF&&n.setWidthAndHeight(e,t)})}}):null]})})}class a$ extends qo{constructor(e){super(e.key),this.__props={id:e.id,altText:e.altText||"",width:e.width||"inherit",height:e.height||"inherit",method:e.method||"mediaLibrary",tempUrl:e.tempUrl,tempUrlDef:e.tempUrlDef}}static getType(){return gF}static clone(e){return new a$({...e.__props,key:e.getKey()})}decorate(){return wu.jsx(s$,{tempUrl:this.__props.tempUrl,imageId:this.__props.id,altText:this.__props.altText,width:this.__props.width,height:this.__props.height,nodeKey:this.getKey(),resizable:!0})}createDOM(e){const t=document.createElement("span"),n=e.theme.image;return void 0!==n&&(t.className=n),t}updateDOM(){return!1}exportJSON(){return{...this.__props,type:gF,version:1}}static importJSON(e){return l$(e)}setWidthAndHeight(e,t){const n=this.getWritable();n.__props.width=e,n.__props.height=t}}const l$=e=>new a$(e),c$=document.createElement("img");function u$(e){const t=e.target;return!!(t&&Ls(t)&&!t.closest("code, span.tek__image")&&t.parentElement&&Ls(t.parentElement)&&t.parentElement.closest("div.tek__editor__input"))}function d$(){const e=ao();if(!Ur(e))return null;const t=e.getNodes()[0];return t.getType()===gF?t:null}function f$(e,t){const n=d$();if(!n)return!1;const r=function(e){const t=e.dataTransfer?.getData("application/x-lexical-drag");if(!t)return null;const{type:n,data:r}=JSON.parse(t);return n!==gF?null:r}(e);if(!r)return!1;const o=Ys(n,e=>!vc(e)&&hc(e));if(e.preventDefault(),u$(e)){const i=function(e){let t;const n=function(e){const t=e;let n;return n=null===t?null:9===t.nodeType?t.defaultView:t.ownerDocument.defaultView,function(e){return null==e?null:e.getSelection()}(n)}(e.target),r=document.caretPositionFromPoint(e.clientX,e.clientY);if(r&&null!==n)n.collapse(r.offsetNode,r.offset),t=n.getRangeAt(0);else{if(!e.rangeParent||null===n)throw Error("Cannot get the selection when dragging");n.collapse(e.rangeParent,e.rangeOffset||0),t=n.getRangeAt(0)}return t}(e);n.remove();const s=ro();null!=i&&s.applyDOMRange(i),Yi(s),t.dispatchCommand(mF,{...r}),o&&t.dispatchCommand(bc,o.getURL())}return!0}c$.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";const p$=()=>{const[e]=vu(),{emitter:t,layout:n,model:r}=b(H),[o,i]=S();return w(()=>{"function"==typeof r?.getProperties&&r?.getProperties().then(e=>{i(e)})},[n,r]),w(()=>Ka(e.registerCommand(mF,({id:t,tempUrl:n,tempUrlDef:r,altText:o,height:i,width:s,method:a})=>(e.update(()=>{const e=l$({id:t,tempUrl:n,tempUrlDef:r,altText:o,height:i,width:s,method:a});mo([e]),_s(e.getParentOrThrow())&&function(e,t){const n=t();return e.replace(n),n.append(e),n}(e,ai).selectEnd()}),!0),ci),e.registerCommand(dn,t=>{const r=ao();if(!r)return!1;const i=r.getNodes().some(e=>e.getType()===a$.getType());if(!i)return!1;const s=Yu(r),a=s["application/x-lexical-editor"];if(!a)return!1;const l=e=>{if(e.type===a$.getType()){const t={...e};return t.tempUrl=t.tempUrl||yF(n,e.id),t.tempUrlDef=t.tempUrlDef||((e,t)=>e?.images?.find(e=>e.id===t)?.url.qStaticContentUrlDef.qUrl||"")(o,e.id),delete t.id,t}if("children"in e&&Array.isArray(e.children)&&e.children.length>0){const t={...e};return t.children=e.children.map(l),t}return e},c=JSON.parse(a);if(Array.isArray(c.nodes)){c.nodes=c.nodes.map(l);const n={...s,"application/x-lexical-editor":JSON.stringify(c)};return Ku(e,vl(t,ClipboardEvent)?t:null,n),!0}return!1},3),e.registerCommand(ln,e=>function(e){const t=d$();if(!t)return!1;const n=e.dataTransfer;return!!n&&(n.setData("text/plain","_"),n.setDragImage(c$,0,0),n.setData("application/x-lexical-drag",JSON.stringify({data:{...t.__props,key:t.getKey()},type:gF})),!0)}(e),3),e.registerCommand(cn,e=>function(e){return!!d$()&&(u$(e)||e.preventDefault(),!1)}(e),1),e.registerCommand(sn,t=>f$(t,e),3)),[e,t,o,n]),null};const h$=()=>((()=>{const e=k(null),{printingStatus:t}=b(H),[n]=vu();w(()=>(t&&(e.current=n.registerUpdateListener(()=>{requestAnimationFrame(()=>{e.current?.(),t?.resolve(void 0,!1)})})),()=>{e.current?.()}),[n,t])})(),null);function g$({interactionState:e}){const{initialData:t,lang:n,flags:r,showMediaLibrary:o}=b(H),i=e?.edit,s=!(!1===i&&r?.isEnabled("GV_661_SN_TEXT_REMOVE_ICON_ANALYSIS_MODE"));w(()=>{!function(e){const t=Object.entries(QD[e.toLowerCase()]).reduce((e,[t,n])=>({...e,[t]:n.value}),{});LI.configure(t,e)}(n)},[n]);const a=x(()=>{if(void 0!==t){const n=t||void 0,o=[...yj,pF];return r?.isEnabled("TLV_801_SN_TEXT_IMAGE_SUPPORT")?o.push(a$):o.push((e=gF,class t extends qo{constructor(e={},t){super(t),this.__data=e}static getType(){return e}static clone(e){return new t(e.__data,e.__key)}decorate(){return null}createDOM(){return document.createElement("span")}updateDOM(){return!1}exportDOM(){return{element:null}}exportJSON(){return{type:e,version:1}}static importJSON(e){return new t(e)}isSelectable(){return!1}isKeyboardSelectable(){return!1}})),(e=>{let t=zz.nodes;e.nodes&&(t=zz.nodes?.concat(e.nodes));const n=e.initialData?e.initialData:void 0;return{...zz,nodes:t,editorState:n}})({initialData:n,nodes:o})}var e;return null},[t,r]);return a?wu.jsx("div",{className:"hideScrollBar",children:wu.jsxs(jz,{initialConfig:a,flags:r,children:[wu.jsx(qB,{}),wu.jsx(Nj,{showPlaceholder:s}),wu.jsx(Mj,{}),o&&r?.isEnabled("TLV_801_SN_TEXT_IMAGE_SUPPORT")?wu.jsx(p$,{}):null,wu.jsx(SF,{}),wu.jsx(_F,{}),wu.jsx(CF,{}),wu.jsx(h$,{})]})}):null}const m$=({rootElement:e,layout:t,model:n,element:r,edit:o,initialData:i,emitter:s,lang:a,flags:l,theme:c,interactionState:u,printingStatus:d,showMediaLibrary:f})=>{e.render(wu.jsx(y.StrictMode,{children:wu.jsx(H.Provider,{value:{layout:t,model:n,element:r,edit:o,initialData:i,emitter:s,lang:a,flags:l,theme:c,printingStatus:d,showMediaLibrary:f},children:wu.jsx(g$,{interactionState:u})})}))},v$={uses:"data",addTranslation:"Properties.AddData",items:{dimensions:{disableRef:"",show:!1},measures:{ref:"qHyperCubeDef.qMeasures",disabledRef:"",selections:uF,items:{divider:{uses:"divider"},aggrFunc:{ref:"qDef.qAggrFunc",type:"string",defaultValue:"None",show:!1},measureColoring:{translation:"properties.color",component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:"expressionColor"}]}}}}},b$={uses:"settings",items:{general:{items:{showTitles:{defaultValue:!1}}},presentation:{type:"items",translation:"properties.presentation",items:{styleEditor:{component:"styling-panel",chartTitle:"Object.Text",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:!0}}}}};class y${getSelectedModelId=()=>this.selectedModelId;snTexts={};getSnTexts=()=>this.snTexts;sync=({modelId:e})=>{this.snTexts[e]={propertiesHaveBeenModified:!1}};setSelectedModelId=e=>{this.selectedModelId=e};setPropertiesHaveBeenModified=(e,t)=>{this.snTexts[e]={propertiesHaveBeenModified:t}};setPropertiesHaveBeenModifiedForSelectedModel=e=>{this.selectedModelId&&(this.snTexts[this.selectedModelId]={propertiesHaveBeenModified:e})};destroy=e=>{delete this.snTexts[e]}}const x$=({layout:e,flags:t})=>{const[i,s]=r(null);return o(()=>new Promise(n=>{const r=new Set;t.isEnabled("TLV_801_SN_TEXT_IMAGE_SUPPORT")&&e.images&&e.images.forEach(e=>{e.id&&r.add(e.id)}),s({resolve:(e,t)=>{e&&r.delete(e),(0===r.size||t)&&(s(null),n?.(e))}})}),[]),n(()=>{let e;return i&&(e=setTimeout(()=>{i.resolve(void 0,!0)},9e3)),()=>{e&&clearTimeout(e)}},[i]),{printingStatus:i}},_$=({propertyPanelHandlerData:e,flags:t})=>{const o=i(),u=s(),d=a(),f=l(),p=c(),[h,g]=r(!1),[m,v]=r(1),[b,y]=r(!1),x=e=>{e||v(0),(e=>!!e.qExtendsId)(u)||(e&&y(!0),g(e),p.emit("njs-internal-edit-change",e))};return n(()=>{2===m&&f.edit&&f.select&&x(!0)},[m,f]),n(()=>{const n=()=>{f.edit&&f.select&&v(e=>e+1)},r=e=>{const n=document.getElementById(GB(d));o.contains(e.target)||n?.contains(e.target)||(e=>{const n=document.getElementsByClassName("tekPopperMenu"),r=document.getElementById("tekTableMenu");if(r?.contains(e))return!0;if(t?.isEnabled("TLV_801_SN_TEXT_IMAGE_SUPPORT")){const t=document.querySelector('[qva-outside-ignore-for="media-toolbar"]');if(t?.contains(e))return!0}for(let t=0;t<n.length;t++)if(n[t].contains(e))return!0;return!1})(e.target)||x(!1)};if(!f.edit||!f.select){x(!1);const t=d?.id&&e.getSnTexts()[d.id]?.propertiesHaveBeenModified;d&&(b||t)&&(p.emit("saveDocument"),e.setPropertiesHaveBeenModified(d.id,!1))}return o.addEventListener("click",n),document.addEventListener("mousedown",r),()=>{o.removeEventListener("click",n),document.removeEventListener("mousedown",r)}},[o,f,d]),n(()=>{!h&&b&&p.emit("saveDocument")},[h,p,b]),{edit:h}}}}});
101
+ e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,s,a,l,c,u,d,f=e.length,p=e.search(/[0-9\-\+#]/),h=p>0?e.substring(0,p):"",g=e.split("").reverse().join(""),m=g.search(/[0-9\-\+#]/),v=f-m,b=e.substring(v,v+1),y=v+("."===b||","===b?1:0),x=m>0?e.substring(y,f):"";if(n=(t="-"===(e=e.substring(p,y)).charAt(0)?-t:+t)<0?t=-t:0,o=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",i=r&&r[1]&&r[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",a=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=a)&&(t=(+t).toFixed(a+1)),u=e[0].split(i),e[0]=u.join(""),(s=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-s;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(g="",v=(d=t[0]).length%l,f=d.length,y=0;y<f;y++)g+=d.charAt(y),!((y-v+1)%l)&&y<f-l&&(g+=i);t[0]=g}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+x}},zB({exports:{}});const GB=e=>`text-toolbar.${e?.id}`,YB=E((e,t)=>wu.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:wu.jsx("path",{d:"M3.5 7a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3m0-1a.5.5 0 1 1 0-1 .5.5 0 0 1 0 1M1 2a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1zm14 1v4.293L13.207 5.5a1 1 0 0 0-1.414 0L8 9.293 7.207 8.5a1 1 0 0 0-1.414 0l-4.5 4.5H1V3zm0 5.707V13h-3.293l-3-3L12.5 6.207zM10.293 13H2.707L6.5 9.207z"})})),VB=Qj(Xj,"InsertImage"),JB=()=>{const{flags:e,showMediaLibrary:t}=b(H),[n]=vu(),r=M(()=>{t?.({onConfirm:(e,t)=>{n.dispatchCommand(mF,{method:"mediaLibrary",tempUrl:e,tempUrlDef:t})},onCancel:()=>{}})},[n,t]);return t&&e?.isEnabled("TLV_801_SN_TEXT_IMAGE_SUPPORT")?wu.jsx(VB,{onClick:r,"data-testid":"editor-toolbar-insertImage-btn",children:wu.jsx(YB,{height:12})}):null};function qB(){const{element:e,edit:t,model:n,flags:r,theme:o}=b(H),i=x(()=>{const t=e?.closest(".qv-inner-object");return t||e},[e]),s=x(()=>function(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?FF:DF}(r),[r]),a=x(()=>(e=>{const t=e?.getDataColorPickerPalettes();if(t&&t?.length>0)return["#404040",...t[0].colors.filter(e=>"none"!==e)]})(o),[o]);return wu.jsx(k_,{open:t,anchorEl:i,placement:"top",transition:!0,sx:{zIndex:2},id:GB(n),children:({TransitionProps:e})=>wu.jsx(fw,{...e,children:wu.jsx(by,{sx:{borderRadius:1,padding:.25},children:wu.jsxs(Fj,{children:[wu.jsx(qj,{compact:!0}),wu.jsx(DD,{}),wu.jsx(CD,{compact:!0,fonts:s}),wu.jsx(LD,{compact:!0}),wu.jsx(DD,{}),wu.jsx(tD,{}),wu.jsx(OD,{}),wu.jsx(jD,{}),wu.jsx(ID,{}),wu.jsx(kD,{colorPalette:a}),wu.jsx(DD,{}),wu.jsx(Uj,{compact:!0}),wu.jsx(DD,{}),wu.jsx(iD,{}),wu.jsx(DD,{}),wu.jsx(RD,{}),wu.jsx(JB,{})]})})})})}function XB(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}XB(".hideScrollBar {\n overflow-y: scroll;\n -ms-overflow-style: none; /* Internet Explorer and Edge */\n scrollbar-width: none; /* Firefox */\n height: 100%;\n position: relative;\n}\n\n.hideScrollBar::-webkit-scrollbar {\n display: none;\n}\n");XB(".tek__editor__container span.tek__image {\n display: inline-block;\n position: relative;\n user-select: none;\n max-width: 100%;\n overflow: hidden;\n}\n\n.tek__editor__container .tek__image img.focused {\n user-select: none;\n}\n\n.tek__editor__container .tek__image img.focused {\n cursor: grab;\n outline: 2px solid var(--sprout-selected-border-default-color);\n outline-offset: -3px;\n}\n\n.tek__editor__container .tek__image img.focused.draggable:active {\n cursor: grabbing;\n}\n\n.tek__editor__container .tek__image .tek__image_resizer {\n display: block;\n width: 6px;\n height: 6px;\n position: absolute;\n background-color: var(--sprout-selected-border-default-color);\n}\n\n.tek__editor__container .tek__image .tek__image_resizer.tek__image_resizer_n {\n top: -2px;\n left: 48%;\n cursor: n-resize;\n}\n\n.tek__editor__container .tek__image .tek__image_resizer.tek__image_resizer_ne {\n top: -2px;\n right: -1px;\n cursor: ne-resize;\n}\n\n.tek__editor__container .tek__image .tek__image_resizer.tek__image_resizer_e {\n bottom: 48%;\n right: -1px;\n cursor: e-resize;\n}\n\n.tek__editor__container .tek__image .tek__image_resizer.tek__image_resizer_se {\n bottom: 4px;\n right: -1px;\n cursor: nwse-resize;\n}\n\n.tek__editor__container .tek__image .tek__image_resizer.tek__image_resizer_s {\n bottom: 4px;\n left: 48%;\n cursor: s-resize;\n}\n\n.tek__editor__container .tek__image .tek__image_resizer.tek__image_resizer_sw {\n bottom: 4px;\n left: -1px;\n cursor: sw-resize;\n}\n\n.tek__editor__container .tek__image .tek__image_resizer.tek__image_resizer_w {\n bottom: 48%;\n left: -1px;\n cursor: w-resize;\n}\n\n.tek__editor__container .tek__image .tek__image_resizer.tek__image_resizer_nw {\n top: -2px;\n left: -1px;\n cursor: nw-resize;\n}\n\n.tek__editor__container .image_control_wrapper__resizing {\n touch-action: none;\n}\n");const QB=1,ZB=8,e$=2,t$=4;function n$({onResizeStart:e,onResizeEnd:t,imageRef:n,maxWidth:r,editor:o}){const i=k(null),s=k({direction:0,isResizing:!1,ratio:0,startHeight:0,startWidth:0,startX:0,startY:0,currentHeight:0,currentWidth:0}),a=k({priority:"",value:"default"}),l=o.getRootElement();let c=r;c||(c=null!==l?l.getBoundingClientRect().width:100);const u=null!==l?l.getBoundingClientRect().height:100,d=(t,r)=>{const o=n.current,c=i.current;if(null!==o&&null!==c){const{width:n,height:i}=o.getBoundingClientRect(),u=s.current;u.startWidth=n,u.startHeight=i,u.ratio=n/i,u.currentWidth=n,u.currentHeight=i,u.startX=t.clientX,u.startY=t.clientY,u.isResizing=!0,u.direction=r,(e=>{let t;t=e===QB||e===t$?"ew":e===ZB||e===e$?"ns":e&ZB&&e&t$||e&e$&&e&QB?"nwse":"nesw",null!==l&&l.style.setProperty("cursor",`${t}-resize`,"important"),null!==document.body&&(document.body.style.setProperty("cursor",`${t}-resize`,"important"),a.current.value=document.body.style.getPropertyValue("-webkit-user-select"),a.current.priority=document.body.style.getPropertyPriority("-webkit-user-select"),document.body.style.setProperty("-webkit-user-select","none","important"))})(r),e(),c.classList.add("image_control_wrapper__resizing"),o.style.height=`${i}px`,o.style.width=`${n}px`,document.addEventListener("pointermove",f),document.addEventListener("pointerup",p)}},f=e=>{const t=n.current,r=s.current,o=r.direction&(QB|t$),i=r.direction&(e$|ZB);if(null!==t&&r.isResizing)if(o&&i){let n=Math.floor(r.startX-e.clientX);n=r.direction&QB?-n:n;const o=r$(r.startWidth+n,20,c),i=o/r.ratio;t.style.width=`${o}px`,t.style.height=`${i}px`,r.currentHeight=i,r.currentWidth=o}else if(i){let n=Math.floor(r.startY-e.clientY);n=r.direction&e$?-n:n;const o=r$(r.startHeight+n,20,u);t.style.height=`${o}px`,r.currentHeight=o}else{let n=Math.floor(r.startX-e.clientX);n=r.direction&QB?-n:n;const o=r$(r.startWidth+n,20,c);t.style.width=`${o}px`,r.currentWidth=o}},p=()=>{const e=n.current,r=s.current,o=i.current;if(null!==e&&null!==o&&r.isResizing){const e=r.currentWidth,n=r.currentHeight;r.startWidth=0,r.startHeight=0,r.ratio=0,r.startX=0,r.startY=0,r.currentWidth=0,r.currentHeight=0,r.isResizing=!1,o.classList.remove("image_control_wrapper__resizing"),null!==l&&l.style.setProperty("cursor","default"),null!==document.body&&(document.body.style.setProperty("cursor","default"),document.body.style.setProperty("-webkit-user-select",a.current.value,a.current.priority)),t(e,n),document.removeEventListener("pointermove",f),document.removeEventListener("pointerup",p)}};return wu.jsxs("div",{ref:i,"data-testid":"sn-text-image-resizer",children:[wu.jsx("div",{className:"tek__image_resizer tek__image_resizer_n",onPointerDown:e=>{d(e,ZB)}}),wu.jsx("div",{className:"tek__image_resizer tek__image_resizer_ne",onPointerDown:e=>{d(e,ZB|QB)}}),wu.jsx("div",{className:"tek__image_resizer tek__image_resizer_e",onPointerDown:e=>{d(e,QB)}}),wu.jsx("div",{className:"tek__image_resizer tek__image_resizer_se",onPointerDown:e=>{d(e,e$|QB)}}),wu.jsx("div",{className:"tek__image_resizer tek__image_resizer_s",onPointerDown:e=>{d(e,e$)}}),wu.jsx("div",{className:"tek__image_resizer tek__image_resizer_sw",onPointerDown:e=>{d(e,e$|t$)}}),wu.jsx("div",{className:"tek__image_resizer tek__image_resizer_w",onPointerDown:e=>{d(e,t$)}}),wu.jsx("div",{className:"tek__image_resizer tek__image_resizer_nw",onPointerDown:e=>{d(e,ZB|t$)}})]})}const r$=(e,t,n)=>Math.min(Math.max(e,t),n),o$=new Map,i$=({altText:e,className:t,imageRef:n,src:r,width:o,height:i,maxWidth:s,maxHeight:a,onError:l,onLoad:c})=>{const u=(e=>{let t=o$.get(e);if(t&&"error"in t&&"boolean"==typeof t.error)return t;if(!t)throw t=new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({error:!1,height:n.naturalHeight,width:n.naturalWidth})},n.onerror=()=>{t({error:!0})}}).then(t=>(o$.set(e,t),t)),o$.set(e,t),t;throw t})(r);w(()=>{u.error&&l()},[u.error,l]);const d=(()=>{if(u.error)return{height:100,maxWidth:s,width:100};let e=!1,t="inherit"===o?u.width:o,n="inherit"===i?u.height:i;if(s&&t>s){const r=s/t;t=s,n=Math.round(n*r),e=!0}if(a&&n>a){const r=a/n;n=a,t=Math.round(t*r),e=!0}return{height:e?n:i,maxWidth:s,width:e?t:o}})();return wu.jsx("img",{className:t||void 0,src:r,alt:e,ref:n,style:d,onError:l,draggable:"false","data-testid":"sn-text-image",onLoad:c})};function s$({tempUrl:e,imageId:t,altText:n,width:r,height:o,resizable:i,nodeKey:s}){const a=k(null),[l,c,u]=eF(s),[d,f]=S(!1),[p]=vu(),h=wd(),{layout:g,printingStatus:m}=b(H),v=void 0,y=x(()=>e||yF(g,t),[e,g,t]);w(()=>{!h&&l&&u()},[h,l,u]);const _=M(e=>{const t=e;return!!d||t.target===a.current&&(t.shiftKey?c(!l):(u(),c(!0)),!0)},[d,l,c,u]),C=M(()=>!!l&&(Yi(null),p.focus(),!0),[l,p]);w(()=>Ka(p.registerCommand(Tt,_,1),p.registerCommand(ln,e=>e.target===a.current&&(e.preventDefault(),!0),1),p.registerCommand(Zt,C,1)),[p,_,C]);const E=l&&!d&&h,T=(l||d)&&h;return wu.jsx(O,{fallback:null,children:wu.jsxs(wu.Fragment,{children:[wu.jsx("div",{draggable:E,"data-testid":"sn-text-image-container",children:wu.jsx(i$,{className:`${T?"focused":""} ${E?"draggable":""}`,src:y,altText:n,imageRef:a,width:r,height:o,maxWidth:v,onLoad:()=>m?.resolve(t,!1),onError:()=>m?.resolve(t,!1)})}),i&&l&&T?wu.jsx(n$,{editor:p,imageRef:a,maxWidth:v,onResizeStart:()=>{f(!0)},onResizeEnd:(e,t)=>{setTimeout(()=>{f(!1)},200),p.update(()=>{const n=Fi(s);n?.getType()===gF&&n.setWidthAndHeight(e,t)})}}):null]})})}class a$ extends qo{constructor(e){super(e.key),this.__props={id:e.id,altText:e.altText||"",width:e.width||"inherit",height:e.height||"inherit",method:e.method||"mediaLibrary",tempUrl:e.tempUrl,tempUrlDef:e.tempUrlDef}}static getType(){return gF}static clone(e){return new a$({...e.__props,key:e.getKey()})}decorate(){return wu.jsx(s$,{tempUrl:this.__props.tempUrl,imageId:this.__props.id,altText:this.__props.altText,width:this.__props.width,height:this.__props.height,nodeKey:this.getKey(),resizable:!0})}createDOM(e){const t=document.createElement("span"),n=e.theme.image;return void 0!==n&&(t.className=n),t}updateDOM(){return!1}exportJSON(){return{...this.__props,type:gF,version:1}}static importJSON(e){return l$(e)}setWidthAndHeight(e,t){const n=this.getWritable();n.__props.width=e,n.__props.height=t}}const l$=e=>new a$(e),c$=document.createElement("img");function u$(e){const t=e.target;return!!(t&&Ls(t)&&!t.closest("code, span.tek__image")&&t.parentElement&&Ls(t.parentElement)&&t.parentElement.closest("div.tek__editor__input"))}function d$(){const e=ao();if(!Ur(e))return null;const t=e.getNodes()[0];return t.getType()===gF?t:null}function f$(e,t){const n=d$();if(!n)return!1;const r=function(e){const t=e.dataTransfer?.getData("application/x-lexical-drag");if(!t)return null;const{type:n,data:r}=JSON.parse(t);return n!==gF?null:r}(e);if(!r)return!1;const o=Ys(n,e=>!vc(e)&&hc(e));if(e.preventDefault(),u$(e)){const i=function(e){let t;const n=function(e){const t=e;let n;return n=null===t?null:9===t.nodeType?t.defaultView:t.ownerDocument.defaultView,function(e){return null==e?null:e.getSelection()}(n)}(e.target),r=document.caretPositionFromPoint(e.clientX,e.clientY);if(r&&null!==n)n.collapse(r.offsetNode,r.offset),t=n.getRangeAt(0);else{if(!e.rangeParent||null===n)throw Error("Cannot get the selection when dragging");n.collapse(e.rangeParent,e.rangeOffset||0),t=n.getRangeAt(0)}return t}(e);n.remove();const s=ro();null!=i&&s.applyDOMRange(i),Yi(s),t.dispatchCommand(mF,{...r}),o&&t.dispatchCommand(bc,o.getURL())}return!0}c$.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";const p$=()=>{const[e]=vu(),{emitter:t,layout:n,model:r}=b(H),[o,i]=S();return w(()=>{"function"==typeof r?.getProperties&&r?.getProperties().then(e=>{i(e)})},[n,r]),w(()=>Ka(e.registerCommand(mF,({id:t,tempUrl:n,tempUrlDef:r,altText:o,height:i,width:s,method:a})=>(e.update(()=>{const e=l$({id:t,tempUrl:n,tempUrlDef:r,altText:o,height:i,width:s,method:a});mo([e]),_s(e.getParentOrThrow())&&function(e,t){const n=t();return e.replace(n),n.append(e),n}(e,ai).selectEnd()}),!0),ci),e.registerCommand(dn,t=>{const r=ao();if(!r)return!1;const i=r.getNodes().some(e=>e.getType()===a$.getType());if(!i)return!1;const s=Yu(r),a=s["application/x-lexical-editor"];if(!a)return!1;const l=e=>{if(e.type===a$.getType()){const t={...e};return t.tempUrl=t.tempUrl||yF(n,e.id),t.tempUrlDef=t.tempUrlDef||((e,t)=>e?.images?.find(e=>e.id===t)?.url.qStaticContentUrlDef.qUrl||"")(o,e.id),delete t.id,t}if("children"in e&&Array.isArray(e.children)&&e.children.length>0){const t={...e};return t.children=e.children.map(l),t}return e},c=JSON.parse(a);if(Array.isArray(c.nodes)){c.nodes=c.nodes.map(l);const n={...s,"application/x-lexical-editor":JSON.stringify(c)};return Ku(e,vl(t,ClipboardEvent)?t:null,n),!0}return!1},3),e.registerCommand(ln,e=>function(e){const t=d$();if(!t)return!1;const n=e.dataTransfer;return!!n&&(n.setData("text/plain","_"),n.setDragImage(c$,0,0),n.setData("application/x-lexical-drag",JSON.stringify({data:{...t.__props,key:t.getKey()},type:gF})),!0)}(e),3),e.registerCommand(cn,e=>function(e){return!!d$()&&(u$(e)||e.preventDefault(),!1)}(e),1),e.registerCommand(sn,t=>f$(t,e),3)),[e,t,o,n]),null};const h$=()=>((()=>{const e=k(null),{printingStatus:t}=b(H),[n]=vu();w(()=>(t&&(e.current=n.registerUpdateListener(()=>{requestAnimationFrame(()=>{e.current?.(),t?.resolve(void 0,!1)})})),()=>{e.current?.()}),[n,t])})(),null);function g$({interactionState:e}){const{initialData:t,lang:n,flags:r,showMediaLibrary:o}=b(H),i=e?.edit,s=!(!1===i&&r?.isEnabled("GV_661_SN_TEXT_REMOVE_ICON_ANALYSIS_MODE"));w(()=>{!function(e){const t=Object.entries(QD[e.toLowerCase()]).reduce((e,[t,n])=>({...e,[t]:n.value}),{});LI.configure(t,e)}(n)},[n]);const a=x(()=>{if(void 0!==t){const n=t||void 0,o=[...yj,pF];return r?.isEnabled("TLV_801_SN_TEXT_IMAGE_SUPPORT")?o.push(a$):o.push((e=gF,class t extends qo{constructor(e={},t){super(t),this.__data=e}static getType(){return e}static clone(e){return new t(e.__data,e.__key)}decorate(){return null}createDOM(){return document.createElement("span")}updateDOM(){return!1}exportDOM(){return{element:null}}exportJSON(){return{type:e,version:1}}static importJSON(e){return new t(e)}isSelectable(){return!1}isKeyboardSelectable(){return!1}})),(e=>{let t=zz.nodes;e.nodes&&(t=zz.nodes?.concat(e.nodes));const n=e.initialData?e.initialData:void 0;return{...zz,nodes:t,editorState:n}})({initialData:n,nodes:o})}var e;return null},[t,r]);return a?wu.jsx("div",{className:"hideScrollBar",children:wu.jsxs(jz,{initialConfig:a,flags:r,children:[wu.jsx(qB,{}),wu.jsx(Nj,{showPlaceholder:s}),wu.jsx(Mj,{}),o&&r?.isEnabled("TLV_801_SN_TEXT_IMAGE_SUPPORT")?wu.jsx(p$,{}):null,wu.jsx(SF,{}),wu.jsx(_F,{}),wu.jsx(CF,{}),wu.jsx(h$,{})]})}):null}const m$=({rootElement:e,layout:t,model:n,element:r,edit:o,initialData:i,emitter:s,lang:a,flags:l,theme:c,interactionState:u,printingStatus:d,showMediaLibrary:f})=>{e.render(wu.jsx(y.StrictMode,{children:wu.jsx(H.Provider,{value:{layout:t,model:n,element:r,edit:o,initialData:i,emitter:s,lang:a,flags:l,theme:c,printingStatus:d,showMediaLibrary:f},children:wu.jsx(g$,{interactionState:u})})}))},v$={uses:"data",addTranslation:"Properties.AddData",items:{dimensions:{disableRef:"",show:!1},measures:{ref:"qHyperCubeDef.qMeasures",disabledRef:"",selections:uF,items:{divider:{uses:"divider"},aggrFunc:{ref:"qDef.qAggrFunc",type:"string",defaultValue:"None",show:!1},measureColoring:{translation:"properties.color",component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:"expressionColor"}]}}}}},b$={uses:"settings",items:{general:{items:{showTitles:{defaultValue:!1}}},presentation:{type:"items",translation:"properties.presentation",items:{styleEditor:{component:"styling-panel",chartTitle:"Object.Text",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:!0}}}}};class y${getSelectedModelId=()=>this.selectedModelId;snTexts={};getSnTexts=()=>this.snTexts;sync=({modelId:e})=>{this.snTexts[e]={propertiesHaveBeenModified:!1}};setSelectedModelId=e=>{this.selectedModelId=e};setPropertiesHaveBeenModified=(e,t)=>{this.snTexts[e]={propertiesHaveBeenModified:t}};setPropertiesHaveBeenModifiedForSelectedModel=e=>{this.selectedModelId&&(this.snTexts[this.selectedModelId]={propertiesHaveBeenModified:e})};destroy=e=>{delete this.snTexts[e]}}const x$=({layout:e,flags:t})=>{const[i,s]=r(null);return o(()=>new Promise(n=>{const r=new Set;t.isEnabled("TLV_801_SN_TEXT_IMAGE_SUPPORT")&&e.images&&e.images.forEach(e=>{e.id&&r.add(e.id)}),s({resolve:(e,t)=>{e&&r.delete(e),(0===r.size||t)&&(s(null),n?.(e))}})}),[]),n(()=>{let e;return i&&(e=setTimeout(()=>{i.resolve(void 0,!0)},9e3)),()=>{e&&clearTimeout(e)}},[i]),{printingStatus:i}},_$=({propertyPanelHandlerData:e,flags:t})=>{const o=i(),u=s(),d=a(),f=l(),p=c(),[h,g]=r(!1),[m,v]=r(1),[b,y]=r(!1),x=e=>{e||v(0),(e=>!!e.qExtendsId)(u)||(e&&y(!0),g(e),p.emit("njs-internal-edit-change",e))};return n(()=>{2===m&&f.edit&&f.select&&x(!0)},[m,f]),n(()=>{const n=()=>{f.edit&&f.select&&v(e=>e+1)},r=e=>{const n=document.getElementById(GB(d));o.contains(e.target)||n?.contains(e.target)||(e=>{const n=document.getElementsByClassName("tekPopperMenu"),r=document.getElementById("tekTableMenu");if(r?.contains(e))return!0;if(t?.isEnabled("TLV_801_SN_TEXT_IMAGE_SUPPORT")){const t=document.querySelector('[qva-outside-ignore-for="media-toolbar"]');if(t?.contains(e))return!0}for(let t=0;t<n.length;t++)if(n[t].contains(e))return!0;return!1})(e.target)||x(!1)};if(!f.edit||!f.select){x(!1);const t=d?.id&&e.getSnTexts()[d.id]?.propertiesHaveBeenModified;d&&(b||t)&&(p.emit("saveDocument"),e.setPropertiesHaveBeenModified(d.id,!1))}return o.addEventListener("click",n),document.addEventListener("mousedown",r),()=>{o.removeEventListener("click",n),document.removeEventListener("mousedown",r)}},[o,f,d]),n(()=>{!h&&b&&p.emit("saveDocument")},[h,p,b]),{edit:h}}}}});