1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7646],{73686:()=>{},97646:(e,t,r)=>{"use strict";r.r(t),r.d(t,{RichText:()=>e5});var n=r(27648),o=r(62910),l=r(45264),i=r(69685),a=r(83352),s=r(4094),d=r(83421),u=r(94556);let c=(0,u.createContext)(null),f={didCatch:!1,error:null};class m extends u.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=f}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){let{error:e}=this.state;if(null!==e){for(var t,r,n=arguments.length,o=Array(n),l=0;l<n;l++)o[l]=arguments[l];null==(t=(r=this.props).onReset)||t.call(r,{args:o,reason:"imperative-api"}),this.setState(f)}}componentDidCatch(e,t){var r,n;null==(r=(n=this.props).onError)||r.call(n,e,t)}componentDidUpdate(e,t){let{didCatch:r}=this.state,{resetKeys:n}=this.props;if(r&&null!==t.error&&function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length!==t.length||e.some((e,r)=>!Object.is(e,t[r]))}(e.resetKeys,n)){var o,l;null==(o=(l=this.props).onReset)||o.call(l,{next:n,prev:e.resetKeys,reason:"keys"}),this.setState(f)}}render(){let{children:e,fallbackRender:t,FallbackComponent:r,fallback:n}=this.props,{didCatch:o,error:l}=this.state,i=e;if(o){let e={error:l,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof t)i=t(e);else if(r)i=(0,u.createElement)(r,e);else if(void 0!==n)i=n;else throw l}return(0,u.createElement)(c.Provider,{value:{didCatch:o,error:l,resetErrorBoundary:this.resetErrorBoundary}},i)}}r(73686);var p=r(89904),h=r(44449);let g="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement,y=g?u.useLayoutEffect:u.useEffect,E={tag:h.T40};function x({initialConfig:e,children:t}){let r=(0,u.useMemo)(()=>{let{theme:t,namespace:r,nodes:n,onError:o,editorState:l,html:i}=e,a=(0,p.Mx)(null,t),s=(0,h.ieJ)({editable:e.editable,html:i,namespace:r,nodes:n,onError:e=>o(e,s),theme:t});return function(e,t){if(null!==t){if(void 0===t)e.update(()=>{let t=(0,h.NiT)();if(t.isEmpty()){let r=(0,h.lJ7)();t.append(r);let n=g?document.activeElement:null;(null!==(0,h.vJq)()||null!==n&&n===e.getRootElement())&&r.select()}},E);else if(null!==t)switch(typeof t){case"string":{let r=e.parseEditorState(t);e.setEditorState(r,E);break}case"object":e.setEditorState(t,E);break;case"function":e.update(()=>{(0,h.NiT)().isEmpty()&&t(e)},E)}}}(s,l),[s,a]},[]);return y(()=>{let t=e.editable,[n]=r;n.setEditable(void 0===t||t)},[]),(0,l.jsx)(p.Gu.Provider,{value:r,children:t})}var b=r(83192);let v=(0,u.createContext)(null),C={didCatch:!1,error:null};class w extends u.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=C}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(...e){let{error:t}=this.state;null!==t&&(this.props.onReset?.({args:e,reason:"imperative-api"}),this.setState(C))}componentDidCatch(e,t){this.props.onError?.(e,t)}componentDidUpdate(e,t){let{didCatch:r}=this.state,{resetKeys:n}=this.props;r&&null!==t.error&&function(e=[],t=[]){return e.length!==t.length||e.some((e,r)=>!Object.is(e,t[r]))}(e.resetKeys,n)&&(this.props.onReset?.({next:n,prev:e.resetKeys,reason:"keys"}),this.setState(C))}render(){let{children:e,fallbackRender:t,FallbackComponent:r,fallback:n}=this.props,{didCatch:o,error:l}=this.state,i=e;if(o){let e={error:l,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof t)i=t(e);else if(r)i=(0,u.createElement)(r,e);else if(void 0!==n)i=n;else throw l}return(0,u.createElement)(v.Provider,{value:{didCatch:o,error:l,resetErrorBoundary:this.resetErrorBoundary}},i)}}function S({children:e,onError:t}){return(0,l.jsx)(w,{fallback:(0,l.jsx)("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:t,children:e})}var k=r(64144);function j(e){e.undoStack=[],e.redoStack=[],e.current=null}function N(e,t,r){let n,o,l,i,a,s=(n=Date.now(),o=0,l=Date.now(),i=0,a=null,(t,s,d,u,c,f)=>{let m=Date.now();if(f.has(h.xKE)&&(l=n,i=o,a=t),f.has(h.n0X))return o=0,n=m,2;f.has(h.sne)&&a&&(n=l,o=i,t=a);let p=function(e,t,r,n,o){if(null===e||0===r.size&&0===n.size&&!o)return 0;let l=t._selection,i=e._selection;if(o)return 1;if(!((0,h.I2P)(l)&&(0,h.I2P)(i)&&i.isCollapsed()&&l.isCollapsed()))return 0;let a=function(e,t,r){let n=e._nodeMap,o=[];for(let e of t){let t=n.get(e);void 0!==t&&o.push(t)}for(let[e,t]of r){if(!t)continue;let r=n.get(e);void 0===r||(0,h.hVZ)(r)||o.push(r)}return o}(t,r,n);if(0===a.length)return 0;if(a.length>
11){let r=t._nodeMap,n=r.get(l.anchor.key),o=r.get(i.anchor.key);return n&&o&&!e._nodeMap.has(n.__key)&&(0,h.kFe)(n)&&1===n.__text.length&&1===l.anchor.offset?2:0}let s=a[0],d=e._nodeMap.get(s.__key);if(!(0,h.kFe)(d)||!(0,h.kFe)(s)||d.__mode!==s.__mode)return 0;let u=d.__text,c=s.__text;if(u===c)return 0;let f=l.anchor,m=i.anchor;if(f.key!==m.key||"text"!==f.type)return 0;let p=f.offset,g=m.offset,y=c.length-u.length;return 1===y&&g===p-1?2:-1===y&&g===p+1?3:4*(-1===y&&g===p)}(t,s,u,c,e.isComposing()),g=(()=>{var l,i;let a,g,y,E,x=null===d||d.editor===e,b=f.has(h.bMH);if(!b&&x&&f.has(h.T40))return 0;if(1===p)return 2;if(null===t)return 1;let v=s._selection;if(!(u.size>0||c.size>0))return 2*(null===v);let C="number"==typeof r?r:r.peek();return!1===b&&0!==p&&p===o&&m<n+C&&x?0:1!==u.size||(l=Array.from(u)[0],a=(i=t)._nodeMap.get(l),g=s._nodeMap.get(l),y=i._selection,E=s._selection,(0,h.I2P)(y)&&(0,h.I2P)(E)&&"element"===y.anchor.type&&"element"===y.focus.type&&"text"===E.anchor.type&&"text"===E.focus.type||!(0,h.kFe)(a)||!(0,h.kFe)(g)||a.__parent!==g.__parent||JSON.stringify(i.read(()=>a.exportJSON()))!==JSON.stringify(s.read(()=>g.exportJSON())))?1:0})();return n=m,o=p,g});return(0,h.Sdt)(e.registerCommand(h.ZKf,()=>((function(e,t){let r=t.redoStack,n=t.undoStack;if(0!==n.length){let o=t.current,l=n.pop();null!==o&&(r.push(o),e.dispatchCommand(h.WWb,!0)),0===n.length&&e.dispatchCommand(h.KfJ,!1),t.current=l||null,l&&l.editor.setEditorState(l.editorState,{tag:h.n0X})}})(e,t),!0),h.jZM),e.registerCommand(h.V30,()=>((function(e,t){let r=t.redoStack,n=t.undoStack;if(0!==r.length){let o=t.current;null!==o&&(n.push(o),e.dispatchCommand(h.KfJ,!0));let l=r.pop();0===r.length&&e.dispatchCommand(h.WWb,!1),t.current=l||null,l&&l.editor.setEditorState(l.editorState,{tag:h.n0X})}})(e,t),!0),h.jZM),e.registerCommand(h.SKc,()=>(j(t),!1),h.jZM),e.registerCommand(h.t5V,()=>(j(t),e.dispatchCommand(h.WWb,!1),e.dispatchCommand(h.KfJ,!1),!0),h.jZM),e.registerUpdateListener(({editorState:r,prevEditorState:n,dirtyLeaves:o,dirtyElements:l,tags:i})=>{let a=t.current,d=t.redoStack,u=t.undoStack,c=null===a?null:a.editorState;if(null!==a&&r===c)return;let f=s(n,r,a,o,l,i);if(1===f)0!==d.length&&(t.redoStack=[],e.dispatchCommand(h.WWb,!1)),null!==a&&(u.push({...a}),e.dispatchCommand(h.KfJ,!0));else if(2===f)return;t.current={editor:e,editorState:r}}))}function _(){return{current:null,redoStack:[],undoStack:[]}}let B=(0,h.vE9)({build:(e,{delay:t,createInitialHistoryState:r,disabled:n})=>(0,k.v)({delay:t,disabled:n,historyState:r(e)}),config:(0,h.lVE)({createInitialHistoryState:_,delay:300,disabled:"u"<typeof window}),name:"@lexical/history/History",register:(e,t,r)=>{let n=r.getOutput();return(0,k.QZ)(()=>n.disabled.value?void 0:N(e,n.historyState.value,n.delay))}});function P({delay:e,externalHistoryState:t}){let[r]=(0,p.DF)();return function(e,t,r=1e3){let n=(0,u.useMemo)(()=>t||_(),[t]);(0,u.useEffect)(()=>N(e,n,r),[r,e,n])}(r,t,e),null}(0,h.vE9)({dependencies:[(0,h.O0w)(B,{createInitialHistoryState:()=>{throw Error("SharedHistory did not inherit parent history")},disabled:!0})],name:"@lexical/history/SharedHistory",register(e,t,r){var n;let{output:o}=r.getDependency(B),l=(n=e._parentEditor)?(0,k.xT)(n,B.name):null;if(!l)return()=>{};let i=l.output;return(0,k.QZ)(()=>(0,k.vA)(()=>{o.delay.value=i.delay.value,o.historyState.value=i.historyState.value,o.disabled.value=i.disabled.value}))}});let D="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement?u.useLayoutEffect:u.useEffect;function T({ignoreHistoryMergeTagChange:e=!0,ignoreSelectionChange:t=!1,onChange:r}){let[n]=(0,p.DF)();return D(()=>
1{if(r)return n.registerUpdateListener(({editorState:o,dirtyElements:l,dirtyLeaves:i,prevEditorState:a,tags:s})=>{t&&0===l.size&&0===i.size||e&&s.has(h.T40)||a.isEmpty()||r(o,n,s)})},[n,e,t,r]),null}var F=r(57700);let L=(0,h.vE9)({name:"@lexical/react/ReactProvider"});var R=r(90125);function I(e){return()=>(function(e){if(!function(e,t=!0){if(e)return!1;let r=(0,h.NiT)().getTextContent();return t&&(r=r.trim()),""===r}(e,!1))return!1;let t=(0,h.NiT)().getChildren(),r=t.length;if(r>1)return!1;for(let e=0;e<r;e++){let r=t[e];if((0,h.Cyw)(r))return!1;if((0,h.ff4)(r)){if(!(0,h.bSg)(r)||0!==r.__indent)return!1;let t=r.getChildren(),n=t.length;for(let r=0;r<n;r++){let r=t[e];if(!(0,h.kFe)(r))return!1}}}return!0})(e)}var A=r(39290),M=r(25792);let O="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement?u.useLayoutEffect:u.useEffect;function J({editor:e,ErrorBoundary:t}){return function(e,t){let[r,n]=(0,u.useState)(()=>e.getDecorators());return O(()=>e.registerDecoratorListener(e=>{(0,R.flushSync)(()=>{n(e)})}),[e]),(0,u.useEffect)(()=>{n(e.getDecorators())},[e]),(0,u.useMemo)(()=>{let n=[],o=Object.keys(r);for(let i=0;i<o.length;i++){let a=o[i],s=(0,l.jsx)(t,{onError:t=>e._onError(t),children:(0,l.jsx)(u.Suspense,{fallback:null,children:r[a]})}),d=e.getElementByKey(a);null!==d&&n.push((0,R.createPortal)(s,d,a))}return n},[t,r,e])}(e,t)}function z({editor:e,ErrorBoundary:t}){return!function(e){let t=k.iZ.maybeFromEditor(e);if(t&&t.hasExtensionByName(L.name)){for(let e of["@lexical/plain-text","@lexical/rich-text"])t.hasExtensionByName(e)&&function(...e){let t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;for(let t of(r.append("code",320),e))r.append("v",t);throw t.search=r.toString(),Error(`Minified Lexical error #320; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(e);return!0}return!1}(e)?(0,l.jsx)(J,{editor:e,ErrorBoundary:t}):null}function K(e){return e.getEditorState().read(I(e.isComposing()))}function $({contentEditable:e,placeholder:t=null,ErrorBoundary:r}){var n;let[o]=(0,p.DF)();return O(()=>(0,h.Sdt)((0,M.ZI)(n),(0,A.U)(n)),[n=o]),(0,l.jsxs)(l.Fragment,{children:[e,(0,l.jsx)(H,{content:t}),(0,l.jsx)(z,{editor:o,ErrorBoundary:r})]})}function H({content:e}){let[t]=(0,p.DF)(),r=function(e){let[t,r]=(0,u.useState)(()=>K(e));return O(()=>{function t(){r(K(e))}return t(),(0,h.Sdt)(e.registerUpdateListener(()=>{t()}),e.registerEditableListener(()=>{t()}))},[e]),t}(t),n=(0,F.a)();return r?"function"==typeof e?e(n):e:null}var q=r(11309),V=r(17840),Z=r(45622),U=r(4580);let W="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement?u.useLayoutEffect:u.useEffect,Y=(0,u.forwardRef)(function({editor:e,ariaActiveDescendant:t,ariaAutoComplete:r,ariaControls:n,ariaDescribedBy:o,ariaErrorMessage:i,ariaExpanded:a,ariaInvalid:s,ariaLabel:d,ariaLabelledBy:c,ariaMultiline:f,ariaOwns:m,ariaRequired:p,autoCapitalize:h,className:g,id:y,role:E="textbox",spellCheck:x=!0,style:b,tabIndex:v,"data-testid":C,...w},S){let[k,j]=(0,u.useState)(e.isEditable()),N=(0,u.useCallback)(t=>{t&&t.ownerDocument&&t.ownerDocument.defaultView?e.setRootElement(t):e.setRootElement(null)},[e]),_=(0,u.useMemo)(()=>(function(...e){return t=>{for(let r of e)"function"==typeof r?r(t):null!=r&&(r.current=t)}})(S,N),[N,S]);return W(()=>(j(e.isEditable()),e.registerEditableListener(e=>{j(e)})),[e]),(0,l.jsx)("div",{"aria-activedescendant":k?t:void 0,"aria-autocomplete":k?r:"none","aria-controls":k?n:void 0,"aria-describedby":o,...null!=i?{"aria-errormessage":i}:{},"aria-expanded":k&&"combobox"===E?!!a:void 0,...null!=s?{"aria-invalid":s}:{},"aria-label":d,"aria-labelledby":c,"aria-multiline":f,"aria-owns":k?m:void 0,"aria-readonly":!k||void 0,"aria-required":p,autoCapitalize:h,className:g,contentEditable:k,"data-testid":C,id:y,ref:_,role:E,spellCheck:x,style:b,tabIndex:v,...w})});function G(e){return e.getEditorState().read(I(e.isComposing()))}let X=(0,u.forwardRef)(function(e,t){let{placeholder:r,...n}=e,[o]=(0,p.DF)();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Y,{editor:o,...n,ref:t}),null!=r&&(0,l.jsx)(Q,{editor:o,content:r})]})});function Q({content:e,editor:t}){let r=function(e){let[t,r]=(0,u.useState)(()=>G(e));return W(()=>{function t(){r(G(e))}return t(),(0,h.Sdt)(e.registerUpdateListener(()=>{t()}
1),e.registerEditableListener(()=>{t()}))},[e]),t}(t),[n,o]=(0,u.useState)(t.isEditable());if((0,u.useLayoutEffect)(()=>(o(t.isEditable()),t.registerEditableListener(e=>{o(e)})),[t]),!r)return null;let i=null;return"function"==typeof e?i=e(n):null!==e&&(i=e),null===i?null:(0,l.jsx)("div",{"aria-hidden":!0,children:i})}var ee=({anchorElem:e,clientProps:t,plugin:r})=>"floatingAnchorElem"===r.position&&e?r.Component&&(0,l.jsx)(r.Component,{anchorElem:e,clientProps:t}):r.Component&&(0,l.jsx)(r.Component,{clientProps:t}),et=e=>{if("fields"in e&&"object"==typeof e.fields&&null!==e.fields&&"id"in e.fields?e.fields.id=new Z.default().toHexString():"id"in e&&(e.id=new Z.default().toHexString()),e.children)for(let t of e.children)et(t)};function er(){let e=(0,b.c)(3),[t]=(0,p.DF)(),r,n;return e[0]!==t?(r=()=>t.registerCommand(h.u5G,e=>{let r=(0,h.vJq)();if((0,h.RTZ)(r)){let e=JSON.parse(JSON.stringify(r.getNodes()[0]?.exportJSON()));et(e);let n=JSON.stringify({namespace:t._config.namespace,nodes:[e]});return(0,q.lW)(t,null,{"application/x-lexical-editor":n,"text/plain":""}).catch(en),!0}return(0,q.lW)(t,(0,V.xj)(e,ClipboardEvent)?e:null).then(()=>{if(!(e instanceof ClipboardEvent)||!e.clipboardData)throw Error("No clipboard event");let t=e.clipboardData.getData("application/x-lexical-editor");if(!t)return!0;let r=JSON.parse(t);for(let e of r.nodes)et(e);let n=JSON.stringify(r);e.clipboardData.setData("application/x-lexical-editor",n)}).catch(t=>{throw e instanceof ClipboardEvent&&e.clipboardData?.setData("application/x-lexical-editor",""),t}),!0},h.AcJ),n=[t],e[0]=t,e[1]=r,e[2]=n):(r=e[1],n=e[2]),(0,u.useEffect)(r,n),null}function en(e){throw e}function eo(){let e=(0,b.c)(3),[t]=(0,p.DF)(),r,n;return e[0]!==t?(r=()=>(0,h.Sdt)(t.registerCommand(h.d8p,eu,h.AcJ),t.registerCommand(h.w$Z,ec,h.AcJ),t.registerCommand(h.gCZ,ec,h.AcJ),t.registerCommand(h.MvL,ed,h.AcJ),t.registerCommand(h.UDz,ea,h.AcJ),t.registerCommand(h.bbF,el,h.AcJ)),n=[t],e[0]=t,e[1]=r,e[2]=n):(r=e[1],n=e[2]),(0,u.useEffect)(r,n),null}function el(e){let t=(0,h.vJq)();if((0,h.RTZ)(t)){e.preventDefault();let r=t.getNodes()[0]?.getNextSibling();if((0,h.Cyw)(r)){let e=(0,h.i0_)().getElementByKey(r.getKey());return e&&em({element:e,node:r}),!0}if(!(0,h.ff4)(r))return!0;let n=r.getFirstDescendant()??r;return n&&((0,h.BtT)(n,ep)?.selectEnd(),e.preventDefault()),!0}if(!(0,h.I2P)(t))return!1;let r=(t.isBackward()?t.anchor:t.focus).getNode(),n=(0,h.BtT)(r,ei),o=n?.getNextSibling();if(!n||o!==eh(n))return!1;if((0,h.Cyw)(o)){let t=(0,h.i0_)().getElementByKey(o.getKey());if(t)return em({element:t,node:o}),e.preventDefault(),!0}return!1}function ei(e){return null!==eh(e)}function ea(e){let t=(0,h.vJq)();if((0,h.RTZ)(t)){let r=t.getNodes()[0]?.getPreviousSibling();if((0,h.Cyw)(r)){let t=(0,h.i0_)().getElementByKey(r.getKey());return!!t&&(em({element:t,node:r}),e.preventDefault(),!0)}if(!(0,h.ff4)(r))return!1;let n=r.getLastDescendant()??r;return!!n&&((0,h.BtT)(n,ep)?.selectStart(),e.preventDefault(),!0)}if(!(0,h.I2P)(t))return!1;let r=(t.isBackward()?t.anchor:t.focus).getNode(),n=(0,h.BtT)(r,es),o=n?.getPreviousSibling();if(!n||o!==eg(n))return!1;if((0,h.Cyw)(o)){let t=(0,h.i0_)().getElementByKey(o.getKey());if(t)return em({element:t,node:o}),e.preventDefault(),!0}return!1}function es(e){return null!==eg(e)}function ed(){let e=function(){let e=(0,h.vJq)();if(!(0,h.RTZ)(e))return;let t=e.getNodes();if(1!==t.length)return;let r=t[0];return(0,h.Cyw)(r)?{decorator:r,element:(0,h.i0_)().getElementByKey(r.getKey())}:void 0}();return document.querySelector(".decorator-selected")?.classList.remove("decorator-selected"),!!e&&(e.element?.classList.add("decorator-selected"),!0)}function eu(e){document.querySelector(".decorator-selected")?.classList.remove("decorator-selected");let t=function(e){if(!(e.target instanceof HTMLElement))return;let t=e.target.closest('[data-lexical-decorator="true"]');if(!(t instanceof HTMLElement))return;let r=(0,h.xL4)(t);return(0,h.Cyw)(r)?{element:t,node:r}:void 0}(e);if(!t)return!0;let{target:r}=e;return!(r instanceof HTMLElement)||r.isContentEditable||r.closest('button, textarea, input, .react-select, .code-editor, .no-select-decorator, [role="button"]')?(0,h.n1P)(null):em(t),!0}function ec(e){let t=(0,h.vJq)();
1return!!(0,h.RTZ)(t)&&(e.preventDefault(),t.getNodes().forEach(ef),!0)}function ef(e){e.remove()}function em({element:e,node:t}){document.querySelector(".decorator-selected")?.classList.remove("decorator-selected");let r=(0,h.rUs)();r.add(t.getKey()),(0,h.n1P)(r),e.scrollIntoView({behavior:"smooth",block:"nearest"}),e.classList.add("decorator-selected")}function ep(e){if((0,h.Cyw)(e)&&!e.isInline())return!0;if(!(0,h.ff4)(e)||(0,h.IqF)(e))return!1;let t=e.getFirstChild(),r=null===t||(0,h.wH$)(t)||(0,h.kFe)(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&r}function eh(e){let t=e.getNextSibling();for(;null!==t;){if(ep(t))return t;t=t.getNextSibling()}return null}function eg(e){let t=e.getPreviousSibling();for(;null!==t;){if(ep(t))return t;t=t.getPreviousSibling()}return null}var ey=(e,t,r,n,o=50,l=25)=>{let i=0;if(e&&!e.contains(n)){let{bottom:n,left:a,right:s,top:d}=e.getBoundingClientRect(),u=d+window.scrollY,c=n+window.scrollY;if(r<u-l||r>c+l||t<a-o||t>s+o)return -1;(t<a||t>s)&&(i=t<a?t-a:t-s)}return i};function eE(e){let t=e.getBoundingClientRect(),r=getComputedStyle(e).getPropertyValue("transform");if(!r||"none"===r)return t;let n=r.split(",").pop();return t.y=t.y-Number(n?.replace(")","")),t}function ex(e){let t=(e,t)=>e?parseFloat(window.getComputedStyle(e)[t]):0,{marginBottom:r,marginTop:n}=window.getComputedStyle(e),o=t(e.previousElementSibling,"marginBottom"),l=t(e.nextElementSibling,"marginTop"),i=Math.max(parseFloat(n),o);return{marginBottom:Math.max(parseFloat(r),l),marginTop:i}}function eb(e){return e.getEditorState().read(()=>(0,h.NiT)().getChildrenKeys())}var ev={props:null,result:null};function eC(e){let{anchorElem:t,cache_threshold:r=20,editor:o,fuzzy:l=!1,horizontalOffset:i=0,point:{x:a,y:s},startIndex:d=0,useEdgeAsDefault:u=!1}=e;if(r>0&&ev.props&&ev.result&&ev.props.fuzzy===e.fuzzy&&ev.props.horizontalOffset===e.horizontalOffset&&ev.props.useEdgeAsDefault===e.useEdgeAsDefault&&function(e,t,r=20){let n=e.x-t.x,o=e.y-t.y;return n*n+o*o<=r*r}(ev.props.point,e.point,r))return ev.result;let c=t.getBoundingClientRect(),f=eb(o),m={blockElem:null,blockNode:null,distance:1/0,foundAtIndex:-1,isFoundNodeEmptyParagraph:!1};return o.getEditorState().read(()=>{if(u){let e=o.getElementByKey(f[0]),t=o.getElementByKey(f[f.length-1]);if(e&&t){let[r,n]=[eE(e),eE(t)];if(s<r.top?(m.blockElem=e,m.distance=r.top-s,m.blockNode=(0,h.nsf)(f[0]),m.foundAtIndex=0):s>n.bottom&&(m.distance=s-n.bottom,m.blockNode=(0,h.nsf)(f[f.length-1]),m.blockElem=t,m.foundAtIndex=f.length-1),m?.blockElem)return{blockElem:null,isFoundNodeEmptyParagraph:!1}}}let t=d,r=0;for(;t>=0&&t<f.length;){let d=f[t],u=o.getElementByKey(d);if(null===u)break;let p=new n.h(a+i,s),g=n.m.fromDOMRect(eE(u)),{marginBottom:y,marginTop:E}=ex(u),{distance:x,isOnBottomSide:b,isOnTopSide:v}=g.generateNewRect({bottom:g.bottom+y,left:c.left,right:c.right,top:g.top-E}).distanceFromPoint(p);if(0===x){m.blockElem=u,m.blockNode=(0,h.nsf)(d),m.foundAtIndex=t,m.distance=x,m.blockNode&&"paragraph"===m.blockNode.getType()&&""===m.blockNode.getTextContent()&&(l||e.returnEmptyParagraphs||(m.blockElem=null,m.blockNode=null),m.isFoundNodeEmptyParagraph=!0);break}l&&x<m.distance&&(m.blockElem=u,m.blockNode=(0,h.nsf)(d),m.distance=x,m.foundAtIndex=t),0===r&&(r=v?-1:b?1:1/0),t+=r}}),ev.props=e,ev.result={blockElem:m.blockElem,blockNode:m.blockNode,foundAtIndex:m.foundAtIndex,isFoundNodeEmptyParagraph:m.isFoundNodeEmptyParagraph},{blockElem:m.blockElem,blockNode:m.blockNode,foundAtIndex:m.foundAtIndex,isFoundNodeEmptyParagraph:m.isFoundNodeEmptyParagraph}}function ew(e,t){return!!e.closest(`.${t}`)}var eS=["IMG","INPUT","TEXTAREA","SELECT","BUTTON","VIDEO","OBJECT","EMBED","IFRAME","HR"];function ek(e,t,r,n=0){if(!e){t.style.opacity="0",t.style.transform="translate(-10000px, -10000px)";return}let o=e.getBoundingClientRect(),l=window.getComputedStyle(e),i=t.getBoundingClientRect(),a=r.getBoundingClientRect(),s;if(["LexicalEditorTheme__block","LexicalEditorTheme__upload","LexicalEditorTheme__relationship"].some(t=>e.classList.contains(t)||e.firstElementChild?.classList.contains(t)))s=o.top+8-a.top;else{let t=!function(e){if(!e||eS.includes(e.tagName)||0===e.offsetHeight||0===e.offsetWidth)return!1;let t=window.getComputedStyle(e);return"table-cell"!==t.display&&"absolute"!==t.position&&"hidden"
1!==t.visibility&&"0"!==t.opacity}(e)?0:parseInt(l.lineHeight,10);s=o.top+(t-i.height)/2-a.top}t.style.opacity="1",t.style.transform=`translate(${n}px, ${s}px)`}var ej=1/0;function eN(e){let{anchorElem:t}=e,r=void 0===t?document.body:t,[i]=(0,p.DF)();return function(e,t,r){let i=t.parentElement,{editorConfig:a}=(0,o.b)(),s=a?.admin?.hideGutter?-24:12,d=(0,u.useRef)(null),[c,f]=(0,u.useState)(null);(0,u.useEffect)(()=>{function r(r){var o;let l=r.target;if(!(0,h.sby)(l))return;let a=ey(i,r.pageX,r.pageY,l);if(-1===a)return void f(null);if(ew(l,"add-block-menu"))return;let s=eb(e),{blockElem:d,blockNode:u,foundAtIndex:m}=eC({anchorElem:t,cache_threshold:0,editor:e,horizontalOffset:-a,point:new n.h(r.x,r.y),returnEmptyParagraphs:!0,startIndex:0===(o=s.length)?1/0:ej>=0&&ej<o?ej:Math.floor(o/2),useEdgeAsDefault:!1});ej=m,d&&u&&(c?.node!==u||c?.elem!==d)&&f({elem:d,node:u})}return document?.addEventListener("mousemove",r),()=>{document?.removeEventListener("mousemove",r)}},[i,t,e,c]),(0,u.useEffect)(()=>{d.current&&c?.node&&ek(c?.elem,d.current,t,s)},[t,c,s]);let m=(0,u.useCallback)(t=>{let r=c;r?.node&&(e.update(()=>{let t=!0;if((r?.node.getType()!=="paragraph"||""!==r.node.getTextContent())&&(t=!1),!t){let t=(0,h.lJ7)();r?.node.insertAfter(t),setTimeout(()=>{f(r={elem:e.getElementByKey(t.getKey()),node:t})},0)}}),setTimeout(()=>{e.update(()=>{e.focus(),r?.node&&"select"in r.node&&"function"==typeof r.node.select&&r.node.select()})},1),setTimeout(()=>{e.dispatchCommand(n.k,{node:r?.node})},2),t.stopPropagation(),t.preventDefault())},[e,c]);return(0,R.createPortal)((0,l.jsx)(u.Fragment,{children:(0,l.jsx)("button",{"aria-label":"Add block",className:"icon add-block-menu",onClick:e=>{m(e)},ref:d,type:"button",children:(0,l.jsx)("div",{className:r?"icon":""})})}),t)}(i,r,i._editable)}var e_=0,eB="application/x-lexical-drag-block",eP=1/0;function eD(e){return 0===e?1/0:eP>=0&&eP<e?eP:Math.floor(e/2)}function eT(e,t){e&&(e.style.opacity="0"),t&&(t.style.opacity="",t.style.marginBottom="",t.style.marginTop="")}function eF(e){let{anchorElem:t}=e,r=void 0===t?document.body:t,[i]=(0,p.DF)();return function(e,t,r){let i=t.parentElement,a=(0,u.useRef)(null),s=(0,u.useRef)(null),d=(0,u.useRef)(null),c=(0,u.useRef)(!1),[f,m]=(0,u.useState)(null),[p,g]=(0,u.useState)(null),{editorConfig:y}=(0,o.b)(),E=y?.admin?.hideGutter?-44:-8;return(0,u.useEffect)(()=>{function r(r){let o=r.target;if(!(0,h.sby)(o))return;let l=ey(i,r.pageX,r.pageY,o);if(-1===l)return void m(null);if(ew(o,"draggable-block-menu"))return;let a=eb(e),{blockElem:s,foundAtIndex:d,isFoundNodeEmptyParagraph:u}=eC({anchorElem:t,cache_threshold:0,editor:e,horizontalOffset:-l,point:new n.h(r.x,r.y),startIndex:eD(a.length),useEdgeAsDefault:!1,verbose:!1});eP=d,(s||u)&&f!==s&&m(s)}return document?.addEventListener("mousemove",r),()=>{document?.removeEventListener("mousemove",r)}},[i,t,e,f]),(0,u.useEffect)(()=>{a.current&&ek(f,a.current,t,E)},[t,f,E]),(0,u.useEffect)(()=>{function r(r){if(!c.current)return!1;let[o]=(0,M.gA)(r);if(o)return!1;let{pageY:l,target:d}=r;if(!(0,h.sby)(d))return!1;let u=ey(i,r.pageX,r.pageY,d,100,50),m=eb(e),{blockElem:x,foundAtIndex:b,isFoundNodeEmptyParagraph:v}=eC({anchorElem:t,editor:e,fuzzy:!0,horizontalOffset:-u,point:new n.h(r.x,r.y),startIndex:eD(m.length),useEdgeAsDefault:!0,verbose:!0});eP=b;let C=s.current;if(null===x||null===C)return!1;if(f!==x){let{isBelow:e,willStayInSamePosition:n}=function(e,t,r,n,o,l,i,a=!1){let{height:s,top:d}=n.getBoundingClientRect(),{top:u,width:c}=i.getBoundingClientRect(),{marginBottom:f,marginTop:m}=ex(n),p=d,h=l>=d+s/2+window.scrollY,g=!1;if(o?.elem)if(n!==o?.elem)(h&&o?.elem&&o?.elem===n.nextElementSibling||!h&&o?.elem&&o?.elem===n.previousElementSibling)&&++e_<200&&(g=!0);else{e_++;let e=o?.boundingBox?.y,t=n.getBoundingClientRect().y;(h===o?.isBelow&&e===t||e_<200)&&(g=!1)}if(g)return{isBelow:h,willStayInSamePosition:g};a?p+=s/2:h?p+=s+f/2:p-=m/2;let y=0;a||(y=h?-0:0);let E=p-u+y;return r.style.width=`calc(${c}px - ${e})`,r.style.opacity=".8",r.style.transform=`translate(${-24-t}px, calc(${E}px - 2px))`,o?.elem&&(o.elem.style.opacity="",o?.elem===n?h?o.elem.style.marginTop="":o.elem.style.marginBottom="":(o.elem.style.marginBottom="",o.elem.style.marginTop="")),e_=0,{isBelow:h,willStayInSamePosition:g}}(y?.admin?.hideGutter?"0px":"3rem",E+(y?.admin?.hideGutter?a?.current?.getBoundingClientRect()?.width??0:-(a?.current?.getBoundingClientRect()?.width??0)),C,x,p,l,t,v);r.preventDefault(),n||g({boundingBox:x.getBoundingClientRect(),elem:x,isBelow:e})}else p?.elem&&(eT(C,p.elem),g({boundingBox:x.getBoundingClientRect(),elem:x,isBelow:!1}));return!0}function o(r){if(!c.current)return!1;let[o]=(0,M.gA)(r);if(o)return!1;let{dataTransfer:l,pageY:a,target:s}=r,d=l?.getData(eB)||"";return e.update(()=>{let o=(0,h.nsf)(d);if(!o||!(0,h.sby)(s))return!1;let{blockElem:l,isFoundNodeEmptyParagraph:u}=eC({anchorElem:t,editor:e,fuzzy:!0,horizontalOffset:-ey(i,r.pageX,r.pageY,s,100,50),point:new n.h(r.x,r.y),useEdgeAsDefault:!0});if(!l)return!1;let c=(0,h.xL4)(l);if(!c)return!1;if(c===o)return!0;let{height:p,top:g}=eE(l),y=a>=g+p/2+window.scrollY;u?(c.insertBefore(o),c.remove()):y?c.insertAfter(o):c.insertBefore(o),null!==f&&m(null),document.querySelectorAll(".lexical-block-highlighter").forEach(e
1=>{e.remove()});let E=e.getElementByKey(o.getKey());setTimeout(()=>{let e=E?.getBoundingClientRect();if(!e)return;let t=document.createElement("div");t.className="lexical-block-highlighter",t.style.backgroundColor="var(--theme-elevation-1000",t.style.transition="opacity 0.5s ease-in-out",t.style.zIndex="1",t.style.pointerEvents="none",t.style.boxSizing="border-box",t.style.borderRadius="4px",t.style.position="absolute",document.body.appendChild(t),t.style.opacity="0.1",t.style.height=`${e.height+8}px`,t.style.width=`${e.width+8}px`,t.style.top=`${e.top+window.scrollY-4}px`,t.style.left=`${e.left-4}px`,setTimeout(()=>{t.style.opacity="0",setTimeout(()=>{t.remove()},500)},1e3)},120)}),!0}return document.addEventListener("dragover",r),document.addEventListener("drop",o),()=>{document.removeEventListener("dragover",r),document.removeEventListener("drop",o)}},[i,E,t,e,p,f,y?.admin?.hideGutter]),(0,R.createPortal)((0,l.jsxs)(u.Fragment,{children:[(0,l.jsx)("button",{"aria-label":"Drag to move",className:"icon draggable-block-menu",draggable:!0,onDragEnd:function(){c.current=!1,p?.elem&&eT(s.current,p?.elem)},onDragStart:function(t){let r=t.dataTransfer;if(!r||!f)return;!function(e,t){let{transform:r}=t.style;e.setDragImage(t,0,0),setTimeout(()=>{t.style.transform=r})}(r,f);let n="";e.update(()=>{let e=(0,h.xL4)(f);e&&(n=e.getKey())}),c.current=!0,r.setData(eB,n)},ref:a,type:"button",children:(0,l.jsx)("div",{className:r?"icon":""})}),(0,l.jsx)("div",{className:"draggable-block-target-line",ref:s}),(0,l.jsx)("div",{className:"debug-highlight",ref:d})]}),t)}(i,r,i._editable)}var eL="insert-paragraph-at-end",eR=()=>{let e,t=(0,b.c)(2),[r]=(0,p.DF)(),{editorConfig:n}=(0,o.b)();return n?.admin?.hideInsertParagraphAtEnd?null:(t[0]!==r?(e=(0,l.jsx)("div",{"aria-label":"Insert Paragraph",className:eL,onClick:()=>{r.update(eI)},role:"button",tabIndex:0,children:(0,l.jsx)("div",{className:`${eL}-inside`,children:(0,l.jsx)("span",{children:"+"})})}),t[0]=r,t[1]=e):e=t[1],e)};function eI(){let e=(0,h.lJ7)();(0,h.NiT)().append(e),e.select()}var eA=()=>{let e=(0,b.c)(4),{editorConfig:t}=(0,o.b)(),[r]=(0,p.DF)(),l,i;return e[0]!==r||e[1]!==t.features.markdownTransformers?(l=()=>(0,n.a)(r,t.features.markdownTransformers??[]),i=[r,t.features.markdownTransformers],e[0]=r,e[1]=t.features.markdownTransformers,e[2]=l,e[3]=i):(l=e[2],i=e[3]),u.useEffect(l,i),null};function eM(){let e=(0,b.c)(5),[t]=(0,p.DF)(),{currentView:r,views:o}=(0,n.g)(),l,i;return e[0]!==r||e[1]!==t||e[2]!==o?(l=()=>{o&&("default"===r?o.default?(0,n.n)(t,o.default?.nodes):(0,n.o)(t):o[r]&&((0,n.o)(t),(0,n.n)(t,o[r]?.nodes)))},i=[t,o,r],e[0]=r,e[1]=t,e[2]=o,e[3]=l,e[4]=i):(l=e[3],i=e[4]),(0,u.useEffect)(l,i),null}function eO(){let[e]=(0,p.DF)();return(0,u.useEffect)(()=>e.registerNodeTransform(h.haT,e=>{let t=(0,h.vJq)();if((0,h.I2P)(t)){let r=t.anchor.getNode(),n=t.focus.getNode();r.isAttached()&&n.isAttached()||(e.selectEnd(),console.warn("updateEditor: selection has been moved to the end of the editor 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."))}return!1}),[e]),null}function eJ(){let[e]=(0,p.DF)();return(0,u.useEffect)(()=>e.registerCommand(h.HYn,()=>{if((0,h.vJq)())return!1;let e=document.activeElement;return e instanceof HTMLInputElement&&e.select(),!0},h.AcJ),[e]),null}var ez="slash-menu-popup";function eK({isSelected:e,item:t,onClick:r,onMouseEnter:n,ref:i}){let{fieldProps:{featureClientSchemaMap:a,schemaPath:s}}=(0,o.b)(),{i18n:d}=(0,U.d)(),u=`${ez}__item ${ez}__item-${t.key}`;e&&(u+=` ${ez}__item--selected`);let c=t.key;return t.label&&(c="function"==typeof t.label?t.label({featureClientSchemaMap:a,i18n:d,schemaPath:s}):t.label),c.length>25&&(c=c.substring(0,25)+"..."),(0,l.jsxs)("button",{"aria-selected":e,className:u,id:ez+"__item-"+t.key,onClick:r,onMouseEnter:n,ref:i,role:"option",tabIndex:-1,type:"button",children:[t?.Icon&&(0,l.jsx)(t.Icon,{}),(0,l.jsx)("span",{className:`${ez}__item-text`,children:c})]},t.key)}function e$({anchorElem:e=document.body}){let[t]=(0,p.DF)(),[r,i]=(0,u.useState)(null),{editorConfig:a}=(0,o.b)(),{i18n:s}=(0,U.d)(),{fieldProps:{featureClientSchemaMap:d,schemaPath:c}}=(0,o.b)(),f=function(e){let t=(0,b.c)(4),{maxLength:r,minLength:o}=e,l=void 0===r?75:r,i=void 0===o?1:o,a;return t[0]!==l||t[1]!==i||"/"!==t[2]?(a=e=>{let{query:t}
1=e,r=RegExp("(^|\\s|\\()([/]((?:"+("[^/"+n.j+"\\s]")+"){0,"+l+"}))$").exec(t);if(null!==r){let e=r[1],t=r[3];if(t.length>=i)return{leadOffset:r.index+e.length,matchingString:t,replaceableString:r[2]}}return null},t[0]=l,t[1]=i,t[2]="/",t[3]=a):a=t[3],a}({minLength:0}),m=(0,u.useCallback)(()=>{let e=[];for(let n of a.features.slashMenu.dynamicGroups)if(r){let o=n({editor:t,queryString:r});e=e.concat(o)}return e},[t,r,a?.features]),h=(0,u.useMemo)(()=>{let e=[];for(let t of a?.features.slashMenu.groups??[])e.push(t);if(r){let t=r.toLowerCase().replace(/[\s\-_]/g,"");for(let n of(e=(e=e.map(e=>{let n=e.items.filter(e=>{let n=e.key;return e.label&&(n="function"==typeof e.label?e.label({featureClientSchemaMap:d,i18n:s,schemaPath:c}):e.label),!!(RegExp(r,"gi").exec(n)||n.toLowerCase().replace(/[\s\-_]/g,"").includes(t))||null!=e.keywords&&e.keywords.some(e=>!!RegExp(r,"gi").exec(e)||e.toLowerCase().replace(/[\s\-_]/g,"").includes(t))});return n.length?{...e,items:n}:null})).filter(e=>null!=e),m())){let t=e.find(e=>e.key===n.key);t?e=e.filter(e=>e.key!==n.key):t={...n,items:[]},t?.items?.length&&(t.items=t.items.concat(t.items)),e.push(t)}}return e},[r,a?.features.slashMenu.groups,m,d,s,c]);return(0,l.jsx)(n.l,{anchorElem:e,groups:h,menuRenderFn:(e,{selectedItemKey:t,selectItemAndCleanUp:r,setSelectedItemKey:n})=>e.current&&h.length?R.createPortal((0,l.jsx)("div",{className:ez,children:h.map(e=>{let o=e.key;return e.label&&d&&(o="function"==typeof e.label?e.label({featureClientSchemaMap:d,i18n:s,schemaPath:c}):e.label),(0,l.jsxs)("div",{className:`${ez}__group ${ez}__group-${e.key}`,children:[(0,l.jsx)("div",{className:`${ez}__group-title`,children:o}),e.items.map((e,o)=>(0,l.jsx)(eK,{index:o,isSelected:t===e.key,item:e,onClick:()=>{n(e.key),r(e)},onMouseEnter:()=>{n(e.key)},ref:t=>{e.ref={current:t}}},e.key))]},e.key)})}),e.current):null,onQueryChange:i,triggerFn:f})}function eH(e){let t,r=(0,b.c)(6),{features:n}=e,[o]=(0,p.DF)(),l;return r[0]!==o||r[1]!==n.enabledFormats?(l=()=>{var e;let t,r,l=(e=n.enabledFormats,t=Object.keys(h.LZn),r=new Set(e),t.filter(e=>!r.has(e)));if(0!==l.length)return o.registerNodeTransform(h.Ey8,e=>{l.forEach(t=>{e.hasFormat(t)&&e.toggleFormat(t)})})},r[0]=o,r[1]=n.enabledFormats,r[2]=l):l=r[2],r[3]!==o||r[4]!==n?(t=[o,n],r[3]=o,r[4]=n,r[5]=t):t=r[5],(0,u.useEffect)(l,t),null}function eq(e){let t=(0,b.c)(5),{className:r,editorConfig:n}=e,{t:o}=(0,U.d)(),[,i]=(0,p.DF)(),{getTheme:a}=i,s;if(t[0]!==r||t[1]!==n?.admin?.placeholder||t[2]!==a||t[3]!==o){let e=a();s=(0,l.jsx)(X,{"aria-placeholder":o("lexical:general:placeholder"),className:r??"ContentEditable__root",placeholder:(0,l.jsx)("p",{className:e?.placeholder,children:n?.admin?.placeholder??o("lexical:general:placeholder")})}),t[0]=r,t[1]=n?.admin?.placeholder,t[2]=a,t[3]=o,t[4]=s}else s=t[4];return s}var eV=e=>{let t,r=(0,b.c)(13),{editorConfig:n,editorContainerRef:i,isSmallWidthViewport:a,onChange:s,rtl:d}=e,c=(0,o.b)(),[f]=(0,p.DF)(),m=(0,F.a)(),[g,y]=(0,u.useState)(null),E;r[0]===Symbol.for("react.memo_cache_sentinel")?(E=e=>{null!==e&&y(e)},r[0]=E):E=r[0];let x=E,v,C;return r[1]!==f||r[2]!==c?(v=()=>{if(!c?.uuid)return void console.error("Lexical Editor must be used within an EditorConfigProvider");c?.parentEditor?.uuid&&c.parentEditor?.registerChild(c.uuid,c);let e=f.registerCommand(h.$7r,()=>(c.focusEditor(c),!0),h.AcJ),t=f.registerCommand(h.I2H,()=>(c.blurEditor(c),!0),h.AcJ);return()=>{e(),t(),c.parentEditor?.unregisterChild?.(c.uuid)}},C=[f,c],r[1]=f,r[2]=c,r[3]=v,r[4]=C):(v=r[3],C=r[4]),(0,u.useEffect)(v,C),r[5]!==n||r[6]!==i||r[7]!==g||r[8]!==m||r[9]!==a||r[10]!==s||r[11]!==d?(t=(0,l.jsxs)(u.Fragment,{children:[n.features.plugins?.map(eZ),(0,l.jsxs)("div",{className:"editor-container",dir:d?"rtl":void 0,ref:i,children:[n.features.plugins?.map(eU),(0,l.jsx)($,{contentEditable:(0,l.jsx)("div",{className:"editor-scroller",children:(0,l.jsx)("div",{className:"editor",ref:x,children:(0,l.jsx)(eq,{editorConfig:n})})}),ErrorBoundary:S}),(0,l.jsx)(eO,{}),m&&(0,l.jsx)(eR,{}),(0,l.jsx)(eo,{}),(0,l.jsx)(er,{}),(0,l.jsx)(eH,{features:n.features}),(0,l.jsx)(eJ,{}),(0,l.jsx)(eM,{}),m&&(0,l.jsx)(T,{ignoreSelectionChange:!0,onChange:(e,t,r)=>{(!r.has("focus")||r.size>1)&&s?.(e,t,r)}}),g&&(0,l.jsxs)(u.Fragment,{children:[!a&&m&&(0,l.jsxs)(u.Fragment,{children:[n.admin?.hideDraggableBlockElement?null:(0,l.jsx)(eF,{anch
1orElem:g}),n.admin?.hideAddBlockButton?null:(0,l.jsx)(eN,{anchorElem:g})]}),n.features.plugins?.map(e=>{if("floatingAnchorElem"===e.position&&!(!0===e.desktopOnly&&a))return(0,l.jsx)(ee,{anchorElem:g,clientProps:e.clientProps,plugin:e},e.key)}),m&&(0,l.jsx)(u.Fragment,{children:(0,l.jsx)(e$,{anchorElem:g})})]}),m&&(0,l.jsxs)(u.Fragment,{children:[(0,l.jsx)(P,{}),n?.features?.markdownTransformers?.length>0&&(0,l.jsx)(eA,{})]}),n.features.plugins?.map(eW),n.features.plugins?.map(eY)]}),n.features.plugins?.map(eG)]}),r[5]=n,r[6]=i,r[7]=g,r[8]=m,r[9]=a,r[10]=s,r[11]=d,r[12]=t):t=r[12],t};function eZ(e){if("aboveContainer"===e.position)return(0,l.jsx)(ee,{clientProps:e.clientProps,plugin:e},e.key)}function eU(e){if("top"===e.position)return(0,l.jsx)(ee,{clientProps:e.clientProps,plugin:e},e.key)}function eW(e){if("normal"===e.position)return(0,l.jsx)(ee,{clientProps:e.clientProps,plugin:e},e.key)}function eY(e){if("bottom"===e.position)return(0,l.jsx)(ee,{clientProps:e.clientProps,plugin:e},e.key)}function eG(e){if("belowContainer"===e.position)return(0,l.jsx)(ee,{clientProps:e.clientProps,plugin:e},e.key)}var eX=({children:e,providers:t})=>{if(!t?.length)return e;let r=t[0];return t.length>1?(0,l.jsx)(r,{children:(0,l.jsx)(eX,{providers:t.slice(1),children:e})}):(0,l.jsx)(r,{children:e})},eQ=e=>{let{composerKey:t,editorConfig:r,fieldProps:a,isSmallWidthViewport:s,onChange:d,readOnly:c,rtl:f,value:m}=e,{currentView:p,views:h}=(0,n.g)(),g=(0,o.b)(),y=(0,i.useEditDepth)(),E=u.useRef(null),b=(0,u.useMemo)(()=>{if(m&&"object"!=typeof m)throw Error("The value passed to the Lexical editor is not an object. This is not supported. Please remove the data from the field and start again. This is the value that was passed in: "+JSON.stringify(m));if(m&&Array.isArray(m)&&!("root"in m))throw Error("You have tried to pass in data from the old Slate editor to the new Lexical editor. The data structure is different, thus you will have to migrate your data. We offer a one-line migration script which migrates all your rich text fields: https://payloadcms.com/docs/lexical/migration#migration-via-migration-script-recommended");if(m&&"jsonContent"in m)throw Error("You have tried to pass in data from payload-plugin-lexical. The data structure is different, thus you will have to migrate your data. Migration guide: https://payloadcms.com/docs/lexical/migration#migrating-from-payload-plugin-lexical");let e=h?.[p]?.nodes;return{editable:!0!==c,editorState:null!=m?JSON.stringify(m):void 0,namespace:r.lexical.namespace,nodes:(0,n.p)({editorConfig:r,nodeViews:e}),onError:e=>{throw e},theme:r.lexical.theme}},[r,h,p]);return b?(0,l.jsx)(x,{initialConfig:b,children:(0,l.jsx)(o.a,{editorConfig:r,editorContainerRef:E,fieldProps:a,parentContext:g?.editDepth===y?g:void 0,children:(0,l.jsx)(eX,{providers:r.features.providers,children:(0,l.jsx)(eV,{editorConfig:r,editorContainerRef:E,isSmallWidthViewport:s,onChange:d,rtl:f})})})},t+b.editable+p):(0,l.jsx)("p",{children:"Loading..."})};function e0(){let e,t,r=(0,b.c)(5),{currentView:o,setCurrentView:a,views:s}=(0,n.g)();if(!s||0===Object.keys(s).length)return null;if(r[0]!==o||r[1]!==a||r[2]!==s){t=Symbol.for("react.early_return_sentinel");e:{let r=Object.keys(s);if(!r.some(e2)){t=null;break e}let n=["default",...r.filter(e1)],d=o.charAt(0).toUpperCase()+o.slice(1);e=(0,l.jsx)("div",{className:"lexical-view-selector",children:(0,l.jsx)(i.Popup,{button:(0,l.jsxs)("button",{className:"lexical-view-selector__button",type:"button",children:[(0,l.jsx)("span",{className:"lexical-view-selector__label",children:d}),(0,l.jsx)(i.ChevronIcon,{className:"lexical-view-selector__icon"})]}),buttonType:"custom",horizontalAlign:"left",render:e=>{let{close:t}=e;return(0,l.jsx)(i.PopupList.ButtonGroup,{children:n.map(e=>{let r=e.charAt(0).toUpperCase()+e.slice(1);return(0,l.jsx)(i.PopupList.Button,{active:e===o,disabled:e===o,onClick:()=>{a?.(e),t()},children:r},e)})})},size:"large"})})}r[0]=o,r[1]=a,r[2]=s,r[3]=e,r[4]=t}else e=r[3],t=r[4];return t!==Symbol.for("react.early_return_sentinel")?t:e}function e1(e){return"default"!==e}function e2(e){return"default"!==e}var e4="rich-text-lexical";function e3({error:e}){return(0,l.jsxs)("div",{className:"errorBoundary",role:"alert",children:[(0,l.jsx)("p",{children:"Something went wrong:"}),(0,l.jsx)("pre",{style:{color:"red"},children:e.message})]})}var e5=e=>{let{editorConfig:t,field:r,field:{admin:{className:o,description:c,readOnly:f}={},label:p,localized:h,required:g},path:y,readOnly:E,schemaPath:x,validate:b}=e,v=(0,i.useLocale)(),{config:{localization:C}}
1=(0,a.c)(),w=(0,i.isFieldRTL)({fieldLocalized:h,locale:v,localizationConfig:C||void 0}),S=(0,i.useEditDepth)(),{isControlledByParent:k}=(0,n.g)(),j=(0,u.useCallback)((e,t)=>"function"!=typeof b||b(e,{...t,required:g}),[b,g]),{customComponents:{AfterInput:N,BeforeInput:_,Description:B,Error:P,Label:D}={},disabled:T,initialValue:F,path:L,setValue:R,showError:I,value:A}=(0,i.useField)({potentiallyStalePath:y,validate:j}),M=E||f||T,[O,J]=(0,u.useState)(!1),[z,K]=(0,u.useState)(),$=u.useRef(F),H=u.useRef(A);(0,u.useEffect)(()=>{let e=()=>{let e=window.matchMedia("(max-width: 768px)").matches;e!==O&&J(e)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[O]);let q=["field-type",e4,o,I&&"error",M&&`${e4}--read-only`,t?.admin?.hideGutter!==!0&&!O?`${e4}--show-gutter`:null].filter(Boolean).join(" "),V=`${L}.${S}`,Z=(0,n.e)(),U=(0,u.useCallback)(e=>{Z(()=>{let t=e.toJSON();H.current=t,R(t)})},[R,Z]),W=(0,u.useMemo)(()=>(0,s.FR)(r),[r]),Y=(0,i.useEffectEvent)(e=>{H.current===A||(0,d.j)(null!=H.current?JSON.parse(JSON.stringify(H.current)):H.current,A)||($.current=e,H.current=A,K(new Date))});return(0,u.useEffect)(()=>{Object.is(F,$.current)||Y(F)},[F]),(0,l.jsxs)("div",{className:q,"data-field-path":L,"data-field-schemapath":x,"data-lexical-view":t?.view,style:W,children:[(0,l.jsx)(i.RenderCustomComponent,{CustomComponent:P,Fallback:(0,l.jsx)(i.FieldError,{path:L,showError:I})}),(0,l.jsxs)("div",{className:`${e4}__label-row`,children:[D||(0,l.jsx)(i.FieldLabel,{label:p,localized:h,path:L,required:g}),!k&&(0,l.jsx)(e0,{})]}),(0,l.jsxs)("div",{className:`${e4}__wrap`,children:[(0,l.jsxs)(m,{fallbackRender:e3,onReset:()=>{},children:[_,(0,l.jsx)(i.BulkUploadProvider,{drawerSlugPrefix:`lexical-${L}`,children:(0,l.jsx)(eQ,{composerKey:V,editorConfig:t,fieldProps:e,isSmallWidthViewport:O,onChange:U,readOnly:M,rtl:w,value:A},JSON.stringify({path:L,rerenderProviderKey:z}))}),N]}),(0,l.jsx)(i.RenderCustomComponent,{CustomComponent:B,Fallback:(0,l.jsx)(i.FieldDescription,{description:c,path:L})})]})]},V)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.