PageSourceSearch

https://crp-web-be.onrender.com/_next/static/chunks/6482.fc74d54859a49b1f.js

js crp-web-be.onrender.com collected 2026-10-03 11:41:02 UTC 42,396 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6482],{21250:()=>{},76482:(e,t,n)=>{"use strict";n.r(t),n.d(t,{RichText:()=>e0});var r=n(92944),l=n(5483),o=n(71770),i=n(29559),a=n(17174),s=n(45532),u=n(75602);let d=(0,u.createContext)(null),c={didCatch:!1,error:null};class f extends u.Component{static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){let{error:e}=this.state;if(null!==e){for(var t,n,r=arguments.length,l=Array(r),o=0;o<r;o++)l[o]=arguments[o];null==(t=(n=this.props).onReset)||t.call(n,{args:l,reason:"imperative-api"}),this.setState(c)}}componentDidCatch(e,t){var n,r;null==(n=(r=this.props).onError)||n.call(r,e,t)}componentDidUpdate(e,t){let{didCatch:n}=this.state,{resetKeys:r}=this.props;if(n&&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,n)=>!Object.is(e,t[n]))}(e.resetKeys,r)){var l,o;null==(l=(o=this.props).onReset)||l.call(o,{next:r,prev:e.resetKeys,reason:"keys"}),this.setState(c)}}render(){let{children:e,fallbackRender:t,FallbackComponent:n,fallback:r}=this.props,{didCatch:l,error:o}=this.state,i=e;if(l){let e={error:o,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof t)i=t(e);else if(n)i=(0,u.createElement)(n,e);else if(void 0!==r)i=r;else throw o}return(0,u.createElement)(d.Provider,{value:{didCatch:l,error:o,resetErrorBoundary:this.resetErrorBoundary}},i)}constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=c}}n(21250);var m=n(79309),p=n(87878);let h="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,g=h?u.useLayoutEffect:u.useEffect,y={tag:p.T40};function v({initialConfig:e,children:t}){let n=(0,u.useMemo)(()=>{let{theme:t,namespace:n,nodes:r,onError:l,editorState:o,html:i}=e,a=(0,m.Mx)(null,t),s=(0,p.ieJ)({editable:e.editable,html:i,namespace:n,nodes:r,onError:e=>l(e,s),theme:t});return function(e,t){if(null!==t){if(void 0===t)e.update(()=>{let t=(0,p.NiT)();if(t.isEmpty()){let n=(0,p.lJ7)();t.append(n);let r=h?document.activeElement:null;(null!==(0,p.vJq)()||null!==r&&r===e.getRootElement())&&n.select()}},y);else if(null!==t)switch(typeof t){case"string":{let n=e.parseEditorState(t);e.setEditorState(n,y);break}case"object":e.setEditorState(t,y);break;case"function":e.update(()=>{(0,p.NiT)().isEmpty()&&t(e)},y)}}}(s,o),[s,a]},[]);return g(()=>{let t=e.editable,[r]=n;r.setEditable(void 0===t||t)},[]),(0,o.jsx)(m.Gu.Provider,{value:n,children:t})}var E=n(92274);let x=(0,u.createContext)(null),b={didCatch:!1,error:null};class C extends u.Component{static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){for(var e,t,n=arguments.length,r=Array(n),l=0;l<n;l++)r[l]=arguments[l];let{error:o}=this.state;null!==o&&(null==(e=(t=this.props).onReset)||e.call(t,{args:r,reason:"imperative-api"}),this.setState(b))}componentDidCatch(e,t){var n,r;null==(n=(r=this.props).onError)||n.call(r,e,t)}componentDidUpdate(e,t){var n,r;let{didCatch:l}=this.state,{resetKeys:o}=this.props;l&&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,n)=>!Object.is(e,t[n]))}(e.resetKeys,o)&&(null==(n=(r=this.props).onReset)||n.call(r,{next:o,prev:e.resetKeys,reason:"keys"}),this.setState(b))}render(){let{children:e,fallbackRender:t,FallbackComponent:n,fallback:r}=this.props,{didCatch:l,error:o}=this.state,i=e;if(l){let e={error:o,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof t)i=t(e);else if(n)i=(0,u.createElement)(n,e);else if(void 0!==r)i=r;else throw o}return(0,u.createElement)(x.Provider,{value:{didCatch:l,error:o,resetErrorBoundary:this.resetErrorBoundary}},i)}constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=b}}function w({children:e,onError:t}){return(0,o.jsx)(C,{fallback:(0,o.jsx)("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:t,children:e})}var S=n(35353);function k(e){e.undoStack=[],e.redoStack=[],e.current=null}function j(e,t,n){let r,l,o,i,a,s=(r=Date.now(),l=0,o=Date.now(),i=0,a=null,(t,s,u,d,c,f)=>{let m=Date.now();if(f.has(p.xKE)&&(o=r,i=l,a=t),f.has(p.n0X))return l=0,r=m,2;f.has(p.sne)&&a&&(r=o,l=i,t=a);let h=function(e,t,n,r,l){if(null===e||0===n.size&&0===r.size&&!l)return 0;let o=t._selection,i=e._selection;if(l)return 1;if(!((0,p.I2P)(o)&&(0,p.I2P)(i)&&i.isCollapsed()&&o.isCollapsed()))return 0;let a=function(e,t,n){let r=e._nodeMap,l=[];for(let e of t){let t=r.get(e);void 0!==t&&l.push(t)}for(let[e,t]of n){if(!t)continue;let n=r.get(e);void 0===n||(0,p.hVZ)(n)||l.push(n)}return l}(t,n,r);if(0===a.length)return 0;if(a.length>
11){let n=t._nodeMap,r=n.get(o.anchor.key),l=n.get(i.anchor.key);return r&&l&&!e._nodeMap.has(r.__key)&&(0,p.kFe)(r)&&1===r.__text.length&&1===o.anchor.offset?2:0}let s=a[0],u=e._nodeMap.get(s.__key);if(!(0,p.kFe)(u)||!(0,p.kFe)(s)||u.__mode!==s.__mode)return 0;let d=u.__text,c=s.__text;if(d===c)return 0;let f=o.anchor,m=i.anchor;if(f.key!==m.key||"text"!==f.type)return 0;let h=f.offset,g=m.offset,y=c.length-d.length;return 1===y&&g===h-1?2:-1===y&&g===h+1?3:4*(-1===y&&g===h)}(t,s,d,c,e.isComposing()),g=(()=>{let o=null===u||u.editor===e,i=f.has(p.bMH);if(!i&&o&&f.has(p.T40))return 0;if(1===h)return 2;if(null===t)return 1;let a=s._selection;if(!(d.size>0||c.size>0))return 2*(null===a);let g="number"==typeof n?n:n.peek();return!1===i&&0!==h&&h===l&&m<r+g&&o||1===d.size&&function(e,t,n){let r=t._nodeMap.get(e),l=n._nodeMap.get(e),o=t._selection,i=n._selection;return!((0,p.I2P)(o)&&(0,p.I2P)(i)&&"element"===o.anchor.type&&"element"===o.focus.type&&"text"===i.anchor.type&&"text"===i.focus.type||!(0,p.kFe)(r)||!(0,p.kFe)(l)||r.__parent!==l.__parent)&&JSON.stringify(t.read(()=>r.exportJSON()))===JSON.stringify(n.read(()=>l.exportJSON()))}(Array.from(d)[0],t,s)?0:1})();return r=m,l=h,g});return(0,p.Sdt)(e.registerCommand(p.ZKf,()=>((function(e,t){let n=t.redoStack,r=t.undoStack;if(0!==r.length){let l=t.current,o=r.pop();null!==l&&(n.push(l),e.dispatchCommand(p.WWb,!0)),0===r.length&&e.dispatchCommand(p.KfJ,!1),t.current=o||null,o&&o.editor.setEditorState(o.editorState,{tag:p.n0X})}})(e,t),!0),p.jZM),e.registerCommand(p.V30,()=>((function(e,t){let n=t.redoStack,r=t.undoStack;if(0!==n.length){let l=t.current;null!==l&&(r.push(l),e.dispatchCommand(p.KfJ,!0));let o=n.pop();0===n.length&&e.dispatchCommand(p.WWb,!1),t.current=o||null,o&&o.editor.setEditorState(o.editorState,{tag:p.n0X})}})(e,t),!0),p.jZM),e.registerCommand(p.SKc,()=>(k(t),!1),p.jZM),e.registerCommand(p.t5V,()=>(k(t),e.dispatchCommand(p.WWb,!1),e.dispatchCommand(p.KfJ,!1),!0),p.jZM),e.registerUpdateListener(({editorState:n,prevEditorState:r,dirtyLeaves:l,dirtyElements:o,tags:i})=>{let a=t.current,u=t.redoStack,d=t.undoStack,c=null===a?null:a.editorState;if(null!==a&&n===c)return;let f=s(r,n,a,l,o,i);if(1===f)0!==u.length&&(t.redoStack=[],e.dispatchCommand(p.WWb,!1)),null!==a&&(d.push({...a}),e.dispatchCommand(p.KfJ,!0));else if(2===f)return;t.current={editor:e,editorState:n}}))}function N(){return{current:null,redoStack:[],undoStack:[]}}let B=(0,p.vE9)({build:(e,{delay:t,createInitialHistoryState:n,disabled:r})=>(0,S.v)({delay:t,disabled:r,historyState:n(e)}),config:(0,p.lVE)({createInitialHistoryState:N,delay:300,disabled:"undefined"==typeof window}),name:"@lexical/history/History",register:(e,t,n)=>{let r=n.getOutput();return(0,S.QZ)(()=>r.disabled.value?void 0:j(e,r.historyState.value,r.delay))}});function D({delay:e,externalHistoryState:t}){let[n]=(0,m.DF)();return function(e,t,n=1e3){let r=(0,u.useMemo)(()=>t||N(),[t]);(0,u.useEffect)(()=>j(e,r,n),[n,e,r])}(n,t,e),null}(0,p.vE9)({dependencies:[(0,p.O0w)(B,{createInitialHistoryState:()=>{throw Error("SharedHistory did not inherit parent history")},disabled:!0})],name:"@lexical/history/SharedHistory",register(e,t,n){var r;let{output:l}=n.getDependency(B),o=(r=e._parentEditor)?(0,S.xT)(r,B.name):null;if(!o)return()=>{};let i=o.output;return(0,S.QZ)(()=>(0,S.vA)(()=>{l.delay.value=i.delay.value,l.historyState.value=i.historyState.value,l.disabled.value=i.disabled.value}))}});let _="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?u.useLayoutEffect:u.useEffect;function P({ignoreHistoryMergeTagChange:e=!0,ignoreSelectionChange:t=!1,onChange:n}){let[r]=(0,m.DF)();return _(()=>{if(n)return r.registerUpdateListener(({editorState:l,dirtyElements:o,dirtyLeaves:i,prevEditorState:a,tags:s})=>{t&&0===o.size&&0===i.size||e&&s.has(p.T40)||a.isEmpty()||n(l,r,s)})},[r,e,t,n]),null}var T=n(64893);let F=(0,p.vE9)({name:"@lexical/react/ReactProvider"});var L=n(94447);function R(e){return()=>(function(e){if(!function(e,t=!0){if(e)return!1;let n=(0,p.NiT)().getTextContent();return t&&(n=n.trim()),""===n}(e,!1))return!1;let t=(0,p.NiT)().getChildren(),n=t.length;if(n>1)return!1;for(let e=0;e<n;e++){let n=t[e];if((0,p.Cyw)(n))return!1;if((0,p.ff4)(n)){if(!(0,p.bSg)(n)||0!==n.__indent)return!1;let t=n.getChildren(),r=t.length;for(let n=0;n<r;n++){let n=t[e];if(!(0,p.kFe)(n))return!1}}}return!0})(e)}var I=n(38633),A=n(88139);let M="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?u.useLayoutEffect:u.useEffect;function J({editor:e,ErrorBoundary:t}){let[n,r]=(0,u.useState)(()=>e.getDecorators());return M(()=>e.registerDecoratorListener(e=>{(0,L.flushSync)(()=>{r(e)})}),[e]),(0,u.useEffect)(()=>{r(e.getDecorators())},[e]),(0,u.useMemo)(()=>{let r=[],l=Object.keys(n);for(let i=0;i<l.length;i++){let a=l[i],s=(0,o.jsx)(t,{onError:t=>e._onError(t),children:(0,o.jsx)(u.Suspense,{fallback:null,children:n[a]})}),d=e.getElementByKey(a);null!==d&&r.push((0,L.createPortal)(s,d,a))}return r},[t,n,e])}function O({editor:e,ErrorBoundary:t}){return!function(e){let t=S.iZ.maybeFromEditor(e);
1if(t&&t.hasExtensionByName(F.name)){for(let e of["@lexical/plain-text","@lexical/rich-text"])t.hasExtensionByName(e)&&function(e,...t){let n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;for(let e of(r.append("code",320),t))r.append("v",e);throw n.search=r.toString(),Error(`Minified Lexical error #${320}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(320,e);return!0}return!1}(e)?(0,o.jsx)(J,{editor:e,ErrorBoundary:t}):null}function K(e){return e.getEditorState().read(R(e.isComposing()))}function z({contentEditable:e,placeholder:t=null,ErrorBoundary:n}){var r;let[l]=(0,m.DF)();return M(()=>(0,p.Sdt)((0,A.ZI)(r),(0,I.U)(r)),[r=l]),(0,o.jsxs)(o.Fragment,{children:[e,(0,o.jsx)(H,{content:t}),(0,o.jsx)(O,{editor:l,ErrorBoundary:n})]})}function H({content:e}){let[t]=(0,m.DF)(),n=function(e){let[t,n]=(0,u.useState)(()=>K(e));return M(()=>{function t(){n(K(e))}return t(),(0,p.Sdt)(e.registerUpdateListener(()=>{t()}),e.registerEditableListener(()=>{t()}))},[e]),t}(t),r=(0,T.a)();return n?"function"==typeof e?e(r):e:null}var q=n(43988),Z=n(54357),W=n(9861),U=n(67100);let V="undefined"!=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:n,ariaControls:r,ariaDescribedBy:l,ariaErrorMessage:i,ariaExpanded:a,ariaInvalid:s,ariaLabel:d,ariaLabelledBy:c,ariaMultiline:f,ariaOwns:m,ariaRequired:p,autoCapitalize:h,className:g,id:y,role:v="textbox",spellCheck:E=!0,style:x,tabIndex:b,"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]),B=(0,u.useMemo)(()=>(function(...e){return t=>{for(let n of e)"function"==typeof n?n(t):null!=n&&(n.current=t)}})(S,N),[N,S]);return V(()=>(j(e.isEditable()),e.registerEditableListener(e=>{j(e)})),[e]),(0,o.jsx)("div",{"aria-activedescendant":k?t:void 0,"aria-autocomplete":k?n:"none","aria-controls":k?r:void 0,"aria-describedby":l,...null!=i?{"aria-errormessage":i}:{},"aria-expanded":k&&"combobox"===v?!!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:B,role:v,spellCheck:E,style:x,tabIndex:b,...w})});function G(e){return e.getEditorState().read(R(e.isComposing()))}let X=(0,u.forwardRef)(function(e,t){let{placeholder:n,...r}=e,[l]=(0,m.DF)();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Y,{editor:l,...r,ref:t}),null!=n&&(0,o.jsx)($,{editor:l,content:n})]})});function $({content:e,editor:t}){let n=function(e){let[t,n]=(0,u.useState)(()=>G(e));return V(()=>{function t(){n(G(e))}return t(),(0,p.Sdt)(e.registerUpdateListener(()=>{t()}),e.registerEditableListener(()=>{t()}))},[e]),t}(t),[r,l]=(0,u.useState)(t.isEditable());if((0,u.useLayoutEffect)(()=>(l(t.isEditable()),t.registerEditableListener(e=>{l(e)})),[t]),!n)return null;let i=null;return"function"==typeof e?i=e(r):null!==e&&(i=e),null===i?null:(0,o.jsx)("div",{"aria-hidden":!0,children:i})}var Q=e=>{let{anchorElem:t,clientProps:n,plugin:r}=e;return"floatingAnchorElem"===r.position&&t?r.Component&&(0,o.jsx)(r.Component,{anchorElem:t,clientProps:n}):r.Component&&(0,o.jsx)(r.Component,{clientProps:n})},ee=e=>{if("fields"in e&&"object"==typeof e.fields&&null!==e.fields&&"id"in e.fields?e.fields.id=new W.default().toHexString():"id"in e&&(e.id=new W.default().toHexString()),e.children)for(let t of e.children)ee(t)};function et(){let e=(0,E.c)(3),[t]=(0,m.DF)(),n,r;return e[0]!==t?(n=()=>t.registerCommand(p.u5G,e=>{let n=(0,p.vJq)();if((0,p.RTZ)(n)){var r;let e=JSON.parse(JSON.stringify(null==(r=n.getNodes()[0])?void 0:r.exportJSON()));ee(e);let l=JSON.stringify({namespace:t._config.namespace,nodes:[e]});return(0,q.lW)(t,null,{"application/x-lexical-editor":l,"text/plain":""}).catch(en),!0}return(0,q.lW)(t,(0,Z.xj)(e,ClipboardEvent)?e:null).then(()=>
1{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 n=JSON.parse(t);for(let e of n.nodes)ee(e);let r=JSON.stringify(n);e.clipboardData.setData("application/x-lexical-editor",r)}).catch(t=>{var n;throw e instanceof ClipboardEvent&&(null==(n=e.clipboardData)||n.setData("application/x-lexical-editor","")),t}),!0},p.AcJ),r=[t],e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]),(0,u.useEffect)(n,r),null}function en(e){throw e}function er(){let e=(0,E.c)(3),[t]=(0,m.DF)(),n,r;return e[0]!==t?(n=()=>(0,p.Sdt)(t.registerCommand(p.d8p,eu,p.AcJ),t.registerCommand(p.w$Z,ed,p.AcJ),t.registerCommand(p.gCZ,ed,p.AcJ),t.registerCommand(p.MvL,es,p.AcJ),t.registerCommand(p.UDz,ei,p.AcJ),t.registerCommand(p.bbF,el,p.AcJ)),r=[t],e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]),(0,u.useEffect)(n,r),null}function el(e){let t=(0,p.vJq)();if((0,p.RTZ)(t)){var n,r,l;e.preventDefault();let o=null==(n=t.getNodes()[0])?void 0:n.getNextSibling();if((0,p.Cyw)(o)){let e=(0,p.i0_)().getElementByKey(o.getKey());return e&&ef({element:e,node:o}),!0}if(!(0,p.ff4)(o))return!0;let i=null!=(l=o.getFirstDescendant())?l:o;return i&&(null==(r=(0,p.BtT)(i,em))||r.selectEnd(),e.preventDefault()),!0}if(!(0,p.I2P)(t))return!1;let o=(t.isBackward()?t.anchor:t.focus).getNode(),i=(0,p.BtT)(o,eo),a=null==i?void 0:i.getNextSibling();if(!i||a!==ep(i))return!1;if((0,p.Cyw)(a)){let t=(0,p.i0_)().getElementByKey(a.getKey());if(t)return ef({element:t,node:a}),e.preventDefault(),!0}return!1}function eo(e){return null!==ep(e)}function ei(e){let t=(0,p.vJq)();if((0,p.RTZ)(t)){var n,r,l;let o=null==(n=t.getNodes()[0])?void 0:n.getPreviousSibling();if((0,p.Cyw)(o)){let t=(0,p.i0_)().getElementByKey(o.getKey());return!!t&&(ef({element:t,node:o}),e.preventDefault(),!0)}if(!(0,p.ff4)(o))return!1;let i=null!=(l=o.getLastDescendant())?l:o;return!!i&&(null==(r=(0,p.BtT)(i,em))||r.selectStart(),e.preventDefault(),!0)}if(!(0,p.I2P)(t))return!1;let o=(t.isBackward()?t.anchor:t.focus).getNode(),i=(0,p.BtT)(o,ea),a=null==i?void 0:i.getPreviousSibling();if(!i||a!==eh(i))return!1;if((0,p.Cyw)(a)){let t=(0,p.i0_)().getElementByKey(a.getKey());if(t)return ef({element:t,node:a}),e.preventDefault(),!0}return!1}function ea(e){return null!==eh(e)}function es(){var e,t;let n=function(){let e=(0,p.vJq)();if(!(0,p.RTZ)(e))return;let t=e.getNodes();if(1!==t.length)return;let n=t[0];return(0,p.Cyw)(n)?{decorator:n,element:(0,p.i0_)().getElementByKey(n.getKey())}:void 0}();return null==(e=document.querySelector(".decorator-selected"))||e.classList.remove("decorator-selected"),!!n&&(null==(t=n.element)||t.classList.add("decorator-selected"),!0)}function eu(e){var t;null==(t=document.querySelector(".decorator-selected"))||t.classList.remove("decorator-selected");let n=function(e){if(!(e.target instanceof HTMLElement))return;let t=e.target.closest('[data-lexical-decorator="true"]');if(!(t instanceof HTMLElement))return;let n=(0,p.xL4)(t);return(0,p.Cyw)(n)?{element:t,node:n}:void 0}(e);if(!n)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,p.n1P)(null):ef(n),!0}function ed(e){let t=(0,p.vJq)();return!!(0,p.RTZ)(t)&&(e.preventDefault(),t.getNodes().forEach(ec),!0)}function ec(e){e.remove()}function ef(e){var t;let{element:n,node:r}=e;null==(t=document.querySelector(".decorator-selected"))||t.classList.remove("decorator-selected");let l=(0,p.rUs)();l.add(r.getKey()),(0,p.n1P)(l),n.scrollIntoView({behavior:"smooth",block:"nearest"}),n.classList.add("decorator-selected")}function em(e){if((0,p.Cyw)(e)&&!e.isInline())return!0;if(!(0,p.ff4)(e)||(0,p.IqF)(e))return!1;let t=e.getFirstChild(),n=null===t||(0,p.wH$)(t)||(0,p.kFe)(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}function ep(e){let t=e.getNextSibling();for(;null!==t;){if(em(t))return t;t=t.getNextSibling()}return null}function eh(e){let t=e.getPreviousSibling();for(;null!==t;){if(em(t))return t;t=t.getPreviousSibling()}return null}var eg=function(e,t,n,r){let l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:50,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:25,i=0;if(e&&!e.contains(r)){let{bottom:r,left:a,right:s,top:u}=e.getBoundingClientRect(),d=u+window.scrollY,c=r+window.scrollY;if(n<d-o||n>c+o||t<a-l||t>s+l)return -1;(t<a||t>s)&&(i=t<a?t-a:t-s)}return i};function ey(e){let t=e.getBoundingClientRect(),n=getComputedStyle(e).getPropertyValue("transform");if(!n||"none"===n)return t;let r=n.split(",").pop();return t.y=t.y-Number(null==r?void 0:r.replace(")","")),t}function ev(e){let t=(e,t)=>e?parseFloat(window.getComputedStyle(e)[t]):0,{marginBottom:n,marginTop:r}=window.getComputedStyle(e),l=t(e.previousElementSibling,"marginBottom"),o=t(e.nextElementSibling,"marginTop"),i=Math.max(parseFloat(r),l);return{marginBottom:Math.max(parseFloat(n),o),marginTop:i}}function eE(e){return e.getEditorState().read(()=>(0,p.NiT)().getChildrenKeys())}var ex={props:null,result:null};function eb(e){let{anchorElem:t,cache_threshold:n=20,editor:l,fuzzy:o=!1,horizontalOffset:i=0,point:{x:a,y:s},startIndex:u=0,useEdgeAsDefault:d=!1}=e;if(n>0&&ex.props&&ex.result&&ex.props.fuzzy===e.fuzzy&&ex.props.horizontalOffset===e.horizontalOffset&&ex.props.useEdgeAsDefault===e.useEdgeAsDefault&&function(e,t){let n=arguments.length>
12&&void 0!==arguments[2]?arguments[2]:20,r=e.x-t.x,l=e.y-t.y;return r*r+l*l<=n*n}(ex.props.point,e.point,n))return ex.result;let c=t.getBoundingClientRect(),f=eE(l),m={blockElem:null,blockNode:null,distance:1/0,foundAtIndex:-1,isFoundNodeEmptyParagraph:!1};return l.getEditorState().read(()=>{if(d){let e=l.getElementByKey(f[0]),t=l.getElementByKey(f[f.length-1]);if(e&&t){let[n,r]=[ey(e),ey(t)];if(s<n.top?(m.blockElem=e,m.distance=n.top-s,m.blockNode=(0,p.nsf)(f[0]),m.foundAtIndex=0):s>r.bottom&&(m.distance=s-r.bottom,m.blockNode=(0,p.nsf)(f[f.length-1]),m.blockElem=t,m.foundAtIndex=f.length-1),null==m?void 0:m.blockElem)return{blockElem:null,isFoundNodeEmptyParagraph:!1}}}let t=u,n=0;for(;t>=0&&t<f.length;){let u=f[t],d=l.getElementByKey(u);if(null===d)break;let h=new r.f(a+i,s),g=r.k.fromDOMRect(ey(d)),{marginBottom:y,marginTop:v}=ev(d),{distance:E,isOnBottomSide:x,isOnTopSide:b}=g.generateNewRect({bottom:g.bottom+y,left:c.left,right:c.right,top:g.top-v}).distanceFromPoint(h);if(0===E){m.blockElem=d,m.blockNode=(0,p.nsf)(u),m.foundAtIndex=t,m.distance=E,m.blockNode&&"paragraph"===m.blockNode.getType()&&""===m.blockNode.getTextContent()&&(o||e.returnEmptyParagraphs||(m.blockElem=null,m.blockNode=null),m.isFoundNodeEmptyParagraph=!0);break}o&&E<m.distance&&(m.blockElem=d,m.blockNode=(0,p.nsf)(u),m.distance=E,m.foundAtIndex=t),0===n&&(n=b?-1:x?1:1/0),t+=n}}),ex.props=e,ex.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 eC(e,t){return!!e.closest(".".concat(t))}var ew=["IMG","INPUT","TEXTAREA","SELECT","BUTTON","VIDEO","OBJECT","EMBED","IFRAME","HR"];function eS(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;
1if(!e){t.style.opacity="0",t.style.transform="translate(-10000px, -10000px)";return}let l=e.getBoundingClientRect(),o=window.getComputedStyle(e),i=t.getBoundingClientRect(),a=n.getBoundingClientRect(),s;if(["LexicalEditorTheme__block","LexicalEditorTheme__upload","LexicalEditorTheme__relationship"].some(t=>{var n;return e.classList.contains(t)||(null==(n=e.firstElementChild)?void 0:n.classList.contains(t))}))s=l.top+8-a.top;else{let t=!function(e){if(!e||ew.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"!==t.visibility&&"0"!==t.opacity}(e)?0:parseInt(o.lineHeight,10);s=l.top+(t-i.height)/2-a.top}t.style.opacity="1",t.style.transform="translate(".concat(r,"px, ").concat(s,"px)")}var ek=1/0;function ej(e){let{anchorElem:t}=e,n=void 0===t?document.body:t,[i]=(0,m.DF)();return function(e,t,n){var i;let a=t.parentElement,{editorConfig:s}=(0,l.b)(),d=(null==s||null==(i=s.admin)?void 0:i.hideGutter)?-24:12,c=(0,u.useRef)(null),[f,m]=(0,u.useState)(null);(0,u.useEffect)(()=>{var n;function l(n){var l;let o=n.target;if(!(0,p.sby)(o))return;let i=eg(a,n.pageX,n.pageY,o);if(-1===i)return void m(null);if(eC(o,"add-block-menu"))return;let s=eE(e),{blockElem:u,blockNode:d,foundAtIndex:c}=eb({anchorElem:t,cache_threshold:0,editor:e,horizontalOffset:-i,point:new r.f(n.x,n.y),returnEmptyParagraphs:!0,startIndex:0===(l=s.length)?1/0:ek>=0&&ek<l?ek:Math.floor(l/2),useEdgeAsDefault:!1});ek=c,u&&d&&((null==f?void 0:f.node)!==d||(null==f?void 0:f.elem)!==u)&&m({elem:u,node:d})}return null==(n=document)||n.addEventListener("mousemove",l),()=>{var e;null==(e=document)||e.removeEventListener("mousemove",l)}},[a,t,e,f]),(0,u.useEffect)(()=>{c.current&&(null==f?void 0:f.node)&&eS(null==f?void 0:f.elem,c.current,t,d)},[t,f,d]);let h=(0,u.useCallback)(t=>{let n=f;(null==n?void 0:n.node)&&(e.update(()=>{let t=!0;if(((null==n?void 0:n.node.getType())!=="paragraph"||""!==n.node.getTextContent())&&(t=!1),!t){let t=(0,p.lJ7)();null==n||n.node.insertAfter(t),setTimeout(()=>{m(n={elem:e.getElementByKey(t.getKey()),node:t})},0)}}),setTimeout(()=>{e.update(()=>{e.focus(),(null==n?void 0:n.node)&&"select"in n.node&&"function"==typeof n.node.select&&n.node.select()})},1),setTimeout(()=>{e.dispatchCommand(r.i,{node:null==n?void 0:n.node})},2),t.stopPropagation(),t.preventDefault())},[e,f]);return(0,L.createPortal)((0,o.jsx)(u.Fragment,{children:(0,o.jsx)("button",{"aria-label":"Add block",className:"icon add-block-menu",onClick:e=>{h(e)},ref:c,type:"button",children:(0,o.jsx)("div",{className:n?"icon":""})})}),t)}(i,n,i._editable)}var eN=0,eB="application/x-lexical-drag-block",eD=1/0;function e_(e){return 0===e?1/0:eD>=0&&eD<e?eD:Math.floor(e/2)}function eP(e,t){e&&(e.style.opacity="0"),t&&(t.style.opacity="",t.style.marginBottom="",t.style.marginTop="")}function eT(e){let{anchorElem:t}=e,n=void 0===t?document.body:t,[i]=(0,m.DF)();return function(e,t,n){var i,a;let s=t.parentElement,d=(0,u.useRef)(null),c=(0,u.useRef)(null),f=(0,u.useRef)(null),m=(0,u.useRef)(!1),[h,g]=(0,u.useState)(null),[y,v]=(0,u.useState)(null),{editorConfig:E}=(0,l.b)(),x=(null==E||null==(i=E.admin)?void 0:i.hideGutter)?-44:-8;return(0,u.useEffect)(()=>{var n;function l(n){let l=n.target;if(!(0,p.sby)(l))return;let o=eg(s,n.pageX,n.pageY,l);if(-1===o)return void g(null);if(eC(l,"draggable-block-menu"))return;let i=eE(e),{blockElem:a,foundAtIndex:u,isFoundNodeEmptyParagraph:d}=eb({anchorElem:t,cache_threshold:0,editor:e,horizontalOffset:-o,point:new r.f(n.x,n.y),startIndex:e_(i.length),useEdgeAsDefault:!1,verbose:!1});eD=u,(a||d)&&h!==a&&g(a)}return null==(n=document)||n.addEventListener("mousemove",l),()=>{var e;null==(e=document)||e.removeEventListener("mousemove",l)}},[s,t,e,h]),(0,u.useEffect)(()=>{d.current&&eS(h,d.current,t,x)},[t,h,x]),(0,u.useEffect)(()=>
1{function n(n){if(!m.current)return!1;let[l]=(0,A.gA)(n);if(l)return!1;let{pageY:o,target:i}=n;if(!(0,p.sby)(i))return!1;let a=eg(s,n.pageX,n.pageY,i,100,50),u=eE(e),{blockElem:g,foundAtIndex:b,isFoundNodeEmptyParagraph:C}=eb({anchorElem:t,editor:e,fuzzy:!0,horizontalOffset:-a,point:new r.f(n.x,n.y),startIndex:e_(u.length),useEdgeAsDefault:!0,verbose:!0});eD=b;let w=c.current;if(null===g||null===w)return!1;if(h!==g){var S,k,j,N,B,D,_,P;let{isBelow:e,willStayInSamePosition:r}=function(e,t,n,r,l,o,i,a,s){let u=arguments.length>9&&void 0!==arguments[9]&&arguments[9],{height:d,top:c}=r.getBoundingClientRect(),{top:f,width:m}=i.getBoundingClientRect(),{marginBottom:p,marginTop:h}=ev(r),g=c,y=o>=c+d/2+window.scrollY,v=!1;if(null==l?void 0:l.elem)if(r!==(null==l?void 0:l.elem))(y&&(null==l?void 0:l.elem)&&(null==l?void 0:l.elem)===r.nextElementSibling||!y&&(null==l?void 0:l.elem)&&(null==l?void 0:l.elem)===r.previousElementSibling)&&++eN<200&&(v=!0);else{var E;eN++;let e=null==l||null==(E=l.boundingBox)?void 0:E.y,t=r.getBoundingClientRect().y;(y===(null==l?void 0:l.isBelow)&&e===t||eN<200)&&(v=!1)}if(v)return{isBelow:y,willStayInSamePosition:v};u?g+=d/2:y?g+=d+p/2:g-=h/2;let x=0;u||(x=y?-0:0);let b=g-f+x;return n.style.width="calc(".concat(m,"px - ").concat(e,")"),n.style.opacity=".8",n.style.transform="translate(".concat(-24-t,"px, calc(").concat(b,"px - 2px))"),(null==l?void 0:l.elem)&&(l.elem.style.opacity="",(null==l?void 0:l.elem)===r?y?l.elem.style.marginTop="":l.elem.style.marginBottom="":(l.elem.style.marginBottom="",l.elem.style.marginTop="")),eN=0,{isBelow:y,willStayInSamePosition:v}}((null==E||null==(S=E.admin)?void 0:S.hideGutter)?"0px":"3rem",x+((null==E||null==(k=E.admin)?void 0:k.hideGutter)?null!=(_=null==d||null==(N=d.current)||null==(j=N.getBoundingClientRect())?void 0:j.width)?_:0:-(null!=(P=null==d||null==(D=d.current)||null==(B=D.getBoundingClientRect())?void 0:B.width)?P:0)),w,g,y,o,t,n,f,C);n.preventDefault(),r||v({boundingBox:g.getBoundingClientRect(),elem:g,isBelow:e})}
1else(null==y?void 0:y.elem)&&(eP(w,y.elem),v({boundingBox:g.getBoundingClientRect(),elem:g,isBelow:!1}));return!0}function l(n){if(!m.current)return!1;let[l]=(0,A.gA)(n);if(l)return!1;let{dataTransfer:o,pageY:i,target:a}=n,u=(null==o?void 0:o.getData(eB))||"";return e.update(()=>{let l=(0,p.nsf)(u);if(!l||!(0,p.sby)(a))return!1;let{blockElem:o,isFoundNodeEmptyParagraph:d}=eb({anchorElem:t,editor:e,fuzzy:!0,horizontalOffset:-eg(s,n.pageX,n.pageY,a,100,50),point:new r.f(n.x,n.y),useEdgeAsDefault:!0});if(!o)return!1;let c=(0,p.xL4)(o);if(!c)return!1;if(c===l)return!0;let{height:f,top:m}=ey(o),y=i>=m+f/2+window.scrollY;d?(c.insertBefore(l),c.remove()):y?c.insertAfter(l):c.insertBefore(l),null!==h&&g(null),document.querySelectorAll(".lexical-block-highlighter").forEach(e=>{e.remove()});let v=e.getElementByKey(l.getKey());setTimeout(()=>{let e=null==v?void 0:v.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="".concat(e.height+8,"px"),t.style.width="".concat(e.width+8,"px"),t.style.top="".concat(e.top+window.scrollY-4,"px"),t.style.left="".concat(e.left-4,"px"),setTimeout(()=>{t.style.opacity="0",setTimeout(()=>{t.remove()},500)},1e3)},120)}),!0}return document.addEventListener("dragover",n),document.addEventListener("drop",l),()=>{document.removeEventListener("dragover",n),document.removeEventListener("drop",l)}},[s,x,t,e,y,h,null==E||null==(a=E.admin)?void 0:a.hideGutter]),(0,L.createPortal)((0,o.jsxs)(u.Fragment,{children:[(0,o.jsx)("button",{"aria-label":"Drag to move",className:"icon draggable-block-menu",draggable:!0,onDragEnd:function(){m.current=!1,(null==y?void 0:y.elem)&&eP(c.current,null==y?void 0:y.elem)},onDragStart:function(t){let n=t.dataTransfer;if(!n||!h)return;!function(e,t){let{transform:n}=t.style;e.setDragImage(t,0,0),setTimeout(()=>{t.style.transform=n})}(n,h);let r="";e.update(()=>{let e=(0,p.xL4)(h);e&&(r=e.getKey())}),m.current=!0,n.setData(eB,r)},ref:d,type:"button",children:(0,o.jsx)("div",{className:n?"icon":""})}),(0,o.jsx)("div",{className:"draggable-block-target-line",ref:c}),(0,o.jsx)("div",{className:"debug-highlight",ref:f})]}),t)}(i,n,i._editable)}var eF="insert-paragraph-at-end",eL=()=>{var e;let t,n=(0,E.c)(2),[r]=(0,m.DF)(),{editorConfig:i}=(0,l.b)();return(null==i||null==(e=i.admin)?void 0:e.hideInsertParagraphAtEnd)?null:(n[0]!==r?(t=(0,o.jsx)("div",{"aria-label":"Insert Paragraph",className:eF,onClick:()=>{r.update(eR)},role:"button",tabIndex:0,children:(0,o.jsx)("div",{className:"".concat(eF,"-inside"),children:(0,o.jsx)("span",{children:"+"})})}),n[0]=r,n[1]=t):t=n[1],t)};function eR(){let e=(0,p.lJ7)();(0,p.NiT)().append(e),e.select()}var eI=()=>{let e=(0,E.c)(4),{editorConfig:t}=(0,l.b)(),[n]=(0,m.DF)(),o,i;return e[0]!==n||e[1]!==t.features.markdownTransformers?(o=()=>{var e;return(0,r.a)(n,null!=(e=t.features.markdownTransformers)?e:[])},i=[n,t.features.markdownTransformers],e[0]=n,e[1]=t.features.markdownTransformers,e[2]=o,e[3]=i):(o=e[2],i=e[3]),u.useEffect(o,i),null};function eA(){let[e]=(0,m.DF)();return(0,u.useEffect)(()=>e.registerNodeTransform(p.haT,e=>{let t=(0,p.vJq)();if((0,p.I2P)(t)){let n=t.anchor.getNode(),r=t.focus.getNode();n.isAttached()&&r.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 eM(){let[e]=(0,m.DF)();return(0,u.useEffect)(()=>e.registerCommand(p.HYn,()=>{if((0,p.vJq)())return!1;let e=document.activeElement;return e instanceof HTMLInputElement&&e.select(),!0},p.AcJ),[e]),null}var eJ="slash-menu-popup";function eO(e){let{isSelected:t,item:n,onClick:r,onMouseEnter:i,ref:a}=e,{fieldProps:{featureClientSchemaMap:s,schemaPath:u}}=(0,l.b)(),{i18n:d}=(0,U.d)(),c="".concat(eJ,"__item ").concat(eJ,"__item-").concat(n.key);t&&(c+=" ".concat(eJ,"__item--selected"));let f=n.key;return n.label&&(f="function"==typeof n.label?n.label({featureClientSchemaMap:s,i18n:d,schemaPath:u}):n.label),f.length>25&&(f=f.substring(0,25)+"..."),(0,o.jsxs)("button",{"aria-selected":t,className:c,id:eJ+"__item-"+n.key,onClick:r,onMouseEnter:i,ref:a,role:"option",tabIndex:-1,type:"button",children:[(null==n?void 0:n.Icon)&&(0,o.jsx)(n.Icon,{}),(0,o.jsx)("span",{className:"".concat(eJ,"__item-text"),children:f})]},n.key)}function eK(e){let{anchorElem:t=document.body}=e,[n]=(0,m.DF)(),[i,a]=(0,u.useState)(null),{editorConfig:s}=(0,l.b)(),{i18n:d}=(0,U.d)(),{fieldProps:{featureClientSchemaMap:c,schemaPath:f}}=(0,l.b)(),p=function(e,t){let n=(0,E.c)(4),{maxLength:l,minLength:o}=t,i=void 0===l?75:l,a=void 0===o?1:o,s;return n[0]!==i||n[1]!==a||"/"!==n[2]?(s=t=>{let{query:n}=t,l="[^/"+r.h+"\\s]",o=RegExp("(^|\\s|\\()(["+e+"]((?:"+l+"){0,"+i+"}))$").exec(n);
1if(null!==o){let e=o[1],t=o[3];if(t.length>=a)return{leadOffset:o.index+e.length,matchingString:t,replaceableString:o[2]}}return null},n[0]=i,n[1]=a,n[2]=e,n[3]=s):s=n[3],s}("/",{minLength:0}),h=(0,u.useCallback)(()=>{let e=[];for(let t of s.features.slashMenu.dynamicGroups)if(i){let r=t({editor:n,queryString:i});e=e.concat(r)}return e},[n,i,null==s?void 0:s.features]),g=(0,u.useMemo)(()=>{var e,t;let n=[];for(let t of null!=(e=null==s?void 0:s.features.slashMenu.groups)?e:[])n.push(t);if(i)for(let e of(n=(n=n.map(e=>{let t=e.items.filter(e=>{let t=e.key;return e.label&&(t="function"==typeof e.label?e.label({featureClientSchemaMap:c,i18n:d,schemaPath:f}):e.label),!!RegExp(i,"gi").exec(t)||null!=e.keywords&&e.keywords.some(e=>RegExp(i,"gi").exec(e))});return t.length?{...e,items:t}:null})).filter(e=>null!=e),h())){let r=n.find(t=>t.key===e.key);r?n=n.filter(t=>t.key!==e.key):r={...e,items:[]},(null==r||null==(t=r.items)?void 0:t.length)&&(r.items=r.items.concat(r.items)),n.push(r)}return n},[i,null==s?void 0:s.features.slashMenu.groups,h,c,d,f]);return(0,o.jsx)(r.j,{anchorElem:t,groups:g,menuRenderFn:(e,t)=>{let{selectedItemKey:n,selectItemAndCleanUp:r,setSelectedItemKey:l}=t;return e.current&&g.length?L.createPortal((0,o.jsx)("div",{className:eJ,children:g.map(e=>{let t=e.key;return e.label&&c&&(t="function"==typeof e.label?e.label({featureClientSchemaMap:c,i18n:d,schemaPath:f}):e.label),(0,o.jsxs)("div",{className:"".concat(eJ,"__group ").concat(eJ,"__group-").concat(e.key),children:[(0,o.jsx)("div",{className:"".concat(eJ,"__group-title"),children:t}),e.items.map((e,t)=>(0,o.jsx)(eO,{index:t,isSelected:n===e.key,item:e,onClick:()=>{l(e.key),r(e)},onMouseEnter:()=>{l(e.key)},ref:t=>{e.ref={current:t}}},e.key))]},e.key)})}),e.current):null},onQueryChange:a,triggerFn:p})}function ez(e){let t,n=(0,E.c)(6),{features:r}=e,[l]=(0,m.DF)(),o;return n[0]!==l||n[1]!==r.enabledFormats?(o=()=>{var e;let t,n,o=(e=r.enabledFormats,t=Object.keys(p.LZn),n=new Set(e),t.filter(e=>!n.has(e)));if(0!==o.length)return l.registerNodeTransform(p.Ey8,e=>{o.forEach(t=>{e.hasFormat(t)&&e.toggleFormat(t)})})},n[0]=l,n[1]=r.enabledFormats,n[2]=o):o=n[2],n[3]!==l||n[4]!==r?(t=[l,r],n[3]=l,n[4]=r,n[5]=t):t=n[5],(0,u.useEffect)(o,t),null}function eH(e){var t,n,r,l;let i=(0,E.c)(5),{className:a,editorConfig:s}=e,{t:u}=(0,U.d)(),[,d]=(0,m.DF)(),{getTheme:c}=d,f;if(i[0]!==a||i[1]!==(null==s||null==(t=s.admin)?void 0:t.placeholder)||i[2]!==c||i[3]!==u){let e=c();f=(0,o.jsx)(X,{"aria-placeholder":u("lexical:general:placeholder"),className:null!=a?a:"ContentEditable__root",placeholder:(0,o.jsx)("p",{className:null==e?void 0:e.placeholder,children:null!=(l=null==s||null==(n=s.admin)?void 0:n.placeholder)?l:u("lexical:general:placeholder")})}),i[0]=a,i[1]=null==s||null==(r=s.admin)?void 0:r.placeholder,i[2]=c,i[3]=u,i[4]=f}else f=i[4];return f}var eq=e=>{var t,n,r,i,a,s,d,c,f,h;let g,y=(0,E.c)(12),{editorConfig:v,editorContainerRef:x,isSmallWidthViewport:b,onChange:C}=e,S=(0,l.b)(),[k]=(0,m.DF)(),j=(0,T.a)(),[N,B]=(0,u.useState)(null),_;y[0]===Symbol.for("react.memo_cache_sentinel")?(_=e=>{null!==e&&B(e)},y[0]=_):_=y[0];let F=_,L,R;return y[1]!==k||y[2]!==S?(L=()=>{var e,t;if(!(null==S?void 0:S.uuid))return void console.error("Lexical Editor must be used within an EditorConfigProvider");(null==S||null==(e=S.parentEditor)?void 0:e.uuid)&&(null==(t=S.parentEditor)||t.registerChild(S.uuid,S));let n=k.registerCommand(p.$7r,()=>(S.focusEditor(S),!0),p.AcJ),r=k.registerCommand(p.I2H,()=>(S.blurEditor(S),!0),p.AcJ);return()=>{var e,t;n(),r(),null==(t=S.parentEditor)||null==(e=t.unregisterChild)||e.call(t,S.uuid)}},R=[k,S],y[1]=k,y[2]=S,y[3]=L,y[4]=R):(L=y[3],R=y[4]),(0,u.useEffect)(L,R),y[5]!==v||y[6]!==x||y[7]!==N||y[8]!==j||y[9]!==b||y[10]!==C?(g=(0,o.jsxs)(u.Fragment,{children:[null==(t=v.features.plugins)?void 0:t.map(eZ),(0,o.jsxs)("div",{className:"editor-container",ref:x,children:[null==(n=v.features.plugins)?void 0:n.map(eW),(0,o.jsx)(z,{contentEditable:(0,o.jsx)("div",{className:"editor-scroller",children:(0,o.jsx)("div",{className:"editor",ref:F,children:(0,o.jsx)(eH,{editorConfig:v})})}),ErrorBoundary:w}),(0,o.jsx)(eA,{}),j&&(0,o.jsx)(eL,{}),(0,o.jsx)(er,{}),(0,o.jsx)(et,{}),(0,o.jsx)(ez,{features:v.features}),(0,o.jsx)(eM,{}
1),j&&(0,o.jsx)(P,{ignoreSelectionChange:!0,onChange:(e,t,n)=>{(!n.has("focus")||n.size>1)&&(null==C||C(e,t,n))}}),N&&(0,o.jsxs)(u.Fragment,{children:[!b&&j&&(0,o.jsxs)(u.Fragment,{children:[(null==(r=v.admin)?void 0:r.hideDraggableBlockElement)?null:(0,o.jsx)(eT,{anchorElem:N}),(null==(i=v.admin)?void 0:i.hideAddBlockButton)?null:(0,o.jsx)(ej,{anchorElem:N})]}),null==(a=v.features.plugins)?void 0:a.map(e=>{if("floatingAnchorElem"===e.position&&!(!0===e.desktopOnly&&b))return(0,o.jsx)(Q,{anchorElem:N,clientProps:e.clientProps,plugin:e},e.key)}),j&&(0,o.jsx)(u.Fragment,{children:(0,o.jsx)(eK,{anchorElem:N})})]}),j&&(0,o.jsxs)(u.Fragment,{children:[(0,o.jsx)(D,{}),(null==v||null==(d=v.features)||null==(s=d.markdownTransformers)?void 0:s.length)>0&&(0,o.jsx)(eI,{})]}),null==(c=v.features.plugins)?void 0:c.map(eU),null==(f=v.features.plugins)?void 0:f.map(eV)]}),null==(h=v.features.plugins)?void 0:h.map(eY)]}),y[5]=v,y[6]=x,y[7]=N,y[8]=j,y[9]=b,y[10]=C,y[11]=g):g=y[11],g};function eZ(e){if("aboveContainer"===e.position)return(0,o.jsx)(Q,{clientProps:e.clientProps,plugin:e},e.key)}function eW(e){if("top"===e.position)return(0,o.jsx)(Q,{clientProps:e.clientProps,plugin:e},e.key)}function eU(e){if("normal"===e.position)return(0,o.jsx)(Q,{clientProps:e.clientProps,plugin:e},e.key)}function eV(e){if("bottom"===e.position)return(0,o.jsx)(Q,{clientProps:e.clientProps,plugin:e},e.key)}function eY(e){if("belowContainer"===e.position)return(0,o.jsx)(Q,{clientProps:e.clientProps,plugin:e},e.key)}var eG=e=>{let{children:t,providers:n}=e;if(!(null==n?void 0:n.length))return t;let r=n[0];return n.length>1?(0,o.jsx)(r,{children:(0,o.jsx)(eG,{providers:n.slice(1),children:t})}):(0,o.jsx)(r,{children:t})},eX=e=>{let{composerKey:t,editorConfig:n,fieldProps:a,isSmallWidthViewport:s,onChange:d,readOnly:c,value:f}=e,m=(0,l.b)(),p=(0,i.useEditDepth)(),h=u.useRef(null),g=(0,u.useMemo)(()=>{if(f&&"object"!=typeof f)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(f));if(f&&Array.isArray(f)&&!("root"in f))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(f&&"jsonContent"in f)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");return{editable:!0!==c,editorState:null!=f?JSON.stringify(f):void 0,namespace:n.lexical.namespace,nodes:(0,r.l)({editorConfig:n}),onError:e=>{throw e},theme:n.lexical.theme}},[n]);return g?(0,o.jsx)(v,{initialConfig:g,children:(0,o.jsx)(l.a,{editorConfig:n,editorContainerRef:h,fieldProps:a,parentContext:(null==m?void 0:m.editDepth)===p?m:void 0,children:(0,o.jsx)(eG,{providers:n.features.providers,children:(0,o.jsx)(eq,{editorConfig:n,editorContainerRef:h,isSmallWidthViewport:s,onChange:d})})})},t+g.editable):(0,o.jsx)("p",{children:"Loading..."})},e$="rich-text-lexical";function eQ(e){let{error:t}=e;return(0,o.jsxs)("div",{className:"errorBoundary",role:"alert",children:[(0,o.jsx)("p",{children:"Something went wrong:"}),(0,o.jsx)("pre",{style:{color:"red"},children:t.message})]})}var e0=e=>{var t;let{editorConfig:n,field:l,field:{admin:{className:d,description:c,readOnly:m}={},label:p,localized:h,required:g},path:y,readOnly:v,validate:E}=e,x=(0,i.useEditDepth)(),b=(0,u.useCallback)((e,t)=>"function"!=typeof E||E(e,{...t,required:g}),[E,g]),{customComponents:{AfterInput:C,BeforeInput:w,Description:S,Error:k,Label:j}={},disabled:N,initialValue:B,path:D,setValue:_,showError:P,value:T}=(0,i.useField)({potentiallyStalePath:y,validate:b}),F=v||m||N,[L,R]=(0,u.useState)(!1),[I,A]=(0,u.useState)(),M=u.useRef(B),J=u.useRef(T);(0,u.useEffect)(()=>{let e=()=>{let e=window.matchMedia("(max-width: 768px)").matches;e!==L&&R(e)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[L]);let O=[e$,"field-type",d,P&&"error",F&&"".concat(e$,"--read-only"),(null==n||null==(t=n.admin)?void 0:t.hideGutter)!==!0&&!L?"".concat(e$,"--show-gutter"):null].filter(
1Boolean).join(" "),K="".concat(D,".").concat(x),z=(0,r.e)(),H=(0,u.useCallback)(e=>{z(()=>{let t=e.toJSON();J.current=t,_(t)})},[_,z]),q=(0,u.useMemo)(()=>(0,a.FR)(l),[l]),Z=(0,i.useEffectEvent)(e=>{J.current===T||(0,s.j)(null!=J.current?JSON.parse(JSON.stringify(J.current)):J.current,T)||(M.current=e,J.current=T,A(new Date))});return(0,u.useEffect)(()=>{Object.is(B,M.current)||Z(B)},[B]),(0,o.jsxs)("div",{className:O,style:q,children:[(0,o.jsx)(i.RenderCustomComponent,{CustomComponent:k,Fallback:(0,o.jsx)(i.FieldError,{path:D,showError:P})}),j||(0,o.jsx)(i.FieldLabel,{label:p,localized:h,path:D,required:g}),(0,o.jsxs)("div",{className:"".concat(e$,"__wrap"),children:[(0,o.jsxs)(f,{fallbackRender:eQ,onReset:()=>{},children:[w,(0,o.jsx)(i.BulkUploadProvider,{drawerSlugPrefix:D,children:(0,o.jsx)(eX,{composerKey:K,editorConfig:n,fieldProps:e,isSmallWidthViewport:L,onChange:H,readOnly:F,value:T},JSON.stringify({path:D,rerenderProviderKey:I}))}),C]}),(0,o.jsx)(i.RenderCustomComponent,{CustomComponent:S,Fallback:(0,o.jsx)(i.FieldDescription,{description:c,path:D})})]})]},K)}}}]);

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.