slate-react 0.134.1 → 0.136.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/slate-react.js +89 -35
- package/dist/slate-react.min.js +1 -1
- package/package.json +3 -3
package/dist/slate-react.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("slate")):"function"==typeof define&&define.amd?define(["exports","react","slate"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).SlateReact={},e.React,e.Slate)}(this,(function(e,t,n){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function a(e,t){return e(t={exports:{}},t.exports),t.exports}var i=a((function(e){e.exports=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n},e.exports.__esModule=!0,e.exports.default=e.exports}));o(i);var l=a((function(e){e.exports=function(e,t){if(null==e)return{};var n,r,o=i(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},e.exports.__esModule=!0,e.exports.default=e.exports})),u=o(l),s=a((function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}));o(s);var c=a((function(e){var t=s.default;e.exports=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports}));o(c);var d=a((function(e){var t=s.default;e.exports=function(e){var n=c(e,"string");return"symbol"==t(n)?n:n+""},e.exports.__esModule=!0,e.exports.default=e.exports}));o(d);var f=a((function(e){e.exports=function(e,t,n){return(t=d(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports})),p=o(f),h=a((function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports}));o(h);var v=a((function(e){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],u=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}},e.exports.__esModule=!0,e.exports.default=e.exports}));o(v);var g=a((function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports}));o(g);var m=a((function(e){e.exports=function(e,t){if(e){if("string"==typeof e)return g(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}));o(m);var y=a((function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports}));o(y);var b=a((function(e){e.exports=function(e,t){return h(e)||v(e,t)||m(e,t)||y()},e.exports.__esModule=!0,e.exports.default=e.exports})),w=o(b),k=function(e){if(e=String(e||""),S.test(e))return"rtl";if(C.test(e))return"ltr";return"neutral"},E="֑-߿יִ-﷽ﹰ-ﻼ",x="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",S=new RegExp("^[^"+x+"]*["+E+"]"),C=new RegExp("^[^"+E+"]*["+x+"]");var O=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},P="object"==typeof r&&r&&r.Object===Object&&r,T="object"==typeof self&&self&&self.Object===Object&&self,N=P||T||Function("return this")(),D=function(){return N.Date.now()},_=/\s/;var R=function(e){for(var t=e.length;t--&&_.test(e.charAt(t)););return t},M=/^\s+/;var L=function(e){return e?e.slice(0,R(e)+1).replace(M,""):e},z=N.Symbol,F=Object.prototype,I=F.hasOwnProperty,B=F.toString,j=z?z.toStringTag:void 0;var A=function(e){var t=I.call(e,j),n=e[j];try{e[j]=void 0;var r=!0}catch(e){}var o=B.call(e);return r&&(t?e[j]=n:delete e[j]),o},W=Object.prototype.toString;var U=function(e){return W.call(e)},V=z?z.toStringTag:void 0;var H=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":V&&V in Object(e)?A(e):U(e)};var q=function(e){return null!=e&&"object"==typeof e};var K=function(e){return"symbol"==typeof e||q(e)&&"[object Symbol]"==H(e)},$=/^[-+]0x[0-9a-f]+$/i,Q=/^0b[01]+$/i,X=/^0o[0-7]+$/i,Y=parseInt;var G=function(e){if("number"==typeof e)return e;if(K(e))return NaN;if(O(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=O(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=L(e);var n=Q.test(e);return n||X.test(e)?Y(e.slice(2),n?2:8):$.test(e)?NaN:+e},J=Math.max,Z=Math.min;var ee=function(e,t,n){var r,o,a,i,l,u,s=0,c=!1,d=!1,f=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=r,a=o;return r=o=void 0,s=t,i=e.apply(a,n)}function h(e){return s=e,l=setTimeout(g,t),c?p(e):i}function v(e){var n=e-u;return void 0===u||n>=t||n<0||d&&e-s>=a}function g(){var e=D();if(v(e))return m(e);l=setTimeout(g,function(e){var n=t-(e-u);return d?Z(n,a-(e-s)):n}(e))}function m(e){return l=void 0,f&&r?p(e):(r=o=void 0,i)}function y(){var e=D(),n=v(e);if(r=arguments,o=this,u=e,n){if(void 0===l)return h(u);if(d)return clearTimeout(l),l=setTimeout(g,t),p(u)}return void 0===l&&(l=setTimeout(g,t)),i}return t=G(t)||0,O(n)&&(c=!!n.leading,a=(d="maxWait"in n)?J(G(n.maxWait)||0,t):a,f="trailing"in n?!!n.trailing:f),y.cancel=function(){void 0!==l&&clearTimeout(l),s=0,r=u=o=l=void 0},y.flush=function(){return void 0===l?i:m(D())},y};var te=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return O(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),ee(e,t,{leading:r,maxWait:t,trailing:o})};const ne=e=>"object"==typeof e&&null!=e&&1===e.nodeType,re=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,oe=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return re(n.overflowY,t)||re(n.overflowX,t)||(e=>{const t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},ae=(e,t,n,r,o,a,i,l)=>a<e&&i>t||a>e&&i<t?0:a<=e&&l<=n||i>=t&&l>=n?a-e-r:i>t&&l<n||a<e&&l>n?i-t+o:0,ie=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t},le=(e,t)=>{var n,r,o,a;if("undefined"==typeof document)return[];const{scrollMode:i,block:l,inline:u,boundary:s,skipOverflowHiddenElements:c}=t,d="function"==typeof s?s:e=>e!==s;if(!ne(e))throw new TypeError("Invalid target");const f=document.scrollingElement||document.documentElement,p=[];let h=e;for(;ne(h)&&d(h);){if(h=ie(h),h===f){p.push(h);break}null!=h&&h===document.body&&oe(h)&&!oe(document.documentElement)||null!=h&&oe(h,c)&&p.push(h)}const v=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,g=null!=(a=null==(o=window.visualViewport)?void 0:o.height)?a:innerHeight,{scrollX:m,scrollY:y}=window,{height:b,width:w,top:k,right:E,bottom:x,left:S}=e.getBoundingClientRect(),{top:C,right:O,bottom:P,left:T}=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);let N="start"===l||"nearest"===l?k-C:"end"===l?x+P:k+b/2-C+P,D="center"===u?S+w/2-T+O:"end"===u?E+O:S-T;const _=[];for(let e=0;e<p.length;e++){const t=p[e],{height:n,width:r,top:o,right:a,bottom:s,left:c}=t.getBoundingClientRect();if("if-needed"===i&&k>=0&&S>=0&&x<=g&&E<=v&&k>=o&&x<=s&&S>=c&&E<=a)return _;const d=getComputedStyle(t),h=parseInt(d.borderLeftWidth,10),C=parseInt(d.borderTopWidth,10),O=parseInt(d.borderRightWidth,10),P=parseInt(d.borderBottomWidth,10);let T=0,R=0;const M="offsetWidth"in t?t.offsetWidth-t.clientWidth-h-O:0,L="offsetHeight"in t?t.offsetHeight-t.clientHeight-C-P:0,z="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,F="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(f===t)T="start"===l?N:"end"===l?N-g:"nearest"===l?ae(y,y+g,g,C,P,y+N,y+N+b,b):N-g/2,R="start"===u?D:"center"===u?D-v/2:"end"===u?D-v:ae(m,m+v,v,h,O,m+D,m+D+w,w),T=Math.max(0,T+y),R=Math.max(0,R+m);else{T="start"===l?N-o-C:"end"===l?N-s+P+L:"nearest"===l?ae(o,s,n,C,P+L,N,N+b,b):N-(o+n/2)+L/2,R="start"===u?D-c-h:"center"===u?D-(c+r/2)+M/2:"end"===u?D-a+O+M:ae(c,a,r,h,O+M,D,D+w,w);const{scrollLeft:e,scrollTop:i}=t;T=0===F?0:Math.max(0,Math.min(i+T/F,t.scrollHeight-n/F+L)),R=0===z?0:Math.max(0,Math.min(e+R/z,t.scrollWidth-r/z+M)),N+=i-T,D+=e-R}_.push({el:t,top:T,left:R})}return _};function ue(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;const n=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if((e=>"object"==typeof e&&"function"==typeof e.behavior)(t))return t.behavior(le(e,t));const r="boolean"==typeof t||null==t?void 0:t.behavior;for(const{el:o,top:a,left:i}of le(e,(e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"})(t))){const e=a-n.top+n.bottom,t=i-n.left+n.right;o.scroll({top:e,left:t,behavior:r})}}var se=t.createContext(null),ce=function(){var e=t.useContext(se);if(!e)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return e},de=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});for(var n="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),r={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},o={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:n?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},a={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},i=1;i<20;i++)a["f"+i]=111+i;function l(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map((function(e){return u(e,t)})),o=function(e){return r.some((function(t){return s(t,e)}))};return null==n?o:o(n)}function u(e,t){var n=t&&t.byKey,i={},l=(e=e.replace("++","+add")).split("+"),u=l.length;for(var s in r)i[r[s]]=!1;var f=!0,p=!1,h=void 0;try{for(var v,g=l[Symbol.iterator]();!(f=(v=g.next()).done);f=!0){var m=v.value,y=m.endsWith("?")&&m.length>1;y&&(m=m.slice(0,-1));var b=d(m),w=r[b];if(m.length>1&&!w&&!o[m]&&!a[b])throw new TypeError('Unknown modifier: "'+m+'"');1!==u&&w||(n?i.key=b:i.which=c(m)),w&&(i[w]=!y||null)}}catch(e){p=!0,h=e}finally{try{!f&&g.return&&g.return()}finally{if(p)throw h}}return i}function s(e,t){for(var n in e){var r=e[n],o=void 0;if(null!=r&&((null!=(o="key"===n&&null!=t.key?t.key.toLowerCase():"which"===n?91===r&&93===t.which?91:t.which:t[n])||!1!==r)&&o!==r))return!1}return!0}function c(e){return e=d(e),a[e]||e.toUpperCase().charCodeAt(0)}function d(e){return e=e.toLowerCase(),e=o[e]||e}t.default=l,t.isHotkey=l,t.isCodeHotkey=function(e,t){return l(e,t)},t.isKeyHotkey=function(e,t){return l(e,{byKey:!0},t)},t.parseHotkey=u,t.compareHotkey=s,t.toKeyCode=c,t.toKeyName=d}));o(de);var fe=de.isHotkey;de.isCodeHotkey,de.isKeyHotkey,de.parseHotkey,de.compareHotkey,de.toKeyCode,de.toKeyName;var pe=globalThis.Node,he=globalThis.Text;const ve=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,ge=e=>me(e)&&1===e.nodeType,me=e=>{const t=ve(e);return!!t&&e instanceof t.Node},ye=e=>{const t=e&&e.anchorNode&&ve(e.anchorNode);return!!t&&e instanceof t.Selection},be=e=>me(e)&&3===e.nodeType,we=(e,t,n)=>{if("number"!=typeof t)throw new Error("Expected index to be a number");const{childNodes:r}=e;let o=r[t],a=t,i=!1,l=!1;for(;(me(u=o)&&8===u.nodeType||ge(o)&&0===o.childNodes.length||ge(o)&&"false"===o.getAttribute("contenteditable"))&&(!i||!l);)a>=r.length?(i=!0,a=t-1,n="backward"):a<0?(l=!0,a=t+1,n="forward"):(o=r[a],t=a,a+="forward"===n?1:-1);var u;return[o,t]},ke=(e,t,n)=>{const[r]=we(e,t,n);return r},Ee=e=>{let t="";if(be(e)&&e.nodeValue)return e.nodeValue;if(ge(e)){var n;if(e.hasAttribute("data-slate-spacer"))return t;if("BR"===e.tagName&&"n"===(null===(n=e.parentElement)||void 0===n?void 0:n.getAttribute("data-slate-zero-width")))return t;for(const n of Array.from(e.childNodes))t+=Ee(n);const r=getComputedStyle(e).getPropertyValue("display"),o="block"===r||"list"===r,a=!!e.closest('[data-slate-inline="true"]');("BR"===e.tagName||o&&!a)&&(t+="\n")}return t},xe=/<[^>]*\sdata-slate-fragment="([^"]+)"/m,Se=e=>null!=e.getSelection?e.getSelection():document.getSelection(),Ce=(e,t,n)=>{const{target:r}=t;if(ge(r)&&r.matches('[contentEditable="false"]'))return!1;const{document:o}=wt.getWindow(e);if(Te(o,r))return wt.hasDOMNode(e,r,{editable:!0});const a=n.find((({addedNodes:e,removedNodes:t})=>{for(const t of e)if(t===r||Te(t,r))return!0;for(const e of t)if(e===r||Te(e,r))return!0}));return!(!a||a===t)&&Ce(e,a,n)},Oe=(e,t)=>Boolean(e.compareDocumentPosition(t)&pe.DOCUMENT_POSITION_PRECEDING),Pe=(e,t)=>{if(!e)return null;let n=e;for(;n;){if(n.matches&&n.matches(t))return n;if(n.parentElement)n=n.parentElement;else{if(!n.parentNode||!("host"in n.parentNode))return null;n=n.parentNode.host}}return null},Te=(e,t)=>{if(!e||!t)return!1;if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;if(!n.parentNode)return!1;n="host"in n.parentNode?n.parentNode.host:n.parentNode}return!1};var Ne,De;const _e="undefined"!=typeof navigator&&"undefined"!=typeof window&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Re="undefined"!=typeof navigator&&/Mac OS X/.test(navigator.userAgent),Me="undefined"!=typeof navigator&&/Android/.test(navigator.userAgent),Le="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),ze="undefined"!=typeof navigator&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),Fe="undefined"!=typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Ie="undefined"!=typeof navigator&&/Chrome/i.test(navigator.userAgent),Be="undefined"!=typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),je=Me&&"undefined"!=typeof navigator&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),Ae="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),We="undefined"!=typeof navigator&&/.*UCBrowser/.test(navigator.userAgent),Ue="undefined"!=typeof navigator&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent)&&(!Ie||Be),Ve=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement);"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&null!==(Ne=navigator.userAgent.match(/Version\/(\d+)/))&&void 0!==Ne&&Ne[1]&&parseInt(null===(De=navigator.userAgent.match(/Version\/(\d+)/))||void 0===De?void 0:De[1],10);const He=(!Be||!je)&&!Fe&&"undefined"!=typeof globalThis&&globalThis.InputEvent&&"function"==typeof globalThis.InputEvent.prototype.getTargetRanges;function qe(e){return qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qe(e)}function Ke(e){var t=function(e,t){if("object"!=qe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=qe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==qe(t)?t:t+""}function $e(e,t,n){return(t=Ke(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let Qe=0;class Xe{constructor(){$e(this,"id",void 0),this.id=""+Qe++}}const Ye=new WeakMap,Ge=new WeakMap,Je=new WeakMap,Ze=new WeakMap,et=new WeakMap,tt=new WeakMap,nt=new WeakMap,rt=new WeakMap,ot=new WeakMap,at=new WeakMap,it=new WeakMap,lt=new WeakMap,ut=new WeakMap,st=new WeakMap,ct=new WeakMap,dt=new WeakMap,ft=new WeakMap,pt=new WeakMap,ht=new WeakMap,vt=new WeakMap,gt=new WeakMap,mt=new WeakMap,yt=Symbol("placeholder"),bt=Symbol("mark-placeholder"),wt={androidPendingDiffs:e=>ht.get(e),androidScheduleFlush:e=>{var t;null===(t=dt.get(e))||void 0===t||t()},blur:e=>{const t=wt.toDOMNode(e,e),n=wt.findDocumentOrShadowRoot(e);lt.set(e,!1),n.activeElement===t&&t.blur()},deselect:e=>{const{selection:t}=e,r=wt.findDocumentOrShadowRoot(e),o=Se(r);o&&o.rangeCount>0&&o.removeAllRanges(),t&&n.Transforms.deselect(e)},findDocumentOrShadowRoot:e=>{const t=wt.toDOMNode(e,e),n=t.getRootNode();return n instanceof Document||n instanceof ShadowRoot?n:t.ownerDocument},findEventRange:(e,t)=>{"nativeEvent"in t&&(t=t.nativeEvent);const{clientX:r,clientY:o,target:a}=t;if(null==r||null==o)throw new Error(`Cannot resolve a Slate range from a DOM event: ${t}`);const i=wt.toSlateNode(e,t.target),l=wt.findPath(e,i);if(n.Node.isElement(i)&&n.Editor.isVoid(e,i)){const t=a.getBoundingClientRect(),u=e.isInline(i)?r-t.left<t.left+t.width-r:o-t.top<t.top+t.height-o,s=n.Editor.point(e,l,{edge:u?"start":"end"}),c=u?n.Editor.before(e,s):n.Editor.after(e,s);if(c){return n.Editor.range(e,c)}}let u;const{document:s}=wt.getWindow(e),c=wt.findDocumentOrShadowRoot(e),d=c===s?null:c,f=e=>{if(!e)return null;const t=s.createRange();return t.setStart(e.offsetNode,e.offset),t.setEnd(e.offsetNode,e.offset),t};if(u=d&&s.caretPositionFromPoint?f(s.caretPositionFromPoint(r,o,{shadowRoots:[d]})):s.caretRangeFromPoint?s.caretRangeFromPoint(r,o):f(s.caretPositionFromPoint(r,o)),!u)throw new Error(`Cannot resolve a Slate range from a DOM event: ${t}`);return wt.toSlateRange(e,u,{exactMatch:!1,suppressThrow:!1})},findKey:(e,t)=>{let n=ot.get(t);return n||(n=new Xe,ot.set(t,n)),n},findPath:(e,t)=>{const r=[];let o=t;for(;;){const t=Je.get(o);if(null==t){if(o===e)return r;break}const n=Ge.get(o);if(null==n||t.children[n]!==o)break;r.unshift(n),o=t}for(const[r,o]of n.Node.nodes(e))if(r===t)return o;throw new Error(`Unable to find the path for Slate node: ${n.Scrubber.stringify(t)}`)},focus:(e,t={retries:5})=>{if(lt.get(e))return;if(!wt.isMounted(e))return;if(t.retries<=0)throw new Error("Could not set focus, editor seems stuck with pending operations");if(e.operations.length>0)return void setTimeout((()=>{wt.focus(e,{retries:t.retries-1})}),10);const r=wt.toDOMNode(e,e),o=wt.findDocumentOrShadowRoot(e);if(o.activeElement!==r){const t=e.selection&&o instanceof Document?wt.toDOMRange(e,e.selection):null;if(e.selection||n.Transforms.select(e,n.Editor.start(e,[])),lt.set(e,!0),r.focus({preventScroll:!0}),t){const e=Se(o);null==e||e.removeAllRanges(),null==e||e.addRange(t)}}},getWindow:e=>{const t=Ze.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},hasDOMNode:(e,t,n={})=>{const{editable:r=!1}=n;if(!wt.isMounted(e))return!1;const o=wt.toDOMNode(e,e);let a;try{a=ge(t)?t:t.parentElement}catch(e){if(e instanceof Error&&!e.message.includes('Permission denied to access property "nodeType"'))throw e}if(!a||Pe(a,"[data-slate-editor]")!==o)return!1;const i=Pe(a,'[contenteditable="true" i], [contenteditable=""], [contenteditable="plaintext-only" i]'),l=i&&i!==o?Pe(i,'[contenteditable="false" i]'):null;if(l&&l!==o&&Pe(l,"[data-slate-editor]")===o){var u;const e=null!==(u=Pe(a,'[data-slate-node="text"]'))&&void 0!==u?u:null==i?void 0:i.querySelector('[data-slate-node="text"]');if(!e||null==i||!i.contains(e)||Pe(e,"[data-slate-editor]")!==o)return!1}return!(r&&!a.isContentEditable)||("boolean"==typeof a.isContentEditable&&Pe(a,'[contenteditable="false"]')===o||!!a.getAttribute("data-slate-zero-width"))},hasEditableTarget:(e,t)=>me(t)&&wt.hasDOMNode(e,t,{editable:!0}),hasRange:(e,t)=>{if("function"==typeof e.hasRange)return e.hasRange(t);const{anchor:r,focus:o}=t;return n.Editor.hasPath(e,r.path)&&n.Editor.hasPath(e,o.path)},hasSelectableTarget:(e,t)=>wt.hasEditableTarget(e,t)||wt.isTargetInsideNonReadonlyVoid(e,t),hasTarget:(e,t)=>me(t)&&wt.hasDOMNode(e,t),insertData:(e,t)=>{e.insertData(t)},insertFragmentData:(e,t)=>e.insertFragmentData(t),insertTextData:(e,t)=>e.insertTextData(t),isComposing:e=>!!ut.get(e),isFocused:e=>!!lt.get(e),isMounted:e=>!!et.get(e),isReadOnly:e=>!!it.get(e),isTargetInsideNonReadonlyVoid:(e,t)=>{if(it.get(e))return!1;if(!wt.hasTarget(e,t))return!1;const r=wt.toSlateNode(e,t);return n.Node.isElement(r)&&n.Editor.isVoid(e,r)},setFragmentData:(e,t,n)=>e.setFragmentData(t,n),toDOMNode:(e,t)=>{var r;const o=t===e?et.get(e):null===(r=at.get(e))||void 0===r?void 0:r.get(wt.findKey(e,t));if(!o)throw new Error(`Cannot resolve a DOM node from Slate node: ${n.Scrubber.stringify(t)}`);return o},toDOMPoint:(e,t)=>{const[r]=n.Editor.node(e,t.path),o=wt.toDOMNode(e,r);let a;n.Editor.void(e,{at:t})&&(t={path:t.path,offset:0});const i=Array.from(o.querySelectorAll("[data-slate-string], [data-slate-zero-width]"));let l=0;for(let e=0;e<i.length;e++){const n=i[e],r=n.childNodes[0];if(null==r||null==r.textContent)continue;const{length:o}=r.textContent,s=n.getAttribute("data-slate-length"),c=l+(null==s?o:parseInt(s,10)),d=i[e+1];if(t.offset===c&&null!=d&&d.hasAttribute("data-slate-mark-placeholder")){var u;const e=d.childNodes[0];a=[e instanceof he?e:d,null!==(u=d.textContent)&&void 0!==u&&u.startsWith("\ufeff")?1:0];break}if(t.offset<=c){const e=Math.min(o,Math.max(0,t.offset-l));a=e===o&&n.hasAttribute("data-slate-trailing")?[n.lastChild,0]:[r,e];break}l=c}if(!a)throw new Error(`Cannot resolve a DOM point from Slate point: ${n.Scrubber.stringify(t)}`);return a},toDOMRange:(e,t)=>{const{anchor:r,focus:o}=t,a=n.Range.isBackward(t),i=wt.toDOMPoint(e,r),l=n.Range.isCollapsed(t)?i:wt.toDOMPoint(e,o),u=wt.getWindow(e).document.createRange(),[s,c]=a?l:i,[d,f]=a?i:l,p=!!(ge(s)?s:s.parentElement).getAttribute("data-slate-zero-width"),h=!!(ge(d)?d:d.parentElement).getAttribute("data-slate-zero-width");return u.setStart(s,p?1:c),u.setEnd(d,h?1:f),u},toSlateNode:(e,t)=>{let n=ge(t)?t:t.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));const r=n?nt.get(n):null;if(!r)throw new Error(`Cannot resolve a Slate node from DOM node: ${n}`);return r},toSlatePoint:(e,t,r)=>{const{exactMatch:o,suppressThrow:a}=r,[i,l]=o?t:(e=>{let[t,n]=e;if(ge(t)&&t.childNodes.length){let e=n===t.childNodes.length,r=e?n-1:n;for([t,r]=we(t,r,e?"backward":"forward"),e=r<n;ge(t)&&t.childNodes.length;){const n=e?t.childNodes.length-1:0;t=ke(t,n,e?"backward":"forward")}n=e&&null!=t.textContent?t.textContent.length:0}return[t,n]})(t),u=i.parentNode;let s,c,d=r.searchDirection,f=null,p=0;if(u){var h,v;const t=wt.toDOMNode(e,e),n=u.closest('[data-slate-void="true"]'),r=n&&Te(t,n)?n:null,a=u.closest('[contenteditable="false"]'),s=a&&Te(t,a)?a:null;let c=u.closest("[data-slate-leaf]"),y=null;if(c){if(f=c.closest('[data-slate-node="text"]'),f){const t=wt.getWindow(e).document.createRange();t.setStart(f,0),t.setEnd(i,u.hasAttribute("data-slate-trailing")&&i===u.lastChild&&"\n"===i.textContent?0:l);const n=t.cloneContents();[...Array.prototype.slice.call(n.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(n.querySelectorAll("[contenteditable=false]"))].forEach((e=>{Me&&!o&&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)})),p=n.textContent.length,y=f}}else if(r){const t=r.querySelectorAll("[data-slate-leaf]");for(let n=0;n<t.length;n++){const r=t[n];if(wt.hasDOMNode(e,r)){c=r;break}}c?(f=c.closest('[data-slate-node="text"]'),y=c,p=y.textContent.length,y.querySelectorAll("[data-slate-zero-width]").forEach((e=>{p-=e.textContent.length}))):p=1}else if(s){const e=e=>e?e.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],t=s.closest('[data-slate-node="element"]');if("backward"===d||!d){var g;c=null!==(g=[...e(null==t?void 0:t.previousElementSibling),...e(t)].findLast((e=>Oe(s,e))))&&void 0!==g?g:null,c&&(d="backward")}if("forward"===d||!d){var m;c=null!==(m=[...e(t),...e(null==t?void 0:t.nextElementSibling)].find((e=>{return t=e,Boolean(s.compareDocumentPosition(t)&pe.DOCUMENT_POSITION_FOLLOWING);var t})))&&void 0!==m?m:null,c&&(d="forward")}c&&(f=c.closest('[data-slate-node="text"]'),y=c,"forward"===d?p=0:(p=y.textContent.length,y.querySelectorAll("[data-slate-zero-width]").forEach((e=>{p-=e.textContent.length}))))}y&&p===y.textContent.length&&Me&&"z"===y.getAttribute("data-slate-zero-width")&&null!==(h=y.textContent)&&void 0!==h&&h.startsWith("\ufeff")&&(u.hasAttribute("data-slate-zero-width")||Le&&null!==(v=y.textContent)&&void 0!==v&&v.endsWith("\n\n"))&&p--}if(Me&&!f&&!o){const t=u.hasAttribute("data-slate-node")?u:u.closest("[data-slate-node]");if(t&&wt.hasDOMNode(e,t,{editable:!0})){const r=wt.toSlateNode(e,t);let o;try{o=wt.findPath(e,r)}catch(e){if(a)return null;throw e}let{path:i,offset:u}=n.Editor.start(e,o);return t.querySelector("[data-slate-leaf]")||(u=l),{path:i,offset:u}}}if(!f){if(a)return null;throw new Error(`Cannot resolve a Slate point from DOM point: ${t}`)}try{s=wt.toSlateNode(e,f)}catch(e){if(a)return null;throw e}try{c=wt.findPath(e,s)}catch(e){if(a)return null;throw e}return{path:c,offset:p}},toSlateRange:(e,t,r)=>{var o,a;const{exactMatch:i,suppressThrow:l}=r;let u,s,c,d,f;if(ye(t)?t.anchorNode:t.startContainer)if(ye(t)){if(Le&&t.rangeCount>1){c=t.focusNode;const m=t.getRangeAt(0),y=t.getRangeAt(t.rangeCount-1);if(c instanceof HTMLTableRowElement&&m.startContainer instanceof HTMLTableRowElement&&y.startContainer instanceof HTMLTableRowElement){function b(e){return e.childElementCount>0?b(e.children[0]):e}const w=m.startContainer,k=y.startContainer,E=b(w.children[m.startOffset]),x=b(k.children[y.startOffset]);d=0,u=x.childNodes.length>0?x.childNodes[0]:x,c=E.childNodes.length>0?E.childNodes[0]:E,s=x instanceof HTMLElement?x.innerHTML.length:0}else m.startContainer===c?(u=y.endContainer,s=y.endOffset,d=m.startOffset):(u=m.startContainer,s=m.endOffset,d=y.startOffset)}else u=t.anchorNode,s=t.anchorOffset,c=t.focusNode,d=t.focusOffset;f=Ie&&(e=>{let t=e&&e.parentNode;for(;t;){if("[object ShadowRoot]"===t.toString())return!0;t=t.parentNode}return!1})(u)||Le?t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:t.isCollapsed}else u=t.startContainer,s=t.startOffset,c=t.endContainer,d=t.endOffset,f=t.collapsed;if(null==u||null==c||null==s||null==d)throw new Error(`Cannot resolve a Slate range from DOM range: ${t}`);!Le||null!==(o=c.parentElement)&&void 0!==o&&o.hasAttribute("data-slate-trailing")||null===(a=c.textContent)||void 0===a||!a.endsWith("\n\n")||d!==c.textContent.length||d--;const p=wt.toSlatePoint(e,[u,s],{exactMatch:i,suppressThrow:l});if(!p)return null;const h=Oe(u,c)||u===c&&d<s,v=f?p:wt.toSlatePoint(e,[c,d],{exactMatch:i,suppressThrow:l,searchDirection:h?"forward":"backward"});if(!v)return null;let g={anchor:p,focus:v};return n.Range.isExpanded(g)&&n.Range.isForward(g)&&ge(c)&&!c.closest('[data-slate-void="true"]')&&n.Editor.void(e,{at:g.focus,mode:"highest"})&&(g=n.Editor.unhangRange(e,g,{voids:!0})),g}};function kt(e,t){const{path:r,diff:o}=t;if(!n.Editor.hasPath(e,r))return!1;const a=n.Node.get(e,r);if(!n.Node.isText(a))return!1;if(o.start!==a.text.length||0===o.text.length)return a.text.slice(o.start,o.start+o.text.length)===o.text;const i=n.Path.next(r);if(!n.Editor.hasPath(e,i))return!1;const l=n.Node.get(e,i);return n.Node.isText(l)&&l.text.startsWith(o.text)}function Et(e,...t){return t.reduce(((e,t)=>e.slice(0,t.start)+t.text+e.slice(t.end)),e)}function xt(e,t){const{start:n,end:r,text:o}=t,a=e.slice(n,r),i=function(e,t){const n=Math.min(e.length,t.length);for(let r=0;r<n;r++)if(e.charAt(r)!==t.charAt(r))return r;return n}(a,o),l=function(e,t,n){const r=Math.min(e.length,t.length,n);for(let n=0;n<r;n++)if(e.charAt(e.length-n-1)!==t.charAt(t.length-n-1))return n;return r}(a,o,Math.min(a.length-i,o.length-i)),u={start:n+i,end:r-l,text:o.slice(i,o.length-l)};return u.start===u.end&&0===u.text.length?null:u}function St(e){const{path:t,diff:n}=e;return{anchor:{path:t,offset:n.start},focus:{path:t,offset:n.end}}}function Ct(e,t){let{path:r,offset:o}=t;if(!n.Editor.hasPath(e,r))return null;let a=n.Node.get(e,r);if(!n.Node.isText(a))return null;const i=n.Editor.above(e,{match:t=>n.Node.isElement(t)&&n.Editor.isBlock(e,t),at:r});if(!i)return null;for(;o>a.text.length;){const t=n.Editor.next(e,{at:r,match:n.Node.isText});if(!t||!n.Path.isDescendant(t[1],i[1]))return null;o-=a.text.length,a=t[0],r=t[1]}return{path:r,offset:o}}function Ot(e,t){const r=Ct(e,t.anchor);if(!r)return null;if(n.Range.isCollapsed(t))return{anchor:r,focus:r};const o=Ct(e,t.focus);return o?{anchor:r,focus:o}:null}function Pt(e,t,r){const o=ht.get(e),a=null==o?void 0:o.find((({path:e})=>n.Path.equals(e,t.path)));if(!a||t.offset<=a.diff.start)return n.Point.transform(t,r,{affinity:"backward"});const{diff:i}=a;if("insert_node"===r.type&&n.Text.isText(r.node)&&r.node.text===i.text&&i.start===i.end&&n.Path.equals(r.path,n.Path.next(t.path))&&t.offset<=i.start+i.text.length&&n.Node.leaf(e,t.path).text.length===i.start)return{path:r.path,offset:t.offset-i.start};if(t.offset<=i.start+i.text.length){const e={path:t.path,offset:i.start},o=n.Point.transform(e,r,{affinity:"backward"});return o?{path:o.path,offset:o.offset+t.offset-i.start}:null}const l={path:t.path,offset:t.offset-i.text.length+i.end-i.start},u=n.Point.transform(l,r,{affinity:"backward"});return u?"split_node"===r.type&&n.Path.equals(r.path,t.path)&&l.offset<r.position&&i.start<r.position?u:{path:u.path,offset:u.offset+i.text.length-i.end+i.start}:null}function Tt(e,t,r){const o=Pt(e,t.anchor,r);if(!o)return null;if(n.Range.isCollapsed(t))return{anchor:o,focus:o};const a=Pt(e,t.focus,r);return a?{anchor:o,focus:a}:null}const Nt=(e,t)=>{const n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},Dt=(e,t,n)=>{try{const r=wt.toDOMRange(e,t),o=wt.toDOMRange(e,n),a=r.getBoundingClientRect(),i=o.getBoundingClientRect();return Nt(a,i)&&Nt(i,a)}catch(e){return!1}};function _t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_t(Object(n),!0).forEach((function(t){$e(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Mt=new WeakSet,Lt=e=>Je.has(e)||Mt.has(e)||n.Node.isElement(e)&&e.children.some(Lt),zt=e=>n.Node.isElement(e)?Rt(Rt({},e),{},{children:e.children.map(zt)}):Rt({},e),Ft=e=>{Mt.add(e),n.Node.isElement(e)&&e.children.forEach(Ft)},It=e=>{const t=Lt(e)?zt(e):e;return Ft(t),t};function Bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bt(Object(n),!0).forEach((function(t){$e(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const At=(e,t="x-slate-fragment")=>{const r=e,{apply:o,onChange:a,deleteBackward:i,addMark:l,removeMark:u,insertNodes:s}=r;return r.insertNodes=(e,t)=>{s(n.Node.isNode(e)?It(e):e.map(It),t)},at.set(r,new WeakMap),r.addMark=(e,t)=>{var n,o;null===(n=dt.get(r))||void 0===n||n(),!ft.get(r)&&null!==(o=ht.get(r))&&void 0!==o&&o.length&&ft.set(r,null),pt.delete(r),l(e,t)},r.removeMark=e=>{var t;!ft.get(r)&&null!==(t=ht.get(r))&&void 0!==t&&t.length&&ft.set(r,null),pt.delete(r),u(e)},r.deleteBackward=e=>{if("line"!==e)return i(e);if(r.selection&&n.Range.isCollapsed(r.selection)){const e=n.Editor.above(r,{match:e=>n.Node.isElement(e)&&n.Editor.isBlock(r,e),at:r.selection});if(e){const[,t]=e,o=n.Editor.range(r,t,r.selection.anchor),a=((e,t)=>{const r=n.Editor.range(e,n.Range.end(t)),o=Array.from(n.Editor.positions(e,{at:t}));let a=0,i=o.length,l=Math.floor(i/2);if(Dt(e,n.Editor.range(e,o[a]),r))return n.Editor.range(e,o[a],r);if(o.length<2)return n.Editor.range(e,o[o.length-1],r);for(;l!==o.length&&l!==a;)Dt(e,n.Editor.range(e,o[l]),r)?i=l:a=l,l=Math.floor((a+i)/2);return n.Editor.range(e,o[a],r)})(r,o);n.Range.isCollapsed(a)?i("character"):n.Transforms.delete(r,{at:a})}}},r.apply=t=>{const a=[],i=[],l=ht.get(r);if(null!=l&&l.length){const e=l.map((e=>function(e,t){const{path:r,diff:o,id:a}=e;switch(t.type){case"insert_text":return!n.Path.equals(t.path,r)||t.offset>=o.end?e:t.offset<=o.start?{diff:{start:t.text.length+o.start,end:t.text.length+o.end,text:o.text},id:a,path:r}:{diff:{start:o.start,end:o.end+t.text.length,text:o.text},id:a,path:r};case"remove_text":return!n.Path.equals(t.path,r)||t.offset>=o.end?e:t.offset+t.text.length<=o.start?{diff:{start:o.start-t.text.length,end:o.end-t.text.length,text:o.text},id:a,path:r}:{diff:{start:o.start,end:o.end-t.text.length,text:o.text},id:a,path:r};case"split_node":return!n.Path.equals(t.path,r)||t.position>=o.end?{diff:o,id:a,path:n.Path.transform(r,t,{affinity:"backward"})}:t.position>o.start?{diff:{start:o.start,end:Math.min(t.position,o.end),text:o.text},id:a,path:r}:{diff:{start:o.start-t.position,end:o.end-t.position,text:o.text},id:a,path:n.Path.transform(r,t,{affinity:"forward"})};case"merge_node":return n.Path.equals(t.path,r)?{diff:{start:o.start+t.position,end:o.end+t.position,text:o.text},id:a,path:n.Path.transform(r,t)}:{diff:o,id:a,path:n.Path.transform(r,t)}}const i=n.Path.transform(r,t);return i?{diff:o,path:i,id:a}:null}(e,t))).filter(Boolean);ht.set(r,e)}const u=gt.get(r);u&>.set(r,Tt(r,u,t));const s=vt.get(r);if(null!=s&&s.at){const e=n.Location.isPoint(null==s?void 0:s.at)?Pt(r,s.at,t):Tt(r,s.at,t);vt.set(r,e?jt(jt({},s),{},{at:e}):null)}switch(t.type){case"insert_text":case"remove_text":case"set_node":case"split_node":a.push(...Wt(r,t.path));break;case"set_selection":var c;null===(c=st.get(r))||void 0===c||c.unref(),st.delete(r);break;case"insert_node":case"remove_node":a.push(...Wt(r,n.Path.parent(t.path)));break;case"merge_node":{const e=n.Path.previous(t.path);a.push(...Wt(r,e));break}case"move_node":{const o=n.Path.common(n.Path.parent(t.path),n.Path.parent(t.newPath));let l;a.push(...Wt(r,o)),n.Path.isBefore(t.path,t.newPath)?(a.push(...Wt(r,n.Path.parent(t.path))),l=t.newPath):(a.push(...Wt(r,n.Path.parent(t.newPath))),l=t.path);const u=n.Node.get(e,n.Path.parent(l)),s=wt.findKey(r,u),c=n.Editor.pathRef(r,n.Path.parent(l));i.push([c,s]);break}}switch(o(t),t.type){case"insert_node":case"remove_node":case"merge_node":case"move_node":case"split_node":case"insert_text":case"remove_text":case"set_selection":Ye.set(r,!0)}for(const[e,t]of a){const[o]=n.Editor.node(r,e);ot.set(o,t)}for(const[e,t]of i){if(e.current){const[o]=n.Editor.node(r,e.current);ot.set(o,t)}e.unref()}},r.setFragmentData=e=>{const{selection:o}=r;if(!o)return;const[a,i]=n.Range.edges(o),l=n.Editor.void(r,{at:a.path}),u=n.Editor.void(r,{at:i.path});if(n.Range.isCollapsed(o)&&!l)return;const s=wt.toDOMRange(r,o);let c=s.cloneContents(),d=s.commonAncestorContainer,f=c.childNodes[0];if(c.childNodes.forEach((e=>{e.textContent&&""!==e.textContent.trim()&&(f=e)})),u){const[e]=u,t=s.cloneRange(),n=wt.toDOMNode(r,e);t.setEndAfter(n),c=t.cloneContents(),d=t.commonAncestorContainer}if(l&&(f=c.querySelector("[data-slate-spacer]")),Array.from(c.querySelectorAll("[data-slate-zero-width]")).forEach((e=>{const t="n"===e.getAttribute("data-slate-zero-width");e.textContent="",t&&e.appendChild(e.ownerDocument.createElement("br"))})),be(f)){const e=f.ownerDocument.createElement("span");e.style.whiteSpace="pre",e.appendChild(f),c.appendChild(e),f=e}const p=r.getFragment(),h=JSON.stringify(p),v=window.btoa(encodeURIComponent(h));f.setAttribute("data-slate-fragment",v),e.setData(`application/${t}`,v),c=((e,t,n,r)=>{const o=null!==e.querySelector("li");let a=e;for(let e=ge(t)?t:t.parentElement;e&&e!==n;e=e.parentElement)if(o&&["OL","UL","LI"].includes(e.nodeName)||r&&"true"===e.getAttribute("data-slate-inline")&&!e.hasAttribute("data-slate-void")){const t=e.cloneNode(!1);t.appendChild(a),a=e.ownerDocument.createDocumentFragment(),a.appendChild(t)}return a})(c,d,wt.toDOMNode(r,r),!l&&!u);const g=c.ownerDocument.createElement("div");return g.appendChild(c),g.setAttribute("hidden","true"),c.ownerDocument.body.appendChild(g),e.setData("text/html",g.innerHTML),e.setData("text/plain",Ee(g)),c.ownerDocument.body.removeChild(g),e},r.insertData=e=>{r.insertFragmentData(e)||r.insertTextData(e)},r.insertFragmentData=e=>{const n=e.getData(`application/${t}`)||(e=>{const t=e.getData("text/html"),[,n]=t.match(xe)||[];return n})(e);if(n){const e=decodeURIComponent(window.atob(n)),t=JSON.parse(e);return r.insertFragment(t),!0}return!1},r.insertTextData=e=>{const t=e.getData("text/plain");if(t){const e=t.split(/\r\n|\r|\n/);let o=!1;for(const t of e)o&&n.Transforms.splitNodes(r,{always:!0}),r.insertText(t),o=!0;return!0}return!1},r.onChange=e=>{const t=ct.get(r);t&&t(e),a(e)},r},Wt=(e,t)=>{const r=[];for(const[o,a]of n.Editor.levels(e,{at:t})){const t=wt.findKey(e,o);r.push([a,t])}return r},Ut={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"},Vt={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"},Ht={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},qt=e=>{const t=Ut[e],n=Vt[e],r=Ht[e],o=t&&fe(t),a=n&&fe(n),i=r&&fe(r);return e=>!(!o||!o(e))||(!!(Re&&a&&a(e))||!(Re||!i||!i(e)))};var Kt={isBold:qt("bold"),isCompose:qt("compose"),isMoveBackward:qt("moveBackward"),isMoveForward:qt("moveForward"),isDeleteBackward:qt("deleteBackward"),isDeleteForward:qt("deleteForward"),isDeleteLineBackward:qt("deleteLineBackward"),isDeleteLineForward:qt("deleteLineForward"),isDeleteWordBackward:qt("deleteWordBackward"),isDeleteWordForward:qt("deleteWordForward"),isExtendBackward:qt("extendBackward"),isExtendForward:qt("extendForward"),isExtendLineBackward:qt("extendLineBackward"),isExtendLineForward:qt("extendLineForward"),isItalic:qt("italic"),isMoveLineBackward:qt("moveLineBackward"),isMoveLineForward:qt("moveLineForward"),isMoveWordBackward:qt("moveWordBackward"),isMoveWordForward:qt("moveWordForward"),isRedo:qt("redo"),isSoftBreak:qt("insertSoftBreak"),isSplitBlock:qt("splitBlock"),isTransposeCharacter:qt("transposeCharacter"),isUndo:qt("undo")};function $t(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const Qt=["anchor","focus"],Xt=["anchor","focus"];function Yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yt(Object(n),!0).forEach((function(t){$e(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Jt=(e,t)=>{const{anchor:n,focus:r}=e,o=$t(e,Qt),{anchor:a,focus:i}=t,l=$t(t,Xt);return e[yt]===t[yt]&&(u=o,s=l,Object.keys(u).length===Object.keys(s).length&&Object.keys(u).every((e=>s.hasOwnProperty(e)&&u[e]===s[e])));var u,s},Zt=(e,t)=>{if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){const o=e[r],a=t[r];if(!n.Range.equals(o,a)||!Jt(o,a))return!1}return!0},en=(e,t)=>{if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){const r=e[n],o=t[n];if(r.anchor.offset!==o.anchor.offset||r.focus.offset!==o.focus.offset||!Jt(r,o))return!1}return!0};var tn=a((function(e,t){function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<a(o,t)))break e;e[r]=t,e[n]=o,n=r}}function r(e){return 0===e.length?null:e[0]}function o(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,i=o>>>1;r<i;){var l=2*(r+1)-1,u=e[l],s=l+1,c=e[s];if(0>a(u,n))s<o&&0>a(c,u)?(e[r]=c,e[s]=n,r=s):(e[r]=u,e[l]=n,r=l);else{if(!(s<o&&0>a(c,n)))break e;e[r]=c,e[s]=n,r=s}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var i=performance;t.unstable_now=function(){return i.now()}}else{var l=Date,u=l.now();t.unstable_now=function(){return l.now()-u}}var s=[],c=[],d=1,f=null,p=3,h=!1,v=!1,g=!1,m="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=r(c);null!==t;){if(null===t.callback)o(c);else{if(!(t.startTime<=e))break;o(c),t.sortIndex=t.expirationTime,n(s,t)}t=r(c)}}function k(e){if(g=!1,w(e),!v)if(null!==r(s))v=!0,M(E);else{var t=r(c);null!==t&&L(k,t.startTime-e)}}function E(e,n){v=!1,g&&(g=!1,y(O),O=-1),h=!0;var a=p;try{for(w(n),f=r(s);null!==f&&(!(f.expirationTime>n)||e&&!N());){var i=f.callback;if("function"==typeof i){f.callback=null,p=f.priorityLevel;var l=i(f.expirationTime<=n);n=t.unstable_now(),"function"==typeof l?f.callback=l:f===r(s)&&o(s),w(n)}else o(s);f=r(s)}if(null!==f)var u=!0;else{var d=r(c);null!==d&&L(k,d.startTime-n),u=!1}return u}finally{f=null,p=a,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var x,S=!1,C=null,O=-1,P=5,T=-1;function N(){return!(t.unstable_now()-T<P)}function D(){if(null!==C){var e=t.unstable_now();T=e;var n=!0;try{n=C(!0,e)}finally{n?x():(S=!1,C=null)}}else S=!1}if("function"==typeof b)x=function(){b(D)};else if("undefined"!=typeof MessageChannel){var _=new MessageChannel,R=_.port2;_.port1.onmessage=D,x=function(){R.postMessage(null)}}else x=function(){m(D,0)};function M(e){C=e,S||(S=!0,x())}function L(e,n){O=m((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){v||h||(v=!0,M(E))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(s)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,o,a){var i=t.unstable_now();switch("object"==typeof a&&null!==a?a="number"==typeof(a=a.delay)&&0<a?i+a:i:a=i,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return e={id:d++,callback:o,priorityLevel:e,startTime:a,expirationTime:l=a+l,sortIndex:-1},a>i?(e.sortIndex=a,n(c,e),null===r(s)&&e===r(c)&&(g?(y(O),O=-1):g=!0,L(k,a-i))):(e.sortIndex=l,n(s,e),v||h||(v=!0,M(E))),e},t.unstable_shouldYield=N,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}}));tn.unstable_now,tn.unstable_IdlePriority,tn.unstable_ImmediatePriority,tn.unstable_LowPriority,tn.unstable_NormalPriority,tn.unstable_Profiling,tn.unstable_UserBlockingPriority,tn.unstable_cancelCallback,tn.unstable_continueExecution,tn.unstable_forceFrameRate,tn.unstable_getCurrentPriorityLevel,tn.unstable_getFirstCallbackNode,tn.unstable_next,tn.unstable_pauseExecution,tn.unstable_requestPaint,tn.unstable_runWithPriority,tn.unstable_scheduleCallback,tn.unstable_shouldYield,tn.unstable_wrapCallback;var nn=a((function(e,t){}));nn.unstable_now,nn.unstable_IdlePriority,nn.unstable_ImmediatePriority,nn.unstable_LowPriority,nn.unstable_NormalPriority,nn.unstable_Profiling,nn.unstable_UserBlockingPriority,nn.unstable_cancelCallback,nn.unstable_continueExecution,nn.unstable_forceFrameRate,nn.unstable_getCurrentPriorityLevel,nn.unstable_getFirstCallbackNode,nn.unstable_next,nn.unstable_pauseExecution,nn.unstable_requestPaint,nn.unstable_runWithPriority,nn.unstable_scheduleCallback,nn.unstable_shouldYield,nn.unstable_wrapCallback;var rn=a((function(e){e.exports=tn}));function on(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var an=new Set,ln={};function un(e,t){sn(e,t),sn(e+"Capture",t)}function sn(e,t){for(ln[e]=t,e=0;e<t.length;e++)an.add(t[e])}var cn=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),dn=Object.prototype.hasOwnProperty,fn=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,pn={},hn={};function vn(e,t,n,r,o,a,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var gn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){gn[e]=new vn(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];gn[t]=new vn(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){gn[e]=new vn(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){gn[e]=new vn(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){gn[e]=new vn(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){gn[e]=new vn(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){gn[e]=new vn(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){gn[e]=new vn(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){gn[e]=new vn(e,5,!1,e.toLowerCase(),null,!1,!1)}));var mn=/[\-:]([a-z])/g;function yn(e){return e[1].toUpperCase()}function bn(e,t,n,r){var o=gn.hasOwnProperty(t)?gn[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!dn.call(hn,e)||!dn.call(pn,e)&&(fn.test(e)?hn[e]=!0:(pn[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(mn,yn);gn[t]=new vn(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(mn,yn);gn[t]=new vn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(mn,yn);gn[t]=new vn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){gn[e]=new vn(e,1,!1,e.toLowerCase(),null,!1,!1)})),gn.xlinkHref=new vn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){gn[e]=new vn(e,1,!1,e.toLowerCase(),null,!0,!0)}));var wn=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,kn=Symbol.for("react.element"),En=Symbol.for("react.portal"),xn=Symbol.for("react.fragment"),Sn=Symbol.for("react.strict_mode"),Cn=Symbol.for("react.profiler"),On=Symbol.for("react.provider"),Pn=Symbol.for("react.context"),Tn=Symbol.for("react.forward_ref"),Nn=Symbol.for("react.suspense"),Dn=Symbol.for("react.suspense_list"),_n=Symbol.for("react.memo"),Rn=Symbol.for("react.lazy"),Mn=Symbol.for("react.offscreen"),Ln=Symbol.iterator;function zn(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=Ln&&e[Ln]||e["@@iterator"])?e:null}var Fn,In=Object.assign;function Bn(e){if(void 0===Fn)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Fn=t&&t[1]||""}return"\n"+Fn+e}var jn=!1;function An(e,t){if(!e||jn)return"";jn=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var o=t.stack.split("\n"),a=r.stack.split("\n"),i=o.length-1,l=a.length-1;1<=i&&0<=l&&o[i]!==a[l];)l--;for(;1<=i&&0<=l;i--,l--)if(o[i]!==a[l]){if(1!==i||1!==l)do{if(i--,0>--l||o[i]!==a[l]){var u="\n"+o[i].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}}while(1<=i&&0<=l);break}}}finally{jn=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Bn(e):""}function Wn(e){switch(e.tag){case 5:return Bn(e.type);case 16:return Bn("Lazy");case 13:return Bn("Suspense");case 19:return Bn("SuspenseList");case 0:case 2:case 15:return e=An(e.type,!1);case 11:return e=An(e.type.render,!1);case 1:return e=An(e.type,!0);default:return""}}function Un(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case xn:return"Fragment";case En:return"Portal";case Cn:return"Profiler";case Sn:return"StrictMode";case Nn:return"Suspense";case Dn:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case Pn:return(e.displayName||"Context")+".Consumer";case On:return(e._context.displayName||"Context")+".Provider";case Tn:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case _n:return null!==(t=e.displayName||null)?t:Un(e.type)||"Memo";case Rn:t=e._payload,e=e._init;try{return Un(e(t))}catch(e){}}return null}function Vn(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Un(t);case 8:return t===Sn?"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("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function Hn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function qn(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Kn(e){e._valueTracker||(e._valueTracker=function(e){var t=qn(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function $n(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=qn(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Qn(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Xn(e,t){var n=t.checked;return In({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Yn(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Hn(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Gn(e,t){null!=(t=t.checked)&&bn(e,"checked",t,!1)}function Jn(e,t){Gn(e,t);var n=Hn(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?er(e,t.type,n):t.hasOwnProperty("defaultValue")&&er(e,t.type,Hn(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Zn(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function er(e,t,n){"number"===t&&Qn(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var tr=Array.isArray;function nr(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Hn(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function rr(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(on(91));return In({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function or(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(on(92));if(tr(n)){if(1<n.length)throw Error(on(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:Hn(n)}}function ar(e,t){var n=Hn(t.value),r=Hn(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ir(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function lr(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ur(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?lr(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var sr,cr,dr=(cr=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((sr=sr||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=sr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return cr(e,t)}))}:cr);function fr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var pr={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},hr=["Webkit","ms","Moz","O"];function vr(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||pr.hasOwnProperty(e)&&pr[e]?(""+t).trim():t+"px"}function gr(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=vr(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(pr).forEach((function(e){hr.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pr[t]=pr[e]}))}));var mr=In({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 yr(e,t){if(t){if(mr[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(on(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(on(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(on(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(on(62))}}function br(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){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 wr=null;function kr(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Er=null,xr=null,Sr=null;function Cr(e){if(e=bl(e)){if("function"!=typeof Er)throw Error(on(280));var t=e.stateNode;t&&(t=kl(t),Er(e.stateNode,e.type,t))}}function Or(e){xr?Sr?Sr.push(e):Sr=[e]:xr=e}function Pr(){if(xr){var e=xr,t=Sr;if(Sr=xr=null,Cr(e),t)for(e=0;e<t.length;e++)Cr(t[e])}}function Tr(e,t){return e(t)}function Nr(){}var Dr=!1;function _r(e,t,n){if(Dr)return e(t,n);Dr=!0;try{return Tr(e,t,n)}finally{Dr=!1,(null!==xr||null!==Sr)&&(Nr(),Pr())}}function Rr(e,t){var n=e.stateNode;if(null===n)return null;var r=kl(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(on(231,t,typeof n));return n}var Mr=!1;if(cn)try{var Lr={};Object.defineProperty(Lr,"passive",{get:function(){Mr=!0}}),window.addEventListener("test",Lr,Lr),window.removeEventListener("test",Lr,Lr)}catch(cr){Mr=!1}function zr(e,t,n,r,o,a,i,l,u){var s=Array.prototype.slice.call(arguments,3);try{t.apply(n,s)}catch(e){this.onError(e)}}var Fr=!1,Ir=null,Br=!1,jr=null,Ar={onError:function(e){Fr=!0,Ir=e}};function Wr(e,t,n,r,o,a,i,l,u){Fr=!1,Ir=null,zr.apply(Ar,arguments)}function Ur(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Vr(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Hr(e){if(Ur(e)!==e)throw Error(on(188))}function qr(e){return e=function(e){var t=e.alternate;if(!t){if(null===(t=Ur(e)))throw Error(on(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var a=o.alternate;if(null===a){if(null!==(r=o.return)){n=r;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===n)return Hr(o),e;if(a===r)return Hr(o),t;a=a.sibling}throw Error(on(188))}if(n.return!==r.return)n=o,r=a;else{for(var i=!1,l=o.child;l;){if(l===n){i=!0,n=o,r=a;break}if(l===r){i=!0,r=o,n=a;break}l=l.sibling}if(!i){for(l=a.child;l;){if(l===n){i=!0,n=a,r=o;break}if(l===r){i=!0,r=a,n=o;break}l=l.sibling}if(!i)throw Error(on(189))}}if(n.alternate!==r)throw Error(on(190))}if(3!==n.tag)throw Error(on(188));return n.stateNode.current===n?e:t}(e),null!==e?Kr(e):null}function Kr(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Kr(e);if(null!==t)return t;e=e.sibling}return null}var $r=rn.unstable_scheduleCallback,Qr=rn.unstable_cancelCallback,Xr=rn.unstable_shouldYield,Yr=rn.unstable_requestPaint,Gr=rn.unstable_now,Jr=rn.unstable_getCurrentPriorityLevel,Zr=rn.unstable_ImmediatePriority,eo=rn.unstable_UserBlockingPriority,to=rn.unstable_NormalPriority,no=rn.unstable_LowPriority,ro=rn.unstable_IdlePriority,oo=null,ao=null;var io=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(lo(e)/uo|0)|0},lo=Math.log,uo=Math.LN2;var so=64,co=4194304;function fo(e){switch(e&-e){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 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function po(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,a=e.pingedLanes,i=268435455&n;if(0!==i){var l=i&~o;0!==l?r=fo(l):0!==(a&=i)&&(r=fo(a))}else 0!==(i=n&~o)?r=fo(i):0!==a&&(r=fo(a));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&o)&&((o=r&-r)>=(a=t&-t)||16===o&&0!=(4194240&a)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-io(t)),r|=e[n],t&=~o;return r}function ho(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 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+5e3;default:return-1}}function vo(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function go(){var e=so;return 0==(4194240&(so<<=1))&&(so=64),e}function mo(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function yo(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-io(t)]=n}function bo(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-io(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var wo=0;function ko(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var Eo,xo,So,Co,Oo,Po=!1,To=[],No=null,Do=null,_o=null,Ro=new Map,Mo=new Map,Lo=[],zo="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Fo(e,t){switch(e){case"focusin":case"focusout":No=null;break;case"dragenter":case"dragleave":Do=null;break;case"mouseover":case"mouseout":_o=null;break;case"pointerover":case"pointerout":Ro.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Mo.delete(t.pointerId)}}function Io(e,t,n,r,o,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[o]},null!==t&&(null!==(t=bl(t))&&xo(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function Bo(e){var t=yl(e.target);if(null!==t){var n=Ur(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Vr(n)))return e.blockedOn=t,void Oo(e.priority,(function(){So(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function jo(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Yo(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=bl(n))&&xo(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);wr=r,n.target.dispatchEvent(r),wr=null,t.shift()}return!0}function Ao(e,t,n){jo(e)&&n.delete(t)}function Wo(){Po=!1,null!==No&&jo(No)&&(No=null),null!==Do&&jo(Do)&&(Do=null),null!==_o&&jo(_o)&&(_o=null),Ro.forEach(Ao),Mo.forEach(Ao)}function Uo(e,t){e.blockedOn===t&&(e.blockedOn=null,Po||(Po=!0,rn.unstable_scheduleCallback(rn.unstable_NormalPriority,Wo)))}function Vo(e){function t(t){return Uo(t,e)}if(0<To.length){Uo(To[0],e);for(var n=1;n<To.length;n++){var r=To[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==No&&Uo(No,e),null!==Do&&Uo(Do,e),null!==_o&&Uo(_o,e),Ro.forEach(t),Mo.forEach(t),n=0;n<Lo.length;n++)(r=Lo[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Lo.length&&null===(n=Lo[0]).blockedOn;)Bo(n),null===n.blockedOn&&Lo.shift()}var Ho=wn.ReactCurrentBatchConfig,qo=!0;function Ko(e,t,n,r){var o=wo,a=Ho.transition;Ho.transition=null;try{wo=1,Qo(e,t,n,r)}finally{wo=o,Ho.transition=a}}function $o(e,t,n,r){var o=wo,a=Ho.transition;Ho.transition=null;try{wo=4,Qo(e,t,n,r)}finally{wo=o,Ho.transition=a}}function Qo(e,t,n,r){if(qo){var o=Yo(e,t,n,r);if(null===o)Hi(e,t,r,Xo,n),Fo(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return No=Io(No,e,t,n,r,o),!0;case"dragenter":return Do=Io(Do,e,t,n,r,o),!0;case"mouseover":return _o=Io(_o,e,t,n,r,o),!0;case"pointerover":var a=o.pointerId;return Ro.set(a,Io(Ro.get(a)||null,e,t,n,r,o)),!0;case"gotpointercapture":return a=o.pointerId,Mo.set(a,Io(Mo.get(a)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(Fo(e,r),4&t&&-1<zo.indexOf(e)){for(;null!==o;){var a=bl(o);if(null!==a&&Eo(a),null===(a=Yo(e,t,n,r))&&Hi(e,t,r,Xo,n),a===o)break;o=a}null!==o&&r.stopPropagation()}else Hi(e,t,r,null,n)}}var Xo=null;function Yo(e,t,n,r){if(Xo=null,null!==(e=yl(e=kr(r))))if(null===(t=Ur(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Vr(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Xo=e,null}function Go(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Jr()){case Zr:return 1;case eo:return 4;case to:case no:return 16;case ro:return 536870912;default:return 16}default:return 16}}var Jo=null,Zo=null,ea=null;function ta(){if(ea)return ea;var e,t,n=Zo,r=n.length,o="value"in Jo?Jo.value:Jo.textContent,a=o.length;for(e=0;e<r&&n[e]===o[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===o[a-t];t++);return ea=o.slice(e,1<t?1-t:void 0)}function na(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function ra(){return!0}function oa(){return!1}function aa(e){function t(t,n,r,o,a){for(var i in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(i)&&(t=e[i],this[i]=t?t(o):o[i]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?ra:oa,this.isPropagationStopped=oa,this}return In(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=ra)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=ra)},persist:function(){},isPersistent:ra}),t}var ia,la,ua,sa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ca=aa(sa),da=In({},sa,{view:0,detail:0}),fa=aa(da),pa=In({},da,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ca,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ua&&(ua&&"mousemove"===e.type?(ia=e.screenX-ua.screenX,la=e.screenY-ua.screenY):la=ia=0,ua=e),ia)},movementY:function(e){return"movementY"in e?e.movementY:la}}),ha=aa(pa),va=aa(In({},pa,{dataTransfer:0})),ga=aa(In({},da,{relatedTarget:0})),ma=aa(In({},sa,{animationName:0,elapsedTime:0,pseudoElement:0})),ya=In({},sa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ba=aa(ya),wa=aa(In({},sa,{data:0})),ka={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ea={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},xa={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sa(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=xa[e])&&!!t[e]}function Ca(){return Sa}var Oa=In({},da,{key:function(e){if(e.key){var t=ka[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=na(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Ea[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ca,charCode:function(e){return"keypress"===e.type?na(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?na(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Pa=aa(Oa),Ta=aa(In({},pa,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Na=aa(In({},da,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ca})),Da=aa(In({},sa,{propertyName:0,elapsedTime:0,pseudoElement:0})),_a=In({},pa,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Ra=aa(_a),Ma=[9,13,27,32],La=cn&&"CompositionEvent"in window,za=null;cn&&"documentMode"in document&&(za=document.documentMode);var Fa=cn&&"TextEvent"in window&&!za,Ia=cn&&(!La||za&&8<za&&11>=za),Ba=String.fromCharCode(32),ja=!1;function Aa(e,t){switch(e){case"keyup":return-1!==Ma.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Wa(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Ua=!1;var Va={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ha(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Va[e.type]:"textarea"===t}function qa(e,t,n,r){Or(r),0<(t=Ki(t,"onChange")).length&&(n=new ca("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ka=null,$a=null;function Qa(e){Bi(e,0)}function Xa(e){if($n(wl(e)))return e}function Ya(e,t){if("change"===e)return t}var Ga=!1;if(cn){var Ja;if(cn){var Za="oninput"in document;if(!Za){var ei=document.createElement("div");ei.setAttribute("oninput","return;"),Za="function"==typeof ei.oninput}Ja=Za}else Ja=!1;Ga=Ja&&(!document.documentMode||9<document.documentMode)}function ti(){Ka&&(Ka.detachEvent("onpropertychange",ni),$a=Ka=null)}function ni(e){if("value"===e.propertyName&&Xa($a)){var t=[];qa(t,$a,e,kr(e)),_r(Qa,t)}}function ri(e,t,n){"focusin"===e?(ti(),$a=n,(Ka=t).attachEvent("onpropertychange",ni)):"focusout"===e&&ti()}function oi(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Xa($a)}function ai(e,t){if("click"===e)return Xa(t)}function ii(e,t){if("input"===e||"change"===e)return Xa(t)}var li="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function ui(e,t){if(li(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!dn.call(t,o)||!li(e[o],t[o]))return!1}return!0}function si(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ci(e,t){var n,r=si(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=si(r)}}function di(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?di(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function fi(){for(var e=window,t=Qn();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=Qn((e=t.contentWindow).document)}return t}function pi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function hi(e){var t=fi(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&di(n.ownerDocument.documentElement,n)){if(null!==r&&pi(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=n.textContent.length,a=Math.min(r.start,o);r=void 0===r.end?a:Math.min(r.end,o),!e.extend&&a>r&&(o=r,r=a,a=o),o=ci(n,a);var i=ci(n,r);o&&i&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var vi=cn&&"documentMode"in document&&11>=document.documentMode,gi=null,mi=null,yi=null,bi=!1;function wi(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;bi||null==gi||gi!==Qn(r)||("selectionStart"in(r=gi)&&pi(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},yi&&ui(yi,r)||(yi=r,0<(r=Ki(mi,"onSelect")).length&&(t=new ca("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gi)))}function ki(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ei={animationend:ki("Animation","AnimationEnd"),animationiteration:ki("Animation","AnimationIteration"),animationstart:ki("Animation","AnimationStart"),transitionend:ki("Transition","TransitionEnd")},xi={},Si={};function Ci(e){if(xi[e])return xi[e];if(!Ei[e])return e;var t,n=Ei[e];for(t in n)if(n.hasOwnProperty(t)&&t in Si)return xi[e]=n[t];return e}cn&&(Si=document.createElement("div").style,"AnimationEvent"in window||(delete Ei.animationend.animation,delete Ei.animationiteration.animation,delete Ei.animationstart.animation),"TransitionEvent"in window||delete Ei.transitionend.transition);var Oi=Ci("animationend"),Pi=Ci("animationiteration"),Ti=Ci("animationstart"),Ni=Ci("transitionend"),Di=new Map,_i="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ri(e,t){Di.set(e,t),un(t,[e])}for(var Mi=0;Mi<_i.length;Mi++){var Li=_i[Mi];Ri(Li.toLowerCase(),"on"+(Li[0].toUpperCase()+Li.slice(1)))}Ri(Oi,"onAnimationEnd"),Ri(Pi,"onAnimationIteration"),Ri(Ti,"onAnimationStart"),Ri("dblclick","onDoubleClick"),Ri("focusin","onFocus"),Ri("focusout","onBlur"),Ri(Ni,"onTransitionEnd"),sn("onMouseEnter",["mouseout","mouseover"]),sn("onMouseLeave",["mouseout","mouseover"]),sn("onPointerEnter",["pointerout","pointerover"]),sn("onPointerLeave",["pointerout","pointerover"]),un("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),un("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),un("onBeforeInput",["compositionend","keypress","textInput","paste"]),un("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),un("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),un("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Fi=new Set("cancel close invalid load scroll toggle".split(" ").concat(zi));function Ii(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,a,i,l,u){if(Wr.apply(this,arguments),Fr){if(!Fr)throw Error(on(198));var s=Ir;Fr=!1,Ir=null,Br||(Br=!0,jr=s)}}(r,t,void 0,e),e.currentTarget=null}function Bi(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var i=r.length-1;0<=i;i--){var l=r[i],u=l.instance,s=l.currentTarget;if(l=l.listener,u!==a&&o.isPropagationStopped())break e;Ii(o,l,s),a=u}else for(i=0;i<r.length;i++){if(u=(l=r[i]).instance,s=l.currentTarget,l=l.listener,u!==a&&o.isPropagationStopped())break e;Ii(o,l,s),a=u}}}if(Br)throw e=jr,Br=!1,jr=null,e}function ji(e,t){var n=t[vl];void 0===n&&(n=t[vl]=new Set);var r=e+"__bubble";n.has(r)||(Vi(t,e,2,!1),n.add(r))}function Ai(e,t,n){var r=0;t&&(r|=4),Vi(n,e,r,t)}var Wi="_reactListening"+Math.random().toString(36).slice(2);function Ui(e){if(!e[Wi]){e[Wi]=!0,an.forEach((function(t){"selectionchange"!==t&&(Fi.has(t)||Ai(t,!1,e),Ai(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Wi]||(t[Wi]=!0,Ai("selectionchange",!1,t))}}function Vi(e,t,n,r){switch(Go(t)){case 1:var o=Ko;break;case 4:o=$o;break;default:o=Qo}n=o.bind(null,t,n,e),o=void 0,!Mr||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Hi(e,t,n,r,o){var a=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var i=r.tag;if(3===i||4===i){var l=r.stateNode.containerInfo;if(l===o||8===l.nodeType&&l.parentNode===o)break;if(4===i)for(i=r.return;null!==i;){var u=i.tag;if((3===u||4===u)&&((u=i.stateNode.containerInfo)===o||8===u.nodeType&&u.parentNode===o))return;i=i.return}for(;null!==l;){if(null===(i=yl(l)))return;if(5===(u=i.tag)||6===u){r=a=i;continue e}l=l.parentNode}}r=r.return}_r((function(){var r=a,o=kr(n),i=[];e:{var l=Di.get(e);if(void 0!==l){var u=ca,s=e;switch(e){case"keypress":if(0===na(n))break e;case"keydown":case"keyup":u=Pa;break;case"focusin":s="focus",u=ga;break;case"focusout":s="blur",u=ga;break;case"beforeblur":case"afterblur":u=ga;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=ha;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=va;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=Na;break;case Oi:case Pi:case Ti:u=ma;break;case Ni:u=Da;break;case"scroll":u=fa;break;case"wheel":u=Ra;break;case"copy":case"cut":case"paste":u=ba;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=Ta}var c=0!=(4&t),d=!c&&"scroll"===e,f=c?null!==l?l+"Capture":null:l;c=[];for(var p,h=r;null!==h;){var v=(p=h).stateNode;if(5===p.tag&&null!==v&&(p=v,null!==f&&(null!=(v=Rr(h,f))&&c.push(qi(h,v,p)))),d)break;h=h.return}0<c.length&&(l=new u(l,s,null,n,o),i.push({event:l,listeners:c}))}}if(0==(7&t)){if(u="mouseout"===e||"pointerout"===e,(!(l="mouseover"===e||"pointerover"===e)||n===wr||!(s=n.relatedTarget||n.fromElement)||!yl(s)&&!s[hl])&&(u||l)&&(l=o.window===o?o:(l=o.ownerDocument)?l.defaultView||l.parentWindow:window,u?(u=r,null!==(s=(s=n.relatedTarget||n.toElement)?yl(s):null)&&(s!==(d=Ur(s))||5!==s.tag&&6!==s.tag)&&(s=null)):(u=null,s=r),u!==s)){if(c=ha,v="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(c=Ta,v="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==u?l:wl(u),p=null==s?l:wl(s),(l=new c(v,h+"leave",u,n,o)).target=d,l.relatedTarget=p,v=null,yl(o)===r&&((c=new c(f,h+"enter",s,n,o)).target=p,c.relatedTarget=d,v=c),d=v,u&&s)e:{for(f=s,h=0,p=c=u;p;p=$i(p))h++;for(p=0,v=f;v;v=$i(v))p++;for(;0<h-p;)c=$i(c),h--;for(;0<p-h;)f=$i(f),p--;for(;h--;){if(c===f||null!==f&&c===f.alternate)break e;c=$i(c),f=$i(f)}c=null}else c=null;null!==u&&Qi(i,l,u,c,!1),null!==s&&null!==d&&Qi(i,d,s,c,!0)}if("select"===(u=(l=r?wl(r):window).nodeName&&l.nodeName.toLowerCase())||"input"===u&&"file"===l.type)var g=Ya;else if(Ha(l))if(Ga)g=ii;else{g=oi;var m=ri}else(u=l.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===l.type||"radio"===l.type)&&(g=ai);switch(g&&(g=g(e,r))?qa(i,g,n,o):(m&&m(e,l,r),"focusout"===e&&(m=l._wrapperState)&&m.controlled&&"number"===l.type&&er(l,"number",l.value)),m=r?wl(r):window,e){case"focusin":(Ha(m)||"true"===m.contentEditable)&&(gi=m,mi=r,yi=null);break;case"focusout":yi=mi=gi=null;break;case"mousedown":bi=!0;break;case"contextmenu":case"mouseup":case"dragend":bi=!1,wi(i,n,o);break;case"selectionchange":if(vi)break;case"keydown":case"keyup":wi(i,n,o)}var y;if(La)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Ua?Aa(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Ia&&"ko"!==n.locale&&(Ua||"onCompositionStart"!==b?"onCompositionEnd"===b&&Ua&&(y=ta()):(Zo="value"in(Jo=o)?Jo.value:Jo.textContent,Ua=!0)),0<(m=Ki(r,b)).length&&(b=new wa(b,e,null,n,o),i.push({event:b,listeners:m}),y?b.data=y:null!==(y=Wa(n))&&(b.data=y))),(y=Fa?function(e,t){switch(e){case"compositionend":return Wa(t);case"keypress":return 32!==t.which?null:(ja=!0,Ba);case"textInput":return(e=t.data)===Ba&&ja?null:e;default:return null}}(e,n):function(e,t){if(Ua)return"compositionend"===e||!La&&Aa(e,t)?(e=ta(),ea=Zo=Jo=null,Ua=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ia&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Ki(r,"onBeforeInput")).length&&(o=new wa("onBeforeInput","beforeinput",null,n,o),i.push({event:o,listeners:r}),o.data=y))}Bi(i,t)}))}function qi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ki(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,a=o.stateNode;5===o.tag&&null!==a&&(o=a,null!=(a=Rr(e,n))&&r.unshift(qi(e,a,o)),null!=(a=Rr(e,t))&&r.push(qi(e,a,o))),e=e.return}return r}function $i(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Qi(e,t,n,r,o){for(var a=t._reactName,i=[];null!==n&&n!==r;){var l=n,u=l.alternate,s=l.stateNode;if(null!==u&&u===r)break;5===l.tag&&null!==s&&(l=s,o?null!=(u=Rr(n,a))&&i.unshift(qi(n,u,l)):o||null!=(u=Rr(n,a))&&i.push(qi(n,u,l))),n=n.return}0!==i.length&&e.push({event:t,listeners:i})}var Xi=/\r\n?/g,Yi=/\u0000|\uFFFD/g;function Gi(e){return("string"==typeof e?e:""+e).replace(Xi,"\n").replace(Yi,"")}function Ji(e,t,n){if(t=Gi(t),Gi(e)!==t&&n)throw Error(on(425))}function Zi(){}var el=null,tl=null;function nl(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var rl="function"==typeof setTimeout?setTimeout:void 0,ol="function"==typeof clearTimeout?clearTimeout:void 0,al="function"==typeof Promise?Promise:void 0,il="function"==typeof queueMicrotask?queueMicrotask:void 0!==al?function(e){return al.resolve(null).then(e).catch(ll)}:rl;function ll(e){setTimeout((function(){throw e}))}function ul(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void Vo(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);Vo(t)}function sl(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function cl(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var dl=Math.random().toString(36).slice(2),fl="__reactFiber$"+dl,pl="__reactProps$"+dl,hl="__reactContainer$"+dl,vl="__reactEvents$"+dl,gl="__reactListeners$"+dl,ml="__reactHandles$"+dl;function yl(e){var t=e[fl];if(t)return t;for(var n=e.parentNode;n;){if(t=n[hl]||n[fl]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=cl(e);null!==e;){if(n=e[fl])return n;e=cl(e)}return t}n=(e=n).parentNode}return null}function bl(e){return!(e=e[fl]||e[hl])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function wl(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(on(33))}function kl(e){return e[pl]||null}var El=[],xl=-1;function Sl(e){return{current:e}}function Cl(e){0>xl||(e.current=El[xl],El[xl]=null,xl--)}function Ol(e,t){xl++,El[xl]=e.current,e.current=t}var Pl={},Tl=Sl(Pl),Nl=Sl(!1),Dl=Pl;function _l(e,t){var n=e.type.contextTypes;if(!n)return Pl;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,a={};for(o in n)a[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Rl(e){return null!=(e=e.childContextTypes)}function Ml(){Cl(Nl),Cl(Tl)}function Ll(e,t,n){if(Tl.current!==Pl)throw Error(on(168));Ol(Tl,t),Ol(Nl,n)}function zl(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(on(108,Vn(e)||"Unknown",o));return In({},n,r)}function Fl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Pl,Dl=Tl.current,Ol(Tl,e),Ol(Nl,Nl.current),!0}function Il(e,t,n){var r=e.stateNode;if(!r)throw Error(on(169));n?(e=zl(e,t,Dl),r.__reactInternalMemoizedMergedChildContext=e,Cl(Nl),Cl(Tl),Ol(Tl,e)):Cl(Nl),Ol(Nl,n)}var Bl=null,jl=!1,Al=!1;function Wl(e){null===Bl?Bl=[e]:Bl.push(e)}function Ul(){if(!Al&&null!==Bl){Al=!0;var e=0,t=wo;try{var n=Bl;for(wo=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Bl=null,jl=!1}catch(t){throw null!==Bl&&(Bl=Bl.slice(e+1)),$r(Zr,Ul),t}finally{wo=t,Al=!1}}return null}var Vl=[],Hl=0,ql=null,Kl=0,$l=[],Ql=0,Xl=null,Yl=1,Gl="";function Jl(e,t){Vl[Hl++]=Kl,Vl[Hl++]=ql,ql=e,Kl=t}function Zl(e,t,n){$l[Ql++]=Yl,$l[Ql++]=Gl,$l[Ql++]=Xl,Xl=e;var r=Yl;e=Gl;var o=32-io(r)-1;r&=~(1<<o),n+=1;var a=32-io(t)+o;if(30<a){var i=o-o%5;a=(r&(1<<i)-1).toString(32),r>>=i,o-=i,Yl=1<<32-io(t)+o|n<<o|r,Gl=a+e}else Yl=1<<a|n<<o|r,Gl=e}function eu(e){null!==e.return&&(Jl(e,1),Zl(e,1,0))}function tu(e){for(;e===ql;)ql=Vl[--Hl],Vl[Hl]=null,Kl=Vl[--Hl],Vl[Hl]=null;for(;e===Xl;)Xl=$l[--Ql],$l[Ql]=null,Gl=$l[--Ql],$l[Ql]=null,Yl=$l[--Ql],$l[Ql]=null}var nu=null,ru=null,ou=!1,au=null;function iu(e,t){var n=_f(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function lu(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,nu=e,ru=sl(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,nu=e,ru=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Xl?{id:Yl,overflow:Gl}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=_f(18,null,null,0)).stateNode=t,n.return=e,e.child=n,nu=e,ru=null,!0);default:return!1}}function uu(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function su(e){if(ou){var t=ru;if(t){var n=t;if(!lu(e,t)){if(uu(e))throw Error(on(418));t=sl(n.nextSibling);var r=nu;t&&lu(e,t)?iu(r,n):(e.flags=-4097&e.flags|2,ou=!1,nu=e)}}else{if(uu(e))throw Error(on(418));e.flags=-4097&e.flags|2,ou=!1,nu=e}}}function cu(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;nu=e}function du(e){if(e!==nu)return!1;if(!ou)return cu(e),ou=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!nl(e.type,e.memoizedProps)),t&&(t=ru)){if(uu(e))throw fu(),Error(on(418));for(;t;)iu(e,t),t=sl(t.nextSibling)}if(cu(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(on(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ru=sl(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ru=null}}else ru=nu?sl(e.stateNode.nextSibling):null;return!0}function fu(){for(var e=ru;e;)e=sl(e.nextSibling)}function pu(){ru=nu=null,ou=!1}function hu(e){null===au?au=[e]:au.push(e)}var vu=wn.ReactCurrentBatchConfig;function gu(e,t){if(e&&e.defaultProps){for(var n in t=In({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var mu=Sl(null),yu=null,bu=null,wu=null;function ku(){wu=bu=yu=null}function Eu(e){var t=mu.current;Cl(mu),e._currentValue=t}function xu(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Su(e,t){yu=e,wu=bu=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(bc=!0),e.firstContext=null)}function Cu(e){var t=e._currentValue;if(wu!==e)if(e={context:e,memoizedValue:t,next:null},null===bu){if(null===yu)throw Error(on(308));bu=e,yu.dependencies={lanes:0,firstContext:e}}else bu=bu.next=e;return t}var Ou=null;function Pu(e){null===Ou?Ou=[e]:Ou.push(e)}function Tu(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,Pu(t)):(n.next=o.next,o.next=n),t.interleaved=n,Nu(e,r)}function Nu(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Du=!1;function _u(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ru(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Mu(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Lu(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&Pd)){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Nu(e,n)}return null===(o=r.interleaved)?(t.next=t,Pu(r)):(t.next=o.next,o.next=t),r.interleaved=t,Nu(e,n)}function zu(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bo(e,n)}}function Fu(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?o=a=i:a=a.next=i,n=n.next}while(null!==n);null===a?o=a=t:a=a.next=t}else o=a=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Iu(e,t,n,r){var o=e.updateQueue;Du=!1;var a=o.firstBaseUpdate,i=o.lastBaseUpdate,l=o.shared.pending;if(null!==l){o.shared.pending=null;var u=l,s=u.next;u.next=null,null===i?a=s:i.next=s,i=u;var c=e.alternate;null!==c&&((l=(c=c.updateQueue).lastBaseUpdate)!==i&&(null===l?c.firstBaseUpdate=s:l.next=s,c.lastBaseUpdate=u))}if(null!==a){var d=o.baseState;for(i=0,c=s=u=null,l=a;;){var f=l.lane,p=l.eventTime;if((r&f)===f){null!==c&&(c=c.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var h=e,v=l;switch(f=t,p=n,v.tag){case 1:if("function"==typeof(h=v.payload)){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(f="function"==typeof(h=v.payload)?h.call(p,d,f):h))break e;d=In({},d,f);break e;case 2:Du=!0}}null!==l.callback&&0!==l.lane&&(e.flags|=64,null===(f=o.effects)?o.effects=[l]:f.push(l))}else p={eventTime:p,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},null===c?(s=c=p,u=d):c=c.next=p,i|=f;if(null===(l=l.next)){if(null===(l=o.shared.pending))break;l=(f=l).next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}if(null===c&&(u=d),o.baseState=u,o.firstBaseUpdate=s,o.lastBaseUpdate=c,null!==(t=o.shared.interleaved)){o=t;do{i|=o.lane,o=o.next}while(o!==t)}else null===a&&(o.shared.lanes=0);zd|=i,e.lanes=i,e.memoizedState=d}}function Bu(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!=typeof o)throw Error(on(191,o));o.call(r)}}}var ju=(new t.Component).refs;function Au(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:In({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Wu={isMounted:function(e){return!!(e=e._reactInternals)&&Ur(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Zd(),o=ef(e),a=Mu(r,o);a.payload=t,null!=n&&(a.callback=n),null!==(t=Lu(e,a,o))&&(tf(t,e,o,r),zu(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Zd(),o=ef(e),a=Mu(r,o);a.tag=1,a.payload=t,null!=n&&(a.callback=n),null!==(t=Lu(e,a,o))&&(tf(t,e,o,r),zu(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Zd(),r=ef(e),o=Mu(n,r);o.tag=2,null!=t&&(o.callback=t),null!==(t=Lu(e,o,r))&&(tf(t,e,r,n),zu(t,e,r))}};function Uu(e,t,n,r,o,a,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,i):!t.prototype||!t.prototype.isPureReactComponent||(!ui(n,r)||!ui(o,a))}function Vu(e,t,n){var r=!1,o=Pl,a=t.contextType;return"object"==typeof a&&null!==a?a=Cu(a):(o=Rl(t)?Dl:Tl.current,a=(r=null!=(r=t.contextTypes))?_l(e,o):Pl),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Wu,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=a),t}function Hu(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Wu.enqueueReplaceState(t,t.state,null)}function qu(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=ju,_u(e);var a=t.contextType;"object"==typeof a&&null!==a?o.context=Cu(a):(a=Rl(t)?Dl:Tl.current,o.context=_l(e,a)),o.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(Au(e,t,a,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&Wu.enqueueReplaceState(o,o.state,null),Iu(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4194308)}function Ku(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(on(309));var r=n.stateNode}if(!r)throw Error(on(147,e));var o=r,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=o.refs;t===ju&&(t=o.refs={}),null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!=typeof e)throw Error(on(284));if(!n._owner)throw Error(on(290,e))}return e}function $u(e,t){throw e=Object.prototype.toString.call(t),Error(on(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Qu(e){return(0,e._init)(e._payload)}function Xu(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Mf(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function i(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=If(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function u(e,t,n,r){var a=n.type;return a===xn?c(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===Rn&&Qu(a)===t.type)?((r=o(t,n.props)).ref=Ku(e,t,n),r.return=e,r):((r=Lf(n.type,n.key,n.props,null,e.mode,r)).ref=Ku(e,t,n),r.return=e,r)}function s(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Bf(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function c(e,t,n,r,a){return null===t||7!==t.tag?((t=zf(n,e.mode,r,a)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=If(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case kn:return(n=Lf(t.type,t.key,t.props,null,e.mode,n)).ref=Ku(e,null,t),n.return=e,n;case En:return(t=Bf(t,e.mode,n)).return=e,t;case Rn:return d(e,(0,t._init)(t._payload),n)}if(tr(t)||zn(t))return(t=zf(t,e.mode,n,null)).return=e,t;$u(e,t)}return null}function f(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==o?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case kn:return n.key===o?u(e,t,n,r):null;case En:return n.key===o?s(e,t,n,r):null;case Rn:return f(e,t,(o=n._init)(n._payload),r)}if(tr(n)||zn(n))return null!==o?null:c(e,t,n,r,null);$u(e,n)}return null}function p(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case kn:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o);case En:return s(t,e=e.get(null===r.key?n:r.key)||null,r,o);case Rn:return p(e,t,n,(0,r._init)(r._payload),o)}if(tr(r)||zn(r))return c(t,e=e.get(n)||null,r,o,null);$u(t,r)}return null}function h(o,i,l,u){for(var s=null,c=null,h=i,v=i=0,g=null;null!==h&&v<l.length;v++){h.index>v?(g=h,h=null):g=h.sibling;var m=f(o,h,l[v],u);if(null===m){null===h&&(h=g);break}e&&h&&null===m.alternate&&t(o,h),i=a(m,i,v),null===c?s=m:c.sibling=m,c=m,h=g}if(v===l.length)return n(o,h),ou&&Jl(o,v),s;if(null===h){for(;v<l.length;v++)null!==(h=d(o,l[v],u))&&(i=a(h,i,v),null===c?s=h:c.sibling=h,c=h);return ou&&Jl(o,v),s}for(h=r(o,h);v<l.length;v++)null!==(g=p(h,o,v,l[v],u))&&(e&&null!==g.alternate&&h.delete(null===g.key?v:g.key),i=a(g,i,v),null===c?s=g:c.sibling=g,c=g);return e&&h.forEach((function(e){return t(o,e)})),ou&&Jl(o,v),s}function v(o,i,l,u){var s=zn(l);if("function"!=typeof s)throw Error(on(150));if(null==(l=s.call(l)))throw Error(on(151));for(var c=s=null,h=i,v=i=0,g=null,m=l.next();null!==h&&!m.done;v++,m=l.next()){h.index>v?(g=h,h=null):g=h.sibling;var y=f(o,h,m.value,u);if(null===y){null===h&&(h=g);break}e&&h&&null===y.alternate&&t(o,h),i=a(y,i,v),null===c?s=y:c.sibling=y,c=y,h=g}if(m.done)return n(o,h),ou&&Jl(o,v),s;if(null===h){for(;!m.done;v++,m=l.next())null!==(m=d(o,m.value,u))&&(i=a(m,i,v),null===c?s=m:c.sibling=m,c=m);return ou&&Jl(o,v),s}for(h=r(o,h);!m.done;v++,m=l.next())null!==(m=p(h,o,v,m.value,u))&&(e&&null!==m.alternate&&h.delete(null===m.key?v:m.key),i=a(m,i,v),null===c?s=m:c.sibling=m,c=m);return e&&h.forEach((function(e){return t(o,e)})),ou&&Jl(o,v),s}return function e(r,a,l,u){if("object"==typeof l&&null!==l&&l.type===xn&&null===l.key&&(l=l.props.children),"object"==typeof l&&null!==l){switch(l.$$typeof){case kn:e:{for(var s=l.key,c=a;null!==c;){if(c.key===s){if((s=l.type)===xn){if(7===c.tag){n(r,c.sibling),(a=o(c,l.props.children)).return=r,r=a;break e}}else if(c.elementType===s||"object"==typeof s&&null!==s&&s.$$typeof===Rn&&Qu(s)===c.type){n(r,c.sibling),(a=o(c,l.props)).ref=Ku(r,c,l),a.return=r,r=a;break e}n(r,c);break}t(r,c),c=c.sibling}l.type===xn?((a=zf(l.props.children,r.mode,u,l.key)).return=r,r=a):((u=Lf(l.type,l.key,l.props,null,r.mode,u)).ref=Ku(r,a,l),u.return=r,r=u)}return i(r);case En:e:{for(c=l.key;null!==a;){if(a.key===c){if(4===a.tag&&a.stateNode.containerInfo===l.containerInfo&&a.stateNode.implementation===l.implementation){n(r,a.sibling),(a=o(a,l.children||[])).return=r,r=a;break e}n(r,a);break}t(r,a),a=a.sibling}(a=Bf(l,r.mode,u)).return=r,r=a}return i(r);case Rn:return e(r,a,(c=l._init)(l._payload),u)}if(tr(l))return h(r,a,l,u);if(zn(l))return v(r,a,l,u);$u(r,l)}return"string"==typeof l&&""!==l||"number"==typeof l?(l=""+l,null!==a&&6===a.tag?(n(r,a.sibling),(a=o(a,l)).return=r,r=a):(n(r,a),(a=If(l,r.mode,u)).return=r,r=a),i(r)):n(r,a)}}var Yu=Xu(!0),Gu=Xu(!1),Ju={},Zu=Sl(Ju),es=Sl(Ju),ts=Sl(Ju);function ns(e){if(e===Ju)throw Error(on(174));return e}function rs(e,t){switch(Ol(ts,t),Ol(es,e),Ol(Zu,Ju),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ur(null,"");break;default:t=ur(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Cl(Zu),Ol(Zu,t)}function os(){Cl(Zu),Cl(es),Cl(ts)}function as(e){ns(ts.current);var t=ns(Zu.current),n=ur(t,e.type);t!==n&&(Ol(es,e),Ol(Zu,n))}function is(e){es.current===e&&(Cl(Zu),Cl(es))}var ls=Sl(0);function us(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ss=[];function cs(){for(var e=0;e<ss.length;e++)ss[e]._workInProgressVersionPrimary=null;ss.length=0}var ds=wn.ReactCurrentDispatcher,fs=wn.ReactCurrentBatchConfig,ps=0,hs=null,vs=null,gs=null,ms=!1,ys=!1,bs=0,ws=0;function ks(){throw Error(on(321))}function Es(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!li(e[n],t[n]))return!1;return!0}function xs(e,t,n,r,o,a){if(ps=a,hs=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ds.current=null===e||null===e.memoizedState?ic:lc,e=n(r,o),ys){a=0;do{if(ys=!1,bs=0,25<=a)throw Error(on(301));a+=1,gs=vs=null,t.updateQueue=null,ds.current=uc,e=n(r,o)}while(ys)}if(ds.current=ac,t=null!==vs&&null!==vs.next,ps=0,gs=vs=hs=null,ms=!1,t)throw Error(on(300));return e}function Ss(){var e=0!==bs;return bs=0,e}function Cs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===gs?hs.memoizedState=gs=e:gs=gs.next=e,gs}function Os(){if(null===vs){var e=hs.alternate;e=null!==e?e.memoizedState:null}else e=vs.next;var t=null===gs?hs.memoizedState:gs.next;if(null!==t)gs=t,vs=e;else{if(null===e)throw Error(on(310));e={memoizedState:(vs=e).memoizedState,baseState:vs.baseState,baseQueue:vs.baseQueue,queue:vs.queue,next:null},null===gs?hs.memoizedState=gs=e:gs=gs.next=e}return gs}function Ps(e,t){return"function"==typeof t?t(e):t}function Ts(e){var t=Os(),n=t.queue;if(null===n)throw Error(on(311));n.lastRenderedReducer=e;var r=vs,o=r.baseQueue,a=n.pending;if(null!==a){if(null!==o){var i=o.next;o.next=a.next,a.next=i}r.baseQueue=o=a,n.pending=null}if(null!==o){a=o.next,r=r.baseState;var l=i=null,u=null,s=a;do{var c=s.lane;if((ps&c)===c)null!==u&&(u=u.next={lane:0,action:s.action,hasEagerState:s.hasEagerState,eagerState:s.eagerState,next:null}),r=s.hasEagerState?s.eagerState:e(r,s.action);else{var d={lane:c,action:s.action,hasEagerState:s.hasEagerState,eagerState:s.eagerState,next:null};null===u?(l=u=d,i=r):u=u.next=d,hs.lanes|=c,zd|=c}s=s.next}while(null!==s&&s!==a);null===u?i=r:u.next=l,li(r,t.memoizedState)||(bc=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=u,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{a=o.lane,hs.lanes|=a,zd|=a,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ns(e){var t=Os(),n=t.queue;if(null===n)throw Error(on(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,a=t.memoizedState;if(null!==o){n.pending=null;var i=o=o.next;do{a=e(a,i.action),i=i.next}while(i!==o);li(a,t.memoizedState)||(bc=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Ds(){}function _s(e,t){var n=hs,r=Os(),o=t(),a=!li(r.memoizedState,o);if(a&&(r.memoizedState=o,bc=!0),r=r.queue,Vs(Ls.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==gs&&1&gs.memoizedState.tag){if(n.flags|=2048,Bs(9,Ms.bind(null,n,r,o,t),void 0,null),null===Td)throw Error(on(349));0!=(30&ps)||Rs(n,t,o)}return o}function Rs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=hs.updateQueue)?(t={lastEffect:null,stores:null},hs.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ms(e,t,n,r){t.value=n,t.getSnapshot=r,zs(t)&&Fs(e)}function Ls(e,t,n){return n((function(){zs(t)&&Fs(e)}))}function zs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!li(e,n)}catch(e){return!0}}function Fs(e){var t=Nu(e,1);null!==t&&tf(t,e,1,-1)}function Is(e){var t=Cs();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ps,lastRenderedState:e},t.queue=e,e=e.dispatch=tc.bind(null,hs,e),[t.memoizedState,e]}function Bs(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=hs.updateQueue)?(t={lastEffect:null,stores:null},hs.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function js(){return Os().memoizedState}function As(e,t,n,r){var o=Cs();hs.flags|=e,o.memoizedState=Bs(1|t,n,void 0,void 0===r?null:r)}function Ws(e,t,n,r){var o=Os();r=void 0===r?null:r;var a=void 0;if(null!==vs){var i=vs.memoizedState;if(a=i.destroy,null!==r&&Es(r,i.deps))return void(o.memoizedState=Bs(t,n,a,r))}hs.flags|=e,o.memoizedState=Bs(1|t,n,a,r)}function Us(e,t){return As(8390656,8,e,t)}function Vs(e,t){return Ws(2048,8,e,t)}function Hs(e,t){return Ws(4,2,e,t)}function qs(e,t){return Ws(4,4,e,t)}function Ks(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function $s(e,t,n){return n=null!=n?n.concat([e]):null,Ws(4,4,Ks.bind(null,t,e),n)}function Qs(){}function Xs(e,t){var n=Os();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Es(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ys(e,t){var n=Os();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Es(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Gs(e,t,n){return 0==(21&ps)?(e.baseState&&(e.baseState=!1,bc=!0),e.memoizedState=n):(li(n,t)||(n=go(),hs.lanes|=n,zd|=n,e.baseState=!0),t)}function Js(e,t){var n=wo;wo=0!==n&&4>n?n:4,e(!0);var r=fs.transition;fs.transition={};try{e(!1),t()}finally{wo=n,fs.transition=r}}function Zs(){return Os().memoizedState}function ec(e,t,n){var r=ef(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},nc(e))rc(t,n);else if(null!==(n=Tu(e,t,n,r))){tf(n,e,r,Zd()),oc(n,t,r)}}function tc(e,t,n){var r=ef(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(nc(e))rc(t,o);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var i=t.lastRenderedState,l=a(i,n);if(o.hasEagerState=!0,o.eagerState=l,li(l,i)){var u=t.interleaved;return null===u?(o.next=o,Pu(t)):(o.next=u.next,u.next=o),void(t.interleaved=o)}}catch(e){}null!==(n=Tu(e,t,o,r))&&(tf(n,e,r,o=Zd()),oc(n,t,r))}}function nc(e){var t=e.alternate;return e===hs||null!==t&&t===hs}function rc(e,t){ys=ms=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function oc(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bo(e,n)}}var ac={readContext:Cu,useCallback:ks,useContext:ks,useEffect:ks,useImperativeHandle:ks,useInsertionEffect:ks,useLayoutEffect:ks,useMemo:ks,useReducer:ks,useRef:ks,useState:ks,useDebugValue:ks,useDeferredValue:ks,useTransition:ks,useMutableSource:ks,useSyncExternalStore:ks,useId:ks,unstable_isNewReconciler:!1},ic={readContext:Cu,useCallback:function(e,t){return Cs().memoizedState=[e,void 0===t?null:t],e},useContext:Cu,useEffect:Us,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,As(4194308,4,Ks.bind(null,t,e),n)},useLayoutEffect:function(e,t){return As(4194308,4,e,t)},useInsertionEffect:function(e,t){return As(4,2,e,t)},useMemo:function(e,t){var n=Cs();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Cs();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ec.bind(null,hs,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Cs().memoizedState=e},useState:Is,useDebugValue:Qs,useDeferredValue:function(e){return Cs().memoizedState=e},useTransition:function(){var e=Is(!1),t=e[0];return e=Js.bind(null,e[1]),Cs().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=hs,o=Cs();if(ou){if(void 0===n)throw Error(on(407));n=n()}else{if(n=t(),null===Td)throw Error(on(349));0!=(30&ps)||Rs(r,t,n)}o.memoizedState=n;var a={value:n,getSnapshot:t};return o.queue=a,Us(Ls.bind(null,r,a,e),[e]),r.flags|=2048,Bs(9,Ms.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=Cs(),t=Td.identifierPrefix;if(ou){var n=Gl;t=":"+t+"R"+(n=(Yl&~(1<<32-io(Yl)-1)).toString(32)+n),0<(n=bs++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=ws++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},lc={readContext:Cu,useCallback:Xs,useContext:Cu,useEffect:Vs,useImperativeHandle:$s,useInsertionEffect:Hs,useLayoutEffect:qs,useMemo:Ys,useReducer:Ts,useRef:js,useState:function(){return Ts(Ps)},useDebugValue:Qs,useDeferredValue:function(e){return Gs(Os(),vs.memoizedState,e)},useTransition:function(){return[Ts(Ps)[0],Os().memoizedState]},useMutableSource:Ds,useSyncExternalStore:_s,useId:Zs,unstable_isNewReconciler:!1},uc={readContext:Cu,useCallback:Xs,useContext:Cu,useEffect:Vs,useImperativeHandle:$s,useInsertionEffect:Hs,useLayoutEffect:qs,useMemo:Ys,useReducer:Ns,useRef:js,useState:function(){return Ns(Ps)},useDebugValue:Qs,useDeferredValue:function(e){var t=Os();return null===vs?t.memoizedState=e:Gs(t,vs.memoizedState,e)},useTransition:function(){return[Ns(Ps)[0],Os().memoizedState]},useMutableSource:Ds,useSyncExternalStore:_s,useId:Zs,unstable_isNewReconciler:!1};function sc(e,t){try{var n="",r=t;do{n+=Wn(r),r=r.return}while(r);var o=n}catch(e){o="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:o,digest:null}}function cc(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function dc(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var fc="function"==typeof WeakMap?WeakMap:Map;function pc(e,t,n){(n=Mu(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Vd||(Vd=!0,Hd=r),dc(0,t)},n}function hc(e,t,n){(n=Mu(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){dc(0,t)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){dc(0,t),"function"!=typeof r&&(null===qd?qd=new Set([this]):qd.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function vc(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new fc;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=Cf.bind(null,e,t,n),t.then(e,e))}function gc(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function mc(e,t,n,r,o){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Mu(-1,1)).tag=2,Lu(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var yc=wn.ReactCurrentOwner,bc=!1;function wc(e,t,n,r){t.child=null===e?Gu(t,null,n,r):Yu(t,e.child,n,r)}function kc(e,t,n,r,o){n=n.render;var a=t.ref;return Su(t,o),r=xs(e,t,n,r,a,o),n=Ss(),null===e||bc?(ou&&n&&eu(t),t.flags|=1,wc(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Vc(e,t,o))}function Ec(e,t,n,r,o){if(null===e){var a=n.type;return"function"!=typeof a||Rf(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Lf(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,xc(e,t,a,r,o))}if(a=e.child,0==(e.lanes&o)){var i=a.memoizedProps;if((n=null!==(n=n.compare)?n:ui)(i,r)&&e.ref===t.ref)return Vc(e,t,o)}return t.flags|=1,(e=Mf(a,r)).ref=t.ref,e.return=t,t.child=e}function xc(e,t,n,r,o){if(null!==e){var a=e.memoizedProps;if(ui(a,r)&&e.ref===t.ref){if(bc=!1,t.pendingProps=r=a,0==(e.lanes&o))return t.lanes=e.lanes,Vc(e,t,o);0!=(131072&e.flags)&&(bc=!0)}}return Oc(e,t,n,r,o)}function Sc(e,t,n){var r=t.pendingProps,o=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ol(Rd,_d),_d|=n;else{if(0==(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ol(Rd,_d),_d|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,Ol(Rd,_d),_d|=r}else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,Ol(Rd,_d),_d|=r;return wc(e,t,o,n),t.child}function Cc(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Oc(e,t,n,r,o){var a=Rl(n)?Dl:Tl.current;return a=_l(t,a),Su(t,o),n=xs(e,t,n,r,a,o),r=Ss(),null===e||bc?(ou&&r&&eu(t),t.flags|=1,wc(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Vc(e,t,o))}function Pc(e,t,n,r,o){if(Rl(n)){var a=!0;Fl(t)}else a=!1;if(Su(t,o),null===t.stateNode)Uc(e,t),Vu(t,n,r),qu(t,n,r,o),r=!0;else if(null===e){var i=t.stateNode,l=t.memoizedProps;i.props=l;var u=i.context,s=n.contextType;"object"==typeof s&&null!==s?s=Cu(s):s=_l(t,s=Rl(n)?Dl:Tl.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof i.getSnapshotBeforeUpdate;d||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(l!==r||u!==s)&&Hu(t,i,r,s),Du=!1;var f=t.memoizedState;i.state=f,Iu(t,r,i,o),u=t.memoizedState,l!==r||f!==u||Nl.current||Du?("function"==typeof c&&(Au(t,n,c,r),u=t.memoizedState),(l=Du||Uu(t,n,l,r,f,u,s))?(d||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.flags|=4194308)):("function"==typeof i.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),i.props=r,i.state=u,i.context=s,r=l):("function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Ru(e,t),l=t.memoizedProps,s=t.type===t.elementType?l:gu(t.type,l),i.props=s,d=t.pendingProps,f=i.context,"object"==typeof(u=n.contextType)&&null!==u?u=Cu(u):u=_l(t,u=Rl(n)?Dl:Tl.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(l!==d||f!==u)&&Hu(t,i,r,u),Du=!1,f=t.memoizedState,i.state=f,Iu(t,r,i,o);var h=t.memoizedState;l!==d||f!==h||Nl.current||Du?("function"==typeof p&&(Au(t,n,p,r),h=t.memoizedState),(s=Du||Uu(t,n,s,r,f,h,u)||!1)?(c||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,h,u),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,h,u)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof i.componentDidUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),i.props=r,i.state=h,i.context=u,r=s):("function"!=typeof i.componentDidUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Tc(e,t,n,r,a,o)}function Tc(e,t,n,r,o,a){Cc(e,t);var i=0!=(128&t.flags);if(!r&&!i)return o&&Il(t,n,!1),Vc(e,t,a);r=t.stateNode,yc.current=t;var l=i&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&i?(t.child=Yu(t,e.child,null,a),t.child=Yu(t,null,l,a)):wc(e,t,l,a),t.memoizedState=r.state,o&&Il(t,n,!0),t.child}function Nc(e){var t=e.stateNode;t.pendingContext?Ll(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ll(0,t.context,!1),rs(e,t.containerInfo)}function Dc(e,t,n,r,o){return pu(),hu(o),t.flags|=256,wc(e,t,n,r),t.child}var _c,Rc,Mc,Lc={dehydrated:null,treeContext:null,retryLane:0};function zc(e){return{baseLanes:e,cachePool:null,transitions:null}}function Fc(e,t,n){var r,o=t.pendingProps,a=ls.current,i=!1,l=0!=(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!=(2&a)),r?(i=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Ol(ls,1&a),null===e)return su(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=o.children,e=o.fallback,i?(o=t.mode,i=t.child,l={mode:"hidden",children:l},0==(1&o)&&null!==i?(i.childLanes=0,i.pendingProps=l):i=Ff(l,o,0,null),e=zf(e,o,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=zc(n),t.memoizedState=Lc,e):Ic(t,l));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,t,n,r,o,a,i){if(n)return 256&t.flags?(t.flags&=-257,Bc(e,t,i,r=cc(Error(on(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,o=t.mode,r=Ff({mode:"visible",children:r.children},o,0,null),(a=zf(a,o,i,null)).flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,0!=(1&t.mode)&&Yu(t,e.child,null,i),t.child.memoizedState=zc(i),t.memoizedState=Lc,a);if(0==(1&t.mode))return Bc(e,t,i,null);if("$!"===o.data){if(r=o.nextSibling&&o.nextSibling.dataset)var l=r.dgst;return r=l,Bc(e,t,i,r=cc(a=Error(on(419)),r,void 0))}if(l=0!=(i&e.childLanes),bc||l){if(null!==(r=Td)){switch(i&-i){case 4:o=2;break;case 16:o=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!=(o&(r.suspendedLanes|i))?0:o)&&o!==a.retryLane&&(a.retryLane=o,Nu(e,o),tf(r,e,o,-1))}return vf(),Bc(e,t,i,r=cc(Error(on(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Pf.bind(null,e),o._reactRetry=t,null):(e=a.treeContext,ru=sl(o.nextSibling),nu=t,ou=!0,au=null,null!==e&&($l[Ql++]=Yl,$l[Ql++]=Gl,$l[Ql++]=Xl,Yl=e.id,Gl=e.overflow,Xl=t),(t=Ic(t,r.children)).flags|=4096,t)}(e,t,l,o,r,a,n);if(i){i=o.fallback,l=t.mode,r=(a=e.child).sibling;var u={mode:"hidden",children:o.children};return 0==(1&l)&&t.child!==a?((o=t.child).childLanes=0,o.pendingProps=u,t.deletions=null):(o=Mf(a,u)).subtreeFlags=14680064&a.subtreeFlags,null!==r?i=Mf(r,i):(i=zf(i,l,n,null)).flags|=2,i.return=t,o.return=t,o.sibling=i,t.child=o,o=i,i=t.child,l=null===(l=e.child.memoizedState)?zc(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},i.memoizedState=l,i.childLanes=e.childLanes&~n,t.memoizedState=Lc,o}return e=(i=e.child).sibling,o=Mf(i,{mode:"visible",children:o.children}),0==(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function Ic(e,t){return(t=Ff({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Bc(e,t,n,r){return null!==r&&hu(r),Yu(t,e.child,null,n),(e=Ic(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function jc(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),xu(e.return,t,n)}function Ac(e,t,n,r,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o)}function Wc(e,t,n){var r=t.pendingProps,o=r.revealOrder,a=r.tail;if(wc(e,t,r.children,n),0!=(2&(r=ls.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&jc(e,n,t);else if(19===e.tag)jc(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ol(ls,r),0==(1&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===us(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Ac(t,!1,o,n,a);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===us(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Ac(t,!0,n,null,a);break;case"together":Ac(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Uc(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Vc(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),zd|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(on(153));if(null!==t.child){for(n=Mf(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Mf(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Hc(e,t){if(!ou)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function qc(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Kc(e,t,n){var r=t.pendingProps;switch(tu(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qc(t),null;case 1:case 17:return Rl(t.type)&&Ml(),qc(t),null;case 3:return r=t.stateNode,os(),Cl(Nl),Cl(Tl),cs(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(du(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==au&&(af(au),au=null))),qc(t),null;case 5:is(t);var o=ns(ts.current);if(n=t.type,null!==e&&null!=t.stateNode)Rc(e,t,n,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(on(166));return qc(t),null}if(e=ns(Zu.current),du(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[fl]=t,r[pl]=a,e=0!=(1&t.mode),n){case"dialog":ji("cancel",r),ji("close",r);break;case"iframe":case"object":case"embed":ji("load",r);break;case"video":case"audio":for(o=0;o<zi.length;o++)ji(zi[o],r);break;case"source":ji("error",r);break;case"img":case"image":case"link":ji("error",r),ji("load",r);break;case"details":ji("toggle",r);break;case"input":Yn(r,a),ji("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},ji("invalid",r);break;case"textarea":or(r,a),ji("invalid",r)}for(var i in yr(n,a),o=null,a)if(a.hasOwnProperty(i)){var l=a[i];"children"===i?"string"==typeof l?r.textContent!==l&&(!0!==a.suppressHydrationWarning&&Ji(r.textContent,l,e),o=["children",l]):"number"==typeof l&&r.textContent!==""+l&&(!0!==a.suppressHydrationWarning&&Ji(r.textContent,l,e),o=["children",""+l]):ln.hasOwnProperty(i)&&null!=l&&"onScroll"===i&&ji("scroll",r)}switch(n){case"input":Kn(r),Zn(r,a,!0);break;case"textarea":Kn(r),ir(r);break;case"select":case"option":break;default:"function"==typeof a.onClick&&(r.onclick=Zi)}r=o,t.updateQueue=r,null!==r&&(t.flags|=4)}else{i=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=lr(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=i.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),"select"===n&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[fl]=t,e[pl]=r,_c(e,t),t.stateNode=e;e:{switch(i=br(n,r),n){case"dialog":ji("cancel",e),ji("close",e),o=r;break;case"iframe":case"object":case"embed":ji("load",e),o=r;break;case"video":case"audio":for(o=0;o<zi.length;o++)ji(zi[o],e);o=r;break;case"source":ji("error",e),o=r;break;case"img":case"image":case"link":ji("error",e),ji("load",e),o=r;break;case"details":ji("toggle",e),o=r;break;case"input":Yn(e,r),o=Xn(e,r),ji("invalid",e);break;case"option":default:o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=In({},r,{value:void 0}),ji("invalid",e);break;case"textarea":or(e,r),o=rr(e,r),ji("invalid",e)}for(a in yr(n,o),l=o)if(l.hasOwnProperty(a)){var u=l[a];"style"===a?gr(e,u):"dangerouslySetInnerHTML"===a?null!=(u=u?u.__html:void 0)&&dr(e,u):"children"===a?"string"==typeof u?("textarea"!==n||""!==u)&&fr(e,u):"number"==typeof u&&fr(e,""+u):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(ln.hasOwnProperty(a)?null!=u&&"onScroll"===a&&ji("scroll",e):null!=u&&bn(e,a,u,i))}switch(n){case"input":Kn(e),Zn(e,r,!1);break;case"textarea":Kn(e),ir(e);break;case"option":null!=r.value&&e.setAttribute("value",""+Hn(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?nr(e,!!r.multiple,a,!1):null!=r.defaultValue&&nr(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof o.onClick&&(e.onclick=Zi)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return qc(t),null;case 6:if(e&&null!=t.stateNode)Mc(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(on(166));if(n=ns(ts.current),ns(Zu.current),du(t)){if(r=t.stateNode,n=t.memoizedProps,r[fl]=t,(a=r.nodeValue!==n)&&null!==(e=nu))switch(e.tag){case 3:Ji(r.nodeValue,n,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Ji(r.nodeValue,n,0!=(1&e.mode))}a&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[fl]=t,t.stateNode=r}return qc(t),null;case 13:if(Cl(ls),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ou&&null!==ru&&0!=(1&t.mode)&&0==(128&t.flags))fu(),pu(),t.flags|=98560,a=!1;else if(a=du(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(on(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(on(317));a[fl]=t}else pu(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;qc(t),a=!1}else null!==au&&(af(au),au=null),a=!0;if(!a)return 65536&t.flags?t:null}return 0!=(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&ls.current)?0===Md&&(Md=3):vf())),null!==t.updateQueue&&(t.flags|=4),qc(t),null);case 4:return os(),null===e&&Ui(t.stateNode.containerInfo),qc(t),null;case 10:return Eu(t.type._context),qc(t),null;case 19:if(Cl(ls),null===(a=t.memoizedState))return qc(t),null;if(r=0!=(128&t.flags),null===(i=a.rendering))if(r)Hc(a,!1);else{if(0!==Md||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(i=us(e))){for(t.flags|=128,Hc(a,!1),null!==(r=i.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=14680066,null===(i=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=i.childLanes,a.lanes=i.lanes,a.child=i.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=i.memoizedProps,a.memoizedState=i.memoizedState,a.updateQueue=i.updateQueue,a.type=i.type,e=i.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ol(ls,1&ls.current|2),t.child}e=e.sibling}null!==a.tail&&Gr()>Wd&&(t.flags|=128,r=!0,Hc(a,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=us(i))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Hc(a,!0),null===a.tail&&"hidden"===a.tailMode&&!i.alternate&&!ou)return qc(t),null}else 2*Gr()-a.renderingStartTime>Wd&&1073741824!==n&&(t.flags|=128,r=!0,Hc(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(null!==(n=a.last)?n.sibling=i:t.child=i,a.last=i)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Gr(),t.sibling=null,n=ls.current,Ol(ls,r?1&n|2:1&n),t):(qc(t),null);case 22:case 23:return df(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&_d)&&(qc(t),6&t.subtreeFlags&&(t.flags|=8192)):qc(t),null;case 24:case 25:return null}throw Error(on(156,t.tag))}function $c(e,t){switch(tu(t),t.tag){case 1:return Rl(t.type)&&Ml(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return os(),Cl(Nl),Cl(Tl),cs(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return is(t),null;case 13:if(Cl(ls),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(on(340));pu()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Cl(ls),null;case 4:return os(),null;case 10:return Eu(t.type._context),null;case 22:case 23:return df(),null;default:return null}}_c=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Rc=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,ns(Zu.current);var a,i=null;switch(n){case"input":o=Xn(e,o),r=Xn(e,r),i=[];break;case"select":o=In({},o,{value:void 0}),r=In({},r,{value:void 0}),i=[];break;case"textarea":o=rr(e,o),r=rr(e,r),i=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=Zi)}for(s in yr(n,r),n=null,o)if(!r.hasOwnProperty(s)&&o.hasOwnProperty(s)&&null!=o[s])if("style"===s){var l=o[s];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==s&&"children"!==s&&"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(ln.hasOwnProperty(s)?i||(i=[]):(i=i||[]).push(s,null));for(s in r){var u=r[s];if(l=null!=o?o[s]:void 0,r.hasOwnProperty(s)&&u!==l&&(null!=u||null!=l))if("style"===s)if(l){for(a in l)!l.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&l[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(i||(i=[]),i.push(s,n)),n=u;else"dangerouslySetInnerHTML"===s?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(i=i||[]).push(s,u)):"children"===s?"string"!=typeof u&&"number"!=typeof u||(i=i||[]).push(s,""+u):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&(ln.hasOwnProperty(s)?(null!=u&&"onScroll"===s&&ji("scroll",e),i||l===u||(i=[])):(i=i||[]).push(s,u))}n&&(i=i||[]).push("style",n);var s=i;(t.updateQueue=s)&&(t.flags|=4)}},Mc=function(e,t,n,r){n!==r&&(t.flags|=4)};var Qc=!1,Xc=!1,Yc="function"==typeof WeakSet?WeakSet:Set,Gc=null;function Jc(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Sf(e,t,n)}else n.current=null}function Zc(e,t,n){try{n()}catch(n){Sf(e,t,n)}}var ed=!1;function td(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var a=o.destroy;o.destroy=void 0,void 0!==a&&Zc(t,n,a)}o=o.next}while(o!==r)}}function nd(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function rd(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function od(e){var t=e.alternate;null!==t&&(e.alternate=null,od(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[fl],delete t[pl],delete t[vl],delete t[gl],delete t[ml])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ad(e){return 5===e.tag||3===e.tag||4===e.tag}function id(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||ad(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ld(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Zi));else if(4!==r&&null!==(e=e.child))for(ld(e,t,n),e=e.sibling;null!==e;)ld(e,t,n),e=e.sibling}function ud(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ud(e,t,n),e=e.sibling;null!==e;)ud(e,t,n),e=e.sibling}var sd=null,cd=!1;function dd(e,t,n){for(n=n.child;null!==n;)fd(e,t,n),n=n.sibling}function fd(e,t,n){if(ao&&"function"==typeof ao.onCommitFiberUnmount)try{ao.onCommitFiberUnmount(oo,n)}catch(e){}switch(n.tag){case 5:Xc||Jc(n,t);case 6:var r=sd,o=cd;sd=null,dd(e,t,n),cd=o,null!==(sd=r)&&(cd?(e=sd,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):sd.removeChild(n.stateNode));break;case 18:null!==sd&&(cd?(e=sd,n=n.stateNode,8===e.nodeType?ul(e.parentNode,n):1===e.nodeType&&ul(e,n),Vo(e)):ul(sd,n.stateNode));break;case 4:r=sd,o=cd,sd=n.stateNode.containerInfo,cd=!0,dd(e,t,n),sd=r,cd=o;break;case 0:case 11:case 14:case 15:if(!Xc&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var a=o,i=a.destroy;a=a.tag,void 0!==i&&(0!=(2&a)||0!=(4&a))&&Zc(n,t,i),o=o.next}while(o!==r)}dd(e,t,n);break;case 1:if(!Xc&&(Jc(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Sf(n,t,e)}dd(e,t,n);break;case 21:dd(e,t,n);break;case 22:1&n.mode?(Xc=(r=Xc)||null!==n.memoizedState,dd(e,t,n),Xc=r):dd(e,t,n);break;default:dd(e,t,n)}}function pd(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Yc),t.forEach((function(t){var r=Tf.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function hd(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var a=e,i=t,l=i;e:for(;null!==l;){switch(l.tag){case 5:sd=l.stateNode,cd=!1;break e;case 3:case 4:sd=l.stateNode.containerInfo,cd=!0;break e}l=l.return}if(null===sd)throw Error(on(160));fd(a,i,o),sd=null,cd=!1;var u=o.alternate;null!==u&&(u.return=null),o.return=null}catch(e){Sf(o,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)vd(t,e),t=t.sibling}function vd(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(hd(t,e),gd(e),4&r){try{td(3,e,e.return),nd(3,e)}catch(t){Sf(e,e.return,t)}try{td(5,e,e.return)}catch(t){Sf(e,e.return,t)}}break;case 1:hd(t,e),gd(e),512&r&&null!==n&&Jc(n,n.return);break;case 5:if(hd(t,e),gd(e),512&r&&null!==n&&Jc(n,n.return),32&e.flags){var o=e.stateNode;try{fr(o,"")}catch(t){Sf(e,e.return,t)}}if(4&r&&null!=(o=e.stateNode)){var a=e.memoizedProps,i=null!==n?n.memoizedProps:a,l=e.type,u=e.updateQueue;if(e.updateQueue=null,null!==u)try{"input"===l&&"radio"===a.type&&null!=a.name&&Gn(o,a),br(l,i);var s=br(l,a);for(i=0;i<u.length;i+=2){var c=u[i],d=u[i+1];"style"===c?gr(o,d):"dangerouslySetInnerHTML"===c?dr(o,d):"children"===c?fr(o,d):bn(o,c,d,s)}switch(l){case"input":Jn(o,a);break;case"textarea":ar(o,a);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!a.multiple;var p=a.value;null!=p?nr(o,!!a.multiple,p,!1):f!==!!a.multiple&&(null!=a.defaultValue?nr(o,!!a.multiple,a.defaultValue,!0):nr(o,!!a.multiple,a.multiple?[]:"",!1))}o[pl]=a}catch(t){Sf(e,e.return,t)}}break;case 6:if(hd(t,e),gd(e),4&r){if(null===e.stateNode)throw Error(on(162));o=e.stateNode,a=e.memoizedProps;try{o.nodeValue=a}catch(t){Sf(e,e.return,t)}}break;case 3:if(hd(t,e),gd(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Vo(t.containerInfo)}catch(t){Sf(e,e.return,t)}break;case 4:default:hd(t,e),gd(e);break;case 13:hd(t,e),gd(e),8192&(o=e.child).flags&&(a=null!==o.memoizedState,o.stateNode.isHidden=a,!a||null!==o.alternate&&null!==o.alternate.memoizedState||(Ad=Gr())),4&r&&pd(e);break;case 22:if(c=null!==n&&null!==n.memoizedState,1&e.mode?(Xc=(s=Xc)||c,hd(t,e),Xc=s):hd(t,e),gd(e),8192&r){if(s=null!==e.memoizedState,(e.stateNode.isHidden=s)&&!c&&0!=(1&e.mode))for(Gc=e,c=e.child;null!==c;){for(d=Gc=c;null!==Gc;){switch(p=(f=Gc).child,f.tag){case 0:case 11:case 14:case 15:td(4,f,f.return);break;case 1:Jc(f,f.return);var h=f.stateNode;if("function"==typeof h.componentWillUnmount){r=f,n=f.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){Sf(r,n,e)}}break;case 5:Jc(f,f.return);break;case 22:if(null!==f.memoizedState){wd(d);continue}}null!==p?(p.return=f,Gc=p):wd(d)}c=c.sibling}e:for(c=null,d=e;;){if(5===d.tag){if(null===c){c=d;try{o=d.stateNode,s?"function"==typeof(a=o.style).setProperty?a.setProperty("display","none","important"):a.display="none":(l=d.stateNode,i=null!=(u=d.memoizedProps.style)&&u.hasOwnProperty("display")?u.display:null,l.style.display=vr("display",i))}catch(t){Sf(e,e.return,t)}}}else if(6===d.tag){if(null===c)try{d.stateNode.nodeValue=s?"":d.memoizedProps}catch(t){Sf(e,e.return,t)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:hd(t,e),gd(e),4&r&&pd(e);case 21:}}function gd(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(ad(n)){var r=n;break e}n=n.return}throw Error(on(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(fr(o,""),r.flags&=-33),ud(e,id(e),o);break;case 3:case 4:var a=r.stateNode.containerInfo;ld(e,id(e),a);break;default:throw Error(on(161))}}catch(t){Sf(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function md(e,t,n){Gc=e,yd(e)}function yd(e,t,n){for(var r=0!=(1&e.mode);null!==Gc;){var o=Gc,a=o.child;if(22===o.tag&&r){var i=null!==o.memoizedState||Qc;if(!i){var l=o.alternate,u=null!==l&&null!==l.memoizedState||Xc;l=Qc;var s=Xc;if(Qc=i,(Xc=u)&&!s)for(Gc=o;null!==Gc;)u=(i=Gc).child,22===i.tag&&null!==i.memoizedState?kd(o):null!==u?(u.return=i,Gc=u):kd(o);for(;null!==a;)Gc=a,yd(a),a=a.sibling;Gc=o,Qc=l,Xc=s}bd(e)}else 0!=(8772&o.subtreeFlags)&&null!==a?(a.return=o,Gc=a):bd(e)}}function bd(e){for(;null!==Gc;){var t=Gc;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Xc||nd(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Xc)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:gu(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Bu(t,a,r);break;case 3:var i=t.updateQueue;if(null!==i){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Bu(t,i,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var s=t.alternate;if(null!==s){var c=s.memoizedState;if(null!==c){var d=c.dehydrated;null!==d&&Vo(d)}}}break;default:throw Error(on(163))}Xc||512&t.flags&&rd(t)}catch(e){Sf(t,t.return,e)}}if(t===e){Gc=null;break}if(null!==(n=t.sibling)){n.return=t.return,Gc=n;break}Gc=t.return}}function wd(e){for(;null!==Gc;){var t=Gc;if(t===e){Gc=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Gc=n;break}Gc=t.return}}function kd(e){for(;null!==Gc;){var t=Gc;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{nd(4,t)}catch(e){Sf(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(e){Sf(t,o,e)}}var a=t.return;try{rd(t)}catch(e){Sf(t,a,e)}break;case 5:var i=t.return;try{rd(t)}catch(e){Sf(t,i,e)}}}catch(e){Sf(t,t.return,e)}if(t===e){Gc=null;break}var l=t.sibling;if(null!==l){l.return=t.return,Gc=l;break}Gc=t.return}}var Ed,xd=Math.ceil,Sd=wn.ReactCurrentDispatcher,Cd=wn.ReactCurrentOwner,Od=wn.ReactCurrentBatchConfig,Pd=0,Td=null,Nd=null,Dd=0,_d=0,Rd=Sl(0),Md=0,Ld=null,zd=0,Fd=0,Id=0,Bd=null,jd=null,Ad=0,Wd=1/0,Ud=null,Vd=!1,Hd=null,qd=null,Kd=!1,$d=null,Qd=0,Xd=0,Yd=null,Gd=-1,Jd=0;function Zd(){return 0!=(6&Pd)?Gr():-1!==Gd?Gd:Gd=Gr()}function ef(e){return 0==(1&e.mode)?1:0!=(2&Pd)&&0!==Dd?Dd&-Dd:null!==vu.transition?(0===Jd&&(Jd=go()),Jd):0!==(e=wo)?e:e=void 0===(e=window.event)?16:Go(e.type)}function tf(e,t,n,r){if(50<Xd)throw Xd=0,Yd=null,Error(on(185));yo(e,n,r),0!=(2&Pd)&&e===Td||(e===Td&&(0==(2&Pd)&&(Fd|=n),4===Md&&lf(e,Dd)),nf(e,r),1===n&&0===Pd&&0==(1&t.mode)&&(Wd=Gr()+500,jl&&Ul()))}function nf(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-io(a),l=1<<i,u=o[i];-1===u?0!=(l&n)&&0==(l&r)||(o[i]=ho(l,t)):u<=t&&(e.expiredLanes|=l),a&=~l}}(e,t);var r=po(e,e===Td?Dd:0);if(0===r)null!==n&&Qr(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Qr(n),1===t)0===e.tag?function(e){jl=!0,Wl(e)}(uf.bind(null,e)):Wl(uf.bind(null,e)),il((function(){0==(6&Pd)&&Ul()})),n=null;else{switch(ko(r)){case 1:n=Zr;break;case 4:n=eo;break;case 16:default:n=to;break;case 536870912:n=ro}n=Nf(n,rf.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function rf(e,t){if(Gd=-1,Jd=0,0!=(6&Pd))throw Error(on(327));var n=e.callbackNode;if(Ef()&&e.callbackNode!==n)return null;var r=po(e,e===Td?Dd:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=gf(e,r);else{t=r;var o=Pd;Pd|=2;var a=hf();for(Td===e&&Dd===t||(Ud=null,Wd=Gr()+500,ff(e,t));;)try{yf();break}catch(t){pf(e,t)}ku(),Sd.current=a,Pd=o,null!==Nd?t=0:(Td=null,Dd=0,t=Md)}if(0!==t){if(2===t&&(0!==(o=vo(e))&&(r=o,t=of(e,o))),1===t)throw n=Ld,ff(e,0),lf(e,r),nf(e,Gr()),n;if(6===t)lf(e,r);else{if(o=e.current.alternate,0==(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],a=o.getSnapshot;o=o.value;try{if(!li(a(),o))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)&&(2===(t=gf(e,r))&&(0!==(a=vo(e))&&(r=a,t=of(e,a))),1===t))throw n=Ld,ff(e,0),lf(e,r),nf(e,Gr()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(on(345));case 2:case 5:kf(e,jd,Ud);break;case 3:if(lf(e,r),(130023424&r)===r&&10<(t=Ad+500-Gr())){if(0!==po(e,0))break;if(((o=e.suspendedLanes)&r)!==r){Zd(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=rl(kf.bind(null,e,jd,Ud),t);break}kf(e,jd,Ud);break;case 4:if(lf(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var i=31-io(r);a=1<<i,(i=t[i])>o&&(o=i),r&=~a}if(r=o,10<(r=(120>(r=Gr()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*xd(r/1960))-r)){e.timeoutHandle=rl(kf.bind(null,e,jd,Ud),r);break}kf(e,jd,Ud);break;default:throw Error(on(329))}}}return nf(e,Gr()),e.callbackNode===n?rf.bind(null,e):null}function of(e,t){var n=Bd;return e.current.memoizedState.isDehydrated&&(ff(e,t).flags|=256),2!==(e=gf(e,t))&&(t=jd,jd=n,null!==t&&af(t)),e}function af(e){null===jd?jd=e:jd.push.apply(jd,e)}function lf(e,t){for(t&=~Id,t&=~Fd,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-io(t),r=1<<n;e[n]=-1,t&=~r}}function uf(e){if(0!=(6&Pd))throw Error(on(327));Ef();var t=po(e,0);if(0==(1&t))return nf(e,Gr()),null;var n=gf(e,t);if(0!==e.tag&&2===n){var r=vo(e);0!==r&&(t=r,n=of(e,r))}if(1===n)throw n=Ld,ff(e,0),lf(e,t),nf(e,Gr()),n;if(6===n)throw Error(on(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,kf(e,jd,Ud),nf(e,Gr()),null}function sf(e,t){var n=Pd;Pd|=1;try{return e(t)}finally{0===(Pd=n)&&(Wd=Gr()+500,jl&&Ul())}}function cf(e){null!==$d&&0===$d.tag&&0==(6&Pd)&&Ef();var t=Pd;Pd|=1;var n=Od.transition,r=wo;try{if(Od.transition=null,wo=1,e)return e()}finally{wo=r,Od.transition=n,0==(6&(Pd=t))&&Ul()}}function df(){_d=Rd.current,Cl(Rd)}function ff(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ol(n)),null!==Nd)for(n=Nd.return;null!==n;){var r=n;switch(tu(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Ml();break;case 3:os(),Cl(Nl),Cl(Tl),cs();break;case 5:is(r);break;case 4:os();break;case 13:case 19:Cl(ls);break;case 10:Eu(r.type._context);break;case 22:case 23:df()}n=n.return}if(Td=e,Nd=e=Mf(e.current,null),Dd=_d=t,Md=0,Ld=null,Id=Fd=zd=0,jd=Bd=null,null!==Ou){for(t=0;t<Ou.length;t++)if(null!==(r=(n=Ou[t]).interleaved)){n.interleaved=null;var o=r.next,a=n.pending;if(null!==a){var i=a.next;a.next=o,r.next=i}n.pending=r}Ou=null}return e}function pf(e,t){for(;;){var n=Nd;try{if(ku(),ds.current=ac,ms){for(var r=hs.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}ms=!1}if(ps=0,gs=vs=hs=null,ys=!1,bs=0,Cd.current=null,null===n||null===n.return){Md=1,Ld=t,Nd=null;break}e:{var a=e,i=n.return,l=n,u=t;if(t=Dd,l.flags|=32768,null!==u&&"object"==typeof u&&"function"==typeof u.then){var s=u,c=l,d=c.tag;if(0==(1&c.mode)&&(0===d||11===d||15===d)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=gc(i);if(null!==p){p.flags&=-257,mc(p,i,l,0,t),1&p.mode&&vc(a,s,t),u=s;var h=(t=p).updateQueue;if(null===h){var v=new Set;v.add(u),t.updateQueue=v}else h.add(u);break e}if(0==(1&t)){vc(a,s,t),vf();break e}u=Error(on(426))}else if(ou&&1&l.mode){var g=gc(i);if(null!==g){0==(65536&g.flags)&&(g.flags|=256),mc(g,i,l,0,t),hu(sc(u,l));break e}}a=u=sc(u,l),4!==Md&&(Md=2),null===Bd?Bd=[a]:Bd.push(a),a=i;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Fu(a,pc(0,u,t));break e;case 1:l=u;var m=a.type,y=a.stateNode;if(0==(128&a.flags)&&("function"==typeof m.getDerivedStateFromError||null!==y&&"function"==typeof y.componentDidCatch&&(null===qd||!qd.has(y)))){a.flags|=65536,t&=-t,a.lanes|=t,Fu(a,hc(a,l,t));break e}}a=a.return}while(null!==a)}wf(n)}catch(e){t=e,Nd===n&&null!==n&&(Nd=n=n.return);continue}break}}function hf(){var e=Sd.current;return Sd.current=ac,null===e?ac:e}function vf(){0!==Md&&3!==Md&&2!==Md||(Md=4),null===Td||0==(268435455&zd)&&0==(268435455&Fd)||lf(Td,Dd)}function gf(e,t){var n=Pd;Pd|=2;var r=hf();for(Td===e&&Dd===t||(Ud=null,ff(e,t));;)try{mf();break}catch(t){pf(e,t)}if(ku(),Pd=n,Sd.current=r,null!==Nd)throw Error(on(261));return Td=null,Dd=0,Md}function mf(){for(;null!==Nd;)bf(Nd)}function yf(){for(;null!==Nd&&!Xr();)bf(Nd)}function bf(e){var t=Ed(e.alternate,e,_d);e.memoizedProps=e.pendingProps,null===t?wf(e):Nd=t,Cd.current=null}function wf(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=Kc(n,t,_d)))return void(Nd=n)}else{if(null!==(n=$c(n,t)))return n.flags&=32767,void(Nd=n);if(null===e)return Md=6,void(Nd=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Nd=t);Nd=t=e}while(null!==t);0===Md&&(Md=5)}function kf(e,t,n){var r=wo,o=Od.transition;try{Od.transition=null,wo=1,function(e,t,n,r){do{Ef()}while(null!==$d);if(0!=(6&Pd))throw Error(on(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(on(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-io(n),a=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~a}}(e,a),e===Td&&(Nd=Td=null,Dd=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||Kd||(Kd=!0,Nf(to,(function(){return Ef(),null}))),a=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||a){a=Od.transition,Od.transition=null;var i=wo;wo=1;var l=Pd;Pd|=4,Cd.current=null,function(e,t){if(el=qo,pi(e=fi())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(e){n=null;break e}var i=0,l=-1,u=-1,s=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||0!==o&&3!==d.nodeType||(l=i+o),d!==a||0!==r&&3!==d.nodeType||(u=i+r),3===d.nodeType&&(i+=d.nodeValue.length),null!==(p=d.firstChild);)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++s===o&&(l=i),f===a&&++c===r&&(u=i),null!==(p=d.nextSibling))break;f=(d=f).parentNode}d=p}n=-1===l||-1===u?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(tl={focusedElem:e,selectionRange:n},qo=!1,Gc=t;null!==Gc;)if(e=(t=Gc).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,Gc=e;else for(;null!==Gc;){t=Gc;try{var h=t.alternate;if(0!=(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==h){var v=h.memoizedProps,g=h.memoizedState,m=t.stateNode,y=m.getSnapshotBeforeUpdate(t.elementType===t.type?v:gu(t.type,v),g);m.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(on(163))}}catch(e){Sf(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Gc=e;break}Gc=t.return}h=ed,ed=!1}(e,n),vd(n,e),hi(tl),qo=!!el,tl=el=null,e.current=n,md(n),Yr(),Pd=l,wo=i,Od.transition=a}else e.current=n;if(Kd&&(Kd=!1,$d=e,Qd=o),0===(a=e.pendingLanes)&&(qd=null),function(e){if(ao&&"function"==typeof ao.onCommitFiberRoot)try{ao.onCommitFiberRoot(oo,e,void 0,128==(128&e.current.flags))}catch(e){}}(n.stateNode),nf(e,Gr()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Vd)throw Vd=!1,e=Hd,Hd=null,e;0!=(1&Qd)&&0!==e.tag&&Ef(),0!=(1&(a=e.pendingLanes))?e===Yd?Xd++:(Xd=0,Yd=e):Xd=0,Ul()}(e,t,n,r)}finally{Od.transition=o,wo=r}return null}function Ef(){if(null!==$d){var e=ko(Qd),t=Od.transition,n=wo;try{if(Od.transition=null,wo=16>e?16:e,null===$d)var r=!1;else{if(e=$d,$d=null,Qd=0,0!=(6&Pd))throw Error(on(331));var o=Pd;for(Pd|=4,Gc=e.current;null!==Gc;){var a=Gc,i=a.child;if(0!=(16&Gc.flags)){var l=a.deletions;if(null!==l){for(var u=0;u<l.length;u++){var s=l[u];for(Gc=s;null!==Gc;){var c=Gc;switch(c.tag){case 0:case 11:case 15:td(8,c,a)}var d=c.child;if(null!==d)d.return=c,Gc=d;else for(;null!==Gc;){var f=(c=Gc).sibling,p=c.return;if(od(c),c===s){Gc=null;break}if(null!==f){f.return=p,Gc=f;break}Gc=p}}}var h=a.alternate;if(null!==h){var v=h.child;if(null!==v){h.child=null;do{var g=v.sibling;v.sibling=null,v=g}while(null!==v)}}Gc=a}}if(0!=(2064&a.subtreeFlags)&&null!==i)i.return=a,Gc=i;else e:for(;null!==Gc;){if(0!=(2048&(a=Gc).flags))switch(a.tag){case 0:case 11:case 15:td(9,a,a.return)}var m=a.sibling;if(null!==m){m.return=a.return,Gc=m;break e}Gc=a.return}}var y=e.current;for(Gc=y;null!==Gc;){var b=(i=Gc).child;if(0!=(2064&i.subtreeFlags)&&null!==b)b.return=i,Gc=b;else e:for(i=y;null!==Gc;){if(0!=(2048&(l=Gc).flags))try{switch(l.tag){case 0:case 11:case 15:nd(9,l)}}catch(e){Sf(l,l.return,e)}if(l===i){Gc=null;break e}var w=l.sibling;if(null!==w){w.return=l.return,Gc=w;break e}Gc=l.return}}if(Pd=o,Ul(),ao&&"function"==typeof ao.onPostCommitFiberRoot)try{ao.onPostCommitFiberRoot(oo,e)}catch(e){}r=!0}return r}finally{wo=n,Od.transition=t}}return!1}function xf(e,t,n){e=Lu(e,t=pc(0,t=sc(n,t),1),1),t=Zd(),null!==e&&(yo(e,1,t),nf(e,t))}function Sf(e,t,n){if(3===e.tag)xf(e,e,n);else for(;null!==t;){if(3===t.tag){xf(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===qd||!qd.has(r))){t=Lu(t,e=hc(t,e=sc(n,e),1),1),e=Zd(),null!==t&&(yo(t,1,e),nf(t,e));break}}t=t.return}}function Cf(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=Zd(),e.pingedLanes|=e.suspendedLanes&n,Td===e&&(Dd&n)===n&&(4===Md||3===Md&&(130023424&Dd)===Dd&&500>Gr()-Ad?ff(e,0):Id|=n),nf(e,t)}function Of(e,t){0===t&&(0==(1&e.mode)?t=1:(t=co,0==(130023424&(co<<=1))&&(co=4194304)));var n=Zd();null!==(e=Nu(e,t))&&(yo(e,t,n),nf(e,n))}function Pf(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Of(e,n)}function Tf(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(on(314))}null!==r&&r.delete(t),Of(e,n)}function Nf(e,t){return $r(e,t)}function Df(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,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 _f(e,t,n,r){return new Df(e,t,n,r)}function Rf(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Mf(e,t){var n=e.alternate;return null===n?((n=_f(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Lf(e,t,n,r,o,a){var i=2;if(r=e,"function"==typeof e)Rf(e)&&(i=1);else if("string"==typeof e)i=5;else e:switch(e){case xn:return zf(n.children,o,a,t);case Sn:i=8,o|=8;break;case Cn:return(e=_f(12,n,t,2|o)).elementType=Cn,e.lanes=a,e;case Nn:return(e=_f(13,n,t,o)).elementType=Nn,e.lanes=a,e;case Dn:return(e=_f(19,n,t,o)).elementType=Dn,e.lanes=a,e;case Mn:return Ff(n,o,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case On:i=10;break e;case Pn:i=9;break e;case Tn:i=11;break e;case _n:i=14;break e;case Rn:i=16,r=null;break e}throw Error(on(130,null==e?e:typeof e,""))}return(t=_f(i,n,t,o)).elementType=e,t.type=r,t.lanes=a,t}function zf(e,t,n,r){return(e=_f(7,e,r,t)).lanes=n,e}function Ff(e,t,n,r){return(e=_f(22,e,r,t)).elementType=Mn,e.lanes=n,e.stateNode={isHidden:!1},e}function If(e,t,n){return(e=_f(6,e,null,t)).lanes=n,e}function Bf(e,t,n){return(t=_f(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function jf(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=mo(0),this.expirationTimes=mo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mo(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Af(e,t,n,r,o,a,i,l,u){return e=new jf(e,t,n,l,u),1===t?(t=1,!0===a&&(t|=8)):t=0,a=_f(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},_u(a),e}function Wf(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:En,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Uf(e){if(!e)return Pl;e:{if(Ur(e=e._reactInternals)!==e||1!==e.tag)throw Error(on(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Rl(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(on(171))}if(1===e.tag){var n=e.type;if(Rl(n))return zl(e,n,t)}return t}function Vf(e,t,n,r,o,a,i,l,u){return(e=Af(n,r,!0,e,0,a,0,l,u)).context=Uf(null),n=e.current,(a=Mu(r=Zd(),o=ef(n))).callback=null!=t?t:null,Lu(n,a,o),e.current.lanes=o,yo(e,o,r),nf(e,r),e}function Hf(e,t,n,r){var o=t.current,a=Zd(),i=ef(o);return n=Uf(n),null===t.context?t.context=n:t.pendingContext=n,(t=Mu(a,i)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Lu(o,t,i))&&(tf(e,o,i,a),zu(e,o,i)),i}function qf(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Kf(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function $f(e,t){Kf(e,t),(e=e.alternate)&&Kf(e,t)}Ed=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Nl.current)bc=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return bc=!1,function(e,t,n){switch(t.tag){case 3:Nc(t),pu();break;case 5:as(t);break;case 1:Rl(t.type)&&Fl(t);break;case 4:rs(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Ol(mu,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Ol(ls,1&ls.current),t.flags|=128,null):0!=(n&t.child.childLanes)?Fc(e,t,n):(Ol(ls,1&ls.current),null!==(e=Vc(e,t,n))?e.sibling:null);Ol(ls,1&ls.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return Wc(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ol(ls,ls.current),r)break;return null;case 22:case 23:return t.lanes=0,Sc(e,t,n)}return Vc(e,t,n)}(e,t,n);bc=0!=(131072&e.flags)}else bc=!1,ou&&0!=(1048576&t.flags)&&Zl(t,Kl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Uc(e,t),e=t.pendingProps;var o=_l(t,Tl.current);Su(t,n),o=xs(null,t,r,e,o,n);var a=Ss();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Rl(r)?(a=!0,Fl(t)):a=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,_u(t),o.updater=Wu,t.stateNode=o,o._reactInternals=t,qu(t,r,e,n),t=Tc(null,t,r,!0,a,n)):(t.tag=0,ou&&a&&eu(t),wc(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Uc(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"==typeof e)return Rf(e)?1:0;if(null!=e){if((e=e.$$typeof)===Tn)return 11;if(e===_n)return 14}return 2}(r),e=gu(r,e),o){case 0:t=Oc(null,t,r,e,n);break e;case 1:t=Pc(null,t,r,e,n);break e;case 11:t=kc(null,t,r,e,n);break e;case 14:t=Ec(null,t,r,gu(r.type,e),n);break e}throw Error(on(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,Oc(e,t,r,o=t.elementType===r?o:gu(r,o),n);case 1:return r=t.type,o=t.pendingProps,Pc(e,t,r,o=t.elementType===r?o:gu(r,o),n);case 3:e:{if(Nc(t),null===e)throw Error(on(387));r=t.pendingProps,o=(a=t.memoizedState).element,Ru(e,t),Iu(t,r,null,n);var i=t.memoizedState;if(r=i.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Dc(e,t,r,n,o=sc(Error(on(423)),t));break e}if(r!==o){t=Dc(e,t,r,n,o=sc(Error(on(424)),t));break e}for(ru=sl(t.stateNode.containerInfo.firstChild),nu=t,ou=!0,au=null,n=Gu(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(pu(),r===o){t=Vc(e,t,n);break e}wc(e,t,r,n)}t=t.child}return t;case 5:return as(t),null===e&&su(t),r=t.type,o=t.pendingProps,a=null!==e?e.memoizedProps:null,i=o.children,nl(r,o)?i=null:null!==a&&nl(r,a)&&(t.flags|=32),Cc(e,t),wc(e,t,i,n),t.child;case 6:return null===e&&su(t),null;case 13:return Fc(e,t,n);case 4:return rs(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Yu(t,null,r,n):wc(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,kc(e,t,r,o=t.elementType===r?o:gu(r,o),n);case 7:return wc(e,t,t.pendingProps,n),t.child;case 8:case 12:return wc(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,a=t.memoizedProps,i=o.value,Ol(mu,r._currentValue),r._currentValue=i,null!==a)if(li(a.value,i)){if(a.children===o.children&&!Nl.current){t=Vc(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var l=a.dependencies;if(null!==l){i=a.child;for(var u=l.firstContext;null!==u;){if(u.context===r){if(1===a.tag){(u=Mu(-1,n&-n)).tag=2;var s=a.updateQueue;if(null!==s){var c=(s=s.shared).pending;null===c?u.next=u:(u.next=c.next,c.next=u),s.pending=u}}a.lanes|=n,null!==(u=a.alternate)&&(u.lanes|=n),xu(a.return,n,t),l.lanes|=n;break}u=u.next}}else if(10===a.tag)i=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(i=a.return))throw Error(on(341));i.lanes|=n,null!==(l=i.alternate)&&(l.lanes|=n),xu(i,n,t),i=a.sibling}else i=a.child;if(null!==i)i.return=a;else for(i=a;null!==i;){if(i===t){i=null;break}if(null!==(a=i.sibling)){a.return=i.return,i=a;break}i=i.return}a=i}wc(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Su(t,n),r=r(o=Cu(o)),t.flags|=1,wc(e,t,r,n),t.child;case 14:return o=gu(r=t.type,t.pendingProps),Ec(e,t,r,o=gu(r.type,o),n);case 15:return xc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:gu(r,o),Uc(e,t),t.tag=1,Rl(r)?(e=!0,Fl(t)):e=!1,Su(t,n),Vu(t,r,o),qu(t,r,o,n),Tc(null,t,r,!0,e,n);case 19:return Wc(e,t,n);case 22:return Sc(e,t,n)}throw Error(on(156,t.tag))};var Qf="function"==typeof reportError?reportError:function(e){console.error(e)};function Xf(e){this._internalRoot=e}function Yf(e){this._internalRoot=e}function Gf(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Jf(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Zf(){}function ep(e,t,n,r,o){var a=n._reactRootContainer;if(a){var i=a;if("function"==typeof o){var l=o;o=function(){var e=qf(i);l.call(e)}}Hf(t,i,e,o)}else i=function(e,t,n,r,o){if(o){if("function"==typeof r){var a=r;r=function(){var e=qf(i);a.call(e)}}var i=Vf(t,r,e,0,null,!1,0,"",Zf);return e._reactRootContainer=i,e[hl]=i.current,Ui(8===e.nodeType?e.parentNode:e),cf(),i}for(;o=e.lastChild;)e.removeChild(o);if("function"==typeof r){var l=r;r=function(){var e=qf(u);l.call(e)}}var u=Af(e,0,!1,null,0,!1,0,"",Zf);return e._reactRootContainer=u,e[hl]=u.current,Ui(8===e.nodeType?e.parentNode:e),cf((function(){Hf(t,u,n,r)})),u}(n,t,e,o,r);return qf(i)}Yf.prototype.render=Xf.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(on(409));Hf(e,t,null,null)},Yf.prototype.unmount=Xf.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;cf((function(){Hf(null,e,null,null)})),t[hl]=null}},Yf.prototype.unstable_scheduleHydration=function(e){if(e){var t=Co();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Lo.length&&0!==t&&t<Lo[n].priority;n++);Lo.splice(n,0,e),0===n&&Bo(e)}},Eo=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=fo(t.pendingLanes);0!==n&&(bo(t,1|n),nf(t,Gr()),0==(6&Pd)&&(Wd=Gr()+500,Ul()))}break;case 13:cf((function(){var t=Nu(e,1);if(null!==t){var n=Zd();tf(t,e,1,n)}})),$f(e,1)}},xo=function(e){if(13===e.tag){var t=Nu(e,134217728);if(null!==t)tf(t,e,134217728,Zd());$f(e,134217728)}},So=function(e){if(13===e.tag){var t=ef(e),n=Nu(e,t);if(null!==n)tf(n,e,t,Zd());$f(e,t)}},Co=function(){return wo},Oo=function(e,t){var n=wo;try{return wo=e,t()}finally{wo=n}},Er=function(e,t,n){switch(t){case"input":if(Jn(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=kl(r);if(!o)throw Error(on(90));$n(r),Jn(r,o)}}}break;case"textarea":ar(e,n);break;case"select":null!=(t=n.value)&&nr(e,!!n.multiple,t,!1)}},Tr=sf,Nr=cf;var tp={usingClientEntryPoint:!1,Events:[bl,wl,kl,Or,Pr,sf]},np={findFiberByHostInstance:yl,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},rp={bundleType:np.bundleType,version:np.version,rendererPackageName:np.rendererPackageName,rendererConfig:np.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:wn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=qr(e))?null:e.stateNode},findFiberByHostInstance:np.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var op=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!op.isDisabled&&op.supportsFiber)try{oo=op.inject(rp),ao=op}catch(cr){}}var ap={__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:tp,createPortal:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Gf(t))throw Error(on(200));return Wf(e,t,null,n)},createRoot:function(e,t){if(!Gf(e))throw Error(on(299));var n=!1,r="",o=Qf;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Af(e,1,!1,null,0,n,0,r,o),e[hl]=t.current,Ui(8===e.nodeType?e.parentNode:e),new Xf(t)},findDOMNode:function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(on(188));throw e=Object.keys(e).join(","),Error(on(268,e))}return e=null===(e=qr(t))?null:e.stateNode},flushSync:function(e){return cf(e)},hydrate:function(e,t,n){if(!Jf(t))throw Error(on(200));return ep(null,e,t,!0,n)},hydrateRoot:function(e,t,n){if(!Gf(e))throw Error(on(405));var r=null!=n&&n.hydratedSources||null,o=!1,a="",i=Qf;if(null!=n&&(!0===n.unstable_strictMode&&(o=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(i=n.onRecoverableError)),t=Vf(t,null,e,1,null!=n?n:null,o,0,a,i),e[hl]=t.current,Ui(e),r)for(e=0;e<r.length;e++)o=(o=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Yf(t)},render:function(e,t,n){if(!Jf(t))throw Error(on(200));return ep(null,e,t,!1,n)},unmountComponentAtNode:function(e){if(!Jf(e))throw Error(on(40));return!!e._reactRootContainer&&(cf((function(){ep(null,null,e,!1,(function(){e._reactRootContainer=null,e[hl]=null}))})),!0)},unstable_batchedUpdates:sf,unstable_renderSubtreeIntoContainer:function(e,t,n,r){if(!Jf(n))throw Error(on(200));if(null==e||void 0===e._reactInternals)throw Error(on(38));return ep(e,t,n,!1,r)},version:"18.2.0-next-9e3b772b8-20220608"},ip=a((function(e,t){}));ip.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ip.createPortal,ip.createRoot,ip.findDOMNode,ip.flushSync,ip.hydrate,ip.hydrateRoot,ip.render,ip.unmountComponentAtNode,ip.unstable_batchedUpdates,ip.unstable_renderSubtreeIntoContainer,ip.version;var lp=a((function(e){!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=ap}));lp.findDOMNode;var up=wt;function sp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sp(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var dp=new WeakMap;function fp(e){var t=e.editor,r=e.scheduleOnDOMSelectionChange,o=e.onDOMSelectionChange,a=!1,i=!1,l=null,u=null,s=null,c=0,d=!1,f=!1,p=0,h=!1,v=function(){var e=gt.get(t);if(gt.delete(t),e){var r=t.selection,o=Ot(t,e);!o||r&&n.Range.equals(o,r)||n.Transforms.select(t,o)}},g=function(){var e=vt.get(t);if(vt.delete(t),e){if(e.at){var r=n.Location.isPoint(e.at)?Ct(t,e.at):Ot(t,e.at);if(!r)return;var o=n.Editor.range(t,r);t.selection&&n.Range.equals(t.selection,o)||n.Transforms.select(t,r)}e.run()}},m=function(){if(!ut.get(t)||d)return!1;try{var e=up.toDOMNode(t,t),n=up.getWindow(t).document.activeElement;if(n!==e&&!e.contains(n))return!1}catch(e){}return Date.now()-c<5e3},y=function(){return!(null===(e=ht.get(t))||void 0===e||!e.some((function(e){var r=e.path;try{return 0===n.Node.leaf(t,r).text.length}catch(e){return!1}})))||C()&&void 0!==ft.get(t);var e},b=function(){if(u&&(clearTimeout(u),u=null),s&&(clearTimeout(s),s=null),!i&&m()&&y())u=setTimeout(b,50);else if(C()||S()){a||(a=!0,setTimeout((function(){return a=!1}))),S()&&(a="action");var e=t.selection&&n.Editor.rangeRef(t,t.selection,{affinity:"forward"});pt.set(t,t.marks),vt.get(t),ht.get(t);for(var l,c=C();l=null===(d=ht.get(t))||void 0===d?void 0:d[0];){var d,p,w=ft.get(t);void 0!==w&&(ft.delete(t),t.marks=w),w&&!1===h&&(h=null);var k=St(l);t.selection&&n.Range.equals(t.selection,k)||n.Transforms.select(t,k),l.diff.text?n.Editor.insertText(t,l.diff.text):n.Editor.deleteFragment(t),ht.set(t,null===(p=ht.get(t))||void 0===p?void 0:p.filter((function(e){return e.id!==l.id}))),kt(t,l)||(c=!1,vt.delete(t),pt.delete(t),a="action",gt.delete(t),r.cancel(),o.cancel(),null==e||e.unref())}var E,x,O=null==e?void 0:e.unref();if(!O||gt.get(t)||t.selection&&n.Range.equals(O,t.selection)||n.Transforms.select(t,O),S())return x=t.children,g(),f&&t.children===x&&(null===(E=mt.get(t))||void 0===E||E()),void(f=!1);c&&r(),r.flush(),o.flush(),v();var P=pt.get(t);pt.delete(t),void 0!==P&&P!==t.marks&&(t.marks=P,t.onChange())}else v()},k=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=tt.get(t);n&&(C()||e?n.style.display="none":n.style.removeProperty("display"))},E=function(e,r){var o,a=null!==(o=ht.get(t))&&void 0!==o?o:[];ht.set(t,a);var i=n.Node.leaf(t,e),l=a.findIndex((function(t){return n.Path.equals(t.path,e)}));if(l<0)return xt(i.text,r)&&a.push({path:e,diff:r,id:p++}),void k();var u=function(e,t,n){const r=Math.min(t.start,n.start),o=Math.max(0,Math.min(t.start+t.text.length,n.end)-n.start),a=Et(e,t,n),i=Math.max(n.start+n.text.length,t.start+t.text.length+(t.start+t.text.length>n.start?n.text.length:0)-o),l=a.slice(r,i);return xt(e,{start:r,end:Math.max(t.end,n.end-t.text.length+(t.end-t.start)),text:l})}(i.text,a[l].diff,r);if(!u)return a.splice(l,1),void k();a[l]=cp(cp({},a[l]),{},{diff:u})},x=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=n.at;h=!1,gt.delete(t),r.cancel(),o.cancel(),S()&&b(),s&&clearTimeout(s),vt.set(t,{at:a,run:e}),s=setTimeout(b)},S=function(){return!!vt.get(t)},C=function(){var e;return!(null===(e=ht.get(t))||void 0===e||!e.length)},O=function(e){gt.set(t,e),u&&(clearTimeout(u),u=null);var r=t.selection;if(e){var o=!r||!n.Path.equals(r.anchor.path,e.anchor.path),a=!r||!n.Path.equals(r.anchor.path.slice(0,-1),e.anchor.path.slice(0,-1));(o&&h||a)&&(h=!1),(o||C())&&(u=setTimeout(b,200))}},P=function(){S()||(s&&clearTimeout(s),s=setTimeout(b))};return{flush:b,flushDeferredDiffs:function(){if(!a&&m()&&y()){i=!0;try{b()}finally{i=!1}}},scheduleFlush:P,hasPendingDiffs:C,hasPendingAction:S,hasPendingChanges:function(){return S()||C()},isFlushing:function(){return a},handleUserSelect:O,handleCompositionEnd:function(e){if(l&&clearTimeout(l),y()&&!a)return lp.flushSync((function(){ut.set(t,!1),b()})),void k();l=setTimeout((function(){var e;(ut.set(t,!1),b(),d)&&(null===(e=mt.get(t))||void 0===e||e());k()}),25)},handleCompositionStart:function(e){ut.set(t,!0),c=Date.now(),d=!1,l&&(clearTimeout(l),l=null)},handleDOMBeforeInput:function(e){u&&(clearTimeout(u),u=null);var r=Ye.get(t),o=e.inputType;if("insertCompositionText"===o||"deleteCompositionText"===o)if(c=Date.now(),e.data)d=!1;else{d=!0;var a=ht.get(t);if(null!=a&&a.length){var i=a.every((function(e){var r=e.path;try{return 0===n.Node.leaf(t,r).text.length}catch(e){return!1}}));i&&(ht.set(t,[]),gt.delete(t))}}var l=null,s=e.dataTransfer||e.data||void 0;!1!==h&&"insertText"!==o&&"insertCompositionText"!==o&&(h=!1);var f=e.getTargetRanges(),p=w(f,1)[0];p&&!r&&(l=up.toSlateRange(t,p,{exactMatch:!1,suppressThrow:!0}));var v=up.getWindow(t).getSelection();if(l||!v||r||(p=v,l=up.toSlateRange(t,v,{exactMatch:!1,suppressThrow:!0})),l=null!=l?l:t.selection){var g,m=!0;if(o.startsWith("delete")){var y=o.endsWith("Backward")?"backward":"forward",b=n.Range.edges(l),k=w(b,2),S=k[0],C=k[1],T=n.Editor.leaf(t,S.path),N=w(T,2),D=N[0],_=N[1];if(n.Range.isExpanded(l)&&D.text.length===S.offset&&0===C.offset){var R=n.Editor.next(t,{at:S.path,match:n.Node.isText});if(R&&n.Path.equals(R[1],C.path))if("backward"===y){l={anchor:C,focus:C},S=C;var M=w(R,2);D=M[0],_=M[1]}else l={anchor:S,focus:S},C=S}var L={text:"",start:S.offset,end:C.offset},z=ht.get(t),F=null==z?void 0:z.find((function(e){return n.Path.equals(e.path,_)})),I=F?[F.diff,L]:[L];if(0===Et.apply(void 0,[D.text].concat(I)).length&&(m=!1),n.Range.isExpanded(l)){if(m&&n.Path.equals(l.anchor.path,l.focus.path)){var B={path:l.anchor.path,offset:S.offset},j=n.Editor.range(t,B,B);return O(j),E(l.anchor.path,{text:"",end:C.offset,start:S.offset}),void("deleteContentBackward"===o&&P())}return x((function(){return n.Editor.deleteFragment(t,{direction:y})}),{at:l})}}switch(o){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return x((function(){return n.Editor.deleteFragment(t)}),{at:l});case"deleteContent":case"deleteContentForward":var A=l.anchor;if(m&&n.Range.isCollapsed(l)){var W=n.Node.leaf(t,A.path);if(A.offset<W.text.length)return E(A.path,{text:"",start:A.offset,end:A.offset+1})}return x((function(){return n.Editor.deleteForward(t)}),{at:l});case"deleteContentBackward":var U,V=l.anchor,H=ye(p)?p.isCollapsed:!(null===(U=p)||void 0===U||!U.collapsed);return m&&H&&n.Range.isCollapsed(l)&&V.offset>0?(E(V.path,{text:"",start:V.offset-1,end:V.offset}),void P()):x((function(){return n.Editor.deleteBackward(t)}),{at:l});case"deleteEntireSoftLine":return x((function(){n.Editor.deleteBackward(t,{unit:"line"}),n.Editor.deleteForward(t,{unit:"line"})}),{at:l});case"deleteHardLineBackward":return x((function(){return n.Editor.deleteBackward(t,{unit:"block"})}),{at:l});case"deleteSoftLineBackward":return x((function(){return n.Editor.deleteBackward(t,{unit:"line"})}),{at:l});case"deleteHardLineForward":return x((function(){return n.Editor.deleteForward(t,{unit:"block"})}),{at:l});case"deleteSoftLineForward":return x((function(){return n.Editor.deleteForward(t,{unit:"line"})}),{at:l});case"deleteWordBackward":return x((function(){return n.Editor.deleteBackward(t,{unit:"word"})}),{at:l});case"deleteWordForward":return x((function(){return n.Editor.deleteForward(t,{unit:"word"})}),{at:l});case"insertLineBreak":return x((function(){return n.Editor.insertSoftBreak(t)}),{at:l});case"insertParagraph":return x((function(){return n.Editor.insertBreak(t)}),{at:l});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if("DataTransfer"===(null==(g=s)?void 0:g.constructor.name))return x((function(){return up.insertData(t,s)}),{at:l});var q=null!=s?s:"";if(ft.get(t)&&(q=q.replace("\ufeff","")),"insertText"===o&&/.*\n.*\n$/.test(q)&&(q=q.slice(0,-1)),q.includes("\n"))return x((function(){var e=q.split("\n");e.forEach((function(r,o){r&&n.Editor.insertText(t,r),o!==e.length-1&&n.Editor.insertSoftBreak(t)}))}),{at:l});if(n.Path.equals(l.anchor.path,l.focus.path)){var K=n.Range.edges(l),$=w(K,2),Q=$[0],X=$[1],Y={start:Q.offset,end:X.offset,text:q};if(q&&h&&"insertCompositionText"===o){var G=h.start+h.text.search(/\S|$/);Y.start+Y.text.search(/\S|$/)===G+1&&Y.end===h.start+h.text.length?(Y.start-=1,h=null,P()):h=!1}else h="insertText"===o&&(null===h?Y:!(!h||!n.Range.isCollapsed(l)||h.end+h.text.length!==Q.offset)&&cp(cp({},h),{},{text:h.text+q}));if(m){var J=t.selection;if(E(Q.path,Y),J){var Z={path:Q.path,offset:Q.offset+q.length};x((function(){}),{at:Z})}return}}return x((function(){return n.Editor.insertText(t,q)}),{at:l})}}},handleKeyDown:function(e){C()||(k(!0),setTimeout(k))},handleDomMutations:function(e){var n;C()||e.some((function(n){return Ce(t,n,e)}))&&(S()?f=!0:null===(n=mt.get(t))||void 0===n||n())},handleInput:function(){!S()&&C()||b()}}}var pp=Ve?t.useLayoutEffect:t.useEffect;var hp=["node"];function vp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var gp,mp={subtree:!0,childList:!0,characterData:!0},yp=Me?function(e){var n=e.node,r=u(e,hp);if(!Me)return null;var o,a=ce(),i=(o=t.useRef(!1),t.useEffect((function(){return o.current=!0,function(){o.current=!1}}),[]),o.current),l=t.useState((function(){return fp(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vp(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({editor:a},r))})),s=w(l,1)[0];return function(e,n,r){var o=t.useState((function(){return new MutationObserver(n)})),a=w(o,1)[0];pp((function(){a.takeRecords()})),t.useEffect((function(){if(!e.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");return a.observe(e.current,r),function(){return a.disconnect()}}),[a,e,r])}(n,s.handleDomMutations,mp),dt.set(a,s.scheduleFlush),dp.set(a,s.flushDeferredDiffs),i&&s.flush(),s}:function(){return null},bp=[],wp="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(gp||(gp={}));var kp,Ep=function(e){return Object.freeze(e)},xp=function(e,t){this.inlineSize=e,this.blockSize=t,Ep(this)},Sp=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Ep(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),Cp=function(e){return e instanceof SVGElement&&"getBBox"in e},Op=function(e){if(Cp(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,a=o.offsetWidth,i=o.offsetHeight;return!(a||i||e.getClientRects().length)},Pp=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},Tp="undefined"!=typeof window?window:{},Np=new WeakMap,Dp=/auto|scroll/,_p=/^tb|vertical/,Rp=/msie|trident/i.test(Tp.navigator&&Tp.navigator.userAgent),Mp=function(e){return parseFloat(e||"0")},Lp=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new xp((n?t:e)||0,(n?e:t)||0)},zp=Ep({devicePixelContentBoxSize:Lp(),borderBoxSize:Lp(),contentBoxSize:Lp(),contentRect:new Sp(0,0,0,0)}),Fp=function(e,t){if(void 0===t&&(t=!1),Np.has(e)&&!t)return Np.get(e);if(Op(e))return Np.set(e,zp),zp;var n=getComputedStyle(e),r=Cp(e)&&e.ownerSVGElement&&e.getBBox(),o=!Rp&&"border-box"===n.boxSizing,a=_p.test(n.writingMode||""),i=!r&&Dp.test(n.overflowY||""),l=!r&&Dp.test(n.overflowX||""),u=r?0:Mp(n.paddingTop),s=r?0:Mp(n.paddingRight),c=r?0:Mp(n.paddingBottom),d=r?0:Mp(n.paddingLeft),f=r?0:Mp(n.borderTopWidth),p=r?0:Mp(n.borderRightWidth),h=r?0:Mp(n.borderBottomWidth),v=d+s,g=u+c,m=(r?0:Mp(n.borderLeftWidth))+p,y=f+h,b=l?e.offsetHeight-y-e.clientHeight:0,w=i?e.offsetWidth-m-e.clientWidth:0,k=o?v+m:0,E=o?g+y:0,x=r?r.width:Mp(n.width)-k-w,S=r?r.height:Mp(n.height)-E-b,C=x+v+w+m,O=S+g+b+y,P=Ep({devicePixelContentBoxSize:Lp(Math.round(x*devicePixelRatio),Math.round(S*devicePixelRatio),a),borderBoxSize:Lp(C,O,a),contentBoxSize:Lp(x,S,a),contentRect:new Sp(d,u,x,S)});return Np.set(e,P),P},Ip=function(e,t,n){var r=Fp(e,n),o=r.borderBoxSize,a=r.contentBoxSize,i=r.devicePixelContentBoxSize;switch(t){case gp.DEVICE_PIXEL_CONTENT_BOX:return i;case gp.BORDER_BOX:return o;default:return a}},Bp=function(e){var t=Fp(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=Ep([t.borderBoxSize]),this.contentBoxSize=Ep([t.contentBoxSize]),this.devicePixelContentBoxSize=Ep([t.devicePixelContentBoxSize])},jp=function(e){if(Op(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},Ap=function(){var e=1/0,t=[];bp.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new Bp(t.target),o=jp(t.target);r.push(n),t.lastReportedSize=Ip(t.target,t.observedBox),o<e&&(e=o)})),t.push((function(){n.callback.call(n.observer,r,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,r=t;n<r.length;n++){(0,r[n])()}return e},Wp=function(e){bp.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(jp(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},Up=function(){var e,t=0;for(Wp(t);bp.some((function(e){return e.activeTargets.length>0}));)t=Ap(),Wp(t);return bp.some((function(e){return e.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:wp}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=wp),window.dispatchEvent(e)),t>0},Vp=[],Hp=function(e){if(!kp){var t=0,n=document.createTextNode("");new MutationObserver((function(){return Vp.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),kp=function(){n.textContent="".concat(t?t--:t++)}}Vp.push(e),kp()},qp=0,Kp={attributes:!0,characterData:!0,childList:!0,subtree:!0},$p=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Qp=function(e){return void 0===e&&(e=0),Date.now()+e},Xp=!1,Yp=function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!Xp){Xp=!0;var n=Qp(e);!function(e){Hp((function(){requestAnimationFrame(e)}))}((function(){var r=!1;try{r=Up()}finally{if(Xp=!1,e=n-Qp(),!qp)return;r?t.run(1e3):e>0?t.run(e):t.start()}}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,Kp)};document.body?t():Tp.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),$p.forEach((function(t){return Tp.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),$p.forEach((function(t){return Tp.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}(),Gp=new Yp,Jp=function(e){!qp&&e>0&&Gp.start(),!(qp+=e)&&Gp.stop()},Zp=function(){function e(e,t){this.target=e,this.observedBox=t||gp.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e,t=Ip(this.target,this.observedBox,!0);return e=this.target,Cp(e)||function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),eh=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},th=new WeakMap,nh=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},rh=function(){function e(){}return e.connect=function(e,t){var n=new eh(e,t);th.set(e,n)},e.observe=function(e,t,n){var r=th.get(e),o=0===r.observationTargets.length;nh(r.observationTargets,t)<0&&(o&&bp.push(r),r.observationTargets.push(new Zp(t,n&&n.box)),Jp(1),Gp.schedule())},e.unobserve=function(e,t){var n=th.get(e),r=nh(n.observationTargets,t),o=1===n.observationTargets.length;r>=0&&(o&&bp.splice(bp.indexOf(n),1),n.observationTargets.splice(r,1),Jp(-1))},e.disconnect=function(e){var t=this,n=th.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),oh=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");rh.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Pp(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");rh.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Pp(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");rh.unobserve(this,e)},e.prototype.disconnect=function(){rh.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function ah(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var ih=function(e){var r=e.isLast,o=e.leaf,a=e.parent,i=e.text,l=ce(),u=up.findPath(l,i),s=n.Path.parent(u),c=Boolean(o[bt]);return l.isVoid(a)?t.createElement(sh,{length:n.Node.string(a).length}):""!==o.text||a.children[a.children.length-1]!==i||l.isInline(a)||""!==n.Editor.string(l,s)?""===o.text?t.createElement(sh,{isMarkPlaceholder:c}):r&&"\n"===o.text.slice(-1)?t.createElement(lh,{isTrailing:!0,text:o.text}):t.createElement(lh,{text:o.text}):t.createElement(sh,{isLineBreak:!0,isMarkPlaceholder:c})},lh=function(e){var n=e.text,r=e.isTrailing,o=void 0!==r&&r,a=ce(),i=t.useRef(null),l=function(){return"".concat(null!=n?n:"").concat(o?"\n":"")},u=t.useState(l),s=w(u,1)[0];return pp((function(){var e,t,r,u=l();if(i.current&&i.current.textContent!==u){if(Me&&ut.get(a)){var s,c=null===(s=up.getWindow(a).getSelection())||void 0===s?void 0:s.anchorNode;if(c&&i.current.contains(c))return}i.current.textContent=u}Le&&(null===(r=i.current)||void 0===r||r.toggleAttribute("data-slate-trailing",o));var d=null===(e=i.current)||void 0===e?void 0:e.firstChild;Le&&o&&1===(null===(t=i.current)||void 0===t?void 0:t.childNodes.length)&&3===(null==d?void 0:d.nodeType)&&d.splitText(n.length)})),t.createElement(uh,{ref:i},s)},uh=t.memo(t.forwardRef((function(e,n){return t.createElement("span",{"data-slate-string":!0,ref:n},e.children)}))),sh=function(e){var n=e.length,r=void 0===n?0:n,o=e.isLineBreak,a=void 0!==o&&o,i=e.isMarkPlaceholder,l={"data-slate-zero-width":a?"n":"z","data-slate-length":r};return void 0!==i&&i&&(l["data-slate-mark-placeholder"]=!0),t.createElement("span",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ah(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ah(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},l),"\ufeff",a?t.createElement("br",null):null)},ch=function(e,t){return e.children[e.children.length-1]===t},dh=function(e,t,r,o){return e===t||(a=e,i=t,l=Object.keys(a).filter((function(e){return"children"!==e})),u=Object.keys(i).filter((function(e){return"children"!==e})),l.length===u.length&&l.every((function(e){return e in i&&a[e]===i[e]}))&&ch(e,r)===ch(t,o)&&(""!==o.text||""===n.Node.string(e)==(""===n.Node.string(t))));var a,i,l,u};function fh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ph(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fh(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var hh=Me?300:0;function vh(e){e.current&&(clearTimeout(e.current),e.current=null)}var gh=function(e){return t.createElement(bh,ph({},e))},mh=function(e){var n=e.leaf,r=e.isLast,o=e.text,a=e.parent,i=e.renderPlaceholder,l=e.renderLeaf,u=void 0===l?gh:l,s=e.leafPosition,c=ce(),d=t.useRef(null),f=t.useRef(null),p=t.useState(!1),h=w(p,2),v=h[0],g=h[1],m=t.useRef(null),y=t.useCallback((function(e){if(function(e,t){e.current&&(e.current.disconnect(),t&&(e.current=null))}(d,null==e),null==e){var t;tt.delete(c),null===(t=n.onPlaceholderResize)||void 0===t||t.call(n,null)}else{if(tt.set(c,e),!d.current){var r=window.ResizeObserver||oh;d.current=new r((function(){var t;null===(t=n.onPlaceholderResize)||void 0===t||t.call(n,e)}))}d.current.observe(e),f.current=e}}),[f,n,c]),b=t.createElement(ih,{isLast:r,leaf:n,parent:a,text:o}),k=Boolean(n[yt]);if(t.useEffect((function(){return k?m.current||(m.current=setTimeout((function(){g(!0),m.current=null}),hh)):(vh(m),g(!1)),function(){return vh(m)}}),[k,g]),k&&v){var E={children:n.placeholder,attributes:{"data-slate-placeholder":!0,style:{position:"absolute",top:0,pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",WebkitUserSelect:"none",textDecoration:"none",WebkitUserModify:ze?"inherit":void 0},contentEditable:!1,ref:y}};b=t.createElement(t.Fragment,null,b,i(E))}return u({attributes:{"data-slate-leaf":!0},children:b,leaf:n,text:o,leafPosition:s})},yh=t.memo(mh,(function(e,t){return dh(e.parent,t.parent,e.text,t.text)&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&n.Text.equals(t.leaf,e.leaf)&&t.leaf[yt]===e.leaf[yt]})),bh=function(e){var n=e.attributes,r=e.children;return t.createElement("span",ph({},n),r)},wh=a((function(e){e.exports=function(e){if(Array.isArray(e))return g(e)},e.exports.__esModule=!0,e.exports.default=e.exports}));o(wh);var kh=a((function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports}));o(kh);var Eh=a((function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports}));o(Eh);var xh=a((function(e){e.exports=function(e){return wh(e)||kh(e)||m(e)||Eh()},e.exports.__esModule=!0,e.exports.default=e.exports})),Sh=o(xh);function Ch(e,n){var r,o=t.useReducer((function(e){return e+1}),0),a=w(o,2)[1],i=t.useRef(),l=t.useRef((function(){return null})),u=t.useRef(null);try{if(e!==l.current||i.current){var s=e();r=n(u.current,s)?u.current:s}else r=u.current}catch(e){throw i.current&&e instanceof Error&&(e.message+="\nThe error may be correlated with this previous error:\n".concat(i.current.stack,"\n\n")),e}return l.current=e,u.current=r,i.current=void 0,[r,t.useCallback((function(){try{var e=l.current();if(n(u.current,e))return;u.current=e}catch(e){e instanceof Error?i.current=e:i.current=new Error(String(e))}a()}),[])]}var Oh=t.createContext({}),Ph=function(e,r){var o=ce(),a=t.useContext(Oh),i=a.decorate,l=a.addEventListener,u=Ch((function(){var t=up.findPath(o,e),r=i([e,t]);if(n.Node.isText(e)){var a=n.Editor.range(o,t);return r.flatMap((function(e){var t=n.Range.intersection(e,a);return t?[t]:[]}))}return r}),n.Node.isText(e)?en:Zt),s=w(u,2),c=s[0],d=s[1];return pp((function(){var e=l(d);return d(),e}),[l,d]),t.useMemo((function(){return[].concat(Sh(c),Sh(r))}),[c,r])};function Th(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Nh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Th(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Th(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Dh=function(e){return t.createElement(Mh,Nh({},e))},_h=function(e){for(var r=e.decorations,o=e.isLast,a=e.parent,i=e.renderPlaceholder,l=e.renderLeaf,u=e.renderText,s=void 0===u?Dh:u,c=e.text,d=ce(),f=t.useRef(null),p=Ph(c,r),h=n.Text.decorations(c,p),v=up.findKey(d,c),g=[],m=0;m<h.length;m++){var y=h[m],b=y.leaf,w=y.position;g.push(t.createElement(yh,{isLast:o&&m===h.length-1,key:"".concat(v.id,"-").concat(m),renderPlaceholder:i,leaf:b,leafPosition:w,text:c,parent:a,renderLeaf:l}))}var k=t.useCallback((function(e){var t=at.get(d);e?(null==t||t.set(v,e),rt.set(c,e),nt.set(e,c)):(null==t||t.delete(v),rt.delete(c),f.current&&nt.delete(f.current)),f.current=e}),[f,d,v,c]);return s({text:c,children:g,attributes:{"data-slate-node":"text",ref:k}})},Rh=t.memo(_h,(function(e,t){return dh(e.parent,t.parent,e.text,t.text)&&t.isLast===e.isLast&&t.renderText===e.renderText&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&en(t.decorations,e.decorations)})),Mh=function(e){var n=e.attributes,r=e.children;return t.createElement("span",Nh({},n),r)};function Lh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lh(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Fh(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ih(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ih(e,t):void 0}}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a}}}}function Ih(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Bh=function(e){var t,r=Fh(e);try{for(r.s();!(t=r.n()).done;){var o=t.value,a=k(n.Node.string(o));if("neutral"!==a)return a}}catch(e){r.e(e)}finally{r.f()}},jh=function(e){return t.createElement(Uh,zh({},e))},Ah=function(e){var r=e.decorations,o=e.element,a=e.renderElement,i=void 0===a?jh:a,l=e.renderChunk,u=e.renderPlaceholder,s=e.renderLeaf,c=e.renderText,d=ce(),f=cv(),p=d.isInline(o),h=Ph(o,r),v=up.findKey(d,o),g=t.useCallback((function(e){var t=at.get(d);e?(null==t||t.set(v,e),rt.set(o,e),nt.set(e,o)):(null==t||t.delete(v),rt.delete(o))}),[d,v,o]),m=lv({decorations:h,node:o,renderElement:i,renderChunk:l,renderPlaceholder:u,renderLeaf:s,renderText:c}),y={"data-slate-node":"element",ref:g};if(p&&(y["data-slate-inline"]=!0),!p&&n.Editor.hasInlines(d,o)){var b=n.Node.string(o),E=""===b?function(e){var t,n=Je.get(e),r=Ge.get(e);if(n&&void 0!==r){var o=n.children.slice(0,r).reverse(),a=n.children.slice(r+1);return null!==(t=Bh(o))&&void 0!==t?t:Bh(a)}}(o):k(b);"rtl"===E&&(y.dir=E)}if(n.Editor.isVoid(d,o)){y["data-slate-void"]=!0,!f&&p&&(y.contentEditable=!1);var x=p?"span":"div",S=n.Node.texts(o),C=w(S,1),O=w(C[0],1)[0];m=t.createElement(x,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute",userSelect:"none",WebkitUserSelect:"none"}},t.createElement(Rh,{renderPlaceholder:u,decorations:[],isLast:!1,parent:o,text:O})),Ge.set(O,0),Je.set(O,o)}return i({attributes:y,children:m,element:o})},Wh=t.memo(Ah,(function(e,t){return e.element===t.element&&e.renderElement===t.renderElement&&e.renderChunk===t.renderChunk&&e.renderText===t.renderText&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&Zt(e.decorations,t.decorations)})),Uh=function(e){var n=e.attributes,r=e.children,o=e.element,a=ce().isInline(o)?"span":"div";return t.createElement(a,zh(zh({},n),{},{style:{position:"relative"}}),r)},Vh=a((function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports})),Hh=o(Vh),qh=a((function(e){function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,d(r.key),r)}}e.exports=function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports})),Kh=o(qh),$h=function(){return Kh((function e(t,n){var r=n.chunkSize,o=n.debug;Hh(this,e),p(this,"root",void 0),p(this,"chunkSize",void 0),p(this,"debug",void 0),p(this,"reachedEnd",void 0),p(this,"pointerChunk",void 0),p(this,"pointerIndex",void 0),p(this,"pointerIndexStack",void 0),p(this,"cachedPointerNode",void 0),this.root=t,this.chunkSize=r,this.debug=null!=o&&o,this.pointerChunk=t,this.pointerIndex=-1,this.pointerIndexStack=[],this.reachedEnd=!1,this.validateState()}),[{key:"readLeaf",value:function(){if(this.reachedEnd)return null;for(;;){if(this.pointerIndex+1<this.pointerSiblings.length){this.pointerIndex++,this.cachedPointerNode=void 0;break}if("root"===this.pointerChunk.type)return this.reachedEnd=!0,null;this.exitChunk()}return this.validateState(),this.enterChunkUntilLeaf(!1),this.pointerNode}},{key:"returnToPreviousLeaf",value:function(){if(this.reachedEnd)return this.reachedEnd=!1,void this.enterChunkUntilLeaf(!0);for(;;){if(this.pointerIndex>=1){this.pointerIndex--,this.cachedPointerNode=void 0;break}if("root"===this.pointerChunk.type)return void(this.pointerIndex=-1);this.exitChunk()}this.validateState(),this.enterChunkUntilLeaf(!0)}},{key:"insertBefore",value:function(e){this.returnToPreviousLeaf(),this.insertAfter(e),this.readLeaf()}},{key:"insertAfter",value:function(e){if(0!==e.length){for(var t=0,n=0;"chunk"===this.pointerChunk.type&&this.pointerIndex===this.pointerSiblings.length-1;){var r=this.chunkSize-this.pointerSiblings.length,o=Math.min(r,e.length);if(o>0){var a=e.splice(0,o);this.rawInsertAfter(a,t)}this.exitChunk(),t++}if(0!==e.length){var i=this.savePointer(),l=null;if(this.readLeaf())for(;"chunk"===this.pointerChunk.type&&0===this.pointerIndex;){var u=this.chunkSize-this.pointerSiblings.length,s=Math.min(u,e.length);if(s>0){var c=e.splice(-s,s);this.pointerIndex=-1,this.cachedPointerNode=void 0,this.rawInsertAfter(c,n),l||(l=this.savePointer())}this.exitChunk(),n++}this.restorePointer(i);var d=Math.max(t,n);this.rawInsertAfter(e,d),l&&this.restorePointer(l),this.validateState()}}}},{key:"remove",value:function(){this.pointerSiblings.splice(this.pointerIndex--,1),this.cachedPointerNode=void 0,0===this.pointerSiblings.length&&"chunk"===this.pointerChunk.type?(this.exitChunk(),this.remove()):this.invalidateChunk(),this.validateState()}},{key:"invalidateChunk",value:function(){for(var e=this.pointerChunk;"chunk"===e.type;e=e.parent)this.root.modifiedChunks.add(e)}},{key:"atStart",get:function(){return"root"===this.pointerChunk.type&&-1===this.pointerIndex}},{key:"pointerSiblings",get:function(){return this.pointerChunk.children}},{key:"getPointerNode",value:function(){return this.reachedEnd||-1===this.pointerIndex?null:this.pointerSiblings[this.pointerIndex]}},{key:"pointerNode",get:function(){if(void 0!==this.cachedPointerNode)return this.cachedPointerNode;var e=this.getPointerNode();return this.cachedPointerNode=e,e}},{key:"getChunkPath",value:function(e){for(var t=[],n=e;"chunk"===n.type;n=n.parent){var r=n.parent.children.indexOf(n);if(-1===r)return null;t.unshift(r)}return t}},{key:"savePointer",value:function(){if(this.atStart)return"start";if(!this.pointerNode)throw new Error("Cannot save pointer when pointerNode is null");return{chunk:this.pointerChunk,node:this.pointerNode}}},{key:"restorePointer",value:function(e){if("start"===e)return this.pointerChunk=this.root,this.pointerIndex=-1,this.pointerIndexStack=[],this.reachedEnd=!1,void(this.cachedPointerNode=void 0);var t=e.chunk,n=e.node,r=t.children.indexOf(n);if(-1===r)throw new Error("Cannot restore point because saved node is no longer in saved chunk");var o=this.getChunkPath(t);if(!o)throw new Error("Cannot restore point because saved chunk is no longer connected to root");this.pointerChunk=t,this.pointerIndex=r,this.pointerIndexStack=o,this.reachedEnd=!1,this.cachedPointerNode=n,this.validateState()}},{key:"enterChunk",value:function(e){var t;if("chunk"!==(null===(t=this.pointerNode)||void 0===t?void 0:t.type))throw new Error("Cannot enter non-chunk");if(this.pointerIndexStack.push(this.pointerIndex),this.pointerChunk=this.pointerNode,this.pointerIndex=e?this.pointerSiblings.length-1:0,this.cachedPointerNode=void 0,this.validateState(),0===this.pointerChunk.children.length)throw new Error("Cannot enter empty chunk")}},{key:"enterChunkUntilLeaf",value:function(e){for(;"chunk"===(null===(t=this.pointerNode)||void 0===t?void 0:t.type);){var t;this.enterChunk(e)}}},{key:"exitChunk",value:function(){if("root"===this.pointerChunk.type)throw new Error("Cannot exit root");var e=this.pointerChunk;this.pointerChunk=e.parent,this.pointerIndex=this.pointerIndexStack.pop(),this.cachedPointerNode=void 0,this.validateState()}},{key:"rawInsertAfter",value:function(e,t){var n,r=this;if(0!==e.length){for(var o=function(e,t,n){if(1===n)return e;for(var a=[],i=0;i<r.chunkSize;i++){var l=e.slice(i*n,(i+1)*n);if(0===l.length)break;var u={type:"chunk",key:new Xe,parent:t,children:[]};u.children=o(l,u,n/r.chunkSize),a.push(u)}return a},a=this.pointerSiblings.length+e.length,i=0,l=this.chunkSize;l<a;l*=this.chunkSize)i++;var u=Math.max(i,t),s=Math.pow(this.chunkSize,u),c=o(e,this.pointerChunk,s);(n=this.pointerSiblings).splice.apply(n,[this.pointerIndex+1,0].concat(Sh(c))),this.pointerIndex+=c.length,this.cachedPointerNode=void 0,this.invalidateChunk(),this.validateState()}}},{key:"validateState",value:function(){if(this.debug){var e=function(t){if("chunk"===t.type){var n=t.parent,r=t.children;if(!n.children.includes(t))throw new Error("Debug: Chunk ".concat(t.key.id," has an incorrect parent property"));r.forEach(e)}};if(this.root.children.forEach(e),void 0!==this.cachedPointerNode&&this.cachedPointerNode!==this.getPointerNode())throw new Error("Debug: The cached pointer is incorrect and has not been invalidated");var t=this.getChunkPath(this.pointerChunk);if(!t)throw new Error("Debug: The pointer chunk is not connected to the root");if(!n.Path.equals(this.pointerIndexStack,t))throw new Error("Debug: The cached index stack [".concat(this.pointerIndexStack.join(", "),"] does not match the path of the pointer chunk [").concat(t.join(", "),"]"))}}}])}(),Qh=function(){return Kh((function e(t,n){Hh(this,e),p(this,"editor",void 0),p(this,"children",void 0),p(this,"cachedKeys",void 0),p(this,"pointerIndex",void 0),this.editor=t,this.children=n,this.cachedKeys=new Array(n.length),this.pointerIndex=0}),[{key:"read",value:function(e){if(1===e)return[this.children[this.pointerIndex++]];var t=this.remaining(e);return this.pointerIndex+=e,t}},{key:"remaining",value:function(e){return void 0===e?this.children.slice(this.pointerIndex):this.children.slice(this.pointerIndex,this.pointerIndex+e)}},{key:"reachedEnd",get:function(){return this.pointerIndex>=this.children.length}},{key:"lookAhead",value:function(e,t){var n=this.children.indexOf(e,this.pointerIndex);if(n>-1)return n-this.pointerIndex;for(var r=this.pointerIndex;r<this.children.length;r++){var o=this.children[r];if(this.findKey(o,r)===t)return r-this.pointerIndex}return-1}},{key:"toChunkLeaves",value:function(e,t){var n=this;return e.map((function(e,r){return{type:"leaf",node:e,key:n.findKey(e,t+r),index:t+r}}))}},{key:"findKey",value:function(e,t){var n=this.cachedKeys[t];if(n)return n;var r=up.findKey(this.editor,e);return this.cachedKeys[t]=r,r}}])}(),Xh=function(e,t){for(var n,r=t.chunkTree,o=t.children,a=t.chunkSize,i=t.rerenderChildren,l=void 0===i?[]:i,u=t.onInsert,s=t.onUpdate,c=t.onIndexChange,d=t.debug,f=new $h(r,{chunkSize:a,debug:d}),p=new Qh(e,o),h=function(){var e=p.lookAhead(n.node,n.key),t=e>0&&r.movedNodeKeys.has(n.key);if(-1===e||t)return f.remove(),1;var o=p.pointerIndex,a=p.read(e+1),i=a.pop();if(a.length){var d=p.toChunkLeaves(a,o);f.insertBefore(d),a.forEach((function(e,t){null==u||u(e,o+t)}))}var h=p.pointerIndex-1;n.node!==i&&(n.node=i,f.invalidateChunk(),null==s||s(i,h)),n.index!==h&&(n.index=h,null==c||c(i,h)),l.includes(h)&&f.invalidateChunk()};n=f.readLeaf();)h();if(!p.reachedEnd){var v=p.remaining(),g=p.toChunkLeaves(v,p.pointerIndex);f.returnToPreviousLeaf(),f.insertAfter(g),v.forEach((function(e,t){null==u||u(e,p.pointerIndex+t)}))}r.movedNodeKeys.clear()};function Yh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yh(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Jh=new WeakMap,Zh=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=up.findKey(e,t),o=Jh.get(r);return o||(o={type:"root",movedNodeKeys:new Set,modifiedChunks:new Set,children:[]},Jh.set(r,o)),n.reconcile&&Xh(e,Gh({chunkTree:o,children:t.children},n.reconcile)),o};function ev(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var tv=function(e){return e.children},nv=function(e){var n=e.root,r=e.ancestor,o=e.renderElement,a=e.renderChunk,i=void 0===a?tv:a;return r.children.map((function(e){if("chunk"===e.type){var a=e.key.id,l=i({highest:r===n,lowest:e.children.some((function(e){return"leaf"===e.type})),attributes:{"data-slate-chunk":!0},children:t.createElement(ov,{root:n,ancestor:e,renderElement:o,renderChunk:i})});return t.createElement(t.Fragment,{key:a},l)}var u=e.node;return o(u,e.index,e.key)}))},rv=function(e){return t.useEffect((function(){e.root.modifiedChunks.clear()})),t.createElement(nv,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ev(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ev(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e))},ov=t.memo(nv,(function(e,t){return e.root===t.root&&e.renderElement===t.renderElement&&e.renderChunk===t.renderChunk&&!t.root.modifiedChunks.has(t.ancestor)})),av=t.createContext(null),iv=function(){return t.useContext(av)},lv=function(e){var r=e.decorations,o=e.node,a=e.renderElement,i=e.renderChunk,l=e.renderPlaceholder,u=e.renderText,s=e.renderLeaf,c=ce();Ye.set(c,!1);var d=n.Node.isElement(o)&&!c.isInline(o)&&n.Editor.hasInlines(c,o)?null:c.getChunkSize(o),f=!!d,p=uv(c,o,r),h=p.decorationsByChild,v=p.childrenToRedecorate;f||o.children.forEach((function(e,t){Ge.set(e,t),Je.set(e,o)}));var g=t.useCallback((function(e,n,r){var o=null!=r?r:up.findKey(c,e);return t.createElement(av.Provider,{key:"provider-".concat(o.id),value:e},t.createElement(Wh,{decorations:h[n],element:e,key:o.id,renderElement:a,renderChunk:i,renderPlaceholder:l,renderLeaf:s,renderText:u}))}),[c,h,a,i,l,s,u]);if(!f)return o.children.map((function(e,r){return n.Node.isText(e)?function(e,n){var r=up.findKey(c,e);return t.createElement(Rh,{decorations:h[n],key:r.id,isLast:n===o.children.length-1,parent:o,renderPlaceholder:l,renderLeaf:s,renderText:u,text:e})}(e,r):g(e,r)}));var m=Zh(c,o,{reconcile:{chunkSize:d,rerenderChildren:v,onInsert:function(e,t){Ge.set(e,t),Je.set(e,o)},onUpdate:function(e,t){Ge.set(e,t),Je.set(e,o)},onIndexChange:function(e,t){Ge.set(e,t)}}});return t.createElement(rv,{root:m,ancestor:m,renderElement:g,renderChunk:i})},uv=function(e,r,o){var a=((e,t,r)=>{const o=Array.from(t.children,(()=>[]));if(0===r.length)return o;const a=wt.findPath(e,t),i=a.length,l=n.Editor.range(e,a),u=new Array(t.children.length),s=t=>{const r=u[t];if(r)return r;const o=n.Editor.range(e,[...a,t]);return u[t]=o,o};for(const e of r){const t=n.Range.intersection(l,e);if(!t)continue;const[r,a]=n.Range.edges(t),u=r.path[i],c=a.path[i];for(let t=u;t<=c;t++){const r=o[t];if(!r)continue;const a=s(t),i=n.Range.intersection(a,e);i&&r.push(Gt(Gt({},e),i))}}return o})(e,r,o),i=t.useRef(a).current,l=[];i.length=a.length;for(var u=0;u<a.length;u++){var s,c=a[u],d=null!==(s=i[u])&&void 0!==s?s:null;Zt(d,c)||(i[u]=c,l.push(u))}return{decorationsByChild:i,childrenToRedecorate:l}},sv=t.createContext(!1),cv=function(){return t.useContext(sv)},dv=t.createContext({}),fv=function(e,t){return e===t};function pv(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fv,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.deferred,a=t.useContext(dv);if(!a)throw new Error("The `useSlateSelector` hook must be used inside the <Slate> component's context.");var i=a.addEventListener,l=ce(),u=t.useCallback((function(){return e(l)}),[l,e]),s=Ch(u,n),c=w(s,2),d=c[0],f=c[1];return pp((function(){var e=i(f,{deferred:o});return f(),e}),[i,f,o]),d}var hv=function(){var e=t.useContext(dv).addEventListener,n=t.useReducer((function(e){return e+1}),0),r=w(n,2)[1];if(!e)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");return pp((function(){return e(r)}),[e]),ce()},vv=new WeakMap;var gv=function(e){return ge(e)&&e.hasAttribute("data-slate-placeholder")},mv=function(e,t){var n=[],r=function(){n=[]};return{registerMutations:function(r){var o;if(t.current){var a=r.filter((function(t){return o=(n=t).addedNodes,a=n.removedNodes,!((i=[].concat(Sh(Array.from(o)),Sh(Array.from(a)))).length>0&&i.every(gv))&&Ce(e,t,r);var n,o,a,i}));(o=n).push.apply(o,Sh(a))}},restoreDOM:function(){n.length>0&&(n.reverse().forEach((function(e){"characterData"!==e.type&&(e.removedNodes.forEach((function(t){e.target.insertBefore(t,e.nextSibling)})),e.addedNodes.forEach((function(t){e.target.removeChild(t)})))})),r())},clear:r}},yv=function(e,t){var n=up.toDOMRange(e,{anchor:t,focus:t}),r=Array.from(n.getClientRects()),o=w(r,1)[0];return(null!=o?o:n.getBoundingClientRect()).top},bv=function(e,t,r){var o=n.Editor.above(e,{at:t,match:function(t){return n.Node.isElement(t)&&e.isInline(t)}});if(!o||e.isVoid(o[0])||e.isElementReadOnly(o[0])||!(r?n.Editor.isStart(e,t,o[1]):n.Editor.isEnd(e,t,o[1])))return"character";if(r&&!n.Path.hasPrevious(o[1]))return"character";var a=r?n.Path.previous(o[1]):n.Path.next(o[1]);if(!n.Editor.hasPath(e,a))return"character";var i=n.Node.get(e,a);return n.Node.isText(i)&&""===i.text?"offset":"character"},wv=function(e,t){var r=e.selection;if(r&&n.Range.isCollapsed(r)){var o=Se(up.findDocumentOrShadowRoot(e)),a=null==o?void 0:o.anchorNode;if(o&&function(e){return me(e)&&e.nodeType===e.TEXT_NODE}(a)){var i=o.anchorOffset,l=i-t.length;if(!(l<0||a.data.slice(l,i)!==t)&&up.hasDOMNode(e,a,{editable:!0})){var u=up.findPath(e,up.toSlateNode(e,a));n.Path.equals(u,r.anchor.path)&&!n.Editor.void(e,{at:r})||a.deleteData(l,t.length)}}}};function kv(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ev(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ev(e,t):void 0}}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a}}}}function Ev(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var xv=function(e,t){var r;return null===(r=n.Editor.above(e,{at:t,match:function(t){return n.Node.isElement(t)&&n.Editor.isBlock(e,t)}}))||void 0===r?void 0:r[1]},Sv=function(e,t){var r=n.Range.edges(t),o=w(r,2),a=o[0],i=o[1],l=xv(e,a),u=xv(e,i);return l&&u&&1===l.length&&1===u.length&&!(l[0]>=u[0])&&n.Editor.isStart(e,a,l)&&n.Editor.isStart(e,i,u)?Array.from({length:u[0]-l[0]},(function(e,t){return[l[0]+t]})):null},Cv=function(e,t){if(n.Range.isCollapsed(t)){var r=n.Editor.void(e,{at:t});r&&n.Transforms.removeNodes(e,{at:r[1],voids:!0})}else{var o=Sv(e,t);if(!o)return n.Transforms.select(e,t),void n.Editor.deleteFragment(e);var a=n.Editor.pathRef(e,n.Path.next(o[o.length-1]));n.Editor.withoutNormalizing(e,(function(){var t,r=kv(Sh(o).reverse());try{for(r.s();!(t=r.n()).done;){var a=t.value;n.Transforms.removeNodes(e,{at:a})}}catch(e){r.e(e)}finally{r.f()}}));var i=a.unref();i&&n.Transforms.select(e,n.Editor.start(e,i))}},Ov=a((function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports}));o(Ov);var Pv=a((function(e){var t=s.default;e.exports=function(e,n){if(n&&("object"==t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return Ov(e)},e.exports.__esModule=!0,e.exports.default=e.exports})),Tv=o(Pv),Nv=a((function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})),Dv=o(Nv),_v=a((function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}));o(_v);var Rv=a((function(e){e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_v(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports})),Mv=o(Rv);function Lv(e,t,n){return t=Dv(t),Tv(e,zv()?Reflect.construct(t,n||[],Dv(e).constructor):t.apply(e,n))}function zv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(zv=function(){return!!e})()}var Fv={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0},Iv=function(e){function t(){var e;Hh(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e=Lv(this,t,[].concat(r)),p(e,"context",null),p(e,"manager",null),p(e,"mutationObserver",null),e}return Mv(t,e),Kh(t,[{key:"observe",value:function(){var e,t=this.props.node;if(!t.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");null===(e=this.mutationObserver)||void 0===e||e.observe(t.current,Fv)}},{key:"componentDidMount",value:function(){var e=this.props.receivedUserInput,t=this.context;this.manager=mv(t,e),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}},{key:"getSnapshotBeforeUpdate",value:function(){var e,t,n,r,o=null===(e=this.mutationObserver)||void 0===e?void 0:e.takeRecords();null!=o&&o.length&&(null===(r=this.manager)||void 0===r||r.registerMutations(o));return null===(t=this.mutationObserver)||void 0===t||t.disconnect(),null===(n=this.manager)||void 0===n||n.restoreDOM(),null}},{key:"componentDidUpdate",value:function(){var e;null===(e=this.manager)||void 0===e||e.clear(),this.observe()}},{key:"componentWillUnmount",value:function(){var e;null===(e=this.mutationObserver)||void 0===e||e.disconnect()}},{key:"render",value:function(){return this.props.children}}])}(t.Component);p(Iv,"contextType",se);var Bv=Me?Iv:function(e){var n=e.children;return t.createElement(t.Fragment,null,n)},jv=t.createContext(!1),Av=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderChunk","renderLeaf","renderText","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],Wv=["text"];function Uv(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Vv(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vv(e,t):void 0}}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a}}}}function Vv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Hv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hv(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Kv=function(e){return t.createElement(t.Fragment,null,lv(e))},$v=t.forwardRef((function(e,r){var o=t.useCallback((function(e){return t.createElement(Jv,qv({},e))}),[]),a=e.autoFocus,i=e.decorate,l=void 0===i?Zv:i,s=e.onDOMBeforeInput,c=e.placeholder,d=e.readOnly,f=void 0!==d&&d,h=e.renderElement,v=e.renderChunk,g=e.renderLeaf,m=e.renderText,y=e.renderPlaceholder,b=void 0===y?o:y,E=e.scrollSelectionIntoView,x=void 0===E?eg:E,S=e.style,C=void 0===S?{}:S,O=e.as,P=void 0===O?"div":O,T=e.disableDefaultStyles,N=void 0!==T&&T,D=u(e,Av),_=hv(),R=t.useState(!1),M=w(R,2),L=M[0],z=M[1],F=t.useRef(null),I=t.useRef(_.children),B=t.useRef(_.selection),j=t.useRef(!1),A=t.useRef([]),W=t.useState(),U=w(W,2),V=U[0],H=U[1],q=t.useRef(!1),K=function(e){var n=t.useMemo((function(){var t=mv(e,{current:!0}),n=null,r=function(){null!=n||(n=new MutationObserver(t.registerMutations)),n.observe(up.toDOMNode(e,e),{childList:!0,subtree:!0})},o=function(){n&&(t.registerMutations(n.takeRecords()),n.disconnect())};return{observe:r,track:function(e){(n||null!=e&&e.includes("\n"))&&r()},pause:o,restore:function(){o(),t.restoreDOM()},clear:function(){var e;null===(e=n)||void 0===e||e.disconnect(),n=null,t.clear()}}}),[e]);return t.useEffect((function(){return function(){return n.clear()}}),[n]),n}(_),$=t.useRef(!1),Q=function(){var e=ce(),n=t.useRef(!1),r=t.useRef(0),o=t.useCallback((function(){if(!n.current){n.current=!0;var t=up.getWindow(e);t.cancelAnimationFrame(r.current),r.current=t.requestAnimationFrame((function(){n.current=!1}))}}),[e]);return t.useEffect((function(){return function(){return cancelAnimationFrame(r.current)}}),[]),{receivedUserInput:n,onUserInput:o}}(),X=Q.onUserInput,Y=Q.receivedUserInput,G=t.useReducer((function(e){return e+1}),0),J=w(G,2)[1];mt.set(_,J),it.set(_,f);var Z=t.useMemo((function(){return{isDraggingInternally:!1,pendingSelection:null,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}}),[]);t.useEffect((function(){F.current&&a&&(_.children.length>0?up.focus(_):F.current.focus())}),[a,_]);var ne=t.useRef(),re=t.useMemo((function(){return te((function(){if(Ye.get(_))re();else{Z.pendingSelection=null;var e=up.toDOMNode(_,_).getRootNode();if(!q.current&&ze&&e instanceof ShadowRoot){q.current=!0;var t=(()=>{let e=document.activeElement;for(;null!==(t=e)&&void 0!==t&&t.shadowRoot&&null!==(n=e.shadowRoot)&&void 0!==n&&n.activeElement;){var t,n,r;e=null===(r=e)||void 0===r||null===(r=r.shadowRoot)||void 0===r?void 0:r.activeElement}return e})();return t?document.execCommand("indent"):n.Transforms.deselect(_),void(q.current=!1)}var r=ne.current;if((Me||!up.isComposing(_))&&(!Z.isUpdatingSelection||null!=r&&r.isFlushing())&&!Z.isDraggingInternally){var o=up.findDocumentOrShadowRoot(_),a=o.activeElement,i=up.toDOMNode(_,_),l=Se(o);if(a===i?(Z.latestElement=a,lt.set(_,!0)):lt.delete(_),!l)return n.Transforms.deselect(_);var u=l.anchorNode,s=l.focusNode,c=up.hasEditableTarget(_,u)||up.isTargetInsideNonReadonlyVoid(_,u),d=up.hasTarget(_,s),p=me(a)&&i.contains(a);if(c&&d&&(f||p)){var h=up.toSlateRange(_,l,{exactMatch:!1,suppressThrow:!0});if(h)if(up.isComposing(_)||null!=r&&r.hasPendingChanges()||null!=r&&r.isFlushing())null==r||r.handleUserSelect(h);else l.isCollapsed&&!Xv(u)&&_.selection&&n.Range.equals(h,_.selection)?Yv(_,l,Z):n.Transforms.select(_,h)}!f||c&&d||n.Transforms.deselect(_)}}}),100)}),[_,f,Z]),oe=t.useMemo((function(){return ee(re,0)}),[re]),ae=t.useCallback((function(){var e=up.toDOMNode(_,_).getRootNode();oe.flush(),ze&&e instanceof ShadowRoot||re(),re.flush()}),[_,re,oe]);ne.current=yp({node:F,onDOMSelectionChange:re,scheduleOnDOMSelectionChange:oe}),pp((function(){var e,t,r;F.current&&(r=ve(F.current))?(Ze.set(_,r),et.set(_,F.current),rt.set(_,F.current),nt.set(F.current,_)):rt.delete(_);var o=_.selection,a=j.current;j.current=!1;var i=a&&I.current!==_.children&&!!o&&(!B.current||!n.Range.equals(B.current,o));I.current=_.children,B.current=o;var l=up.findDocumentOrShadowRoot(_),u=Se(l);if(u&&up.isFocused(_)&&(null===(e=ne.current)||void 0===e||!e.hasPendingAction())){var s=function(e){var t="None"!==u.type;if(o||t){var r,a=u.focusNode;if(Le&&u.rangeCount>1){var l=u.getRangeAt(0),s=u.getRangeAt(u.rangeCount-1);r=l.startContainer===a?s.endContainer:l.startContainer}else r=u.anchorNode;var c=et.get(_),d=!1;if(Te(c,r)&&Te(c,a)&&(d=!0),t&&d&&o&&!e){var f,p=up.toSlateRange(_,u,{exactMatch:!0,suppressThrow:!0});if(p&&n.Range.equals(p,o)&&(!Z.hasMarkPlaceholder||null!==(f=r)&&void 0!==f&&null!==(f=f.parentElement)&&void 0!==f&&f.hasAttribute("data-slate-mark-placeholder")))return void(i&&x(_,u.getRangeAt(0)))}if(!o||up.hasRange(_,o)){var h=Z.pendingSelection;if(Z.pendingSelection=null,!h||e||h.basedOn!==o||o&&n.Range.equals(h.range,o)){Z.isUpdatingSelection=!0;var v=null;try{v=o&&up.toDOMRange(_,o)}catch(e){}return v?(up.isComposing(_)&&!Me?u.rangeCount>0&&u.collapseToEnd():n.Range.isBackward(o)?u.setBaseAndExtent(v.endContainer,v.endOffset,v.startContainer,v.startOffset):u.setBaseAndExtent(v.startContainer,v.startOffset,v.endContainer,v.endOffset),x(_,v)):u.removeAllRanges(),v}n.Transforms.select(_,h.range)}else _.selection=up.toSlateRange(_,u,{exactMatch:!1,suppressThrow:!0})}};u.rangeCount<=1&&s();var c="action"===(null===(t=ne.current)||void 0===t?void 0:t.isFlushing());if(Me&&c){var d=null,f=requestAnimationFrame((function(){if(c){var e=function(e){try{up.toDOMNode(_,_).focus(),s(e)}catch(e){}};e(),d=setTimeout((function(){e(!0),Z.isUpdatingSelection=!1}))}}));return function(){cancelAnimationFrame(f),d&&clearTimeout(d)}}setTimeout((function(){Z.isUpdatingSelection=!1}))}}));var ie=t.useCallback((function(e){if(up.hasEditableTarget(_,e.target)){og(_,e);var t=up.toDOMNode(_,_).getRootNode();if(null!=q&&q.current&&ze&&t instanceof ShadowRoot){var r=e.getTargetRanges()[0],o=new window.Range;o.setStart(r.startContainer,r.startOffset),o.setEnd(r.endContainer,r.endOffset);var a=up.toSlateRange(_,o,{exactMatch:!1,suppressThrow:!0});return a&&n.Transforms.select(_,a),e.preventDefault(),void e.stopImmediatePropagation()}if(X(),j.current=!0,!f&&!rg(e,s)){var i;if(ne.current)return ne.current.handleDOMBeforeInput(e);ae();var l=_.selection,u=e.inputType,c=e.dataTransfer||e.data||void 0,d="insertCompositionText"===u||"deleteCompositionText"===u;if(d&&up.isComposing(_))return void((Ie||$.current)&&K.track(e.data));var p=!1;if("insertText"===u&&l&&n.Range.isCollapsed(l)&&e.data&&1===e.data.length&&/[a-z ]/i.test(e.data)&&0!==l.anchor.offset){var h;p=!0,_.marks&&(p=!1);var v=null===(h=Se(up.findDocumentOrShadowRoot(_)))||void 0===h?void 0:h.anchorNode;if(Xv(v)||(p=!1),!Ye.get(_)){var g,m,y=l.anchor,b=up.toDOMPoint(_,y),k=w(b,2),E=k[0],x=k[1],S=null===(g=E.parentElement)||void 0===g?void 0:g.closest("a"),C=up.getWindow(_);if(p&&S&&up.hasDOMNode(_,S)){var O,P=null==C?void 0:C.document.createTreeWalker(S,NodeFilter.SHOW_TEXT).lastChild();P===E&&(null===(O=P.textContent)||void 0===O?void 0:O.length)===x&&(p=!1)}if(p&&E.parentElement&&"pre"===(null==C||null===(m=C.getComputedStyle(E.parentElement))||void 0===m?void 0:m.whiteSpace)){var T=n.Editor.above(_,{at:y.path,match:function(e){return n.Node.isElement(e)&&n.Editor.isBlock(_,e)}});T&&n.Node.string(T[0]).includes("\t")&&(p=!1)}}}if((!u.startsWith("delete")||u.startsWith("deleteBy"))&&!Ye.get(_)){var N=e.getTargetRanges(),D=w(N,1)[0];if(D){var R=up.toSlateRange(_,D,{exactMatch:!1,suppressThrow:!0});if(R){if(!l||!n.Range.equals(l,R)){p=!1;var M=!d&&_.selection&&!function(e,t,r){if(!n.Range.isCollapsed(t)||!n.Range.isCollapsed(r))return!1;var o=n.Path.isBefore(t.anchor.path,r.anchor.path)?[t.anchor,r.anchor]:[r.anchor,t.anchor],a=w(o,2),i=a[0],l=a[1];if(0!==l.offset||!n.Path.equals(n.Path.next(i.path),l.path))return!1;var u=n.Node.get(e,i.path);return n.Node.isText(u)&&i.offset===u.text.length}(_,_.selection,R)&&n.Editor.rangeRef(_,_.selection);n.Transforms.select(_,R),M&&st.set(_,M)}}else p=!1}}if(d)return;if(p||e.preventDefault(),l&&n.Range.isExpanded(l)&&u.startsWith("delete")){var L=u.endsWith("Backward")?"backward":"forward";return void n.Editor.deleteFragment(_,{direction:L})}switch(u){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":n.Editor.deleteFragment(_);break;case"deleteContent":case"deleteContentForward":n.Editor.deleteForward(_);break;case"deleteContentBackward":n.Editor.deleteBackward(_);break;case"deleteEntireSoftLine":n.Editor.deleteBackward(_,{unit:"line"}),n.Editor.deleteForward(_,{unit:"line"});break;case"deleteHardLineBackward":n.Editor.deleteBackward(_,{unit:"block"});break;case"deleteSoftLineBackward":n.Editor.deleteBackward(_,{unit:"line"});break;case"deleteHardLineForward":n.Editor.deleteForward(_,{unit:"block"});break;case"deleteSoftLineForward":n.Editor.deleteForward(_,{unit:"line"});break;case"deleteWordBackward":n.Editor.deleteBackward(_,{unit:"word"});break;case"deleteWordForward":n.Editor.deleteForward(_,{unit:"word"});break;case"insertLineBreak":n.Editor.insertSoftBreak(_);break;case"insertParagraph":n.Editor.insertBreak(_);break;case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":"insertFromComposition"===u&&up.isComposing(_)&&(z(!1),ut.set(_,!1)),"DataTransfer"===(null==c?void 0:c.constructor.name)?up.insertData(_,c):"string"==typeof c&&(p?A.current.push((function(){return n.Editor.insertText(_,c)})):n.Editor.insertText(_,c))}var F=null===(i=st.get(_))||void 0===i?void 0:i.unref();st.delete(_),!F||_.selection&&n.Range.equals(_.selection,F)||n.Transforms.select(_,F)}}}),[_,X,s,K,ae,f]),le=t.useCallback((function(e){null==e?(re.cancel(),oe.cancel(),et.delete(_),rt.delete(_),F.current&&He&&F.current.removeEventListener("beforeinput",ie)):He&&e.addEventListener("beforeinput",ie),F.current=e,"function"==typeof r?r(e):r&&(r.current=e)}),[re,oe,_,ie,r]);pp((function(){var e=up.getWindow(_),t=function(e){var t=e.target,n=t instanceof HTMLElement?t:null,r=null==n?void 0:n.tagName;"INPUT"!==r&&"TEXTAREA"!==r&&(Z.pendingSelection=function(){var e=ne.current;if(Z.isUpdatingSelection||Z.isDraggingInternally||up.isComposing(_)||null!=e&&e.hasPendingChanges()||null!=e&&e.isFlushing()||Ye.get(_))return null;var t=Se(up.findDocumentOrShadowRoot(_));if(!t||!up.hasEditableTarget(_,t.anchorNode)&&!up.isTargetInsideNonReadonlyVoid(_,t.anchorNode)||!up.hasTarget(_,t.focusNode))return null;var n=up.toSlateRange(_,t,{exactMatch:!1,suppressThrow:!0});return n?{range:n,basedOn:_.selection}:null}(),oe())};e.document.addEventListener("selectionchange",t);var n=function(){Z.isDraggingInternally=!1};return e.document.addEventListener("dragend",n),e.document.addEventListener("drop",n),function(){e.document.removeEventListener("selectionchange",t),e.document.removeEventListener("dragend",n),e.document.removeEventListener("drop",n)}}),[_,oe,Z]);var ue=l([_,[]]),se=function(e){var n=t.useReducer((function(e){return e+1}),0),r=w(n,2)[1],o=t.useRef(new Set),a=t.useRef(!1),i=t.useRef(e);pp((function(){i.current=e,o.current.forEach((function(e){return e()})),a.current?r():a.current=!0}),[e]);var l=t.useCallback((function(e){return i.current(e)}),[]),u=t.useCallback((function(e){return o.current.add(e),function(){o.current.delete(e)}}),[]);return t.useMemo((function(){return{decorate:l,addEventListener:u}}),[l,u])}(l),de=c&&1===_.children.length&&1===Array.from(n.Node.texts(_)).length&&""===n.Node.string(_)&&!L,fe=t.useCallback((function(e){var t;e&&de?H(null===(t=e.getBoundingClientRect())||void 0===t?void 0:t.height):H(void 0)}),[de]);if(de){var pe=n.Editor.start(_,[]);ue.push(p(p(p(p(p({},yt,!0),"placeholder",c),"onPlaceholderResize",fe),"anchor",pe),"focus",pe))}var he,ye=_.marks;if(Z.hasMarkPlaceholder=!1,_.selection&&n.Range.isCollapsed(_.selection)&&ye){var be=_.selection.anchor,we=n.Node.leaf(_,be.path);we.text;var ke=u(we,Wv);if(!n.Text.equals(we,ye,{loose:!0})){Z.hasMarkPlaceholder=!0;var Ee=Object.fromEntries(Object.keys(ke).map((function(e){return[e,null]})));ue.push(qv(qv(qv(p({},bt,!0),Ee),ye),{},{anchor:be,focus:be}))}}return t.useEffect((function(){setTimeout((function(){var e=_.selection;if(e){var t=e.anchor,r=n.Node.leaf(_,t.path);if(ye&&!n.Text.equals(r,ye,{loose:!0}))return void ft.set(_,ye)}ft.delete(_)}))})),he=t.useContext(dv).flushDeferred,pp(he),t.createElement(sv.Provider,{value:f},t.createElement(jv.Provider,{value:L},t.createElement(Oh.Provider,{value:se},t.createElement(Bv,{node:F,receivedUserInput:Y},t.createElement(P,qv(qv({role:f?void 0:"textbox","aria-multiline":!f||void 0,translate:"no"},D),{},{spellCheck:!(!He&&Ve)&&D.spellCheck,autoCorrect:He||!Ve?D.autoCorrect:"false",autoCapitalize:He||!Ve?D.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!f,zindex:-1,suppressContentEditableWarning:!0,ref:le,style:qv(qv({},N?{}:qv({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},V?{minHeight:V}:{})),C),onBeforeInput:t.useCallback((function(e){if(!He&&!f&&!tg(e,D.onBeforeInput)&&up.hasSelectableTarget(_,e.target)&&(e.preventDefault(),!up.isComposing(_))){var t=e.data;n.Editor.insertText(_,t)}}),[D.onBeforeInput,_,f]),onInput:t.useCallback((function(e){if(up.hasEditableTarget(_,e.target)&&(K.pause(),!tg(e,D.onInput)))if(ne.current)ne.current.handleInput();else{var t,n=Uv(A.current);try{for(n.s();!(t=n.n()).done;){(0,t.value)()}}catch(e){n.e(e)}finally{n.f()}A.current=[],up.isFocused(_)||og(_,e.nativeEvent)}}),[D.onInput,_,K]),onBlur:t.useCallback((function(e){if(!f&&!Z.isUpdatingSelection&&up.hasSelectableTarget(_,e.target)&&!tg(e,D.onBlur)){var t=up.findDocumentOrShadowRoot(_);if(Z.latestElement!==t.activeElement){var r=e.relatedTarget;if(!(r===up.toDOMNode(_,_)||ge(r)&&r.hasAttribute("data-slate-spacer"))){if(null!=r&&me(r)&&up.hasDOMNode(_,r)){var o=up.toSlateNode(_,r);if(n.Node.isElement(o)&&!_.isVoid(o))return}if(ze){var a=Se(t);null==a||a.removeAllRanges()}lt.delete(_)}}}}),[f,Z.isUpdatingSelection,Z.latestElement,_,D.onBlur]),onClick:t.useCallback((function(e){if(up.hasTarget(_,e.target)&&ae(),up.hasTarget(_,e.target)&&!tg(e,D.onClick)&&me(e.target)){var t=up.toSlateNode(_,e.target),r=up.findPath(_,t);if(!n.Editor.hasPath(_,r)||n.Node.get(_,r)!==t)return;if(3===e.detail&&r.length>=1){var o=r;if(!n.Node.isElement(t)||!n.Editor.isBlock(_,t)){var a,i=n.Editor.above(_,{match:function(e){return n.Node.isElement(e)&&n.Editor.isBlock(_,e)},at:r});o=null!==(a=null==i?void 0:i[1])&&void 0!==a?a:r.slice(0,1)}var l=n.Editor.range(_,o);return void n.Transforms.select(_,l)}if(f)return;var u=n.Editor.start(_,r),s=n.Editor.end(_,r),c=n.Editor.void(_,{at:u}),d=n.Editor.void(_,{at:s}),p=_.selection&&n.Range.isCollapsed(_.selection)&&n.Editor.void(_,{at:_.selection.anchor});if(e.shiftKey&&p&&!n.Path.isAncestor(p[1],r)&&(!c||!n.Path.equals(c[1],p[1]))){var h=up.findEventRange(_,e),v=n.Editor.start(_,p[1]),g=n.Editor.end(_,p[1]),m=n.Point.isBefore(h.anchor,v)?g:v;return void n.Transforms.select(_,{anchor:m,focus:h.anchor})}if(c&&d&&n.Path.equals(c[1],d[1])){if(e.shiftKey&&_.selection){var y=_.selection.anchor,b=n.Point.isBefore(y,u)?s:u;return void n.Transforms.select(_,{anchor:y,focus:b})}var w=n.Editor.range(_,u);n.Transforms.select(_,w)}}}),[_,D.onClick,f,ae]),onCompositionEnd:t.useCallback((function(e){if(!ng(e)&&up.hasSelectableTarget(_,e.target)){var t;up.isComposing(_)&&Promise.resolve().then((function(){z(!1),ut.set(_,!1)})),null===(t=ne.current)||void 0===t||t.handleCompositionEnd(e);var r=$.current;if($.current=!1,tg(e,D.onCompositionEnd)||Me)return void K.clear();if(r&&!e.data&&(K.restore(),n.Editor.deleteFragment(_)),!ze&&!Ae&&!_e&&!Ue&&!We&&e.data){var o=ft.get(_);ft.delete(_),void 0!==o&&(pt.set(_,_.marks),_.marks=o),K.restore(),wv(_,e.data),n.Editor.insertText(_,e.data);var a=pt.get(_);pt.delete(_),void 0!==a&&(_.marks=a)}K.clear()}}),[D.onCompositionEnd,_,K]),onCompositionUpdate:t.useCallback((function(e){!up.hasSelectableTarget(_,e.target)||tg(e,D.onCompositionUpdate)||ng(e)||up.isComposing(_)||(z(!0),ut.set(_,!0))}),[D.onCompositionUpdate,_]),onCompositionStart:t.useCallback((function(e){if(!ng(e)&&up.hasSelectableTarget(_,e.target)){var t;if(null===(t=ne.current)||void 0===t||t.handleCompositionStart(e),tg(e,D.onCompositionStart)||Me)return;K.clear(),z(!0),ae();var r=_.selection;if(r&&n.Range.isExpanded(r))return Le&&!Ae?(K.observe(),void($.current=!0)):void n.Editor.deleteFragment(_)}}),[D.onCompositionStart,_,K,ae]),onCopy:t.useCallback((function(e){!up.hasSelectableTarget(_,e.target)||tg(e,D.onCopy)||ng(e)||(e.preventDefault(),up.setFragmentData(_,e.clipboardData,"copy"))}),[D.onCopy,_]),onCut:t.useCallback((function(e){if(!f&&up.hasSelectableTarget(_,e.target)&&!tg(e,D.onCut)&&!ng(e)){e.preventDefault(),Gv(_),up.setFragmentData(_,e.clipboardData,"cut");var t=_.selection;if(t)if(n.Range.isExpanded(t))Cv(_,t);else{var r=n.Node.parent(_,t.anchor.path);n.Editor.isVoid(_,r)&&n.Transforms.delete(_)}}}),[f,_,D.onCut]),onDragOver:t.useCallback((function(e){if(up.hasTarget(_,e.target)&&!tg(e,D.onDragOver)){var t=up.toSlateNode(_,e.target);n.Node.isElement(t)&&n.Editor.isVoid(_,t)&&e.preventDefault()}}),[D.onDragOver,_]),onDragStart:t.useCallback((function(e){if(!f&&up.hasTarget(_,e.target)&&!tg(e,D.onDragStart)){var t=up.toSlateNode(_,e.target),r=up.findPath(_,t);if(n.Node.isElement(t)&&n.Editor.isVoid(_,t)||n.Editor.void(_,{at:r,voids:!0})){var o=n.Editor.range(_,r);n.Transforms.select(_,o)}Gv(_),Z.isDraggingInternally=!0,up.setFragmentData(_,e.dataTransfer,"drag")}}),[f,_,D.onDragStart,Z]),onDrop:t.useCallback((function(e){if(!f&&up.hasTarget(_,e.target)&&!tg(e,D.onDrop)){e.preventDefault();var t=_.selection,r=up.findEventRange(_,e),o=e.dataTransfer;if(n.Transforms.select(_,r),Z.isDraggingInternally&&t){if(n.Range.includes(t,r.anchor))return;if(!n.Editor.void(_,{at:r,voids:!0})){var a=n.Editor.rangeRef(_,r);Cv(_,t);var i=a.unref();i&&n.Transforms.select(_,i)}}up.insertData(_,o),up.isFocused(_)||up.focus(_)}}),[f,_,D.onDrop,Z]),onDragEnd:t.useCallback((function(e){!f&&Z.isDraggingInternally&&D.onDragEnd&&up.hasTarget(_,e.target)&&D.onDragEnd(e)}),[f,Z,D,_]),onFocus:t.useCallback((function(e){if(!f&&!Z.isUpdatingSelection&&up.hasEditableTarget(_,e.target)&&!tg(e,D.onFocus)){var t=up.toDOMNode(_,_),n=up.findDocumentOrShadowRoot(_);if(Z.latestElement=n.activeElement,Le&&e.target!==t)return void t.focus();lt.set(_,!0)}}),[f,Z,_,D.onFocus]),onKeyDown:t.useCallback((function(e){if(!f&&up.hasEditableTarget(_,e.target)){var t;null===(t=ne.current)||void 0===t||t.handleKeyDown(e);var r=e.nativeEvent;if(up.isComposing(_)&&(!1===r.isComposing||Qv(_,r))&&(ut.set(_,!1),z(!1)),tg(e,D.onKeyDown)||up.isComposing(_))return;var o=_.selection,a=_.children[null!==o?o.focus.path[0]:0],i="rtl"===k(n.Node.string(a));if(Kt.isRedo(r)){e.preventDefault();var l=_;return void("function"==typeof l.redo&&l.redo())}if(Kt.isUndo(r)){e.preventDefault();var u=_;return void("function"==typeof u.undo&&u.undo())}if((Ie||ze)&&"ArrowUp"===r.key&&!r.altKey&&!r.ctrlKey&&!r.metaKey&&o&&(r.shiftKey||n.Range.isCollapsed(o))){var s=function(e,t){var r=n.Editor.above(e,{at:t,match:function(t){return n.Node.isElement(t)&&n.Editor.isBlock(e,t)}});if(!r)return null;var o=n.Editor.start(e,r[1]),a=n.Editor.before(e,o);return a&&n.Editor.leaf(e,a)[0].text.endsWith("\n")?!n.Point.equals(t,o)&&Math.abs(yv(e,t)-yv(e,o))>2?null:a:null}(_,o.focus);if(s)return e.preventDefault(),void n.Transforms.select(_,r.shiftKey?{anchor:o.anchor,focus:s}:s)}if(Kt.isMoveLineBackward(r))return e.preventDefault(),void n.Transforms.move(_,{unit:"line",reverse:!0});if(Kt.isMoveLineForward(r))return e.preventDefault(),void n.Transforms.move(_,{unit:"line"});if(Kt.isExtendLineBackward(r))return e.preventDefault(),void n.Transforms.move(_,{unit:"line",edge:"focus",reverse:!0});if(Kt.isExtendLineForward(r))return e.preventDefault(),void n.Transforms.move(_,{unit:"line",edge:"focus"});if(Kt.isMoveBackward(r))return e.preventDefault(),void(o&&n.Range.isCollapsed(o)?n.Transforms.move(_,{reverse:!i,unit:bv(_,o.focus,!i)}):n.Transforms.collapse(_,{edge:i?"end":"start"}));if(Kt.isMoveForward(r))return e.preventDefault(),void(o&&n.Range.isCollapsed(o)?n.Transforms.move(_,{reverse:i,unit:bv(_,o.focus,i)}):n.Transforms.collapse(_,{edge:i?"start":"end"}));if(Kt.isMoveWordBackward(r))return e.preventDefault(),o&&n.Range.isExpanded(o)&&n.Transforms.collapse(_,{edge:"focus"}),void n.Transforms.move(_,{unit:"word",reverse:!i});if(Kt.isMoveWordForward(r))return e.preventDefault(),o&&n.Range.isExpanded(o)&&n.Transforms.collapse(_,{edge:"focus"}),void n.Transforms.move(_,{unit:"word",reverse:i});if(He){if((Ie||ze)&&o&&(Kt.isDeleteBackward(r)||Kt.isDeleteForward(r))&&n.Range.isCollapsed(o)){var c=n.Node.parent(_,o.anchor.path);if(n.Node.isElement(c)&&n.Editor.isVoid(_,c)&&(n.Editor.isInline(_,c)||n.Editor.isBlock(_,c)))return e.preventDefault(),void(Kt.isDeleteForward(r)?n.Editor.deleteForward(_,{unit:"block"}):n.Editor.deleteBackward(_,{unit:"block"}))}if(ze&&o&&n.Range.isCollapsed(o)){if(Kt.isDeleteBackward(r)&&n.Editor.isStart(_,o.anchor,[]))return e.preventDefault(),void n.Editor.deleteBackward(_);if(Kt.isDeleteForward(r)&&n.Editor.isEnd(_,o.anchor,[]))return e.preventDefault(),void n.Editor.deleteForward(_)}}else{if(Kt.isBold(r)||Kt.isItalic(r)||Kt.isTransposeCharacter(r))return void e.preventDefault();if(Kt.isSoftBreak(r))return e.preventDefault(),void n.Editor.insertSoftBreak(_);if(Kt.isSplitBlock(r))return e.preventDefault(),void n.Editor.insertBreak(_);if(Kt.isDeleteBackward(r))return e.preventDefault(),void(o&&n.Range.isExpanded(o)?n.Editor.deleteFragment(_,{direction:"backward"}):n.Editor.deleteBackward(_));if(Kt.isDeleteForward(r))return e.preventDefault(),void(o&&n.Range.isExpanded(o)?n.Editor.deleteFragment(_,{direction:"forward"}):n.Editor.deleteForward(_));if(Kt.isDeleteLineBackward(r))return e.preventDefault(),void(o&&n.Range.isExpanded(o)?n.Editor.deleteFragment(_,{direction:"backward"}):n.Editor.deleteBackward(_,{unit:"line"}));if(Kt.isDeleteLineForward(r))return e.preventDefault(),void(o&&n.Range.isExpanded(o)?n.Editor.deleteFragment(_,{direction:"forward"}):n.Editor.deleteForward(_,{unit:"line"}));if(Kt.isDeleteWordBackward(r))return e.preventDefault(),void(o&&n.Range.isExpanded(o)?n.Editor.deleteFragment(_,{direction:"backward"}):n.Editor.deleteBackward(_,{unit:"word"}));if(Kt.isDeleteWordForward(r))return e.preventDefault(),void(o&&n.Range.isExpanded(o)?n.Editor.deleteFragment(_,{direction:"forward"}):n.Editor.deleteForward(_,{unit:"word"}))}}}),[f,_,D.onKeyDown]),onPaste:t.useCallback((function(e){f||!up.hasEditableTarget(_,e.target)||tg(e,D.onPaste)||(!He||(e=>e.clipboardData&&""!==e.clipboardData.getData("text/plain")&&1===e.clipboardData.types.length)(e.nativeEvent)||ze)&&(e.preventDefault(),up.insertData(_,e.clipboardData))}),[f,_,D.onPaste])}),t.createElement(Kv,{decorations:ue,node:_,renderElement:h,renderChunk:v,renderPlaceholder:b,renderLeaf:g,renderText:m}))))))})),Qv=function(e,t){var r=e.selection;return!!r&&n.Range.isCollapsed(r)&&(Kt.isDeleteBackward(t)||Kt.isDeleteForward(t))&&!!n.Editor.void(e,{at:r})},Xv=function(e){var t;return me(e)&&e.nodeType===e.TEXT_NODE&&!(null===(t=e.parentElement)||void 0===t||!t.closest("[data-slate-string], [data-slate-zero-width]"))},Yv=function(e,t,n){if(e.selection){var r=up.toDOMRange(e,e.selection);n.isUpdatingSelection=!0,t.setBaseAndExtent(r.startContainer,r.startOffset,r.endContainer,r.endOffset),setTimeout((function(){n.isUpdatingSelection=!1}))}},Gv=function(e){var t=e.selection;if(t&&n.Range.isExpanded(t)){var r=function(e,t){return Sv(e,t)?t:n.Editor.unhangRange(e,t)}(e,t);n.Range.equals(r,t)||n.Transforms.select(e,r)}},Jv=function(e){var n=e.attributes,r=e.children;return t.createElement("span",qv({},n),r,Me&&t.createElement("br",null))},Zv=function(){return[]},eg=function(e,t){var r=!!e.selection&&n.Range.isBackward(e.selection),o=t.cloneRange();if(o.collapse(r),o.getBoundingClientRect){var a=o.startContainer.parentElement,i=o.getBoundingClientRect();if(0===i.width&&0===i.height&&0===i.x&&0===i.y){var l=a.getBoundingClientRect();if(l.width>0||l.height>0)return}a.getBoundingClientRect=o.getBoundingClientRect.bind(o),ue(a,{scrollMode:"if-needed",block:"nearest",inline:"nearest"}),delete a.getBoundingClientRect}},tg=function(e,t){if(!t)return!1;var n=t(e);return null!=n?n:e.isDefaultPrevented()||e.isPropagationStopped()},ng=function(e){return me(e.target)&&(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)},rg=function(e,t){if(!t)return!1;var n=t(e);return null!=n?n:e.defaultPrevented},og=function(e,t){var n=e;"historyUndo"!==t.inputType||"function"!=typeof n.undo?"historyRedo"!==t.inputType||"function"!=typeof n.redo||n.redo():n.undo()},ag=t.createContext(!1),ig=parseInt(t.version.split(".")[0],10),lg=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],ug=function(e,t){return!e&&!t||!(!e||!t)&&n.Range.equals(e,t)},sg=new Set(["insert_node","move_node","remove_node","set_node"]);e.DefaultElement=Uh,e.DefaultLeaf=bh,e.DefaultPlaceholder=Jv,e.DefaultText=Mh,e.Editable=$v,e.NODE_TO_INDEX=Ge,e.NODE_TO_PARENT=Je,e.ReactEditor=up,e.Slate=function(e){var r=e.editor,o=e.children,a=e.onChange,i=e.onSelectionChange,l=e.onValueChange,s=e.initialValue,c=u(e,lg),d=t.useRef(null);if(d.current!==r){if(!n.Editor.isEditor(r))throw new Error("[Slate] editor is invalid! You passed: ".concat(n.Scrubber.stringify(r)));if(void 0===s&&0===r.children.length)throw new Error("[Slate] editor.children is empty and no initialValue was provided. If this is intentional, pass initialValue={[]} to the Slate component.");var f=null!=s?s:r.children;if(!n.Node.isNodeList(f))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(n.Scrubber.stringify(f)));var p=void 0===s?f:f.map(It),h=p.every((function(e,t){return e===f[t]}))?f:p;r.children=h.length>0?h:[{children:[{text:""}]}],Object.assign(r,c),d.current=r}var v=function(){var e=t.useRef(new Set),n=t.useRef(new Set),r=t.useCallback((function(){e.current.forEach((function(e){return e()}))}),[]),o=t.useCallback((function(){n.current.forEach((function(e){return e()})),n.current.clear()}),[]),a=t.useCallback((function(t){var r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).deferred,o=void 0!==r&&r?function(){return n.current.add(t)}:t;return e.current.add(o),function(){e.current.delete(o)}}),[]);return{selectorContext:t.useMemo((function(){return{addEventListener:a,flushDeferred:o}}),[a,o]),onChange:r}}(),g=v.selectorContext,m=v.onChange,y=t.useCallback((function(){a&&a(r.children),i&&r.operations.find((function(e){return"set_selection"===e.type}))&&i(r.selection),l&&r.operations.find((function(e){return"set_selection"!==e.type}))&&l(r.children),m()}),[r,m,a,i,l]);t.useEffect((function(){return ct.set(r,y),function(){ct.set(r,(function(){}))}}),[r,y]);var b=t.useState(up.isFocused(r)),k=w(b,2),E=k[0],x=k[1];return t.useEffect((function(){x(up.isFocused(r))}),[r]),pp((function(){var e=function(){return x(up.isFocused(r))};return ig>=17?(document.addEventListener("focusin",e),document.addEventListener("focusout",e),function(){document.removeEventListener("focusin",e),document.removeEventListener("focusout",e)}):(document.addEventListener("focus",e,!0),document.addEventListener("blur",e,!0),function(){document.removeEventListener("focus",e,!0),document.removeEventListener("blur",e,!0)})}),[r]),t.createElement(dv.Provider,{value:g},t.createElement(se.Provider,{value:r},t.createElement(ag.Provider,{value:E},o)))},e.defaultScrollSelectionIntoView=eg,e.useComposing=function(){return t.useContext(jv)},e.useEditor=function(){var e=t.useContext(se);if(!e)throw new Error("The `useEditor` hook must be used inside the <Slate> component's context.");return e},e.useElement=function(){var e=t.useContext(av);if(!e)throw new Error("The `useElement` hook must be used inside `renderElement`.");return e},e.useElementIf=iv,e.useFocused=function(){return t.useContext(ag)},e.useReadOnly=cv,e.useSelected=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.suppressThrow,o=void 0!==r&&r,a=iv();if(!a)return!1;var i=t.useCallback((function(e){if(!e.selection)return!1;try{var t=up.findPath(e,a),r=n.Editor.range(e,t);return!!n.Range.intersection(r,e.selection)}catch(e){if(o)return!1;throw e}}),[a,o]);return pv(i,void 0,{deferred:!0})},e.useSlate=hv,e.useSlateSelection=function(){return pv((function(e){return e.selection}),ug)},e.useSlateSelector=pv,e.useSlateStatic=ce,e.useSlateWithV=function(){var e=hv(),n=t.useMemo((function(){return function(e){var t=vv.get(e);if(t)return t;t={current:0},vv.set(e,t);var n=e.onChange;return e.onChange=function(e){t.current++,n(e)},t}(e)}),[e]);return{editor:e,v:n.current}},e.withReact=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x-slate-fragment",r=e,o=r=At(r,t),a=o.onChange,i=o.apply,l=o.insertText;return r.getChunkSize=function(){return null},Me&&(r.insertText=function(e,t){return gt.delete(r),l(e,t)}),r.onChange=function(e){(ig<18?lp.unstable_batchedUpdates:function(e){return e()})((function(){a(e)}))},r.apply=function(e){var t;Me&&sg.has(e.type)&&(null===(t=dp.get(r))||void 0===t||t());if("move_node"===e.type){var o=n.Node.parent(r,e.path);if(!!r.getChunkSize(o)){var a=n.Node.get(r,e.path),l=Zh(r,o),u=up.findKey(r,a);l.movedNodeKeys.add(u)}}i(e)},r}}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("slate")):"function"==typeof define&&define.amd?define(["exports","react","slate"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).SlateReact={},e.React,e.Slate)}(this,(function(e,t,n){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function a(e,t){return e(t={exports:{}},t.exports),t.exports}var i=a((function(e){e.exports=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n},e.exports.__esModule=!0,e.exports.default=e.exports}));o(i);var l=a((function(e){e.exports=function(e,t){if(null==e)return{};var n,r,o=i(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},e.exports.__esModule=!0,e.exports.default=e.exports})),u=o(l),s=a((function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}));o(s);var c=a((function(e){var t=s.default;e.exports=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports}));o(c);var d=a((function(e){var t=s.default;e.exports=function(e){var n=c(e,"string");return"symbol"==t(n)?n:n+""},e.exports.__esModule=!0,e.exports.default=e.exports}));o(d);var f=a((function(e){e.exports=function(e,t,n){return(t=d(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports})),p=o(f),h=a((function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports}));o(h);var v=a((function(e){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],u=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}},e.exports.__esModule=!0,e.exports.default=e.exports}));o(v);var g=a((function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports}));o(g);var m=a((function(e){e.exports=function(e,t){if(e){if("string"==typeof e)return g(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}));o(m);var y=a((function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports}));o(y);var b=a((function(e){e.exports=function(e,t){return h(e)||v(e,t)||m(e,t)||y()},e.exports.__esModule=!0,e.exports.default=e.exports})),w=o(b),k=function(e){if(e=String(e||""),S.test(e))return"rtl";if(C.test(e))return"ltr";return"neutral"},E="֑-߿יִ-﷽ﹰ-ﻼ",x="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",S=new RegExp("^[^"+x+"]*["+E+"]"),C=new RegExp("^[^"+E+"]*["+x+"]");var O=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},P="object"==typeof r&&r&&r.Object===Object&&r,T="object"==typeof self&&self&&self.Object===Object&&self,N=P||T||Function("return this")(),D=function(){return N.Date.now()},_=/\s/;var R=function(e){for(var t=e.length;t--&&_.test(e.charAt(t)););return t},M=/^\s+/;var L=function(e){return e?e.slice(0,R(e)+1).replace(M,""):e},z=N.Symbol,F=Object.prototype,I=F.hasOwnProperty,j=F.toString,B=z?z.toStringTag:void 0;var A=function(e){var t=I.call(e,B),n=e[B];try{e[B]=void 0;var r=!0}catch(e){}var o=j.call(e);return r&&(t?e[B]=n:delete e[B]),o},W=Object.prototype.toString;var U=function(e){return W.call(e)},V=z?z.toStringTag:void 0;var H=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":V&&V in Object(e)?A(e):U(e)};var q=function(e){return null!=e&&"object"==typeof e};var K=function(e){return"symbol"==typeof e||q(e)&&"[object Symbol]"==H(e)},$=/^[-+]0x[0-9a-f]+$/i,Q=/^0b[01]+$/i,X=/^0o[0-7]+$/i,Y=parseInt;var G=function(e){if("number"==typeof e)return e;if(K(e))return NaN;if(O(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=O(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=L(e);var n=Q.test(e);return n||X.test(e)?Y(e.slice(2),n?2:8):$.test(e)?NaN:+e},J=Math.max,Z=Math.min;var ee=function(e,t,n){var r,o,a,i,l,u,s=0,c=!1,d=!1,f=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=r,a=o;return r=o=void 0,s=t,i=e.apply(a,n)}function h(e){return s=e,l=setTimeout(g,t),c?p(e):i}function v(e){var n=e-u;return void 0===u||n>=t||n<0||d&&e-s>=a}function g(){var e=D();if(v(e))return m(e);l=setTimeout(g,function(e){var n=t-(e-u);return d?Z(n,a-(e-s)):n}(e))}function m(e){return l=void 0,f&&r?p(e):(r=o=void 0,i)}function y(){var e=D(),n=v(e);if(r=arguments,o=this,u=e,n){if(void 0===l)return h(u);if(d)return clearTimeout(l),l=setTimeout(g,t),p(u)}return void 0===l&&(l=setTimeout(g,t)),i}return t=G(t)||0,O(n)&&(c=!!n.leading,a=(d="maxWait"in n)?J(G(n.maxWait)||0,t):a,f="trailing"in n?!!n.trailing:f),y.cancel=function(){void 0!==l&&clearTimeout(l),s=0,r=u=o=l=void 0},y.flush=function(){return void 0===l?i:m(D())},y};var te=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return O(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),ee(e,t,{leading:r,maxWait:t,trailing:o})};const ne=e=>"object"==typeof e&&null!=e&&1===e.nodeType,re=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,oe=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return re(n.overflowY,t)||re(n.overflowX,t)||(e=>{const t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},ae=(e,t,n,r,o,a,i,l)=>a<e&&i>t||a>e&&i<t?0:a<=e&&l<=n||i>=t&&l>=n?a-e-r:i>t&&l<n||a<e&&l>n?i-t+o:0,ie=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t},le=(e,t)=>{var n,r,o,a;if("undefined"==typeof document)return[];const{scrollMode:i,block:l,inline:u,boundary:s,skipOverflowHiddenElements:c}=t,d="function"==typeof s?s:e=>e!==s;if(!ne(e))throw new TypeError("Invalid target");const f=document.scrollingElement||document.documentElement,p=[];let h=e;for(;ne(h)&&d(h);){if(h=ie(h),h===f){p.push(h);break}null!=h&&h===document.body&&oe(h)&&!oe(document.documentElement)||null!=h&&oe(h,c)&&p.push(h)}const v=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,g=null!=(a=null==(o=window.visualViewport)?void 0:o.height)?a:innerHeight,{scrollX:m,scrollY:y}=window,{height:b,width:w,top:k,right:E,bottom:x,left:S}=e.getBoundingClientRect(),{top:C,right:O,bottom:P,left:T}=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);let N="start"===l||"nearest"===l?k-C:"end"===l?x+P:k+b/2-C+P,D="center"===u?S+w/2-T+O:"end"===u?E+O:S-T;const _=[];for(let e=0;e<p.length;e++){const t=p[e],{height:n,width:r,top:o,right:a,bottom:s,left:c}=t.getBoundingClientRect();if("if-needed"===i&&k>=0&&S>=0&&x<=g&&E<=v&&k>=o&&x<=s&&S>=c&&E<=a)return _;const d=getComputedStyle(t),h=parseInt(d.borderLeftWidth,10),C=parseInt(d.borderTopWidth,10),O=parseInt(d.borderRightWidth,10),P=parseInt(d.borderBottomWidth,10);let T=0,R=0;const M="offsetWidth"in t?t.offsetWidth-t.clientWidth-h-O:0,L="offsetHeight"in t?t.offsetHeight-t.clientHeight-C-P:0,z="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,F="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(f===t)T="start"===l?N:"end"===l?N-g:"nearest"===l?ae(y,y+g,g,C,P,y+N,y+N+b,b):N-g/2,R="start"===u?D:"center"===u?D-v/2:"end"===u?D-v:ae(m,m+v,v,h,O,m+D,m+D+w,w),T=Math.max(0,T+y),R=Math.max(0,R+m);else{T="start"===l?N-o-C:"end"===l?N-s+P+L:"nearest"===l?ae(o,s,n,C,P+L,N,N+b,b):N-(o+n/2)+L/2,R="start"===u?D-c-h:"center"===u?D-(c+r/2)+M/2:"end"===u?D-a+O+M:ae(c,a,r,h,O+M,D,D+w,w);const{scrollLeft:e,scrollTop:i}=t;T=0===F?0:Math.max(0,Math.min(i+T/F,t.scrollHeight-n/F+L)),R=0===z?0:Math.max(0,Math.min(e+R/z,t.scrollWidth-r/z+M)),N+=i-T,D+=e-R}_.push({el:t,top:T,left:R})}return _};function ue(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;const n=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if((e=>"object"==typeof e&&"function"==typeof e.behavior)(t))return t.behavior(le(e,t));const r="boolean"==typeof t||null==t?void 0:t.behavior;for(const{el:o,top:a,left:i}of le(e,(e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"})(t))){const e=a-n.top+n.bottom,t=i-n.left+n.right;o.scroll({top:e,left:t,behavior:r})}}var se=t.createContext(null),ce=function(){var e=t.useContext(se);if(!e)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return e},de=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});for(var n="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),r={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},o={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:n?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},a={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},i=1;i<20;i++)a["f"+i]=111+i;function l(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map((function(e){return u(e,t)})),o=function(e){return r.some((function(t){return s(t,e)}))};return null==n?o:o(n)}function u(e,t){var n=t&&t.byKey,i={},l=(e=e.replace("++","+add")).split("+"),u=l.length;for(var s in r)i[r[s]]=!1;var f=!0,p=!1,h=void 0;try{for(var v,g=l[Symbol.iterator]();!(f=(v=g.next()).done);f=!0){var m=v.value,y=m.endsWith("?")&&m.length>1;y&&(m=m.slice(0,-1));var b=d(m),w=r[b];if(m.length>1&&!w&&!o[m]&&!a[b])throw new TypeError('Unknown modifier: "'+m+'"');1!==u&&w||(n?i.key=b:i.which=c(m)),w&&(i[w]=!y||null)}}catch(e){p=!0,h=e}finally{try{!f&&g.return&&g.return()}finally{if(p)throw h}}return i}function s(e,t){for(var n in e){var r=e[n],o=void 0;if(null!=r&&((null!=(o="key"===n&&null!=t.key?t.key.toLowerCase():"which"===n?91===r&&93===t.which?91:t.which:t[n])||!1!==r)&&o!==r))return!1}return!0}function c(e){return e=d(e),a[e]||e.toUpperCase().charCodeAt(0)}function d(e){return e=e.toLowerCase(),e=o[e]||e}t.default=l,t.isHotkey=l,t.isCodeHotkey=function(e,t){return l(e,t)},t.isKeyHotkey=function(e,t){return l(e,{byKey:!0},t)},t.parseHotkey=u,t.compareHotkey=s,t.toKeyCode=c,t.toKeyName=d}));o(de);var fe=de.isHotkey;function pe(e){return pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pe(e)}function he(e){var t=function(e,t){if("object"!=pe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=pe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==pe(t)?t:t+""}function ve(e,t,n){return(t=he(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}de.isCodeHotkey,de.isKeyHotkey,de.parseHotkey,de.compareHotkey,de.toKeyCode,de.toKeyName;var ge=globalThis.Node,me=globalThis.Text;const ye=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,be=e=>we(e)&&1===e.nodeType,we=e=>{const t=ye(e);return!!t&&e instanceof t.Node},ke=e=>{const t=e&&e.anchorNode&&ye(e.anchorNode);return!!t&&e instanceof t.Selection},Ee=e=>we(e)&&3===e.nodeType,xe=(e,t,n)=>{if("number"!=typeof t)throw new Error("Expected index to be a number");const{childNodes:r}=e;let o=r[t],a=t,i=!1,l=!1;for(;(we(u=o)&&8===u.nodeType||be(o)&&0===o.childNodes.length||be(o)&&"false"===o.getAttribute("contenteditable"))&&(!i||!l);)a>=r.length?(i=!0,a=t-1,n="backward"):a<0?(l=!0,a=t+1,n="forward"):(o=r[a],t=a,a+="forward"===n?1:-1);var u;return[o,t]},Se=(e,t,n)=>{const[r]=xe(e,t,n);return r},Ce=e=>{let t="";if(Ee(e)&&e.nodeValue)return e.nodeValue;if(be(e)){var n;if(e.hasAttribute("data-slate-spacer"))return t;if("BR"===e.tagName&&"n"===(null===(n=e.parentElement)||void 0===n?void 0:n.getAttribute("data-slate-zero-width")))return t;for(const n of Array.from(e.childNodes))t+=Ce(n);const r=getComputedStyle(e).getPropertyValue("display"),o="block"===r||"list"===r,a=!!e.closest('[data-slate-inline="true"]');("BR"===e.tagName||o&&!a)&&(t+="\n")}return t},Oe=/<[^>]*\sdata-slate-fragment="([^"]+)"/m,Pe=e=>null!=e.getSelection?e.getSelection():document.getSelection(),Te=(e,t,n)=>{const{target:r}=t;if(be(r)&&r.matches('[contentEditable="false"]'))return!1;const{document:o}=Et.getWindow(e);if(_e(o,r))return Et.hasDOMNode(e,r,{editable:!0});const a=n.find((({addedNodes:e,removedNodes:t})=>{for(const t of e)if(t===r||_e(t,r))return!0;for(const e of t)if(e===r||_e(e,r))return!0}));return!(!a||a===t)&&Te(e,a,n)},Ne=(e,t)=>Boolean(e.compareDocumentPosition(t)&ge.DOCUMENT_POSITION_PRECEDING),De=(e,t)=>{if(!e)return null;let n=e;for(;n;){if(n.matches&&n.matches(t))return n;if(n.parentElement)n=n.parentElement;else{if(!n.parentNode||!("host"in n.parentNode))return null;n=n.parentNode.host}}return null},_e=(e,t)=>{if(!e||!t)return!1;if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;if(!n.parentNode)return!1;n="host"in n.parentNode?n.parentNode.host:n.parentNode}return!1};var Re,Me;const Le="undefined"!=typeof navigator&&"undefined"!=typeof window&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,ze="undefined"!=typeof navigator&&/Mac OS X/.test(navigator.userAgent),Fe="undefined"!=typeof navigator&&/Android/.test(navigator.userAgent),Ie="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),je="undefined"!=typeof navigator&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),Be="undefined"!=typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Ae="undefined"!=typeof navigator&&/Chrome/i.test(navigator.userAgent),We="undefined"!=typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),Ue=Fe&&"undefined"!=typeof navigator&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),Ve="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),He="undefined"!=typeof navigator&&/.*UCBrowser/.test(navigator.userAgent),qe="undefined"!=typeof navigator&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent)&&(!Ae||We),Ke=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement);"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&null!==(Re=navigator.userAgent.match(/Version\/(\d+)/))&&void 0!==Re&&Re[1]&&parseInt(null===(Me=navigator.userAgent.match(/Version\/(\d+)/))||void 0===Me?void 0:Me[1],10);const $e=(!We||!Ue)&&!Be&&"undefined"!=typeof globalThis&&globalThis.InputEvent&&"function"==typeof globalThis.InputEvent.prototype.getTargetRanges;let Qe=0;class Xe{constructor(){ve(this,"id",void 0),this.id=""+Qe++}}const Ye=new WeakMap,Ge=new WeakMap,Je=new WeakMap,Ze=new WeakMap,et=new WeakMap,tt=new WeakMap,nt=new WeakMap,rt=new WeakMap,ot=new WeakMap,at=new WeakMap,it=new WeakMap,lt=new WeakMap,ut=new WeakMap,st=new WeakMap,ct=new WeakMap,dt=new WeakMap,ft=new WeakMap,pt=new WeakMap,ht=new WeakMap,vt=new WeakMap,gt=new WeakMap,mt=new WeakMap,yt=Symbol("placeholder"),bt=Symbol("mark-placeholder");function wt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wt(Object(n),!0).forEach((function(t){ve(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Et={androidPendingDiffs:e=>ht.get(e),androidScheduleFlush:e=>{var t;null===(t=dt.get(e))||void 0===t||t()},blur:e=>{const t=Et.toDOMNode(e,e),n=Et.findDocumentOrShadowRoot(e);lt.set(e,!1),n.activeElement===t&&t.blur()},deselect:e=>{const{selection:t}=e,r=Et.findDocumentOrShadowRoot(e),o=Pe(r);o&&o.rangeCount>0&&o.removeAllRanges(),t&&n.Transforms.deselect(e)},findDocumentOrShadowRoot:e=>{const t=Et.toDOMNode(e,e),n=t.getRootNode();return n instanceof Document||n instanceof ShadowRoot?n:t.ownerDocument},findEventRange:(e,t)=>{"nativeEvent"in t&&(t=t.nativeEvent);const{clientX:r,clientY:o,target:a}=t;if(null==r||null==o)throw new Error(`Cannot resolve a Slate range from a DOM event: ${t}`);const i=Et.toSlateNode(e,t.target),l=Et.findPath(e,i);if(n.Node.isElement(i)&&n.Editor.isVoid(e,i)){const t=a.getBoundingClientRect(),u=e.isInline(i)?r-t.left<t.left+t.width-r:o-t.top<t.top+t.height-o,s=n.Editor.point(e,l,{edge:u?"start":"end"}),c=u?n.Editor.before(e,s):n.Editor.after(e,s);if(c){return n.Editor.range(e,c)}}let u;const{document:s}=Et.getWindow(e),c=Et.findDocumentOrShadowRoot(e),d=c===s?null:c,f=e=>{if(!e)return null;const t=s.createRange();return t.setStart(e.offsetNode,e.offset),t.setEnd(e.offsetNode,e.offset),t};if(u=d&&s.caretPositionFromPoint?f(s.caretPositionFromPoint(r,o,{shadowRoots:[d]})):s.caretRangeFromPoint?s.caretRangeFromPoint(r,o):f(s.caretPositionFromPoint(r,o)),!u)throw new Error(`Cannot resolve a Slate range from a DOM event: ${t}`);return Et.toSlateRange(e,u,{exactMatch:!1,suppressThrow:!1})},findKey:(e,t)=>{let n=ot.get(t);return n||(n=new Xe,ot.set(t,n)),n},findPath:(e,t)=>{const r=[];let o=t;for(;;){const t=Je.get(o);if(null==t){if(o===e)return r;break}const n=Ge.get(o);if(null==n||t.children[n]!==o)break;r.unshift(n),o=t}for(const[r,o]of n.Node.nodes(e))if(r===t)return o;throw new Error(`Unable to find the path for Slate node: ${n.Scrubber.stringify(t)}`)},focus:(e,t={retries:5})=>{if(lt.get(e))return;if(!Et.isMounted(e))return;if(t.retries<=0)throw new Error("Could not set focus, editor seems stuck with pending operations");if(e.operations.length>0)return void setTimeout((()=>{Et.focus(e,{retries:t.retries-1})}),10);const r=Et.toDOMNode(e,e),o=Et.findDocumentOrShadowRoot(e);if(o.activeElement!==r){const t=e.selection&&o instanceof Document?Et.toDOMRange(e,e.selection):null;if(e.selection||n.Transforms.select(e,n.Editor.start(e,[])),lt.set(e,!0),r.focus({preventScroll:!0}),t){const e=Pe(o);null==e||e.removeAllRanges(),null==e||e.addRange(t)}}},getWindow:e=>{const t=Ze.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},hasDOMNode:(e,t,n={})=>{const{editable:r=!1}=n;if(!Et.isMounted(e))return!1;const o=Et.toDOMNode(e,e);let a;try{a=be(t)?t:t.parentElement}catch(e){if(e instanceof Error&&!e.message.includes('Permission denied to access property "nodeType"'))throw e}if(!a||De(a,"[data-slate-editor]")!==o)return!1;const i=De(a,'[contenteditable="true" i], [contenteditable=""], [contenteditable="plaintext-only" i]'),l=i&&i!==o?De(i,'[contenteditable="false" i]'):null;if(l&&l!==o&&De(l,"[data-slate-editor]")===o){var u;const e=null!==(u=De(a,'[data-slate-node="text"]'))&&void 0!==u?u:null==i?void 0:i.querySelector('[data-slate-node="text"]');if(!e||null==i||!i.contains(e)||De(e,"[data-slate-editor]")!==o)return!1}return!(r&&!a.isContentEditable)||("boolean"==typeof a.isContentEditable&&De(a,'[contenteditable="false"]')===o||!!a.getAttribute("data-slate-zero-width"))},hasEditableTarget:(e,t)=>we(t)&&Et.hasDOMNode(e,t,{editable:!0}),hasRange:(e,t)=>{if("function"==typeof e.hasRange)return e.hasRange(t);const{anchor:r,focus:o}=t;return n.Editor.hasPath(e,r.path)&&n.Editor.hasPath(e,o.path)},hasSelectableTarget:(e,t)=>Et.hasEditableTarget(e,t)||Et.isTargetInsideNonReadonlyVoid(e,t),hasTarget:(e,t)=>we(t)&&Et.hasDOMNode(e,t),insertData:(e,t)=>{e.insertData(t)},insertFragmentData:(e,t)=>e.insertFragmentData(t),insertTextData:(e,t)=>e.insertTextData(t),isComposing:e=>!!ut.get(e),getWord:(e,t={})=>{var r,o;if("function"!=typeof n.Editor.word)throw new Error("DOMEditor.getWord needs slate 0.136.0 or later");const a=Et.isComposing(e)?St(e):void 0,i=null!==(r=null==a?void 0:a.view)&&void 0!==r?r:e,l=n.Editor.word(i,kt(kt({},t),{},{at:null!==(o=t.at)&&void 0!==o?o:null==a?void 0:a.point}));return l&&{range:l,text:n.Editor.string(i,l)}},isFocused:e=>!!lt.get(e),isMounted:e=>!!et.get(e),isReadOnly:e=>!!it.get(e),isTargetInsideNonReadonlyVoid:(e,t)=>{if(it.get(e))return!1;if(!Et.hasTarget(e,t))return!1;const r=Et.toSlateNode(e,t);return n.Node.isElement(r)&&n.Editor.isVoid(e,r)},setFragmentData:(e,t,n)=>e.setFragmentData(t,n),toDOMNode:(e,t)=>{var r;const o=t===e?et.get(e):null===(r=at.get(e))||void 0===r?void 0:r.get(Et.findKey(e,t));if(!o)throw new Error(`Cannot resolve a DOM node from Slate node: ${n.Scrubber.stringify(t)}`);return o},toDOMPoint:(e,t)=>{const[r]=n.Editor.node(e,t.path),o=Et.toDOMNode(e,r);let a;n.Editor.void(e,{at:t})&&(t={path:t.path,offset:0});const i=Array.from(o.querySelectorAll("[data-slate-string], [data-slate-zero-width]"));let l=0;for(let e=0;e<i.length;e++){const n=i[e],r=n.childNodes[0];if(null==r||null==r.textContent)continue;const{length:o}=r.textContent,s=n.getAttribute("data-slate-length"),c=l+(null==s?o:parseInt(s,10)),d=i[e+1];if(t.offset===c&&null!=d&&d.hasAttribute("data-slate-mark-placeholder")){var u;const e=d.childNodes[0];a=[e instanceof me?e:d,null!==(u=d.textContent)&&void 0!==u&&u.startsWith("\ufeff")?1:0];break}if(t.offset<=c){const e=Math.min(o,Math.max(0,t.offset-l));a=e===o&&n.hasAttribute("data-slate-trailing")?[n.lastChild,0]:[r,e];break}l=c}if(!a)throw new Error(`Cannot resolve a DOM point from Slate point: ${n.Scrubber.stringify(t)}`);return a},toDOMRange:(e,t)=>{const{anchor:r,focus:o}=t,a=n.Range.isBackward(t),i=Et.toDOMPoint(e,r),l=n.Range.isCollapsed(t)?i:Et.toDOMPoint(e,o),u=Et.getWindow(e).document.createRange(),[s,c]=a?l:i,[d,f]=a?i:l,p=!!(be(s)?s:s.parentElement).getAttribute("data-slate-zero-width"),h=!!(be(d)?d:d.parentElement).getAttribute("data-slate-zero-width");return u.setStart(s,p?1:c),u.setEnd(d,h?1:f),u},toSlateNode:(e,t)=>{let n=be(t)?t:t.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));const r=n?nt.get(n):null;if(!r)throw new Error(`Cannot resolve a Slate node from DOM node: ${n}`);return r},toSlatePoint:(e,t,r)=>{const{exactMatch:o,suppressThrow:a}=r,[i,l]=o?t:(e=>{let[t,n]=e;if(be(t)&&t.childNodes.length){let e=n===t.childNodes.length,r=e?n-1:n;for([t,r]=xe(t,r,e?"backward":"forward"),e=r<n;be(t)&&t.childNodes.length;){const n=e?t.childNodes.length-1:0;t=Se(t,n,e?"backward":"forward")}n=e&&null!=t.textContent?t.textContent.length:0}return[t,n]})(t),u=i.parentNode;let s,c,d=r.searchDirection,f=null,p=0;if(u){var h,v;const t=Et.toDOMNode(e,e),n=u.closest('[data-slate-void="true"]'),r=n&&_e(t,n)?n:null,a=u.closest('[contenteditable="false"]'),s=a&&_e(t,a)?a:null;let c=u.closest("[data-slate-leaf]"),y=null;if(c){if(f=c.closest('[data-slate-node="text"]'),f){const t=Et.getWindow(e).document.createRange();t.setStart(f,0),t.setEnd(i,u.hasAttribute("data-slate-trailing")&&i===u.lastChild&&"\n"===i.textContent?0:l);const n=t.cloneContents();[...Array.prototype.slice.call(n.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(n.querySelectorAll("[contenteditable=false]"))].forEach((e=>{Fe&&!o&&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)})),p=n.textContent.length,y=f}}else if(r){const t=r.querySelectorAll("[data-slate-leaf]");for(let n=0;n<t.length;n++){const r=t[n];if(Et.hasDOMNode(e,r)){c=r;break}}c?(f=c.closest('[data-slate-node="text"]'),y=c,p=y.textContent.length,y.querySelectorAll("[data-slate-zero-width]").forEach((e=>{p-=e.textContent.length}))):p=1}else if(s){const e=e=>e?e.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],t=s.closest('[data-slate-node="element"]');if("backward"===d||!d){var g;c=null!==(g=[...e(null==t?void 0:t.previousElementSibling),...e(t)].findLast((e=>Ne(s,e))))&&void 0!==g?g:null,c&&(d="backward")}if("forward"===d||!d){var m;c=null!==(m=[...e(t),...e(null==t?void 0:t.nextElementSibling)].find((e=>{return t=e,Boolean(s.compareDocumentPosition(t)&ge.DOCUMENT_POSITION_FOLLOWING);var t})))&&void 0!==m?m:null,c&&(d="forward")}c&&(f=c.closest('[data-slate-node="text"]'),y=c,"forward"===d?p=0:(p=y.textContent.length,y.querySelectorAll("[data-slate-zero-width]").forEach((e=>{p-=e.textContent.length}))))}y&&p===y.textContent.length&&Fe&&"z"===y.getAttribute("data-slate-zero-width")&&null!==(h=y.textContent)&&void 0!==h&&h.startsWith("\ufeff")&&(u.hasAttribute("data-slate-zero-width")||Ie&&null!==(v=y.textContent)&&void 0!==v&&v.endsWith("\n\n"))&&p--}if(Fe&&!f&&!o){const t=u.hasAttribute("data-slate-node")?u:u.closest("[data-slate-node]");if(t&&Et.hasDOMNode(e,t,{editable:!0})){const r=Et.toSlateNode(e,t);let o;try{o=Et.findPath(e,r)}catch(e){if(a)return null;throw e}let{path:i,offset:u}=n.Editor.start(e,o);return t.querySelector("[data-slate-leaf]")||(u=l),{path:i,offset:u}}}if(!f){if(a)return null;throw new Error(`Cannot resolve a Slate point from DOM point: ${t}`)}try{s=Et.toSlateNode(e,f)}catch(e){if(a)return null;throw e}try{c=Et.findPath(e,s)}catch(e){if(a)return null;throw e}return{path:c,offset:p}},toSlateRange:(e,t,r)=>{var o,a;const{exactMatch:i,suppressThrow:l}=r;let u,s,c,d,f;if(ke(t)?t.anchorNode:t.startContainer)if(ke(t)){if(Ie&&t.rangeCount>1){c=t.focusNode;const m=t.getRangeAt(0),y=t.getRangeAt(t.rangeCount-1);if(c instanceof HTMLTableRowElement&&m.startContainer instanceof HTMLTableRowElement&&y.startContainer instanceof HTMLTableRowElement){function b(e){return e.childElementCount>0?b(e.children[0]):e}const w=m.startContainer,k=y.startContainer,E=b(w.children[m.startOffset]),x=b(k.children[y.startOffset]);d=0,u=x.childNodes.length>0?x.childNodes[0]:x,c=E.childNodes.length>0?E.childNodes[0]:E,s=x instanceof HTMLElement?x.innerHTML.length:0}else m.startContainer===c?(u=y.endContainer,s=y.endOffset,d=m.startOffset):(u=m.startContainer,s=m.endOffset,d=y.startOffset)}else u=t.anchorNode,s=t.anchorOffset,c=t.focusNode,d=t.focusOffset;f=Ae&&(e=>{let t=e&&e.parentNode;for(;t;){if("[object ShadowRoot]"===t.toString())return!0;t=t.parentNode}return!1})(u)||Ie?t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:t.isCollapsed}else u=t.startContainer,s=t.startOffset,c=t.endContainer,d=t.endOffset,f=t.collapsed;if(null==u||null==c||null==s||null==d)throw new Error(`Cannot resolve a Slate range from DOM range: ${t}`);!Ie||null!==(o=c.parentElement)&&void 0!==o&&o.hasAttribute("data-slate-trailing")||null===(a=c.textContent)||void 0===a||!a.endsWith("\n\n")||d!==c.textContent.length||d--;const p=Et.toSlatePoint(e,[u,s],{exactMatch:i,suppressThrow:l});if(!p)return null;const h=Ne(u,c)||u===c&&d<s,v=f?p:Et.toSlatePoint(e,[c,d],{exactMatch:i,suppressThrow:l,searchDirection:h?"forward":"backward"});if(!v)return null;let g={anchor:p,focus:v};return n.Range.isExpanded(g)&&n.Range.isForward(g)&&be(c)&&!c.closest('[data-slate-void="true"]')&&n.Editor.void(e,{at:g.focus,mode:"highest"})&&(g=n.Editor.unhangRange(e,g,{voids:!0})),g}},xt=(e,t,n)=>e.map(((e,r)=>r!==t[0]?e:1===t.length?kt(kt({},e),{},{text:n}):kt(kt({},e),{},{children:xt(e.children,t.slice(1),n)}))),St=e=>{var t;const r=Et.getWindow(e).getSelection();if(null==r||!r.focusNode)return;const o=Et.toSlatePoint(e,[r.focusNode,r.focusOffset],{exactMatch:!1,suppressThrow:!0});if(!o)return;const a=(null!==(t=Et.toDOMNode(e,n.Node.get(e,o.path)).textContent)&&void 0!==t?t:"").replace(/\uFEFF/g,""),i=n.createEditor();return i.isInline=e.isInline,i.isVoid=e.isVoid,i.children=xt(e.children,o.path,a),{view:i,point:o}};function Ct(e,t){const{path:r,diff:o}=t;if(!n.Editor.hasPath(e,r))return!1;const a=n.Node.get(e,r);if(!n.Node.isText(a))return!1;if(o.start!==a.text.length||0===o.text.length)return a.text.slice(o.start,o.start+o.text.length)===o.text;const i=n.Path.next(r);if(!n.Editor.hasPath(e,i))return!1;const l=n.Node.get(e,i);return n.Node.isText(l)&&l.text.startsWith(o.text)}function Ot(e,...t){return t.reduce(((e,t)=>e.slice(0,t.start)+t.text+e.slice(t.end)),e)}function Pt(e,t){const{start:n,end:r,text:o}=t,a=e.slice(n,r),i=function(e,t){const n=Math.min(e.length,t.length);for(let r=0;r<n;r++)if(e.charAt(r)!==t.charAt(r))return r;return n}(a,o),l=function(e,t,n){const r=Math.min(e.length,t.length,n);for(let n=0;n<r;n++)if(e.charAt(e.length-n-1)!==t.charAt(t.length-n-1))return n;return r}(a,o,Math.min(a.length-i,o.length-i)),u={start:n+i,end:r-l,text:o.slice(i,o.length-l)};return u.start===u.end&&0===u.text.length?null:u}function Tt(e){const{path:t,diff:n}=e;return{anchor:{path:t,offset:n.start},focus:{path:t,offset:n.end}}}function Nt(e,t){let{path:r,offset:o}=t;if(!n.Editor.hasPath(e,r))return null;let a=n.Node.get(e,r);if(!n.Node.isText(a))return null;const i=n.Editor.above(e,{match:t=>n.Node.isElement(t)&&n.Editor.isBlock(e,t),at:r});if(!i)return null;for(;o>a.text.length;){const t=n.Editor.next(e,{at:r,match:n.Node.isText});if(!t||!n.Path.isDescendant(t[1],i[1]))return null;o-=a.text.length,a=t[0],r=t[1]}return{path:r,offset:o}}function Dt(e,t){const r=Nt(e,t.anchor);if(!r)return null;if(n.Range.isCollapsed(t))return{anchor:r,focus:r};const o=Nt(e,t.focus);return o?{anchor:r,focus:o}:null}function _t(e,t,r){const o=ht.get(e),a=null==o?void 0:o.find((({path:e})=>n.Path.equals(e,t.path)));if(!a||t.offset<=a.diff.start)return n.Point.transform(t,r,{affinity:"backward"});const{diff:i}=a;if("insert_node"===r.type&&n.Text.isText(r.node)&&r.node.text===i.text&&i.start===i.end&&n.Path.equals(r.path,n.Path.next(t.path))&&t.offset<=i.start+i.text.length&&n.Node.leaf(e,t.path).text.length===i.start)return{path:r.path,offset:t.offset-i.start};if(t.offset<=i.start+i.text.length){const e={path:t.path,offset:i.start},o=n.Point.transform(e,r,{affinity:"backward"});return o?{path:o.path,offset:o.offset+t.offset-i.start}:null}const l={path:t.path,offset:t.offset-i.text.length+i.end-i.start},u=n.Point.transform(l,r,{affinity:"backward"});return u?"split_node"===r.type&&n.Path.equals(r.path,t.path)&&l.offset<r.position&&i.start<r.position?u:{path:u.path,offset:u.offset+i.text.length-i.end+i.start}:null}function Rt(e,t,r){const o=_t(e,t.anchor,r);if(!o)return null;if(n.Range.isCollapsed(t))return{anchor:o,focus:o};const a=_t(e,t.focus,r);return a?{anchor:o,focus:a}:null}const Mt=(e,t)=>{const n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},Lt=(e,t,n)=>{try{const r=Et.toDOMRange(e,t),o=Et.toDOMRange(e,n),a=r.getBoundingClientRect(),i=o.getBoundingClientRect();return Mt(a,i)&&Mt(i,a)}catch(e){return!1}};function zt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ft(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zt(Object(n),!0).forEach((function(t){ve(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const It=new WeakSet,jt=e=>Je.has(e)||It.has(e)||n.Node.isElement(e)&&e.children.some(jt),Bt=e=>n.Node.isElement(e)?Ft(Ft({},e),{},{children:e.children.map(Bt)}):Ft({},e),At=e=>{It.add(e),n.Node.isElement(e)&&e.children.forEach(At)},Wt=e=>{const t=jt(e)?Bt(e):e;return At(t),t};function Ut(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Vt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ut(Object(n),!0).forEach((function(t){ve(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ut(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Ht=(e,t="x-slate-fragment")=>{const r=e,{apply:o,onChange:a,deleteBackward:i,addMark:l,removeMark:u,insertNodes:s}=r;return r.insertNodes=(e,t)=>{s(n.Node.isNode(e)?Wt(e):e.map(Wt),t)},at.set(r,new WeakMap),r.addMark=(e,t)=>{var n,o;null===(n=dt.get(r))||void 0===n||n(),!ft.get(r)&&null!==(o=ht.get(r))&&void 0!==o&&o.length&&ft.set(r,null),pt.delete(r),l(e,t)},r.removeMark=e=>{var t;!ft.get(r)&&null!==(t=ht.get(r))&&void 0!==t&&t.length&&ft.set(r,null),pt.delete(r),u(e)},r.deleteBackward=e=>{if("line"!==e)return i(e);if(r.selection&&n.Range.isCollapsed(r.selection)){const e=n.Editor.above(r,{match:e=>n.Node.isElement(e)&&n.Editor.isBlock(r,e),at:r.selection});if(e){const[,t]=e,o=n.Editor.range(r,t,r.selection.anchor),a=((e,t)=>{const r=n.Editor.range(e,n.Range.end(t)),o=Array.from(n.Editor.positions(e,{at:t}));let a=0,i=o.length,l=Math.floor(i/2);if(Lt(e,n.Editor.range(e,o[a]),r))return n.Editor.range(e,o[a],r);if(o.length<2)return n.Editor.range(e,o[o.length-1],r);for(;l!==o.length&&l!==a;)Lt(e,n.Editor.range(e,o[l]),r)?i=l:a=l,l=Math.floor((a+i)/2);return n.Editor.range(e,o[a],r)})(r,o);n.Range.isCollapsed(a)?i("character"):n.Transforms.delete(r,{at:a})}}},r.apply=t=>{const a=[],i=[],l=ht.get(r);if(null!=l&&l.length){const e=l.map((e=>function(e,t){const{path:r,diff:o,id:a}=e;switch(t.type){case"insert_text":return!n.Path.equals(t.path,r)||t.offset>=o.end?e:t.offset<=o.start?{diff:{start:t.text.length+o.start,end:t.text.length+o.end,text:o.text},id:a,path:r}:{diff:{start:o.start,end:o.end+t.text.length,text:o.text},id:a,path:r};case"remove_text":return!n.Path.equals(t.path,r)||t.offset>=o.end?e:t.offset+t.text.length<=o.start?{diff:{start:o.start-t.text.length,end:o.end-t.text.length,text:o.text},id:a,path:r}:{diff:{start:o.start,end:o.end-t.text.length,text:o.text},id:a,path:r};case"split_node":return!n.Path.equals(t.path,r)||t.position>=o.end?{diff:o,id:a,path:n.Path.transform(r,t,{affinity:"backward"})}:t.position>o.start?{diff:{start:o.start,end:Math.min(t.position,o.end),text:o.text},id:a,path:r}:{diff:{start:o.start-t.position,end:o.end-t.position,text:o.text},id:a,path:n.Path.transform(r,t,{affinity:"forward"})};case"merge_node":return n.Path.equals(t.path,r)?{diff:{start:o.start+t.position,end:o.end+t.position,text:o.text},id:a,path:n.Path.transform(r,t)}:{diff:o,id:a,path:n.Path.transform(r,t)}}const i=n.Path.transform(r,t);return i?{diff:o,path:i,id:a}:null}(e,t))).filter(Boolean);ht.set(r,e)}const u=gt.get(r);u&>.set(r,Rt(r,u,t));const s=vt.get(r);if(null!=s&&s.at){const e=n.Location.isPoint(null==s?void 0:s.at)?_t(r,s.at,t):Rt(r,s.at,t);vt.set(r,e?Vt(Vt({},s),{},{at:e}):null)}switch(t.type){case"insert_text":case"remove_text":case"set_node":case"split_node":a.push(...qt(r,t.path));break;case"set_selection":var c;null===(c=st.get(r))||void 0===c||c.unref(),st.delete(r);break;case"insert_node":case"remove_node":a.push(...qt(r,n.Path.parent(t.path)));break;case"merge_node":{const e=n.Path.previous(t.path);a.push(...qt(r,e));break}case"move_node":{const o=n.Path.common(n.Path.parent(t.path),n.Path.parent(t.newPath));let l;a.push(...qt(r,o)),n.Path.isBefore(t.path,t.newPath)?(a.push(...qt(r,n.Path.parent(t.path))),l=t.newPath):(a.push(...qt(r,n.Path.parent(t.newPath))),l=t.path);const u=n.Node.get(e,n.Path.parent(l)),s=Et.findKey(r,u),c=n.Editor.pathRef(r,n.Path.parent(l));i.push([c,s]);break}}switch(o(t),t.type){case"insert_node":case"remove_node":case"merge_node":case"move_node":case"split_node":case"insert_text":case"remove_text":case"set_selection":Ye.set(r,!0)}for(const[e,t]of a){const[o]=n.Editor.node(r,e);ot.set(o,t)}for(const[e,t]of i){if(e.current){const[o]=n.Editor.node(r,e.current);ot.set(o,t)}e.unref()}},r.setFragmentData=e=>{const{selection:o}=r;if(!o)return;const[a,i]=n.Range.edges(o),l=n.Editor.void(r,{at:a.path}),u=n.Editor.void(r,{at:i.path});if(n.Range.isCollapsed(o)&&!l)return;const s=Et.toDOMRange(r,o);let c=s.cloneContents(),d=s.commonAncestorContainer,f=c.childNodes[0];if(c.childNodes.forEach((e=>{e.textContent&&""!==e.textContent.trim()&&(f=e)})),u){const[e]=u,t=s.cloneRange(),n=Et.toDOMNode(r,e);t.setEndAfter(n),c=t.cloneContents(),d=t.commonAncestorContainer}if(l&&(f=c.querySelector("[data-slate-spacer]")),Array.from(c.querySelectorAll("[data-slate-zero-width]")).forEach((e=>{const t="n"===e.getAttribute("data-slate-zero-width");e.textContent="",t&&e.appendChild(e.ownerDocument.createElement("br"))})),Ee(f)){const e=f.ownerDocument.createElement("span");e.style.whiteSpace="pre",e.appendChild(f),c.appendChild(e),f=e}const p=r.getFragment(),h=JSON.stringify(p),v=window.btoa(encodeURIComponent(h));f.setAttribute("data-slate-fragment",v),e.setData(`application/${t}`,v),c=((e,t,n,r)=>{const o=null!==e.querySelector("li");let a=e;for(let e=be(t)?t:t.parentElement;e&&e!==n;e=e.parentElement)if(o&&["OL","UL","LI"].includes(e.nodeName)||r&&"true"===e.getAttribute("data-slate-inline")&&!e.hasAttribute("data-slate-void")){const t=e.cloneNode(!1);t.appendChild(a),a=e.ownerDocument.createDocumentFragment(),a.appendChild(t)}return a})(c,d,Et.toDOMNode(r,r),!l&&!u);const g=c.ownerDocument.createElement("div");return g.appendChild(c),g.setAttribute("hidden","true"),c.ownerDocument.body.appendChild(g),e.setData("text/html",g.innerHTML),e.setData("text/plain",Ce(g)),c.ownerDocument.body.removeChild(g),e},r.insertData=e=>{r.insertFragmentData(e)||r.insertTextData(e)},r.insertFragmentData=e=>{const n=e.getData(`application/${t}`)||(e=>{const t=e.getData("text/html"),[,n]=t.match(Oe)||[];return n})(e);if(n){const e=decodeURIComponent(window.atob(n)),t=JSON.parse(e);return r.insertFragment(t),!0}return!1},r.insertTextData=e=>{const t=e.getData("text/plain");if(t){const e=t.split(/\r\n|\r|\n/);let o=!1;for(const t of e)o&&n.Transforms.splitNodes(r,{always:!0}),r.insertText(t),o=!0;return!0}return!1},r.onChange=e=>{const t=ct.get(r);t&&t(e),a(e)},r},qt=(e,t)=>{const r=[];for(const[o,a]of n.Editor.levels(e,{at:t})){const t=Et.findKey(e,o);r.push([a,t])}return r},Kt={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"},$t={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"},Qt={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Xt=e=>{const t=Kt[e],n=$t[e],r=Qt[e],o=t&&fe(t),a=n&&fe(n),i=r&&fe(r);return e=>!(!o||!o(e))||(!!(ze&&a&&a(e))||!(ze||!i||!i(e)))};var Yt={isBold:Xt("bold"),isCompose:Xt("compose"),isMoveBackward:Xt("moveBackward"),isMoveForward:Xt("moveForward"),isDeleteBackward:Xt("deleteBackward"),isDeleteForward:Xt("deleteForward"),isDeleteLineBackward:Xt("deleteLineBackward"),isDeleteLineForward:Xt("deleteLineForward"),isDeleteWordBackward:Xt("deleteWordBackward"),isDeleteWordForward:Xt("deleteWordForward"),isExtendBackward:Xt("extendBackward"),isExtendForward:Xt("extendForward"),isExtendLineBackward:Xt("extendLineBackward"),isExtendLineForward:Xt("extendLineForward"),isItalic:Xt("italic"),isMoveLineBackward:Xt("moveLineBackward"),isMoveLineForward:Xt("moveLineForward"),isMoveWordBackward:Xt("moveWordBackward"),isMoveWordForward:Xt("moveWordForward"),isRedo:Xt("redo"),isSoftBreak:Xt("insertSoftBreak"),isSplitBlock:Xt("splitBlock"),isTransposeCharacter:Xt("transposeCharacter"),isUndo:Xt("undo")};function Gt(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const Jt=["anchor","focus"],Zt=["anchor","focus"];function en(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?en(Object(n),!0).forEach((function(t){ve(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):en(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const nn=(e,t)=>{const{anchor:n,focus:r}=e,o=Gt(e,Jt),{anchor:a,focus:i}=t,l=Gt(t,Zt);return e[yt]===t[yt]&&(u=o,s=l,Object.keys(u).length===Object.keys(s).length&&Object.keys(u).every((e=>s.hasOwnProperty(e)&&u[e]===s[e])));var u,s},rn=(e,t)=>{if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){const o=e[r],a=t[r];if(!n.Range.equals(o,a)||!nn(o,a))return!1}return!0},on=(e,t)=>{if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){const r=e[n],o=t[n];if(r.anchor.offset!==o.anchor.offset||r.focus.offset!==o.focus.offset||!nn(r,o))return!1}return!0};var an=a((function(e,t){function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<a(o,t)))break e;e[r]=t,e[n]=o,n=r}}function r(e){return 0===e.length?null:e[0]}function o(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,i=o>>>1;r<i;){var l=2*(r+1)-1,u=e[l],s=l+1,c=e[s];if(0>a(u,n))s<o&&0>a(c,u)?(e[r]=c,e[s]=n,r=s):(e[r]=u,e[l]=n,r=l);else{if(!(s<o&&0>a(c,n)))break e;e[r]=c,e[s]=n,r=s}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var i=performance;t.unstable_now=function(){return i.now()}}else{var l=Date,u=l.now();t.unstable_now=function(){return l.now()-u}}var s=[],c=[],d=1,f=null,p=3,h=!1,v=!1,g=!1,m="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=r(c);null!==t;){if(null===t.callback)o(c);else{if(!(t.startTime<=e))break;o(c),t.sortIndex=t.expirationTime,n(s,t)}t=r(c)}}function k(e){if(g=!1,w(e),!v)if(null!==r(s))v=!0,M(E);else{var t=r(c);null!==t&&L(k,t.startTime-e)}}function E(e,n){v=!1,g&&(g=!1,y(O),O=-1),h=!0;var a=p;try{for(w(n),f=r(s);null!==f&&(!(f.expirationTime>n)||e&&!N());){var i=f.callback;if("function"==typeof i){f.callback=null,p=f.priorityLevel;var l=i(f.expirationTime<=n);n=t.unstable_now(),"function"==typeof l?f.callback=l:f===r(s)&&o(s),w(n)}else o(s);f=r(s)}if(null!==f)var u=!0;else{var d=r(c);null!==d&&L(k,d.startTime-n),u=!1}return u}finally{f=null,p=a,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var x,S=!1,C=null,O=-1,P=5,T=-1;function N(){return!(t.unstable_now()-T<P)}function D(){if(null!==C){var e=t.unstable_now();T=e;var n=!0;try{n=C(!0,e)}finally{n?x():(S=!1,C=null)}}else S=!1}if("function"==typeof b)x=function(){b(D)};else if("undefined"!=typeof MessageChannel){var _=new MessageChannel,R=_.port2;_.port1.onmessage=D,x=function(){R.postMessage(null)}}else x=function(){m(D,0)};function M(e){C=e,S||(S=!0,x())}function L(e,n){O=m((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){v||h||(v=!0,M(E))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(s)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,o,a){var i=t.unstable_now();switch("object"==typeof a&&null!==a?a="number"==typeof(a=a.delay)&&0<a?i+a:i:a=i,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return e={id:d++,callback:o,priorityLevel:e,startTime:a,expirationTime:l=a+l,sortIndex:-1},a>i?(e.sortIndex=a,n(c,e),null===r(s)&&e===r(c)&&(g?(y(O),O=-1):g=!0,L(k,a-i))):(e.sortIndex=l,n(s,e),v||h||(v=!0,M(E))),e},t.unstable_shouldYield=N,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}}));an.unstable_now,an.unstable_IdlePriority,an.unstable_ImmediatePriority,an.unstable_LowPriority,an.unstable_NormalPriority,an.unstable_Profiling,an.unstable_UserBlockingPriority,an.unstable_cancelCallback,an.unstable_continueExecution,an.unstable_forceFrameRate,an.unstable_getCurrentPriorityLevel,an.unstable_getFirstCallbackNode,an.unstable_next,an.unstable_pauseExecution,an.unstable_requestPaint,an.unstable_runWithPriority,an.unstable_scheduleCallback,an.unstable_shouldYield,an.unstable_wrapCallback;var ln=a((function(e,t){}));ln.unstable_now,ln.unstable_IdlePriority,ln.unstable_ImmediatePriority,ln.unstable_LowPriority,ln.unstable_NormalPriority,ln.unstable_Profiling,ln.unstable_UserBlockingPriority,ln.unstable_cancelCallback,ln.unstable_continueExecution,ln.unstable_forceFrameRate,ln.unstable_getCurrentPriorityLevel,ln.unstable_getFirstCallbackNode,ln.unstable_next,ln.unstable_pauseExecution,ln.unstable_requestPaint,ln.unstable_runWithPriority,ln.unstable_scheduleCallback,ln.unstable_shouldYield,ln.unstable_wrapCallback;var un=a((function(e){e.exports=an}));function sn(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var cn=new Set,dn={};function fn(e,t){pn(e,t),pn(e+"Capture",t)}function pn(e,t){for(dn[e]=t,e=0;e<t.length;e++)cn.add(t[e])}var hn=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),vn=Object.prototype.hasOwnProperty,gn=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,mn={},yn={};function bn(e,t,n,r,o,a,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var wn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){wn[e]=new bn(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];wn[t]=new bn(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){wn[e]=new bn(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){wn[e]=new bn(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){wn[e]=new bn(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){wn[e]=new bn(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){wn[e]=new bn(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){wn[e]=new bn(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){wn[e]=new bn(e,5,!1,e.toLowerCase(),null,!1,!1)}));var kn=/[\-:]([a-z])/g;function En(e){return e[1].toUpperCase()}function xn(e,t,n,r){var o=wn.hasOwnProperty(t)?wn[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!vn.call(yn,e)||!vn.call(mn,e)&&(gn.test(e)?yn[e]=!0:(mn[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(kn,En);wn[t]=new bn(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(kn,En);wn[t]=new bn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(kn,En);wn[t]=new bn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){wn[e]=new bn(e,1,!1,e.toLowerCase(),null,!1,!1)})),wn.xlinkHref=new bn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){wn[e]=new bn(e,1,!1,e.toLowerCase(),null,!0,!0)}));var Sn=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Cn=Symbol.for("react.element"),On=Symbol.for("react.portal"),Pn=Symbol.for("react.fragment"),Tn=Symbol.for("react.strict_mode"),Nn=Symbol.for("react.profiler"),Dn=Symbol.for("react.provider"),_n=Symbol.for("react.context"),Rn=Symbol.for("react.forward_ref"),Mn=Symbol.for("react.suspense"),Ln=Symbol.for("react.suspense_list"),zn=Symbol.for("react.memo"),Fn=Symbol.for("react.lazy"),In=Symbol.for("react.offscreen"),jn=Symbol.iterator;function Bn(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=jn&&e[jn]||e["@@iterator"])?e:null}var An,Wn=Object.assign;function Un(e){if(void 0===An)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);An=t&&t[1]||""}return"\n"+An+e}var Vn=!1;function Hn(e,t){if(!e||Vn)return"";Vn=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var o=t.stack.split("\n"),a=r.stack.split("\n"),i=o.length-1,l=a.length-1;1<=i&&0<=l&&o[i]!==a[l];)l--;for(;1<=i&&0<=l;i--,l--)if(o[i]!==a[l]){if(1!==i||1!==l)do{if(i--,0>--l||o[i]!==a[l]){var u="\n"+o[i].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}}while(1<=i&&0<=l);break}}}finally{Vn=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Un(e):""}function qn(e){switch(e.tag){case 5:return Un(e.type);case 16:return Un("Lazy");case 13:return Un("Suspense");case 19:return Un("SuspenseList");case 0:case 2:case 15:return e=Hn(e.type,!1);case 11:return e=Hn(e.type.render,!1);case 1:return e=Hn(e.type,!0);default:return""}}function Kn(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case Pn:return"Fragment";case On:return"Portal";case Nn:return"Profiler";case Tn:return"StrictMode";case Mn:return"Suspense";case Ln:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case _n:return(e.displayName||"Context")+".Consumer";case Dn:return(e._context.displayName||"Context")+".Provider";case Rn:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case zn:return null!==(t=e.displayName||null)?t:Kn(e.type)||"Memo";case Fn:t=e._payload,e=e._init;try{return Kn(e(t))}catch(e){}}return null}function $n(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Kn(t);case 8:return t===Tn?"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("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function Qn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function Xn(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Yn(e){e._valueTracker||(e._valueTracker=function(e){var t=Xn(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Gn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Xn(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Jn(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Zn(e,t){var n=t.checked;return Wn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function er(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Qn(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function tr(e,t){null!=(t=t.checked)&&xn(e,"checked",t,!1)}function nr(e,t){tr(e,t);var n=Qn(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?or(e,t.type,n):t.hasOwnProperty("defaultValue")&&or(e,t.type,Qn(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function rr(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function or(e,t,n){"number"===t&&Jn(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ar=Array.isArray;function ir(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Qn(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function lr(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(sn(91));return Wn({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ur(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(sn(92));if(ar(n)){if(1<n.length)throw Error(sn(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:Qn(n)}}function sr(e,t){var n=Qn(t.value),r=Qn(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function cr(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function dr(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function fr(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?dr(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var pr,hr,vr=(hr=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((pr=pr||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=pr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return hr(e,t)}))}:hr);function gr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var mr={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},yr=["Webkit","ms","Moz","O"];function br(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||mr.hasOwnProperty(e)&&mr[e]?(""+t).trim():t+"px"}function wr(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=br(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(mr).forEach((function(e){yr.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),mr[t]=mr[e]}))}));var kr=Wn({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 Er(e,t){if(t){if(kr[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(sn(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(sn(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(sn(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(sn(62))}}function xr(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){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 Sr=null;function Cr(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Or=null,Pr=null,Tr=null;function Nr(e){if(e=xl(e)){if("function"!=typeof Or)throw Error(sn(280));var t=e.stateNode;t&&(t=Cl(t),Or(e.stateNode,e.type,t))}}function Dr(e){Pr?Tr?Tr.push(e):Tr=[e]:Pr=e}function _r(){if(Pr){var e=Pr,t=Tr;if(Tr=Pr=null,Nr(e),t)for(e=0;e<t.length;e++)Nr(t[e])}}function Rr(e,t){return e(t)}function Mr(){}var Lr=!1;function zr(e,t,n){if(Lr)return e(t,n);Lr=!0;try{return Rr(e,t,n)}finally{Lr=!1,(null!==Pr||null!==Tr)&&(Mr(),_r())}}function Fr(e,t){var n=e.stateNode;if(null===n)return null;var r=Cl(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(sn(231,t,typeof n));return n}var Ir=!1;if(hn)try{var jr={};Object.defineProperty(jr,"passive",{get:function(){Ir=!0}}),window.addEventListener("test",jr,jr),window.removeEventListener("test",jr,jr)}catch(hr){Ir=!1}function Br(e,t,n,r,o,a,i,l,u){var s=Array.prototype.slice.call(arguments,3);try{t.apply(n,s)}catch(e){this.onError(e)}}var Ar=!1,Wr=null,Ur=!1,Vr=null,Hr={onError:function(e){Ar=!0,Wr=e}};function qr(e,t,n,r,o,a,i,l,u){Ar=!1,Wr=null,Br.apply(Hr,arguments)}function Kr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function $r(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Qr(e){if(Kr(e)!==e)throw Error(sn(188))}function Xr(e){return e=function(e){var t=e.alternate;if(!t){if(null===(t=Kr(e)))throw Error(sn(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var a=o.alternate;if(null===a){if(null!==(r=o.return)){n=r;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===n)return Qr(o),e;if(a===r)return Qr(o),t;a=a.sibling}throw Error(sn(188))}if(n.return!==r.return)n=o,r=a;else{for(var i=!1,l=o.child;l;){if(l===n){i=!0,n=o,r=a;break}if(l===r){i=!0,r=o,n=a;break}l=l.sibling}if(!i){for(l=a.child;l;){if(l===n){i=!0,n=a,r=o;break}if(l===r){i=!0,r=a,n=o;break}l=l.sibling}if(!i)throw Error(sn(189))}}if(n.alternate!==r)throw Error(sn(190))}if(3!==n.tag)throw Error(sn(188));return n.stateNode.current===n?e:t}(e),null!==e?Yr(e):null}function Yr(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Yr(e);if(null!==t)return t;e=e.sibling}return null}var Gr=un.unstable_scheduleCallback,Jr=un.unstable_cancelCallback,Zr=un.unstable_shouldYield,eo=un.unstable_requestPaint,to=un.unstable_now,no=un.unstable_getCurrentPriorityLevel,ro=un.unstable_ImmediatePriority,oo=un.unstable_UserBlockingPriority,ao=un.unstable_NormalPriority,io=un.unstable_LowPriority,lo=un.unstable_IdlePriority,uo=null,so=null;var co=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(fo(e)/po|0)|0},fo=Math.log,po=Math.LN2;var ho=64,vo=4194304;function go(e){switch(e&-e){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 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function mo(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,a=e.pingedLanes,i=268435455&n;if(0!==i){var l=i&~o;0!==l?r=go(l):0!==(a&=i)&&(r=go(a))}else 0!==(i=n&~o)?r=go(i):0!==a&&(r=go(a));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&o)&&((o=r&-r)>=(a=t&-t)||16===o&&0!=(4194240&a)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-co(t)),r|=e[n],t&=~o;return r}function yo(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 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+5e3;default:return-1}}function bo(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function wo(){var e=ho;return 0==(4194240&(ho<<=1))&&(ho=64),e}function ko(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Eo(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-co(t)]=n}function xo(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-co(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var So=0;function Co(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var Oo,Po,To,No,Do,_o=!1,Ro=[],Mo=null,Lo=null,zo=null,Fo=new Map,Io=new Map,jo=[],Bo="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ao(e,t){switch(e){case"focusin":case"focusout":Mo=null;break;case"dragenter":case"dragleave":Lo=null;break;case"mouseover":case"mouseout":zo=null;break;case"pointerover":case"pointerout":Fo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Io.delete(t.pointerId)}}function Wo(e,t,n,r,o,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[o]},null!==t&&(null!==(t=xl(t))&&Po(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function Uo(e){var t=El(e.target);if(null!==t){var n=Kr(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=$r(n)))return e.blockedOn=t,void Do(e.priority,(function(){To(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Vo(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=ea(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=xl(n))&&Po(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Sr=r,n.target.dispatchEvent(r),Sr=null,t.shift()}return!0}function Ho(e,t,n){Vo(e)&&n.delete(t)}function qo(){_o=!1,null!==Mo&&Vo(Mo)&&(Mo=null),null!==Lo&&Vo(Lo)&&(Lo=null),null!==zo&&Vo(zo)&&(zo=null),Fo.forEach(Ho),Io.forEach(Ho)}function Ko(e,t){e.blockedOn===t&&(e.blockedOn=null,_o||(_o=!0,un.unstable_scheduleCallback(un.unstable_NormalPriority,qo)))}function $o(e){function t(t){return Ko(t,e)}if(0<Ro.length){Ko(Ro[0],e);for(var n=1;n<Ro.length;n++){var r=Ro[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Mo&&Ko(Mo,e),null!==Lo&&Ko(Lo,e),null!==zo&&Ko(zo,e),Fo.forEach(t),Io.forEach(t),n=0;n<jo.length;n++)(r=jo[n]).blockedOn===e&&(r.blockedOn=null);for(;0<jo.length&&null===(n=jo[0]).blockedOn;)Uo(n),null===n.blockedOn&&jo.shift()}var Qo=Sn.ReactCurrentBatchConfig,Xo=!0;function Yo(e,t,n,r){var o=So,a=Qo.transition;Qo.transition=null;try{So=1,Jo(e,t,n,r)}finally{So=o,Qo.transition=a}}function Go(e,t,n,r){var o=So,a=Qo.transition;Qo.transition=null;try{So=4,Jo(e,t,n,r)}finally{So=o,Qo.transition=a}}function Jo(e,t,n,r){if(Xo){var o=ea(e,t,n,r);if(null===o)Qi(e,t,r,Zo,n),Ao(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return Mo=Wo(Mo,e,t,n,r,o),!0;case"dragenter":return Lo=Wo(Lo,e,t,n,r,o),!0;case"mouseover":return zo=Wo(zo,e,t,n,r,o),!0;case"pointerover":var a=o.pointerId;return Fo.set(a,Wo(Fo.get(a)||null,e,t,n,r,o)),!0;case"gotpointercapture":return a=o.pointerId,Io.set(a,Wo(Io.get(a)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(Ao(e,r),4&t&&-1<Bo.indexOf(e)){for(;null!==o;){var a=xl(o);if(null!==a&&Oo(a),null===(a=ea(e,t,n,r))&&Qi(e,t,r,Zo,n),a===o)break;o=a}null!==o&&r.stopPropagation()}else Qi(e,t,r,null,n)}}var Zo=null;function ea(e,t,n,r){if(Zo=null,null!==(e=El(e=Cr(r))))if(null===(t=Kr(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=$r(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Zo=e,null}function ta(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(no()){case ro:return 1;case oo:return 4;case ao:case io:return 16;case lo:return 536870912;default:return 16}default:return 16}}var na=null,ra=null,oa=null;function aa(){if(oa)return oa;var e,t,n=ra,r=n.length,o="value"in na?na.value:na.textContent,a=o.length;for(e=0;e<r&&n[e]===o[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===o[a-t];t++);return oa=o.slice(e,1<t?1-t:void 0)}function ia(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function la(){return!0}function ua(){return!1}function sa(e){function t(t,n,r,o,a){for(var i in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(i)&&(t=e[i],this[i]=t?t(o):o[i]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?la:ua,this.isPropagationStopped=ua,this}return Wn(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=la)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=la)},persist:function(){},isPersistent:la}),t}var ca,da,fa,pa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ha=sa(pa),va=Wn({},pa,{view:0,detail:0}),ga=sa(va),ma=Wn({},va,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Na,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==fa&&(fa&&"mousemove"===e.type?(ca=e.screenX-fa.screenX,da=e.screenY-fa.screenY):da=ca=0,fa=e),ca)},movementY:function(e){return"movementY"in e?e.movementY:da}}),ya=sa(ma),ba=sa(Wn({},ma,{dataTransfer:0})),wa=sa(Wn({},va,{relatedTarget:0})),ka=sa(Wn({},pa,{animationName:0,elapsedTime:0,pseudoElement:0})),Ea=Wn({},pa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xa=sa(Ea),Sa=sa(Wn({},pa,{data:0})),Ca={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Oa={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Pa={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ta(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Pa[e])&&!!t[e]}function Na(){return Ta}var Da=Wn({},va,{key:function(e){if(e.key){var t=Ca[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=ia(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Oa[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Na,charCode:function(e){return"keypress"===e.type?ia(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?ia(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),_a=sa(Da),Ra=sa(Wn({},ma,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Ma=sa(Wn({},va,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Na})),La=sa(Wn({},pa,{propertyName:0,elapsedTime:0,pseudoElement:0})),za=Wn({},ma,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Fa=sa(za),Ia=[9,13,27,32],ja=hn&&"CompositionEvent"in window,Ba=null;hn&&"documentMode"in document&&(Ba=document.documentMode);var Aa=hn&&"TextEvent"in window&&!Ba,Wa=hn&&(!ja||Ba&&8<Ba&&11>=Ba),Ua=String.fromCharCode(32),Va=!1;function Ha(e,t){switch(e){case"keyup":return-1!==Ia.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qa(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Ka=!1;var $a={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Qa(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!$a[e.type]:"textarea"===t}function Xa(e,t,n,r){Dr(r),0<(t=Yi(t,"onChange")).length&&(n=new ha("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ya=null,Ga=null;function Ja(e){Ui(e,0)}function Za(e){if(Gn(Sl(e)))return e}function ei(e,t){if("change"===e)return t}var ti=!1;if(hn){var ni;if(hn){var ri="oninput"in document;if(!ri){var oi=document.createElement("div");oi.setAttribute("oninput","return;"),ri="function"==typeof oi.oninput}ni=ri}else ni=!1;ti=ni&&(!document.documentMode||9<document.documentMode)}function ai(){Ya&&(Ya.detachEvent("onpropertychange",ii),Ga=Ya=null)}function ii(e){if("value"===e.propertyName&&Za(Ga)){var t=[];Xa(t,Ga,e,Cr(e)),zr(Ja,t)}}function li(e,t,n){"focusin"===e?(ai(),Ga=n,(Ya=t).attachEvent("onpropertychange",ii)):"focusout"===e&&ai()}function ui(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Za(Ga)}function si(e,t){if("click"===e)return Za(t)}function ci(e,t){if("input"===e||"change"===e)return Za(t)}var di="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function fi(e,t){if(di(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!vn.call(t,o)||!di(e[o],t[o]))return!1}return!0}function pi(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hi(e,t){var n,r=pi(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=pi(r)}}function vi(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?vi(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function gi(){for(var e=window,t=Jn();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=Jn((e=t.contentWindow).document)}return t}function mi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function yi(e){var t=gi(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&vi(n.ownerDocument.documentElement,n)){if(null!==r&&mi(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=n.textContent.length,a=Math.min(r.start,o);r=void 0===r.end?a:Math.min(r.end,o),!e.extend&&a>r&&(o=r,r=a,a=o),o=hi(n,a);var i=hi(n,r);o&&i&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var bi=hn&&"documentMode"in document&&11>=document.documentMode,wi=null,ki=null,Ei=null,xi=!1;function Si(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;xi||null==wi||wi!==Jn(r)||("selectionStart"in(r=wi)&&mi(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},Ei&&fi(Ei,r)||(Ei=r,0<(r=Yi(ki,"onSelect")).length&&(t=new ha("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=wi)))}function Ci(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Oi={animationend:Ci("Animation","AnimationEnd"),animationiteration:Ci("Animation","AnimationIteration"),animationstart:Ci("Animation","AnimationStart"),transitionend:Ci("Transition","TransitionEnd")},Pi={},Ti={};function Ni(e){if(Pi[e])return Pi[e];if(!Oi[e])return e;var t,n=Oi[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ti)return Pi[e]=n[t];return e}hn&&(Ti=document.createElement("div").style,"AnimationEvent"in window||(delete Oi.animationend.animation,delete Oi.animationiteration.animation,delete Oi.animationstart.animation),"TransitionEvent"in window||delete Oi.transitionend.transition);var Di=Ni("animationend"),_i=Ni("animationiteration"),Ri=Ni("animationstart"),Mi=Ni("transitionend"),Li=new Map,zi="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Fi(e,t){Li.set(e,t),fn(t,[e])}for(var Ii=0;Ii<zi.length;Ii++){var ji=zi[Ii];Fi(ji.toLowerCase(),"on"+(ji[0].toUpperCase()+ji.slice(1)))}Fi(Di,"onAnimationEnd"),Fi(_i,"onAnimationIteration"),Fi(Ri,"onAnimationStart"),Fi("dblclick","onDoubleClick"),Fi("focusin","onFocus"),Fi("focusout","onBlur"),Fi(Mi,"onTransitionEnd"),pn("onMouseEnter",["mouseout","mouseover"]),pn("onMouseLeave",["mouseout","mouseover"]),pn("onPointerEnter",["pointerout","pointerover"]),pn("onPointerLeave",["pointerout","pointerover"]),fn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),fn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),fn("onBeforeInput",["compositionend","keypress","textInput","paste"]),fn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),fn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),fn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Bi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ai=new Set("cancel close invalid load scroll toggle".split(" ").concat(Bi));function Wi(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,a,i,l,u){if(qr.apply(this,arguments),Ar){if(!Ar)throw Error(sn(198));var s=Wr;Ar=!1,Wr=null,Ur||(Ur=!0,Vr=s)}}(r,t,void 0,e),e.currentTarget=null}function Ui(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var i=r.length-1;0<=i;i--){var l=r[i],u=l.instance,s=l.currentTarget;if(l=l.listener,u!==a&&o.isPropagationStopped())break e;Wi(o,l,s),a=u}else for(i=0;i<r.length;i++){if(u=(l=r[i]).instance,s=l.currentTarget,l=l.listener,u!==a&&o.isPropagationStopped())break e;Wi(o,l,s),a=u}}}if(Ur)throw e=Vr,Ur=!1,Vr=null,e}function Vi(e,t){var n=t[bl];void 0===n&&(n=t[bl]=new Set);var r=e+"__bubble";n.has(r)||($i(t,e,2,!1),n.add(r))}function Hi(e,t,n){var r=0;t&&(r|=4),$i(n,e,r,t)}var qi="_reactListening"+Math.random().toString(36).slice(2);function Ki(e){if(!e[qi]){e[qi]=!0,cn.forEach((function(t){"selectionchange"!==t&&(Ai.has(t)||Hi(t,!1,e),Hi(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[qi]||(t[qi]=!0,Hi("selectionchange",!1,t))}}function $i(e,t,n,r){switch(ta(t)){case 1:var o=Yo;break;case 4:o=Go;break;default:o=Jo}n=o.bind(null,t,n,e),o=void 0,!Ir||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Qi(e,t,n,r,o){var a=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var i=r.tag;if(3===i||4===i){var l=r.stateNode.containerInfo;if(l===o||8===l.nodeType&&l.parentNode===o)break;if(4===i)for(i=r.return;null!==i;){var u=i.tag;if((3===u||4===u)&&((u=i.stateNode.containerInfo)===o||8===u.nodeType&&u.parentNode===o))return;i=i.return}for(;null!==l;){if(null===(i=El(l)))return;if(5===(u=i.tag)||6===u){r=a=i;continue e}l=l.parentNode}}r=r.return}zr((function(){var r=a,o=Cr(n),i=[];e:{var l=Li.get(e);if(void 0!==l){var u=ha,s=e;switch(e){case"keypress":if(0===ia(n))break e;case"keydown":case"keyup":u=_a;break;case"focusin":s="focus",u=wa;break;case"focusout":s="blur",u=wa;break;case"beforeblur":case"afterblur":u=wa;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=ya;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=ba;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=Ma;break;case Di:case _i:case Ri:u=ka;break;case Mi:u=La;break;case"scroll":u=ga;break;case"wheel":u=Fa;break;case"copy":case"cut":case"paste":u=xa;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=Ra}var c=0!=(4&t),d=!c&&"scroll"===e,f=c?null!==l?l+"Capture":null:l;c=[];for(var p,h=r;null!==h;){var v=(p=h).stateNode;if(5===p.tag&&null!==v&&(p=v,null!==f&&(null!=(v=Fr(h,f))&&c.push(Xi(h,v,p)))),d)break;h=h.return}0<c.length&&(l=new u(l,s,null,n,o),i.push({event:l,listeners:c}))}}if(0==(7&t)){if(u="mouseout"===e||"pointerout"===e,(!(l="mouseover"===e||"pointerover"===e)||n===Sr||!(s=n.relatedTarget||n.fromElement)||!El(s)&&!s[yl])&&(u||l)&&(l=o.window===o?o:(l=o.ownerDocument)?l.defaultView||l.parentWindow:window,u?(u=r,null!==(s=(s=n.relatedTarget||n.toElement)?El(s):null)&&(s!==(d=Kr(s))||5!==s.tag&&6!==s.tag)&&(s=null)):(u=null,s=r),u!==s)){if(c=ya,v="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(c=Ra,v="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==u?l:Sl(u),p=null==s?l:Sl(s),(l=new c(v,h+"leave",u,n,o)).target=d,l.relatedTarget=p,v=null,El(o)===r&&((c=new c(f,h+"enter",s,n,o)).target=p,c.relatedTarget=d,v=c),d=v,u&&s)e:{for(f=s,h=0,p=c=u;p;p=Gi(p))h++;for(p=0,v=f;v;v=Gi(v))p++;for(;0<h-p;)c=Gi(c),h--;for(;0<p-h;)f=Gi(f),p--;for(;h--;){if(c===f||null!==f&&c===f.alternate)break e;c=Gi(c),f=Gi(f)}c=null}else c=null;null!==u&&Ji(i,l,u,c,!1),null!==s&&null!==d&&Ji(i,d,s,c,!0)}if("select"===(u=(l=r?Sl(r):window).nodeName&&l.nodeName.toLowerCase())||"input"===u&&"file"===l.type)var g=ei;else if(Qa(l))if(ti)g=ci;else{g=ui;var m=li}else(u=l.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===l.type||"radio"===l.type)&&(g=si);switch(g&&(g=g(e,r))?Xa(i,g,n,o):(m&&m(e,l,r),"focusout"===e&&(m=l._wrapperState)&&m.controlled&&"number"===l.type&&or(l,"number",l.value)),m=r?Sl(r):window,e){case"focusin":(Qa(m)||"true"===m.contentEditable)&&(wi=m,ki=r,Ei=null);break;case"focusout":Ei=ki=wi=null;break;case"mousedown":xi=!0;break;case"contextmenu":case"mouseup":case"dragend":xi=!1,Si(i,n,o);break;case"selectionchange":if(bi)break;case"keydown":case"keyup":Si(i,n,o)}var y;if(ja)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Ka?Ha(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Wa&&"ko"!==n.locale&&(Ka||"onCompositionStart"!==b?"onCompositionEnd"===b&&Ka&&(y=aa()):(ra="value"in(na=o)?na.value:na.textContent,Ka=!0)),0<(m=Yi(r,b)).length&&(b=new Sa(b,e,null,n,o),i.push({event:b,listeners:m}),y?b.data=y:null!==(y=qa(n))&&(b.data=y))),(y=Aa?function(e,t){switch(e){case"compositionend":return qa(t);case"keypress":return 32!==t.which?null:(Va=!0,Ua);case"textInput":return(e=t.data)===Ua&&Va?null:e;default:return null}}(e,n):function(e,t){if(Ka)return"compositionend"===e||!ja&&Ha(e,t)?(e=aa(),oa=ra=na=null,Ka=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Wa&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Yi(r,"onBeforeInput")).length&&(o=new Sa("onBeforeInput","beforeinput",null,n,o),i.push({event:o,listeners:r}),o.data=y))}Ui(i,t)}))}function Xi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Yi(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,a=o.stateNode;5===o.tag&&null!==a&&(o=a,null!=(a=Fr(e,n))&&r.unshift(Xi(e,a,o)),null!=(a=Fr(e,t))&&r.push(Xi(e,a,o))),e=e.return}return r}function Gi(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Ji(e,t,n,r,o){for(var a=t._reactName,i=[];null!==n&&n!==r;){var l=n,u=l.alternate,s=l.stateNode;if(null!==u&&u===r)break;5===l.tag&&null!==s&&(l=s,o?null!=(u=Fr(n,a))&&i.unshift(Xi(n,u,l)):o||null!=(u=Fr(n,a))&&i.push(Xi(n,u,l))),n=n.return}0!==i.length&&e.push({event:t,listeners:i})}var Zi=/\r\n?/g,el=/\u0000|\uFFFD/g;function tl(e){return("string"==typeof e?e:""+e).replace(Zi,"\n").replace(el,"")}function nl(e,t,n){if(t=tl(t),tl(e)!==t&&n)throw Error(sn(425))}function rl(){}var ol=null,al=null;function il(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ll="function"==typeof setTimeout?setTimeout:void 0,ul="function"==typeof clearTimeout?clearTimeout:void 0,sl="function"==typeof Promise?Promise:void 0,cl="function"==typeof queueMicrotask?queueMicrotask:void 0!==sl?function(e){return sl.resolve(null).then(e).catch(dl)}:ll;function dl(e){setTimeout((function(){throw e}))}function fl(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void $o(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);$o(t)}function pl(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function hl(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var vl=Math.random().toString(36).slice(2),gl="__reactFiber$"+vl,ml="__reactProps$"+vl,yl="__reactContainer$"+vl,bl="__reactEvents$"+vl,wl="__reactListeners$"+vl,kl="__reactHandles$"+vl;function El(e){var t=e[gl];if(t)return t;for(var n=e.parentNode;n;){if(t=n[yl]||n[gl]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=hl(e);null!==e;){if(n=e[gl])return n;e=hl(e)}return t}n=(e=n).parentNode}return null}function xl(e){return!(e=e[gl]||e[yl])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Sl(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(sn(33))}function Cl(e){return e[ml]||null}var Ol=[],Pl=-1;function Tl(e){return{current:e}}function Nl(e){0>Pl||(e.current=Ol[Pl],Ol[Pl]=null,Pl--)}function Dl(e,t){Pl++,Ol[Pl]=e.current,e.current=t}var _l={},Rl=Tl(_l),Ml=Tl(!1),Ll=_l;function zl(e,t){var n=e.type.contextTypes;if(!n)return _l;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,a={};for(o in n)a[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Fl(e){return null!=(e=e.childContextTypes)}function Il(){Nl(Ml),Nl(Rl)}function jl(e,t,n){if(Rl.current!==_l)throw Error(sn(168));Dl(Rl,t),Dl(Ml,n)}function Bl(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(sn(108,$n(e)||"Unknown",o));return Wn({},n,r)}function Al(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||_l,Ll=Rl.current,Dl(Rl,e),Dl(Ml,Ml.current),!0}function Wl(e,t,n){var r=e.stateNode;if(!r)throw Error(sn(169));n?(e=Bl(e,t,Ll),r.__reactInternalMemoizedMergedChildContext=e,Nl(Ml),Nl(Rl),Dl(Rl,e)):Nl(Ml),Dl(Ml,n)}var Ul=null,Vl=!1,Hl=!1;function ql(e){null===Ul?Ul=[e]:Ul.push(e)}function Kl(){if(!Hl&&null!==Ul){Hl=!0;var e=0,t=So;try{var n=Ul;for(So=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Ul=null,Vl=!1}catch(t){throw null!==Ul&&(Ul=Ul.slice(e+1)),Gr(ro,Kl),t}finally{So=t,Hl=!1}}return null}var $l=[],Ql=0,Xl=null,Yl=0,Gl=[],Jl=0,Zl=null,eu=1,tu="";function nu(e,t){$l[Ql++]=Yl,$l[Ql++]=Xl,Xl=e,Yl=t}function ru(e,t,n){Gl[Jl++]=eu,Gl[Jl++]=tu,Gl[Jl++]=Zl,Zl=e;var r=eu;e=tu;var o=32-co(r)-1;r&=~(1<<o),n+=1;var a=32-co(t)+o;if(30<a){var i=o-o%5;a=(r&(1<<i)-1).toString(32),r>>=i,o-=i,eu=1<<32-co(t)+o|n<<o|r,tu=a+e}else eu=1<<a|n<<o|r,tu=e}function ou(e){null!==e.return&&(nu(e,1),ru(e,1,0))}function au(e){for(;e===Xl;)Xl=$l[--Ql],$l[Ql]=null,Yl=$l[--Ql],$l[Ql]=null;for(;e===Zl;)Zl=Gl[--Jl],Gl[Jl]=null,tu=Gl[--Jl],Gl[Jl]=null,eu=Gl[--Jl],Gl[Jl]=null}var iu=null,lu=null,uu=!1,su=null;function cu(e,t){var n=zf(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function du(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,iu=e,lu=pl(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,iu=e,lu=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Zl?{id:eu,overflow:tu}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=zf(18,null,null,0)).stateNode=t,n.return=e,e.child=n,iu=e,lu=null,!0);default:return!1}}function fu(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function pu(e){if(uu){var t=lu;if(t){var n=t;if(!du(e,t)){if(fu(e))throw Error(sn(418));t=pl(n.nextSibling);var r=iu;t&&du(e,t)?cu(r,n):(e.flags=-4097&e.flags|2,uu=!1,iu=e)}}else{if(fu(e))throw Error(sn(418));e.flags=-4097&e.flags|2,uu=!1,iu=e}}}function hu(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;iu=e}function vu(e){if(e!==iu)return!1;if(!uu)return hu(e),uu=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!il(e.type,e.memoizedProps)),t&&(t=lu)){if(fu(e))throw gu(),Error(sn(418));for(;t;)cu(e,t),t=pl(t.nextSibling)}if(hu(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(sn(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){lu=pl(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}lu=null}}else lu=iu?pl(e.stateNode.nextSibling):null;return!0}function gu(){for(var e=lu;e;)e=pl(e.nextSibling)}function mu(){lu=iu=null,uu=!1}function yu(e){null===su?su=[e]:su.push(e)}var bu=Sn.ReactCurrentBatchConfig;function wu(e,t){if(e&&e.defaultProps){for(var n in t=Wn({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var ku=Tl(null),Eu=null,xu=null,Su=null;function Cu(){Su=xu=Eu=null}function Ou(e){var t=ku.current;Nl(ku),e._currentValue=t}function Pu(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Tu(e,t){Eu=e,Su=xu=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(xc=!0),e.firstContext=null)}function Nu(e){var t=e._currentValue;if(Su!==e)if(e={context:e,memoizedValue:t,next:null},null===xu){if(null===Eu)throw Error(sn(308));xu=e,Eu.dependencies={lanes:0,firstContext:e}}else xu=xu.next=e;return t}var Du=null;function _u(e){null===Du?Du=[e]:Du.push(e)}function Ru(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,_u(t)):(n.next=o.next,o.next=n),t.interleaved=n,Mu(e,r)}function Mu(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Lu=!1;function zu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Fu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Iu(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ju(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&_d)){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Mu(e,n)}return null===(o=r.interleaved)?(t.next=t,_u(r)):(t.next=o.next,o.next=t),r.interleaved=t,Mu(e,n)}function Bu(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,xo(e,n)}}function Au(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?o=a=i:a=a.next=i,n=n.next}while(null!==n);null===a?o=a=t:a=a.next=t}else o=a=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Wu(e,t,n,r){var o=e.updateQueue;Lu=!1;var a=o.firstBaseUpdate,i=o.lastBaseUpdate,l=o.shared.pending;if(null!==l){o.shared.pending=null;var u=l,s=u.next;u.next=null,null===i?a=s:i.next=s,i=u;var c=e.alternate;null!==c&&((l=(c=c.updateQueue).lastBaseUpdate)!==i&&(null===l?c.firstBaseUpdate=s:l.next=s,c.lastBaseUpdate=u))}if(null!==a){var d=o.baseState;for(i=0,c=s=u=null,l=a;;){var f=l.lane,p=l.eventTime;if((r&f)===f){null!==c&&(c=c.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var h=e,v=l;switch(f=t,p=n,v.tag){case 1:if("function"==typeof(h=v.payload)){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(f="function"==typeof(h=v.payload)?h.call(p,d,f):h))break e;d=Wn({},d,f);break e;case 2:Lu=!0}}null!==l.callback&&0!==l.lane&&(e.flags|=64,null===(f=o.effects)?o.effects=[l]:f.push(l))}else p={eventTime:p,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},null===c?(s=c=p,u=d):c=c.next=p,i|=f;if(null===(l=l.next)){if(null===(l=o.shared.pending))break;l=(f=l).next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}if(null===c&&(u=d),o.baseState=u,o.firstBaseUpdate=s,o.lastBaseUpdate=c,null!==(t=o.shared.interleaved)){o=t;do{i|=o.lane,o=o.next}while(o!==t)}else null===a&&(o.shared.lanes=0);Bd|=i,e.lanes=i,e.memoizedState=d}}function Uu(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!=typeof o)throw Error(sn(191,o));o.call(r)}}}var Vu=(new t.Component).refs;function Hu(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:Wn({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var qu={isMounted:function(e){return!!(e=e._reactInternals)&&Kr(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=rf(),o=of(e),a=Iu(r,o);a.payload=t,null!=n&&(a.callback=n),null!==(t=ju(e,a,o))&&(af(t,e,o,r),Bu(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=rf(),o=of(e),a=Iu(r,o);a.tag=1,a.payload=t,null!=n&&(a.callback=n),null!==(t=ju(e,a,o))&&(af(t,e,o,r),Bu(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=rf(),r=of(e),o=Iu(n,r);o.tag=2,null!=t&&(o.callback=t),null!==(t=ju(e,o,r))&&(af(t,e,r,n),Bu(t,e,r))}};function Ku(e,t,n,r,o,a,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,i):!t.prototype||!t.prototype.isPureReactComponent||(!fi(n,r)||!fi(o,a))}function $u(e,t,n){var r=!1,o=_l,a=t.contextType;return"object"==typeof a&&null!==a?a=Nu(a):(o=Fl(t)?Ll:Rl.current,a=(r=null!=(r=t.contextTypes))?zl(e,o):_l),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=qu,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=a),t}function Qu(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&qu.enqueueReplaceState(t,t.state,null)}function Xu(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=Vu,zu(e);var a=t.contextType;"object"==typeof a&&null!==a?o.context=Nu(a):(a=Fl(t)?Ll:Rl.current,o.context=zl(e,a)),o.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(Hu(e,t,a,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&qu.enqueueReplaceState(o,o.state,null),Wu(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4194308)}function Yu(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(sn(309));var r=n.stateNode}if(!r)throw Error(sn(147,e));var o=r,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=o.refs;t===Vu&&(t=o.refs={}),null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!=typeof e)throw Error(sn(284));if(!n._owner)throw Error(sn(290,e))}return e}function Gu(e,t){throw e=Object.prototype.toString.call(t),Error(sn(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ju(e){return(0,e._init)(e._payload)}function Zu(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=If(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function i(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Wf(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function u(e,t,n,r){var a=n.type;return a===Pn?c(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===Fn&&Ju(a)===t.type)?((r=o(t,n.props)).ref=Yu(e,t,n),r.return=e,r):((r=jf(n.type,n.key,n.props,null,e.mode,r)).ref=Yu(e,t,n),r.return=e,r)}function s(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Uf(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function c(e,t,n,r,a){return null===t||7!==t.tag?((t=Bf(n,e.mode,r,a)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Wf(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case Cn:return(n=jf(t.type,t.key,t.props,null,e.mode,n)).ref=Yu(e,null,t),n.return=e,n;case On:return(t=Uf(t,e.mode,n)).return=e,t;case Fn:return d(e,(0,t._init)(t._payload),n)}if(ar(t)||Bn(t))return(t=Bf(t,e.mode,n,null)).return=e,t;Gu(e,t)}return null}function f(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==o?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case Cn:return n.key===o?u(e,t,n,r):null;case On:return n.key===o?s(e,t,n,r):null;case Fn:return f(e,t,(o=n._init)(n._payload),r)}if(ar(n)||Bn(n))return null!==o?null:c(e,t,n,r,null);Gu(e,n)}return null}function p(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case Cn:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o);case On:return s(t,e=e.get(null===r.key?n:r.key)||null,r,o);case Fn:return p(e,t,n,(0,r._init)(r._payload),o)}if(ar(r)||Bn(r))return c(t,e=e.get(n)||null,r,o,null);Gu(t,r)}return null}function h(o,i,l,u){for(var s=null,c=null,h=i,v=i=0,g=null;null!==h&&v<l.length;v++){h.index>v?(g=h,h=null):g=h.sibling;var m=f(o,h,l[v],u);if(null===m){null===h&&(h=g);break}e&&h&&null===m.alternate&&t(o,h),i=a(m,i,v),null===c?s=m:c.sibling=m,c=m,h=g}if(v===l.length)return n(o,h),uu&&nu(o,v),s;if(null===h){for(;v<l.length;v++)null!==(h=d(o,l[v],u))&&(i=a(h,i,v),null===c?s=h:c.sibling=h,c=h);return uu&&nu(o,v),s}for(h=r(o,h);v<l.length;v++)null!==(g=p(h,o,v,l[v],u))&&(e&&null!==g.alternate&&h.delete(null===g.key?v:g.key),i=a(g,i,v),null===c?s=g:c.sibling=g,c=g);return e&&h.forEach((function(e){return t(o,e)})),uu&&nu(o,v),s}function v(o,i,l,u){var s=Bn(l);if("function"!=typeof s)throw Error(sn(150));if(null==(l=s.call(l)))throw Error(sn(151));for(var c=s=null,h=i,v=i=0,g=null,m=l.next();null!==h&&!m.done;v++,m=l.next()){h.index>v?(g=h,h=null):g=h.sibling;var y=f(o,h,m.value,u);if(null===y){null===h&&(h=g);break}e&&h&&null===y.alternate&&t(o,h),i=a(y,i,v),null===c?s=y:c.sibling=y,c=y,h=g}if(m.done)return n(o,h),uu&&nu(o,v),s;if(null===h){for(;!m.done;v++,m=l.next())null!==(m=d(o,m.value,u))&&(i=a(m,i,v),null===c?s=m:c.sibling=m,c=m);return uu&&nu(o,v),s}for(h=r(o,h);!m.done;v++,m=l.next())null!==(m=p(h,o,v,m.value,u))&&(e&&null!==m.alternate&&h.delete(null===m.key?v:m.key),i=a(m,i,v),null===c?s=m:c.sibling=m,c=m);return e&&h.forEach((function(e){return t(o,e)})),uu&&nu(o,v),s}return function e(r,a,l,u){if("object"==typeof l&&null!==l&&l.type===Pn&&null===l.key&&(l=l.props.children),"object"==typeof l&&null!==l){switch(l.$$typeof){case Cn:e:{for(var s=l.key,c=a;null!==c;){if(c.key===s){if((s=l.type)===Pn){if(7===c.tag){n(r,c.sibling),(a=o(c,l.props.children)).return=r,r=a;break e}}else if(c.elementType===s||"object"==typeof s&&null!==s&&s.$$typeof===Fn&&Ju(s)===c.type){n(r,c.sibling),(a=o(c,l.props)).ref=Yu(r,c,l),a.return=r,r=a;break e}n(r,c);break}t(r,c),c=c.sibling}l.type===Pn?((a=Bf(l.props.children,r.mode,u,l.key)).return=r,r=a):((u=jf(l.type,l.key,l.props,null,r.mode,u)).ref=Yu(r,a,l),u.return=r,r=u)}return i(r);case On:e:{for(c=l.key;null!==a;){if(a.key===c){if(4===a.tag&&a.stateNode.containerInfo===l.containerInfo&&a.stateNode.implementation===l.implementation){n(r,a.sibling),(a=o(a,l.children||[])).return=r,r=a;break e}n(r,a);break}t(r,a),a=a.sibling}(a=Uf(l,r.mode,u)).return=r,r=a}return i(r);case Fn:return e(r,a,(c=l._init)(l._payload),u)}if(ar(l))return h(r,a,l,u);if(Bn(l))return v(r,a,l,u);Gu(r,l)}return"string"==typeof l&&""!==l||"number"==typeof l?(l=""+l,null!==a&&6===a.tag?(n(r,a.sibling),(a=o(a,l)).return=r,r=a):(n(r,a),(a=Wf(l,r.mode,u)).return=r,r=a),i(r)):n(r,a)}}var es=Zu(!0),ts=Zu(!1),ns={},rs=Tl(ns),os=Tl(ns),as=Tl(ns);function is(e){if(e===ns)throw Error(sn(174));return e}function ls(e,t){switch(Dl(as,t),Dl(os,e),Dl(rs,ns),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:fr(null,"");break;default:t=fr(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Nl(rs),Dl(rs,t)}function us(){Nl(rs),Nl(os),Nl(as)}function ss(e){is(as.current);var t=is(rs.current),n=fr(t,e.type);t!==n&&(Dl(os,e),Dl(rs,n))}function cs(e){os.current===e&&(Nl(rs),Nl(os))}var ds=Tl(0);function fs(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ps=[];function hs(){for(var e=0;e<ps.length;e++)ps[e]._workInProgressVersionPrimary=null;ps.length=0}var vs=Sn.ReactCurrentDispatcher,gs=Sn.ReactCurrentBatchConfig,ms=0,ys=null,bs=null,ws=null,ks=!1,Es=!1,xs=0,Ss=0;function Cs(){throw Error(sn(321))}function Os(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!di(e[n],t[n]))return!1;return!0}function Ps(e,t,n,r,o,a){if(ms=a,ys=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,vs.current=null===e||null===e.memoizedState?cc:dc,e=n(r,o),Es){a=0;do{if(Es=!1,xs=0,25<=a)throw Error(sn(301));a+=1,ws=bs=null,t.updateQueue=null,vs.current=fc,e=n(r,o)}while(Es)}if(vs.current=sc,t=null!==bs&&null!==bs.next,ms=0,ws=bs=ys=null,ks=!1,t)throw Error(sn(300));return e}function Ts(){var e=0!==xs;return xs=0,e}function Ns(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ws?ys.memoizedState=ws=e:ws=ws.next=e,ws}function Ds(){if(null===bs){var e=ys.alternate;e=null!==e?e.memoizedState:null}else e=bs.next;var t=null===ws?ys.memoizedState:ws.next;if(null!==t)ws=t,bs=e;else{if(null===e)throw Error(sn(310));e={memoizedState:(bs=e).memoizedState,baseState:bs.baseState,baseQueue:bs.baseQueue,queue:bs.queue,next:null},null===ws?ys.memoizedState=ws=e:ws=ws.next=e}return ws}function _s(e,t){return"function"==typeof t?t(e):t}function Rs(e){var t=Ds(),n=t.queue;if(null===n)throw Error(sn(311));n.lastRenderedReducer=e;var r=bs,o=r.baseQueue,a=n.pending;if(null!==a){if(null!==o){var i=o.next;o.next=a.next,a.next=i}r.baseQueue=o=a,n.pending=null}if(null!==o){a=o.next,r=r.baseState;var l=i=null,u=null,s=a;do{var c=s.lane;if((ms&c)===c)null!==u&&(u=u.next={lane:0,action:s.action,hasEagerState:s.hasEagerState,eagerState:s.eagerState,next:null}),r=s.hasEagerState?s.eagerState:e(r,s.action);else{var d={lane:c,action:s.action,hasEagerState:s.hasEagerState,eagerState:s.eagerState,next:null};null===u?(l=u=d,i=r):u=u.next=d,ys.lanes|=c,Bd|=c}s=s.next}while(null!==s&&s!==a);null===u?i=r:u.next=l,di(r,t.memoizedState)||(xc=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=u,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{a=o.lane,ys.lanes|=a,Bd|=a,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ms(e){var t=Ds(),n=t.queue;if(null===n)throw Error(sn(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,a=t.memoizedState;if(null!==o){n.pending=null;var i=o=o.next;do{a=e(a,i.action),i=i.next}while(i!==o);di(a,t.memoizedState)||(xc=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Ls(){}function zs(e,t){var n=ys,r=Ds(),o=t(),a=!di(r.memoizedState,o);if(a&&(r.memoizedState=o,xc=!0),r=r.queue,$s(js.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==ws&&1&ws.memoizedState.tag){if(n.flags|=2048,Us(9,Is.bind(null,n,r,o,t),void 0,null),null===Rd)throw Error(sn(349));0!=(30&ms)||Fs(n,t,o)}return o}function Fs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=ys.updateQueue)?(t={lastEffect:null,stores:null},ys.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Is(e,t,n,r){t.value=n,t.getSnapshot=r,Bs(t)&&As(e)}function js(e,t,n){return n((function(){Bs(t)&&As(e)}))}function Bs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!di(e,n)}catch(e){return!0}}function As(e){var t=Mu(e,1);null!==t&&af(t,e,1,-1)}function Ws(e){var t=Ns();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_s,lastRenderedState:e},t.queue=e,e=e.dispatch=ac.bind(null,ys,e),[t.memoizedState,e]}function Us(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ys.updateQueue)?(t={lastEffect:null,stores:null},ys.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Vs(){return Ds().memoizedState}function Hs(e,t,n,r){var o=Ns();ys.flags|=e,o.memoizedState=Us(1|t,n,void 0,void 0===r?null:r)}function qs(e,t,n,r){var o=Ds();r=void 0===r?null:r;var a=void 0;if(null!==bs){var i=bs.memoizedState;if(a=i.destroy,null!==r&&Os(r,i.deps))return void(o.memoizedState=Us(t,n,a,r))}ys.flags|=e,o.memoizedState=Us(1|t,n,a,r)}function Ks(e,t){return Hs(8390656,8,e,t)}function $s(e,t){return qs(2048,8,e,t)}function Qs(e,t){return qs(4,2,e,t)}function Xs(e,t){return qs(4,4,e,t)}function Ys(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Gs(e,t,n){return n=null!=n?n.concat([e]):null,qs(4,4,Ys.bind(null,t,e),n)}function Js(){}function Zs(e,t){var n=Ds();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Os(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ec(e,t){var n=Ds();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Os(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function tc(e,t,n){return 0==(21&ms)?(e.baseState&&(e.baseState=!1,xc=!0),e.memoizedState=n):(di(n,t)||(n=wo(),ys.lanes|=n,Bd|=n,e.baseState=!0),t)}function nc(e,t){var n=So;So=0!==n&&4>n?n:4,e(!0);var r=gs.transition;gs.transition={};try{e(!1),t()}finally{So=n,gs.transition=r}}function rc(){return Ds().memoizedState}function oc(e,t,n){var r=of(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ic(e))lc(t,n);else if(null!==(n=Ru(e,t,n,r))){af(n,e,r,rf()),uc(n,t,r)}}function ac(e,t,n){var r=of(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ic(e))lc(t,o);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var i=t.lastRenderedState,l=a(i,n);if(o.hasEagerState=!0,o.eagerState=l,di(l,i)){var u=t.interleaved;return null===u?(o.next=o,_u(t)):(o.next=u.next,u.next=o),void(t.interleaved=o)}}catch(e){}null!==(n=Ru(e,t,o,r))&&(af(n,e,r,o=rf()),uc(n,t,r))}}function ic(e){var t=e.alternate;return e===ys||null!==t&&t===ys}function lc(e,t){Es=ks=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function uc(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,xo(e,n)}}var sc={readContext:Nu,useCallback:Cs,useContext:Cs,useEffect:Cs,useImperativeHandle:Cs,useInsertionEffect:Cs,useLayoutEffect:Cs,useMemo:Cs,useReducer:Cs,useRef:Cs,useState:Cs,useDebugValue:Cs,useDeferredValue:Cs,useTransition:Cs,useMutableSource:Cs,useSyncExternalStore:Cs,useId:Cs,unstable_isNewReconciler:!1},cc={readContext:Nu,useCallback:function(e,t){return Ns().memoizedState=[e,void 0===t?null:t],e},useContext:Nu,useEffect:Ks,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Hs(4194308,4,Ys.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Hs(4,2,e,t)},useMemo:function(e,t){var n=Ns();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ns();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=oc.bind(null,ys,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Ns().memoizedState=e},useState:Ws,useDebugValue:Js,useDeferredValue:function(e){return Ns().memoizedState=e},useTransition:function(){var e=Ws(!1),t=e[0];return e=nc.bind(null,e[1]),Ns().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ys,o=Ns();if(uu){if(void 0===n)throw Error(sn(407));n=n()}else{if(n=t(),null===Rd)throw Error(sn(349));0!=(30&ms)||Fs(r,t,n)}o.memoizedState=n;var a={value:n,getSnapshot:t};return o.queue=a,Ks(js.bind(null,r,a,e),[e]),r.flags|=2048,Us(9,Is.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=Ns(),t=Rd.identifierPrefix;if(uu){var n=tu;t=":"+t+"R"+(n=(eu&~(1<<32-co(eu)-1)).toString(32)+n),0<(n=xs++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=Ss++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},dc={readContext:Nu,useCallback:Zs,useContext:Nu,useEffect:$s,useImperativeHandle:Gs,useInsertionEffect:Qs,useLayoutEffect:Xs,useMemo:ec,useReducer:Rs,useRef:Vs,useState:function(){return Rs(_s)},useDebugValue:Js,useDeferredValue:function(e){return tc(Ds(),bs.memoizedState,e)},useTransition:function(){return[Rs(_s)[0],Ds().memoizedState]},useMutableSource:Ls,useSyncExternalStore:zs,useId:rc,unstable_isNewReconciler:!1},fc={readContext:Nu,useCallback:Zs,useContext:Nu,useEffect:$s,useImperativeHandle:Gs,useInsertionEffect:Qs,useLayoutEffect:Xs,useMemo:ec,useReducer:Ms,useRef:Vs,useState:function(){return Ms(_s)},useDebugValue:Js,useDeferredValue:function(e){var t=Ds();return null===bs?t.memoizedState=e:tc(t,bs.memoizedState,e)},useTransition:function(){return[Ms(_s)[0],Ds().memoizedState]},useMutableSource:Ls,useSyncExternalStore:zs,useId:rc,unstable_isNewReconciler:!1};function pc(e,t){try{var n="",r=t;do{n+=qn(r),r=r.return}while(r);var o=n}catch(e){o="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:o,digest:null}}function hc(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function vc(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var gc="function"==typeof WeakMap?WeakMap:Map;function mc(e,t,n){(n=Iu(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){$d||($d=!0,Qd=r),vc(0,t)},n}function yc(e,t,n){(n=Iu(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){vc(0,t)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){vc(0,t),"function"!=typeof r&&(null===Xd?Xd=new Set([this]):Xd.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function bc(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new gc;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=Nf.bind(null,e,t,n),t.then(e,e))}function wc(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function kc(e,t,n,r,o){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Iu(-1,1)).tag=2,ju(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var Ec=Sn.ReactCurrentOwner,xc=!1;function Sc(e,t,n,r){t.child=null===e?ts(t,null,n,r):es(t,e.child,n,r)}function Cc(e,t,n,r,o){n=n.render;var a=t.ref;return Tu(t,o),r=Ps(e,t,n,r,a,o),n=Ts(),null===e||xc?(uu&&n&&ou(t),t.flags|=1,Sc(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,$c(e,t,o))}function Oc(e,t,n,r,o){if(null===e){var a=n.type;return"function"!=typeof a||Ff(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=jf(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Pc(e,t,a,r,o))}if(a=e.child,0==(e.lanes&o)){var i=a.memoizedProps;if((n=null!==(n=n.compare)?n:fi)(i,r)&&e.ref===t.ref)return $c(e,t,o)}return t.flags|=1,(e=If(a,r)).ref=t.ref,e.return=t,t.child=e}function Pc(e,t,n,r,o){if(null!==e){var a=e.memoizedProps;if(fi(a,r)&&e.ref===t.ref){if(xc=!1,t.pendingProps=r=a,0==(e.lanes&o))return t.lanes=e.lanes,$c(e,t,o);0!=(131072&e.flags)&&(xc=!0)}}return Dc(e,t,n,r,o)}function Tc(e,t,n){var r=t.pendingProps,o=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Dl(Fd,zd),zd|=n;else{if(0==(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Dl(Fd,zd),zd|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,Dl(Fd,zd),zd|=r}else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,Dl(Fd,zd),zd|=r;return Sc(e,t,o,n),t.child}function Nc(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Dc(e,t,n,r,o){var a=Fl(n)?Ll:Rl.current;return a=zl(t,a),Tu(t,o),n=Ps(e,t,n,r,a,o),r=Ts(),null===e||xc?(uu&&r&&ou(t),t.flags|=1,Sc(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,$c(e,t,o))}function _c(e,t,n,r,o){if(Fl(n)){var a=!0;Al(t)}else a=!1;if(Tu(t,o),null===t.stateNode)Kc(e,t),$u(t,n,r),Xu(t,n,r,o),r=!0;else if(null===e){var i=t.stateNode,l=t.memoizedProps;i.props=l;var u=i.context,s=n.contextType;"object"==typeof s&&null!==s?s=Nu(s):s=zl(t,s=Fl(n)?Ll:Rl.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof i.getSnapshotBeforeUpdate;d||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(l!==r||u!==s)&&Qu(t,i,r,s),Lu=!1;var f=t.memoizedState;i.state=f,Wu(t,r,i,o),u=t.memoizedState,l!==r||f!==u||Ml.current||Lu?("function"==typeof c&&(Hu(t,n,c,r),u=t.memoizedState),(l=Lu||Ku(t,n,l,r,f,u,s))?(d||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.flags|=4194308)):("function"==typeof i.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),i.props=r,i.state=u,i.context=s,r=l):("function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Fu(e,t),l=t.memoizedProps,s=t.type===t.elementType?l:wu(t.type,l),i.props=s,d=t.pendingProps,f=i.context,"object"==typeof(u=n.contextType)&&null!==u?u=Nu(u):u=zl(t,u=Fl(n)?Ll:Rl.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(l!==d||f!==u)&&Qu(t,i,r,u),Lu=!1,f=t.memoizedState,i.state=f,Wu(t,r,i,o);var h=t.memoizedState;l!==d||f!==h||Ml.current||Lu?("function"==typeof p&&(Hu(t,n,p,r),h=t.memoizedState),(s=Lu||Ku(t,n,s,r,f,h,u)||!1)?(c||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,h,u),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,h,u)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof i.componentDidUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),i.props=r,i.state=h,i.context=u,r=s):("function"!=typeof i.componentDidUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Rc(e,t,n,r,a,o)}function Rc(e,t,n,r,o,a){Nc(e,t);var i=0!=(128&t.flags);if(!r&&!i)return o&&Wl(t,n,!1),$c(e,t,a);r=t.stateNode,Ec.current=t;var l=i&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&i?(t.child=es(t,e.child,null,a),t.child=es(t,null,l,a)):Sc(e,t,l,a),t.memoizedState=r.state,o&&Wl(t,n,!0),t.child}function Mc(e){var t=e.stateNode;t.pendingContext?jl(0,t.pendingContext,t.pendingContext!==t.context):t.context&&jl(0,t.context,!1),ls(e,t.containerInfo)}function Lc(e,t,n,r,o){return mu(),yu(o),t.flags|=256,Sc(e,t,n,r),t.child}var zc,Fc,Ic,jc={dehydrated:null,treeContext:null,retryLane:0};function Bc(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ac(e,t,n){var r,o=t.pendingProps,a=ds.current,i=!1,l=0!=(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!=(2&a)),r?(i=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Dl(ds,1&a),null===e)return pu(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=o.children,e=o.fallback,i?(o=t.mode,i=t.child,l={mode:"hidden",children:l},0==(1&o)&&null!==i?(i.childLanes=0,i.pendingProps=l):i=Af(l,o,0,null),e=Bf(e,o,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Bc(n),t.memoizedState=jc,e):Wc(t,l));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,t,n,r,o,a,i){if(n)return 256&t.flags?(t.flags&=-257,Uc(e,t,i,r=hc(Error(sn(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,o=t.mode,r=Af({mode:"visible",children:r.children},o,0,null),(a=Bf(a,o,i,null)).flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,0!=(1&t.mode)&&es(t,e.child,null,i),t.child.memoizedState=Bc(i),t.memoizedState=jc,a);if(0==(1&t.mode))return Uc(e,t,i,null);if("$!"===o.data){if(r=o.nextSibling&&o.nextSibling.dataset)var l=r.dgst;return r=l,Uc(e,t,i,r=hc(a=Error(sn(419)),r,void 0))}if(l=0!=(i&e.childLanes),xc||l){if(null!==(r=Rd)){switch(i&-i){case 4:o=2;break;case 16:o=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!=(o&(r.suspendedLanes|i))?0:o)&&o!==a.retryLane&&(a.retryLane=o,Mu(e,o),af(r,e,o,-1))}return bf(),Uc(e,t,i,r=hc(Error(sn(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=_f.bind(null,e),o._reactRetry=t,null):(e=a.treeContext,lu=pl(o.nextSibling),iu=t,uu=!0,su=null,null!==e&&(Gl[Jl++]=eu,Gl[Jl++]=tu,Gl[Jl++]=Zl,eu=e.id,tu=e.overflow,Zl=t),(t=Wc(t,r.children)).flags|=4096,t)}(e,t,l,o,r,a,n);if(i){i=o.fallback,l=t.mode,r=(a=e.child).sibling;var u={mode:"hidden",children:o.children};return 0==(1&l)&&t.child!==a?((o=t.child).childLanes=0,o.pendingProps=u,t.deletions=null):(o=If(a,u)).subtreeFlags=14680064&a.subtreeFlags,null!==r?i=If(r,i):(i=Bf(i,l,n,null)).flags|=2,i.return=t,o.return=t,o.sibling=i,t.child=o,o=i,i=t.child,l=null===(l=e.child.memoizedState)?Bc(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},i.memoizedState=l,i.childLanes=e.childLanes&~n,t.memoizedState=jc,o}return e=(i=e.child).sibling,o=If(i,{mode:"visible",children:o.children}),0==(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function Wc(e,t){return(t=Af({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Uc(e,t,n,r){return null!==r&&yu(r),es(t,e.child,null,n),(e=Wc(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Vc(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Pu(e.return,t,n)}function Hc(e,t,n,r,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o)}function qc(e,t,n){var r=t.pendingProps,o=r.revealOrder,a=r.tail;if(Sc(e,t,r.children,n),0!=(2&(r=ds.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Vc(e,n,t);else if(19===e.tag)Vc(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Dl(ds,r),0==(1&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===fs(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Hc(t,!1,o,n,a);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===fs(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Hc(t,!0,n,null,a);break;case"together":Hc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Kc(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function $c(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Bd|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(sn(153));if(null!==t.child){for(n=If(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=If(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Qc(e,t){if(!uu)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Xc(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Yc(e,t,n){var r=t.pendingProps;switch(au(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xc(t),null;case 1:case 17:return Fl(t.type)&&Il(),Xc(t),null;case 3:return r=t.stateNode,us(),Nl(Ml),Nl(Rl),hs(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(vu(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==su&&(cf(su),su=null))),Xc(t),null;case 5:cs(t);var o=is(as.current);if(n=t.type,null!==e&&null!=t.stateNode)Fc(e,t,n,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(sn(166));return Xc(t),null}if(e=is(rs.current),vu(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[gl]=t,r[ml]=a,e=0!=(1&t.mode),n){case"dialog":Vi("cancel",r),Vi("close",r);break;case"iframe":case"object":case"embed":Vi("load",r);break;case"video":case"audio":for(o=0;o<Bi.length;o++)Vi(Bi[o],r);break;case"source":Vi("error",r);break;case"img":case"image":case"link":Vi("error",r),Vi("load",r);break;case"details":Vi("toggle",r);break;case"input":er(r,a),Vi("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Vi("invalid",r);break;case"textarea":ur(r,a),Vi("invalid",r)}for(var i in Er(n,a),o=null,a)if(a.hasOwnProperty(i)){var l=a[i];"children"===i?"string"==typeof l?r.textContent!==l&&(!0!==a.suppressHydrationWarning&&nl(r.textContent,l,e),o=["children",l]):"number"==typeof l&&r.textContent!==""+l&&(!0!==a.suppressHydrationWarning&&nl(r.textContent,l,e),o=["children",""+l]):dn.hasOwnProperty(i)&&null!=l&&"onScroll"===i&&Vi("scroll",r)}switch(n){case"input":Yn(r),rr(r,a,!0);break;case"textarea":Yn(r),cr(r);break;case"select":case"option":break;default:"function"==typeof a.onClick&&(r.onclick=rl)}r=o,t.updateQueue=r,null!==r&&(t.flags|=4)}else{i=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=dr(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=i.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),"select"===n&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[gl]=t,e[ml]=r,zc(e,t),t.stateNode=e;e:{switch(i=xr(n,r),n){case"dialog":Vi("cancel",e),Vi("close",e),o=r;break;case"iframe":case"object":case"embed":Vi("load",e),o=r;break;case"video":case"audio":for(o=0;o<Bi.length;o++)Vi(Bi[o],e);o=r;break;case"source":Vi("error",e),o=r;break;case"img":case"image":case"link":Vi("error",e),Vi("load",e),o=r;break;case"details":Vi("toggle",e),o=r;break;case"input":er(e,r),o=Zn(e,r),Vi("invalid",e);break;case"option":default:o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Wn({},r,{value:void 0}),Vi("invalid",e);break;case"textarea":ur(e,r),o=lr(e,r),Vi("invalid",e)}for(a in Er(n,o),l=o)if(l.hasOwnProperty(a)){var u=l[a];"style"===a?wr(e,u):"dangerouslySetInnerHTML"===a?null!=(u=u?u.__html:void 0)&&vr(e,u):"children"===a?"string"==typeof u?("textarea"!==n||""!==u)&&gr(e,u):"number"==typeof u&&gr(e,""+u):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(dn.hasOwnProperty(a)?null!=u&&"onScroll"===a&&Vi("scroll",e):null!=u&&xn(e,a,u,i))}switch(n){case"input":Yn(e),rr(e,r,!1);break;case"textarea":Yn(e),cr(e);break;case"option":null!=r.value&&e.setAttribute("value",""+Qn(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?ir(e,!!r.multiple,a,!1):null!=r.defaultValue&&ir(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof o.onClick&&(e.onclick=rl)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Xc(t),null;case 6:if(e&&null!=t.stateNode)Ic(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(sn(166));if(n=is(as.current),is(rs.current),vu(t)){if(r=t.stateNode,n=t.memoizedProps,r[gl]=t,(a=r.nodeValue!==n)&&null!==(e=iu))switch(e.tag){case 3:nl(r.nodeValue,n,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&nl(r.nodeValue,n,0!=(1&e.mode))}a&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[gl]=t,t.stateNode=r}return Xc(t),null;case 13:if(Nl(ds),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(uu&&null!==lu&&0!=(1&t.mode)&&0==(128&t.flags))gu(),mu(),t.flags|=98560,a=!1;else if(a=vu(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(sn(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(sn(317));a[gl]=t}else mu(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Xc(t),a=!1}else null!==su&&(cf(su),su=null),a=!0;if(!a)return 65536&t.flags?t:null}return 0!=(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&ds.current)?0===Id&&(Id=3):bf())),null!==t.updateQueue&&(t.flags|=4),Xc(t),null);case 4:return us(),null===e&&Ki(t.stateNode.containerInfo),Xc(t),null;case 10:return Ou(t.type._context),Xc(t),null;case 19:if(Nl(ds),null===(a=t.memoizedState))return Xc(t),null;if(r=0!=(128&t.flags),null===(i=a.rendering))if(r)Qc(a,!1);else{if(0!==Id||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(i=fs(e))){for(t.flags|=128,Qc(a,!1),null!==(r=i.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=14680066,null===(i=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=i.childLanes,a.lanes=i.lanes,a.child=i.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=i.memoizedProps,a.memoizedState=i.memoizedState,a.updateQueue=i.updateQueue,a.type=i.type,e=i.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Dl(ds,1&ds.current|2),t.child}e=e.sibling}null!==a.tail&&to()>qd&&(t.flags|=128,r=!0,Qc(a,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=fs(i))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Qc(a,!0),null===a.tail&&"hidden"===a.tailMode&&!i.alternate&&!uu)return Xc(t),null}else 2*to()-a.renderingStartTime>qd&&1073741824!==n&&(t.flags|=128,r=!0,Qc(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(null!==(n=a.last)?n.sibling=i:t.child=i,a.last=i)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=to(),t.sibling=null,n=ds.current,Dl(ds,r?1&n|2:1&n),t):(Xc(t),null);case 22:case 23:return vf(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&zd)&&(Xc(t),6&t.subtreeFlags&&(t.flags|=8192)):Xc(t),null;case 24:case 25:return null}throw Error(sn(156,t.tag))}function Gc(e,t){switch(au(t),t.tag){case 1:return Fl(t.type)&&Il(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return us(),Nl(Ml),Nl(Rl),hs(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return cs(t),null;case 13:if(Nl(ds),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(sn(340));mu()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Nl(ds),null;case 4:return us(),null;case 10:return Ou(t.type._context),null;case 22:case 23:return vf(),null;default:return null}}zc=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Fc=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,is(rs.current);var a,i=null;switch(n){case"input":o=Zn(e,o),r=Zn(e,r),i=[];break;case"select":o=Wn({},o,{value:void 0}),r=Wn({},r,{value:void 0}),i=[];break;case"textarea":o=lr(e,o),r=lr(e,r),i=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=rl)}for(s in Er(n,r),n=null,o)if(!r.hasOwnProperty(s)&&o.hasOwnProperty(s)&&null!=o[s])if("style"===s){var l=o[s];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==s&&"children"!==s&&"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(dn.hasOwnProperty(s)?i||(i=[]):(i=i||[]).push(s,null));for(s in r){var u=r[s];if(l=null!=o?o[s]:void 0,r.hasOwnProperty(s)&&u!==l&&(null!=u||null!=l))if("style"===s)if(l){for(a in l)!l.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&l[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(i||(i=[]),i.push(s,n)),n=u;else"dangerouslySetInnerHTML"===s?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(i=i||[]).push(s,u)):"children"===s?"string"!=typeof u&&"number"!=typeof u||(i=i||[]).push(s,""+u):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&(dn.hasOwnProperty(s)?(null!=u&&"onScroll"===s&&Vi("scroll",e),i||l===u||(i=[])):(i=i||[]).push(s,u))}n&&(i=i||[]).push("style",n);var s=i;(t.updateQueue=s)&&(t.flags|=4)}},Ic=function(e,t,n,r){n!==r&&(t.flags|=4)};var Jc=!1,Zc=!1,ed="function"==typeof WeakSet?WeakSet:Set,td=null;function nd(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Tf(e,t,n)}else n.current=null}function rd(e,t,n){try{n()}catch(n){Tf(e,t,n)}}var od=!1;function ad(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var a=o.destroy;o.destroy=void 0,void 0!==a&&rd(t,n,a)}o=o.next}while(o!==r)}}function id(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ld(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function ud(e){var t=e.alternate;null!==t&&(e.alternate=null,ud(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[gl],delete t[ml],delete t[bl],delete t[wl],delete t[kl])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function sd(e){return 5===e.tag||3===e.tag||4===e.tag}function cd(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||sd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function dd(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=rl));else if(4!==r&&null!==(e=e.child))for(dd(e,t,n),e=e.sibling;null!==e;)dd(e,t,n),e=e.sibling}function fd(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(fd(e,t,n),e=e.sibling;null!==e;)fd(e,t,n),e=e.sibling}var pd=null,hd=!1;function vd(e,t,n){for(n=n.child;null!==n;)gd(e,t,n),n=n.sibling}function gd(e,t,n){if(so&&"function"==typeof so.onCommitFiberUnmount)try{so.onCommitFiberUnmount(uo,n)}catch(e){}switch(n.tag){case 5:Zc||nd(n,t);case 6:var r=pd,o=hd;pd=null,vd(e,t,n),hd=o,null!==(pd=r)&&(hd?(e=pd,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):pd.removeChild(n.stateNode));break;case 18:null!==pd&&(hd?(e=pd,n=n.stateNode,8===e.nodeType?fl(e.parentNode,n):1===e.nodeType&&fl(e,n),$o(e)):fl(pd,n.stateNode));break;case 4:r=pd,o=hd,pd=n.stateNode.containerInfo,hd=!0,vd(e,t,n),pd=r,hd=o;break;case 0:case 11:case 14:case 15:if(!Zc&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var a=o,i=a.destroy;a=a.tag,void 0!==i&&(0!=(2&a)||0!=(4&a))&&rd(n,t,i),o=o.next}while(o!==r)}vd(e,t,n);break;case 1:if(!Zc&&(nd(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Tf(n,t,e)}vd(e,t,n);break;case 21:vd(e,t,n);break;case 22:1&n.mode?(Zc=(r=Zc)||null!==n.memoizedState,vd(e,t,n),Zc=r):vd(e,t,n);break;default:vd(e,t,n)}}function md(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new ed),t.forEach((function(t){var r=Rf.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function yd(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var a=e,i=t,l=i;e:for(;null!==l;){switch(l.tag){case 5:pd=l.stateNode,hd=!1;break e;case 3:case 4:pd=l.stateNode.containerInfo,hd=!0;break e}l=l.return}if(null===pd)throw Error(sn(160));gd(a,i,o),pd=null,hd=!1;var u=o.alternate;null!==u&&(u.return=null),o.return=null}catch(e){Tf(o,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)bd(t,e),t=t.sibling}function bd(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(yd(t,e),wd(e),4&r){try{ad(3,e,e.return),id(3,e)}catch(t){Tf(e,e.return,t)}try{ad(5,e,e.return)}catch(t){Tf(e,e.return,t)}}break;case 1:yd(t,e),wd(e),512&r&&null!==n&&nd(n,n.return);break;case 5:if(yd(t,e),wd(e),512&r&&null!==n&&nd(n,n.return),32&e.flags){var o=e.stateNode;try{gr(o,"")}catch(t){Tf(e,e.return,t)}}if(4&r&&null!=(o=e.stateNode)){var a=e.memoizedProps,i=null!==n?n.memoizedProps:a,l=e.type,u=e.updateQueue;if(e.updateQueue=null,null!==u)try{"input"===l&&"radio"===a.type&&null!=a.name&&tr(o,a),xr(l,i);var s=xr(l,a);for(i=0;i<u.length;i+=2){var c=u[i],d=u[i+1];"style"===c?wr(o,d):"dangerouslySetInnerHTML"===c?vr(o,d):"children"===c?gr(o,d):xn(o,c,d,s)}switch(l){case"input":nr(o,a);break;case"textarea":sr(o,a);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!a.multiple;var p=a.value;null!=p?ir(o,!!a.multiple,p,!1):f!==!!a.multiple&&(null!=a.defaultValue?ir(o,!!a.multiple,a.defaultValue,!0):ir(o,!!a.multiple,a.multiple?[]:"",!1))}o[ml]=a}catch(t){Tf(e,e.return,t)}}break;case 6:if(yd(t,e),wd(e),4&r){if(null===e.stateNode)throw Error(sn(162));o=e.stateNode,a=e.memoizedProps;try{o.nodeValue=a}catch(t){Tf(e,e.return,t)}}break;case 3:if(yd(t,e),wd(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{$o(t.containerInfo)}catch(t){Tf(e,e.return,t)}break;case 4:default:yd(t,e),wd(e);break;case 13:yd(t,e),wd(e),8192&(o=e.child).flags&&(a=null!==o.memoizedState,o.stateNode.isHidden=a,!a||null!==o.alternate&&null!==o.alternate.memoizedState||(Hd=to())),4&r&&md(e);break;case 22:if(c=null!==n&&null!==n.memoizedState,1&e.mode?(Zc=(s=Zc)||c,yd(t,e),Zc=s):yd(t,e),wd(e),8192&r){if(s=null!==e.memoizedState,(e.stateNode.isHidden=s)&&!c&&0!=(1&e.mode))for(td=e,c=e.child;null!==c;){for(d=td=c;null!==td;){switch(p=(f=td).child,f.tag){case 0:case 11:case 14:case 15:ad(4,f,f.return);break;case 1:nd(f,f.return);var h=f.stateNode;if("function"==typeof h.componentWillUnmount){r=f,n=f.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){Tf(r,n,e)}}break;case 5:nd(f,f.return);break;case 22:if(null!==f.memoizedState){Sd(d);continue}}null!==p?(p.return=f,td=p):Sd(d)}c=c.sibling}e:for(c=null,d=e;;){if(5===d.tag){if(null===c){c=d;try{o=d.stateNode,s?"function"==typeof(a=o.style).setProperty?a.setProperty("display","none","important"):a.display="none":(l=d.stateNode,i=null!=(u=d.memoizedProps.style)&&u.hasOwnProperty("display")?u.display:null,l.style.display=br("display",i))}catch(t){Tf(e,e.return,t)}}}else if(6===d.tag){if(null===c)try{d.stateNode.nodeValue=s?"":d.memoizedProps}catch(t){Tf(e,e.return,t)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:yd(t,e),wd(e),4&r&&md(e);case 21:}}function wd(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(sd(n)){var r=n;break e}n=n.return}throw Error(sn(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(gr(o,""),r.flags&=-33),fd(e,cd(e),o);break;case 3:case 4:var a=r.stateNode.containerInfo;dd(e,cd(e),a);break;default:throw Error(sn(161))}}catch(t){Tf(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function kd(e,t,n){td=e,Ed(e)}function Ed(e,t,n){for(var r=0!=(1&e.mode);null!==td;){var o=td,a=o.child;if(22===o.tag&&r){var i=null!==o.memoizedState||Jc;if(!i){var l=o.alternate,u=null!==l&&null!==l.memoizedState||Zc;l=Jc;var s=Zc;if(Jc=i,(Zc=u)&&!s)for(td=o;null!==td;)u=(i=td).child,22===i.tag&&null!==i.memoizedState?Cd(o):null!==u?(u.return=i,td=u):Cd(o);for(;null!==a;)td=a,Ed(a),a=a.sibling;td=o,Jc=l,Zc=s}xd(e)}else 0!=(8772&o.subtreeFlags)&&null!==a?(a.return=o,td=a):xd(e)}}function xd(e){for(;null!==td;){var t=td;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Zc||id(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Zc)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:wu(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Uu(t,a,r);break;case 3:var i=t.updateQueue;if(null!==i){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Uu(t,i,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var s=t.alternate;if(null!==s){var c=s.memoizedState;if(null!==c){var d=c.dehydrated;null!==d&&$o(d)}}}break;default:throw Error(sn(163))}Zc||512&t.flags&&ld(t)}catch(e){Tf(t,t.return,e)}}if(t===e){td=null;break}if(null!==(n=t.sibling)){n.return=t.return,td=n;break}td=t.return}}function Sd(e){for(;null!==td;){var t=td;if(t===e){td=null;break}var n=t.sibling;if(null!==n){n.return=t.return,td=n;break}td=t.return}}function Cd(e){for(;null!==td;){var t=td;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{id(4,t)}catch(e){Tf(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(e){Tf(t,o,e)}}var a=t.return;try{ld(t)}catch(e){Tf(t,a,e)}break;case 5:var i=t.return;try{ld(t)}catch(e){Tf(t,i,e)}}}catch(e){Tf(t,t.return,e)}if(t===e){td=null;break}var l=t.sibling;if(null!==l){l.return=t.return,td=l;break}td=t.return}}var Od,Pd=Math.ceil,Td=Sn.ReactCurrentDispatcher,Nd=Sn.ReactCurrentOwner,Dd=Sn.ReactCurrentBatchConfig,_d=0,Rd=null,Md=null,Ld=0,zd=0,Fd=Tl(0),Id=0,jd=null,Bd=0,Ad=0,Wd=0,Ud=null,Vd=null,Hd=0,qd=1/0,Kd=null,$d=!1,Qd=null,Xd=null,Yd=!1,Gd=null,Jd=0,Zd=0,ef=null,tf=-1,nf=0;function rf(){return 0!=(6&_d)?to():-1!==tf?tf:tf=to()}function of(e){return 0==(1&e.mode)?1:0!=(2&_d)&&0!==Ld?Ld&-Ld:null!==bu.transition?(0===nf&&(nf=wo()),nf):0!==(e=So)?e:e=void 0===(e=window.event)?16:ta(e.type)}function af(e,t,n,r){if(50<Zd)throw Zd=0,ef=null,Error(sn(185));Eo(e,n,r),0!=(2&_d)&&e===Rd||(e===Rd&&(0==(2&_d)&&(Ad|=n),4===Id&&df(e,Ld)),lf(e,r),1===n&&0===_d&&0==(1&t.mode)&&(qd=to()+500,Vl&&Kl()))}function lf(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-co(a),l=1<<i,u=o[i];-1===u?0!=(l&n)&&0==(l&r)||(o[i]=yo(l,t)):u<=t&&(e.expiredLanes|=l),a&=~l}}(e,t);var r=mo(e,e===Rd?Ld:0);if(0===r)null!==n&&Jr(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Jr(n),1===t)0===e.tag?function(e){Vl=!0,ql(e)}(ff.bind(null,e)):ql(ff.bind(null,e)),cl((function(){0==(6&_d)&&Kl()})),n=null;else{switch(Co(r)){case 1:n=ro;break;case 4:n=oo;break;case 16:default:n=ao;break;case 536870912:n=lo}n=Mf(n,uf.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function uf(e,t){if(tf=-1,nf=0,0!=(6&_d))throw Error(sn(327));var n=e.callbackNode;if(Of()&&e.callbackNode!==n)return null;var r=mo(e,e===Rd?Ld:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=wf(e,r);else{t=r;var o=_d;_d|=2;var a=yf();for(Rd===e&&Ld===t||(Kd=null,qd=to()+500,gf(e,t));;)try{Ef();break}catch(t){mf(e,t)}Cu(),Td.current=a,_d=o,null!==Md?t=0:(Rd=null,Ld=0,t=Id)}if(0!==t){if(2===t&&(0!==(o=bo(e))&&(r=o,t=sf(e,o))),1===t)throw n=jd,gf(e,0),df(e,r),lf(e,to()),n;if(6===t)df(e,r);else{if(o=e.current.alternate,0==(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],a=o.getSnapshot;o=o.value;try{if(!di(a(),o))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)&&(2===(t=wf(e,r))&&(0!==(a=bo(e))&&(r=a,t=sf(e,a))),1===t))throw n=jd,gf(e,0),df(e,r),lf(e,to()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(sn(345));case 2:case 5:Cf(e,Vd,Kd);break;case 3:if(df(e,r),(130023424&r)===r&&10<(t=Hd+500-to())){if(0!==mo(e,0))break;if(((o=e.suspendedLanes)&r)!==r){rf(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ll(Cf.bind(null,e,Vd,Kd),t);break}Cf(e,Vd,Kd);break;case 4:if(df(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var i=31-co(r);a=1<<i,(i=t[i])>o&&(o=i),r&=~a}if(r=o,10<(r=(120>(r=to()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Pd(r/1960))-r)){e.timeoutHandle=ll(Cf.bind(null,e,Vd,Kd),r);break}Cf(e,Vd,Kd);break;default:throw Error(sn(329))}}}return lf(e,to()),e.callbackNode===n?uf.bind(null,e):null}function sf(e,t){var n=Ud;return e.current.memoizedState.isDehydrated&&(gf(e,t).flags|=256),2!==(e=wf(e,t))&&(t=Vd,Vd=n,null!==t&&cf(t)),e}function cf(e){null===Vd?Vd=e:Vd.push.apply(Vd,e)}function df(e,t){for(t&=~Wd,t&=~Ad,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-co(t),r=1<<n;e[n]=-1,t&=~r}}function ff(e){if(0!=(6&_d))throw Error(sn(327));Of();var t=mo(e,0);if(0==(1&t))return lf(e,to()),null;var n=wf(e,t);if(0!==e.tag&&2===n){var r=bo(e);0!==r&&(t=r,n=sf(e,r))}if(1===n)throw n=jd,gf(e,0),df(e,t),lf(e,to()),n;if(6===n)throw Error(sn(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Cf(e,Vd,Kd),lf(e,to()),null}function pf(e,t){var n=_d;_d|=1;try{return e(t)}finally{0===(_d=n)&&(qd=to()+500,Vl&&Kl())}}function hf(e){null!==Gd&&0===Gd.tag&&0==(6&_d)&&Of();var t=_d;_d|=1;var n=Dd.transition,r=So;try{if(Dd.transition=null,So=1,e)return e()}finally{So=r,Dd.transition=n,0==(6&(_d=t))&&Kl()}}function vf(){zd=Fd.current,Nl(Fd)}function gf(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ul(n)),null!==Md)for(n=Md.return;null!==n;){var r=n;switch(au(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Il();break;case 3:us(),Nl(Ml),Nl(Rl),hs();break;case 5:cs(r);break;case 4:us();break;case 13:case 19:Nl(ds);break;case 10:Ou(r.type._context);break;case 22:case 23:vf()}n=n.return}if(Rd=e,Md=e=If(e.current,null),Ld=zd=t,Id=0,jd=null,Wd=Ad=Bd=0,Vd=Ud=null,null!==Du){for(t=0;t<Du.length;t++)if(null!==(r=(n=Du[t]).interleaved)){n.interleaved=null;var o=r.next,a=n.pending;if(null!==a){var i=a.next;a.next=o,r.next=i}n.pending=r}Du=null}return e}function mf(e,t){for(;;){var n=Md;try{if(Cu(),vs.current=sc,ks){for(var r=ys.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}ks=!1}if(ms=0,ws=bs=ys=null,Es=!1,xs=0,Nd.current=null,null===n||null===n.return){Id=1,jd=t,Md=null;break}e:{var a=e,i=n.return,l=n,u=t;if(t=Ld,l.flags|=32768,null!==u&&"object"==typeof u&&"function"==typeof u.then){var s=u,c=l,d=c.tag;if(0==(1&c.mode)&&(0===d||11===d||15===d)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=wc(i);if(null!==p){p.flags&=-257,kc(p,i,l,0,t),1&p.mode&&bc(a,s,t),u=s;var h=(t=p).updateQueue;if(null===h){var v=new Set;v.add(u),t.updateQueue=v}else h.add(u);break e}if(0==(1&t)){bc(a,s,t),bf();break e}u=Error(sn(426))}else if(uu&&1&l.mode){var g=wc(i);if(null!==g){0==(65536&g.flags)&&(g.flags|=256),kc(g,i,l,0,t),yu(pc(u,l));break e}}a=u=pc(u,l),4!==Id&&(Id=2),null===Ud?Ud=[a]:Ud.push(a),a=i;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Au(a,mc(0,u,t));break e;case 1:l=u;var m=a.type,y=a.stateNode;if(0==(128&a.flags)&&("function"==typeof m.getDerivedStateFromError||null!==y&&"function"==typeof y.componentDidCatch&&(null===Xd||!Xd.has(y)))){a.flags|=65536,t&=-t,a.lanes|=t,Au(a,yc(a,l,t));break e}}a=a.return}while(null!==a)}Sf(n)}catch(e){t=e,Md===n&&null!==n&&(Md=n=n.return);continue}break}}function yf(){var e=Td.current;return Td.current=sc,null===e?sc:e}function bf(){0!==Id&&3!==Id&&2!==Id||(Id=4),null===Rd||0==(268435455&Bd)&&0==(268435455&Ad)||df(Rd,Ld)}function wf(e,t){var n=_d;_d|=2;var r=yf();for(Rd===e&&Ld===t||(Kd=null,gf(e,t));;)try{kf();break}catch(t){mf(e,t)}if(Cu(),_d=n,Td.current=r,null!==Md)throw Error(sn(261));return Rd=null,Ld=0,Id}function kf(){for(;null!==Md;)xf(Md)}function Ef(){for(;null!==Md&&!Zr();)xf(Md)}function xf(e){var t=Od(e.alternate,e,zd);e.memoizedProps=e.pendingProps,null===t?Sf(e):Md=t,Nd.current=null}function Sf(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=Yc(n,t,zd)))return void(Md=n)}else{if(null!==(n=Gc(n,t)))return n.flags&=32767,void(Md=n);if(null===e)return Id=6,void(Md=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Md=t);Md=t=e}while(null!==t);0===Id&&(Id=5)}function Cf(e,t,n){var r=So,o=Dd.transition;try{Dd.transition=null,So=1,function(e,t,n,r){do{Of()}while(null!==Gd);if(0!=(6&_d))throw Error(sn(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(sn(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-co(n),a=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~a}}(e,a),e===Rd&&(Md=Rd=null,Ld=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||Yd||(Yd=!0,Mf(ao,(function(){return Of(),null}))),a=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||a){a=Dd.transition,Dd.transition=null;var i=So;So=1;var l=_d;_d|=4,Nd.current=null,function(e,t){if(ol=Xo,mi(e=gi())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(e){n=null;break e}var i=0,l=-1,u=-1,s=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||0!==o&&3!==d.nodeType||(l=i+o),d!==a||0!==r&&3!==d.nodeType||(u=i+r),3===d.nodeType&&(i+=d.nodeValue.length),null!==(p=d.firstChild);)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++s===o&&(l=i),f===a&&++c===r&&(u=i),null!==(p=d.nextSibling))break;f=(d=f).parentNode}d=p}n=-1===l||-1===u?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(al={focusedElem:e,selectionRange:n},Xo=!1,td=t;null!==td;)if(e=(t=td).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,td=e;else for(;null!==td;){t=td;try{var h=t.alternate;if(0!=(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==h){var v=h.memoizedProps,g=h.memoizedState,m=t.stateNode,y=m.getSnapshotBeforeUpdate(t.elementType===t.type?v:wu(t.type,v),g);m.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(sn(163))}}catch(e){Tf(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,td=e;break}td=t.return}h=od,od=!1}(e,n),bd(n,e),yi(al),Xo=!!ol,al=ol=null,e.current=n,kd(n),eo(),_d=l,So=i,Dd.transition=a}else e.current=n;if(Yd&&(Yd=!1,Gd=e,Jd=o),0===(a=e.pendingLanes)&&(Xd=null),function(e){if(so&&"function"==typeof so.onCommitFiberRoot)try{so.onCommitFiberRoot(uo,e,void 0,128==(128&e.current.flags))}catch(e){}}(n.stateNode),lf(e,to()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if($d)throw $d=!1,e=Qd,Qd=null,e;0!=(1&Jd)&&0!==e.tag&&Of(),0!=(1&(a=e.pendingLanes))?e===ef?Zd++:(Zd=0,ef=e):Zd=0,Kl()}(e,t,n,r)}finally{Dd.transition=o,So=r}return null}function Of(){if(null!==Gd){var e=Co(Jd),t=Dd.transition,n=So;try{if(Dd.transition=null,So=16>e?16:e,null===Gd)var r=!1;else{if(e=Gd,Gd=null,Jd=0,0!=(6&_d))throw Error(sn(331));var o=_d;for(_d|=4,td=e.current;null!==td;){var a=td,i=a.child;if(0!=(16&td.flags)){var l=a.deletions;if(null!==l){for(var u=0;u<l.length;u++){var s=l[u];for(td=s;null!==td;){var c=td;switch(c.tag){case 0:case 11:case 15:ad(8,c,a)}var d=c.child;if(null!==d)d.return=c,td=d;else for(;null!==td;){var f=(c=td).sibling,p=c.return;if(ud(c),c===s){td=null;break}if(null!==f){f.return=p,td=f;break}td=p}}}var h=a.alternate;if(null!==h){var v=h.child;if(null!==v){h.child=null;do{var g=v.sibling;v.sibling=null,v=g}while(null!==v)}}td=a}}if(0!=(2064&a.subtreeFlags)&&null!==i)i.return=a,td=i;else e:for(;null!==td;){if(0!=(2048&(a=td).flags))switch(a.tag){case 0:case 11:case 15:ad(9,a,a.return)}var m=a.sibling;if(null!==m){m.return=a.return,td=m;break e}td=a.return}}var y=e.current;for(td=y;null!==td;){var b=(i=td).child;if(0!=(2064&i.subtreeFlags)&&null!==b)b.return=i,td=b;else e:for(i=y;null!==td;){if(0!=(2048&(l=td).flags))try{switch(l.tag){case 0:case 11:case 15:id(9,l)}}catch(e){Tf(l,l.return,e)}if(l===i){td=null;break e}var w=l.sibling;if(null!==w){w.return=l.return,td=w;break e}td=l.return}}if(_d=o,Kl(),so&&"function"==typeof so.onPostCommitFiberRoot)try{so.onPostCommitFiberRoot(uo,e)}catch(e){}r=!0}return r}finally{So=n,Dd.transition=t}}return!1}function Pf(e,t,n){e=ju(e,t=mc(0,t=pc(n,t),1),1),t=rf(),null!==e&&(Eo(e,1,t),lf(e,t))}function Tf(e,t,n){if(3===e.tag)Pf(e,e,n);else for(;null!==t;){if(3===t.tag){Pf(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Xd||!Xd.has(r))){t=ju(t,e=yc(t,e=pc(n,e),1),1),e=rf(),null!==t&&(Eo(t,1,e),lf(t,e));break}}t=t.return}}function Nf(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=rf(),e.pingedLanes|=e.suspendedLanes&n,Rd===e&&(Ld&n)===n&&(4===Id||3===Id&&(130023424&Ld)===Ld&&500>to()-Hd?gf(e,0):Wd|=n),lf(e,t)}function Df(e,t){0===t&&(0==(1&e.mode)?t=1:(t=vo,0==(130023424&(vo<<=1))&&(vo=4194304)));var n=rf();null!==(e=Mu(e,t))&&(Eo(e,t,n),lf(e,n))}function _f(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Df(e,n)}function Rf(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(sn(314))}null!==r&&r.delete(t),Df(e,n)}function Mf(e,t){return Gr(e,t)}function Lf(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,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 zf(e,t,n,r){return new Lf(e,t,n,r)}function Ff(e){return!(!(e=e.prototype)||!e.isReactComponent)}function If(e,t){var n=e.alternate;return null===n?((n=zf(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function jf(e,t,n,r,o,a){var i=2;if(r=e,"function"==typeof e)Ff(e)&&(i=1);else if("string"==typeof e)i=5;else e:switch(e){case Pn:return Bf(n.children,o,a,t);case Tn:i=8,o|=8;break;case Nn:return(e=zf(12,n,t,2|o)).elementType=Nn,e.lanes=a,e;case Mn:return(e=zf(13,n,t,o)).elementType=Mn,e.lanes=a,e;case Ln:return(e=zf(19,n,t,o)).elementType=Ln,e.lanes=a,e;case In:return Af(n,o,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case Dn:i=10;break e;case _n:i=9;break e;case Rn:i=11;break e;case zn:i=14;break e;case Fn:i=16,r=null;break e}throw Error(sn(130,null==e?e:typeof e,""))}return(t=zf(i,n,t,o)).elementType=e,t.type=r,t.lanes=a,t}function Bf(e,t,n,r){return(e=zf(7,e,r,t)).lanes=n,e}function Af(e,t,n,r){return(e=zf(22,e,r,t)).elementType=In,e.lanes=n,e.stateNode={isHidden:!1},e}function Wf(e,t,n){return(e=zf(6,e,null,t)).lanes=n,e}function Uf(e,t,n){return(t=zf(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Vf(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ko(0),this.expirationTimes=ko(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ko(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Hf(e,t,n,r,o,a,i,l,u){return e=new Vf(e,t,n,l,u),1===t?(t=1,!0===a&&(t|=8)):t=0,a=zf(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},zu(a),e}function qf(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:On,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Kf(e){if(!e)return _l;e:{if(Kr(e=e._reactInternals)!==e||1!==e.tag)throw Error(sn(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Fl(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(sn(171))}if(1===e.tag){var n=e.type;if(Fl(n))return Bl(e,n,t)}return t}function $f(e,t,n,r,o,a,i,l,u){return(e=Hf(n,r,!0,e,0,a,0,l,u)).context=Kf(null),n=e.current,(a=Iu(r=rf(),o=of(n))).callback=null!=t?t:null,ju(n,a,o),e.current.lanes=o,Eo(e,o,r),lf(e,r),e}function Qf(e,t,n,r){var o=t.current,a=rf(),i=of(o);return n=Kf(n),null===t.context?t.context=n:t.pendingContext=n,(t=Iu(a,i)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=ju(o,t,i))&&(af(e,o,i,a),Bu(e,o,i)),i}function Xf(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Yf(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Gf(e,t){Yf(e,t),(e=e.alternate)&&Yf(e,t)}Od=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ml.current)xc=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return xc=!1,function(e,t,n){switch(t.tag){case 3:Mc(t),mu();break;case 5:ss(t);break;case 1:Fl(t.type)&&Al(t);break;case 4:ls(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Dl(ku,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Dl(ds,1&ds.current),t.flags|=128,null):0!=(n&t.child.childLanes)?Ac(e,t,n):(Dl(ds,1&ds.current),null!==(e=$c(e,t,n))?e.sibling:null);Dl(ds,1&ds.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return qc(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),Dl(ds,ds.current),r)break;return null;case 22:case 23:return t.lanes=0,Tc(e,t,n)}return $c(e,t,n)}(e,t,n);xc=0!=(131072&e.flags)}else xc=!1,uu&&0!=(1048576&t.flags)&&ru(t,Yl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Kc(e,t),e=t.pendingProps;var o=zl(t,Rl.current);Tu(t,n),o=Ps(null,t,r,e,o,n);var a=Ts();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Fl(r)?(a=!0,Al(t)):a=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,zu(t),o.updater=qu,t.stateNode=o,o._reactInternals=t,Xu(t,r,e,n),t=Rc(null,t,r,!0,a,n)):(t.tag=0,uu&&a&&ou(t),Sc(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Kc(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"==typeof e)return Ff(e)?1:0;if(null!=e){if((e=e.$$typeof)===Rn)return 11;if(e===zn)return 14}return 2}(r),e=wu(r,e),o){case 0:t=Dc(null,t,r,e,n);break e;case 1:t=_c(null,t,r,e,n);break e;case 11:t=Cc(null,t,r,e,n);break e;case 14:t=Oc(null,t,r,wu(r.type,e),n);break e}throw Error(sn(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,Dc(e,t,r,o=t.elementType===r?o:wu(r,o),n);case 1:return r=t.type,o=t.pendingProps,_c(e,t,r,o=t.elementType===r?o:wu(r,o),n);case 3:e:{if(Mc(t),null===e)throw Error(sn(387));r=t.pendingProps,o=(a=t.memoizedState).element,Fu(e,t),Wu(t,r,null,n);var i=t.memoizedState;if(r=i.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Lc(e,t,r,n,o=pc(Error(sn(423)),t));break e}if(r!==o){t=Lc(e,t,r,n,o=pc(Error(sn(424)),t));break e}for(lu=pl(t.stateNode.containerInfo.firstChild),iu=t,uu=!0,su=null,n=ts(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(mu(),r===o){t=$c(e,t,n);break e}Sc(e,t,r,n)}t=t.child}return t;case 5:return ss(t),null===e&&pu(t),r=t.type,o=t.pendingProps,a=null!==e?e.memoizedProps:null,i=o.children,il(r,o)?i=null:null!==a&&il(r,a)&&(t.flags|=32),Nc(e,t),Sc(e,t,i,n),t.child;case 6:return null===e&&pu(t),null;case 13:return Ac(e,t,n);case 4:return ls(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=es(t,null,r,n):Sc(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Cc(e,t,r,o=t.elementType===r?o:wu(r,o),n);case 7:return Sc(e,t,t.pendingProps,n),t.child;case 8:case 12:return Sc(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,a=t.memoizedProps,i=o.value,Dl(ku,r._currentValue),r._currentValue=i,null!==a)if(di(a.value,i)){if(a.children===o.children&&!Ml.current){t=$c(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var l=a.dependencies;if(null!==l){i=a.child;for(var u=l.firstContext;null!==u;){if(u.context===r){if(1===a.tag){(u=Iu(-1,n&-n)).tag=2;var s=a.updateQueue;if(null!==s){var c=(s=s.shared).pending;null===c?u.next=u:(u.next=c.next,c.next=u),s.pending=u}}a.lanes|=n,null!==(u=a.alternate)&&(u.lanes|=n),Pu(a.return,n,t),l.lanes|=n;break}u=u.next}}else if(10===a.tag)i=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(i=a.return))throw Error(sn(341));i.lanes|=n,null!==(l=i.alternate)&&(l.lanes|=n),Pu(i,n,t),i=a.sibling}else i=a.child;if(null!==i)i.return=a;else for(i=a;null!==i;){if(i===t){i=null;break}if(null!==(a=i.sibling)){a.return=i.return,i=a;break}i=i.return}a=i}Sc(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Tu(t,n),r=r(o=Nu(o)),t.flags|=1,Sc(e,t,r,n),t.child;case 14:return o=wu(r=t.type,t.pendingProps),Oc(e,t,r,o=wu(r.type,o),n);case 15:return Pc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:wu(r,o),Kc(e,t),t.tag=1,Fl(r)?(e=!0,Al(t)):e=!1,Tu(t,n),$u(t,r,o),Xu(t,r,o,n),Rc(null,t,r,!0,e,n);case 19:return qc(e,t,n);case 22:return Tc(e,t,n)}throw Error(sn(156,t.tag))};var Jf="function"==typeof reportError?reportError:function(e){console.error(e)};function Zf(e){this._internalRoot=e}function ep(e){this._internalRoot=e}function tp(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function np(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function rp(){}function op(e,t,n,r,o){var a=n._reactRootContainer;if(a){var i=a;if("function"==typeof o){var l=o;o=function(){var e=Xf(i);l.call(e)}}Qf(t,i,e,o)}else i=function(e,t,n,r,o){if(o){if("function"==typeof r){var a=r;r=function(){var e=Xf(i);a.call(e)}}var i=$f(t,r,e,0,null,!1,0,"",rp);return e._reactRootContainer=i,e[yl]=i.current,Ki(8===e.nodeType?e.parentNode:e),hf(),i}for(;o=e.lastChild;)e.removeChild(o);if("function"==typeof r){var l=r;r=function(){var e=Xf(u);l.call(e)}}var u=Hf(e,0,!1,null,0,!1,0,"",rp);return e._reactRootContainer=u,e[yl]=u.current,Ki(8===e.nodeType?e.parentNode:e),hf((function(){Qf(t,u,n,r)})),u}(n,t,e,o,r);return Xf(i)}ep.prototype.render=Zf.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(sn(409));Qf(e,t,null,null)},ep.prototype.unmount=Zf.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;hf((function(){Qf(null,e,null,null)})),t[yl]=null}},ep.prototype.unstable_scheduleHydration=function(e){if(e){var t=No();e={blockedOn:null,target:e,priority:t};for(var n=0;n<jo.length&&0!==t&&t<jo[n].priority;n++);jo.splice(n,0,e),0===n&&Uo(e)}},Oo=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=go(t.pendingLanes);0!==n&&(xo(t,1|n),lf(t,to()),0==(6&_d)&&(qd=to()+500,Kl()))}break;case 13:hf((function(){var t=Mu(e,1);if(null!==t){var n=rf();af(t,e,1,n)}})),Gf(e,1)}},Po=function(e){if(13===e.tag){var t=Mu(e,134217728);if(null!==t)af(t,e,134217728,rf());Gf(e,134217728)}},To=function(e){if(13===e.tag){var t=of(e),n=Mu(e,t);if(null!==n)af(n,e,t,rf());Gf(e,t)}},No=function(){return So},Do=function(e,t){var n=So;try{return So=e,t()}finally{So=n}},Or=function(e,t,n){switch(t){case"input":if(nr(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=Cl(r);if(!o)throw Error(sn(90));Gn(r),nr(r,o)}}}break;case"textarea":sr(e,n);break;case"select":null!=(t=n.value)&&ir(e,!!n.multiple,t,!1)}},Rr=pf,Mr=hf;var ap={usingClientEntryPoint:!1,Events:[xl,Sl,Cl,Dr,_r,pf]},ip={findFiberByHostInstance:El,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},lp={bundleType:ip.bundleType,version:ip.version,rendererPackageName:ip.rendererPackageName,rendererConfig:ip.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Sn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Xr(e))?null:e.stateNode},findFiberByHostInstance:ip.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var up=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!up.isDisabled&&up.supportsFiber)try{uo=up.inject(lp),so=up}catch(hr){}}var sp={__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ap,createPortal:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!tp(t))throw Error(sn(200));return qf(e,t,null,n)},createRoot:function(e,t){if(!tp(e))throw Error(sn(299));var n=!1,r="",o=Jf;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Hf(e,1,!1,null,0,n,0,r,o),e[yl]=t.current,Ki(8===e.nodeType?e.parentNode:e),new Zf(t)},findDOMNode:function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(sn(188));throw e=Object.keys(e).join(","),Error(sn(268,e))}return e=null===(e=Xr(t))?null:e.stateNode},flushSync:function(e){return hf(e)},hydrate:function(e,t,n){if(!np(t))throw Error(sn(200));return op(null,e,t,!0,n)},hydrateRoot:function(e,t,n){if(!tp(e))throw Error(sn(405));var r=null!=n&&n.hydratedSources||null,o=!1,a="",i=Jf;if(null!=n&&(!0===n.unstable_strictMode&&(o=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(i=n.onRecoverableError)),t=$f(t,null,e,1,null!=n?n:null,o,0,a,i),e[yl]=t.current,Ki(e),r)for(e=0;e<r.length;e++)o=(o=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new ep(t)},render:function(e,t,n){if(!np(t))throw Error(sn(200));return op(null,e,t,!1,n)},unmountComponentAtNode:function(e){if(!np(e))throw Error(sn(40));return!!e._reactRootContainer&&(hf((function(){op(null,null,e,!1,(function(){e._reactRootContainer=null,e[yl]=null}))})),!0)},unstable_batchedUpdates:pf,unstable_renderSubtreeIntoContainer:function(e,t,n,r){if(!np(n))throw Error(sn(200));if(null==e||void 0===e._reactInternals)throw Error(sn(38));return op(e,t,n,!1,r)},version:"18.2.0-next-9e3b772b8-20220608"},cp=a((function(e,t){}));cp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,cp.createPortal,cp.createRoot,cp.findDOMNode,cp.flushSync,cp.hydrate,cp.hydrateRoot,cp.render,cp.unmountComponentAtNode,cp.unstable_batchedUpdates,cp.unstable_renderSubtreeIntoContainer,cp.version;var dp=a((function(e){!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=sp}));dp.findDOMNode;var fp=Et;function pp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pp(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var vp=new WeakMap;function gp(e){var t=e.editor,r=e.scheduleOnDOMSelectionChange,o=e.onDOMSelectionChange,a=!1,i=!1,l=null,u=null,s=null,c=0,d=!1,f=!1,p=0,h=!1,v=function(){var e=gt.get(t);if(gt.delete(t),e){var r=t.selection,o=Dt(t,e);!o||r&&n.Range.equals(o,r)||n.Transforms.select(t,o)}},g=function(){var e=vt.get(t);if(vt.delete(t),e){if(e.at){var r=n.Location.isPoint(e.at)?Nt(t,e.at):Dt(t,e.at);if(!r)return;var o=n.Editor.range(t,r);t.selection&&n.Range.equals(t.selection,o)||n.Transforms.select(t,r)}e.run()}},m=function(){if(!ut.get(t)||d)return!1;try{var e=fp.toDOMNode(t,t),n=fp.getWindow(t).document.activeElement;if(n!==e&&!e.contains(n))return!1}catch(e){}return Date.now()-c<5e3},y=function(){return!(null===(e=ht.get(t))||void 0===e||!e.some((function(e){var r=e.path;try{return 0===n.Node.leaf(t,r).text.length}catch(e){return!1}})))||C()&&void 0!==ft.get(t);var e},b=function(){if(u&&(clearTimeout(u),u=null),s&&(clearTimeout(s),s=null),!i&&m()&&y())u=setTimeout(b,50);else if(C()||S()){a||(a=!0,setTimeout((function(){return a=!1}))),S()&&(a="action");var e=t.selection&&n.Editor.rangeRef(t,t.selection,{affinity:"forward"});pt.set(t,t.marks),vt.get(t),ht.get(t);for(var l,c=C();l=null===(d=ht.get(t))||void 0===d?void 0:d[0];){var d,p,w=ft.get(t);void 0!==w&&(ft.delete(t),t.marks=w),w&&!1===h&&(h=null);var k=Tt(l);t.selection&&n.Range.equals(t.selection,k)||n.Transforms.select(t,k),l.diff.text?n.Editor.insertText(t,l.diff.text):n.Editor.deleteFragment(t),ht.set(t,null===(p=ht.get(t))||void 0===p?void 0:p.filter((function(e){return e.id!==l.id}))),Ct(t,l)||(c=!1,vt.delete(t),pt.delete(t),a="action",gt.delete(t),r.cancel(),o.cancel(),null==e||e.unref())}var E,x,O=null==e?void 0:e.unref();if(!O||gt.get(t)||t.selection&&n.Range.equals(O,t.selection)||n.Transforms.select(t,O),S())return x=t.children,g(),f&&t.children===x&&(null===(E=mt.get(t))||void 0===E||E()),void(f=!1);c&&r(),r.flush(),o.flush(),v();var P=pt.get(t);pt.delete(t),void 0!==P&&P!==t.marks&&(t.marks=P,t.onChange())}else v()},k=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=tt.get(t);n&&(C()||e?n.style.display="none":n.style.removeProperty("display"))},E=function(e,r){var o,a=null!==(o=ht.get(t))&&void 0!==o?o:[];ht.set(t,a);var i=n.Node.leaf(t,e),l=a.findIndex((function(t){return n.Path.equals(t.path,e)}));if(l<0)return Pt(i.text,r)&&a.push({path:e,diff:r,id:p++}),void k();var u=function(e,t,n){const r=Math.min(t.start,n.start),o=Math.max(0,Math.min(t.start+t.text.length,n.end)-n.start),a=Ot(e,t,n),i=Math.max(n.start+n.text.length,t.start+t.text.length+(t.start+t.text.length>n.start?n.text.length:0)-o),l=a.slice(r,i);return Pt(e,{start:r,end:Math.max(t.end,n.end-t.text.length+(t.end-t.start)),text:l})}(i.text,a[l].diff,r);if(!u)return a.splice(l,1),void k();a[l]=hp(hp({},a[l]),{},{diff:u})},x=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=n.at;h=!1,gt.delete(t),r.cancel(),o.cancel(),S()&&b(),s&&clearTimeout(s),vt.set(t,{at:a,run:e}),s=setTimeout(b)},S=function(){return!!vt.get(t)},C=function(){var e;return!(null===(e=ht.get(t))||void 0===e||!e.length)},O=function(e){gt.set(t,e),u&&(clearTimeout(u),u=null);var r=t.selection;if(e){var o=!r||!n.Path.equals(r.anchor.path,e.anchor.path),a=!r||!n.Path.equals(r.anchor.path.slice(0,-1),e.anchor.path.slice(0,-1));(o&&h||a)&&(h=!1),(o||C())&&(u=setTimeout(b,200))}},P=function(){S()||(s&&clearTimeout(s),s=setTimeout(b))};return{flush:b,flushDeferredDiffs:function(){if(!a&&m()&&y()){i=!0;try{b()}finally{i=!1}}},scheduleFlush:P,hasPendingDiffs:C,hasPendingAction:S,hasPendingChanges:function(){return S()||C()},isFlushing:function(){return a},handleUserSelect:O,handleCompositionEnd:function(e){if(l&&clearTimeout(l),y()&&!a)return dp.flushSync((function(){ut.set(t,!1),b()})),void k();l=setTimeout((function(){var e;(ut.set(t,!1),b(),d)&&(null===(e=mt.get(t))||void 0===e||e());k()}),25)},handleCompositionStart:function(e){ut.set(t,!0),c=Date.now(),d=!1,l&&(clearTimeout(l),l=null)},handleDOMBeforeInput:function(e){u&&(clearTimeout(u),u=null);var r=Ye.get(t),o=e.inputType;if("insertCompositionText"===o||"deleteCompositionText"===o)if(c=Date.now(),e.data)d=!1;else{d=!0;var a=ht.get(t);if(null!=a&&a.length){var i=a.every((function(e){var r=e.path;try{return 0===n.Node.leaf(t,r).text.length}catch(e){return!1}}));i&&(ht.set(t,[]),gt.delete(t))}}var l=null,s=e.dataTransfer||e.data||void 0;!1!==h&&"insertText"!==o&&"insertCompositionText"!==o&&(h=!1);var f=e.getTargetRanges(),p=w(f,1)[0];p&&!r&&(l=fp.toSlateRange(t,p,{exactMatch:!1,suppressThrow:!0}));var v=fp.getWindow(t).getSelection();if(l||!v||r||(p=v,l=fp.toSlateRange(t,v,{exactMatch:!1,suppressThrow:!0})),l=null!=l?l:t.selection){var g,m=!0;if(o.startsWith("delete")){var y=o.endsWith("Backward")?"backward":"forward",b=n.Range.edges(l),k=w(b,2),S=k[0],C=k[1],T=n.Editor.leaf(t,S.path),N=w(T,2),D=N[0],_=N[1];if(n.Range.isExpanded(l)&&D.text.length===S.offset&&0===C.offset){var R=n.Editor.next(t,{at:S.path,match:n.Node.isText});if(R&&n.Path.equals(R[1],C.path))if("backward"===y){l={anchor:C,focus:C},S=C;var M=w(R,2);D=M[0],_=M[1]}else l={anchor:S,focus:S},C=S}var L={text:"",start:S.offset,end:C.offset},z=ht.get(t),F=null==z?void 0:z.find((function(e){return n.Path.equals(e.path,_)})),I=F?[F.diff,L]:[L];if(0===Ot.apply(void 0,[D.text].concat(I)).length&&(m=!1),n.Range.isExpanded(l)){if(m&&n.Path.equals(l.anchor.path,l.focus.path)){var j={path:l.anchor.path,offset:S.offset},B=n.Editor.range(t,j,j);return O(B),E(l.anchor.path,{text:"",end:C.offset,start:S.offset}),void("deleteContentBackward"===o&&P())}return x((function(){return n.Editor.deleteFragment(t,{direction:y})}),{at:l})}}switch(o){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return x((function(){return n.Editor.deleteFragment(t)}),{at:l});case"deleteContent":case"deleteContentForward":var A=l.anchor;if(m&&n.Range.isCollapsed(l)){var W=n.Node.leaf(t,A.path);if(A.offset<W.text.length)return E(A.path,{text:"",start:A.offset,end:A.offset+1})}return x((function(){return n.Editor.deleteForward(t)}),{at:l});case"deleteContentBackward":var U,V=l.anchor,H=ke(p)?p.isCollapsed:!(null===(U=p)||void 0===U||!U.collapsed);return m&&H&&n.Range.isCollapsed(l)&&V.offset>0?(E(V.path,{text:"",start:V.offset-1,end:V.offset}),void P()):x((function(){return n.Editor.deleteBackward(t)}),{at:l});case"deleteEntireSoftLine":return x((function(){n.Editor.deleteBackward(t,{unit:"line"}),n.Editor.deleteForward(t,{unit:"line"})}),{at:l});case"deleteHardLineBackward":return x((function(){return n.Editor.deleteBackward(t,{unit:"block"})}),{at:l});case"deleteSoftLineBackward":return x((function(){return n.Editor.deleteBackward(t,{unit:"line"})}),{at:l});case"deleteHardLineForward":return x((function(){return n.Editor.deleteForward(t,{unit:"block"})}),{at:l});case"deleteSoftLineForward":return x((function(){return n.Editor.deleteForward(t,{unit:"line"})}),{at:l});case"deleteWordBackward":return x((function(){return n.Editor.deleteBackward(t,{unit:"word"})}),{at:l});case"deleteWordForward":return x((function(){return n.Editor.deleteForward(t,{unit:"word"})}),{at:l});case"insertLineBreak":return x((function(){return n.Editor.insertSoftBreak(t)}),{at:l});case"insertParagraph":return x((function(){return n.Editor.insertBreak(t)}),{at:l});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if("DataTransfer"===(null==(g=s)?void 0:g.constructor.name))return x((function(){return fp.insertData(t,s)}),{at:l});var q=null!=s?s:"";if(ft.get(t)&&(q=q.replace("\ufeff","")),"insertText"===o&&/.*\n.*\n$/.test(q)&&(q=q.slice(0,-1)),q.includes("\n"))return x((function(){var e=q.split("\n");e.forEach((function(r,o){r&&n.Editor.insertText(t,r),o!==e.length-1&&n.Editor.insertSoftBreak(t)}))}),{at:l});if(n.Path.equals(l.anchor.path,l.focus.path)){var K=n.Range.edges(l),$=w(K,2),Q=$[0],X=$[1],Y={start:Q.offset,end:X.offset,text:q};if(q&&h&&"insertCompositionText"===o){var G=h.start+h.text.search(/\S|$/);Y.start+Y.text.search(/\S|$/)===G+1&&Y.end===h.start+h.text.length?(Y.start-=1,h=null,P()):h=!1}else h="insertText"===o&&(null===h?Y:!(!h||!n.Range.isCollapsed(l)||h.end+h.text.length!==Q.offset)&&hp(hp({},h),{},{text:h.text+q}));if(m){var J=t.selection;if(E(Q.path,Y),J){var Z={path:Q.path,offset:Q.offset+q.length};x((function(){}),{at:Z})}return}}return x((function(){return n.Editor.insertText(t,q)}),{at:l})}}},handleKeyDown:function(e){C()||(k(!0),setTimeout(k))},handleDomMutations:function(e){var n;C()||e.some((function(n){return Te(t,n,e)}))&&(S()?f=!0:null===(n=mt.get(t))||void 0===n||n())},handleInput:function(){!S()&&C()||b()}}}var mp=Ke?t.useLayoutEffect:t.useEffect;var yp=["node"];function bp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var wp,kp={subtree:!0,childList:!0,characterData:!0},Ep=Fe?function(e){var n=e.node,r=u(e,yp);if(!Fe)return null;var o,a=ce(),i=(o=t.useRef(!1),t.useEffect((function(){return o.current=!0,function(){o.current=!1}}),[]),o.current),l=t.useState((function(){return gp(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bp(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({editor:a},r))})),s=w(l,1)[0];return function(e,n,r){var o=t.useState((function(){return new MutationObserver(n)})),a=w(o,1)[0];mp((function(){a.takeRecords()})),t.useEffect((function(){if(!e.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");return a.observe(e.current,r),function(){return a.disconnect()}}),[a,e,r])}(n,s.handleDomMutations,kp),dt.set(a,s.scheduleFlush),vp.set(a,s.flushDeferredDiffs),i&&s.flush(),s}:function(){return null},xp=[],Sp="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(wp||(wp={}));var Cp,Op=function(e){return Object.freeze(e)},Pp=function(e,t){this.inlineSize=e,this.blockSize=t,Op(this)},Tp=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Op(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),Np=function(e){return e instanceof SVGElement&&"getBBox"in e},Dp=function(e){if(Np(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,a=o.offsetWidth,i=o.offsetHeight;return!(a||i||e.getClientRects().length)},_p=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},Rp="undefined"!=typeof window?window:{},Mp=new WeakMap,Lp=/auto|scroll/,zp=/^tb|vertical/,Fp=/msie|trident/i.test(Rp.navigator&&Rp.navigator.userAgent),Ip=function(e){return parseFloat(e||"0")},jp=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new Pp((n?t:e)||0,(n?e:t)||0)},Bp=Op({devicePixelContentBoxSize:jp(),borderBoxSize:jp(),contentBoxSize:jp(),contentRect:new Tp(0,0,0,0)}),Ap=function(e,t){if(void 0===t&&(t=!1),Mp.has(e)&&!t)return Mp.get(e);if(Dp(e))return Mp.set(e,Bp),Bp;var n=getComputedStyle(e),r=Np(e)&&e.ownerSVGElement&&e.getBBox(),o=!Fp&&"border-box"===n.boxSizing,a=zp.test(n.writingMode||""),i=!r&&Lp.test(n.overflowY||""),l=!r&&Lp.test(n.overflowX||""),u=r?0:Ip(n.paddingTop),s=r?0:Ip(n.paddingRight),c=r?0:Ip(n.paddingBottom),d=r?0:Ip(n.paddingLeft),f=r?0:Ip(n.borderTopWidth),p=r?0:Ip(n.borderRightWidth),h=r?0:Ip(n.borderBottomWidth),v=d+s,g=u+c,m=(r?0:Ip(n.borderLeftWidth))+p,y=f+h,b=l?e.offsetHeight-y-e.clientHeight:0,w=i?e.offsetWidth-m-e.clientWidth:0,k=o?v+m:0,E=o?g+y:0,x=r?r.width:Ip(n.width)-k-w,S=r?r.height:Ip(n.height)-E-b,C=x+v+w+m,O=S+g+b+y,P=Op({devicePixelContentBoxSize:jp(Math.round(x*devicePixelRatio),Math.round(S*devicePixelRatio),a),borderBoxSize:jp(C,O,a),contentBoxSize:jp(x,S,a),contentRect:new Tp(d,u,x,S)});return Mp.set(e,P),P},Wp=function(e,t,n){var r=Ap(e,n),o=r.borderBoxSize,a=r.contentBoxSize,i=r.devicePixelContentBoxSize;switch(t){case wp.DEVICE_PIXEL_CONTENT_BOX:return i;case wp.BORDER_BOX:return o;default:return a}},Up=function(e){var t=Ap(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=Op([t.borderBoxSize]),this.contentBoxSize=Op([t.contentBoxSize]),this.devicePixelContentBoxSize=Op([t.devicePixelContentBoxSize])},Vp=function(e){if(Dp(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},Hp=function(){var e=1/0,t=[];xp.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new Up(t.target),o=Vp(t.target);r.push(n),t.lastReportedSize=Wp(t.target,t.observedBox),o<e&&(e=o)})),t.push((function(){n.callback.call(n.observer,r,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,r=t;n<r.length;n++){(0,r[n])()}return e},qp=function(e){xp.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(Vp(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},Kp=function(){var e,t=0;for(qp(t);xp.some((function(e){return e.activeTargets.length>0}));)t=Hp(),qp(t);return xp.some((function(e){return e.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:Sp}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=Sp),window.dispatchEvent(e)),t>0},$p=[],Qp=function(e){if(!Cp){var t=0,n=document.createTextNode("");new MutationObserver((function(){return $p.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),Cp=function(){n.textContent="".concat(t?t--:t++)}}$p.push(e),Cp()},Xp=0,Yp={attributes:!0,characterData:!0,childList:!0,subtree:!0},Gp=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Jp=function(e){return void 0===e&&(e=0),Date.now()+e},Zp=!1,eh=function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!Zp){Zp=!0;var n=Jp(e);!function(e){Qp((function(){requestAnimationFrame(e)}))}((function(){var r=!1;try{r=Kp()}finally{if(Zp=!1,e=n-Jp(),!Xp)return;r?t.run(1e3):e>0?t.run(e):t.start()}}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,Yp)};document.body?t():Rp.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Gp.forEach((function(t){return Rp.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Gp.forEach((function(t){return Rp.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}(),th=new eh,nh=function(e){!Xp&&e>0&&th.start(),!(Xp+=e)&&th.stop()},rh=function(){function e(e,t){this.target=e,this.observedBox=t||wp.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e,t=Wp(this.target,this.observedBox,!0);return e=this.target,Np(e)||function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),oh=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},ah=new WeakMap,ih=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},lh=function(){function e(){}return e.connect=function(e,t){var n=new oh(e,t);ah.set(e,n)},e.observe=function(e,t,n){var r=ah.get(e),o=0===r.observationTargets.length;ih(r.observationTargets,t)<0&&(o&&xp.push(r),r.observationTargets.push(new rh(t,n&&n.box)),nh(1),th.schedule())},e.unobserve=function(e,t){var n=ah.get(e),r=ih(n.observationTargets,t),o=1===n.observationTargets.length;r>=0&&(o&&xp.splice(xp.indexOf(n),1),n.observationTargets.splice(r,1),nh(-1))},e.disconnect=function(e){var t=this,n=ah.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),uh=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");lh.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!_p(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");lh.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!_p(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");lh.unobserve(this,e)},e.prototype.disconnect=function(){lh.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function sh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var ch=function(e){var r=e.isLast,o=e.leaf,a=e.parent,i=e.text,l=ce(),u=fp.findPath(l,i),s=n.Path.parent(u),c=Boolean(o[bt]);return l.isVoid(a)?t.createElement(ph,{length:n.Node.string(a).length}):""!==o.text||a.children[a.children.length-1]!==i||l.isInline(a)||""!==n.Editor.string(l,s)?""===o.text?t.createElement(ph,{isMarkPlaceholder:c}):r&&"\n"===o.text.slice(-1)?t.createElement(dh,{isTrailing:!0,text:o.text}):t.createElement(dh,{text:o.text}):t.createElement(ph,{isLineBreak:!0,isMarkPlaceholder:c})},dh=function(e){var n=e.text,r=e.isTrailing,o=void 0!==r&&r,a=ce(),i=t.useRef(null),l=function(){return"".concat(null!=n?n:"").concat(o?"\n":"")},u=t.useState(l),s=w(u,1)[0];return mp((function(){var e,t,r,u=l();if(i.current&&i.current.textContent!==u){if(Fe&&ut.get(a)){var s,c=null===(s=fp.getWindow(a).getSelection())||void 0===s?void 0:s.anchorNode;if(c&&i.current.contains(c))return}i.current.textContent=u}Ie&&(null===(r=i.current)||void 0===r||r.toggleAttribute("data-slate-trailing",o));var d=null===(e=i.current)||void 0===e?void 0:e.firstChild;Ie&&o&&1===(null===(t=i.current)||void 0===t?void 0:t.childNodes.length)&&3===(null==d?void 0:d.nodeType)&&d.splitText(n.length)})),t.createElement(fh,{ref:i},s)},fh=t.memo(t.forwardRef((function(e,n){return t.createElement("span",{"data-slate-string":!0,ref:n},e.children)}))),ph=function(e){var n=e.length,r=void 0===n?0:n,o=e.isLineBreak,a=void 0!==o&&o,i=e.isMarkPlaceholder,l={"data-slate-zero-width":a?"n":"z","data-slate-length":r};return void 0!==i&&i&&(l["data-slate-mark-placeholder"]=!0),t.createElement("span",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sh(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},l),"\ufeff",a?t.createElement("br",null):null)},hh=function(e,t){return e.children[e.children.length-1]===t},vh=function(e,t,r,o){return e===t||(a=e,i=t,l=Object.keys(a).filter((function(e){return"children"!==e})),u=Object.keys(i).filter((function(e){return"children"!==e})),l.length===u.length&&l.every((function(e){return e in i&&a[e]===i[e]}))&&hh(e,r)===hh(t,o)&&(""!==o.text||""===n.Node.string(e)==(""===n.Node.string(t))));var a,i,l,u};function gh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gh(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var yh=Fe?300:0;function bh(e){e.current&&(clearTimeout(e.current),e.current=null)}var wh=function(e){return t.createElement(xh,mh({},e))},kh=function(e){var n=e.leaf,r=e.isLast,o=e.text,a=e.parent,i=e.renderPlaceholder,l=e.renderLeaf,u=void 0===l?wh:l,s=e.leafPosition,c=ce(),d=t.useRef(null),f=t.useRef(null),p=t.useState(!1),h=w(p,2),v=h[0],g=h[1],m=t.useRef(null),y=t.useCallback((function(e){if(function(e,t){e.current&&(e.current.disconnect(),t&&(e.current=null))}(d,null==e),null==e){var t;tt.delete(c),null===(t=n.onPlaceholderResize)||void 0===t||t.call(n,null)}else{if(tt.set(c,e),!d.current){var r=window.ResizeObserver||uh;d.current=new r((function(){var t;null===(t=n.onPlaceholderResize)||void 0===t||t.call(n,e)}))}d.current.observe(e),f.current=e}}),[f,n,c]),b=t.createElement(ch,{isLast:r,leaf:n,parent:a,text:o}),k=Boolean(n[yt]);if(t.useEffect((function(){return k?m.current||(m.current=setTimeout((function(){g(!0),m.current=null}),yh)):(bh(m),g(!1)),function(){return bh(m)}}),[k,g]),k&&v){var E={children:n.placeholder,attributes:{"data-slate-placeholder":!0,style:{position:"absolute",top:0,pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",WebkitUserSelect:"none",textDecoration:"none",WebkitUserModify:je?"inherit":void 0},contentEditable:!1,ref:y}};b=t.createElement(t.Fragment,null,b,i(E))}return u({attributes:{"data-slate-leaf":!0},children:b,leaf:n,text:o,leafPosition:s})},Eh=t.memo(kh,(function(e,t){return vh(e.parent,t.parent,e.text,t.text)&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&n.Text.equals(t.leaf,e.leaf)&&t.leaf[yt]===e.leaf[yt]})),xh=function(e){var n=e.attributes,r=e.children;return t.createElement("span",mh({},n),r)},Sh=a((function(e){e.exports=function(e){if(Array.isArray(e))return g(e)},e.exports.__esModule=!0,e.exports.default=e.exports}));o(Sh);var Ch=a((function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports}));o(Ch);var Oh=a((function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports}));o(Oh);var Ph=a((function(e){e.exports=function(e){return Sh(e)||Ch(e)||m(e)||Oh()},e.exports.__esModule=!0,e.exports.default=e.exports})),Th=o(Ph);function Nh(e,n){var r,o=t.useReducer((function(e){return e+1}),0),a=w(o,2)[1],i=t.useRef(),l=t.useRef((function(){return null})),u=t.useRef(null);try{if(e!==l.current||i.current){var s=e();r=n(u.current,s)?u.current:s}else r=u.current}catch(e){throw i.current&&e instanceof Error&&(e.message+="\nThe error may be correlated with this previous error:\n".concat(i.current.stack,"\n\n")),e}return l.current=e,u.current=r,i.current=void 0,[r,t.useCallback((function(){try{var e=l.current();if(n(u.current,e))return;u.current=e}catch(e){e instanceof Error?i.current=e:i.current=new Error(String(e))}a()}),[])]}var Dh=t.createContext({}),_h=function(e,r){var o=ce(),a=t.useContext(Dh),i=a.decorate,l=a.addEventListener,u=Nh((function(){var t=fp.findPath(o,e),r=i([e,t]);if(n.Node.isText(e)){var a=n.Editor.range(o,t);return r.flatMap((function(e){var t=n.Range.intersection(e,a);return t?[t]:[]}))}return r}),n.Node.isText(e)?on:rn),s=w(u,2),c=s[0],d=s[1];return mp((function(){var e=l(d);return d(),e}),[l,d]),t.useMemo((function(){return[].concat(Th(c),Th(r))}),[c,r])};function Rh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rh(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Lh=function(e){return t.createElement(Ih,Mh({},e))},zh=function(e){for(var r=e.decorations,o=e.isLast,a=e.parent,i=e.renderPlaceholder,l=e.renderLeaf,u=e.renderText,s=void 0===u?Lh:u,c=e.text,d=ce(),f=t.useRef(null),p=_h(c,r),h=n.Text.decorations(c,p),v=fp.findKey(d,c),g=[],m=0;m<h.length;m++){var y=h[m],b=y.leaf,w=y.position;g.push(t.createElement(Eh,{isLast:o&&m===h.length-1,key:"".concat(v.id,"-").concat(m),renderPlaceholder:i,leaf:b,leafPosition:w,text:c,parent:a,renderLeaf:l}))}var k=t.useCallback((function(e){var t=at.get(d);e?(null==t||t.set(v,e),rt.set(c,e),nt.set(e,c)):(null==t||t.delete(v),rt.delete(c),f.current&&nt.delete(f.current)),f.current=e}),[f,d,v,c]);return s({text:c,children:g,attributes:{"data-slate-node":"text",ref:k}})},Fh=t.memo(zh,(function(e,t){return vh(e.parent,t.parent,e.text,t.text)&&t.isLast===e.isLast&&t.renderText===e.renderText&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&on(t.decorations,e.decorations)})),Ih=function(e){var n=e.attributes,r=e.children;return t.createElement("span",Mh({},n),r)};function jh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jh(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ah(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Wh(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wh(e,t):void 0}}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a}}}}function Wh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Uh=function(e){var t,r=Ah(e);try{for(r.s();!(t=r.n()).done;){var o=t.value,a=k(n.Node.string(o));if("neutral"!==a)return a}}catch(e){r.e(e)}finally{r.f()}},Vh=function(e){return t.createElement(Kh,Bh({},e))},Hh=function(e){var r=e.decorations,o=e.element,a=e.renderElement,i=void 0===a?Vh:a,l=e.renderChunk,u=e.renderPlaceholder,s=e.renderLeaf,c=e.renderText,d=ce(),f=hv(),p=d.isInline(o),h=_h(o,r),v=fp.findKey(d,o),g=t.useCallback((function(e){var t=at.get(d);e?(null==t||t.set(v,e),rt.set(o,e),nt.set(e,o)):(null==t||t.delete(v),rt.delete(o))}),[d,v,o]),m=dv({decorations:h,node:o,renderElement:i,renderChunk:l,renderPlaceholder:u,renderLeaf:s,renderText:c}),y={"data-slate-node":"element",ref:g};if(p&&(y["data-slate-inline"]=!0),!p&&n.Editor.hasInlines(d,o)){var b=n.Node.string(o),E=""===b?function(e){var t,n=Je.get(e),r=Ge.get(e);if(n&&void 0!==r){var o=n.children.slice(0,r).reverse(),a=n.children.slice(r+1);return null!==(t=Uh(o))&&void 0!==t?t:Uh(a)}}(o):k(b);"rtl"===E&&(y.dir=E)}if(n.Editor.isVoid(d,o)){y["data-slate-void"]=!0,!f&&p&&(y.contentEditable=!1);var x=p?"span":"div",S=n.Node.texts(o),C=w(S,1),O=w(C[0],1)[0];m=t.createElement(x,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute",userSelect:"none",WebkitUserSelect:"none"}},t.createElement(Fh,{renderPlaceholder:u,decorations:[],isLast:!1,parent:o,text:O})),Ge.set(O,0),Je.set(O,o)}return i({attributes:y,children:m,element:o})},qh=t.memo(Hh,(function(e,t){return e.element===t.element&&e.renderElement===t.renderElement&&e.renderChunk===t.renderChunk&&e.renderText===t.renderText&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&rn(e.decorations,t.decorations)})),Kh=function(e){var n=e.attributes,r=e.children,o=e.element,a=ce().isInline(o)?"span":"div";return t.createElement(a,Bh(Bh({},n),{},{style:{position:"relative"}}),r)},$h=a((function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports})),Qh=o($h),Xh=a((function(e){function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,d(r.key),r)}}e.exports=function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports})),Yh=o(Xh),Gh=function(){return Yh((function e(t,n){var r=n.chunkSize,o=n.debug;Qh(this,e),p(this,"root",void 0),p(this,"chunkSize",void 0),p(this,"debug",void 0),p(this,"reachedEnd",void 0),p(this,"pointerChunk",void 0),p(this,"pointerIndex",void 0),p(this,"pointerIndexStack",void 0),p(this,"cachedPointerNode",void 0),this.root=t,this.chunkSize=r,this.debug=null!=o&&o,this.pointerChunk=t,this.pointerIndex=-1,this.pointerIndexStack=[],this.reachedEnd=!1,this.validateState()}),[{key:"readLeaf",value:function(){if(this.reachedEnd)return null;for(;;){if(this.pointerIndex+1<this.pointerSiblings.length){this.pointerIndex++,this.cachedPointerNode=void 0;break}if("root"===this.pointerChunk.type)return this.reachedEnd=!0,null;this.exitChunk()}return this.validateState(),this.enterChunkUntilLeaf(!1),this.pointerNode}},{key:"returnToPreviousLeaf",value:function(){if(this.reachedEnd)return this.reachedEnd=!1,void this.enterChunkUntilLeaf(!0);for(;;){if(this.pointerIndex>=1){this.pointerIndex--,this.cachedPointerNode=void 0;break}if("root"===this.pointerChunk.type)return void(this.pointerIndex=-1);this.exitChunk()}this.validateState(),this.enterChunkUntilLeaf(!0)}},{key:"insertBefore",value:function(e){this.returnToPreviousLeaf(),this.insertAfter(e),this.readLeaf()}},{key:"insertAfter",value:function(e){if(0!==e.length){for(var t=0,n=0;"chunk"===this.pointerChunk.type&&this.pointerIndex===this.pointerSiblings.length-1;){var r=this.chunkSize-this.pointerSiblings.length,o=Math.min(r,e.length);if(o>0){var a=e.splice(0,o);this.rawInsertAfter(a,t)}this.exitChunk(),t++}if(0!==e.length){var i=this.savePointer(),l=null;if(this.readLeaf())for(;"chunk"===this.pointerChunk.type&&0===this.pointerIndex;){var u=this.chunkSize-this.pointerSiblings.length,s=Math.min(u,e.length);if(s>0){var c=e.splice(-s,s);this.pointerIndex=-1,this.cachedPointerNode=void 0,this.rawInsertAfter(c,n),l||(l=this.savePointer())}this.exitChunk(),n++}this.restorePointer(i);var d=Math.max(t,n);this.rawInsertAfter(e,d),l&&this.restorePointer(l),this.validateState()}}}},{key:"remove",value:function(){this.pointerSiblings.splice(this.pointerIndex--,1),this.cachedPointerNode=void 0,0===this.pointerSiblings.length&&"chunk"===this.pointerChunk.type?(this.exitChunk(),this.remove()):this.invalidateChunk(),this.validateState()}},{key:"invalidateChunk",value:function(){for(var e=this.pointerChunk;"chunk"===e.type;e=e.parent)this.root.modifiedChunks.add(e)}},{key:"atStart",get:function(){return"root"===this.pointerChunk.type&&-1===this.pointerIndex}},{key:"pointerSiblings",get:function(){return this.pointerChunk.children}},{key:"getPointerNode",value:function(){return this.reachedEnd||-1===this.pointerIndex?null:this.pointerSiblings[this.pointerIndex]}},{key:"pointerNode",get:function(){if(void 0!==this.cachedPointerNode)return this.cachedPointerNode;var e=this.getPointerNode();return this.cachedPointerNode=e,e}},{key:"getChunkPath",value:function(e){for(var t=[],n=e;"chunk"===n.type;n=n.parent){var r=n.parent.children.indexOf(n);if(-1===r)return null;t.unshift(r)}return t}},{key:"savePointer",value:function(){if(this.atStart)return"start";if(!this.pointerNode)throw new Error("Cannot save pointer when pointerNode is null");return{chunk:this.pointerChunk,node:this.pointerNode}}},{key:"restorePointer",value:function(e){if("start"===e)return this.pointerChunk=this.root,this.pointerIndex=-1,this.pointerIndexStack=[],this.reachedEnd=!1,void(this.cachedPointerNode=void 0);var t=e.chunk,n=e.node,r=t.children.indexOf(n);if(-1===r)throw new Error("Cannot restore point because saved node is no longer in saved chunk");var o=this.getChunkPath(t);if(!o)throw new Error("Cannot restore point because saved chunk is no longer connected to root");this.pointerChunk=t,this.pointerIndex=r,this.pointerIndexStack=o,this.reachedEnd=!1,this.cachedPointerNode=n,this.validateState()}},{key:"enterChunk",value:function(e){var t;if("chunk"!==(null===(t=this.pointerNode)||void 0===t?void 0:t.type))throw new Error("Cannot enter non-chunk");if(this.pointerIndexStack.push(this.pointerIndex),this.pointerChunk=this.pointerNode,this.pointerIndex=e?this.pointerSiblings.length-1:0,this.cachedPointerNode=void 0,this.validateState(),0===this.pointerChunk.children.length)throw new Error("Cannot enter empty chunk")}},{key:"enterChunkUntilLeaf",value:function(e){for(;"chunk"===(null===(t=this.pointerNode)||void 0===t?void 0:t.type);){var t;this.enterChunk(e)}}},{key:"exitChunk",value:function(){if("root"===this.pointerChunk.type)throw new Error("Cannot exit root");var e=this.pointerChunk;this.pointerChunk=e.parent,this.pointerIndex=this.pointerIndexStack.pop(),this.cachedPointerNode=void 0,this.validateState()}},{key:"rawInsertAfter",value:function(e,t){var n,r=this;if(0!==e.length){for(var o=function(e,t,n){if(1===n)return e;for(var a=[],i=0;i<r.chunkSize;i++){var l=e.slice(i*n,(i+1)*n);if(0===l.length)break;var u={type:"chunk",key:new Xe,parent:t,children:[]};u.children=o(l,u,n/r.chunkSize),a.push(u)}return a},a=this.pointerSiblings.length+e.length,i=0,l=this.chunkSize;l<a;l*=this.chunkSize)i++;var u=Math.max(i,t),s=Math.pow(this.chunkSize,u),c=o(e,this.pointerChunk,s);(n=this.pointerSiblings).splice.apply(n,[this.pointerIndex+1,0].concat(Th(c))),this.pointerIndex+=c.length,this.cachedPointerNode=void 0,this.invalidateChunk(),this.validateState()}}},{key:"validateState",value:function(){if(this.debug){var e=function(t){if("chunk"===t.type){var n=t.parent,r=t.children;if(!n.children.includes(t))throw new Error("Debug: Chunk ".concat(t.key.id," has an incorrect parent property"));r.forEach(e)}};if(this.root.children.forEach(e),void 0!==this.cachedPointerNode&&this.cachedPointerNode!==this.getPointerNode())throw new Error("Debug: The cached pointer is incorrect and has not been invalidated");var t=this.getChunkPath(this.pointerChunk);if(!t)throw new Error("Debug: The pointer chunk is not connected to the root");if(!n.Path.equals(this.pointerIndexStack,t))throw new Error("Debug: The cached index stack [".concat(this.pointerIndexStack.join(", "),"] does not match the path of the pointer chunk [").concat(t.join(", "),"]"))}}}])}(),Jh=function(){return Yh((function e(t,n){Qh(this,e),p(this,"editor",void 0),p(this,"children",void 0),p(this,"cachedKeys",void 0),p(this,"pointerIndex",void 0),this.editor=t,this.children=n,this.cachedKeys=new Array(n.length),this.pointerIndex=0}),[{key:"read",value:function(e){if(1===e)return[this.children[this.pointerIndex++]];var t=this.remaining(e);return this.pointerIndex+=e,t}},{key:"remaining",value:function(e){return void 0===e?this.children.slice(this.pointerIndex):this.children.slice(this.pointerIndex,this.pointerIndex+e)}},{key:"reachedEnd",get:function(){return this.pointerIndex>=this.children.length}},{key:"lookAhead",value:function(e,t){var n=this.children.indexOf(e,this.pointerIndex);if(n>-1)return n-this.pointerIndex;for(var r=this.pointerIndex;r<this.children.length;r++){var o=this.children[r];if(this.findKey(o,r)===t)return r-this.pointerIndex}return-1}},{key:"toChunkLeaves",value:function(e,t){var n=this;return e.map((function(e,r){return{type:"leaf",node:e,key:n.findKey(e,t+r),index:t+r}}))}},{key:"findKey",value:function(e,t){var n=this.cachedKeys[t];if(n)return n;var r=fp.findKey(this.editor,e);return this.cachedKeys[t]=r,r}}])}(),Zh=function(e,t){for(var n,r=t.chunkTree,o=t.children,a=t.chunkSize,i=t.rerenderChildren,l=void 0===i?[]:i,u=t.onInsert,s=t.onUpdate,c=t.onIndexChange,d=t.debug,f=new Gh(r,{chunkSize:a,debug:d}),p=new Jh(e,o),h=function(){var e=p.lookAhead(n.node,n.key),t=e>0&&r.movedNodeKeys.has(n.key);if(-1===e||t)return f.remove(),1;var o=p.pointerIndex,a=p.read(e+1),i=a.pop();if(a.length){var d=p.toChunkLeaves(a,o);f.insertBefore(d),a.forEach((function(e,t){null==u||u(e,o+t)}))}var h=p.pointerIndex-1;n.node!==i&&(n.node=i,f.invalidateChunk(),null==s||s(i,h)),n.index!==h&&(n.index=h,null==c||c(i,h)),l.includes(h)&&f.invalidateChunk()};n=f.readLeaf();)h();if(!p.reachedEnd){var v=p.remaining(),g=p.toChunkLeaves(v,p.pointerIndex);f.returnToPreviousLeaf(),f.insertAfter(g),v.forEach((function(e,t){null==u||u(e,p.pointerIndex+t)}))}r.movedNodeKeys.clear()};function ev(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ev(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ev(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var nv=new WeakMap,rv=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=fp.findKey(e,t),o=nv.get(r);return o||(o={type:"root",movedNodeKeys:new Set,modifiedChunks:new Set,children:[]},nv.set(r,o)),n.reconcile&&Zh(e,tv({chunkTree:o,children:t.children},n.reconcile)),o};function ov(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var av=function(e){return e.children},iv=function(e){var n=e.root,r=e.ancestor,o=e.renderElement,a=e.renderChunk,i=void 0===a?av:a;return r.children.map((function(e){if("chunk"===e.type){var a=e.key.id,l=i({highest:r===n,lowest:e.children.some((function(e){return"leaf"===e.type})),attributes:{"data-slate-chunk":!0},children:t.createElement(uv,{root:n,ancestor:e,renderElement:o,renderChunk:i})});return t.createElement(t.Fragment,{key:a},l)}var u=e.node;return o(u,e.index,e.key)}))},lv=function(e){return t.useEffect((function(){e.root.modifiedChunks.clear()})),t.createElement(iv,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ov(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ov(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e))},uv=t.memo(iv,(function(e,t){return e.root===t.root&&e.renderElement===t.renderElement&&e.renderChunk===t.renderChunk&&!t.root.modifiedChunks.has(t.ancestor)})),sv=t.createContext(null),cv=function(){return t.useContext(sv)},dv=function(e){var r=e.decorations,o=e.node,a=e.renderElement,i=e.renderChunk,l=e.renderPlaceholder,u=e.renderText,s=e.renderLeaf,c=ce();Ye.set(c,!1);var d=n.Node.isElement(o)&&!c.isInline(o)&&n.Editor.hasInlines(c,o)?null:c.getChunkSize(o),f=!!d,p=fv(c,o,r),h=p.decorationsByChild,v=p.childrenToRedecorate;f||o.children.forEach((function(e,t){Ge.set(e,t),Je.set(e,o)}));var g=t.useCallback((function(e,n,r){var o=null!=r?r:fp.findKey(c,e);return t.createElement(sv.Provider,{key:"provider-".concat(o.id),value:e},t.createElement(qh,{decorations:h[n],element:e,key:o.id,renderElement:a,renderChunk:i,renderPlaceholder:l,renderLeaf:s,renderText:u}))}),[c,h,a,i,l,s,u]);if(!f)return o.children.map((function(e,r){return n.Node.isText(e)?function(e,n){var r=fp.findKey(c,e);return t.createElement(Fh,{decorations:h[n],key:r.id,isLast:n===o.children.length-1,parent:o,renderPlaceholder:l,renderLeaf:s,renderText:u,text:e})}(e,r):g(e,r)}));var m=rv(c,o,{reconcile:{chunkSize:d,rerenderChildren:v,onInsert:function(e,t){Ge.set(e,t),Je.set(e,o)},onUpdate:function(e,t){Ge.set(e,t),Je.set(e,o)},onIndexChange:function(e,t){Ge.set(e,t)}}});return t.createElement(lv,{root:m,ancestor:m,renderElement:g,renderChunk:i})},fv=function(e,r,o){var a=((e,t,r)=>{const o=Array.from(t.children,(()=>[]));if(0===r.length)return o;const a=Et.findPath(e,t),i=a.length,l=n.Editor.range(e,a),u=new Array(t.children.length),s=t=>{const r=u[t];if(r)return r;const o=n.Editor.range(e,[...a,t]);return u[t]=o,o};for(const e of r){const t=n.Range.intersection(l,e);if(!t)continue;const[r,a]=n.Range.edges(t),u=r.path[i],c=a.path[i];for(let t=u;t<=c;t++){const r=o[t];if(!r)continue;const a=s(t),i=n.Range.intersection(a,e);i&&r.push(tn(tn({},e),i))}}return o})(e,r,o),i=t.useRef(a).current,l=[];i.length=a.length;for(var u=0;u<a.length;u++){var s,c=a[u],d=null!==(s=i[u])&&void 0!==s?s:null;rn(d,c)||(i[u]=c,l.push(u))}return{decorationsByChild:i,childrenToRedecorate:l}},pv=t.createContext(!1),hv=function(){return t.useContext(pv)},vv=t.createContext({}),gv=function(e,t){return e===t};function mv(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:gv,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.deferred,a=t.useContext(vv);if(!a)throw new Error("The `useSlateSelector` hook must be used inside the <Slate> component's context.");var i=a.addEventListener,l=ce(),u=t.useCallback((function(){return e(l)}),[l,e]),s=Nh(u,n),c=w(s,2),d=c[0],f=c[1];return mp((function(){var e=i(f,{deferred:o});return f(),e}),[i,f,o]),d}var yv=function(){var e=t.useContext(vv).addEventListener,n=t.useReducer((function(e){return e+1}),0),r=w(n,2)[1];if(!e)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");return mp((function(){return e(r)}),[e]),ce()},bv=new WeakMap;var wv=function(e){return be(e)&&e.hasAttribute("data-slate-placeholder")},kv=function(e,t){var n=[],r=function(){n=[]};return{registerMutations:function(r){var o;if(t.current){var a=r.filter((function(t){return o=(n=t).addedNodes,a=n.removedNodes,!((i=[].concat(Th(Array.from(o)),Th(Array.from(a)))).length>0&&i.every(wv))&&Te(e,t,r);var n,o,a,i}));(o=n).push.apply(o,Th(a))}},restoreDOM:function(){n.length>0&&(n.reverse().forEach((function(e){"characterData"!==e.type&&(e.removedNodes.forEach((function(t){e.target.insertBefore(t,e.nextSibling)})),e.addedNodes.forEach((function(t){e.target.removeChild(t)})))})),r())},clear:r}},Ev=function(e,t){var n=fp.toDOMRange(e,{anchor:t,focus:t}),r=Array.from(n.getClientRects()),o=w(r,1)[0];return(null!=o?o:n.getBoundingClientRect()).top},xv=function(e,t,r){var o=n.Editor.above(e,{at:t,match:function(t){return n.Node.isElement(t)&&e.isInline(t)}});if(!o||e.isVoid(o[0])||e.isElementReadOnly(o[0])||!(r?n.Editor.isStart(e,t,o[1]):n.Editor.isEnd(e,t,o[1])))return"character";if(r&&!n.Path.hasPrevious(o[1]))return"character";var a=r?n.Path.previous(o[1]):n.Path.next(o[1]);if(!n.Editor.hasPath(e,a))return"character";var i=n.Node.get(e,a);return n.Node.isText(i)&&""===i.text?"offset":"character"},Sv=function(e,t){var r=e.selection;if(r&&n.Range.isCollapsed(r)){var o=Pe(fp.findDocumentOrShadowRoot(e)),a=null==o?void 0:o.anchorNode;if(o&&function(e){return we(e)&&e.nodeType===e.TEXT_NODE}(a)){var i=o.anchorOffset,l=i-t.length;if(!(l<0||a.data.slice(l,i)!==t)&&fp.hasDOMNode(e,a,{editable:!0})){var u=fp.findPath(e,fp.toSlateNode(e,a));n.Path.equals(u,r.anchor.path)&&!n.Editor.void(e,{at:r})||a.deleteData(l,t.length)}}}};function Cv(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ov(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ov(e,t):void 0}}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a}}}}function Ov(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Pv=function(e,t){var r;return null===(r=n.Editor.above(e,{at:t,match:function(t){return n.Node.isElement(t)&&n.Editor.isBlock(e,t)}}))||void 0===r?void 0:r[1]},Tv=function(e,t){var r=n.Range.edges(t),o=w(r,2),a=o[0],i=o[1],l=Pv(e,a),u=Pv(e,i);return l&&u&&1===l.length&&1===u.length&&!(l[0]>=u[0])&&n.Editor.isStart(e,a,l)&&n.Editor.isStart(e,i,u)?Array.from({length:u[0]-l[0]},(function(e,t){return[l[0]+t]})):null},Nv=function(e,t){if(n.Range.isCollapsed(t)){var r=n.Editor.void(e,{at:t});r&&n.Transforms.removeNodes(e,{at:r[1],voids:!0})}else{var o=Tv(e,t);if(!o)return n.Transforms.select(e,t),void n.Editor.deleteFragment(e);var a=n.Editor.pathRef(e,n.Path.next(o[o.length-1]));n.Editor.withoutNormalizing(e,(function(){var t,r=Cv(Th(o).reverse());try{for(r.s();!(t=r.n()).done;){var a=t.value;n.Transforms.removeNodes(e,{at:a})}}catch(e){r.e(e)}finally{r.f()}}));var i=a.unref();i&&n.Transforms.select(e,n.Editor.start(e,i))}},Dv=a((function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports}));o(Dv);var _v=a((function(e){var t=s.default;e.exports=function(e,n){if(n&&("object"==t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return Dv(e)},e.exports.__esModule=!0,e.exports.default=e.exports})),Rv=o(_v),Mv=a((function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})),Lv=o(Mv),zv=a((function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}));o(zv);var Fv=a((function(e){e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zv(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports})),Iv=o(Fv);function jv(e,t,n){return t=Lv(t),Rv(e,Bv()?Reflect.construct(t,n||[],Lv(e).constructor):t.apply(e,n))}function Bv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Bv=function(){return!!e})()}var Av={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0},Wv=function(e){function t(){var e;Qh(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e=jv(this,t,[].concat(r)),p(e,"context",null),p(e,"manager",null),p(e,"mutationObserver",null),e}return Iv(t,e),Yh(t,[{key:"observe",value:function(){var e,t=this.props.node;if(!t.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");null===(e=this.mutationObserver)||void 0===e||e.observe(t.current,Av)}},{key:"componentDidMount",value:function(){var e=this.props.receivedUserInput,t=this.context;this.manager=kv(t,e),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}},{key:"getSnapshotBeforeUpdate",value:function(){var e,t,n,r,o=null===(e=this.mutationObserver)||void 0===e?void 0:e.takeRecords();null!=o&&o.length&&(null===(r=this.manager)||void 0===r||r.registerMutations(o));return null===(t=this.mutationObserver)||void 0===t||t.disconnect(),null===(n=this.manager)||void 0===n||n.restoreDOM(),null}},{key:"componentDidUpdate",value:function(){var e;null===(e=this.manager)||void 0===e||e.clear(),this.observe()}},{key:"componentWillUnmount",value:function(){var e;null===(e=this.mutationObserver)||void 0===e||e.disconnect()}},{key:"render",value:function(){return this.props.children}}])}(t.Component);p(Wv,"contextType",se);var Uv=Fe?Wv:function(e){var n=e.children;return t.createElement(t.Fragment,null,n)},Vv=t.createContext(!1),Hv=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderChunk","renderLeaf","renderText","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],qv=["text"];function Kv(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return $v(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$v(e,t):void 0}}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a}}}}function $v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Qv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qv(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Yv=function(e){return t.createElement(t.Fragment,null,dv(e))},Gv=t.forwardRef((function(e,r){var o=t.useCallback((function(e){return t.createElement(ng,Xv({},e))}),[]),a=e.autoFocus,i=e.decorate,l=void 0===i?rg:i,s=e.onDOMBeforeInput,c=e.placeholder,d=e.readOnly,f=void 0!==d&&d,h=e.renderElement,v=e.renderChunk,g=e.renderLeaf,m=e.renderText,y=e.renderPlaceholder,b=void 0===y?o:y,E=e.scrollSelectionIntoView,x=void 0===E?og:E,S=e.style,C=void 0===S?{}:S,O=e.as,P=void 0===O?"div":O,T=e.disableDefaultStyles,N=void 0!==T&&T,D=u(e,Hv),_=yv(),R=t.useState(!1),M=w(R,2),L=M[0],z=M[1],F=t.useRef(null),I=t.useRef(_.children),j=t.useRef(_.selection),B=t.useRef(!1),A=t.useRef([]),W=t.useState(),U=w(W,2),V=U[0],H=U[1],q=t.useRef(!1),K=function(e){var n=t.useMemo((function(){var t=kv(e,{current:!0}),n=null,r=function(){null!=n||(n=new MutationObserver(t.registerMutations)),n.observe(fp.toDOMNode(e,e),{childList:!0,subtree:!0})},o=function(){n&&(t.registerMutations(n.takeRecords()),n.disconnect())};return{observe:r,track:function(e){(n||null!=e&&e.includes("\n"))&&r()},pause:o,restore:function(){o(),t.restoreDOM()},clear:function(){var e;null===(e=n)||void 0===e||e.disconnect(),n=null,t.clear()}}}),[e]);return t.useEffect((function(){return function(){return n.clear()}}),[n]),n}(_),$=t.useRef(!1),Q=function(){var e=ce(),n=t.useRef(!1),r=t.useRef(0),o=t.useCallback((function(){if(!n.current){n.current=!0;var t=fp.getWindow(e);t.cancelAnimationFrame(r.current),r.current=t.requestAnimationFrame((function(){n.current=!1}))}}),[e]);return t.useEffect((function(){return function(){return cancelAnimationFrame(r.current)}}),[]),{receivedUserInput:n,onUserInput:o}}(),X=Q.onUserInput,Y=Q.receivedUserInput,G=t.useReducer((function(e){return e+1}),0),J=w(G,2)[1];mt.set(_,J),it.set(_,f);var Z=t.useMemo((function(){return{isDraggingInternally:!1,pendingSelection:null,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}}),[]);t.useEffect((function(){F.current&&a&&(_.children.length>0?fp.focus(_):F.current.focus())}),[a,_]);var ne=t.useRef(),re=t.useMemo((function(){return te((function(){if(Ye.get(_))re();else{Z.pendingSelection=null;var e=fp.toDOMNode(_,_).getRootNode();if(!q.current&&je&&e instanceof ShadowRoot){q.current=!0;var t=(()=>{let e=document.activeElement;for(;null!==(t=e)&&void 0!==t&&t.shadowRoot&&null!==(n=e.shadowRoot)&&void 0!==n&&n.activeElement;){var t,n,r;e=null===(r=e)||void 0===r||null===(r=r.shadowRoot)||void 0===r?void 0:r.activeElement}return e})();return t?document.execCommand("indent"):n.Transforms.deselect(_),void(q.current=!1)}var r=ne.current;if((Fe||!fp.isComposing(_))&&(!Z.isUpdatingSelection||null!=r&&r.isFlushing())&&!Z.isDraggingInternally){var o=fp.findDocumentOrShadowRoot(_),a=o.activeElement,i=fp.toDOMNode(_,_),l=Pe(o);if(a===i?(Z.latestElement=a,lt.set(_,!0)):lt.delete(_),!l)return n.Transforms.deselect(_);var u=l.anchorNode,s=l.focusNode,c=fp.hasEditableTarget(_,u)||fp.isTargetInsideNonReadonlyVoid(_,u),d=fp.hasTarget(_,s),p=we(a)&&i.contains(a);if(c&&d&&(f||p)){var h=fp.toSlateRange(_,l,{exactMatch:!1,suppressThrow:!0});if(h)if(fp.isComposing(_)||null!=r&&r.hasPendingChanges()||null!=r&&r.isFlushing())null==r||r.handleUserSelect(h);else l.isCollapsed&&!Zv(u)&&_.selection&&n.Range.equals(h,_.selection)?eg(_,l,Z):n.Transforms.select(_,h)}!f||c&&d||n.Transforms.deselect(_)}}}),100)}),[_,f,Z]),oe=t.useMemo((function(){return ee(re,0)}),[re]),ae=t.useCallback((function(){var e=fp.toDOMNode(_,_).getRootNode();oe.flush(),je&&e instanceof ShadowRoot||re(),re.flush()}),[_,re,oe]);ne.current=Ep({node:F,onDOMSelectionChange:re,scheduleOnDOMSelectionChange:oe}),mp((function(){var e,t,r;F.current&&(r=ye(F.current))?(Ze.set(_,r),et.set(_,F.current),rt.set(_,F.current),nt.set(F.current,_)):rt.delete(_);var o=_.selection,a=B.current;B.current=!1;var i=a&&I.current!==_.children&&!!o&&(!j.current||!n.Range.equals(j.current,o));I.current=_.children,j.current=o;var l=fp.findDocumentOrShadowRoot(_),u=Pe(l);if(u&&fp.isFocused(_)&&(null===(e=ne.current)||void 0===e||!e.hasPendingAction())){var s=function(e){var t="None"!==u.type;if(o||t){var r,a=u.focusNode;if(Ie&&u.rangeCount>1){var l=u.getRangeAt(0),s=u.getRangeAt(u.rangeCount-1);r=l.startContainer===a?s.endContainer:l.startContainer}else r=u.anchorNode;var c=et.get(_),d=!1;if(_e(c,r)&&_e(c,a)&&(d=!0),t&&d&&o&&!e){var f,p=fp.toSlateRange(_,u,{exactMatch:!0,suppressThrow:!0});if(p&&n.Range.equals(p,o)&&(!Z.hasMarkPlaceholder||null!==(f=r)&&void 0!==f&&null!==(f=f.parentElement)&&void 0!==f&&f.hasAttribute("data-slate-mark-placeholder")))return void(i&&x(_,u.getRangeAt(0)))}if(!o||fp.hasRange(_,o)){var h=Z.pendingSelection;if(Z.pendingSelection=null,!h||e||h.basedOn!==o||o&&n.Range.equals(h.range,o)){Z.isUpdatingSelection=!0;var v=null;try{v=o&&fp.toDOMRange(_,o)}catch(e){}return v?(fp.isComposing(_)&&!Fe?u.rangeCount>0&&u.collapseToEnd():n.Range.isBackward(o)?u.setBaseAndExtent(v.endContainer,v.endOffset,v.startContainer,v.startOffset):u.setBaseAndExtent(v.startContainer,v.startOffset,v.endContainer,v.endOffset),x(_,v)):u.removeAllRanges(),v}n.Transforms.select(_,h.range)}else _.selection=fp.toSlateRange(_,u,{exactMatch:!1,suppressThrow:!0})}};u.rangeCount<=1&&s();var c="action"===(null===(t=ne.current)||void 0===t?void 0:t.isFlushing());if(Fe&&c){var d=null,f=requestAnimationFrame((function(){if(c){var e=function(e){try{fp.toDOMNode(_,_).focus(),s(e)}catch(e){}};e(),d=setTimeout((function(){e(!0),Z.isUpdatingSelection=!1}))}}));return function(){cancelAnimationFrame(f),d&&clearTimeout(d)}}setTimeout((function(){Z.isUpdatingSelection=!1}))}}));var ie=t.useCallback((function(e){if(fp.hasEditableTarget(_,e.target)){ug(_,e);var t=fp.toDOMNode(_,_).getRootNode();if(null!=q&&q.current&&je&&t instanceof ShadowRoot){var r=e.getTargetRanges()[0],o=new window.Range;o.setStart(r.startContainer,r.startOffset),o.setEnd(r.endContainer,r.endOffset);var a=fp.toSlateRange(_,o,{exactMatch:!1,suppressThrow:!0});return a&&n.Transforms.select(_,a),e.preventDefault(),void e.stopImmediatePropagation()}if(X(),B.current=!0,!f&&!lg(e,s)){var i;if(ne.current)return ne.current.handleDOMBeforeInput(e);ae();var l=_.selection,u=e.inputType,c=e.dataTransfer||e.data||void 0,d="insertCompositionText"===u||"deleteCompositionText"===u;if(d&&fp.isComposing(_))return void((Ae||$.current)&&K.track(e.data));var p=!1;if("insertText"===u&&l&&n.Range.isCollapsed(l)&&e.data&&1===e.data.length&&/[a-z ]/i.test(e.data)&&0!==l.anchor.offset){var h;p=!0,_.marks&&(p=!1);var v=null===(h=Pe(fp.findDocumentOrShadowRoot(_)))||void 0===h?void 0:h.anchorNode;if(Zv(v)||(p=!1),!Ye.get(_)){var g,m,y=l.anchor,b=fp.toDOMPoint(_,y),k=w(b,2),E=k[0],x=k[1],S=null===(g=E.parentElement)||void 0===g?void 0:g.closest("a"),C=fp.getWindow(_);if(p&&S&&fp.hasDOMNode(_,S)){var O,P=null==C?void 0:C.document.createTreeWalker(S,NodeFilter.SHOW_TEXT).lastChild();P===E&&(null===(O=P.textContent)||void 0===O?void 0:O.length)===x&&(p=!1)}if(p&&E.parentElement&&"pre"===(null==C||null===(m=C.getComputedStyle(E.parentElement))||void 0===m?void 0:m.whiteSpace)){var T=n.Editor.above(_,{at:y.path,match:function(e){return n.Node.isElement(e)&&n.Editor.isBlock(_,e)}});T&&n.Node.string(T[0]).includes("\t")&&(p=!1)}}}if((!u.startsWith("delete")||u.startsWith("deleteBy"))&&!Ye.get(_)){var N=e.getTargetRanges(),D=w(N,1)[0];if(D){var R=fp.toSlateRange(_,D,{exactMatch:!1,suppressThrow:!0});if(R){if(!l||!n.Range.equals(l,R)){p=!1;var M=!d&&_.selection&&!function(e,t,r){if(!n.Range.isCollapsed(t)||!n.Range.isCollapsed(r))return!1;var o=n.Path.isBefore(t.anchor.path,r.anchor.path)?[t.anchor,r.anchor]:[r.anchor,t.anchor],a=w(o,2),i=a[0],l=a[1];if(0!==l.offset||!n.Path.equals(n.Path.next(i.path),l.path))return!1;var u=n.Node.get(e,i.path);return n.Node.isText(u)&&i.offset===u.text.length}(_,_.selection,R)&&n.Editor.rangeRef(_,_.selection);n.Transforms.select(_,R),M&&st.set(_,M)}}else p=!1}}if(d)return;if(p||e.preventDefault(),l&&n.Range.isExpanded(l)&&u.startsWith("delete")){var L=u.endsWith("Backward")?"backward":"forward";return void n.Editor.deleteFragment(_,{direction:L})}switch(u){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":n.Editor.deleteFragment(_);break;case"deleteContent":case"deleteContentForward":n.Editor.deleteForward(_);break;case"deleteContentBackward":n.Editor.deleteBackward(_);break;case"deleteEntireSoftLine":n.Editor.deleteBackward(_,{unit:"line"}),n.Editor.deleteForward(_,{unit:"line"});break;case"deleteHardLineBackward":n.Editor.deleteBackward(_,{unit:"block"});break;case"deleteSoftLineBackward":n.Editor.deleteBackward(_,{unit:"line"});break;case"deleteHardLineForward":n.Editor.deleteForward(_,{unit:"block"});break;case"deleteSoftLineForward":n.Editor.deleteForward(_,{unit:"line"});break;case"deleteWordBackward":n.Editor.deleteBackward(_,{unit:"word"});break;case"deleteWordForward":n.Editor.deleteForward(_,{unit:"word"});break;case"insertLineBreak":n.Editor.insertSoftBreak(_);break;case"insertParagraph":n.Editor.insertBreak(_);break;case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":"insertFromComposition"===u&&fp.isComposing(_)&&(z(!1),ut.set(_,!1)),"DataTransfer"===(null==c?void 0:c.constructor.name)?fp.insertData(_,c):"string"==typeof c&&(p?A.current.push((function(){return n.Editor.insertText(_,c)})):n.Editor.insertText(_,c))}var F=null===(i=st.get(_))||void 0===i?void 0:i.unref();st.delete(_),!F||_.selection&&n.Range.equals(_.selection,F)||n.Transforms.select(_,F)}}}),[_,X,s,K,ae,f]),le=t.useCallback((function(e){null==e?(re.cancel(),oe.cancel(),et.delete(_),rt.delete(_),F.current&&$e&&F.current.removeEventListener("beforeinput",ie)):$e&&e.addEventListener("beforeinput",ie),F.current=e,"function"==typeof r?r(e):r&&(r.current=e)}),[re,oe,_,ie,r]);mp((function(){var e=fp.getWindow(_),t=function(e){var t=e.target,n=t instanceof HTMLElement?t:null,r=null==n?void 0:n.tagName;"INPUT"!==r&&"TEXTAREA"!==r&&(Z.pendingSelection=function(){var e=ne.current;if(Z.isUpdatingSelection||Z.isDraggingInternally||fp.isComposing(_)||null!=e&&e.hasPendingChanges()||null!=e&&e.isFlushing()||Ye.get(_))return null;var t=Pe(fp.findDocumentOrShadowRoot(_));if(!t||!fp.hasEditableTarget(_,t.anchorNode)&&!fp.isTargetInsideNonReadonlyVoid(_,t.anchorNode)||!fp.hasTarget(_,t.focusNode))return null;var n=fp.toSlateRange(_,t,{exactMatch:!1,suppressThrow:!0});return n?{range:n,basedOn:_.selection}:null}(),oe())};e.document.addEventListener("selectionchange",t);var n=function(){Z.isDraggingInternally=!1};return e.document.addEventListener("dragend",n),e.document.addEventListener("drop",n),function(){e.document.removeEventListener("selectionchange",t),e.document.removeEventListener("dragend",n),e.document.removeEventListener("drop",n)}}),[_,oe,Z]);var ue=l([_,[]]),se=function(e){var n=t.useReducer((function(e){return e+1}),0),r=w(n,2)[1],o=t.useRef(new Set),a=t.useRef(!1),i=t.useRef(e);mp((function(){i.current=e,o.current.forEach((function(e){return e()})),a.current?r():a.current=!0}),[e]);var l=t.useCallback((function(e){return i.current(e)}),[]),u=t.useCallback((function(e){return o.current.add(e),function(){o.current.delete(e)}}),[]);return t.useMemo((function(){return{decorate:l,addEventListener:u}}),[l,u])}(l),de=c&&1===_.children.length&&1===Array.from(n.Node.texts(_)).length&&""===n.Node.string(_)&&!L,fe=t.useCallback((function(e){var t;e&&de?H(null===(t=e.getBoundingClientRect())||void 0===t?void 0:t.height):H(void 0)}),[de]);if(de){var pe=n.Editor.start(_,[]);ue.push(p(p(p(p(p({},yt,!0),"placeholder",c),"onPlaceholderResize",fe),"anchor",pe),"focus",pe))}var he,ve=_.marks;if(Z.hasMarkPlaceholder=!1,_.selection&&n.Range.isCollapsed(_.selection)&&ve){var ge=_.selection.anchor,me=n.Node.leaf(_,ge.path);me.text;var ke=u(me,qv);if(!n.Text.equals(me,ve,{loose:!0})){Z.hasMarkPlaceholder=!0;var Ee=Object.fromEntries(Object.keys(ke).map((function(e){return[e,null]})));ue.push(Xv(Xv(Xv(p({},bt,!0),Ee),ve),{},{anchor:ge,focus:ge}))}}return t.useEffect((function(){setTimeout((function(){var e=_.selection;if(e){var t=e.anchor,r=n.Node.leaf(_,t.path);if(ve&&!n.Text.equals(r,ve,{loose:!0}))return void ft.set(_,ve)}ft.delete(_)}))})),he=t.useContext(vv).flushDeferred,mp(he),t.createElement(pv.Provider,{value:f},t.createElement(Vv.Provider,{value:L},t.createElement(Dh.Provider,{value:se},t.createElement(Uv,{node:F,receivedUserInput:Y},t.createElement(P,Xv(Xv({role:f?void 0:"textbox","aria-multiline":!f||void 0,translate:"no"},D),{},{spellCheck:!(!$e&&Ke)&&D.spellCheck,autoCorrect:$e||!Ke?D.autoCorrect:"false",autoCapitalize:$e||!Ke?D.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!f,zindex:-1,suppressContentEditableWarning:!0,ref:le,style:Xv(Xv({},N?{}:Xv({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},V?{minHeight:V}:{})),C),onBeforeInput:t.useCallback((function(e){if(!$e&&!f&&!ag(e,D.onBeforeInput)&&fp.hasSelectableTarget(_,e.target)&&(e.preventDefault(),!fp.isComposing(_))){var t=e.data;n.Editor.insertText(_,t)}}),[D.onBeforeInput,_,f]),onInput:t.useCallback((function(e){if(fp.hasEditableTarget(_,e.target)&&(K.pause(),!ag(e,D.onInput)))if(ne.current)ne.current.handleInput();else{var t,n=Kv(A.current);try{for(n.s();!(t=n.n()).done;){(0,t.value)()}}catch(e){n.e(e)}finally{n.f()}A.current=[],fp.isFocused(_)||ug(_,e.nativeEvent)}}),[D.onInput,_,K]),onBlur:t.useCallback((function(e){if(!f&&!Z.isUpdatingSelection&&fp.hasSelectableTarget(_,e.target)&&!ag(e,D.onBlur)){var t=fp.findDocumentOrShadowRoot(_);if(Z.latestElement!==t.activeElement){var r=e.relatedTarget;if(!(r===fp.toDOMNode(_,_)||be(r)&&r.hasAttribute("data-slate-spacer"))){if(null!=r&&we(r)&&fp.hasDOMNode(_,r)){var o=fp.toSlateNode(_,r);if(n.Node.isElement(o)&&!_.isVoid(o))return}if(je){var a=Pe(t);null==a||a.removeAllRanges()}lt.delete(_)}}}}),[f,Z.isUpdatingSelection,Z.latestElement,_,D.onBlur]),onClick:t.useCallback((function(e){if(fp.hasTarget(_,e.target)&&ae(),fp.hasTarget(_,e.target)&&!ag(e,D.onClick)&&we(e.target)){var t=fp.toSlateNode(_,e.target),r=fp.findPath(_,t);if(!n.Editor.hasPath(_,r)||n.Node.get(_,r)!==t)return;if(3===e.detail&&r.length>=1){var o=r;if(!n.Node.isElement(t)||!n.Editor.isBlock(_,t)){var a,i=n.Editor.above(_,{match:function(e){return n.Node.isElement(e)&&n.Editor.isBlock(_,e)},at:r});o=null!==(a=null==i?void 0:i[1])&&void 0!==a?a:r.slice(0,1)}var l=n.Editor.range(_,o);return void n.Transforms.select(_,l)}if(f)return;var u=n.Editor.start(_,r),s=n.Editor.end(_,r),c=n.Editor.void(_,{at:u}),d=n.Editor.void(_,{at:s}),p=_.selection&&n.Range.isCollapsed(_.selection)&&n.Editor.void(_,{at:_.selection.anchor});if(e.shiftKey&&p&&!n.Path.isAncestor(p[1],r)&&(!c||!n.Path.equals(c[1],p[1]))){var h=fp.findEventRange(_,e),v=n.Editor.start(_,p[1]),g=n.Editor.end(_,p[1]),m=n.Point.isBefore(h.anchor,v)?g:v;return void n.Transforms.select(_,{anchor:m,focus:h.anchor})}if(c&&d&&n.Path.equals(c[1],d[1])){if(e.shiftKey&&_.selection){var y=_.selection.anchor,b=n.Point.isBefore(y,u)?s:u;return void n.Transforms.select(_,{anchor:y,focus:b})}var w=n.Editor.range(_,u);n.Transforms.select(_,w)}}}),[_,D.onClick,f,ae]),onCompositionEnd:t.useCallback((function(e){if(!ig(e)&&fp.hasSelectableTarget(_,e.target)){var t;fp.isComposing(_)&&Promise.resolve().then((function(){z(!1),ut.set(_,!1)})),null===(t=ne.current)||void 0===t||t.handleCompositionEnd(e);var r=$.current;if($.current=!1,ag(e,D.onCompositionEnd)||Fe)return void K.clear();if(r&&!e.data&&(K.restore(),n.Editor.deleteFragment(_)),!je&&!Ve&&!Le&&!qe&&!He&&e.data){var o=ft.get(_);ft.delete(_),void 0!==o&&(pt.set(_,_.marks),_.marks=o),K.restore(),Sv(_,e.data),n.Editor.insertText(_,e.data);var a=pt.get(_);pt.delete(_),void 0!==a&&(_.marks=a)}K.clear()}}),[D.onCompositionEnd,_,K]),onCompositionUpdate:t.useCallback((function(e){!fp.hasSelectableTarget(_,e.target)||ag(e,D.onCompositionUpdate)||ig(e)||fp.isComposing(_)||(z(!0),ut.set(_,!0))}),[D.onCompositionUpdate,_]),onCompositionStart:t.useCallback((function(e){if(!ig(e)&&fp.hasSelectableTarget(_,e.target)){var t;if(null===(t=ne.current)||void 0===t||t.handleCompositionStart(e),ag(e,D.onCompositionStart)||Fe)return;K.clear(),z(!0),ae();var r=_.selection;if(r&&n.Range.isExpanded(r))return Ie&&!Ve?(K.observe(),void($.current=!0)):void n.Editor.deleteFragment(_)}}),[D.onCompositionStart,_,K,ae]),onCopy:t.useCallback((function(e){!fp.hasSelectableTarget(_,e.target)||ag(e,D.onCopy)||ig(e)||(e.preventDefault(),fp.setFragmentData(_,e.clipboardData,"copy"))}),[D.onCopy,_]),onCut:t.useCallback((function(e){if(!f&&fp.hasSelectableTarget(_,e.target)&&!ag(e,D.onCut)&&!ig(e)){e.preventDefault(),tg(_),fp.setFragmentData(_,e.clipboardData,"cut");var t=_.selection;if(t)if(n.Range.isExpanded(t))Nv(_,t);else{var r=n.Node.parent(_,t.anchor.path);n.Editor.isVoid(_,r)&&n.Transforms.delete(_)}}}),[f,_,D.onCut]),onDragOver:t.useCallback((function(e){if(fp.hasTarget(_,e.target)&&!ag(e,D.onDragOver)){var t=fp.toSlateNode(_,e.target);n.Node.isElement(t)&&n.Editor.isVoid(_,t)&&e.preventDefault()}}),[D.onDragOver,_]),onDragStart:t.useCallback((function(e){if(!f&&fp.hasTarget(_,e.target)&&!ag(e,D.onDragStart)){var t=fp.toSlateNode(_,e.target),r=fp.findPath(_,t);if(n.Node.isElement(t)&&n.Editor.isVoid(_,t)||n.Editor.void(_,{at:r,voids:!0})){var o=n.Editor.range(_,r);n.Transforms.select(_,o)}tg(_),Z.isDraggingInternally=!0,fp.setFragmentData(_,e.dataTransfer,"drag")}}),[f,_,D.onDragStart,Z]),onDrop:t.useCallback((function(e){if(!f&&fp.hasTarget(_,e.target)&&!ag(e,D.onDrop)){e.preventDefault();var t=_.selection,r=fp.findEventRange(_,e),o=e.dataTransfer;if(n.Transforms.select(_,r),Z.isDraggingInternally&&t){if(n.Range.includes(t,r.anchor))return;if(!n.Editor.void(_,{at:r,voids:!0})){var a=n.Editor.rangeRef(_,r);Nv(_,t);var i=a.unref();i&&n.Transforms.select(_,i)}}fp.insertData(_,o),fp.isFocused(_)||fp.focus(_)}}),[f,_,D.onDrop,Z]),onDragEnd:t.useCallback((function(e){!f&&Z.isDraggingInternally&&D.onDragEnd&&fp.hasTarget(_,e.target)&&D.onDragEnd(e)}),[f,Z,D,_]),onFocus:t.useCallback((function(e){if(!f&&!Z.isUpdatingSelection&&fp.hasEditableTarget(_,e.target)&&!ag(e,D.onFocus)){var t=fp.toDOMNode(_,_),n=fp.findDocumentOrShadowRoot(_);if(Z.latestElement=n.activeElement,Ie&&e.target!==t)return void t.focus();lt.set(_,!0)}}),[f,Z,_,D.onFocus]),onKeyDown:t.useCallback((function(e){if(!f&&fp.hasEditableTarget(_,e.target)){var t;null===(t=ne.current)||void 0===t||t.handleKeyDown(e);var r=e.nativeEvent;if(fp.isComposing(_)&&(!1===r.isComposing||Jv(_,r))&&(ut.set(_,!1),z(!1)),ag(e,D.onKeyDown)||fp.isComposing(_))return;var o=_.selection,a=_.children[null!==o?o.focus.path[0]:0],i="rtl"===k(n.Node.string(a));if(Yt.isRedo(r)){e.preventDefault();var l=_;return void("function"==typeof l.redo&&l.redo())}if(Yt.isUndo(r)){e.preventDefault();var u=_;return void("function"==typeof u.undo&&u.undo())}if((Ae||je)&&"ArrowUp"===r.key&&!r.altKey&&!r.ctrlKey&&!r.metaKey&&o&&(r.shiftKey||n.Range.isCollapsed(o))){var s=function(e,t){var r=n.Editor.above(e,{at:t,match:function(t){return n.Node.isElement(t)&&n.Editor.isBlock(e,t)}});if(!r)return null;var o=n.Editor.start(e,r[1]),a=n.Editor.before(e,o);return a&&n.Editor.leaf(e,a)[0].text.endsWith("\n")?!n.Point.equals(t,o)&&Math.abs(Ev(e,t)-Ev(e,o))>2?null:a:null}(_,o.focus);if(s)return e.preventDefault(),void n.Transforms.select(_,r.shiftKey?{anchor:o.anchor,focus:s}:s)}if(Yt.isMoveLineBackward(r))return e.preventDefault(),void n.Transforms.move(_,{unit:"line",reverse:!0});if(Yt.isMoveLineForward(r))return e.preventDefault(),void n.Transforms.move(_,{unit:"line"});if(Yt.isExtendLineBackward(r))return e.preventDefault(),void n.Transforms.move(_,{unit:"line",edge:"focus",reverse:!0});if(Yt.isExtendLineForward(r))return e.preventDefault(),void n.Transforms.move(_,{unit:"line",edge:"focus"});if(Yt.isMoveBackward(r))return e.preventDefault(),void(o&&n.Range.isCollapsed(o)?n.Transforms.move(_,{reverse:!i,unit:xv(_,o.focus,!i)}):n.Transforms.collapse(_,{edge:i?"end":"start"}));if(Yt.isMoveForward(r))return e.preventDefault(),void(o&&n.Range.isCollapsed(o)?n.Transforms.move(_,{reverse:i,unit:xv(_,o.focus,i)}):n.Transforms.collapse(_,{edge:i?"start":"end"}));if(Yt.isMoveWordBackward(r))return e.preventDefault(),o&&n.Range.isExpanded(o)&&n.Transforms.collapse(_,{edge:"focus"}),void n.Transforms.move(_,{unit:"word",reverse:!i});if(Yt.isMoveWordForward(r))return e.preventDefault(),o&&n.Range.isExpanded(o)&&n.Transforms.collapse(_,{edge:"focus"}),void n.Transforms.move(_,{unit:"word",reverse:i});if($e){if((Ae||je)&&o&&(Yt.isDeleteBackward(r)||Yt.isDeleteForward(r))&&n.Range.isCollapsed(o)){var c=n.Node.parent(_,o.anchor.path);if(n.Node.isElement(c)&&n.Editor.isVoid(_,c)&&(n.Editor.isInline(_,c)||n.Editor.isBlock(_,c)))return e.preventDefault(),void(Yt.isDeleteForward(r)?n.Editor.deleteForward(_,{unit:"block"}):n.Editor.deleteBackward(_,{unit:"block"}))}if(je&&o&&n.Range.isCollapsed(o)){if(Yt.isDeleteBackward(r)&&n.Editor.isStart(_,o.anchor,[]))return e.preventDefault(),void n.Editor.deleteBackward(_);if(Yt.isDeleteForward(r)&&n.Editor.isEnd(_,o.anchor,[]))return e.preventDefault(),void n.Editor.deleteForward(_)}}else{if(Yt.isBold(r)||Yt.isItalic(r)||Yt.isTransposeCharacter(r))return void e.preventDefault();if(Yt.isSoftBreak(r))return e.preventDefault(),void n.Editor.insertSoftBreak(_);if(Yt.isSplitBlock(r))return e.preventDefault(),void n.Editor.insertBreak(_);if(Yt.isDeleteBackward(r))return e.preventDefault(),void(o&&n.Range.isExpanded(o)?n.Editor.deleteFragment(_,{direction:"backward"}):n.Editor.deleteBackward(_));if(Yt.isDeleteForward(r))return e.preventDefault(),void(o&&n.Range.isExpanded(o)?n.Editor.deleteFragment(_,{direction:"forward"}):n.Editor.deleteForward(_));if(Yt.isDeleteLineBackward(r))return e.preventDefault(),void(o&&n.Range.isExpanded(o)?n.Editor.deleteFragment(_,{direction:"backward"}):n.Editor.deleteBackward(_,{unit:"line"}));if(Yt.isDeleteLineForward(r))return e.preventDefault(),void(o&&n.Range.isExpanded(o)?n.Editor.deleteFragment(_,{direction:"forward"}):n.Editor.deleteForward(_,{unit:"line"}));if(Yt.isDeleteWordBackward(r))return e.preventDefault(),void(o&&n.Range.isExpanded(o)?n.Editor.deleteFragment(_,{direction:"backward"}):n.Editor.deleteBackward(_,{unit:"word"}));if(Yt.isDeleteWordForward(r))return e.preventDefault(),void(o&&n.Range.isExpanded(o)?n.Editor.deleteFragment(_,{direction:"forward"}):n.Editor.deleteForward(_,{unit:"word"}))}}}),[f,_,D.onKeyDown]),onPaste:t.useCallback((function(e){f||!fp.hasEditableTarget(_,e.target)||ag(e,D.onPaste)||(!$e||(e=>e.clipboardData&&""!==e.clipboardData.getData("text/plain")&&1===e.clipboardData.types.length)(e.nativeEvent)||je)&&(e.preventDefault(),fp.insertData(_,e.clipboardData))}),[f,_,D.onPaste])}),t.createElement(Yv,{decorations:ue,node:_,renderElement:h,renderChunk:v,renderPlaceholder:b,renderLeaf:g,renderText:m}))))))})),Jv=function(e,t){var r=e.selection;return!!r&&n.Range.isCollapsed(r)&&(Yt.isDeleteBackward(t)||Yt.isDeleteForward(t))&&!!n.Editor.void(e,{at:r})},Zv=function(e){var t;return we(e)&&e.nodeType===e.TEXT_NODE&&!(null===(t=e.parentElement)||void 0===t||!t.closest("[data-slate-string], [data-slate-zero-width]"))},eg=function(e,t,n){if(e.selection){var r=fp.toDOMRange(e,e.selection);n.isUpdatingSelection=!0,t.setBaseAndExtent(r.startContainer,r.startOffset,r.endContainer,r.endOffset),setTimeout((function(){n.isUpdatingSelection=!1}))}},tg=function(e){var t=e.selection;if(t&&n.Range.isExpanded(t)){var r=function(e,t){return Tv(e,t)?t:n.Editor.unhangRange(e,t)}(e,t);n.Range.equals(r,t)||n.Transforms.select(e,r)}},ng=function(e){var n=e.attributes,r=e.children;return t.createElement("span",Xv({},n),r,Fe&&t.createElement("br",null))},rg=function(){return[]},og=function(e,t){var r=!!e.selection&&n.Range.isBackward(e.selection),o=t.cloneRange();if(o.collapse(r),o.getBoundingClientRect){var a=o.startContainer.parentElement,i=o.getBoundingClientRect();if(0===i.width&&0===i.height&&0===i.x&&0===i.y){var l=a.getBoundingClientRect();if(l.width>0||l.height>0)return}a.getBoundingClientRect=o.getBoundingClientRect.bind(o),ue(a,{scrollMode:"if-needed",block:"nearest",inline:"nearest"}),delete a.getBoundingClientRect}},ag=function(e,t){if(!t)return!1;var n=t(e);return null!=n?n:e.isDefaultPrevented()||e.isPropagationStopped()},ig=function(e){return we(e.target)&&(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)},lg=function(e,t){if(!t)return!1;var n=t(e);return null!=n?n:e.defaultPrevented},ug=function(e,t){var n=e;"historyUndo"!==t.inputType||"function"!=typeof n.undo?"historyRedo"!==t.inputType||"function"!=typeof n.redo||n.redo():n.undo()},sg=t.createContext(!1),cg=parseInt(t.version.split(".")[0],10),dg=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],fg=function(e,t){return!e&&!t||!(!e||!t)&&n.Range.equals(e,t)},pg=new Set(["insert_node","move_node","remove_node","set_node"]);e.DefaultElement=Kh,e.DefaultLeaf=xh,e.DefaultPlaceholder=ng,e.DefaultText=Ih,e.Editable=Gv,e.NODE_TO_INDEX=Ge,e.NODE_TO_PARENT=Je,e.ReactEditor=fp,e.Slate=function(e){var r=e.editor,o=e.children,a=e.onChange,i=e.onSelectionChange,l=e.onValueChange,s=e.initialValue,c=u(e,dg),d=t.useRef(null);if(d.current!==r){if(!n.Editor.isEditor(r))throw new Error("[Slate] editor is invalid! You passed: ".concat(n.Scrubber.stringify(r)));if(void 0===s&&0===r.children.length)throw new Error("[Slate] editor.children is empty and no initialValue was provided. If this is intentional, pass initialValue={[]} to the Slate component.");var f=null!=s?s:r.children;if(!n.Node.isNodeList(f))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(n.Scrubber.stringify(f)));var p=void 0===s?f:f.map(Wt),h=p.every((function(e,t){return e===f[t]}))?f:p;r.children=h.length>0?h:[{children:[{text:""}]}],Object.assign(r,c),d.current=r}var v=function(){var e=t.useRef(new Set),n=t.useRef(new Set),r=t.useCallback((function(){e.current.forEach((function(e){return e()}))}),[]),o=t.useCallback((function(){n.current.forEach((function(e){return e()})),n.current.clear()}),[]),a=t.useCallback((function(t){var r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).deferred,o=void 0!==r&&r?function(){return n.current.add(t)}:t;return e.current.add(o),function(){e.current.delete(o)}}),[]);return{selectorContext:t.useMemo((function(){return{addEventListener:a,flushDeferred:o}}),[a,o]),onChange:r}}(),g=v.selectorContext,m=v.onChange,y=t.useCallback((function(){a&&a(r.children),i&&r.operations.find((function(e){return"set_selection"===e.type}))&&i(r.selection),l&&r.operations.find((function(e){return"set_selection"!==e.type}))&&l(r.children),m()}),[r,m,a,i,l]);t.useEffect((function(){return ct.set(r,y),function(){ct.set(r,(function(){}))}}),[r,y]);var b=t.useState(fp.isFocused(r)),k=w(b,2),E=k[0],x=k[1];return t.useEffect((function(){x(fp.isFocused(r))}),[r]),mp((function(){var e=function(){return x(fp.isFocused(r))};return cg>=17?(document.addEventListener("focusin",e),document.addEventListener("focusout",e),function(){document.removeEventListener("focusin",e),document.removeEventListener("focusout",e)}):(document.addEventListener("focus",e,!0),document.addEventListener("blur",e,!0),function(){document.removeEventListener("focus",e,!0),document.removeEventListener("blur",e,!0)})}),[r]),t.createElement(vv.Provider,{value:g},t.createElement(se.Provider,{value:r},t.createElement(sg.Provider,{value:E},o)))},e.defaultScrollSelectionIntoView=og,e.useComposing=function(){return t.useContext(Vv)},e.useEditor=function(){var e=t.useContext(se);if(!e)throw new Error("The `useEditor` hook must be used inside the <Slate> component's context.");return e},e.useElement=function(){var e=t.useContext(sv);if(!e)throw new Error("The `useElement` hook must be used inside `renderElement`.");return e},e.useElementIf=cv,e.useFocused=function(){return t.useContext(sg)},e.useReadOnly=hv,e.useSelected=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.suppressThrow,o=void 0!==r&&r,a=cv();if(!a)return!1;var i=t.useCallback((function(e){if(!e.selection)return!1;try{var t=fp.findPath(e,a),r=n.Editor.range(e,t);return!!n.Range.intersection(r,e.selection)}catch(e){if(o)return!1;throw e}}),[a,o]);return mv(i,void 0,{deferred:!0})},e.useSlate=yv,e.useSlateSelection=function(){return mv((function(e){return e.selection}),fg)},e.useSlateSelector=mv,e.useSlateStatic=ce,e.useSlateWithV=function(){var e=yv(),n=t.useMemo((function(){return function(e){var t=bv.get(e);if(t)return t;t={current:0},bv.set(e,t);var n=e.onChange;return e.onChange=function(e){t.current++,n(e)},t}(e)}),[e]);return{editor:e,v:n.current}},e.withReact=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x-slate-fragment",r=e,o=r=Ht(r,t),a=o.onChange,i=o.apply,l=o.insertText;return r.getChunkSize=function(){return null},Fe&&(r.insertText=function(e,t){return gt.delete(r),l(e,t)}),r.onChange=function(e){(cg<18?dp.unstable_batchedUpdates:function(e){return e()})((function(){a(e)}))},r.apply=function(e){var t;Fe&&pg.has(e.type)&&(null===(t=vp.get(r))||void 0===t||t());if("move_node"===e.type){var o=n.Node.parent(r,e.path);if(!!r.getChunkSize(o)){var a=n.Node.get(r,e.path),l=rv(r,o),u=fp.findKey(r,a);l.movedNodeKeys.add(u)}}i(e)},r}}));
|