diff --git a/static/web/404.html b/static/web/404.html index f20aec5ac..cbe17023b 100644 --- a/static/web/404.html +++ b/static/web/404.html @@ -1,4 +1,4 @@ -404: This page could not be found

404

This page could not be found.

\ No newline at end of file + }

404

This page could not be found.

\ No newline at end of file diff --git a/static/web/404/index.html b/static/web/404/index.html index f20aec5ac..cbe17023b 100644 --- a/static/web/404/index.html +++ b/static/web/404/index.html @@ -1,4 +1,4 @@ -404: This page could not be found

404

This page could not be found.

\ No newline at end of file + }

404

This page could not be found.

\ No newline at end of file diff --git a/static/web/_next/static/chunks/d2094a0f-509cdf8ee1cc9962.js b/static/web/_next/static/chunks/d2094a0f-e4988ec3c3ddbfcf.js similarity index 55% rename from static/web/_next/static/chunks/d2094a0f-509cdf8ee1cc9962.js rename to static/web/_next/static/chunks/d2094a0f-e4988ec3c3ddbfcf.js index ef4079790..efee136fb 100644 --- a/static/web/_next/static/chunks/d2094a0f-509cdf8ee1cc9962.js +++ b/static/web/_next/static/chunks/d2094a0f-e4988ec3c3ddbfcf.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8700],{96391:function(e,t,r){r.d(t,{BU:function(){return Ft},CX:function(){return vt},F3:function(){return fe},UE:function(){return yt},mH:function(){return Dt},vt:function(){return Re}});var a=r(6907),n=r.n(a),o=r(23279),i=r.n(o),s=r(23493),l=r.n(s),d=r(67294),c=r(12615),u=r(77493),f=r(18156),v=r(73935);function h(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r,a,n={},o=Object.keys(e);for(a=0;a=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var g=0;class m{constructor(){this.id="".concat(g++)}}var w=new WeakMap,M=new WeakMap,b=new WeakMap,x=new WeakMap,k=new WeakMap,y=new WeakMap,L=new WeakMap,C=new WeakMap,D=new WeakMap,E=new WeakMap,O=new WeakMap,S=new WeakMap,B=new WeakMap,F=new WeakMap,P=new WeakMap,R=new WeakMap,N=new WeakMap,T=new WeakMap,W=new WeakMap,j=new WeakMap,A=new WeakMap,I=Symbol("placeholder"),q=Symbol("mark-placeholder"),Y=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,U=e=>$(e)&&1===e.nodeType,$=e=>{var t=Y(e);return!!t&&e instanceof t.Node},_=e=>{var t=e&&e.anchorNode&&Y(e.anchorNode);return!!t&&e instanceof t.Selection},z=e=>$(e)&&3===e.nodeType,V=(e,t,r)=>{for(var a,{childNodes:n}=e,o=n[t],i=t,s=!1,l=!1;($(a=o)&&8===a.nodeType||U(o)&&0===o.childNodes.length||U(o)&&"false"===o.getAttribute("contenteditable"))&&(!s||!l);)i>=n.length?(s=!0,i=t-1,r="backward"):i<0?(l=!0,i=t+1,r="forward"):(o=n[i],t=i,i+="forward"===r?1:-1);return[o,t]},K=(e,t,r)=>{var[a]=V(e,t,r);return a},H=e=>{var t="";if(z(e)&&e.nodeValue)return e.nodeValue;if(U(e)){for(var r of Array.from(e.childNodes))t+=H(r);var a=getComputedStyle(e).getPropertyValue("display");"block"!==a&&"list"!==a&&"BR"!==e.tagName||(t+="\n")}return t},X=/data-slate-fragment="(.+?)"/m,J=(e,t,r)=>{var{target:a}=t;if(U(a)&&a.matches('[contentEditable="false"]'))return!1;var{document:n}=fe.getWindow(e);if(n.contains(a))return fe.hasDOMNode(e,a,{editable:!0});var o=r.find((e=>{var{addedNodes:t,removedNodes:r}=e;for(var n of t)if(n===a||n.contains(a))return!0;for(var o of r)if(o===a||o.contains(a))return!0}));return!(!o||o===t)&&J(e,o,r)},Q=parseInt(d.version.split(".")[0],10)>=17,Z="undefined"!==typeof navigator&&"undefined"!==typeof window&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,G="undefined"!==typeof navigator&&/Mac OS X/.test(navigator.userAgent),ee="undefined"!==typeof navigator&&/Android/.test(navigator.userAgent),te="undefined"!==typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),re="undefined"!==typeof navigator&&/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),ae="undefined"!==typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),ne="undefined"!==typeof navigator&&/Chrome/i.test(navigator.userAgent),oe="undefined"!==typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),ie="undefined"!==typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),se="undefined"!==typeof navigator&&/.*QQBrowser/.test(navigator.userAgent),le="undefined"!==typeof navigator&&/.*UCBrowser/.test(navigator.userAgent),de="undefined"!==typeof navigator&&/.*Wechat/.test(navigator.userAgent),ce=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),ue=!oe&&!ae&&"undefined"!==typeof globalThis&&globalThis.InputEvent&&"function"===typeof globalThis.InputEvent.prototype.getTargetRanges,fe={isComposing:e=>!!S.get(e),getWindow(e){var t=b.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},findKey(e,t){var r=C.get(t);return r||(r=new m,C.set(t,r)),r},findPath(e,t){for(var r=[],a=t;;){var n=M.get(a);if(null==n){if(u.ML.isEditor(a))return r;break}var o=w.get(a);if(null==o)break;r.unshift(o),a=n}throw new Error("Unable to find the path for Slate node: ".concat(u.o4.stringify(t)))},findDocumentOrShadowRoot(e){var t=fe.toDOMNode(e,e),r=t.getRootNode();return(r instanceof Document||r instanceof ShadowRoot)&&null!=r.getSelection?r:t.ownerDocument},isFocused:e=>!!O.get(e),isReadOnly:e=>!!E.get(e),blur(e){var t=fe.toDOMNode(e,e),r=fe.findDocumentOrShadowRoot(e);O.set(e,!1),r.activeElement===t&&t.blur()},focus(e){var t=fe.toDOMNode(e,e),r=fe.findDocumentOrShadowRoot(e);O.set(e,!0),r.activeElement!==t&&t.focus({preventScroll:!0})},deselect(e){fe.toDOMNode(e,e);var{selection:t}=e,r=fe.findDocumentOrShadowRoot(e).getSelection();r&&r.rangeCount>0&&r.removeAllRanges(),t&&u.YR.deselect(e)},hasDOMNode(e,t){var r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{editable:n=!1}=a,o=fe.toDOMNode(e,e);try{r=U(t)?t:t.parentElement}catch(i){if(!i.message.includes('Permission denied to access property "nodeType"'))throw i}return!!r&&(r.closest("[data-slate-editor]")===o&&(!(n&&!r.isContentEditable)||("boolean"===typeof r.isContentEditable&&r.closest('[contenteditable="false"]')===o||!!r.getAttribute("data-slate-zero-width"))))},insertData(e,t){e.insertData(t)},insertFragmentData:(e,t)=>e.insertFragmentData(t),insertTextData:(e,t)=>e.insertTextData(t),setFragmentData(e,t,r){e.setFragmentData(t,r)},toDOMNode(e,t){var r=D.get(e),a=u.ML.isEditor(t)?x.get(e):null===r||void 0===r?void 0:r.get(fe.findKey(e,t));if(!a)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(u.o4.stringify(t)));return a},toDOMPoint(e,t){var r,[a]=u.ML.node(e,t.path),n=fe.toDOMNode(e,a);u.ML.void(e,{at:t})&&(t={path:t.path,offset:0});for(var o=Array.from(n.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),i=0,s=0;s{var[t,r]=e;if(U(t)&&t.childNodes.length){var a=r===t.childNodes.length,n=a?r-1:r;for([t,n]=V(t,n,a?"backward":"forward"),a=n{ee&&!a&&e.hasAttribute("data-slate-zero-width")&&e.textContent.length>0&&"\ufeff"!==e.textContext?e.textContent.startsWith("\ufeff")&&(e.textContent=e.textContent.slice(1)):e.parentNode.removeChild(e)})),d=M.textContent.length,m=l}}else if(p){for(var b=p.querySelectorAll("[data-slate-leaf]"),x=0;x{d-=e.textContent.length}))):d=1}m&&d===m.textContent.length&&ee&&"z"===m.getAttribute("data-slate-zero-width")&&null!==(c=m.textContent)&&void 0!==c&&c.startsWith("\ufeff")&&(s.hasAttribute("data-slate-zero-width")||te&&null!==(f=m.textContent)&&void 0!==f&&f.endsWith("\n\n"))&&d--}if(ee&&!l&&!a){var y=s.hasAttribute("data-slate-node")?s:s.closest("[data-slate-node]");if(y&&fe.hasDOMNode(e,y,{editable:!0})){var L=fe.toSlateNode(e,y),{path:C,offset:D}=u.ML.start(e,fe.findPath(e,L));return y.querySelector("[data-slate-leaf]")||(D=i),{path:C,offset:D}}}if(!l){if(n)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var E=fe.toSlateNode(e,l);return{path:fe.findPath(e,E),offset:d}},toSlateRange(e,t,r){var a,n,o,i,s,{exactMatch:l,suppressThrow:d}=r;if((_(t)?t.anchorNode:t.startContainer)&&(_(t)?(a=t.anchorNode,n=t.anchorOffset,o=t.focusNode,i=t.focusOffset,s=ne&&window.document.activeElement&&window.document.activeElement.shadowRoot?t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:t.isCollapsed):(a=t.startContainer,n=t.startOffset,o=t.endContainer,i=t.endOffset,s=t.collapsed)),null==a||null==o||null==n||null==i)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));var c=fe.toSlatePoint(e,[a,n],{exactMatch:l,suppressThrow:d});if(!c)return null;var f=s?c:fe.toSlatePoint(e,[o,i],{exactMatch:l,suppressThrow:d});if(!f)return null;var v={anchor:c,focus:f};return u.e6.isExpanded(v)&&u.e6.isForward(v)&&U(o)&&u.ML.void(e,{at:v.focus,mode:"highest"})&&(v=u.ML.unhangRange(e,v,{voids:!0})),v},hasRange(e,t){var{anchor:r,focus:a}=t;return u.ML.hasPath(e,r.path)&&u.ML.hasPath(e,a.path)},androidScheduleFlush(e){var t;null===(t=P.get(e))||void 0===t||t()},androidPendingDiffs:e=>T.get(e)},ve=ce?d.useLayoutEffect:d.useEffect,he=["anchor","focus"],pe=["anchor","focus"],ge=(e,t)=>Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every((r=>t.hasOwnProperty(r)&&e[r]===t[r])),me=(e,t)=>{if(e.length!==t.length)return!1;for(var r=0;r{var{isLast:t,leaf:r,parent:a,text:n}=e,o=ke(),i=fe.findPath(o,n),s=u.y$.parent(i),l=!0===r[q];return o.isVoid(a)?d.createElement(be,{length:u.NB.string(a).length}):""!==r.text||a.children[a.children.length-1]!==n||o.isInline(a)||""!==u.ML.string(o,s)?""===r.text?d.createElement(be,{isMarkPlaceholder:l}):t&&"\n"===r.text.slice(-1)?d.createElement(Me,{isTrailing:!0,text:r.text}):d.createElement(Me,{text:r.text}):d.createElement(be,{isLineBreak:!0,isMarkPlaceholder:l})},Me=e=>{var{text:t,isTrailing:r=!1}=e,a=(0,d.useRef)(null),n=()=>"".concat(null!==t&&void 0!==t?t:"").concat(r?"\n":"");return ve((()=>{var e=n();a.current&&a.current.textContent!==e&&(a.current.textContent=e)})),a.current?d.createElement("span",{"data-slate-string":!0,ref:a}):d.createElement("span",{"data-slate-string":!0,ref:a},n())},be=e=>{var{length:t=0,isLineBreak:r=!1,isMarkPlaceholder:a=!1}=e,n={"data-slate-zero-width":r?"n":"z","data-slate-length":t};return a&&(n["data-slate-mark-placeholder"]=!0),d.createElement("span",Object.assign({},n),ee&&r?null:"\ufeff",r?d.createElement("br",null):null)},xe=(0,d.createContext)(null),ke=()=>{var e=(0,d.useContext)(xe);if(!e)throw new Error("The `useSlateStatic` hook must be used inside the component's context.");return e},ye=e=>{var{leaf:t,isLast:r,text:a,parent:n,renderPlaceholder:o,renderLeaf:i=(e=>d.createElement(Ce,Object.assign({},e)))}=e,s=(0,d.useRef)(null),l=ke();(0,d.useEffect)((()=>{var e=null===s||void 0===s?void 0:s.current,t=document.querySelector('[data-slate-editor="true"]');if(e&&t)return t.style.minHeight="".concat(e.clientHeight,"px"),k.set(l,e),()=>{t.style.minHeight="auto",k.delete(l)}}),[s,t]);var c=d.createElement(we,{isLast:r,leaf:t,parent:n,text:a});if(t[I]){var u={children:t.placeholder,attributes:{"data-slate-placeholder":!0,style:{position:"absolute",pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",textDecoration:"none"},contentEditable:!1,ref:s}};c=d.createElement(d.Fragment,null,o(u),c)}return i({attributes:{"data-slate-leaf":!0},children:c,leaf:t,text:a})},Le=d.memo(ye,((e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&u.xv.equals(t.leaf,e.leaf)&&t.leaf[I]===e.leaf[I])),Ce=e=>{var{attributes:t,children:r}=e;return d.createElement("span",Object.assign({},t),r)},De=e=>{for(var{decorations:t,isLast:r,parent:a,renderPlaceholder:n,renderLeaf:o,text:i}=e,s=ke(),l=(0,d.useRef)(null),c=u.xv.decorations(i,t),f=fe.findKey(s,i),v=[],h=0;h{var e=D.get(s);l.current?(null===e||void 0===e||e.set(f,l.current),L.set(i,l.current),y.set(l.current,i)):(null===e||void 0===e||e.delete(f),L.delete(i))})),d.createElement("span",{"data-slate-node":"text",ref:l},v)},Ee=d.memo(De,((e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.text===e.text&&me(t.decorations,e.decorations))),Oe=e=>{var{decorations:t,element:r,renderElement:a=(e=>d.createElement(Be,Object.assign({},e))),renderPlaceholder:o,renderLeaf:i,selection:s}=e,l=ke(),c=We(),f=l.isInline(r),v=fe.findKey(l,r),h=(0,d.useCallback)((e=>{var t=D.get(l);e?(null===t||void 0===t||t.set(v,e),L.set(r,e),y.set(e,r)):(null===t||void 0===t||t.delete(v),L.delete(r))}),[l,v,r]),p=Ne({decorations:t,node:r,renderElement:a,renderPlaceholder:o,renderLeaf:i,selection:s}),g={"data-slate-node":"element",ref:h};if(f&&(g["data-slate-inline"]=!0),!f&&u.ML.hasInlines(l,r)){var m=u.NB.string(r),b=n()(m);"rtl"===b&&(g.dir=b)}if(u.ML.isVoid(l,r)){g["data-slate-void"]=!0,!c&&f&&(g.contentEditable=!1);var x=f?"span":"div",[[k]]=u.NB.texts(r);p=d.createElement(x,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},d.createElement(Ee,{renderPlaceholder:o,decorations:[],isLast:!1,parent:r,text:k})),w.set(k,0),M.set(k,r)}return a({attributes:g,children:p,element:r})},Se=d.memo(Oe,((e,t)=>e.element===t.element&&e.renderElement===t.renderElement&&e.renderLeaf===t.renderLeaf&&me(e.decorations,t.decorations)&&(e.selection===t.selection||!!e.selection&&!!t.selection&&u.e6.equals(e.selection,t.selection)))),Be=e=>{var{attributes:t,children:r,element:a}=e,n=ke().isInline(a)?"span":"div";return d.createElement(n,Object.assign({},t,{style:{position:"relative"}}),r)},Fe=(0,d.createContext)((()=>[])),Pe=(0,d.createContext)(!1),Re=()=>(0,d.useContext)(Pe),Ne=e=>{for(var{decorations:t,node:r,renderElement:a,renderPlaceholder:n,renderLeaf:o,selection:i}=e,s=(0,d.useContext)(Fe),l=ke(),c=fe.findPath(l,r),f=[],v=u.W_.isElement(r)&&!l.isInline(r)&&u.ML.hasInlines(l,r),h=0;h(0,d.useContext)(Te),je=(0,d.createContext)(null),Ae={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",insertSoftBreak:"shift+enter",splitBlock:"enter",undo:"mod+z"},Ie={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},qe={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Ye=e=>{var t=Ae[e],r=Ie[e],a=qe[e],n=t&&(0,f.TB)(t),o=r&&(0,f.TB)(r),i=a&&(0,f.TB)(a);return e=>!(!n||!n(e))||(!!(G&&o&&o(e))||!(G||!i||!i(e)))},Ue={isBold:Ye("bold"),isCompose:Ye("compose"),isMoveBackward:Ye("moveBackward"),isMoveForward:Ye("moveForward"),isDeleteBackward:Ye("deleteBackward"),isDeleteForward:Ye("deleteForward"),isDeleteLineBackward:Ye("deleteLineBackward"),isDeleteLineForward:Ye("deleteLineForward"),isDeleteWordBackward:Ye("deleteWordBackward"),isDeleteWordForward:Ye("deleteWordForward"),isExtendBackward:Ye("extendBackward"),isExtendForward:Ye("extendForward"),isExtendLineBackward:Ye("extendLineBackward"),isExtendLineForward:Ye("extendLineForward"),isItalic:Ye("italic"),isMoveLineBackward:Ye("moveLineBackward"),isMoveLineForward:Ye("moveLineForward"),isMoveWordBackward:Ye("moveWordBackward"),isMoveWordForward:Ye("moveWordForward"),isRedo:Ye("redo"),isSoftBreak:Ye("insertSoftBreak"),isSplitBlock:Ye("splitBlock"),isTransposeCharacter:Ye("transposeCharacter"),isUndo:Ye("undo")},$e={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class _e extends d.Component{constructor(){super(...arguments),this.context=null,this.manager=null,this.mutationObserver=null}observe(){var e,{node:t}=this.props;if(!t.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");null===(e=this.mutationObserver)||void 0===e||e.observe(t.current,$e)}componentDidMount(){var{receivedUserInput:e}=this.props,t=this.context;this.manager=((e,t)=>{var r=[],a=()=>{r=[]};return{registerMutations:a=>{if(t.current){var n=a.filter((t=>J(e,t,a)));r.push(...n)}},restoreDOM:function(){r.reverse().forEach((e=>{"characterData"!==e.type?(e.removedNodes.forEach((t=>{e.target.insertBefore(t,e.nextSibling)})),e.addedNodes.forEach((t=>{e.target.removeChild(t)}))):e.target.textContent=e.oldValue})),a()},clear:a}})(t,e),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var e,t,r,a,n=null===(e=this.mutationObserver)||void 0===e?void 0:e.takeRecords();null!==n&&void 0!==n&&n.length&&(null===(a=this.manager)||void 0===a||a.registerMutations(n));return null===(t=this.mutationObserver)||void 0===t||t.disconnect(),null===(r=this.manager)||void 0===r||r.restoreDOM(),null}componentDidUpdate(){var e;null===(e=this.manager)||void 0===e||e.clear(),this.observe()}componentWillUnmount(){var e;null===(e=this.mutationObserver)||void 0===e||e.disconnect()}render(){return this.props.children}}_e.contextType=xe;var ze=ee?_e:e=>{var{children:t}=e;return d.createElement(d.Fragment,null,t)};function Ve(e,t){var{path:r,diff:a}=t;if(!u.ML.hasPath(e,r))return!1;var n=u.NB.get(e,r);if(!u.xv.isText(n))return!1;if(a.start!==n.text.length||0===a.text.length)return n.text.slice(a.start,a.start+a.text.length)===a.text;var o=u.y$.next(r);if(!u.ML.hasPath(e,o))return!1;var i=u.NB.get(e,o);return u.xv.isText(i)&&i.text.startsWith(a.text)}function Ke(e,t){var{start:r,end:a,text:n}=t,o=e.slice(r,a),i=function(e,t){for(var r=Math.min(e.length,t.length),a=0;a1?t-1:0),a=1;ae.slice(0,t.start)+t.text+e.slice(t.end)),e)}(e,t,r),i=Math.max(r.start+r.text.length,t.start+t.text.length+(t.start+t.text.length>r.start?r.text.length:0)-n),s=o.slice(a,i);return Ke(e,{start:a,end:Math.max(t.end,r.end-t.text.length+(t.end-t.start)),text:s})}function Xe(e){var{path:t,diff:r}=e;return{anchor:{path:t,offset:r.start},focus:{path:t,offset:r.end}}}function Je(e,t){var{path:r,offset:a}=t;if(!u.ML.hasPath(e,r))return null;var n=u.NB.get(e,r);if(!u.xv.isText(n))return null;var o=u.ML.above(e,{match:t=>u.ML.isBlock(e,t),at:r});if(!o)return null;for(;a>n.text.length;){var i=u.ML.next(e,{at:r,match:u.xv.isText});if(!i||!u.y$.isDescendant(i[1],o[1]))return null;a-=n.text.length,n=i[0],r=i[1]}return{path:r,offset:a}}function Qe(e,t){var r=Je(e,t.anchor);if(!r)return null;if(u.e6.isCollapsed(t))return{anchor:r,focus:r};var a=Je(e,t.focus);return a?{anchor:r,focus:a}:null}function Ze(e,t,r){var a=T.get(e),n=null===a||void 0===a?void 0:a.find((e=>{var{path:r}=e;return u.y$.equals(r,t.path)}));if(!n||t.offset<=n.diff.start)return u.E9.transform(t,r,{affinity:"backward"});var{diff:o}=n;if(t.offset<=o.start+o.text.length){var i={path:t.path,offset:o.start},s=u.E9.transform(i,r,{affinity:"backward"});return s?{path:s.path,offset:s.offset+t.offset-o.start}:null}var l={path:t.path,offset:t.offset-o.text.length+o.end-o.start},d=u.E9.transform(l,r,{affinity:"backward"});return d?"split_node"===r.type&&u.y$.equals(r.path,t.path)&&l.offset{var e=j.get(t);if(j.delete(t),e){var{selection:r}=t,a=Qe(t,e);!a||r&&u.e6.equals(a,r)||u.YR.select(t,a)}},f=()=>{var e;if(i&&(clearTimeout(i),i=null),s&&(clearTimeout(s),s=null),m()||g()){n||(n=!0,setTimeout((()=>n=!1))),g()&&(n="action");var o=t.selection&&u.ML.rangeRef(t,t.selection,{affinity:"forward"});N.set(t,t.marks),W.get(t),T.get(t);for(var l,f=!(null===(e=T.get(t))||void 0===e||!e.length);l=null===(v=T.get(t))||void 0===v?void 0:v[0];){var v,h,p=R.get(t);void 0!==p&&(R.delete(t),t.marks=p),p&&!1===d&&(d=null);var w=Xe(l);t.selection&&u.e6.equals(t.selection,w)||u.YR.select(t,w),l.diff.text?u.ML.insertText(t,l.diff.text):u.ML.deleteFragment(t),T.set(t,null===(h=T.get(t))||void 0===h?void 0:h.filter((e=>{var{id:t}=e;return t!==l.id}))),Ve(t,l)||(f=!1,W.delete(t),N.delete(t),n="action",j.delete(t),r.cancel(),a.cancel(),null===o||void 0===o||o.unref())}var M=null===o||void 0===o?void 0:o.unref();if(!M||j.get(t)||t.selection&&u.e6.equals(M,t.selection)||u.YR.select(t,M),g())(()=>{var e=W.get(t);if(W.delete(t),e){if(e.at){var r=u.E9.isPoint(e.at)?Je(t,e.at):Qe(t,e.at);if(!r)return;var a=u.ML.range(t,r);t.selection&&u.e6.equals(t.selection,a)||u.YR.select(t,r)}e.run()}})();else{f&&r(),r.flush(),a.flush(),c();var b=N.get(t);N.delete(t),void 0!==b&&(t.marks=b,t.onChange())}}else c()},v=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=k.get(t);r&&(m()||e?r.style.display="none":r.style.removeProperty("display"))},h=(e,r)=>{var a,n=null!==(a=T.get(t))&&void 0!==a?a:[];T.set(t,n);var o=u.NB.leaf(t,e),i=n.findIndex((t=>u.y$.equals(t.path,e)));if(i<0)return Ke(o.text,r)&&n.push({path:e,diff:r,id:l++}),void v();var s=He(o.text,n[i].diff,r);if(!s)return n.splice(i,1),void v();n[i]=tt(tt({},n[i]),{},{diff:s})},p=function(e){var{at:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};d=!1,j.delete(t),r.cancel(),a.cancel(),g()&&f(),W.set(t,{at:n,run:e}),s=setTimeout(f)},g=()=>!!W.get(t),m=()=>{var e;return!(null===(e=T.get(t))||void 0===e||!e.length)},w=()=>{g()||(s=setTimeout(f))};return{flush:f,scheduleFlush:w,hasPendingDiffs:m,hasPendingAction:g,hasPendingChanges:()=>g()||m(),isFlushing:()=>n,handleUserSelect:e=>{j.set(t,e),i&&(clearTimeout(i),i=null);var{selection:r}=t;if(e){var a=!r||!u.y$.equals(r.anchor.path,e.anchor.path),n=!r||!u.y$.equals(r.anchor.path.slice(0,-1),e.anchor.path.slice(0,-1));(a&&d||n)&&(d=!1),!a&&m()||(i=setTimeout(f,200))}},handleCompositionEnd:e=>{o&&clearTimeout(o),o=setTimeout((()=>{S.set(t,!1),f()}),25)},handleCompositionStart:e=>{S.set(t,!0),o&&(clearTimeout(o),o=null)},handleDOMBeforeInput:e=>{var r;i&&(clearTimeout(i),i=null);var{inputType:a}=e,n=null,o=e.dataTransfer||e.data||void 0;!1!==d&&"insertText"!==a&&"insertCompositionText"!==a&&(d=!1);var[s]=e.getTargetRanges();s&&(n=fe.toSlateRange(t,s,{exactMatch:!1,suppressThrow:!0}));var l=fe.getWindow(t).getSelection();if(!n&&l&&(s=l,n=fe.toSlateRange(t,l,{exactMatch:!1,suppressThrow:!0})),n=null!==(r=n)&&void 0!==r?r:t.selection){if(u.e6.isExpanded(n)&&a.startsWith("delete")){var[c,f]=u.e6.edges(n);if(u.NB.leaf(t,c.path).text.length===c.offset&&0===f.offset){var v=u.ML.next(t,{at:c.path,match:u.xv.isText});v&&u.y$.equals(v[1],f.path)&&(n={anchor:f,focus:f})}}if(u.e6.isExpanded(n)&&a.startsWith("delete")){if(u.y$.equals(n.anchor.path,n.focus.path)){var[g,m]=u.e6.edges(n);return h(n.anchor.path,{text:"",end:m.offset,start:g.offset})}var M=a.endsWith("Backward")?"backward":"forward";return p((()=>u.ML.deleteFragment(t,{direction:M})),{at:n})}switch(a){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return p((()=>u.ML.deleteFragment(t)),{at:n});case"deleteContent":case"deleteContentForward":var{anchor:b}=n;if(u.e6.isCollapsed(n)){var x=u.NB.leaf(t,b.path);if(b.offsetu.ML.deleteForward(t)),{at:n});case"deleteContentBackward":var k,{anchor:y}=n;return(_(s)?s.isCollapsed:!(null===(k=s)||void 0===k||!k.collapsed))&&u.e6.isCollapsed(n)&&y.offset>0?h(y.path,{text:"",start:y.offset-1,end:y.offset}):p((()=>u.ML.deleteBackward(t)),{at:n});case"deleteEntireSoftLine":return p((()=>{u.ML.deleteBackward(t,{unit:"line"}),u.ML.deleteForward(t,{unit:"line"})}),{at:n});case"deleteHardLineBackward":return p((()=>u.ML.deleteBackward(t,{unit:"block"})),{at:n});case"deleteSoftLineBackward":return p((()=>u.ML.deleteBackward(t,{unit:"line"})),{at:n});case"deleteHardLineForward":return p((()=>u.ML.deleteForward(t,{unit:"block"})),{at:n});case"deleteSoftLineForward":return p((()=>u.ML.deleteForward(t,{unit:"line"})),{at:n});case"deleteWordBackward":return p((()=>u.ML.deleteBackward(t,{unit:"word"})),{at:n});case"deleteWordForward":return p((()=>u.ML.deleteForward(t,{unit:"word"})),{at:n});case"insertLineBreak":return p((()=>u.ML.insertSoftBreak(t)),{at:n});case"insertParagraph":return p((()=>u.ML.insertBreak(t)),{at:n});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if("DataTransfer"===(null===o||void 0===o?void 0:o.constructor.name))return p((()=>fe.insertData(t,o)),{at:n});if("string"===typeof o&&o.includes("\n"))return p((()=>u.ML.insertSoftBreak(t)),{at:u.e6.end(n)});var L=null!==o&&void 0!==o?o:"";if(R.get(t)&&(L=L.replace("\ufeff","")),u.y$.equals(n.anchor.path,n.focus.path)){var[C,D]=u.e6.edges(n),E={start:C.offset,end:D.offset,text:L};if(L&&d&&"insertCompositionText"===a){var O=d.start+d.text.search(/\S|$/);E.start+E.text.search(/\S|$/)===O+1&&E.end===d.start+d.text.length?(E.start-=1,d=null,w()):d=!1}else d="insertText"===a&&(null===d?E:!(!d||!u.e6.isCollapsed(n)||d.end+d.text.length!==C.offset)&&tt(tt({},d),{},{text:d.text+L}));return void h(C.path,E)}return p((()=>u.ML.insertText(t,L)),{at:n})}}},handleKeyDown:e=>{m()||(v(!0),setTimeout(v))},handleDomMutations:e=>{var r;m()||g()||e.some((r=>J(t,r,e)))&&(null===(r=A.get(t))||void 0===r||r())},handleInput:()=>{!g()&&m()||f()}}}var at=["node"];function nt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}var ot={subtree:!0,childList:!0,characterData:!0};function it(e){var{node:t}=e,r=p(e,at);if(!ee)return null;var a=ke(),n=function(){var e=(0,d.useRef)(!1);return(0,d.useEffect)((()=>(e.current=!0,()=>{e.current=!1})),[]),e.current}(),[o]=(0,d.useState)((()=>rt(function(e){for(var t=1;tnew MutationObserver(t)));ve((()=>{a.takeRecords()})),(0,d.useEffect)((()=>{if(!e.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");return a.observe(e.current,r),()=>a.disconnect()}),[])}(t,o.handleDomMutations,ot),P.set(a,o.scheduleFlush),n&&o.flush(),o}var st=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as"],lt=["text"],dt=["text"];function ct(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function ut(e){for(var t=1;td.createElement(d.Fragment,null,Ne(e)),vt=e=>{var{autoFocus:t,decorate:r=pt,onDOMBeforeInput:a,placeholder:o,readOnly:s=!1,renderElement:c,renderLeaf:f,renderPlaceholder:v=(e=>d.createElement(ht,Object.assign({},e))),scrollSelectionIntoView:h=gt,style:g={},as:m="div"}=e,w=p(e,st),M=(()=>{var e=(0,d.useContext)(je);if(!e)throw new Error("The `useSlate` hook must be used inside the component's context.");var{editor:t}=e;return t})(),[k,C]=(0,d.useState)(!1),D=(0,d.useRef)(null),F=(0,d.useRef)([]),{onUserInput:P,receivedUserInput:T}=function(){var e=ke(),t=(0,d.useRef)(!1),r=(0,d.useRef)(0),a=(0,d.useCallback)((()=>{if(!t.current){t.current=!0;var a=fe.getWindow(e);a.cancelAnimationFrame(r.current),r.current=a.requestAnimationFrame((()=>{t.current=!1}))}}),[]);return(0,d.useEffect)((()=>()=>cancelAnimationFrame(r.current)),[]),{receivedUserInput:t,onUserInput:a}}(),[,W]=(0,d.useReducer)((e=>e+1),0);A.set(M,W),E.set(M,s);var j=(0,d.useMemo)((()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1})),[]);(0,d.useEffect)((()=>{D.current&&t&&D.current.focus()}),[t]);var _=(0,d.useCallback)(l()((()=>{if((ee||!fe.isComposing(M))&&(!j.isUpdatingSelection||null!==V&&void 0!==V&&V.isFlushing())&&!j.isDraggingInternally){var e=fe.findDocumentOrShadowRoot(M),{activeElement:t}=e,r=fe.toDOMNode(M,M),a=e.getSelection();if(t===r?(j.latestElement=t,O.set(M,!0)):O.delete(M),!a)return u.YR.deselect(M);var{anchorNode:n,focusNode:o}=a,i=wt(M,n)||Mt(M,n),l=wt(M,o)||Mt(M,o);if(i&&l){var d=fe.toSlateRange(M,a,{exactMatch:!1,suppressThrow:!0});d&&(fe.isComposing(M)||null!==V&&void 0!==V&&V.hasPendingChanges()||null!==V&&void 0!==V&&V.isFlushing()?null===V||void 0===V||V.handleUserSelect(d):u.YR.select(M,d))}!s||i&&l||u.YR.deselect(M)}}),100),[s]),z=(0,d.useMemo)((()=>i()(_,0)),[_]),V=it({node:D,onDOMSelectionChange:_,scheduleOnDOMSelectionChange:z});ve((()=>{var e;D.current&&(e=Y(D.current))?(b.set(M,e),x.set(M,D.current),L.set(M,D.current),y.set(D.current,M)):L.delete(M);var{selection:t}=M,r=fe.findDocumentOrShadowRoot(M).getSelection();if(r&&fe.isFocused(M)&&(null===V||void 0===V||!V.hasPendingAction())){var a=e=>{var a="None"!==r.type;if(t||a){var n=x.get(M),o=!1;if(n.contains(r.anchorNode)&&n.contains(r.focusNode)&&(o=!0),a&&o&&t&&!e){var i=fe.toSlateRange(M,r,{exactMatch:!0,suppressThrow:!0});if(i&&u.e6.equals(i,t)){var s;if(!j.hasMarkPlaceholder)return;var{anchorNode:l}=r;if(null!==l&&void 0!==l&&null!==(s=l.parentElement)&&void 0!==s&&s.hasAttribute("data-slate-mark-placeholder"))return}}if(!t||fe.hasRange(M,t)){j.isUpdatingSelection=!0;var d=t&&fe.toDOMRange(M,t);return d?(u.e6.isBackward(t)?r.setBaseAndExtent(d.endContainer,d.endOffset,d.startContainer,d.startOffset):r.setBaseAndExtent(d.startContainer,d.startOffset,d.endContainer,d.endOffset),h(M,d)):r.removeAllRanges(),d}M.selection=fe.toSlateRange(M,r,{exactMatch:!1,suppressThrow:!0})}},n=a(),o="action"===(null===V||void 0===V?void 0:V.isFlushing());if(ee&&o){var i=null,s=requestAnimationFrame((()=>{if(o){var e=e=>{try{fe.toDOMNode(M,M).focus(),a(e)}catch(t){}};e(),i=setTimeout((()=>{e(!0),j.isUpdatingSelection=!1}))}}));return()=>{cancelAnimationFrame(s),i&&clearTimeout(i)}}setTimeout((()=>{n&&te&&fe.toDOMNode(M,M).focus();j.isUpdatingSelection=!1}))}}));var K=(0,d.useCallback)((e=>{if(P(),!s&&wt(M,e.target)&&!xt(e,a)){var t;if(V)return V.handleDOMBeforeInput(e);z.flush(),_.flush();var{selection:r}=M,{inputType:n}=e,o=e.dataTransfer||e.data||void 0,i="insertCompositionText"===n||"deleteCompositionText"===n;if(i&&fe.isComposing(M))return;var l=!1;if("insertText"===n&&r&&u.e6.isCollapsed(r)&&e.data&&1===e.data.length&&/[a-z ]/i.test(e.data)&&0!==r.anchor.offset){var d,c;l=!0,M.marks&&(l=!1);var{anchor:f}=r,[v,h]=fe.toDOMPoint(M,f),p=null===(d=v.parentElement)||void 0===d?void 0:d.closest("a"),g=fe.getWindow(M);if(l&&p&&fe.hasDOMNode(M,p)){var m,w=null===g||void 0===g?void 0:g.document.createTreeWalker(p,NodeFilter.SHOW_TEXT).lastChild();w===v&&(null===(m=w.textContent)||void 0===m?void 0:m.length)===h&&(l=!1)}if(l&&v.parentElement&&"pre"===(null===g||void 0===g||null===(c=g.getComputedStyle(v.parentElement))||void 0===c?void 0:c.whiteSpace)){var b=u.ML.above(M,{at:f.path,match:e=>u.ML.isBlock(M,e)});b&&u.NB.string(b[0]).includes("\t")&&(l=!1)}}if(!n.startsWith("delete")||n.startsWith("deleteBy")){var[x]=e.getTargetRanges();if(x){var k=fe.toSlateRange(M,x,{exactMatch:!1,suppressThrow:!1});if(!r||!u.e6.equals(r,k)){l=!1;var y=!i&&M.selection&&u.ML.rangeRef(M,M.selection);u.YR.select(M,k),y&&B.set(M,y)}}}if(i)return;if(l||e.preventDefault(),r&&u.e6.isExpanded(r)&&n.startsWith("delete")){var L=n.endsWith("Backward")?"backward":"forward";return void u.ML.deleteFragment(M,{direction:L})}switch(n){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":u.ML.deleteFragment(M);break;case"deleteContent":case"deleteContentForward":u.ML.deleteForward(M);break;case"deleteContentBackward":u.ML.deleteBackward(M);break;case"deleteEntireSoftLine":u.ML.deleteBackward(M,{unit:"line"}),u.ML.deleteForward(M,{unit:"line"});break;case"deleteHardLineBackward":u.ML.deleteBackward(M,{unit:"block"});break;case"deleteSoftLineBackward":u.ML.deleteBackward(M,{unit:"line"});break;case"deleteHardLineForward":u.ML.deleteForward(M,{unit:"block"});break;case"deleteSoftLineForward":u.ML.deleteForward(M,{unit:"line"});break;case"deleteWordBackward":u.ML.deleteBackward(M,{unit:"word"});break;case"deleteWordForward":u.ML.deleteForward(M,{unit:"word"});break;case"insertLineBreak":u.ML.insertSoftBreak(M);break;case"insertParagraph":u.ML.insertBreak(M);break;case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":var{selection:D}=M;D&&u.e6.isExpanded(D)&&u.ML.deleteFragment(M),"insertFromComposition"===n&&fe.isComposing(M)&&(C(!1),S.set(M,!1)),"DataTransfer"===(null===o||void 0===o?void 0:o.constructor.name)?fe.insertData(M,o):"string"===typeof o&&(l?F.current.push((()=>u.ML.insertText(M,o))):u.ML.insertText(M,o))}var E=null===(t=B.get(M))||void 0===t?void 0:t.unref();B.delete(M),!E||M.selection&&u.e6.equals(M.selection,E)||u.YR.select(M,E)}}),[s,a]);ve((()=>(D.current&&ue&&D.current.addEventListener("beforeinput",K),()=>{D.current&&ue&&D.current.removeEventListener("beforeinput",K)})),[K]),ve((()=>{var e=fe.getWindow(M);return e.document.addEventListener("selectionchange",z),()=>{e.document.removeEventListener("selectionchange",z)}}),[z]);var H=r([M,[]]);if(o&&1===M.children.length&&1===Array.from(u.NB.texts(M)).length&&""===u.NB.string(M)&&!k){var X=u.ML.start(M,[]);H.push({[I]:!0,placeholder:o,anchor:X,focus:X})}var{marks:J}=M;if(j.hasMarkPlaceholder=!1,M.selection&&u.e6.isCollapsed(M.selection)&&J){var{anchor:Q}=M.selection,G=p(u.NB.leaf(M,Q.path),lt);if(!u.xv.equals(G,J,{loose:!0})){j.hasMarkPlaceholder=!0;var ae=Object.fromEntries(Object.keys(G).map((e=>[e,null])));H.push(ut(ut(ut({[q]:!0},ae),J),{},{anchor:Q,focus:Q}))}}return(0,d.useEffect)((()=>{setTimeout((()=>{var{selection:e}=M;if(e){var{anchor:t}=e,r=p(u.NB.leaf(M,t.path),dt);if(!u.xv.equals(r,J,{loose:!0}))return void R.set(M,J)}R.delete(M)}))})),d.createElement(Te.Provider,{value:s},d.createElement(Fe.Provider,{value:r},d.createElement(ze,{node:D,receivedUserInput:T},d.createElement(m,Object.assign({role:s?void 0:"textbox","aria-multiline":!s||void 0},w,{spellCheck:!(!ue&&ce)&&w.spellCheck,autoCorrect:ue||!ce?w.autoCorrect:"false",autoCapitalize:ue||!ce?w.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!s,zindex:-1,suppressContentEditableWarning:!0,ref:D,style:ut({position:"relative",outline:"none",whiteSpace:"pre-wrap",wordWrap:"break-word"},g),onBeforeInput:(0,d.useCallback)((e=>{if(!ue&&!s&&!bt(e,w.onBeforeInput)&&wt(M,e.target)&&(e.preventDefault(),!fe.isComposing(M))){var t=e.data;u.ML.insertText(M,t)}}),[s]),onInput:(0,d.useCallback)((e=>{if(V)V.handleInput();else{for(var t of F.current)t();F.current=[]}}),[]),onBlur:(0,d.useCallback)((e=>{if(!s&&!j.isUpdatingSelection&&wt(M,e.target)&&!bt(e,w.onBlur)){var t=fe.findDocumentOrShadowRoot(M);if(j.latestElement!==t.activeElement){var{relatedTarget:r}=e;if(r!==fe.toDOMNode(M,M)&&(!U(r)||!r.hasAttribute("data-slate-spacer"))){if(null!=r&&$(r)&&fe.hasDOMNode(M,r)){var a=fe.toSlateNode(M,r);if(u.W_.isElement(a)&&!M.isVoid(a))return}if(re){var n=t.getSelection();null===n||void 0===n||n.removeAllRanges()}O.delete(M)}}}}),[s,w.onBlur]),onClick:(0,d.useCallback)((e=>{if(mt(M,e.target)&&!bt(e,w.onClick)&&$(e.target)){var t=fe.toSlateNode(M,e.target),r=fe.findPath(M,t);if(!u.ML.hasPath(M,r)||u.NB.get(M,r)!==t)return;if(3===e.detail&&r.length>=1){var a=r;if(!u.ML.isBlock(M,t)){var n,o=u.ML.above(M,{match:e=>u.ML.isBlock(M,e),at:r});a=null!==(n=null===o||void 0===o?void 0:o[1])&&void 0!==n?n:r.slice(0,1)}var i=u.ML.range(M,a);return void u.YR.select(M,i)}if(s)return;var l=u.ML.start(M,r),d=u.ML.end(M,r),c=u.ML.void(M,{at:l}),f=u.ML.void(M,{at:d});if(c&&f&&u.y$.equals(c[1],f[1])){var v=u.ML.range(M,l);u.YR.select(M,v)}}}),[s,w.onClick]),onCompositionEnd:(0,d.useCallback)((e=>{if(wt(M,e.target)){if(fe.isComposing(M)&&(C(!1),S.set(M,!1)),null===V||void 0===V||V.handleCompositionEnd(e),bt(e,w.onCompositionEnd)||ee)return;if(!re&&!ie&&!Z&&!se&&!de&&!le&&e.data){var t=R.get(M);R.delete(M),void 0!==t&&(N.set(M,M.marks),M.marks=t),u.ML.insertText(M,e.data);var r=N.get(M);N.delete(M),void 0!==r&&(M.marks=r)}}}),[w.onCompositionEnd]),onCompositionUpdate:(0,d.useCallback)((e=>{wt(M,e.target)&&!bt(e,w.onCompositionUpdate)&&(fe.isComposing(M)||(C(!0),S.set(M,!0)))}),[w.onCompositionUpdate]),onCompositionStart:(0,d.useCallback)((e=>{if(wt(M,e.target)){if(null===V||void 0===V||V.handleCompositionStart(e),bt(e,w.onCompositionStart)||ee)return;C(!0);var{selection:t}=M;if(t){if(u.e6.isExpanded(t))return void u.ML.deleteFragment(M);var r=u.ML.above(M,{match:e=>u.ML.isInline(M,e),mode:"highest"});if(r){var[,a]=r;if(u.ML.isEnd(M,t.anchor,a)){var n=u.ML.after(M,a);u.YR.setSelection(M,{anchor:n,focus:n})}}}}}),[w.onCompositionStart]),onCopy:(0,d.useCallback)((e=>{wt(M,e.target)&&!bt(e,w.onCopy)&&(e.preventDefault(),fe.setFragmentData(M,e.clipboardData,"copy"))}),[w.onCopy]),onCut:(0,d.useCallback)((e=>{if(!s&&wt(M,e.target)&&!bt(e,w.onCut)){e.preventDefault(),fe.setFragmentData(M,e.clipboardData,"cut");var{selection:t}=M;if(t)if(u.e6.isExpanded(t))u.ML.deleteFragment(M);else{var r=u.NB.parent(M,t.anchor.path);u.ML.isVoid(M,r)&&u.YR.delete(M)}}}),[s,w.onCut]),onDragOver:(0,d.useCallback)((e=>{if(mt(M,e.target)&&!bt(e,w.onDragOver)){var t=fe.toSlateNode(M,e.target);u.ML.isVoid(M,t)&&e.preventDefault()}}),[w.onDragOver]),onDragStart:(0,d.useCallback)((e=>{if(!s&&mt(M,e.target)&&!bt(e,w.onDragStart)){var t=fe.toSlateNode(M,e.target),r=fe.findPath(M,t);if(u.ML.isVoid(M,t)||u.ML.void(M,{at:r,voids:!0})){var a=u.ML.range(M,r);u.YR.select(M,a)}j.isDraggingInternally=!0,fe.setFragmentData(M,e.dataTransfer,"drag")}}),[s,w.onDragStart]),onDrop:(0,d.useCallback)((e=>{if(!s&&mt(M,e.target)&&!bt(e,w.onDrop)){e.preventDefault();var t=M.selection,r=fe.findEventRange(M,e),a=e.dataTransfer;u.YR.select(M,r),j.isDraggingInternally&&(!t||u.e6.equals(t,r)||u.ML.void(M,{at:r,voids:!0})||u.YR.delete(M,{at:t})),fe.insertData(M,a),fe.isFocused(M)||fe.focus(M)}j.isDraggingInternally=!1}),[s,w.onDrop]),onDragEnd:(0,d.useCallback)((e=>{!s&&j.isDraggingInternally&&w.onDragEnd&&mt(M,e.target)&&w.onDragEnd(e),j.isDraggingInternally=!1}),[s,w.onDragEnd]),onFocus:(0,d.useCallback)((e=>{if(!s&&!j.isUpdatingSelection&&wt(M,e.target)&&!bt(e,w.onFocus)){var t=fe.toDOMNode(M,M),r=fe.findDocumentOrShadowRoot(M);if(j.latestElement=r.activeElement,te&&e.target!==t)return void t.focus();O.set(M,!0)}}),[s,w.onFocus]),onKeyDown:(0,d.useCallback)((e=>{if(!s&&wt(M,e.target)){null===V||void 0===V||V.handleKeyDown(e);var{nativeEvent:t}=e;if(fe.isComposing(M)&&!1===t.isComposing&&(S.set(M,!1),C(!1)),bt(e,w.onKeyDown)||fe.isComposing(M))return;var{selection:r}=M,a=M.children[null!==r?r.focus.path[0]:0],o="rtl"===n()(u.NB.string(a));if(Ue.isRedo(t)){e.preventDefault();var i=M;return void("function"===typeof i.redo&&i.redo())}if(Ue.isUndo(t)){e.preventDefault();var l=M;return void("function"===typeof l.undo&&l.undo())}if(Ue.isMoveLineBackward(t))return e.preventDefault(),void u.YR.move(M,{unit:"line",reverse:!0});if(Ue.isMoveLineForward(t))return e.preventDefault(),void u.YR.move(M,{unit:"line"});if(Ue.isExtendLineBackward(t))return e.preventDefault(),void u.YR.move(M,{unit:"line",edge:"focus",reverse:!0});if(Ue.isExtendLineForward(t))return e.preventDefault(),void u.YR.move(M,{unit:"line",edge:"focus"});if(Ue.isMoveBackward(t))return e.preventDefault(),void(r&&u.e6.isCollapsed(r)?u.YR.move(M,{reverse:!o}):u.YR.collapse(M,{edge:"start"}));if(Ue.isMoveForward(t))return e.preventDefault(),void(r&&u.e6.isCollapsed(r)?u.YR.move(M,{reverse:o}):u.YR.collapse(M,{edge:"end"}));if(Ue.isMoveWordBackward(t))return e.preventDefault(),r&&u.e6.isExpanded(r)&&u.YR.collapse(M,{edge:"focus"}),void u.YR.move(M,{unit:"word",reverse:!o});if(Ue.isMoveWordForward(t))return e.preventDefault(),r&&u.e6.isExpanded(r)&&u.YR.collapse(M,{edge:"focus"}),void u.YR.move(M,{unit:"word",reverse:o});if(ue){if((ne||re)&&r&&(Ue.isDeleteBackward(t)||Ue.isDeleteForward(t))&&u.e6.isCollapsed(r)){var d=u.NB.parent(M,r.anchor.path);if(u.W_.isElement(d)&&u.ML.isVoid(M,d)&&u.ML.isInline(M,d))return e.preventDefault(),void u.ML.deleteBackward(M,{unit:"block"})}}else{if(Ue.isBold(t)||Ue.isItalic(t)||Ue.isTransposeCharacter(t))return void e.preventDefault();if(Ue.isSoftBreak(t))return e.preventDefault(),void u.ML.insertSoftBreak(M);if(Ue.isSplitBlock(t))return e.preventDefault(),void u.ML.insertBreak(M);if(Ue.isDeleteBackward(t))return e.preventDefault(),void(r&&u.e6.isExpanded(r)?u.ML.deleteFragment(M,{direction:"backward"}):u.ML.deleteBackward(M));if(Ue.isDeleteForward(t))return e.preventDefault(),void(r&&u.e6.isExpanded(r)?u.ML.deleteFragment(M,{direction:"forward"}):u.ML.deleteForward(M));if(Ue.isDeleteLineBackward(t))return e.preventDefault(),void(r&&u.e6.isExpanded(r)?u.ML.deleteFragment(M,{direction:"backward"}):u.ML.deleteBackward(M,{unit:"line"}));if(Ue.isDeleteLineForward(t))return e.preventDefault(),void(r&&u.e6.isExpanded(r)?u.ML.deleteFragment(M,{direction:"forward"}):u.ML.deleteForward(M,{unit:"line"}));if(Ue.isDeleteWordBackward(t))return e.preventDefault(),void(r&&u.e6.isExpanded(r)?u.ML.deleteFragment(M,{direction:"backward"}):u.ML.deleteBackward(M,{unit:"word"}));if(Ue.isDeleteWordForward(t))return e.preventDefault(),void(r&&u.e6.isExpanded(r)?u.ML.deleteFragment(M,{direction:"forward"}):u.ML.deleteForward(M,{unit:"word"}))}}}),[s,w.onKeyDown]),onPaste:(0,d.useCallback)((e=>{s||!wt(M,e.target)||bt(e,w.onPaste)||ue&&!(e=>e.clipboardData&&""!==e.clipboardData.getData("text/plain")&&1===e.clipboardData.types.length)(e.nativeEvent)||(e.preventDefault(),fe.insertData(M,e.clipboardData))}),[s,w.onPaste])}),d.createElement(ft,{decorations:H,node:M,renderElement:c,renderPlaceholder:v,renderLeaf:f,selection:M.selection})))))},ht=e=>{var{attributes:t,children:r}=e;return d.createElement("span",Object.assign({},t),r,ee&&d.createElement("br",null))},pt=()=>[],gt=(e,t)=>{if(!e.selection||e.selection&&u.e6.isCollapsed(e.selection)){var r=t.startContainer.parentElement;r.getBoundingClientRect=t.getBoundingClientRect.bind(t),(0,c.Z)(r,{scrollMode:"if-needed"}),delete r.getBoundingClientRect}},mt=(e,t)=>$(t)&&fe.hasDOMNode(e,t),wt=(e,t)=>$(t)&&fe.hasDOMNode(e,t,{editable:!0}),Mt=(e,t)=>{if(E.get(e))return!1;var r=mt(e,t)&&fe.toSlateNode(e,t);return u.ML.isVoid(e,r)},bt=(e,t)=>{if(!t)return!1;var r=t(e);return null!=r?r:e.isDefaultPrevented()||e.isPropagationStopped()},xt=(e,t)=>{if(!t)return!1;var r=t(e);return null!=r?r:e.defaultPrevented},kt=(0,d.createContext)(!1),yt=()=>(0,d.useContext)(kt);var Lt=(0,d.createContext)({});var Ct=["editor","children","onChange","value"],Dt=e=>{var{editor:t,children:r,onChange:a,value:n}=e,o=p(e,Ct),i=(0,d.useRef)(!1),[s,l]=d.useState((()=>{if(!u.NB.isNodeList(n))throw new Error("[Slate] value is invalid! Expected a list of elements"+"but got: ".concat(u.o4.stringify(n)));if(!u.ML.isEditor(t))throw new Error("[Slate] editor is invalid! you passed:"+"".concat(u.o4.stringify(t)));return t.children=n,Object.assign(t,o),{v:0,editor:t}})),{selectorContext:c,onChange:f}=function(e){var t=(0,d.useRef)([]).current,r=(0,d.useRef)({editor:e}).current,a=(0,d.useCallback)((e=>{r.editor=e,t.forEach((t=>t(e)))}),[]);return{selectorContext:(0,d.useMemo)((()=>({getSlate:()=>r.editor,addEventListener:e=>(t.push(e),()=>{t.splice(t.indexOf(e),1)})})),[t,r]),onChange:a}}(t),v=(0,d.useCallback)((()=>{a&&a(t.children),l((e=>({v:e.v+1,editor:t}))),f(t)}),[a]);F.set(t,v),(0,d.useEffect)((()=>()=>{F.set(t,(()=>{})),i.current=!0}),[]);var[h,g]=(0,d.useState)(fe.isFocused(t));return(0,d.useEffect)((()=>{g(fe.isFocused(t))})),ve((()=>{var e=()=>g(fe.isFocused(t));return Q?(document.addEventListener("focusin",e),document.addEventListener("focusout",e),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",e)}):(document.addEventListener("focus",e,!0),document.addEventListener("blur",e,!0),()=>{document.removeEventListener("focus",e,!0),document.removeEventListener("blur",e,!0)})}),[]),d.createElement(Lt.Provider,{value:c},d.createElement(je.Provider,{value:s},d.createElement(xe.Provider,{value:s.editor},d.createElement(kt.Provider,{value:h},r))))},Et=(e,t)=>{var r=(t.top+t.bottom)/2;return e.top<=r&&e.bottom>=r},Ot=(e,t,r)=>{var a=fe.toDOMRange(e,t).getBoundingClientRect(),n=fe.toDOMRange(e,r).getBoundingClientRect();return Et(a,n)&&Et(n,a)};function St(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function Bt(e){for(var t=1;t{var t=e,{apply:r,onChange:a,deleteBackward:n,addMark:o,removeMark:i}=t;return D.set(t,new WeakMap),t.addMark=(e,r)=>{var a,n;null===(a=P.get(t))||void 0===a||a(),!R.get(t)&&null!==(n=T.get(t))&&void 0!==n&&n.length&&R.set(t,null),N.delete(t),o(e,r)},t.removeMark=e=>{var r;!R.get(t)&&null!==(r=T.get(t))&&void 0!==r&&r.length&&R.set(t,null),N.delete(t),i(e)},t.deleteBackward=e=>{if("line"!==e)return n(e);if(t.selection&&u.e6.isCollapsed(t.selection)){var r=u.ML.above(t,{match:e=>u.ML.isBlock(t,e),at:t.selection});if(r){var[,a]=r,o=u.ML.range(t,a,t.selection.anchor),i=((e,t)=>{var r=u.ML.range(e,u.e6.end(t)),a=Array.from(u.ML.positions(e,{at:t})),n=0,o=a.length,i=Math.floor(o/2);if(Ot(e,u.ML.range(e,a[n]),r))return u.ML.range(e,a[n],r);if(a.length<2)return u.ML.range(e,a[a.length-1],r);for(;i!==a.length&&i!==n;)Ot(e,u.ML.range(e,a[i]),r)?o=i:n=i,i=Math.floor((n+o)/2);return u.ML.range(e,a[o],r)})(t,o);u.e6.isCollapsed(i)||u.YR.delete(t,{at:i})}}},t.apply=e=>{var a=[],n=T.get(t);if(null!==n&&void 0!==n&&n.length){var o=n.map((t=>function(e,t){var{path:r,diff:a,id:n}=e;switch(t.type){case"insert_text":return!u.y$.equals(t.path,r)||t.offset>=a.end?e:t.offset<=a.start?{diff:{start:t.text.length+a.start,end:t.text.length+a.end,text:a.text},id:n,path:r}:{diff:{start:a.start,end:a.end+t.text.length,text:a.text},id:n,path:r};case"remove_text":return!u.y$.equals(t.path,r)||t.offset>=a.end?e:t.offset+t.text.length<=a.start?{diff:{start:a.start-t.text.length,end:a.end-t.text.length,text:a.text},id:n,path:r}:{diff:{start:a.start,end:a.end-t.text.length,text:a.text},id:n,path:r};case"split_node":return!u.y$.equals(t.path,r)||t.position>=a.end?{diff:a,id:n,path:u.y$.transform(r,t,{affinity:"backward"})}:t.position>a.start?{diff:{start:a.start,end:Math.min(t.position,a.end),text:a.text},id:n,path:r}:{diff:{start:a.start-t.position,end:a.end-t.position,text:a.text},id:n,path:u.y$.transform(r,t,{affinity:"forward"})};case"merge_node":return u.y$.equals(t.path,r)?{diff:{start:a.start+t.position,end:a.end+t.position,text:a.text},id:n,path:u.y$.transform(r,t)}:{diff:a,id:n,path:u.y$.transform(r,t)}}var o=u.y$.transform(r,t);return o?{diff:a,path:o,id:n}:null}(t,e))).filter(Boolean);T.set(t,o)}var i=j.get(t);i&&j.set(t,Ge(t,i,e));var s=W.get(t);if(null!==s&&void 0!==s&&s.at){var l=u.E9.isPoint(null===s||void 0===s?void 0:s.at)?Ze(t,s.at,e):Ge(t,s.at,e);W.set(t,l?Bt(Bt({},s),{},{at:l}):null)}switch(e.type){case"insert_text":case"remove_text":case"set_node":case"split_node":a.push(...Pt(t,e.path));break;case"set_selection":var d;null===(d=B.get(t))||void 0===d||d.unref(),B.delete(t);break;case"insert_node":case"remove_node":a.push(...Pt(t,u.y$.parent(e.path)));break;case"merge_node":var c=u.y$.previous(e.path);a.push(...Pt(t,c));break;case"move_node":var f=u.y$.common(u.y$.parent(e.path),u.y$.parent(e.newPath));a.push(...Pt(t,f))}for(var[v,h]of(r(e),a)){var[p]=u.ML.node(t,v);C.set(p,h)}},t.setFragmentData=e=>{var{selection:r}=t;if(r){var[a,n]=u.e6.edges(r),o=u.ML.void(t,{at:a.path}),i=u.ML.void(t,{at:n.path});if(!u.e6.isCollapsed(r)||o){var s=fe.toDOMRange(t,r),l=s.cloneContents(),d=l.childNodes[0];if(l.childNodes.forEach((e=>{e.textContent&&""!==e.textContent.trim()&&(d=e)})),i){var[c]=i,f=s.cloneRange(),v=fe.toDOMNode(t,c);f.setEndAfter(v),l=f.cloneContents()}if(o&&(d=l.querySelector("[data-slate-spacer]")),Array.from(l.querySelectorAll("[data-slate-zero-width]")).forEach((e=>{var t="n"===e.getAttribute("data-slate-zero-width");e.textContent=t?"\n":""})),z(d)){var h=d.ownerDocument.createElement("span");h.style.whiteSpace="pre",h.appendChild(d),l.appendChild(h),d=h}var p=t.getFragment(),g=JSON.stringify(p),m=window.btoa(encodeURIComponent(g));d.setAttribute("data-slate-fragment",m),e.setData("application/x-slate-fragment",m);var w=l.ownerDocument.createElement("div");return w.appendChild(l),w.setAttribute("hidden","true"),l.ownerDocument.body.appendChild(w),e.setData("text/html",w.innerHTML),e.setData("text/plain",H(w)),l.ownerDocument.body.removeChild(w),e}}},t.insertData=e=>{t.insertFragmentData(e)||t.insertTextData(e)},t.insertFragmentData=e=>{var r=e.getData("application/x-slate-fragment")||(e=>{var t=e.getData("text/html"),[,r]=t.match(X)||[];return r})(e);if(r){var a=decodeURIComponent(window.atob(r)),n=JSON.parse(a);return t.insertFragment(n),!0}return!1},t.insertTextData=e=>{var r=e.getData("text/plain");if(r){var a=r.split(/\r\n|\r|\n/),n=!1;for(var o of a)n&&u.YR.splitNodes(t,{always:!0}),t.insertText(o),n=!0;return!0}return!1},t.onChange=()=>{v.unstable_batchedUpdates((()=>{var e=F.get(t);e&&e(),a()}))},t},Pt=(e,t)=>{var r=[];for(var[a,n]of u.ML.levels(e,{at:t})){var o=fe.findKey(e,a);r.push([n,o])}return r}}}]); \ No newline at end of file +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8700],{96391:function(e,t,r){r.d(t,{BU:function(){return St},CX:function(){return ft},F3:function(){return fe},UE:function(){return kt},mH:function(){return Ct},vt:function(){return Re}});var a=r(6907),n=r.n(a),o=r(23279),i=r.n(o),s=r(23493),l=r.n(s),d=r(67294),c=r(12615),u=r(77493),f=r(18156),v=r(73935);function h(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r,a,n={},o=Object.keys(e);for(a=0;a=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var g=0;class m{constructor(){this.id="".concat(g++)}}var w=new WeakMap,M=new WeakMap,b=new WeakMap,x=new WeakMap,k=new WeakMap,y=new WeakMap,L=new WeakMap,C=new WeakMap,D=new WeakMap,E=new WeakMap,O=new WeakMap,B=new WeakMap,S=new WeakMap,F=new WeakMap,P=new WeakMap,R=new WeakMap,N=new WeakMap,T=new WeakMap,W=new WeakMap,j=new WeakMap,A=new WeakMap,I=Symbol("placeholder"),q=Symbol("mark-placeholder"),Y=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,U=e=>$(e)&&1===e.nodeType,$=e=>{var t=Y(e);return!!t&&e instanceof t.Node},_=e=>{var t=e&&e.anchorNode&&Y(e.anchorNode);return!!t&&e instanceof t.Selection},z=e=>$(e)&&3===e.nodeType,V=(e,t,r)=>{for(var a,{childNodes:n}=e,o=n[t],i=t,s=!1,l=!1;($(a=o)&&8===a.nodeType||U(o)&&0===o.childNodes.length||U(o)&&"false"===o.getAttribute("contenteditable"))&&(!s||!l);)i>=n.length?(s=!0,i=t-1,r="backward"):i<0?(l=!0,i=t+1,r="forward"):(o=n[i],t=i,i+="forward"===r?1:-1);return[o,t]},K=(e,t,r)=>{var[a]=V(e,t,r);return a},H=e=>{var t="";if(z(e)&&e.nodeValue)return e.nodeValue;if(U(e)){for(var r of Array.from(e.childNodes))t+=H(r);var a=getComputedStyle(e).getPropertyValue("display");"block"!==a&&"list"!==a&&"BR"!==e.tagName||(t+="\n")}return t},X=/data-slate-fragment="(.+?)"/m,J=(e,t,r)=>{var{target:a}=t;if(U(a)&&a.matches('[contentEditable="false"]'))return!1;var{document:n}=fe.getWindow(e);if(n.contains(a))return fe.hasDOMNode(e,a,{editable:!0});var o=r.find((e=>{var{addedNodes:t,removedNodes:r}=e;for(var n of t)if(n===a||n.contains(a))return!0;for(var o of r)if(o===a||o.contains(a))return!0}));return!(!o||o===t)&&J(e,o,r)},Q=parseInt(d.version.split(".")[0],10)>=17,Z="undefined"!==typeof navigator&&"undefined"!==typeof window&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,G="undefined"!==typeof navigator&&/Mac OS X/.test(navigator.userAgent),ee="undefined"!==typeof navigator&&/Android/.test(navigator.userAgent),te="undefined"!==typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),re="undefined"!==typeof navigator&&/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),ae="undefined"!==typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),ne="undefined"!==typeof navigator&&/Chrome/i.test(navigator.userAgent),oe="undefined"!==typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),ie="undefined"!==typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),se="undefined"!==typeof navigator&&/.*QQBrowser/.test(navigator.userAgent),le="undefined"!==typeof navigator&&/.*UCBrowser/.test(navigator.userAgent),de="undefined"!==typeof navigator&&/.*Wechat/.test(navigator.userAgent),ce=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),ue=!oe&&!ae&&"undefined"!==typeof globalThis&&globalThis.InputEvent&&"function"===typeof globalThis.InputEvent.prototype.getTargetRanges,fe={isComposing:e=>!!B.get(e),getWindow(e){var t=b.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},findKey(e,t){var r=C.get(t);return r||(r=new m,C.set(t,r)),r},findPath(e,t){for(var r=[],a=t;;){var n=M.get(a);if(null==n){if(u.ML.isEditor(a))return r;break}var o=w.get(a);if(null==o)break;r.unshift(o),a=n}throw new Error("Unable to find the path for Slate node: ".concat(u.o4.stringify(t)))},findDocumentOrShadowRoot(e){var t=fe.toDOMNode(e,e),r=t.getRootNode();return(r instanceof Document||r instanceof ShadowRoot)&&null!=r.getSelection?r:t.ownerDocument},isFocused:e=>!!O.get(e),isReadOnly:e=>!!E.get(e),blur(e){var t=fe.toDOMNode(e,e),r=fe.findDocumentOrShadowRoot(e);O.set(e,!1),r.activeElement===t&&t.blur()},focus(e){var t=fe.toDOMNode(e,e),r=fe.findDocumentOrShadowRoot(e);O.set(e,!0),r.activeElement!==t&&t.focus({preventScroll:!0})},deselect(e){fe.toDOMNode(e,e);var{selection:t}=e,r=fe.findDocumentOrShadowRoot(e).getSelection();r&&r.rangeCount>0&&r.removeAllRanges(),t&&u.YR.deselect(e)},hasDOMNode(e,t){var r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{editable:n=!1}=a,o=fe.toDOMNode(e,e);try{r=U(t)?t:t.parentElement}catch(i){if(!i.message.includes('Permission denied to access property "nodeType"'))throw i}return!!r&&(r.closest("[data-slate-editor]")===o&&(!(n&&!r.isContentEditable)||("boolean"===typeof r.isContentEditable&&r.closest('[contenteditable="false"]')===o||!!r.getAttribute("data-slate-zero-width"))))},insertData(e,t){e.insertData(t)},insertFragmentData:(e,t)=>e.insertFragmentData(t),insertTextData:(e,t)=>e.insertTextData(t),setFragmentData(e,t,r){e.setFragmentData(t,r)},toDOMNode(e,t){var r=D.get(e),a=u.ML.isEditor(t)?x.get(e):null===r||void 0===r?void 0:r.get(fe.findKey(e,t));if(!a)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(u.o4.stringify(t)));return a},toDOMPoint(e,t){var r,[a]=u.ML.node(e,t.path),n=fe.toDOMNode(e,a);u.ML.void(e,{at:t})&&(t={path:t.path,offset:0});for(var o=Array.from(n.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),i=0,s=0;s{var[t,r]=e;if(U(t)&&t.childNodes.length){var a=r===t.childNodes.length,n=a?r-1:r;for([t,n]=V(t,n,a?"backward":"forward"),a=n{ee&&!a&&e.hasAttribute("data-slate-zero-width")&&e.textContent.length>0&&"\ufeff"!==e.textContext?e.textContent.startsWith("\ufeff")&&(e.textContent=e.textContent.slice(1)):e.parentNode.removeChild(e)})),d=M.textContent.length,m=l}}else if(p){for(var b=p.querySelectorAll("[data-slate-leaf]"),x=0;x{d-=e.textContent.length}))):d=1}m&&d===m.textContent.length&&ee&&"z"===m.getAttribute("data-slate-zero-width")&&null!==(c=m.textContent)&&void 0!==c&&c.startsWith("\ufeff")&&(s.hasAttribute("data-slate-zero-width")||te&&null!==(f=m.textContent)&&void 0!==f&&f.endsWith("\n\n"))&&d--}if(ee&&!l&&!a){var y=s.hasAttribute("data-slate-node")?s:s.closest("[data-slate-node]");if(y&&fe.hasDOMNode(e,y,{editable:!0})){var L=fe.toSlateNode(e,y),{path:C,offset:D}=u.ML.start(e,fe.findPath(e,L));return y.querySelector("[data-slate-leaf]")||(D=i),{path:C,offset:D}}}if(!l){if(n)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var E=fe.toSlateNode(e,l);return{path:fe.findPath(e,E),offset:d}},toSlateRange(e,t,r){var a,n,o,i,s,{exactMatch:l,suppressThrow:d}=r;if((_(t)?t.anchorNode:t.startContainer)&&(_(t)?(a=t.anchorNode,n=t.anchorOffset,o=t.focusNode,i=t.focusOffset,s=ne&&window.document.activeElement&&window.document.activeElement.shadowRoot?t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:t.isCollapsed):(a=t.startContainer,n=t.startOffset,o=t.endContainer,i=t.endOffset,s=t.collapsed)),null==a||null==o||null==n||null==i)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));var c=fe.toSlatePoint(e,[a,n],{exactMatch:l,suppressThrow:d});if(!c)return null;var f=s?c:fe.toSlatePoint(e,[o,i],{exactMatch:l,suppressThrow:d});if(!f)return null;var v={anchor:c,focus:f};return u.e6.isExpanded(v)&&u.e6.isForward(v)&&U(o)&&u.ML.void(e,{at:v.focus,mode:"highest"})&&(v=u.ML.unhangRange(e,v,{voids:!0})),v},hasRange(e,t){var{anchor:r,focus:a}=t;return u.ML.hasPath(e,r.path)&&u.ML.hasPath(e,a.path)},androidScheduleFlush(e){var t;null===(t=P.get(e))||void 0===t||t()},androidPendingDiffs:e=>T.get(e)},ve=ce?d.useLayoutEffect:d.useEffect,he=["anchor","focus"],pe=["anchor","focus"],ge=(e,t)=>Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every((r=>t.hasOwnProperty(r)&&e[r]===t[r])),me=(e,t)=>{if(e.length!==t.length)return!1;for(var r=0;r{var{isLast:t,leaf:r,parent:a,text:n}=e,o=ke(),i=fe.findPath(o,n),s=u.y$.parent(i),l=!0===r[q];return o.isVoid(a)?d.createElement(be,{length:u.NB.string(a).length}):""!==r.text||a.children[a.children.length-1]!==n||o.isInline(a)||""!==u.ML.string(o,s)?""===r.text?d.createElement(be,{isMarkPlaceholder:l}):t&&"\n"===r.text.slice(-1)?d.createElement(Me,{isTrailing:!0,text:r.text}):d.createElement(Me,{text:r.text}):d.createElement(be,{isLineBreak:!0,isMarkPlaceholder:l})},Me=e=>{var{text:t,isTrailing:r=!1}=e,a=(0,d.useRef)(null),n=()=>"".concat(null!==t&&void 0!==t?t:"").concat(r?"\n":"");return ve((()=>{var e=n();a.current&&a.current.textContent!==e&&(a.current.textContent=e)})),a.current?d.createElement("span",{"data-slate-string":!0,ref:a}):d.createElement("span",{"data-slate-string":!0,ref:a},n())},be=e=>{var{length:t=0,isLineBreak:r=!1,isMarkPlaceholder:a=!1}=e,n={"data-slate-zero-width":r?"n":"z","data-slate-length":t};return a&&(n["data-slate-mark-placeholder"]=!0),d.createElement("span",Object.assign({},n),ee&&r?null:"\ufeff",r?d.createElement("br",null):null)},xe=(0,d.createContext)(null),ke=()=>{var e=(0,d.useContext)(xe);if(!e)throw new Error("The `useSlateStatic` hook must be used inside the component's context.");return e},ye=e=>{var{leaf:t,isLast:r,text:a,parent:n,renderPlaceholder:o,renderLeaf:i=(e=>d.createElement(Ce,Object.assign({},e)))}=e,s=(0,d.useRef)(null),l=ke();(0,d.useEffect)((()=>{var e=null===s||void 0===s?void 0:s.current,t=document.querySelector('[data-slate-editor="true"]');if(e&&t)return t.style.minHeight="".concat(e.clientHeight,"px"),k.set(l,e),()=>{t.style.minHeight="auto",k.delete(l)}}),[s,t]);var c=d.createElement(we,{isLast:r,leaf:t,parent:n,text:a});if(t[I]){var u={children:t.placeholder,attributes:{"data-slate-placeholder":!0,style:{position:"absolute",pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",textDecoration:"none"},contentEditable:!1,ref:s}};c=d.createElement(d.Fragment,null,o(u),c)}return i({attributes:{"data-slate-leaf":!0},children:c,leaf:t,text:a})},Le=d.memo(ye,((e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&u.xv.equals(t.leaf,e.leaf)&&t.leaf[I]===e.leaf[I])),Ce=e=>{var{attributes:t,children:r}=e;return d.createElement("span",Object.assign({},t),r)},De=e=>{for(var{decorations:t,isLast:r,parent:a,renderPlaceholder:n,renderLeaf:o,text:i}=e,s=ke(),l=(0,d.useRef)(null),c=u.xv.decorations(i,t),f=fe.findKey(s,i),v=[],h=0;h{var e=D.get(s);l.current?(null===e||void 0===e||e.set(f,l.current),L.set(i,l.current),y.set(l.current,i)):(null===e||void 0===e||e.delete(f),L.delete(i))})),d.createElement("span",{"data-slate-node":"text",ref:l},v)},Ee=d.memo(De,((e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.text===e.text&&me(t.decorations,e.decorations))),Oe=e=>{var{decorations:t,element:r,renderElement:a=(e=>d.createElement(Se,Object.assign({},e))),renderPlaceholder:o,renderLeaf:i,selection:s}=e,l=ke(),c=We(),f=l.isInline(r),v=fe.findKey(l,r),h=(0,d.useCallback)((e=>{var t=D.get(l);e?(null===t||void 0===t||t.set(v,e),L.set(r,e),y.set(e,r)):(null===t||void 0===t||t.delete(v),L.delete(r))}),[l,v,r]),p=Ne({decorations:t,node:r,renderElement:a,renderPlaceholder:o,renderLeaf:i,selection:s}),g={"data-slate-node":"element",ref:h};if(f&&(g["data-slate-inline"]=!0),!f&&u.ML.hasInlines(l,r)){var m=u.NB.string(r),b=n()(m);"rtl"===b&&(g.dir=b)}if(u.ML.isVoid(l,r)){g["data-slate-void"]=!0,!c&&f&&(g.contentEditable=!1);var x=f?"span":"div",[[k]]=u.NB.texts(r);p=d.createElement(x,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},d.createElement(Ee,{renderPlaceholder:o,decorations:[],isLast:!1,parent:r,text:k})),w.set(k,0),M.set(k,r)}return a({attributes:g,children:p,element:r})},Be=d.memo(Oe,((e,t)=>e.element===t.element&&e.renderElement===t.renderElement&&e.renderLeaf===t.renderLeaf&&me(e.decorations,t.decorations)&&(e.selection===t.selection||!!e.selection&&!!t.selection&&u.e6.equals(e.selection,t.selection)))),Se=e=>{var{attributes:t,children:r,element:a}=e,n=ke().isInline(a)?"span":"div";return d.createElement(n,Object.assign({},t,{style:{position:"relative"}}),r)},Fe=(0,d.createContext)((()=>[])),Pe=(0,d.createContext)(!1),Re=()=>(0,d.useContext)(Pe),Ne=e=>{for(var{decorations:t,node:r,renderElement:a,renderPlaceholder:n,renderLeaf:o,selection:i}=e,s=(0,d.useContext)(Fe),l=ke(),c=fe.findPath(l,r),f=[],v=u.W_.isElement(r)&&!l.isInline(r)&&u.ML.hasInlines(l,r),h=0;h(0,d.useContext)(Te),je=(0,d.createContext)(null),Ae={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",insertSoftBreak:"shift+enter",splitBlock:"enter",undo:"mod+z"},Ie={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},qe={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Ye=e=>{var t=Ae[e],r=Ie[e],a=qe[e],n=t&&(0,f.TB)(t),o=r&&(0,f.TB)(r),i=a&&(0,f.TB)(a);return e=>!(!n||!n(e))||(!!(G&&o&&o(e))||!(G||!i||!i(e)))},Ue={isBold:Ye("bold"),isCompose:Ye("compose"),isMoveBackward:Ye("moveBackward"),isMoveForward:Ye("moveForward"),isDeleteBackward:Ye("deleteBackward"),isDeleteForward:Ye("deleteForward"),isDeleteLineBackward:Ye("deleteLineBackward"),isDeleteLineForward:Ye("deleteLineForward"),isDeleteWordBackward:Ye("deleteWordBackward"),isDeleteWordForward:Ye("deleteWordForward"),isExtendBackward:Ye("extendBackward"),isExtendForward:Ye("extendForward"),isExtendLineBackward:Ye("extendLineBackward"),isExtendLineForward:Ye("extendLineForward"),isItalic:Ye("italic"),isMoveLineBackward:Ye("moveLineBackward"),isMoveLineForward:Ye("moveLineForward"),isMoveWordBackward:Ye("moveWordBackward"),isMoveWordForward:Ye("moveWordForward"),isRedo:Ye("redo"),isSoftBreak:Ye("insertSoftBreak"),isSplitBlock:Ye("splitBlock"),isTransposeCharacter:Ye("transposeCharacter"),isUndo:Ye("undo")},$e={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class _e extends d.Component{constructor(){super(...arguments),this.context=null,this.manager=null,this.mutationObserver=null}observe(){var e,{node:t}=this.props;if(!t.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");null===(e=this.mutationObserver)||void 0===e||e.observe(t.current,$e)}componentDidMount(){var{receivedUserInput:e}=this.props,t=this.context;this.manager=((e,t)=>{var r=[],a=()=>{r=[]};return{registerMutations:a=>{if(t.current){var n=a.filter((t=>J(e,t,a)));r.push(...n)}},restoreDOM:function(){r.reverse().forEach((e=>{"characterData"!==e.type?(e.removedNodes.forEach((t=>{e.target.insertBefore(t,e.nextSibling)})),e.addedNodes.forEach((t=>{e.target.removeChild(t)}))):e.target.textContent=e.oldValue})),a()},clear:a}})(t,e),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var e,t,r,a,n=null===(e=this.mutationObserver)||void 0===e?void 0:e.takeRecords();null!==n&&void 0!==n&&n.length&&(null===(a=this.manager)||void 0===a||a.registerMutations(n));return null===(t=this.mutationObserver)||void 0===t||t.disconnect(),null===(r=this.manager)||void 0===r||r.restoreDOM(),null}componentDidUpdate(){var e;null===(e=this.manager)||void 0===e||e.clear(),this.observe()}componentWillUnmount(){var e;null===(e=this.mutationObserver)||void 0===e||e.disconnect()}render(){return this.props.children}}_e.contextType=xe;var ze=ee?_e:e=>{var{children:t}=e;return d.createElement(d.Fragment,null,t)};function Ve(e,t){var{path:r,diff:a}=t;if(!u.ML.hasPath(e,r))return!1;var n=u.NB.get(e,r);if(!u.xv.isText(n))return!1;if(a.start!==n.text.length||0===a.text.length)return n.text.slice(a.start,a.start+a.text.length)===a.text;var o=u.y$.next(r);if(!u.ML.hasPath(e,o))return!1;var i=u.NB.get(e,o);return u.xv.isText(i)&&i.text.startsWith(a.text)}function Ke(e,t){var{start:r,end:a,text:n}=t,o=e.slice(r,a),i=function(e,t){for(var r=Math.min(e.length,t.length),a=0;a1?t-1:0),a=1;ae.slice(0,t.start)+t.text+e.slice(t.end)),e)}(e,t,r),i=Math.max(r.start+r.text.length,t.start+t.text.length+(t.start+t.text.length>r.start?r.text.length:0)-n),s=o.slice(a,i);return Ke(e,{start:a,end:Math.max(t.end,r.end-t.text.length+(t.end-t.start)),text:s})}function Xe(e){var{path:t,diff:r}=e;return{anchor:{path:t,offset:r.start},focus:{path:t,offset:r.end}}}function Je(e,t){var{path:r,offset:a}=t;if(!u.ML.hasPath(e,r))return null;var n=u.NB.get(e,r);if(!u.xv.isText(n))return null;var o=u.ML.above(e,{match:t=>u.ML.isBlock(e,t),at:r});if(!o)return null;for(;a>n.text.length;){var i=u.ML.next(e,{at:r,match:u.xv.isText});if(!i||!u.y$.isDescendant(i[1],o[1]))return null;a-=n.text.length,n=i[0],r=i[1]}return{path:r,offset:a}}function Qe(e,t){var r=Je(e,t.anchor);if(!r)return null;if(u.e6.isCollapsed(t))return{anchor:r,focus:r};var a=Je(e,t.focus);return a?{anchor:r,focus:a}:null}function Ze(e,t,r){var a=T.get(e),n=null===a||void 0===a?void 0:a.find((e=>{var{path:r}=e;return u.y$.equals(r,t.path)}));if(!n||t.offset<=n.diff.start)return u.E9.transform(t,r,{affinity:"backward"});var{diff:o}=n;if(t.offset<=o.start+o.text.length){var i={path:t.path,offset:o.start},s=u.E9.transform(i,r,{affinity:"backward"});return s?{path:s.path,offset:s.offset+t.offset-o.start}:null}var l={path:t.path,offset:t.offset-o.text.length+o.end-o.start},d=u.E9.transform(l,r,{affinity:"backward"});return d?"split_node"===r.type&&u.y$.equals(r.path,t.path)&&l.offset{var e=j.get(t);if(j.delete(t),e){var{selection:r}=t,a=Qe(t,e);!a||r&&u.e6.equals(a,r)||u.YR.select(t,a)}},f=()=>{var e;if(i&&(clearTimeout(i),i=null),s&&(clearTimeout(s),s=null),m()||g()){n||(n=!0,setTimeout((()=>n=!1))),g()&&(n="action");var o=t.selection&&u.ML.rangeRef(t,t.selection,{affinity:"forward"});N.set(t,t.marks),W.get(t),T.get(t);for(var l,f=!(null===(e=T.get(t))||void 0===e||!e.length);l=null===(v=T.get(t))||void 0===v?void 0:v[0];){var v,h,p=R.get(t);void 0!==p&&(R.delete(t),t.marks=p),p&&!1===d&&(d=null);var w=Xe(l);t.selection&&u.e6.equals(t.selection,w)||u.YR.select(t,w),l.diff.text?u.ML.insertText(t,l.diff.text):u.ML.deleteFragment(t),T.set(t,null===(h=T.get(t))||void 0===h?void 0:h.filter((e=>{var{id:t}=e;return t!==l.id}))),Ve(t,l)||(f=!1,W.delete(t),N.delete(t),n="action",j.delete(t),r.cancel(),a.cancel(),null===o||void 0===o||o.unref())}var M=null===o||void 0===o?void 0:o.unref();if(!M||j.get(t)||t.selection&&u.e6.equals(M,t.selection)||u.YR.select(t,M),g())(()=>{var e=W.get(t);if(W.delete(t),e){if(e.at){var r=u.E9.isPoint(e.at)?Je(t,e.at):Qe(t,e.at);if(!r)return;var a=u.ML.range(t,r);t.selection&&u.e6.equals(t.selection,a)||u.YR.select(t,r)}e.run()}})();else{f&&r(),r.flush(),a.flush(),c();var b=N.get(t);N.delete(t),void 0!==b&&(t.marks=b,t.onChange())}}else c()},v=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=k.get(t);r&&(m()||e?r.style.display="none":r.style.removeProperty("display"))},h=(e,r)=>{var a,n=null!==(a=T.get(t))&&void 0!==a?a:[];T.set(t,n);var o=u.NB.leaf(t,e),i=n.findIndex((t=>u.y$.equals(t.path,e)));if(i<0)return Ke(o.text,r)&&n.push({path:e,diff:r,id:l++}),void v();var s=He(o.text,n[i].diff,r);if(!s)return n.splice(i,1),void v();n[i]=tt(tt({},n[i]),{},{diff:s})},p=function(e){var{at:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};d=!1,j.delete(t),r.cancel(),a.cancel(),g()&&f(),W.set(t,{at:n,run:e}),s=setTimeout(f)},g=()=>!!W.get(t),m=()=>{var e;return!(null===(e=T.get(t))||void 0===e||!e.length)},w=()=>{g()||(s=setTimeout(f))};return{flush:f,scheduleFlush:w,hasPendingDiffs:m,hasPendingAction:g,hasPendingChanges:()=>g()||m(),isFlushing:()=>n,handleUserSelect:e=>{j.set(t,e),i&&(clearTimeout(i),i=null);var{selection:r}=t;if(e){var a=!r||!u.y$.equals(r.anchor.path,e.anchor.path),n=!r||!u.y$.equals(r.anchor.path.slice(0,-1),e.anchor.path.slice(0,-1));(a&&d||n)&&(d=!1),!a&&m()||(i=setTimeout(f,200))}},handleCompositionEnd:e=>{o&&clearTimeout(o),o=setTimeout((()=>{B.set(t,!1),f()}),25)},handleCompositionStart:e=>{B.set(t,!0),o&&(clearTimeout(o),o=null)},handleDOMBeforeInput:e=>{var r;i&&(clearTimeout(i),i=null);var{inputType:a}=e,n=null,o=e.dataTransfer||e.data||void 0;!1!==d&&"insertText"!==a&&"insertCompositionText"!==a&&(d=!1);var[s]=e.getTargetRanges();s&&(n=fe.toSlateRange(t,s,{exactMatch:!1,suppressThrow:!0}));var l=fe.getWindow(t).getSelection();if(!n&&l&&(s=l,n=fe.toSlateRange(t,l,{exactMatch:!1,suppressThrow:!0})),n=null!==(r=n)&&void 0!==r?r:t.selection){if(u.e6.isExpanded(n)&&a.startsWith("delete")){var[c,f]=u.e6.edges(n);if(u.NB.leaf(t,c.path).text.length===c.offset&&0===f.offset){var v=u.ML.next(t,{at:c.path,match:u.xv.isText});v&&u.y$.equals(v[1],f.path)&&(n={anchor:f,focus:f})}}if(u.e6.isExpanded(n)&&a.startsWith("delete")){if(u.y$.equals(n.anchor.path,n.focus.path)){var[g,m]=u.e6.edges(n);return h(n.anchor.path,{text:"",end:m.offset,start:g.offset})}var M=a.endsWith("Backward")?"backward":"forward";return p((()=>u.ML.deleteFragment(t,{direction:M})),{at:n})}switch(a){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return p((()=>u.ML.deleteFragment(t)),{at:n});case"deleteContent":case"deleteContentForward":var{anchor:b}=n;if(u.e6.isCollapsed(n)){var x=u.NB.leaf(t,b.path);if(b.offsetu.ML.deleteForward(t)),{at:n});case"deleteContentBackward":var k,{anchor:y}=n;return(_(s)?s.isCollapsed:!(null===(k=s)||void 0===k||!k.collapsed))&&u.e6.isCollapsed(n)&&y.offset>0?h(y.path,{text:"",start:y.offset-1,end:y.offset}):p((()=>u.ML.deleteBackward(t)),{at:n});case"deleteEntireSoftLine":return p((()=>{u.ML.deleteBackward(t,{unit:"line"}),u.ML.deleteForward(t,{unit:"line"})}),{at:n});case"deleteHardLineBackward":return p((()=>u.ML.deleteBackward(t,{unit:"block"})),{at:n});case"deleteSoftLineBackward":return p((()=>u.ML.deleteBackward(t,{unit:"line"})),{at:n});case"deleteHardLineForward":return p((()=>u.ML.deleteForward(t,{unit:"block"})),{at:n});case"deleteSoftLineForward":return p((()=>u.ML.deleteForward(t,{unit:"line"})),{at:n});case"deleteWordBackward":return p((()=>u.ML.deleteBackward(t,{unit:"word"})),{at:n});case"deleteWordForward":return p((()=>u.ML.deleteForward(t,{unit:"word"})),{at:n});case"insertLineBreak":return p((()=>u.ML.insertSoftBreak(t)),{at:n});case"insertParagraph":return p((()=>u.ML.insertBreak(t)),{at:n});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if("DataTransfer"===(null===o||void 0===o?void 0:o.constructor.name))return p((()=>fe.insertData(t,o)),{at:n});if("string"===typeof o&&o.includes("\n"))return p((()=>u.ML.insertSoftBreak(t)),{at:u.e6.end(n)});var L=null!==o&&void 0!==o?o:"";if(R.get(t)&&(L=L.replace("\ufeff","")),u.y$.equals(n.anchor.path,n.focus.path)){var[C,D]=u.e6.edges(n),E={start:C.offset,end:D.offset,text:L};if(L&&d&&"insertCompositionText"===a){var O=d.start+d.text.search(/\S|$/);E.start+E.text.search(/\S|$/)===O+1&&E.end===d.start+d.text.length?(E.start-=1,d=null,w()):d=!1}else d="insertText"===a&&(null===d?E:!(!d||!u.e6.isCollapsed(n)||d.end+d.text.length!==C.offset)&&tt(tt({},d),{},{text:d.text+L}));return void h(C.path,E)}return p((()=>u.ML.insertText(t,L)),{at:n})}}},handleKeyDown:e=>{m()||(v(!0),setTimeout(v))},handleDomMutations:e=>{var r;m()||g()||e.some((r=>J(t,r,e)))&&(null===(r=A.get(t))||void 0===r||r())},handleInput:()=>{!g()&&m()||f()}}}var at=["node"];function nt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}var ot={subtree:!0,childList:!0,characterData:!0};function it(e){var{node:t}=e,r=p(e,at);if(!ee)return null;var a=ke(),n=function(){var e=(0,d.useRef)(!1);return(0,d.useEffect)((()=>(e.current=!0,()=>{e.current=!1})),[]),e.current}(),[o]=(0,d.useState)((()=>rt(function(e){for(var t=1;tnew MutationObserver(t)));ve((()=>{a.takeRecords()})),(0,d.useEffect)((()=>{if(!e.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");return a.observe(e.current,r),()=>a.disconnect()}),[])}(t,o.handleDomMutations,ot),P.set(a,o.scheduleFlush),n&&o.flush(),o}var st=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as"],lt=["text"];function dt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function ct(e){for(var t=1;td.createElement(d.Fragment,null,Ne(e)),ft=e=>{var{autoFocus:t,decorate:r=ht,onDOMBeforeInput:a,placeholder:o,readOnly:s=!1,renderElement:c,renderLeaf:f,renderPlaceholder:v=(e=>d.createElement(vt,Object.assign({},e))),scrollSelectionIntoView:h=pt,style:g={},as:m="div"}=e,w=p(e,st),M=(()=>{var e=(0,d.useContext)(je);if(!e)throw new Error("The `useSlate` hook must be used inside the component's context.");var{editor:t}=e;return t})(),[k,C]=(0,d.useState)(!1),D=(0,d.useRef)(null),F=(0,d.useRef)([]),{onUserInput:P,receivedUserInput:T}=function(){var e=ke(),t=(0,d.useRef)(!1),r=(0,d.useRef)(0),a=(0,d.useCallback)((()=>{if(!t.current){t.current=!0;var a=fe.getWindow(e);a.cancelAnimationFrame(r.current),r.current=a.requestAnimationFrame((()=>{t.current=!1}))}}),[]);return(0,d.useEffect)((()=>()=>cancelAnimationFrame(r.current)),[]),{receivedUserInput:t,onUserInput:a}}(),[,W]=(0,d.useReducer)((e=>e+1),0);A.set(M,W),E.set(M,s);var j=(0,d.useMemo)((()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1})),[]);(0,d.useEffect)((()=>{D.current&&t&&D.current.focus()}),[t]);var _=(0,d.useCallback)(l()((()=>{if((ee||!fe.isComposing(M))&&(!j.isUpdatingSelection||null!==V&&void 0!==V&&V.isFlushing())&&!j.isDraggingInternally){var e=fe.findDocumentOrShadowRoot(M),{activeElement:t}=e,r=fe.toDOMNode(M,M),a=e.getSelection();if(t===r?(j.latestElement=t,O.set(M,!0)):O.delete(M),!a)return u.YR.deselect(M);var{anchorNode:n,focusNode:o}=a,i=mt(M,n)||wt(M,n),l=mt(M,o)||wt(M,o);if(i&&l){var d=fe.toSlateRange(M,a,{exactMatch:!1,suppressThrow:!0});d&&(fe.isComposing(M)||null!==V&&void 0!==V&&V.hasPendingChanges()||null!==V&&void 0!==V&&V.isFlushing()?null===V||void 0===V||V.handleUserSelect(d):u.YR.select(M,d))}!s||i&&l||u.YR.deselect(M)}}),100),[s]),z=(0,d.useMemo)((()=>i()(_,0)),[_]),V=it({node:D,onDOMSelectionChange:_,scheduleOnDOMSelectionChange:z});ve((()=>{var e;D.current&&(e=Y(D.current))?(b.set(M,e),x.set(M,D.current),L.set(M,D.current),y.set(D.current,M)):L.delete(M);var{selection:t}=M,r=fe.findDocumentOrShadowRoot(M).getSelection();if(r&&fe.isFocused(M)&&(null===V||void 0===V||!V.hasPendingAction())){var a=e=>{var a="None"!==r.type;if(t||a){var n=x.get(M),o=!1;if(n.contains(r.anchorNode)&&n.contains(r.focusNode)&&(o=!0),a&&o&&t&&!e){var i=fe.toSlateRange(M,r,{exactMatch:!0,suppressThrow:!0});if(i&&u.e6.equals(i,t)){var s;if(!j.hasMarkPlaceholder)return;var{anchorNode:l}=r;if(null!==l&&void 0!==l&&null!==(s=l.parentElement)&&void 0!==s&&s.hasAttribute("data-slate-mark-placeholder"))return}}if(!t||fe.hasRange(M,t)){j.isUpdatingSelection=!0;var d=t&&fe.toDOMRange(M,t);return d?(u.e6.isBackward(t)?r.setBaseAndExtent(d.endContainer,d.endOffset,d.startContainer,d.startOffset):r.setBaseAndExtent(d.startContainer,d.startOffset,d.endContainer,d.endOffset),h(M,d)):r.removeAllRanges(),d}M.selection=fe.toSlateRange(M,r,{exactMatch:!1,suppressThrow:!0})}},n=a(),o="action"===(null===V||void 0===V?void 0:V.isFlushing());if(ee&&o){var i=null,s=requestAnimationFrame((()=>{if(o){var e=e=>{try{fe.toDOMNode(M,M).focus(),a(e)}catch(t){}};e(),i=setTimeout((()=>{e(!0),j.isUpdatingSelection=!1}))}}));return()=>{cancelAnimationFrame(s),i&&clearTimeout(i)}}setTimeout((()=>{n&&te&&fe.toDOMNode(M,M).focus();j.isUpdatingSelection=!1}))}}));var K=(0,d.useCallback)((e=>{if(P(),!s&&mt(M,e.target)&&!bt(e,a)){var t;if(V)return V.handleDOMBeforeInput(e);z.flush(),_.flush();var{selection:r}=M,{inputType:n}=e,o=e.dataTransfer||e.data||void 0,i="insertCompositionText"===n||"deleteCompositionText"===n;if(i&&fe.isComposing(M))return;var l=!1;if("insertText"===n&&r&&u.e6.isCollapsed(r)&&e.data&&1===e.data.length&&/[a-z ]/i.test(e.data)&&0!==r.anchor.offset){var d,c;l=!0,M.marks&&(l=!1);var{anchor:f}=r,[v,h]=fe.toDOMPoint(M,f),p=null===(d=v.parentElement)||void 0===d?void 0:d.closest("a"),g=fe.getWindow(M);if(l&&p&&fe.hasDOMNode(M,p)){var m,w=null===g||void 0===g?void 0:g.document.createTreeWalker(p,NodeFilter.SHOW_TEXT).lastChild();w===v&&(null===(m=w.textContent)||void 0===m?void 0:m.length)===h&&(l=!1)}if(l&&v.parentElement&&"pre"===(null===g||void 0===g||null===(c=g.getComputedStyle(v.parentElement))||void 0===c?void 0:c.whiteSpace)){var b=u.ML.above(M,{at:f.path,match:e=>u.ML.isBlock(M,e)});b&&u.NB.string(b[0]).includes("\t")&&(l=!1)}}if(!n.startsWith("delete")||n.startsWith("deleteBy")){var[x]=e.getTargetRanges();if(x){var k=fe.toSlateRange(M,x,{exactMatch:!1,suppressThrow:!1});if(!r||!u.e6.equals(r,k)){l=!1;var y=!i&&M.selection&&u.ML.rangeRef(M,M.selection);u.YR.select(M,k),y&&S.set(M,y)}}}if(i)return;if(l||e.preventDefault(),r&&u.e6.isExpanded(r)&&n.startsWith("delete")){var L=n.endsWith("Backward")?"backward":"forward";return void u.ML.deleteFragment(M,{direction:L})}switch(n){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":u.ML.deleteFragment(M);break;case"deleteContent":case"deleteContentForward":u.ML.deleteForward(M);break;case"deleteContentBackward":u.ML.deleteBackward(M);break;case"deleteEntireSoftLine":u.ML.deleteBackward(M,{unit:"line"}),u.ML.deleteForward(M,{unit:"line"});break;case"deleteHardLineBackward":u.ML.deleteBackward(M,{unit:"block"});break;case"deleteSoftLineBackward":u.ML.deleteBackward(M,{unit:"line"});break;case"deleteHardLineForward":u.ML.deleteForward(M,{unit:"block"});break;case"deleteSoftLineForward":u.ML.deleteForward(M,{unit:"line"});break;case"deleteWordBackward":u.ML.deleteBackward(M,{unit:"word"});break;case"deleteWordForward":u.ML.deleteForward(M,{unit:"word"});break;case"insertLineBreak":u.ML.insertSoftBreak(M);break;case"insertParagraph":u.ML.insertBreak(M);break;case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":var{selection:D}=M;D&&u.e6.isExpanded(D)&&u.ML.deleteFragment(M),"insertFromComposition"===n&&fe.isComposing(M)&&(C(!1),B.set(M,!1)),"DataTransfer"===(null===o||void 0===o?void 0:o.constructor.name)?fe.insertData(M,o):"string"===typeof o&&(l?F.current.push((()=>u.ML.insertText(M,o))):u.ML.insertText(M,o))}var E=null===(t=S.get(M))||void 0===t?void 0:t.unref();S.delete(M),!E||M.selection&&u.e6.equals(M.selection,E)||u.YR.select(M,E)}}),[s,a]);ve((()=>(D.current&&ue&&D.current.addEventListener("beforeinput",K),()=>{D.current&&ue&&D.current.removeEventListener("beforeinput",K)})),[K]),ve((()=>{var e=fe.getWindow(M);return e.document.addEventListener("selectionchange",z),()=>{e.document.removeEventListener("selectionchange",z)}}),[z]);var H=r([M,[]]);if(o&&1===M.children.length&&1===Array.from(u.NB.texts(M)).length&&""===u.NB.string(M)&&!k){var X=u.ML.start(M,[]);H.push({[I]:!0,placeholder:o,anchor:X,focus:X})}var{marks:J}=M;if(j.hasMarkPlaceholder=!1,M.selection&&u.e6.isCollapsed(M.selection)&&J){var{anchor:Q}=M.selection,G=u.NB.leaf(M,Q.path),ae=p(G,lt);if(!u.xv.equals(G,J,{loose:!0})){j.hasMarkPlaceholder=!0;var oe=Object.fromEntries(Object.keys(ae).map((e=>[e,null])));H.push(ct(ct(ct({[q]:!0},oe),J),{},{anchor:Q,focus:Q}))}}return(0,d.useEffect)((()=>{setTimeout((()=>{var{selection:e}=M;if(e){var{anchor:t}=e,r=u.NB.leaf(M,t.path);if(J&&!u.xv.equals(r,J,{loose:!0}))return void R.set(M,J)}R.delete(M)}))})),d.createElement(Te.Provider,{value:s},d.createElement(Fe.Provider,{value:r},d.createElement(ze,{node:D,receivedUserInput:T},d.createElement(m,Object.assign({role:s?void 0:"textbox","aria-multiline":!s||void 0},w,{spellCheck:!(!ue&&ce)&&w.spellCheck,autoCorrect:ue||!ce?w.autoCorrect:"false",autoCapitalize:ue||!ce?w.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!s,zindex:-1,suppressContentEditableWarning:!0,ref:D,style:ct({position:"relative",outline:"none",whiteSpace:"pre-wrap",wordWrap:"break-word"},g),onBeforeInput:(0,d.useCallback)((e=>{if(!ue&&!s&&!Mt(e,w.onBeforeInput)&&mt(M,e.target)&&(e.preventDefault(),!fe.isComposing(M))){var t=e.data;u.ML.insertText(M,t)}}),[s]),onInput:(0,d.useCallback)((e=>{if(V)V.handleInput();else{for(var t of F.current)t();F.current=[]}}),[]),onBlur:(0,d.useCallback)((e=>{if(!s&&!j.isUpdatingSelection&&mt(M,e.target)&&!Mt(e,w.onBlur)){var t=fe.findDocumentOrShadowRoot(M);if(j.latestElement!==t.activeElement){var{relatedTarget:r}=e;if(r!==fe.toDOMNode(M,M)&&(!U(r)||!r.hasAttribute("data-slate-spacer"))){if(null!=r&&$(r)&&fe.hasDOMNode(M,r)){var a=fe.toSlateNode(M,r);if(u.W_.isElement(a)&&!M.isVoid(a))return}if(re){var n=t.getSelection();null===n||void 0===n||n.removeAllRanges()}O.delete(M)}}}}),[s,w.onBlur]),onClick:(0,d.useCallback)((e=>{if(gt(M,e.target)&&!Mt(e,w.onClick)&&$(e.target)){var t=fe.toSlateNode(M,e.target),r=fe.findPath(M,t);if(!u.ML.hasPath(M,r)||u.NB.get(M,r)!==t)return;if(3===e.detail&&r.length>=1){var a=r;if(!u.ML.isBlock(M,t)){var n,o=u.ML.above(M,{match:e=>u.ML.isBlock(M,e),at:r});a=null!==(n=null===o||void 0===o?void 0:o[1])&&void 0!==n?n:r.slice(0,1)}var i=u.ML.range(M,a);return void u.YR.select(M,i)}if(s)return;var l=u.ML.start(M,r),d=u.ML.end(M,r),c=u.ML.void(M,{at:l}),f=u.ML.void(M,{at:d});if(c&&f&&u.y$.equals(c[1],f[1])){var v=u.ML.range(M,l);u.YR.select(M,v)}}}),[s,w.onClick]),onCompositionEnd:(0,d.useCallback)((e=>{if(mt(M,e.target)){if(fe.isComposing(M)&&(C(!1),B.set(M,!1)),null===V||void 0===V||V.handleCompositionEnd(e),Mt(e,w.onCompositionEnd)||ee)return;if(!re&&!ie&&!Z&&!se&&!de&&!le&&e.data){var t=R.get(M);R.delete(M),void 0!==t&&(N.set(M,M.marks),M.marks=t),u.ML.insertText(M,e.data);var r=N.get(M);N.delete(M),void 0!==r&&(M.marks=r)}}}),[w.onCompositionEnd]),onCompositionUpdate:(0,d.useCallback)((e=>{mt(M,e.target)&&!Mt(e,w.onCompositionUpdate)&&(fe.isComposing(M)||(C(!0),B.set(M,!0)))}),[w.onCompositionUpdate]),onCompositionStart:(0,d.useCallback)((e=>{if(mt(M,e.target)){if(null===V||void 0===V||V.handleCompositionStart(e),Mt(e,w.onCompositionStart)||ee)return;C(!0);var{selection:t}=M;if(t){if(u.e6.isExpanded(t))return void u.ML.deleteFragment(M);var r=u.ML.above(M,{match:e=>u.ML.isInline(M,e),mode:"highest"});if(r){var[,a]=r;if(u.ML.isEnd(M,t.anchor,a)){var n=u.ML.after(M,a);u.YR.setSelection(M,{anchor:n,focus:n})}}}}}),[w.onCompositionStart]),onCopy:(0,d.useCallback)((e=>{mt(M,e.target)&&!Mt(e,w.onCopy)&&(e.preventDefault(),fe.setFragmentData(M,e.clipboardData,"copy"))}),[w.onCopy]),onCut:(0,d.useCallback)((e=>{if(!s&&mt(M,e.target)&&!Mt(e,w.onCut)){e.preventDefault(),fe.setFragmentData(M,e.clipboardData,"cut");var{selection:t}=M;if(t)if(u.e6.isExpanded(t))u.ML.deleteFragment(M);else{var r=u.NB.parent(M,t.anchor.path);u.ML.isVoid(M,r)&&u.YR.delete(M)}}}),[s,w.onCut]),onDragOver:(0,d.useCallback)((e=>{if(gt(M,e.target)&&!Mt(e,w.onDragOver)){var t=fe.toSlateNode(M,e.target);u.ML.isVoid(M,t)&&e.preventDefault()}}),[w.onDragOver]),onDragStart:(0,d.useCallback)((e=>{if(!s&>(M,e.target)&&!Mt(e,w.onDragStart)){var t=fe.toSlateNode(M,e.target),r=fe.findPath(M,t);if(u.ML.isVoid(M,t)||u.ML.void(M,{at:r,voids:!0})){var a=u.ML.range(M,r);u.YR.select(M,a)}j.isDraggingInternally=!0,fe.setFragmentData(M,e.dataTransfer,"drag")}}),[s,w.onDragStart]),onDrop:(0,d.useCallback)((e=>{if(!s&>(M,e.target)&&!Mt(e,w.onDrop)){e.preventDefault();var t=M.selection,r=fe.findEventRange(M,e),a=e.dataTransfer;u.YR.select(M,r),j.isDraggingInternally&&(!t||u.e6.equals(t,r)||u.ML.void(M,{at:r,voids:!0})||u.YR.delete(M,{at:t})),fe.insertData(M,a),fe.isFocused(M)||fe.focus(M)}j.isDraggingInternally=!1}),[s,w.onDrop]),onDragEnd:(0,d.useCallback)((e=>{!s&&j.isDraggingInternally&&w.onDragEnd&>(M,e.target)&&w.onDragEnd(e),j.isDraggingInternally=!1}),[s,w.onDragEnd]),onFocus:(0,d.useCallback)((e=>{if(!s&&!j.isUpdatingSelection&&mt(M,e.target)&&!Mt(e,w.onFocus)){var t=fe.toDOMNode(M,M),r=fe.findDocumentOrShadowRoot(M);if(j.latestElement=r.activeElement,te&&e.target!==t)return void t.focus();O.set(M,!0)}}),[s,w.onFocus]),onKeyDown:(0,d.useCallback)((e=>{if(!s&&mt(M,e.target)){null===V||void 0===V||V.handleKeyDown(e);var{nativeEvent:t}=e;if(fe.isComposing(M)&&!1===t.isComposing&&(B.set(M,!1),C(!1)),Mt(e,w.onKeyDown)||fe.isComposing(M))return;var{selection:r}=M,a=M.children[null!==r?r.focus.path[0]:0],o="rtl"===n()(u.NB.string(a));if(Ue.isRedo(t)){e.preventDefault();var i=M;return void("function"===typeof i.redo&&i.redo())}if(Ue.isUndo(t)){e.preventDefault();var l=M;return void("function"===typeof l.undo&&l.undo())}if(Ue.isMoveLineBackward(t))return e.preventDefault(),void u.YR.move(M,{unit:"line",reverse:!0});if(Ue.isMoveLineForward(t))return e.preventDefault(),void u.YR.move(M,{unit:"line"});if(Ue.isExtendLineBackward(t))return e.preventDefault(),void u.YR.move(M,{unit:"line",edge:"focus",reverse:!0});if(Ue.isExtendLineForward(t))return e.preventDefault(),void u.YR.move(M,{unit:"line",edge:"focus"});if(Ue.isMoveBackward(t))return e.preventDefault(),void(r&&u.e6.isCollapsed(r)?u.YR.move(M,{reverse:!o}):u.YR.collapse(M,{edge:"start"}));if(Ue.isMoveForward(t))return e.preventDefault(),void(r&&u.e6.isCollapsed(r)?u.YR.move(M,{reverse:o}):u.YR.collapse(M,{edge:"end"}));if(Ue.isMoveWordBackward(t))return e.preventDefault(),r&&u.e6.isExpanded(r)&&u.YR.collapse(M,{edge:"focus"}),void u.YR.move(M,{unit:"word",reverse:!o});if(Ue.isMoveWordForward(t))return e.preventDefault(),r&&u.e6.isExpanded(r)&&u.YR.collapse(M,{edge:"focus"}),void u.YR.move(M,{unit:"word",reverse:o});if(ue){if((ne||re)&&r&&(Ue.isDeleteBackward(t)||Ue.isDeleteForward(t))&&u.e6.isCollapsed(r)){var d=u.NB.parent(M,r.anchor.path);if(u.W_.isElement(d)&&u.ML.isVoid(M,d)&&(u.ML.isInline(M,d)||u.ML.isBlock(M,d)))return e.preventDefault(),void u.ML.deleteBackward(M,{unit:"block"})}}else{if(Ue.isBold(t)||Ue.isItalic(t)||Ue.isTransposeCharacter(t))return void e.preventDefault();if(Ue.isSoftBreak(t))return e.preventDefault(),void u.ML.insertSoftBreak(M);if(Ue.isSplitBlock(t))return e.preventDefault(),void u.ML.insertBreak(M);if(Ue.isDeleteBackward(t))return e.preventDefault(),void(r&&u.e6.isExpanded(r)?u.ML.deleteFragment(M,{direction:"backward"}):u.ML.deleteBackward(M));if(Ue.isDeleteForward(t))return e.preventDefault(),void(r&&u.e6.isExpanded(r)?u.ML.deleteFragment(M,{direction:"forward"}):u.ML.deleteForward(M));if(Ue.isDeleteLineBackward(t))return e.preventDefault(),void(r&&u.e6.isExpanded(r)?u.ML.deleteFragment(M,{direction:"backward"}):u.ML.deleteBackward(M,{unit:"line"}));if(Ue.isDeleteLineForward(t))return e.preventDefault(),void(r&&u.e6.isExpanded(r)?u.ML.deleteFragment(M,{direction:"forward"}):u.ML.deleteForward(M,{unit:"line"}));if(Ue.isDeleteWordBackward(t))return e.preventDefault(),void(r&&u.e6.isExpanded(r)?u.ML.deleteFragment(M,{direction:"backward"}):u.ML.deleteBackward(M,{unit:"word"}));if(Ue.isDeleteWordForward(t))return e.preventDefault(),void(r&&u.e6.isExpanded(r)?u.ML.deleteFragment(M,{direction:"forward"}):u.ML.deleteForward(M,{unit:"word"}))}}}),[s,w.onKeyDown]),onPaste:(0,d.useCallback)((e=>{s||!mt(M,e.target)||Mt(e,w.onPaste)||ue&&!(e=>e.clipboardData&&""!==e.clipboardData.getData("text/plain")&&1===e.clipboardData.types.length)(e.nativeEvent)||(e.preventDefault(),fe.insertData(M,e.clipboardData))}),[s,w.onPaste])}),d.createElement(ut,{decorations:H,node:M,renderElement:c,renderPlaceholder:v,renderLeaf:f,selection:M.selection})))))},vt=e=>{var{attributes:t,children:r}=e;return d.createElement("span",Object.assign({},t),r,ee&&d.createElement("br",null))},ht=()=>[],pt=(e,t)=>{if(!e.selection||e.selection&&u.e6.isCollapsed(e.selection)){var r=t.startContainer.parentElement;r.getBoundingClientRect=t.getBoundingClientRect.bind(t),(0,c.Z)(r,{scrollMode:"if-needed"}),delete r.getBoundingClientRect}},gt=(e,t)=>$(t)&&fe.hasDOMNode(e,t),mt=(e,t)=>$(t)&&fe.hasDOMNode(e,t,{editable:!0}),wt=(e,t)=>{if(E.get(e))return!1;var r=gt(e,t)&&fe.toSlateNode(e,t);return u.ML.isVoid(e,r)},Mt=(e,t)=>{if(!t)return!1;var r=t(e);return null!=r?r:e.isDefaultPrevented()||e.isPropagationStopped()},bt=(e,t)=>{if(!t)return!1;var r=t(e);return null!=r?r:e.defaultPrevented},xt=(0,d.createContext)(!1),kt=()=>(0,d.useContext)(xt);var yt=(0,d.createContext)({});var Lt=["editor","children","onChange","value"],Ct=e=>{var{editor:t,children:r,onChange:a,value:n}=e,o=p(e,Lt),i=(0,d.useRef)(!1),[s,l]=d.useState((()=>{if(!u.NB.isNodeList(n))throw new Error("[Slate] value is invalid! Expected a list of elements"+"but got: ".concat(u.o4.stringify(n)));if(!u.ML.isEditor(t))throw new Error("[Slate] editor is invalid! you passed:"+"".concat(u.o4.stringify(t)));return t.children=n,Object.assign(t,o),{v:0,editor:t}})),{selectorContext:c,onChange:f}=function(e){var t=(0,d.useRef)([]).current,r=(0,d.useRef)({editor:e}).current,a=(0,d.useCallback)((e=>{r.editor=e,t.forEach((t=>t(e)))}),[]);return{selectorContext:(0,d.useMemo)((()=>({getSlate:()=>r.editor,addEventListener:e=>(t.push(e),()=>{t.splice(t.indexOf(e),1)})})),[t,r]),onChange:a}}(t),v=(0,d.useCallback)((()=>{a&&a(t.children),l((e=>({v:e.v+1,editor:t}))),f(t)}),[a]);F.set(t,v),(0,d.useEffect)((()=>()=>{F.set(t,(()=>{})),i.current=!0}),[]);var[h,g]=(0,d.useState)(fe.isFocused(t));return(0,d.useEffect)((()=>{g(fe.isFocused(t))})),ve((()=>{var e=()=>g(fe.isFocused(t));return Q?(document.addEventListener("focusin",e),document.addEventListener("focusout",e),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",e)}):(document.addEventListener("focus",e,!0),document.addEventListener("blur",e,!0),()=>{document.removeEventListener("focus",e,!0),document.removeEventListener("blur",e,!0)})}),[]),d.createElement(yt.Provider,{value:c},d.createElement(je.Provider,{value:s},d.createElement(xe.Provider,{value:s.editor},d.createElement(xt.Provider,{value:h},r))))},Dt=(e,t)=>{var r=(t.top+t.bottom)/2;return e.top<=r&&e.bottom>=r},Et=(e,t,r)=>{var a=fe.toDOMRange(e,t).getBoundingClientRect(),n=fe.toDOMRange(e,r).getBoundingClientRect();return Dt(a,n)&&Dt(n,a)};function Ot(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function Bt(e){for(var t=1;t{var t=e,{apply:r,onChange:a,deleteBackward:n,addMark:o,removeMark:i}=t;return D.set(t,new WeakMap),t.addMark=(e,r)=>{var a,n;null===(a=P.get(t))||void 0===a||a(),!R.get(t)&&null!==(n=T.get(t))&&void 0!==n&&n.length&&R.set(t,null),N.delete(t),o(e,r)},t.removeMark=e=>{var r;!R.get(t)&&null!==(r=T.get(t))&&void 0!==r&&r.length&&R.set(t,null),N.delete(t),i(e)},t.deleteBackward=e=>{if("line"!==e)return n(e);if(t.selection&&u.e6.isCollapsed(t.selection)){var r=u.ML.above(t,{match:e=>u.ML.isBlock(t,e),at:t.selection});if(r){var[,a]=r,o=u.ML.range(t,a,t.selection.anchor),i=((e,t)=>{var r=u.ML.range(e,u.e6.end(t)),a=Array.from(u.ML.positions(e,{at:t})),n=0,o=a.length,i=Math.floor(o/2);if(Et(e,u.ML.range(e,a[n]),r))return u.ML.range(e,a[n],r);if(a.length<2)return u.ML.range(e,a[a.length-1],r);for(;i!==a.length&&i!==n;)Et(e,u.ML.range(e,a[i]),r)?o=i:n=i,i=Math.floor((n+o)/2);return u.ML.range(e,a[o],r)})(t,o);u.e6.isCollapsed(i)||u.YR.delete(t,{at:i})}}},t.apply=e=>{var a=[],n=T.get(t);if(null!==n&&void 0!==n&&n.length){var o=n.map((t=>function(e,t){var{path:r,diff:a,id:n}=e;switch(t.type){case"insert_text":return!u.y$.equals(t.path,r)||t.offset>=a.end?e:t.offset<=a.start?{diff:{start:t.text.length+a.start,end:t.text.length+a.end,text:a.text},id:n,path:r}:{diff:{start:a.start,end:a.end+t.text.length,text:a.text},id:n,path:r};case"remove_text":return!u.y$.equals(t.path,r)||t.offset>=a.end?e:t.offset+t.text.length<=a.start?{diff:{start:a.start-t.text.length,end:a.end-t.text.length,text:a.text},id:n,path:r}:{diff:{start:a.start,end:a.end-t.text.length,text:a.text},id:n,path:r};case"split_node":return!u.y$.equals(t.path,r)||t.position>=a.end?{diff:a,id:n,path:u.y$.transform(r,t,{affinity:"backward"})}:t.position>a.start?{diff:{start:a.start,end:Math.min(t.position,a.end),text:a.text},id:n,path:r}:{diff:{start:a.start-t.position,end:a.end-t.position,text:a.text},id:n,path:u.y$.transform(r,t,{affinity:"forward"})};case"merge_node":return u.y$.equals(t.path,r)?{diff:{start:a.start+t.position,end:a.end+t.position,text:a.text},id:n,path:u.y$.transform(r,t)}:{diff:a,id:n,path:u.y$.transform(r,t)}}var o=u.y$.transform(r,t);return o?{diff:a,path:o,id:n}:null}(t,e))).filter(Boolean);T.set(t,o)}var i=j.get(t);i&&j.set(t,Ge(t,i,e));var s=W.get(t);if(null!==s&&void 0!==s&&s.at){var l=u.E9.isPoint(null===s||void 0===s?void 0:s.at)?Ze(t,s.at,e):Ge(t,s.at,e);W.set(t,l?Bt(Bt({},s),{},{at:l}):null)}switch(e.type){case"insert_text":case"remove_text":case"set_node":case"split_node":a.push(...Ft(t,e.path));break;case"set_selection":var d;null===(d=S.get(t))||void 0===d||d.unref(),S.delete(t);break;case"insert_node":case"remove_node":a.push(...Ft(t,u.y$.parent(e.path)));break;case"merge_node":var c=u.y$.previous(e.path);a.push(...Ft(t,c));break;case"move_node":var f=u.y$.common(u.y$.parent(e.path),u.y$.parent(e.newPath));a.push(...Ft(t,f))}for(var[v,h]of(r(e),a)){var[p]=u.ML.node(t,v);C.set(p,h)}},t.setFragmentData=e=>{var{selection:r}=t;if(r){var[a,n]=u.e6.edges(r),o=u.ML.void(t,{at:a.path}),i=u.ML.void(t,{at:n.path});if(!u.e6.isCollapsed(r)||o){var s=fe.toDOMRange(t,r),l=s.cloneContents(),d=l.childNodes[0];if(l.childNodes.forEach((e=>{e.textContent&&""!==e.textContent.trim()&&(d=e)})),i){var[c]=i,f=s.cloneRange(),v=fe.toDOMNode(t,c);f.setEndAfter(v),l=f.cloneContents()}if(o&&(d=l.querySelector("[data-slate-spacer]")),Array.from(l.querySelectorAll("[data-slate-zero-width]")).forEach((e=>{var t="n"===e.getAttribute("data-slate-zero-width");e.textContent=t?"\n":""})),z(d)){var h=d.ownerDocument.createElement("span");h.style.whiteSpace="pre",h.appendChild(d),l.appendChild(h),d=h}var p=t.getFragment(),g=JSON.stringify(p),m=window.btoa(encodeURIComponent(g));d.setAttribute("data-slate-fragment",m),e.setData("application/x-slate-fragment",m);var w=l.ownerDocument.createElement("div");return w.appendChild(l),w.setAttribute("hidden","true"),l.ownerDocument.body.appendChild(w),e.setData("text/html",w.innerHTML),e.setData("text/plain",H(w)),l.ownerDocument.body.removeChild(w),e}}},t.insertData=e=>{t.insertFragmentData(e)||t.insertTextData(e)},t.insertFragmentData=e=>{var r=e.getData("application/x-slate-fragment")||(e=>{var t=e.getData("text/html"),[,r]=t.match(X)||[];return r})(e);if(r){var a=decodeURIComponent(window.atob(r)),n=JSON.parse(a);return t.insertFragment(n),!0}return!1},t.insertTextData=e=>{var r=e.getData("text/plain");if(r){var a=r.split(/\r\n|\r|\n/),n=!1;for(var o of a)n&&u.YR.splitNodes(t,{always:!0}),t.insertText(o),n=!0;return!0}return!1},t.onChange=()=>{v.unstable_batchedUpdates((()=>{var e=F.get(t);e&&e(),a()}))},t},Ft=(e,t)=>{var r=[];for(var[a,n]of u.ML.levels(e,{at:t})){var o=fe.findKey(e,a);r.push([n,o])}return r}}}]); \ No newline at end of file diff --git a/static/web/_next/static/D6MW2mDcP3Umnh3fVCOsV/_buildManifest.js b/static/web/_next/static/nRbKPlGxaKLVNjCdZ6ouF/_buildManifest.js similarity index 75% rename from static/web/_next/static/D6MW2mDcP3Umnh3fVCOsV/_buildManifest.js rename to static/web/_next/static/nRbKPlGxaKLVNjCdZ6ouF/_buildManifest.js index 704cf3578..d45dde690 100644 --- a/static/web/_next/static/D6MW2mDcP3Umnh3fVCOsV/_buildManifest.js +++ b/static/web/_next/static/nRbKPlGxaKLVNjCdZ6ouF/_buildManifest.js @@ -1 +1 @@ -self.__BUILD_MANIFEST=function(s,a,c,e,i,t,n,d,f,b,h,o,m,u,k,r,g,j,p,l,_,w,v,y,I,B,F,A,D,E,L){return{__rewrites:{beforeFiles:[],afterFiles:[{source:"/api/:path*"},{source:"/hls/:path*"},{source:"/img/:path*"},{source:"/logo"},{source:"/thumbnail.jpg"}],fallback:[]},"/":[o,m,l,s,a,c,t,n,d,f,u,k,_,w,v,y,"static/chunks/8521-692724ee4f71b2cc.js",b,r,I,B,"static/css/6bff3b6897f92dfa.css","static/chunks/pages/index-0d85578a34b82e73.js"],"/_error":["static/chunks/pages/_error-f2496e8b9fdedb89.js"],"/admin":[s,a,c,e,i,t,n,d,h,k,"static/chunks/8676-58e1723c87a0d4ec.js","static/chunks/pages/admin-7f9372397fae0f4a.js"],"/admin/access-tokens":[s,a,c,e,i,"static/chunks/pages/admin/access-tokens-0f003278e5d82f26.js"],"/admin/actions":[s,a,c,e,"static/chunks/pages/admin/actions-e82ca8c824f98ea9.js"],"/admin/chat/messages":[F,s,a,c,e,i,d,A,D,"static/chunks/pages/admin/chat/messages-29386b71919e5b0e.js"],"/admin/chat/users":[F,s,a,c,e,i,t,d,A,D,"static/chunks/pages/admin/chat/users-f8e72b9282adc067.js"],"/admin/config-chat":["static/chunks/pages/admin/config-chat-826dceb82d133fca.js"],"/admin/config-federation":["static/chunks/1829-271cba4b38fde9a4.js","static/chunks/pages/admin/config-federation-08897e2247bf43bd.js"],"/admin/config-notify":["static/chunks/pages/admin/config-notify-f36f296594904599.js"],"/admin/config-public-details":[s,a,c,e,g,"static/css/1f5ee95fffd43a71.css","static/chunks/927-8d644c10fb3512bc.js",E,"static/chunks/pages/admin/config-public-details-bd1945cbb8417d7b.js"],"/admin/config-server-details":[L,"static/chunks/pages/admin/config-server-details-16e85ec1ac7c9ccd.js"],"/admin/config-social-items":[s,a,c,e,E,"static/chunks/pages/admin/config-social-items-59fc92ae79167bce.js"],"/admin/config-storage":["static/chunks/5473-185a5241676edf4a.js","static/chunks/pages/admin/config-storage-a04c6b9cc63b11fd.js"],"/admin/config-video":[s,a,c,e,L,"static/chunks/5283-2d68bcc9592d5eff.js","static/chunks/pages/admin/config-video-c061dbcfcd3c083c.js"],"/admin/federation/actions":[s,a,c,e,i,"static/chunks/pages/admin/federation/actions-71bae9cfde249988.js"],"/admin/federation/followers":[s,a,c,e,i,t,"static/chunks/pages/admin/federation/followers-55d337b7a6dc60c5.js"],"/admin/hardware-info":[j,i,t,n,h,p,g,"static/chunks/pages/admin/hardware-info-4574e94bc49c9046.js"],"/admin/help":[t,n,v,"static/chunks/9129-d700e99ec45974c3.js","static/chunks/pages/admin/help-d87a1368a8069047.js"],"/admin/logs":[s,a,c,e,i,k,"static/chunks/pages/admin/logs-d3b6ff3376163bd7.js"],"/admin/stream-health":[j,s,i,t,n,h,p,"static/chunks/pages/admin/stream-health-681b3896ade2a908.js"],"/admin/upgrade":[s,a,c,e,"static/chunks/9001-dfd80bc3c21b045b.js","static/chunks/pages/admin/upgrade-14176112f873422c.js"],"/admin/viewer-info":[j,s,a,c,e,i,t,n,d,h,p,g,"static/chunks/pages/admin/viewer-info-6a2fefb2a4a39b16.js"],"/admin/webhooks":[s,a,c,e,"static/chunks/pages/admin/webhooks-1531221c7b344c08.js"],"/embed/chat/readonly":[o,m,s,f,u,b,r,"static/css/01b3274e60562194.css","static/chunks/pages/embed/chat/readonly-689659f45499ee0e.js"],"/embed/chat/readwrite":[o,m,s,a,t,n,f,u,y,b,r,B,"static/css/2680a00f055152cc.css","static/chunks/pages/embed/chat/readwrite-6f8b99a091c946c1.js"],"/embed/video":[l,d,f,_,w,b,I,"static/css/8283b6095a0a048a.css","static/chunks/pages/embed/video-61510af0fd4d92ba.js"],sortedPages:["/","/_app","/_error","/admin","/admin/access-tokens","/admin/actions","/admin/chat/messages","/admin/chat/users","/admin/config-chat","/admin/config-federation","/admin/config-notify","/admin/config-public-details","/admin/config-server-details","/admin/config-social-items","/admin/config-storage","/admin/config-video","/admin/federation/actions","/admin/federation/followers","/admin/hardware-info","/admin/help","/admin/logs","/admin/stream-health","/admin/upgrade","/admin/viewer-info","/admin/webhooks","/embed/chat/readonly","/embed/chat/readwrite","/embed/video"]}}("static/chunks/7330-32e84a34fb851e34.js","static/chunks/3927-9952332edcb5e0b7.js","static/chunks/384-a0ac0849b5bd17bd.js","static/chunks/355-973d1ca2734bd5dc.js","static/chunks/8091-d7457a988f3f1d54.js","static/chunks/2944-fab178d3c2ba1b7b.js","static/chunks/6265-fff17a785cf4f99d.js","static/chunks/5938-b8bf626b6df6d168.js","static/chunks/9372-9a6ed970911222d5.js","static/chunks/1899-3287d98ffaf2a526.js","static/chunks/428-ef26494fcbdd358e.js","static/chunks/d3048c20-0576676e1017fabd.js","static/chunks/d2094a0f-509cdf8ee1cc9962.js","static/chunks/2865-5b660f2a14e4f34f.js","static/chunks/2429-35846a119e7209fe.js","static/chunks/143-21f7c0a7cdd8989c.js","static/chunks/7910-7248e2d1496cf795.js","static/chunks/3fff1979-612c6162f1b345ff.js","static/chunks/2139-c72b3a851c3b6fc9.js","static/chunks/d6e1aeb5-1e3969b413cccadf.js","static/css/7c735c05af084bb2.css","static/chunks/1681-2162c6bd027eb53a.js","static/chunks/1082-03ae605a1f81cbce.js","static/chunks/7900-a9ddaa4c2db8e5fa.js","static/chunks/2854-191152eb16ccb7f5.js","static/chunks/3052-3a4f3356a0055ed0.js","static/chunks/29107295-4a69275373f23f88.js","static/chunks/9189-f5c2ee9572c7654a.js","static/chunks/9640-a9765e176df0f25f.js","static/chunks/2877-4ee8a344719d3523.js","static/chunks/3286-25235a0b8b0401f3.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file +self.__BUILD_MANIFEST=function(s,a,c,i,e,t,n,d,f,b,h,o,m,u,k,r,g,j,p,l,_,w,v,y,I,B,F,A,D,E,L){return{__rewrites:{beforeFiles:[],afterFiles:[{source:"/api/:path*"},{source:"/hls/:path*"},{source:"/img/:path*"},{source:"/logo"},{source:"/thumbnail.jpg"}],fallback:[]},"/":[o,m,l,s,a,c,t,n,d,f,u,k,_,w,v,y,"static/chunks/8521-692724ee4f71b2cc.js",b,r,I,B,"static/css/6bff3b6897f92dfa.css","static/chunks/pages/index-0d85578a34b82e73.js"],"/_error":["static/chunks/pages/_error-f2496e8b9fdedb89.js"],"/admin":[s,a,c,i,e,t,n,d,h,k,"static/chunks/8676-58e1723c87a0d4ec.js","static/chunks/pages/admin-7f9372397fae0f4a.js"],"/admin/access-tokens":[s,a,c,i,e,"static/chunks/pages/admin/access-tokens-0f003278e5d82f26.js"],"/admin/actions":[s,a,c,i,"static/chunks/pages/admin/actions-e82ca8c824f98ea9.js"],"/admin/chat/messages":[F,s,a,c,i,e,d,A,D,"static/chunks/pages/admin/chat/messages-29386b71919e5b0e.js"],"/admin/chat/users":[F,s,a,c,i,e,t,d,A,D,"static/chunks/pages/admin/chat/users-f8e72b9282adc067.js"],"/admin/config-chat":["static/chunks/pages/admin/config-chat-826dceb82d133fca.js"],"/admin/config-federation":["static/chunks/1829-271cba4b38fde9a4.js","static/chunks/pages/admin/config-federation-08897e2247bf43bd.js"],"/admin/config-notify":["static/chunks/pages/admin/config-notify-f36f296594904599.js"],"/admin/config-public-details":[s,a,c,i,g,"static/css/1f5ee95fffd43a71.css","static/chunks/927-8d644c10fb3512bc.js",E,"static/chunks/pages/admin/config-public-details-bd1945cbb8417d7b.js"],"/admin/config-server-details":[L,"static/chunks/pages/admin/config-server-details-16e85ec1ac7c9ccd.js"],"/admin/config-social-items":[s,a,c,i,E,"static/chunks/pages/admin/config-social-items-59fc92ae79167bce.js"],"/admin/config-storage":["static/chunks/5473-185a5241676edf4a.js","static/chunks/pages/admin/config-storage-a04c6b9cc63b11fd.js"],"/admin/config-video":[s,a,c,i,L,"static/chunks/5283-2d68bcc9592d5eff.js","static/chunks/pages/admin/config-video-c061dbcfcd3c083c.js"],"/admin/federation/actions":[s,a,c,i,e,"static/chunks/pages/admin/federation/actions-71bae9cfde249988.js"],"/admin/federation/followers":[s,a,c,i,e,t,"static/chunks/pages/admin/federation/followers-55d337b7a6dc60c5.js"],"/admin/hardware-info":[j,e,t,n,h,p,g,"static/chunks/pages/admin/hardware-info-4574e94bc49c9046.js"],"/admin/help":[t,n,v,"static/chunks/9129-d700e99ec45974c3.js","static/chunks/pages/admin/help-d87a1368a8069047.js"],"/admin/logs":[s,a,c,i,e,k,"static/chunks/pages/admin/logs-d3b6ff3376163bd7.js"],"/admin/stream-health":[j,s,e,t,n,h,p,"static/chunks/pages/admin/stream-health-681b3896ade2a908.js"],"/admin/upgrade":[s,a,c,i,"static/chunks/9001-dfd80bc3c21b045b.js","static/chunks/pages/admin/upgrade-14176112f873422c.js"],"/admin/viewer-info":[j,s,a,c,i,e,t,n,d,h,p,g,"static/chunks/pages/admin/viewer-info-6a2fefb2a4a39b16.js"],"/admin/webhooks":[s,a,c,i,"static/chunks/pages/admin/webhooks-1531221c7b344c08.js"],"/embed/chat/readonly":[o,m,s,f,u,b,r,"static/css/01b3274e60562194.css","static/chunks/pages/embed/chat/readonly-689659f45499ee0e.js"],"/embed/chat/readwrite":[o,m,s,a,t,n,f,u,y,b,r,B,"static/css/2680a00f055152cc.css","static/chunks/pages/embed/chat/readwrite-6f8b99a091c946c1.js"],"/embed/video":[l,d,f,_,w,b,I,"static/css/8283b6095a0a048a.css","static/chunks/pages/embed/video-61510af0fd4d92ba.js"],sortedPages:["/","/_app","/_error","/admin","/admin/access-tokens","/admin/actions","/admin/chat/messages","/admin/chat/users","/admin/config-chat","/admin/config-federation","/admin/config-notify","/admin/config-public-details","/admin/config-server-details","/admin/config-social-items","/admin/config-storage","/admin/config-video","/admin/federation/actions","/admin/federation/followers","/admin/hardware-info","/admin/help","/admin/logs","/admin/stream-health","/admin/upgrade","/admin/viewer-info","/admin/webhooks","/embed/chat/readonly","/embed/chat/readwrite","/embed/video"]}}("static/chunks/7330-32e84a34fb851e34.js","static/chunks/3927-9952332edcb5e0b7.js","static/chunks/384-a0ac0849b5bd17bd.js","static/chunks/355-973d1ca2734bd5dc.js","static/chunks/8091-d7457a988f3f1d54.js","static/chunks/2944-fab178d3c2ba1b7b.js","static/chunks/6265-fff17a785cf4f99d.js","static/chunks/5938-b8bf626b6df6d168.js","static/chunks/9372-9a6ed970911222d5.js","static/chunks/1899-3287d98ffaf2a526.js","static/chunks/428-ef26494fcbdd358e.js","static/chunks/d3048c20-0576676e1017fabd.js","static/chunks/d2094a0f-e4988ec3c3ddbfcf.js","static/chunks/2865-5b660f2a14e4f34f.js","static/chunks/2429-35846a119e7209fe.js","static/chunks/143-21f7c0a7cdd8989c.js","static/chunks/7910-7248e2d1496cf795.js","static/chunks/3fff1979-612c6162f1b345ff.js","static/chunks/2139-c72b3a851c3b6fc9.js","static/chunks/d6e1aeb5-1e3969b413cccadf.js","static/css/7c735c05af084bb2.css","static/chunks/1681-2162c6bd027eb53a.js","static/chunks/1082-03ae605a1f81cbce.js","static/chunks/7900-a9ddaa4c2db8e5fa.js","static/chunks/2854-191152eb16ccb7f5.js","static/chunks/3052-3a4f3356a0055ed0.js","static/chunks/29107295-4a69275373f23f88.js","static/chunks/9189-f5c2ee9572c7654a.js","static/chunks/9640-a9765e176df0f25f.js","static/chunks/2877-4ee8a344719d3523.js","static/chunks/3286-25235a0b8b0401f3.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/static/web/_next/static/D6MW2mDcP3Umnh3fVCOsV/_ssgManifest.js b/static/web/_next/static/nRbKPlGxaKLVNjCdZ6ouF/_ssgManifest.js similarity index 100% rename from static/web/_next/static/D6MW2mDcP3Umnh3fVCOsV/_ssgManifest.js rename to static/web/_next/static/nRbKPlGxaKLVNjCdZ6ouF/_ssgManifest.js diff --git a/static/web/admin/access-tokens/index.html b/static/web/admin/access-tokens/index.html index 7b954b15b..a3d6c2f23 100644 --- a/static/web/admin/access-tokens/index.html +++ b/static/web/admin/access-tokens/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Access Tokens

Access tokens are used to allow external, 3rd party tools to perform specific actions on your Owncast server. They should be kept secure and never included in client code, instead they should be kept on a server that you control.
Read more about how to use these tokens, with examples, at our documentation.
NameTokenScopesLast Used
No Data

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Access Tokens

Access tokens are used to allow external, 3rd party tools to perform specific actions on your Owncast server. They should be kept secure and never included in client code, instead they should be kept on a server that you control.
Read more about how to use these tokens, with examples, at our documentation.
NameTokenScopesLast Used
No Data

\ No newline at end of file diff --git a/static/web/admin/actions/index.html b/static/web/admin/actions/index.html index 32755613f..1f6258f8c 100644 --- a/static/web/admin/actions/index.html +++ b/static/web/admin/actions/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

External Actions

External action URLs are 3rd party UI you can display, embedded, into your Owncast page when a user clicks on a button to launch your action.
Read more about how to use actions, with examples, at our documentation.
NameDescriptionURLIconColorOpens
No Data

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

External Actions

External action URLs are 3rd party UI you can display, embedded, into your Owncast page when a user clicks on a button to launch your action.
Read more about how to use actions, with examples, at our documentation.
NameDescriptionURLIconColorOpens
No Data

\ No newline at end of file diff --git a/static/web/admin/chat/messages/index.html b/static/web/admin/chat/messages/index.html index e09169d29..1c2e50d3f 100644 --- a/static/web/admin/chat/messages/index.html +++ b/static/web/admin/chat/messages/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Chat Messages

Manage the messages from viewers that show up on your stream.

Check multiple messages to change their visibility to:
Time
User
Message
No Data
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Chat Messages

Manage the messages from viewers that show up on your stream.

Check multiple messages to change their visibility to:
Time
User
Message
No Data
\ No newline at end of file diff --git a/static/web/admin/chat/users/index.html b/static/web/admin/chat/users/index.html index c54e58480..1f0750ada 100644 --- a/static/web/admin/chat/users/index.html +++ b/static/web/admin/chat/users/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

When a stream is active and chat is enabled, connected chat clients will be displayed here.

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

When a stream is active and chat is enabled, connected chat clients will be displayed here.

\ No newline at end of file diff --git a/static/web/admin/config-chat/index.html b/static/web/admin/config-chat/index.html index 4998e69f8..47e5de718 100644 --- a/static/web/admin/config-chat/index.html +++ b/static/web/admin/config-chat/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file diff --git a/static/web/admin/config-federation/index.html b/static/web/admin/config-federation/index.html index 6f2d0791e..f99332bc9 100644 --- a/static/web/admin/config-federation/index.html +++ b/static/web/admin/config-federation/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file diff --git a/static/web/admin/config-notify/index.html b/static/web/admin/config-notify/index.html index 50c9b7abc..fd21e9538 100644 --- a/static/web/admin/config-notify/index.html +++ b/static/web/admin/config-notify/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Notifications

Let your viewers know when you go live by supporting any of the below notification channels. Learn more about live notifications.


The full url to your Owncast server is required to enable social features. Must use SSL (https). Once people start following your instance you should not change this.

The full url to your Owncast server is required to enable social features. Must use SSL (https). Once people start following your instance you should not change this.

Browser Alerts

Viewers can opt into being notified when you go live with their browser.

Not all browsers support this.

Enable browser notifications

The text to send when you go live.

Twitter

Let your Twitter followers know each time you go live.

Enable Twitter

The text to send when you go live.

Discord

Let your Discord channel know each time you go live.

Create a webhook under Edit Channel / Integrations on your Discord channel and provide it below.

Enable Discord

The webhook assigned to your channel.

The text to send when you go live.

Fediverse Social

Enabling the Fediverse social features will not just alert people to when you go live, but also enable other functionality.

Fediverse social features: Disabled

Configure

Custom

Build your own notifications by using custom webhooks.

Create
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Notifications

Let your viewers know when you go live by supporting any of the below notification channels. Learn more about live notifications.


The full url to your Owncast server is required to enable social features. Must use SSL (https). Once people start following your instance you should not change this.

The full url to your Owncast server is required to enable social features. Must use SSL (https). Once people start following your instance you should not change this.

Browser Alerts

Viewers can opt into being notified when you go live with their browser.

Not all browsers support this.

Enable browser notifications

The text to send when you go live.

Twitter

Let your Twitter followers know each time you go live.

Enable Twitter

The text to send when you go live.

Discord

Let your Discord channel know each time you go live.

Create a webhook under Edit Channel / Integrations on your Discord channel and provide it below.

Enable Discord

The webhook assigned to your channel.

The text to send when you go live.

Fediverse Social

Enabling the Fediverse social features will not just alert people to when you go live, but also enable other functionality.

Fediverse social features: Disabled

Configure

Custom

Build your own notifications by using custom webhooks.

Create
\ No newline at end of file diff --git a/static/web/admin/config-public-details/index.html b/static/web/admin/config-public-details/index.html index c08c6934a..b36607f64 100644 --- a/static/web/admin/config-public-details/index.html +++ b/static/web/admin/config-public-details/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

General Settings

The following are displayed on your site to describe your stream and its content. Learn more.

Custom Page Content

Edit the content of your page by using simple Markdown syntax.


Customize your page styling with CSS

Customize the look and feel of your Owncast instance by overriding the CSS styles of various components on the page. Refer to the CSS & Components guide.

Please input plain CSS text, as this will be directly injected onto your page during load.


\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

General Settings

The following are displayed on your site to describe your stream and its content. Learn more.

Custom Page Content

Edit the content of your page by using simple Markdown syntax.


Customize your page styling with CSS

Customize the look and feel of your Owncast instance by overriding the CSS styles of various components on the page. Refer to the CSS & Components guide.

Please input plain CSS text, as this will be directly injected onto your page during load.


\ No newline at end of file diff --git a/static/web/admin/config-server-details/index.html b/static/web/admin/config-server-details/index.html index cde8ca76b..e4f8ca4cf 100644 --- a/static/web/admin/config-server-details/index.html +++ b/static/web/admin/config-server-details/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Server Settings

You should change your stream key from the default and keep it safe. For most people it's likely the other settings will not need to be changed.

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Server Settings

You should change your stream key from the default and keep it safe. For most people it's likely the other settings will not need to be changed.

\ No newline at end of file diff --git a/static/web/admin/config-social-items/index.html b/static/web/admin/config-social-items/index.html index c54cf52de..5e9372090 100644 --- a/static/web/admin/config-social-items/index.html +++ b/static/web/admin/config-social-items/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Social Items

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Social Items

\ No newline at end of file diff --git a/static/web/admin/config-storage/index.html b/static/web/admin/config-storage/index.html index 5bb6dca57..539d7f028 100644 --- a/static/web/admin/config-storage/index.html +++ b/static/web/admin/config-storage/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Storage

Owncast supports optionally using external storage providers to stream your video. Learn more about this by visiting our Storage Documentation.

Configuring this incorrectly will likely cause your video to be unplayable. Double check the documentation for your storage provider on how to configure the bucket you created for Owncast.

Keep in mind this is for live streaming, not for archival, recording or VOD purposes.

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Storage

Owncast supports optionally using external storage providers to stream your video. Learn more about this by visiting our Storage Documentation.

Configuring this incorrectly will likely cause your video to be unplayable. Double check the documentation for your storage provider on how to configure the bucket you created for Owncast.

Keep in mind this is for live streaming, not for archival, recording or VOD purposes.

\ No newline at end of file diff --git a/static/web/admin/config-video/index.html b/static/web/admin/config-video/index.html index a42b2b728..ff8e823f3 100644 --- a/static/web/admin/config-video/index.html +++ b/static/web/admin/config-video/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Video configuration

Before changing your video configuration visit the video documentation to learn how it impacts your stream performance. The general rule is to start conservatively by having one middle quality stream output variant and experiment with adding more of varied qualities.

Stream output

NameVideo bitrateCPU Usage
No name800 kbpsMedium

Latency Buffer

While it's natural to want to keep your latency as low as possible, you may experience reduced error tolerance and stability the lower you go. The lowest setting is not recommended.

For interactive live streams you may want to experiment with a lower latency, for non-interactive broadcasts you may want to increase it. Read to learn more.

LowestHighest

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Video configuration

Before changing your video configuration visit the video documentation to learn how it impacts your stream performance. The general rule is to start conservatively by having one middle quality stream output variant and experiment with adding more of varied qualities.

Stream output

NameVideo bitrateCPU Usage
No name800 kbpsMedium

Latency Buffer

While it's natural to want to keep your latency as low as possible, you may experience reduced error tolerance and stability the lower you go. The lowest setting is not recommended.

For interactive live streams you may want to experiment with a lower latency, for non-interactive broadcasts you may want to increase it. Read to learn more.

LowestHighest

\ No newline at end of file diff --git a/static/web/admin/federation/actions/index.html b/static/web/admin/federation/actions/index.html index d568edb25..f71438772 100644 --- a/static/web/admin/federation/actions/index.html +++ b/static/web/admin/federation/actions/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Fediverse Actions

Below is a list of actions that were taken by others in response to your posts as well as people who requested to follow you.
ActionFromWhen
No Data
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Fediverse Actions

Below is a list of actions that were taken by others in response to your posts as well as people who requested to follow you.
ActionFromWhen
No Data
\ No newline at end of file diff --git a/static/web/admin/federation/followers/index.html b/static/web/admin/federation/followers/index.html index 7afc8e487..cd967863b 100644 --- a/static/web/admin/federation/followers/index.html +++ b/static/web/admin/federation/followers/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

The following accounts get notified when you go live or send a post.

NameURL
Added
Remove
No Data
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

The following accounts get notified when you go live or send a post.

NameURL
Added
Remove
No Data
\ No newline at end of file diff --git a/static/web/admin/hardware-info/index.html b/static/web/admin/hardware-info/index.html index f1e386c57..d0244ab80 100644 --- a/static/web/admin/hardware-info/index.html +++ b/static/web/admin/hardware-info/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Hardware Info


CPU
0%
Memory
0%
Disk
0%
Loading...
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Hardware Info


CPU
0%
Memory
0%
Disk
0%
Loading...
\ No newline at end of file diff --git a/static/web/admin/help/index.html b/static/web/admin/help/index.html index b39b35d89..982b827ad 100644 --- a/static/web/admin/help/index.html +++ b/static/web/admin/help/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

How can we help you?

Troubleshooting

Fix your problems

Documentation

Read the Docs

Common tasks

I want to configure my owncast instance
Help configuring my broadcasting software
I want to embed my stream into another site
I want to customize my website
I want to tweak my video output
I want to use an external storage provider

Other

I found a bug
If you found a bug, then please let us know
I have a general question
Most general questions are answered in our FAQ or exist in our discussions
I want to build add-ons for Owncast
You can build your own bots, overlays, tools and add-ons with our developer APIs. 
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

How can we help you?

Troubleshooting

Fix your problems

Documentation

Read the Docs

Common tasks

I want to configure my owncast instance
Help configuring my broadcasting software
I want to embed my stream into another site
I want to customize my website
I want to tweak my video output
I want to use an external storage provider

Other

I found a bug
If you found a bug, then please let us know
I have a general question
Most general questions are answered in our FAQ or exist in our discussions
I want to build add-ons for Owncast
You can build your own bots, overlays, tools and add-ons with our developer APIs. 
\ No newline at end of file diff --git a/static/web/admin/index.html b/static/web/admin/index.html index c10c70ed4..ea7452dea 100644 --- a/static/web/admin/index.html +++ b/static/web/admin/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

No stream is active

You should start one.

Use your broadcasting software
Chat is disabled
Chat will continue to be disabled until you begin a live stream.
Find an audience on the Owncast Directory
List yourself in the Owncast Directory and show off your stream. Enable it in settings.
fediverse
Add your Owncast instance to the Fediverse
Enable Owncast social features to have your instance join the Fediverse, allowing people to follow, share and engage with your live stream.

News & Updates from Owncast

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

No stream is active

You should start one.

Use your broadcasting software
Chat is disabled
Chat will continue to be disabled until you begin a live stream.
Find an audience on the Owncast Directory
List yourself in the Owncast Directory and show off your stream. Enable it in settings.
fediverse
Add your Owncast instance to the Fediverse
Enable Owncast social features to have your instance join the Fediverse, allowing people to follow, share and engage with your live stream.

News & Updates from Owncast

\ No newline at end of file diff --git a/static/web/admin/logs/index.html b/static/web/admin/logs/index.html index c4e5b2ce2..cff1f6cdb 100644 --- a/static/web/admin/logs/index.html +++ b/static/web/admin/logs/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file diff --git a/static/web/admin/stream-health/index.html b/static/web/admin/stream-health/index.html index 3512b9772..00b517b81 100644 --- a/static/web/admin/stream-health/index.html +++ b/static/web/admin/stream-health/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Stream Performance

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Stream Performance

\ No newline at end of file diff --git a/static/web/admin/upgrade/index.html b/static/web/admin/upgrade/index.html index 10fc2b127..385ec65dc 100644 --- a/static/web/admin/upgrade/index.html +++ b/static/web/admin/upgrade/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Thu Jan 01 1970

Downloads

NameSize
No Data
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Thu Jan 01 1970

Downloads

NameSize
No Data
\ No newline at end of file diff --git a/static/web/admin/viewer-info/index.html b/static/web/admin/viewer-info/index.html index ee48b6cdd..b535c51fe 100644 --- a/static/web/admin/viewer-info/index.html +++ b/static/web/admin/viewer-info/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Viewer Info


Max viewers last stream
0
All-time max viewers
0
User AgentLocation
Watch Time
No Data
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Viewer Info


Max viewers last stream
0
All-time max viewers
0
User AgentLocation
Watch Time
No Data
\ No newline at end of file diff --git a/static/web/admin/webhooks/index.html b/static/web/admin/webhooks/index.html index 425f729e1..9f87ec845 100644 --- a/static/web/admin/webhooks/index.html +++ b/static/web/admin/webhooks/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Webhooks

A webhook is a callback made to an external API in response to an event that takes place within Owncast. This can be used to build chat bots or sending automatic notifications that you've started streaming.
Read more about how to use webhooks, with examples, at our documentation.
URLEvents
No Data

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Webhooks

A webhook is a callback made to an external API in response to an event that takes place within Owncast. This can be used to build chat bots or sending automatic notifications that you've started streaming.
Read more about how to use webhooks, with examples, at our documentation.
URLEvents
No Data

\ No newline at end of file diff --git a/static/web/embed/chat/readonly/index.html b/static/web/embed/chat/readonly/index.html index f1568cff0..0cee2e3c7 100644 --- a/static/web/embed/chat/readonly/index.html +++ b/static/web/embed/chat/readonly/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/static/web/embed/chat/readwrite/index.html b/static/web/embed/chat/readwrite/index.html index 2a8ad46d0..dbcf8db11 100644 --- a/static/web/embed/chat/readwrite/index.html +++ b/static/web/embed/chat/readwrite/index.html @@ -1 +1 @@ -

Chat message goes here...

\ No newline at end of file +

Chat message goes here...

\ No newline at end of file diff --git a/static/web/embed/video/index.html b/static/web/embed/video/index.html index 7695e67f6..bad9081f0 100644 --- a/static/web/embed/video/index.html +++ b/static/web/embed/video/index.html @@ -1 +1 @@ -
Stream is offline text goes here.
Offline
\ No newline at end of file +
Stream is offline text goes here.
Offline
\ No newline at end of file diff --git a/static/web/index.html b/static/web/index.html index bb5ede17c..3b63d996c 100644 --- a/static/web/index.html +++ b/static/web/index.html @@ -1,4 +1,4 @@
Chat offline
Offline
Logo
Preview
\ No newline at end of file +
Chat offline
Offline
Logo
Preview
\ No newline at end of file