From c2a6624a857f953a20eac2d8079ce97a47499e0c Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 18 Dec 2023 12:50:04 +0100 Subject: [PATCH] Fix editor. --- backend/src/Squidex/wwwroot/editor/squidex-editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/Squidex/wwwroot/editor/squidex-editor.js b/backend/src/Squidex/wwwroot/editor/squidex-editor.js index d6c8ae2be0..1cf1440169 100644 --- a/backend/src/Squidex/wwwroot/editor/squidex-editor.js +++ b/backend/src/Squidex/wwwroot/editor/squidex-editor.js @@ -104,7 +104,7 @@ If you are using Node.js, you can install JSDOM and Remirror will try to use it `+o[s].replace(" at new "," at ");return t.displayName&&a.includes("")&&(a=a.replace("",t.displayName)),a}while(1<=s&&0<=l);break}}}finally{w1=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?dd(t):""}function rq(t){switch(t.tag){case 5:return dd(t.type);case 16:return dd("Lazy");case 13:return dd("Suspense");case 19:return dd("SuspenseList");case 0:case 2:case 15:return t=x1(t.type,!1),t;case 11:return t=x1(t.type.render,!1),t;case 1:return t=x1(t.type,!0),t;default:return""}}function ey(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case sc:return"Fragment";case ic:return"Portal";case Z0:return"Profiler";case Cw:return"StrictMode";case Q0:return"Suspense";case J0:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case bO:return(t.displayName||"Context")+".Consumer";case yO:return(t._context.displayName||"Context")+".Provider";case Tw:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Aw:return e=t.displayName||null,e!==null?e:ey(t.type)||"Memo";case ys:e=t._payload,t=t._init;try{return ey(t(e))}catch{}}return null}function oq(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ey(e);case 8:return e===Cw?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function qs(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function xO(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function iq(t){var e=xO(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Df(t){t._valueTracker||(t._valueTracker=iq(t))}function kO(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=xO(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function fg(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function ty(t,e){var n=e.checked;return Ht({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function aT(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=qs(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function EO(t,e){e=e.checked,e!=null&&Sw(t,"checked",e,!1)}function ny(t,e){EO(t,e);var n=qs(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?ry(t,e.type,n):e.hasOwnProperty("defaultValue")&&ry(t,e.type,qs(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function lT(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function ry(t,e,n){(e!=="number"||fg(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var hd=Array.isArray;function Ec(t,e,n,r){if(t=t.options,e){e={};for(var o=0;o"+e.valueOf().toString()+"",e=Pf.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function nh(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var _d={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},sq=["Webkit","ms","Moz","O"];Object.keys(_d).forEach(function(t){sq.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),_d[e]=_d[t]})});function AO(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||_d.hasOwnProperty(t)&&_d[t]?(""+e).trim():e+"px"}function _O(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=AO(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,o):t[n]=o}}var aq=Ht({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function sy(t,e){if(e){if(aq[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ne(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ne(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ne(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ne(62))}}function ay(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ly=null;function _w(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var cy=null,Sc=null,Cc=null;function dT(t){if(t=nf(t)){if(typeof cy!="function")throw Error(ne(280));var e=t.stateNode;e&&(e=$m(e),cy(t.stateNode,t.type,e))}}function RO(t){Sc?Cc?Cc.push(t):Cc=[t]:Sc=t}function MO(){if(Sc){var t=Sc,e=Cc;if(Cc=Sc=null,dT(t),e)for(t=0;t>>=0,t===0?32:31-(yq(t)/bq|0)|0}var zf=64,Ff=4194304;function fd(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function vg(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,o=t.suspendedLanes,i=t.pingedLanes,s=n&268435455;if(s!==0){var l=s&~o;l!==0?r=fd(l):(i&=s,i!==0&&(r=fd(i)))}else s=n&~o,s!==0?r=fd(s):i!==0&&(r=fd(i));if(r===0)return 0;if(e!==0&&e!==r&&!(e&o)&&(o=r&-r,i=e&-e,o>=i||o===16&&(i&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function ef(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Ho(e),t[e]=n}function Eq(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=Md),wT=String.fromCharCode(32),xT=!1;function qO(t,e){switch(t){case"keyup":return Zq.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ZO(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ac=!1;function Jq(t,e){switch(t){case"compositionend":return ZO(e);case"keypress":return e.which!==32?null:(xT=!0,wT);case"textInput":return t=e.data,t===wT&&xT?null:t;default:return null}}function eZ(t,e){if(ac)return t==="compositionend"||!Dw&&qO(t,e)?(t=YO(),Sp=Lw=Ts=null,ac=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=CT(n)}}function tI(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?tI(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function nI(){for(var t=window,e=fg();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=fg(t.document)}return e}function Pw(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function cZ(t){var e=nI(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&tI(n.ownerDocument.documentElement,n)){if(r!==null&&Pw(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!t.extend&&i>r&&(o=r,r=i,i=o),o=TT(n,i);var s=TT(n,r);o&&s&&(t.rangeCount!==1||t.anchorNode!==o.node||t.anchorOffset!==o.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(o.node,o.offset),t.removeAllRanges(),i>r?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,lc=null,gy=null,Id=null,my=!1;function AT(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;my||lc==null||lc!==fg(r)||(r=lc,"selectionStart"in r&&Pw(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Id&&lh(Id,r)||(Id=r,r=wg(gy,"onSelect"),0dc||(t.current=ky[dc],ky[dc]=null,dc--)}function Et(t,e){dc++,ky[dc]=t.current,t.current=e}var Zs={},Xn=la(Zs),Sr=la(!1),ol=Zs;function jc(t,e){var n=t.type.contextTypes;if(!n)return Zs;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=e[i];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=o),o}function Cr(t){return t=t.childContextTypes,t!=null}function kg(){_t(Sr),_t(Xn)}function NT(t,e,n){if(Xn.current!==Zs)throw Error(ne(168));Et(Xn,e),Et(Sr,n)}function dI(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in e))throw Error(ne(108,oq(t)||"Unknown",o));return Ht({},n,r)}function Eg(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Zs,ol=Xn.current,Et(Xn,t),Et(Sr,Sr.current),!0}function $T(t,e,n){var r=t.stateNode;if(!r)throw Error(ne(169));n?(t=dI(t,e,ol),r.__reactInternalMemoizedMergedChildContext=t,_t(Sr),_t(Xn),Et(Xn,t)):_t(Sr),Et(Sr,n)}var Ii=null,Dm=!1,$1=!1;function hI(t){Ii===null?Ii=[t]:Ii.push(t)}function xZ(t){Dm=!0,hI(t)}function ca(){if(!$1&&Ii!==null){$1=!0;var t=0,e=ft;try{var n=Ii;for(ft=1;t>=s,o-=s,zi=1<<32-Ho(e)+o|n<T?(C=S,S=null):C=S.sibling;var I=h(v,S,b[T],w);if(I===null){S===null&&(S=C);break}t&&S&&I.alternate===null&&e(v,S),y=i(I,y,T),x===null?k=I:x.sibling=I,x=I,S=C}if(T===b.length)return n(v,S),Ot&&Sa(v,T),k;if(S===null){for(;TT?(C=S,S=null):C=S.sibling;var _=h(v,S,I.value,w);if(_===null){S===null&&(S=C);break}t&&S&&_.alternate===null&&e(v,S),y=i(_,y,T),x===null?k=_:x.sibling=_,x=_,S=C}if(I.done)return n(v,S),Ot&&Sa(v,T),k;if(S===null){for(;!I.done;T++,I=b.next())I=d(v,I.value,w),I!==null&&(y=i(I,y,T),x===null?k=I:x.sibling=I,x=I);return Ot&&Sa(v,T),k}for(S=r(v,S);!I.done;T++,I=b.next())I=f(S,v,T,I.value,w),I!==null&&(t&&I.alternate!==null&&S.delete(I.key===null?T:I.key),y=i(I,y,T),x===null?k=I:x.sibling=I,x=I);return t&&S.forEach(function(R){return e(v,R)}),Ot&&Sa(v,T),k}function m(v,y,b,w){if(typeof b=="object"&&b!==null&&b.type===sc&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case $f:e:{for(var k=b.key,x=y;x!==null;){if(x.key===k){if(k=b.type,k===sc){if(x.tag===7){n(v,x.sibling),y=o(x,b.props.children),y.return=v,v=y;break e}}else if(x.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===ys&&UT(k)===x.type){n(v,x.sibling),y=o(x,b.props),y.ref=Lu(v,x,b),y.return=v,v=y;break e}n(v,x);break}else e(v,x);x=x.sibling}b.type===sc?(y=Xa(b.props.children,v.mode,w,b.key),y.return=v,v=y):(w=Ip(b.type,b.key,b.props,null,v.mode,w),w.ref=Lu(v,y,b),w.return=v,v=w)}return s(v);case ic:e:{for(x=b.key;y!==null;){if(y.key===x)if(y.tag===4&&y.stateNode.containerInfo===b.containerInfo&&y.stateNode.implementation===b.implementation){n(v,y.sibling),y=o(y,b.children||[]),y.return=v,v=y;break e}else{n(v,y);break}else e(v,y);y=y.sibling}y=W1(b,v.mode,w),y.return=v,v=y}return s(v);case ys:return x=b._init,m(v,y,x(b._payload),w)}if(hd(b))return p(v,y,b,w);if(_u(b))return g(v,y,b,w);Gf(v,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,y!==null&&y.tag===6?(n(v,y.sibling),y=o(y,b),y.return=v,v=y):(n(v,y),y=U1(b,v.mode,w),y.return=v,v=y),s(v)):n(v,y)}return m}var Kc=wI(!0),xI=wI(!1),rf={},ui=la(rf),hh=la(rf),fh=la(rf);function Ha(t){if(t===rf)throw Error(ne(174));return t}function Gw(t,e){switch(Et(fh,e),Et(hh,t),Et(ui,rf),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:iy(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=iy(e,t)}_t(ui),Et(ui,e)}function Yc(){_t(ui),_t(hh),_t(fh)}function kI(t){Ha(fh.current);var e=Ha(ui.current),n=iy(e,t.type);e!==n&&(Et(hh,t),Et(ui,n))}function Kw(t){hh.current===t&&(_t(ui),_t(hh))}var Pt=la(0);function Rg(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var D1=[];function Yw(){for(var t=0;tn?n:4,t(!0);var r=P1.transition;P1.transition={};try{t(!1),e()}finally{ft=n,P1.transition=r}}function zI(){return wo().memoizedState}function CZ(t,e,n){var r=Fs(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},FI(t))BI(e,n);else if(n=mI(t,e,n,r),n!==null){var o=sr();Uo(n,t,r,o),HI(n,e,r)}}function TZ(t,e,n){var r=Fs(t),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(FI(t))BI(e,o);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var s=e.lastRenderedState,l=i(s,n);if(o.hasEagerState=!0,o.eagerState=l,jo(l,s)){var a=e.interleaved;a===null?(o.next=o,Vw(e)):(o.next=a.next,a.next=o),e.interleaved=o;return}}catch{}finally{}n=mI(t,e,o,r),n!==null&&(o=sr(),Uo(n,t,r,o),HI(n,e,r))}}function FI(t){var e=t.alternate;return t===Ft||e!==null&&e===Ft}function BI(t,e){Ld=Mg=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function HI(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Mw(t,n)}}var Og={readContext:bo,useCallback:Hn,useContext:Hn,useEffect:Hn,useImperativeHandle:Hn,useInsertionEffect:Hn,useLayoutEffect:Hn,useMemo:Hn,useReducer:Hn,useRef:Hn,useState:Hn,useDebugValue:Hn,useDeferredValue:Hn,useTransition:Hn,useMutableSource:Hn,useSyncExternalStore:Hn,useId:Hn,unstable_isNewReconciler:!1},AZ={readContext:bo,useCallback:function(t,e){return Jo().memoizedState=[t,e===void 0?null:e],t},useContext:bo,useEffect:VT,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,_p(4194308,4,LI.bind(null,e,t),n)},useLayoutEffect:function(t,e){return _p(4194308,4,t,e)},useInsertionEffect:function(t,e){return _p(4,2,t,e)},useMemo:function(t,e){var n=Jo();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Jo();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=CZ.bind(null,Ft,t),[r.memoizedState,t]},useRef:function(t){var e=Jo();return t={current:t},e.memoizedState=t},useState:WT,useDebugValue:Jw,useDeferredValue:function(t){return Jo().memoizedState=t},useTransition:function(){var t=WT(!1),e=t[0];return t=SZ.bind(null,t[1]),Jo().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Ft,o=Jo();if(Ot){if(n===void 0)throw Error(ne(407));n=n()}else{if(n=e(),kn===null)throw Error(ne(349));sl&30||CI(r,e,n)}o.memoizedState=n;var i={value:n,getSnapshot:e};return o.queue=i,VT(AI.bind(null,r,i,t),[t]),r.flags|=2048,mh(9,TI.bind(null,r,i,n,e),void 0,null),n},useId:function(){var t=Jo(),e=kn.identifierPrefix;if(Ot){var n=Fi,r=zi;n=(r&~(1<<32-Ho(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=ph++,0<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=s.createElement(n,{is:r.is}):(t=s.createElement(n),n==="select"&&(s=t,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):t=s.createElementNS(t,n),t[ri]=e,t[dh]=r,qI(t,e,!1,!1),e.stateNode=t;e:{switch(s=ay(n,r),n){case"dialog":At("cancel",t),At("close",t),o=r;break;case"iframe":case"object":case"embed":At("load",t),o=r;break;case"video":case"audio":for(o=0;oqc&&(e.flags|=128,r=!0,Nu(i,!1),e.lanes=4194304)}else{if(!r)if(t=Rg(s),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Nu(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Ot)return Un(e),null}else 2*Yt()-i.renderingStartTime>qc&&n!==1073741824&&(e.flags|=128,r=!0,Nu(i,!1),e.lanes=4194304);i.isBackwards?(s.sibling=e.child,e.child=s):(n=i.last,n!==null?n.sibling=s:e.child=s,i.last=s)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Yt(),e.sibling=null,n=Pt.current,Et(Pt,r?n&1|2:n&1),e):(Un(e),null);case 22:case 23:return ix(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Fr&1073741824&&(Un(e),e.subtreeFlags&6&&(e.flags|=8192)):Un(e),null;case 24:return null;case 25:return null}throw Error(ne(156,e.tag))}function $Z(t,e){switch(Fw(e),e.tag){case 1:return Cr(e.type)&&kg(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Yc(),_t(Sr),_t(Xn),Yw(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Kw(e),null;case 13:if(_t(Pt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ne(340));Gc()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return _t(Pt),null;case 4:return Yc(),null;case 10:return Ww(e.type._context),null;case 22:case 23:return ix(),null;case 24:return null;default:return null}}var Yf=!1,Kn=!1,DZ=typeof WeakSet=="function"?WeakSet:Set,pe=null;function gc(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){jt(t,e,r)}else n.current=null}function Ny(t,e,n){try{n()}catch(r){jt(t,e,r)}}var JT=!1;function PZ(t,e){if(vy=yg,t=nI(),Pw(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,c=0,d=t,h=null;t:for(;;){for(var f;d!==n||o!==0&&d.nodeType!==3||(l=s+o),d!==i||r!==0&&d.nodeType!==3||(a=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(f=d.firstChild)!==null;)h=d,d=f;for(;;){if(d===t)break t;if(h===n&&++u===o&&(l=s),h===i&&++c===r&&(a=s),(f=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=f}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(yy={focusedElem:t,selectionRange:n},yg=!1,pe=e;pe!==null;)if(e=pe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,pe=t;else for(;pe!==null;){e=pe;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,m=p.memoizedState,v=e.stateNode,y=v.getSnapshotBeforeUpdate(e.elementType===e.type?g:Lo(e.type,g),m);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=e.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(w){jt(e,e.return,w)}if(t=e.sibling,t!==null){t.return=e.return,pe=t;break}pe=e.return}return p=JT,JT=!1,p}function Nd(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&t)===t){var i=o.destroy;o.destroy=void 0,i!==void 0&&Ny(e,n,i)}o=o.next}while(o!==r)}}function Fm(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function $y(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function JI(t){var e=t.alternate;e!==null&&(t.alternate=null,JI(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[ri],delete e[dh],delete e[xy],delete e[bZ],delete e[wZ])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function eL(t){return t.tag===5||t.tag===3||t.tag===4}function eA(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||eL(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Dy(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=xg));else if(r!==4&&(t=t.child,t!==null))for(Dy(t,e,n),t=t.sibling;t!==null;)Dy(t,e,n),t=t.sibling}function Py(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(Py(t,e,n),t=t.sibling;t!==null;)Py(t,e,n),t=t.sibling}var On=null,No=!1;function ls(t,e,n){for(n=n.child;n!==null;)tL(t,e,n),n=n.sibling}function tL(t,e,n){if(ci&&typeof ci.onCommitFiberUnmount=="function")try{ci.onCommitFiberUnmount(Om,n)}catch{}switch(n.tag){case 5:Kn||gc(n,e);case 6:var r=On,o=No;On=null,ls(t,e,n),On=r,No=o,On!==null&&(No?(t=On,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):On.removeChild(n.stateNode));break;case 18:On!==null&&(No?(t=On,n=n.stateNode,t.nodeType===8?N1(t.parentNode,n):t.nodeType===1&&N1(t,n),sh(t)):N1(On,n.stateNode));break;case 4:r=On,o=No,On=n.stateNode.containerInfo,No=!0,ls(t,e,n),On=r,No=o;break;case 0:case 11:case 14:case 15:if(!Kn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&Ny(n,e,s),o=o.next}while(o!==r)}ls(t,e,n);break;case 1:if(!Kn&&(gc(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){jt(n,e,l)}ls(t,e,n);break;case 21:ls(t,e,n);break;case 22:n.mode&1?(Kn=(r=Kn)||n.memoizedState!==null,ls(t,e,n),Kn=r):ls(t,e,n);break;default:ls(t,e,n)}}function tA(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new DZ),e.forEach(function(r){var o=GZ.bind(null,t,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Ro(t,e){var n=e.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=Yt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*FZ(r/1960))-r,10t?16:t,As===null)var r=!1;else{if(t=As,As=null,Ng=0,Ye&6)throw Error(ne(331));var o=Ye;for(Ye|=4,pe=t.current;pe!==null;){var i=pe,s=i.child;if(pe.flags&16){var l=i.deletions;if(l!==null){for(var a=0;aYt()-rx?Ya(t,0):nx|=n),Tr(t,e)}function cL(t,e){e===0&&(t.mode&1?(e=Ff,Ff<<=1,!(Ff&130023424)&&(Ff=4194304)):e=1);var n=sr();t=Gi(t,e),t!==null&&(ef(t,e,n),Tr(t,n))}function jZ(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),cL(t,n)}function GZ(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,o=t.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(ne(314))}r!==null&&r.delete(e),cL(t,n)}var uL;uL=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Sr.current)xr=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return xr=!1,LZ(t,e,n);xr=!!(t.flags&131072)}else xr=!1,Ot&&e.flags&1048576&&fI(e,Cg,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;Rp(t,e),t=e.pendingProps;var o=jc(e,Xn.current);Ac(e,n),o=qw(null,e,r,t,o,n);var i=Zw();return e.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Cr(r)?(i=!0,Eg(e)):i=!1,e.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,jw(e),o.updater=Pm,e.stateNode=o,o._reactInternals=e,Ay(e,r,t,n),e=My(null,e,r,!0,i,n)):(e.tag=0,Ot&&i&&zw(e),nr(null,e,o,n),e=e.child),e;case 16:r=e.elementType;e:{switch(Rp(t,e),t=e.pendingProps,o=r._init,r=o(r._payload),e.type=r,o=e.tag=YZ(r),t=Lo(r,t),o){case 0:e=Ry(null,e,r,t,n);break e;case 1:e=qT(null,e,r,t,n);break e;case 11:e=YT(null,e,r,t,n);break e;case 14:e=XT(null,e,r,Lo(r.type,t),n);break e}throw Error(ne(306,r,""))}return e;case 0:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:Lo(r,o),Ry(t,e,r,o,n);case 1:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:Lo(r,o),qT(t,e,r,o,n);case 3:e:{if(KI(e),t===null)throw Error(ne(387));r=e.pendingProps,i=e.memoizedState,o=i.element,vI(t,e),_g(e,r,null,n);var s=e.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){o=Xc(Error(ne(423)),e),e=ZT(t,e,r,n,o);break e}else if(r!==o){o=Xc(Error(ne(424)),e),e=ZT(t,e,r,n,o);break e}else for(Gr=Ds(e.stateNode.containerInfo.firstChild),Yr=e,Ot=!0,Do=null,n=xI(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Gc(),r===o){e=Ki(t,e,n);break e}nr(t,e,r,n)}e=e.child}return e;case 5:return kI(e),t===null&&Sy(e),r=e.type,o=e.pendingProps,i=t!==null?t.memoizedProps:null,s=o.children,by(r,o)?s=null:i!==null&&by(r,i)&&(e.flags|=32),GI(t,e),nr(t,e,s,n),e.child;case 6:return t===null&&Sy(e),null;case 13:return YI(t,e,n);case 4:return Gw(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Kc(e,null,r,n):nr(t,e,r,n),e.child;case 11:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:Lo(r,o),YT(t,e,r,o,n);case 7:return nr(t,e,e.pendingProps,n),e.child;case 8:return nr(t,e,e.pendingProps.children,n),e.child;case 12:return nr(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,o=e.pendingProps,i=e.memoizedProps,s=o.value,Et(Tg,r._currentValue),r._currentValue=s,i!==null)if(jo(i.value,s)){if(i.children===o.children&&!Sr.current){e=Ki(t,e,n);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var l=i.dependencies;if(l!==null){s=i.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=Hi(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Cy(i.return,n,e),l.lanes|=n;break}a=a.next}}else if(i.tag===10)s=i.type===e.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(ne(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Cy(s,n,e),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}nr(t,e,o.children,n),e=e.child}return e;case 9:return o=e.type,r=e.pendingProps.children,Ac(e,n),o=bo(o),r=r(o),e.flags|=1,nr(t,e,r,n),e.child;case 14:return r=e.type,o=Lo(r,e.pendingProps),o=Lo(r.type,o),XT(t,e,r,o,n);case 15:return VI(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:Lo(r,o),Rp(t,e),e.tag=1,Cr(r)?(t=!0,Eg(e)):t=!1,Ac(e,n),bI(e,r,o),Ay(e,r,o,n),My(null,e,r,!0,t,n);case 19:return XI(t,e,n);case 22:return jI(t,e,n)}throw Error(ne(156,e.tag))};function dL(t,e){return PO(t,e)}function KZ(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fo(t,e,n,r){return new KZ(t,e,n,r)}function ax(t){return t=t.prototype,!(!t||!t.isReactComponent)}function YZ(t){if(typeof t=="function")return ax(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Tw)return 11;if(t===Aw)return 14}return 2}function Bs(t,e){var n=t.alternate;return n===null?(n=fo(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Ip(t,e,n,r,o,i){var s=2;if(r=t,typeof t=="function")ax(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case sc:return Xa(n.children,o,i,e);case Cw:s=8,o|=8;break;case Z0:return t=fo(12,n,e,o|2),t.elementType=Z0,t.lanes=i,t;case Q0:return t=fo(13,n,e,o),t.elementType=Q0,t.lanes=i,t;case J0:return t=fo(19,n,e,o),t.elementType=J0,t.lanes=i,t;case wO:return Hm(n,o,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case yO:s=10;break e;case bO:s=9;break e;case Tw:s=11;break e;case Aw:s=14;break e;case ys:s=16,r=null;break e}throw Error(ne(130,t==null?t:typeof t,""))}return e=fo(s,n,e,o),e.elementType=t,e.type=r,e.lanes=i,e}function Xa(t,e,n,r){return t=fo(7,t,r,e),t.lanes=n,t}function Hm(t,e,n,r){return t=fo(22,t,r,e),t.elementType=wO,t.lanes=n,t.stateNode={isHidden:!1},t}function U1(t,e,n){return t=fo(6,t,null,e),t.lanes=n,t}function W1(t,e,n){return e=fo(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function XZ(t,e,n,r,o){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=E1(0),this.expirationTimes=E1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=E1(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function lx(t,e,n,r,o,i,s,l,a){return t=new XZ(t,e,n,l,a),e===1?(e=1,i===!0&&(e|=8)):e=0,i=fo(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},jw(i),t}function qZ(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(gL)}catch(t){console.error(t)}}gL(),fO.exports=to;var of=fO.exports;const Zf=Ko(of);var tQ=Object.defineProperty,nQ=Object.getOwnPropertyDescriptor,rQ=(t,e,n,r)=>{for(var o=r>1?void 0:r?nQ(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&tQ(e,n,o),o},mL=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},xe=(t,e,n)=>(mL(t,e,"read from private field"),n?n.call(t):e.get(t)),zr=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Dr=(t,e,n,r)=>(mL(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),gd,oQ=class{constructor(){this.portals=new Map,zr(this,gd,xm()),this.on=t=>xe(this,gd).on("update",t),this.once=t=>{const e=xe(this,gd).on("update",n=>{e(),t(n)});return e}}update(){xe(this,gd).emit("update",this.portals)}render({Component:t,container:e}){const n=this.portals.get(e);this.portals.set(e,{Component:t,key:(n==null?void 0:n.key)??Ic()}),this.update()}forceUpdate(){for(const[t,{Component:e}]of this.portals)this.portals.set(t,{Component:e,key:Ic()})}remove(t){this.portals.delete(t),this.update()}};gd=new WeakMap;var iQ=t=>{const{portals:e}=t;return ee.createElement(ee.Fragment,null,e.map(([n,{Component:r,key:o}])=>of.createPortal(ee.createElement(r,null),n,o)))};function sQ(t){const[e,n]=P.useState(()=>Array.from(t.portals.entries()));return P.useEffect(()=>t.on(r=>{n(Array.from(r.entries()))}),[t]),P.useMemo(()=>e,[e])}var Dt,md,Ta,vd,Lp,yd,ec,bd,Np,Ai,tr,Uy,vL=class{constructor({getPosition:t,node:e,portalContainer:n,view:r,ReactComponent:o,options:i}){zr(this,Dt,void 0),zr(this,md,[]),zr(this,Ta,void 0),zr(this,vd,void 0),zr(this,Lp,void 0),zr(this,yd,void 0),zr(this,ec,void 0),zr(this,bd,!1),zr(this,Np,void 0),zr(this,Ai,void 0),zr(this,tr,void 0),zr(this,Uy,a=>{a&&(we(xe(this,Ai),{code:re.REACT_NODE_VIEW,message:`You have applied a ref to a node view provided for '${xe(this,Dt).type.name}' which doesn't support content.`}),a.append(xe(this,Ai)))}),this.Component=()=>{const a=xe(this,Lp);return we(a,{code:re.REACT_NODE_VIEW,message:`The custom react node view provided for ${xe(this,Dt).type.name} doesn't have a valid ReactComponent`}),ee.createElement(a,{updateAttributes:this.updateAttributes,selected:this.selected,view:xe(this,Ta),getPosition:xe(this,yd),node:xe(this,Dt),forwardRef:xe(this,Uy),decorations:xe(this,md)})},this.updateAttributes=a=>{if(!xe(this,Ta).editable)return;const u=xe(this,yd).call(this);if(u==null)return;const c=xe(this,Ta).state.tr.setNodeMarkup(u,void 0,{...xe(this,Dt).attrs,...a});xe(this,Ta).dispatch(c)},we(tt(t),{message:"You are attempting to use a node view for a mark type. This is not supported yet. Please check your configuration."}),Dr(this,Dt,e),Dr(this,Ta,r),Dr(this,vd,n),Dr(this,Lp,o),Dr(this,yd,t),Dr(this,ec,i),Dr(this,tr,this.createDom());const{contentDOM:s,wrapper:l}=this.createContentDom()??{};Dr(this,Np,s??void 0),Dr(this,Ai,l),xe(this,Ai)&&xe(this,tr).append(xe(this,Ai)),this.setDomAttributes(xe(this,Dt),xe(this,tr)),this.Component.displayName=fR(`${xe(this,Dt).type.name}NodeView`),this.renderComponent()}static create(t){const{portalContainer:e,ReactComponent:n,options:r}=t;return(o,i,s)=>new vL({options:r,node:o,view:i,getPosition:s,portalContainer:e,ReactComponent:n})}get selected(){return xe(this,bd)}get contentDOM(){return xe(this,Np)}get dom(){return xe(this,tr)}renderComponent(){xe(this,vd).render({Component:this.Component,container:xe(this,tr)})}createDom(){const{defaultBlockNode:t,defaultInlineNode:e}=xe(this,ec),n=xe(this,Dt).isInline?document.createElement(e):document.createElement(t);return n.classList.add(`${aS(xe(this,Dt).type.name)}-node-view-wrapper`),n}createContentDom(){var t,e;if(xe(this,Dt).isLeaf)return;const n=(e=(t=xe(this,Dt).type.spec).toDOM)==null?void 0:e.call(t,xe(this,Dt));if(!n)return;const{contentDOM:r,dom:o}=jr.renderSpec(document,n);let i;if(zt(o))return i=o,o===r&&(i=document.createElement("span"),i.classList.add(`${aS(xe(this,Dt).type.name)}-node-view-content-wrapper`),i.append(r)),zt(r),{wrapper:i,contentDOM:r}}update(t,e){return gm({types:xe(this,Dt).type,node:t})?(xe(this,Dt)===t&&xe(this,md)===e||(xe(this,Dt).sameMarkup(t)||this.setDomAttributes(t,xe(this,tr)),Dr(this,Dt,t),Dr(this,md,e),this.renderComponent()),!0):!1}setDomAttributes(t,e){const{toDOM:n}=xe(this,Dt).type.spec;let r=t.attrs;if(n){const o=n(t);if(ke(o)||aQ(o))return;ta(o[1])&&(r=o[1])}for(const[o,i]of cn(r))e.setAttribute(o,i)}selectNode(){Dr(this,bd,!0),xe(this,tr)&&xe(this,tr).classList.add(rS),this.renderComponent()}deselectNode(){Dr(this,bd,!1),xe(this,tr)&&xe(this,tr).classList.remove(rS),this.renderComponent()}destroy(){xe(this,vd).remove(xe(this,tr))}ignoreMutation(t){return t.type==="selection"?!xe(this,Dt).type.spec.selectable:xe(this,Ai)?!xe(this,Ai).contains(t.target):!0}stopEvent(t){var e;if(!xe(this,tr))return!1;if(tt(xe(this,ec).stopEvent))return xe(this,ec).stopEvent({event:t});const n=t.target;if(!(xe(this,tr).contains(n)&&!((e=this.contentDOM)!=null&&e.contains(n))))return!1;const o=t.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!o)return!0;const s=!!xe(this,Dt).type.spec.draggable,l=Le.isSelectable(xe(this,Dt)),a=t.type==="copy",u=t.type==="paste",c=t.type==="cut",d=t.type==="mousedown",h=t.type.startsWith("drag");return!s&&l&&h&&t.preventDefault(),!(h||o||a||u||c||d&&l)}},cA=vL;Dt=new WeakMap;md=new WeakMap;Ta=new WeakMap;vd=new WeakMap;Lp=new WeakMap;yd=new WeakMap;ec=new WeakMap;bd=new WeakMap;Np=new WeakMap;Ai=new WeakMap;tr=new WeakMap;Uy=new WeakMap;function aQ(t){return ng(t)||ta(t)&&ng(t.dom)}var yh=class extends mt{constructor(){super(...arguments),this.portalContainer=new oQ}get name(){return"reactComponent"}onCreate(){this.store.setStoreKey("portalContainer",this.portalContainer)}createNodeViews(){const t=be(),e=this.store.managerSettings.nodeViewComponents??{};for(const r of this.store.extensions)!r.ReactComponent||!qh(r)||r.reactComponentEnvironment==="ssr"||(t[r.name]=cA.create({options:this.options,ReactComponent:r.ReactComponent,portalContainer:this.portalContainer}));const n=cn({...this.options.nodeViewComponents,...e});for(const[r,o]of n)t[r]=cA.create({options:this.options,ReactComponent:o,portalContainer:this.portalContainer});return t}};yh=rQ([De({defaultOptions:{defaultBlockNode:"div",defaultInlineNode:"span",defaultContentNode:"span",defaultEnvironment:"both",nodeViewComponents:{},stopEvent:null},staticKeys:["defaultBlockNode","defaultInlineNode","defaultContentNode","defaultEnvironment"]})],yh);var lQ=Object.defineProperty,cQ=Object.getOwnPropertyDescriptor,uQ=(t,e,n,r)=>{for(var o=r>1?void 0:r?cQ(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&lQ(e,n,o),o},dQ={...rl.defaultOptions,...yh.defaultOptions},hQ=[...rl.staticKeys,...yh.staticKeys],bh=class extends mt{get name(){return"react"}onSetOptions(t){const{pickChanged:e}=t;this.getExtension(rl).setOptions(e(["placeholder"]))}createExtensions(){const{emptyNodeClass:t,placeholder:e,defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:o,defaultInlineNode:i,nodeViewComponents:s}=this.options;return[new rl({emptyNodeClass:t,placeholder:e,priority:st.Low}),new yh({defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:o,defaultInlineNode:i,nodeViewComponents:s})]}};bh=uQ([De({defaultOptions:dQ,staticKeys:hQ})],bh);var yL={};Object.defineProperty(yL,"__esModule",{value:!0});function fQ(){for(var t=[],e=0;e{if(!e.has(t))throw TypeError("Cannot "+n)},V1=(t,e,n)=>(bL(t,e,"read from private field"),n?n.call(t):e.get(t)),pQ=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},gQ=(t,e,n,r)=>(bL(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);function mQ(){const[,t]=P.useState(be());return P.useCallback(()=>{t(be())},[])}var wL=P.createContext(null);function So(t){const e=P.useContext(wL),n=P.useRef(mQ());we(e,{code:re.REACT_PROVIDER_CONTEXT});const{addHandler:r}=e;return P.useEffect(()=>{let o=t;if(o){if(ta(o)){const{autoUpdate:i}=o;o=i?()=>n.current():void 0}if(tt(o))return r("updated",o)}},[r,t]),e}function fr(t=!0){return So({autoUpdate:t}).active}function vQ(t=!1){return So(t?{autoUpdate:!0}:void 0).attrs}function yu(){return So().chain.new()}function hn(){return So().commands}function hx(){return So({autoUpdate:!0}).getState().selection}function sf(t,e=void 0,n){const{getExtension:r}=So(),o=P.useMemo(()=>r(t),[t,r]);let i;if(tt(e)?i=n?[o,...n]:[o,e]:i=e?[o,...Object.values(e)]:[],P.useEffect(()=>{tt(e)||!e||o.setOptions(e)},i),P.useEffect(()=>{if(tt(e))return e({addHandler:o.addHandler.bind(o),addCustomHandler:o.addCustomHandler.bind(o),extension:o})},i),!e)return o}function yQ(t,e,n){const r=P.useCallback(({addHandler:o})=>o(e,n),[n,e]);return sf(t,r)}function af(t=!1){return So(t?{autoUpdate:!0}:void 0).helpers}var[bQ,wQ]=XV(({props:t})=>{const e=t.locale??"en",n=t.i18n??Rm,r=t.supportedLocales??[e],o=n._.bind(n);return{locale:e,i18n:n,supportedLocales:r,t:o}});function fA(t,e={}){const{core:n,react:r,...o}=e;return hH(t)?t:dH.create(()=>[...kR(t),new bh(r),...GX(n)],o)}function xQ(t,e={}){const n=P.useRef(t),r=P.useRef(e),[o,i]=P.useState(()=>fA(t,e));return n.current=t,r.current=e,P.useEffect(()=>o.addHandler("destroy",()=>{i(()=>fA(n.current,r.current))}),[o]),o}var kQ=typeof or=="object"&&or.__esModule&&or.default?or.default:or,tc,EQ=class extends sH{constructor(t){if(super(t),pQ(this,tc,void 0),this.rootPropsConfig={called:!1,count:0},this.getRootProps=e=>this.internalGetRootProps(e,null),this.internalGetRootProps=(e,n)=>{this.rootPropsConfig.called=!0;const{refKey:r="ref",ref:o,...i}=e??be();return{[r]:kQ(o,this.onRef),key:this.uid,...i,children:n}},this.onRef=e=>{e&&(this.rootPropsConfig.count+=1,we(this.rootPropsConfig.count<=1,{code:re.REACT_GET_ROOT_PROPS,message:`Called ${this.rootPropsConfig.count} times`}),gQ(this,tc,e),this.onRefLoad())},this.manager.view){this.manager.view.setProps({state:this.manager.view.state,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0});return}this.manager.getExtension(rl).setOptions({placeholder:this.props.placeholder??""})}get name(){return"react"}update(t){return super.update(t),this}createView(t){return new mz(null,{state:t,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0,plugins:[]})}updateState({state:t,...e}){const{triggerChange:n=!0,tr:r,transactions:o}=e;if(this.props.state){const{onChange:i}=this.props;we(i,{code:re.REACT_CONTROLLED,message:"You are required to provide the `onChange` handler when creating a controlled editor."}),we(n,{code:re.REACT_CONTROLLED,message:"Controlled editors do not support `clearContent` or `setContent` where `triggerChange` is `true`. Update the `state` prop instead."}),this.previousStateOverride||(this.previousStateOverride=this.getState()),this.onChange({state:t,tr:r,transactions:o});return}!r&&!o&&(t=t.apply(t.tr.setMeta(oS,{}))),this.view.updateState(t),n&&(o==null?void 0:o.length)!==0&&this.onChange({state:t,tr:r,transactions:o}),this.manager.onStateUpdate({previousState:this.previousState,state:t,tr:r,transactions:o})}updateControlledState(t,e){this.previousStateOverride=e,t=t.apply(t.tr.setMeta(oS,{})),this.view.updateState(t),this.manager.onStateUpdate({previousState:this.previousState,state:t}),this.previousStateOverride=void 0}addProsemirrorViewToDom(t,e){this.props.insertPosition==="start"?t.insertBefore(e,t.firstChild):t.append(e)}onRefLoad(){we(V1(this,tc),{code:re.REACT_EDITOR_VIEW,message:"Something went wrong when initializing the text editor. Please check your setup."});const{autoFocus:t}=this.props;this.addProsemirrorViewToDom(V1(this,tc),this.view.dom),t&&this.focus(t),this.onChange(),this.addFocusListeners()}onUpdate(){this.view&&V1(this,tc)&&this.view.setProps({...this.view.props,editable:()=>this.props.editable??!0})}get frameworkOutput(){return{...this.baseOutput,getRootProps:this.getRootProps,portalContainer:this.manager.store.portalContainer}}resetRender(){this.rootPropsConfig.called=!1,this.rootPropsConfig.count=0}};tc=new WeakMap;var xL=typeof document<"u"?P.useLayoutEffect:P.useEffect;function SQ(t){const e=P.useRef();return xL(()=>{e.current=t}),e.current}function CQ(t){const{manager:e,state:n}=t,{placeholder:r,editable:o}=t;P.useRef(!0).current&&!Us(r)&&e.getExtension(bh).setOptions({placeholder:r}),P.useEffect(()=>{r!=null&&e.getExtension(bh).setOptions({placeholder:r})},[r,e]);const[s]=P.useState(()=>{if(n)return n;const a=e.createEmptyDoc(),[u,c]=Bt(t.initialContent)?t.initialContent:[t.initialContent??a];return e.createState({content:u,selection:c})}),l=TQ({initialEditorState:s,getProps:()=>t});return P.useEffect(()=>()=>{l.destroy()},[l]),P.useEffect(()=>{l.onUpdate()},[o,l]),AQ(l),l.frameworkOutput}function TQ(t){const e=P.useRef(t);e.current=t;const n=P.useMemo(()=>new EQ(e.current),[]);return n.update(t),n}function AQ(t){const{state:e}=t.props,n=P.useRef(!!e),r=SQ(e);xL(()=>{const o=e?n.current===!0:n.current===!1;we(o,{code:re.REACT_CONTROLLED,message:n.current?"You have attempted to switch from a controlled to an uncontrolled editor. Once you set up an editor as a controlled editor it must always provide a `state` prop.":"You have provided a `state` prop to an uncontrolled editor. In order to set up your editor as controlled you must provide the `state` prop from the very first render."}),!(!e||e===r)&&t.updateControlledState(e,r??void 0)},[e,r,t])}function _Q(t={}){const{content:e,document:n,selection:r,extensions:o,...i}=t,s=xQ(o??(()=>[]),i),[l,a]=P.useState(()=>s.createState({selection:r,content:e??s.createEmptyDoc()})),u=P.useCallback(({state:d})=>{a(d)},[]),c=P.useCallback(()=>s.output,[s]);return P.useMemo(()=>({state:l,setState:a,manager:s,onChange:u,getContext:c}),[c,s,u,l])}var pA={doc:!1,selection:!1,storedMark:!1};function RQ(){const[t,e]=P.useState(pA);return yQ(sg,"applyState",P.useCallback(({tr:n})=>{const r={...pA};n.docChanged&&(r.doc=!0),n.selectionSet&&(r.selection=!0),n.storedMarksSet&&(r.storedMark=!0),e(r)},[])),t}var Wy=()=>ee.createElement("div",{className:OW.EDITOR_WRAPPER,...So().getRootProps()}),MQ=t=>(t.hook(),null);function OQ(t){const{children:e,autoRender:n,i18n:r,locale:o,supportedLocales:i,hooks:s=[],...l}=t,a=CQ(l),u=sQ(a.portalContainer),c=n==="start"||n===!0||!e&&Us(n),d=n==="end";return ee.createElement(bQ,{i18n:r,locale:o,supportedLocales:i},ee.createElement(wL.Provider,{value:a},ee.createElement(iQ,{portals:u}),s.map((h,f)=>ee.createElement(MQ,{hook:h,key:f})),c&&ee.createElement(Wy,null),e,d&&ee.createElement(Wy,null)))}const IQ={black:"#000",white:"#fff"},wh=IQ,LQ={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Hl=LQ,NQ={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Ul=NQ,$Q={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Wl=$Q,DQ={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Vl=DQ,PQ={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},jl=PQ,zQ={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Du=zQ,FQ={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},BQ=FQ;function K(){return K=Object.assign?Object.assign.bind():function(t){for(var e=1;e{e[n]=kL(t[n])}),e}function Xr(t,e,n={clone:!0}){const r=n.clone?K({},t):t;return Li(t)&&Li(e)&&Object.keys(e).forEach(o=>{o!=="__proto__"&&(Li(e[o])&&o in t&&Li(t[o])?r[o]=Xr(t[o],e[o],n):n.clone?r[o]=Li(e[o])?kL(e[o]):e[o]:r[o]=e[o])}),r}var EL={exports:{}},HQ="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",UQ=HQ,WQ=UQ;function SL(){}function CL(){}CL.resetWarningCache=SL;var VQ=function(){function t(r,o,i,s,l,a){if(a!==WQ){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:CL,resetWarningCache:SL};return n.PropTypes=n,n};EL.exports=VQ();var fx=EL.exports;function Zc(t){let e="https://mui.com/production-error/?code="+t;for(let n=1;n<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=s.createElement(n,{is:r.is}):(t=s.createElement(n),n==="select"&&(s=t,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):t=s.createElementNS(t,n),t[ri]=e,t[dh]=r,qI(t,e,!1,!1),e.stateNode=t;e:{switch(s=ay(n,r),n){case"dialog":At("cancel",t),At("close",t),o=r;break;case"iframe":case"object":case"embed":At("load",t),o=r;break;case"video":case"audio":for(o=0;oqc&&(e.flags|=128,r=!0,Nu(i,!1),e.lanes=4194304)}else{if(!r)if(t=Rg(s),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Nu(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Ot)return Un(e),null}else 2*Yt()-i.renderingStartTime>qc&&n!==1073741824&&(e.flags|=128,r=!0,Nu(i,!1),e.lanes=4194304);i.isBackwards?(s.sibling=e.child,e.child=s):(n=i.last,n!==null?n.sibling=s:e.child=s,i.last=s)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Yt(),e.sibling=null,n=Pt.current,Et(Pt,r?n&1|2:n&1),e):(Un(e),null);case 22:case 23:return ix(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Fr&1073741824&&(Un(e),e.subtreeFlags&6&&(e.flags|=8192)):Un(e),null;case 24:return null;case 25:return null}throw Error(ne(156,e.tag))}function $Z(t,e){switch(Fw(e),e.tag){case 1:return Cr(e.type)&&kg(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Yc(),_t(Sr),_t(Xn),Yw(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Kw(e),null;case 13:if(_t(Pt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ne(340));Gc()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return _t(Pt),null;case 4:return Yc(),null;case 10:return Ww(e.type._context),null;case 22:case 23:return ix(),null;case 24:return null;default:return null}}var Yf=!1,Kn=!1,DZ=typeof WeakSet=="function"?WeakSet:Set,pe=null;function gc(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){jt(t,e,r)}else n.current=null}function Ny(t,e,n){try{n()}catch(r){jt(t,e,r)}}var JT=!1;function PZ(t,e){if(vy=yg,t=nI(),Pw(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,c=0,d=t,h=null;t:for(;;){for(var f;d!==n||o!==0&&d.nodeType!==3||(l=s+o),d!==i||r!==0&&d.nodeType!==3||(a=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(f=d.firstChild)!==null;)h=d,d=f;for(;;){if(d===t)break t;if(h===n&&++u===o&&(l=s),h===i&&++c===r&&(a=s),(f=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=f}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(yy={focusedElem:t,selectionRange:n},yg=!1,pe=e;pe!==null;)if(e=pe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,pe=t;else for(;pe!==null;){e=pe;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,m=p.memoizedState,v=e.stateNode,y=v.getSnapshotBeforeUpdate(e.elementType===e.type?g:Lo(e.type,g),m);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=e.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(w){jt(e,e.return,w)}if(t=e.sibling,t!==null){t.return=e.return,pe=t;break}pe=e.return}return p=JT,JT=!1,p}function Nd(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&t)===t){var i=o.destroy;o.destroy=void 0,i!==void 0&&Ny(e,n,i)}o=o.next}while(o!==r)}}function Fm(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function $y(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function JI(t){var e=t.alternate;e!==null&&(t.alternate=null,JI(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[ri],delete e[dh],delete e[xy],delete e[bZ],delete e[wZ])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function eL(t){return t.tag===5||t.tag===3||t.tag===4}function eA(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||eL(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Dy(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=xg));else if(r!==4&&(t=t.child,t!==null))for(Dy(t,e,n),t=t.sibling;t!==null;)Dy(t,e,n),t=t.sibling}function Py(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(Py(t,e,n),t=t.sibling;t!==null;)Py(t,e,n),t=t.sibling}var On=null,No=!1;function ls(t,e,n){for(n=n.child;n!==null;)tL(t,e,n),n=n.sibling}function tL(t,e,n){if(ci&&typeof ci.onCommitFiberUnmount=="function")try{ci.onCommitFiberUnmount(Om,n)}catch{}switch(n.tag){case 5:Kn||gc(n,e);case 6:var r=On,o=No;On=null,ls(t,e,n),On=r,No=o,On!==null&&(No?(t=On,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):On.removeChild(n.stateNode));break;case 18:On!==null&&(No?(t=On,n=n.stateNode,t.nodeType===8?N1(t.parentNode,n):t.nodeType===1&&N1(t,n),sh(t)):N1(On,n.stateNode));break;case 4:r=On,o=No,On=n.stateNode.containerInfo,No=!0,ls(t,e,n),On=r,No=o;break;case 0:case 11:case 14:case 15:if(!Kn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&Ny(n,e,s),o=o.next}while(o!==r)}ls(t,e,n);break;case 1:if(!Kn&&(gc(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){jt(n,e,l)}ls(t,e,n);break;case 21:ls(t,e,n);break;case 22:n.mode&1?(Kn=(r=Kn)||n.memoizedState!==null,ls(t,e,n),Kn=r):ls(t,e,n);break;default:ls(t,e,n)}}function tA(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new DZ),e.forEach(function(r){var o=GZ.bind(null,t,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Ro(t,e){var n=e.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=Yt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*FZ(r/1960))-r,10t?16:t,As===null)var r=!1;else{if(t=As,As=null,Ng=0,Ye&6)throw Error(ne(331));var o=Ye;for(Ye|=4,pe=t.current;pe!==null;){var i=pe,s=i.child;if(pe.flags&16){var l=i.deletions;if(l!==null){for(var a=0;aYt()-rx?Ya(t,0):nx|=n),Tr(t,e)}function cL(t,e){e===0&&(t.mode&1?(e=Ff,Ff<<=1,!(Ff&130023424)&&(Ff=4194304)):e=1);var n=sr();t=Gi(t,e),t!==null&&(ef(t,e,n),Tr(t,n))}function jZ(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),cL(t,n)}function GZ(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,o=t.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(ne(314))}r!==null&&r.delete(e),cL(t,n)}var uL;uL=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Sr.current)xr=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return xr=!1,LZ(t,e,n);xr=!!(t.flags&131072)}else xr=!1,Ot&&e.flags&1048576&&fI(e,Cg,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;Rp(t,e),t=e.pendingProps;var o=jc(e,Xn.current);Ac(e,n),o=qw(null,e,r,t,o,n);var i=Zw();return e.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Cr(r)?(i=!0,Eg(e)):i=!1,e.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,jw(e),o.updater=Pm,e.stateNode=o,o._reactInternals=e,Ay(e,r,t,n),e=My(null,e,r,!0,i,n)):(e.tag=0,Ot&&i&&zw(e),nr(null,e,o,n),e=e.child),e;case 16:r=e.elementType;e:{switch(Rp(t,e),t=e.pendingProps,o=r._init,r=o(r._payload),e.type=r,o=e.tag=YZ(r),t=Lo(r,t),o){case 0:e=Ry(null,e,r,t,n);break e;case 1:e=qT(null,e,r,t,n);break e;case 11:e=YT(null,e,r,t,n);break e;case 14:e=XT(null,e,r,Lo(r.type,t),n);break e}throw Error(ne(306,r,""))}return e;case 0:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:Lo(r,o),Ry(t,e,r,o,n);case 1:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:Lo(r,o),qT(t,e,r,o,n);case 3:e:{if(KI(e),t===null)throw Error(ne(387));r=e.pendingProps,i=e.memoizedState,o=i.element,vI(t,e),_g(e,r,null,n);var s=e.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){o=Xc(Error(ne(423)),e),e=ZT(t,e,r,n,o);break e}else if(r!==o){o=Xc(Error(ne(424)),e),e=ZT(t,e,r,n,o);break e}else for(Gr=Ds(e.stateNode.containerInfo.firstChild),Yr=e,Ot=!0,Do=null,n=xI(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Gc(),r===o){e=Ki(t,e,n);break e}nr(t,e,r,n)}e=e.child}return e;case 5:return kI(e),t===null&&Sy(e),r=e.type,o=e.pendingProps,i=t!==null?t.memoizedProps:null,s=o.children,by(r,o)?s=null:i!==null&&by(r,i)&&(e.flags|=32),GI(t,e),nr(t,e,s,n),e.child;case 6:return t===null&&Sy(e),null;case 13:return YI(t,e,n);case 4:return Gw(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Kc(e,null,r,n):nr(t,e,r,n),e.child;case 11:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:Lo(r,o),YT(t,e,r,o,n);case 7:return nr(t,e,e.pendingProps,n),e.child;case 8:return nr(t,e,e.pendingProps.children,n),e.child;case 12:return nr(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,o=e.pendingProps,i=e.memoizedProps,s=o.value,Et(Tg,r._currentValue),r._currentValue=s,i!==null)if(jo(i.value,s)){if(i.children===o.children&&!Sr.current){e=Ki(t,e,n);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var l=i.dependencies;if(l!==null){s=i.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=Hi(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Cy(i.return,n,e),l.lanes|=n;break}a=a.next}}else if(i.tag===10)s=i.type===e.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(ne(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Cy(s,n,e),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}nr(t,e,o.children,n),e=e.child}return e;case 9:return o=e.type,r=e.pendingProps.children,Ac(e,n),o=bo(o),r=r(o),e.flags|=1,nr(t,e,r,n),e.child;case 14:return r=e.type,o=Lo(r,e.pendingProps),o=Lo(r.type,o),XT(t,e,r,o,n);case 15:return VI(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:Lo(r,o),Rp(t,e),e.tag=1,Cr(r)?(t=!0,Eg(e)):t=!1,Ac(e,n),bI(e,r,o),Ay(e,r,o,n),My(null,e,r,!0,t,n);case 19:return XI(t,e,n);case 22:return jI(t,e,n)}throw Error(ne(156,e.tag))};function dL(t,e){return PO(t,e)}function KZ(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fo(t,e,n,r){return new KZ(t,e,n,r)}function ax(t){return t=t.prototype,!(!t||!t.isReactComponent)}function YZ(t){if(typeof t=="function")return ax(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Tw)return 11;if(t===Aw)return 14}return 2}function Bs(t,e){var n=t.alternate;return n===null?(n=fo(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Ip(t,e,n,r,o,i){var s=2;if(r=t,typeof t=="function")ax(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case sc:return Xa(n.children,o,i,e);case Cw:s=8,o|=8;break;case Z0:return t=fo(12,n,e,o|2),t.elementType=Z0,t.lanes=i,t;case Q0:return t=fo(13,n,e,o),t.elementType=Q0,t.lanes=i,t;case J0:return t=fo(19,n,e,o),t.elementType=J0,t.lanes=i,t;case wO:return Hm(n,o,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case yO:s=10;break e;case bO:s=9;break e;case Tw:s=11;break e;case Aw:s=14;break e;case ys:s=16,r=null;break e}throw Error(ne(130,t==null?t:typeof t,""))}return e=fo(s,n,e,o),e.elementType=t,e.type=r,e.lanes=i,e}function Xa(t,e,n,r){return t=fo(7,t,r,e),t.lanes=n,t}function Hm(t,e,n,r){return t=fo(22,t,r,e),t.elementType=wO,t.lanes=n,t.stateNode={isHidden:!1},t}function U1(t,e,n){return t=fo(6,t,null,e),t.lanes=n,t}function W1(t,e,n){return e=fo(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function XZ(t,e,n,r,o){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=E1(0),this.expirationTimes=E1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=E1(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function lx(t,e,n,r,o,i,s,l,a){return t=new XZ(t,e,n,l,a),e===1?(e=1,i===!0&&(e|=8)):e=0,i=fo(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},jw(i),t}function qZ(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(gL)}catch(t){console.error(t)}}gL(),fO.exports=to;var of=fO.exports;const Zf=Ko(of);var tQ=Object.defineProperty,nQ=Object.getOwnPropertyDescriptor,rQ=(t,e,n,r)=>{for(var o=r>1?void 0:r?nQ(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&tQ(e,n,o),o},mL=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},xe=(t,e,n)=>(mL(t,e,"read from private field"),n?n.call(t):e.get(t)),zr=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Dr=(t,e,n,r)=>(mL(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),gd,oQ=class{constructor(){this.portals=new Map,zr(this,gd,xm()),this.on=t=>xe(this,gd).on("update",t),this.once=t=>{const e=xe(this,gd).on("update",n=>{e(),t(n)});return e}}update(){xe(this,gd).emit("update",this.portals)}render({Component:t,container:e}){const n=this.portals.get(e);this.portals.set(e,{Component:t,key:(n==null?void 0:n.key)??Ic()}),this.update()}forceUpdate(){for(const[t,{Component:e}]of this.portals)this.portals.set(t,{Component:e,key:Ic()})}remove(t){this.portals.delete(t),this.update()}};gd=new WeakMap;var iQ=t=>{const{portals:e}=t;return ee.createElement(ee.Fragment,null,e.map(([n,{Component:r,key:o}])=>of.createPortal(ee.createElement(r,null),n,o)))};function sQ(t){const[e,n]=P.useState(()=>Array.from(t.portals.entries()));return P.useEffect(()=>(n(Array.from(t.portals.entries())),t.on(r=>{n(Array.from(r.entries()))})),[t]),P.useMemo(()=>e,[e])}var Dt,md,Ta,vd,Lp,yd,ec,bd,Np,Ai,tr,Uy,vL=class{constructor({getPosition:t,node:e,portalContainer:n,view:r,ReactComponent:o,options:i}){zr(this,Dt,void 0),zr(this,md,[]),zr(this,Ta,void 0),zr(this,vd,void 0),zr(this,Lp,void 0),zr(this,yd,void 0),zr(this,ec,void 0),zr(this,bd,!1),zr(this,Np,void 0),zr(this,Ai,void 0),zr(this,tr,void 0),zr(this,Uy,a=>{a&&(we(xe(this,Ai),{code:re.REACT_NODE_VIEW,message:`You have applied a ref to a node view provided for '${xe(this,Dt).type.name}' which doesn't support content.`}),a.append(xe(this,Ai)))}),this.Component=()=>{const a=xe(this,Lp);return we(a,{code:re.REACT_NODE_VIEW,message:`The custom react node view provided for ${xe(this,Dt).type.name} doesn't have a valid ReactComponent`}),ee.createElement(a,{updateAttributes:this.updateAttributes,selected:this.selected,view:xe(this,Ta),getPosition:xe(this,yd),node:xe(this,Dt),forwardRef:xe(this,Uy),decorations:xe(this,md)})},this.updateAttributes=a=>{if(!xe(this,Ta).editable)return;const u=xe(this,yd).call(this);if(u==null)return;const c=xe(this,Ta).state.tr.setNodeMarkup(u,void 0,{...xe(this,Dt).attrs,...a});xe(this,Ta).dispatch(c)},we(tt(t),{message:"You are attempting to use a node view for a mark type. This is not supported yet. Please check your configuration."}),Dr(this,Dt,e),Dr(this,Ta,r),Dr(this,vd,n),Dr(this,Lp,o),Dr(this,yd,t),Dr(this,ec,i),Dr(this,tr,this.createDom());const{contentDOM:s,wrapper:l}=this.createContentDom()??{};Dr(this,Np,s??void 0),Dr(this,Ai,l),xe(this,Ai)&&xe(this,tr).append(xe(this,Ai)),this.setDomAttributes(xe(this,Dt),xe(this,tr)),this.Component.displayName=fR(`${xe(this,Dt).type.name}NodeView`),this.renderComponent()}static create(t){const{portalContainer:e,ReactComponent:n,options:r}=t;return(o,i,s)=>new vL({options:r,node:o,view:i,getPosition:s,portalContainer:e,ReactComponent:n})}get selected(){return xe(this,bd)}get contentDOM(){return xe(this,Np)}get dom(){return xe(this,tr)}renderComponent(){xe(this,vd).render({Component:this.Component,container:xe(this,tr)})}createDom(){const{defaultBlockNode:t,defaultInlineNode:e}=xe(this,ec),n=xe(this,Dt).isInline?document.createElement(e):document.createElement(t);return n.classList.add(`${aS(xe(this,Dt).type.name)}-node-view-wrapper`),n}createContentDom(){var t,e;if(xe(this,Dt).isLeaf)return;const n=(e=(t=xe(this,Dt).type.spec).toDOM)==null?void 0:e.call(t,xe(this,Dt));if(!n)return;const{contentDOM:r,dom:o}=jr.renderSpec(document,n);let i;if(zt(o))return i=o,o===r&&(i=document.createElement("span"),i.classList.add(`${aS(xe(this,Dt).type.name)}-node-view-content-wrapper`),i.append(r)),zt(r),{wrapper:i,contentDOM:r}}update(t,e){return gm({types:xe(this,Dt).type,node:t})?(xe(this,Dt)===t&&xe(this,md)===e||(xe(this,Dt).sameMarkup(t)||this.setDomAttributes(t,xe(this,tr)),Dr(this,Dt,t),Dr(this,md,e),this.renderComponent()),!0):!1}setDomAttributes(t,e){const{toDOM:n}=xe(this,Dt).type.spec;let r=t.attrs;if(n){const o=n(t);if(ke(o)||aQ(o))return;ta(o[1])&&(r=o[1])}for(const[o,i]of cn(r))e.setAttribute(o,i)}selectNode(){Dr(this,bd,!0),xe(this,tr)&&xe(this,tr).classList.add(rS),this.renderComponent()}deselectNode(){Dr(this,bd,!1),xe(this,tr)&&xe(this,tr).classList.remove(rS),this.renderComponent()}destroy(){xe(this,vd).remove(xe(this,tr))}ignoreMutation(t){return t.type==="selection"?!xe(this,Dt).type.spec.selectable:xe(this,Ai)?!xe(this,Ai).contains(t.target):!0}stopEvent(t){var e;if(!xe(this,tr))return!1;if(tt(xe(this,ec).stopEvent))return xe(this,ec).stopEvent({event:t});const n=t.target;if(!(xe(this,tr).contains(n)&&!((e=this.contentDOM)!=null&&e.contains(n))))return!1;const o=t.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!o)return!0;const s=!!xe(this,Dt).type.spec.draggable,l=Le.isSelectable(xe(this,Dt)),a=t.type==="copy",u=t.type==="paste",c=t.type==="cut",d=t.type==="mousedown",h=t.type.startsWith("drag");return!s&&l&&h&&t.preventDefault(),!(h||o||a||u||c||d&&l)}},cA=vL;Dt=new WeakMap;md=new WeakMap;Ta=new WeakMap;vd=new WeakMap;Lp=new WeakMap;yd=new WeakMap;ec=new WeakMap;bd=new WeakMap;Np=new WeakMap;Ai=new WeakMap;tr=new WeakMap;Uy=new WeakMap;function aQ(t){return ng(t)||ta(t)&&ng(t.dom)}var yh=class extends mt{constructor(){super(...arguments),this.portalContainer=new oQ}get name(){return"reactComponent"}onCreate(){this.store.setStoreKey("portalContainer",this.portalContainer)}createNodeViews(){const t=be(),e=this.store.managerSettings.nodeViewComponents??{};for(const r of this.store.extensions)!r.ReactComponent||!qh(r)||r.reactComponentEnvironment==="ssr"||(t[r.name]=cA.create({options:this.options,ReactComponent:r.ReactComponent,portalContainer:this.portalContainer}));const n=cn({...this.options.nodeViewComponents,...e});for(const[r,o]of n)t[r]=cA.create({options:this.options,ReactComponent:o,portalContainer:this.portalContainer});return t}};yh=rQ([De({defaultOptions:{defaultBlockNode:"div",defaultInlineNode:"span",defaultContentNode:"span",defaultEnvironment:"both",nodeViewComponents:{},stopEvent:null},staticKeys:["defaultBlockNode","defaultInlineNode","defaultContentNode","defaultEnvironment"]})],yh);var lQ=Object.defineProperty,cQ=Object.getOwnPropertyDescriptor,uQ=(t,e,n,r)=>{for(var o=r>1?void 0:r?cQ(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&lQ(e,n,o),o},dQ={...rl.defaultOptions,...yh.defaultOptions},hQ=[...rl.staticKeys,...yh.staticKeys],bh=class extends mt{get name(){return"react"}onSetOptions(t){const{pickChanged:e}=t;this.getExtension(rl).setOptions(e(["placeholder"]))}createExtensions(){const{emptyNodeClass:t,placeholder:e,defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:o,defaultInlineNode:i,nodeViewComponents:s}=this.options;return[new rl({emptyNodeClass:t,placeholder:e,priority:st.Low}),new yh({defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:o,defaultInlineNode:i,nodeViewComponents:s})]}};bh=uQ([De({defaultOptions:dQ,staticKeys:hQ})],bh);var yL={};Object.defineProperty(yL,"__esModule",{value:!0});function fQ(){for(var t=[],e=0;e{if(!e.has(t))throw TypeError("Cannot "+n)},V1=(t,e,n)=>(bL(t,e,"read from private field"),n?n.call(t):e.get(t)),pQ=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},gQ=(t,e,n,r)=>(bL(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);function mQ(){const[,t]=P.useState(be());return P.useCallback(()=>{t(be())},[])}var wL=P.createContext(null);function So(t){const e=P.useContext(wL),n=P.useRef(mQ());we(e,{code:re.REACT_PROVIDER_CONTEXT});const{addHandler:r}=e;return P.useEffect(()=>{let o=t;if(o){if(ta(o)){const{autoUpdate:i}=o;o=i?()=>n.current():void 0}if(tt(o))return r("updated",o)}},[r,t]),e}function fr(t=!0){return So({autoUpdate:t}).active}function vQ(t=!1){return So(t?{autoUpdate:!0}:void 0).attrs}function yu(){return So().chain.new()}function hn(){return So().commands}function hx(){return So({autoUpdate:!0}).getState().selection}function sf(t,e=void 0,n){const{getExtension:r}=So(),o=P.useMemo(()=>r(t),[t,r]);let i;if(tt(e)?i=n?[o,...n]:[o,e]:i=e?[o,...Object.values(e)]:[],P.useEffect(()=>{tt(e)||!e||o.setOptions(e)},i),P.useEffect(()=>{if(tt(e))return e({addHandler:o.addHandler.bind(o),addCustomHandler:o.addCustomHandler.bind(o),extension:o})},i),!e)return o}function yQ(t,e,n){const r=P.useCallback(({addHandler:o})=>o(e,n),[n,e]);return sf(t,r)}function af(t=!1){return So(t?{autoUpdate:!0}:void 0).helpers}var[bQ,wQ]=XV(({props:t})=>{const e=t.locale??"en",n=t.i18n??Rm,r=t.supportedLocales??[e],o=n._.bind(n);return{locale:e,i18n:n,supportedLocales:r,t:o}});function fA(t,e={}){const{core:n,react:r,...o}=e;return hH(t)?t:dH.create(()=>[...kR(t),new bh(r),...GX(n)],o)}function xQ(t,e={}){const n=P.useRef(t),r=P.useRef(e),[o,i]=P.useState(()=>fA(t,e));return n.current=t,r.current=e,P.useEffect(()=>o.addHandler("destroy",()=>{i(()=>fA(n.current,r.current))}),[o]),o}var kQ=typeof or=="object"&&or.__esModule&&or.default?or.default:or,tc,EQ=class extends sH{constructor(t){if(super(t),pQ(this,tc,void 0),this.rootPropsConfig={called:!1,count:0},this.getRootProps=e=>this.internalGetRootProps(e,null),this.internalGetRootProps=(e,n)=>{this.rootPropsConfig.called=!0;const{refKey:r="ref",ref:o,...i}=e??be();return{[r]:kQ(o,this.onRef),key:this.uid,...i,children:n}},this.onRef=e=>{e&&(this.rootPropsConfig.count+=1,we(this.rootPropsConfig.count<=1,{code:re.REACT_GET_ROOT_PROPS,message:`Called ${this.rootPropsConfig.count} times`}),gQ(this,tc,e),this.onRefLoad())},this.manager.view){this.manager.view.setProps({state:this.manager.view.state,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0});return}this.manager.getExtension(rl).setOptions({placeholder:this.props.placeholder??""})}get name(){return"react"}update(t){return super.update(t),this}createView(t){return new mz(null,{state:t,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0,plugins:[]})}updateState({state:t,...e}){const{triggerChange:n=!0,tr:r,transactions:o}=e;if(this.props.state){const{onChange:i}=this.props;we(i,{code:re.REACT_CONTROLLED,message:"You are required to provide the `onChange` handler when creating a controlled editor."}),we(n,{code:re.REACT_CONTROLLED,message:"Controlled editors do not support `clearContent` or `setContent` where `triggerChange` is `true`. Update the `state` prop instead."}),this.previousStateOverride||(this.previousStateOverride=this.getState()),this.onChange({state:t,tr:r,transactions:o});return}!r&&!o&&(t=t.apply(t.tr.setMeta(oS,{}))),this.view.updateState(t),n&&(o==null?void 0:o.length)!==0&&this.onChange({state:t,tr:r,transactions:o}),this.manager.onStateUpdate({previousState:this.previousState,state:t,tr:r,transactions:o})}updateControlledState(t,e){this.previousStateOverride=e,t=t.apply(t.tr.setMeta(oS,{})),this.view.updateState(t),this.manager.onStateUpdate({previousState:this.previousState,state:t}),this.previousStateOverride=void 0}addProsemirrorViewToDom(t,e){this.props.insertPosition==="start"?t.insertBefore(e,t.firstChild):t.append(e)}onRefLoad(){we(V1(this,tc),{code:re.REACT_EDITOR_VIEW,message:"Something went wrong when initializing the text editor. Please check your setup."});const{autoFocus:t}=this.props;this.addProsemirrorViewToDom(V1(this,tc),this.view.dom),t&&this.focus(t),this.onChange(),this.addFocusListeners()}onUpdate(){this.view&&V1(this,tc)&&this.view.setProps({...this.view.props,editable:()=>this.props.editable??!0})}get frameworkOutput(){return{...this.baseOutput,getRootProps:this.getRootProps,portalContainer:this.manager.store.portalContainer}}resetRender(){this.rootPropsConfig.called=!1,this.rootPropsConfig.count=0}};tc=new WeakMap;var xL=typeof document<"u"?P.useLayoutEffect:P.useEffect;function SQ(t){const e=P.useRef();return xL(()=>{e.current=t}),e.current}function CQ(t){const{manager:e,state:n}=t,{placeholder:r,editable:o}=t;P.useRef(!0).current&&!Us(r)&&e.getExtension(bh).setOptions({placeholder:r}),P.useEffect(()=>{r!=null&&e.getExtension(bh).setOptions({placeholder:r})},[r,e]);const[s]=P.useState(()=>{if(n)return n;const a=e.createEmptyDoc(),[u,c]=Bt(t.initialContent)?t.initialContent:[t.initialContent??a];return e.createState({content:u,selection:c})}),l=TQ({initialEditorState:s,getProps:()=>t});return P.useEffect(()=>()=>{l.destroy()},[l]),P.useEffect(()=>{l.onUpdate()},[o,l]),AQ(l),l.frameworkOutput}function TQ(t){const e=P.useRef(t);e.current=t;const n=P.useMemo(()=>new EQ(e.current),[]);return n.update(t),n}function AQ(t){const{state:e}=t.props,n=P.useRef(!!e),r=SQ(e);xL(()=>{const o=e?n.current===!0:n.current===!1;we(o,{code:re.REACT_CONTROLLED,message:n.current?"You have attempted to switch from a controlled to an uncontrolled editor. Once you set up an editor as a controlled editor it must always provide a `state` prop.":"You have provided a `state` prop to an uncontrolled editor. In order to set up your editor as controlled you must provide the `state` prop from the very first render."}),!(!e||e===r)&&t.updateControlledState(e,r??void 0)},[e,r,t])}function _Q(t={}){const{content:e,document:n,selection:r,extensions:o,...i}=t,s=xQ(o??(()=>[]),i),[l,a]=P.useState(()=>s.createState({selection:r,content:e??s.createEmptyDoc()})),u=P.useCallback(({state:d})=>{a(d)},[]),c=P.useCallback(()=>s.output,[s]);return P.useMemo(()=>({state:l,setState:a,manager:s,onChange:u,getContext:c}),[c,s,u,l])}var pA={doc:!1,selection:!1,storedMark:!1};function RQ(){const[t,e]=P.useState(pA);return yQ(sg,"applyState",P.useCallback(({tr:n})=>{const r={...pA};n.docChanged&&(r.doc=!0),n.selectionSet&&(r.selection=!0),n.storedMarksSet&&(r.storedMark=!0),e(r)},[])),t}var Wy=()=>ee.createElement("div",{className:OW.EDITOR_WRAPPER,...So().getRootProps()}),MQ=t=>(t.hook(),null);function OQ(t){const{children:e,autoRender:n,i18n:r,locale:o,supportedLocales:i,hooks:s=[],...l}=t,a=CQ(l),u=sQ(a.portalContainer),c=n==="start"||n===!0||!e&&Us(n),d=n==="end";return ee.createElement(bQ,{i18n:r,locale:o,supportedLocales:i},ee.createElement(wL.Provider,{value:a},ee.createElement(iQ,{portals:u}),s.map((h,f)=>ee.createElement(MQ,{hook:h,key:f})),c&&ee.createElement(Wy,null),e,d&&ee.createElement(Wy,null)))}const IQ={black:"#000",white:"#fff"},wh=IQ,LQ={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Hl=LQ,NQ={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Ul=NQ,$Q={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Wl=$Q,DQ={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Vl=DQ,PQ={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},jl=PQ,zQ={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Du=zQ,FQ={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},BQ=FQ;function K(){return K=Object.assign?Object.assign.bind():function(t){for(var e=1;e{e[n]=kL(t[n])}),e}function Xr(t,e,n={clone:!0}){const r=n.clone?K({},t):t;return Li(t)&&Li(e)&&Object.keys(e).forEach(o=>{o!=="__proto__"&&(Li(e[o])&&o in t&&Li(t[o])?r[o]=Xr(t[o],e[o],n):n.clone?r[o]=Li(e[o])?kL(e[o]):e[o]:r[o]=e[o])}),r}var EL={exports:{}},HQ="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",UQ=HQ,WQ=UQ;function SL(){}function CL(){}CL.resetWarningCache=SL;var VQ=function(){function t(r,o,i,s,l,a){if(a!==WQ){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:CL,resetWarningCache:SL};return n.PropTypes=n,n};EL.exports=VQ();var fx=EL.exports;function Zc(t){let e="https://mui.com/production-error/?code="+t;for(let n=1;n