@things-factory/lexical-editor 6.0.22
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/CHANGELOG.md +8 -0
- package/assets/EquationComponent.2ae445bf.css +1 -0
- package/assets/EquationComponent.6db6bfa0.js +1 -0
- package/assets/ExcalidrawComponent.09670137.css +1 -0
- package/assets/ExcalidrawComponent.c66e3028.js +1 -0
- package/assets/ImageComponent.00db88d9.js +1 -0
- package/assets/ImageComponent.faf47ab5.css +1 -0
- package/assets/ImageResizer.9cd447ab.js +1 -0
- package/assets/KaTeX_AMS-Regular.0cdd387c.woff2 +0 -0
- package/assets/KaTeX_AMS-Regular.30da91e8.woff +0 -0
- package/assets/KaTeX_AMS-Regular.68534840.ttf +0 -0
- package/assets/KaTeX_Caligraphic-Bold.07d8e303.ttf +0 -0
- package/assets/KaTeX_Caligraphic-Bold.1ae6bd74.woff +0 -0
- package/assets/KaTeX_Caligraphic-Bold.de7701e4.woff2 +0 -0
- package/assets/KaTeX_Caligraphic-Regular.3398dd02.woff +0 -0
- package/assets/KaTeX_Caligraphic-Regular.5d53e70a.woff2 +0 -0
- package/assets/KaTeX_Caligraphic-Regular.ed0b7437.ttf +0 -0
- package/assets/KaTeX_Fraktur-Bold.74444efd.woff2 +0 -0
- package/assets/KaTeX_Fraktur-Bold.9163df9c.ttf +0 -0
- package/assets/KaTeX_Fraktur-Bold.9be7ceb8.woff +0 -0
- package/assets/KaTeX_Fraktur-Regular.1e6f9579.ttf +0 -0
- package/assets/KaTeX_Fraktur-Regular.51814d27.woff2 +0 -0
- package/assets/KaTeX_Fraktur-Regular.5e28753b.woff +0 -0
- package/assets/KaTeX_Main-Bold.0f60d1b8.woff2 +0 -0
- package/assets/KaTeX_Main-Bold.138ac28d.ttf +0 -0
- package/assets/KaTeX_Main-Bold.c76c5d69.woff +0 -0
- package/assets/KaTeX_Main-BoldItalic.70ee1f64.ttf +0 -0
- package/assets/KaTeX_Main-BoldItalic.99cd42a3.woff2 +0 -0
- package/assets/KaTeX_Main-BoldItalic.a6f7ec0d.woff +0 -0
- package/assets/KaTeX_Main-Italic.0d85ae7c.ttf +0 -0
- package/assets/KaTeX_Main-Italic.97479ca6.woff2 +0 -0
- package/assets/KaTeX_Main-Italic.f1d6ef86.woff +0 -0
- package/assets/KaTeX_Main-Regular.c2342cd8.woff2 +0 -0
- package/assets/KaTeX_Main-Regular.c6368d87.woff +0 -0
- package/assets/KaTeX_Main-Regular.d0332f52.ttf +0 -0
- package/assets/KaTeX_Math-BoldItalic.850c0af5.woff +0 -0
- package/assets/KaTeX_Math-BoldItalic.dc47344d.woff2 +0 -0
- package/assets/KaTeX_Math-BoldItalic.f9377ab0.ttf +0 -0
- package/assets/KaTeX_Math-Italic.08ce98e5.ttf +0 -0
- package/assets/KaTeX_Math-Italic.7af58c5e.woff2 +0 -0
- package/assets/KaTeX_Math-Italic.8a8d2445.woff +0 -0
- package/assets/KaTeX_SansSerif-Bold.1ece03f7.ttf +0 -0
- package/assets/KaTeX_SansSerif-Bold.e99ae511.woff2 +0 -0
- package/assets/KaTeX_SansSerif-Bold.ece03cfd.woff +0 -0
- package/assets/KaTeX_SansSerif-Italic.00b26ac8.woff2 +0 -0
- package/assets/KaTeX_SansSerif-Italic.3931dd81.ttf +0 -0
- package/assets/KaTeX_SansSerif-Italic.91ee6750.woff +0 -0
- package/assets/KaTeX_SansSerif-Regular.11e4dc8a.woff +0 -0
- package/assets/KaTeX_SansSerif-Regular.68e8c73e.woff2 +0 -0
- package/assets/KaTeX_SansSerif-Regular.f36ea897.ttf +0 -0
- package/assets/KaTeX_Script-Regular.036d4e95.woff2 +0 -0
- package/assets/KaTeX_Script-Regular.1c67f068.ttf +0 -0
- package/assets/KaTeX_Script-Regular.d96cdf2b.woff +0 -0
- package/assets/KaTeX_Size1-Regular.6b47c401.woff2 +0 -0
- package/assets/KaTeX_Size1-Regular.95b6d2f1.ttf +0 -0
- package/assets/KaTeX_Size1-Regular.c943cc98.woff +0 -0
- package/assets/KaTeX_Size2-Regular.2014c523.woff +0 -0
- package/assets/KaTeX_Size2-Regular.a6b2099f.ttf +0 -0
- package/assets/KaTeX_Size2-Regular.d04c5421.woff2 +0 -0
- package/assets/KaTeX_Size3-Regular.500e04d5.ttf +0 -0
- package/assets/KaTeX_Size3-Regular.6ab6b62e.woff +0 -0
- package/assets/KaTeX_Size4-Regular.99f9c675.woff +0 -0
- package/assets/KaTeX_Size4-Regular.a4af7d41.woff2 +0 -0
- package/assets/KaTeX_Size4-Regular.c647367d.ttf +0 -0
- package/assets/KaTeX_Typewriter-Regular.71d517d6.woff2 +0 -0
- package/assets/KaTeX_Typewriter-Regular.e14fed02.woff +0 -0
- package/assets/KaTeX_Typewriter-Regular.f01f3e87.ttf +0 -0
- package/assets/LexicalNestedComposer.412b5854.js +1 -0
- package/assets/PollComponent.7b32c9d1.js +1 -0
- package/assets/PollComponent.e519dbaf.css +1 -0
- package/assets/StickyComponent.64376704.css +1 -0
- package/assets/StickyComponent.821e162d.js +1 -0
- package/assets/TableComponent.b31a076f.js +1 -0
- package/assets/arrow-clockwise.2a5cb240.svg +1 -0
- package/assets/arrow-counterclockwise.7bfcc198.svg +1 -0
- package/assets/bg-color.507cd4d9.svg +1 -0
- package/assets/camera.30598594.svg +1 -0
- package/assets/card-checklist.4b2c9bb6.svg +1 -0
- package/assets/caret-right-fill.a00c19e8.svg +1 -0
- package/assets/cat-typing.29244fe9.gif +0 -0
- package/assets/chat-left-text.6b95a11e.svg +1 -0
- package/assets/chat-square-quote.11c47cee.svg +1 -0
- package/assets/chevron-down.7ab1bec2.svg +1 -0
- package/assets/clipboard.af70d3df.svg +1 -0
- package/assets/close.5a175ff6.svg +1 -0
- package/assets/code.211c00f3.svg +1 -0
- package/assets/comments.832aaea0.svg +1 -0
- package/assets/copy.0a348586.svg +1 -0
- package/assets/diagram-2.109ff72d.svg +1 -0
- package/assets/download.86c52f35.svg +1 -0
- package/assets/draggable-block-menu.a5121e96.svg +1 -0
- package/assets/dropdown-more.e77cf0f5.svg +1 -0
- package/assets/emoji-list.81a5609c.js +1 -0
- package/assets/figma.73378f91.svg +1 -0
- package/assets/file-earmark-text.ca11f66a.svg +4 -0
- package/assets/file-image.92c4290c.svg +1 -0
- package/assets/filetype-gif.6c82f677.svg +1 -0
- package/assets/font-color.babef7e0.svg +1 -0
- package/assets/font-family.6d11828a.svg +1 -0
- package/assets/gear.9752af63.svg +1 -0
- package/assets/horizontal-rule.f2611cd6.svg +1 -0
- package/assets/indent.9b11e20c.svg +1 -0
- package/assets/journal-code.281f8e59.svg +1 -0
- package/assets/justify.e3d375bb.svg +1 -0
- package/assets/landscape.21352c66.jpg +0 -0
- package/assets/link.dabc7da5.svg +1 -0
- package/assets/list-ol.03c2349b.svg +1 -0
- package/assets/list-ul.d6a7f4ba.svg +1 -0
- package/assets/lock-fill.b10c3357.svg +1 -0
- package/assets/lock.9d41d1f2.svg +1 -0
- package/assets/main.0e0c1acb.css +1 -0
- package/assets/main.df10c180.js +21 -0
- package/assets/markdown.5082cb8f.svg +1 -0
- package/assets/mic.507b1f72.svg +1 -0
- package/assets/outdent.b795c01f.svg +1 -0
- package/assets/paint-bucket.407066ee.svg +1 -0
- package/assets/palette.a72cd2c3.svg +1 -0
- package/assets/parser-babel.6f804a7c.js +1 -0
- package/assets/parser-html.66e60782.js +22 -0
- package/assets/parser-markdown.3f44829c.js +22 -0
- package/assets/parser-postcss.16fcf3bd.js +1 -0
- package/assets/pencil-fill.633b2c8d.svg +1 -0
- package/assets/plug-fill.0098ed23.svg +1 -0
- package/assets/plug.d8731872.svg +1 -0
- package/assets/plus-slash-minus.6e1f16e9.svg +1 -0
- package/assets/plus.cc33d039.svg +1 -0
- package/assets/prettier-error.0ed0d492.svg +1 -0
- package/assets/prettier.6c905155.svg +1 -0
- package/assets/send.3616a219.svg +1 -0
- package/assets/square-check.f4543561.svg +1 -0
- package/assets/standalone.07cb14af.js +22 -0
- package/assets/sticky.35cbc445.svg +1 -0
- package/assets/success-alt.33b01110.svg +1 -0
- package/assets/success.e7e6caa5.svg +1 -0
- package/assets/table.5b346097.svg +1 -0
- package/assets/text-center.3b97a1ce.svg +1 -0
- package/assets/text-left.37eb3c07.svg +1 -0
- package/assets/text-paragraph.f17ec370.svg +1 -0
- package/assets/text-right.69b7b3bf.svg +1 -0
- package/assets/trash.e93c6b1b.svg +1 -0
- package/assets/trash3.0a864fe5.svg +1 -0
- package/assets/tweet.9fbf1564.svg +1 -0
- package/assets/type-bold.1f17e5da.svg +1 -0
- package/assets/type-h1.83dd5e3b.svg +1 -0
- package/assets/type-h2.bb6b6d69.svg +1 -0
- package/assets/type-h3.27eb870e.svg +1 -0
- package/assets/type-h4.b9ba31db.svg +1 -0
- package/assets/type-h5.f6d2d205.svg +1 -0
- package/assets/type-h6.34dc2c46.svg +1 -0
- package/assets/type-italic.f9cdcec5.svg +1 -0
- package/assets/type-strikethrough.ea22e2f6.svg +1 -0
- package/assets/type-subscript.84ecc6bb.svg +1 -0
- package/assets/type-superscript.fd5795bc.svg +1 -0
- package/assets/type-underline.9639e1cd.svg +1 -0
- package/assets/upload.0365f49c.svg +1 -0
- package/assets/user.085d4653.svg +1 -0
- package/assets/yellow-flower.a2a7c7a2.jpg +0 -0
- package/assets/youtube.42d173dd.svg +1 -0
- package/client/bootstrap.ts +1 -0
- package/client/index.ts +0 -0
- package/client/tsconfig.json +11 -0
- package/dist-client/bootstrap.d.ts +1 -0
- package/dist-client/bootstrap.js +2 -0
- package/dist-client/bootstrap.js.map +1 -0
- package/dist-client/index.d.ts +0 -0
- package/dist-client/index.js +2 -0
- package/dist-client/index.js.map +1 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -0
- package/dist-server/index.js +4 -0
- package/dist-server/index.js.map +1 -0
- package/dist-server/routes.js +28 -0
- package/dist-server/routes.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/package.json +32 -0
- package/server/index.ts +1 -0
- package/server/routes.ts +31 -0
- package/server/tsconfig.json +10 -0
- package/things-factory.config.js +1 -0
- package/views/public/html-editor-lexical.html +34 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
var e;!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver((e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)})).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerpolicy&&(t.referrerPolicy=e.referrerpolicy),"use-credentials"===e.crossorigin?t.credentials="include":"anonymous"===e.crossorigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();const t={disableBeforeInput:!1,emptyEditor:!0,isAutocomplete:!1,isCharLimit:!1,isCharLimitUtf8:!1,isCollab:!1,isMaxLength:!1,isRichText:!0,measureTypingPerf:!1,showNestedEditorTreeView:!1,showTableOfContents:!1,showTreeView:!1},n=new URLSearchParams(window.location.search);for(const lZ of Object.keys(t))if(n.has(lZ))try{const r=JSON.parse(null!=(e=n.get(lZ))?e:"true");t[lZ]=Boolean(r)}catch(aZ){console.warn(`Unable to parse query parameter "${lZ}"`)}t.disableBeforeInput&&delete window.InputEvent.prototype.getTargetRanges;var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function o(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})})),t}var a={exports:{}},s={},l=Symbol.for("react.element"),c=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),f=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),b=Symbol.iterator;var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,x={};function S(e,t,n){this.props=e,this.context=t,this.refs=x,this.updater=n||_}function C(){}function E(e,t,n){this.props=e,this.context=t,this.refs=x,this.updater=n||_}S.prototype.isReactComponent={},S.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},S.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},C.prototype=S.prototype;var T=E.prototype=new C;T.constructor=E,w(T,S.prototype),T.isPureReactComponent=!0;var k=Array.isArray,N=Object.prototype.hasOwnProperty,A={current:null},O={key:!0,ref:!0,__self:!0,__source:!0};function M(e,t,n){var r,i={},o=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(o=""+t.key),t)N.call(t,r)&&!O.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(1===s)i.children=n;else if(1<s){for(var c=Array(s),u=0;u<s;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===i[r]&&(i[r]=s[r]);return{$$typeof:l,type:e,key:o,ref:a,props:i,_owner:A.current}}function R(e){return"object"==typeof e&&null!==e&&e.$$typeof===l}var D=/\/+/g;function I(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function P(e,t,n,r,i){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var a=!1;if(null===e)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case l:case c:a=!0}}if(a)return i=i(a=e),e=""===r?"."+I(a,0):r,k(i)?(n="",null!=e&&(n=e.replace(D,"$&/")+"/"),P(i,t,n,"",(function(e){return e}))):null!=i&&(R(i)&&(i=function(e,t){return{$$typeof:l,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(D,"$&/")+"/")+e)),t.push(i)),1;if(a=0,r=""===r?".":r+":",k(e))for(var s=0;s<e.length;s++){var u=r+I(o=e[s],s);a+=P(o,t,n,u,i)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=b&&e[b]||e["@@iterator"])?e:null}(e),"function"==typeof u)for(e=u.call(e),s=0;!(o=e.next()).done;)a+=P(o=o.value,t,n,u=r+I(o,s++),i);else if("object"===o)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function L(e,t,n){if(null==e)return e;var r=[],i=0;return P(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function B(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var $={current:null},z={transition:null},F={ReactCurrentDispatcher:$,ReactCurrentBatchConfig:z,ReactCurrentOwner:A};s.Children={map:L,forEach:function(e,t,n){L(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return L(e,(function(){t++})),t},toArray:function(e){return L(e,(function(e){return e}))||[]},only:function(e){if(!R(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},s.Component=S,s.Fragment=u,s.Profiler=h,s.PureComponent=E,s.StrictMode=d,s.Suspense=m,s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=F,s.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=w({},e.props),i=e.key,o=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,a=A.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(c in t)N.call(t,c)&&!O.hasOwnProperty(c)&&(r[c]=void 0===t[c]&&void 0!==s?s[c]:t[c])}var c=arguments.length-2;if(1===c)r.children=n;else if(1<c){s=Array(c);for(var u=0;u<c;u++)s[u]=arguments[u+2];r.children=s}return{$$typeof:l,type:e.type,key:i,ref:o,props:r,_owner:a}},s.createContext=function(e){return(e={$$typeof:f,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:p,_context:e},e.Consumer=e},s.createElement=M,s.createFactory=function(e){var t=M.bind(null,e);return t.type=e,t},s.createRef=function(){return{current:null}},s.forwardRef=function(e){return{$$typeof:g,render:e}},s.isValidElement=R,s.lazy=function(e){return{$$typeof:v,_payload:{_status:-1,_result:e},_init:B}},s.memo=function(e,t){return{$$typeof:y,type:e,compare:void 0===t?null:t}},s.startTransition=function(e){var t=z.transition;z.transition={};try{e()}finally{z.transition=t}},s.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},s.useCallback=function(e,t){return $.current.useCallback(e,t)},s.useContext=function(e){return $.current.useContext(e)},s.useDebugValue=function(){},s.useDeferredValue=function(e){return $.current.useDeferredValue(e)},s.useEffect=function(e,t){return $.current.useEffect(e,t)},s.useId=function(){return $.current.useId()},s.useImperativeHandle=function(e,t,n){return $.current.useImperativeHandle(e,t,n)},s.useInsertionEffect=function(e,t){return $.current.useInsertionEffect(e,t)},s.useLayoutEffect=function(e,t){return $.current.useLayoutEffect(e,t)},s.useMemo=function(e,t){return $.current.useMemo(e,t)},s.useReducer=function(e,t,n){return $.current.useReducer(e,t,n)},s.useRef=function(e){return $.current.useRef(e)},s.useState=function(e){return $.current.useState(e)},s.useSyncExternalStore=function(e,t,n){return $.current.useSyncExternalStore(e,t,n)},s.useTransition=function(){return $.current.useTransition()},s.version="18.2.0",a.exports=s;var U={exports:{}},H={},V={exports:{}},q={};
|
|
2
|
+
/**
|
|
3
|
+
* @license React
|
|
4
|
+
* scheduler.production.min.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/
|
|
11
|
+
!function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function n(e){return 0===e.length?null:e[0]}function r(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,a=o>>>1;r<a;){var s=2*(r+1)-1,l=e[s],c=s+1,u=e[c];if(0>i(l,n))c<o&&0>i(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<o&&0>i(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function i(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 o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],c=[],u=1,d=null,h=3,p=!1,f=!1,g=!1,m="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,v="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var i=n(c);null!==i;){if(null===i.callback)r(c);else{if(!(i.startTime<=e))break;r(c),i.sortIndex=i.expirationTime,t(l,i)}i=n(c)}}function _(e){if(g=!1,b(e),!f)if(null!==n(l))f=!0,R(w);else{var t=n(c);null!==t&&D(_,t.startTime-e)}}function w(t,i){f=!1,g&&(g=!1,y(E),E=-1),p=!0;var o=h;try{for(b(i),d=n(l);null!==d&&(!(d.expirationTime>i)||t&&!N());){var a=d.callback;if("function"==typeof a){d.callback=null,h=d.priorityLevel;var s=a(d.expirationTime<=i);i=e.unstable_now(),"function"==typeof s?d.callback=s:d===n(l)&&r(l),b(i)}else r(l);d=n(l)}if(null!==d)var u=!0;else{var m=n(c);null!==m&&D(_,m.startTime-i),u=!1}return u}finally{d=null,h=o,p=!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,E=-1,T=5,k=-1;function N(){return!(e.unstable_now()-k<T)}function A(){if(null!==C){var t=e.unstable_now();k=t;var n=!0;try{n=C(!0,t)}finally{n?x():(S=!1,C=null)}}else S=!1}if("function"==typeof v)x=function(){v(A)};else if("undefined"!=typeof MessageChannel){var O=new MessageChannel,M=O.port2;O.port1.onmessage=A,x=function(){M.postMessage(null)}}else x=function(){m(A,0)};function R(e){C=e,S||(S=!0,x())}function D(t,n){E=m((function(){t(e.unstable_now())}),n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){f||p||(f=!0,R(w))},e.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"):T=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},e.unstable_scheduleCallback=function(r,i,o){var a=e.unstable_now();switch("object"==typeof o&&null!==o?o="number"==typeof(o=o.delay)&&0<o?a+o:a:o=a,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return r={id:u++,callback:i,priorityLevel:r,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>a?(r.sortIndex=o,t(c,r),null===n(l)&&r===n(c)&&(g?(y(E),E=-1):g=!0,D(_,o-a))):(r.sortIndex=s,t(l,r),f||p||(f=!0,R(w))),r},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}}(q),V.exports=q;
|
|
12
|
+
/**
|
|
13
|
+
* @license React
|
|
14
|
+
* react-dom.production.min.js
|
|
15
|
+
*
|
|
16
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
17
|
+
*
|
|
18
|
+
* This source code is licensed under the MIT license found in the
|
|
19
|
+
* LICENSE file in the root directory of this source tree.
|
|
20
|
+
*/
|
|
21
|
+
var K=a.exports,W=V.exports;function j(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 Y=new Set,G={};function J(e,t){X(e,t),X(e+"Capture",t)}function X(e,t){for(G[e]=t,e=0;e<t.length;e++)Y.add(t[e])}var Z=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Q=Object.prototype.hasOwnProperty,ee=/^[: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]*$/,te={},ne={};function re(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var ie={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){ie[e]=new re(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];ie[t]=new re(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){ie[e]=new re(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){ie[e]=new re(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){ie[e]=new re(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){ie[e]=new re(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){ie[e]=new re(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){ie[e]=new re(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){ie[e]=new re(e,5,!1,e.toLowerCase(),null,!1,!1)}));var oe=/[\-:]([a-z])/g;function ae(e){return e[1].toUpperCase()}function se(e,t,n,r){var i=ie.hasOwnProperty(t)?ie[t]:null;(null!==i?0!==i.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,i,r)&&(n=null),r||null===i?function(e){return!!Q.call(ne,e)||!Q.call(te,e)&&(ee.test(e)?ne[e]=!0:(te[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!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(oe,ae);ie[t]=new re(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(oe,ae);ie[t]=new re(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(oe,ae);ie[t]=new re(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){ie[e]=new re(e,1,!1,e.toLowerCase(),null,!1,!1)})),ie.xlinkHref=new re("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){ie[e]=new re(e,1,!1,e.toLowerCase(),null,!0,!0)}));var le=K.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ce=Symbol.for("react.element"),ue=Symbol.for("react.portal"),de=Symbol.for("react.fragment"),he=Symbol.for("react.strict_mode"),pe=Symbol.for("react.profiler"),fe=Symbol.for("react.provider"),ge=Symbol.for("react.context"),me=Symbol.for("react.forward_ref"),ye=Symbol.for("react.suspense"),ve=Symbol.for("react.suspense_list"),be=Symbol.for("react.memo"),_e=Symbol.for("react.lazy"),we=Symbol.for("react.offscreen"),xe=Symbol.iterator;function Se(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=xe&&e[xe]||e["@@iterator"])?e:null}var Ce,Ee=Object.assign;function Te(e){if(void 0===Ce)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ce=t&&t[1]||""}return"\n"+Ce+e}var ke=!1;function Ne(e,t){if(!e||ke)return"";ke=!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(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&"string"==typeof c.stack){for(var i=c.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s]){var l="\n"+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{ke=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Te(e):""}function Ae(e){switch(e.tag){case 5:return Te(e.type);case 16:return Te("Lazy");case 13:return Te("Suspense");case 19:return Te("SuspenseList");case 0:case 2:case 15:return e=Ne(e.type,!1);case 11:return e=Ne(e.type.render,!1);case 1:return e=Ne(e.type,!0);default:return""}}function Oe(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 de:return"Fragment";case ue:return"Portal";case pe:return"Profiler";case he:return"StrictMode";case ye:return"Suspense";case ve:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case ge:return(e.displayName||"Context")+".Consumer";case fe:return(e._context.displayName||"Context")+".Provider";case me:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case be:return null!==(t=e.displayName||null)?t:Oe(e.type)||"Memo";case _e:t=e._payload,e=e._init;try{return Oe(e(t))}catch(n){}}return null}function Me(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 Oe(t);case 8:return t===he?"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 Re(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function De(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Ie(e){e._valueTracker||(e._valueTracker=function(e){var t=De(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 i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.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 Pe(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=De(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Le(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 Be(e,t){var n=t.checked;return Ee({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function $e(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Re(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 ze(e,t){null!=(t=t.checked)&&se(e,"checked",t,!1)}function Fe(e,t){ze(e,t);var n=Re(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")?He(e,t.type,n):t.hasOwnProperty("defaultValue")&&He(e,t.type,Re(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Ue(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 He(e,t,n){"number"===t&&Le(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ve=Array.isArray;function qe(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Re(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function Ke(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(j(91));return Ee({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function We(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(j(92));if(Ve(n)){if(1<n.length)throw Error(j(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:Re(n)}}function je(e,t){var n=Re(t.value),r=Re(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 Ye(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function Ge(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 Je(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Ge(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Xe,Ze,Qe=(Ze=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((Xe=Xe||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Xe.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 Ze(e,t)}))}:Ze);function et(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 tt={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},nt=["Webkit","ms","Moz","O"];function rt(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||tt.hasOwnProperty(e)&&tt[e]?(""+t).trim():t+"px"}function it(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=rt(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(tt).forEach((function(e){nt.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),tt[t]=tt[e]}))}));var ot=Ee({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 at(e,t){if(t){if(ot[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(j(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(j(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(j(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(j(62))}}function st(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 lt=null;function ct(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var ut=null,dt=null,ht=null;function pt(e){if(e=so(e)){if("function"!=typeof ut)throw Error(j(280));var t=e.stateNode;t&&(t=co(t),ut(e.stateNode,e.type,t))}}function ft(e){dt?ht?ht.push(e):ht=[e]:dt=e}function gt(){if(dt){var e=dt,t=ht;if(ht=dt=null,pt(e),t)for(e=0;e<t.length;e++)pt(t[e])}}function mt(e,t){return e(t)}function yt(){}var vt=!1;function bt(e,t,n){if(vt)return e(t,n);vt=!0;try{return mt(e,t,n)}finally{vt=!1,(null!==dt||null!==ht)&&(yt(),gt())}}function _t(e,t){var n=e.stateNode;if(null===n)return null;var r=co(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(j(231,t,typeof n));return n}var wt=!1;if(Z)try{var xt={};Object.defineProperty(xt,"passive",{get:function(){wt=!0}}),window.addEventListener("test",xt,xt),window.removeEventListener("test",xt,xt)}catch(Ze){wt=!1}function St(e,t,n,r,i,o,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var Ct=!1,Et=null,Tt=!1,kt=null,Nt={onError:function(e){Ct=!0,Et=e}};function At(e,t,n,r,i,o,a,s,l){Ct=!1,Et=null,St.apply(Nt,arguments)}function Ot(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 Mt(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 Rt(e){if(Ot(e)!==e)throw Error(j(188))}function Dt(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ot(e)))throw Error(j(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return Rt(i),e;if(o===r)return Rt(i),t;o=o.sibling}throw Error(j(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a)throw Error(j(189))}}if(n.alternate!==r)throw Error(j(190))}if(3!==n.tag)throw Error(j(188));return n.stateNode.current===n?e:t}(e))?It(e):null}function It(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=It(e);if(null!==t)return t;e=e.sibling}return null}var Pt=W.unstable_scheduleCallback,Lt=W.unstable_cancelCallback,Bt=W.unstable_shouldYield,$t=W.unstable_requestPaint,zt=W.unstable_now,Ft=W.unstable_getCurrentPriorityLevel,Ut=W.unstable_ImmediatePriority,Ht=W.unstable_UserBlockingPriority,Vt=W.unstable_NormalPriority,qt=W.unstable_LowPriority,Kt=W.unstable_IdlePriority,Wt=null,jt=null;var Yt=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(Gt(e)/Jt|0)|0},Gt=Math.log,Jt=Math.LN2;var Xt=64,Zt=4194304;function Qt(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 en(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~i;0!==s?r=Qt(s):0!==(o&=a)&&(r=Qt(o))}else 0!==(a=n&~i)?r=Qt(a):0!==o&&(r=Qt(o));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&0!=(4194240&o)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-Yt(t)),r|=e[n],t&=~i;return r}function tn(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 nn(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function rn(){var e=Xt;return 0==(4194240&(Xt<<=1))&&(Xt=64),e}function on(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function an(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-Yt(t)]=n}function sn(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Yt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var ln=0;function cn(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var un,dn,hn,pn,fn,gn=!1,mn=[],yn=null,vn=null,bn=null,_n=new Map,wn=new Map,xn=[],Sn="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 Cn(e,t){switch(e){case"focusin":case"focusout":yn=null;break;case"dragenter":case"dragleave":vn=null;break;case"mouseover":case"mouseout":bn=null;break;case"pointerover":case"pointerout":_n.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":wn.delete(t.pointerId)}}function En(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&(null!==(t=so(t))&&dn(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Tn(e){var t=ao(e.target);if(null!==t){var n=Ot(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Mt(n)))return e.blockedOn=t,void fn(e.priority,(function(){hn(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 kn(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=$n(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=so(n))&&dn(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);lt=r,n.target.dispatchEvent(r),lt=null,t.shift()}return!0}function Nn(e,t,n){kn(e)&&n.delete(t)}function An(){gn=!1,null!==yn&&kn(yn)&&(yn=null),null!==vn&&kn(vn)&&(vn=null),null!==bn&&kn(bn)&&(bn=null),_n.forEach(Nn),wn.forEach(Nn)}function On(e,t){e.blockedOn===t&&(e.blockedOn=null,gn||(gn=!0,W.unstable_scheduleCallback(W.unstable_NormalPriority,An)))}function Mn(e){function t(t){return On(t,e)}if(0<mn.length){On(mn[0],e);for(var n=1;n<mn.length;n++){var r=mn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==yn&&On(yn,e),null!==vn&&On(vn,e),null!==bn&&On(bn,e),_n.forEach(t),wn.forEach(t),n=0;n<xn.length;n++)(r=xn[n]).blockedOn===e&&(r.blockedOn=null);for(;0<xn.length&&null===(n=xn[0]).blockedOn;)Tn(n),null===n.blockedOn&&xn.shift()}var Rn=le.ReactCurrentBatchConfig,Dn=!0;function In(e,t,n,r){var i=ln,o=Rn.transition;Rn.transition=null;try{ln=1,Ln(e,t,n,r)}finally{ln=i,Rn.transition=o}}function Pn(e,t,n,r){var i=ln,o=Rn.transition;Rn.transition=null;try{ln=4,Ln(e,t,n,r)}finally{ln=i,Rn.transition=o}}function Ln(e,t,n,r){if(Dn){var i=$n(e,t,n,r);if(null===i)Ri(e,t,r,Bn,n),Cn(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return yn=En(yn,e,t,n,r,i),!0;case"dragenter":return vn=En(vn,e,t,n,r,i),!0;case"mouseover":return bn=En(bn,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return _n.set(o,En(_n.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,wn.set(o,En(wn.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Cn(e,r),4&t&&-1<Sn.indexOf(e)){for(;null!==i;){var o=so(i);if(null!==o&&un(o),null===(o=$n(e,t,n,r))&&Ri(e,t,r,Bn,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else Ri(e,t,r,null,n)}}var Bn=null;function $n(e,t,n,r){if(Bn=null,null!==(e=ao(e=ct(r))))if(null===(t=Ot(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Mt(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 Bn=e,null}function zn(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(Ft()){case Ut:return 1;case Ht:return 4;case Vt:case qt:return 16;case Kt:return 536870912;default:return 16}default:return 16}}var Fn=null,Un=null,Hn=null;function Vn(){if(Hn)return Hn;var e,t,n=Un,r=n.length,i="value"in Fn?Fn.value:Fn.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return Hn=i.slice(e,1<t?1-t:void 0)}function qn(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 Kn(){return!0}function Wn(){return!1}function jn(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?Kn:Wn,this.isPropagationStopped=Wn,this}return Ee(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=Kn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Kn)},persist:function(){},isPersistent:Kn}),t}var Yn,Gn,Jn,Xn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zn=jn(Xn),Qn=Ee({},Xn,{view:0,detail:0}),er=jn(Qn),tr=Ee({},Qn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pr,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!==Jn&&(Jn&&"mousemove"===e.type?(Yn=e.screenX-Jn.screenX,Gn=e.screenY-Jn.screenY):Gn=Yn=0,Jn=e),Yn)},movementY:function(e){return"movementY"in e?e.movementY:Gn}}),nr=jn(tr),rr=jn(Ee({},tr,{dataTransfer:0})),ir=jn(Ee({},Qn,{relatedTarget:0})),or=jn(Ee({},Xn,{animationName:0,elapsedTime:0,pseudoElement:0})),ar=Ee({},Xn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),sr=jn(ar),lr=jn(Ee({},Xn,{data:0})),cr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ur={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"},dr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function hr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=dr[e])&&!!t[e]}function pr(){return hr}var fr=Ee({},Qn,{key:function(e){if(e.key){var t=cr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=qn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?ur[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pr,charCode:function(e){return"keypress"===e.type?qn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?qn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),gr=jn(fr),mr=jn(Ee({},tr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),yr=jn(Ee({},Qn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pr})),vr=jn(Ee({},Xn,{propertyName:0,elapsedTime:0,pseudoElement:0})),br=Ee({},tr,{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}),_r=jn(br),wr=[9,13,27,32],xr=Z&&"CompositionEvent"in window,Sr=null;Z&&"documentMode"in document&&(Sr=document.documentMode);var Cr=Z&&"TextEvent"in window&&!Sr,Er=Z&&(!xr||Sr&&8<Sr&&11>=Sr),Tr=String.fromCharCode(32),kr=!1;function Nr(e,t){switch(e){case"keyup":return-1!==wr.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ar(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Or=!1;var Mr={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 Rr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Mr[e.type]:"textarea"===t}function Dr(e,t,n,r){ft(r),0<(t=Ii(t,"onChange")).length&&(n=new Zn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ir=null,Pr=null;function Lr(e){Ti(e,0)}function Br(e){if(Pe(lo(e)))return e}function $r(e,t){if("change"===e)return t}var zr=!1;if(Z){var Fr;if(Z){var Ur="oninput"in document;if(!Ur){var Hr=document.createElement("div");Hr.setAttribute("oninput","return;"),Ur="function"==typeof Hr.oninput}Fr=Ur}else Fr=!1;zr=Fr&&(!document.documentMode||9<document.documentMode)}function Vr(){Ir&&(Ir.detachEvent("onpropertychange",qr),Pr=Ir=null)}function qr(e){if("value"===e.propertyName&&Br(Pr)){var t=[];Dr(t,Pr,e,ct(e)),bt(Lr,t)}}function Kr(e,t,n){"focusin"===e?(Vr(),Pr=n,(Ir=t).attachEvent("onpropertychange",qr)):"focusout"===e&&Vr()}function Wr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Br(Pr)}function jr(e,t){if("click"===e)return Br(t)}function Yr(e,t){if("input"===e||"change"===e)return Br(t)}var Gr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function Jr(e,t){if(Gr(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 i=n[r];if(!Q.call(t,i)||!Gr(e[i],t[i]))return!1}return!0}function Xr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Zr(e,t){var n,r=Xr(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=Xr(r)}}function Qr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?Qr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function ei(){for(var e=window,t=Le();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=Le((e=t.contentWindow).document)}return t}function ti(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 ni(e){var t=ei(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Qr(n.ownerDocument.documentElement,n)){if(null!==r&&ti(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 i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Zr(n,o);var a=Zr(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.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 ri=Z&&"documentMode"in document&&11>=document.documentMode,ii=null,oi=null,ai=null,si=!1;function li(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;si||null==ii||ii!==Le(r)||("selectionStart"in(r=ii)&&ti(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},ai&&Jr(ai,r)||(ai=r,0<(r=Ii(oi,"onSelect")).length&&(t=new Zn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ii)))}function ci(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ui={animationend:ci("Animation","AnimationEnd"),animationiteration:ci("Animation","AnimationIteration"),animationstart:ci("Animation","AnimationStart"),transitionend:ci("Transition","TransitionEnd")},di={},hi={};function pi(e){if(di[e])return di[e];if(!ui[e])return e;var t,n=ui[e];for(t in n)if(n.hasOwnProperty(t)&&t in hi)return di[e]=n[t];return e}Z&&(hi=document.createElement("div").style,"AnimationEvent"in window||(delete ui.animationend.animation,delete ui.animationiteration.animation,delete ui.animationstart.animation),"TransitionEvent"in window||delete ui.transitionend.transition);var fi=pi("animationend"),gi=pi("animationiteration"),mi=pi("animationstart"),yi=pi("transitionend"),vi=new Map,bi="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 _i(e,t){vi.set(e,t),J(t,[e])}for(var wi=0;wi<bi.length;wi++){var xi=bi[wi];_i(xi.toLowerCase(),"on"+(xi[0].toUpperCase()+xi.slice(1)))}_i(fi,"onAnimationEnd"),_i(gi,"onAnimationIteration"),_i(mi,"onAnimationStart"),_i("dblclick","onDoubleClick"),_i("focusin","onFocus"),_i("focusout","onBlur"),_i(yi,"onTransitionEnd"),X("onMouseEnter",["mouseout","mouseover"]),X("onMouseLeave",["mouseout","mouseover"]),X("onPointerEnter",["pointerout","pointerover"]),X("onPointerLeave",["pointerout","pointerover"]),J("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),J("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),J("onBeforeInput",["compositionend","keypress","textInput","paste"]),J("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),J("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),J("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Si="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(" "),Ci=new Set("cancel close invalid load scroll toggle".split(" ").concat(Si));function Ei(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,a,s,l){if(At.apply(this,arguments),Ct){if(!Ct)throw Error(j(198));var c=Et;Ct=!1,Et=null,Tt||(Tt=!0,kt=c)}}(r,t,void 0,e),e.currentTarget=null}function Ti(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;Ei(i,s,c),o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;Ei(i,s,c),o=l}}}if(Tt)throw e=kt,Tt=!1,kt=null,e}function ki(e,t){var n=t[ro];void 0===n&&(n=t[ro]=new Set);var r=e+"__bubble";n.has(r)||(Mi(t,e,2,!1),n.add(r))}function Ni(e,t,n){var r=0;t&&(r|=4),Mi(n,e,r,t)}var Ai="_reactListening"+Math.random().toString(36).slice(2);function Oi(e){if(!e[Ai]){e[Ai]=!0,Y.forEach((function(t){"selectionchange"!==t&&(Ci.has(t)||Ni(t,!1,e),Ni(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Ai]||(t[Ai]=!0,Ni("selectionchange",!1,t))}}function Mi(e,t,n,r){switch(zn(t)){case 1:var i=In;break;case 4:i=Pn;break;default:i=Ln}n=i.bind(null,t,n,e),i=void 0,!wt||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Ri(e,t,n,r,i){var o=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=ao(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}bt((function(){var r=o,i=ct(n),a=[];e:{var s=vi.get(e);if(void 0!==s){var l=Zn,c=e;switch(e){case"keypress":if(0===qn(n))break e;case"keydown":case"keyup":l=gr;break;case"focusin":c="focus",l=ir;break;case"focusout":c="blur",l=ir;break;case"beforeblur":case"afterblur":l=ir;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":l=nr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=rr;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=yr;break;case fi:case gi:case mi:l=or;break;case yi:l=vr;break;case"scroll":l=er;break;case"wheel":l=_r;break;case"copy":case"cut":case"paste":l=sr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=mr}var u=0!=(4&t),d=!u&&"scroll"===e,h=u?null!==s?s+"Capture":null:s;u=[];for(var p,f=r;null!==f;){var g=(p=f).stateNode;if(5===p.tag&&null!==g&&(p=g,null!==h&&(null!=(g=_t(f,h))&&u.push(Di(f,g,p)))),d)break;f=f.return}0<u.length&&(s=new l(s,c,null,n,i),a.push({event:s,listeners:u}))}}if(0==(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===lt||!(c=n.relatedTarget||n.fromElement)||!ao(c)&&!c[no])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?ao(c):null)&&(c!==(d=Ot(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=nr,g="onMouseLeave",h="onMouseEnter",f="mouse","pointerout"!==e&&"pointerover"!==e||(u=mr,g="onPointerLeave",h="onPointerEnter",f="pointer"),d=null==l?s:lo(l),p=null==c?s:lo(c),(s=new u(g,f+"leave",l,n,i)).target=d,s.relatedTarget=p,g=null,ao(i)===r&&((u=new u(h,f+"enter",c,n,i)).target=p,u.relatedTarget=d,g=u),d=g,l&&c)e:{for(h=c,f=0,p=u=l;p;p=Pi(p))f++;for(p=0,g=h;g;g=Pi(g))p++;for(;0<f-p;)u=Pi(u),f--;for(;0<p-f;)h=Pi(h),p--;for(;f--;){if(u===h||null!==h&&u===h.alternate)break e;u=Pi(u),h=Pi(h)}u=null}else u=null;null!==l&&Li(a,s,l,u,!1),null!==c&&null!==d&&Li(a,d,c,u,!0)}if("select"===(l=(s=r?lo(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var m=$r;else if(Rr(s))if(zr)m=Yr;else{m=Wr;var y=Kr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(m=jr);switch(m&&(m=m(e,r))?Dr(a,m,n,i):(y&&y(e,s,r),"focusout"===e&&(y=s._wrapperState)&&y.controlled&&"number"===s.type&&He(s,"number",s.value)),y=r?lo(r):window,e){case"focusin":(Rr(y)||"true"===y.contentEditable)&&(ii=y,oi=r,ai=null);break;case"focusout":ai=oi=ii=null;break;case"mousedown":si=!0;break;case"contextmenu":case"mouseup":case"dragend":si=!1,li(a,n,i);break;case"selectionchange":if(ri)break;case"keydown":case"keyup":li(a,n,i)}var v;if(xr)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 Or?Nr(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Er&&"ko"!==n.locale&&(Or||"onCompositionStart"!==b?"onCompositionEnd"===b&&Or&&(v=Vn()):(Un="value"in(Fn=i)?Fn.value:Fn.textContent,Or=!0)),0<(y=Ii(r,b)).length&&(b=new lr(b,e,null,n,i),a.push({event:b,listeners:y}),v?b.data=v:null!==(v=Ar(n))&&(b.data=v))),(v=Cr?function(e,t){switch(e){case"compositionend":return Ar(t);case"keypress":return 32!==t.which?null:(kr=!0,Tr);case"textInput":return(e=t.data)===Tr&&kr?null:e;default:return null}}(e,n):function(e,t){if(Or)return"compositionend"===e||!xr&&Nr(e,t)?(e=Vn(),Hn=Un=Fn=null,Or=!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 Er&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Ii(r,"onBeforeInput")).length&&(i=new lr("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=v))}Ti(a,t)}))}function Di(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ii(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=_t(e,n))&&r.unshift(Di(e,o,i)),null!=(o=_t(e,t))&&r.push(Di(e,o,i))),e=e.return}return r}function Pi(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Li(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(l=_t(n,o))&&a.unshift(Di(n,l,s)):i||null!=(l=_t(n,o))&&a.push(Di(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Bi=/\r\n?/g,$i=/\u0000|\uFFFD/g;function zi(e){return("string"==typeof e?e:""+e).replace(Bi,"\n").replace($i,"")}function Fi(e,t,n){if(t=zi(t),zi(e)!==t&&n)throw Error(j(425))}function Ui(){}var Hi=null,Vi=null;function qi(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 Ki="function"==typeof setTimeout?setTimeout:void 0,Wi="function"==typeof clearTimeout?clearTimeout:void 0,ji="function"==typeof Promise?Promise:void 0,Yi="function"==typeof queueMicrotask?queueMicrotask:void 0!==ji?function(e){return ji.resolve(null).then(e).catch(Gi)}:Ki;function Gi(e){setTimeout((function(){throw e}))}function Ji(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Mn(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Mn(t)}function Xi(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 Zi(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 Qi=Math.random().toString(36).slice(2),eo="__reactFiber$"+Qi,to="__reactProps$"+Qi,no="__reactContainer$"+Qi,ro="__reactEvents$"+Qi,io="__reactListeners$"+Qi,oo="__reactHandles$"+Qi;function ao(e){var t=e[eo];if(t)return t;for(var n=e.parentNode;n;){if(t=n[no]||n[eo]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Zi(e);null!==e;){if(n=e[eo])return n;e=Zi(e)}return t}n=(e=n).parentNode}return null}function so(e){return!(e=e[eo]||e[no])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function lo(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(j(33))}function co(e){return e[to]||null}var uo=[],ho=-1;function po(e){return{current:e}}function fo(e){0>ho||(e.current=uo[ho],uo[ho]=null,ho--)}function go(e,t){ho++,uo[ho]=e.current,e.current=t}var mo={},yo=po(mo),vo=po(!1),bo=mo;function _o(e,t){var n=e.type.contextTypes;if(!n)return mo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function wo(e){return null!=(e=e.childContextTypes)}function xo(){fo(vo),fo(yo)}function So(e,t,n){if(yo.current!==mo)throw Error(j(168));go(yo,t),go(vo,n)}function Co(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(j(108,Me(e)||"Unknown",i));return Ee({},n,r)}function Eo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||mo,bo=yo.current,go(yo,e),go(vo,vo.current),!0}function To(e,t,n){var r=e.stateNode;if(!r)throw Error(j(169));n?(e=Co(e,t,bo),r.__reactInternalMemoizedMergedChildContext=e,fo(vo),fo(yo),go(yo,e)):fo(vo),go(vo,n)}var ko=null,No=!1,Ao=!1;function Oo(e){null===ko?ko=[e]:ko.push(e)}function Mo(){if(!Ao&&null!==ko){Ao=!0;var e=0,t=ln;try{var n=ko;for(ln=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}ko=null,No=!1}catch(i){throw null!==ko&&(ko=ko.slice(e+1)),Pt(Ut,Mo),i}finally{ln=t,Ao=!1}}return null}var Ro=[],Do=0,Io=null,Po=0,Lo=[],Bo=0,$o=null,zo=1,Fo="";function Uo(e,t){Ro[Do++]=Po,Ro[Do++]=Io,Io=e,Po=t}function Ho(e,t,n){Lo[Bo++]=zo,Lo[Bo++]=Fo,Lo[Bo++]=$o,$o=e;var r=zo;e=Fo;var i=32-Yt(r)-1;r&=~(1<<i),n+=1;var o=32-Yt(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,zo=1<<32-Yt(t)+i|n<<i|r,Fo=o+e}else zo=1<<o|n<<i|r,Fo=e}function Vo(e){null!==e.return&&(Uo(e,1),Ho(e,1,0))}function qo(e){for(;e===Io;)Io=Ro[--Do],Ro[Do]=null,Po=Ro[--Do],Ro[Do]=null;for(;e===$o;)$o=Lo[--Bo],Lo[Bo]=null,Fo=Lo[--Bo],Lo[Bo]=null,zo=Lo[--Bo],Lo[Bo]=null}var Ko=null,Wo=null,jo=!1,Yo=null;function Go(e,t){var n=bu(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 Jo(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,Ko=e,Wo=Xi(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,Ko=e,Wo=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==$o?{id:zo,overflow:Fo}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=bu(18,null,null,0)).stateNode=t,n.return=e,e.child=n,Ko=e,Wo=null,!0);default:return!1}}function Xo(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function Zo(e){if(jo){var t=Wo;if(t){var n=t;if(!Jo(e,t)){if(Xo(e))throw Error(j(418));t=Xi(n.nextSibling);var r=Ko;t&&Jo(e,t)?Go(r,n):(e.flags=-4097&e.flags|2,jo=!1,Ko=e)}}else{if(Xo(e))throw Error(j(418));e.flags=-4097&e.flags|2,jo=!1,Ko=e}}}function Qo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Ko=e}function ea(e){if(e!==Ko)return!1;if(!jo)return Qo(e),jo=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!qi(e.type,e.memoizedProps)),t&&(t=Wo)){if(Xo(e))throw ta(),Error(j(418));for(;t;)Go(e,t),t=Xi(t.nextSibling)}if(Qo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(j(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Wo=Xi(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Wo=null}}else Wo=Ko?Xi(e.stateNode.nextSibling):null;return!0}function ta(){for(var e=Wo;e;)e=Xi(e.nextSibling)}function na(){Wo=Ko=null,jo=!1}function ra(e){null===Yo?Yo=[e]:Yo.push(e)}var ia=le.ReactCurrentBatchConfig;function oa(e,t){if(e&&e.defaultProps){for(var n in t=Ee({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var aa=po(null),sa=null,la=null,ca=null;function ua(){ca=la=sa=null}function da(e){var t=aa.current;fo(aa),e._currentValue=t}function ha(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 pa(e,t){sa=e,ca=la=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(ll=!0),e.firstContext=null)}function fa(e){var t=e._currentValue;if(ca!==e)if(e={context:e,memoizedValue:t,next:null},null===la){if(null===sa)throw Error(j(308));la=e,sa.dependencies={lanes:0,firstContext:e}}else la=la.next=e;return t}var ga=null;function ma(e){null===ga?ga=[e]:ga.push(e)}function ya(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,ma(t)):(n.next=i.next,i.next=n),t.interleaved=n,va(e,r)}function va(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 ba=!1;function _a(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function wa(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 xa(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Sa(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&mc)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,va(e,n)}return null===(i=r.interleaved)?(t.next=t,ma(r)):(t.next=i.next,i.next=t),r.interleaved=t,va(e,n)}function Ca(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,sn(e,n)}}function Ea(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ta(e,t,n,r){var i=e.updateQueue;ba=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,c=l.next;l.next=null,null===a?o=c:a.next=c,a=l;var u=e.alternate;null!==u&&((s=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(null!==o){var d=i.baseState;for(a=0,u=c=l=null,s=o;;){var h=s.lane,p=s.eventTime;if((r&h)===h){null!==u&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var f=e,g=s;switch(h=t,p=n,g.tag){case 1:if("function"==typeof(f=g.payload)){d=f.call(p,d,h);break e}d=f;break e;case 3:f.flags=-65537&f.flags|128;case 0:if(null==(h="function"==typeof(f=g.payload)?f.call(p,d,h):f))break e;d=Ee({},d,h);break e;case 2:ba=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(h=i.effects)?i.effects=[s]:h.push(s))}else p={eventTime:p,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=p,l=d):u=u.next=p,a|=h;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(h=s).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===u&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Cc|=a,e.lanes=a,e.memoizedState=d}}function ka(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(j(191,i));i.call(r)}}}var Na=(new K.Component).refs;function Aa(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:Ee({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Oa={isMounted:function(e){return!!(e=e._reactInternals)&&Ot(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Hc(),i=Vc(e),o=xa(r,i);o.payload=t,null!=n&&(o.callback=n),null!==(t=Sa(e,o,i))&&(qc(t,e,i,r),Ca(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Hc(),i=Vc(e),o=xa(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=Sa(e,o,i))&&(qc(t,e,i,r),Ca(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Hc(),r=Vc(e),i=xa(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=Sa(e,i,r))&&(qc(t,e,r,n),Ca(t,e,r))}};function Ma(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!Jr(n,r)||!Jr(i,o))}function Ra(e,t,n){var r=!1,i=mo,o=t.contextType;return"object"==typeof o&&null!==o?o=fa(o):(i=wo(t)?bo:yo.current,o=(r=null!=(r=t.contextTypes))?_o(e,i):mo),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Oa,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function Da(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&&Oa.enqueueReplaceState(t,t.state,null)}function Ia(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Na,_a(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=fa(o):(o=wo(t)?bo:yo.current,i.context=_o(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(Aa(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&Oa.enqueueReplaceState(i,i.state,null),Ta(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function Pa(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(j(309));var r=n.stateNode}if(!r)throw Error(j(147,e));var i=r,o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:((t=function(e){var t=i.refs;t===Na&&(t=i.refs={}),null===e?delete t[o]:t[o]=e})._stringRef=o,t)}if("string"!=typeof e)throw Error(j(284));if(!n._owner)throw Error(j(290,e))}return e}function La(e,t){throw e=Object.prototype.toString.call(t),Error(j(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ba(e){return(0,e._init)(e._payload)}function $a(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 i(e,t){return(e=wu(e,t)).index=0,e.sibling=null,e}function o(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 a(t){return e&&null===t.alternate&&(t.flags|=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=Eu(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function l(e,t,n,r){var o=n.type;return o===de?u(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===_e&&Ba(o)===t.type)?((r=i(t,n.props)).ref=Pa(e,t,n),r.return=e,r):((r=xu(n.type,n.key,n.props,null,e.mode,r)).ref=Pa(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Tu(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function u(e,t,n,r,o){return null===t||7!==t.tag?((t=Su(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Eu(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case ce:return(n=xu(t.type,t.key,t.props,null,e.mode,n)).ref=Pa(e,null,t),n.return=e,n;case ue:return(t=Tu(t,e.mode,n)).return=e,t;case _e:return d(e,(0,t._init)(t._payload),n)}if(Ve(t)||Se(t))return(t=Su(t,e.mode,n,null)).return=e,t;La(e,t)}return null}function h(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case ce:return n.key===i?l(e,t,n,r):null;case ue:return n.key===i?c(e,t,n,r):null;case _e:return h(e,t,(i=n._init)(n._payload),r)}if(Ve(n)||Se(n))return null!==i?null:u(e,t,n,r,null);La(e,n)}return null}function p(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case ce:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i);case ue:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case _e:return p(e,t,n,(0,r._init)(r._payload),i)}if(Ve(r)||Se(r))return u(t,e=e.get(n)||null,r,i,null);La(t,r)}return null}return function s(l,c,u,f){if("object"==typeof u&&null!==u&&u.type===de&&null===u.key&&(u=u.props.children),"object"==typeof u&&null!==u){switch(u.$$typeof){case ce:e:{for(var g=u.key,m=c;null!==m;){if(m.key===g){if((g=u.type)===de){if(7===m.tag){n(l,m.sibling),(c=i(m,u.props.children)).return=l,l=c;break e}}else if(m.elementType===g||"object"==typeof g&&null!==g&&g.$$typeof===_e&&Ba(g)===m.type){n(l,m.sibling),(c=i(m,u.props)).ref=Pa(l,m,u),c.return=l,l=c;break e}n(l,m);break}t(l,m),m=m.sibling}u.type===de?((c=Su(u.props.children,l.mode,f,u.key)).return=l,l=c):((f=xu(u.type,u.key,u.props,null,l.mode,f)).ref=Pa(l,c,u),f.return=l,l=f)}return a(l);case ue:e:{for(m=u.key;null!==c;){if(c.key===m){if(4===c.tag&&c.stateNode.containerInfo===u.containerInfo&&c.stateNode.implementation===u.implementation){n(l,c.sibling),(c=i(c,u.children||[])).return=l,l=c;break e}n(l,c);break}t(l,c),c=c.sibling}(c=Tu(u,l.mode,f)).return=l,l=c}return a(l);case _e:return s(l,c,(m=u._init)(u._payload),f)}if(Ve(u))return function(i,a,s,l){for(var c=null,u=null,f=a,g=a=0,m=null;null!==f&&g<s.length;g++){f.index>g?(m=f,f=null):m=f.sibling;var y=h(i,f,s[g],l);if(null===y){null===f&&(f=m);break}e&&f&&null===y.alternate&&t(i,f),a=o(y,a,g),null===u?c=y:u.sibling=y,u=y,f=m}if(g===s.length)return n(i,f),jo&&Uo(i,g),c;if(null===f){for(;g<s.length;g++)null!==(f=d(i,s[g],l))&&(a=o(f,a,g),null===u?c=f:u.sibling=f,u=f);return jo&&Uo(i,g),c}for(f=r(i,f);g<s.length;g++)null!==(m=p(f,i,g,s[g],l))&&(e&&null!==m.alternate&&f.delete(null===m.key?g:m.key),a=o(m,a,g),null===u?c=m:u.sibling=m,u=m);return e&&f.forEach((function(e){return t(i,e)})),jo&&Uo(i,g),c}(l,c,u,f);if(Se(u))return function(i,a,s,l){var c=Se(s);if("function"!=typeof c)throw Error(j(150));if(null==(s=c.call(s)))throw Error(j(151));for(var u=c=null,f=a,g=a=0,m=null,y=s.next();null!==f&&!y.done;g++,y=s.next()){f.index>g?(m=f,f=null):m=f.sibling;var v=h(i,f,y.value,l);if(null===v){null===f&&(f=m);break}e&&f&&null===v.alternate&&t(i,f),a=o(v,a,g),null===u?c=v:u.sibling=v,u=v,f=m}if(y.done)return n(i,f),jo&&Uo(i,g),c;if(null===f){for(;!y.done;g++,y=s.next())null!==(y=d(i,y.value,l))&&(a=o(y,a,g),null===u?c=y:u.sibling=y,u=y);return jo&&Uo(i,g),c}for(f=r(i,f);!y.done;g++,y=s.next())null!==(y=p(f,i,g,y.value,l))&&(e&&null!==y.alternate&&f.delete(null===y.key?g:y.key),a=o(y,a,g),null===u?c=y:u.sibling=y,u=y);return e&&f.forEach((function(e){return t(i,e)})),jo&&Uo(i,g),c}(l,c,u,f);La(l,u)}return"string"==typeof u&&""!==u||"number"==typeof u?(u=""+u,null!==c&&6===c.tag?(n(l,c.sibling),(c=i(c,u)).return=l,l=c):(n(l,c),(c=Eu(u,l.mode,f)).return=l,l=c),a(l)):n(l,c)}}var za=$a(!0),Fa=$a(!1),Ua={},Ha=po(Ua),Va=po(Ua),qa=po(Ua);function Ka(e){if(e===Ua)throw Error(j(174));return e}function Wa(e,t){switch(go(qa,t),go(Va,e),go(Ha,Ua),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Je(null,"");break;default:t=Je(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}fo(Ha),go(Ha,t)}function ja(){fo(Ha),fo(Va),fo(qa)}function Ya(e){Ka(qa.current);var t=Ka(Ha.current),n=Je(t,e.type);t!==n&&(go(Va,e),go(Ha,n))}function Ga(e){Va.current===e&&(fo(Ha),fo(Va))}var Ja=po(0);function Xa(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 Za=[];function Qa(){for(var e=0;e<Za.length;e++)Za[e]._workInProgressVersionPrimary=null;Za.length=0}var es=le.ReactCurrentDispatcher,ts=le.ReactCurrentBatchConfig,ns=0,rs=null,is=null,os=null,as=!1,ss=!1,ls=0,cs=0;function us(){throw Error(j(321))}function ds(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Gr(e[n],t[n]))return!1;return!0}function hs(e,t,n,r,i,o){if(ns=o,rs=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,es.current=null===e||null===e.memoizedState?Gs:Js,e=n(r,i),ss){o=0;do{if(ss=!1,ls=0,25<=o)throw Error(j(301));o+=1,os=is=null,t.updateQueue=null,es.current=Xs,e=n(r,i)}while(ss)}if(es.current=Ys,t=null!==is&&null!==is.next,ns=0,os=is=rs=null,as=!1,t)throw Error(j(300));return e}function ps(){var e=0!==ls;return ls=0,e}function fs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===os?rs.memoizedState=os=e:os=os.next=e,os}function gs(){if(null===is){var e=rs.alternate;e=null!==e?e.memoizedState:null}else e=is.next;var t=null===os?rs.memoizedState:os.next;if(null!==t)os=t,is=e;else{if(null===e)throw Error(j(310));e={memoizedState:(is=e).memoizedState,baseState:is.baseState,baseQueue:is.baseQueue,queue:is.queue,next:null},null===os?rs.memoizedState=os=e:os=os.next=e}return os}function ms(e,t){return"function"==typeof t?t(e):t}function ys(e){var t=gs(),n=t.queue;if(null===n)throw Error(j(311));n.lastRenderedReducer=e;var r=is,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(null!==i){o=i.next,r=r.baseState;var s=a=null,l=null,c=o;do{var u=c.lane;if((ns&u)===u)null!==l&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===l?(s=l=d,a=r):l=l.next=d,rs.lanes|=u,Cc|=u}c=c.next}while(null!==c&&c!==o);null===l?a=r:l.next=s,Gr(r,t.memoizedState)||(ll=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{o=i.lane,rs.lanes|=o,Cc|=o,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function vs(e){var t=gs(),n=t.queue;if(null===n)throw Error(j(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var a=i=i.next;do{o=e(o,a.action),a=a.next}while(a!==i);Gr(o,t.memoizedState)||(ll=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function bs(){}function _s(e,t){var n=rs,r=gs(),i=t(),o=!Gr(r.memoizedState,i);if(o&&(r.memoizedState=i,ll=!0),r=r.queue,Rs(Ss.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||null!==os&&1&os.memoizedState.tag){if(n.flags|=2048,ks(9,xs.bind(null,n,r,i,t),void 0,null),null===yc)throw Error(j(349));0!=(30&ns)||ws(n,t,i)}return i}function ws(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=rs.updateQueue)?(t={lastEffect:null,stores:null},rs.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function xs(e,t,n,r){t.value=n,t.getSnapshot=r,Cs(t)&&Es(e)}function Ss(e,t,n){return n((function(){Cs(t)&&Es(e)}))}function Cs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Gr(e,n)}catch(r){return!0}}function Es(e){var t=va(e,1);null!==t&&qc(t,e,1,-1)}function Ts(e){var t=fs();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ms,lastRenderedState:e},t.queue=e,e=e.dispatch=qs.bind(null,rs,e),[t.memoizedState,e]}function ks(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=rs.updateQueue)?(t={lastEffect:null,stores:null},rs.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 Ns(){return gs().memoizedState}function As(e,t,n,r){var i=fs();rs.flags|=e,i.memoizedState=ks(1|t,n,void 0,void 0===r?null:r)}function Os(e,t,n,r){var i=gs();r=void 0===r?null:r;var o=void 0;if(null!==is){var a=is.memoizedState;if(o=a.destroy,null!==r&&ds(r,a.deps))return void(i.memoizedState=ks(t,n,o,r))}rs.flags|=e,i.memoizedState=ks(1|t,n,o,r)}function Ms(e,t){return As(8390656,8,e,t)}function Rs(e,t){return Os(2048,8,e,t)}function Ds(e,t){return Os(4,2,e,t)}function Is(e,t){return Os(4,4,e,t)}function Ps(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 Ls(e,t,n){return n=null!=n?n.concat([e]):null,Os(4,4,Ps.bind(null,t,e),n)}function Bs(){}function $s(e,t){var n=gs();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ds(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function zs(e,t){var n=gs();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ds(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Fs(e,t,n){return 0==(21&ns)?(e.baseState&&(e.baseState=!1,ll=!0),e.memoizedState=n):(Gr(n,t)||(n=rn(),rs.lanes|=n,Cc|=n,e.baseState=!0),t)}function Us(e,t){var n=ln;ln=0!==n&&4>n?n:4,e(!0);var r=ts.transition;ts.transition={};try{e(!1),t()}finally{ln=n,ts.transition=r}}function Hs(){return gs().memoizedState}function Vs(e,t,n){var r=Vc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ks(e))Ws(t,n);else if(null!==(n=ya(e,t,n,r))){qc(n,e,r,Hc()),js(n,t,r)}}function qs(e,t,n){var r=Vc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ks(e))Ws(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Gr(s,a)){var l=t.interleaved;return null===l?(i.next=i,ma(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(c){}null!==(n=ya(e,t,i,r))&&(qc(n,e,r,i=Hc()),js(n,t,r))}}function Ks(e){var t=e.alternate;return e===rs||null!==t&&t===rs}function Ws(e,t){ss=as=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function js(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,sn(e,n)}}var Ys={readContext:fa,useCallback:us,useContext:us,useEffect:us,useImperativeHandle:us,useInsertionEffect:us,useLayoutEffect:us,useMemo:us,useReducer:us,useRef:us,useState:us,useDebugValue:us,useDeferredValue:us,useTransition:us,useMutableSource:us,useSyncExternalStore:us,useId:us,unstable_isNewReconciler:!1},Gs={readContext:fa,useCallback:function(e,t){return fs().memoizedState=[e,void 0===t?null:t],e},useContext:fa,useEffect:Ms,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,As(4194308,4,Ps.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=fs();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=fs();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=Vs.bind(null,rs,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},fs().memoizedState=e},useState:Ts,useDebugValue:Bs,useDeferredValue:function(e){return fs().memoizedState=e},useTransition:function(){var e=Ts(!1),t=e[0];return e=Us.bind(null,e[1]),fs().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=rs,i=fs();if(jo){if(void 0===n)throw Error(j(407));n=n()}else{if(n=t(),null===yc)throw Error(j(349));0!=(30&ns)||ws(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Ms(Ss.bind(null,r,o,e),[e]),r.flags|=2048,ks(9,xs.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=fs(),t=yc.identifierPrefix;if(jo){var n=Fo;t=":"+t+"R"+(n=(zo&~(1<<32-Yt(zo)-1)).toString(32)+n),0<(n=ls++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=cs++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Js={readContext:fa,useCallback:$s,useContext:fa,useEffect:Rs,useImperativeHandle:Ls,useInsertionEffect:Ds,useLayoutEffect:Is,useMemo:zs,useReducer:ys,useRef:Ns,useState:function(){return ys(ms)},useDebugValue:Bs,useDeferredValue:function(e){return Fs(gs(),is.memoizedState,e)},useTransition:function(){return[ys(ms)[0],gs().memoizedState]},useMutableSource:bs,useSyncExternalStore:_s,useId:Hs,unstable_isNewReconciler:!1},Xs={readContext:fa,useCallback:$s,useContext:fa,useEffect:Rs,useImperativeHandle:Ls,useInsertionEffect:Ds,useLayoutEffect:Is,useMemo:zs,useReducer:vs,useRef:Ns,useState:function(){return vs(ms)},useDebugValue:Bs,useDeferredValue:function(e){var t=gs();return null===is?t.memoizedState=e:Fs(t,is.memoizedState,e)},useTransition:function(){return[vs(ms)[0],gs().memoizedState]},useMutableSource:bs,useSyncExternalStore:_s,useId:Hs,unstable_isNewReconciler:!1};function Zs(e,t){try{var n="",r=t;do{n+=Ae(r),r=r.return}while(r);var i=n}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:i,digest:null}}function Qs(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function el(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var tl="function"==typeof WeakMap?WeakMap:Map;function nl(e,t,n){(n=xa(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Rc||(Rc=!0,Dc=r),el(0,t)},n}function rl(e,t,n){(n=xa(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){el(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){el(0,t),"function"!=typeof r&&(null===Ic?Ic=new Set([this]):Ic.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function il(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new tl;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=pu.bind(null,e,t,n),t.then(e,e))}function ol(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 al(e,t,n,r,i){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=xa(-1,1)).tag=2,Sa(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var sl=le.ReactCurrentOwner,ll=!1;function cl(e,t,n,r){t.child=null===e?Fa(t,null,n,r):za(t,e.child,n,r)}function ul(e,t,n,r,i){n=n.render;var o=t.ref;return pa(t,i),r=hs(e,t,n,r,o,i),n=ps(),null===e||ll?(jo&&n&&Vo(t),t.flags|=1,cl(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Rl(e,t,i))}function dl(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||_u(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=xu(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,hl(e,t,o,r,i))}if(o=e.child,0==(e.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:Jr)(a,r)&&e.ref===t.ref)return Rl(e,t,i)}return t.flags|=1,(e=wu(o,r)).ref=t.ref,e.return=t,t.child=e}function hl(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(Jr(o,r)&&e.ref===t.ref){if(ll=!1,t.pendingProps=r=o,0==(e.lanes&i))return t.lanes=e.lanes,Rl(e,t,i);0!=(131072&e.flags)&&(ll=!0)}}return gl(e,t,n,r,i)}function pl(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},go(wc,_c),_c|=n;else{if(0==(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,go(wc,_c),_c|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,go(wc,_c),_c|=r}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,go(wc,_c),_c|=r;return cl(e,t,i,n),t.child}function fl(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function gl(e,t,n,r,i){var o=wo(n)?bo:yo.current;return o=_o(t,o),pa(t,i),n=hs(e,t,n,r,o,i),r=ps(),null===e||ll?(jo&&r&&Vo(t),t.flags|=1,cl(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Rl(e,t,i))}function ml(e,t,n,r,i){if(wo(n)){var o=!0;Eo(t)}else o=!1;if(pa(t,i),null===t.stateNode)Ml(e,t),Ra(t,n,r),Ia(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"==typeof c&&null!==c?c=fa(c):c=_o(t,c=wo(n)?bo:yo.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==c)&&Da(t,a,r,c),ba=!1;var h=t.memoizedState;a.state=h,Ta(t,r,a,i),l=t.memoizedState,s!==r||h!==l||vo.current||ba?("function"==typeof u&&(Aa(t,n,u,r),l=t.memoizedState),(s=ba||Ma(t,n,s,r,h,l,c))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,wa(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:oa(t.type,s),a.props=c,d=t.pendingProps,h=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=fa(l):l=_o(t,l=wo(n)?bo:yo.current);var p=n.getDerivedStateFromProps;(u="function"==typeof p||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||h!==l)&&Da(t,a,r,l),ba=!1,h=t.memoizedState,a.state=h,Ta(t,r,a,i);var f=t.memoizedState;s!==d||h!==f||vo.current||ba?("function"==typeof p&&(Aa(t,n,p,r),f=t.memoizedState),(c=ba||Ma(t,n,c,r,h,f,l)||!1)?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,f,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,f,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=f),a.props=r,a.state=f,a.context=l,r=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return yl(e,t,n,r,o,i)}function yl(e,t,n,r,i,o){fl(e,t);var a=0!=(128&t.flags);if(!r&&!a)return i&&To(t,n,!1),Rl(e,t,o);r=t.stateNode,sl.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=za(t,e.child,null,o),t.child=za(t,null,s,o)):cl(e,t,s,o),t.memoizedState=r.state,i&&To(t,n,!0),t.child}function vl(e){var t=e.stateNode;t.pendingContext?So(0,t.pendingContext,t.pendingContext!==t.context):t.context&&So(0,t.context,!1),Wa(e,t.containerInfo)}function bl(e,t,n,r,i){return na(),ra(i),t.flags|=256,cl(e,t,n,r),t.child}var _l,wl,xl,Sl={dehydrated:null,treeContext:null,retryLane:0};function Cl(e){return{baseLanes:e,cachePool:null,transitions:null}}function El(e,t,n){var r,i=t.pendingProps,o=Ja.current,a=!1,s=0!=(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&0!=(2&o)),r?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),go(Ja,1&o),null===e)return Zo(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):(s=i.children,e=i.fallback,a?(i=t.mode,a=t.child,s={mode:"hidden",children:s},0==(1&i)&&null!==a?(a.childLanes=0,a.pendingProps=s):a=Cu(s,i,0,null),e=Su(e,i,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Cl(n),t.memoizedState=Sl,e):Tl(t,s));if(null!==(o=e.memoizedState)&&null!==(r=o.dehydrated))return function(e,t,n,r,i,o,a){if(n)return 256&t.flags?(t.flags&=-257,kl(e,t,a,r=Qs(Error(j(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Cu({mode:"visible",children:r.children},i,0,null),(o=Su(o,i,a,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,0!=(1&t.mode)&&za(t,e.child,null,a),t.child.memoizedState=Cl(a),t.memoizedState=Sl,o);if(0==(1&t.mode))return kl(e,t,a,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var s=r.dgst;return r=s,kl(e,t,a,r=Qs(o=Error(j(419)),r,void 0))}if(s=0!=(a&e.childLanes),ll||s){if(null!==(r=yc)){switch(a&-a){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!=(i&(r.suspendedLanes|a))?0:i)&&i!==o.retryLane&&(o.retryLane=i,va(e,i),qc(r,e,i,-1))}return ru(),kl(e,t,a,r=Qs(Error(j(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=gu.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Wo=Xi(i.nextSibling),Ko=t,jo=!0,Yo=null,null!==e&&(Lo[Bo++]=zo,Lo[Bo++]=Fo,Lo[Bo++]=$o,zo=e.id,Fo=e.overflow,$o=t),(t=Tl(t,r.children)).flags|=4096,t)}(e,t,s,i,r,o,n);if(a){a=i.fallback,s=t.mode,r=(o=e.child).sibling;var l={mode:"hidden",children:i.children};return 0==(1&s)&&t.child!==o?((i=t.child).childLanes=0,i.pendingProps=l,t.deletions=null):(i=wu(o,l)).subtreeFlags=14680064&o.subtreeFlags,null!==r?a=wu(r,a):(a=Su(a,s,n,null)).flags|=2,a.return=t,i.return=t,i.sibling=a,t.child=i,i=a,a=t.child,s=null===(s=e.child.memoizedState)?Cl(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},a.memoizedState=s,a.childLanes=e.childLanes&~n,t.memoizedState=Sl,i}return e=(a=e.child).sibling,i=wu(a,{mode:"visible",children:i.children}),0==(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Tl(e,t){return(t=Cu({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function kl(e,t,n,r){return null!==r&&ra(r),za(t,e.child,null,n),(e=Tl(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Nl(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),ha(e.return,t,n)}function Al(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Ol(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(cl(e,t,r.children,n),0!=(2&(r=Ja.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&&Nl(e,n,t);else if(19===e.tag)Nl(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(go(Ja,r),0==(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Xa(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Al(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Xa(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Al(t,!0,n,null,o);break;case"together":Al(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ml(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Rl(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Cc|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(j(153));if(null!==t.child){for(n=wu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=wu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Dl(e,t){if(!jo)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 Il(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Pl(e,t,n){var r=t.pendingProps;switch(qo(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Il(t),null;case 1:case 17:return wo(t.type)&&xo(),Il(t),null;case 3:return r=t.stateNode,ja(),fo(vo),fo(yo),Qa(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(ea(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==Yo&&(Yc(Yo),Yo=null))),Il(t),null;case 5:Ga(t);var i=Ka(qa.current);if(n=t.type,null!==e&&null!=t.stateNode)wl(e,t,n,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(j(166));return Il(t),null}if(e=Ka(Ha.current),ea(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[eo]=t,r[to]=o,e=0!=(1&t.mode),n){case"dialog":ki("cancel",r),ki("close",r);break;case"iframe":case"object":case"embed":ki("load",r);break;case"video":case"audio":for(i=0;i<Si.length;i++)ki(Si[i],r);break;case"source":ki("error",r);break;case"img":case"image":case"link":ki("error",r),ki("load",r);break;case"details":ki("toggle",r);break;case"input":$e(r,o),ki("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},ki("invalid",r);break;case"textarea":We(r,o),ki("invalid",r)}for(var a in at(n,o),i=null,o)if(o.hasOwnProperty(a)){var s=o[a];"children"===a?"string"==typeof s?r.textContent!==s&&(!0!==o.suppressHydrationWarning&&Fi(r.textContent,s,e),i=["children",s]):"number"==typeof s&&r.textContent!==""+s&&(!0!==o.suppressHydrationWarning&&Fi(r.textContent,s,e),i=["children",""+s]):G.hasOwnProperty(a)&&null!=s&&"onScroll"===a&&ki("scroll",r)}switch(n){case"input":Ie(r),Ue(r,o,!0);break;case"textarea":Ie(r),Ye(r);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(r.onclick=Ui)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{a=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=Ge(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=a.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),"select"===n&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[eo]=t,e[to]=r,_l(e,t),t.stateNode=e;e:{switch(a=st(n,r),n){case"dialog":ki("cancel",e),ki("close",e),i=r;break;case"iframe":case"object":case"embed":ki("load",e),i=r;break;case"video":case"audio":for(i=0;i<Si.length;i++)ki(Si[i],e);i=r;break;case"source":ki("error",e),i=r;break;case"img":case"image":case"link":ki("error",e),ki("load",e),i=r;break;case"details":ki("toggle",e),i=r;break;case"input":$e(e,r),i=Be(e,r),ki("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Ee({},r,{value:void 0}),ki("invalid",e);break;case"textarea":We(e,r),i=Ke(e,r),ki("invalid",e)}for(o in at(n,i),s=i)if(s.hasOwnProperty(o)){var l=s[o];"style"===o?it(e,l):"dangerouslySetInnerHTML"===o?null!=(l=l?l.__html:void 0)&&Qe(e,l):"children"===o?"string"==typeof l?("textarea"!==n||""!==l)&&et(e,l):"number"==typeof l&&et(e,""+l):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(G.hasOwnProperty(o)?null!=l&&"onScroll"===o&&ki("scroll",e):null!=l&&se(e,o,l,a))}switch(n){case"input":Ie(e),Ue(e,r,!1);break;case"textarea":Ie(e),Ye(e);break;case"option":null!=r.value&&e.setAttribute("value",""+Re(r.value));break;case"select":e.multiple=!!r.multiple,null!=(o=r.value)?qe(e,!!r.multiple,o,!1):null!=r.defaultValue&&qe(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=Ui)}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 Il(t),null;case 6:if(e&&null!=t.stateNode)xl(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(j(166));if(n=Ka(qa.current),Ka(Ha.current),ea(t)){if(r=t.stateNode,n=t.memoizedProps,r[eo]=t,(o=r.nodeValue!==n)&&null!==(e=Ko))switch(e.tag){case 3:Fi(r.nodeValue,n,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Fi(r.nodeValue,n,0!=(1&e.mode))}o&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[eo]=t,t.stateNode=r}return Il(t),null;case 13:if(fo(Ja),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(jo&&null!==Wo&&0!=(1&t.mode)&&0==(128&t.flags))ta(),na(),t.flags|=98560,o=!1;else if(o=ea(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(j(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(j(317));o[eo]=t}else na(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Il(t),o=!1}else null!==Yo&&(Yc(Yo),Yo=null),o=!0;if(!o)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&Ja.current)?0===xc&&(xc=3):ru())),null!==t.updateQueue&&(t.flags|=4),Il(t),null);case 4:return ja(),null===e&&Oi(t.stateNode.containerInfo),Il(t),null;case 10:return da(t.type._context),Il(t),null;case 19:if(fo(Ja),null===(o=t.memoizedState))return Il(t),null;if(r=0!=(128&t.flags),null===(a=o.rendering))if(r)Dl(o,!1);else{if(0!==xc||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(a=Xa(e))){for(t.flags|=128,Dl(o,!1),null!==(r=a.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(o=n).flags&=14680066,null===(a=o.alternate)?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return go(Ja,1&Ja.current|2),t.child}e=e.sibling}null!==o.tail&&zt()>Oc&&(t.flags|=128,r=!0,Dl(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=Xa(a))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Dl(o,!0),null===o.tail&&"hidden"===o.tailMode&&!a.alternate&&!jo)return Il(t),null}else 2*zt()-o.renderingStartTime>Oc&&1073741824!==n&&(t.flags|=128,r=!0,Dl(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(null!==(n=o.last)?n.sibling=a:t.child=a,o.last=a)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=zt(),t.sibling=null,n=Ja.current,go(Ja,r?1&n|2:1&n),t):(Il(t),null);case 22:case 23:return Qc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&_c)&&(Il(t),6&t.subtreeFlags&&(t.flags|=8192)):Il(t),null;case 24:case 25:return null}throw Error(j(156,t.tag))}function Ll(e,t){switch(qo(t),t.tag){case 1:return wo(t.type)&&xo(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return ja(),fo(vo),fo(yo),Qa(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Ga(t),null;case 13:if(fo(Ja),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(j(340));na()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return fo(Ja),null;case 4:return ja(),null;case 10:return da(t.type._context),null;case 22:case 23:return Qc(),null;default:return null}}_l=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}},wl=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ka(Ha.current);var o,a=null;switch(n){case"input":i=Be(e,i),r=Be(e,r),a=[];break;case"select":i=Ee({},i,{value:void 0}),r=Ee({},r,{value:void 0}),a=[];break;case"textarea":i=Ke(e,i),r=Ke(e,r),a=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=Ui)}for(c in at(n,r),n=null,i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var s=i[c];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(G.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in r){var l=r[c];if(s=null!=i?i[c]:void 0,r.hasOwnProperty(c)&&l!==s&&(null!=l||null!=s))if("style"===c)if(s){for(o in s)!s.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&s[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(a||(a=[]),a.push(c,n)),n=l;else"dangerouslySetInnerHTML"===c?(l=l?l.__html:void 0,s=s?s.__html:void 0,null!=l&&s!==l&&(a=a||[]).push(c,l)):"children"===c?"string"!=typeof l&&"number"!=typeof l||(a=a||[]).push(c,""+l):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(G.hasOwnProperty(c)?(null!=l&&"onScroll"===c&&ki("scroll",e),a||s===l||(a=[])):(a=a||[]).push(c,l))}n&&(a=a||[]).push("style",n);var c=a;(t.updateQueue=c)&&(t.flags|=4)}},xl=function(e,t,n,r){n!==r&&(t.flags|=4)};var Bl=!1,$l=!1,zl="function"==typeof WeakSet?WeakSet:Set,Fl=null;function Ul(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(r){hu(e,t,r)}else n.current=null}function Hl(e,t,n){try{n()}catch(r){hu(e,t,r)}}var Vl=!1;function ql(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&Hl(t,n,o)}i=i.next}while(i!==r)}}function Kl(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 Wl(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 jl(e){var t=e.alternate;null!==t&&(e.alternate=null,jl(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[eo],delete t[to],delete t[ro],delete t[io],delete t[oo])),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 Yl(e){return 5===e.tag||3===e.tag||4===e.tag}function Gl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Yl(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 Jl(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=Ui));else if(4!==r&&null!==(e=e.child))for(Jl(e,t,n),e=e.sibling;null!==e;)Jl(e,t,n),e=e.sibling}function Xl(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(Xl(e,t,n),e=e.sibling;null!==e;)Xl(e,t,n),e=e.sibling}var Zl=null,Ql=!1;function ec(e,t,n){for(n=n.child;null!==n;)tc(e,t,n),n=n.sibling}function tc(e,t,n){if(jt&&"function"==typeof jt.onCommitFiberUnmount)try{jt.onCommitFiberUnmount(Wt,n)}catch(s){}switch(n.tag){case 5:$l||Ul(n,t);case 6:var r=Zl,i=Ql;Zl=null,ec(e,t,n),Ql=i,null!==(Zl=r)&&(Ql?(e=Zl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):Zl.removeChild(n.stateNode));break;case 18:null!==Zl&&(Ql?(e=Zl,n=n.stateNode,8===e.nodeType?Ji(e.parentNode,n):1===e.nodeType&&Ji(e,n),Mn(e)):Ji(Zl,n.stateNode));break;case 4:r=Zl,i=Ql,Zl=n.stateNode.containerInfo,Ql=!0,ec(e,t,n),Zl=r,Ql=i;break;case 0:case 11:case 14:case 15:if(!$l&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(0!=(2&o)||0!=(4&o))&&Hl(n,t,a),i=i.next}while(i!==r)}ec(e,t,n);break;case 1:if(!$l&&(Ul(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){hu(n,t,s)}ec(e,t,n);break;case 21:ec(e,t,n);break;case 22:1&n.mode?($l=(r=$l)||null!==n.memoizedState,ec(e,t,n),$l=r):ec(e,t,n);break;default:ec(e,t,n)}}function nc(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new zl),t.forEach((function(t){var r=mu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function rc(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,a=t,s=a;e:for(;null!==s;){switch(s.tag){case 5:Zl=s.stateNode,Ql=!1;break e;case 3:case 4:Zl=s.stateNode.containerInfo,Ql=!0;break e}s=s.return}if(null===Zl)throw Error(j(160));tc(o,a,i),Zl=null,Ql=!1;var l=i.alternate;null!==l&&(l.return=null),i.return=null}catch(c){hu(i,t,c)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)ic(t,e),t=t.sibling}function ic(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(rc(t,e),oc(e),4&r){try{ql(3,e,e.return),Kl(3,e)}catch(g){hu(e,e.return,g)}try{ql(5,e,e.return)}catch(g){hu(e,e.return,g)}}break;case 1:rc(t,e),oc(e),512&r&&null!==n&&Ul(n,n.return);break;case 5:if(rc(t,e),oc(e),512&r&&null!==n&&Ul(n,n.return),32&e.flags){var i=e.stateNode;try{et(i,"")}catch(g){hu(e,e.return,g)}}if(4&r&&null!=(i=e.stateNode)){var o=e.memoizedProps,a=null!==n?n.memoizedProps:o,s=e.type,l=e.updateQueue;if(e.updateQueue=null,null!==l)try{"input"===s&&"radio"===o.type&&null!=o.name&&ze(i,o),st(s,a);var c=st(s,o);for(a=0;a<l.length;a+=2){var u=l[a],d=l[a+1];"style"===u?it(i,d):"dangerouslySetInnerHTML"===u?Qe(i,d):"children"===u?et(i,d):se(i,u,d,c)}switch(s){case"input":Fe(i,o);break;case"textarea":je(i,o);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var p=o.value;null!=p?qe(i,!!o.multiple,p,!1):h!==!!o.multiple&&(null!=o.defaultValue?qe(i,!!o.multiple,o.defaultValue,!0):qe(i,!!o.multiple,o.multiple?[]:"",!1))}i[to]=o}catch(g){hu(e,e.return,g)}}break;case 6:if(rc(t,e),oc(e),4&r){if(null===e.stateNode)throw Error(j(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(g){hu(e,e.return,g)}}break;case 3:if(rc(t,e),oc(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Mn(t.containerInfo)}catch(g){hu(e,e.return,g)}break;case 4:default:rc(t,e),oc(e);break;case 13:rc(t,e),oc(e),8192&(i=e.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,!o||null!==i.alternate&&null!==i.alternate.memoizedState||(Ac=zt())),4&r&&nc(e);break;case 22:if(u=null!==n&&null!==n.memoizedState,1&e.mode?($l=(c=$l)||u,rc(t,e),$l=c):rc(t,e),oc(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!u&&0!=(1&e.mode))for(Fl=e,u=e.child;null!==u;){for(d=Fl=u;null!==Fl;){switch(p=(h=Fl).child,h.tag){case 0:case 11:case 14:case 15:ql(4,h,h.return);break;case 1:Ul(h,h.return);var f=h.stateNode;if("function"==typeof f.componentWillUnmount){r=h,n=h.return;try{t=r,f.props=t.memoizedProps,f.state=t.memoizedState,f.componentWillUnmount()}catch(g){hu(r,n,g)}}break;case 5:Ul(h,h.return);break;case 22:if(null!==h.memoizedState){cc(d);continue}}null!==p?(p.return=h,Fl=p):cc(d)}u=u.sibling}e:for(u=null,d=e;;){if(5===d.tag){if(null===u){u=d;try{i=d.stateNode,c?"function"==typeof(o=i.style).setProperty?o.setProperty("display","none","important"):o.display="none":(s=d.stateNode,a=null!=(l=d.memoizedProps.style)&&l.hasOwnProperty("display")?l.display:null,s.style.display=rt("display",a))}catch(g){hu(e,e.return,g)}}}else if(6===d.tag){if(null===u)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(g){hu(e,e.return,g)}}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;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:rc(t,e),oc(e),4&r&&nc(e);case 21:}}function oc(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(Yl(n)){var r=n;break e}n=n.return}throw Error(j(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(et(i,""),r.flags&=-33),Xl(e,Gl(e),i);break;case 3:case 4:var o=r.stateNode.containerInfo;Jl(e,Gl(e),o);break;default:throw Error(j(161))}}catch(a){hu(e,e.return,a)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function ac(e,t,n){Fl=e,sc(e)}function sc(e,t,n){for(var r=0!=(1&e.mode);null!==Fl;){var i=Fl,o=i.child;if(22===i.tag&&r){var a=null!==i.memoizedState||Bl;if(!a){var s=i.alternate,l=null!==s&&null!==s.memoizedState||$l;s=Bl;var c=$l;if(Bl=a,($l=l)&&!c)for(Fl=i;null!==Fl;)l=(a=Fl).child,22===a.tag&&null!==a.memoizedState?uc(i):null!==l?(l.return=a,Fl=l):uc(i);for(;null!==o;)Fl=o,sc(o),o=o.sibling;Fl=i,Bl=s,$l=c}lc(e)}else 0!=(8772&i.subtreeFlags)&&null!==o?(o.return=i,Fl=o):lc(e)}}function lc(e){for(;null!==Fl;){var t=Fl;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:$l||Kl(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!$l)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:oa(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&ka(t,o,r);break;case 3:var a=t.updateQueue;if(null!==a){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}ka(t,a,n)}break;case 5:var s=t.stateNode;if(null===n&&4&t.flags){n=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.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 c=t.alternate;if(null!==c){var u=c.memoizedState;if(null!==u){var d=u.dehydrated;null!==d&&Mn(d)}}}break;default:throw Error(j(163))}$l||512&t.flags&&Wl(t)}catch(h){hu(t,t.return,h)}}if(t===e){Fl=null;break}if(null!==(n=t.sibling)){n.return=t.return,Fl=n;break}Fl=t.return}}function cc(e){for(;null!==Fl;){var t=Fl;if(t===e){Fl=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Fl=n;break}Fl=t.return}}function uc(e){for(;null!==Fl;){var t=Fl;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Kl(4,t)}catch(l){hu(t,n,l)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(l){hu(t,i,l)}}var o=t.return;try{Wl(t)}catch(l){hu(t,o,l)}break;case 5:var a=t.return;try{Wl(t)}catch(l){hu(t,a,l)}}}catch(l){hu(t,t.return,l)}if(t===e){Fl=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Fl=s;break}Fl=t.return}}var dc,hc=Math.ceil,pc=le.ReactCurrentDispatcher,fc=le.ReactCurrentOwner,gc=le.ReactCurrentBatchConfig,mc=0,yc=null,vc=null,bc=0,_c=0,wc=po(0),xc=0,Sc=null,Cc=0,Ec=0,Tc=0,kc=null,Nc=null,Ac=0,Oc=1/0,Mc=null,Rc=!1,Dc=null,Ic=null,Pc=!1,Lc=null,Bc=0,$c=0,zc=null,Fc=-1,Uc=0;function Hc(){return 0!=(6&mc)?zt():-1!==Fc?Fc:Fc=zt()}function Vc(e){return 0==(1&e.mode)?1:0!=(2&mc)&&0!==bc?bc&-bc:null!==ia.transition?(0===Uc&&(Uc=rn()),Uc):0!==(e=ln)?e:e=void 0===(e=window.event)?16:zn(e.type)}function qc(e,t,n,r){if(50<$c)throw $c=0,zc=null,Error(j(185));an(e,n,r),0!=(2&mc)&&e===yc||(e===yc&&(0==(2&mc)&&(Ec|=n),4===xc&&Gc(e,bc)),Kc(e,r),1===n&&0===mc&&0==(1&t.mode)&&(Oc=zt()+500,No&&Mo()))}function Kc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-Yt(o),s=1<<a,l=i[a];-1===l?0!=(s&n)&&0==(s&r)||(i[a]=tn(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var r=en(e,e===yc?bc:0);if(0===r)null!==n&&Lt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Lt(n),1===t)0===e.tag?function(e){No=!0,Oo(e)}(Jc.bind(null,e)):Oo(Jc.bind(null,e)),Yi((function(){0==(6&mc)&&Mo()})),n=null;else{switch(cn(r)){case 1:n=Ut;break;case 4:n=Ht;break;case 16:default:n=Vt;break;case 536870912:n=Kt}n=yu(n,Wc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Wc(e,t){if(Fc=-1,Uc=0,0!=(6&mc))throw Error(j(327));var n=e.callbackNode;if(uu()&&e.callbackNode!==n)return null;var r=en(e,e===yc?bc:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=iu(e,r);else{t=r;var i=mc;mc|=2;var o=nu();for(yc===e&&bc===t||(Mc=null,Oc=zt()+500,eu(e,t));;)try{au();break}catch(s){tu(e,s)}ua(),pc.current=o,mc=i,null!==vc?t=0:(yc=null,bc=0,t=xc)}if(0!==t){if(2===t&&(0!==(i=nn(e))&&(r=i,t=jc(e,i))),1===t)throw n=Sc,eu(e,0),Gc(e,r),Kc(e,zt()),n;if(6===t)Gc(e,r);else{if(i=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 i=n[r],o=i.getSnapshot;i=i.value;try{if(!Gr(o(),i))return!1}catch(a){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}(i)&&(2===(t=iu(e,r))&&(0!==(o=nn(e))&&(r=o,t=jc(e,o))),1===t))throw n=Sc,eu(e,0),Gc(e,r),Kc(e,zt()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(j(345));case 2:case 5:cu(e,Nc,Mc);break;case 3:if(Gc(e,r),(130023424&r)===r&&10<(t=Ac+500-zt())){if(0!==en(e,0))break;if(((i=e.suspendedLanes)&r)!==r){Hc(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Ki(cu.bind(null,e,Nc,Mc),t);break}cu(e,Nc,Mc);break;case 4:if(Gc(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-Yt(r);o=1<<a,(a=t[a])>i&&(i=a),r&=~o}if(r=i,10<(r=(120>(r=zt()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*hc(r/1960))-r)){e.timeoutHandle=Ki(cu.bind(null,e,Nc,Mc),r);break}cu(e,Nc,Mc);break;default:throw Error(j(329))}}}return Kc(e,zt()),e.callbackNode===n?Wc.bind(null,e):null}function jc(e,t){var n=kc;return e.current.memoizedState.isDehydrated&&(eu(e,t).flags|=256),2!==(e=iu(e,t))&&(t=Nc,Nc=n,null!==t&&Yc(t)),e}function Yc(e){null===Nc?Nc=e:Nc.push.apply(Nc,e)}function Gc(e,t){for(t&=~Tc,t&=~Ec,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Yt(t),r=1<<n;e[n]=-1,t&=~r}}function Jc(e){if(0!=(6&mc))throw Error(j(327));uu();var t=en(e,0);if(0==(1&t))return Kc(e,zt()),null;var n=iu(e,t);if(0!==e.tag&&2===n){var r=nn(e);0!==r&&(t=r,n=jc(e,r))}if(1===n)throw n=Sc,eu(e,0),Gc(e,t),Kc(e,zt()),n;if(6===n)throw Error(j(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,cu(e,Nc,Mc),Kc(e,zt()),null}function Xc(e,t){var n=mc;mc|=1;try{return e(t)}finally{0===(mc=n)&&(Oc=zt()+500,No&&Mo())}}function Zc(e){null!==Lc&&0===Lc.tag&&0==(6&mc)&&uu();var t=mc;mc|=1;var n=gc.transition,r=ln;try{if(gc.transition=null,ln=1,e)return e()}finally{ln=r,gc.transition=n,0==(6&(mc=t))&&Mo()}}function Qc(){_c=wc.current,fo(wc)}function eu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Wi(n)),null!==vc)for(n=vc.return;null!==n;){var r=n;switch(qo(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&xo();break;case 3:ja(),fo(vo),fo(yo),Qa();break;case 5:Ga(r);break;case 4:ja();break;case 13:case 19:fo(Ja);break;case 10:da(r.type._context);break;case 22:case 23:Qc()}n=n.return}if(yc=e,vc=e=wu(e.current,null),bc=_c=t,xc=0,Sc=null,Tc=Ec=Cc=0,Nc=kc=null,null!==ga){for(t=0;t<ga.length;t++)if(null!==(r=(n=ga[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var a=o.next;o.next=i,r.next=a}n.pending=r}ga=null}return e}function tu(e,t){for(;;){var n=vc;try{if(ua(),es.current=Ys,as){for(var r=rs.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}as=!1}if(ns=0,os=is=rs=null,ss=!1,ls=0,fc.current=null,null===n||null===n.return){xc=1,Sc=t,vc=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=bc,s.flags|=32768,null!==l&&"object"==typeof l&&"function"==typeof l.then){var c=l,u=s,d=u.tag;if(0==(1&u.mode)&&(0===d||11===d||15===d)){var h=u.alternate;h?(u.updateQueue=h.updateQueue,u.memoizedState=h.memoizedState,u.lanes=h.lanes):(u.updateQueue=null,u.memoizedState=null)}var p=ol(a);if(null!==p){p.flags&=-257,al(p,a,s,0,t),1&p.mode&&il(o,c,t),l=c;var f=(t=p).updateQueue;if(null===f){var g=new Set;g.add(l),t.updateQueue=g}else f.add(l);break e}if(0==(1&t)){il(o,c,t),ru();break e}l=Error(j(426))}else if(jo&&1&s.mode){var m=ol(a);if(null!==m){0==(65536&m.flags)&&(m.flags|=256),al(m,a,s,0,t),ra(Zs(l,s));break e}}o=l=Zs(l,s),4!==xc&&(xc=2),null===kc?kc=[o]:kc.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,Ea(o,nl(0,l,t));break e;case 1:s=l;var y=o.type,v=o.stateNode;if(0==(128&o.flags)&&("function"==typeof y.getDerivedStateFromError||null!==v&&"function"==typeof v.componentDidCatch&&(null===Ic||!Ic.has(v)))){o.flags|=65536,t&=-t,o.lanes|=t,Ea(o,rl(o,s,t));break e}}o=o.return}while(null!==o)}lu(n)}catch(b){t=b,vc===n&&null!==n&&(vc=n=n.return);continue}break}}function nu(){var e=pc.current;return pc.current=Ys,null===e?Ys:e}function ru(){0!==xc&&3!==xc&&2!==xc||(xc=4),null===yc||0==(268435455&Cc)&&0==(268435455&Ec)||Gc(yc,bc)}function iu(e,t){var n=mc;mc|=2;var r=nu();for(yc===e&&bc===t||(Mc=null,eu(e,t));;)try{ou();break}catch(i){tu(e,i)}if(ua(),mc=n,pc.current=r,null!==vc)throw Error(j(261));return yc=null,bc=0,xc}function ou(){for(;null!==vc;)su(vc)}function au(){for(;null!==vc&&!Bt();)su(vc)}function su(e){var t=dc(e.alternate,e,_c);e.memoizedProps=e.pendingProps,null===t?lu(e):vc=t,fc.current=null}function lu(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=Pl(n,t,_c)))return void(vc=n)}else{if(null!==(n=Ll(n,t)))return n.flags&=32767,void(vc=n);if(null===e)return xc=6,void(vc=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(vc=t);vc=t=e}while(null!==t);0===xc&&(xc=5)}function cu(e,t,n){var r=ln,i=gc.transition;try{gc.transition=null,ln=1,function(e,t,n,r){do{uu()}while(null!==Lc);if(0!=(6&mc))throw Error(j(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(j(177));e.callbackNode=null,e.callbackPriority=0;var o=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 i=31-Yt(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,o),e===yc&&(vc=yc=null,bc=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||Pc||(Pc=!0,yu(Vt,(function(){return uu(),null}))),o=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||o){o=gc.transition,gc.transition=null;var a=ln;ln=1;var s=mc;mc|=4,fc.current=null,function(e,t){if(Hi=Dn,ti(e=ei())){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 i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(_){n=null;break e}var a=0,s=-1,l=-1,c=0,u=0,d=e,h=null;t:for(;;){for(var p;d!==n||0!==i&&3!==d.nodeType||(s=a+i),d!==o||0!==r&&3!==d.nodeType||(l=a+r),3===d.nodeType&&(a+=d.nodeValue.length),null!==(p=d.firstChild);)h=d,d=p;for(;;){if(d===e)break t;if(h===n&&++c===i&&(s=a),h===o&&++u===r&&(l=a),null!==(p=d.nextSibling))break;h=(d=h).parentNode}d=p}n=-1===s||-1===l?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Vi={focusedElem:e,selectionRange:n},Dn=!1,Fl=t;null!==Fl;)if(e=(t=Fl).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,Fl=e;else for(;null!==Fl;){t=Fl;try{var f=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!==f){var g=f.memoizedProps,m=f.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:oa(t.type,g),m);y.__reactInternalSnapshotBeforeUpdate=v}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(j(163))}}catch(_){hu(t,t.return,_)}if(null!==(e=t.sibling)){e.return=t.return,Fl=e;break}Fl=t.return}f=Vl,Vl=!1}(e,n),ic(n,e),ni(Vi),Dn=!!Hi,Vi=Hi=null,e.current=n,ac(n),$t(),mc=s,ln=a,gc.transition=o}else e.current=n;if(Pc&&(Pc=!1,Lc=e,Bc=i),0===(o=e.pendingLanes)&&(Ic=null),function(e){if(jt&&"function"==typeof jt.onCommitFiberRoot)try{jt.onCommitFiberRoot(Wt,e,void 0,128==(128&e.current.flags))}catch(t){}}(n.stateNode),Kc(e,zt()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Rc)throw Rc=!1,e=Dc,Dc=null,e;0!=(1&Bc)&&0!==e.tag&&uu(),0!=(1&(o=e.pendingLanes))?e===zc?$c++:($c=0,zc=e):$c=0,Mo()}(e,t,n,r)}finally{gc.transition=i,ln=r}return null}function uu(){if(null!==Lc){var e=cn(Bc),t=gc.transition,n=ln;try{if(gc.transition=null,ln=16>e?16:e,null===Lc)var r=!1;else{if(e=Lc,Lc=null,Bc=0,0!=(6&mc))throw Error(j(331));var i=mc;for(mc|=4,Fl=e.current;null!==Fl;){var o=Fl,a=o.child;if(0!=(16&Fl.flags)){var s=o.deletions;if(null!==s){for(var l=0;l<s.length;l++){var c=s[l];for(Fl=c;null!==Fl;){var u=Fl;switch(u.tag){case 0:case 11:case 15:ql(8,u,o)}var d=u.child;if(null!==d)d.return=u,Fl=d;else for(;null!==Fl;){var h=(u=Fl).sibling,p=u.return;if(jl(u),u===c){Fl=null;break}if(null!==h){h.return=p,Fl=h;break}Fl=p}}}var f=o.alternate;if(null!==f){var g=f.child;if(null!==g){f.child=null;do{var m=g.sibling;g.sibling=null,g=m}while(null!==g)}}Fl=o}}if(0!=(2064&o.subtreeFlags)&&null!==a)a.return=o,Fl=a;else e:for(;null!==Fl;){if(0!=(2048&(o=Fl).flags))switch(o.tag){case 0:case 11:case 15:ql(9,o,o.return)}var y=o.sibling;if(null!==y){y.return=o.return,Fl=y;break e}Fl=o.return}}var v=e.current;for(Fl=v;null!==Fl;){var b=(a=Fl).child;if(0!=(2064&a.subtreeFlags)&&null!==b)b.return=a,Fl=b;else e:for(a=v;null!==Fl;){if(0!=(2048&(s=Fl).flags))try{switch(s.tag){case 0:case 11:case 15:Kl(9,s)}}catch(w){hu(s,s.return,w)}if(s===a){Fl=null;break e}var _=s.sibling;if(null!==_){_.return=s.return,Fl=_;break e}Fl=s.return}}if(mc=i,Mo(),jt&&"function"==typeof jt.onPostCommitFiberRoot)try{jt.onPostCommitFiberRoot(Wt,e)}catch(w){}r=!0}return r}finally{ln=n,gc.transition=t}}return!1}function du(e,t,n){e=Sa(e,t=nl(0,t=Zs(n,t),1),1),t=Hc(),null!==e&&(an(e,1,t),Kc(e,t))}function hu(e,t,n){if(3===e.tag)du(e,e,n);else for(;null!==t;){if(3===t.tag){du(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Ic||!Ic.has(r))){t=Sa(t,e=rl(t,e=Zs(n,e),1),1),e=Hc(),null!==t&&(an(t,1,e),Kc(t,e));break}}t=t.return}}function pu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=Hc(),e.pingedLanes|=e.suspendedLanes&n,yc===e&&(bc&n)===n&&(4===xc||3===xc&&(130023424&bc)===bc&&500>zt()-Ac?eu(e,0):Tc|=n),Kc(e,t)}function fu(e,t){0===t&&(0==(1&e.mode)?t=1:(t=Zt,0==(130023424&(Zt<<=1))&&(Zt=4194304)));var n=Hc();null!==(e=va(e,t))&&(an(e,t,n),Kc(e,n))}function gu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),fu(e,n)}function mu(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(j(314))}null!==r&&r.delete(t),fu(e,n)}function yu(e,t){return Pt(e,t)}function vu(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 bu(e,t,n,r){return new vu(e,t,n,r)}function _u(e){return!(!(e=e.prototype)||!e.isReactComponent)}function wu(e,t){var n=e.alternate;return null===n?((n=bu(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 xu(e,t,n,r,i,o){var a=2;if(r=e,"function"==typeof e)_u(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case de:return Su(n.children,i,o,t);case he:a=8,i|=8;break;case pe:return(e=bu(12,n,t,2|i)).elementType=pe,e.lanes=o,e;case ye:return(e=bu(13,n,t,i)).elementType=ye,e.lanes=o,e;case ve:return(e=bu(19,n,t,i)).elementType=ve,e.lanes=o,e;case we:return Cu(n,i,o,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case fe:a=10;break e;case ge:a=9;break e;case me:a=11;break e;case be:a=14;break e;case _e:a=16,r=null;break e}throw Error(j(130,null==e?e:typeof e,""))}return(t=bu(a,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Su(e,t,n,r){return(e=bu(7,e,r,t)).lanes=n,e}function Cu(e,t,n,r){return(e=bu(22,e,r,t)).elementType=we,e.lanes=n,e.stateNode={isHidden:!1},e}function Eu(e,t,n){return(e=bu(6,e,null,t)).lanes=n,e}function Tu(e,t,n){return(t=bu(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ku(e,t,n,r,i){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=on(0),this.expirationTimes=on(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=on(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Nu(e,t,n,r,i,o,a,s,l){return e=new ku(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=bu(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},_a(o),e}function Au(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:ue,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Ou(e){if(!e)return mo;e:{if(Ot(e=e._reactInternals)!==e||1!==e.tag)throw Error(j(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(wo(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(j(171))}if(1===e.tag){var n=e.type;if(wo(n))return Co(e,n,t)}return t}function Mu(e,t,n,r,i,o,a,s,l){return(e=Nu(n,r,!0,e,0,o,0,s,l)).context=Ou(null),n=e.current,(o=xa(r=Hc(),i=Vc(n))).callback=null!=t?t:null,Sa(n,o,i),e.current.lanes=i,an(e,i,r),Kc(e,r),e}function Ru(e,t,n,r){var i=t.current,o=Hc(),a=Vc(i);return n=Ou(n),null===t.context?t.context=n:t.pendingContext=n,(t=xa(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Sa(i,t,a))&&(qc(e,i,a,o),Ca(e,i,a)),a}function Du(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Iu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Pu(e,t){Iu(e,t),(e=e.alternate)&&Iu(e,t)}dc=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||vo.current)ll=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return ll=!1,function(e,t,n){switch(t.tag){case 3:vl(t),na();break;case 5:Ya(t);break;case 1:wo(t.type)&&Eo(t);break;case 4:Wa(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;go(aa,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(go(Ja,1&Ja.current),t.flags|=128,null):0!=(n&t.child.childLanes)?El(e,t,n):(go(Ja,1&Ja.current),null!==(e=Rl(e,t,n))?e.sibling:null);go(Ja,1&Ja.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return Ol(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),go(Ja,Ja.current),r)break;return null;case 22:case 23:return t.lanes=0,pl(e,t,n)}return Rl(e,t,n)}(e,t,n);ll=0!=(131072&e.flags)}else ll=!1,jo&&0!=(1048576&t.flags)&&Ho(t,Po,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ml(e,t),e=t.pendingProps;var i=_o(t,yo.current);pa(t,n),i=hs(null,t,r,e,i,n);var o=ps();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,wo(r)?(o=!0,Eo(t)):o=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,_a(t),i.updater=Oa,t.stateNode=i,i._reactInternals=t,Ia(t,r,e,n),t=yl(null,t,r,!0,o,n)):(t.tag=0,jo&&o&&Vo(t),cl(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ml(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return _u(e)?1:0;if(null!=e){if((e=e.$$typeof)===me)return 11;if(e===be)return 14}return 2}(r),e=oa(r,e),i){case 0:t=gl(null,t,r,e,n);break e;case 1:t=ml(null,t,r,e,n);break e;case 11:t=ul(null,t,r,e,n);break e;case 14:t=dl(null,t,r,oa(r.type,e),n);break e}throw Error(j(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,gl(e,t,r,i=t.elementType===r?i:oa(r,i),n);case 1:return r=t.type,i=t.pendingProps,ml(e,t,r,i=t.elementType===r?i:oa(r,i),n);case 3:e:{if(vl(t),null===e)throw Error(j(387));r=t.pendingProps,i=(o=t.memoizedState).element,wa(e,t),Ta(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=bl(e,t,r,n,i=Zs(Error(j(423)),t));break e}if(r!==i){t=bl(e,t,r,n,i=Zs(Error(j(424)),t));break e}for(Wo=Xi(t.stateNode.containerInfo.firstChild),Ko=t,jo=!0,Yo=null,n=Fa(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(na(),r===i){t=Rl(e,t,n);break e}cl(e,t,r,n)}t=t.child}return t;case 5:return Ya(t),null===e&&Zo(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,a=i.children,qi(r,i)?a=null:null!==o&&qi(r,o)&&(t.flags|=32),fl(e,t),cl(e,t,a,n),t.child;case 6:return null===e&&Zo(t),null;case 13:return El(e,t,n);case 4:return Wa(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=za(t,null,r,n):cl(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,ul(e,t,r,i=t.elementType===r?i:oa(r,i),n);case 7:return cl(e,t,t.pendingProps,n),t.child;case 8:case 12:return cl(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,go(aa,r._currentValue),r._currentValue=a,null!==o)if(Gr(o.value,a)){if(o.children===i.children&&!vo.current){t=Rl(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var s=o.dependencies;if(null!==s){a=o.child;for(var l=s.firstContext;null!==l;){if(l.context===r){if(1===o.tag){(l=xa(-1,n&-n)).tag=2;var c=o.updateQueue;if(null!==c){var u=(c=c.shared).pending;null===u?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}o.lanes|=n,null!==(l=o.alternate)&&(l.lanes|=n),ha(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(10===o.tag)a=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(a=o.return))throw Error(j(341));a.lanes|=n,null!==(s=a.alternate)&&(s.lanes|=n),ha(a,n,t),a=o.sibling}else a=o.child;if(null!==a)a.return=o;else for(a=o;null!==a;){if(a===t){a=null;break}if(null!==(o=a.sibling)){o.return=a.return,a=o;break}a=a.return}o=a}cl(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,pa(t,n),r=r(i=fa(i)),t.flags|=1,cl(e,t,r,n),t.child;case 14:return i=oa(r=t.type,t.pendingProps),dl(e,t,r,i=oa(r.type,i),n);case 15:return hl(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:oa(r,i),Ml(e,t),t.tag=1,wo(r)?(e=!0,Eo(t)):e=!1,pa(t,n),Ra(t,r,i),Ia(t,r,i,n),yl(null,t,r,!0,e,n);case 19:return Ol(e,t,n);case 22:return pl(e,t,n)}throw Error(j(156,t.tag))};var Lu="function"==typeof reportError?reportError:function(e){console.error(e)};function Bu(e){this._internalRoot=e}function $u(e){this._internalRoot=e}function zu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Fu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Uu(){}function Hu(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if("function"==typeof i){var s=i;i=function(){var e=Du(a);s.call(e)}}Ru(t,a,e,i)}else a=function(e,t,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var e=Du(a);o.call(e)}}var a=Mu(t,r,e,0,null,!1,0,"",Uu);return e._reactRootContainer=a,e[no]=a.current,Oi(8===e.nodeType?e.parentNode:e),Zc(),a}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var s=r;r=function(){var e=Du(l);s.call(e)}}var l=Nu(e,0,!1,null,0,!1,0,"",Uu);return e._reactRootContainer=l,e[no]=l.current,Oi(8===e.nodeType?e.parentNode:e),Zc((function(){Ru(t,l,n,r)})),l}(n,t,e,i,r);return Du(a)}$u.prototype.render=Bu.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(j(409));Ru(e,t,null,null)},$u.prototype.unmount=Bu.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;Zc((function(){Ru(null,e,null,null)})),t[no]=null}},$u.prototype.unstable_scheduleHydration=function(e){if(e){var t=pn();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xn.length&&0!==t&&t<xn[n].priority;n++);xn.splice(n,0,e),0===n&&Tn(e)}},un=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Qt(t.pendingLanes);0!==n&&(sn(t,1|n),Kc(t,zt()),0==(6&mc)&&(Oc=zt()+500,Mo()))}break;case 13:Zc((function(){var t=va(e,1);if(null!==t){var n=Hc();qc(t,e,1,n)}})),Pu(e,1)}},dn=function(e){if(13===e.tag){var t=va(e,134217728);if(null!==t)qc(t,e,134217728,Hc());Pu(e,134217728)}},hn=function(e){if(13===e.tag){var t=Vc(e),n=va(e,t);if(null!==n)qc(n,e,t,Hc());Pu(e,t)}},pn=function(){return ln},fn=function(e,t){var n=ln;try{return ln=e,t()}finally{ln=n}},ut=function(e,t,n){switch(t){case"input":if(Fe(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 i=co(r);if(!i)throw Error(j(90));Pe(r),Fe(r,i)}}}break;case"textarea":je(e,n);break;case"select":null!=(t=n.value)&&qe(e,!!n.multiple,t,!1)}},mt=Xc,yt=Zc;var Vu,qu={usingClientEntryPoint:!1,Events:[so,lo,co,ft,gt,Xc]},Ku={findFiberByHostInstance:ao,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},Wu={bundleType:Ku.bundleType,version:Ku.version,rendererPackageName:Ku.rendererPackageName,rendererConfig:Ku.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:le.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Dt(e))?null:e.stateNode},findFiberByHostInstance:Ku.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 ju=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ju.isDisabled&&ju.supportsFiber)try{Wt=ju.inject(Wu),jt=ju}catch(Ze){}}H.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=qu,H.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!zu(t))throw Error(j(200));return Au(e,t,null,n)},H.createRoot=function(e,t){if(!zu(e))throw Error(j(299));var n=!1,r="",i=Lu;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Nu(e,1,!1,null,0,n,0,r,i),e[no]=t.current,Oi(8===e.nodeType?e.parentNode:e),new Bu(t)},H.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(j(188));throw e=Object.keys(e).join(","),Error(j(268,e))}return e=null===(e=Dt(t))?null:e.stateNode},H.flushSync=function(e){return Zc(e)},H.hydrate=function(e,t,n){if(!Fu(t))throw Error(j(200));return Hu(null,e,t,!0,n)},H.hydrateRoot=function(e,t,n){if(!zu(e))throw Error(j(405));var r=null!=n&&n.hydratedSources||null,i=!1,o="",a=Lu;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError)),t=Mu(t,null,e,1,null!=n?n:null,i,0,o,a),e[no]=t.current,Oi(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new $u(t)},H.render=function(e,t,n){if(!Fu(t))throw Error(j(200));return Hu(null,e,t,!1,n)},H.unmountComponentAtNode=function(e){if(!Fu(e))throw Error(j(40));return!!e._reactRootContainer&&(Zc((function(){Hu(null,null,e,!1,(function(){e._reactRootContainer=null,e[no]=null}))})),!0)},H.unstable_batchedUpdates=Xc,H.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Fu(n))throw Error(j(200));if(null==e||void 0===e._reactInternals)throw Error(j(38));return Hu(e,t,n,!1,r)},H.version="18.2.0-next-9e3b772b8-20220608",function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),U.exports=H;var Yu=U.exports;Vu=Yu.createRoot,Yu.hydrateRoot;var Gu={},Ju={},Xu={},Zu={};let Qu={},ed={},td={},nd={},rd={},id={},od={},ad={},sd={},ld={},cd={},ud={},dd={},hd={},pd={},fd={},gd={},md={},yd={},vd={},bd={},_d={},wd={},xd={},Sd={},Cd={},Ed={},Td={},kd={},Nd={},Ad={},Od={},Md={},Rd={},Dd={};function Id(e){throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?code=${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let Pd="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Ld=Pd&&"documentMode"in document?document.documentMode:null,Bd=Pd&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),$d=Pd&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),zd=!(!Pd||!("InputEvent"in window)||Ld)&&"getTargetRanges"in new window.InputEvent("input"),Fd=Pd&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Ud=Pd&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Hd=Pd&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Vd=Pd&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!Hd,qd=Fd||Ud||Vd?" ":"",Kd=$d?" ":qd,Wd=/^[^A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]*[\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]/,jd=/^[^\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]*[A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]/,Yd={bold:1,code:16,highlight:128,italic:2,strikethrough:4,subscript:32,superscript:64,underline:8},Gd={directionless:1,unmergeable:2},Jd={center:2,end:6,justify:4,left:1,right:3,start:5},Xd={2:"center",6:"end",4:"justify",1:"left",3:"right",5:"start"},Zd={normal:0,segmented:2,token:1},Qd={0:"normal",2:"segmented",1:"token"},eh=!1,th=0;function nh(e){th=e.timeStamp}function rh(e,t,n){return t.__lexicalLineBreak===e||void 0!==e[`__lexicalKey_${n._key}`]}function ih(e,t,n){eh=!0;let r=100<performance.now()-th;try{eg(e,(()=>{let i=Af()||function(e){return e.getEditorState().read((()=>{let e=Af();return null!==e?e.clone():null}))}(e);var o=new Map,a=e.getRootElement(),s=e._editorState,l=e._blockCursorElement;let c=!1,u="";for(var d=0;d<t.length;d++){var h=t[d],p=h.type,f=h.target,g=Sh(f,s);if(!(null===g&&f!==a||ng(g)))if("characterData"===p){if(h=r&&Ng(g))e:{p=f;var m=g;if(pf(h=i)){var y=h.anchor.getNode();if(y.is(m)&&h.format!==y.getFormat()){h=!1;break e}}h=3===p.nodeType&&m.isAttached()}h&&(p=h=null,null!==(m=Xh(e._window))&&m.anchorNode===f&&(h=m.anchorOffset,p=m.focusOffset),null!==(f=f.nodeValue)&&Dh(g,f,h,p,!1))}else if("childList"===p){for(c=!0,p=h.addedNodes,m=0;m<p.length;m++){var v=xh(y=p[m]),b=y.parentNode;null==b||y===l||null!==v||"BR"===y.nodeName&&rh(y,b,e)||($d&&(v=y.innerText||y.nodeValue)&&(u+=v),b.removeChild(y))}if(0<(p=(h=h.removedNodes).length)){for(m=0,y=0;y<p;y++)("BR"===(b=h[y]).nodeName&&rh(b,f,e)||l===b)&&(f.appendChild(b),m++);p!==m&&(f===a&&(g=s._nodeMap.get("root")),o.set(f,g))}}}if(0<o.size)for(let[t,n]of o)if(ig(n))for(o=n.getChildrenKeys(),a=t.firstChild,s=0;s<o.length;s++)null!==(l=e.getElementByKey(o[s]))&&(null==a?(t.appendChild(l),a=l):a!==l&&t.replaceChild(l,a),a=a.nextSibling);else Ng(n)&&n.markDirty();if(0<(o=n.takeRecords()).length){for(a=0;a<o.length;a++)for(s=(l=o[a]).addedNodes,l=l.target,d=0;d<s.length;d++)null==(f=(g=s[d]).parentNode)||"BR"!==g.nodeName||rh(g,l,e)||f.removeChild(g);n.takeRecords()}null!==i&&(c&&(i.dirty=!0,kh(i)),$d&&$h(e)&&i.insertRawText(u))}))}finally{eh=!1}}function oh(e){let t=e._observer;if(null!==t){ih(e,t.takeRecords(),t)}}function ah(e){0===th&&Vh(e).addEventListener("textInput",nh,!0),e._observer=new MutationObserver(((t,n)=>{ih(e,t,n)}))}let sh=1,lh="function"==typeof queueMicrotask?queueMicrotask:e=>{Promise.resolve().then(e)};function ch(e){let t=document.activeElement;if(null===t)return!1;let n=t.nodeName;return ng(Sh(e))&&("INPUT"===n||"TEXTAREA"===n||"true"===t.contentEditable&&null==t.__lexicalEditor)}function uh(e,t,n){let r=e.getRootElement();try{return null!==r&&r.contains(t)&&r.contains(n)&&null!==t&&!ch(t)&&dh(t)===e}catch(i){return!1}}function dh(e){for(;null!=e;){let t=e.__lexicalEditor;if(null!=t)return t;e=Uh(e)}return null}function hh(e){return e.isToken()||e.isSegmented()}function ph(e){for(;null!=e;){if(3===e.nodeType)return e;e=e.firstChild}return null}function fh(e,t,n){return e&(t=Yd[t])&&(null===n||0==(n&t))?e^t:null===n||n&t?e|t:e}function gh(e){return Ng(e)||fg(e)||ng(e)}function mh(e,t){if(null!=t)e.__key=t;else{Vf(),99<Ff&&Id(14),t=Kf();var n=qf(),r=""+sh++;n._nodeMap.set(r,e),ig(e)?t._dirtyElements.set(r,!0):t._dirtyLeaves.add(r),t._cloneNotNeeded.add(r),t._dirtyType=1,e.__key=r}}function yh(e){var t=e.getParent();if(null!==t){let i=e.getWritable();t=t.getWritable();var n=e.getPreviousSibling();if(e=e.getNextSibling(),null===n)if(null!==e){var r=e.getWritable();t.__first=e.__key,r.__prev=null}else t.__first=null;else{if(r=n.getWritable(),null!==e){let t=e.getWritable();t.__prev=r.__key,r.__next=t.__key}else r.__next=null;i.__prev=null}null===e?null!==n?(e=n.getWritable(),t.__last=n.__key,e.__next=null):t.__last=null:(e=e.getWritable(),null!==n?((n=n.getWritable()).__next=e.__key,e.__prev=n.__key):e.__prev=null,i.__next=null),t.__size--,i.__parent=null}}function vh(e){99<Ff&&Id(14);var t=e.getLatest(),n=t.__parent,r=qf();let i=Kf(),o=r._nodeMap;if(r=i._dirtyElements,null!==n)e:for(;null!==n&&!r.has(n);){let e=o.get(n);if(void 0===e)break;r.set(n,!1),n=e.__parent}t=t.__key,i._dirtyType=1,ig(e)?r.set(t,!0):i._dirtyLeaves.add(t)}function bh(e){Vf();var t=Kf();let n=t._compositionKey;e!==n&&(t._compositionKey=e,null!==n&&(null!==(t=wh(n))&&t.getWritable()),null!==e&&(null!==(e=wh(e))&&e.getWritable()))}function _h(){return Hf()?null:Kf()._compositionKey}function wh(e,t){return void 0===(e=(t||qf())._nodeMap.get(e))?null:e}function xh(e,t){return void 0!==(e=e[`__lexicalKey_${Kf()._key}`])?wh(e,t):null}function Sh(e,t){for(;null!=e;){let n=xh(e,t);if(null!==n)return n;e=Uh(e)}return null}function Ch(e){let t=Object.assign({},e._decorators);return e._pendingDecorators=t}function Eh(e){return e.read((()=>Th().getTextContent()))}function Th(){return qf()._nodeMap.get("root")}function kh(e){Vf();let t=qf();null!==e&&(e.dirty=!0,e._cachedNodes=null),t._selection=e}function Nh(e){var t,n=Kf();e:{for(t=e;null!=t;){let e=t[`__lexicalKey_${n._key}`];if(void 0!==e){t=e;break e}t=Uh(t)}t=null}return null===t?e===(n=n.getRootElement())?wh("root"):null:wh(t)}function Ah(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function Oh(e){let t=[];for(;null!==e;)t.push(e),e=e._parentEditor;return t}function Mh(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function Rh(e,t,n){if(null!==(t=Xh(t._window))){var r=t.anchorNode,{anchorOffset:i,focusOffset:o}=t;if(null!==r&&(t=3===r.nodeType?r.nodeValue:null,r=Sh(r),null!==t&&Ng(r))){if(r.canContainTabs()){var a=t.includes("\t");if(n&&0<n.length&&a){let e=i+(a=n.length)-1,r=t.slice(0,e);t=`${r}${n}${t=t.slice(e,t.length)}`,i+=a,o+=a}}t===qd&&n&&(t=n,o=i=a=n.length),null!==t&&Dh(r,t,i,o,e)}}}function Dh(e,t,n,r,i){let o=e;if(o.isAttached()&&(i||!o.isDirty())){var a=o.isComposing();if(e=t,(a||i)&&t[t.length-1]===qd&&(e=t.slice(0,-1)),t=o.getTextContent(),i||e!==t)if(""===e)if(bh(null),Fd||Ud||Vd)o.remove();else{let e=Kf();setTimeout((()=>{e.update((()=>{o.isAttached()&&o.remove()}))}),20)}else{i=o.getParent(),t=Of();var s=_h(),l=o.getKey();o.isToken()||null!==s&&l===s&&!a||null!==i&&pf(t)&&!i.canInsertTextBefore()&&0===t.anchor.offset?o.markDirty():(pf(a=Af())&&null!==n&&null!==r&&(a.setTextNodeRange(o,n,o,r),o.isSegmented()&&(n=kg(n=o.getTextContent()),o.replace(n),o=n)),o.setTextContent(e))}}}function Ih(e,t){var n=e[t];return"string"==typeof n?(n=n.split(" "),e[t]=n):n}function Ph(e,t,n,r,i){0!==n.size&&(n=r.__key,void 0===(t=t.get(r.__type))&&Id(33),r=t.klass,void 0===(t=e.get(r))&&(t=new Map,e.set(r,t)),r="destroyed"===(e=t.get(n))&&"created"===i,(void 0===e||r)&&t.set(n,r?"updated":i))}function Lh(e,t,n){let r=e.getParent(),i=n;return null!==r&&(t&&0===n?(i=e.getIndexWithinParent(),e=r):t||n!==e.getChildrenSize()||(i=e.getIndexWithinParent()+1,e=r)),e.getChildAtIndex(t?i-1:i)}function Bh(e,t){var n=e.offset;return"element"===e.type?Lh(e=e.getNode(),t,n):(e=e.getNode(),t&&0===n||!t&&n===e.getTextContentSize()?null===(n=t?e.getPreviousSibling():e.getNextSibling())?Lh(e.getParentOrThrow(),t,e.getIndexWithinParent()+(t?0:1)):n:null)}function $h(e){return"insertFromPaste"===(e=(e=Vh(e).event)&&e.inputType)||"insertFromPasteAsQuotation"===e}function zh(e){return!sg(e)&&!e.isLastChild()&&!e.isInline()}function Fh(e,t){return void 0===(e=e._keyToDOMMap.get(t))&&Id(75),e}function Uh(e){return null!==(e=e.assignedSlot||e.parentElement)&&11===e.nodeType?e.host:e}function Hh(e,t){for(e=e.getParent();null!==e;){if(e.is(t))return!0;e=e.getParent()}return!1}function Vh(e){return null===(e=e._window)&&Id(78),e}function qh(e){for(e=e.getParentOrThrow();null!==e&&!Kh(e);)e=e.getParentOrThrow();return e}function Kh(e){return sg(e)||ig(e)&&e.isShadowRoot()}function Wh(e){return mh(e=e.constructor.clone(e),null),e}function jh(e){var t=Kf();let n=e.constructor.getType();return void 0===(t=t._nodes.get(n))&&Id(97),null!==(t=t.replace)?((t=t(e))instanceof e.constructor||Id(98),t):e}function Yh(e,t){!sg(e=e.getParent())||ig(t)||ng(t)||Id(99)}function Gh(e){return(ng(e)||ig(e)&&!e.canBeEmpty())&&!e.isInline()}function Jh(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null,null!==(t=e.parentElement)&&t.removeChild(e)}function Xh(e){return Pd?(e||window).getSelection():null}function Zh(e,t){let n=e.getChildAtIndex(t);null==n&&(n=e),Kh(e)&&Id(102);let r=e=>{const t=e.getParentOrThrow(),i=Kh(t),o=e!==n||i?Wh(e):e;if(i)return e.insertAfter(o),[e,o,o];const[a,s,l]=r(t);return e=e.getNextSiblings(),l.append(o,...e),[a,s,o]},[i,o]=r(n);return[i,o]}function Qh(e,t){for(;e!==Th()&&null!=e;){if(t(e))return e;e=e.getParent()}return null}function ep(e){let t=[],n=[e];for(;0<n.length;){let r=n.pop();void 0===r&&Id(112),ig(r)&&n.unshift(...r.getChildren()),r!==e&&t.push(r)}return t}function tp(e,t,n,r,i){for(e=e.getFirstChild();null!==e;){let o=e.__key;void 0!==e&&e.__parent===t&&(ig(e)&&tp(e,o,n,r,i),n.has(o)||i.delete(o),r.delete(o)),e=e.isAttached()?e.getNextSibling():null}}function np(e,t){let n=e.__mode,r=e.__format;e=e.__style;let i=t.__mode,o=t.__format;return t=t.__style,!(null!==n&&n!==i||null!==r&&r!==o||null!==e&&e!==t)}function rp(e,t){let n=e.mergeWithSibling(t),r=Kf()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function ip(e){if(""===e.__text&&e.isSimpleText()&&!e.isUnmergeable())e.remove();else{for(var t;null!==(t=e.getPreviousSibling())&&Ng(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(""!==t.__text){np(t,e)&&(e=rp(t,e));break}t.remove()}for(var n;null!==(n=e.getNextSibling())&&Ng(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(""!==n.__text){np(e,n)&&rp(e,n);break}n.remove()}}}function op(e){return ap(e.anchor),ap(e.focus),e}function ap(e){for(;"element"===e.type;){var t=e.getNode(),n=e.offset;if(n===t.getChildrenSize()?(t=t.getChildAtIndex(n-1),n=!0):(t=t.getChildAtIndex(n),n=!1),Ng(t)){e.set(t.__key,n?t.getTextContentSize():0,"text");break}if(!ig(t))break;e.set(t.__key,n?t.getChildrenSize():0,"element")}}let sp,lp,cp,up,dp,hp,pp,fp,gp,mp,yp="",vp="",bp="",_p=!1,wp=!1,xp=null;function Sp(e,t){let n=pp.get(e);if(null!==t){let n=Bp(e);n.parentNode===t&&t.removeChild(n)}fp.has(e)||lp._keyToDOMMap.delete(e),ig(n)&&Cp(e=Dp(n,pp),0,e.length-1,null),void 0!==n&&Ph(mp,cp,up,n,"destroyed")}function Cp(e,t,n,r){for(;t<=n;++t){let n=e[t];void 0!==n&&Sp(n,r)}}function Ep(e,t){e.setProperty("text-align",t)}function Tp(e,t){var n=sp.theme.indent;if("string"==typeof n){let r=e.classList.contains(n);0<t&&!r?e.classList.add(n):1>t&&r&&e.classList.remove(n)}n=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||"40px",e.style.setProperty("padding-inline-start",0===t?"":`calc(${t} * ${n})`)}function kp(e,t){e=e.style,0===t?Ep(e,""):1===t?Ep(e,"left"):2===t?Ep(e,"center"):3===t?Ep(e,"right"):4===t?Ep(e,"justify"):5===t?Ep(e,"start"):6===t&&Ep(e,"end")}function Np(e,t,n){let r=fp.get(e);void 0===r&&Id(60);let i=r.createDOM(sp,lp);var o=lp._keyToDOMMap;if(i["__lexicalKey_"+lp._key]=e,o.set(e,i),Ng(r)?i.setAttribute("data-lexical-text","true"):ng(r)&&i.setAttribute("data-lexical-decorator","true"),ig(r)){if(e=r.__indent,o=r.__size,0!==e&&Tp(i,e),0!==o){--o,e=Dp(r,fp);var a=vp;vp="",Ap(e,r,0,o,i,null),Rp(r,i),vp=a}0!==(e=r.__format)&&kp(i,e),r.isInline()||Mp(null,r,i),zh(r)&&(yp+="\n\n",bp+="\n\n")}else o=r.getTextContent(),ng(r)?(null!==(a=r.decorate(lp,sp))&&Pp(e,a),i.contentEditable="false"):Ng(r)&&(r.isDirectionless()||(vp+=o)),yp+=o,bp+=o;return null!==t&&(null!=n?t.insertBefore(i,n):null!=(n=t.__lexicalLineBreak)?t.insertBefore(i,n):t.appendChild(i)),Ph(mp,cp,up,r,"created"),i}function Ap(e,t,n,r,i,o){let a=yp;for(yp="";n<=r;++n)Np(e[n],i,o);zh(t)&&(yp+="\n\n"),i.__lexicalTextContent=yp,yp=a+yp}function Op(e,t){return fg(e=t.get(e))||ng(e)&&e.isInline()}function Mp(e,t,n){e=null!==e&&(0===e.__size||Op(e.__last,pp)),t=0===t.__size||Op(t.__last,fp),e?t||(null!=(t=n.__lexicalLineBreak)&&n.removeChild(t),n.__lexicalLineBreak=null):t&&(t=document.createElement("br"),n.__lexicalLineBreak=t,n.appendChild(t))}function Rp(e,t){var n=t.__lexicalDir;if(t.__lexicalDirTextContent!==vp||n!==xp){let o=""===vp;if(o)var r=xp;else r=vp,r=Wd.test(r)?"rtl":jd.test(r)?"ltr":null;if(r!==n){let a=t.classList,s=sp.theme;var i=null!==n?s[n]:void 0;let l=null!==r?s[r]:void 0;void 0!==i&&("string"==typeof i&&(i=i.split(" "),i=s[n]=i),a.remove(...i)),null===r||o&&"ltr"===r?t.removeAttribute("dir"):(void 0!==l&&("string"==typeof l&&(n=l.split(" "),l=s[r]=n),void 0!==l&&a.add(...l)),t.dir=r),wp||(e.getWritable().__dir=r)}xp=r,t.__lexicalDirTextContent=vp,t.__lexicalDir=r}}function Dp(e,t){let n=[];for(e=e.__first;null!==e;){let r=t.get(e);void 0===r&&Id(101),n.push(e),e=r.__next}return n}function Ip(e,t){var n=pp.get(e),r=fp.get(e);void 0!==n&&void 0!==r||Id(61);var i=_p||hp.has(e)||dp.has(e);let o=Fh(lp,e);if(n===r&&!i)return ig(n)?(void 0!==(r=o.__lexicalTextContent)&&(yp+=r,bp+=r),void 0!==(r=o.__lexicalDirTextContent)&&(vp+=r)):(r=n.getTextContent(),Ng(n)&&!n.isDirectionless()&&(vp+=r),bp+=r,yp+=r),o;if(n!==r&&i&&Ph(mp,cp,up,r,"updated"),r.updateDOM(n,o,sp))return r=Np(e,null,null),null===t&&Id(62),t.replaceChild(r,o),Sp(e,null),r;if(ig(n)&&ig(r)){if((e=r.__indent)!==n.__indent&&Tp(o,e),(e=r.__format)!==n.__format&&kp(o,e),i){e=r,i=vp,vp="",t=yp;var a=n.__size,s=e.__size;if(yp="",1===a&&1===s){var l=n.__first,c=e.__first;if(l===c)Ip(l,o);else{var u=Bp(l);c=Np(c,null,null),o.replaceChild(c,u),Sp(l,null)}}else{c=Dp(n,pp);var d=Dp(e,fp);if(0===a)0!==s&&Ap(d,e,0,s-1,o,null);else if(0===s)0!==a&&(Cp(c,0,a-1,(l=null==o.__lexicalLineBreak)?null:o),l&&(o.textContent=""));else{var h=c;c=d,d=a-1,a=s-1;let t=o.firstChild,n=0;for(s=0;n<=d&&s<=a;){var p=h[n];let e=c[s];if(p===e)t=Lp(Ip(e,o)),n++,s++;else{void 0===l&&(l=new Set(h)),void 0===u&&(u=new Set(c));let r=u.has(p),i=l.has(e);r?(i?((p=Fh(lp,e))===t?t=Lp(Ip(e,o)):(null!=t?o.insertBefore(p,t):o.appendChild(p),Ip(e,o)),n++):Np(e,o,t),s++):(t=Lp(Bp(p)),Sp(p,o),n++)}}u=s>a,(l=n>d)&&!u?Ap(c,e,s,a,o,l=void 0===(l=c[a+1])?null:lp.getElementByKey(l)):u&&!l&&Cp(h,n,d,o)}}zh(e)&&(yp+="\n\n"),o.__lexicalTextContent=yp,yp=t+yp,Rp(e,o),vp=i,sg(r)||r.isInline()||Mp(n,r,o)}zh(r)&&(yp+="\n\n",bp+="\n\n")}else n=r.getTextContent(),ng(r)?null!==(i=r.decorate(lp,sp))&&Pp(e,i):Ng(r)&&!r.isDirectionless()&&(vp+=n),yp+=n,bp+=n;return!wp&&sg(r)&&r.__cachedText!==bp&&((r=r.getWritable()).__cachedText=bp),o}function Pp(e,t){let n=lp._pendingDecorators,r=lp._decorators;if(null===n){if(r[e]===t)return;n=Ch(lp)}n[e]=t}function Lp(e){return null!==(e=e.nextSibling)&&e===lp._blockCursorElement&&(e=e.nextSibling),e}function Bp(e){return void 0===(e=gp.get(e))&&Id(75),e}let $p=Object.freeze({}),zp=[["keydown",function(e,t){if(Fp=e.timeStamp,Up=e.keyCode,!t.isComposing()){var{keyCode:n,shiftKey:r,ctrlKey:i,metaKey:o,altKey:a}=e;if(!Xf(t,hd,e)){if(39!==n||i||o||a)if(39!==n||a||r||!i&&!o)if(37!==n||i||o||a)if(37!==n||a||r||!i&&!o)if(38!==n||i||o)if(40!==n||i||o)if(13===n&&r)jp=!0,Xf(t,bd,e);else if(32===n)Xf(t,_d,e);else if(Bd&&i&&79===n)e.preventDefault(),jp=!0,Xf(t,nd,!0);else if(13!==n||r){var s=Bd?!a&&!o&&(8===n||72===n&&i):!(i||a||o)&&8===n;s?8===n?Xf(t,wd,e):(e.preventDefault(),Xf(t,td,!0)):27===n?Xf(t,xd,e):(s=Bd?!(r||a||o)&&(46===n||68===n&&i):!(i||a||o)&&46===n)?46===n?Xf(t,Sd,e):(e.preventDefault(),Xf(t,td,!1)):8===n&&(Bd?a:i)?(e.preventDefault(),Xf(t,sd,!0)):46===n&&(Bd?a:i)?(e.preventDefault(),Xf(t,sd,!1)):Bd&&o&&8===n?(e.preventDefault(),Xf(t,ld,!0)):Bd&&o&&46===n?(e.preventDefault(),Xf(t,ld,!1)):66===n&&!a&&(Bd?o:i)?(e.preventDefault(),Xf(t,cd,"bold")):85===n&&!a&&(Bd?o:i)?(e.preventDefault(),Xf(t,cd,"underline")):73===n&&!a&&(Bd?o:i)?(e.preventDefault(),Xf(t,cd,"italic")):9!==n||a||i||o?90===n&&!r&&(Bd?o:i)?(e.preventDefault(),Xf(t,ud,void 0)):(s=Bd?90===n&&o&&r:89===n&&i||90===n&&i&&r)?(e.preventDefault(),Xf(t,dd,void 0)):yf(t._editorState._selection)&&((s=!r&&(67===n&&(Bd?o:i)))?(e.preventDefault(),Xf(t,Ad,e)):(s=!r&&(88===n&&(Bd?o:i)))&&(e.preventDefault(),Xf(t,Od,e))):Xf(t,Cd,e)}else jp=!1,Xf(t,bd,e);else Xf(t,vd,e);else Xf(t,yd,e);else Xf(t,md,e);else Xf(t,gd,e);else Xf(t,fd,e);else Xf(t,pd,e);(i||r||a||o)&&Xf(t,Dd,e)}}}],["pointerdown",function(e,t){let n=e.target;e=e.pointerType,n instanceof Node&&"touch"!==e&&eg(t,(()=>{ng(Sh(n))||(Wp=!0)}))}],["compositionstart",function(e,t){eg(t,(()=>{let n=Af();if(pf(n)&&!t.isComposing()){let r=n.anchor,i=n.anchor.getNode();bh(r.key),(e.timeStamp<Fp+30||"element"===r.type||!n.isCollapsed()||i.getFormat()!==n.format||i.getStyle()!==n.style)&&Xf(t,id,Kd)}}))}],["compositionend",function(e,t){$d?Yp=!0:eg(t,(()=>{ef(t,e.data)}))}],["input",function(e,t){e.stopPropagation(),eg(t,(()=>{var n=Af(),r=e.data,i=Qp(e);if(null!=r&&pf(n)&&Jp(n,i,r,e.timeStamp,!1)){Yp&&(ef(t,r),Yp=!1);var o=n.anchor,a=o.getNode();if(null===(i=Xh(t._window)))return;let s=o.offset;(o=zd&&!n.isCollapsed()&&Ng(a)&&null!==i.anchorNode)&&(o=(a=a.getTextContent().slice(0,s)+r+a.getTextContent().slice(s+n.focus.offset))===(3===(i=i.anchorNode).nodeType?i.nodeValue:null)),o||Xf(t,id,r),r=r.length,$d&&1<r&&"insertCompositionText"===e.inputType&&!t.isComposing()&&(n.anchor.offset-=r),Fd||Ud||Vd||!t.isComposing()||(Fp=0,bh(null))}else Rh(!1,t,null!==r?r:void 0),Yp&&(ef(t,r||void 0),Yp=!1);Vf(),oh(n=Kf())})),Vp=null}],["click",function(e,t){eg(t,(()=>{let n=Af(),r=Xh(t._window),i=Of();if(pf(n)){let e=n.anchor,t=e.getNode();r&&"element"===e.type&&0===e.offset&&n.isCollapsed()&&!sg(t)&&1===Th().getChildrenSize()&&t.getTopLevelElementOrThrow().isEmpty()&&null!==i&&n.is(i)&&(r.removeAllRanges(),n.dirty=!0)}Xf(t,ed,e)}))}],["cut",$p],["copy",$p],["dragstart",$p],["dragover",$p],["dragend",$p],["paste",$p],["focus",$p],["blur",$p],["drop",$p]];zd&&zp.push(["beforeinput",(e,t)=>function(e,t){let n=e.inputType,r=Qp(e);"deleteCompositionText"===n||$d&&$h(t)||"insertCompositionText"!==n&&eg(t,(()=>{let i=Af();if("deleteContentBackward"===n){if(null===i){var o=Of();if(!pf(o))return;kh(o.clone())}if(pf(i))return void(229===Up&&e.timeStamp<Fp+30&&t.isComposing()&&i.anchor.key===i.focus.key?(bh(null),Fp=0,setTimeout((()=>{eg(t,(()=>{bh(null)}))}),30),pf(i)&&(o=i.anchor.getNode(),o.markDirty(),i.format=o.getFormat(),i.style=o.getStyle())):(e.preventDefault(),Xf(t,td,!0)))}if(pf(i)){o=e.data,null!==Vp&&Rh(!1,t,Vp),i.dirty&&null===Vp||!i.isCollapsed()||sg(i.anchor.getNode())||null===r||i.applyDOMRange(r),Vp=null;var a=i.focus,s=i.anchor.getNode();if(a=a.getNode(),"insertText"===n||"insertTranspose"===n)"\n"===o?(e.preventDefault(),Xf(t,nd,!1)):"\n\n"===o?(e.preventDefault(),Xf(t,rd,void 0)):null==o&&e.dataTransfer?(o=e.dataTransfer.getData("text/plain"),e.preventDefault(),i.insertRawText(o)):null!=o&&Jp(i,r,o,e.timeStamp,!0)?(e.preventDefault(),Xf(t,id,o)):Vp=o,Hp=e.timeStamp;else switch(e.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Xf(t,id,e);break;case"insertFromComposition":bh(null),Xf(t,id,e);break;case"insertLineBreak":bh(null),Xf(t,nd,!1);break;case"insertParagraph":bh(null),jp?(jp=!1,Xf(t,nd,!1)):Xf(t,rd,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Xf(t,od,e);break;case"deleteByComposition":(function(e,t){return e!==t||ig(e)||ig(t)||!e.isToken()||!t.isToken()})(s,a)&&Xf(t,ad,void 0);break;case"deleteByDrag":case"deleteByCut":Xf(t,ad,void 0);break;case"deleteContent":Xf(t,td,!1);break;case"deleteWordBackward":Xf(t,sd,!0);break;case"deleteWordForward":Xf(t,sd,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Xf(t,ld,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Xf(t,ld,!1);break;case"formatStrikeThrough":Xf(t,cd,"strikethrough");break;case"formatBold":Xf(t,cd,"bold");break;case"formatItalic":Xf(t,cd,"italic");break;case"formatUnderline":Xf(t,cd,"underline");break;case"historyUndo":Xf(t,ud,void 0);break;case"historyRedo":Xf(t,dd,void 0)}}}))}(e,t)]);let Fp=0,Up=0,Hp=0,Vp=null,qp=0,Kp=!1,Wp=!1,jp=!1,Yp=!1,Gp=[0,"",0,"root",0];function Jp(e,t,n,r,i){let o=e.anchor,a=e.focus,s=o.getNode();var l=Kf();let c=Xh(l._window),u=null!==c?c.anchorNode:null,d=o.key;l=l.getElementByKey(d);let h=n.length;return d!==a.key||!Ng(s)||(!i&&(!zd||Hp<r+50)||s.isDirty()&&2>h||Ah(n))&&o.offset!==a.offset&&!s.isComposing()||hh(s)||s.isDirty()&&1<h||(i||!zd)&&null!==l&&!s.isComposing()&&u!==ph(l)||null!==c&&null!==t&&(!t.collapsed||t.startContainer!==c.anchorNode||t.startOffset!==c.anchorOffset)||s.getFormat()!==e.format||s.getStyle()!==e.style||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;e=e.anchor.offset;let n=t.getParentOrThrow(),r=t.isToken();return 0===e?((e=!t.canInsertTextBefore()||!n.canInsertTextBefore()||r)||(e=(Ng(t=t.getPreviousSibling())||ig(t)&&t.isInline())&&!t.canInsertTextAfter()),e):e===t.getTextContentSize()&&(!t.canInsertTextAfter()||!n.canInsertTextAfter()||r)}(e,s)}function Xp(e,t){return null!==e&&null!==e.nodeValue&&3===e.nodeType&&0!==t&&t!==e.nodeValue.length}function Zp(e,t,n){let{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:a}=e;Kp&&(Kp=!1,Xp(r,i)&&Xp(o,a))||eg(t,(()=>{if(n){if(uh(t,r,o)){var i=Af();if(pf(i)){var a=i.anchor,s=a.getNode();if(i.isCollapsed()){"Range"===e.type&&e.anchorNode===e.focusNode&&(i.dirty=!0);var l=Vh(t).event;l=l?l.timeStamp:performance.now();let[n,r,o,c,u]=Gp;l<u+200&&a.offset===o&&a.key===c?(i.format=n,i.style=r):"text"===a.type?(i.format=s.getFormat(),i.style=s.getStyle()):"element"===a.type&&(i.format=0,i.style="")}else{a=255,s=!1;let e=(l=i.getNodes()).length;for(let t=0;t<e;t++){let e=l[t];if(Ng(e)&&(s=!0,0===(a&=e.getFormat())))break}i.format=s?a:0}}Xf(t,Qu,void 0)}}else kh(null)}))}function Qp(e){return e.getTargetRanges?0===(e=e.getTargetRanges()).length?null:e[0]:null}function ef(e,t){var n=e._compositionKey;if(bh(null),null!==n&&null!=t){if(""===t)return t=wh(n),void(null!==(e=ph(e.getElementByKey(n)))&&null!==e.nodeValue&&Ng(t)&&Dh(t,e.nodeValue,null,null,!0));if("\n"===t[t.length-1]&&pf(n=Af()))return t=n.focus,n.anchor.set(t.key,t.offset,t.type),void Xf(e,bd,null)}Rh(!0,e,t)}function tf(e){let t=e.__lexicalEventHandles;return void 0===t&&(t=[],e.__lexicalEventHandles=t),t}let nf=new Map;function rf(e){let t=Xh(null==(e=e.target)?null:9===e.nodeType?e.defaultView:e.ownerDocument.defaultView);if(null!==t){var n=dh(t.anchorNode);if(null!==n){Wp&&(Wp=!1,eg(n,(()=>{var e=Of(),r=t.anchorNode;null!==r&&(1===(r=r.nodeType)||3===r)&&kh(e=Nf(e,t,n))})));var r=(e=(e=Oh(n))[e.length-1])._key,i=nf.get(r),o=i||e;o!==n&&Zp(t,o,!1),Zp(t,n,!0),n!==e?nf.set(r,n):i&&nf.delete(r)}}}function of(e,t,n){Vf();var r=e.__key;let i=e.getParent();if(null!==i){var o=function(e,t=0){if(0!==t&&Id(1),!pf(t=Af())||!ig(e))return t;let{anchor:n,focus:r}=t,i=n.getNode(),o=r.getNode();return Hh(i,e)&&n.set(e.__key,0,"element"),Hh(o,e)&&r.set(e.__key,0,"element"),t}(e),a=!1;if(pf(o)&&t){let t=o.anchor,n=o.focus;t.key===r&&(Df(t,e,i,e.getPreviousSibling(),e.getNextSibling()),a=!0),n.key===r&&(Df(n,e,i,e.getPreviousSibling(),e.getNextSibling()),a=!0)}pf(o)&&t&&!a?(r=e.getIndexWithinParent(),yh(e),Mf(o,i,r,-1)):yh(e),n||Kh(i)||i.canBeEmpty()||!i.isEmpty()||of(i,t),t&&sg(i)&&i.isEmpty()&&i.selectEnd()}}class af{static getType(){Id(64)}static clone(){Id(65)}constructor(e){this.__type=this.constructor.getType(),this.__next=this.__prev=this.__parent=null,mh(this,e)}getType(){return this.__type}isAttached(){for(var e=this.__key;null!==e;){if("root"===e)return!0;if(null===(e=wh(e)))break;e=e.__parent}return!1}isSelected(e){if(null==(e=e||Af()))return!1;let t=e.getNodes().some((e=>e.__key===this.__key));return(Ng(this)||!pf(e)||"element"!==e.anchor.type||"element"!==e.focus.type||e.anchor.key!==e.focus.key||e.anchor.offset!==e.focus.offset)&&t}getKey(){return this.__key}getIndexWithinParent(){var e=this.getParent();if(null===e)return-1;e=e.getFirstChild();let t=0;for(;null!==e;){if(this.is(e))return t;t++,e=e.getNextSibling()}return-1}getParent(){let e=this.getLatest().__parent;return null===e?null:wh(e)}getParentOrThrow(){let e=this.getParent();return null===e&&Id(66),e}getTopLevelElement(){let e=this;for(;null!==e;){let t=e.getParent();if(Kh(t))return e;e=t}return null}getTopLevelElementOrThrow(){let e=this.getTopLevelElement();return null===e&&Id(67),e}getParents(){let e=[],t=this.getParent();for(;null!==t;)e.push(t),t=t.getParent();return e}getParentKeys(){let e=[],t=this.getParent();for(;null!==t;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){let e=this.getLatest().__prev;return null===e?null:wh(e)}getPreviousSiblings(){let e=[];var t=this.getParent();if(null===t)return e;for(t=t.getFirstChild();null!==t&&!t.is(this);)e.push(t),t=t.getNextSibling();return e}getNextSibling(){let e=this.getLatest().__next;return null===e?null:wh(e)}getNextSiblings(){let e=[],t=this.getNextSibling();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){let t=this.getParents();var n=e.getParents();ig(this)&&t.unshift(this),ig(e)&&n.unshift(e),e=t.length;var r=n.length;if(0===e||0===r||t[e-1]!==n[r-1])return null;for(n=new Set(n),r=0;r<e;r++){let e=t[r];if(n.has(e))return e}return null}is(e){return null!=e&&this.__key===e.__key}isBefore(e){if(this===e)return!1;if(e.isParentOf(this))return!0;if(this.isParentOf(e))return!1;var t=this.getCommonAncestor(e);let n=this;for(;;){var r=n.getParentOrThrow();if(r===t){r=n.getIndexWithinParent();break}n=r}for(n=e;;){if((e=n.getParentOrThrow())===t){t=n.getIndexWithinParent();break}n=e}return r<t}isParentOf(e){let t=this.__key;if(t===e.__key)return!1;for(;null!==e;){if(e.__key===t)return!0;e=e.getParent()}return!1}getNodesBetween(e){let t=this.isBefore(e),n=[],r=new Set;for(var i=this;;){var o=i.__key;if(r.has(o)||(r.add(o),n.push(i)),i===e)break;if(null!==(o=ig(i)?t?i.getFirstChild():i.getLastChild():null))i=o;else if(null!==(o=t?i.getNextSibling():i.getPreviousSibling()))i=o;else{if(i=i.getParentOrThrow(),r.has(i.__key)||n.push(i),i===e)break;o=i;do{null===o&&Id(68),i=t?o.getNextSibling():o.getPreviousSibling(),null!==(o=o.getParent())&&(null!==i||r.has(o.__key)||n.push(o))}while(null===i)}}return t||n.reverse(),n}isDirty(){let e=Kf()._dirtyLeaves;return null!==e&&e.has(this.__key)}getLatest(){let e=wh(this.__key);return null===e&&Id(113),e}getWritable(){Vf();var e=qf(),t=Kf();e=e._nodeMap;let n=this.__key,r=this.getLatest(),i=r.__parent;t=t._cloneNotNeeded;var o=Af();return null!==o&&(o._cachedNodes=null),t.has(n)?(vh(r),r):((o=r.constructor.clone(r)).__parent=i,o.__next=r.__next,o.__prev=r.__prev,ig(r)&&ig(o)?(o.__first=r.__first,o.__last=r.__last,o.__size=r.__size,o.__indent=r.__indent,o.__format=r.__format,o.__dir=r.__dir):Ng(r)&&Ng(o)&&(o.__format=r.__format,o.__style=r.__style,o.__mode=r.__mode,o.__detail=r.__detail),t.add(n),o.__key=n,vh(o),e.set(n,o),o)}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(){Id(70)}updateDOM(){Id(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){Id(72)}static importJSON(){Id(18)}static transform(){return null}remove(e){of(this,!0,e)}replace(e,t){Vf();var n=Af();null!==n&&(n=n.clone()),Yh(this,e);let r=this.getLatest(),i=this.__key,o=e.__key,a=e.getWritable(),s=(e=this.getParentOrThrow().getWritable()).__size;yh(a);let l=r.getPreviousSibling(),c=r.getNextSibling(),u=r.__prev,d=r.__next,h=r.__parent;return of(r,!1,!0),null===l?e.__first=o:l.getWritable().__next=o,a.__prev=u,null===c?e.__last=o:c.getWritable().__prev=o,a.__next=d,a.__parent=h,e.__size=s,t&&this.getChildren().forEach((e=>{a.append(e)})),pf(n)&&(kh(n),t=n.anchor,n=n.focus,t.key===i&&cf(t,a),n.key===i&&cf(n,a)),_h()===i&&bh(o),a}insertAfter(e,t=!0){Vf(),Yh(this,e);var n=this.getWritable();let r=e.getWritable();var i=r.getParent();let o=Af();var a=!1,s=!1;if(null!==i){var l=e.getIndexWithinParent();yh(r),pf(o)&&(s=i.__key,a=o.anchor,i=o.focus,a="element"===a.type&&a.key===s&&a.offset===l+1,s="element"===i.type&&i.key===s&&i.offset===l+1)}i=this.getNextSibling(),l=this.getParentOrThrow().getWritable();let c=r.__key,u=n.__next;return null===i?l.__last=c:i.getWritable().__prev=c,l.__size++,n.__next=c,r.__next=u,r.__prev=n.__key,r.__parent=n.__parent,t&&pf(o)&&(Mf(o,l,(t=this.getIndexWithinParent())+1),n=l.__key,a&&o.anchor.set(n,t+2,"element"),s&&o.focus.set(n,t+2,"element")),e}insertBefore(e,t=!0){Vf(),Yh(this,e);var n=this.getWritable();let r=e.getWritable(),i=r.__key;yh(r);let o=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),s=n.__prev,l=this.getIndexWithinParent();return null===o?a.__first=i:o.getWritable().__next=i,a.__size++,n.__prev=i,r.__prev=s,r.__next=n.__key,r.__parent=n.__parent,n=Af(),t&&pf(n)&&Mf(n,t=this.getParentOrThrow(),l),e}isParentRequired(){return!1}createParentElementNode(){return Mg()}selectPrevious(e,t){Vf();let n=this.getPreviousSibling(),r=this.getParentOrThrow();return null===n?r.select(0,0):ig(n)?n.select():Ng(n)?n.select(e,t):(e=n.getIndexWithinParent()+1,r.select(e,e))}selectNext(e,t){Vf();let n=this.getNextSibling(),r=this.getParentOrThrow();return null===n?r.select():ig(n)?n.select(0,0):Ng(n)?n.select(e,t):(e=n.getIndexWithinParent(),r.select(e,e))}markDirty(){this.getWritable()}}class sf{constructor(e,t,n){this._selection=null,this.key=e,this.offset=t,this.type=n}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){let t=this.getNode(),n=e.getNode(),r=this.offset;if(e=e.offset,ig(t)){var i=t.getDescendantByIndex(r);t=null!=i?i:t}return ig(n)&&(i=n.getDescendantByIndex(e),n=null!=i?i:n),t===n?r<e:t.isBefore(n)}getNode(){let e=wh(this.key);return null===e&&Id(20),e}set(e,t,n){let r=this._selection,i=this.key;this.key=e,this.offset=t,this.type=n,Hf()||(_h()===i&&bh(e),null!==r&&(r._cachedNodes=null,r.dirty=!0))}}function lf(e,t){let n=t.__key,r=e.offset,i="element";if(Ng(t))i="text",r>(t=t.getTextContentSize())&&(r=t);else if(!ig(t)){var o=t.getNextSibling();Ng(o)?(n=o.__key,r=0,i="text"):(o=t.getParent())&&(n=o.__key,r=t.getIndexWithinParent()+1)}e.set(n,r,i)}function cf(e,t){if(ig(t)){let n=t.getLastDescendant();ig(n)||Ng(n)?lf(e,n):lf(e,t)}else lf(e,t)}function uf(e,t,n,r){let i=e.getNode(),o=i.getChildAtIndex(e.offset),a=kg(),s=sg(i)?Mg().append(a):a;a.setFormat(n),a.setStyle(r),null===o?i.append(s):o.insertBefore(s),e.is(t)&&t.set(a.__key,0,"text"),e.set(a.__key,0,"text")}function df(e,t,n,r){e.key=t,e.offset=n,e.type=r}class hf{constructor(e){this.dirty=!1,this._nodes=e,this._cachedNodes=null}is(e){if(!yf(e))return!1;let t=this._nodes,n=e._nodes;return t.size===n.size&&Array.from(t).every((e=>n.has(e)))}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new hf(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(e,t){let n=this.getNodes(),r=n.length;var i=n[r-1];if(Ng(i))i=i.select();else{let e=i.getIndexWithinParent()+1;i=i.getParentOrThrow().select(e,e)}for(i.insertNodes(e,t),e=0;e<r;e++)n[e].remove();return!0}getNodes(){var e=this._cachedNodes;if(null!==e)return e;var t=this._nodes;e=[];for(let n of t)null!==(t=wh(n))&&e.push(t);return Hf()||(this._cachedNodes=e),e}getTextContent(){let e=this.getNodes(),t="";for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}}function pf(e){return e instanceof mf}class ff{constructor(e,t,n){this.gridKey=e,this.anchor=t,this.focus=n,this.dirty=!1,this._cachedNodes=null,t._selection=this,n._selection=this}is(e){return!!gf(e)&&(this.gridKey===e.gridKey&&this.anchor.is(e.anchor)&&this.focus.is(e.focus))}set(e,t,n){this.dirty=!0,this.gridKey=e,this.anchor.key=t,this.focus.key=n,this._cachedNodes=null}clone(){return new ff(this.gridKey,this.anchor,this.focus)}isCollapsed(){return!1}isBackward(){return this.focus.isBefore(this.anchor)}getCharacterOffsets(){return bf(this)}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(e,t){let n=this.focus.getNode();return op(n.select(0,n.getChildrenSize())).insertNodes(e,t)}getShape(){var e=wh(this.anchor.key);null===e&&Id(21);var t=e.getIndexWithinParent();e=e.getParentOrThrow().getIndexWithinParent();var n=wh(this.focus.key);null===n&&Id(22);var r=n.getIndexWithinParent();let i=n.getParentOrThrow().getIndexWithinParent();return n=Math.min(t,r),t=Math.max(t,r),r=Math.min(e,i),e=Math.max(e,i),{fromX:Math.min(n,t),fromY:Math.min(r,e),toX:Math.max(n,t),toY:Math.max(r,e)}}getNodes(){function e(e){let{cell:t,startColumn:n,startRow:r}=e;s=Math.min(s,n),l=Math.min(l,r),c=Math.max(c,n+t.__colSpan-1),u=Math.max(u,r+t.__rowSpan-1)}var t=this._cachedNodes;if(null!==t)return t;var n=this.anchor.getNode();t=this.focus.getNode(),n=Qh(n,Pg);var r=Qh(t,Pg);Pg(n)||Id(103),Pg(r)||Id(104),zg(t=n.getParent())||Id(105),Bg(t=t.getParent())||Id(106);let[i,o,a]=Pf(t,n,r),s=Math.min(o.startColumn,a.startColumn),l=Math.min(o.startRow,a.startRow),c=Math.max(o.startColumn+o.cell.__colSpan-1,a.startColumn+a.cell.__colSpan-1),u=Math.max(o.startRow+o.cell.__rowSpan-1,a.startRow+a.cell.__rowSpan-1);n=s,r=l;for(var d=s,h=l;s<n||l<r||c>d||u>h;){if(s<n){var p=h-r;--n;for(var f=0;f<=p;f++)e(i[r+f][n])}if(l<r)for(p=d-n,--r,f=0;f<=p;f++)e(i[r][n+f]);if(c>d)for(p=h-r,d+=1,f=0;f<=p;f++)e(i[r+f][d]);if(u>h)for(p=d-n,h+=1,f=0;f<=p;f++)e(i[h][n+f])}for(t=[t],n=null,r=l;r<=u;r++)for(d=s;d<=c;d++)({cell:h}=i[r][d]),zg(p=h.getParent())||Id(107),p!==n&&t.push(p),t.push(h,...ep(h)),n=p;return Hf()||(this._cachedNodes=t),t}getTextContent(){let e=this.getNodes(),t="";for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}}function gf(e){return e instanceof ff}class mf{constructor(e,t,n,r){this.anchor=e,this.focus=t,this.dirty=!1,this.format=n,this.style=r,this._cachedNodes=null,e._selection=this,t._selection=this}is(e){return!!pf(e)&&(this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style)}isBackward(){return this.focus.isBefore(this.anchor)}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){var e=this._cachedNodes;if(null!==e)return e;e=this.anchor;var t=this.focus,n=e.isBefore(t),r=n?e:t;n=n?t:e,e=r.getNode(),t=n.getNode();let i=r.offset;return r=n.offset,ig(e)&&(n=e.getDescendantByIndex(i),e=null!=n?n:e),ig(t)&&(null!==(n=t.getDescendantByIndex(r))&&n!==e&&t.getChildAtIndex(r)===n&&(n=n.getPreviousSibling()),t=null!=n?n:t),e=e.is(t)?ig(e)&&0<e.getChildrenSize()?[]:[e]:e.getNodesBetween(t),Hf()||(this._cachedNodes=e),e}setTextNodeRange(e,t,n,r){df(this.anchor,e.__key,t,"text"),df(this.focus,n.__key,r,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){let e=this.getNodes();if(0===e.length)return"";let t=e[0],n=e[e.length-1],r=this.anchor,i=this.focus,o=r.isBefore(i),[a,s]=bf(this),l="",c=!0;for(let u=0;u<e.length;u++){let d=e[u];if(ig(d)&&!d.isInline())c||(l+="\n"),c=!d.isEmpty();else if(c=!1,Ng(d)){let e=d.getTextContent();d===t?d===n?"element"===r.type&&"element"===i.type&&i.offset!==r.offset||(e=a<s?e.slice(a,s):e.slice(s,a)):e=o?e.slice(a):e.slice(s):d===n&&(e=o?e.slice(0,s):e.slice(0,a)),l+=e}else!ng(d)&&!fg(d)||d===n&&this.isCollapsed()||(l+=d.getTextContent())}return l}applyDOMRange(e){let t=Kf(),n=t.getEditorState()._selection;if(null!==(e=Cf(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n))){var[r,i]=e;df(this.anchor,r.key,r.offset,r.type),df(this.focus,i.key,i.offset,i.type),this._cachedNodes=null}}clone(){let e=this.anchor,t=this.focus;return new mf(new sf(e.key,e.offset,e.type),new sf(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=fh(this.format,e,null),this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){return 0!=(this.format&Yd[e])}insertRawText(e){let t=e.split(/\r?\n/);if(1===t.length)this.insertText(e);else{e=[];let n=t.length;for(let r=0;r<n;r++){let i=t[r];""!==i&&e.push(kg(i)),r!==n-1&&e.push(pg())}this.insertNodes(e)}}insertText(e){var t=this.anchor,n=this.focus,r=this.isCollapsed()||t.isBefore(n),i=this.format,o=this.style;r&&"element"===t.type?uf(t,n,i,o):r||"element"!==n.type||uf(n,t,i,o);var a=this.getNodes(),s=a.length,l=r?n:t;n=(r?t:n).offset;var c=l.offset;Ng(t=a[0])||Id(26),r=t.getTextContent().length;var u=t.getParentOrThrow(),d=a[s-1];if(this.isCollapsed()&&n===r&&(t.isSegmented()||t.isToken()||!t.canInsertTextAfter()||!u.canInsertTextAfter()&&null===t.getNextSibling())){var h=t.getNextSibling();if(Ng(h)&&!hh(h)||((h=kg()).setFormat(i),u.canInsertTextAfter()?t.insertAfter(h):u.insertAfter(h)),h.select(0,0),t=h,""!==e)return void this.insertText(e)}else if(this.isCollapsed()&&0===n&&(t.isSegmented()||t.isToken()||!t.canInsertTextBefore()||!u.canInsertTextBefore()&&null===t.getPreviousSibling())){if(Ng(h=t.getPreviousSibling())&&!hh(h)||((h=kg()).setFormat(i),u.canInsertTextBefore()?t.insertBefore(h):u.insertBefore(h)),h.select(),t=h,""!==e)return void this.insertText(e)}else if(t.isSegmented()&&n!==r)(u=kg(t.getTextContent())).setFormat(i),t.replace(u),t=u;else if(!(this.isCollapsed()||""===e||(h=d.getParent(),u.canInsertTextBefore()&&u.canInsertTextAfter()&&(!ig(h)||h.canInsertTextBefore()&&h.canInsertTextAfter()))))return this.insertText(""),Sf(this.anchor,this.focus,null),void this.insertText(e);if(1===s)if(t.isToken())(e=kg(e)).select(),t.replace(e);else{if(a=t.getFormat(),s=t.getStyle(),n===c&&(a!==i||s!==o)){if(""!==t.getTextContent())return(a=kg(e)).setFormat(i),a.setStyle(o),a.select(),0===n?t.insertBefore(a,!1):([s]=t.splitText(n),s.insertAfter(a,!1)),void(a.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length));t.setFormat(i),t.setStyle(o)}""===(t=t.spliceText(n,c-n,e,!0)).getTextContent()?t.remove():"text"===this.anchor.type&&(t.isComposing()?this.anchor.offset-=e.length:(this.format=a,this.style=s))}else{if(i=new Set([...t.getParentKeys(),...d.getParentKeys()]),h=ig(t)?t:t.getParentOrThrow(),o=ig(d)?d:d.getParentOrThrow(),u=d,!h.is(o)&&o.isInline())do{u=o,o=o.getParentOrThrow()}while(o.isInline());"text"===l.type&&(0!==c||""===d.getTextContent())||"element"===l.type&&d.getIndexWithinParent()<c?Ng(d)&&!d.isToken()&&c!==d.getTextContentSize()?(d.isSegmented()&&(l=kg(d.getTextContent()),d.replace(l),d=l),d=d.spliceText(0,c,""),i.add(d.__key)):(l=d.getParentOrThrow()).canBeEmpty()||1!==l.getChildrenSize()?d.remove():l.remove():i.add(d.__key),l=o.getChildren(),c=new Set(a),d=h.is(o),h=h.isInline()&&null===t.getNextSibling()?h:t;for(let e=l.length-1;0<=e;e--){let n=l[e];if(n.is(t)||ig(n)&&n.isParentOf(t))break;n.isAttached()&&(!c.has(n)||n.is(u)?d||h.insertAfter(n,!1):n.remove())}if(!d)for(l=o,c=null;null!==l;)(0===(d=(o=l.getChildren()).length)||o[d-1].is(c))&&(i.delete(l.__key),c=l),l=l.getParent();for(t.isToken()?n===r?t.select():((e=kg(e)).select(),t.replace(e)):""===(t=t.spliceText(n,r-n,e,!0)).getTextContent()?t.remove():t.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length),e=1;e<s;e++)t=a[e],i.has(t.__key)||t.remove()}}removeText(){this.insertText("")}formatText(e){if(this.isCollapsed())this.toggleFormat(e),bh(null);else{var t=this.getNodes(),n=[];for(var r of t)Ng(r)&&n.push(r);var i=n.length;if(0===i)this.toggleFormat(e),bh(null);else{r=this.anchor;var o=this.focus,a=this.isBackward();t=a?o:r,r=a?r:o;var s=0,l=n[0];if(o="element"===t.type?0:t.offset,"text"===t.type&&o===l.getTextContentSize()&&(s=1,l=n[1],o=0),null!=l){a=l.getFormatFlags(e,null);var c=i-1,u=n[c];if(i="text"===r.type?r.offset:u.getTextContentSize(),l.is(u))o!==i&&(0===o&&i===l.getTextContentSize()?l.setFormat(a):(e=l.splitText(o,i),(e=0===o?e[0]:e[1]).setFormat(a),"text"===t.type&&t.set(e.__key,0,"text"),"text"===r.type&&r.set(e.__key,i-o,"text")),this.format=a);else{0!==o&&([,l]=l.splitText(o),o=0),l.setFormat(a);var d=u.getFormatFlags(e,a);for(0<i&&(i!==u.getTextContentSize()&&([u]=u.splitText(i)),u.setFormat(d)),s+=1;s<c;s++){let t=n[s];if(!t.isToken()){let n=t.getFormatFlags(e,d);t.setFormat(n)}}"text"===t.type&&t.set(l.__key,o,"text"),"text"===r.type&&r.set(u.__key,i,"text"),this.format=a|d}}}}}insertNodes(e,t){if(!this.isCollapsed()){var n=this.isBackward()?this.anchor:this.focus,r=n.getNode().getNextSibling();if(r=r?r.getKey():null,n=(n=n.getNode().getPreviousSibling())?n.getKey():null,this.removeText(),this.isCollapsed()&&"element"===this.focus.type){if(this.focus.key===r&&0===this.focus.offset){var i=kg();this.focus.getNode().insertBefore(i)}else this.focus.key===n&&this.focus.offset===this.focus.getNode().getChildrenSize()&&(i=kg(),this.focus.getNode().insertAfter(i));i&&(this.focus.set(i.__key,0,"text"),this.anchor.set(i.__key,0,"text"))}}n=(i=this.anchor).offset;var o=i.getNode();r=o,"element"===i.type&&(r=null===(r=(i=i.getNode()).getChildAtIndex(n-1))?i:r),i=[];var a=o.getNextSiblings(),s=Kh(o)?null:o.getTopLevelElementOrThrow();if(Ng(o))if(r=o.getTextContent().length,0===n&&0!==r)r=null!==(r=o.getPreviousSibling())?r:o.getParentOrThrow(),i.push(o);else if(n===r)r=o;else{if(o.isToken())return!1;[r,o]=o.splitText(n),i.push(o)}o=r,i.push(...a),a=e[0];var l=!1,c=null;for(let p=0;p<e.length;p++){var u=e[p];if(Kh(r)||ng(r)||!ig(u)||u.isInline())l&&!ig(u)&&!ng(u)&&Kh(r.getParent())&&Id(28);else{if(u.is(a)){if(ig(r)&&r.isEmpty()&&r.canReplaceWith(u)){r.replace(u),r=u,l=!0;continue}if(gh(l=u.getFirstDescendant())){for(var d=l.getParentOrThrow();d.isInline();)d=d.getParentOrThrow();if(l=(c=d.getChildren()).length,ig(r)){var h=r.getFirstChild();for(let e=0;e<l;e++){let t=c[e];null===h?r.append(t):h.insertAfter(t),h=t}}else{for(h=l-1;0<=h;h--)r.insertAfter(c[h]);r=r.getParentOrThrow()}if(c=c[l-1],d.remove(),l=!0,d.is(u))continue}}Ng(r)&&(null===s&&Id(27),r=s)}l=!1,ig(r)&&!r.isInline()?(c=u,ng(u)&&!u.isInline()?r=r.insertAfter(u,!1):ig(u)?!u.canBeEmpty()&&u.isEmpty()||(sg(r)?(null!==(d=r.getChildAtIndex(n))?d.insertBefore(u):r.append(u),r=u):u.isInline()?(r.append(u),r=u):r=r.insertAfter(u,!1)):(null!==(d=r.getFirstChild())?d.insertBefore(u):r.append(u),r=u)):!ig(u)||ig(u)&&u.isInline()||ng(r)&&!r.isInline()?(c=u,pf(this)&&ng(u)&&(ig(r)||Ng(r))&&!u.isInline()?(Ng(r)?(d=r.getParentOrThrow(),[r]=r.splitText(n),r=r.getIndexWithinParent()+1):(d=r,r=n),[,r]=Zh(d,r),r=r.insertBefore(u)):r=r.insertAfter(u,!1)):(u=r.getParentOrThrow(),fg(r)&&r.remove(),r=u,p--)}if(t&&(Ng(o)?o.select():Ng(e=r.getPreviousSibling())?e.select():(e=r.getIndexWithinParent(),r.getParentOrThrow().select(e,e))),ig(r)){if(e=Ng(c)?c:ig(c)&&c.isInline()?c.getLastDescendant():r.getLastDescendant(),t||(null===e?r.select():Ng(e)?""===e.getTextContent()?e.selectPrevious():e.select():e.selectNext()),0!==i.length)for(t=r,e=i.length-1;0<=e;e--)s=(n=i[e]).getParentOrThrow(),!ig(r)||Ef(n)||ng(n)&&(!n.isInline()||n.isIsolated())?ig(r)||Ef(n)?ig(n)&&!n.canInsertAfter(r)?(ig(o=s.constructor.clone(s))||Id(29),o.append(n),r.insertAfter(o)):r.insertAfter(n):(r.insertBefore(n),r=n):(t===r?r.append(n):r.insertBefore(n),r=n),s.isEmpty()&&!s.canBeEmpty()&&s.remove()}else t||(Ng(r)?r.select():(t=r.getParentOrThrow(),e=r.getIndexWithinParent()+1,t.select(e,e)));return!0}insertParagraph(){this.isCollapsed()||this.removeText();var e=this.anchor,t=e.offset,n=[];if("text"===e.type){var r=e.getNode(),i=r.getNextSiblings().reverse(),o=r.getParentOrThrow(),a=o.isInline(),s=a?o.getTextContentSize():r.getTextContentSize();0===t?i.push(r):(a&&(n=o.getNextSiblings()),t===s||a&&t===r.getTextContentSize()||([,r]=r.splitText(t),i.push(r)))}else{if(Kh(o=e.getNode()))return i=Mg(),n=o.getChildAtIndex(t),i.select(),void(null!==n?n.insertBefore(i,!1):o.append(i));i=o.getChildren().slice(t).reverse()}if(r=i.length,0===t&&0<r&&o.isInline()){if(ig(i=(n=o.getParentOrThrow()).insertNewAfter(this,!1)))for(n=n.getChildren(),o=0;o<n.length;o++)i.append(n[o])}else if(null===(a=o.insertNewAfter(this,!1)))this.insertLineBreak();else if(ig(a))if(s=o.getFirstChild(),0===t&&(o.is(e.getNode())||s&&s.is(e.getNode()))&&0<r)o.insertBefore(a);else{if(o=null,t=n.length,e=a.getParentOrThrow(),0<t)for(s=0;s<t;s++)e.append(n[s]);if(0!==r)for(n=0;n<r;n++)t=i[n],null===o?a.append(t):o.insertBefore(t),o=t;a.canBeEmpty()||0!==a.getChildrenSize()?a.selectStart():(a.selectPrevious(),a.remove())}}insertLineBreak(e){let t=pg();var n=this.anchor;"element"===n.type&&(sg(n=n.getNode())&&this.insertParagraph()),e?this.insertNodes([t],!0):this.insertNodes([t])&&t.selectNext(0,0)}getCharacterOffsets(){return bf(this)}extract(){var e=this.getNodes(),t=e.length,n=t-1,r=this.anchor;let i=this.focus;var o=e[0];let a=e[n],[s,l]=bf(this);return 0===t?[]:1===t?Ng(o)&&!this.isCollapsed()?(e=s>l?l:s,n=o.splitText(e,s>l?s:l),null!=(e=0===e?n[0]:n[1])?[e]:[]):[o]:(t=r.isBefore(i),Ng(o)&&((r=t?s:l)===o.getTextContentSize()?e.shift():0!==r&&([,o]=o.splitText(r),e[0]=o)),Ng(a)&&(o=a.getTextContent().length,0===(t=t?l:s)?e.pop():t!==o&&([a]=a.splitText(t),e[n]=a)),e)}modify(e,t,n){var r=this.focus,i=this.anchor,o="move"===e,a=Bh(r,t);if(ng(a)&&!a.isIsolated())o&&a.isKeyboardSelectable()?((t=kf()).add(a.__key),kh(t)):Ng(e=t?a.getPreviousSibling():a.getNextSibling())?(a=e.__key,t=t?e.getTextContent().length:0,r.set(a,t,"text"),o&&i.set(a,t,"text")):(n=a.getParentOrThrow(),ig(e)?(n=e.__key,a=t?e.getChildrenSize():0):(a=a.getIndexWithinParent(),n=n.__key,t||a++),r.set(n,a,"element"),o&&i.set(n,a,"element"));else if(r=Xh((i=Kf())._window)){var s=i._blockCursorElement,l=i._rootElement;if(null===l||null===s||!ig(a)||a.isInline()||a.canBeEmpty()||Jh(s,i,l),r.modify(e,t?"backward":"forward",n),0<r.rangeCount&&(a=r.getRangeAt(0),i=sg(i=this.anchor.getNode())?i:qh(i),this.applyDOMRange(a),this.dirty=!0,!o)){for(o=this.getNodes(),e=[],n=!1,s=0;s<o.length;s++)Hh(l=o[s],i)?e.push(l):n=!0;n&&0<e.length&&(t?ig(t=e[0])?t.selectStart():t.getParentOrThrow().selectStart():ig(t=e[e.length-1])?t.selectEnd():t.getParentOrThrow().selectEnd()),r.anchorNode===a.startContainer&&r.anchorOffset===a.startOffset||(t=this.focus,r=(o=this.anchor).key,a=o.offset,i=o.type,df(o,t.key,t.offset,t.type),df(t,r,a,i),this._cachedNodes=null)}}}deleteCharacter(e){if(this.isCollapsed()){var t=this.anchor,n=this.focus,r=t.getNode();if(!e&&("element"===t.type&&ig(r)&&t.offset===r.getChildrenSize()||"text"===t.type&&t.offset===r.getTextContentSize())){var i=r.getParent();if(ig(i=r.getNextSibling()||(null===i?null:i.getNextSibling()))&&!i.canExtractContents())return}if(ng(i=Bh(n,e))&&!i.isIsolated())return void(i.isKeyboardSelectable()&&ig(r)&&0===r.getChildrenSize()?(r.remove(),e=kf(),e.add(i.__key),kh(e)):i.remove());if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&0===t.offset&&("element"===t.type?t.getNode():t.getNode().getParentOrThrow()).collapseAtStart(this))return}else{if(i="text"===n.type?n.getNode():null,r="text"===t.type?t.getNode():null,null!==i&&i.isSegmented()){if(t=n.offset,n=i.getTextContentSize(),i.is(r)||e&&t!==n||!e&&0!==t)return void _f(i,e,t)}else if(null!==r&&r.isSegmented()&&(t=t.offset,n=r.getTextContentSize(),r.is(i)||e&&0!==t||!e&&t!==n))return void _f(r,e,t);if(r=this.anchor,i=this.focus,(t=r.getNode())===(n=i.getNode())&&"text"===r.type&&"text"===i.type){var o=r.offset,a=i.offset;let s=o<a;(n=s?o:a)!==(o=(a=s?a:o)-1)&&(Ah(t=t.getTextContent().slice(n,a))||(e?i.offset=o:r.offset=o))}}}r=this.isCollapsed(),this.removeText(),e&&!r&&this.isCollapsed()&&"element"===this.anchor.type&&0===this.anchor.offset&&((e=this.anchor.getNode()).isEmpty()&&sg(e.getParent())&&0===e.getIndexWithinParent()&&e.collapseAtStart(this))}deleteLine(e){this.isCollapsed()&&("text"===this.anchor.type&&this.modify("extend",e,"lineboundary"),0===(e?this.focus:this.anchor).offset&&this.modify("extend",e,"character")),this.removeText()}deleteWord(e){this.isCollapsed()&&this.modify("extend",e,"word"),this.removeText()}}function yf(e){return e instanceof hf}function vf(e){let t=e.offset;return"text"===e.type?t:t===(e=e.getNode()).getChildrenSize()?e.getTextContent().length:0}function bf(e){let t=e.anchor;return e=e.focus,"element"===t.type&&"element"===e.type&&t.key===e.key&&t.offset===e.offset?[0,0]:[vf(t),vf(e)]}function _f(e,t,n){let r=e.getTextContent().split(/(?=\s)/g),i=r.length,o=0,a=0;for(let s=0;s<i;s++){let e=s===i-1;if(a=o,o+=r[s].length,t&&o===n||o>n||e){r.splice(s,1),e&&(a=void 0);break}}""===(t=r.join("").trim())?e.remove():(e.setTextContent(t),e.select(a,a))}function wf(e,t,n,r){var i=t;if(1===e.nodeType){let s=!1;var o=e.childNodes,a=o.length;i===a&&(s=!0,i=a-1);let l=o[i];if(a=!1,l===r._blockCursorElement?(l=o[i+1],a=!0):null!==r._blockCursorElement&&i--,Ng(r=Nh(l)))i=s?r.getTextContentSize():0;else{if(null===(o=Nh(e)))return null;if(ig(o)?((t=ig(e=o.getChildAtIndex(i)))&&(t=e.getParent(),t=null===n||null===t||!t.canBeEmpty()||t!==n.getNode()),t&&(null===(n=s?e.getLastDescendant():e.getFirstDescendant())?(o=e,i=0):o=ig(e=n)?e:e.getParentOrThrow()),Ng(e)?(r=e,o=null,i=s?e.getTextContentSize():0):e!==o&&s&&!a&&i++):(i=o.getIndexWithinParent(),i=0===t&&ng(o)&&Nh(e)===o?i:i+1,o=o.getParentOrThrow()),ig(o))return new sf(o.__key,i,"element")}}else r=Nh(e);return Ng(r)?new sf(r.__key,i,"text"):null}function xf(e,t,n){var r=e.offset,i=e.getNode();0===r?(r=i.getPreviousSibling(),i=i.getParent(),t?(n||!t)&&null===r&&ig(i)&&i.isInline()&&(Ng(t=i.getPreviousSibling())&&(e.key=t.__key,e.offset=t.getTextContent().length)):ig(r)&&!n&&r.isInline()?(e.key=r.__key,e.offset=r.getChildrenSize(),e.type="element"):Ng(r)&&(e.key=r.__key,e.offset=r.getTextContent().length)):r===i.getTextContent().length&&(r=i.getNextSibling(),i=i.getParent(),t&&ig(r)&&r.isInline()?(e.key=r.__key,e.offset=0,e.type="element"):(n||t)&&null===r&&ig(i)&&i.isInline()&&!i.canInsertTextAfter()&&(Ng(t=i.getNextSibling())&&(e.key=t.__key,e.offset=0)))}function Sf(e,t,n){if("text"===e.type&&"text"===t.type){var r=e.isBefore(t);let i=e.is(t);xf(e,r,i),xf(t,!r,i),i&&(t.key=e.key,t.offset=e.offset,t.type=e.type),(r=Kf()).isComposing()&&r._compositionKey!==e.key&&pf(n)&&(r=n.anchor,n=n.focus,df(e,r.key,r.offset,r.type),df(t,n.key,n.offset,n.type))}}function Cf(e,t,n,r,i,o){return null!==e&&null!==n&&uh(i,e,n)?null===(t=wf(e,t,pf(o)?o.anchor:null,i))||null===(r=wf(n,r,pf(o)?o.focus:null,i))||"element"===t.type&&"element"===r.type&&(e=Nh(e),n=Nh(n),ng(e)&&ng(n))?null:(Sf(t,r,o),[t,r]):null}function Ef(e){return ig(e)&&!e.isInline()}function Tf(e,t,n,r,i,o){let a=qf();return(e=new mf(new sf(e,t,i),new sf(n,r,o),0,"")).dirty=!0,a._selection=e}function kf(){return new hf(new Set)}function Nf(e,t,n){var r=n._window;if(null===r)return null;var i=r.event,o=i?i.type:void 0;let a;if(r="selectionchange"===o,i=!eh&&(r||"beforeinput"===o||"compositionstart"===o||"compositionend"===o||"click"===o&&i&&3===i.detail||"drop"===o||void 0===o),pf(e)&&!i)return e.clone();if(null===t)return null;if(i=t.anchorNode,o=t.focusNode,a=t.anchorOffset,t=t.focusOffset,r&&pf(e)&&!uh(n,i,o))return e.clone();if(null===(n=Cf(i,a,o,t,n,e)))return null;let[s,l]=n;return new mf(s,l,pf(e)?e.format:0,pf(e)?e.style:"")}function Af(){return qf()._selection}function Of(){return Kf()._editorState._selection}function Mf(e,t,n,r=1){var i=e.anchor,o=e.focus,a=i.getNode(),s=o.getNode();if(t.is(a)||t.is(s))if(a=t.__key,e.isCollapsed())n<=(t=i.offset)&&(n=Math.max(0,t+r),i.set(a,n,"element"),o.set(a,n,"element"),Rf(e));else{var l=e.isBackward(),c=(s=l?o:i).getNode();o=(i=l?i:o).getNode(),t.is(c)&&(n<=(c=s.offset)&&s.set(a,Math.max(0,c+r),"element")),t.is(o)&&(n<=(t=i.offset)&&i.set(a,Math.max(0,t+r),"element")),Rf(e)}}function Rf(e){var t=e.anchor,n=t.offset;let r=e.focus;var i=r.offset,o=t.getNode(),a=r.getNode();if(e.isCollapsed())ig(o)&&(Ng(a=(i=n>=(a=o.getChildrenSize()))?o.getChildAtIndex(a-1):o.getChildAtIndex(n))&&(n=0,i&&(n=a.getTextContentSize()),t.set(a.__key,n,"text"),r.set(a.__key,n,"text")));else{if(ig(o)){let r=o.getChildrenSize();Ng(n=(e=n>=r)?o.getChildAtIndex(r-1):o.getChildAtIndex(n))&&(o=0,e&&(o=n.getTextContentSize()),t.set(n.__key,o,"text"))}ig(a)&&(Ng(i=(t=i>=(n=a.getChildrenSize()))?a.getChildAtIndex(n-1):a.getChildAtIndex(i))&&(a=0,t&&(a=i.getTextContentSize()),r.set(i.__key,a,"text")))}}function Df(e,t,n,r,i){let o=null,a=0,s=null;null!==r?(o=r.__key,Ng(r)?(a=r.getTextContentSize(),s="text"):ig(r)&&(a=r.getChildrenSize(),s="element")):null!==i&&(o=i.__key,Ng(i)?s="text":ig(i)&&(s="element")),null!==o&&null!==s?e.set(o,a,s):(a=t.getIndexWithinParent(),-1===a&&(a=n.getChildrenSize()),e.set(n.__key,a,"element"))}function If(e,t,n,r,i){"text"===e.type?(e.key=n,t||(e.offset+=i)):e.offset>r.getIndexWithinParent()&&--e.offset}function Pf(e,t,n){let r=[],i=null,o=null;e=e.getChildren();for(let u=0;u<e.length;u++){var a=e[u];zg(a)||Id(108);var s=a.getChildren();a=0;for(let e of s){for(Pg(e)||Id(109);void 0!==r[u]&&void 0!==r[u][a];)a++;var l=a,c=e;let d={cell:c,startColumn:l,startRow:s=u},h=c.__rowSpan,p=c.__colSpan;for(let e=0;e<h;e++){void 0===r[s+e]&&(r[s+e]=[]);for(let t=0;t<p;t++)r[s+e][l+t]=d}t.is(c)&&(i=d),n.is(c)&&(o=d),a+=e.__colSpan}}return null===i&&Id(110),null===o&&Id(111),[r,i,o]}let Lf=null,Bf=null,$f=!1,zf=!1,Ff=0,Uf={characterData:!0,childList:!0,subtree:!0};function Hf(){return $f||null!==Lf&&Lf._readOnly}function Vf(){$f&&Id(13)}function qf(){return null===Lf&&Id(15),Lf}function Kf(){return null===Bf&&Id(16),Bf}function Wf(e,t,n){var r=t.__type;let i=e._nodes.get(r);for(void 0===i&&Id(30),void 0===(e=n.get(r))&&(e=Array.from(i.transforms),n.set(r,e)),n=e.length,r=0;r<n&&(e[r](t),t.isAttached());r++);}function jf(e,t){var n=t.get(e.type);if(void 0===n&&Id(17),n=n.klass,e.type!==n.getType()&&Id(18),n=n.importJSON(e),e=e.children,ig(n)&&Array.isArray(e))for(let r=0;r<e.length;r++){let i=jf(e[r],t);n.append(i)}return n}function Yf(e,t){let n=Lf,r=$f,i=Bf;Lf=e,$f=!0,Bf=null;try{return t()}finally{Lf=n,$f=r,Bf=i}}function Gf(e){let t=e._pendingEditorState,n=e._rootElement,r=e._headless||null===n;if(null!==t){var i=e._editorState,o=i._selection,a=t._selection,s=0!==e._dirtyType,l=Lf,c=$f,u=Bf,d=e._updating,h=e._observer,p=null;if(e._pendingEditorState=null,e._editorState=t,!r&&s&&null!==h){Bf=e,Lf=t,$f=!1,e._updating=!0;try{let r=e._dirtyType,o=e._dirtyElements,a=e._dirtyLeaves;h.disconnect();var f=o,g=a;vp=bp=yp="",_p=2===r,xp=null,lp=e,sp=e._config,cp=e._nodes,up=lp._listeners.mutation,dp=f,hp=g,pp=i._nodeMap,fp=t._nodeMap,wp=t._readOnly,gp=new Map(e._keyToDOMMap);let s=new Map;mp=s,Ip("root",null),mp=gp=sp=fp=pp=hp=dp=cp=lp=void 0,p=s}catch(X){if(X instanceof Error&&e._onError(X),zf)throw X;return Rg(e,null,n,t),ah(e),e._dirtyType=2,zf=!0,Gf(e),void(zf=!1)}finally{h.observe(n,Uf),e._updating=d,Lf=l,$f=c,Bf=u}}t._readOnly||(t._readOnly=!0);var m=e._dirtyLeaves,y=e._dirtyElements,v=e._normalizedNodes,b=e._updateTags,_=e._deferred;s&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set);var w,x=e._decorators,S=e._pendingDecorators||x,C=t._nodeMap;for(w in S)C.has(w)||(S===x&&(S=Ch(e)),delete S[w]);var E=r?null:Xh(e._window);if(e._editable&&null!==E&&(s||null===a||a.dirty)){Bf=e,Lf=t;try{if(null!==h&&h.disconnect(),s||null===a||a.dirty){let t=e._blockCursorElement;null!==t&&Jh(t,e,n);e:{let t=E.anchorNode,r=E.focusNode,i=E.anchorOffset,s=E.focusOffset,l=document.activeElement;if(!(b.has("collaboration")&&l!==n||null!==l&&ch(l)))if(pf(a)){var T=a.anchor,k=a.focus,N=T.key,A=k.key,O=Fh(e,N),M=Fh(e,A),R=T.offset,D=k.offset,I=a.format,P=a.style,L=a.isCollapsed(),B=O,$=M,z=!1;if("text"===T.type){B=ph(O);let e=T.getNode();z=e.getFormat()!==I||e.getStyle()!==P}else pf(o)&&"text"===o.anchor.type&&(z=!0);if("text"===k.type&&($=ph(M)),null!==B&&null!==$){if(L&&(null===o||z||pf(o)&&(o.format!==I||o.style!==P))){var F=performance.now();Gp=[I,P,R,N,F]}if(i===R&&s===D&&t===B&&r===$&&("Range"!==E.type||!L)&&(null!==l&&n.contains(l)||n.focus({preventScroll:!0}),"element"!==T.type))break e;try{E.setBaseAndExtent(B,R,$,D)}catch(Z){}if(!b.has("skip-scroll-into-view")&&a.isCollapsed()&&null!==n&&n===document.activeElement){let t=a instanceof mf&&"element"===a.anchor.type?B.childNodes[R]||null:0<E.rangeCount?E.getRangeAt(0):null;if(null!==t){let r=t.getBoundingClientRect(),i=n.ownerDocument,o=i.defaultView;if(null!==o)for(var U,H,{top:V,bottom:q}=r,K=n;null!==K;){let t=K===i.body;if(t)U=0,H=Vh(e).innerHeight;else{let e=K.getBoundingClientRect();U=e.top,H=e.bottom}let n=0;if(V<U?n=-(U-V):q>H&&(n=q-H),0!==n)if(t)o.scrollBy(0,n);else{let e=K.scrollTop;K.scrollTop+=n;let t=K.scrollTop-e;V-=t,q-=t}if(t)break;K=Uh(K)}}}Kp=!0}}else null!==o&&uh(e,t,r)&&E.removeAllRanges()}}e:{let t=e._blockCursorElement;if(pf(a)&&a.isCollapsed()&&"element"===a.anchor.type&&n.contains(document.activeElement)){let r=a.anchor,i=r.getNode(),o=r.offset,s=i.getChildrenSize(),l=!1,c=null;if(o===s){Gh(i.getChildAtIndex(o-1))&&(l=!0)}else{let t=i.getChildAtIndex(o);if(Gh(t)){let n=t.getPreviousSibling();(null===n||Gh(n))&&(l=!0,c=e.getElementByKey(t.__key))}}if(l){let r=e.getElementByKey(i.__key);if(null===t){let n=e._config.theme,r=document.createElement("div");r.contentEditable="false",r.setAttribute("data-lexical-cursor","true");let i=n.blockCursor;if(void 0!==i){if("string"==typeof i){let e=i.split(" ");i=n.blockCursor=e}void 0!==i&&r.classList.add(...i)}e._blockCursorElement=t=r}n.style.caretColor="transparent",null===c?r.appendChild(t):r.insertBefore(t,c);break e}}null!==t&&Jh(t,e,n)}null!==h&&h.observe(n,Uf)}finally{Bf=u,Lf=l}}if(null!==p){var W=p;let t=Array.from(e._listeners.mutation),n=t.length;for(let e=0;e<n;e++){let[n,r]=t[e],i=W.get(r);void 0!==i&&n(i,{dirtyLeaves:m,updateTags:b})}}pf(a)||null===a||null!==o&&o.is(a)||e.dispatchCommand(Qu,void 0);var j=e._pendingDecorators;null!==j&&(e._decorators=j,e._pendingDecorators=null,Jf("decorator",e,!0,j));var Y=Eh(i),G=Eh(t);if(Y!==G&&Jf("textcontent",e,!0,G),Jf("update",e,!0,{dirtyElements:y,dirtyLeaves:m,editorState:t,normalizedNodes:v,prevEditorState:i,tags:b}),e._deferred=[],0!==_.length){let t=e._updating;e._updating=!0;try{for(let e=0;e<_.length;e++)_[e]()}finally{e._updating=t}}var J=e._updates;if(0!==J.length){let t=J.shift();if(t){let[n,r]=t;Qf(e,n,r)}}}}function Jf(e,t,n,...r){let i=t._updating;t._updating=n;try{let n=Array.from(t._listeners[e]);for(e=0;e<n.length;e++)n[e].apply(null,r)}finally{t._updating=i}}function Xf(e,t,n){if(!1===e._updating||Bf!==e){let r=!1;return e.update((()=>{r=Xf(e,t,n)})),r}let r=Oh(e);for(let o=4;0<=o;o--)for(let a=0;a<r.length;a++){var i=r[a]._commands.get(t);if(void 0!==i&&void 0!==(i=i[o])){let t=(i=Array.from(i)).length;for(let r=0;r<t;r++)if(!0===i[r](n,e))return!0}}return!1}function Zf(e,t){let n=e._updates;for(t=t||!1;0!==n.length;){var r=n.shift();if(r){let n,[i,o]=r;void 0!==o&&(r=o.onUpdate,n=o.tag,o.skipTransforms&&(t=!0),r&&e._deferred.push(r),n&&e._updateTags.add(n)),i()}}return t}function Qf(e,t,n){let r=e._updateTags;var i,o=i=!1;if(void 0!==n){var a=n.onUpdate;null!=(i=n.tag)&&r.add(i),i=n.skipTransforms||!1,o=n.discrete||!1}a&&e._deferred.push(a),n=e._editorState;let s=!1;(null===(a=e._pendingEditorState)||a._readOnly)&&(a=e._pendingEditorState=new ug(new Map((a||n)._nodeMap)),s=!0),a._flushSync=o,o=Lf;let l=$f,c=Bf,u=e._updating;Lf=a,$f=!1,e._updating=!0,Bf=e;try{s&&(e._headless?null!=n._selection&&(a._selection=n._selection.clone()):a._selection=function(e){let t=e.getEditorState()._selection,n=Xh(e._window);return yf(t)||gf(t)?t.clone():Nf(t,n,e)}(e));let r=e._compositionKey;t(),i=Zf(e,i),function(e,t){if(t=t.getEditorState()._selection,pf(e=e._selection)){var n=e.anchor;let r,i=e.focus;"text"===n.type&&(r=n.getNode(),r.selectionTransform(t,e)),"text"===i.type&&r!==(n=i.getNode())&&n.selectionTransform(t,e)}}(a,e),0!==e._dirtyType&&(i?function(e,t){t=t._dirtyLeaves,e=e._nodeMap;for(let n of t)Ng(t=e.get(n))&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&ip(t)}(a,e):function(e,t){let n=t._dirtyLeaves,r=t._dirtyElements;e=e._nodeMap;let i=_h(),o=new Map;var a=n;let s=a.size;for(var l=r,c=l.size;0<s||0<c;){if(0<s){t._dirtyLeaves=new Set;for(let r of a)Ng(a=e.get(r))&&a.isAttached()&&a.isSimpleText()&&!a.isUnmergeable()&&ip(a),void 0!==a&&void 0!==a&&a.__key!==i&&a.isAttached()&&Wf(t,a,o),n.add(r);if(s=(a=t._dirtyLeaves).size,0<s){Ff++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map;for(let n of l)l=n[0],c=n[1],("root"===l||c)&&(void 0!==(a=e.get(l))&&void 0!==a&&a.__key!==i&&a.isAttached()&&Wf(t,a,o),r.set(l,c));s=(a=t._dirtyLeaves).size,c=(l=t._dirtyElements).size,Ff++}t._dirtyLeaves=n,t._dirtyElements=r}(a,e),Zf(e),function(e,t,n,r){e=e._nodeMap,t=t._nodeMap;for(let i of n){let r=t.get(i);void 0===r||r.isAttached()||(e.has(i)||n.delete(i),t.delete(i))}for(let[i]of r)void 0===(n=t.get(i))||n.isAttached()||(ig(n)&&tp(n,i,e,t,r),e.has(i)||r.delete(i),t.delete(i))}(n,a,e._dirtyLeaves,e._dirtyElements)),r!==e._compositionKey&&(a._flushSync=!0);let d=a._selection;if(pf(d)){let e=a._nodeMap,t=d.focus.key;void 0!==e.get(d.anchor.key)&&void 0!==e.get(t)||Id(19)}else yf(d)&&0===d._nodes.size&&(a._selection=null)}catch(d){return d instanceof Error&&e._onError(d),e._pendingEditorState=n,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void Gf(e)}finally{Lf=o,$f=l,Bf=c,e._updating=u,Ff=0}0!==e._dirtyType||function(e,t){if(t=t.getEditorState()._selection,null!==(e=e._selection)){if(e.dirty||!e.is(t))return!0}else if(null!==t)return!0;return!1}(a,e)?a._flushSync?(a._flushSync=!1,Gf(e)):s&&lh((()=>{Gf(e)})):(a._flushSync=!1,s&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function eg(e,t,n){e._updating?e._updates.push([t,n]):Qf(e,t,n)}class tg extends af{constructor(e){super(e)}decorate(){Id(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function ng(e){return e instanceof tg}class rg extends af{constructor(e){super(e),this.__last=this.__first=null,this.__indent=this.__format=this.__size=0,this.__dir=null}getFormat(){return this.getLatest().__format}getFormatType(){let e=this.getFormat();return Xd[e]||""}getIndent(){return this.getLatest().__indent}getChildren(){let e=[],t=this.getFirstChild();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){let e=[],t=this.getFirstChild();for(;null!==t;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return 0===this.getChildrenSize()}isDirty(){let e=Kf()._dirtyElements;return null!==e&&e.has(this.__key)}isLastChild(){let e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return null!==t&&t.is(e)}getAllTextNodes(){let e=[],t=this.getFirstChild();for(;null!==t;){if(Ng(t)&&e.push(t),ig(t)){let n=t.getAllTextNodes();e.push(...n)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;null!==e;){if(ig(e)){let t=e.getFirstChild();if(null!==t){e=t;continue}}break}return e}getLastDescendant(){let e=this.getLastChild();for(;null!==e;){if(ig(e)){let t=e.getLastChild();if(null!==t){e=t;continue}}break}return e}getDescendantByIndex(e){let t=this.getChildren(),n=t.length;return e>=n?ig(e=t[n-1])&&e.getLastDescendant()||e||null:ig(e=t[e])&&e.getFirstDescendant()||e||null}getFirstChild(){let e=this.getLatest().__first;return null===e?null:wh(e)}getFirstChildOrThrow(){let e=this.getFirstChild();return null===e&&Id(45),e}getLastChild(){let e=this.getLatest().__last;return null===e?null:wh(e)}getLastChildOrThrow(){let e=this.getLastChild();return null===e&&Id(96),e}getChildAtIndex(e){var t=this.getChildrenSize();let n;if(e<t/2){for(n=this.getFirstChild(),t=0;null!==n&&t<=e;){if(t===e)return n;n=n.getNextSibling(),t++}return null}for(n=this.getLastChild(),--t;null!==n&&t>=e;){if(t===e)return n;n=n.getPreviousSibling(),t--}return null}getTextContent(){let e="",t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContent(),ig(i)&&r!==n-1&&!i.isInline()&&(e+="\n\n")}return e}getTextContentSize(){let e=0,t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContentSize(),ig(i)&&r!==n-1&&!i.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}hasFormat(e){return""!==e&&(e=Jd[e],0!=(this.getFormat()&e))}select(e,t){Vf();let n=Af(),r=e,i=t;var o=this.getChildrenSize();if(!this.canBeEmpty())if(0===e&&0===t){if(Ng(e=this.getFirstChild())||ig(e))return e.select(0,0)}else if(!(void 0!==e&&e!==o||void 0!==t&&t!==o)&&(Ng(e=this.getLastChild())||ig(e)))return e.select();return void 0===r&&(r=o),void 0===i&&(i=o),o=this.__key,pf(n)?(n.anchor.set(o,r,"element"),n.focus.set(o,i,"element"),n.dirty=!0,n):Tf(o,r,o,i,"element","element")}selectStart(){let e=this.getFirstDescendant();return ig(e)||Ng(e)?e.select(0,0):null!==e?e.selectPrevious():this.select(0,0)}selectEnd(){let e=this.getLastDescendant();return ig(e)||Ng(e)?e.select():null!==e?e.selectNext():this.select()}clear(){let e=this.getWritable();return this.getChildren().forEach((e=>e.remove())),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){let t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=""!==e?Jd[e]:0,this}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,n){let r=n.length,i=this.getChildrenSize(),o=this.getWritable(),a=o.__key;var s=[],l=[];let c=this.getChildAtIndex(e+t),u=null,d=i-t+r;if(0!==e)if(e===i)u=this.getLastChild();else{var h=this.getChildAtIndex(e);null!==h&&(u=h.getPreviousSibling())}if(0<t){var p=null===u?this.getFirstChild():u.getNextSibling();for(h=0;h<t;h++){null===p&&Id(100);var f=p.getNextSibling(),g=p.__key;yh(p=p.getWritable()),l.push(g),p=f}}for(h=u,f=0;f<r;f++){g=n[f],null!==h&&g.is(h)&&(u=h=h.getPreviousSibling()),(p=g.getWritable()).__parent===a&&d--,yh(p);let e=g.__key;null===h?(o.__first=e,p.__prev=null):((h=h.getWritable()).__next=e,p.__prev=h.__key),g.__key===a&&Id(76),p.__parent=a,s.push(e),h=g}if(e+t===i?null!==h&&(h.getWritable().__next=null,o.__last=h.__key):null!==c&&(e=c.getWritable(),null!==h?(t=h.getWritable(),e.__prev=h.__key,t.__next=c.__key):e.__prev=null),o.__size=d,l.length&&pf(e=Af())){l=new Set(l),s=new Set(s);let{anchor:t,focus:n}=e;og(t,l,s)&&Df(t,t.getNode(),this,u,c),og(n,l,s)&&Df(n,n.getNode(),this,u,c),0!==d||this.canBeEmpty()||Kh(this)||this.remove()}return o}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(){return null}canInsertTab(){return!1}canIndent(){return!0}collapseAtStart(){return!1}excludeFromCopy(){return!1}canExtractContents(){return!0}canReplaceWith(){return!0}canInsertAfter(){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(){return!1}extractWithChild(){return!1}}function ig(e){return e instanceof rg}function og(e,t,n){for(e=e.getNode();e;){let r=e.__key;if(t.has(r)&&!n.has(r))return!0;e=e.getParent()}return!1}class ag extends rg{static getType(){return"root"}static clone(){return new ag}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){Id(51)}getTextContent(){let e=this.__cachedText;return!Hf()&&0!==Kf()._dirtyType||null===e?super.getTextContent():e}remove(){Id(52)}replace(){Id(53)}insertBefore(){Id(54)}insertAfter(){Id(55)}updateDOM(){return!1}append(...e){for(let t=0;t<e.length;t++){let n=e[t];ig(n)||ng(n)||Id(56)}return super.append(...e)}static importJSON(e){let t=Th();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function sg(e){return e instanceof ag}function lg(){return new ug(new Map([["root",new ag]]))}function cg(e){let t=e.exportJSON();t.type!==e.constructor.getType()&&Id(58);let n=t.children;if(ig(e)){Array.isArray(n)||Id(59),e=e.getChildren();for(let t=0;t<e.length;t++){let r=cg(e[t]);n.push(r)}}return t}class ug{constructor(e,t){this._nodeMap=e,this._selection=t||null,this._readOnly=this._flushSync=!1}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(e){return Yf(this,e)}clone(e){return(e=new ug(this._nodeMap,void 0===e?this._selection:e))._readOnly=!0,e}toJSON(){return Yf(this,(()=>({root:cg(Th())})))}}class dg extends af{static getType(){return"linebreak"}static clone(e){return new dg(e.__key)}constructor(e){super(e)}getTextContent(){return"\n"}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:e=>{let t=e.parentElement;return null!=t&&t.firstChild===e&&t.lastChild===e?null:{conversion:hg,priority:0}}}}static importJSON(){return pg()}exportJSON(){return{type:"linebreak",version:1}}}function hg(){return{node:pg()}}function pg(){return jh(new dg)}function fg(e){return e instanceof dg}function gg(e,t){return 16&t?"code":128&t?"mark":32&t?"sub":64&t?"sup":null}function mg(e,t){return 1&t?"strong":2&t?"em":"span"}function yg(e,t,n,r,i){e=r.classList,void 0!==(r=Ih(i,"base"))&&e.add(...r);let o=!1,a=8&t&&4&t;var s=8&n&&4&n;void 0!==(r=Ih(i,"underlineStrikethrough"))&&(s?(o=!0,a||e.add(...r)):a&&e.remove(...r));for(let l in Yd)s=Yd[l],void 0!==(r=Ih(i,l))&&(n&s&&(!o||"underline"!==l&&"strikethrough"!==l)?(0==(t&s)||a&&"underline"===l||"strikethrough"===l)&&e.add(...r):t&s&&e.remove(...r))}function vg(e,t,n){let r=t.firstChild;if(e+=(n=n.isComposing())?qd:"",null==r)t.textContent=e;else if((t=r.nodeValue)!==e)if(n||$d){n=t.length;let i=e.length,o=0,a=0;for(;o<n&&o<i&&t[o]===e[o];)o++;for(;a+o<n&&a+o<i&&t[n-a-1]===e[i-a-1];)a++;e=[o,n-o-a,e.slice(o,i-a)];let[s,l,c]=e;0!==l&&r.deleteData(s,l),r.insertData(s,c)}else r.nodeValue=e}function bg(e,t){return(t=document.createElement(t)).appendChild(e),t}class _g extends af{static getType(){return"text"}static clone(e){return new _g(e.__text,e.__key)}constructor(e,t){super(t),this.__text=e,this.__format=0,this.__style="",this.__detail=this.__mode=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){let e=this.getLatest();return Qd[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return 1===this.getLatest().__mode}isComposing(){return this.__key===_h()}isSegmented(){return 2===this.getLatest().__mode}isDirectionless(){return 0!=(1&this.getLatest().__detail)}isUnmergeable(){return 0!=(2&this.getLatest().__detail)}hasFormat(e){return e=Yd[e],0!=(this.getFormat()&e)}isSimpleText(){return"text"===this.__type&&0===this.__mode}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return fh(this.getLatest().__format,e,t)}createDOM(e){var t=this.__format,n=gg(0,t);let r=mg(0,t),i=document.createElement(null===n?r:n),o=i;return null!==n&&(o=document.createElement(r),i.appendChild(o)),n=o,vg(this.__text,n,this),void 0!==(e=e.theme.text)&&yg(r,0,t,n,e),""!==(t=this.__style)&&(i.style.cssText=t),i}updateDOM(e,t,n){let r=this.__text;var i=e.__format,o=this.__format,a=gg(0,i);let s=gg(0,o);var l=mg(0,i);let c=mg(0,o);return(null===a?l:a)!==(null===s?c:s)||(a===s&&l!==c?(null==(i=t.firstChild)&&Id(48),vg(r,e=a=document.createElement(c),this),void 0!==(n=n.theme.text)&&yg(c,0,o,e,n),t.replaceChild(a,i),!1):(l=t,null!==s&&null!==a&&(null==(l=t.firstChild)&&Id(49)),vg(r,l,this),void 0!==(n=n.theme.text)&&i!==o&&yg(c,i,o,l,n),o=this.__style,e.__style!==o&&(t.style.cssText=o),!1))}static importDOM(){return{"#text":()=>({conversion:Cg,priority:0}),b:()=>({conversion:Sg,priority:0}),br:()=>({conversion:xg,priority:0}),code:()=>({conversion:Tg,priority:0}),em:()=>({conversion:Tg,priority:0}),i:()=>({conversion:Tg,priority:0}),s:()=>({conversion:Tg,priority:0}),span:()=>({conversion:wg,priority:0}),strong:()=>({conversion:Tg,priority:0}),sub:()=>({conversion:Tg,priority:0}),sup:()=>({conversion:Tg,priority:0}),u:()=>({conversion:Tg,priority:0})}}static importJSON(e){let t=kg(e.text);return t.setFormat(e.format),t.setDetail(e.detail),t.setMode(e.mode),t.setStyle(e.style),t}exportDOM(e){return({element:e}=super.exportDOM(e)),null!==e&&(this.hasFormat("bold")&&(e=bg(e,"b")),this.hasFormat("italic")&&(e=bg(e,"i")),this.hasFormat("strikethrough")&&(e=bg(e,"s")),this.hasFormat("underline")&&(e=bg(e,"u"))),{element:e}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(){}setFormat(e){let t=this.getWritable();return t.__format="string"==typeof e?Yd[e]:e,t}setDetail(e){let t=this.getWritable();return t.__detail="string"==typeof e?Gd[e]:e,t}setStyle(e){let t=this.getWritable();return t.__style=e,t}toggleFormat(e){return e=Yd[e],this.setFormat(this.getFormat()^e)}toggleDirectionless(){let e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){let e=this.getWritable();return e.__detail^=2,e}setMode(e){if(e=Zd[e],this.__mode===e)return this;let t=this.getWritable();return t.__mode=e,t}setTextContent(e){if(this.__text===e)return this;let t=this.getWritable();return t.__text=e,t}select(e,t){Vf();let n=Af();var r=this.getTextContent();let i=this.__key;return"string"==typeof r?(r=r.length,void 0===e&&(e=r),void 0===t&&(t=r)):t=e=0,pf(n)?((r=_h())!==n.anchor.key&&r!==n.focus.key||bh(i),n.setTextNodeRange(this,e,this,t),n):Tf(i,e,i,t,"text","text")}spliceText(e,t,n,r){let i=this.getWritable(),o=i.__text,a=n.length,s=e;0>s&&(s=a+s,0>s&&(s=0));let l=Af();return r&&pf(l)&&(e+=a,l.setTextNodeRange(i,e,i,e)),t=o.slice(0,s)+n+o.slice(s+t),i.__text=t,i}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}canContainTabs(){return!1}splitText(...e){Vf();var t=this.getLatest(),n=t.getTextContent(),r=t.__key,i=_h(),o=new Set(e);e=[];for(var a=n.length,s="",l=0;l<a;l++)""!==s&&o.has(l)&&(e.push(s),s=""),s+=n[l];if(""!==s&&e.push(s),0===(o=e.length))return[];if(e[0]===n)return[t];var c=e[0];n=t.getParentOrThrow(),l=t.getFormat();let u=t.getStyle(),d=t.__detail;a=!1,t.isSegmented()?((s=kg(c)).__format=l,s.__style=u,s.__detail=d,a=!0):(s=t.getWritable()).__text=c,t=Af(),s=[s],c=c.length;for(let f=1;f<o;f++){var h=e[f],p=h.length;(h=kg(h).getWritable()).__format=l,h.__style=u,h.__detail=d;let n=h.__key;if(p=c+p,pf(t)){let e=t.anchor,i=t.focus;e.key===r&&"text"===e.type&&e.offset>c&&e.offset<=p&&(e.key=n,e.offset-=c,t.dirty=!0),i.key===r&&"text"===i.type&&i.offset>c&&i.offset<=p&&(i.key=n,i.offset-=c,t.dirty=!0)}i===r&&bh(n),c=p,s.push(h)}return r=this.getPreviousSibling(),i=this.getNextSibling(),null!==r&&vh(r),null!==i&&vh(i),r=n.getWritable(),i=this.getIndexWithinParent(),a?(r.splice(i,0,s),this.remove()):r.splice(i,1,s),pf(t)&&Mf(t,n,i,o-1),s}mergeWithSibling(e){var t=e===this.getPreviousSibling();t||e===this.getNextSibling()||Id(50);var n=this.__key;let r=e.__key,i=this.__text,o=i.length;_h()===r&&bh(n);let a=Af();if(pf(a)){let i=a.anchor,s=a.focus;null!==i&&i.key===r&&(If(i,t,n,e,o),a.dirty=!0),null!==s&&s.key===r&&(If(s,t,n,e,o),a.dirty=!0)}return n=e.__text,this.setTextContent(t?n+i:i+n),t=this.getWritable(),e.remove(),t}isTextEntity(){return!1}}function wg(e){let t="700"===e.style.fontWeight,n="line-through"===e.style.textDecoration,r="italic"===e.style.fontStyle,i="underline"===e.style.textDecoration,o=e.style.verticalAlign;return{forChild:e=>Ng(e)?(t&&e.toggleFormat("bold"),n&&e.toggleFormat("strikethrough"),r&&e.toggleFormat("italic"),i&&e.toggleFormat("underline"),"sub"===o&&e.toggleFormat("subscript"),"super"===o&&e.toggleFormat("superscript"),e):e,node:null}}function xg(){return{node:pg()}}function Sg(e){let t="normal"===e.style.fontWeight;return{forChild:e=>(Ng(e)&&!t&&e.toggleFormat("bold"),e),node:null}}function Cg(e,t,n){return e=e.textContent||"",!n&&/\n/.test(e)&&0===(e=e.replace(/\r?\n/gm," ")).trim().length?{node:null}:{node:kg(e)}}let Eg={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Tg(e){let t=Eg[e.nodeName.toLowerCase()];return void 0===t?{node:null}:{forChild:e=>(Ng(e)&&!e.hasFormat(t)&&e.toggleFormat(t),e),node:null}}function kg(e=""){return jh(new _g(e))}function Ng(e){return e instanceof _g}class Ag extends rg{static getType(){return"paragraph"}static clone(e){return new Ag(e.__key)}createDOM(e){let t=document.createElement("p");return void 0!==(e=Ih(e.theme,"paragraph"))&&t.classList.add(...e),t}updateDOM(){return!1}static importDOM(){return{p:()=>({conversion:Og,priority:0})}}exportDOM(e){if(({element:e}=super.exportDOM(e)),e&&this.isEmpty()&&e.append(document.createElement("br")),e){var t=this.getFormatType();e.style.textAlign=t,(t=this.getDirection())&&(e.dir=t),0<(t=this.getIndent())&&(e.style.textIndent=20*t+"px")}return{element:e}}static importJSON(e){let t=Mg();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),type:"paragraph",version:1}}insertNewAfter(e,t){e=Mg();let n=this.getDirection();return e.setDirection(n),this.insertAfter(e,t),e}collapseAtStart(){let e=this.getChildren();if(0===e.length||Ng(e[0])&&""===e[0].getTextContent().trim()){if(null!==this.getNextSibling())return this.selectNext(),this.remove(),!0;if(null!==this.getPreviousSibling())return this.selectPrevious(),this.remove(),!0}return!1}}function Og(e){let t=Mg();return e.style&&(t.setFormat(e.style.textAlign),0<(e=parseInt(e.style.textIndent,10)/20)&&t.setIndent(e)),{node:t}}function Mg(){return jh(new Ag)}function Rg(e,t,n,r){let i=e._keyToDOMMap;i.clear(),e._editorState=lg(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null,null!==(r=e._observer)&&(r.disconnect(),e._observer=null),null!==t&&(t.textContent=""),null!==n&&(n.textContent="",i.set("root",n))}class Dg{constructor(e,t,n,r,i,o){this._parentEditor=t,this._rootElement=null,this._editorState=e,this._compositionKey=this._pendingEditorState=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Mh(),this._onError=i,this._htmlConversions=o,this._editable=!0,this._headless=null!==t&&t._headless,this._blockCursorElement=this._window=null}isComposing(){return null!=this._compositionKey}registerUpdateListener(e){let t=this._listeners.update;return t.add(e),()=>{t.delete(e)}}registerEditableListener(e){let t=this._listeners.editable;return t.add(e),()=>{t.delete(e)}}registerDecoratorListener(e){let t=this._listeners.decorator;return t.add(e),()=>{t.delete(e)}}registerTextContentListener(e){let t=this._listeners.textcontent;return t.add(e),()=>{t.delete(e)}}registerRootListener(e){let t=this._listeners.root;return e(this._rootElement,null),t.add(e),()=>{e(null,this._rootElement),t.delete(e)}}registerCommand(e,t,n){void 0===n&&Id(35);let r=this._commands;r.has(e)||r.set(e,[new Set,new Set,new Set,new Set,new Set]);let i=r.get(e);void 0===i&&Id(36);let o=i[n];return o.add(t),()=>{o.delete(t),i.every((e=>0===e.size))&&r.delete(e)}}registerMutationListener(e,t){void 0===this._nodes.get(e.getType())&&Id(37);let n=this._listeners.mutation;return n.set(t,e),()=>{n.delete(t)}}registerNodeTransformToKlass(e,t){return e=e.getType(),void 0===(e=this._nodes.get(e))&&Id(37),e.transforms.add(t),e}registerNodeTransform(e,t){var n=this.registerNodeTransformToKlass(e,t);let r=[n];return null!=(n=n.replaceWithKlass)&&(n=this.registerNodeTransformToKlass(n,t),r.push(n)),function(e,t){eg(e,(()=>{var e=qf();if(!e.isEmpty())if("root"===t)Th().markDirty();else{e=e._nodeMap;for(let[,t]of e)t.markDirty()}}),null===e._pendingEditorState?{tag:"history-merge"}:void 0)}(this,e.getType()),()=>{r.forEach((e=>e.transforms.delete(t)))}}hasNodes(e){for(let t=0;t<e.length;t++){let n=e[t].getType();if(!this._nodes.has(n))return!1}return!0}dispatchCommand(e,t){return Xf(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){let t=this._rootElement;if(e!==t){let i=Ih(this._config.theme,"root");var n=this._pendingEditorState||this._editorState;if(this._rootElement=e,Rg(this,t,e,n),null!==t){if(!this._config.disableEvents){if(0!==qp&&(qp--,0===qp&&t.ownerDocument.removeEventListener("selectionchange",rf)),null!=(n=t.__lexicalEditor)){if(null!==n._parentEditor){var r=Oh(n);r=r[r.length-1]._key,nf.get(r)===n&&nf.delete(r)}else nf.delete(n._key);t.__lexicalEditor=null}for(n=tf(t),r=0;r<n.length;r++)n[r]();t.__lexicalEventHandles=[]}null!=i&&t.classList.remove(...i)}null!==e?(n=(n=e.ownerDocument)&&n.defaultView||null,(r=e.style).userSelect="text",r.whiteSpace="pre-wrap",r.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=n,this._dirtyType=2,ah(this),this._updateTags.add("history-merge"),Gf(this),this._config.disableEvents||function(e,t){0===qp&&e.ownerDocument.addEventListener("selectionchange",rf),qp++,e.__lexicalEditor=t;let n=tf(e);for(let r=0;r<zp.length;r++){let[i,o]=zp[r],a="function"==typeof o?e=>{!0!==e._lexicalHandled&&(e._lexicalHandled=!0,t.isEditable()&&o(e,t))}:e=>{if(!0!==e._lexicalHandled&&(e._lexicalHandled=!0,t.isEditable()))switch(i){case"cut":return Xf(t,Od,e);case"copy":return Xf(t,Ad,e);case"paste":return Xf(t,od,e);case"dragstart":return Xf(t,Td,e);case"dragover":return Xf(t,kd,e);case"dragend":return Xf(t,Nd,e);case"focus":return Xf(t,Md,e);case"blur":return Xf(t,Rd,e);case"drop":return Xf(t,Ed,e)}};e.addEventListener(i,a),n.push((()=>{e.removeEventListener(i,a)}))}}(e,this),null!=i&&e.classList.add(...i)):this._window=null,Jf("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&Id(38),oh(this);let n=this._pendingEditorState,r=this._updateTags;t=void 0!==t?t.tag:null,null===n||n.isEmpty()||(null!=t&&r.add(t),Gf(this)),this._pendingEditorState=e,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,null!=t&&r.add(t),Gf(this)}parseEditorState(e,t){e="string"==typeof e?JSON.parse(e):e;let n=lg(),r=Lf,i=$f,o=Bf,a=this._dirtyElements,s=this._dirtyLeaves,l=this._cloneNotNeeded,c=this._dirtyType;this._dirtyElements=new Map,this._dirtyLeaves=new Set,this._cloneNotNeeded=new Set,this._dirtyType=0,Lf=n,$f=!1,Bf=this;try{jf(e.root,this._nodes),t&&t(),n._readOnly=!0}catch(u){u instanceof Error&&this._onError(u)}finally{this._dirtyElements=a,this._dirtyLeaves=s,this._cloneNotNeeded=l,this._dirtyType=c,Lf=r,$f=i,Bf=o}return n}update(e,t){eg(this,e,t)}focus(e,t={}){let n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),eg(this,(()=>{let e=Af(),n=Th();null!==e?e.dirty=!0:0!==n.getChildrenSize()&&("rootStart"===t.defaultSelection?n.selectStart():n.selectEnd())}),{onUpdate:()=>{n.removeAttribute("autocapitalize"),e&&e()},tag:"focus"}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){var e=this._rootElement;null!==e&&e.blur(),null!==(e=Xh(this._window))&&e.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,Jf("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}class Ig extends rg{constructor(e,t){super(t),this.__colSpan=e,this.__rowSpan=1}exportJSON(){return{...super.exportJSON(),colSpan:this.__colSpan}}setColSpan(e){return this.getWritable().__colSpan=e,this}setRowSpan(e){return this.getWritable().__rowSpan=e,this}}function Pg(e){return e instanceof Ig}class Lg extends rg{}function Bg(e){return e instanceof Lg}class $g extends rg{}function zg(e){return e instanceof $g}var Fg=Zu.$addUpdateTag=function(e){Vf(),Kf()._updateTags.add(e)},Ug=Zu.$applyNodeReplacement=jh;Zu.$copyNode=Wh,Zu.$createLineBreakNode=pg;var Hg=Zu.$createNodeSelection=kf,Vg=Zu.$createParagraphNode=Mg,qg=Zu.$createRangeSelection=function(){let e=new sf("root",0,"element"),t=new sf("root",0,"element");return new mf(e,t,0,"")},Kg=Zu.$createTextNode=kg;Zu.$getAdjacentNode=Bh;var Wg=Zu.$getNearestNodeFromDOMNode=Sh;Zu.$getNearestRootOrShadowRoot=qh;var jg=Zu.$getNodeByKey=wh,Yg=Zu.$getPreviousSelection=Of,Gg=Zu.$getRoot=Th,Jg=Zu.$getSelection=Af;Zu.$getTextContent=function(){let e=Af();return null===e?"":e.getTextContent()},Zu.$hasAncestor=Hh;var Xg=Zu.$insertNodes=function(e,t){let n=Af();return null===n&&(n=Th().selectEnd()),n.insertNodes(e,t)};Zu.$isDecoratorNode=ng;var Zg=Zu.$isElementNode=ig;Zu.$isInlineElementOrDecoratorNode=function(e){return ig(e)&&e.isInline()||ng(e)&&e.isInline()},Zu.$isLeafNode=gh,Zu.$isLineBreakNode=fg;var Qg=Zu.$isNodeSelection=yf,em=Zu.$isParagraphNode=function(e){return e instanceof Ag},tm=Zu.$isRangeSelection=pf;Zu.$isRootNode=sg;var nm=Zu.$isRootOrShadowRoot=Kh,rm=Zu.$isTextNode=Ng;Zu.$nodesOfType=function(e){var t=qf();let n=t._readOnly,r=e.getType();t=t._nodeMap;let i=[];for(let[,o]of t)o instanceof e&&o.__type===r&&(n||o.isAttached())&&i.push(o);return i},Zu.$normalizeSelection__EXPERIMENTAL=op,Zu.$parseSerializedNode=function(e){return jf(e,Kf()._nodes)},Zu.$setCompositionKey=bh;var im=Zu.$setSelection=kh;Zu.$splitNode=Zh,Zu.BLUR_COMMAND=Rd;var om=Zu.CAN_REDO_COMMAND={},am=Zu.CAN_UNDO_COMMAND={},sm=Zu.CLEAR_EDITOR_COMMAND={};Zu.CLEAR_HISTORY_COMMAND={};var lm=Zu.CLICK_COMMAND=ed,cm=Zu.COMMAND_PRIORITY_CRITICAL=4,um=Zu.COMMAND_PRIORITY_EDITOR=0,dm=Zu.COMMAND_PRIORITY_HIGH=3,hm=Zu.COMMAND_PRIORITY_LOW=1;Zu.COMMAND_PRIORITY_NORMAL=2,Zu.CONTROLLED_TEXT_INSERTION_COMMAND=id;var pm=Zu.COPY_COMMAND=Ad,fm=Zu.CUT_COMMAND=Od,gm=Zu.DELETE_CHARACTER_COMMAND=td;Zu.DELETE_LINE_COMMAND=ld,Zu.DELETE_WORD_COMMAND=sd,Zu.DEPRECATED_$computeGridMap=Pf,Zu.DEPRECATED_$createGridSelection=function(){let e=new sf("root",0,"element"),t=new sf("root",0,"element");return new ff("root",e,t)},Zu.DEPRECATED_$getNodeTriplet=function(e){if(!(e instanceof Ig))if(e instanceof af){if(!Pg(e=Qh(e,Pg)))throw Error("Expected to find a parent GridCellNode")}else if(!Pg(e=Qh(e.getNode(),Pg)))throw Error("Expected to find a parent GridCellNode");let t=e.getParent();if(!zg(t))throw Error("Expected GridCellNode to have a parent GridRowNode");let n=t.getParent();if(!Bg(n))throw Error("Expected GridRowNode to have a parent GridNode");return[e,t,n]};var mm=Zu.DEPRECATED_$isGridCellNode=Pg;Zu.DEPRECATED_$isGridNode=Bg,Zu.DEPRECATED_$isGridRowNode=zg;var ym=Zu.DEPRECATED_$isGridSelection=gf;Zu.DEPRECATED_GridCellNode=Ig,Zu.DEPRECATED_GridNode=Lg,Zu.DEPRECATED_GridRowNode=$g,Zu.DRAGEND_COMMAND=Nd;var vm=Zu.DRAGOVER_COMMAND=kd,bm=Zu.DRAGSTART_COMMAND=Td,_m=Zu.DROP_COMMAND=Ed,wm=Zu.DecoratorNode=tg,xm=Zu.ElementNode=rg,Sm=Zu.FOCUS_COMMAND=Md,Cm=Zu.FORMAT_ELEMENT_COMMAND={},Em=Zu.FORMAT_TEXT_COMMAND=cd,Tm=Zu.INDENT_CONTENT_COMMAND={};Zu.INSERT_LINE_BREAK_COMMAND=nd;var km=Zu.INSERT_PARAGRAPH_COMMAND=rd,Nm=Zu.KEY_ARROW_DOWN_COMMAND=vd,Am=Zu.KEY_ARROW_LEFT_COMMAND=gd,Om=Zu.KEY_ARROW_RIGHT_COMMAND=pd,Mm=Zu.KEY_ARROW_UP_COMMAND=yd,Rm=Zu.KEY_BACKSPACE_COMMAND=wd,Dm=Zu.KEY_DELETE_COMMAND=Sd;Zu.KEY_DOWN_COMMAND=hd;var Im=Zu.KEY_ENTER_COMMAND=bd,Pm=Zu.KEY_ESCAPE_COMMAND=xd;Zu.KEY_MODIFIER_COMMAND=Dd,Zu.KEY_SPACE_COMMAND=_d;var Lm=Zu.KEY_TAB_COMMAND=Cd;Zu.LineBreakNode=dg,Zu.MOVE_TO_END=fd,Zu.MOVE_TO_START=md;var Bm=Zu.OUTDENT_CONTENT_COMMAND={},$m=Zu.PASTE_COMMAND=od;Zu.ParagraphNode=Ag;var zm=Zu.REDO_COMMAND=dd;Zu.REMOVE_TEXT_COMMAND=ad;var Fm=Zu.RootNode=ag,Um=Zu.SELECTION_CHANGE_COMMAND=Qu,Hm=Zu.TextNode=_g,Vm=Zu.UNDO_COMMAND=ud,qm=Zu.createCommand=function(){return{}},Km=Zu.createEditor=function(e){var t=e||{},n=Bf,r=t.theme||{};let i=void 0===e?n:t.parentEditor||null,o=t.disableEvents||!1,a=lg(),s=t.namespace||(null!==i?i._config.namespace:Mh()),l=t.editorState,c=[ag,_g,dg,Ag,...t.nodes||[]],u=t.onError;if(t=void 0===t.editable||t.editable,void 0===e&&null!==n)e=n._nodes;else for(e=new Map,n=0;n<c.length;n++){let t=c[n],r=null;var d=null;"function"!=typeof t&&(t=(d=t).replace,r=d.with,d=d.withKlass?d.withKlass:null);let i=t.getType(),o=t.transform(),a=new Set;null!==o&&a.add(o),e.set(i,{klass:t,replace:r,replaceWithKlass:d,transforms:a})}return r=new Dg(a,i,e,{disableEvents:o,namespace:s,theme:r},u||console.error,function(e){let t=new Map,n=new Set;return e.forEach((e=>{if(null!=(e=null!=e.klass.importDOM?e.klass.importDOM.bind(e.klass):null)&&!n.has(e)){n.add(e);var r=e();null!==r&&Object.keys(r).forEach((e=>{let n=t.get(e);void 0===n&&(n=[],t.set(e,n)),n.push(r[e])}))}})),t}(e),t),void 0!==l&&(r._pendingEditorState=l,r._dirtyType=2),r};Zu.getNearestEditorFromDOMNode=dh,Zu.isSelectionWithinEditor=uh;var Wm=Zu;let jm=new Map;function Ym(e){for(;null!=e;){if(e.nodeType===Node.TEXT_NODE)return e;e=e.firstChild}return null}function Gm(e){let t=e.parentNode;if(null==t)throw Error("Should never happen");return[t,Array.from(t.childNodes).indexOf(e)]}function Jm(e){let t={};e=e.split(";");for(let n of e)if(""!==n){let[e,r]=n.split(/:([^]+)/);t[e.trim()]=r.trim()}return t}function Xm(e){let t=jm.get(e);return void 0===t&&(t=Jm(e),jm.set(e,t)),t}function Zm(e,t){var n=Xm("getStyle"in e?e.getStyle():e.style);n=function(e){let t="";for(let n in e)n&&(t+=`${n}: ${e[n]};`);return t}(t=Object.entries(t).reduce(((e,[t,n])=>(null===n?delete e[t]:e[t]=n,e)),{...n})),e.setStyle(n),jm.set(n,t)}function Qm(e){for(;null!==e&&!Wm.$isRootOrShadowRoot(e);){let t=e.getLatest(),n=e.getParent();0===t.getChildrenSize()&&e.remove(!0),e=n}}function ey(e,t,n,r,i=null){if(0!==t.length){var o=t[0],a=new Map,s=[];(o=Wm.$isElementNode(o)?o:o.getParentOrThrow()).isInline()&&(o=o.getParentOrThrow());for(var l=!1;null!==o;){var c=o.getPreviousSibling();if(null!==c){o=c,l=!0;break}if(o=o.getParentOrThrow(),Wm.$isRootOrShadowRoot(o))break}c=new Set;for(var u=0;u<n;u++){var d=t[u];Wm.$isElementNode(d)&&0===d.getChildrenSize()&&c.add(d.getKey())}var h=new Set;for(u=0;u<n;u++){var p=(d=t[u]).getParent();if(null!==p&&p.isInline()&&(p=p.getParent()),null!==p&&Wm.$isLeafNode(d)&&!h.has(d.getKey())){if(d=p.getKey(),void 0===a.get(d)){let e=r();e.setFormat(p.getFormatType()),e.setIndent(p.getIndent()),s.push(e),a.set(d,e),p.getChildren().forEach((t=>{e.append(t),h.add(t.getKey()),Wm.$isElementNode(t)&&t.getChildrenKeys().forEach((e=>h.add(e)))})),Qm(p)}}else c.has(d.getKey())&&((p=r()).setFormat(d.getFormatType()),p.setIndent(d.getIndent()),s.push(p),d.remove(!0))}if(null!==i)for(t=0;t<s.length;t++)i.append(s[t]);if(t=null,Wm.$isRootOrShadowRoot(o))if(l)if(null!==i)o.insertAfter(i);else for(i=s.length-1;0<=i;i--)o.insertAfter(s[i]);else if(l=o.getFirstChild(),Wm.$isElementNode(l)&&(o=l),null===l)if(i)o.append(i);else for(i=0;i<s.length;i++)l=s[i],o.append(l),t=l;else if(null!==i)l.insertBefore(i);else for(o=0;o<s.length;o++)i=s[o],l.insertBefore(i),t=i;else if(i)o.insertAfter(i);else for(i=s.length-1;0<=i;i--)l=s[i],o.insertAfter(l),t=l;s=Wm.$getPreviousSelection(),Wm.$isRangeSelection(s)&&s.anchor.getNode().isAttached()&&s.focus.getNode().isAttached()?Wm.$setSelection(s.clone()):null!==t?t.selectEnd():e.dirty=!0}}function ty(e,t,n,r){e.modify(t?"extend":"move",n,r)}function ny(e){return e=e.anchor.getNode(),"rtl"===(Wm.$isRootNode(e)?e:e.getParentOrThrow()).getDirection()}Xu.$addNodeStyle=function(e){let t=Jm(e=e.getStyle());jm.set(e,t)},Xu.$cloneWithProperties=function(e){let t=(e=e.getLatest()).constructor.clone(e);return t.__parent=e.__parent,t.__next=e.__next,t.__prev=e.__prev,Wm.$isElementNode(e)&&Wm.$isElementNode(t)?(t.__first=e.__first,t.__last=e.__last,t.__size=e.__size,t.__format=e.__format,t.__indent=e.__indent,t.__dir=e.__dir,t):(Wm.$isTextNode(e)&&Wm.$isTextNode(t)&&(t.__format=e.__format,t.__style=e.__style,t.__mode=e.__mode,t.__detail=e.__detail),t)};var ry=Xu.$getSelectionStyleValueForProperty=function(e,t,n=""){let r=null,i=e.getNodes();var o=e.anchor,a=e.focus,s=e.isBackward();let l=s?a.offset:o.offset;if(o=s?a.getNode():o.getNode(),""!==e.style&&(null!==(e=Xm(e.style))&&t in e))return e[t];for(e=0;e<i.length;e++){var c=i[e];if((0===e||0!==l||!c.is(o))&&Wm.$isTextNode(c))if(a=t,s=n,a=null!==(c=Xm(c=c.getStyle()))&&c[a]||s,null===r)r=a;else if(r!==a){r="";break}}return null===r?n:r},iy=Xu.$isAtNodeEnd=function(e){return"text"===e.type?e.offset===e.getNode().getTextContentSize():e.offset===e.getNode().getChildrenSize()},oy=Xu.$isParentElementRTL=ny;Xu.$moveCaretSelection=ty,Xu.$moveCharacter=function(e,t,n){let r=ny(e);ty(e,t,n?!r:r,"character")};var ay=Xu.$patchStyleText=function(e,t){var n=e.getNodes();let r=n.length-1,i=n[0],o=n[r];if(e.isCollapsed())Zm(e,t);else{var a=e.anchor,s=e.focus,l=i.getTextContent().length,c=s.offset,u=a.offset,d=a.isBefore(s),h=d?u:c;e=d?c:u;var p=d?a.type:s.type,f=d?s.type:a.type;if(a=d?s.key:a.key,Wm.$isTextNode(i)&&h===l&&(s=i.getNextSibling(),Wm.$isTextNode(s)&&(h=u=0,i=s)),1===n.length)Wm.$isTextNode(i)&&((h="element"===p?0:u>c?c:u)!==(e="element"===f?l:u>c?u:c)&&(0===h&&e===l?(Zm(i,t),i.select(h,e)):(n=i.splitText(h,e),Zm(n=0===h?n[0]:n[1],t),n.select(0,e-h))));else for(Wm.$isTextNode(i)&&h<i.getTextContentSize()&&(0!==h&&(i=i.splitText(h)[1]),Zm(i,t)),Wm.$isTextNode(o)&&(h=o.getTextContent().length,o.__key!==a&&0!==e&&(e=h),e!==h&&([o]=o.splitText(e)),0!==e&&Zm(o,t)),e=1;e<r;e++)l=(h=n[e]).getKey(),Wm.$isTextNode(h)&&l!==i.getKey()&&l!==o.getKey()&&!h.isToken()&&Zm(h,t)}},sy=Xu.$selectAll=function(e){let t=e.anchor;e=e.focus;var n=t.getNode().getTopLevelElementOrThrow().getParentOrThrow();let r=n.getFirstDescendant();n=n.getLastDescendant();let i="element",o="element",a=0;Wm.$isTextNode(r)?i="text":Wm.$isElementNode(r)||null===r||(r=r.getParentOrThrow()),Wm.$isTextNode(n)?(o="text",a=n.getTextContentSize()):Wm.$isElementNode(n)||null===n||(n=n.getParentOrThrow()),r&&n&&(t.set(r.getKey(),0,i),e.set(n.getKey(),a,o))},ly=Xu.$setBlocksType=function(e,t){if("root"===e.anchor.key){t=t();var n=Wm.$getRoot();(e=n.getFirstChild())?e.replace(t,!0):n.append(t)}else for(n=e.getNodes(),e=e.anchor.getNode().getParentOrThrow(),-1===n.indexOf(e)&&n.push(e),e.isInline()&&(e=e.getParentOrThrow(),-1===n.indexOf(e)&&n.push(e)),e=0;e<n.length;e++){let o=n[e];var r=o;if(!Wm.$isElementNode(r)||Wm.$isRootOrShadowRoot(r))r=!1;else{var i=r.getFirstChild();i=null===i||Wm.$isTextNode(i)||i.isInline(),r=!r.isInline()&&!1!==r.canBeEmpty()&&i}r&&((r=t()).setFormat(o.getFormatType()),r.setIndent(o.getIndent()),o.replace(r,!0))}};Xu.$shouldOverrideDefaultCharacterSelection=function(e,t){return e=Wm.$getAdjacentNode(e.focus,t),Wm.$isDecoratorNode(e)&&!e.isIsolated()||Wm.$isElementNode(e)&&!e.isInline()&&!e.canBeEmpty()},Xu.$sliceSelectedTextNodeContent=function(e,t){if(t.isSelected()&&!t.isSegmented()&&!t.isToken()&&(Wm.$isRangeSelection(e)||Wm.DEPRECATED_$isGridSelection(e))){var n=e.anchor.getNode(),r=e.focus.getNode(),i=t.is(n),o=t.is(r);if(i||o){i=e.isBackward();let a,[s,l]=e.getCharacterOffsets();e=n.is(r),o=t.is(i?r:n),r=t.is(i?n:r),n=0,e?(n=s>l?l:s,a=s>l?s:l):o?(n=i?l:s,a=void 0):r&&(n=0,a=i=i?s:l),t.__text=t.__text.slice(n,a)}}return t},Xu.$wrapNodes=function(e,t,n=null){var r=e.getNodes();let i=r.length;var o=e.anchor;if(0===i||1===i&&"element"===o.type&&0===o.getNode().getChildrenSize()){r=(e="text"===o.type?o.getNode().getParentOrThrow():o.getNode()).getChildren();let i=t();i.setFormat(e.getFormatType()),i.setIndent(e.getIndent()),r.forEach((e=>i.append(e))),n&&(i=n.append(i)),e.replace(i)}else{o=null;var a=[];for(let s=0;s<i;s++){let i=r[s];Wm.$isRootOrShadowRoot(i)?(ey(e,a,a.length,t,n),a=[],o=i):null===o||null!==o&&Wm.$hasAncestor(i,o)?a.push(i):(ey(e,a,a.length,t,n),a=[i])}ey(e,a,a.length,t,n)}},Xu.createDOMRange=function(e,t,n,r,i){let o=t.getKey(),a=r.getKey(),s=document.createRange(),l=e.getElementByKey(o);if(e=e.getElementByKey(a),Wm.$isTextNode(t)&&(l=Ym(l)),Wm.$isTextNode(r)&&(e=Ym(e)),void 0===t||void 0===r||null===l||null===e)return null;"BR"===l.nodeName&&([l,n]=Gm(l)),"BR"===e.nodeName&&([e,i]=Gm(e)),t=l.firstChild,l===e&&null!=t&&"BR"===t.nodeName&&0===n&&0===i&&(i=1);try{s.setStart(l,n),s.setEnd(e,i)}catch(c){return null}return!s.collapsed||n===i&&o===a||(s.setStart(e,i),s.setEnd(l,n)),s},Xu.createRectsFromDOMRange=function(e,t){var n=e.getRootElement();if(null===n)return[];e=n.getBoundingClientRect(),n=getComputedStyle(n),n=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight);let r,i=(t=Array.from(t.getClientRects())).length;for(let o=0;o<i;o++){let a=t[o],s=a.width+n===e.width;r&&r.top===a.top&&r.left===a.left&&r.width===a.width&&r.height===a.height||s?(t.splice(o--,1),i--):r=a}return t},Xu.getStyleObjectFromCSS=Xm;var cy=Xu.trimTextContentFromAnchor=function(e,t,n){let r=t.getNode();if(Wm.$isElementNode(r)){var i=r.getDescendantByIndex(t.offset);null!==i&&(r=i)}for(;0<n&&null!==r;){var o=r.getPreviousSibling(),a=0;if(null===o){for(var s=(i=r.getParentOrThrow()).getPreviousSibling();null===s;){if(null===(i=i.getParent())){o=null;break}s=i.getPreviousSibling()}null!==i&&(a=i.isInline()?0:2,o=Wm.$isElementNode(s)?s.getLastDescendant():s)}if(""===(s=r.getTextContent())&&Wm.$isElementNode(r)&&!r.isInline()&&(s="\n\n"),i=r.getTextContentSize(),!Wm.$isTextNode(r)||n>=i)s=r.getParent(),r.remove(),null==s||0!==s.getChildrenSize()||Wm.$isRootNode(s)||s.remove(),n-=i+a,r=o;else{let l=r.getKey();a=e.getEditorState().read((()=>{const e=Wm.$getNodeByKey(l);return Wm.$isTextNode(e)&&e.isSimpleText()?e.getTextContent():null})),o=i-n;let c=s.slice(0,o);null!==a&&a!==s?(n=Wm.$getPreviousSelection(),i=r,r.isSimpleText()?r.setTextContent(a):(i=Wm.$createTextNode(a),r.replace(i)),Wm.$isRangeSelection(n)&&n.isCollapsed()&&(n=n.anchor.offset,i.select(n,n))):r.isSimpleText()?(a=t.key===l,(s=t.offset)<n&&(s=i),n=a?s-n:0,i=a?s:o,a&&0===n?([n]=r.splitText(n,i),n.remove()):([,n]=r.splitText(n,i),n.remove())):(n=Wm.$createTextNode(c),r.replace(n)),n=0}}},uy=Xu,dy=Zu;function hy(e,t){for(let n of t)if(e.type.startsWith(n))return!0;return!1}function py(e,t){for(;e!==dy.$getRoot()&&null!=e;){if(t(e))return e;e=e.getParent()}return null}function fy(e){return 1===e.nodeType}Ju.$splitNode=dy.$splitNode,Ju.$dfs=function(e,t){let n=[];e=(e||dy.$getRoot()).getLatest(),t=t||(dy.$isElementNode(e)?e.getLastDescendant():e);for(var r=e,i=0;null!==(r=r.getParent());)i++;for(r=i;null!==e&&!e.is(t);)if(n.push({depth:r,node:e}),dy.$isElementNode(e)&&0<e.getChildrenSize())e=e.getFirstChild(),r++;else for(i=null;null===i&&null!==e;)null===(i=e.getNextSibling())?(e=e.getParent(),r--):e=i;return null!==e&&e.is(t)&&n.push({depth:r,node:e}),n};var gy=Ju.$findMatchingParent=py,my=Ju.$getNearestBlockElementAncestorOrThrow=function(e){if(e=py(e,(e=>dy.$isElementNode(e)&&!e.isInline())),!dy.$isElementNode(e))throw Error("Minified Lexical error #4; visit https://lexical.dev/docs/error?code=4 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");return e},yy=Ju.$getNearestNodeOfType=function(e,t){for(;null!=e;){if(e instanceof t)return e;e=e.getParent()}return null},vy=Ju.$insertNodeToNearestRoot=function(e){var t=dy.$getSelection();if(dy.$isRangeSelection(t)){var{focus:n}=t;if(t=n.getNode(),n=n.offset,dy.$isRootOrShadowRoot(t))null==(n=t.getChildAtIndex(n))?t.append(e):n.insertBefore(e),e.selectNext();else{let r,i;dy.$isTextNode(t)?(r=t.getParentOrThrow(),i=t.getIndexWithinParent(),0<n&&(i+=1,t.splitText(n))):(r=t,i=n),[,t]=dy.$splitNode(r,i),t.insertBefore(e),t.selectStart()}}else dy.$isNodeSelection(t)||dy.DEPRECATED_$isGridSelection(t)?(t=t.getNodes())[t.length-1].getTopLevelElementOrThrow().insertAfter(e):dy.$getRoot().append(e),t=dy.$createParagraphNode(),e.insertAfter(t),t.select();return e.getLatest()},by=Ju.$restoreEditorState=function(e,t){let n=new Map,r=e._pendingEditorState;for(let[i,o]of t._nodeMap){let e=uy.$cloneWithProperties(o);dy.$isTextNode(e)&&(e.__text=o.__text),n.set(i,e)}r&&(r._nodeMap=n),e._dirtyType=2,e=t._selection,dy.$setSelection(null===e?null:e.clone())},_y=Ju.$wrapNodeInElement=function(e,t){return t=t(),e.replace(t),t.append(e),t};Ju.addClassNamesToElement=function(e,...t){t.forEach((t=>{"string"==typeof t&&(t=t.split(" ").filter((e=>""!==e)),e.classList.add(...t))}))},Ju.isHTMLAnchorElement=function(e){return fy(e)&&"A"===e.tagName},Ju.isHTMLElement=fy;var wy=Ju.isMimeType=hy,xy=Ju.mediaFileReader=function(e,t){let n=e[Symbol.iterator]();return new Promise(((e,r)=>{let i=[],o=()=>{const{done:a,value:s}=n.next();if(a)return e(i);const l=new FileReader;l.addEventListener("error",r),l.addEventListener("load",(()=>{const e=l.result;"string"==typeof e&&i.push({file:s,result:e}),o()})),hy(s,t)?l.readAsDataURL(s):o()};o()}))},Sy=Ju.mergeRegister=function(...e){return()=>{e.forEach((e=>e()))}};Ju.registerNestedElementResolver=function(e,t,n,r){return e.registerNodeTransform(t,(e=>{e:{for(var i=e.getChildren(),o=0;o<i.length;o++)if(i[o]instanceof t){i=null;break e}for(i=e;null!==i;)if(o=i,(i=i.getParent())instanceof t){i={child:o,parent:i};break e}i=null}if(null!==i){const{child:t,parent:a}=i;if(t.is(e)){if(r(a,e),i=(e=t.getNextSiblings()).length,a.insertAfter(t),0!==i){o=n(a),t.insertAfter(o);for(let t=0;t<i;t++)o.append(e[t])}a.canBeEmpty()||0!==a.getChildrenSize()||a.remove()}}}))},Ju.removeClassNamesFromElement=function(e,...t){t.forEach((t=>{"string"==typeof t&&e.classList.remove(...t.split(" "))}))};var Cy=Ju,Ey=Zu;class Ty extends Ey.ElementNode{static getType(){return"link"}static clone(e){return new Ty(e.__url,{rel:e.__rel,target:e.__target},e.__key)}constructor(e,t={},n){super(n);let{target:r=null,rel:i=null}=t;this.__url=e,this.__target=r,this.__rel=i}createDOM(e){let t=document.createElement("a");return t.href=this.__url,null!==this.__target&&(t.target=this.__target),null!==this.__rel&&(t.rel=this.__rel),Cy.addClassNamesToElement(t,e.theme.link),t}updateDOM(e,t){let n=this.__url,r=this.__target,i=this.__rel;return n!==e.__url&&(t.href=n),r!==e.__target&&(r?t.target=r:t.removeAttribute("target")),i!==e.__rel&&(i?t.rel=i:t.removeAttribute("rel")),!1}static importDOM(){return{a:()=>({conversion:ky,priority:1})}}static importJSON(e){let t=Ny(e.url,{rel:e.rel,target:e.target});return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(e){this.getWritable().__url=e}getTarget(){return this.getLatest().__target}setTarget(e){this.getWritable().__target=e}getRel(){return this.getLatest().__rel}setRel(e){this.getWritable().__rel=e}insertNewAfter(e,t=!0){return e=this.getParentOrThrow().insertNewAfter(e,t),Ey.$isElementNode(e)?(t=Ny(this.__url,{rel:this.__rel,target:this.__target}),e.append(t),t):null}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,t){if(!Ey.$isRangeSelection(t))return!1;e=t.anchor.getNode();let n=t.focus.getNode();return this.isParentOf(e)&&this.isParentOf(n)&&0<t.getTextContent().length}}function ky(e){let t=null;if(Cy.isHTMLAnchorElement(e)){let n=e.textContent;null!==n&&""!==n&&(t=Ny(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target")}))}return{node:t}}function Ny(e,t){return Ey.$applyNodeReplacement(new Ty(e,t))}function Ay(e){return e instanceof Ty}class Oy extends Ty{static getType(){return"autolink"}static clone(e){return new Oy(e.__url,{rel:e.__rel,target:e.__target},e.__key)}static importJSON(e){let t=My(e.url,{rel:e.rel,target:e.target});return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),type:"autolink",version:1}}insertNewAfter(e,t=!0){return e=this.getParentOrThrow().insertNewAfter(e,t),Ey.$isElementNode(e)?(t=My(this.__url,{rel:this._rel,target:this.__target}),e.append(t),t):null}}function My(e,t){return Ey.$applyNodeReplacement(new Oy(e,t))}let Ry=Ey.createCommand("TOGGLE_LINK_COMMAND");Gu.$createAutoLinkNode=My;var Dy=Gu.$createLinkNode=Ny,Iy=Gu.$isAutoLinkNode=function(e){return e instanceof Oy},Py=Gu.$isLinkNode=Ay,Ly=Gu.AutoLinkNode=Oy,By=Gu.LinkNode=Ty,$y=Gu.TOGGLE_LINK_COMMAND=Ry;Gu.toggleLink=function(e,t={}){let{target:n}=t,r=void 0===t.rel?"noopener":t.rel;if(t=Ey.$getSelection(),Ey.$isRangeSelection(t))if(t=t.extract(),null===e)t.forEach((e=>{if(Ay(e=e.getParent())){let t=e.getChildren();for(let n=0;n<t.length;n++)e.insertBefore(t[n]);e.remove()}}));else{if(1===t.length){var i=t[0];if(i=Ay(i)?i:function(e){return function(e,t){for(;null!==e&&null!==(e=e.getParent())&&!t(e););return e}(e,(e=>Ay(e)))}(i),null!==i)return i.setURL(e),void 0!==n&&i.setTarget(n),void(null!==r&&i.setRel(r))}let o=null,a=null;t.forEach((t=>{var i=t.getParent();if(i!==a&&null!==i&&(!Ey.$isElementNode(t)||t.isInline()))if(Ay(i))a=i,i.setURL(e),void 0!==n&&i.setTarget(n),null!==r&&a.setRel(r);else if(i.is(o)||(o=i,a=Ny(e,{rel:r,target:n}),Ay(i)?null===t.getPreviousSibling()?i.insertBefore(a):i.insertAfter(a):t.insertBefore(a)),Ay(t)){if(!t.is(a)){if(null!==a){i=t.getChildren();for(let e=0;e<i.length;e++)a.append(i[e])}t.remove()}}else null!==a&&a.append(t)}))}};var zy={},Fy=Zu,Uy=Ju;function Hy(e){throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?code=${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Vy(e){let t=1;for(e=e.getParent();null!=e;){if(ov(e)){if(hv(e=e.getParent())){t++,e=e.getParent();continue}Hy(40)}break}return t}function qy(e){hv(e=e.getParent())||Hy(40);let t=e;for(;null!==t;)t=t.getParent(),hv(t)&&(e=t);return e}function Ky(e){let t=[];e=e.getChildren().filter(ov);for(let n=0;n<e.length;n++){let r=e[n],i=r.getFirstChild();hv(i)?t=t.concat(Ky(i)):t.push(r)}return t}function Wy(e){return ov(e)&&hv(e.getFirstChild())}function jy(e){return iv().append(e)}function Yy(e,t){return ov(e)&&(0===t.length||1===t.length&&e.is(t[0])&&0===e.getChildrenSize())}function Gy(e,t){e.splice(e.getChildrenSize(),0,t)}function Jy(e,t){if(hv(e))return e;let n=e.getPreviousSibling(),r=e.getNextSibling(),i=iv();return i.setFormat(e.getFormatType()),i.setIndent(e.getIndent()),Gy(i,e.getChildren()),hv(n)&&t===n.getListType()?(n.append(i),e.remove(),hv(r)&&t===r.getListType()&&(Gy(n,r.getChildren()),r.remove()),n):hv(r)&&t===r.getListType()?(r.getFirstChildOrThrow().insertBefore(i),e.remove(),r):((t=dv(t)).append(i),e.replace(t),Zy(t),t)}function Xy(e,t){var n=e.getLastChild();let r=t.getFirstChild();n&&r&&Wy(n)&&Wy(r)&&(Xy(n.getFirstChild(),r.getFirstChild()),r.remove()),0<(n=t.getChildren()).length&&(e.append(...n),Zy(e)),t.remove()}function Zy(e,t){if(void 0!==(e=t||e.getChildren()))for(t=0;t<e.length;t++){let o=e[t];if(ov(o)){let e=o.getValue();var n=o,r=n.getParent(),i=1;for(null!=r&&(hv(r)?i=r.getStart():Hy(44)),n=n.getPreviousSiblings(),r=0;r<n.length;r++){let e=n[r];ov(e)&&!hv(e.getFirstChild())&&i++}e!==i&&o.setValue(i)}}}function Qy(e){if(!Wy(e)){var t=e.getParent(),n=t?t.getParent():void 0,r=n?n.getParent():void 0;if(hv(r)&&ov(n)&&hv(t)){var i=t?t.getFirstChild():void 0,o=t?t.getLastChild():void 0;if(e.is(i))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(o))n.insertAfter(e),t.isEmpty()&&n.remove();else{var a=t.getListType();i=iv();let r=dv(a);i.append(r),e.getPreviousSiblings().forEach((e=>r.append(e))),o=iv(),a=dv(a),o.append(a),Gy(a,e.getNextSiblings()),n.insertBefore(i),n.insertAfter(o),n.replace(e)}Zy(t),Zy(r)}}}class ev extends Fy.ElementNode{static getType(){return"listitem"}static clone(e){return new ev(e.__value,e.__checked,e.__key)}constructor(e,t,n){super(n),this.__value=void 0===e?1:e,this.__checked=t}createDOM(e){let t=document.createElement("li"),n=this.getParent();return hv(n)&&"check"===n.getListType()&&nv(t,this,null),t.value=this.__value,tv(t,e.theme,this),t}updateDOM(e,t,n){let r=this.getParent();return hv(r)&&"check"===r.getListType()&&nv(t,this,e),t.value=this.__value,tv(t,n.theme,this),!1}static transform(){return e=>{let t=e.getParent();hv(t)&&(Zy(t),"check"!==t.getListType()&&null!=e.getChecked()&&e.setChecked(void 0))}}static importDOM(){return{li:()=>({conversion:rv,priority:0})}}static importJSON(e){let t=new ev(e.value,e.checked);return t.setFormat(e.format),t.getWritable().__indent=e.indent,t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...e){for(let t=0;t<e.length;t++){let n=e[t];if(Fy.$isElementNode(n)&&this.canMergeWith(n)){let e=n.getChildren();this.append(...e),n.remove()}else super.append(n)}return this}replace(e,t){if(ov(e))return super.replace(e);this.setIndent(0);let n=this.getParentOrThrow();if(!hv(n))return e;if(n.__first===this.getKey())n.insertBefore(e);else if(n.__last===this.getKey())n.insertAfter(e);else{let t=dv(n.getListType()),r=this.getNextSibling();for(;r;){let e=r;r=r.getNextSibling(),t.append(e)}n.insertAfter(e),e.insertAfter(t)}return t&&this.getChildren().forEach((t=>{e.append(t)})),this.remove(),0===n.getChildrenSize()&&n.remove(),e}insertAfter(e,t=!0){var n=this.getParentOrThrow();hv(n)||Hy(39);var r=this.getNextSiblings();if(ov(e))return t=super.insertAfter(e,t),hv(e=e.getParentOrThrow())&&Zy(e),t;if(hv(e)&&e.getListType()===n.getListType()){for(n=e,r=(e=e.getChildren()).length-1;0<=r;r--)n=e[r],this.insertAfter(n,t);return n}if(n.insertAfter(e,t),0!==r.length){let i=dv(n.getListType());r.forEach((e=>i.append(e))),e.insertAfter(i,t)}return e}remove(e){let t=this.getPreviousSibling(),n=this.getNextSibling();super.remove(e),t&&n&&Wy(t)&&Wy(n)?(Xy(t.getFirstChild(),n.getFirstChild()),n.remove()):n&&(hv(e=n.getParent())&&Zy(e))}insertNewAfter(e,t=!0){return e=iv(null==this.__checked&&void 0),this.insertAfter(e,t),e}collapseAtStart(e){let t=Fy.$createParagraphNode();this.getChildren().forEach((e=>t.append(e)));var n=this.getParentOrThrow(),r=n.getParentOrThrow();let i=ov(r);return 1===n.getChildrenSize()?i?(n.remove(),r.select()):(n.insertBefore(t),n.remove(),n=e.anchor,e=e.focus,r=t.getKey(),"element"===n.type&&n.getNode().is(this)&&n.set(r,n.offset,"element"),"element"===e.type&&e.getNode().is(this)&&e.set(r,e.offset,"element")):(n.insertBefore(t),this.remove()),!0}getValue(){return this.getLatest().__value}setValue(e){this.getWritable().__value=e}getChecked(){return this.getLatest().__checked}setChecked(e){this.getWritable().__checked=e}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){var e=this.getParent();if(null===e)return this.getLatest().__indent;e=e.getParentOrThrow();let t=0;for(;ov(e);)e=e.getParentOrThrow().getParentOrThrow(),t++;return t}setIndent(e){if(!("number"==typeof e&&-1<e))throw Error("Invalid indent value.");let t=this.getIndent();for(;t!==e;)if(t<e){e:{var n=new Set;if(Wy(this)||n.has(this.getKey()))break e;let e=this.getParent();var r=this.getNextSibling(),i=this.getPreviousSibling();if(Wy(r)&&Wy(i)){if(hv(i=i.getFirstChild())){i.append(this);var o=r.getFirstChild();hv(o)&&(Gy(i,o=o.getChildren()),r.remove(),n.add(r.getKey())),Zy(i)}}else Wy(r)?hv(r=r.getFirstChild())&&(null!==(n=r.getFirstChild())&&n.insertBefore(this),Zy(r)):Wy(i)?hv(r=i.getFirstChild())&&(r.append(this),Zy(r)):hv(e)&&(n=iv(),o=dv(e.getListType()),n.append(o),o.append(this),i?i.insertAfter(n):r?r.insertBefore(n):e.append(n),Zy(o));hv(e)&&Zy(e)}t++}else Qy(this),t--;return this}insertBefore(e){if(ov(e)){let e=this.getParentOrThrow();if(hv(e)){Zy(e,this.getNextSiblings())}}return super.insertBefore(e)}canInsertAfter(e){return ov(e)}canReplaceWith(e){return ov(e)}canMergeWith(e){return Fy.$isParagraphNode(e)||ov(e)}extractWithChild(e,t){if(!Fy.$isRangeSelection(t))return!1;e=t.anchor.getNode();let n=t.focus.getNode();return this.isParentOf(e)&&this.isParentOf(n)&&this.getTextContent().length===t.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return dv("bullet")}}function tv(e,t,n){let r=[],i=[];var o=(t=t.list)?t.listitem:void 0;if(t&&t.nested)var a=t.nested.listitem;if(void 0!==o&&(o=o.split(" "),r.push(...o)),t){o=hv(o=n.getParent())&&"check"===o.getListType();let e=n.getChecked();o&&!e||i.push(t.listitemUnchecked),o&&e||i.push(t.listitemChecked),o&&r.push(e?t.listitemChecked:t.listitemUnchecked)}void 0!==a&&(a=a.split(" "),n.getChildren().some((e=>hv(e)))?r.push(...a):i.push(...a)),0<i.length&&Uy.removeClassNamesFromElement(e,...i),0<r.length&&Uy.addClassNamesToElement(e,...r)}function nv(e,t,n){hv(t.getFirstChild())?(e.removeAttribute("role"),e.removeAttribute("tabIndex"),e.removeAttribute("aria-checked")):(e.setAttribute("role","checkbox"),e.setAttribute("tabIndex","-1"),n&&t.__checked===n.__checked||e.setAttribute("aria-checked",t.getChecked()?"true":"false"))}function rv(e){return{node:iv(e=Uy.isHTMLElement(e)&&"true"===e.getAttribute("aria-checked"))}}function iv(e){return Fy.$applyNodeReplacement(new ev(void 0,e))}function ov(e){return e instanceof ev}class av extends Fy.ElementNode{static getType(){return"list"}static clone(e){return new av(e.__listType||uv[e.__tag],e.__start,e.__key)}constructor(e,t,n){super(n),this.__listType=e=uv[e]||e,this.__tag="number"===e?"ol":"ul",this.__start=t}getTag(){return this.__tag}getListType(){return this.__listType}getStart(){return this.__start}createDOM(e){let t=document.createElement(this.__tag);return 1!==this.__start&&t.setAttribute("start",String(this.__start)),t.__lexicalListType=this.__listType,sv(t,e.theme,this),t}updateDOM(e,t,n){return e.__tag!==this.__tag||(sv(t,n.theme,this),!1)}static importDOM(){return{ol:()=>({conversion:cv,priority:0}),ul:()=>({conversion:cv,priority:0})}}static importJSON(e){let t=dv(e.listType,e.start);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportDOM(e){return({element:e}=super.exportDOM(e)),e&&(1!==this.__start&&e.setAttribute("start",String(this.__start)),"check"===this.__listType&&e.setAttribute("__lexicalListType","check")),{element:e}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...e){for(let n=0;n<e.length;n++){var t=e[n];if(ov(t))super.append(t);else{let e=iv();hv(t)?e.append(t):Fy.$isElementNode(t)?(t=Fy.$createTextNode(t.getTextContent()),e.append(t)):e.append(t),super.append(e)}}return Zy(this),this}extractWithChild(e){return ov(e)}}function sv(e,t,n){let r=[],i=[];var o=t.list;if(void 0!==o){let e=o[`${n.__tag}Depth`]||[],s=(t=Vy(n)-1)%e.length;var a=e[s];let l,c=o[n.__tag];if(void 0!==(o=o.nested)&&o.list&&(l=o.list),void 0!==c&&r.push(c),void 0!==a)for(a=a.split(" "),r.push(...a),a=0;a<e.length;a++)a!==s&&i.push(n.__tag+a);void 0!==l&&(n=l.split(" "),1<t?r.push(...n):i.push(...n))}0<i.length&&Uy.removeClassNamesFromElement(e,...i),0<r.length&&Uy.addClassNamesToElement(e,...r)}function lv(e){let t=[];for(let r=0;r<e.length;r++){var n=e[r];ov(n)?(t.push(n),1<(n=n.getChildren()).length&&n.forEach((e=>{hv(e)&&t.push(jy(e))}))):t.push(jy(n))}return t}function cv(e){let t=e.nodeName.toLowerCase(),n=null;return"ol"===t?n=dv("number",e.start):"ul"===t&&(n=Uy.isHTMLElement(e)&&"check"===e.getAttribute("__lexicallisttype")?dv("check"):dv("bullet")),{after:lv,node:n}}let uv={ol:"number",ul:"bullet"};function dv(e,t=1){return Fy.$applyNodeReplacement(new av(e,t))}function hv(e){return e instanceof av}let pv=Fy.createCommand("INSERT_UNORDERED_LIST_COMMAND"),fv=Fy.createCommand("INSERT_ORDERED_LIST_COMMAND"),gv=Fy.createCommand("INSERT_CHECK_LIST_COMMAND"),mv=Fy.createCommand("REMOVE_LIST_COMMAND");var yv=zy.$createListItemNode=iv,vv=zy.$createListNode=dv,bv=zy.$getListDepth=Vy;zy.$handleListInsertParagraph=function(){var e=Fy.$getSelection();if(!Fy.$isRangeSelection(e)||!e.isCollapsed())return!1;if(!ov(e=e.anchor.getNode())||""!==e.getTextContent())return!1;var t=qy(e),n=e.getParent();hv(n)||Hy(40);let r,i=n.getParent();if(Fy.$isRootOrShadowRoot(i))r=Fy.$createParagraphNode(),t.insertAfter(r);else{if(!ov(i))return!1;r=iv(),i.insertAfter(r)}if(r.select(),0<(t=e.getNextSiblings()).length){let e=dv(n.getListType());Fy.$isParagraphNode(r)?r.insertAfter(e):((n=iv()).append(e),r.insertAfter(n)),t.forEach((t=>{t.remove(),e.append(t)}))}return function(e){for(;null==e.getNextSibling()&&null==e.getPreviousSibling();){let t=e.getParent();if(null==t||!ov(e)&&!hv(e))break;e=t}e.remove()}(e),!0};var _v=zy.$isListItemNode=ov,wv=zy.$isListNode=hv,xv=zy.INSERT_CHECK_LIST_COMMAND=gv,Sv=zy.INSERT_ORDERED_LIST_COMMAND=fv,Cv=zy.INSERT_UNORDERED_LIST_COMMAND=pv,Ev=zy.ListItemNode=ev,Tv=zy.ListNode=av,kv=zy.REMOVE_LIST_COMMAND=mv;zy.insertList=function(e,t){e.update((()=>{var e=Fy.$getSelection();if(Fy.$isRangeSelection(e)||Fy.DEPRECATED_$isGridSelection(e)){var n=e.getNodes(),r=(e=e.anchor.getNode()).getParent();if(Yy(e,n))n=dv(t),Fy.$isRootOrShadowRoot(r)?(e.replace(n),r=iv(),Fy.$isElementNode(e)&&(r.setFormat(e.getFormatType()),r.setIndent(e.getIndent())),n.append(r)):ov(e)&&(Gy(n,(e=e.getParentOrThrow()).getChildren()),e.replace(n));else for(e=new Set,r=0;r<n.length;r++){var i=n[r];if(Fy.$isElementNode(i)&&i.isEmpty()&&!e.has(i.getKey()))Jy(i,t);else if(Fy.$isLeafNode(i))for(i=i.getParent();null!=i;){let n=i.getKey();if(hv(i)){if(!e.has(n)){var o=dv(t);Gy(o,i.getChildren()),i.replace(o),Zy(o),e.add(n)}break}if(o=i.getParent(),Fy.$isRootOrShadowRoot(o)&&!e.has(n)){e.add(n),Jy(i,t);break}i=o}}}}))},zy.removeList=function(e){e.update((()=>{let e=Fy.$getSelection();if(Fy.$isRangeSelection(e)){var t=new Set,n=e.getNodes(),r=e.anchor.getNode();if(Yy(r,n))t.add(qy(r));else for(r=0;r<n.length;r++){var i=n[r];Fy.$isLeafNode(i)&&(null!=(i=Uy.$getNearestNodeOfType(i,ev))&&t.add(qy(i)))}for(let r of t){t=r,n=Ky(r);for(let r of n)Gy(n=Fy.$createParagraphNode(),r.getChildren()),t.insertAfter(n),t=n,r.__key===e.anchor.key&&e.anchor.set(n.getKey(),0,"element"),r.__key===e.focus.key&&e.focus.set(n.getKey(),0,"element"),r.remove();r.remove()}}}))};var Nv={},Av=a.exports;let Ov=Av.createContext(null);Nv.LexicalComposerContext=Ov,Nv.createLexicalComposerContext=function(e,t){let n=null;return null!=e&&(n=e[1]),{getTheme:function(){return null!=t?t:null!=n?n.getTheme():null}}};var Mv=Nv.useLexicalComposerContext=function(){let e=Av.useContext(Ov);if(null==e)throw Error("Minified Lexical error #8; visit https://lexical.dev/docs/error?code=8 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");return e},Rv=Nv,Dv=Zu,Iv=a.exports;let Pv="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;var Lv=Pv?Iv.useLayoutEffect:Iv.useEffect;let Bv={tag:"history-merge"};var $v=function({initialConfig:e,children:t}){let n=Iv.useMemo((()=>{const{theme:t,namespace:n,editor__DEPRECATED:r,nodes:i,onError:o,editorState:a}=e,s=Rv.createLexicalComposerContext(null,t);let l=r||null;if(null===l){const e=Dv.createEditor({editable:!1,namespace:n,nodes:i,onError:t=>o(t,e),theme:t});!function(e,t){if(null!==t)if(void 0===t)e.update((()=>{var t=Dv.$getRoot();if(t.isEmpty()){let n=Dv.$createParagraphNode();t.append(n),t=Pv?document.activeElement:null,(null!==Dv.$getSelection()||null!==t&&t===e.getRootElement())&&n.select()}}),Bv);else if(null!==t)switch(typeof t){case"string":let n=e.parseEditorState(t);e.setEditorState(n,Bv);break;case"object":e.setEditorState(t,Bv);break;case"function":e.update((()=>{Dv.$getRoot().isEmpty()&&t(e)}),Bv)}}(e,a),l=e}return[l,s]}),[]);return Lv((()=>{let t=e.editable,[r]=n;r.setEditable(void 0===t||t)}),[]),Iv.createElement(Rv.LexicalComposerContext.Provider,{value:n},t)},zv={},Fv={},Uv={},Hv=Xu,Vv=Zu;function qv(e,t,n,r=null){let i=null==r||t.isSelected(),o=Vv.$isElementNode(t)&&t.excludeFromCopy("html");var a=t;null!==r&&(a=Hv.$cloneWithProperties(t),a=Vv.$isTextNode(a)&&null!=r?Hv.$sliceSelectedTextNodeContent(r,a):a);let s=Vv.$isElementNode(a)?a.getChildren():[],{element:l,after:c}=a.exportDOM(e);if(!l)return!1;let u=new DocumentFragment;for(let d=0;d<s.length;d++){let n=s[d],o=qv(e,n,u,r);!i&&Vv.$isElementNode(t)&&o&&t.extractWithChild(n,r,"html")&&(i=!0)}return i&&!o?(l.append(u),n.append(l),c&&(e=c.call(a,l))&&l.replaceWith(e)):n.append(u),i}let Kv=new Set(["STYLE"]);function Wv(e,t,n=new Map,r,i=!1){let o=[];if(Kv.has(e.nodeName))return o;let a=null;var{nodeName:s}=e,l=t._htmlConversions.get(s.toLowerCase());if(s=null,void 0!==l)for(c of l)null!==(l=c(e))&&(null===s||s.priority<l.priority)&&(s=l);var c=(c=null!==s?s.conversion:null)?c(e,void 0,i):null;if(s=null,null!==c){if(s=c.after,a=c.node,null!==a){for(var[,u]of n)if(a=u(a,r),!a)break;a&&o.push(a)}null!=c.forChild&&n.set(e.nodeName,c.forChild)}for(e=e.childNodes,r=[],u=0;u<e.length;u++)r.push(...Wv(e[u],t,new Map(n),a,i||!0===(c&&c.preformatted)));return null!=s&&(r=s(r)),null==a?o=o.concat(r):Vv.$isElementNode(a)&&a.append(...r),o}var jv=Uv.$generateHtmlFromNodes=function(e,t){if("undefined"==typeof document||"undefined"==typeof window)throw Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");let n=document.createElement("div"),r=Vv.$getRoot().getChildren();for(let i=0;i<r.length;i++)qv(e,r[i],n,t);return n.innerHTML},Yv=Uv.$generateNodesFromDOM=function(e,t){let n=[],r=(t=t.body?Array.from(t.body.childNodes):[]).length;for(let o=0;o<r;o++){var i=t[o];Kv.has(i.nodeName)||null!==(i=Wv(i,e))&&(n=n.concat(i))}return n},Gv=Uv,Jv=Xu,Xv=Ju,Zv=Zu;function Qv(e){throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?code=${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function eb(e){let t=Zv.$getSelection();if(null==t)throw Error("Expected valid LexicalSelection");return Zv.$isRangeSelection(t)&&t.isCollapsed()||0===t.getNodes().length?"":Gv.$generateHtmlFromNodes(e,t)}function tb(e){let t=Zv.$getSelection();if(null==t)throw Error("Expected valid LexicalSelection");return Zv.$isRangeSelection(t)&&t.isCollapsed()||0===t.getNodes().length?null:JSON.stringify(ib(e,t))}function nb(e,t,n){(Zv.DEPRECATED_$isGridSelection(n)||null!==Xv.$findMatchingParent(n.anchor.getNode(),(e=>Zv.DEPRECATED_$isGridCellNode(e)))&&null!==Xv.$findMatchingParent(n.focus.getNode(),(e=>Zv.DEPRECATED_$isGridCellNode(e))))&&1===t.length&&Zv.DEPRECATED_$isGridNode(t[0])?function(e,t,n,r){1===e.length&&Zv.DEPRECATED_$isGridNode(e[0])||Qv(42);var i=e[0];e=i.getChildren(),n=i.getFirstChildOrThrow().getChildrenSize();var o=i.getChildrenSize(),a=Xv.$findMatchingParent(t.anchor.getNode(),(e=>Zv.DEPRECATED_$isGridCellNode(e)));t=(i=a&&Xv.$findMatchingParent(a,(e=>Zv.DEPRECATED_$isGridRowNode(e))))&&Xv.$findMatchingParent(i,(e=>Zv.DEPRECATED_$isGridNode(e))),Zv.DEPRECATED_$isGridCellNode(a)&&Zv.DEPRECATED_$isGridRowNode(i)&&Zv.DEPRECATED_$isGridNode(t)||Qv(43);var s=i.getIndexWithinParent(),l=Math.min(t.getChildrenSize()-1,s+o-1);let c,u;o=a.getIndexWithinParent(),a=Math.min(i.getChildrenSize()-1,o+n-1),n=Math.min(o,a),i=Math.min(s,l),o=Math.max(o,a),s=Math.max(s,l),l=t.getChildren(),a=0;for(let p=i;p<=s;p++){var d=l[p];Zv.DEPRECATED_$isGridRowNode(d)||Qv(24);var h=e[a];Zv.DEPRECATED_$isGridRowNode(h)||Qv(24),d=d.getChildren(),h=h.getChildren();let t=0;for(let e=n;e<=o;e++){let r=d[e];Zv.DEPRECATED_$isGridCellNode(r)||Qv(25);let a=h[t];Zv.DEPRECATED_$isGridCellNode(a)||Qv(25),p===i&&e===n?c=r.getKey():p===s&&e===o&&(u=r.getKey());let l=r.getChildren();a.getChildren().forEach((e=>{Zv.$isTextNode(e)&&Zv.$createParagraphNode().append(e),r.append(e)})),l.forEach((e=>e.remove())),t++}a++}c&&u&&((e=Zv.DEPRECATED_$createGridSelection()).set(t.getKey(),c,u),Zv.$setSelection(e),r.dispatchCommand(Zv.SELECTION_CHANGE_COMMAND,void 0))}(t,n,!1,e):function(e,t){let n=[],r=null;for(let i=0;i<e.length;i++){let t=e[i],o=Zv.$isLineBreakNode(t);if(o||Zv.$isDecoratorNode(t)&&t.isInline()||Zv.$isElementNode(t)&&t.isInline()||Zv.$isTextNode(t)||t.isParentRequired()){if(null===r&&(r=t.createParentElementNode(),n.push(r),o))continue;null!==r&&r.append(t)}else n.push(t),r=null}Zv.$isRangeSelection(t)?t.insertNodes(n):Zv.DEPRECATED_$isGridSelection(t)&&(e=t.anchor.getNode(),Zv.DEPRECATED_$isGridCellNode(e)||Qv(41),e.append(...n))}(t,n)}function rb(e,t,n,r=[]){let i=null==t||n.isSelected(t),o=Zv.$isElementNode(n)&&n.excludeFromCopy("html");var a=n;if(null!==t){var s=Jv.$cloneWithProperties(n);a=s=Zv.$isTextNode(s)&&null!=t?Jv.$sliceSelectedTextNodeContent(t,s):s}let l=Zv.$isElementNode(a)?a.getChildren():[];var c=a;(s=c.exportJSON()).type!==c.constructor.getType()&&Qv(58);var u=s.children;for(Zv.$isElementNode(c)&&(Array.isArray(u)||Qv(59)),Zv.$isTextNode(a)&&(0<(a=a.__text).length?s.text=a:i=!1),a=0;a<l.length;a++)u=rb(e,t,c=l[a],s.children),!i&&Zv.$isElementNode(n)&&u&&n.extractWithChild(c,t,"clone")&&(i=!0);if(i&&!o)r.push(s);else if(Array.isArray(s.children))for(e=0;e<s.children.length;e++)r.push(s.children[e]);return i}function ib(e,t){let n=[],r=Zv.$getRoot().getChildren();for(let i=0;i<r.length;i++)rb(e,t,r[i],n);return{namespace:e._config.namespace,nodes:n}}function ob(e){let t=[];for(let n=0;n<e.length;n++){let r=Zv.$parseSerializedNode(e[n]);Zv.$isTextNode(r)&&Jv.$addNodeStyle(r),t.push(r)}return t}let ab=null;function sb(e,t){var n=window.getSelection();if(!n)return!1;var r=n.anchorNode;if(n=n.focusNode,null!==r&&null!==n&&!Zv.isSelectionWithinEditor(e,r,n))return!1;if(t.preventDefault(),t=t.clipboardData,r=Zv.$getSelection(),null===t||null===r)return!1;n=eb(e),e=tb(e);let i="";return null!==r&&(i=r.getTextContent()),null!==n&&t.setData("text/html",n),null!==e&&t.setData("application/x-lexical-editor",e),t.setData("text/plain",i),!0}var lb=Fv.$generateJSONFromSelectedNodes=ib,cb=Fv.$generateNodesFromSerializedNodes=ob;Fv.$getHtmlContent=eb,Fv.$getLexicalContent=tb,Fv.$insertDataTransferForPlainText=function(e,t){null!=(e=e.getData("text/plain"))&&t.insertRawText(e)},Fv.$insertDataTransferForRichText=function(e,t,n){var r=e.getData("application/x-lexical-editor");if(r)try{let e=JSON.parse(r);if(e.namespace===n._config.namespace&&Array.isArray(e.nodes)){return nb(n,ob(e.nodes),t)}}catch{}if(r=e.getData("text/html"))try{var i=(new DOMParser).parseFromString(r,"text/html");return nb(n,Gv.$generateNodesFromDOM(n,i),t)}catch{}if(null!=(e=e.getData("text/plain")))if(Zv.$isRangeSelection(t))for(n=(e=e.split(/\r?\n/)).length,i=0;i<n;i++)t.insertText(e[i]),i<n-1&&t.insertParagraph();else t.insertRawText(e)};var ub=Fv.$insertGeneratedNodes=nb;Fv.copyToClipboard=async function(e,t){if(null!==ab)return!1;if(null!==t)return new Promise((n=>{e.update((()=>{n(sb(e,t))}))}));var n=e.getRootElement();let r=document.getSelection();if(null===n||null===r)return!1;let i=document.createElement("span");return i.style.cssText="position: fixed; top: -1000px;",i.append(document.createTextNode("#")),n.append(i),(n=new Range).setStart(i,0),n.setEnd(i,1),r.removeAllRanges(),r.addRange(n),new Promise((t=>{let n=e.registerCommand(Zv.COPY_COMMAND,(r=>(r instanceof ClipboardEvent&&(n(),null!==ab&&(window.clearTimeout(ab),ab=null),t(sb(e,r))),!0)),Zv.COMMAND_PRIORITY_CRITICAL);ab=window.setTimeout((()=>{n(),ab=null,t(!1)}),50),document.execCommand("copy"),i.remove()}))};var db=Fv,hb=Xu,pb=Ju,fb=Zu;function gb(e,t){return void 0!==document.caretRangeFromPoint?null===(e=document.caretRangeFromPoint(e,t))?null:{node:e.startContainer,offset:e.startOffset}:"undefined"!==document.caretPositionFromPoint?null===(e=document.caretPositionFromPoint(e,t))?null:{node:e.offsetNode,offset:e.offset}:null}let mb="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,yb=mb&&"documentMode"in document?document.documentMode:null;mb&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),mb&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);let vb=!(!mb||!("InputEvent"in window)||yb)&&"getTargetRanges"in new window.InputEvent("input"),bb=mb&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),_b=mb&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,wb=mb&&/^(?=.*Chrome).*/i.test(navigator.userAgent),xb=mb&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!wb,Sb=fb.createCommand("DRAG_DROP_PASTE_FILE");class Cb extends fb.ElementNode{static getType(){return"quote"}static clone(e){return new Cb(e.__key)}constructor(e){super(e)}createDOM(e){let t=document.createElement("blockquote");return pb.addClassNamesToElement(t,e.theme.quote),t}updateDOM(){return!1}static importDOM(){return{blockquote:()=>({conversion:Ab,priority:0})}}static importJSON(e){let t=Eb();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(e,t){e=fb.$createParagraphNode();let n=this.getDirection();return e.setDirection(n),this.insertAfter(e,t),e}collapseAtStart(){let e=fb.$createParagraphNode();return this.getChildren().forEach((t=>e.append(t))),this.replace(e),!0}}function Eb(){return fb.$applyNodeReplacement(new Cb)}class Tb extends fb.ElementNode{static getType(){return"heading"}static clone(e){return new Tb(e.__tag,e.__key)}constructor(e,t){super(t),this.__tag=e}getTag(){return this.__tag}createDOM(e){let t=this.__tag,n=document.createElement(t);return void 0!==(e=e.theme.heading)&&pb.addClassNamesToElement(n,e[t]),n}updateDOM(){return!1}static importDOM(){return{h1:()=>({conversion:Nb,priority:0}),h2:()=>({conversion:Nb,priority:0}),h3:()=>({conversion:Nb,priority:0}),h4:()=>({conversion:Nb,priority:0}),h5:()=>({conversion:Nb,priority:0}),h6:()=>({conversion:Nb,priority:0}),p:e=>null!==(e=e.firstChild)&&kb(e)?{conversion:()=>({node:null}),priority:3}:null,span:e=>kb(e)?{conversion:()=>({node:Ob("h1")}),priority:3}:null}}static importJSON(e){let t=Ob(e.tag);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(e,t=!0){e=0<(e=e?e.anchor.offset:0)&&e<this.getTextContentSize()?Ob(this.getTag()):fb.$createParagraphNode();let n=this.getDirection();return e.setDirection(n),this.insertAfter(e,t),e}collapseAtStart(){let e=this.isEmpty()?fb.$createParagraphNode():Ob(this.getTag());return this.getChildren().forEach((t=>e.append(t))),this.replace(e),!0}extractWithChild(){return!0}}function kb(e){return"span"===e.nodeName.toLowerCase()&&"26pt"===e.style.fontSize}function Nb(e){let t=null;return"h1"!==(e=e.nodeName.toLowerCase())&&"h2"!==e&&"h3"!==e&&"h4"!==e&&"h5"!==e&&"h6"!==e||(t=Ob(e)),{node:t}}function Ab(){return{node:Eb()}}function Ob(e){return fb.$applyNodeReplacement(new Tb(e))}function Mb(e){let t=null;if(e instanceof DragEvent?t=e.dataTransfer:e instanceof ClipboardEvent&&(t=e.clipboardData),null===t)return[!1,[],!1];var n=t.types;return e=n.includes("Files"),n=n.includes("text/html")||n.includes("text/plain"),[e,Array.from(t.files),n]}function Rb(e,t){var n=fb.$getSelection();if(fb.$isRangeSelection(n)){var r=new Set;n=n.getNodes();for(let i=0;i<n.length;i++){let o=n[i],a=o.getKey();if(r.has(a))continue;let s=pb.$getNearestBlockElementAncestorOrThrow(o),l=s.getKey();s.canInsertTab()?(e(o),r.add(a)):s.canIndent()&&!r.has(l)&&(r.add(l),t(s))}}}function Db(e){return e=fb.$getNearestNodeFromDOMNode(e),fb.$isDecoratorNode(e)}var Ib=zv.$createHeadingNode=Ob,Pb=zv.$createQuoteNode=Eb,Lb=zv.$isHeadingNode=function(e){return e instanceof Tb};zv.$isQuoteNode=function(e){return e instanceof Cb};var Bb=zv.DRAG_DROP_PASTE=Sb,$b=zv.HeadingNode=Tb,zb=zv.QuoteNode=Cb,Fb=zv.eventFiles=Mb;zv.registerRichText=function(e){return pb.mergeRegister(e.registerCommand(fb.CLICK_COMMAND,(()=>{const e=fb.$getSelection();return!!fb.$isNodeSelection(e)&&(e.clear(),!0)}),0),e.registerCommand(fb.DELETE_CHARACTER_COMMAND,(e=>{const t=fb.$getSelection();return!!fb.$isRangeSelection(t)&&(t.deleteCharacter(e),!0)}),fb.COMMAND_PRIORITY_EDITOR),e.registerCommand(fb.DELETE_WORD_COMMAND,(e=>{const t=fb.$getSelection();return!!fb.$isRangeSelection(t)&&(t.deleteWord(e),!0)}),fb.COMMAND_PRIORITY_EDITOR),e.registerCommand(fb.DELETE_LINE_COMMAND,(e=>{const t=fb.$getSelection();return!!fb.$isRangeSelection(t)&&(t.deleteLine(e),!0)}),fb.COMMAND_PRIORITY_EDITOR),e.registerCommand(fb.CONTROLLED_TEXT_INSERTION_COMMAND,(t=>{const n=fb.$getSelection();if("string"==typeof t)fb.$isRangeSelection(n)?n.insertText(t):fb.DEPRECATED_$isGridSelection(n);else{if(!fb.$isRangeSelection(n)&&!fb.DEPRECATED_$isGridSelection(n))return!1;const r=t.dataTransfer;null!=r?db.$insertDataTransferForRichText(r,n,e):fb.$isRangeSelection(n)&&(t=t.data)&&n.insertText(t)}return!0}),fb.COMMAND_PRIORITY_EDITOR),e.registerCommand(fb.REMOVE_TEXT_COMMAND,(()=>{const e=fb.$getSelection();return!!fb.$isRangeSelection(e)&&(e.removeText(),!0)}),fb.COMMAND_PRIORITY_EDITOR),e.registerCommand(fb.FORMAT_TEXT_COMMAND,(e=>{const t=fb.$getSelection();return!!fb.$isRangeSelection(t)&&(t.formatText(e),!0)}),fb.COMMAND_PRIORITY_EDITOR),e.registerCommand(fb.FORMAT_ELEMENT_COMMAND,(e=>{var t=fb.$getSelection();if(!fb.$isRangeSelection(t)&&!fb.$isNodeSelection(t))return!1;t=t.getNodes();for(const n of t)pb.$getNearestBlockElementAncestorOrThrow(n).setFormat(e);return!0}),fb.COMMAND_PRIORITY_EDITOR),e.registerCommand(fb.INSERT_LINE_BREAK_COMMAND,(e=>{const t=fb.$getSelection();return!!fb.$isRangeSelection(t)&&(t.insertLineBreak(e),!0)}),fb.COMMAND_PRIORITY_EDITOR),e.registerCommand(fb.INSERT_PARAGRAPH_COMMAND,(()=>{const e=fb.$getSelection();return!!fb.$isRangeSelection(e)&&(e.insertParagraph(),!0)}),fb.COMMAND_PRIORITY_EDITOR),e.registerCommand(fb.INDENT_CONTENT_COMMAND,(()=>(Rb((()=>{e.dispatchCommand(fb.CONTROLLED_TEXT_INSERTION_COMMAND,"\t")}),(e=>{const t=e.getIndent();10!==t&&e.setIndent(t+1)})),!0)),fb.COMMAND_PRIORITY_EDITOR),e.registerCommand(fb.OUTDENT_CONTENT_COMMAND,(()=>(Rb((t=>{fb.$isTextNode(t)&&("\t"===(t=t.getTextContent())[t.length-1]&&e.dispatchCommand(fb.DELETE_CHARACTER_COMMAND,!0))}),(e=>{const t=e.getIndent();0!==t&&e.setIndent(t-1)})),!0)),fb.COMMAND_PRIORITY_EDITOR),e.registerCommand(fb.KEY_ARROW_UP_COMMAND,(e=>{var t=fb.$getSelection();if(fb.$isNodeSelection(t)&&!Db(e.target)){if(0<(e=t.getNodes()).length)return e[0].selectPrevious(),!0}else if(fb.$isRangeSelection(t)){if(t=fb.$getAdjacentNode(t.focus,!0),fb.$isDecoratorNode(t)&&!t.isIsolated()&&!t.isInline())return t.selectPrevious(),e.preventDefault(),!0;if(fb.$isElementNode(t)&&!t.isInline()&&!t.canBeEmpty())return t.select(),e.preventDefault(),!0}return!1}),fb.COMMAND_PRIORITY_EDITOR),e.registerCommand(fb.KEY_ARROW_DOWN_COMMAND,(e=>{var t=fb.$getSelection();if(fb.$isNodeSelection(t)){if(0<(e=t.getNodes()).length)return e[0].selectNext(0,0),!0}else if(fb.$isRangeSelection(t)){let n=t.focus;if("root"===n.key&&n.offset===fb.$getRoot().getChildrenSize())return e.preventDefault(),!0;if(t=fb.$getAdjacentNode(t.focus,!1),fb.$isDecoratorNode(t)&&!t.isIsolated()&&!t.isInline())return t.selectNext(),e.preventDefault(),!0}return!1}),fb.COMMAND_PRIORITY_EDITOR),e.registerCommand(fb.KEY_ARROW_LEFT_COMMAND,(e=>{const t=fb.$getSelection();if(fb.$isNodeSelection(t)){var n=t.getNodes();if(0<n.length)return e.preventDefault(),n[0].selectPrevious(),!0}return!!fb.$isRangeSelection(t)&&(!!hb.$shouldOverrideDefaultCharacterSelection(t,!0)&&(n=e.shiftKey,e.preventDefault(),hb.$moveCharacter(t,n,!0),!0))}),fb.COMMAND_PRIORITY_EDITOR),e.registerCommand(fb.KEY_ARROW_RIGHT_COMMAND,(e=>{const t=fb.$getSelection();if(fb.$isNodeSelection(t)&&!Db(e.target)){var n=t.getNodes();if(0<n.length)return e.preventDefault(),n[0].selectNext(0,0),!0}return!!fb.$isRangeSelection(t)&&(n=e.shiftKey,!!hb.$shouldOverrideDefaultCharacterSelection(t,!1)&&(e.preventDefault(),hb.$moveCharacter(t,n,!1),!0))}),fb.COMMAND_PRIORITY_EDITOR),e.registerCommand(fb.KEY_BACKSPACE_COMMAND,(t=>{if(Db(t.target))return!1;const n=fb.$getSelection();if(!fb.$isRangeSelection(n))return!1;t.preventDefault(),({anchor:t}=n);const r=t.getNode();return n.isCollapsed()&&0===t.offset&&!fb.$isRootNode(r)&&0<pb.$getNearestBlockElementAncestorOrThrow(r).getIndent()?e.dispatchCommand(fb.OUTDENT_CONTENT_COMMAND,void 0):e.dispatchCommand(fb.DELETE_CHARACTER_COMMAND,!0)}),fb.COMMAND_PRIORITY_EDITOR),e.registerCommand(fb.KEY_DELETE_COMMAND,(t=>{if(Db(t.target))return!1;const n=fb.$getSelection();return!!fb.$isRangeSelection(n)&&(t.preventDefault(),e.dispatchCommand(fb.DELETE_CHARACTER_COMMAND,!1))}),fb.COMMAND_PRIORITY_EDITOR),e.registerCommand(fb.KEY_ENTER_COMMAND,(t=>{const n=fb.$getSelection();if(!fb.$isRangeSelection(n))return!1;if(null!==t){if((_b||bb||xb)&&vb)return!1;if(t.preventDefault(),t.shiftKey)return e.dispatchCommand(fb.INSERT_LINE_BREAK_COMMAND,!1)}return e.dispatchCommand(fb.INSERT_PARAGRAPH_COMMAND,void 0)}),fb.COMMAND_PRIORITY_EDITOR),e.registerCommand(fb.KEY_ESCAPE_COMMAND,(()=>{const t=fb.$getSelection();return!!fb.$isRangeSelection(t)&&(e.blur(),!0)}),fb.COMMAND_PRIORITY_EDITOR),e.registerCommand(fb.DROP_COMMAND,(t=>{const[,n]=Mb(t);if(0<n.length){var r=gb(t.clientX,t.clientY);if(null!==r){const{offset:t,node:o}=r;var i=fb.$getNearestNodeFromDOMNode(o);if(null!==i){if(r=fb.$createRangeSelection(),fb.$isTextNode(i))r.anchor.set(i.getKey(),t,"text"),r.focus.set(i.getKey(),t,"text");else{const e=i.getParentOrThrow().getKey();i=i.getIndexWithinParent()+1,r.anchor.set(e,i,"element"),r.focus.set(e,i,"element")}r=fb.$normalizeSelection__EXPERIMENTAL(r),fb.$setSelection(r)}e.dispatchCommand(Sb,n)}return t.preventDefault(),!0}return t=fb.$getSelection(),!!fb.$isRangeSelection(t)}),fb.COMMAND_PRIORITY_EDITOR),e.registerCommand(fb.DRAGSTART_COMMAND,(e=>{[e]=Mb(e);const t=fb.$getSelection();return!(e&&!fb.$isRangeSelection(t))}),fb.COMMAND_PRIORITY_EDITOR),e.registerCommand(fb.DRAGOVER_COMMAND,(e=>{var[t]=Mb(e);const n=fb.$getSelection();return!(t&&!fb.$isRangeSelection(n))&&(null!==(t=gb(e.clientX,e.clientY))&&(t=fb.$getNearestNodeFromDOMNode(t.node),fb.$isDecoratorNode(t)&&e.preventDefault()),!0)}),fb.COMMAND_PRIORITY_EDITOR),e.registerCommand(fb.COPY_COMMAND,(t=>(db.copyToClipboard(e,t instanceof ClipboardEvent?t:null),!0)),fb.COMMAND_PRIORITY_EDITOR),e.registerCommand(fb.CUT_COMMAND,(t=>(async function(e,t){await db.copyToClipboard(t,e instanceof ClipboardEvent?e:null),t.update((()=>{let e=fb.$getSelection();fb.$isRangeSelection(e)?e.removeText():fb.$isNodeSelection(e)&&e.getNodes().forEach((e=>e.remove()))}))}(t,e),!0)),fb.COMMAND_PRIORITY_EDITOR),e.registerCommand(fb.PASTE_COMMAND,(t=>{const[,n,r]=Mb(t);if(0<n.length&&!r)return e.dispatchCommand(Sb,n),!0;const i=fb.$getSelection();return!(!fb.$isRangeSelection(i)&&!fb.DEPRECATED_$isGridSelection(i))&&(function(e,t){e.preventDefault(),t.update((()=>{let n=fb.$getSelection(),r=e instanceof InputEvent||e instanceof KeyboardEvent?null:e.clipboardData;null!=r&&(fb.$isRangeSelection(n)||fb.DEPRECATED_$isGridSelection(n))&&db.$insertDataTransferForRichText(r,n,t)}),{tag:"paste"})}(t,e),!0)}),fb.COMMAND_PRIORITY_EDITOR))};var Ub={exports:{}},Hb={},Vb=a.exports,qb=Symbol.for("react.element"),Kb=Symbol.for("react.fragment"),Wb=Object.prototype.hasOwnProperty,jb=Vb.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Yb={key:!0,ref:!0,__self:!0,__source:!0};function Gb(e,t,n){var r,i={},o=null,a=null;for(r in void 0!==n&&(o=""+n),void 0!==t.key&&(o=""+t.key),void 0!==t.ref&&(a=t.ref),t)Wb.call(t,r)&&!Yb.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:qb,type:e,key:o,ref:a,props:i,_owner:jb.current}}Hb.Fragment=Kb,Hb.jsx=Gb,Hb.jsxs=Gb,Ub.exports=Hb;const Jb=Ub.exports.jsx,Xb=Ub.exports.jsxs,Zb=Ub.exports.Fragment;var Qb=Object.freeze(Object.defineProperty({__proto__:null,jsx:Jb,jsxs:Xb,Fragment:Zb},Symbol.toStringTag,{value:"Module"}));const e_=a.exports.createContext({setOption:(e,t)=>{},settings:t}),t_=({children:e})=>{const[n,r]=a.exports.useState(t),i=a.exports.useCallback(((e,n)=>{r((t=>({...t,[e]:n}))),t[e]===n?r_(e,null):r_(e,n)}),[]),o=a.exports.useMemo((()=>({setOption:i,settings:n})),[i,n]);return Jb(e_.Provider,{value:o,children:e})},n_=()=>a.exports.useContext(e_);function r_(e,t){const n=new URL(window.location.href),r=new URLSearchParams(n.search);null!==t?r.has(e)?r.set(e,String(t)):r.append(e,String(t)):r.has(e)&&r.delete(e),n.search=r.toString(),window.history.pushState(null,"",n.toString())}const i_=a.exports.createContext([e=>()=>{},e=>{}]),o_=({children:e})=>{const t=a.exports.useMemo((()=>{let e=null;const t=new Set;return[n=>(n(e),t.add(n),()=>{t.delete(n)}),n=>{e=n;for(const e of t)e(n)}]}),[]);return Jb(i_.Provider,{value:t,children:e})},a_=()=>{const[e,t]=a.exports.useContext(i_),[n,r]=a.exports.useState(null);return a.exports.useEffect((()=>e((e=>{r(e)}))),[e]),[n,t]};var s_={},l_=Ju,c_=Zu;function u_(e,t){let n=Date.now(),r=0;return(i,o,a,s,l,c)=>{let u=Date.now();if(c.has("historic"))return r=0,n=u,2;let d=function(e,t,n,r,i){if(null===e||0===n.size&&0===r.size&&!i)return 0;var o=t._selection,a=e._selection;if(i)return 1;if(!(c_.$isRangeSelection(o)&&c_.$isRangeSelection(a)&&a.isCollapsed()&&o.isCollapsed()))return 0;i=t._nodeMap;let s=[];for(let l of n)void 0!==(n=i.get(l))&&s.push(n);for(let[l,c]of r)c&&(void 0===(r=i.get(l))||c_.$isRootNode(r)||s.push(r));return 0===s.length?0:1<s.length?(t=(r=t._nodeMap).get(o.anchor.key),a=r.get(a.anchor.key),t&&a&&!e._nodeMap.has(t.__key)&&c_.$isTextNode(t)&&1===t.__text.length&&1===o.anchor.offset?2:0):(t=s[0],e=e._nodeMap.get(t.__key),c_.$isTextNode(e)&&c_.$isTextNode(t)&&e.__mode===t.__mode?(e=e.__text)===(t=t.__text)?0:(o=o.anchor,a=a.anchor,o.key!==a.key||"text"!==o.type?0:(o=o.offset,a=a.offset,1==(e=t.length-e.length)&&a===o-1?2:-1===e&&a===o+1?3:-1===e&&a===o?4:0)):0)}(i,o,s,l,e.isComposing()),h=(()=>{var h=null===a||a.editor===e,p=c.has("history-push");if(!p&&h&&c.has("history-merge"))return 0;if(null===i)return 1;var f=o._selection;if(!(0<s.size||0<l.size))return null!==f?0:2;if(!1===p&&0!==d&&d===r&&u<n+t&&h)return 0;if(1===s.size){{p=Array.from(s)[0],h=i._nodeMap.get(p),p=o._nodeMap.get(p),f=i._selection;let e=o._selection,t=!1;c_.$isRangeSelection(f)&&c_.$isRangeSelection(e)&&(t="element"===f.anchor.type&&"element"===f.focus.type&&"text"===e.anchor.type&&"text"===e.focus.type),h=!(t||!c_.$isTextNode(h)||!c_.$isTextNode(p))&&(h.__type===p.__type&&h.__text===p.__text&&h.__mode===p.__mode&&h.__detail===p.__detail&&h.__style===p.__style&&h.__format===p.__format&&h.__parent===p.__parent)}if(h)return 0}return 1})();return n=u,r=d,h}}s_.createEmptyHistoryState=function(){return{current:null,redoStack:[],undoStack:[]}},s_.registerHistory=function(e,t,n){let r=u_(e,n);n=({editorState:n,prevEditorState:i,dirtyLeaves:o,dirtyElements:a,tags:s})=>{const l=t.current,c=t.redoStack,u=t.undoStack,d=null===l?null:l.editorState;if(null===l||n!==d){if(1===(o=r(i,n,l,o,a,s)))0!==c.length&&(t.redoStack=[],e.dispatchCommand(c_.CAN_REDO_COMMAND,!1)),null!==l&&(u.push({...l,undoSelection:i.read(c_.$getSelection)}),e.dispatchCommand(c_.CAN_UNDO_COMMAND,!0));else if(2===o)return;t.current={editor:e,editorState:n}}};let i=l_.mergeRegister(e.registerCommand(c_.UNDO_COMMAND,(()=>{let n=t.redoStack,r=t.undoStack;if(0!==r.length){let i=t.current,o=r.pop();null!==i&&(n.push(i),e.dispatchCommand(c_.CAN_REDO_COMMAND,!0)),0===r.length&&e.dispatchCommand(c_.CAN_UNDO_COMMAND,!1),t.current=o||null,o&&o.editor.setEditorState(o.editorState.clone(o.undoSelection),{tag:"historic"})}return!0}),c_.COMMAND_PRIORITY_EDITOR),e.registerCommand(c_.REDO_COMMAND,(()=>{let n=t.redoStack;var r=t.undoStack;if(0!==n.length){let i=t.current;null!==i&&(r.push(i),e.dispatchCommand(c_.CAN_UNDO_COMMAND,!0)),r=n.pop(),0===n.length&&e.dispatchCommand(c_.CAN_REDO_COMMAND,!1),t.current=r||null,r&&r.editor.setEditorState(r.editorState,{tag:"historic"})}return!0}),c_.COMMAND_PRIORITY_EDITOR),e.registerCommand(c_.CLEAR_EDITOR_COMMAND,(()=>(t.undoStack=[],t.redoStack=[],t.current=null,!1)),c_.COMMAND_PRIORITY_EDITOR),e.registerCommand(c_.CLEAR_HISTORY_COMMAND,(()=>(t.undoStack=[],t.redoStack=[],t.current=null,e.dispatchCommand(c_.CAN_REDO_COMMAND,!1),e.dispatchCommand(c_.CAN_UNDO_COMMAND,!1),!0)),c_.COMMAND_PRIORITY_EDITOR),e.registerUpdateListener(n)),o=e.registerUpdateListener(n);return()=>{i(),o()}};var d_=Nv,h_=s_,p_=a.exports;var f_=h_.createEmptyHistoryState,g_=function({externalHistoryState:e}){let[t]=d_.useLexicalComposerContext();return function(e,t,n=1e3){let r=p_.useMemo((()=>t||h_.createEmptyHistoryState()),[t]);p_.useEffect((()=>h_.registerHistory(e,r,n)),[n,e,r])}(t,e),null};const m_=a.exports.createContext({}),y_=({children:e})=>{const t=a.exports.useMemo((()=>({historyState:f_()})),[]);return Jb(m_.Provider,{value:t,children:e})},v_=()=>a.exports.useContext(m_);var b_=Nv,__=a.exports,w_=function({defaultSelection:e}){let[t]=b_.useLexicalComposerContext();return __.useEffect((()=>{t.focus((()=>{let e=document.activeElement,n=t.getRootElement();null===n||null!==e&&n.contains(e)||n.focus({preventScroll:!0})}),{defaultSelection:e})}),[e,t]),null},x_={},S_=Zu;class C_ extends S_.ElementNode{static getType(){return"overflow"}static clone(e){return new C_(e.__key)}static importJSON(){return E_()}static importDOM(){return null}constructor(e){super(e),this.__type="overflow"}exportJSON(){return{...super.exportJSON(),type:"overflow"}}createDOM(e){let t=document.createElement("span");return"string"==typeof(e=e.theme.characterLimit)&&(t.className=e),t}updateDOM(){return!1}insertNewAfter(e,t=!0){return this.getParentOrThrow().insertNewAfter(e,t)}excludeFromCopy(){return!0}}function E_(){return S_.$applyNodeReplacement(new C_)}x_.$createOverflowNode=E_,x_.$isOverflowNode=function(e){return e instanceof C_};var T_=x_.OverflowNode=C_,k_={},N_=Zu;function A_(e,t=!0){return!e&&(e=O_(),t&&(e=e.trim()),""===e)}function O_(){return N_.$getRoot().getTextContent()}function M_(e){if(!A_(e,!1))return!1;let t=(e=N_.$getRoot().getChildren()).length;if(1<t)return!1;for(let r=0;r<t;r++){var n=e[r];if(N_.$isElementNode(n)){if(!N_.$isParagraphNode(n)||0!==n.__indent)return!1;let e=(n=n.getChildren()).length;for(let t=0;t<e;t++)if(!N_.$isTextNode(n[r]))return!1}}return!0}k_.$canShowPlaceholder=M_,k_.$canShowPlaceholderCurry=function(e){return()=>M_(e)},k_.$findTextIntersectionFromCharacters=function(e,t){var n=e.getFirstChild();e=0;e:for(;null!==n;){if(N_.$isElementNode(n)){var r=n.getFirstChild();if(null!==r){n=r;continue}}else if(N_.$isTextNode(n)){if(e+(r=n.getTextContentSize())>t)return{node:n,offset:t-e};e+=r}if(null===(r=n.getNextSibling())){for(n=n.getParent();null!==n;){if(null!==(r=n.getNextSibling())){n=r;continue e}n=n.getParent()}break}n=r}return null},k_.$isRootTextContentEmpty=A_,k_.$isRootTextContentEmptyCurry=function(e,t){return()=>A_(e,t)},k_.$rootTextContent=O_,k_.registerLexicalTextEntity=function(e,t,n,r){let i=e=>{const t=N_.$createTextNode(e.getTextContent());t.setFormat(e.getFormat()),e.replace(t)},o=e.registerNodeTransform(N_.TextNode,(e=>{if(e.isSimpleText()){var o=e.getPreviousSibling(),a=e.getTextContent(),s=e;if(N_.$isTextNode(o)){var l=o.getTextContent(),c=t(l+a);if(o instanceof n){if(null===c||0!==o.getLatest().__mode)return void i(o);if(0<(c=c.end-l.length))return s=l+(s=a.slice(0,c)),o.select(),o.setTextContent(s),void(c===a.length?e.remove():(o=a.slice(c),e.setTextContent(o)))}else if(null===c||c.start<l.length)return}for(;;){if(a=c=null===(e=t(a))?"":a.slice(e.end),""===c){if(l=s.getNextSibling(),N_.$isTextNode(l)){if(c=s.getTextContent()+l.getTextContent(),null===(c=t(c))){l instanceof n?i(l):l.markDirty();break}if(0!==c.start)break}}else if(null!==(l=t(c))&&0===l.start)break;if(null===e)break;if(0===e.start&&N_.$isTextNode(o)&&o.isTextEntity())continue;let u;if(0===e.start?[u,s]=s.splitText(e.end):[,u,s]=s.splitText(e.start,e.end),e=r(u),u.replace(e),null==s)break}}}));return e=e.registerNodeTransform(n,(e=>{var r=e.getTextContent();const o=t(r);null===o||0!==o.start?i(e):r.length>o.end?e.splitText(o.end):(r=e.getPreviousSibling(),N_.$isTextNode(r)&&r.isTextEntity()&&(i(r),i(e)),r=e.getNextSibling(),N_.$isTextNode(r)&&r.isTextEntity()&&(i(r),e instanceof n&&i(e)))})),[o,e]};var R_=Nv,D_=a.exports,I_=x_,P_=k_,L_=Ju,B_=Zu;function $_(e,t,n=Object.freeze({})){let{strlen:r=(e=>e.length),remainingCharacters:i=(()=>{})}=n;D_.useEffect((()=>{if(!e.hasNodes([I_.OverflowNode]))throw Error("Minified Lexical error #57; visit https://lexical.dev/docs/error?code=57 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.")}),[e]),D_.useEffect((()=>{let n=e.getEditorState().read(P_.$rootTextContent),o=0;return L_.mergeRegister(e.registerTextContentListener((e=>{n=e})),e.registerUpdateListener((({dirtyLeaves:a})=>{var s=e.isComposing();if(a=0<a.size,!s&&a){if(a=(s=r(n))>t||null!==o&&o>t,i(t-s),null===o||a){let i=function(e,t,n){var r=Intl.Segmenter;let i=0;var o=0;if("function"==typeof r)for(var{segment:a}of e=(new r).segment(e)){if((o+=n(a))>t)break;i+=a.length}else for(a=Array.from(e),e=a.length,r=0;r<e;r++){let e=a[r];if(o+=n(e),o>t)break;i+=e.length}return i}(n,t,r);e.update((()=>{let e=L_.$dfs(),t=e.length,n=0;for(let u=0;u<t;u+=1){var{node:r}=e[u];if(I_.$isOverflowNode(r)){var o=n;if(n+r.getTextContentSize()<=i){var a=r.getParent();o=r.getPreviousSibling();var s=r.getNextSibling();F_(r),r=B_.$getSelection(),!B_.$isRangeSelection(r)||r.anchor.getNode().isAttached()&&r.focus.getNode().isAttached()||(B_.$isTextNode(o)?o.select():B_.$isTextNode(s)?s.select():null!==a&&a.select())}else o<i&&(o+=s=null!==(a=r.getFirstDescendant())?a.getTextContentSize():0,a=B_.$isTextNode(a)&&a.isSimpleText(),o=o<=i,(a||o)&&F_(r))}else if(B_.$isLeafNode(r)&&(o=n,n+=r.getTextContentSize(),n>i&&!I_.$isOverflowNode(r.getParent())&&(a=B_.$getSelection(),o<i&&B_.$isTextNode(r)&&r.isSimpleText()?([,r]=r.splitText(i-o),r=z_(r)):r=z_(r),null!==a&&B_.$setSelection(a),o=r.getPreviousSibling(),I_.$isOverflowNode(o)))){s=r.getFirstChild();var l=o.getChildren();if(a=l.length,null===s)r.append(...l);else for(var c=0;c<a;c++)s.insertBefore(l[c]);if(c=B_.$getSelection(),B_.$isRangeSelection(c)){l=(s=c.anchor).getNode(),c=c.focus;let e=s.getNode();l.is(o)?s.set(r.getKey(),s.offset,"element"):l.is(r)&&s.set(r.getKey(),a+s.offset,"element"),e.is(o)?c.set(r.getKey(),c.offset,"element"):e.is(r)&&c.set(r.getKey(),a+c.offset,"element")}o.remove()}}}),{tag:"history-merge"})}o=s}})))}),[e,t,i,r])}function z_(e){let t=I_.$createOverflowNode();return e.insertBefore(t),t.append(e),t}function F_(e){let t=e.getChildren(),n=t.length;for(let r=0;r<n;r++)e.insertBefore(t[r]);return e.remove(),0<n?t[n-1]:null}let U_=null;var H_=function({charset:e="UTF-16",maxLength:t=5}){let[n]=R_.useLexicalComposerContext(),[r,i]=D_.useState(t);return $_(n,t,D_.useMemo((()=>({remainingCharacters:i,strlen:t=>{if("UTF-8"===e){if(void 0===window.TextEncoder)var n=null;else null===U_&&(U_=new window.TextEncoder),n=U_;return null===n?(n=encodeURIComponent(t).match(/%[89ABab]/g),t=t.length+(n?n.length:0)):t=n.encode(t).length,t}if("UTF-16"===e)return t.length;throw Error("Unrecognized charset")}})),[e])),D_.createElement("span",{className:"characters-limit "+(0>r?"characters-limit-exceeded":"")},r)},V_=zy,q_=Nv,K_=Ju,W_=Zu,j_=a.exports;function Y_(e,t){let n=e.target;if(null!==n&&K_.isHTMLElement(n)){var r=n.firstChild;(null==r||!K_.isHTMLElement(r)||"UL"!==r.tagName&&"OL"!==r.tagName)&&(r=n.parentNode)&&"check"===r.__lexicalListType&&(e=e.pageX,r=n.getBoundingClientRect(),("rtl"===n.dir?e<r.right&&e>r.right-20:e>r.left&&e<r.left+20)&&t())}}function G_(e){Y_(e,(()=>{let t=e.target,n=function(e){for(;e;){if(e.__lexicalEditor)return e.__lexicalEditor;e=e.parentNode}return null}(t);null!=n&&n.isEditable()&&n.update((()=>{if(e.target){let e=W_.$getNearestNodeFromDOMNode(t);V_.$isListItemNode(e)&&(t.focus(),e.toggleChecked())}}))}))}function J_(e){Y_(e,(()=>{e.preventDefault()}))}function X_(){let e=document.activeElement;return null!=e&&"LI"===e.tagName&&null!=e.parentNode&&"check"===e.parentNode.__lexicalListType?e:null}function Z_(e,t,n){let r=X_();return null!=r&&t.update((()=>{var i=W_.$getNearestNodeFromDOMNode(r);if(V_.$isListItemNode(i)&&(i=function(e,t){let n=t?e.getPreviousSibling():e.getNextSibling();for(;null==n&&V_.$isListItemNode(e);)null!=(e=e.getParentOrThrow().getParent())&&(n=t?e.getPreviousSibling():e.getNextSibling());for(;V_.$isListItemNode(n);){if(e=t?n.getLastChild():n.getFirstChild(),!V_.$isListNode(e))return n;n=t?e.getLastChild():e.getFirstChild()}return null}(i,n),null!=i)){i.selectStart();let n=t.getElementByKey(i.__key);null!=n&&(e.preventDefault(),setTimeout((()=>{n.focus()}),0))}})),!1}var Q_=function(){let[e]=q_.useLexicalComposerContext();return j_.useEffect((()=>K_.mergeRegister(e.registerCommand(V_.INSERT_CHECK_LIST_COMMAND,(()=>(V_.insertList(e,"check"),!0)),W_.COMMAND_PRIORITY_LOW),e.registerCommand(W_.KEY_ARROW_DOWN_COMMAND,(t=>Z_(t,e,!1)),W_.COMMAND_PRIORITY_LOW),e.registerCommand(W_.KEY_ARROW_UP_COMMAND,(t=>Z_(t,e,!0)),W_.COMMAND_PRIORITY_LOW),e.registerCommand(W_.KEY_ESCAPE_COMMAND,(()=>{if(null!=X_()){let t=e.getRootElement();return null!=t&&t.focus(),!0}return!1}),W_.COMMAND_PRIORITY_LOW),e.registerCommand(W_.KEY_SPACE_COMMAND,(t=>{let n=X_();return!(null==n||!e.isEditable())&&(e.update((()=>{let e=W_.$getNearestNodeFromDOMNode(n);V_.$isListItemNode(e)&&(t.preventDefault(),e.toggleChecked())})),!0)}),W_.COMMAND_PRIORITY_LOW),e.registerCommand(W_.KEY_ARROW_LEFT_COMMAND,(t=>e.getEditorState().read((()=>{var n=W_.$getSelection();if(W_.$isRangeSelection(n)&&n.isCollapsed()){var{anchor:r}=n;if((n="element"===r.type)||0===r.offset){r=r.getNode();let i=K_.$findMatchingParent(r,(e=>W_.$isElementNode(e)&&!e.isInline()));if(V_.$isListItemNode(i)){let o=i.getParent();if(V_.$isListNode(o)&&"check"===o.getListType()&&(n||i.getFirstDescendant()===r)&&(null!=(n=e.getElementByKey(i.__key))&&document.activeElement!==n))return n.focus(),t.preventDefault(),!0}}}return!1}))),W_.COMMAND_PRIORITY_LOW),e.registerRootListener(((e,t)=>{null!==e&&(e.addEventListener("click",G_),e.addEventListener("pointerdown",J_)),null!==t&&(t.removeEventListener("click",G_),t.removeEventListener("pointerdown",J_))}))))),null},ew=Nv,tw=Zu,nw=a.exports,rw="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?nw.useLayoutEffect:nw.useEffect,iw=function({onClear:e}){let[t]=ew.useLexicalComposerContext();return rw((()=>t.registerCommand(tw.CLEAR_EDITOR_COMMAND,(()=>(t.update((()=>{if(null==e){let e=tw.$getRoot(),t=tw.$getSelection(),n=tw.$createParagraphNode();e.clear(),e.append(n),null!==t&&n.select()}else e()})),!0)),tw.COMMAND_PRIORITY_EDITOR)),[t,e]),null},ow={},aw=a.exports;let sw=[["Cat","rgb(125, 50, 0)"],["Dog","rgb(100, 0, 0)"],["Rabbit","rgb(150, 0, 0)"],["Frog","rgb(200, 0, 0)"],["Fox","rgb(200, 75, 0)"],["Hedgehog","rgb(0, 75, 0)"],["Pigeon","rgb(0, 125, 0)"],["Squirrel","rgb(75, 100, 0)"],["Bear","rgb(125, 100, 0)"],["Tiger","rgb(0, 0, 150)"],["Leopard","rgb(0, 0, 200)"],["Zebra","rgb(0, 0, 250)"],["Wolf","rgb(0, 100, 150)"],["Owl","rgb(0, 100, 100)"],["Gull","rgb(100, 0, 100)"],["Squid","rgb(150, 0, 150)"]],lw=sw[Math.floor(Math.random()*sw.length)],cw=aw.createContext({clientID:0,color:lw[1],isCollabActive:!1,name:lw[0],yjsDocMap:new Map});ow.CollaborationContext=cw;var uw=ow.useCollaborationContext=function(e,t){let n=aw.useContext(cw);return null!=e&&(n.name=e),null!=t&&(n.color=t),n},dw={},hw={},pw={},fw={};const gw=()=>new Map,mw=e=>{const t=gw();return e.forEach(((e,n)=>{t.set(n,e)})),t},yw=(e,t,n)=>{let r=e.get(t);return void 0===r&&e.set(t,r=n()),r},vw=(e,t)=>{const n=[];for(const[r,i]of e)n.push(t(i,r));return n},bw=(e,t)=>{for(const[n,r]of e)if(t(r,n))return!0;return!1},_w=(e,t)=>{for(const[n,r]of e)if(!t(r,n))return!1;return!0};var ww=Object.freeze({__proto__:null,create:gw,copy:mw,setIfUndefined:yw,map:vw,any:bw,all:_w});fw.all=_w,fw.any=bw,fw.copy=mw,fw.create=gw,fw.map=vw,fw.map$1=ww,fw.setIfUndefined=yw;var xw={};const Sw=()=>new Set,Cw=e=>Array.from(e),Ew=e=>e.values().next().value||void 0,Tw=e=>new Set(e);var kw=Object.freeze({__proto__:null,create:Sw,toArray:Cw,first:Ew,from:Tw});xw.create=Sw,xw.first=Ew,xw.from=Tw,xw.set=kw,xw.toArray=Cw;var Nw={},Aw=xw;const Ow=e=>e[e.length-1],Mw=()=>[],Rw=e=>e.slice(),Dw=(e,t)=>{for(let n=0;n<t.length;n++)e.push(t[n])},Iw=Array.from,Pw=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},Lw=(e,t)=>{for(let n=0;n<e.length;n++)if(t(e[n],n,e))return!0;return!1},Bw=(e,t)=>e.length===t.length&&Pw(e,((e,n)=>e===t[n])),$w=e=>e.reduce(((e,t)=>e.concat(t)),[]),zw=Array.isArray,Fw=e=>Iw(Aw.from(e)),Uw=(e,t)=>{const n=Aw.create(),r=[];for(let i=0;i<e.length;i++){const o=e[i],a=t(o);n.has(a)||(n.add(a),r.push(o))}return r};var Hw=Object.freeze({__proto__:null,last:Ow,create:Mw,copy:Rw,appendTo:Dw,from:Iw,every:Pw,some:Lw,equalFlat:Bw,flatten:$w,isArray:zw,unique:Fw,uniqueBy:Uw});Nw.appendTo=Dw,Nw.array=Hw,Nw.copy=Rw,Nw.create=Mw,Nw.equalFlat=Bw,Nw.every=Pw,Nw.flatten=$w,Nw.from=Iw,Nw.isArray=zw,Nw.last=Ow,Nw.some=Lw,Nw.unique=Fw,Nw.uniqueBy=Uw,Object.defineProperty(pw,"__esModule",{value:!0});var Vw=fw,qw=xw,Kw=Nw;pw.Observable=class{constructor(){this._observers=Vw.create()}on(e,t){Vw.setIfUndefined(this._observers,e,qw.create).add(t)}once(e,t){const n=(...r)=>{this.off(e,n),t(...r)};this.on(e,n)}off(e,t){const n=this._observers.get(e);void 0!==n&&(n.delete(t),0===n.size&&this._observers.delete(e))}emit(e,t){return Kw.from((this._observers.get(e)||Vw.create()).values()).forEach((e=>e(...t)))}destroy(){this._observers=Vw.create()}};var Ww={};Object.defineProperty(Ww,"__esModule",{value:!0});var jw=Nw;Ww.appendTo=jw.appendTo,Ww.copy=jw.copy,Ww.create=jw.create,Ww.equalFlat=jw.equalFlat,Ww.every=jw.every,Ww.flatten=jw.flatten,Ww.from=jw.from,Ww.isArray=jw.isArray,Ww.last=jw.last,Ww.some=jw.some,Ww.unique=jw.unique,Ww.uniqueBy=jw.uniqueBy;var Yw={},Gw={};const Jw=Math.floor,Xw=Math.ceil,Zw=Math.abs,Qw=Math.imul,ex=Math.round,tx=Math.log10,nx=Math.log2,rx=Math.log,ix=Math.sqrt,ox=(e,t)=>e+t,ax=(e,t)=>e<t?e:t,sx=(e,t)=>e>t?e:t,lx=Number.isNaN,cx=Math.pow,ux=e=>Math.pow(10,e),dx=Math.sign,hx=e=>0!==e?e<0:1/e<0;var px=Object.freeze({__proto__:null,floor:Jw,ceil:Xw,abs:Zw,imul:Qw,round:ex,log10:tx,log2:nx,log:rx,sqrt:ix,add:ox,min:ax,max:sx,isNaN:lx,pow:cx,exp10:ux,sign:dx,isNegativeZero:hx});Gw.abs=Zw,Gw.add=ox,Gw.ceil=Xw,Gw.exp10=ux,Gw.floor=Jw,Gw.imul=Qw,Gw.isNaN=lx,Gw.isNegativeZero=hx,Gw.log=rx,Gw.log10=tx,Gw.log2=nx,Gw.math=px,Gw.max=sx,Gw.min=ax,Gw.pow=cx,Gw.round=ex,Gw.sign=dx,Gw.sqrt=ix,Object.defineProperty(Yw,"__esModule",{value:!0});var fx=Gw;Yw.abs=fx.abs,Yw.add=fx.add,Yw.ceil=fx.ceil,Yw.exp10=fx.exp10,Yw.floor=fx.floor,Yw.imul=fx.imul,Yw.isNaN=fx.isNaN,Yw.isNegativeZero=fx.isNegativeZero,Yw.log=fx.log,Yw.log10=fx.log10,Yw.log2=fx.log2,Yw.max=fx.max,Yw.min=fx.min,Yw.pow=fx.pow,Yw.round=fx.round,Yw.sign=fx.sign,Yw.sqrt=fx.sqrt;var gx={};Object.defineProperty(gx,"__esModule",{value:!0});var mx=fw;gx.all=mx.all,gx.any=mx.any,gx.copy=mx.copy,gx.create=mx.create,gx.map=mx.map,gx.setIfUndefined=mx.setIfUndefined;var yx={},vx={},bx={};!function(e){const t=String.fromCharCode,n=String.fromCodePoint,r=/^\s*/g,i=e=>e.replace(r,""),o=/([A-Z])/g,a=(e,t)=>i(e.replace(o,(e=>`${t}${(e=>e.toLowerCase())(e)}`))),s=e=>unescape(encodeURIComponent(e)).length,l=e=>{const t=unescape(encodeURIComponent(e)),n=t.length,r=new Uint8Array(n);for(let i=0;i<n;i++)r[i]=t.codePointAt(i);return r},c="undefined"!=typeof TextEncoder?new TextEncoder:null,u=e=>c.encode(e),d=c?u:l,h=e=>{let t=e.length,n="",r=0;for(;t>0;){const i=t<1e4?t:1e4,o=e.subarray(r,r+i);r+=i,n+=String.fromCodePoint.apply(null,o),t-=i}return decodeURIComponent(escape(n))};e.utf8TextDecoder="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0}),e.utf8TextDecoder&&1===e.utf8TextDecoder.decode(new Uint8Array).length&&(e.utf8TextDecoder=null);const p=t=>e.utf8TextDecoder.decode(t),f=e.utf8TextDecoder?p:h,g=(e,t,n,r="")=>e.slice(0,t)+r+e.slice(t+n);var m=Object.freeze({__proto__:null,fromCharCode:t,fromCodePoint:n,trimLeft:i,fromCamelCase:a,utf8ByteLength:s,_encodeUtf8Polyfill:l,utf8TextEncoder:c,_encodeUtf8Native:u,encodeUtf8:d,_decodeUtf8Polyfill:h,get utf8TextDecoder(){return e.utf8TextDecoder},_decodeUtf8Native:p,decodeUtf8:f,splice:g});e._decodeUtf8Native=p,e._decodeUtf8Polyfill=h,e._encodeUtf8Native=u,e._encodeUtf8Polyfill=l,e.decodeUtf8=f,e.encodeUtf8=d,e.fromCamelCase=a,e.fromCharCode=t,e.fromCodePoint=n,e.splice=g,e.string=m,e.trimLeft=i,e.utf8ByteLength=s,e.utf8TextEncoder=c}(bx);var _x={},wx={};const xx=e=>void 0===e?null:e;var Sx=Object.freeze({__proto__:null,undefinedToNull:xx});wx.conditions=Sx,wx.undefinedToNull=xx;var Cx={};Object.defineProperty(Cx,"__esModule",{value:!0});let Ex=new class{constructor(){this.map=new Map}setItem(e,t){this.map.set(e,t)}getItem(e){return this.map.get(e)}},Tx=!0;try{"undefined"!=typeof localStorage&&(Ex=localStorage,Tx=!1)}catch(sZ){}const kx=Ex;Cx.onChange=e=>Tx||addEventListener("storage",e),Cx.varStorage=kx;var Nx={},Ax={};const Ox=()=>Object.create(null),Mx=Object.assign,Rx=Object.keys,Dx=(e,t)=>{for(const n in e)t(e[n],n)},Ix=(e,t)=>{const n=[];for(const r in e)n.push(t(e[r],r));return n},Px=e=>Rx(e).length,Lx=(e,t)=>{for(const n in e)if(t(e[n],n))return!0;return!1},Bx=e=>{for(const t in e)return!1;return!0},$x=(e,t)=>{for(const n in e)if(!t(e[n],n))return!1;return!0},zx=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Fx=(e,t)=>e===t||Px(e)===Px(t)&&$x(e,((e,n)=>(void 0!==e||zx(t,n))&&t[n]===e));var Ux=Object.freeze({__proto__:null,create:Ox,assign:Mx,keys:Rx,forEach:Dx,map:Ix,length:Px,some:Lx,isEmpty:Bx,every:$x,hasProperty:zx,equalFlat:Fx});Ax.assign=Mx,Ax.create=Ox,Ax.equalFlat=Fx,Ax.every=$x,Ax.forEach=Dx,Ax.hasProperty=zx,Ax.isEmpty=Bx,Ax.keys=Rx,Ax.length=Px,Ax.map=Ix,Ax.object=Ux,Ax.some=Lx;var Hx=Nw,Vx=Ax;const qx=(e,t,n=0)=>{try{for(;n<e.length;n++)e[n](...t)}finally{n<e.length&&qx(e,t,n+1)}},Kx=()=>{},Wx=e=>e(),jx=e=>e,Yx=(e,t)=>e===t,Gx=(e,t)=>e===t||null!=e&&null!=t&&e.constructor===t.constructor&&(e instanceof Array&&Hx.equalFlat(e,t)||"object"==typeof e&&Vx.equalFlat(e,t)),Jx=(e,t)=>{if(null==e||null==t)return Yx(e,t);if(e.constructor!==t.constructor)return!1;if(e===t)return!0;switch(e.constructor){case ArrayBuffer:e=new Uint8Array(e),t=new Uint8Array(t);case Uint8Array:if(e.byteLength!==t.byteLength)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;break;case Set:if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;break;case Map:if(e.size!==t.size)return!1;for(const n of e.keys())if(!t.has(n)||!Jx(e.get(n),t.get(n)))return!1;break;case Object:if(Vx.length(e)!==Vx.length(t))return!1;for(const n in e)if(!Vx.hasProperty(e,n)||!Jx(e[n],t[n]))return!1;break;case Array:if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Jx(e[n],t[n]))return!1;break;default:return!1}return!0},Xx=(e,t)=>t.includes(e);var Zx=Object.freeze({__proto__:null,callAll:qx,nop:Kx,apply:Wx,id:jx,equalityStrict:Yx,equalityFlat:Gx,equalityDeep:Jx,isOneOf:Xx});Nx._function=Zx,Nx.apply=Wx,Nx.callAll=qx,Nx.equalityDeep=Jx,Nx.equalityFlat=Gx,Nx.equalityStrict=Yx,Nx.id=jx,Nx.isOneOf=Xx,Nx.nop=Kx;var Qx=fw,eS=bx,tS=wx,nS=Cx,rS=Nx;const iS="undefined"!=typeof process&&process.release&&/node|io\.js/.test(process.release.name),oS="undefined"!=typeof window&&"undefined"!=typeof document&&!iS,aS="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);let sS;const lS=()=>{if(void 0===sS)if(iS){sS=Qx.create();const e=process.argv;let t=null;for(let n=0;n<e.length;n++){const r=e[n];"-"===r[0]?(null!==t&&sS.set(t,""),t=r):null!==t&&(sS.set(t,r),t=null)}null!==t&&sS.set(t,"")}else"object"==typeof location?(sS=Qx.create(),(location.search||"?").slice(1).split("&").forEach((e=>{if(0!==e.length){const[t,n]=e.split("=");sS.set(`--${eS.fromCamelCase(t,"-")}`,n),sS.set(`-${eS.fromCamelCase(t,"-")}`,n)}}))):sS=Qx.create();return sS},cS=e=>lS().has(e),uS=(e,t)=>lS().get(e)||t,dS=e=>iS?tS.undefinedToNull(process.env[e.toUpperCase()]):tS.undefinedToNull(nS.varStorage.getItem(e)),hS=e=>lS().get("--"+e)||dS(e),pS=e=>cS("--"+e)||null!==dS(e),fS=pS("production"),gS=iS&&rS.isOneOf({}.FORCE_COLOR,["true","1","2"]),mS=!cS("no-colors")&&(!iS||process.stdout.isTTY||gS)&&(!iS||cS("color")||gS||null!==dS("COLORTERM")||(dS("TERM")||"").includes("color"));var yS=Object.freeze({__proto__:null,isNode:iS,isBrowser:oS,isMac:aS,hasParam:cS,getParam:uS,getVariable:dS,getConf:hS,hasConf:pS,production:fS,supportsColor:mS});_x.environment=yS,_x.getConf=hS,_x.getParam=uS,_x.getVariable=dS,_x.hasConf=pS,_x.hasParam=cS,_x.isBrowser=oS,_x.isMac=aS,_x.isNode=iS,_x.production=fS,_x.supportsColor=mS;var vS={};var bS=Object.freeze({__proto__:null,BIT1:1,BIT2:2,BIT3:4,BIT4:8,BIT5:16,BIT6:32,BIT7:64,BIT8:128,BIT9:256,BIT10:512,BIT11:1024,BIT12:2048,BIT13:4096,BIT14:8192,BIT15:16384,BIT16:32768,BIT17:65536,BIT18:131072,BIT19:262144,BIT20:524288,BIT21:1048576,BIT22:2097152,BIT23:4194304,BIT24:8388608,BIT25:16777216,BIT26:33554432,BIT27:67108864,BIT28:134217728,BIT29:268435456,BIT30:536870912,BIT31:1073741824,BIT32:-2147483648,BITS0:0,BITS1:1,BITS2:3,BITS3:7,BITS4:15,BITS5:31,BITS6:63,BITS7:127,BITS8:255,BITS9:511,BITS10:1023,BITS11:2047,BITS12:4095,BITS13:8191,BITS14:16383,BITS15:32767,BITS16:65535,BITS17:131071,BITS18:262143,BITS19:524287,BITS20:1048575,BITS21:2097151,BITS22:4194303,BITS23:8388607,BITS24:16777215,BITS25:33554431,BITS26:67108863,BITS27:134217727,BITS28:268435455,BITS29:536870911,BITS30:1073741823,BITS31:2147483647,BITS32:4294967295});vS.BIT1=1,vS.BIT10=512,vS.BIT11=1024,vS.BIT12=2048,vS.BIT13=4096,vS.BIT14=8192,vS.BIT15=16384,vS.BIT16=32768,vS.BIT17=65536,vS.BIT18=131072,vS.BIT19=262144,vS.BIT2=2,vS.BIT20=524288,vS.BIT21=1048576,vS.BIT22=2097152,vS.BIT23=4194304,vS.BIT24=8388608,vS.BIT25=16777216,vS.BIT26=33554432,vS.BIT27=67108864,vS.BIT28=134217728,vS.BIT29=268435456,vS.BIT3=4,vS.BIT30=536870912,vS.BIT31=1073741824,vS.BIT32=-2147483648,vS.BIT4=8,vS.BIT5=16,vS.BIT6=32,vS.BIT7=64,vS.BIT8=128,vS.BIT9=256,vS.BITS0=0,vS.BITS1=1,vS.BITS10=1023,vS.BITS11=2047,vS.BITS12=4095,vS.BITS13=8191,vS.BITS14=16383,vS.BITS15=32767,vS.BITS16=65535,vS.BITS17=131071,vS.BITS18=262143,vS.BITS19=524287,vS.BITS2=3,vS.BITS20=1048575,vS.BITS21=2097151,vS.BITS22=4194303,vS.BITS23=8388607,vS.BITS24=16777215,vS.BITS25=33554431,vS.BITS26=67108863,vS.BITS27=134217727,vS.BITS28=268435455,vS.BITS29=536870911,vS.BITS3=7,vS.BITS30=1073741823,vS.BITS31=2147483647,vS.BITS32=4294967295,vS.BITS4=15,vS.BITS5=31,vS.BITS6=63,vS.BITS7=127,vS.BITS8=255,vS.BITS9=511,vS.binary=bS;var _S={},wS=Gw,xS=vS;const SS=Number.MAX_SAFE_INTEGER,CS=Number.MIN_SAFE_INTEGER,ES=xS.BITS31,TS=Number.isInteger||(e=>"number"==typeof e&&isFinite(e)&&wS.floor(e)===e),kS=Number.isNaN,NS=Number.parseInt;var AS=Object.freeze({__proto__:null,MAX_SAFE_INTEGER:SS,MIN_SAFE_INTEGER:CS,LOWEST_INT32:-2147483648,HIGHEST_INT32:ES,isInteger:TS,isNaN:kS,parseInt:NS});_S.HIGHEST_INT32=ES,_S.LOWEST_INT32=-2147483648,_S.MAX_SAFE_INTEGER=SS,_S.MIN_SAFE_INTEGER=CS,_S.isInteger=TS,_S.isNaN=kS,_S.number=AS,_S.parseInt=NS;var OS={};const MS=e=>new Error(e),RS=()=>{throw MS("Method unimplemented")},DS=()=>{throw MS("Unexpected case")};var IS=Object.freeze({__proto__:null,create:MS,methodUnimplemented:RS,unexpectedCase:DS});OS.create=MS,OS.error=IS,OS.methodUnimplemented=RS,OS.unexpectedCase=DS;var PS=bx,LS=_x,BS=vS,$S=Gw,zS=_S,FS=OS;class US{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const HS=()=>new US,VS=e=>{let t=e.cpos;for(let n=0;n<e.bufs.length;n++)t+=e.bufs[n].length;return t},qS=e=>{const t=new Uint8Array(VS(e));let n=0;for(let r=0;r<e.bufs.length;r++){const i=e.bufs[r];t.set(i,n),n+=i.length}return t.set(gE(e.cbuf.buffer,0,e.cpos),n),t},KS=(e,t)=>{const n=e.cbuf.length;n-e.cpos<t&&(e.bufs.push(gE(e.cbuf.buffer,0,e.cpos)),e.cbuf=new Uint8Array(2*$S.max(n,t)),e.cpos=0)},WS=(e,t)=>{const n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(2*n),e.cpos=0),e.cbuf[e.cpos++]=t},jS=(e,t,n)=>{let r=null;for(let i=0;i<e.bufs.length&&null===r;i++){const n=e.bufs[i];t<n.length?r=n:t-=n.length}null===r&&(r=e.cbuf),r[t]=n},YS=WS,GS=jS,JS=(e,t)=>{WS(e,t&BS.BITS8),WS(e,t>>>8&BS.BITS8)},XS=(e,t,n)=>{jS(e,t,n&BS.BITS8),jS(e,t+1,n>>>8&BS.BITS8)},ZS=(e,t)=>{for(let n=0;n<4;n++)WS(e,t&BS.BITS8),t>>>=8},QS=(e,t)=>{for(let n=3;n>=0;n--)WS(e,t>>>8*n&BS.BITS8)},eC=(e,t,n)=>{for(let r=0;r<4;r++)jS(e,t+r,n&BS.BITS8),n>>>=8},tC=(e,t)=>{for(;t>BS.BITS7;)WS(e,BS.BIT8|BS.BITS7&t),t=$S.floor(t/128);WS(e,BS.BITS7&t)},nC=(e,t)=>{const n=$S.isNegativeZero(t);for(n&&(t=-t),WS(e,(t>BS.BITS6?BS.BIT8:0)|(n?BS.BIT7:0)|BS.BITS6&t),t=$S.floor(t/64);t>0;)WS(e,(t>BS.BITS7?BS.BIT8:0)|BS.BITS7&t),t=$S.floor(t/128)},rC=new Uint8Array(3e4),iC=rC.length/3,oC=(e,t)=>{if(t.length<iC){const n=PS.utf8TextEncoder.encodeInto(t,rC).written||0;tC(e,n);for(let t=0;t<n;t++)WS(e,rC[t])}else uC(e,PS.encodeUtf8(t))},aC=(e,t)=>{const n=unescape(encodeURIComponent(t)),r=n.length;tC(e,r);for(let i=0;i<r;i++)WS(e,n.codePointAt(i))},sC=PS.utf8TextEncoder&&PS.utf8TextEncoder.encodeInto?oC:aC,lC=(e,t)=>cC(e,qS(t)),cC=(e,t)=>{const n=e.cbuf.length,r=e.cpos,i=$S.min(n-r,t.length),o=t.length-i;e.cbuf.set(t.subarray(0,i),r),e.cpos+=i,o>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array($S.max(2*n,o)),e.cbuf.set(t.subarray(i)),e.cpos=o)},uC=(e,t)=>{tC(e,t.byteLength),cC(e,t)},dC=(e,t)=>{KS(e,t);const n=new DataView(e.cbuf.buffer,e.cpos,t);return e.cpos+=t,n},hC=(e,t)=>dC(e,4).setFloat32(0,t,!1),pC=(e,t)=>dC(e,8).setFloat64(0,t,!1),fC=(e,t)=>dC(e,8).setBigInt64(0,t,!1),gC=(e,t)=>dC(e,8).setBigUint64(0,t,!1),mC=new DataView(new ArrayBuffer(4)),yC=(e,t)=>{switch(typeof t){case"string":WS(e,119),sC(e,t);break;case"number":zS.isInteger(t)&&$S.abs(t)<=BS.BITS31?(WS(e,125),nC(e,t)):(n=t,mC.setFloat32(0,n),mC.getFloat32(0)===n?(WS(e,124),hC(e,t)):(WS(e,123),pC(e,t)));break;case"bigint":WS(e,122),fC(e,t);break;case"object":if(null===t)WS(e,126);else if(t instanceof Array){WS(e,117),tC(e,t.length);for(let n=0;n<t.length;n++)yC(e,t[n])}else if(t instanceof Uint8Array)WS(e,116),uC(e,t);else{WS(e,118);const n=Object.keys(t);tC(e,n.length);for(let r=0;r<n.length;r++){const i=n[r];sC(e,i),yC(e,t[i])}}break;case"boolean":WS(e,t?120:121);break;default:WS(e,127)}var n};class vC extends US{constructor(e){super(),this.w=e,this.s=null,this.count=0}write(e){this.s===e?this.count++:(this.count>0&&tC(this,this.count-1),this.count=1,this.w(this,e),this.s=e)}}class bC extends US{constructor(e){super(),this.s=e}write(e){nC(this,e-this.s),this.s=e}}class _C extends US{constructor(e){super(),this.s=e,this.count=0}write(e){this.s===e&&this.count>0?this.count++:(this.count>0&&tC(this,this.count-1),this.count=1,nC(this,e-this.s),this.s=e)}}const wC=e=>{e.count>0&&(nC(e.encoder,1===e.count?e.s:-e.s),e.count>1&&tC(e.encoder,e.count-2))};class xC{constructor(){this.encoder=new US,this.s=0,this.count=0}write(e){this.s===e?this.count++:(wC(this),this.count=1,this.s=e)}toUint8Array(){return wC(this),qS(this.encoder)}}class SC{constructor(){this.encoder=new US,this.s=0,this.count=0}write(e){this.s+this.count===e?this.count++:(wC(this),this.count=1,this.s=e)}toUint8Array(){return wC(this),qS(this.encoder)}}const CC=e=>{if(e.count>0){const t=2*e.diff+(1===e.count?0:1);nC(e.encoder,t),e.count>1&&tC(e.encoder,e.count-2)}};class EC{constructor(){this.encoder=new US,this.s=0,this.count=0,this.diff=0}write(e){this.diff===e-this.s?(this.s=e,this.count++):(CC(this),this.count=1,this.diff=e-this.s,this.s=e)}toUint8Array(){return CC(this),qS(this.encoder)}}class TC{constructor(){this.sarr=[],this.s="",this.lensE=new xC}write(e){this.s+=e,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(e.length)}toUint8Array(){const e=new US;return this.sarr.push(this.s),this.s="",sC(e,this.sarr.join("")),cC(e,this.lensE.toUint8Array()),qS(e)}}var kC=Object.freeze({__proto__:null,Encoder:US,createEncoder:HS,length:VS,toUint8Array:qS,verifyLen:KS,write:WS,set:jS,writeUint8:YS,setUint8:GS,writeUint16:JS,setUint16:XS,writeUint32:ZS,writeUint32BigEndian:QS,setUint32:eC,writeVarUint:tC,writeVarInt:nC,_writeVarStringNative:oC,_writeVarStringPolyfill:aC,writeVarString:sC,writeBinaryEncoder:lC,writeUint8Array:cC,writeVarUint8Array:uC,writeOnDataView:dC,writeFloat32:hC,writeFloat64:pC,writeBigInt64:fC,writeBigUint64:gC,writeAny:yC,RleEncoder:vC,IntDiffEncoder:bC,RleIntDiffEncoder:_C,UintOptRleEncoder:xC,IncUintOptRleEncoder:SC,IntDiffOptRleEncoder:EC,StringEncoder:TC});const NC=FS.create("Unexpected end of array"),AC=FS.create("Integer out of Range");class OC{constructor(e){this.arr=e,this.pos=0}}const MC=e=>new OC(e),RC=e=>e.pos!==e.arr.length,DC=(e,t=e.pos)=>{const n=MC(e.arr);return n.pos=t,n},IC=(e,t)=>{const n=gE(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n},PC=e=>IC(e,KC(e)),LC=e=>IC(e,e.arr.length-e.pos),BC=e=>e.pos++,$C=e=>e.arr[e.pos++],zC=e=>{const t=e.arr[e.pos]+(e.arr[e.pos+1]<<8);return e.pos+=2,t},FC=e=>{const t=e.arr[e.pos]+(e.arr[e.pos+1]<<8)+(e.arr[e.pos+2]<<16)+(e.arr[e.pos+3]<<24)>>>0;return e.pos+=4,t},UC=e=>{const t=e.arr[e.pos+3]+(e.arr[e.pos+2]<<8)+(e.arr[e.pos+1]<<16)+(e.arr[e.pos]<<24)>>>0;return e.pos+=4,t},HC=e=>e.arr[e.pos],VC=e=>e.arr[e.pos]+(e.arr[e.pos+1]<<8),qC=e=>e.arr[e.pos]+(e.arr[e.pos+1]<<8)+(e.arr[e.pos+2]<<16)+(e.arr[e.pos+3]<<24)>>>0,KC=e=>{let t=0,n=1;const r=e.arr.length;for(;e.pos<r;){const r=e.arr[e.pos++];if(t+=(r&BS.BITS7)*n,n*=128,r<BS.BIT8)return t;if(t>zS.MAX_SAFE_INTEGER)throw AC}throw NC},WC=e=>{let t=e.arr[e.pos++],n=t&BS.BITS6,r=64;const i=(t&BS.BIT7)>0?-1:1;if(0==(t&BS.BIT8))return i*n;const o=e.arr.length;for(;e.pos<o;){if(t=e.arr[e.pos++],n+=(t&BS.BITS7)*r,r*=128,t<BS.BIT8)return i*n;if(n>zS.MAX_SAFE_INTEGER)throw AC}throw NC},jC=e=>{const t=e.pos,n=KC(e);return e.pos=t,n},YC=e=>{const t=e.pos,n=WC(e);return e.pos=t,n},GC=e=>{let t=KC(e);if(0===t)return"";{let n=String.fromCodePoint($C(e));if(--t<100)for(;t--;)n+=String.fromCodePoint($C(e));else for(;t>0;){const r=t<1e4?t:1e4,i=e.arr.subarray(e.pos,e.pos+r);e.pos+=r,n+=String.fromCodePoint.apply(null,i),t-=r}return decodeURIComponent(escape(n))}},JC=e=>PS.utf8TextDecoder.decode(PC(e)),XC=PS.utf8TextDecoder?JC:GC,ZC=e=>{const t=e.pos,n=XC(e);return e.pos=t,n},QC=(e,t)=>{const n=new DataView(e.arr.buffer,e.arr.byteOffset+e.pos,t);return e.pos+=t,n},eE=e=>QC(e,4).getFloat32(0,!1),tE=e=>QC(e,8).getFloat64(0,!1),nE=e=>QC(e,8).getBigInt64(0,!1),rE=e=>QC(e,8).getBigUint64(0,!1),iE=[e=>{},e=>null,WC,eE,tE,nE,e=>!1,e=>!0,XC,e=>{const t=KC(e),n={};for(let r=0;r<t;r++){n[XC(e)]=oE(e)}return n},e=>{const t=KC(e),n=[];for(let r=0;r<t;r++)n.push(oE(e));return n},PC],oE=e=>iE[127-$C(e)](e);class aE extends OC{constructor(e,t){super(e),this.reader=t,this.s=null,this.count=0}read(){return 0===this.count&&(this.s=this.reader(this),RC(this)?this.count=KC(this)+1:this.count=-1),this.count--,this.s}}class sE extends OC{constructor(e,t){super(e),this.s=t}read(){return this.s+=WC(this),this.s}}class lE extends OC{constructor(e,t){super(e),this.s=t,this.count=0}read(){return 0===this.count&&(this.s+=WC(this),RC(this)?this.count=KC(this)+1:this.count=-1),this.count--,this.s}}class cE extends OC{constructor(e){super(e),this.s=0,this.count=0}read(){if(0===this.count){this.s=WC(this);const e=$S.isNegativeZero(this.s);this.count=1,e&&(this.s=-this.s,this.count=KC(this)+2)}return this.count--,this.s}}class uE extends OC{constructor(e){super(e),this.s=0,this.count=0}read(){if(0===this.count){this.s=WC(this);const e=$S.isNegativeZero(this.s);this.count=1,e&&(this.s=-this.s,this.count=KC(this)+2)}return this.count--,this.s++}}class dE extends OC{constructor(e){super(e),this.s=0,this.count=0,this.diff=0}read(){if(0===this.count){const e=WC(this),t=1&e;this.diff=$S.floor(e/2),this.count=1,t&&(this.count=KC(this)+2)}return this.s+=this.diff,this.count--,this.s}}class hE{constructor(e){this.decoder=new cE(e),this.str=XC(this.decoder),this.spos=0}read(){const e=this.spos+this.decoder.read(),t=this.str.slice(this.spos,e);return this.spos=e,t}}var pE=Object.freeze({__proto__:null,Decoder:OC,createDecoder:MC,hasContent:RC,clone:DC,readUint8Array:IC,readVarUint8Array:PC,readTailAsUint8Array:LC,skip8:BC,readUint8:$C,readUint16:zC,readUint32:FC,readUint32BigEndian:UC,peekUint8:HC,peekUint16:VC,peekUint32:qC,readVarUint:KC,readVarInt:WC,peekVarUint:jC,peekVarInt:YC,_readVarStringPolyfill:GC,_readVarStringNative:JC,readVarString:XC,peekVarString:ZC,readFromDataView:QC,readFloat32:eE,readFloat64:tE,readBigInt64:nE,readBigUint64:rE,readAny:oE,RleDecoder:aE,IntDiffDecoder:sE,RleIntDiffDecoder:lE,UintOptRleDecoder:cE,IncUintOptRleDecoder:uE,IntDiffOptRleDecoder:dE,StringDecoder:hE});const fE=e=>new Uint8Array(e),gE=(e,t,n)=>new Uint8Array(e,t,n),mE=e=>new Uint8Array(e),yE=LS.isBrowser?e=>{let t="";for(let n=0;n<e.byteLength;n++)t+=PS.fromCharCode(e[n]);return btoa(t)}:e=>Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("base64"),vE=LS.isBrowser?e=>{const t=atob(e),n=fE(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}:e=>{const t=Buffer.from(e,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)},bE=e=>{const t=fE(e.byteLength);return t.set(e),t},_E=e=>{const t=HS();return yC(t,e),qS(t)},wE=e=>oE(MC(e));var xE=Object.freeze({__proto__:null,createUint8ArrayFromLen:fE,createUint8ArrayViewFromArrayBuffer:gE,createUint8ArrayFromArrayBuffer:mE,toBase64:yE,fromBase64:vE,copyUint8Array:bE,encodeAny:_E,decodeAny:wE});vx.Decoder=OC,vx.Encoder=US,vx.IncUintOptRleDecoder=uE,vx.IncUintOptRleEncoder=SC,vx.IntDiffDecoder=sE,vx.IntDiffEncoder=bC,vx.IntDiffOptRleDecoder=dE,vx.IntDiffOptRleEncoder=EC,vx.RleDecoder=aE,vx.RleEncoder=vC,vx.RleIntDiffDecoder=lE,vx.RleIntDiffEncoder=_C,vx.StringDecoder=hE,vx.StringEncoder=TC,vx.UintOptRleDecoder=cE,vx.UintOptRleEncoder=xC,vx._readVarStringNative=JC,vx._readVarStringPolyfill=GC,vx._writeVarStringNative=oC,vx._writeVarStringPolyfill=aC,vx.buffer=xE,vx.clone=DC,vx.copyUint8Array=bE,vx.createDecoder=MC,vx.createEncoder=HS,vx.createUint8ArrayFromArrayBuffer=mE,vx.createUint8ArrayFromLen=fE,vx.createUint8ArrayViewFromArrayBuffer=gE,vx.decodeAny=wE,vx.decoding=pE,vx.encodeAny=_E,vx.encoding=kC,vx.fromBase64=vE,vx.hasContent=RC,vx.length=VS,vx.peekUint16=VC,vx.peekUint32=qC,vx.peekUint8=HC,vx.peekVarInt=YC,vx.peekVarString=ZC,vx.peekVarUint=jC,vx.readAny=oE,vx.readBigInt64=nE,vx.readBigUint64=rE,vx.readFloat32=eE,vx.readFloat64=tE,vx.readFromDataView=QC,vx.readTailAsUint8Array=LC,vx.readUint16=zC,vx.readUint32=FC,vx.readUint32BigEndian=UC,vx.readUint8=$C,vx.readUint8Array=IC,vx.readVarInt=WC,vx.readVarString=XC,vx.readVarUint=KC,vx.readVarUint8Array=PC,vx.set=jS,vx.setUint16=XS,vx.setUint32=eC,vx.setUint8=GS,vx.skip8=BC,vx.toBase64=yE,vx.toUint8Array=qS,vx.verifyLen=KS,vx.write=WS,vx.writeAny=yC,vx.writeBigInt64=fC,vx.writeBigUint64=gC,vx.writeBinaryEncoder=lC,vx.writeFloat32=hC,vx.writeFloat64=pC,vx.writeOnDataView=dC,vx.writeUint16=JS,vx.writeUint32=ZS,vx.writeUint32BigEndian=QS,vx.writeUint8=YS,vx.writeUint8Array=cC,vx.writeVarInt=nC,vx.writeVarString=sC,vx.writeVarUint=tC,vx.writeVarUint8Array=uC,Object.defineProperty(yx,"__esModule",{value:!0});var SE=vx;yx.Encoder=SE.Encoder,yx.IncUintOptRleEncoder=SE.IncUintOptRleEncoder,yx.IntDiffEncoder=SE.IntDiffEncoder,yx.IntDiffOptRleEncoder=SE.IntDiffOptRleEncoder,yx.RleEncoder=SE.RleEncoder,yx.RleIntDiffEncoder=SE.RleIntDiffEncoder,yx.StringEncoder=SE.StringEncoder,yx.UintOptRleEncoder=SE.UintOptRleEncoder,yx._writeVarStringNative=SE._writeVarStringNative,yx._writeVarStringPolyfill=SE._writeVarStringPolyfill,yx.createEncoder=SE.createEncoder,yx.length=SE.length,yx.set=SE.set,yx.setUint16=SE.setUint16,yx.setUint32=SE.setUint32,yx.setUint8=SE.setUint8,yx.toUint8Array=SE.toUint8Array,yx.verifyLen=SE.verifyLen,yx.write=SE.write,yx.writeAny=SE.writeAny,yx.writeBigInt64=SE.writeBigInt64,yx.writeBigUint64=SE.writeBigUint64,yx.writeBinaryEncoder=SE.writeBinaryEncoder,yx.writeFloat32=SE.writeFloat32,yx.writeFloat64=SE.writeFloat64,yx.writeOnDataView=SE.writeOnDataView,yx.writeUint16=SE.writeUint16,yx.writeUint32=SE.writeUint32,yx.writeUint32BigEndian=SE.writeUint32BigEndian,yx.writeUint8=SE.writeUint8,yx.writeUint8Array=SE.writeUint8Array,yx.writeVarInt=SE.writeVarInt,yx.writeVarString=SE.writeVarString,yx.writeVarUint=SE.writeVarUint,yx.writeVarUint8Array=SE.writeVarUint8Array;var CE={};Object.defineProperty(CE,"__esModule",{value:!0});var EE=vx;CE.Decoder=EE.Decoder,CE.IncUintOptRleDecoder=EE.IncUintOptRleDecoder,CE.IntDiffDecoder=EE.IntDiffDecoder,CE.IntDiffOptRleDecoder=EE.IntDiffOptRleDecoder,CE.RleDecoder=EE.RleDecoder,CE.RleIntDiffDecoder=EE.RleIntDiffDecoder,CE.StringDecoder=EE.StringDecoder,CE.UintOptRleDecoder=EE.UintOptRleDecoder,CE._readVarStringNative=EE._readVarStringNative,CE._readVarStringPolyfill=EE._readVarStringPolyfill,CE.clone=EE.clone,CE.createDecoder=EE.createDecoder,CE.hasContent=EE.hasContent,CE.peekUint16=EE.peekUint16,CE.peekUint32=EE.peekUint32,CE.peekUint8=EE.peekUint8,CE.peekVarInt=EE.peekVarInt,CE.peekVarString=EE.peekVarString,CE.peekVarUint=EE.peekVarUint,CE.readAny=EE.readAny,CE.readBigInt64=EE.readBigInt64,CE.readBigUint64=EE.readBigUint64,CE.readFloat32=EE.readFloat32,CE.readFloat64=EE.readFloat64,CE.readFromDataView=EE.readFromDataView,CE.readTailAsUint8Array=EE.readTailAsUint8Array,CE.readUint16=EE.readUint16,CE.readUint32=EE.readUint32,CE.readUint32BigEndian=EE.readUint32BigEndian,CE.readUint8=EE.readUint8,CE.readUint8Array=EE.readUint8Array,CE.readVarInt=EE.readVarInt,CE.readVarString=EE.readVarString,CE.readVarUint=EE.readVarUint,CE.readVarUint8Array=EE.readVarUint8Array,CE.skip8=EE.skip8;var TE={},kE={};const NE="undefined"==typeof performance?null:performance,AE="undefined"==typeof crypto?null:crypto,OE=null!==AE?e=>{const t=new ArrayBuffer(e),n=new Uint8Array(t);return AE.getRandomValues(n),t}:e=>{const t=new ArrayBuffer(e),n=new Uint8Array(t);for(let r=0;r<e;r++)n[r]=Math.ceil(4294967295*Math.random()>>>0);return t};kE.performance=NE,kE.cryptoRandomBuffer=OE,Object.defineProperty(TE,"__esModule",{value:!0});var ME=Gw,RE=vS,DE=kE;const IE=Math.random,PE=()=>new Uint32Array(DE.cryptoRandomBuffer(4))[0],LE=[1e7]+-1e3+-4e3+-8e3+-1e11;TE.oneOf=e=>e[ME.floor(IE()*e.length)],TE.rand=IE,TE.uint32=PE,TE.uint53=()=>{const e=new Uint32Array(DE.cryptoRandomBuffer(8));return(e[0]&RE.BITS21)*(RE.BITS32+1)+(e[1]>>>0)},TE.uuidv4=()=>LE.replace(/[018]/g,(e=>(e^PE()&15>>e/4).toString(16)));var BE={},$E={},zE={};Object.defineProperty(zE,"__esModule",{value:!0});var FE=Gw;const UE=["","k","M","G","T","P","E","Z","Y"],HE=["","m","μ","n","p","f","a","z","y"];zE.atto=1e-18,zE.centi=.01,zE.deca=10,zE.deci=.1,zE.exa=1e18,zE.femto=1e-15,zE.giga=1e9,zE.hecto=100,zE.kilo=1e3,zE.mega=1e6,zE.micro=1e-6,zE.milli=.001,zE.nano=1e-9,zE.peta=1e15,zE.pico=1e-12,zE.prefix=(e,t=0)=>{const n=0===e?0:FE.log10(e);let r=0;for(;n<3*r&&t>-8;)t--,r--;for(;n>=3+3*r&&t<8;)t++,r++;const i=t<0?HE[-t]:UE[t];return{n:FE.round(1e12*(r>0?e/FE.exp10(3*r):e*FE.exp10(-3*r)))/1e12,prefix:i}},zE.tera=1e12,zE.yocto=1e-24,zE.yotta=1e24,zE.zepto=1e-21,zE.zetta=1e21;var VE=zE,qE=Gw;const KE=()=>new Date,WE=Date.now,jE=e=>{if(e<6e4){const t=VE.prefix(e,-1);return qE.round(100*t.n)/100+t.prefix+"s"}const t=(e=qE.floor(e/1e3))%60,n=qE.floor(e/60)%60,r=qE.floor(e/3600)%24,i=qE.floor(e/86400);return i>0?i+"d"+(r>0||n>30?" "+(n>30?r+1:r)+"h":""):r>0?r+"h"+(n>0||t>30?" "+(t>30?n+1:n)+"min":""):n+"min"+(t>0?" "+t+"s":"")};var YE=Object.freeze({__proto__:null,getDate:KE,getUnixTime:WE,humanizeDuration:jE});$E.getDate=KE,$E.getUnixTime=WE,$E.humanizeDuration=jE,$E.time=YE;var GE={},JE=$E;const XE=e=>new Promise(e),ZE=e=>new Promise(e),QE=e=>Promise.all(e),eT=e=>Promise.reject(e),tT=e=>Promise.resolve(e),nT=e=>Promise.resolve(e),rT=(e,t,n=10)=>XE(((r,i)=>{const o=JE.getUnixTime(),a=e>0,s=setInterval((()=>{t()?(clearInterval(s),r()):a&&JE.getUnixTime()-o>e&&(clearInterval(s),i(new Error("Timeout")))}),n)})),iT=e=>XE(((t,n)=>setTimeout(t,e))),oT=e=>e instanceof Promise||e&&e.then&&e.catch&&e.finally;var aT=Object.freeze({__proto__:null,create:XE,createEmpty:ZE,all:QE,reject:eT,resolve:tT,resolveWith:nT,until:rT,wait:iT,isPromise:oT});GE.all=QE,GE.create=XE,GE.createEmpty=ZE,GE.isPromise=oT,GE.promise=aT,GE.reject=eT,GE.resolve=tT,GE.resolveWith=nT,GE.until=rT,GE.wait=iT,Object.defineProperty(BE,"__esModule",{value:!0});var sT=GE;BE.all=sT.all,BE.create=sT.create,BE.createEmpty=sT.createEmpty,BE.isPromise=sT.isPromise,BE.reject=sT.reject,BE.resolve=sT.resolve,BE.resolveWith=sT.resolveWith,BE.until=sT.until,BE.wait=sT.wait;var lT={};Object.defineProperty(lT,"__esModule",{value:!0});var cT=vx;lT.copyUint8Array=cT.copyUint8Array,lT.createUint8ArrayFromArrayBuffer=cT.createUint8ArrayFromArrayBuffer,lT.createUint8ArrayFromLen=cT.createUint8ArrayFromLen,lT.createUint8ArrayViewFromArrayBuffer=cT.createUint8ArrayViewFromArrayBuffer,lT.decodeAny=cT.decodeAny,lT.encodeAny=cT.encodeAny,lT.fromBase64=cT.fromBase64,lT.toBase64=cT.toBase64;var uT={};Object.defineProperty(uT,"__esModule",{value:!0});var dT=OS;uT.create=dT.create,uT.methodUnimplemented=dT.methodUnimplemented,uT.unexpectedCase=dT.unexpectedCase;var hT={};Object.defineProperty(hT,"__esModule",{value:!0});var pT=vS;hT.BIT1=pT.BIT1,hT.BIT10=pT.BIT10,hT.BIT11=pT.BIT11,hT.BIT12=pT.BIT12,hT.BIT13=pT.BIT13,hT.BIT14=pT.BIT14,hT.BIT15=pT.BIT15,hT.BIT16=pT.BIT16,hT.BIT17=pT.BIT17,hT.BIT18=pT.BIT18,hT.BIT19=pT.BIT19,hT.BIT2=pT.BIT2,hT.BIT20=pT.BIT20,hT.BIT21=pT.BIT21,hT.BIT22=pT.BIT22,hT.BIT23=pT.BIT23,hT.BIT24=pT.BIT24,hT.BIT25=pT.BIT25,hT.BIT26=pT.BIT26,hT.BIT27=pT.BIT27,hT.BIT28=pT.BIT28,hT.BIT29=pT.BIT29,hT.BIT3=pT.BIT3,hT.BIT30=pT.BIT30,hT.BIT31=pT.BIT31,hT.BIT32=pT.BIT32,hT.BIT4=pT.BIT4,hT.BIT5=pT.BIT5,hT.BIT6=pT.BIT6,hT.BIT7=pT.BIT7,hT.BIT8=pT.BIT8,hT.BIT9=pT.BIT9,hT.BITS0=pT.BITS0,hT.BITS1=pT.BITS1,hT.BITS10=pT.BITS10,hT.BITS11=pT.BITS11,hT.BITS12=pT.BITS12,hT.BITS13=pT.BITS13,hT.BITS14=pT.BITS14,hT.BITS15=pT.BITS15,hT.BITS16=pT.BITS16,hT.BITS17=pT.BITS17,hT.BITS18=pT.BITS18,hT.BITS19=pT.BITS19,hT.BITS2=pT.BITS2,hT.BITS20=pT.BITS20,hT.BITS21=pT.BITS21,hT.BITS22=pT.BITS22,hT.BITS23=pT.BITS23,hT.BITS24=pT.BITS24,hT.BITS25=pT.BITS25,hT.BITS26=pT.BITS26,hT.BITS27=pT.BITS27,hT.BITS28=pT.BITS28,hT.BITS29=pT.BITS29,hT.BITS3=pT.BITS3,hT.BITS30=pT.BITS30,hT.BITS31=pT.BITS31,hT.BITS32=pT.BITS32,hT.BITS4=pT.BITS4,hT.BITS5=pT.BITS5,hT.BITS6=pT.BITS6,hT.BITS7=pT.BITS7,hT.BITS8=pT.BITS8,hT.BITS9=pT.BITS9;var fT={};Object.defineProperty(fT,"__esModule",{value:!0});var gT=Nx;fT.apply=gT.apply,fT.callAll=gT.callAll,fT.equalityDeep=gT.equalityDeep,fT.equalityFlat=gT.equalityFlat,fT.equalityStrict=gT.equalityStrict,fT.id=gT.id,fT.isOneOf=gT.isOneOf,fT.nop=gT.nop;var mT={};Object.defineProperty(mT,"__esModule",{value:!0});var yT=xw;mT.create=yT.create,mT.first=yT.first,mT.from=yT.from,mT.toArray=yT.toArray;var vT={},bT={};const _T=Symbol,wT=e=>"symbol"==typeof e;var xT=Object.freeze({__proto__:null,create:_T,isSymbol:wT});bT.create=_T,bT.isSymbol=wT,bT.symbol=xT;var ST={};class CT{constructor(e,t){this.left=e,this.right=t}}const ET=(e,t)=>new CT(e,t),TT=(e,t)=>new CT(t,e),kT=(e,t)=>e.forEach((e=>t(e.left,e.right))),NT=(e,t)=>e.map((e=>t(e.left,e.right)));var AT=Object.freeze({__proto__:null,Pair:CT,create:ET,createReversed:TT,forEach:kT,map:NT});ST.Pair=CT,ST.create=ET,ST.createReversed=TT,ST.forEach=kT,ST.map=NT,ST.pair=AT;var OT={},MT=ST,RT=fw;const DT="undefined"!=typeof document?document:{},IT=e=>DT.createElement(e),PT=()=>DT.createDocumentFragment(),LT=e=>DT.createTextNode(e),BT="undefined"!=typeof DOMParser?new DOMParser:null,$T=(e,t,n)=>e.dispatchEvent(new CustomEvent(t,n)),zT=(e,t)=>(MT.forEach(t,((t,n)=>{!1===n?e.removeAttribute(t):!0===n?e.setAttribute(t,""):e.setAttribute(t,n)})),e),FT=(e,t)=>(t.forEach(((t,n)=>{e.setAttribute(n,t)})),e),UT=e=>{const t=PT();for(let n=0;n<e.length;n++)lk(t,e[n]);return t},HT=(e,t)=>(lk(e,UT(t)),e),VT=e=>e.remove(),qT=(e,t,n)=>e.addEventListener(t,n),KT=(e,t,n)=>e.removeEventListener(t,n),WT=(e,t)=>(MT.forEach(t,((t,n)=>qT(e,t,n))),e),jT=(e,t)=>(MT.forEach(t,((t,n)=>KT(e,t,n))),e),YT=(e,t=[],n=[])=>HT(zT(IT(e),t),n),GT=(e,t)=>{const n=IT("canvas");return n.height=t,n.width=e,n},JT=LT,XT=e=>`${e.left}:${e.right};`,ZT=e=>e.map(XT).join(""),QT=e=>RT.map(e,((e,t)=>`${t}:${e};`)).join(""),ek=(e,t)=>e.querySelector(t),tk=(e,t)=>e.querySelectorAll(t),nk=e=>DT.getElementById(e),rk=e=>BT.parseFromString(`<html><body>${e}</body></html>`,"text/html").body,ik=e=>UT(rk(e).childNodes),ok=e=>rk(e).firstElementChild,ak=(e,t)=>e.replaceWith(t),sk=(e,t,n)=>e.insertBefore(t,n),lk=(e,t)=>e.appendChild(t),ck=DT.ELEMENT_NODE,uk=DT.TEXT_NODE,dk=DT.CDATA_SECTION_NODE,hk=DT.COMMENT_NODE,pk=DT.DOCUMENT_NODE,fk=DT.DOCUMENT_TYPE_NODE,gk=DT.DOCUMENT_FRAGMENT_NODE,mk=(e,t)=>e.nodeType===t,yk=(e,t)=>{let n=t.parentNode;for(;n&&n!==e;)n=n.parentNode;return n===e};var vk=Object.freeze({__proto__:null,doc:DT,createElement:IT,createDocumentFragment:PT,createTextNode:LT,domParser:BT,emitCustomEvent:$T,setAttributes:zT,setAttributesMap:FT,fragment:UT,append:HT,remove:VT,addEventListener:qT,removeEventListener:KT,addEventListeners:WT,removeEventListeners:jT,element:YT,canvas:GT,text:JT,pairToStyleString:XT,pairsToStyleString:ZT,mapToStyleString:QT,querySelector:ek,querySelectorAll:tk,getElementById:nk,parseFragment:ik,parseElement:ok,replaceWith:ak,insertBefore:sk,appendChild:lk,ELEMENT_NODE:ck,TEXT_NODE:uk,CDATA_SECTION_NODE:dk,COMMENT_NODE:hk,DOCUMENT_NODE:pk,DOCUMENT_TYPE_NODE:fk,DOCUMENT_FRAGMENT_NODE:gk,checkNodeType:mk,isParentOf:yk});OT.CDATA_SECTION_NODE=dk,OT.COMMENT_NODE=hk,OT.DOCUMENT_FRAGMENT_NODE=gk,OT.DOCUMENT_NODE=pk,OT.DOCUMENT_TYPE_NODE=fk,OT.ELEMENT_NODE=ck,OT.TEXT_NODE=uk,OT.addEventListener=qT,OT.addEventListeners=WT,OT.append=HT,OT.appendChild=lk,OT.canvas=GT,OT.checkNodeType=mk,OT.createDocumentFragment=PT,OT.createElement=IT,OT.createTextNode=LT,OT.doc=DT,OT.dom=vk,OT.domParser=BT,OT.element=YT,OT.emitCustomEvent=$T,OT.fragment=UT,OT.getElementById=nk,OT.insertBefore=sk,OT.isParentOf=yk,OT.mapToStyleString=QT,OT.pairToStyleString=XT,OT.pairsToStyleString=ZT,OT.parseElement=ok,OT.parseFragment=ik,OT.querySelector=ek,OT.querySelectorAll=tk,OT.remove=VT,OT.removeEventListener=KT,OT.removeEventListeners=jT,OT.replaceWith=ak,OT.setAttributes=zT,OT.setAttributesMap=FT,OT.text=JT;var bk={};const _k=JSON.stringify,wk=JSON.parse;var xk=Object.freeze({__proto__:null,stringify:_k,parse:wk});bk.json=xk,bk.parse=wk,bk.stringify=_k;var Sk={};let Ck=[];const Ek=()=>{for(let e=0;e<Ck.length;e++)Ck[e]();Ck=[]},Tk=e=>{Ck.push(e),1===Ck.length&&setTimeout(Ek,0)},kk=e=>class{constructor(e){this._=e}destroy(){e(this._)}},Nk=kk(clearTimeout),Ak=(e,t)=>new Nk(setTimeout(t,e)),Ok=kk(clearInterval),Mk=(e,t)=>new Ok(setInterval(t,e)),Rk=kk((e=>"undefined"!=typeof requestAnimationFrame&&cancelAnimationFrame(e))),Dk=e=>"undefined"==typeof requestAnimationFrame?Ak(0,e):new Rk(requestAnimationFrame(e)),Ik=kk((e=>"undefined"!=typeof cancelIdleCallback&&cancelIdleCallback(e))),Pk=e=>"undefined"!=typeof requestIdleCallback?new Ik(requestIdleCallback(e)):Ak(1e3,e),Lk=e=>{let t=-1;return n=>{clearTimeout(t),n&&(t=setTimeout(n,e))}};var Bk=Object.freeze({__proto__:null,enqueue:Tk,timeout:Ak,interval:Mk,Animation:Rk,animationFrame:Dk,idleCallback:Pk,createDebouncer:Lk});Sk.Animation=Rk,Sk.animationFrame=Dk,Sk.createDebouncer=Lk,Sk.enqueue=Tk,Sk.eventloop=Bk,Sk.idleCallback=Pk,Sk.interval=Mk,Sk.timeout=Ak;var $k={},zk=_x,Fk=xw,Uk=bT,Hk=ST,Vk=OT,qk=bk,Kk=fw,Wk=Sk,jk=Gw,Yk=$E,Gk=Nx;const Jk=Uk.create(),Xk=Uk.create(),Zk=Uk.create(),Qk=Uk.create(),eN=Uk.create(),tN=Uk.create(),nN=Uk.create(),rN=Uk.create(),iN=Uk.create(),oN={[Jk]:Hk.create("font-weight","bold"),[Xk]:Hk.create("font-weight","normal"),[Zk]:Hk.create("color","blue"),[eN]:Hk.create("color","green"),[Qk]:Hk.create("color","grey"),[tN]:Hk.create("color","red"),[nN]:Hk.create("color","purple"),[rN]:Hk.create("color","orange"),[iN]:Hk.create("color","black")},aN={[Jk]:"[1m",[Xk]:"[2m",[Zk]:"[34m",[eN]:"[32m",[Qk]:"[37m",[tN]:"[31m",[nN]:"[35m",[rN]:"[38;5;208m",[iN]:"[0m"},sN=zk.supportsColor?zk.isNode?e=>{const t=[],n=[];let r=0;for(;r<e.length;r++){const n=e[r],i=aN[n];if(void 0!==i)t.push(i);else{if(n.constructor!==String&&n.constructor!==Number)break;t.push(n)}}for(r>0&&(t.push("[0m"),n.push(t.join("")));r<e.length;r++){const t=e[r];t instanceof Symbol||n.push(t)}return n}:e=>{const t=[],n=[],r=Kk.create();let i=[],o=0;for(;o<e.length;o++){const i=e[o],a=oN[i];if(void 0!==a)r.set(a.left,a.right);else{if(i.constructor!==String&&i.constructor!==Number)break;{const e=Vk.mapToStyleString(r);o>0||e.length>0?(t.push("%c"+i),n.push(e)):t.push(i)}}}for(o>0&&(i=n,i.unshift(t.join("")));o<e.length;o++){const t=e[o];t instanceof Symbol||i.push(t)}return i}:e=>{const t=[],n=[];let r=0;for(;r<e.length;r++){const n=e[r];if(void 0===aN[n]){if(n.constructor!==String&&n.constructor!==Number)break;t.push(n)}}for(r>0&&n.push(t.join(""));r<e.length;r++){const t=e[r];t instanceof Symbol||(t.constructor===Object?n.push(JSON.stringify(t)):n.push(t))}return n},lN=(...e)=>{console.log(...sN(e)),vN.forEach((t=>t.print(e)))},cN=(...e)=>{console.warn(...sN(e)),e.unshift(rN),vN.forEach((t=>t.print(e)))},uN=e=>{console.error(e),vN.forEach((t=>t.printError(e)))},dN=(e,t)=>{zk.isBrowser&&console.log("%c ",`font-size: ${t}px; background-size: contain; background-repeat: no-repeat; background-image: url(${e})`),vN.forEach((n=>n.printImg(e,t)))},hN=(e,t)=>dN(`data:image/gif;base64,${e}`,t),pN=(...e)=>{console.group(...sN(e)),vN.forEach((t=>t.group(e)))},fN=(...e)=>{console.groupCollapsed(...sN(e)),vN.forEach((t=>t.groupCollapsed(e)))},gN=()=>{console.groupEnd(),vN.forEach((e=>e.groupEnd()))},mN=e=>vN.forEach((t=>t.printDom(e()))),yN=(e,t)=>dN(e.toDataURL(),t),vN=Fk.create(),bN=e=>{const t=[],n=new Map;let r=0;for(;r<e.length;r++){const i=e[r],o=oN[i];if(void 0!==o)n.set(o.left,o.right);else{if(i.constructor!==String&&i.constructor!==Number)break;{const e=Vk.element("span",[Hk.create("style",Vk.mapToStyleString(n))],[Vk.text(i.toString())]);""===e.innerHTML&&(e.innerHTML=" "),t.push(e)}}}for(;r<e.length;r++){let n=e[r];n instanceof Symbol||(n.constructor!==String&&n.constructor!==Number&&(n=" "+qk.stringify(n)+" "),t.push(Vk.element("span",[],[Vk.text(n)])))}return t},_N="font-family:monospace;border-bottom:1px solid #e2e2e2;padding:2px;";class wN{constructor(e){this.dom=e,this.ccontainer=this.dom,this.depth=0,vN.add(this)}group(e,t=!1){Wk.enqueue((()=>{const n=Vk.element("span",[Hk.create("hidden",t),Hk.create("style","color:grey;font-size:120%;")],[Vk.text("▼")]),r=Vk.element("span",[Hk.create("hidden",!t),Hk.create("style","color:grey;font-size:125%;")],[Vk.text("▶")]),i=Vk.element("div",[Hk.create("style",`${_N};padding-left:${10*this.depth}px`)],[n,r,Vk.text(" ")].concat(bN(e))),o=Vk.element("div",[Hk.create("hidden",t)]),a=Vk.element("div",[],[i,o]);Vk.append(this.ccontainer,[a]),this.ccontainer=o,this.depth++,Vk.addEventListener(i,"click",(e=>{o.toggleAttribute("hidden"),n.toggleAttribute("hidden"),r.toggleAttribute("hidden")}))}))}groupCollapsed(e){this.group(e,!0)}groupEnd(){Wk.enqueue((()=>{this.depth>0&&(this.depth--,this.ccontainer=this.ccontainer.parentElement.parentElement)}))}print(e){Wk.enqueue((()=>{Vk.append(this.ccontainer,[Vk.element("div",[Hk.create("style",`${_N};padding-left:${10*this.depth}px`)],bN(e))])}))}printError(e){this.print([tN,Jk,e.toString()])}printImg(e,t){Wk.enqueue((()=>{Vk.append(this.ccontainer,[Vk.element("img",[Hk.create("src",e),Hk.create("height",`${jk.round(1.5*t)}px`)])])}))}printDom(e){Wk.enqueue((()=>{Vk.append(this.ccontainer,[e])}))}destroy(){Wk.enqueue((()=>{vN.delete(this)}))}}const xN=e=>new wN(e),SN=[eN,nN,rN,Zk];let CN=0,EN=Yk.getUnixTime();const TN=e=>{const t=SN[CN],n=zk.getVariable("log"),r=null!==n&&("*"===n||"true"===n||new RegExp(n,"gi").test(e));return CN=(CN+1)%SN.length,e+=": ",r?(...n)=>{const r=Yk.getUnixTime(),i=r-EN;EN=r,lN(t,e,iN,...n.map((e=>"string"==typeof e||"symbol"==typeof e?e:JSON.stringify(e))),t," +"+i+"ms")}:Gk.nop};var kN=Object.freeze({__proto__:null,BOLD:Jk,UNBOLD:Xk,BLUE:Zk,GREY:Qk,GREEN:eN,RED:tN,PURPLE:nN,ORANGE:rN,UNCOLOR:iN,print:lN,warn:cN,printError:uN,printImg:dN,printImgBase64:hN,group:pN,groupCollapsed:fN,groupEnd:gN,printDom:mN,printCanvas:yN,vconsoles:vN,VConsole:wN,createVConsole:xN,createModuleLogger:TN});$k.BLUE=Zk,$k.BOLD=Jk,$k.GREEN=eN,$k.GREY=Qk,$k.ORANGE=rN,$k.PURPLE=nN,$k.RED=tN,$k.UNBOLD=Xk,$k.UNCOLOR=iN,$k.VConsole=wN,$k.createModuleLogger=TN,$k.createVConsole=xN,$k.group=pN,$k.groupCollapsed=fN,$k.groupEnd=gN,$k.logging=kN,$k.print=lN,$k.printCanvas=yN,$k.printDom=mN,$k.printError=uN,$k.printImg=dN,$k.printImgBase64=hN,$k.vconsoles=vN,$k.warn=cN,Object.defineProperty(vT,"__esModule",{value:!0});var NN=$k;vT.BLUE=NN.BLUE,vT.BOLD=NN.BOLD,vT.GREEN=NN.GREEN,vT.GREY=NN.GREY,vT.ORANGE=NN.ORANGE,vT.PURPLE=NN.PURPLE,vT.RED=NN.RED,vT.UNBOLD=NN.UNBOLD,vT.UNCOLOR=NN.UNCOLOR,vT.VConsole=NN.VConsole,vT.createModuleLogger=NN.createModuleLogger,vT.createVConsole=NN.createVConsole,vT.group=NN.group,vT.groupCollapsed=NN.groupCollapsed,vT.groupEnd=NN.groupEnd,vT.print=NN.print,vT.printCanvas=NN.printCanvas,vT.printDom=NN.printDom,vT.printError=NN.printError,vT.printImg=NN.printImg,vT.printImgBase64=NN.printImgBase64,vT.vconsoles=NN.vconsoles,vT.warn=NN.warn;var AN={};Object.defineProperty(AN,"__esModule",{value:!0});var ON=$E;AN.getDate=ON.getDate,AN.getUnixTime=ON.getUnixTime,AN.humanizeDuration=ON.humanizeDuration;var MN={},RN={};const DN=(e,t)=>({[Symbol.iterator](){return this},next(){const n=e.next();return{value:n.done?void 0:t(n.value),done:n.done}}}),IN=e=>({[Symbol.iterator](){return this},next:e}),PN=(e,t)=>IN((()=>{let n;do{n=e.next()}while(!n.done&&!t(n.value));return n})),LN=(e,t)=>IN((()=>{const{done:n,value:r}=e.next();return{done:n,value:n?void 0:t(r)}}));var BN=Object.freeze({__proto__:null,mapIterator:DN,createIterator:IN,iteratorFilter:PN,iteratorMap:LN});RN.createIterator=IN,RN.iterator=BN,RN.iteratorFilter=PN,RN.iteratorMap=LN,RN.mapIterator=DN,Object.defineProperty(MN,"__esModule",{value:!0});var $N=RN;MN.createIterator=$N.createIterator,MN.iteratorFilter=$N.iteratorFilter,MN.iteratorMap=$N.iteratorMap,MN.mapIterator=$N.mapIterator;var zN={};Object.defineProperty(zN,"__esModule",{value:!0});var FN=Ax;zN.assign=FN.assign,zN.create=FN.create,zN.equalFlat=FN.equalFlat,zN.every=FN.every,zN.forEach=FN.forEach,zN.hasProperty=FN.hasProperty,zN.isEmpty=FN.isEmpty,zN.keys=FN.keys,zN.length=FN.length,zN.map=FN.map,zN.some=FN.some,Object.defineProperty(hw,"__esModule",{value:!0});var UN=pw,HN=Yw,VN=gx,qN=yx,KN=CE,WN=TE,jN=BE,YN=lT,GN=uT,JN=hT,XN=fT,ZN=mT,QN=vT,eA=AN,tA=MN,nA=zN;function rA(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var iA=rA(Ww),oA=rA(HN),aA=rA(VN),sA=rA(qN),lA=rA(KN),cA=rA(WN),uA=rA(jN),dA=rA(YN),hA=rA(GN),pA=rA(JN),fA=rA(XN),gA=rA(ZN),mA=rA(QN),yA=rA(eA),vA=rA(tA),bA=rA(nA);class _A extends UN.Observable{constructor(e,t){super(),this.doc=e,this.awareness=t}}class wA{constructor(e,t){this.clock=e,this.len=t}}class xA{constructor(){this.clients=new Map}}const SA=(e,t,n)=>t.clients.forEach(((t,r)=>{const i=e.doc.store.clients.get(r);for(let o=0;o<t.length;o++){const r=t[o];NO(e,i,r.clock,r.len,n)}})),CA=(e,t)=>{const n=e.clients.get(t.client);return void 0!==n&&null!==((e,t)=>{let n=0,r=e.length-1;for(;n<=r;){const i=oA.floor((n+r)/2),o=e[i],a=o.clock;if(a<=t){if(t<a+o.len)return i;n=i+1}else r=i-1}return null})(n,t.clock)},EA=e=>{e.clients.forEach((e=>{let t,n;for(e.sort(((e,t)=>e.clock-t.clock)),t=1,n=1;t<e.length;t++){const r=e[n-1],i=e[t];r.clock+r.len>=i.clock?r.len=oA.max(r.len,i.clock+i.len-r.clock):(n<t&&(e[n]=i),n++)}e.length=n}))},TA=e=>{const t=new xA;for(let n=0;n<e.length;n++)e[n].clients.forEach(((r,i)=>{if(!t.clients.has(i)){const o=r.slice();for(let t=n+1;t<e.length;t++)iA.appendTo(o,e[t].clients.get(i)||[]);t.clients.set(i,o)}}));return EA(t),t},kA=(e,t,n,r)=>{aA.setIfUndefined(e.clients,t,(()=>[])).push(new wA(n,r))},NA=()=>new xA,AA=e=>{const t=NA();return e.clients.forEach(((e,n)=>{const r=[];for(let t=0;t<e.length;t++){const n=e[t];if(n.deleted){const i=n.id.clock;let o=n.length;if(t+1<e.length)for(let n=e[t+1];t+1<e.length&&n.deleted;n=e[1+ ++t])o+=n.length;r.push(new wA(i,o))}}r.length>0&&t.clients.set(n,r)})),t},OA=(e,t)=>{sA.writeVarUint(e.restEncoder,t.clients.size),iA.from(t.clients.entries()).sort(((e,t)=>t[0]-e[0])).forEach((([t,n])=>{e.resetDsCurVal(),sA.writeVarUint(e.restEncoder,t);const r=n.length;sA.writeVarUint(e.restEncoder,r);for(let i=0;i<r;i++){const t=n[i];e.writeDsClock(t.clock),e.writeDsLen(t.len)}}))},MA=e=>{const t=new xA,n=lA.readVarUint(e.restDecoder);for(let r=0;r<n;r++){e.resetDsCurVal();const n=lA.readVarUint(e.restDecoder),r=lA.readVarUint(e.restDecoder);if(r>0){const i=aA.setIfUndefined(t.clients,n,(()=>[]));for(let t=0;t<r;t++)i.push(new wA(e.readDsClock(),e.readDsLen()))}}return t},RA=(e,t,n)=>{const r=new xA,i=lA.readVarUint(e.restDecoder);for(let o=0;o<i;o++){e.resetDsCurVal();const i=lA.readVarUint(e.restDecoder),o=lA.readVarUint(e.restDecoder),a=n.clients.get(i)||[],s=wO(n,i);for(let n=0;n<o;n++){const n=e.readDsClock(),o=n+e.readDsLen();if(n<s){s<o&&kA(r,i,s,o-s);let e=SO(a,n),l=a[e];for(!l.deleted&&l.id.clock<n&&(a.splice(e+1,0,_R(t,l,n-l.id.clock)),e++);e<a.length&&(l=a[e++],l.id.clock<o);)l.deleted||(o<l.id.clock+l.length&&a.splice(e,0,_R(t,l,o-l.id.clock)),l.delete(t))}else kA(r,i,n,o-n)}}if(r.clients.size>0){const e=new HA;return sA.writeVarUint(e.restEncoder,0),OA(e,r),e.toUint8Array()}return null},DA=cA.uint32;class IA extends UN.Observable{constructor({guid:e=cA.uuidv4(),collectionid:t=null,gc:n=!0,gcFilter:r=(()=>!0),meta:i=null,autoLoad:o=!1,shouldLoad:a=!0}={}){super(),this.gc=n,this.gcFilter=r,this.clientID=DA(),this.guid=e,this.collectionid=t,this.share=new Map,this.store=new bO,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=a,this.autoLoad=o,this.meta=i,this.isLoaded=!1,this.isSynced=!1,this.whenLoaded=uA.create((e=>{this.on("load",(()=>{this.isLoaded=!0,e(this)}))}));const s=()=>uA.create((e=>{const t=n=>{void 0!==n&&!0!==n||(this.off("sync",t),e())};this.on("sync",t)}));this.on("sync",(e=>{!1===e&&this.isSynced&&(this.whenSynced=s()),this.isSynced=void 0===e||!0===e,this.isLoaded||this.emit("load",[])})),this.whenSynced=s()}load(){const e=this._item;null===e||this.shouldLoad||LO(e.parent.doc,(e=>{e.subdocsLoaded.add(this)}),null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(iA.from(this.subdocs).map((e=>e.guid)))}transact(e,t=null){return LO(this,e,t)}get(e,t=uM){const n=aA.setIfUndefined(this.share,e,(()=>{const e=new t;return e._integrate(this,null),e})),r=n.constructor;if(t!==uM&&r!==t){if(r===uM){const r=new t;r._map=n._map,n._map.forEach((e=>{for(;null!==e;e=e.left)e.parent=r})),r._start=n._start;for(let e=r._start;null!==e;e=e.right)e.parent=r;return r._length=n._length,this.share.set(e,r),r._integrate(this,null),r}throw new Error(`Type with the name ${e} has already been defined with a different constructor`)}return n}getArray(e=""){return this.get(e,NM)}getText(e=""){return this.get(e,KM)}getMap(e=""){return this.get(e,OM)}getXmlFragment(e=""){return this.get(e,jM)}toJSON(){const e={};return this.share.forEach(((t,n)=>{e[n]=t.toJSON()})),e}destroy(){iA.from(this.subdocs).forEach((e=>e.destroy()));const e=this._item;if(null!==e){this._item=null;const t=e.content;t.doc=new IA({guid:this.guid,...t.opts,shouldLoad:!1}),t.doc._item=e,LO(e.parent.doc,(n=>{const r=t.doc;e.deleted||n.subdocsAdded.add(r),n.subdocsRemoved.add(this)}),null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),super.destroy()}on(e,t){super.on(e,t)}off(e,t){super.off(e,t)}}class PA{constructor(e){this.restDecoder=e}resetDsCurVal(){}readDsClock(){return lA.readVarUint(this.restDecoder)}readDsLen(){return lA.readVarUint(this.restDecoder)}}class LA extends PA{readLeftID(){return iO(lA.readVarUint(this.restDecoder),lA.readVarUint(this.restDecoder))}readRightID(){return iO(lA.readVarUint(this.restDecoder),lA.readVarUint(this.restDecoder))}readClient(){return lA.readVarUint(this.restDecoder)}readInfo(){return lA.readUint8(this.restDecoder)}readString(){return lA.readVarString(this.restDecoder)}readParentInfo(){return 1===lA.readVarUint(this.restDecoder)}readTypeRef(){return lA.readVarUint(this.restDecoder)}readLen(){return lA.readVarUint(this.restDecoder)}readAny(){return lA.readAny(this.restDecoder)}readBuf(){return dA.copyUint8Array(lA.readVarUint8Array(this.restDecoder))}readJSON(){return JSON.parse(lA.readVarString(this.restDecoder))}readKey(){return lA.readVarString(this.restDecoder)}}class BA{constructor(e){this.dsCurrVal=0,this.restDecoder=e}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=lA.readVarUint(this.restDecoder),this.dsCurrVal}readDsLen(){const e=lA.readVarUint(this.restDecoder)+1;return this.dsCurrVal+=e,e}}class $A extends BA{constructor(e){super(e),this.keys=[],lA.readVarUint(e),this.keyClockDecoder=new lA.IntDiffOptRleDecoder(lA.readVarUint8Array(e)),this.clientDecoder=new lA.UintOptRleDecoder(lA.readVarUint8Array(e)),this.leftClockDecoder=new lA.IntDiffOptRleDecoder(lA.readVarUint8Array(e)),this.rightClockDecoder=new lA.IntDiffOptRleDecoder(lA.readVarUint8Array(e)),this.infoDecoder=new lA.RleDecoder(lA.readVarUint8Array(e),lA.readUint8),this.stringDecoder=new lA.StringDecoder(lA.readVarUint8Array(e)),this.parentInfoDecoder=new lA.RleDecoder(lA.readVarUint8Array(e),lA.readUint8),this.typeRefDecoder=new lA.UintOptRleDecoder(lA.readVarUint8Array(e)),this.lenDecoder=new lA.UintOptRleDecoder(lA.readVarUint8Array(e))}readLeftID(){return new nO(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new nO(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return 1===this.parentInfoDecoder.read()}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return lA.readAny(this.restDecoder)}readBuf(){return lA.readVarUint8Array(this.restDecoder)}readJSON(){return lA.readAny(this.restDecoder)}readKey(){const e=this.keyClockDecoder.read();if(e<this.keys.length)return this.keys[e];{const e=this.stringDecoder.read();return this.keys.push(e),e}}}class zA{constructor(){this.restEncoder=sA.createEncoder()}toUint8Array(){return sA.toUint8Array(this.restEncoder)}resetDsCurVal(){}writeDsClock(e){sA.writeVarUint(this.restEncoder,e)}writeDsLen(e){sA.writeVarUint(this.restEncoder,e)}}class FA extends zA{writeLeftID(e){sA.writeVarUint(this.restEncoder,e.client),sA.writeVarUint(this.restEncoder,e.clock)}writeRightID(e){sA.writeVarUint(this.restEncoder,e.client),sA.writeVarUint(this.restEncoder,e.clock)}writeClient(e){sA.writeVarUint(this.restEncoder,e)}writeInfo(e){sA.writeUint8(this.restEncoder,e)}writeString(e){sA.writeVarString(this.restEncoder,e)}writeParentInfo(e){sA.writeVarUint(this.restEncoder,e?1:0)}writeTypeRef(e){sA.writeVarUint(this.restEncoder,e)}writeLen(e){sA.writeVarUint(this.restEncoder,e)}writeAny(e){sA.writeAny(this.restEncoder,e)}writeBuf(e){sA.writeVarUint8Array(this.restEncoder,e)}writeJSON(e){sA.writeVarString(this.restEncoder,JSON.stringify(e))}writeKey(e){sA.writeVarString(this.restEncoder,e)}}class UA{constructor(){this.restEncoder=sA.createEncoder(),this.dsCurrVal=0}toUint8Array(){return sA.toUint8Array(this.restEncoder)}resetDsCurVal(){this.dsCurrVal=0}writeDsClock(e){const t=e-this.dsCurrVal;this.dsCurrVal=e,sA.writeVarUint(this.restEncoder,t)}writeDsLen(e){0===e&&hA.unexpectedCase(),sA.writeVarUint(this.restEncoder,e-1),this.dsCurrVal+=e}}class HA extends UA{constructor(){super(),this.keyMap=new Map,this.keyClock=0,this.keyClockEncoder=new sA.IntDiffOptRleEncoder,this.clientEncoder=new sA.UintOptRleEncoder,this.leftClockEncoder=new sA.IntDiffOptRleEncoder,this.rightClockEncoder=new sA.IntDiffOptRleEncoder,this.infoEncoder=new sA.RleEncoder(sA.writeUint8),this.stringEncoder=new sA.StringEncoder,this.parentInfoEncoder=new sA.RleEncoder(sA.writeUint8),this.typeRefEncoder=new sA.UintOptRleEncoder,this.lenEncoder=new sA.UintOptRleEncoder}toUint8Array(){const e=sA.createEncoder();return sA.writeVarUint(e,0),sA.writeVarUint8Array(e,this.keyClockEncoder.toUint8Array()),sA.writeVarUint8Array(e,this.clientEncoder.toUint8Array()),sA.writeVarUint8Array(e,this.leftClockEncoder.toUint8Array()),sA.writeVarUint8Array(e,this.rightClockEncoder.toUint8Array()),sA.writeVarUint8Array(e,sA.toUint8Array(this.infoEncoder)),sA.writeVarUint8Array(e,this.stringEncoder.toUint8Array()),sA.writeVarUint8Array(e,sA.toUint8Array(this.parentInfoEncoder)),sA.writeVarUint8Array(e,this.typeRefEncoder.toUint8Array()),sA.writeVarUint8Array(e,this.lenEncoder.toUint8Array()),sA.writeUint8Array(e,sA.toUint8Array(this.restEncoder)),sA.toUint8Array(e)}writeLeftID(e){this.clientEncoder.write(e.client),this.leftClockEncoder.write(e.clock)}writeRightID(e){this.clientEncoder.write(e.client),this.rightClockEncoder.write(e.clock)}writeClient(e){this.clientEncoder.write(e)}writeInfo(e){this.infoEncoder.write(e)}writeString(e){this.stringEncoder.write(e)}writeParentInfo(e){this.parentInfoEncoder.write(e?1:0)}writeTypeRef(e){this.typeRefEncoder.write(e)}writeLen(e){this.lenEncoder.write(e)}writeAny(e){sA.writeAny(this.restEncoder,e)}writeBuf(e){sA.writeVarUint8Array(this.restEncoder,e)}writeJSON(e){sA.writeAny(this.restEncoder,e)}writeKey(e){const t=this.keyMap.get(e);void 0===t?(this.keyClockEncoder.write(this.keyClock++),this.stringEncoder.write(e)):this.keyClockEncoder.write(t)}}const VA=(e,t,n)=>{const r=new Map;n.forEach(((e,n)=>{wO(t,n)>e&&r.set(n,e)})),_O(t).forEach(((e,t)=>{n.has(t)||r.set(t,0)})),sA.writeVarUint(e.restEncoder,r.size),iA.from(r.entries()).sort(((e,t)=>t[0]-e[0])).forEach((([n,r])=>{((e,t,n,r)=>{r=oA.max(r,t[0].id.clock);const i=SO(t,r);sA.writeVarUint(e.restEncoder,t.length-i),e.writeClient(n),sA.writeVarUint(e.restEncoder,r);const o=t[i];o.write(e,r-o.id.clock);for(let a=i+1;a<t.length;a++)t[a].write(e,0)})(e,t.clients.get(n),n,r)}))},qA=(e,t,n,r=new $A(e))=>LO(t,(e=>{e.local=!1;let t=!1;const n=e.doc,i=n.store,o=((e,t)=>{const n=aA.create(),r=lA.readVarUint(e.restDecoder);for(let i=0;i<r;i++){const r=lA.readVarUint(e.restDecoder),i=new Array(r),o=e.readClient();let a=lA.readVarUint(e.restDecoder);n.set(o,{i:0,refs:i});for(let n=0;n<r;n++){const r=e.readInfo();switch(pA.BITS5&r){case 0:{const t=e.readLen();i[n]=new QM(iO(o,a),t),a+=t;break}case 10:{const t=lA.readVarUint(e.restDecoder);i[n]=new ER(iO(o,a),t),a+=t;break}default:{const s=0==(r&(pA.BIT7|pA.BIT8)),l=new xR(iO(o,a),null,(r&pA.BIT8)===pA.BIT8?e.readLeftID():null,null,(r&pA.BIT7)===pA.BIT7?e.readRightID():null,s?e.readParentInfo()?t.get(e.readString()):e.readLeftID():null,s&&(r&pA.BIT6)===pA.BIT6?e.readString():null,SR(e,r));i[n]=l,a+=l.length}}}}return n})(r,n),a=((e,t,n)=>{const r=[];let i=iA.from(n.keys()).sort(((e,t)=>e-t));if(0===i.length)return null;const o=()=>{if(0===i.length)return null;let e=n.get(i[i.length-1]);for(;e.refs.length===e.i;){if(i.pop(),!(i.length>0))return null;e=n.get(i[i.length-1])}return e};let a=o();if(null===a&&0===r.length)return null;const s=new bO,l=new Map,c=(e,t)=>{const n=l.get(e);(null==n||n>t)&&l.set(e,t)};let u=a.refs[a.i++];const d=new Map,h=()=>{for(const e of r){const t=e.id.client,r=n.get(t);r?(r.i--,s.clients.set(t,r.refs.slice(r.i)),n.delete(t),r.i=0,r.refs=[]):s.clients.set(t,[e]),i=i.filter((e=>e!==t))}r.length=0};for(;;){if(u.constructor!==ER){const i=aA.setIfUndefined(d,u.id.client,(()=>wO(t,u.id.client)))-u.id.clock;if(i<0)r.push(u),c(u.id.client,u.id.clock-1),h();else{const o=u.getMissing(e,t);if(null!==o){r.push(u);const e=n.get(o)||{refs:[],i:0};if(e.refs.length!==e.i){u=e.refs[e.i++];continue}c(o,wO(t,o)),h()}else(0===i||i<u.length)&&(u.integrate(e,i),d.set(u.id.client,u.id.clock+u.length))}}if(r.length>0)u=r.pop();else if(null!==a&&a.i<a.refs.length)u=a.refs[a.i++];else{if(a=o(),null===a)break;u=a.refs[a.i++]}}if(s.clients.size>0){const e=new HA;return VA(e,s,new Map),sA.writeVarUint(e.restEncoder,0),{missing:l,update:e.toUint8Array()}}return null})(e,i,o),s=i.pendingStructs;if(s){for(const[e,n]of s.missing)if(n<wO(i,e)){t=!0;break}if(a){for(const[e,t]of a.missing){const n=s.missing.get(e);(null==n||n>t)&&s.missing.set(e,t)}s.update=GO([s.update,a.update])}}else i.pendingStructs=a;const l=RA(r,e,i);if(i.pendingDs){const t=new $A(lA.createDecoder(i.pendingDs));lA.readVarUint(t.restDecoder);const n=RA(t,e,i);i.pendingDs=l&&n?GO([l,n]):l||n}else i.pendingDs=l;if(t){const t=i.pendingStructs.update;i.pendingStructs=null,KA(e.doc,t)}}),n,!1),KA=(e,t,n,r=$A)=>{const i=lA.createDecoder(t);qA(i,e,n,new r(i))},WA=(e,t=new Uint8Array([0]),n=new HA)=>{((e,t,n=new Map)=>{VA(e,t.store,n),OA(e,AA(t.store))})(n,e,YA(t));const r=[n.toUint8Array()];if(e.store.pendingDs&&r.push(e.store.pendingDs),e.store.pendingStructs&&r.push(JO(e.store.pendingStructs.update,t)),r.length>1){if(n.constructor===FA)return KO(r.map(((e,t)=>0===t?e:tM(e))));if(n.constructor===HA)return GO(r)}return r[0]},jA=e=>{const t=new Map,n=lA.readVarUint(e.restDecoder);for(let r=0;r<n;r++){const n=lA.readVarUint(e.restDecoder),r=lA.readVarUint(e.restDecoder);t.set(n,r)}return t},YA=e=>jA(new PA(lA.createDecoder(e))),GA=(e,t)=>(sA.writeVarUint(e.restEncoder,t.size),iA.from(t.entries()).sort(((e,t)=>t[0]-e[0])).forEach((([t,n])=>{sA.writeVarUint(e.restEncoder,t),sA.writeVarUint(e.restEncoder,n)})),e),JA=(e,t=new UA)=>(e instanceof Map?GA(t,e):((e,t)=>{GA(e,_O(t.store))})(t,e),t.toUint8Array());class XA{constructor(){this.l=[]}}const ZA=()=>new XA,QA=(e,t)=>e.l.push(t),eO=(e,t)=>{const n=e.l,r=n.length;e.l=n.filter((e=>t!==e)),r===e.l.length&&console.error("[yjs] Tried to remove event handler that doesn't exist.")},tO=(e,t,n)=>fA.callAll(e.l,[t,n]);class nO{constructor(e,t){this.client=e,this.clock=t}}const rO=(e,t)=>e===t||null!==e&&null!==t&&e.client===t.client&&e.clock===t.clock,iO=(e,t)=>new nO(e,t),oO=(e,t)=>{sA.writeVarUint(e,t.client),sA.writeVarUint(e,t.clock)},aO=e=>iO(lA.readVarUint(e),lA.readVarUint(e)),sO=e=>{for(const[t,n]of e.doc.share.entries())if(n===e)return t;throw hA.unexpectedCase()},lO=(e,t)=>{for(;null!==t;){if(t.parent===e)return!0;t=t.parent._item}return!1};class cO{constructor(e,t,n,r=0){this.type=e,this.tname=t,this.item=n,this.assoc=r}}class uO{constructor(e,t,n=0){this.type=e,this.index=t,this.assoc=n}}const dO=(e,t,n)=>{let r=null,i=null;return null===e._item?i=sO(e):r=iO(e._item.id.client,e._item.id.clock),new cO(r,i,t,n)};class hO{constructor(e,t){this.ds=e,this.sv=t}}const pO=(e,t=new UA)=>(OA(t,e.ds),GA(t,e.sv),t.toUint8Array()),fO=(e,t=new BA(lA.createDecoder(e)))=>new hO(MA(t),jA(t)),gO=(e,t)=>new hO(e,t),mO=gO(NA(),new Map),yO=(e,t)=>void 0===t?!e.deleted:t.sv.has(e.id.client)&&(t.sv.get(e.id.client)||0)>e.id.clock&&!CA(t.ds,e.id),vO=(e,t)=>{const n=aA.setIfUndefined(e.meta,vO,gA.create),r=e.doc.store;n.has(t)||(t.sv.forEach(((t,n)=>{t<wO(r,n)&&TO(e,iO(n,t))})),SA(e,t.ds,(e=>{})),n.add(t))};class bO{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const _O=e=>{const t=new Map;return e.clients.forEach(((e,n)=>{const r=e[e.length-1];t.set(n,r.id.clock+r.length)})),t},wO=(e,t)=>{const n=e.clients.get(t);if(void 0===n)return 0;const r=n[n.length-1];return r.id.clock+r.length},xO=(e,t)=>{let n=e.clients.get(t.id.client);if(void 0===n)n=[],e.clients.set(t.id.client,n);else{const e=n[n.length-1];if(e.id.clock+e.length!==t.id.clock)throw hA.unexpectedCase()}n.push(t)},SO=(e,t)=>{let n=0,r=e.length-1,i=e[r],o=i.id.clock;if(o===t)return r;let a=oA.floor(t/(o+i.length-1)*r);for(;n<=r;){if(i=e[a],o=i.id.clock,o<=t){if(t<o+i.length)return a;n=a+1}else r=a-1;a=oA.floor((n+r)/2)}throw hA.unexpectedCase()},CO=(e,t)=>{const n=e.clients.get(t.client);return n[SO(n,t.clock)]},EO=(e,t,n)=>{const r=SO(t,n),i=t[r];return i.id.clock<n&&i instanceof xR?(t.splice(r+1,0,_R(e,i,n-i.id.clock)),r+1):r},TO=(e,t)=>{const n=e.doc.store.clients.get(t.client);return n[EO(e,n,t.clock)]},kO=(e,t,n)=>{const r=t.clients.get(n.client),i=SO(r,n.clock),o=r[i];return n.clock!==o.id.clock+o.length-1&&o.constructor!==QM&&r.splice(i+1,0,_R(e,o,n.clock-o.id.clock+1)),o},NO=(e,t,n,r,i)=>{if(0===r)return;const o=n+r;let a,s=EO(e,t,n);do{a=t[s++],o<a.id.clock+a.length&&EO(e,t,o),i(a)}while(s<t.length&&t[s].id.clock<o)};class AO{constructor(e,t,n){this.doc=e,this.deleteSet=new xA,this.beforeState=_O(e.store),this.afterState=new Map,this.changed=new Map,this.changedParentTypes=new Map,this._mergeStructs=[],this.origin=t,this.meta=new Map,this.local=n,this.subdocsAdded=new Set,this.subdocsRemoved=new Set,this.subdocsLoaded=new Set}}const OO=(e,t)=>!(0===t.deleteSet.clients.size&&!aA.any(t.afterState,((e,n)=>t.beforeState.get(n)!==e)))&&(EA(t.deleteSet),((e,t)=>{VA(e,t.doc.store,t.beforeState)})(e,t),OA(e,t.deleteSet),!0),MO=(e,t,n)=>{const r=t._item;(null===r||r.id.clock<(e.beforeState.get(r.id.client)||0)&&!r.deleted)&&aA.setIfUndefined(e.changed,t,gA.create).add(n)},RO=(e,t)=>{const n=e[t-1],r=e[t];n.deleted===r.deleted&&n.constructor===r.constructor&&n.mergeWith(r)&&(e.splice(t,1),r instanceof xR&&null!==r.parentSub&&r.parent._map.get(r.parentSub)===r&&r.parent._map.set(r.parentSub,n))},DO=(e,t,n)=>{for(const[r,i]of e.clients.entries()){const e=t.clients.get(r);for(let r=i.length-1;r>=0;r--){const o=i[r],a=o.clock+o.len;for(let r=SO(e,o.clock),i=e[r];r<e.length&&i.id.clock<a;i=e[++r]){const i=e[r];if(o.clock+o.len<=i.id.clock)break;i instanceof xR&&i.deleted&&!i.keep&&n(i)&&i.gc(t,!1)}}}},IO=(e,t)=>{e.clients.forEach(((e,n)=>{const r=t.clients.get(n);for(let t=e.length-1;t>=0;t--){const n=e[t];for(let e=oA.min(r.length-1,1+SO(r,n.clock+n.len-1)),t=r[e];e>0&&t.id.clock>=n.clock;t=r[--e])RO(r,e)}}))},PO=(e,t)=>{if(t<e.length){const n=e[t],r=n.doc,i=r.store,o=n.deleteSet,a=n._mergeStructs;try{EA(o),n.afterState=_O(n.doc.store),r.emit("beforeObserverCalls",[n,r]);const s=[];n.changed.forEach(((e,t)=>s.push((()=>{null!==t._item&&t._item.deleted||t._callObserver(n,e)})))),s.push((()=>{n.changedParentTypes.forEach(((e,t)=>s.push((()=>{null!==t._item&&t._item.deleted||((e=e.filter((e=>null===e.target._item||!e.target._item.deleted))).forEach((e=>{e.currentTarget=t})),e.sort(((e,t)=>e.path.length-t.path.length)),tO(t._dEH,e,n))})))),s.push((()=>r.emit("afterTransaction",[n,r])))})),XN.callAll(s,[])}finally{r.gc&&DO(o,i,r.gcFilter),IO(o,i),n.afterState.forEach(((e,t)=>{const r=n.beforeState.get(t)||0;if(r!==e){const e=i.clients.get(t),n=oA.max(SO(e,r),1);for(let t=e.length-1;t>=n;t--)RO(e,t)}}));for(let e=0;e<a.length;e++){const{client:t,clock:n}=a[e].id,r=i.clients.get(t),o=SO(r,n);o+1<r.length&&RO(r,o+1),o>0&&RO(r,o)}if(n.local||n.afterState.get(r.clientID)===n.beforeState.get(r.clientID)||(mA.print(mA.ORANGE,mA.BOLD,"[yjs] ",mA.UNBOLD,mA.RED,"Changed the client-id because another client seems to be using it."),r.clientID=DA()),r.emit("afterTransactionCleanup",[n,r]),r._observers.has("update")){const e=new FA;OO(e,n)&&r.emit("update",[e.toUint8Array(),n.origin,r,n])}if(r._observers.has("updateV2")){const e=new HA;OO(e,n)&&r.emit("updateV2",[e.toUint8Array(),n.origin,r,n])}const{subdocsAdded:s,subdocsLoaded:l,subdocsRemoved:c}=n;(s.size>0||c.size>0||l.size>0)&&(s.forEach((e=>{e.clientID=r.clientID,null==e.collectionid&&(e.collectionid=r.collectionid),r.subdocs.add(e)})),c.forEach((e=>r.subdocs.delete(e))),r.emit("subdocs",[{loaded:l,added:s,removed:c},r,n]),c.forEach((e=>e.destroy()))),e.length<=t+1?(r._transactionCleanups=[],r.emit("afterAllTransactions",[r,e])):PO(e,t+1)}}},LO=(e,t,n=null,r=!0)=>{const i=e._transactionCleanups;let o=!1,a=null;null===e._transaction&&(o=!0,e._transaction=new AO(e,n,r),i.push(e._transaction),1===i.length&&e.emit("beforeAllTransactions",[e]),e.emit("beforeTransaction",[e._transaction,e]));try{a=t(e._transaction)}finally{if(o){const t=e._transaction===i[0];e._transaction=null,t&&PO(i,0)}}return a};class BO{constructor(e,t){this.insertions=t,this.deletions=e,this.meta=new Map}}const $O=(e,t,n)=>{SA(e,n.deletions,(e=>{e instanceof xR&&t.scope.some((t=>lO(t,e)))&&bR(e,!1)}))},zO=(e,t,n)=>{let r=null,i=null;const o=e.doc,a=e.scope;if(LO(o,(n=>{for(;t.length>0&&null===r;){const i=o.store,s=t.pop(),l=new Set,c=[];let u=!1;SA(n,s.insertions,(e=>{if(e instanceof xR){if(null!==e.redone){let{item:t,diff:r}=vR(i,e.id);r>0&&(t=TO(n,iO(t.id.client,t.id.clock+r))),e=t}!e.deleted&&a.some((t=>lO(t,e)))&&c.push(e)}})),SA(n,s.deletions,(e=>{e instanceof xR&&a.some((t=>lO(t,e)))&&!CA(s.insertions,e.id)&&l.add(e)})),l.forEach((t=>{u=null!==wR(n,t,l,s.insertions,e.ignoreRemoteMapChanges)||u}));for(let t=c.length-1;t>=0;t--){const r=c[t];e.deleteFilter(r)&&(r.delete(n),u=!0)}r=u?s:null}n.changed.forEach(((e,t)=>{e.has(null)&&t._searchMarker&&(t._searchMarker.length=0)})),i=n}),e),null!=r){const t=i.changedParentTypes;e.emit("stack-item-popped",[{stackItem:r,type:n,changedParentTypes:t},e])}return r};class FO extends UN.Observable{constructor(e,{captureTimeout:t=500,captureTransaction:n=(e=>!0),deleteFilter:r=(()=>!0),trackedOrigins:i=new Set([null]),ignoreRemoteMapChanges:o=!1,doc:a=(iA.isArray(e)?e[0].doc:e.doc)}={}){super(),this.scope=[],this.addToScope(e),this.deleteFilter=r,i.add(this),this.trackedOrigins=i,this.captureTransaction=n,this.undoStack=[],this.redoStack=[],this.undoing=!1,this.redoing=!1,this.doc=a,this.lastChange=0,this.ignoreRemoteMapChanges=o,this.captureTimeout=t,this.afterTransactionHandler=e=>{if(!(this.captureTransaction(e)&&this.scope.some((t=>e.changedParentTypes.has(t)))&&(this.trackedOrigins.has(e.origin)||e.origin&&this.trackedOrigins.has(e.origin.constructor))))return;const t=this.undoing,n=this.redoing,r=t?this.redoStack:this.undoStack;t?this.stopCapturing():n||this.clear(!1,!0);const i=new xA;e.afterState.forEach(((t,n)=>{const r=e.beforeState.get(n)||0,o=t-r;o>0&&kA(i,n,r,o)}));const o=yA.getUnixTime();let a=!1;if(this.lastChange>0&&o-this.lastChange<this.captureTimeout&&r.length>0&&!t&&!n){const t=r[r.length-1];t.deletions=TA([t.deletions,e.deleteSet]),t.insertions=TA([t.insertions,i])}else r.push(new BO(e.deleteSet,i)),a=!0;t||n||(this.lastChange=o),SA(e,e.deleteSet,(e=>{e instanceof xR&&this.scope.some((t=>lO(t,e)))&&bR(e,!0)}));const s=[{stackItem:r[r.length-1],origin:e.origin,type:t?"redo":"undo",changedParentTypes:e.changedParentTypes},this];a?this.emit("stack-item-added",s):this.emit("stack-item-updated",s)},this.doc.on("afterTransaction",this.afterTransactionHandler),this.doc.on("destroy",(()=>{this.destroy()}))}addToScope(e){(e=iA.isArray(e)?e:[e]).forEach((e=>{this.scope.every((t=>t!==e))&&this.scope.push(e)}))}addTrackedOrigin(e){this.trackedOrigins.add(e)}removeTrackedOrigin(e){this.trackedOrigins.delete(e)}clear(e=!0,t=!0){(e&&this.canUndo()||t&&this.canRedo())&&this.doc.transact((n=>{e&&(this.undoStack.forEach((e=>$O(n,this,e))),this.undoStack=[]),t&&(this.redoStack.forEach((e=>$O(n,this,e))),this.redoStack=[]),this.emit("stack-cleared",[{undoStackCleared:e,redoStackCleared:t}])}))}stopCapturing(){this.lastChange=0}undo(){let e;this.undoing=!0;try{e=zO(this,this.undoStack,"undo")}finally{this.undoing=!1}return e}redo(){let e;this.redoing=!0;try{e=zO(this,this.redoStack,"redo")}finally{this.redoing=!1}return e}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}destroy(){this.trackedOrigins.delete(this),this.doc.off("afterTransaction",this.afterTransactionHandler),super.destroy()}}class UO{constructor(e,t){this.gen=function*(e){const t=lA.readVarUint(e.restDecoder);for(let n=0;n<t;n++){const t=lA.readVarUint(e.restDecoder),n=e.readClient();let r=lA.readVarUint(e.restDecoder);for(let i=0;i<t;i++){const t=e.readInfo();if(10===t){const t=lA.readVarUint(e.restDecoder);yield new ER(iO(n,r),t),r+=t}else if(0!=(pA.BITS5&t)){const i=0==(t&(pA.BIT7|pA.BIT8)),o=new xR(iO(n,r),null,(t&pA.BIT8)===pA.BIT8?e.readLeftID():null,null,(t&pA.BIT7)===pA.BIT7?e.readRightID():null,i?e.readParentInfo()?e.readString():e.readLeftID():null,i&&(t&pA.BIT6)===pA.BIT6?e.readString():null,SR(e,t));yield o,r+=o.length}else{const t=e.readLen();yield new QM(iO(n,r),t),r+=t}}}}(e),this.curr=null,this.done=!1,this.filterSkips=t,this.next()}next(){do{this.curr=this.gen.next().value||null}while(this.filterSkips&&null!==this.curr&&this.curr.constructor===ER);return this.curr}}const HO=(e,t=$A)=>{const n=[],r=new t(lA.createDecoder(e)),i=new UO(r,!1);for(let a=i.curr;null!==a;a=i.next())n.push(a);mA.print("Structs: ",n);const o=MA(r);mA.print("DeleteSet: ",o)},VO=(e,t=$A)=>{const n=[],r=new t(lA.createDecoder(e)),i=new UO(r,!1);for(let o=i.curr;null!==o;o=i.next())n.push(o);return{structs:n,ds:MA(r)}};class qO{constructor(e){this.currClient=0,this.startClock=0,this.written=0,this.encoder=e,this.clientStructs=[]}}const KO=e=>GO(e,LA,FA),WO=(e,t=UA,n=$A)=>{const r=new t,i=new UO(new n(lA.createDecoder(e)),!1);let o=i.curr;if(null!==o){let e=0,t=o.id.client,n=0!==o.id.clock,a=n?0:o.id.clock+o.length;for(;null!==o;o=i.next())t!==o.id.client&&(0!==a&&(e++,sA.writeVarUint(r.restEncoder,t),sA.writeVarUint(r.restEncoder,a)),t=o.id.client,a=0,n=0!==o.id.clock),o.constructor===ER&&(n=!0),n||(a=o.id.clock+o.length);0!==a&&(e++,sA.writeVarUint(r.restEncoder,t),sA.writeVarUint(r.restEncoder,a));const s=sA.createEncoder();return sA.writeVarUint(s,e),sA.writeBinaryEncoder(s,r.restEncoder),r.restEncoder=s,r.toUint8Array()}return sA.writeVarUint(r.restEncoder,0),r.toUint8Array()},jO=(e,t=$A)=>{const n=new Map,r=new Map,i=new UO(new t(lA.createDecoder(e)),!1);let o=i.curr;if(null!==o){let e=o.id.client,t=o.id.clock;for(n.set(e,t);null!==o;o=i.next())e!==o.id.client&&(r.set(e,t),n.set(o.id.client,o.id.clock),e=o.id.client),t=o.id.clock+o.length;r.set(e,t)}return{from:n,to:r}},YO=(e,t)=>{if(e.constructor===QM){const{client:n,clock:r}=e.id;return new QM(iO(n,r+t),e.length-t)}if(e.constructor===ER){const{client:n,clock:r}=e.id;return new ER(iO(n,r+t),e.length-t)}{const n=e,{client:r,clock:i}=n.id;return new xR(iO(r,i+t),null,iO(r,i+t-1),null,n.rightOrigin,n.parent,n.parentSub,n.content.splice(t))}},GO=(e,t=$A,n=HA)=>{if(1===e.length)return e[0];const r=e.map((e=>new t(lA.createDecoder(e))));let i=r.map((e=>new UO(e,!0))),o=null;const a=new n,s=new qO(a);for(;i=i.filter((e=>null!==e.curr)),i.sort(((e,t)=>{if(e.curr.id.client===t.curr.id.client){const n=e.curr.id.clock-t.curr.id.clock;return 0===n?e.curr.constructor===t.curr.constructor?0:e.curr.constructor===ER?1:-1:n}return t.curr.id.client-e.curr.id.client})),0!==i.length;){const e=i[0],t=e.curr.id.client;if(null!==o){let n=e.curr,r=!1;for(;null!==n&&n.id.clock+n.length<=o.struct.id.clock+o.struct.length&&n.id.client>=o.struct.id.client;)n=e.next(),r=!0;if(null===n||n.id.client!==t||r&&n.id.clock>o.struct.id.clock+o.struct.length)continue;if(t!==o.struct.id.client)ZO(s,o.struct,o.offset),o={struct:n,offset:0},e.next();else if(o.struct.id.clock+o.struct.length<n.id.clock)if(o.struct.constructor===ER)o.struct.length=n.id.clock+n.length-o.struct.id.clock;else{ZO(s,o.struct,o.offset);const e=n.id.clock-o.struct.id.clock-o.struct.length;o={struct:new ER(iO(t,o.struct.id.clock+o.struct.length),e),offset:0}}else{const t=o.struct.id.clock+o.struct.length-n.id.clock;t>0&&(o.struct.constructor===ER?o.struct.length-=t:n=YO(n,t)),o.struct.mergeWith(n)||(ZO(s,o.struct,o.offset),o={struct:n,offset:0},e.next())}}else o={struct:e.curr,offset:0},e.next();for(let n=e.curr;null!==n&&n.id.client===t&&n.id.clock===o.struct.id.clock+o.struct.length&&n.constructor!==ER;n=e.next())ZO(s,o.struct,o.offset),o={struct:n,offset:0}}null!==o&&(ZO(s,o.struct,o.offset),o=null),QO(s);const l=r.map((e=>MA(e))),c=TA(l);return OA(a,c),a.toUint8Array()},JO=(e,t,n=$A,r=HA)=>{const i=YA(t),o=new r,a=new qO(o),s=new n(lA.createDecoder(e)),l=new UO(s,!1);for(;l.curr;){const e=l.curr,t=e.id.client,n=i.get(t)||0;if(l.curr.constructor!==ER)if(e.id.clock+e.length>n)for(ZO(a,e,oA.max(n-e.id.clock,0)),l.next();l.curr&&l.curr.id.client===t;)ZO(a,l.curr,0),l.next();else for(;l.curr&&l.curr.id.client===t&&l.curr.id.clock+l.curr.length<=n;)l.next();else l.next()}QO(a);const c=MA(s);return OA(o,c),o.toUint8Array()},XO=e=>{e.written>0&&(e.clientStructs.push({written:e.written,restEncoder:sA.toUint8Array(e.encoder.restEncoder)}),e.encoder.restEncoder=sA.createEncoder(),e.written=0)},ZO=(e,t,n)=>{e.written>0&&e.currClient!==t.id.client&&XO(e),0===e.written&&(e.currClient=t.id.client,e.encoder.writeClient(t.id.client),sA.writeVarUint(e.encoder.restEncoder,t.id.clock+n)),t.write(e.encoder,n),e.written++},QO=e=>{XO(e);const t=e.encoder.restEncoder;sA.writeVarUint(t,e.clientStructs.length);for(let n=0;n<e.clientStructs.length;n++){const r=e.clientStructs[n];sA.writeVarUint(t,r.written),sA.writeUint8Array(t,r.restEncoder)}},eM=(e,t,n)=>{const r=new t(lA.createDecoder(e)),i=new UO(r,!1),o=new n,a=new qO(o);for(let l=i.curr;null!==l;l=i.next())ZO(a,l,0);QO(a);const s=MA(r);return OA(o,s),o.toUint8Array()},tM=e=>eM(e,$A,FA);class nM{constructor(e,t){this.target=e,this.currentTarget=e,this.transaction=t,this._changes=null,this._keys=null,this._delta=null}get path(){return rM(this.currentTarget,this.target)}deletes(e){return CA(this.transaction.deleteSet,e.id)}get keys(){if(null===this._keys){const e=new Map,t=this.target;this.transaction.changed.get(t).forEach((n=>{if(null!==n){const r=t._map.get(n);let i,o;if(this.adds(r)){let e=r.left;for(;null!==e&&this.adds(e);)e=e.left;if(this.deletes(r)){if(null===e||!this.deletes(e))return;i="delete",o=iA.last(e.content.getContent())}else null!==e&&this.deletes(e)?(i="update",o=iA.last(e.content.getContent())):(i="add",o=void 0)}else{if(!this.deletes(r))return;i="delete",o=iA.last(r.content.getContent())}e.set(n,{action:i,oldValue:o})}})),this._keys=e}return this._keys}get delta(){return this.changes.delta}adds(e){return e.id.clock>=(this.transaction.beforeState.get(e.id.client)||0)}get changes(){let e=this._changes;if(null===e){const t=this.target,n=gA.create(),r=gA.create(),i=[];e={added:n,deleted:r,delta:i,keys:this.keys};if(this.transaction.changed.get(t).has(null)){let e=null;const o=()=>{e&&i.push(e)};for(let i=t._start;null!==i;i=i.right)i.deleted?this.deletes(i)&&!this.adds(i)&&(null!==e&&void 0!==e.delete||(o(),e={delete:0}),e.delete+=i.length,r.add(i)):this.adds(i)?(null!==e&&void 0!==e.insert||(o(),e={insert:[]}),e.insert=e.insert.concat(i.content.getContent()),n.add(i)):(null!==e&&void 0!==e.retain||(o(),e={retain:0}),e.retain+=i.length);null!==e&&void 0===e.retain&&o()}this._changes=e}return e}}const rM=(e,t)=>{const n=[];for(;null!==t._item&&t!==e;){if(null!==t._item.parentSub)n.unshift(t._item.parentSub);else{let e=0,r=t._item.parent._start;for(;r!==t._item&&null!==r;)r.deleted||e++,r=r.right;n.unshift(e)}t=t._item.parent}return n};let iM=0;class oM{constructor(e,t){e.marker=!0,this.p=e,this.index=t,this.timestamp=iM++}}const aM=(e,t,n)=>{e.p.marker=!1,e.p=t,t.marker=!0,e.index=n,e.timestamp=iM++},sM=(e,t)=>{if(null===e._start||0===t||null===e._searchMarker)return null;const n=0===e._searchMarker.length?null:e._searchMarker.reduce(((e,n)=>oA.abs(t-e.index)<oA.abs(t-n.index)?e:n));let r=e._start,i=0;for(null!==n&&(r=n.p,i=n.index,(e=>{e.timestamp=iM++})(n));null!==r.right&&i<t;){if(!r.deleted&&r.countable){if(t<i+r.length)break;i+=r.length}r=r.right}for(;null!==r.left&&i>t;)r=r.left,!r.deleted&&r.countable&&(i-=r.length);for(;null!==r.left&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(i-=r.length);return null!==n&&oA.abs(n.index-i)<r.parent.length/80?(aM(n,r,i),n):((e,t,n)=>{if(e.length>=80){const r=e.reduce(((e,t)=>e.timestamp<t.timestamp?e:t));return aM(r,t,n),r}{const r=new oM(t,n);return e.push(r),r}})(e._searchMarker,r,i)},lM=(e,t,n)=>{for(let r=e.length-1;r>=0;r--){const i=e[r];if(n>0){let t=i.p;for(t.marker=!1;t&&(t.deleted||!t.countable);)t=t.left,t&&!t.deleted&&t.countable&&(i.index-=t.length);if(null===t||!0===t.marker){e.splice(r,1);continue}i.p=t,t.marker=!0}(t<i.index||n>0&&t===i.index)&&(i.index=oA.max(t,i.index+n))}},cM=(e,t,n)=>{const r=e,i=t.changedParentTypes;for(;aA.setIfUndefined(i,e,(()=>[])).push(n),null!==e._item;)e=e._item.parent;tO(r._eH,n,t)};class uM{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=ZA(),this._dEH=ZA(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(e,t){this.doc=e,this._item=t}_copy(){throw hA.methodUnimplemented()}clone(){throw hA.methodUnimplemented()}_write(e){}get _first(){let e=this._start;for(;null!==e&&e.deleted;)e=e.right;return e}_callObserver(e,t){!e.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(e){QA(this._eH,e)}observeDeep(e){QA(this._dEH,e)}unobserve(e){eO(this._eH,e)}unobserveDeep(e){eO(this._dEH,e)}toJSON(){}}const dM=(e,t,n)=>{t<0&&(t=e._length+t),n<0&&(n=e._length+n);let r=n-t;const i=[];let o=e._start;for(;null!==o&&r>0;){if(o.countable&&!o.deleted){const e=o.content.getContent();if(e.length<=t)t-=e.length;else{for(let n=t;n<e.length&&r>0;n++)i.push(e[n]),r--;t=0}}o=o.right}return i},hM=e=>{const t=[];let n=e._start;for(;null!==n;){if(n.countable&&!n.deleted){const e=n.content.getContent();for(let n=0;n<e.length;n++)t.push(e[n])}n=n.right}return t},pM=(e,t)=>{let n=0,r=e._start;for(;null!==r;){if(r.countable&&!r.deleted){const i=r.content.getContent();for(let r=0;r<i.length;r++)t(i[r],n++,e)}r=r.right}},fM=(e,t)=>{const n=[];return pM(e,((r,i)=>{n.push(t(r,i,e))})),n},gM=e=>{let t=e._start,n=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(null===n){for(;null!==t&&t.deleted;)t=t.right;if(null===t)return{done:!0,value:void 0};n=t.content.getContent(),r=0,t=t.right}const e=n[r++];return n.length<=r&&(n=null),{done:!1,value:e}}}},mM=(e,t)=>{const n=sM(e,t);let r=e._start;for(null!==n&&(r=n.p,t-=n.index);null!==r;r=r.right)if(!r.deleted&&r.countable){if(t<r.length)return r.content.getContent()[t];t-=r.length}},yM=(e,t,n,r)=>{let i=n;const o=e.doc,a=o.clientID,s=o.store,l=null===n?t._start:n.right;let c=[];const u=()=>{c.length>0&&(i=new xR(iO(a,wO(s,a)),i,i&&i.lastId,l,l&&l.id,t,null,new sR(c)),i.integrate(e,0),c=[])};r.forEach((n=>{if(null===n)c.push(n);else switch(n.constructor){case Number:case Object:case Boolean:case Array:case String:c.push(n);break;default:switch(u(),n.constructor){case Uint8Array:case ArrayBuffer:i=new xR(iO(a,wO(s,a)),i,i&&i.lastId,l,l&&l.id,t,null,new eR(new Uint8Array(n))),i.integrate(e,0);break;case IA:i=new xR(iO(a,wO(s,a)),i,i&&i.lastId,l,l&&l.id,t,null,new rR(n)),i.integrate(e,0);break;default:if(!(n instanceof uM))throw new Error("Unexpected content type in insert operation");i=new xR(iO(a,wO(s,a)),i,i&&i.lastId,l,l&&l.id,t,null,new yR(n)),i.integrate(e,0)}}})),u()},vM=hA.create("Length exceeded!"),bM=(e,t,n,r)=>{if(n>t._length)throw vM;if(0===n)return t._searchMarker&&lM(t._searchMarker,n,r.length),yM(e,t,null,r);const i=n,o=sM(t,n);let a=t._start;for(null!==o&&(a=o.p,0===(n-=o.index)&&(a=a.prev,n+=a&&a.countable&&!a.deleted?a.length:0));null!==a;a=a.right)if(!a.deleted&&a.countable){if(n<=a.length){n<a.length&&TO(e,iO(a.id.client,a.id.clock+n));break}n-=a.length}return t._searchMarker&&lM(t._searchMarker,i,r.length),yM(e,t,a,r)},_M=(e,t,n,r)=>{if(0===r)return;const i=n,o=r,a=sM(t,n);let s=t._start;for(null!==a&&(s=a.p,n-=a.index);null!==s&&n>0;s=s.right)!s.deleted&&s.countable&&(n<s.length&&TO(e,iO(s.id.client,s.id.clock+n)),n-=s.length);for(;r>0&&null!==s;)s.deleted||(r<s.length&&TO(e,iO(s.id.client,s.id.clock+r)),s.delete(e),r-=s.length),s=s.right;if(r>0)throw vM;t._searchMarker&&lM(t._searchMarker,i,-o+r)},wM=(e,t,n)=>{const r=t._map.get(n);void 0!==r&&r.delete(e)},xM=(e,t,n,r)=>{const i=t._map.get(n)||null,o=e.doc,a=o.clientID;let s;if(null==r)s=new sR([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:s=new sR([r]);break;case Uint8Array:s=new eR(r);break;case IA:s=new rR(r);break;default:if(!(r instanceof uM))throw new Error("Unexpected content type");s=new yR(r)}new xR(iO(a,wO(o.store,a)),i,i&&i.lastId,null,null,t,n,s).integrate(e,0)},SM=(e,t)=>{const n=e._map.get(t);return void 0===n||n.deleted?void 0:n.content.getContent()[n.length-1]},CM=e=>{const t={};return e._map.forEach(((e,n)=>{e.deleted||(t[n]=e.content.getContent()[e.length-1])})),t},EM=(e,t)=>{const n=e._map.get(t);return void 0!==n&&!n.deleted},TM=e=>vA.iteratorFilter(e.entries(),(e=>!e[1].deleted));class kM extends nM{constructor(e,t){super(e,t),this._transaction=t}}class NM extends uM{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(e){const t=new NM;return t.push(e),t}_integrate(e,t){super._integrate(e,t),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new NM}clone(){const e=new NM;return e.insert(0,this.toArray().map((e=>e instanceof uM?e.clone():e))),e}get length(){return null===this._prelimContent?this._length:this._prelimContent.length}_callObserver(e,t){super._callObserver(e,t),cM(this,e,new kM(this,e))}insert(e,t){null!==this.doc?LO(this.doc,(n=>{bM(n,this,e,t)})):this._prelimContent.splice(e,0,...t)}push(e){null!==this.doc?LO(this.doc,(t=>{((e,t,n)=>{let r=(t._searchMarker||[]).reduce(((e,t)=>t.index>e.index?t:e),{index:0,p:t._start}).p;if(r)for(;r.right;)r=r.right;yM(e,t,r,n)})(t,this,e)})):this._prelimContent.push(...e)}unshift(e){this.insert(0,e)}delete(e,t=1){null!==this.doc?LO(this.doc,(n=>{_M(n,this,e,t)})):this._prelimContent.splice(e,t)}get(e){return mM(this,e)}toArray(){return hM(this)}slice(e=0,t=this.length){return dM(this,e,t)}toJSON(){return this.map((e=>e instanceof uM?e.toJSON():e))}map(e){return fM(this,e)}forEach(e){pM(this,e)}[Symbol.iterator](){return gM(this)}_write(e){e.writeTypeRef(uR)}}class AM extends nM{constructor(e,t,n){super(e,t),this.keysChanged=n}}class OM extends uM{constructor(e){super(),this._prelimContent=null,this._prelimContent=void 0===e?new Map:new Map(e)}_integrate(e,t){super._integrate(e,t),this._prelimContent.forEach(((e,t)=>{this.set(t,e)})),this._prelimContent=null}_copy(){return new OM}clone(){const e=new OM;return this.forEach(((t,n)=>{e.set(n,t instanceof uM?t.clone():t)})),e}_callObserver(e,t){cM(this,e,new AM(this,e,t))}toJSON(){const e={};return this._map.forEach(((t,n)=>{if(!t.deleted){const r=t.content.getContent()[t.length-1];e[n]=r instanceof uM?r.toJSON():r}})),e}get size(){return[...TM(this._map)].length}keys(){return vA.iteratorMap(TM(this._map),(e=>e[0]))}values(){return vA.iteratorMap(TM(this._map),(e=>e[1].content.getContent()[e[1].length-1]))}entries(){return vA.iteratorMap(TM(this._map),(e=>[e[0],e[1].content.getContent()[e[1].length-1]]))}forEach(e){this._map.forEach(((t,n)=>{t.deleted||e(t.content.getContent()[t.length-1],n,this)}))}[Symbol.iterator](){return this.entries()}delete(e){null!==this.doc?LO(this.doc,(t=>{wM(t,this,e)})):this._prelimContent.delete(e)}set(e,t){return null!==this.doc?LO(this.doc,(n=>{xM(n,this,e,t)})):this._prelimContent.set(e,t),t}get(e){return SM(this,e)}has(e){return EM(this,e)}clear(){null!==this.doc?LO(this.doc,(e=>{this.forEach((function(t,n,r){wM(e,r,n)}))})):this._prelimContent.clear()}_write(e){e.writeTypeRef(dR)}}const MM=(e,t)=>e===t||"object"==typeof e&&"object"==typeof t&&e&&t&&bA.equalFlat(e,t);class RM{constructor(e,t,n,r){this.left=e,this.right=t,this.index=n,this.currentAttributes=r}forward(){if(null===this.right&&hA.unexpectedCase(),this.right.content.constructor===oR)this.right.deleted||LM(this.currentAttributes,this.right.content);else this.right.deleted||(this.index+=this.right.length);this.left=this.right,this.right=this.right.right}}const DM=(e,t,n)=>{for(;null!==t.right&&n>0;){if(t.right.content.constructor===oR)t.right.deleted||LM(t.currentAttributes,t.right.content);else t.right.deleted||(n<t.right.length&&TO(e,iO(t.right.id.client,t.right.id.clock+n)),t.index+=t.right.length,n-=t.right.length);t.left=t.right,t.right=t.right.right}return t},IM=(e,t,n)=>{const r=new Map,i=sM(t,n);if(i){const t=new RM(i.p.left,i.p,i.index,r);return DM(e,t,n-i.index)}{const i=new RM(null,t._start,0,r);return DM(e,i,n)}},PM=(e,t,n,r)=>{for(;null!==n.right&&(!0===n.right.deleted||n.right.content.constructor===oR&&MM(r.get(n.right.content.key),n.right.content.value));)n.right.deleted||r.delete(n.right.content.key),n.forward();const i=e.doc,o=i.clientID;r.forEach(((r,a)=>{const s=n.left,l=n.right,c=new xR(iO(o,wO(i.store,o)),s,s&&s.lastId,l,l&&l.id,t,null,new oR(a,r));c.integrate(e,0),n.right=c,n.forward()}))},LM=(e,t)=>{const{key:n,value:r}=t;null===r?e.delete(n):e.set(n,r)},BM=(e,t)=>{for(;null!==e.right&&(e.right.deleted||e.right.content.constructor===oR&&MM(t[e.right.content.key]||null,e.right.content.value));)e.forward()},$M=(e,t,n,r)=>{const i=e.doc,o=i.clientID,a=new Map;for(const s in r){const l=r[s],c=n.currentAttributes.get(s)||null;if(!MM(c,l)){a.set(s,c);const{left:r,right:u}=n;n.right=new xR(iO(o,wO(i.store,o)),r,r&&r.lastId,u,u&&u.id,t,null,new oR(s,l)),n.right.integrate(e,0),n.forward()}}return a},zM=(e,t,n,r,i)=>{n.currentAttributes.forEach(((e,t)=>{void 0===i[t]&&(i[t]=null)}));const o=e.doc,a=o.clientID;BM(n,i);const s=$M(e,t,n,i),l=r.constructor===String?new lR(r):r instanceof uM?new yR(r):new iR(r);let{left:c,right:u,index:d}=n;t._searchMarker&&lM(t._searchMarker,n.index,l.getLength()),u=new xR(iO(a,wO(o.store,a)),c,c&&c.lastId,u,u&&u.id,t,null,l),u.integrate(e,0),n.right=u,n.index=d,n.forward(),PM(e,t,n,s)},FM=(e,t,n,r,i)=>{const o=e.doc,a=o.clientID;BM(n,i);const s=$M(e,t,n,i);e:for(;null!==n.right&&(r>0||s.size>0&&(n.right.deleted||n.right.content.constructor===oR));){if(!n.right.deleted)switch(n.right.content.constructor){case oR:{const{key:t,value:o}=n.right.content,a=i[t];if(void 0!==a){if(MM(a,o))s.delete(t);else{if(0===r)break e;s.set(t,o)}n.right.delete(e)}else n.currentAttributes.set(t,o);break}default:r<n.right.length&&TO(e,iO(n.right.id.client,n.right.id.clock+r)),r-=n.right.length}n.forward()}if(r>0){let i="";for(;r>0;r--)i+="\n";n.right=new xR(iO(a,wO(o.store,a)),n.left,n.left&&n.left.lastId,n.right,n.right&&n.right.id,t,null,new lR(i)),n.right.integrate(e,0),n.forward()}PM(e,t,n,s)},UM=(e,t,n,r,i)=>{let o=t;const a=aA.create();for(;o&&(!o.countable||o.deleted);){if(!o.deleted&&o.content.constructor===oR){const e=o.content;a.set(e.key,e)}o=o.right}let s=0,l=!1;for(;t!==o;){if(n===t&&(l=!0),!t.deleted){const n=t.content;switch(n.constructor){case oR:{const{key:o,value:c}=n,u=r.get(o)||null;a.get(o)===n&&u!==c||(t.delete(e),s++,l||(i.get(o)||null)!==c||u===c||(null===u?i.delete(o):i.set(o,u))),l||t.deleted||LM(i,n);break}}}t=t.right}return s},HM=e=>{let t=0;return LO(e.doc,(n=>{let r=e._start,i=e._start,o=aA.create();const a=aA.copy(o);for(;i;){if(!1===i.deleted)if(i.content.constructor===oR)LM(a,i.content);else t+=UM(n,r,i,o,a),o=aA.copy(a),r=i;i=i.right}})),t},VM=(e,t,n)=>{const r=n,i=aA.copy(t.currentAttributes),o=t.right;for(;n>0&&null!==t.right;){if(!1===t.right.deleted)switch(t.right.content.constructor){case yR:case iR:case lR:n<t.right.length&&TO(e,iO(t.right.id.client,t.right.id.clock+n)),n-=t.right.length,t.right.delete(e)}t.forward()}o&&UM(e,o,t.right,i,t.currentAttributes);const a=(t.left||t.right).parent;return a._searchMarker&&lM(a._searchMarker,t.index,-r+n),t};class qM extends nM{constructor(e,t,n){super(e,t),this.childListChanged=!1,this.keysChanged=new Set,n.forEach((e=>{null===e?this.childListChanged=!0:this.keysChanged.add(e)}))}get changes(){if(null===this._changes){const e={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=e}return this._changes}get delta(){if(null===this._delta){const e=this.target.doc,t=[];LO(e,(e=>{const n=new Map,r=new Map;let i=this.target._start,o=null;const a={};let s="",l=0,c=0;const u=()=>{if(null!==o){let e;switch(o){case"delete":e={delete:c},c=0;break;case"insert":e={insert:s},n.size>0&&(e.attributes={},n.forEach(((t,n)=>{null!==t&&(e.attributes[n]=t)}))),s="";break;case"retain":if(e={retain:l},Object.keys(a).length>0){e.attributes={};for(const t in a)e.attributes[t]=a[t]}l=0}t.push(e),o=null}};for(;null!==i;){switch(i.content.constructor){case yR:case iR:this.adds(i)?this.deletes(i)||(u(),o="insert",s=i.content.getContent()[0],u()):this.deletes(i)?("delete"!==o&&(u(),o="delete"),c+=1):i.deleted||("retain"!==o&&(u(),o="retain"),l+=1);break;case lR:this.adds(i)?this.deletes(i)||("insert"!==o&&(u(),o="insert"),s+=i.content.str):this.deletes(i)?("delete"!==o&&(u(),o="delete"),c+=i.length):i.deleted||("retain"!==o&&(u(),o="retain"),l+=i.length);break;case oR:{const{key:t,value:s}=i.content;if(this.adds(i)){if(!this.deletes(i)){const l=n.get(t)||null;MM(l,s)?null!==s&&i.delete(e):("retain"===o&&u(),MM(s,r.get(t)||null)?delete a[t]:a[t]=s)}}else if(this.deletes(i)){r.set(t,s);const e=n.get(t)||null;MM(e,s)||("retain"===o&&u(),a[t]=e)}else if(!i.deleted){r.set(t,s);const n=a[t];void 0!==n&&(MM(n,s)?null!==n&&i.delete(e):("retain"===o&&u(),null===s?delete a[t]:a[t]=s))}i.deleted||("insert"===o&&u(),LM(n,i.content));break}}i=i.right}for(u();t.length>0;){const e=t[t.length-1];if(void 0===e.retain||void 0!==e.attributes)break;t.pop()}})),this._delta=t}return this._delta}}class KM extends uM{constructor(e){super(),this._pending=void 0!==e?[()=>this.insert(0,e)]:[],this._searchMarker=[]}get length(){return this._length}_integrate(e,t){super._integrate(e,t);try{this._pending.forEach((e=>e()))}catch(sZ){console.error(sZ)}this._pending=null}_copy(){return new KM}clone(){const e=new KM;return e.applyDelta(this.toDelta()),e}_callObserver(e,t){super._callObserver(e,t);const n=new qM(this,e,t),r=e.doc;if(cM(this,e,n),!e.local){let t=!1;for(const[n,i]of e.afterState.entries()){const o=e.beforeState.get(n)||0;if(i!==o&&(NO(e,r.store.clients.get(n),o,i,(e=>{e.deleted||e.content.constructor!==oR||(t=!0)})),t))break}t||SA(e,e.deleteSet,(e=>{e instanceof QM||t||e.parent===this&&e.content.constructor===oR&&(t=!0)})),LO(r,(e=>{t?HM(this):SA(e,e.deleteSet,(t=>{t instanceof QM||t.parent===this&&((e,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const n=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===oR){const r=t.content.key;n.has(r)?t.delete(e):n.add(r)}t=t.left}})(e,t)}))}))}}toString(){let e="",t=this._start;for(;null!==t;)!t.deleted&&t.countable&&t.content.constructor===lR&&(e+=t.content.str),t=t.right;return e}toJSON(){return this.toString()}applyDelta(e,{sanitize:t=!0}={}){null!==this.doc?LO(this.doc,(n=>{const r=new RM(null,this._start,0,new Map);for(let i=0;i<e.length;i++){const o=e[i];if(void 0!==o.insert){const a=t||"string"!=typeof o.insert||i!==e.length-1||null!==r.right||"\n"!==o.insert.slice(-1)?o.insert:o.insert.slice(0,-1);("string"!=typeof a||a.length>0)&&zM(n,this,r,a,o.attributes||{})}else void 0!==o.retain?FM(n,this,r,o.retain,o.attributes||{}):void 0!==o.delete&&VM(n,r,o.delete)}})):this._pending.push((()=>this.applyDelta(e)))}toDelta(e,t,n){const r=[],i=new Map,o=this.doc;let a="",s=this._start;function l(){if(a.length>0){const e={};let t=!1;i.forEach(((n,r)=>{t=!0,e[r]=n}));const n={insert:a};t&&(n.attributes=e),r.push(n),a=""}}const c=()=>{for(;null!==s;){if(yO(s,e)||void 0!==t&&yO(s,t))switch(s.content.constructor){case lR:{const r=i.get("ychange");void 0===e||yO(s,e)?void 0===t||yO(s,t)?void 0!==r&&(l(),i.delete("ychange")):void 0!==r&&r.user===s.id.client&&"added"===r.type||(l(),i.set("ychange",n?n("added",s.id):{type:"added"})):void 0!==r&&r.user===s.id.client&&"removed"===r.type||(l(),i.set("ychange",n?n("removed",s.id):{type:"removed"})),a+=s.content.str;break}case yR:case iR:{l();const e={insert:s.content.getContent()[0]};if(i.size>0){const t={};e.attributes=t,i.forEach(((e,n)=>{t[n]=e}))}r.push(e);break}case oR:yO(s,e)&&(l(),LM(i,s.content))}s=s.right}l()};return e||t?LO(o,(n=>{e&&vO(n,e),t&&vO(n,t),c()}),"cleanup"):c(),r}insert(e,t,n){if(t.length<=0)return;const r=this.doc;null!==r?LO(r,(r=>{const i=IM(r,this,e);n||(n={},i.currentAttributes.forEach(((e,t)=>{n[t]=e}))),zM(r,this,i,t,n)})):this._pending.push((()=>this.insert(e,t,n)))}insertEmbed(e,t,n={}){const r=this.doc;null!==r?LO(r,(r=>{const i=IM(r,this,e);zM(r,this,i,t,n)})):this._pending.push((()=>this.insertEmbed(e,t,n)))}delete(e,t){if(0===t)return;const n=this.doc;null!==n?LO(n,(n=>{VM(n,IM(n,this,e),t)})):this._pending.push((()=>this.delete(e,t)))}format(e,t,n){if(0===t)return;const r=this.doc;null!==r?LO(r,(r=>{const i=IM(r,this,e);null!==i.right&&FM(r,this,i,t,n)})):this._pending.push((()=>this.format(e,t,n)))}removeAttribute(e){null!==this.doc?LO(this.doc,(t=>{wM(t,this,e)})):this._pending.push((()=>this.removeAttribute(e)))}setAttribute(e,t){null!==this.doc?LO(this.doc,(n=>{xM(n,this,e,t)})):this._pending.push((()=>this.setAttribute(e,t)))}getAttribute(e){return SM(this,e)}getAttributes(){return CM(this)}_write(e){e.writeTypeRef(hR)}}class WM{constructor(e,t=(()=>!0)){this._filter=t,this._root=e,this._currentNode=e._start,this._firstCall=!0}[Symbol.iterator](){return this}next(){let e=this._currentNode,t=e&&e.content&&e.content.type;if(null!==e&&(!this._firstCall||e.deleted||!this._filter(t)))do{if(t=e.content.type,e.deleted||t.constructor!==YM&&t.constructor!==jM||null===t._start)for(;null!==e;){if(null!==e.right){e=e.right;break}e=e.parent===this._root?null:e.parent._item}else e=t._start}while(null!==e&&(e.deleted||!this._filter(e.content.type)));return this._firstCall=!1,null===e?{value:void 0,done:!0}:(this._currentNode=e,{value:e.content.type,done:!1})}}class jM extends uM{constructor(){super(),this._prelimContent=[]}get firstChild(){const e=this._first;return e?e.content.getContent()[0]:null}_integrate(e,t){super._integrate(e,t),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new jM}clone(){const e=new jM;return e.insert(0,this.toArray().map((e=>e instanceof uM?e.clone():e))),e}get length(){return null===this._prelimContent?this._length:this._prelimContent.length}createTreeWalker(e){return new WM(this,e)}querySelector(e){e=e.toUpperCase();const t=new WM(this,(t=>t.nodeName&&t.nodeName.toUpperCase()===e)).next();return t.done?null:t.value}querySelectorAll(e){return e=e.toUpperCase(),iA.from(new WM(this,(t=>t.nodeName&&t.nodeName.toUpperCase()===e)))}_callObserver(e,t){cM(this,e,new GM(this,t,e))}toString(){return fM(this,(e=>e.toString())).join("")}toJSON(){return this.toString()}toDOM(e=document,t={},n){const r=e.createDocumentFragment();return void 0!==n&&n._createAssociation(r,this),pM(this,(i=>{r.insertBefore(i.toDOM(e,t,n),null)})),r}insert(e,t){null!==this.doc?LO(this.doc,(n=>{bM(n,this,e,t)})):this._prelimContent.splice(e,0,...t)}insertAfter(e,t){if(null!==this.doc)LO(this.doc,(n=>{const r=e&&e instanceof uM?e._item:e;yM(n,this,r,t)}));else{const n=this._prelimContent,r=null===e?0:n.findIndex((t=>t===e))+1;if(0===r&&null!==e)throw hA.create("Reference item not found");n.splice(r,0,...t)}}delete(e,t=1){null!==this.doc?LO(this.doc,(n=>{_M(n,this,e,t)})):this._prelimContent.splice(e,t)}toArray(){return hM(this)}push(e){this.insert(this.length,e)}unshift(e){this.insert(0,e)}get(e){return mM(this,e)}slice(e=0,t=this.length){return dM(this,e,t)}forEach(e){pM(this,e)}_write(e){e.writeTypeRef(fR)}}class YM extends jM{constructor(e="UNDEFINED"){super(),this.nodeName=e,this._prelimAttrs=new Map}get nextSibling(){const e=this._item?this._item.next:null;return e?e.content.type:null}get prevSibling(){const e=this._item?this._item.prev:null;return e?e.content.type:null}_integrate(e,t){super._integrate(e,t),this._prelimAttrs.forEach(((e,t)=>{this.setAttribute(t,e)})),this._prelimAttrs=null}_copy(){return new YM(this.nodeName)}clone(){const e=new YM(this.nodeName),t=this.getAttributes();for(const n in t)e.setAttribute(n,t[n]);return e.insert(0,this.toArray().map((e=>e instanceof uM?e.clone():e))),e}toString(){const e=this.getAttributes(),t=[],n=[];for(const o in e)n.push(o);n.sort();const r=n.length;for(let o=0;o<r;o++){const r=n[o];t.push(r+'="'+e[r]+'"')}const i=this.nodeName.toLocaleLowerCase();return`<${i}${t.length>0?" "+t.join(" "):""}>${super.toString()}</${i}>`}removeAttribute(e){null!==this.doc?LO(this.doc,(t=>{wM(t,this,e)})):this._prelimAttrs.delete(e)}setAttribute(e,t){null!==this.doc?LO(this.doc,(n=>{xM(n,this,e,t)})):this._prelimAttrs.set(e,t)}getAttribute(e){return SM(this,e)}hasAttribute(e){return EM(this,e)}getAttributes(){return CM(this)}toDOM(e=document,t={},n){const r=e.createElement(this.nodeName),i=this.getAttributes();for(const o in i)r.setAttribute(o,i[o]);return pM(this,(i=>{r.appendChild(i.toDOM(e,t,n))})),void 0!==n&&n._createAssociation(r,this),r}_write(e){e.writeTypeRef(pR),e.writeKey(this.nodeName)}}class GM extends nM{constructor(e,t,n){super(e,n),this.childListChanged=!1,this.attributesChanged=new Set,t.forEach((e=>{null===e?this.childListChanged=!0:this.attributesChanged.add(e)}))}}class JM extends OM{constructor(e){super(),this.hookName=e}_copy(){return new JM(this.hookName)}clone(){const e=new JM(this.hookName);return this.forEach(((t,n)=>{e.set(n,t)})),e}toDOM(e=document,t={},n){const r=t[this.hookName];let i;return i=void 0!==r?r.createDom(this):document.createElement(this.hookName),i.setAttribute("data-yjs-hook",this.hookName),void 0!==n&&n._createAssociation(i,this),i}_write(e){e.writeTypeRef(gR),e.writeKey(this.hookName)}}class XM extends KM{get nextSibling(){const e=this._item?this._item.next:null;return e?e.content.type:null}get prevSibling(){const e=this._item?this._item.prev:null;return e?e.content.type:null}_copy(){return new XM}clone(){const e=new XM;return e.applyDelta(this.toDelta()),e}toDOM(e=document,t,n){const r=e.createTextNode(this.toString());return void 0!==n&&n._createAssociation(r,this),r}toString(){return this.toDelta().map((e=>{const t=[];for(const r in e.attributes){const n=[];for(const t in e.attributes[r])n.push({key:t,value:e.attributes[r][t]});n.sort(((e,t)=>e.key<t.key?-1:1)),t.push({nodeName:r,attrs:n})}t.sort(((e,t)=>e.nodeName<t.nodeName?-1:1));let n="";for(let r=0;r<t.length;r++){const e=t[r];n+=`<${e.nodeName}`;for(let t=0;t<e.attrs.length;t++){const r=e.attrs[t];n+=` ${r.key}="${r.value}"`}n+=">"}n+=e.insert;for(let r=t.length-1;r>=0;r--)n+=`</${t[r].nodeName}>`;return n})).join("")}toJSON(){return this.toString()}_write(e){e.writeTypeRef(mR)}}class ZM{constructor(e,t){this.id=e,this.length=t}get deleted(){throw hA.methodUnimplemented()}mergeWith(e){return!1}write(e,t,n){throw hA.methodUnimplemented()}integrate(e,t){throw hA.methodUnimplemented()}}class QM extends ZM{get deleted(){return!0}delete(){}mergeWith(e){return this.constructor===e.constructor&&(this.length+=e.length,!0)}integrate(e,t){t>0&&(this.id.clock+=t,this.length-=t),xO(e.doc.store,this)}write(e,t){e.writeInfo(0),e.writeLen(this.length-t)}getMissing(e,t){return null}}class eR{constructor(e){this.content=e}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new eR(this.content)}splice(e){throw hA.methodUnimplemented()}mergeWith(e){return!1}integrate(e,t){}delete(e){}gc(e){}write(e,t){e.writeBuf(this.content)}getRef(){return 3}}class tR{constructor(e){this.len=e}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new tR(this.len)}splice(e){const t=new tR(this.len-e);return this.len=e,t}mergeWith(e){return this.len+=e.len,!0}integrate(e,t){kA(e.deleteSet,t.id.client,t.id.clock,this.len),t.markDeleted()}delete(e){}gc(e){}write(e,t){e.writeLen(this.len-t)}getRef(){return 1}}const nR=(e,t)=>new IA({guid:e,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class rR{constructor(e){e._item&&console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."),this.doc=e;const t={};this.opts=t,e.gc||(t.gc=!1),e.autoLoad&&(t.autoLoad=!0),null!==e.meta&&(t.meta=e.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new rR(nR(this.doc.guid,this.opts))}splice(e){throw hA.methodUnimplemented()}mergeWith(e){return!1}integrate(e,t){this.doc._item=t,e.subdocsAdded.add(this.doc),this.doc.shouldLoad&&e.subdocsLoaded.add(this.doc)}delete(e){e.subdocsAdded.has(this.doc)?e.subdocsAdded.delete(this.doc):e.subdocsRemoved.add(this.doc)}gc(e){}write(e,t){e.writeString(this.doc.guid),e.writeAny(this.opts)}getRef(){return 9}}class iR{constructor(e){this.embed=e}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new iR(this.embed)}splice(e){throw hA.methodUnimplemented()}mergeWith(e){return!1}integrate(e,t){}delete(e){}gc(e){}write(e,t){e.writeJSON(this.embed)}getRef(){return 5}}class oR{constructor(e,t){this.key=e,this.value=t}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new oR(this.key,this.value)}splice(e){throw hA.methodUnimplemented()}mergeWith(e){return!1}integrate(e,t){t.parent._searchMarker=null}delete(e){}gc(e){}write(e,t){e.writeKey(this.key),e.writeJSON(this.value)}getRef(){return 6}}class aR{constructor(e){this.arr=e}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new aR(this.arr)}splice(e){const t=new aR(this.arr.slice(e));return this.arr=this.arr.slice(0,e),t}mergeWith(e){return this.arr=this.arr.concat(e.arr),!0}integrate(e,t){}delete(e){}gc(e){}write(e,t){const n=this.arr.length;e.writeLen(n-t);for(let r=t;r<n;r++){const t=this.arr[r];e.writeString(void 0===t?"undefined":JSON.stringify(t))}}getRef(){return 2}}class sR{constructor(e){this.arr=e}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new sR(this.arr)}splice(e){const t=new sR(this.arr.slice(e));return this.arr=this.arr.slice(0,e),t}mergeWith(e){return this.arr=this.arr.concat(e.arr),!0}integrate(e,t){}delete(e){}gc(e){}write(e,t){const n=this.arr.length;e.writeLen(n-t);for(let r=t;r<n;r++){const t=this.arr[r];e.writeAny(t)}}getRef(){return 8}}class lR{constructor(e){this.str=e}getLength(){return this.str.length}getContent(){return this.str.split("")}isCountable(){return!0}copy(){return new lR(this.str)}splice(e){const t=new lR(this.str.slice(e));this.str=this.str.slice(0,e);const n=this.str.charCodeAt(e-1);return n>=55296&&n<=56319&&(this.str=this.str.slice(0,e-1)+"�",t.str="�"+t.str.slice(1)),t}mergeWith(e){return this.str+=e.str,!0}integrate(e,t){}delete(e){}gc(e){}write(e,t){e.writeString(0===t?this.str:this.str.slice(t))}getRef(){return 4}}const cR=[e=>new NM,e=>new OM,e=>new KM,e=>new YM(e.readKey()),e=>new jM,e=>new JM(e.readKey()),e=>new XM],uR=0,dR=1,hR=2,pR=3,fR=4,gR=5,mR=6;class yR{constructor(e){this.type=e}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new yR(this.type._copy())}splice(e){throw hA.methodUnimplemented()}mergeWith(e){return!1}integrate(e,t){this.type._integrate(e.doc,t)}delete(e){let t=this.type._start;for(;null!==t;)t.deleted?e._mergeStructs.push(t):t.delete(e),t=t.right;this.type._map.forEach((t=>{t.deleted?e._mergeStructs.push(t):t.delete(e)})),e.changed.delete(this.type)}gc(e){let t=this.type._start;for(;null!==t;)t.gc(e,!0),t=t.right;this.type._start=null,this.type._map.forEach((t=>{for(;null!==t;)t.gc(e,!0),t=t.left})),this.type._map=new Map}write(e,t){this.type._write(e)}getRef(){return 7}}const vR=(e,t)=>{let n,r=t,i=0;do{i>0&&(r=iO(r.client,r.clock+i)),n=CO(e,r),i=r.clock-n.id.clock,r=n.redone}while(null!==r&&n instanceof xR);return{item:n,diff:i}},bR=(e,t)=>{for(;null!==e&&e.keep!==t;)e.keep=t,e=e.parent._item},_R=(e,t,n)=>{const{client:r,clock:i}=t.id,o=new xR(iO(r,i+n),t,iO(r,i+n-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(n));return t.deleted&&o.markDeleted(),t.keep&&(o.keep=!0),null!==t.redone&&(o.redone=iO(t.redone.client,t.redone.clock+n)),t.right=o,null!==o.right&&(o.right.left=o),e._mergeStructs.push(o),null!==o.parentSub&&null===o.right&&o.parent._map.set(o.parentSub,o),t.length=n,o},wR=(e,t,n,r,i)=>{const o=e.doc,a=o.store,s=o.clientID,l=t.redone;if(null!==l)return TO(e,l);let c,u=t.parent._item,d=null;if(null!==u&&!0===u.deleted){if(null===u.redone&&(!n.has(u)||null===wR(e,u,n,r,i)))return null;for(;null!==u.redone;)u=TO(e,u.redone)}const h=null===u?t.parent:u.content.type;if(null===t.parentSub){for(d=t.left,c=t;null!==d;){let t=d;for(;null!==t&&t.parent._item!==u;)t=null===t.redone?null:TO(e,t.redone);if(null!==t&&t.parent._item===u){d=t;break}d=d.left}for(;null!==c;){let t=c;for(;null!==t&&t.parent._item!==u;)t=null===t.redone?null:TO(e,t.redone);if(null!==t&&t.parent._item===u){c=t;break}c=c.right}}else if(c=null,t.right&&!i){for(d=t;null!==d&&null!==d.right&&CA(r,d.right.id);)d=d.right;for(;null!==d&&null!==d.redone;)d=TO(e,d.redone);if(d&&null!==d.right)return null}else d=h._map.get(t.parentSub)||null;const p=wO(a,s),f=iO(s,p),g=new xR(f,d,d&&d.lastId,c,c&&c.id,h,t.parentSub,t.content.copy());return t.redone=f,bR(g,!0),g.integrate(e,0),g};class xR extends ZM{constructor(e,t,n,r,i,o,a,s){super(e,s.getLength()),this.origin=n,this.left=t,this.right=r,this.rightOrigin=i,this.parent=o,this.parentSub=a,this.redone=null,this.content=s,this.info=this.content.isCountable()?pA.BIT2:0}set marker(e){(this.info&pA.BIT4)>0!==e&&(this.info^=pA.BIT4)}get marker(){return(this.info&pA.BIT4)>0}get keep(){return(this.info&pA.BIT1)>0}set keep(e){this.keep!==e&&(this.info^=pA.BIT1)}get countable(){return(this.info&pA.BIT2)>0}get deleted(){return(this.info&pA.BIT3)>0}set deleted(e){this.deleted!==e&&(this.info^=pA.BIT3)}markDeleted(){this.info|=pA.BIT3}getMissing(e,t){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=wO(t,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=wO(t,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===nO&&this.id.client!==this.parent.client&&this.parent.clock>=wO(t,this.parent.client))return this.parent.client;if(this.origin&&(this.left=kO(e,t,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=TO(e,this.rightOrigin),this.rightOrigin=this.right.id),(this.left&&this.left.constructor===QM||this.right&&this.right.constructor===QM)&&(this.parent=null),this.parent){if(this.parent.constructor===nO){const e=CO(t,this.parent);e.constructor===QM?this.parent=null:this.parent=e.content.type}}else this.left&&this.left.constructor===xR&&(this.parent=this.left.parent,this.parentSub=this.left.parentSub),this.right&&this.right.constructor===xR&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);return null}integrate(e,t){if(t>0&&(this.id.clock+=t,this.left=kO(e,e.doc.store,iO(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(t),this.length-=t),this.parent){if(!this.left&&(!this.right||null!==this.right.left)||this.left&&this.left.right!==this.right){let t,n=this.left;if(null!==n)t=n.right;else if(null!==this.parentSub)for(t=this.parent._map.get(this.parentSub)||null;null!==t&&null!==t.left;)t=t.left;else t=this.parent._start;const r=new Set,i=new Set;for(;null!==t&&t!==this.right;){if(i.add(t),r.add(t),rO(this.origin,t.origin)){if(t.id.client<this.id.client)n=t,r.clear();else if(rO(this.rightOrigin,t.rightOrigin))break}else{if(null===t.origin||!i.has(CO(e.doc.store,t.origin)))break;r.has(CO(e.doc.store,t.origin))||(n=t,r.clear())}t=t.right}this.left=n}if(null!==this.left){const e=this.left.right;this.right=e,this.left.right=this}else{let e;if(null!==this.parentSub)for(e=this.parent._map.get(this.parentSub)||null;null!==e&&null!==e.left;)e=e.left;else e=this.parent._start,this.parent._start=this;this.right=e}null!==this.right?this.right.left=this:null!==this.parentSub&&(this.parent._map.set(this.parentSub,this),null!==this.left&&this.left.delete(e)),null===this.parentSub&&this.countable&&!this.deleted&&(this.parent._length+=this.length),xO(e.doc.store,this),this.content.integrate(e,this),MO(e,this.parent,this.parentSub),(null!==this.parent._item&&this.parent._item.deleted||null!==this.parentSub&&null!==this.right)&&this.delete(e)}else new QM(this.id,this.length).integrate(e,0)}get next(){let e=this.right;for(;null!==e&&e.deleted;)e=e.right;return e}get prev(){let e=this.left;for(;null!==e&&e.deleted;)e=e.left;return e}get lastId(){return 1===this.length?this.id:iO(this.id.client,this.id.clock+this.length-1)}mergeWith(e){if(this.constructor===e.constructor&&rO(e.origin,this.lastId)&&this.right===e&&rO(this.rightOrigin,e.rightOrigin)&&this.id.client===e.id.client&&this.id.clock+this.length===e.id.clock&&this.deleted===e.deleted&&null===this.redone&&null===e.redone&&this.content.constructor===e.content.constructor&&this.content.mergeWith(e.content)){const t=this.parent._searchMarker;return t&&t.forEach((t=>{t.p===e&&(t.p=this,!this.deleted&&this.countable&&(t.index-=this.length))})),e.keep&&(this.keep=!0),this.right=e.right,null!==this.right&&(this.right.left=this),this.length+=e.length,!0}return!1}delete(e){if(!this.deleted){const t=this.parent;this.countable&&null===this.parentSub&&(t._length-=this.length),this.markDeleted(),kA(e.deleteSet,this.id.client,this.id.clock,this.length),MO(e,t,this.parentSub),this.content.delete(e)}}gc(e,t){if(!this.deleted)throw hA.unexpectedCase();this.content.gc(e),t?((e,t,n)=>{const r=e.clients.get(t.id.client);r[SO(r,t.id.clock)]=n})(e,this,new QM(this.id,this.length)):this.content=new tR(this.length)}write(e,t){const n=t>0?iO(this.id.client,this.id.clock+t-1):this.origin,r=this.rightOrigin,i=this.parentSub,o=this.content.getRef()&pA.BITS5|(null===n?0:pA.BIT8)|(null===r?0:pA.BIT7)|(null===i?0:pA.BIT6);if(e.writeInfo(o),null!==n&&e.writeLeftID(n),null!==r&&e.writeRightID(r),null===n&&null===r){const t=this.parent;if(void 0!==t._item){const n=t._item;if(null===n){const n=sO(t);e.writeParentInfo(!0),e.writeString(n)}else e.writeParentInfo(!1),e.writeLeftID(n.id)}else t.constructor===String?(e.writeParentInfo(!0),e.writeString(t)):t.constructor===nO?(e.writeParentInfo(!1),e.writeLeftID(t)):hA.unexpectedCase();null!==i&&e.writeString(i)}this.content.write(e,t)}}const SR=(e,t)=>CR[t&pA.BITS5](e),CR=[()=>{hA.unexpectedCase()},e=>new tR(e.readLen()),e=>{const t=e.readLen(),n=[];for(let r=0;r<t;r++){const t=e.readString();"undefined"===t?n.push(void 0):n.push(JSON.parse(t))}return new aR(n)},e=>new eR(e.readBuf()),e=>new lR(e.readString()),e=>new iR(e.readJSON()),e=>new oR(e.readKey(),e.readJSON()),e=>new yR(cR[e.readTypeRef()](e)),e=>{const t=e.readLen(),n=[];for(let r=0;r<t;r++)n.push(e.readAny());return new sR(n)},e=>new rR(nR(e.readString(),e.readAny())),()=>{hA.unexpectedCase()}];class ER extends ZM{get deleted(){return!0}delete(){}mergeWith(e){return this.constructor===e.constructor&&(this.length+=e.length,!0)}integrate(e,t){hA.unexpectedCase()}write(e,t){e.writeInfo(10),sA.writeVarUint(e.restEncoder,this.length-t)}getMissing(e,t){return null}}const TR="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r?r:{};!0===TR["__ $YJS$ __"]&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438"),TR["__ $YJS$ __"]=!0,hw.AbsolutePosition=uO,hw.AbstractConnector=_A,hw.AbstractStruct=ZM,hw.AbstractType=uM,hw.Array=NM,hw.ContentAny=sR,hw.ContentBinary=eR,hw.ContentDeleted=tR,hw.ContentEmbed=iR,hw.ContentFormat=oR,hw.ContentJSON=aR,hw.ContentString=lR,hw.ContentType=yR;var kR=hw.Doc=IA;hw.GC=QM,hw.ID=nO,hw.Item=xR,hw.Map=OM,hw.PermanentUserData=class{constructor(e,t=e.getMap("users")){const n=new Map;this.yusers=t,this.doc=e,this.clients=new Map,this.dss=n;const r=(e,t)=>{const n=e.get("ds"),r=e.get("ids"),i=e=>this.clients.set(e,t);n.observe((e=>{e.changes.added.forEach((e=>{e.content.getContent().forEach((e=>{e instanceof Uint8Array&&this.dss.set(t,TA([this.dss.get(t)||NA(),MA(new PA(lA.createDecoder(e)))]))}))}))})),this.dss.set(t,TA(n.map((e=>MA(new PA(lA.createDecoder(e))))))),r.observe((e=>e.changes.added.forEach((e=>e.content.getContent().forEach(i))))),r.forEach(i)};t.observe((e=>{e.keysChanged.forEach((e=>r(t.get(e),e)))})),t.forEach(r)}setUserMapping(e,t,n,{filter:r=(()=>!0)}={}){const i=this.yusers;let o=i.get(n);o||(o=new OM,o.set("ids",new NM),o.set("ds",new NM),i.set(n,o)),o.get("ids").push([t]),i.observe((e=>{setTimeout((()=>{const e=i.get(n);if(e!==o){o=e,this.clients.forEach(((e,t)=>{n===e&&o.get("ids").push([t])}));const t=new zA,r=this.dss.get(n);r&&(OA(t,r),o.get("ds").push([t.toUint8Array()]))}}),0)})),e.on("afterTransaction",(e=>{setTimeout((()=>{const t=o.get("ds"),n=e.deleteSet;if(e.local&&n.clients.size>0&&r(e,n)){const e=new zA;OA(e,n),t.push([e.toUint8Array()])}}))}))}getUserByClientId(e){return this.clients.get(e)||null}getUserByDeletedId(e){for(const[t,n]of this.dss.entries())if(CA(n,e))return t;return null}},hw.RelativePosition=cO,hw.Snapshot=hO,hw.Text=KM,hw.Transaction=AO,hw.UndoManager=FO,hw.UpdateEncoderV1=FA,hw.XmlElement=YM,hw.XmlFragment=jM,hw.XmlHook=JM,hw.XmlText=XM,hw.YArrayEvent=kM,hw.YEvent=nM,hw.YMapEvent=AM,hw.YTextEvent=qM,hw.YXmlEvent=GM;var NR=hw.applyUpdate=(e,t,n)=>KA(e,t,n,LA);hw.applyUpdateV2=KA,hw.cleanupYTextFormatting=HM,hw.compareIDs=rO,hw.compareRelativePositions=(e,t)=>e===t||null!==e&&null!==t&&e.tname===t.tname&&rO(e.item,t.item)&&rO(e.type,t.type)&&e.assoc===t.assoc,hw.convertUpdateFormatV1ToV2=e=>eM(e,LA,HA),hw.convertUpdateFormatV2ToV1=tM,hw.createAbsolutePositionFromRelativePosition=(e,t)=>{const n=t.store,r=e.item,i=e.type,o=e.tname,a=e.assoc;let s=null,l=0;if(null!==r){if(wO(n,r.client)<=r.clock)return null;const e=vR(n,r),t=e.item;if(!(t instanceof xR))return null;if(s=t.parent,null===s._item||!s._item.deleted){l=t.deleted||!t.countable?0:e.diff+(a>=0?0:1);let n=t.left;for(;null!==n;)!n.deleted&&n.countable&&(l+=n.length),n=n.left}}else{if(null!==o)s=t.get(o);else{if(null===i)throw hA.unexpectedCase();{if(wO(n,i.client)<=i.clock)return null;const{item:e}=vR(n,i);if(!(e instanceof xR&&e.content instanceof yR))return null;s=e.content.type}}l=a>=0?s._length:0}return((e,t,n=0)=>new uO(e,t,n))(s,l,e.assoc)},hw.createDeleteSet=NA,hw.createDeleteSetFromStructStore=AA,hw.createDocFromSnapshot=(e,t,n=new IA)=>{if(e.gc)throw new Error("originDoc must not be garbage collected");const{sv:r,ds:i}=t,o=new HA;return e.transact((t=>{let n=0;r.forEach((e=>{e>0&&n++})),sA.writeVarUint(o.restEncoder,n);for(const[i,a]of r){if(0===a)continue;a<wO(e.store,i)&&TO(t,iO(i,a));const n=e.store.clients.get(i)||[],r=SO(n,a-1);sA.writeVarUint(o.restEncoder,r+1),o.writeClient(i),sA.writeVarUint(o.restEncoder,0);for(let e=0;e<=r;e++)n[e].write(o,0)}OA(o,i)})),KA(n,o.toUint8Array(),"snapshot"),n},hw.createID=iO,hw.createRelativePositionFromJSON=e=>new cO(null==e.type?null:iO(e.type.client,e.type.clock),e.tname||null,null==e.item?null:iO(e.item.client,e.item.clock),null==e.assoc?0:e.assoc),hw.createRelativePositionFromTypeIndex=(e,t,n=0)=>{let r=e._start;if(n<0){if(0===t)return dO(e,null,n);t--}for(;null!==r;){if(!r.deleted&&r.countable){if(r.length>t)return dO(e,iO(r.id.client,r.id.clock+t),n);t-=r.length}if(null===r.right&&n<0)return dO(e,r.lastId,n);r=r.right}return dO(e,null,n)},hw.createSnapshot=gO,hw.decodeRelativePosition=e=>(e=>{let t=null,n=null,r=null;switch(lA.readVarUint(e)){case 0:r=aO(e);break;case 1:n=lA.readVarString(e);break;case 2:t=aO(e)}const i=lA.hasContent(e)?lA.readVarInt(e):0;return new cO(t,n,r,i)})(lA.createDecoder(e)),hw.decodeSnapshot=e=>fO(e,new PA(lA.createDecoder(e))),hw.decodeSnapshotV2=fO,hw.decodeStateVector=YA,hw.decodeUpdate=e=>VO(e,LA),hw.decodeUpdateV2=VO,hw.diffUpdate=(e,t)=>JO(e,t,LA,FA),hw.diffUpdateV2=JO,hw.emptySnapshot=mO,hw.encodeRelativePosition=e=>{const t=sA.createEncoder();return((e,t)=>{const{type:n,tname:r,item:i,assoc:o}=t;if(null!==i)sA.writeVarUint(e,0),oO(e,i);else if(null!==r)sA.writeUint8(e,1),sA.writeVarString(e,r);else{if(null===n)throw hA.unexpectedCase();sA.writeUint8(e,2),oO(e,n)}sA.writeVarInt(e,o)})(t,e),sA.toUint8Array(t)},hw.encodeSnapshot=e=>pO(e,new zA),hw.encodeSnapshotV2=pO;var AR=hw.encodeStateAsUpdate=(e,t)=>WA(e,t,new FA);hw.encodeStateAsUpdateV2=WA;var OR=hw.encodeStateVector=e=>JA(e,new zA);hw.encodeStateVectorFromUpdate=e=>WO(e,zA,LA),hw.encodeStateVectorFromUpdateV2=WO,hw.equalSnapshots=(e,t)=>{const n=e.ds.clients,r=t.ds.clients,i=e.sv,o=t.sv;if(i.size!==o.size||n.size!==r.size)return!1;for(const[a,s]of i.entries())if(o.get(a)!==s)return!1;for(const[a,s]of n.entries()){const e=r.get(a)||[];if(s.length!==e.length)return!1;for(let t=0;t<s.length;t++){const n=s[t],r=e[t];if(n.clock!==r.clock||n.len!==r.len)return!1}}return!0},hw.findIndexSS=SO,hw.findRootTypeKey=sO,hw.getItem=CO,hw.getState=wO,hw.getTypeChildren=e=>{let t=e._start;const n=[];for(;t;)n.push(t),t=t.right;return n},hw.isDeleted=CA,hw.isParentOf=lO,hw.iterateDeletedStructs=SA,hw.logType=e=>{const t=[];let n=e._start;for(;n;)t.push(n),n=n.right;console.log("Children: ",t),console.log("Children content: ",t.filter((e=>!e.deleted)).map((e=>e.content)))},hw.logUpdate=e=>HO(e,LA),hw.logUpdateV2=HO,hw.mergeUpdates=KO,hw.mergeUpdatesV2=GO,hw.parseUpdateMeta=e=>jO(e,LA),hw.parseUpdateMetaV2=jO,hw.readUpdate=(e,t,n)=>qA(e,t,n,new LA(e)),hw.readUpdateV2=qA,hw.relativePositionToJSON=e=>{const t={};return e.type&&(t.type=e.type),e.tname&&(t.tname=e.tname),e.item&&(t.item=e.item),null!=e.assoc&&(t.assoc=e.assoc),t},hw.snapshot=e=>gO(AA(e.store),_O(e.store)),hw.transact=LO,hw.tryGc=(e,t,n)=>{DO(e,t,n),IO(e,t)},hw.typeListToArraySnapshot=(e,t)=>{const n=[];let r=e._start;for(;null!==r;){if(r.countable&&yO(r,t)){const e=r.content.getContent();for(let t=0;t<e.length;t++)n.push(e[t])}r=r.right}return n},hw.typeMapGetSnapshot=(e,t,n)=>{let r=e._map.get(t)||null;for(;null!==r&&(!n.sv.has(r.id.client)||r.id.clock>=(n.sv.get(r.id.client)||0));)r=r.left;return null!==r&&yO(r,n)?r.content.getContent()[r.length-1]:void 0};var MR={},RR=Zu;function DR(e){throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?code=${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}class IR{constructor(e,t,n=1){this._offsetMap=e,this._firstNode=t,this._blockOffsetSize=n}createSelectionFromOffsets(e,t,n){var r=this._firstNode;if(null===r)return null;var i=LR(r,e,this._blockOffsetSize);let o=LR(r,t,this._blockOffsetSize);if(void 0!==n&&(i=LR(r,e=PR(e,i,n,this,this._blockOffsetSize),this._blockOffsetSize),o=LR(r,t=PR(t,o,n,this,this._blockOffsetSize),this._blockOffsetSize)),null===i||null===o)return null;n=i.key,r=o.key;let a=RR.$getNodeByKey(n),s=RR.$getNodeByKey(r);if(null===a||null===s)return null;let l=0,c=0,u="element",d="element";return"text"===i.type?(l=e-i.start,u="text",i=a.getNextSibling(),e!==t&&l===a.getTextContentSize()&&RR.$isTextNode(i)&&(l=0,n=i.__key)):"inline"===i.type&&(n=a.getParentOrThrow().getKey(),l=t>i.start?i.end:i.start),"text"===o.type?(c=t-o.start,d="text"):"inline"===o.type&&(r=s.getParentOrThrow().getKey(),c=t>o.start?o.end:o.start),null===(e=RR.$createRangeSelection())?null:(e.anchor.set(n,l,u),e.focus.set(r,c,d),e)}getOffsetsFromSelection(e){var t=e.anchor,n=e.focus,r=this._offsetMap;let i=t.offset;var o=n.offset;let a=e=-1;if("text"===t.type)void 0!==(t=r.get(t.key))&&(e=t.start+i);else if(null!==(t=t.getNode().getDescendantByIndex(i))){let n=r.get(t.getKey());void 0!==n&&(e=t.getIndexWithinParent()!==i?n.end:n.start)}return"text"===n.type?void 0!==(o=r.get(n.key))&&(a=o.start+n.offset):null!==(n=n.getNode().getDescendantByIndex(o))&&(void 0!==(r=r.get(n.getKey()))&&(a=n.getIndexWithinParent()!==o?r.end:r.start)),[e,a]}}function PR(e,t,n,r,i){let o=n._offsetMap;r=r._offsetMap;let a=new Set,s=e;for(;null!==t;){var l=t.key,c=o.get(l),u=t.end-t.start;if(a.add(l),void 0===c?s+=u:(l=c.end-c.start)!==u&&(s+=u-l),null===(u=t.prev)){for(t=t.parent;null!==t;)null!==(c=t.prev)&&(u=c.key,l=o.get(u),c=c.end-c.start,a.add(u),void 0===l?s+=c:(u=l.end-l.start)!==c&&(s+=c-u)),t=t.parent;break}t=u}if(null!==(n=n._firstNode)){for(t=LR(n,e,i),e=!1;null!==t;){if(!a.has(t.key)){e=!0;break}t=t.parent}if(!e)for(;null!==t;)e=t.key,a.has(e)||(i=r.get(e),e=t.end-t.start,void 0===i?s-=e:e!==(i=i.end-i.start)&&(s+=i-e)),t=t.prev}return s}function LR(e,t,n){for(;null!==e;){if(t<e.end+("element"!==e.type||0===n?1:0)){let t=e.child;if(null!==t){e=t;continue}return e}if(null===(e=e.next))break}return null}function BR(e,t,n,r,i,o){let a=null,s=null,l=t.length;for(let m=0;m<l;m++){{var c=e,u=t[m],d=n,h=r,p=i,f=o,g=h.get(u);void 0===g&&DR(3);let a=c.offset;if(RR.$isElementNode(g)){let e=$R(g,h);h=(g=0===e.length)?null:BR(c,e,null,h,p,f),c.prevIsBlock&&!g||(c.prevIsBlock=!0,c.offset+=f),d={child:h,end:a,key:u,next:null,parent:d,prev:null,start:a,type:"element"},null!==h&&(h.parent=d),d.end=c.offset,p.set(u,d),u=d}else c.prevIsBlock=!1,f=RR.$isTextNode(g),c={child:null,end:c.offset+=f?g.__text.length:1,key:u,next:null,parent:d,prev:null,start:a,type:f?"text":"inline"},p.set(u,c),u=c}null===s?a=u:(u.prev=s,s.next=u),s=u}return a}function $R(e,t){let n=[];for(e=e.__first;null!==e;){let r=null===t?RR.$getNodeByKey(e):t.get(e);null!=r||DR(101),n.push(e),e=r.__next}return n}MR.$createOffsetView=function(e,t=1,n){let r=(n=(n||e._pendingEditorState||e._editorState)._nodeMap).get("root");return e=new Map,n=BR({offset:0,prevIsBlock:!1},$R(r,n),null,n,e,t),new IR(e,n,t)},MR.OffsetView=IR,MR.createChildrenArray=$R;var zR=Zu,FR=hw,UR=Xu,HR=MR;function VR(e){throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?code=${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}class qR{constructor(e,t){this._key="",this._map=e,this._parent=t,this._type="linebreak"}getNode(){let e=zR.$getNodeByKey(this._key);return zR.$isLineBreakNode(e)?e:null}getKey(){return this._key}getSharedType(){return this._map}getType(){return this._type}getSize(){return 1}getOffset(){return this._parent.getChildOffset(this)}destroy(e){e.collabNodeMap.delete(this._key)}}function KR(e,t){return t=new qR(e,t),e._collabNode=t}class WR{constructor(e,t,n,r){this._key="",this._map=e,this._parent=n,this._text=t,this._type=r,this._normalized=!1}getPrevNode(e){return null===e?null:(e=e.get(this._key),zR.$isTextNode(e)?e:null)}getNode(){let e=zR.$getNodeByKey(this._key);return zR.$isTextNode(e)?e:null}getSharedType(){return this._map}getType(){return this._type}getKey(){return this._key}getSize(){return this._text.length+(this._normalized?0:1)}getOffset(){return this._parent.getChildOffset(this)}spliceText(e,t,n){let r=this._parent._xmlText;e=this.getOffset()+1+e,0!==t&&r.delete(e,t),""!==n&&r.insert(e,n)}syncPropertiesAndTextFromLexical(e,t,n){var r=this.getPrevNode(n);if(n=t.__text,QR(e,this._map,r,t),null!==r&&(e=r.__text)!==n){r=t.__key,t=e;var i=zR.$getSelection();e=n.length,zR.$isRangeSelection(i)&&i.isCollapsed()&&((i=i.anchor).key===r&&(e=i.offset)),r=t.length;let o=n.length,a=i=0;for(;i<r&&i<o&&t[i]===n[i]&&i<e;)i++;for(;a+i<r&&a+i<o&&t[r-a-1]===n[o-a-1];)a++;for(;a+i<r&&a+i<o&&t[i]===n[i];)i++;t=i,e=n.slice(i,o-a),r=r-i-a,this.spliceText(t,r,e),this._text=n}}syncPropertiesAndTextFromYjs(e,t){let n=this.getNode();null===n&&VR(84),ZR(e,this._map,n,t),e=this._text,n.__text!==e&&(n.getWritable().__text=e)}destroy(e){e.collabNodeMap.delete(this._key)}}function jR(e,t,n,r){return t=new WR(e,t,n,r),e._collabNode=t}let YR=new Set("__key __parent __cachedText __text __size __next __prev __first __last".split(" "));function GR(e){return null===(e=zR.$getNodeByKey(e))&&VR(85),e}function JR(e,t,n){let r=t.__type;if(zR.$isElementNode(t)){var i=new FR.XmlText;(i=sD(i,n,r)).syncPropertiesFromLexical(e,t,null),i.syncChildrenFromLexical(e,t,null,null,null)}else zR.$isTextNode(t)?(i=jR(i=new FR.Map,t.__text,n,r)).syncPropertiesAndTextFromLexical(e,t,null):zR.$isLineBreakNode(t)?((e=new FR.Map).set("__type","linebreak"),i=KR(e,n)):zR.$isDecoratorNode(t)?(i=oD(i=new FR.XmlElement,n,r)).syncPropertiesFromLexical(e,t,null):VR(86);return i._key=t.__key,i}function XR(e,t,n){let r=t._collabNode;if(void 0===r){var i=e.editor._nodes;let r=t instanceof FR.Map?t.get("__type"):t.getAttribute("__type");if(null==r&&VR(87),void 0===i.get(r)&&VR(88),i=t.parent,(e=void 0===n&&null!==i?XR(e,i):n||null)instanceof aD||VR(89),t instanceof FR.XmlText)return sD(t,e,r);if(t instanceof FR.Map)return"linebreak"===r?KR(t,e):jR(t,"",e,r);if(t instanceof FR.XmlElement)return oD(t,e,r)}return r}function ZR(e,t,n,r){let i;r=null===r?t instanceof FR.Map?Array.from(t.keys()):Object.keys(t.getAttributes()):Array.from(r);for(let a=0;a<r.length;a++){let s=r[a];if(YR.has(s))continue;var o=n[s];let l=t instanceof FR.Map?t.get(s):t.getAttribute(s);if(o!==l){if(l instanceof FR.Doc){let t=e.docMap;o instanceof FR.Doc&&t.delete(o.guid),o=zR.createEditor();let n=l.guid;o._key=n,t.set(n,l),l=o}void 0===i&&(i=n.getWritable()),i[s]=l}}}function QR(e,t,n,r){var i=r.__type,o=e.nodeProperties;let a=o.get(i);for(void 0===a&&(a=Object.keys(r).filter((e=>!YR.has(e))),o.set(i,a)),i=e.editor.constructor,o=0;o<a.length;o++){let l=a[o];var s=null===n?void 0:n[l];let c=r[l];if(s!==c){if(c instanceof i){let t,n=e.docMap;s instanceof i&&(s=s._key,t=n.get(s),n.delete(s));let o=(s=t||new FR.Doc).guid;c._key=o,n.set(o,s),c=s,e.editor.update((()=>{r.markDirty()}))}t instanceof FR.Map?t.set(l,c):t.setAttribute(l,c)}}}function eD(e,t,n){let r=0,i=0,o=e._children,a=o.length;for(;i<a;i++){let s=r;if(r+=(e=o[i]).getSize(),(n?r>=t:r>t)&&e instanceof WR)return 0>(n=t-s-1)&&(n=0),{length:r-t,node:e,nodeIndex:i,offset:n};if(r>t)return{length:0,node:e,nodeIndex:i,offset:s};if(i===a-1)return{length:0,node:null,nodeIndex:i+1,offset:s+1}}return{length:0,node:null,nodeIndex:0,offset:0}}function tD(e){let t=e.anchor;e=e.focus;let n=!1;try{let r=t.getNode(),i=e.getNode();(!r.isAttached()||!i.isAttached()||zR.$isTextNode(r)&&t.offset>r.getTextContentSize()||zR.$isTextNode(i)&&e.offset>i.getTextContentSize())&&(n=!0)}catch(r){n=!0}return n}function nD(e,t){let n=[];for(e=e.__first;null!==e;){let r=null===t?zR.$getNodeByKey(e):t.get(e);null!=r||VR(101),n.push(e),e=r.__next}return n}function rD(e){var t=e.getParent();if(null!==t){let i=e.getWritable();t=t.getWritable();var n=e.getPreviousSibling();if(e=e.getNextSibling(),null===n)if(null!==e){var r=e.getWritable();t.__first=e.__key,r.__prev=null}else t.__first=null;else{if(r=n.getWritable(),null!==e){let t=e.getWritable();t.__prev=r.__key,r.__next=t.__key}else r.__next=null;i.__prev=null}null===e?null!==n?(e=n.getWritable(),t.__last=n.__key,e.__next=null):t.__last=null:(e=e.getWritable(),null!==n?((n=n.getWritable()).__next=e.__key,e.__prev=n.__key):e.__prev=null,i.__next=null),t.__size--,i.__parent=null}}class iD{constructor(e,t,n){this._key="",this._xmlElem=e,this._parent=t,this._type=n,this._unobservers=new Set}getPrevNode(e){return null===e?null:(e=e.get(this._key),zR.$isDecoratorNode(e)?e:null)}getNode(){let e=zR.$getNodeByKey(this._key);return zR.$isDecoratorNode(e)?e:null}getSharedType(){return this._xmlElem}getType(){return this._type}getKey(){return this._key}getSize(){return 1}getOffset(){return this._parent.getChildOffset(this)}syncPropertiesFromLexical(e,t,n){n=this.getPrevNode(n),QR(e,this._xmlElem,n,t)}syncPropertiesFromYjs(e,t){let n=this.getNode();null===n&&VR(83),ZR(e,this._xmlElem,n,t)}destroy(e){e.collabNodeMap.delete(this._key),this._unobservers.forEach((e=>e())),this._unobservers.clear()}}function oD(e,t,n){return t=new iD(e,t,n),e._collabNode=t}class aD{constructor(e,t,n){this._key="",this._children=[],this._xmlText=e,this._type=n,this._parent=t}getPrevNode(e){return null===e?null:(e=e.get(this._key),zR.$isElementNode(e)?e:null)}getNode(){let e=zR.$getNodeByKey(this._key);return zR.$isElementNode(e)?e:null}getSharedType(){return this._xmlText}getType(){return this._type}getKey(){return this._key}isEmpty(){return 0===this._children.length}getSize(){return 1}getOffset(){let e=this._parent;return null===e&&VR(90),e.getChildOffset(this)}syncPropertiesFromYjs(e,t){let n=this.getNode();null===n&&VR(91),ZR(e,this._xmlText,n,t)}applyChildrenYjsDelta(e,t){let n=this._children,r=0;for(let u=0;u<t.length;u++){var i=t[u],o=i.insert,a=i.delete;if(null!=i.retain)r+=i.retain;else if("number"==typeof a)for(o=a;0<o;){let{node:e,nodeIndex:t,offset:u,length:d}=eD(this,r,!1);if(e instanceof aD||e instanceof qR||e instanceof iD)n.splice(t,1),--o;else{if(!(e instanceof WR))break;i=Math.min(o,d),a=0!==t?n[t-1]:null;var s=e.getSize();if(0===u&&1===i&&0<t&&a instanceof WR&&d===s&&0===Array.from(e._map.keys()).length)a._text+=e._text,n.splice(t,1);else if(0===u&&i===s)n.splice(t,1);else{a=e;var l=u,c=i;s=(s=e._text).slice(0,l)+""+s.slice(l+c),a._text=s}o-=i}}else{if(null==o)throw Error("Unexpected delta format");if("string"==typeof o){let{node:e,offset:t}=eD(this,r,!0);e instanceof WR?(i=e,s=t,l=o,a=(a=e._text).slice(0,s)+l+a.slice(s+0),i._text=a):this._xmlText.delete(t,o.length),r+=o.length}else i=o,({nodeIndex:o}=eD(this,r,!1)),i=XR(e,i,this),n.splice(o,0,i),r+=1}}}syncChildrenFromYjs(e){var t=this.getNode();null===t&&VR(92);var n=t.__key;let r=nD(t,null),i=r.length;var o=this._children;let a,s=o.length,l=e.collabNodeMap,c=new Set,u=0;var d=null;s!==i&&t.getWritable();for(let v=0;v<s;v++){var h=r[u],p=o[v],f=p.getNode(),g=p._key;if(null!==f&&h===g)d=zR.$isTextNode(f),c.add(h),d&&(p._key=h,p instanceof aD?(d=p._xmlText,p.syncPropertiesFromYjs(e,null),p.applyChildrenYjsDelta(e,d.toDelta()),p.syncChildrenFromYjs(e)):p instanceof WR?p.syncPropertiesAndTextFromYjs(e,null):p instanceof iD?p.syncPropertiesFromYjs(e,null):p instanceof qR||VR(93)),d=f,u++;else{if(void 0===a)for(a=new Set,g=0;g<s;g++){var m=o[g]._key;""!==m&&a.add(m)}if(null===f||void 0===h||a.has(h)){f=t.getWritable(),h=e,m=n;var y=(g=p).getType();void 0===(y=h.editor._nodes.get(y))&&VR(88),(y=new y.klass).__parent=m,g._key=y.__key,g instanceof aD?(m=g._xmlText,g.syncPropertiesFromYjs(h,null),g.applyChildrenYjsDelta(h,m.toDelta()),g.syncChildrenFromYjs(h)):g instanceof WR?g.syncPropertiesAndTextFromYjs(h,null):g instanceof iD&&g.syncPropertiesFromYjs(h,null),h.collabNodeMap.set(y.__key,g),g=(h=y).__key,l.set(g,p),null===d?(d=f.getFirstChild(),f.__first=g,null!==d&&((d=d.getWritable()).__prev=g,h.__next=d.__key)):(p=d.getWritable(),m=d.getNextSibling(),p.__next=g,h.__prev=d.__key,null!==m&&((d=m.getWritable()).__prev=g,h.__next=d.__key)),v===s-1&&(f.__last=g),f.__size++,d=h}else rD(p=GR(h)),v--,u++}}for(t=0;t<i;t++)o=r[t],c.has(o)||(n=GR(o),void 0!==(o=e.collabNodeMap.get(o))&&o.destroy(e),rD(n))}syncPropertiesFromLexical(e,t,n){QR(e,this._xmlText,this.getPrevNode(n),t)}_syncChildFromLexical(e,t,n,r,i,o){t=this._children[t],n=GR(n),t instanceof aD&&zR.$isElementNode(n)?(t.syncPropertiesFromLexical(e,n,r),t.syncChildrenFromLexical(e,n,r,i,o)):t instanceof WR&&zR.$isTextNode(n)?t.syncPropertiesAndTextFromLexical(e,n,r):t instanceof iD&&zR.$isDecoratorNode(n)&&t.syncPropertiesFromLexical(e,n,r)}syncChildrenFromLexical(e,t,n,r,i){var o=this.getPrevNode(n);let a=null===o?[]:nD(o,n);o=nD(t,null);let s,l,c=a.length-1,u=o.length-1,d=e.collabNodeMap,h=0;for(t=0;h<=c&&t<=u;){var p=a[h];let c=o[t];if(p===c)this._syncChildFromLexical(e,t,c,n,r,i),h++,t++;else{void 0===s&&(s=new Set(a)),void 0===l&&(l=new Set(o));var f=l.has(p);p=s.has(c),f?(f=JR(e,f=GR(c),this),d.set(c,f),p?(this.splice(e,t,1,f),h++):this.splice(e,t,0,f),t++):(this.splice(e,t,1),h++)}}if(r=t>u,(n=h>c)&&!r)for(;t<=u;++t)r=JR(e,r=GR(n=o[t]),this),this.append(r),d.set(n,r);else if(r&&!n)for(o=this._children.length-1;o>=t;o--)this.splice(e,o,1)}append(e){let t=this._xmlText;var n=this._children;if(n=void 0!==(n=n[n.length-1])?n.getOffset()+n.getSize():0,e instanceof aD)t.insertEmbed(n,e._xmlText);else if(e instanceof WR){let r=e._map;null===r.parent&&t.insertEmbed(n,r),t.insert(n+1,e._text)}else e instanceof qR?t.insertEmbed(n,e._map):e instanceof iD&&t.insertEmbed(n,e._xmlElem);this._children.push(e)}splice(e,t,n,r){let i=this._children;var o=i[t];if(void 0===o)void 0===r&&VR(94),this.append(r);else{var a=o.getOffset();-1===a&&VR(95);var s=this._xmlText;if(0!==n&&s.delete(a,o.getSize()),r instanceof aD?s.insertEmbed(a,r._xmlText):r instanceof WR?(null===(o=r._map).parent&&s.insertEmbed(a,o),s.insert(a+1,r._text)):r instanceof qR?s.insertEmbed(a,r._map):r instanceof iD&&s.insertEmbed(a,r._xmlElem),0!==n)for(a=i.slice(t,t+n),s=0;s<a.length;s++)a[s].destroy(e);void 0!==r?i.splice(t,n,r):i.splice(t,n)}}getChildOffset(e){let t=0,n=this._children;for(let r=0;r<n.length;r++){let i=n[r];if(i===e)return t;t+=i.getSize()}return-1}destroy(e){let t=e.collabNodeMap,n=this._children;for(let r=0;r<n.length;r++)n[r].destroy(e);t.delete(this._key)}}function sD(e,t,n){return t=new aD(e,t,n),e._collabNode=t}function lD(e,t){var n=t.collabNodeMap.get(e.key);if(void 0===n)return null;t=e.offset;let r=n.getSharedType();if(n instanceof WR){if(r=n._parent._xmlText,-1===(e=n.getOffset()))return null;t=e+1+t}else if(n instanceof aD&&"element"===e.type){let r=n=0;for(e=e.getNode().getFirstChild();null!==e&&r++<t;)zR.$isTextNode(e)?n+=e.getTextContentSize()+1:n++,e=e.getNextSibling();t=n}return FR.createRelativePositionFromTypeIndex(r,t)}function cD(e,t){if(null==e){if(null!=t)return!0}else if(null==t||!FR.compareRelativePositions(e,t))return!0;return!1}function uD(e,t){if(null!==(e=e.cursorsContainer)){let n=(t=t.selections).length;for(let r=0;r<n;r++)e.removeChild(t[r])}}function dD(e,t){var n=t.awareness.getLocalState();if(null!==n&&(t=n.anchorPos,n=n.focusPos,null!==t&&null!==n&&(t=FR.createAbsolutePositionFromRelativePosition(t,e.doc),e=FR.createAbsolutePositionFromRelativePosition(n,e.doc),null!==t&&null!==e))){let[r,i]=pD(t.type,t.index),[o,a]=pD(e.type,e.index);if(null!==r&&null!==o){t=r.getKey(),n=o.getKey();let s=zR.$getSelection();zR.$isRangeSelection(s)&&(e=s.focus,hD(s.anchor,t,i),hD(e,n,a))}}}function hD(e,t,n){if(e.key!==t||e.offset!==n){let r=zR.$getNodeByKey(t);if(null!==r&&!zR.$isElementNode(r)&&!zR.$isTextNode(r)){let e=r.getParentOrThrow();t=e.getKey(),n=r.getIndexWithinParent(),r=e}e.set(t,n,zR.$isElementNode(r)?"element":"text")}}function pD(e,t){if(void 0===(e=e._collabNode))return[null,0];if(e instanceof aD){let{node:n,offset:r}=eD(e,t,!0);return null===n?[e,0]:[n,r]}return[null,0]}function fD(e,t){var n=Array.from(t.awareness.getStates()),r=e.clientID;t=e.cursors;var i=e.editor._editorState._nodeMap;let o=new Set;for(var a=0;a<n.length;a++){let[b,_]=n[a];if(b!==r){o.add(b);let{anchorPos:n,focusPos:r,name:a,color:w,focusing:x}=_;var s=null,l=t.get(b);if(void 0===l&&(l={color:w,name:a,selection:null},t.set(b,l)),null!==n&&null!==r&&x){var c=FR.createAbsolutePositionFromRelativePosition(n,e.doc),u=FR.createAbsolutePositionFromRelativePosition(r,e.doc);if(null!==c&&null!==u){let[e,t]=pD(c.type,c.index),[n,r]=pD(u.type,u.index);if(null!==e&&null!==n){c=e.getKey();var d=n.getKey();if(null===(s=l.selection)){u=t;var h=r,p=(s=l).color,f=document.createElement("span");f.style.cssText=`position:absolute;top:0;bottom:0;right:-1px;width:1px;background-color:${p};z-index:10;`;var g=document.createElement("span");g.textContent=s.name,g.style.cssText=`position:absolute;left:-2px;top:-16px;background-color:${p};color:#fff;line-height:12px;font-size:12px;padding:2px;font-family:Arial;font-weight:bold;white-space:nowrap;`,f.appendChild(g),s={anchor:{key:c,offset:u},caret:f,color:p,focus:{key:d,offset:h},name:g,selections:[]}}else u=s.anchor,h=s.focus,u.key=c,u.offset=t,h.key=d,h.offset=r}}}e:if(c=e,u=l,f=s,p=i,h=c.editor,s=h.getRootElement(),l=c.cursorsContainer,null!==l&&null!==s&&(s=l.offsetParent,null!==s))if(s=s.getBoundingClientRect(),d=u.selection,null===f)null!==d&&(u.selection=null,uD(c,d));else{u.selection=f,u=f.caret,d=f.color,c=f.selections,g=f.anchor,f=f.focus;var m=g.key,y=f.key,v=p.get(m);if(p=p.get(y),null!=v&&null!=p){if(v===p&&zR.$isLineBreakNode(v))p=[h.getElementByKey(m).getBoundingClientRect()];else{if(null===(p=UR.createDOMRange(h,v,g.offset,p,f.offset)))break e;p=UR.createRectsFromDOMRange(h,p)}for(f=c.length,h=p.length,g=0;g<h;g++)v=p[g],void 0===(m=c[g])&&(m=document.createElement("span"),c[g]=m,y=document.createElement("span"),m.appendChild(y),l.appendChild(m)),v=`position:absolute;top:${v.top-s.top}px;left:${v.left-s.left}px;height:${v.height}px;width:${v.width}px;pointer-events:none;z-index:5;`,m.style.cssText=v,m.firstChild.style.cssText=`${v}left:0;top:0;background-color:${d};opacity:0.3;`,g===h-1&&u.parentNode!==m&&m.appendChild(u);for(s=f-1;s>=h;s--)l.removeChild(c[s]),c.pop()}}}}for(n=Array.from(t.keys()),r=0;r<n.length;r++)i=n[r],o.has(i)||void 0!==(a=t.get(i))&&(null!==(a=a.selection)&&uD(e,a),t.delete(i))}function gD(e,t,n,r){var i=(t=t.awareness).getLocalState();if(null!==i){var{anchorPos:o,focusPos:a,name:s,color:l,focusing:c}=i,u=i=null;(null!==r&&(null===o||r.is(n))||null!==n)&&(zR.$isRangeSelection(r)&&(i=lD(r.anchor,e),u=lD(r.focus,e)),(cD(o,i)||cD(a,u))&&t.setLocalState({anchorPos:i,color:l,focusPos:u,focusing:c,name:s}))}}let mD=zR.createCommand("CONNECTED_COMMAND"),yD=zR.createCommand("TOGGLE_CONNECT_COMMAND");var vD=dw.CONNECTED_COMMAND=mD,bD=dw.TOGGLE_CONNECT_COMMAND=yD;dw.createBinding=function(e,t,n,r,i){return null!=r||VR(81),(t=sD(t=r.get("root",FR.XmlText),null,"root"))._key="root",{clientID:r.clientID,collabNodeMap:new Map,cursors:new Map,cursorsContainer:null,doc:r,docMap:i,editor:e,id:n,nodeProperties:new Map,root:t}},dw.createUndoManager=function(e,t){return new FR.UndoManager(t,{trackedOrigins:new Set([e,null])})},dw.initLocalState=function(e,t,n,r){e.awareness.setLocalState({anchorPos:null,color:n,focusPos:null,focusing:r,name:t})},dw.setLocalStateFocus=function(e,t,n,r){({awareness:e}=e);let i=e.getLocalState();null===i&&(i={anchorPos:null,color:n,focusPos:null,focusing:r,name:t}),i.focusing=r,e.setLocalState(i)},dw.syncCursorPositions=fD,dw.syncLexicalUpdateToYjs=function(e,t,n,r,i,o,a,s){!function(e,t){e.doc.transact(t,e)}(e,(()=>{r.read((()=>{if(s.has("collaboration")||s.has("historic")){if(0<a.size){var r=Array.from(a),l=e.collabNodeMap,c=[];for(let e=0;e<r.length;e++){var u=r[e],d=zR.$getNodeByKey(u),h=l.get(u);if(h instanceof WR)if(zR.$isTextNode(d))c.push([h,d.__text]);else{if(-1===(d=h.getOffset()))continue;let e=h._parent;h._normalized=!0,e._xmlText.delete(d,1),l.delete(u),h=(u=e._children).indexOf(h),u.splice(h,1)}}for(r=0;r<c.length;r++){let[e,t]=c[r];e instanceof WR&&"string"==typeof t&&(e._text=t)}}}else i.has("root")&&(c=n._nodeMap,r=zR.$getRoot(),(l=e.root).syncPropertiesFromLexical(e,r,c),l.syncChildrenFromLexical(e,r,c,i,o)),c=zR.$getSelection(),gD(e,t,n._selection,c)}))}))},dw.syncYjsChangesToLexical=function(e,t,n,r){let i=e.editor,o=i._editorState;i.update((()=>{for(var r=i._pendingEditorState,a=0;a<n.length;a++){var s=e,l=n[a],{target:c}=l;if((c=XR(s,c))instanceof aD&&l instanceof FR.YTextEvent){let{keysChanged:e,childListChanged:t,delta:n}=l;0<e.size&&c.syncPropertiesFromYjs(s,e),t&&(c.applyChildrenYjsDelta(s,n),c.syncChildrenFromYjs(s))}else c instanceof WR&&l instanceof FR.YMapEvent?(({keysChanged:l}=l),0<l.size&&c.syncPropertiesAndTextFromYjs(s,l)):c instanceof iD&&l instanceof FR.YXmlEvent?(({attributesChanged:l}=l),0<l.size&&c.syncPropertiesFromYjs(s,l)):VR(82)}if(a=zR.$getSelection(),zR.$isRangeSelection(a))if(tD(a)){if(s=o._selection,zR.$isRangeSelection(s)){c=HR.$createOffsetView(i,0,o),r=HR.$createOffsetView(i,0,r);let[n,l]=c.getOffsetsFromSelection(s);null!==(r=r.createSelectionFromOffsets(n,l,c))?zR.$setSelection(r):(dD(e,t),tD(a)&&(0===(r=zR.$getRoot()).getChildrenSize()&&r.append(zR.$createParagraphNode()),zR.$getRoot().selectEnd()))}gD(e,t,s,zR.$getSelection())}else dD(e,t)}),{onUpdate:()=>{fD(e,t)},skipTransforms:!0,tag:r?"historic":"collaboration"})};var _D=ow,wD=Nv,xD=a.exports,SD=Ju,CD=dw,ED=Zu,TD=U.exports,kD=hw;function ND(e,t,n,r,i,o,a,s,l){let c=xD.useRef(!1),[u,d]=xD.useState(r.get(t)),h=xD.useMemo((()=>CD.createBinding(e,n,t,u,r)),[e,n,t,r,u]),p=xD.useCallback((()=>{n.connect()}),[n]),f=xD.useCallback((()=>{try{n.disconnect()}catch(e){}}),[n]);xD.useEffect((()=>{let{root:s}=h,{awareness:u}=n,g=({status:t})=>{e.dispatchCommand(CD.CONNECTED_COMMAND,"connected"===t)},m=t=>{a&&t&&s.isEmpty()&&0===s._xmlText._length&&!1===c.current&&function(e,t){e.update((()=>{var n=ED.$getRoot();if(n.isEmpty())if(t)switch(typeof t){case"string":var r=e.parseEditorState(t);e.setEditorState(r,{tag:"history-merge"});break;case"object":e.setEditorState(t,{tag:"history-merge"});break;case"function":e.update((()=>{ED.$getRoot().isEmpty()&&t(e)}),{tag:"history-merge"})}else r=ED.$createParagraphNode(),n.append(r),({activeElement:n}=document),(null!==ED.$getSelection()||null!==n&&n===e.getRootElement())&&r.select()}),{tag:"history-merge"})}(e,l),c.current=!1},y=()=>{CD.syncCursorPositions(h,n)},v=(e,t)=>{(t=t.origin)!==h&&CD.syncYjsChangesToLexical(h,n,e,t instanceof kD.UndoManager)};CD.initLocalState(n,i,o,document.activeElement===e.getRootElement());let b=n=>{!function(e,t){if(e.update((()=>{let e=ED.$getRoot();e.clear(),e.select()}),{tag:"skip-collab"}),null!=t.cursors&&(null!=(e=t.cursors)&&null!=(t=t.cursorsContainer))){e=Array.from(e.values());for(let r=0;r<e.length;r++){var n=e[r].selection;if(n&&null!=n.selections){n=n.selections;for(let e=0;e<n.length;e++)t.removeChild(n[r])}}}}(e,h),d(n),r.set(t,n),c.current=!0};n.on("reload",b),n.on("status",g),n.on("sync",m),u.on("update",y),s.getSharedType().observeDeep(v);let _=e.registerUpdateListener((({prevEditorState:e,editorState:t,dirtyLeaves:r,dirtyElements:i,normalizedNodes:o,tags:a})=>{!1===a.has("skip-collab")&&CD.syncLexicalUpdateToYjs(h,n,e,t,i,r,o,a)}));return p(),()=>{!1===c.current&&f(),n.off("sync",m),n.off("status",g),n.off("reload",b),u.off("update",y),s.getSharedType().unobserveDeep(v),r.delete(t),_()}}),[h,o,p,f,r,e,t,l,i,n,a]);let g=xD.useMemo((()=>TD.createPortal(xD.createElement("div",{ref:e=>{h.cursorsContainer=e}}),s&&s.current||document.body)),[h,s]);return xD.useEffect((()=>e.registerCommand(CD.TOGGLE_CONNECT_COMMAND,(e=>(void 0!==p&&void 0!==f&&(e?(console.log("Collaboration connected!"),p()):(console.log("Collaboration disconnected!"),f())),!0)),ED.COMMAND_PRIORITY_EDITOR)),[p,f,e]),[g,h]}var AD=function({id:e,providerFactory:t,shouldBootstrap:n,username:r,cursorColor:i,cursorsContainerRef:o,initialEditorState:a}){let s=_D.useCollaborationContext(r,i),{yjsDocMap:l,name:c,color:u}=s,[d]=wD.useLexicalComposerContext();xD.useEffect((()=>(s.isCollabActive=!0,()=>{null==d._parentEditor&&(s.isCollabActive=!1)})),[s,d]),r=xD.useMemo((()=>t(e,l)),[e,t,l]);let[h,p]=ND(d,e,r,l,c,u,n,o,a);return s.clientID=p.clientID,function(e,t){let n=xD.useMemo((()=>CD.createUndoManager(t,t.root.getSharedType())),[t]);xD.useEffect((()=>SD.mergeRegister(e.registerCommand(ED.UNDO_COMMAND,(()=>(n.undo(),!0)),ED.COMMAND_PRIORITY_EDITOR),e.registerCommand(ED.REDO_COMMAND,(()=>(n.redo(),!0)),ED.COMMAND_PRIORITY_EDITOR)))),xD.useCallback((()=>{n.clear()}),[n])}(d,p),function(e,t,n,r){xD.useEffect((()=>SD.mergeRegister(e.registerCommand(ED.FOCUS_COMMAND,(()=>(CD.setLocalStateFocus(t,n,r,!0),!1)),ED.COMMAND_PRIORITY_EDITOR),e.registerCommand(ED.BLUR_COMMAND,(()=>(CD.setLocalStateFocus(t,n,r,!1),!1)),ED.COMMAND_PRIORITY_EDITOR))),[r,e,n,t])}(d,r,c,u),h},OD=o(Qb).jsx,MD=a.exports;function RD(e,t){return RD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},RD(e,t)}var DD={error:null},ID=function(e){function t(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state=DD,t.resetErrorBoundary=function(){for(var e,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];null==t.props.onReset||(e=t.props).onReset.apply(e,r),t.reset()},t}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,RD(e,t)}(t,e),t.getDerivedStateFromError=function(e){return{error:e}};var n=t.prototype;return n.reset=function(){this.setState(DD)},n.componentDidCatch=function(e,t){var n,r;null==(n=(r=this.props).onError)||n.call(r,e,t)},n.componentDidUpdate=function(e,t){var n,r,i=this.props.resetKeys;null!==this.state.error&&null!==t.error&&function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),e.length!==t.length||e.some((function(e,n){return!Object.is(e,t[n])}))}(e.resetKeys,i)&&(null==(n=(r=this.props).onResetKeysChange)||n.call(r,e.resetKeys,i),this.reset())},n.render=function(){var e=this.state.error,t=this.props,n=t.fallbackRender,r=t.FallbackComponent;if(t=t.fallback,null!==e){if(e={error:e,resetErrorBoundary:this.resetErrorBoundary},MD.isValidElement(t))return t;if("function"==typeof n)return n(e);if(r)return MD.createElement(r,e);throw Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},t}(MD.Component),PD=function({children:e,onError:t}){return MD.createElement(ID,{fallback:OD("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:t},e)},LD={},BD=Ju,$D=Zu;class zD extends $D.TextNode{static getType(){return"hashtag"}static clone(e){return new zD(e.__text,e.__key)}constructor(e,t){super(e,t)}createDOM(e){let t=super.createDOM(e);return BD.addClassNamesToElement(t,e.theme.hashtag),t}static importJSON(e){let t=FD(e.text);return t.setFormat(e.format),t.setDetail(e.detail),t.setMode(e.mode),t.setStyle(e.style),t}exportJSON(){return{...super.exportJSON(),type:"hashtag"}}canInsertTextBefore(){return!1}isTextEntity(){return!0}}function FD(e=""){return $D.$applyNodeReplacement(new zD(e))}LD.$createHashtagNode=FD,LD.$isHashtagNode=function(e){return e instanceof zD};var UD=LD.HashtagNode=zD,HD={},VD=Nv,qD=k_,KD=Ju,WD=a.exports,jD=HD.useLexicalTextEntity=function(e,t,n){let[r]=VD.useLexicalComposerContext();WD.useEffect((()=>KD.mergeRegister(...qD.registerLexicalTextEntity(r,e,t,n))),[n,r,e,t])},YD=LD,GD=Nv,JD=HD,XD=a.exports,ZD=RegExp;let QD=String.fromCharCode,eI="A-Za-zªµºÀ-ÖØ-öø-Ɂɐ-ˁˆ-ˑˠ-ˤˮͺΆΈ-ΊΌΎ-ΡΣ-ώϐ-ϵϷ-ҁҊ-ӎӐ-ӹԀ-ԏԱ-Ֆՙա-ևא-תװ-ײء-غـ-يٮ-ٯٱ-ۓەۥ-ۦۮ-ۯۺ-ۼۿܐܒ-ܯݍ-ݭހ-ޥޱऄ-हऽॐक़-ॡॽঅ-ঌএ-ঐও-নপ-রলশ-হঽৎড়-ঢ়য়-ৡৰ-ৱਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽૐૠ-ૡଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽଡ଼-ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹఅ-ఌఎ-ఐఒ-నప-ళవ-హౠ-ౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠ-ೡഅ-ഌഎ-ഐഒ-നപ-ഹൠ-ൡඅ-ඖක-නඳ-රලව-ෆก-ะา-ำเ-ๆກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາ-ຳຽເ-ໄໆໜ-ໝༀཀ-ཇཉ-ཪྈ-ྋက-အဣ-ဧဩ-ဪၐ-ၕႠ-Ⴥა-ჺჼᄀ-ᅙᅟ-ᆢᆨ-ᇹሀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙶᚁ-ᚚᚠ-ᛪᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦩᧁ-ᧇᨀ-ᨖᴀ-ᶿḀ-ẛẠ-ỹἀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₔℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℱℳ-ℹℼ-ℿⅅ-ⅉⰀ-Ⱞⰰ-ⱞⲀ-ⳤⴀ-ⴥⴰ-ⵥⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〆〱-〵〻-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄬㄱ-ㆎㆠ-ㆷㇰ-ㇿ㐀-䶵一-龻ꀀ-ꒌꠀ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢ가-힣豈-鶴侮-頻並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ̀-ͯ҃-֑҆-ֹֻ-ֽֿׁ-ׂׄ-ׇׅؐ-ًؕ-ٰٞۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ްँ-ः़ा-्॑-॔ॢ-ॣঁ-ঃ়া-ৄে-ৈো-্ৗৢ-ৣਁ-ਃ਼ਾ-ੂੇ-ੈੋ-੍ੰ-ੱઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣଁ-ଃ଼ା-ୃେ-ୈୋ-୍ୖ-ୗஂா-ூெ-ைொ-்ௗఁ-ఃా-ౄె-ైొ-్ౕ-ౖಂ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕ-ೖം-ഃാ-ൃെ-ൈൊ-്ൗං-ඃ්ා-ුූෘ-ෟෲ-ෳัิ-ฺ็-๎ັິ-ູົ-ຼ່-ໍ༘-༹༙༵༷༾-༿ཱ-྄྆-྇ྐ-ྗྙ-ྼ࿆ာ-ဲံ-္ၖ-ၙ፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳា-៓៝᠋-᠍ᢩᤠ-ᤫᤰ-᤻ᦰ-ᧀᧈ-ᧉᨗ-ᨛ᷀-᷃⃐-⃥⃜⃡-⃫〪-゙〯-゚ꠂ꠆ꠋꠣ-ꠧﬞ︀-️︠-︣À-ÖØ-öø-ÿĀ-ɏɓ-ɔɖ-ɗəɛɣɨɯɲʉʋʻ̀-ͯḀ-ỿЀ-ӿԀ-ԧⷠ-ⷿꙀ-֑ꚟ-ֿׁ-ׂׄ-ׇׅא-תװ-״-ﬨשׁ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﭏؐ-ؚؠ-ٟٮ-ۓە-ۜ۞-۪ۨ-ۯۺ-ۼۿݐ-ݿࢠࢢ-ࢬࣤ-ࣾﭐ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼ-ก-ฺเ-๎ᄀ-ᇿ-ㆅꥠ-가-ힰ-ᄀ-ᅵァ-ヺー-ヾヲ-゚0-9A-Za-zぁ-ゖ゙-ゞ㐀-䶿一-鿿"+QD(173824)+"-"+QD(177983)+QD(177984)+"-"+QD(178207)+QD(194560)+"-"+QD(195103)+"〃々〻",{alpha:tI,alphanumeric:nI,hashChars:rI}={alpha:eI,alphanumeric:eI+"0-9٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩၀-၉០-៩᠐-᠙᥆-᥏᧐-᧙0-9_",hashChars:"#\\uFF03"},iI="["+nI+"]",oI=new ZD("(^|$|[^&/"+nI+"])(["+rI+"])("+iI+"*["+tI+"]"+iI+"*)","i");var aI=function(){let[e]=GD.useLexicalComposerContext();XD.useEffect((()=>{if(!e.hasNodes([YD.HashtagNode]))throw Error("HashtagPlugin: HashtagNode not registered on editor")}),[e]);let t=XD.useCallback((e=>YD.$createHashtagNode(e.getTextContent())),[]),n=XD.useCallback((e=>{if(null===(e=oI.exec(e)))return null;const t=e.index+e[1].length;return{end:t+(e[3].length+1),start:t}}),[]);return JD.useLexicalTextEntity(n,YD.HashtagNode,t),null},sI={},lI={},cI=Nv,uI=Zu,dI=a.exports;function hI(e,t){return e.getEditorState().read((()=>{let e=uI.$getNodeByKey(t);return null!==e&&e.isSelected()}))}var pI=lI.useLexicalNodeSelection=function(e){let[t]=cI.useLexicalComposerContext(),[n,r]=dI.useState((()=>hI(t,e)));return dI.useEffect((()=>{let n=!0,i=t.registerUpdateListener((()=>{n&&r(hI(t,e))}));return()=>{n=!1,i()}}),[t,e]),[n,dI.useCallback((n=>{t.update((()=>{let t=uI.$getSelection();uI.$isNodeSelection(t)||(t=uI.$createNodeSelection(),uI.$setSelection(t)),n?t.add(e):t.delete(e)}))}),[t,e]),dI.useCallback((()=>{t.update((()=>{const e=uI.$getSelection();uI.$isNodeSelection(e)&&e.clear()}))}),[t])]},fI=Nv,gI=lI,mI=Ju,yI=Zu,vI=a.exports;let bI=yI.createCommand("INSERT_HORIZONTAL_RULE_COMMAND");function _I({nodeKey:e}){let[t]=fI.useLexicalComposerContext(),[n,r,i]=gI.useLexicalNodeSelection(e),o=vI.useCallback((t=>(n&&yI.$isNodeSelection(yI.$getSelection())&&(t.preventDefault(),CI(t=yI.$getNodeByKey(e))&&t.remove(),r(!1)),!1)),[n,e,r]);return vI.useEffect((()=>mI.mergeRegister(t.registerCommand(yI.CLICK_COMMAND,(o=>{let a=t.getElementByKey(e);return o.target===a&&(o.shiftKey||i(),r(!n),!0)}),yI.COMMAND_PRIORITY_LOW),t.registerCommand(yI.KEY_DELETE_COMMAND,o,yI.COMMAND_PRIORITY_LOW),t.registerCommand(yI.KEY_BACKSPACE_COMMAND,o,yI.COMMAND_PRIORITY_LOW))),[i,t,n,e,o,r]),vI.useEffect((()=>{let r=t.getElementByKey(e);null!==r&&(r.className=n?"selected":"")}),[t,n,e]),null}class wI extends yI.DecoratorNode{static getType(){return"horizontalrule"}static clone(e){return new wI(e.__key)}static importJSON(){return SI()}static importDOM(){return{hr:()=>({conversion:xI,priority:0})}}exportJSON(){return{type:"horizontalrule",version:1}}exportDOM(){return{element:document.createElement("hr")}}createDOM(){return document.createElement("hr")}getTextContent(){return"\n"}isInline(){return!1}updateDOM(){return!1}decorate(){return vI.createElement(_I,{nodeKey:this.__key})}}function xI(){return{node:SI()}}function SI(){return yI.$applyNodeReplacement(new wI)}function CI(e){return e instanceof wI}var EI=sI.$createHorizontalRuleNode=SI,TI=sI.$isHorizontalRuleNode=CI,kI=sI.HorizontalRuleNode=wI,NI=sI.INSERT_HORIZONTAL_RULE_COMMAND=bI,AI=Nv,OI=sI,MI=Ju,RI=Zu,DI=a.exports,II=function(){let[e]=AI.useLexicalComposerContext();return DI.useEffect((()=>e.registerCommand(OI.INSERT_HORIZONTAL_RULE_COMMAND,(()=>{var e=RI.$getSelection();return!!RI.$isRangeSelection(e)&&(null!==e.focus.getNode()&&(e=OI.$createHorizontalRuleNode(),MI.$insertNodeToNearestRoot(e)),!0)}),RI.COMMAND_PRIORITY_EDITOR)),[e]),null},PI=zy,LI=Nv,BI=a.exports,$I=Ju,zI=Zu;var FI=function(){let[e]=LI.useLexicalComposerContext();return BI.useEffect((()=>{if(!e.hasNodes([PI.ListNode,PI.ListItemNode]))throw Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")}),[e]),function(e){BI.useEffect((()=>$I.mergeRegister(e.registerCommand(PI.INSERT_ORDERED_LIST_COMMAND,(()=>(PI.insertList(e,"number"),!0)),zI.COMMAND_PRIORITY_LOW),e.registerCommand(PI.INSERT_UNORDERED_LIST_COMMAND,(()=>(PI.insertList(e,"bullet"),!0)),zI.COMMAND_PRIORITY_LOW),e.registerCommand(PI.REMOVE_LIST_COMMAND,(()=>(PI.removeList(e),!0)),zI.COMMAND_PRIORITY_LOW),e.registerCommand(zI.INSERT_PARAGRAPH_COMMAND,(()=>!!PI.$handleListInsertParagraph()),zI.COMMAND_PRIORITY_LOW))),[e])}(e),null},UI=Nv,HI=a.exports,VI="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?HI.useLayoutEffect:HI.useEffect;function qI(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}var KI=function(){return function(e){let[t]=UI.useLexicalComposerContext(),n=HI.useMemo((()=>e(t)),[t,e]),r=HI.useRef(n.initialValueFn()),[i,o]=HI.useState(r.current);return VI((()=>{let{initialValueFn:e,subscribe:t}=n,i=e();return r.current!==i&&(r.current=i,o(i)),t((e=>{r.current=e,o(e)}))}),[n,e]),i}(qI)},WI={},jI=Zu;WI.registerDragonSupport=function(e){let t=window.location.origin,n=n=>{if(n.origin===t){var r=e.getRootElement();if(document.activeElement===r&&"string"==typeof(r=n.data)){try{var i=JSON.parse(r)}catch(o){return}if(i&&"nuanria_messaging"===i.protocol&&"request"===i.type&&(i=i.payload)&&"makeChanges"===i.functionId&&(i=i.args)){const[t,r,o,a,s]=i;e.update((()=>{const e=jI.$getSelection();if(jI.$isRangeSelection(e)){var i=e.anchor;let l=i.getNode(),c=0,u=0;jI.$isTextNode(l)&&0<=t&&0<=r&&(c=t,u=t+r,e.setTextNodeRange(l,c,l,u)),c===u&&""===o||(e.insertRawText(o),l=i.getNode()),jI.$isTextNode(l)&&(c=a,u=a+s,c=c>(i=l.getTextContentSize())?i:c,u=u>i?i:u,e.setTextNodeRange(l,c,l,u)),n.stopImmediatePropagation()}}))}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}};var YI={},GI=Fv,JI=Xu,XI=Ju,ZI=Zu;let QI="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,eP=QI&&"documentMode"in document?document.documentMode:null;QI&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),QI&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);let tP=!(!QI||!("InputEvent"in window)||eP)&&"getTargetRanges"in new window.InputEvent("input"),nP=QI&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),rP=QI&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,iP=QI&&/^(?=.*Chrome).*/i.test(navigator.userAgent),oP=QI&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!iP;function aP(e,t){t.update((()=>{let n=e instanceof KeyboardEvent?null:e.clipboardData,r=ZI.$getSelection();if(null!==r&&null!=n){e.preventDefault();let i=GI.$getHtmlContent(t);null!==i&&n.setData("text/html",i),n.setData("text/plain",r.getTextContent())}}))}YI.registerPlainText=function(e){return XI.mergeRegister(e.registerCommand(ZI.DELETE_CHARACTER_COMMAND,(e=>{const t=ZI.$getSelection();return!!ZI.$isRangeSelection(t)&&(t.deleteCharacter(e),!0)}),ZI.COMMAND_PRIORITY_EDITOR),e.registerCommand(ZI.DELETE_WORD_COMMAND,(e=>{const t=ZI.$getSelection();return!!ZI.$isRangeSelection(t)&&(t.deleteWord(e),!0)}),ZI.COMMAND_PRIORITY_EDITOR),e.registerCommand(ZI.DELETE_LINE_COMMAND,(e=>{const t=ZI.$getSelection();return!!ZI.$isRangeSelection(t)&&(t.deleteLine(e),!0)}),ZI.COMMAND_PRIORITY_EDITOR),e.registerCommand(ZI.CONTROLLED_TEXT_INSERTION_COMMAND,(e=>{const t=ZI.$getSelection();if(!ZI.$isRangeSelection(t))return!1;if("string"==typeof e)t.insertText(e);else{const n=e.dataTransfer;null!=n?GI.$insertDataTransferForPlainText(n,t):(e=e.data)&&t.insertText(e)}return!0}),ZI.COMMAND_PRIORITY_EDITOR),e.registerCommand(ZI.REMOVE_TEXT_COMMAND,(()=>{const e=ZI.$getSelection();return!!ZI.$isRangeSelection(e)&&(e.removeText(),!0)}),ZI.COMMAND_PRIORITY_EDITOR),e.registerCommand(ZI.INSERT_LINE_BREAK_COMMAND,(e=>{const t=ZI.$getSelection();return!!ZI.$isRangeSelection(t)&&(t.insertLineBreak(e),!0)}),ZI.COMMAND_PRIORITY_EDITOR),e.registerCommand(ZI.INSERT_PARAGRAPH_COMMAND,(()=>{const e=ZI.$getSelection();return!!ZI.$isRangeSelection(e)&&(e.insertLineBreak(),!0)}),ZI.COMMAND_PRIORITY_EDITOR),e.registerCommand(ZI.KEY_ARROW_LEFT_COMMAND,(e=>{const t=ZI.$getSelection();if(!ZI.$isRangeSelection(t))return!1;const n=e.shiftKey;return!!JI.$shouldOverrideDefaultCharacterSelection(t,!0)&&(e.preventDefault(),JI.$moveCharacter(t,n,!0),!0)}),ZI.COMMAND_PRIORITY_EDITOR),e.registerCommand(ZI.KEY_ARROW_RIGHT_COMMAND,(e=>{const t=ZI.$getSelection();if(!ZI.$isRangeSelection(t))return!1;const n=e.shiftKey;return!!JI.$shouldOverrideDefaultCharacterSelection(t,!1)&&(e.preventDefault(),JI.$moveCharacter(t,n,!1),!0)}),ZI.COMMAND_PRIORITY_EDITOR),e.registerCommand(ZI.KEY_BACKSPACE_COMMAND,(t=>{const n=ZI.$getSelection();return!!ZI.$isRangeSelection(n)&&(t.preventDefault(),e.dispatchCommand(ZI.DELETE_CHARACTER_COMMAND,!0))}),ZI.COMMAND_PRIORITY_EDITOR),e.registerCommand(ZI.KEY_DELETE_COMMAND,(t=>{const n=ZI.$getSelection();return!!ZI.$isRangeSelection(n)&&(t.preventDefault(),e.dispatchCommand(ZI.DELETE_CHARACTER_COMMAND,!1))}),ZI.COMMAND_PRIORITY_EDITOR),e.registerCommand(ZI.KEY_ENTER_COMMAND,(t=>{const n=ZI.$getSelection();if(!ZI.$isRangeSelection(n))return!1;if(null!==t){if((rP||nP||oP)&&tP)return!1;t.preventDefault()}return e.dispatchCommand(ZI.INSERT_LINE_BREAK_COMMAND,!1)}),ZI.COMMAND_PRIORITY_EDITOR),e.registerCommand(ZI.COPY_COMMAND,(t=>{const n=ZI.$getSelection();return!!ZI.$isRangeSelection(n)&&(aP(t,e),!0)}),ZI.COMMAND_PRIORITY_EDITOR),e.registerCommand(ZI.CUT_COMMAND,(t=>{const n=ZI.$getSelection();return!!ZI.$isRangeSelection(n)&&(function(e,t){aP(e,t),t.update((()=>{let e=ZI.$getSelection();ZI.$isRangeSelection(e)&&e.removeText()}))}(t,e),!0)}),ZI.COMMAND_PRIORITY_EDITOR),e.registerCommand(ZI.PASTE_COMMAND,(t=>{const n=ZI.$getSelection();return!!ZI.$isRangeSelection(n)&&(function(e,t){e.preventDefault(),t.update((()=>{let t=ZI.$getSelection(),n=e instanceof InputEvent||e instanceof KeyboardEvent?null:e.clipboardData;null!=n&&ZI.$isRangeSelection(t)&&GI.$insertDataTransferForPlainText(n,t)}),{tag:"paste"})}(t,e),!0)}),ZI.COMMAND_PRIORITY_EDITOR),e.registerCommand(ZI.DROP_COMMAND,(e=>{const t=ZI.$getSelection();return!!ZI.$isRangeSelection(t)&&(e.preventDefault(),!0)}),ZI.COMMAND_PRIORITY_EDITOR),e.registerCommand(ZI.DRAGSTART_COMMAND,(e=>{const t=ZI.$getSelection();return!!ZI.$isRangeSelection(t)&&(e.preventDefault(),!0)}),ZI.COMMAND_PRIORITY_EDITOR))};var sP=Nv,lP=KI,cP=a.exports,uP=k_,dP=Ju,hP=U.exports,pP=WI,fP=YI,gP="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?cP.useLayoutEffect:cP.useEffect;function mP(e){return e.getEditorState().read(uP.$canShowPlaceholderCurry(e.isComposing()))}function yP({content:e}){var[t]=sP.useLexicalComposerContext();t=function(e){let[t,n]=cP.useState((()=>mP(e)));return gP((()=>{function t(){let t=mP(e);n(t)}return t(),dP.mergeRegister(e.registerUpdateListener((()=>{t()})),e.registerEditableListener((()=>{t()})))}),[e]),t}(t);let n=lP();return t?"function"==typeof e?e(n):e:null}var vP=function({contentEditable:e,placeholder:t,ErrorBoundary:n}){let[r]=sP.useLexicalComposerContext();return n=function(e,t){let[n,r]=cP.useState((()=>e.getDecorators()));return gP((()=>e.registerDecoratorListener((e=>{hP.flushSync((()=>{r(e)}))}))),[e]),cP.useEffect((()=>{r(e.getDecorators())}),[e]),cP.useMemo((()=>{let r=[],i=Object.keys(n);for(let a=0;a<i.length;a++){var o=i[a];let s=cP.createElement(t,{onError:t=>e._onError(t)},cP.createElement(cP.Suspense,{fallback:null},n[o]));null!==(o=e.getElementByKey(o))&&r.push(hP.createPortal(s,o))}return r}),[t,n,e])}(r,n),function(e){gP((()=>dP.mergeRegister(fP.registerPlainText(e),pP.registerDragonSupport(e))),[e])}(r),cP.createElement(cP.Fragment,null,e,cP.createElement(yP,{content:t}),n)},bP=Nv,_P=KI,wP=a.exports,xP=k_,SP=Ju,CP=U.exports,EP=WI,TP=zv,kP="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?wP.useLayoutEffect:wP.useEffect;function NP(e){return e.getEditorState().read(xP.$canShowPlaceholderCurry(e.isComposing()))}function AP({content:e}){var[t]=bP.useLexicalComposerContext();t=function(e){let[t,n]=wP.useState((()=>NP(e)));return kP((()=>{function t(){let t=NP(e);n(t)}return t(),SP.mergeRegister(e.registerUpdateListener((()=>{t()})),e.registerEditableListener((()=>{t()})))}),[e]),t}(t);let n=_P();return t?"function"==typeof e?e(n):e:null}var OP=function({contentEditable:e,placeholder:t,ErrorBoundary:n}){let[r]=bP.useLexicalComposerContext();return n=function(e,t){let[n,r]=wP.useState((()=>e.getDecorators()));return kP((()=>e.registerDecoratorListener((e=>{CP.flushSync((()=>{r(e)}))}))),[e]),wP.useEffect((()=>{r(e.getDecorators())}),[e]),wP.useMemo((()=>{let r=[],i=Object.keys(n);for(let a=0;a<i.length;a++){var o=i[a];let s=wP.createElement(t,{onError:t=>e._onError(t)},wP.createElement(wP.Suspense,{fallback:null},n[o]));null!==(o=e.getElementByKey(o))&&r.push(CP.createPortal(s,o))}return r}),[t,n,e])}(r,n),function(e){kP((()=>SP.mergeRegister(TP.registerRichText(e),EP.registerDragonSupport(e))),[e])}(r),wP.createElement(wP.Fragment,null,e,wP.createElement(AP,{content:t}),n)},MP=Nv,RP=Zu,DP=a.exports,IP=function(){let[e]=MP.useLexicalComposerContext();return DP.useEffect((()=>e.registerCommand(RP.KEY_TAB_COMMAND,(t=>{let n=RP.$getSelection();return!!RP.$isRangeSelection(n)&&(t.preventDefault(),e.dispatchCommand(t.shiftKey?RP.OUTDENT_CONTENT_COMMAND:RP.INDENT_CONTENT_COMMAND,void 0))}),RP.COMMAND_PRIORITY_EDITOR))),null},PP={},LP=Zu,BP=Ju;let $P={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1};class zP extends LP.DEPRECATED_GridCellNode{static getType(){return"tablecell"}static clone(e){let t=new zP(e.__headerState,e.__colSpan,e.__width,e.__key);return t.__rowSpan=e.__rowSpan,t}static importDOM(){return{td:()=>({conversion:FP,priority:0}),th:()=>({conversion:FP,priority:0})}}static importJSON(e){return UP(e.headerState,e.colSpan,e.width||void 0)}constructor(e=$P.NO_STATUS,t=1,n,r){super(t,r),this.__headerState=e,this.__width=n}createDOM(e){let t=document.createElement(this.getTag());return this.__width&&(t.style.width=`${this.__width}px`),1!==this.__colSpan&&(t.colSpan=this.__colSpan),1!==this.__rowSpan&&(t.rowSpan=this.__rowSpan),BP.addClassNamesToElement(t,e.theme.tableCell,this.hasHeader()&&e.theme.tableCellHeader),t}exportDOM(e){if(({element:e}=super.exportDOM(e)),e){let t=this.getParentOrThrow().getChildrenSize();e.style.border="1px solid black",1!==this.__colSpan&&(e.colSpan=this.__colSpan),1!==this.__rowSpan&&(e.rowSpan=this.__rowSpan),e.style.width=`${this.getWidth()||Math.max(90,700/t)}px`,e.style.verticalAlign="top",e.style.textAlign="start",this.hasHeader()&&(e.style.backgroundColor="#f2f3f5")}return{element:e}}exportJSON(){return{...super.exportJSON(),colSpan:super.__colSpan,headerState:this.__headerState,type:"tablecell",width:this.getWidth()}}getTag(){return this.hasHeader()?"th":"td"}setHeaderStyles(e){return this.getWritable().__headerState=e,this.__headerState}getHeaderStyles(){return this.getLatest().__headerState}setWidth(e){return this.getWritable().__width=e,this.__width}getWidth(){return this.getLatest().__width}toggleHeaderStyle(e){let t=this.getWritable();return t.__headerState=(t.__headerState&e)===e?t.__headerState-e:t.__headerState+e,t}hasHeaderState(e){return(this.getHeaderStyles()&e)===e}hasHeader(){return this.getLatest().__headerState!==$P.NO_STATUS}updateDOM(e){return e.__headerState!==this.__headerState||e.__width!==this.__width||e.__colSpan!==this.__colSpan||e.__rowSpan!==this.__rowSpan}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}}function FP(e){var t=e.nodeName.toLowerCase();return(t=UP("th"===t?$P.ROW:$P.NO_STATUS)).__colSpan=e.colSpan,t.__rowSpan=e.rowSpan,{forChild:(e,t)=>HP(t)&&!LP.$isElementNode(e)?(t=LP.$createParagraphNode(),LP.$isLineBreakNode(e)&&"\n"===e.getTextContent()?null:(t.append(e),t)):e,node:t}}function UP(e,t=1,n){return LP.$applyNodeReplacement(new zP(e,t,n))}function HP(e){return e instanceof zP}class VP extends LP.DEPRECATED_GridRowNode{static getType(){return"tablerow"}static clone(e){return new VP(e.__height,e.__key)}static importDOM(){return{tr:()=>({conversion:qP,priority:0})}}static importJSON(e){return KP(e.height)}constructor(e,t){super(t),this.__height=e}exportJSON(){return{...super.exportJSON(),type:"tablerow",version:1}}createDOM(e){let t=document.createElement("tr");return this.__height&&(t.style.height=`${this.__height}px`),BP.addClassNamesToElement(t,e.theme.tableRow),t}isShadowRoot(){return!0}setHeight(e){return this.getWritable().__height=e,this.__height}getHeight(){return this.getLatest().__height}updateDOM(e){return e.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function qP(){return{node:KP()}}function KP(e){return LP.$applyNodeReplacement(new VP(e))}function WP(e){return e instanceof VP}function jP(e){throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?code=${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let YP="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;class GP{constructor(e,t){this.isHighlightingCells=!1,this.focusY=this.focusX=this.anchorY=this.anchorX=-1,this.listenersToRemove=new Set,this.tableNodeKey=t,this.editor=e,this.grid={cells:[],columns:0,rows:0},this.focusCell=this.anchorCell=this.focusCellNodeKey=this.anchorCellNodeKey=this.gridSelection=null,this.hasHijackedSelectionStyles=!1,this.trackTableGrid()}getGrid(){return this.grid}removeListeners(){Array.from(this.listenersToRemove).forEach((e=>e()))}trackTableGrid(){let e=new MutationObserver((e=>{this.editor.update((()=>{var t=!1;for(let n=0;n<e.length;n++){const r=e[n].target.nodeName;if("TABLE"===r||"TR"===r){t=!0;break}}if(t){if(!(t=this.editor.getElementByKey(this.tableNodeKey)))throw Error("Expected to find TableElement in DOM");this.grid=XP(t)}}))}));this.editor.update((()=>{let t=this.editor.getElementByKey(this.tableNodeKey);if(!t)throw Error("Expected to find TableElement in DOM");this.grid=XP(t),e.observe(t,{childList:!0,subtree:!0})}))}clearHighlight(){this.isHighlightingCells=!1,this.focusY=this.focusX=this.anchorY=this.anchorX=-1,this.focusCell=this.anchorCell=this.focusCellNodeKey=this.anchorCellNodeKey=this.gridSelection=null,this.hasHijackedSelectionStyles=!1,this.enableHighlightStyle(),this.editor.update((()=>{var e=LP.$getNodeByKey(this.tableNodeKey);if(!lL(e))throw Error("Expected TableNode.");if(!(e=this.editor.getElementByKey(this.tableNodeKey)))throw Error("Expected to find TableElement in DOM");ZP(e=XP(e),null),LP.$setSelection(null),this.editor.dispatchCommand(LP.SELECTION_CHANGE_COMMAND,void 0)}))}enableHighlightStyle(){this.editor.update((()=>{let e=this.editor.getElementByKey(this.tableNodeKey);if(!e)throw Error("Expected to find TableElement in DOM");e.classList.remove("disable-selection"),this.hasHijackedSelectionStyles=!1}))}disableHighlightStyle(){this.editor.update((()=>{let e=this.editor.getElementByKey(this.tableNodeKey);if(!e)throw Error("Expected to find TableElement in DOM");e.classList.add("disable-selection"),this.hasHijackedSelectionStyles=!0}))}updateTableGridSelection(e){null!=e&&e.gridKey===this.tableNodeKey?(this.gridSelection=e,this.isHighlightingCells=!0,this.disableHighlightStyle(),ZP(this.grid,this.gridSelection)):null==e&&this.clearHighlight()}setFocusCellForSelection(e,t=!1){this.editor.update((()=>{var n=LP.$getNodeByKey(this.tableNodeKey);if(!lL(n))throw Error("Expected TableNode.");if(!this.editor.getElementByKey(this.tableNodeKey))throw Error("Expected to find TableElement in DOM");n=e.x;let r=e.y;if(this.focusCell=e,null!==this.anchorCell){let e=YP?(this.editor._window||window).getSelection():null;e&&e.setBaseAndExtent(this.anchorCell.elem,0,this.focusCell.elem,0)}if(this.isHighlightingCells||this.anchorX===n&&this.anchorY===r&&!t){if(n===this.focusX&&r===this.focusY)return}else this.isHighlightingCells=!0,this.disableHighlightStyle();this.focusX=n,this.focusY=r,this.isHighlightingCells&&(n=LP.$getNearestNodeFromDOMNode(e.elem),null!=this.gridSelection&&null!=this.anchorCellNodeKey&&HP(n)&&(n=n.getKey(),this.gridSelection=this.gridSelection.clone()||LP.DEPRECATED_$createGridSelection(),this.focusCellNodeKey=n,this.gridSelection.set(this.tableNodeKey,this.anchorCellNodeKey,this.focusCellNodeKey),LP.$setSelection(this.gridSelection),this.editor.dispatchCommand(LP.SELECTION_CHANGE_COMMAND,void 0),ZP(this.grid,this.gridSelection)))}))}setAnchorCellForSelection(e){this.isHighlightingCells=!1,this.anchorCell=e,this.anchorX=e.x,this.anchorY=e.y,this.editor.update((()=>{var t=LP.$getNearestNodeFromDOMNode(e.elem);HP(t)&&(t=t.getKey(),this.gridSelection=LP.DEPRECATED_$createGridSelection(),this.anchorCellNodeKey=t)}))}formatCells(e){this.editor.update((()=>{let t=LP.$getSelection();LP.DEPRECATED_$isGridSelection(t)||jP(11);let n=LP.$createRangeSelection(),r=n.anchor,i=n.focus;t.getNodes().forEach((t=>{HP(t)&&0!==t.getTextContentSize()&&(r.set(t.getKey(),0,"element"),i.set(t.getKey(),t.getChildrenSize(),"element"),n.formatText(e))})),LP.$setSelection(t),this.editor.dispatchCommand(LP.SELECTION_CHANGE_COMMAND,void 0)}))}clearText(){this.editor.update((()=>{let e=LP.$getNodeByKey(this.tableNodeKey);if(!lL(e))throw Error("Expected TableNode.");var t=LP.$getSelection();LP.DEPRECATED_$isGridSelection(t)||jP(11),(t=t.getNodes().filter(HP)).length===this.grid.columns*this.grid.rows?(e.selectPrevious(),e.remove(),LP.$getRoot().selectStart()):(t.forEach((e=>{if(LP.$isElementNode(e)){let t=LP.$createParagraphNode(),n=LP.$createTextNode();t.append(n),e.append(t),e.getChildren().forEach((e=>{e!==t&&e.remove()}))}})),ZP(this.grid,null),LP.$setSelection(null),this.editor.dispatchCommand(LP.SELECTION_CHANGE_COMMAND,void 0))}))}}function JP(e){for(;null!=e;){let t=e.nodeName;if("TD"===t||"TH"===t){if(void 0===(e=e._cell))break;return e}e=e.parentNode}return null}function XP(e){let t=[],n={cells:t,columns:0,rows:0};var r=e.firstChild;let i=e=0;for(t.length=0;null!=r;){var o=r.nodeName;if("TD"===o||"TH"===o)o={elem:r,highlighted:!1,x:e,y:i},r._cell=o,void 0===t[i]&&(t[i]=[]),t[i][e]=o;else if(null!=(o=r.firstChild)){r=o;continue}if(null!=(o=r.nextSibling))e++,r=o;else if(null!=(o=r.parentNode)){if(null==(r=o.nextSibling))break;i++,e=0}}return n.columns=e+1,n.rows=i+1,n}function ZP(e,t){let n=[],r=new Set(t?t.getNodes():[]);return QP(e,((e,t)=>{let i=e.elem;r.has(t)?(e.highlighted=!0,i.style.setProperty("background-color","rgb(172, 206, 247)"),i.style.setProperty("caret-color","transparent"),n.push(e)):(e.highlighted=!1,i.style.removeProperty("background-color"),i.style.removeProperty("caret-color"),i.getAttribute("style")||i.removeAttribute("style"))})),n}function QP(e,t){({cells:e}=e);for(let n=0;n<e.length;n++){let r=e[n];for(let e=0;e<r.length;e++){let i=r[e],o=LP.$getNearestNodeFromDOMNode(i.elem);null!==o&&t(i,o,{x:e,y:n})}}}function eL(e){e.disableHighlightStyle(),QP(e.grid,(e=>{let t=e.elem;e.highlighted=!0,t.style.setProperty("background-color","rgb(172, 206, 247)"),t.style.setProperty("caret-color","transparent")}))}let tL=(e,t,n,r,i)=>{const o="forward"===i;switch(i){case"backward":case"forward":return n!==(o?e.grid.columns-1:0)?iL(t.getCellNodeFromCordsOrThrow(n+(o?1:-1),r,e.grid)):r!==(o?e.grid.rows-1:0)?iL(t.getCellNodeFromCordsOrThrow(o?0:e.grid.columns-1,r+(o?1:-1),e.grid)):o?t.selectNext():t.selectPrevious(),!0;case"up":return 0!==r?iL(t.getCellNodeFromCordsOrThrow(n,r-1,e.grid)):t.selectPrevious(),!0;case"down":return r!==e.grid.rows-1?iL(t.getCellNodeFromCordsOrThrow(n,r+1,e.grid)):t.selectNext(),!0;default:return!1}},nL=(e,t,n,r,i)=>{const o="forward"===i;switch(i){case"backward":case"forward":return n!==(o?e.grid.columns-1:0)&&e.setFocusCellForSelection(t.getCellFromCordsOrThrow(n+(o?1:-1),r,e.grid)),!0;case"up":return 0!==r&&(e.setFocusCellForSelection(t.getCellFromCordsOrThrow(n,r-1,e.grid)),!0);case"down":return r!==e.grid.rows-1&&(e.setFocusCellForSelection(t.getCellFromCordsOrThrow(n,r+1,e.grid)),!0);default:return!1}};function rL(e,t){if(LP.$isRangeSelection(e)||LP.DEPRECATED_$isGridSelection(e)){let n=t.isParentOf(e.anchor.getNode());return e=t.isParentOf(e.focus.getNode()),n&&e}return!1}function iL(e){let t=e.getChildren().find((e=>LP.$isParagraphNode(e)));LP.$isParagraphNode(t)?t.selectEnd():e.selectEnd()}class oL extends LP.DEPRECATED_GridNode{static getType(){return"table"}static clone(e){return new oL(e.__key)}static importDOM(){return{table:()=>({conversion:aL,priority:1})}}static importJSON(){return sL()}constructor(e){super(e)}exportJSON(){return{...super.exportJSON(),type:"table",version:1}}createDOM(e){let t=document.createElement("table");return BP.addClassNamesToElement(t,e.theme.table),t}updateDOM(){return!1}exportDOM(e){return{...super.exportDOM(e),after:e=>{if(e){let t=e.cloneNode(),n=document.createElement("colgroup"),r=document.createElement("tbody");if(r.append(...e.children),!WP(e=this.getFirstChildOrThrow()))throw Error("Expected to find row node.");e=e.getChildrenSize();for(let i=0;i<e;i++){let e=document.createElement("col");n.append(e)}return t.replaceChildren(n,r),t}}}}canExtractContents(){return!1}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(e,t){let{rows:n,cells:r}=t;for(t=0;t<n;t++){var i=r[t];if(null==i)throw Error(`Row not found at y:${t}`);if(-1!==(i=i.findIndex((({elem:t})=>LP.$getNearestNodeFromDOMNode(t)===e))))return{x:i,y:t}}throw Error("Cell not found in table.")}getCellFromCords(e,t,n){return({cells:n}=n),null==(t=n[t])||null==(e=t[e])?null:e}getCellFromCordsOrThrow(e,t,n){if(!(e=this.getCellFromCords(e,t,n)))throw Error("Cell not found at cords.");return e}getCellNodeFromCords(e,t,n){return null==(e=this.getCellFromCords(e,t,n))?null:HP(e=LP.$getNearestNodeFromDOMNode(e.elem))?e:null}getCellNodeFromCordsOrThrow(e,t,n){if(!(e=this.getCellNodeFromCords(e,t,n)))throw Error("Node at cords not TableCellNode.");return e}canSelectBefore(){return!0}canIndent(){return!1}}function aL(){return{node:sL()}}function sL(){return LP.$applyNodeReplacement(new oL)}function lL(e){return e instanceof oL}function cL(e){if(e=BP.$findMatchingParent(e,(e=>WP(e))),WP(e))return e;throw Error("Expected table cell to be inside of table row.")}function uL(e){if(e=BP.$findMatchingParent(e,(e=>lL(e))),lL(e))return e;throw Error("Expected table cell to be inside of table.")}function dL(e,t){let n=uL(e),{x:r,y:i}=n.getCordsFromCellNode(e,t);return{above:n.getCellNodeFromCords(r,i-1,t),below:n.getCellNodeFromCords(r,i+1,t),left:n.getCellNodeFromCords(r-1,i,t),right:n.getCellNodeFromCords(r+1,i,t)}}function hL(e){if(null===(e=e.getFirstDescendant()))throw Error("Unexpected empty cell");e.getParentOrThrow().selectStart()}let pL=LP.createCommand("INSERT_TABLE_COMMAND");var fL=PP.$createTableCellNode=UP,gL=PP.$createTableNode=sL;PP.$createTableNodeWithDimensions=function(e,t,n=!0){let r=sL();for(let o=0;o<e;o++){let e=KP();for(let r=0;r<t;r++){var i=$P.NO_STATUS;"object"==typeof n?(0===o&&n.rows&&(i|=$P.ROW),0===r&&n.columns&&(i|=$P.COLUMN)):n&&(0===o&&(i|=$P.ROW),0===r&&(i|=$P.COLUMN)),i=UP(i);let t=LP.$createParagraphNode();t.append(LP.$createTextNode()),i.append(t),e.append(i)}r.append(e)}return r};var mL=PP.$createTableRowNode=KP;PP.$deleteTableColumn=function(e,t){let n=e.getChildren();for(let i=0;i<n.length;i++){var r=n[i];if(WP(r)){if(t>=(r=r.getChildren()).length||0>t)throw Error("Table column target index out of range");r[t].remove()}}return e};var yL=PP.$deleteTableColumn__EXPERIMENTAL=function(){var e=LP.$getSelection();if(!LP.$isRangeSelection(e)&&!LP.DEPRECATED_$isGridSelection(e))throw Error("Expected a RangeSelection or GridSelection");var t=e.anchor.getNode();e=e.focus.getNode();let[n,,r]=LP.DEPRECATED_$getNodeTriplet(t);[t]=LP.DEPRECATED_$getNodeTriplet(e);let[i,o,a]=LP.DEPRECATED_$computeGridMap(r,n,t);var{startColumn:s}=o;let{startRow:l,startColumn:c}=a;e=Math.min(s,c);let u=(s=Math.max(s+n.__colSpan-1,c+t.__colSpan-1))-e+1;if(i[0].length===s-e+1)r.selectPrevious(),r.remove();else{var d=i.length;for(let t=0;t<d;t++)for(let n=e;n<=s;n++){let{cell:r,startColumn:o}=i[t][n];o<e?n===e&&r.setColSpan(r.__colSpan-Math.min(u,r.__colSpan-(e-o))):o+r.__colSpan-1>s?n===s&&r.setColSpan(r.__colSpan-(s-o+1)):r.remove()}void 0!==(t=(e=i[l])[c+t.__colSpan])?(({cell:t}=t),hL(t)):(({cell:t}=e[c-1]),hL(t))}},vL=PP.$deleteTableRow__EXPERIMENTAL=function(){var e=LP.$getSelection();if(!LP.$isRangeSelection(e)&&!LP.DEPRECATED_$isGridSelection(e))throw Error("Expected a RangeSelection or GridSelection");var t=e.anchor.getNode();e=e.focus.getNode();let[n,,r]=LP.DEPRECATED_$getNodeTriplet(t);[e]=LP.DEPRECATED_$getNodeTriplet(e);let[i,o,a]=LP.DEPRECATED_$computeGridMap(r,n,e);({startRow:t}=o);var{startRow:s}=a;if(e=s+e.__rowSpan-1,i.length===e-t+1)r.remove();else{s=i[0].length;var l=i[e+1],c=r.getChildAtIndex(e+1);if(!LP.DEPRECATED_$isGridRowNode(c))throw Error(`Expected GridNode childAtIndex(${String(e+1)}) to be RowNode`);for(let n=e;n>=t;n--){for(var u=s-1;0<=u;u--){let{cell:r,startRow:o,startColumn:a}=i[n][u];if(a===u&&(n===t&&o<t&&r.setRowSpan(r.__rowSpan-(o-t)),o>=t&&o+r.__rowSpan-1>e))if(r.setRowSpan(r.__rowSpan-(e-o+1)),0===u){var d=c,h=r;let e=d.getFirstChild();null!==e?d.insertBefore(e):d.append(h)}else({cell:d}=l[u-1]),d.insertAfter(r)}if(u=r.getChildAtIndex(n),!LP.DEPRECATED_$isGridRowNode(u))throw Error(`Expected GridNode childAtIndex(${String(n)}) to be RowNode`);u.remove()}void 0!==l?(({cell:t}=l[0]),hL(t)):(({cell:t}=i[t-1][0]),hL(t))}};PP.$getElementGridForTableNode=function(e,t){if(null==(e=e.getElementByKey(t.getKey())))throw Error("Table Element Not Found");return XP(e)};var bL=PP.$getTableCellNodeFromLexicalNode=function(e){return e=BP.$findMatchingParent(e,(e=>HP(e))),HP(e)?e:null},_L=PP.$getTableColumnIndexFromTableCellNode=function(e){return cL(e).getChildren().findIndex((t=>t.is(e)))},wL=PP.$getTableNodeFromLexicalNodeOrThrow=uL,xL=PP.$getTableRowIndexFromTableCellNode=function(e){let t=cL(e);return uL(t).getChildren().findIndex((e=>e.is(t)))};PP.$getTableRowNodeFromTableCellNodeOrThrow=cL,PP.$insertTableColumn=function(e,t,n=!0,r,i){let o=e.getChildren();for(let l=0;l<o.length;l++){let e=o[l];if(WP(e))for(let o=0;o<r;o++){var a=e.getChildren();if(t>=a.length||0>t)throw Error("Table column target index out of range");HP(a=a[t])||jP(12);let{left:r,right:o}=dL(a,i);var s=$P.NO_STATUS;(r&&r.hasHeaderState($P.ROW)||o&&o.hasHeaderState($P.ROW))&&(s|=$P.ROW),(s=UP(s)).append(LP.$createParagraphNode()),n?a.insertAfter(s):a.insertBefore(s)}}return e};var SL=PP.$insertTableColumn__EXPERIMENTAL=function(e=!0){var t=LP.$getSelection();if(!LP.$isRangeSelection(t)&&!LP.DEPRECATED_$isGridSelection(t))throw Error("Expected a RangeSelection or GridSelection");t=t.focus.getNode();let[n,,r]=LP.DEPRECATED_$getNodeTriplet(t),[i,o]=LP.DEPRECATED_$computeGridMap(r,n,n);t=i.length;var{startColumn:a}=o;if(e)for(e=a+n.__colSpan-1,a=0;a<t;a++){let{cell:t,startColumn:n}=i[a][e];n+t.__colSpan-1<=e?t.insertAfter(UP($P.NO_STATUS)):t.setColSpan(t.__colSpan+1)}else for(e=0;e<t;e++){let{cell:t,startColumn:n}=i[e][a];n===a?t.insertBefore(UP($P.NO_STATUS)):t.setColSpan(t.__colSpan+1)}};PP.$insertTableRow=function(e,t,n=!0,r,i){var o=e.getChildren();if(t>=o.length||0>t)throw Error("Table row target index out of range");if(!WP(t=o[t]))throw Error("Row before insertion index does not exist.");for(o=0;o<r;o++){let e=t.getChildren(),r=e.length,o=KP();for(let t=0;t<r;t++){var a=e[t];HP(a)||jP(12);let{above:n,below:r}=dL(a,i);a=$P.NO_STATUS;let s=n&&n.getWidth()||r&&r.getWidth()||void 0;(n&&n.hasHeaderState($P.COLUMN)||r&&r.hasHeaderState($P.COLUMN))&&(a|=$P.COLUMN),(a=UP(a,1,s)).append(LP.$createParagraphNode()),o.append(a)}n?t.insertAfter(o):t.insertBefore(o)}return e};var CL=PP.$insertTableRow__EXPERIMENTAL=function(e=!0){var t=LP.$getSelection();if(!LP.$isRangeSelection(t)&&!LP.DEPRECATED_$isGridSelection(t))throw Error("Expected a RangeSelection or GridSelection");t=t.focus.getNode();let[n,,r]=LP.DEPRECATED_$getNodeTriplet(t),[i,o]=LP.DEPRECATED_$computeGridMap(r,n,n);t=i[0].length;var{startRow:a}=o;if(e){var s=i[e=a+n.__rowSpan-1];a=KP();for(var l=0;l<t;l++){let{cell:t,startRow:n}=s[l];n+t.__rowSpan-1<=e?a.append(UP($P.NO_STATUS)):t.setRowSpan(t.__rowSpan+1)}if(t=r.getChildAtIndex(e),!LP.DEPRECATED_$isGridRowNode(t))throw Error("focusEndRow is not a GridRowNode");t.insertAfter(a)}else{for(s=i[a],e=KP(),l=0;l<t;l++){let{cell:t,startRow:n}=s[l];n===a?e.append(UP($P.NO_STATUS)):t.setRowSpan(t.__rowSpan+1)}if(t=r.getChildAtIndex(a),!LP.DEPRECATED_$isGridRowNode(t))throw Error("focusEndRow is not a GridRowNode");t.insertBefore(e)}},EL=PP.$isTableCellNode=HP,TL=PP.$isTableNode=lL,kL=PP.$isTableRowNode=WP;PP.$removeTableRowAtIndex=function(e,t){let n=e.getChildren();if(t>=n.length||0>t)throw Error("Expected table cell to be inside of table row.");return n[t].remove(),e};var NL=PP.INSERT_TABLE_COMMAND=pL,AL=PP.TableCellHeaderStates=$P,OL=PP.TableCellNode=zP,ML=PP.TableNode=oL,RL=PP.TableRowNode=VP;PP.TableSelection=GP,PP.applyTableHandlers=function(e,t,n){let r=n.getRootElement();if(null===r)throw Error("No root element.");let i=new GP(n,e.getKey());t.__lexicalTableSelection=i;let o=!1,a=!1;t.addEventListener("dblclick",(e=>{let t=JP(e.target);null!==t&&(e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation(),i.setAnchorCellForSelection(t),i.setFocusCellForSelection(t,!0),o=!1)})),t.addEventListener("mousedown",(e=>{setTimeout((()=>{if(0===e.button){var t=JP(e.target);null!==t&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),i.setAnchorCellForSelection(t))}}),0)})),t.addEventListener("mousemove",(e=>{if(a&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()),o){let t=JP(e.target);if(null!==t){let n=t.x,r=t.y;o&&(i.anchorX!==n||i.anchorY!==r||i.isHighlightingCells)&&(e.preventDefault(),i.setFocusCellForSelection(t))}}})),t.addEventListener("mouseleave",(()=>{}));let s=e=>{o=!0,0===e.button&&n.update((()=>{const t=LP.$getSelection();if(LP.DEPRECATED_$isGridSelection(t)&&t.gridKey===i.tableNodeKey&&r.contains(e.target))return i.clearHighlight()}))};window.addEventListener("mousedown",s),i.listenersToRemove.add((()=>window.removeEventListener("mousedown",s)));let l=e=>{o&&(e.preventDefault(),e.stopPropagation()),o=!1};window.addEventListener("mouseup",l),i.listenersToRemove.add((()=>window.removeEventListener("mouseup",l))),i.listenersToRemove.add((()=>t.addEventListener("mouseup",l))),i.listenersToRemove.add((()=>t.removeEventListener("mouseup",l))),i.listenersToRemove.add(n.registerCommand(LP.KEY_ARROW_DOWN_COMMAND,(t=>{var n=LP.$getSelection();if(!rL(n,e))return!1;if(LP.$isRangeSelection(n)){if(n.isCollapsed()){var r=BP.$findMatchingParent(n.anchor.getNode(),(e=>HP(e)));if(!HP(r))return!1;var o=e.getCordsFromCellNode(r,i.grid);if(null==(n=BP.$findMatchingParent(n.anchor.getNode(),(e=>LP.$isElementNode(e)))))throw Error("Expected BlockNode Parent");if((r=r.getLastChild())&&n.isParentOf(r)||n===r||t.shiftKey)return t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),t.shiftKey?(i.setAnchorCellForSelection(e.getCellFromCordsOrThrow(o.x,o.y,i.grid)),nL(i,e,o.x,o.y,"down")):tL(i,e,o.x,o.y,"down")}}else if(LP.DEPRECATED_$isGridSelection(n)&&t.shiftKey)return!!HP(o=n.focus.getNode())&&(o=e.getCordsFromCellNode(o,i.grid),t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),nL(i,e,o.x,o.y,"down"));return!1}),LP.COMMAND_PRIORITY_HIGH)),i.listenersToRemove.add(n.registerCommand(LP.KEY_ARROW_UP_COMMAND,(t=>{var n=LP.$getSelection();if(!rL(n,e))return!1;if(LP.$isRangeSelection(n)){if(n.isCollapsed()){var r=BP.$findMatchingParent(n.anchor.getNode(),(e=>HP(e)));if(!HP(r))return!1;var o=e.getCordsFromCellNode(r,i.grid);if(null==(n=BP.$findMatchingParent(n.anchor.getNode(),(e=>LP.$isElementNode(e)))))throw Error("Expected BlockNode Parent");if((r=r.getLastChild())&&n.isParentOf(r)||n===r||t.shiftKey)return t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),t.shiftKey?(i.setAnchorCellForSelection(e.getCellFromCordsOrThrow(o.x,o.y,i.grid)),nL(i,e,o.x,o.y,"up")):tL(i,e,o.x,o.y,"up")}}else if(LP.DEPRECATED_$isGridSelection(n)&&t.shiftKey)return!!HP(o=n.focus.getNode())&&(o=e.getCordsFromCellNode(o,i.grid),t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),nL(i,e,o.x,o.y,"up"));return!1}),LP.COMMAND_PRIORITY_HIGH)),i.listenersToRemove.add(n.registerCommand(LP.KEY_ARROW_LEFT_COMMAND,(t=>{var n=LP.$getSelection();if(!rL(n,e))return!1;if(LP.$isRangeSelection(n)){if(n.isCollapsed()){var r=BP.$findMatchingParent(n.anchor.getNode(),(e=>HP(e)));if(!HP(r))return!1;if(r=e.getCordsFromCellNode(r,i.grid),null==BP.$findMatchingParent(n.anchor.getNode(),(e=>LP.$isElementNode(e))))throw Error("Expected BlockNode Parent");if(0===n.anchor.offset||t.shiftKey)return t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),t.shiftKey?(i.setAnchorCellForSelection(e.getCellFromCordsOrThrow(r.x,r.y,i.grid)),nL(i,e,r.x,r.y,"backward")):tL(i,e,r.x,r.y,"backward")}}else if(LP.DEPRECATED_$isGridSelection(n)&&t.shiftKey)return!!HP(n=n.focus.getNode())&&(n=e.getCordsFromCellNode(n,i.grid),t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),nL(i,e,n.x,n.y,"backward"));return!1}),LP.COMMAND_PRIORITY_HIGH)),i.listenersToRemove.add(n.registerCommand(LP.KEY_ARROW_RIGHT_COMMAND,(t=>{var n=LP.$getSelection();if(!rL(n,e))return!1;if(LP.$isRangeSelection(n)){if(n.isCollapsed()){var r=BP.$findMatchingParent(n.anchor.getNode(),(e=>HP(e)));if(!HP(r))return!1;if(r=e.getCordsFromCellNode(r,i.grid),null==BP.$findMatchingParent(n.anchor.getNode(),(e=>LP.$isElementNode(e))))throw Error("Expected BlockNode Parent");if(n.anchor.offset===n.anchor.getNode().getTextContentSize()||t.shiftKey)return t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),t.shiftKey?(i.setAnchorCellForSelection(e.getCellFromCordsOrThrow(r.x,r.y,i.grid)),nL(i,e,r.x,r.y,"forward")):tL(i,e,r.x,r.y,"forward")}}else if(LP.DEPRECATED_$isGridSelection(n)&&t.shiftKey)return!!HP(n=n.focus.getNode())&&(n=e.getCordsFromCellNode(n,i.grid),t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),nL(i,e,n.x,n.y,"forward"));return!1}),LP.COMMAND_PRIORITY_HIGH));[LP.DELETE_WORD_COMMAND,LP.DELETE_LINE_COMMAND,LP.DELETE_CHARACTER_COMMAND].forEach((t=>{i.listenersToRemove.add(n.registerCommand(t,(t=>()=>{var n=LP.$getSelection();if(!rL(n,e))return!1;if(LP.DEPRECATED_$isGridSelection(n))return i.clearText(),!0;if(LP.$isRangeSelection(n)){const a=BP.$findMatchingParent(n.anchor.getNode(),(e=>HP(e)));if(!HP(a))return!1;var r=n.anchor.getNode(),o=n.focus.getNode();if(r=e.isParentOf(r),o=e.isParentOf(o),r&&!o||o&&!r)return i.clearText(),!0;if(r=(o=BP.$findMatchingParent(n.anchor.getNode(),(e=>LP.$isElementNode(e))))&&BP.$findMatchingParent(o,(e=>LP.$isElementNode(e)&&HP(e.getParent()))),!LP.$isElementNode(r)||!LP.$isElementNode(o))return!1;if(t===LP.DELETE_LINE_COMMAND&&null===r.getPreviousSibling())return!0;if((t===LP.DELETE_CHARACTER_COMMAND||t===LP.DELETE_WORD_COMMAND)&&n.isCollapsed()&&0===n.anchor.offset&&o!==r){n=o.getChildren();const e=LP.$createParagraphNode();return n.forEach((t=>e.append(t))),o.replace(e),o.getWritable().__parent=a.getKey(),!0}}return!1})(t),LP.COMMAND_PRIORITY_CRITICAL))}));let c=t=>{const n=LP.$getSelection();return!!rL(n,e)&&(LP.DEPRECATED_$isGridSelection(n)?(t.preventDefault(),t.stopPropagation(),i.clearText(),!0):(LP.$isRangeSelection(n)&&(t=BP.$findMatchingParent(n.anchor.getNode(),(e=>HP(e))),HP(t)),!1))};return i.listenersToRemove.add(n.registerCommand(LP.KEY_BACKSPACE_COMMAND,c,LP.COMMAND_PRIORITY_CRITICAL)),i.listenersToRemove.add(n.registerCommand(LP.KEY_DELETE_COMMAND,c,LP.COMMAND_PRIORITY_CRITICAL)),i.listenersToRemove.add(n.registerCommand(LP.FORMAT_TEXT_COMMAND,(t=>{let n=LP.$getSelection();return!!rL(n,e)&&(LP.DEPRECATED_$isGridSelection(n)?(i.formatCells(t),!0):(LP.$isRangeSelection(n)&&(t=BP.$findMatchingParent(n.anchor.getNode(),(e=>HP(e))),HP(t)),!1))}),LP.COMMAND_PRIORITY_CRITICAL)),i.listenersToRemove.add(n.registerCommand(LP.CONTROLLED_TEXT_INSERTION_COMMAND,(()=>{var t=LP.$getSelection();return!!rL(t,e)&&(LP.DEPRECATED_$isGridSelection(t)?i.clearHighlight():LP.$isRangeSelection(t)&&(t=BP.$findMatchingParent(t.anchor.getNode(),(e=>HP(e))),HP(t)),!1)}),LP.COMMAND_PRIORITY_CRITICAL)),i.listenersToRemove.add(n.registerCommand(LP.KEY_TAB_COMMAND,(t=>{var n=LP.$getSelection();if(!rL(n,e))return!1;if(LP.$isRangeSelection(n)){let r=BP.$findMatchingParent(n.anchor.getNode(),(e=>HP(e)));if(!HP(r))return!1;if(n.isCollapsed())return n=e.getCordsFromCellNode(r,i.grid),t.preventDefault(),tL(i,e,n.x,n.y,t.shiftKey?"backward":"forward"),!0}return!1}),LP.COMMAND_PRIORITY_HIGH)),i.listenersToRemove.add(n.registerCommand(LP.FOCUS_COMMAND,(()=>e.isSelected()),LP.COMMAND_PRIORITY_HIGH)),i.listenersToRemove.add(n.registerCommand(LP.SELECTION_CHANGE_COMMAND,(()=>{let t=LP.$getSelection();var n=LP.$getPreviousSelection();if(t&&LP.$isRangeSelection(t)&&!t.isCollapsed()){var r=t.anchor.getNode(),o=t.focus.getNode();r=e.isParentOf(r);var s=e.isParentOf(o);if(o=r&&!s||s&&!r,r=r&&s&&!e.isSelected(),o)return n=t.isBackward(),r=LP.$createRangeSelection(),o=e.getKey(),r.anchor.set(t.anchor.key,t.anchor.offset,t.anchor.type),r.focus.set(o,n?0:e.getChildrenSize(),"element"),a=!0,LP.$setSelection(r),eL(i),!0;if(r&&(({grid:r}=i),t.getNodes().filter(HP).length===r.rows*r.columns)){r=LP.DEPRECATED_$createGridSelection(),o=e.getKey(),s=e.getFirstChildOrThrow().getFirstChild();let t=e.getLastChildOrThrow().getLastChild();if(null!=s&&null!=t)return r.set(o,s.getKey(),t.getKey()),LP.$setSelection(r),i.updateTableGridSelection(r),!0}}return t&&!t.is(n)&&(LP.DEPRECATED_$isGridSelection(t)||LP.DEPRECATED_$isGridSelection(n))&&i.gridSelection&&!i.gridSelection.is(n)?(LP.DEPRECATED_$isGridSelection(t)&&t.gridKey===i.tableNodeKey?i.updateTableGridSelection(t):!LP.DEPRECATED_$isGridSelection(t)&&LP.DEPRECATED_$isGridSelection(n)&&n.gridKey===i.tableNodeKey&&i.updateTableGridSelection(null),!1):(i.hasHijackedSelectionStyles&&!e.isSelected()?(function(e){e.enableHighlightStyle(),QP(e.grid,(e=>{let t=e.elem;e.highlighted=!1,t.style.removeProperty("background-color"),t.style.removeProperty("caret-color"),t.getAttribute("style")||t.removeAttribute("style")}))}(i),a=!1):!i.hasHijackedSelectionStyles&&e.isSelected()&&eL(i),!1)}),LP.COMMAND_PRIORITY_CRITICAL)),i};var DL=PP.getCellFromTarget=JP,IL=PP.getTableSelectionFromTableElement=function(e){return e.__lexicalTableSelection},PL=Nv,LL=PP,BL=Zu,$L=a.exports,zL=function(){let[e]=PL.useLexicalComposerContext();return $L.useEffect((()=>{if(!e.hasNodes([LL.TableNode,LL.TableCellNode,LL.TableRowNode]))throw Error("Minified Lexical error #10; visit https://lexical.dev/docs/error?code=10 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");return e.registerCommand(LL.INSERT_TABLE_COMMAND,(({columns:e,rows:t,includeHeaders:n})=>{var r=BL.$getSelection();if(!BL.$isRangeSelection(r))return!0;let i=r.focus;return null!==(r=i.getNode())&&(e=LL.$createTableNodeWithDimensions(Number(t),Number(e),n),BL.$isRootOrShadowRoot(r)?(null!==(t=r.getChildAtIndex(i.offset))?t.insertBefore(e):r.append(e),e.insertBefore(BL.$createParagraphNode())):r.getTopLevelElementOrThrow().insertAfter(e),e.insertAfter(BL.$createParagraphNode()),e.getFirstChildOrThrow().getFirstChildOrThrow().select()),!0}),BL.COMMAND_PRIORITY_EDITOR)}),[e]),$L.useEffect((()=>{let t=new Map,n=n=>{const r=n.getKey(),i=e.getElementByKey(r);i&&!t.has(r)&&(n=LL.applyTableHandlers(n,i,e),t.set(r,n))};e.getEditorState().read((()=>{let e=BL.$nodesOfType(LL.TableNode);for(let t of e)LL.$isTableNode(t)&&n(t)}));let r=e.registerMutationListener(LL.TableNode,(r=>{for(const[i,o]of r)"created"===o?e.getEditorState().read((()=>{const e=BL.$getNodeByKey(i);LL.$isTableNode(e)&&n(e)})):"destroyed"===o&&(void 0!==(r=t.get(i))&&(r.removeListeners(),t.delete(i)))}));return()=>{r();for(let[,e]of t)e.removeListeners()}}),[e]),null};const FL="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,UL=()=>new Map,HL=(e,t,n)=>{let r=e.get(t);return void 0===r&&e.set(t,r=n()),r},VL=()=>new Set,qL=String.fromCharCode,KL=/^\s*/g,WL=/([A-Z])/g,jL=(e,t)=>(e=>e.replace(KL,""))(e.replace(WL,(e=>`${t}${(e=>e.toLowerCase())(e)}`))),YL="undefined"!=typeof TextEncoder?new TextEncoder:null,GL=YL?e=>YL.encode(e):e=>{const t=unescape(encodeURIComponent(e)),n=t.length,r=new Uint8Array(n);for(let i=0;i<n;i++)r[i]=t.codePointAt(i);return r};let JL="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});JL&&1===JL.decode(new Uint8Array).length&&(JL=null);const XL=e=>void 0===e?null:e;let ZL=new class{constructor(){this.map=new Map}setItem(e,t){this.map.set(e,t)}getItem(e){return this.map.get(e)}},QL=!0;try{"undefined"!=typeof localStorage&&(ZL=localStorage,QL=!1)}catch(sZ){}const eB=ZL,tB=Array.from,nB=Object.keys,rB=e=>nB(e).length,iB=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),oB=(e,t)=>{if(null==e||null==t)return((e,t)=>e===t)(e,t);if(e.constructor!==t.constructor)return!1;if(e===t)return!0;switch(e.constructor){case ArrayBuffer:e=new Uint8Array(e),t=new Uint8Array(t);case Uint8Array:if(e.byteLength!==t.byteLength)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;break;case Set:if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;break;case Map:if(e.size!==t.size)return!1;for(const n of e.keys())if(!t.has(n)||!oB(e.get(n),t.get(n)))return!1;break;case Object:if(rB(e)!==rB(t))return!1;for(const n in e)if(!iB(e,n)||!oB(e[n],t[n]))return!1;break;case Array:if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!oB(e[n],t[n]))return!1;break;default:return!1}return!0},aB="undefined"!=typeof process&&process.release&&/node|io\.js/.test(process.release.name),sB="undefined"!=typeof window&&"undefined"!=typeof document&&!aB;let lB;"undefined"!=typeof navigator&&/Mac/.test(navigator.platform);const cB=e=>(()=>{if(void 0===lB)if(aB){lB=UL();const e=process.argv;let t=null;for(let n=0;n<e.length;n++){const r=e[n];"-"===r[0]?(null!==t&&lB.set(t,""),t=r):null!==t&&(lB.set(t,r),t=null)}null!==t&&lB.set(t,"")}else"object"==typeof location?(lB=UL(),(location.search||"?").slice(1).split("&").forEach((e=>{if(0!==e.length){const[t,n]=e.split("=");lB.set(`--${jL(t,"-")}`,n),lB.set(`-${jL(t,"-")}`,n)}}))):lB=UL();return lB})().has(e),uB=e=>XL(aB?process.env[e.toUpperCase()]:eB.getItem(e));var dB;cB("--"+(dB="production"))||uB(dB);const hB=aB&&["true","1","2"].includes({}.FORCE_COLOR);!cB("no-colors")&&(!aB||process.stdout.isTTY||hB)&&(!aB||cB("color")||hB||null!==uB("COLORTERM")||(uB("TERM")||"").includes("color"));const pB=Math.floor,fB=(e,t)=>e<t?e:t,gB=Math.pow,mB=Number.MAX_SAFE_INTEGER;class yB{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const vB=()=>new yB,bB=e=>{let t=e.cpos;for(let n=0;n<e.bufs.length;n++)t+=e.bufs[n].length;return t},_B=e=>{const t=new Uint8Array(bB(e));let n=0;for(let r=0;r<e.bufs.length;r++){const i=e.bufs[r];t.set(i,n),n+=i.length}return t.set(LB(e.cbuf.buffer,0,e.cpos),n),t},wB=(e,t)=>{const n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(2*n),e.cpos=0),e.cbuf[e.cpos++]=t},xB=(e,t)=>{for(;t>127;)wB(e,128|127&t),t=pB(t/128);wB(e,127&t)},SB=new Uint8Array(3e4),CB=SB.length/3,EB=YL&&YL.encodeInto?(e,t)=>{if(t.length<CB){const n=YL.encodeInto(t,SB).written||0;xB(e,n);for(let t=0;t<n;t++)wB(e,SB[t])}else TB(e,GL(t))}:(e,t)=>{const n=unescape(encodeURIComponent(t)),r=n.length;xB(e,r);for(let i=0;i<r;i++)wB(e,n.codePointAt(i))},TB=(e,t)=>{xB(e,t.byteLength),((e,t)=>{const n=e.cbuf.length,r=e.cpos,i=fB(n-r,t.length),o=t.length-i;e.cbuf.set(t.subarray(0,i),r),e.cpos+=i,o>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(((e,t)=>e>t?e:t)(2*n,o)),e.cbuf.set(t.subarray(i)),e.cpos=o)})(e,t)},kB=e=>new Error(e),NB=kB("Unexpected end of array"),AB=kB("Integer out of Range");class OB{constructor(e){this.arr=e,this.pos=0}}const MB=e=>new OB(e),RB=e=>((e,t)=>{const n=LB(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n})(e,IB(e)),DB=e=>e.arr[e.pos++],IB=e=>{let t=0,n=1;const r=e.arr.length;for(;e.pos<r;){const r=e.arr[e.pos++];if(t+=(127&r)*n,n*=128,r<128)return t;if(t>mB)throw AB}throw NB},PB=JL?e=>JL.decode(RB(e)):e=>{let t=IB(e);if(0===t)return"";{let n=String.fromCodePoint(DB(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(DB(e));else for(;t>0;){const r=t<1e4?t:1e4,i=e.arr.subarray(e.pos,e.pos+r);e.pos+=r,n+=String.fromCodePoint.apply(null,i),t-=r}return decodeURIComponent(escape(n))}},LB=(e,t,n)=>new Uint8Array(e,t,n),BB=sB?e=>{let t="";for(let n=0;n<e.byteLength;n++)t+=qL(e[n]);return btoa(t)}:e=>Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("base64"),$B=sB?e=>{const t=atob(e),n=(r=t.length,new Uint8Array(r));var r;for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}:e=>{const t=Buffer.from(e,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)},zB=new Map;const FB="undefined"==typeof BroadcastChannel?class{constructor(e){var t;this.room=e,this.onmessage=null,t=t=>t.key===e&&null!==this.onmessage&&this.onmessage({data:$B(t.newValue||"")}),QL||addEventListener("storage",t)}postMessage(e){eB.setItem(this.room,BB(new Uint8Array(e)))}}:BroadcastChannel,UB=e=>HL(zB,e,(()=>{const t=VL(),n=new FB(e);return n.onmessage=e=>t.forEach((t=>t(e.data,"broadcastchannel"))),{bc:n,subs:t}})),HB=(e,t,n=null)=>{const r=UB(e);r.bc.postMessage(t),r.subs.forEach((e=>e(t,n)))},VB=Date.now,qB=(e,t)=>{xB(e,0);const n=OR(t);TB(e,n)},KB=(e,t,n)=>{xB(e,1),TB(e,AR(t,n))},WB=(e,t,n)=>{try{NR(t,RB(e),n)}catch(aZ){console.error("Caught error while handling a Yjs update",aZ)}},jB=WB,YB=(e,t,n,r)=>{const i=IB(e);switch(i){case 0:((e,t,n)=>{KB(t,n,RB(e))})(e,t,n);break;case 1:WB(e,n,r);break;case 2:jB(e,n,r);break;default:throw new Error("Unknown message type")}return i};class GB{constructor(){this._observers=UL()}on(e,t){HL(this._observers,e,VL).add(t)}once(e,t){const n=(...r)=>{this.off(e,n),t(...r)};this.on(e,n)}off(e,t){const n=this._observers.get(e);void 0!==n&&(n.delete(t),0===n.size&&this._observers.delete(e))}emit(e,t){return tB((this._observers.get(e)||UL()).values()).forEach((e=>e(...t)))}destroy(){this._observers=UL()}}class JB extends GB{constructor(e){super(),this.doc=e,this.clientID=e.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval((()=>{const e=VB();null!==this.getLocalState()&&15e3<=e-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const t=[];this.meta.forEach(((n,r)=>{r!==this.clientID&&3e4<=e-n.lastUpdated&&this.states.has(r)&&t.push(r)})),t.length>0&&XB(this,t,"timeout")}),pB(3e3)),e.on("destroy",(()=>{this.destroy()})),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(e){const t=this.clientID,n=this.meta.get(t),r=void 0===n?0:n.clock+1,i=this.states.get(t);null===e?this.states.delete(t):this.states.set(t,e),this.meta.set(t,{clock:r,lastUpdated:VB()});const o=[],a=[],s=[],l=[];null===e?l.push(t):null==i?null!=e&&o.push(t):(a.push(t),oB(i,e)||s.push(t)),(o.length>0||s.length>0||l.length>0)&&this.emit("change",[{added:o,updated:s,removed:l},"local"]),this.emit("update",[{added:o,updated:a,removed:l},"local"])}setLocalStateField(e,t){const n=this.getLocalState();null!==n&&this.setLocalState({...n,[e]:t})}getStates(){return this.states}}const XB=(e,t,n)=>{const r=[];for(let i=0;i<t.length;i++){const n=t[i];if(e.states.has(n)){if(e.states.delete(n),n===e.clientID){const t=e.meta.get(n);e.meta.set(n,{clock:t.clock+1,lastUpdated:VB()})}r.push(n)}}r.length>0&&(e.emit("change",[{added:[],updated:[],removed:r},n]),e.emit("update",[{added:[],updated:[],removed:r},n]))},ZB=(e,t,n=e.states)=>{const r=t.length,i=vB();xB(i,r);for(let o=0;o<r;o++){const r=t[o],a=n.get(r)||null,s=e.meta.get(r).clock;xB(i,r),xB(i,s),EB(i,JSON.stringify(a))}return _B(i)},QB=[];QB[0]=(e,t,n,r,i)=>{xB(e,0);const o=YB(t,e,n.doc,n);r&&1===o&&!n.synced&&(n.synced=!0)},QB[3]=(e,t,n,r,i)=>{xB(e,1),TB(e,ZB(n.awareness,Array.from(n.awareness.getStates().keys())))},QB[1]=(e,t,n,r,i)=>{((e,t,n)=>{const r=MB(t),i=VB(),o=[],a=[],s=[],l=[],c=IB(r);for(let u=0;u<c;u++){const t=IB(r);let n=IB(r);const c=JSON.parse(PB(r)),u=e.meta.get(t),d=e.states.get(t),h=void 0===u?0:u.clock;(h<n||h===n&&null===c&&e.states.has(t))&&(null===c?t===e.clientID&&null!=e.getLocalState()?n++:e.states.delete(t):e.states.set(t,c),e.meta.set(t,{clock:n,lastUpdated:i}),void 0===u&&null!==c?o.push(t):void 0!==u&&null===c?l.push(t):null!==c&&(oB(c,d)||s.push(t),a.push(t)))}(o.length>0||s.length>0||l.length>0)&&e.emit("change",[{added:o,updated:s,removed:l},n]),(o.length>0||a.length>0||l.length>0)&&e.emit("update",[{added:o,updated:a,removed:l},n])})(n.awareness,RB(t),n)},QB[2]=(e,t,n,r,i)=>{((e,t,n)=>{0===IB(e)&&n(t,PB(e))})(t,n.doc,((e,t)=>e$(n,t)))};const e$=(e,t)=>console.warn(`Permission denied to access ${e.url}.\n${t}`),t$=(e,t,n)=>{const r=MB(t),i=vB(),o=IB(r),a=e.messageHandlers[o];return a?a(i,r,e,n,o):console.error("Unable to compute message"),i},n$=e=>{if(e.shouldConnect&&null===e.ws){const t=new e._WS(e.url);t.binaryType="arraybuffer",e.ws=t,e.wsconnecting=!0,e.wsconnected=!1,e.synced=!1,t.onmessage=n=>{e.wsLastMessageReceived=VB();const r=t$(e,new Uint8Array(n.data),!0);bB(r)>1&&t.send(_B(r))},t.onerror=t=>{e.emit("connection-error",[t,e])},t.onclose=t=>{e.emit("connection-close",[t,e]),e.ws=null,e.wsconnecting=!1,e.wsconnected?(e.wsconnected=!1,e.synced=!1,XB(e.awareness,Array.from(e.awareness.getStates().keys()).filter((t=>t!==e.doc.clientID)),e),e.emit("status",[{status:"disconnected"}])):e.wsUnsuccessfulReconnects++,setTimeout(n$,fB(100*gB(2,e.wsUnsuccessfulReconnects),e.maxBackoffTime),e)},t.onopen=()=>{e.wsLastMessageReceived=VB(),e.wsconnecting=!1,e.wsconnected=!0,e.wsUnsuccessfulReconnects=0,e.emit("status",[{status:"connected"}]);const n=vB();if(xB(n,0),qB(n,e.doc),t.send(_B(n)),null!==e.awareness.getLocalState()){const n=vB();xB(n,1),TB(n,ZB(e.awareness,[e.doc.clientID])),t.send(_B(n))}},e.emit("status",[{status:"connecting"}])}},r$=(e,t)=>{const n=e.ws;e.wsconnected&&n&&n.readyState===n.OPEN&&n.send(t),e.bcconnected&&HB(e.bcChannel,t,e)};class i$ extends GB{constructor(e,t,n,{connect:r=!0,awareness:i=new JB(n),params:o={},WebSocketPolyfill:a=WebSocket,resyncInterval:s=-1,maxBackoffTime:l=2500,disableBc:c=!1}={}){for(super();"/"===e[e.length-1];)e=e.slice(0,e.length-1);const u=(e=>((e,t)=>{const n=[];for(const r in e)n.push(t(e[r],r));return n})(e,((e,t)=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`)).join("&"))(o);this.maxBackoffTime=l,this.bcChannel=e+"/"+t,this.url=e+"/"+t+(0===u.length?"":"?"+u),this.roomname=t,this.doc=n,this._WS=a,this.awareness=i,this.wsconnected=!1,this.wsconnecting=!1,this.bcconnected=!1,this.disableBc=c,this.wsUnsuccessfulReconnects=0,this.messageHandlers=QB.slice(),this._synced=!1,this.ws=null,this.wsLastMessageReceived=0,this.shouldConnect=r,this._resyncInterval=0,s>0&&(this._resyncInterval=setInterval((()=>{if(this.ws&&this.ws.readyState===WebSocket.OPEN){const e=vB();xB(e,0),qB(e,n),this.ws.send(_B(e))}}),s)),this._bcSubscriber=(e,t)=>{if(t!==this){const t=t$(this,new Uint8Array(e),!1);bB(t)>1&&HB(this.bcChannel,_B(t),this)}},this._updateHandler=(e,t)=>{if(t!==this){const t=vB();xB(t,0),((e,t)=>{xB(e,2),TB(e,t)})(t,e),r$(this,_B(t))}},this.doc.on("update",this._updateHandler),this._awarenessUpdateHandler=({added:e,updated:t,removed:n},r)=>{const o=e.concat(t).concat(n),a=vB();xB(a,1),TB(a,ZB(i,o)),r$(this,_B(a))},this._unloadHandler=()=>{XB(this.awareness,[n.clientID],"window unload")},"undefined"!=typeof window?window.addEventListener("unload",this._unloadHandler):"undefined"!=typeof process&&process.on("exit",this._unloadHandler),i.on("update",this._awarenessUpdateHandler),this._checkInterval=setInterval((()=>{this.wsconnected&&3e4<VB()-this.wsLastMessageReceived&&this.ws.close()}),3e3),r&&this.connect()}get synced(){return this._synced}set synced(e){this._synced!==e&&(this._synced=e,this.emit("synced",[e]),this.emit("sync",[e]))}destroy(){0!==this._resyncInterval&&clearInterval(this._resyncInterval),clearInterval(this._checkInterval),this.disconnect(),"undefined"!=typeof window?window.removeEventListener("unload",this._unloadHandler):"undefined"!=typeof process&&process.off("exit",this._unloadHandler),this.awareness.off("update",this._awarenessUpdateHandler),this.doc.off("update",this._updateHandler),super.destroy()}connectBc(){if(this.disableBc)return;var e,t;this.bcconnected||(e=this.bcChannel,t=this._bcSubscriber,UB(e).subs.add(t),this.bcconnected=!0);const n=vB();xB(n,0),qB(n,this.doc),HB(this.bcChannel,_B(n),this);const r=vB();xB(r,0),KB(r,this.doc),HB(this.bcChannel,_B(r),this);const i=vB();xB(i,3),HB(this.bcChannel,_B(i),this);const o=vB();xB(o,1),TB(o,ZB(this.awareness,[this.doc.clientID])),HB(this.bcChannel,_B(o),this)}disconnectBc(){const e=vB();xB(e,1),TB(e,ZB(this.awareness,[this.doc.clientID],new Map)),r$(this,_B(e)),this.bcconnected&&(((e,t)=>{const n=UB(e),r=n.subs.delete(t);r&&0===n.subs.size&&(n.bc.close(),zB.delete(e))})(this.bcChannel,this._bcSubscriber),this.bcconnected=!1)}disconnect(){this.shouldConnect=!1,this.disconnectBc(),null!==this.ws&&this.ws.close()}connect(){this.shouldConnect=!0,this.wsconnected||null!==this.ws||(n$(this),this.connectBc())}}const o$=new URL(window.location.href),a$=new URLSearchParams(o$.search),s$=a$.get("collabEndpoint")||"ws://localhost:1234",l$=a$.get("collabId")||"0";function c$(e,t){let n=t.get(e);return void 0===n?(n=new kR,t.set(e,n)):n.load(),new i$(s$,"playground/"+l$+"/"+e,n,{connect:!1})}var u$,d$,h$={},p$={exports:{}};u$=p$,d$=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},i={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof o?new o(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){var r,o;switch(n=n||{},i.util.type(t)){case"Object":if(o=i.util.objId(t),n[o])return n[o];for(var a in r={},n[o]=r,t)t.hasOwnProperty(a)&&(r[a]=e(t[a],n));return r;case"Array":return o=i.util.objId(t),n[o]?n[o]:(r=[],n[o]=r,t.forEach((function(t,i){r[i]=e(t,n)})),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,"gi"),""),e.classList.add("language-"+n)},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r="no-"+t;e;){var i=e.classList;if(i.contains(t))return!0;if(i.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=i.util.clone(i.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var o=(r=r||i.languages)[e],a={};for(var s in o)if(o.hasOwnProperty(s)){if(s==t)for(var l in n)n.hasOwnProperty(l)&&(a[l]=n[l]);n.hasOwnProperty(s)||(a[s]=o[s])}var c=r[e];return r[e]=a,i.languages.DFS(i.languages,(function(t,n){n===c&&t!=e&&(this[t]=a)})),a},DFS:function e(t,n,r,o){o=o||{};var a=i.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var l=t[s],c=i.util.type(l);"Object"!==c||o[a(l)]?"Array"!==c||o[a(l)]||(o[a(l)]=!0,e(l,n,s,o)):(o[a(l)]=!0,e(l,n,null,o))}}},plugins:{},highlightAll:function(e,t){i.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};i.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),i.hooks.run("before-all-elements-highlight",r);for(var o,a=0;o=r.elements[a++];)i.highlightElement(o,!0===t,r.callback)},highlightElement:function(t,n,r){var o=i.util.getLanguage(t),a=i.languages[o];i.util.setLanguage(t,o);var s=t.parentElement;s&&"pre"===s.nodeName.toLowerCase()&&i.util.setLanguage(s,o);var l={element:t,language:o,grammar:a,code:t.textContent};function c(e){l.highlightedCode=e,i.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,i.hooks.run("after-highlight",l),i.hooks.run("complete",l),r&&r.call(l.element)}if(i.hooks.run("before-sanity-check",l),(s=l.element.parentElement)&&"pre"===s.nodeName.toLowerCase()&&!s.hasAttribute("tabindex")&&s.setAttribute("tabindex","0"),!l.code)return i.hooks.run("complete",l),void(r&&r.call(l.element));if(i.hooks.run("before-highlight",l),l.grammar)if(n&&e.Worker){var u=new Worker(i.filename);u.onmessage=function(e){c(e.data)},u.postMessage(JSON.stringify({language:l.language,code:l.code,immediateClose:!0}))}else c(i.highlight(l.code,l.grammar,l.language));else c(i.util.encode(l.code))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(i.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=i.tokenize(r.code,r.grammar),i.hooks.run("after-tokenize",r),o.stringify(i.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var i=new l;return c(i,i.head,e),s(e,i,t,i.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(i)},hooks:{all:{},add:function(e,t){var n=i.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=i.hooks.all[e];if(n&&n.length)for(var r,o=0;r=n[o++];)r(t)}},Token:o};function o(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function a(e,t,n,r){e.lastIndex=t;var i=e.exec(n);if(i&&r&&i[1]){var o=i[1].length;i.index+=o,i[0]=i[0].slice(o)}return i}function s(e,t,n,r,l,d){for(var h in n)if(n.hasOwnProperty(h)&&n[h]){var p=n[h];p=Array.isArray(p)?p:[p];for(var f=0;f<p.length;++f){if(d&&d.cause==h+","+f)return;var g=p[f],m=g.inside,y=!!g.lookbehind,v=!!g.greedy,b=g.alias;if(v&&!g.pattern.global){var _=g.pattern.toString().match(/[imsuy]*$/)[0];g.pattern=RegExp(g.pattern.source,_+"g")}for(var w=g.pattern||g,x=r.next,S=l;x!==t.tail&&!(d&&S>=d.reach);S+=x.value.length,x=x.next){var C=x.value;if(t.length>e.length)return;if(!(C instanceof o)){var E,T=1;if(v){if(!(E=a(w,S,e,y))||E.index>=e.length)break;var k=E.index,N=E.index+E[0].length,A=S;for(A+=x.value.length;k>=A;)A+=(x=x.next).value.length;if(S=A-=x.value.length,x.value instanceof o)continue;for(var O=x;O!==t.tail&&(A<N||"string"==typeof O.value);O=O.next)T++,A+=O.value.length;T--,C=e.slice(S,A),E.index-=S}else if(!(E=a(w,0,C,y)))continue;k=E.index;var M=E[0],R=C.slice(0,k),D=C.slice(k+M.length),I=S+C.length;d&&I>d.reach&&(d.reach=I);var P=x.prev;if(R&&(P=c(t,P,R),S+=R.length),u(t,P,T),x=c(t,P,new o(h,m?i.tokenize(M,m):M,b,M)),D&&c(t,x,D),T>1){var L={cause:h+","+f,reach:I};s(e,t,n,x.prev,S,L),d&&L.reach>d.reach&&(d.reach=L.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function c(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function u(e,t,n){for(var r=t.next,i=0;i<n&&r!==e.tail;i++)r=r.next;t.next=r,r.prev=t,e.length-=i}if(e.Prism=i,o.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var r="";return t.forEach((function(t){r+=e(t,n)})),r}var o={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},a=t.alias;a&&(Array.isArray(a)?Array.prototype.push.apply(o.classes,a):o.classes.push(a)),i.hooks.run("wrap",o);var s="";for(var l in o.attributes)s+=" "+l+'="'+(o.attributes[l]||"").replace(/"/g,""")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+s+">"+o.content+"</"+o.tag+">"},!e.document)return e.addEventListener?(i.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),r=n.language,o=n.code,a=n.immediateClose;e.postMessage(i.highlight(o,i.languages[r],r)),a&&e.close()}),!1),i):i;var d=i.util.currentScript();function h(){i.manual||i.highlightAll()}if(d&&(i.filename=d.src,d.hasAttribute("data-manual")&&(i.manual=!0)),!i.manual){var p=document.readyState;"loading"===p||"interactive"===p&&d&&d.defer?document.addEventListener("DOMContentLoaded",h):window.requestAnimationFrame?window.requestAnimationFrame(h):window.setTimeout(h,16)}return i}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{}),u$.exports&&(u$.exports=d$),void 0!==r&&(r.Prism=d$),d$.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},d$.languages.markup.tag.inside["attr-value"].inside.entity=d$.languages.markup.entity,d$.languages.markup.doctype.inside["internal-subset"].inside=d$.languages.markup,d$.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(d$.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:d$.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:d$.languages[t]};var i={};i[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},d$.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(d$.languages.markup.tag,"addAttribute",{value:function(e,t){d$.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:d$.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),d$.languages.html=d$.languages.markup,d$.languages.mathml=d$.languages.markup,d$.languages.svg=d$.languages.markup,d$.languages.xml=d$.languages.extend("markup",{}),d$.languages.ssml=d$.languages.xml,d$.languages.atom=d$.languages.xml,d$.languages.rss=d$.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(d$),d$.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},d$.languages.javascript=d$.languages.extend("clike",{"class-name":[d$.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),d$.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,d$.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:d$.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:d$.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:d$.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:d$.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:d$.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),d$.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:d$.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),d$.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),d$.languages.markup&&(d$.languages.markup.tag.addInlined("script","javascript"),d$.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),d$.languages.js=d$.languages.javascript,function(){if(void 0!==d$&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},t="data-src-status",n="loading",r="loaded",i='pre[data-src]:not([data-src-status="loaded"]):not([data-src-status="loading"])';d$.hooks.add("before-highlightall",(function(e){e.selector+=", "+i})),d$.hooks.add("before-sanity-check",(function(o){var a=o.element;if(a.matches(i)){o.code="",a.setAttribute(t,n);var s=a.appendChild(document.createElement("CODE"));s.textContent="Loading…";var l=a.getAttribute("data-src"),c=o.language;if("none"===c){var u=(/\.(\w+)$/.exec(l)||[,"none"])[1];c=e[u]||u}d$.util.setLanguage(s,c),d$.util.setLanguage(a,c);var d=d$.plugins.autoloader;d&&d.loadLanguages(c),function(e,t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.onreadystatechange=function(){4==r.readyState&&(r.status<400&&r.responseText?t(r.responseText):r.status>=400?n("✖ Error "+r.status+" while fetching file: "+r.statusText):n("✖ Error: File does not exist or is empty"))},r.send(null)}(l,(function(e){a.setAttribute(t,r);var n=function(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||"");if(t){var n=Number(t[1]),r=t[2],i=t[3];return r?i?[n,Number(i)]:[n,void 0]:[n,n]}}(a.getAttribute("data-range"));if(n){var i=e.split(/\r\n?|\n/g),o=n[0],l=null==n[1]?i.length:n[1];o<0&&(o+=i.length),o=Math.max(0,Math.min(o-1,i.length)),l<0&&(l+=i.length),l=Math.max(0,Math.min(l,i.length)),e=i.slice(o,l).join("\n"),a.hasAttribute("data-start")||a.setAttribute("data-start",String(o+1))}s.textContent=e,d$.highlightElement(s)}),(function(e){a.setAttribute(t,"failed"),s.textContent=e}))}})),d$.plugins.fileHighlight={highlight:function(e){for(var t,n=(e||document).querySelectorAll(i),r=0;t=n[r++];)d$.highlightElement(t)}};var o=!1;d$.fileHighlight=function(){o||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),o=!0),d$.plugins.fileHighlight.highlight.apply(this,arguments)}}}(),Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript,Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var i={};i[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml,function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+o+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+o+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var i=t[n];if("code"===i.type){var o=i.content[1],a=i.content[3];if(o&&a&&"code-language"===o.type&&"code-block"===a.type&&"string"==typeof o.content){var s=o.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),l="language-"+(s=(/[a-z][\w-]*/i.exec(s)||[""])[0].toLowerCase());a.alias?"string"==typeof a.alias?a.alias=[a.alias,l]:a.alias.push(l):a.alias=[l]}}else e(i.content)}}(e.tokens)})),e.hooks.add("wrap",(function(t){if("code-block"===t.type){for(var n="",r=0,i=t.classes.length;r<i;r++){var o=t.classes[r],c=/language-(.+)/.exec(o);if(c){n=c[1];break}}var u,d,h=e.languages[n];if(h)t.content=e.highlight((u=t.content,d=(d=u.replace(a,"")).replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,(function(e,t){var n;if("#"===(t=t.toLowerCase())[0])return n="x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1)),l(n);var r=s[t];return r||e})),d),h,n);else if(n&&"none"!==n&&e.plugins.autoloader){var p="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random());t.attributes.id=p,e.plugins.autoloader.loadLanguages(n,(function(){var t=document.getElementById(p);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))}))}}}));var a=RegExp(e.languages.markup.tag.pattern.source,"gi"),s={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(Prism),Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(Prism),Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete Prism.languages.objectivec["class-name"],Prism.languages.objc=Prism.languages.objectivec,Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,(function(){return t}));t=t.replace(/<self>/g,(function(){return/[^\s\S]/.source})),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism),Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=Prism.languages.swift})),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism),function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism),function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism);var f$=p$.exports,g$=Ju,m$=Zu;let y$=e=>null!=e&&f$.languages.hasOwnProperty(e)?e:void 0;function v$(e,t){for(let n of e.childNodes){if(g$.isHTMLElement(n)&&n.tagName===t)return!0;v$(n,t)}return!1}class b$ extends m$.ElementNode{static getType(){return"code"}static clone(e){return new b$(e.__language,e.__key)}constructor(e,t){super(t),this.__language=y$(e)}createDOM(e){let t=document.createElement("code");return g$.addClassNamesToElement(t,e.theme.code),t.setAttribute("spellcheck","false"),(e=this.getLanguage())&&t.setAttribute("data-highlight-language",e),t}updateDOM(e,t){let n=this.__language;return e=e.__language,n?n!==e&&t.setAttribute("data-highlight-language",n):e&&t.removeAttribute("data-highlight-language"),!1}static importDOM(){return{code:e=>null!=e.textContent&&(/\r?\n/.test(e.textContent)||v$(e,"BR"))?{conversion:x$,priority:1}:null,div:()=>({conversion:S$,priority:1}),pre:()=>({conversion:x$,priority:0}),table:e=>k$(e)?{conversion:C$,priority:3}:null,td:e=>{let t=e.closest("table");return e.classList.contains("js-file-line")?{conversion:T$,priority:3}:t&&k$(t)?{conversion:E$,priority:3}:null},tr:e=>(e=e.closest("table"))&&k$(e)?{conversion:E$,priority:3}:null}}static importJSON(e){let t=_$(e.language);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),type:"code",version:1}}insertNewAfter(e,t=!0){var n=this.getChildren(),r=n.length;if(2<=r&&"\n"===n[r-1].getTextContent()&&"\n"===n[r-2].getTextContent()&&e.isCollapsed()&&e.anchor.key===this.__key&&e.anchor.offset===r)return n[r-1].remove(),n[r-2].remove(),e=m$.$createParagraphNode(),this.insertAfter(e,t),e;if(null!=(r=P$(t=e.anchor.getNode()))){for(n=0,r=r.getTextContent();n<r.length&&/[\t ]/.test(r[n]);)n+=1;if(0<n)return n=D$(n=r.substring(0,n)),t.insertAfter(n),e.insertNodes([m$.$createLineBreakNode()]),n.select(),n}return null}canInsertTab(){let e=m$.$getSelection();return!(!m$.$isRangeSelection(e)||!e.isCollapsed())}canIndent(){return!1}collapseAtStart(){let e=m$.$createParagraphNode();return this.getChildren().forEach((t=>e.append(t))),this.replace(e),!0}setLanguage(e){this.getWritable().__language=y$(e)}getLanguage(){return this.getLatest().__language}}function _$(e){return m$.$applyNodeReplacement(new b$(e))}function w$(e){return e instanceof b$}function x$(){return{node:_$(),preformatted:!0}}function S$(e){let t=null!==e.style.fontFamily.match("monospace");return t||function(e){for(e=e.parentElement;null!==e;){if(null!==e.style.fontFamily.match("monospace"))return!0;e=e.parentElement}return!1}(e)?{after:t=>{let n=e.parentNode;return null!=n&&e!==n.lastChild&&t.push(m$.$createLineBreakNode()),t},node:t?_$():null,preformatted:t}:{node:null}}function C$(){return{node:_$(),preformatted:!0}}function E$(){return{node:null}}function T$(e){return{after:t=>(e.parentNode&&e.parentNode.nextSibling&&t.push(m$.$createLineBreakNode()),t),node:null}}function k$(e){return e.classList.contains("js-file-line-container")}let N$={c:"C",clike:"C-like",cpp:"C++",css:"CSS",html:"HTML",java:"Java",js:"JavaScript",markdown:"Markdown",objc:"Objective-C",plain:"Plain Text",py:"Python",rust:"Rust",sql:"SQL",swift:"Swift",typescript:"TypeScript",xml:"XML"},A$={cpp:"cpp",java:"java",javascript:"js",md:"markdown",plaintext:"plain",python:"py",text:"plain",ts:"typescript"};function O$(e){return A$[e]||e}class M$ extends m$.TextNode{constructor(e,t,n){super(e,n),this.__highlightType=t}static getType(){return"code-highlight"}static clone(e){return new M$(e.__text,e.__highlightType||void 0,e.__key)}getHighlightType(){return this.getLatest().__highlightType}createDOM(e){let t=super.createDOM(e);return e=R$(e.theme,this.__highlightType),g$.addClassNamesToElement(t,e),t}updateDOM(e,t,n){let r=super.updateDOM(e,t,n);return(e=R$(n.theme,e.__highlightType))!==(n=R$(n.theme,this.__highlightType))&&(e&&g$.removeClassNamesFromElement(t,e),n&&g$.addClassNamesToElement(t,n)),r}static importJSON(e){let t=D$(e.text,e.highlightType);return t.setFormat(e.format),t.setDetail(e.detail),t.setMode(e.mode),t.setStyle(e.style),t}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType(),type:"code-highlight",version:1}}setFormat(){return this}isParentRequired(){return!0}createParentElementNode(){return _$()}}function R$(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}function D$(e,t){return m$.$applyNodeReplacement(new M$(e,t))}function I$(e){return e instanceof M$}function P$(e){let t=null,n=e.getPreviousSiblings();for(n.push(e);0<n.length&&(I$(e=n.pop())&&(t=e),!m$.$isLineBreakNode(e)););return t}function L$(e){let t=null,n=e.getNextSiblings();for(n.unshift(e);0<n.length&&(I$(e=n.shift())&&(t=e),!m$.$isLineBreakNode(e)););return t}let B$={defaultLanguage:"javascript",tokenize(e,t){return f$.tokenize(e,f$.languages[t||""]||f$.languages[this.defaultLanguage])}};function $$(e,t){var n=e.length;let r=-1;if(t)for(t=0;t<n;t++){let n=e[t];if(" "!==n&&"\t"!==n){r=t;break}}else for(--n;-1<n;n--)if(" "!==(t=e[n])&&"\t"!==t){r=n;break}return r}function z$(e){let t=null,n=-1;var r=e.getPreviousSiblings();for(r.push(e);0<r.length;){var i=r.pop();if(I$(i)){var o=i.getTextContent();-1!==(o=$$(o,!0))&&(t=i,n=o)}if(m$.$isLineBreakNode(i))break}if(null===t)for(e=e.getNextSiblings();0<e.length;){if(I$(r=e.shift())&&-1!==(i=$$(i=r.getTextContent(),!0))){t=r,n=i;break}if(m$.$isLineBreakNode(r))break}return{node:t,offset:n}}function F$(e){let t=null,n=-1;var r=e.getNextSiblings();for(r.unshift(e);0<r.length;){var i=r.shift();if(I$(i)){var o=i.getTextContent();-1!==(o=$$(o,!1))&&(t=i,n=o+1)}if(m$.$isLineBreakNode(i))break}if(null===t)for(e=e.getPreviousSiblings();0<e.length;){if(I$(r=e.pop())&&-1!==(i=$$(i=r.getTextContent(),!1))){t=r,n=i+1;break}if(m$.$isLineBreakNode(r))break}return{node:t,offset:n}}function U$(e,t,n){let r=e.getParent();w$(r)?V$(r,t,n):I$(e)&&e.replace(m$.$createTextNode(e.__text))}let H$=new Set;function V$(e,t,n){let r=e.getKey();H$.has(r)||(H$.add(r),void 0===e.getLanguage()&&e.setLanguage(n.defaultLanguage),t.update((()=>{!function(e,t){if(w$(e=m$.$getNodeByKey(e))&&e.isAttached()){var n=m$.$getSelection();if(m$.$isRangeSelection(n)){var r=(n=n.anchor).offset,i="element"===n.type&&m$.$isLineBreakNode(e.getChildAtIndex(n.offset-1)),o=0;if(!i){let e=n.getNode();o=r+e.getPreviousSiblings().reduce(((e,t)=>e+t.getTextContentSize()),0)}t()&&(i?n.getNode().select(r,r):e.getChildren().some((e=>{let t=m$.$isTextNode(e);if(t||m$.$isLineBreakNode(e)){let n=e.getTextContentSize();if(t&&n>=o)return e.select(o,o),!0;o-=n}return!1})))}else t()}}(r,(()=>{var t=m$.$getNodeByKey(r);if(!w$(t)||!t.isAttached())return!1;var i=t.getTextContent();i=q$(i=n.tokenize(i,t.getLanguage()||n.defaultLanguage));var o=t.getChildren();for(t=0;t<o.length&&K$(o[t],i[t]);)t++;var a=o.length;let s=i.length,l=Math.min(a,s)-t,c=0;for(;c<l;)if(c++,!K$(o[a-c],i[s-c])){c--;break}o=t,a-=c,i=i.slice(t,s-c);let{from:u,to:d,nodesForReplacement:h}={from:o,nodesForReplacement:i,to:a};return!(u===d&&!h.length)&&(e.splice(u,d-u,h),!0)}))}),{onUpdate:()=>{H$.delete(r)},skipTransforms:!0}))}function q$(e){let t=[];return e.forEach((e=>{if("string"==typeof e){e=e.split("\n");for(var n=0;n<e.length;n++){let r=e[n];r.length&&t.push(D$(r)),n<e.length-1&&t.push(m$.$createLineBreakNode())}}else({content:n}=e),"string"==typeof n?t.push(D$(n,e.type)):Array.isArray(n)&&1===n.length&&"string"==typeof n[0]?t.push(D$(n[0],e.type)):Array.isArray(n)&&t.push(...q$(n))})),t}function K$(e,t){return I$(e)&&I$(t)?e.__text===t.__text&&e.__highlightType===t.__highlightType:!(!m$.$isLineBreakNode(e)||!m$.$isLineBreakNode(t))}function W$(e){var t=m$.$getSelection();if(!m$.$isRangeSelection(t)||t.isCollapsed())return!1;t=t.getNodes();for(var n=0;n<t.length;n++){var r=t[n];if(!I$(r)&&!m$.$isLineBreakNode(r))return!1}for(null!=(n=P$(t[0]))&&j$(n,e),n=1;n<t.length;n++)r=t[n],m$.$isLineBreakNode(t[n-1])&&I$(r)&&j$(r,e);return!0}function j$(e,t){let n=e.getTextContent();t===m$.INDENT_CONTENT_COMMAND?0<n.length&&/\s/.test(n[0])?e.setTextContent("\t"+n):(t=D$("\t"),e.insertBefore(t)):0===n.indexOf("\t")&&(1===n.length?e.remove():e.setTextContent(n.substring(1)))}function Y$(e,t){let n=m$.$getSelection();if(!m$.$isRangeSelection(n))return!1;let{anchor:r,focus:i}=n,o=r.offset,a=i.offset,s=r.getNode(),l=i.getNode();var c=e===m$.KEY_ARROW_UP_COMMAND;if(!I$(s)||!I$(l))return!1;if(!t.altKey){if(n.isCollapsed())if(e=s.getParentOrThrow(),c&&0===o&&null===s.getPreviousSibling()){if(null===e.getPreviousSibling())return e.selectPrevious(),t.preventDefault(),!0}else if(!c&&o===s.getTextContentSize()&&null===s.getNextSibling()&&null===e.getNextSibling())return e.selectNext(),t.preventDefault(),!0;return!1}var u=P$(s);let d=L$(l);if(null==u||null==d)return!1;let h=u.getNodesBetween(d);for(let f=0;f<h.length;f++){let e=h[f];if(!I$(e)&&!m$.$isLineBreakNode(e))return!1}if(t.preventDefault(),t.stopPropagation(),t=c?u.getPreviousSibling():d.getNextSibling(),!m$.$isLineBreakNode(t))return!0;if(null==(u=c?t.getPreviousSibling():t.getNextSibling()))return!0;let p=null!=(c=c?P$(u):L$(u))?c:u;return t.remove(),h.forEach((e=>e.remove())),e===m$.KEY_ARROW_UP_COMMAND?(h.forEach((e=>p.insertBefore(e))),p.insertBefore(t)):(p.insertAfter(t),p=t,h.forEach((e=>{p.insertAfter(e),p=e}))),n.setTextNodeRange(s,o,l,a),!0}function G$(e,t){let n=m$.$getSelection();if(!m$.$isRangeSelection(n))return!1;let r,i,{anchor:o,focus:a}=n,s=o.getNode(),l=a.getNode();return e=e===m$.MOVE_TO_START,!(!I$(s)||!I$(l))&&(({node:r,offset:i}=e?z$(l):F$(l)),null!==r&&-1!==i&&n.setTextNodeRange(r,i,r,i),t.preventDefault(),t.stopPropagation(),!0)}h$.$createCodeHighlightNode=D$;var J$=h$.$createCodeNode=_$,X$=h$.$isCodeHighlightNode=I$,Z$=h$.$isCodeNode=w$,Q$=h$.CODE_LANGUAGE_FRIENDLY_NAME_MAP=N$,ez=h$.CODE_LANGUAGE_MAP=A$,tz=h$.CodeHighlightNode=M$,nz=h$.CodeNode=b$;h$.DEFAULT_CODE_LANGUAGE="javascript",h$.PrismTokenizer=B$,h$.getCodeLanguages=()=>Object.keys(f$.languages).filter((e=>"function"!=typeof f$.languages[e])).sort(),h$.getDefaultCodeLanguage=()=>"javascript",h$.getEndOfCodeInLine=F$,h$.getFirstCodeHighlightNodeOfLine=P$;var rz=h$.getLanguageFriendlyName=function(e){return e=O$(e),N$[e]||e};h$.getLastCodeHighlightNodeOfLine=L$,h$.getStartOfCodeInLine=z$;var iz=h$.normalizeCodeLang=O$,oz=h$.registerCodeHighlighting=function(e,t){if(!e.hasNodes([b$,M$]))throw Error("CodeHighlightPlugin: CodeNode or CodeHighlightNode not registered on editor");return null==t&&(t=B$),g$.mergeRegister(e.registerMutationListener(b$,(t=>{e.update((()=>{for(let[i,o]of t)if("destroyed"!==o){var n=m$.$getNodeByKey(i);if(null!==n)e:{var r=n;if(null===(n=e.getElementByKey(r.getKey())))break e;let t=(r=r.getChildren()).length;if(t===n.__cachedChildrenLength)break e;n.__cachedChildrenLength=t;let i="1",o=1;for(let e=0;e<t;e++)m$.$isLineBreakNode(r[e])&&(i+="\n"+ ++o);n.setAttribute("data-gutter",i)}}}))})),e.registerNodeTransform(b$,(n=>V$(n,e,t))),e.registerNodeTransform(m$.TextNode,(n=>U$(n,e,t))),e.registerNodeTransform(M$,(n=>U$(n,e,t))),e.registerCommand(m$.INDENT_CONTENT_COMMAND,(()=>W$(m$.INDENT_CONTENT_COMMAND)),m$.COMMAND_PRIORITY_LOW),e.registerCommand(m$.OUTDENT_CONTENT_COMMAND,(()=>W$(m$.OUTDENT_CONTENT_COMMAND)),m$.COMMAND_PRIORITY_LOW),e.registerCommand(m$.KEY_ARROW_UP_COMMAND,(e=>Y$(m$.KEY_ARROW_UP_COMMAND,e)),m$.COMMAND_PRIORITY_LOW),e.registerCommand(m$.KEY_ARROW_DOWN_COMMAND,(e=>Y$(m$.KEY_ARROW_DOWN_COMMAND,e)),m$.COMMAND_PRIORITY_LOW),e.registerCommand(m$.MOVE_TO_END,(e=>G$(m$.MOVE_TO_END,e)),m$.COMMAND_PRIORITY_LOW),e.registerCommand(m$.MOVE_TO_START,(e=>G$(m$.MOVE_TO_START,e)),m$.COMMAND_PRIORITY_LOW))};const az=new WeakMap;function sz(e){const t=e.changedTouches[0];return void 0===t?null:[t.clientX,t.clientY]}function lz(e,t){let n=az.get(e);if(void 0===n){const t=new Set,r=e=>{void 0!==n&&(n.start=sz(e))},i=e=>{if(void 0===n)return;const r=n.start;if(null===r)return;const i=sz(e);for(const n of t)null!==i&&n([i[0]-r[0],i[1]-r[1]],e)};e.addEventListener("touchstart",r),e.addEventListener("touchend",i),n={handleTouchend:i,handleTouchstart:r,listeners:t,start:null},az.set(e,n)}return n.listeners.add(t),()=>function(e,t){const n=az.get(e);if(void 0===n)return;const r=n.listeners;r.delete(t),0===r.size&&(az.delete(e),e.removeEventListener("touchstart",n.handleTouchstart),e.removeEventListener("touchend",n.handleTouchend))}(e,t)}const cz=Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5);function uz(e){if(!tm(e)||!e.isCollapsed())return[!1,""];const t=e.getNodes()[0],n=e.anchor;if(!rm(t)||!t.isSimpleText()||!iy(n))return[!1,""];const r=[],i=t.getTextContent();let o,a=t.getTextContentSize();for(;a--&&a>=0&&" "!==(o=i[a]);)r.push(o);return 0===r.length?[!1,""]:[!0,r.reverse().join("")]}function dz(){const[e]=Mv(),[,t]=a_(),n=a.exports.useCallback((e=>{const t=new hz;console.time("query");const n=t.query(e);return console.timeEnd("query"),n}),[]);return a.exports.useEffect((()=>{let r=null,i=null,o=null,a=null;function s(){const e=null!==r?jg(r):null;null!==e&&e.isAttached()&&(e.remove(),r=null),null!==a&&(a.dismiss(),a=null),i=null,o=null,t(null)}function l(){if(null===o||null===r)return!1;const e=jg(r);if(null===e)return!1;const t=Kg(o);return e.replace(t),t.selectNext(),s(),!0}function c(e){return!!l()&&(e.preventDefault(),!0)}const u=e.getRootElement();return Sy(e.registerNodeTransform(fz,(function(e){const t=e.getKey();e.__uuid===cz&&t!==r&&s()})),e.registerUpdateListener((function(){e.update((()=>{const l=Jg(),[c,u]=uz(l);c?u!==i&&(s(),a=n(u),a.promise.then((n=>{null!==a&&function(n,s){a===n&&null!==s&&e.update((()=>{const e=Jg(),[n,a]=uz(e);if(!n||a!==i||!tm(e))return;const l=e.clone(),c=gz(cz);r=c.getKey(),e.insertNodes([c]),im(l),o=s,t(s)}),{tag:"history-merge"})}(a,n)})).catch((e=>{console.error(e)})),i=u):s()}))})),e.registerCommand(Lm,c,hm),e.registerCommand(Om,c,hm),...null!==u?[(d=u,h=function(t,n){e.update((()=>{l()&&n.preventDefault()}))},lz(d,((e,t)=>{const[n,r]=e;n>0&&n>Math.abs(r)&&h(n,t)})))]:[],(function(){e.update((()=>{s()}))}));var d,h}),[e,n,t]),null}class hz{constructor(){this.DATABASE=pz,this.LATENCY=200,this.query=e=>{let t=!1;return{dismiss:()=>{t=!0},promise:new Promise(((n,r)=>{setTimeout((()=>{if(t)return r("Dismissed");const i=e.length;if(""===e||i<4)return n(null);const o=e.charCodeAt(0),a=o>=65&&o<=90,s=a?String.fromCharCode(o+32)+e.substring(1):e,l=this.DATABASE.find((e=>{var t;return null!=(t=e.startsWith(s))?t:null}));if(void 0===l)return n(null);const c=(a?String.fromCharCode(l.charCodeAt(0)-32)+l.substring(1):l).substring(i);return n(""===c?null:c)}),this.LATENCY)}))}}}}const pz=["information","available","copyright","university","management","international","development","education","community","technology","following","resources","including","directory","government","department","description","insurance","different","categories","conditions","accessories","september","questions","application","financial","equipment","performance","experience","important","activities","additional","something","professional","committee","washington","california","reference","companies","computers","president","australia","discussion","entertainment","agreement","marketing","association","collection","solutions","electronics","technical","microsoft","conference","environment","statement","downloads","applications","requirements","individual","subscribe","everything","production","commercial","advertising","treatment","newsletter","knowledge","currently","construction","registered","protection","engineering","published","corporate","customers","materials","countries","standards","political","advertise","environmental","availability","employment","commission","administration","institute","sponsored","electronic","condition","effective","organization","selection","corporation","executive","necessary","according","particular","facilities","opportunities","appropriate","statistics","investment","christmas","registration","furniture","wednesday","structure","distribution","industrial","potential","responsible","communications","associated","foundation","documents","communication","independent","operating","developed","telephone","population","navigation","operations","therefore","christian","understand","publications","worldwide","connection","publisher","introduction","properties","accommodation","excellent","opportunity","assessment","especially","interface","operation","restaurants","beautiful","locations","significant","technologies","manufacturer","providing","authority","considered","programme","enterprise","educational","employees","alternative","processing","responsibility","resolution","publication","relations","photography","components","assistance","completed","organizations","otherwise","transportation","disclaimer","membership","recommended","background","character","maintenance","functions","trademarks","phentermine","submitted","television","interested","throughout","established","programming","regarding","instructions","increased","understanding","beginning","associates","instruments","businesses","specified","restaurant","procedures","relationship","traditional","sometimes","themselves","transport","interesting","evaluation","implementation","galleries","references","presented","literature","respective","definition","secretary","networking","australian","magazines","francisco","individuals","guidelines","installation","described","attention","difference","regulations","certificate","directions","documentation","automotive","successful","communities","situation","publishing","emergency","developing","determine","temperature","announcements","historical","ringtones","difficult","scientific","satellite","particularly","functional","monitoring","architecture","recommend","dictionary","accounting","manufacturing","professor","generally","continued","techniques","permission","generation","component","guarantee","processes","interests","paperback","classifieds","supported","competition","providers","characters","thousands","apartments","generated","administrative","practices","reporting","essential","affiliate","immediately","designated","integrated","configuration","comprehensive","universal","presentation","languages","compliance","improvement","pennsylvania","challenge","acceptance","strategies","affiliates","multimedia","certified","computing","interactive","procedure","leadership","religious","breakfast","developer","approximately","recommendations","comparison","automatically","minnesota","adventure","institutions","assistant","advertisement","headlines","yesterday","determined","wholesale","extension","statements","completely","electrical","applicable","manufacturers","classical","dedicated","direction","basketball","wisconsin","personnel","identified","professionals","advantage","newsletters","estimated","anonymous","miscellaneous","integration","interview","framework","installed","massachusetts","associate","frequently","discussions","laboratory","destination","intelligence","specifications","tripadvisor","residential","decisions","industries","partnership","editorial","expression","provisions","principles","suggestions","replacement","strategic","economics","compatible","apartment","netherlands","consulting","recreation","participants","favorites","translation","estimates","protected","philadelphia","officials","contained","legislation","parameters","relationships","tennessee","representative","frequency","introduced","departments","residents","displayed","performed","administrator","addresses","permanent","agriculture","constitutes","portfolio","practical","delivered","collectibles","infrastructure","exclusive","originally","utilities","philosophy","regulation","reduction","nutrition","recording","secondary","wonderful","announced","prevention","mentioned","automatic","healthcare","maintained","increasing","connected","directors","participation","containing","combination","amendment","guaranteed","libraries","distributed","singapore","enterprises","convention","principal","certification","previously","buildings","household","batteries","positions","subscription","contemporary","panasonic","permalink","signature","provision","certainly","newspaper","liability","trademark","trackback","americans","promotion","conversion","reasonable","broadband","influence","importance","webmaster","prescription","specifically","represent","conservation","louisiana","javascript","marketplace","evolution","certificates","objectives","suggested","concerned","structures","encyclopedia","continuing","interracial","competitive","suppliers","preparation","receiving","accordance","discussed","elizabeth","reservations","playstation","instruction","annotation","differences","establish","expressed","paragraph","mathematics","compensation","conducted","percentage","mississippi","requested","connecticut","personals","immediate","agricultural","supporting","collections","participate","specialist","experienced","investigation","institution","searching","proceedings","transmission","characteristics","experiences","extremely","verzeichnis","contracts","concerning","developers","equivalent","chemistry","neighborhood","variables","continues","curriculum","psychology","responses","circumstances","identification","appliances","elementary","unlimited","printable","enforcement","hardcover","celebrity","chocolate","hampshire","bluetooth","controlled","requirement","authorities","representatives","pregnancy","biography","attractions","transactions","authorized","retirement","financing","efficiency","efficient","commitment","specialty","interviews","qualified","discovery","classified","confidence","lifestyle","consistent","clearance","connections","inventory","converter","organisation","objective","indicated","securities","volunteer","democratic","switzerland","parameter","processor","dimensions","contribute","challenges","recognition","submission","encourage","regulatory","inspection","consumers","territory","transaction","manchester","contributions","continuous","resulting","cambridge","initiative","execution","disability","increases","contractor","examination","indicates","committed","extensive","affordable","candidate","databases","outstanding","perspective","messenger","tournament","consideration","discounts","catalogue","publishers","caribbean","reservation","remaining","depending","expansion","purchased","performing","collected","absolutely","featuring","implement","scheduled","calculator","significantly","temporary","sufficient","awareness","vancouver","contribution","measurement","constitution","packaging","consultation","northwest","classroom","democracy","wallpaper","merchandise","resistance","baltimore","candidates","charlotte","biological","transition","preferences","instrument","classification","physician","hollywood","wikipedia","spiritual","photographs","relatively","satisfaction","represents","pittsburgh","preferred","intellectual","comfortable","interaction","listening","effectively","experimental","revolution","consolidation","landscape","dependent","mechanical","consultants","applicant","cooperation","acquisition","implemented","directories","recognized","notification","licensing","textbooks","diversity","cleveland","investments","accessibility","sensitive","templates","completion","universities","technique","contractors","subscriptions","calculate","alexander","broadcast","converted","anniversary","improvements","specification","accessible","accessory","typically","representation","arrangements","conferences","uniprotkb","consumption","birmingham","afternoon","consultant","controller","ownership","committees","legislative","researchers","unsubscribe","molecular","residence","attorneys","operators","sustainable","philippines","statistical","innovation","employers","definitions","elections","stainless","newspapers","hospitals","exception","successfully","indonesia","primarily","capabilities","recommendation","recruitment","organized","improving","expensive","organisations","explained","programmes","expertise","mechanism","jewellery","eventually","agreements","considering","innovative","conclusion","disorders","collaboration","detection","formation","engineers","proposals","moderator","tutorials","settlement","collectables","fantastic","governments","purchasing","appointed","operational","corresponding","descriptions","determination","animation","productions","telecommunications","instructor","approaches","highlights","designers","melbourne","scientists","blackjack","argentina","possibility","commissioner","dangerous","reliability","unfortunately","respectively","volunteers","attachment","appointment","workshops","hurricane","represented","mortgages","responsibilities","carefully","productivity","investors","underground","diagnosis","principle","vacations","calculated","appearance","incorporated","notebooks","algorithm","valentine","involving","investing","christopher","admission","terrorism","parliament","situations","allocated","corrections","structural","municipal","describes","disabilities","substance","prohibited","addressed","simulation","initiatives","concentration","interpretation","bankruptcy","optimization","substances","discovered","restrictions","participating","exhibition","composition","nationwide","definitely","existence","commentary","limousines","developments","immigration","destinations","necessarily","attribute","apparently","surrounding","mountains","popularity","postposted","coordinator","obviously","fundamental","substantial","progressive","championship","sacramento","impossible","depression","testimonials","memorabilia","cartridge","explanation","cincinnati","subsection","electricity","permitted","workplace","confirmed","wallpapers","infection","eligibility","involvement","placement","observations","vbulletin","subsequent","motorcycle","disclosure","establishment","presentations","undergraduate","occupation","donations","associations","citysearch","radiation","seriously","elsewhere","pollution","conservative","guestbook","effectiveness","demonstrate","atmosphere","experiment","purchases","federation","assignment","chemicals","everybody","nashville","counseling","acceptable","satisfied","measurements","milwaukee","medication","warehouse","shareware","violation","configure","stability","southwest","institutional","expectations","independence","metabolism","personally","excellence","somewhere","attributes","recognize","screening","thumbnail","forgotten","intelligent","edinburgh","obligation","regardless","restricted","republican","merchants","attendance","arguments","amsterdam","adventures","announcement","appreciate","regularly","mechanisms","customize","tradition","indicators","emissions","physicians","complaint","experiments","afghanistan","scholarship","governance","supplements","camcorder","implementing","ourselves","conversation","capability","producing","precision","contributed","reproduction","ingredients","franchise","complaints","promotions","rehabilitation","maintaining","environments","reception","correctly","consequences","geography","appearing","integrity","discrimination","processed","implications","functionality","intermediate","emotional","platforms","overnight","geographic","preliminary","districts","introduce","promotional","chevrolet","specialists","generator","suspension","correction","authentication","communicate","supplement","showtimes","promoting","machinery","bandwidth","probability","dimension","schedules","admissions","quarterly","illustrated","continental","alternate","achievement","limitations","automated","passenger","convenient","orientation","childhood","flexibility","jurisdiction","displaying","encouraged","cartridges","declaration","automation","advantages","preparing","recipient","extensions","athletics","southeast","alternatives","determining","personalized","conditioning","partnerships","destruction","increasingly","migration","basically","conventional","applicants","occupational","adjustment","treatments","camcorders","difficulty","collective","coalition","enrollment","producers","collector","interfaces","advertisers","representing","observation","restoration","convenience","returning","opposition","container","defendant","confirmation","supervisor","peripherals","bestsellers","departure","minneapolis","interactions","intervention","attraction","modification","customized","understood","assurance","happening","amendments","metropolitan","compilation","verification","attractive","recordings","jefferson","gardening","obligations","orchestra","polyphonic","outsourcing","adjustable","allocation","discipline","demonstrated","identifying","alphabetical","dispatched","installing","voluntary","photographer","messaging","constructed","additions","requiring","engagement","refinance","calendars","arrangement","conclusions","bibliography","compatibility","furthermore","cooperative","measuring","jacksonville","headquarters","transfers","transformation","attachments","administrators","personality","facilitate","subscriber","priorities","bookstore","parenting","incredible","commonwealth","pharmaceutical","manhattan","workforce","organizational","portuguese","everywhere","discharge","halloween","hazardous","methodology","housewares","reputation","resistant","democrats","recycling","qualifications","slideshow","variation","transferred","photograph","distributor","underlying","wrestling","photoshop","gathering","projection","mathematical","specialized","diagnostic","indianapolis","corporations","criticism","automobile","confidential","statutory","accommodations","northeast","downloaded","paintings","injection","yorkshire","populations","protective","initially","indicator","eliminate","sunglasses","preference","threshold","venezuela","exploration","sequences","astronomy","translate","announces","compression","establishing","constitutional","perfectly","instantly","litigation","submissions","broadcasting","horizontal","terrorist","informational","ecommerce","suffering","prospective","ultimately","artificial","spectacular","coordination","connector","affiliated","activation","naturally","subscribers","mitsubishi","underwear","potentially","constraints","inclusive","dimensional","considerable","selecting","processors","pantyhose","difficulties","complexity","constantly","barcelona","presidential","documentary","territories","palestinian","legislature","hospitality","procurement","theoretical","exercises","surveillance","protocols","highlight","substitute","inclusion","hopefully","brilliant","evaluated","assignments","termination","households","authentic","montgomery","architectural","louisville","macintosh","movements","amenities","virtually","authorization","projector","comparative","psychological","surprised","genealogy","expenditure","liverpool","connectivity","algorithms","similarly","collaborative","excluding","commander","suggestion","spotlight","investigate","connecting","logistics","proportion","significance","symposium","essentials","protecting","transmitted","screenshots","intensive","switching","correspondence","supervision","expenditures","separation","testimony","celebrities","mandatory","boundaries","syndication","celebration","filtering","luxembourg","offensive","deployment","colleagues","separated","directive","governing","retailers","occasionally","attending","recruiting","instructional","traveling","permissions","biotechnology","prescribed","catherine","reproduced","calculation","consolidated","occasions","equations","exceptional","respondents","considerations","queensland","musicians","composite","unavailable","essentially","designing","assessments","brunswick","sensitivity","preservation","streaming","intensity","technological","syndicate","antivirus","addressing","discounted","bangladesh","constitute","concluded","desperate","demonstration","governmental","manufactured","graduation","variations","addiction","springfield","synthesis","undefined","unemployment","enhancement","newcastle","performances","societies","brazilian","identical","petroleum","norwegian","retention","exchanges","soundtrack","wondering","profession","separately","physiology","collecting","participant","scholarships","recreational","dominican","friendship","expanding","provincial","investigations","medications","rochester","advertiser","encryption","downloadable","sophisticated","possession","laboratories","vegetables","thumbnails","stockings","respondent","destroyed","manufacture","wordpress","vulnerability","accountability","celebrate","accredited","appliance","compressed","scheduling","perspectives","mortality","christians","therapeutic","impressive","accordingly","architect","challenging","microwave","accidents","relocation","contributors","violations","temperatures","competitions","discretion","cosmetics","repository","concentrations","christianity","negotiations","realistic","generating","christina","congressional","photographic","modifications","millennium","achieving","fisheries","exceptions","reactions","macromedia","companion","divisions","additionally","fellowship","victorian","copyrights","lithuania","mastercard","chronicles","obtaining","distribute","decorative","enlargement","campaigns","conjunction","instances","indigenous","validation","corruption","incentives","cholesterol","differential","scientist","starsmerchant","arthritis","nevertheless","practitioners","transcript","inflation","compounds","contracting","structured","reasonably","graduates","recommends","controlling","distributors","arlington","particles","extraordinary","indicating","coordinate","exclusively","limitation","widescreen","illustration","construct","inquiries","inspiration","affecting","downloading","aggregate","forecasts","complicated","shopzilla","decorating","expressions","shakespeare","connectors","conflicts","travelers","offerings","incorrect","furnishings","guatemala","perception","renaissance","pathology","ordinance","photographers","infections","configured","festivals","possibilities","contributing","analytical","circulation","assumption","jerusalem","transexuales","invention","technician","executives","enquiries","cognitive","exploring","registrar","supporters","withdrawal","predicted","saskatchewan","cancellation","ministers","veterinary","prostores","relevance","incentive","butterfly","mechanics","numerical","reflection","accompanied","invitation","princeton","spirituality","meanwhile","proprietary","childrens","thumbzilla","porcelain","pichunter","translated","columnists","consensus","delivering","journalism","intention","undertaken","statewide","semiconductor","illustrations","happiness","substantially","identifier","calculations","conducting","accomplished","calculators","impression","correlation","fragrance","neighbors","transparent","charleston","champions","selections","projectors","inappropriate","comparing","vocational","pharmacies","introducing","appreciated","albuquerque","distinguished","projected","assumptions","shareholders","developmental","regulated","anticipated","completing","comparable","confusion","copyrighted","warranties","documented","paperbacks","keyboards","vulnerable","reflected","respiratory","notifications","transexual","mainstream","evaluating","subcommittee","maternity","journalists","foundations","volleyball","liabilities","decreased","tolerance","creativity","describing","lightning","quotations","inspector","bookmarks","behavioral","riverside","bathrooms","abilities","initiated","nonprofit","lancaster","suspended","containers","attitudes","simultaneously","integrate","sociology","screenshot","exhibitions","confident","retrieved","officially","consortium","recipients","delicious","traditions","periodically","hungarian","referring","transform","educators","vegetable","humanities","independently","alignment","henderson","britannica","competitors","visibility","consciousness","encounter","resolutions","accessing","attempted","witnesses","administered","strengthen","frederick","aggressive","advertisements","sublimedirectory","disturbed","determines","sculpture","motivation","pharmacology","passengers","quantities","petersburg","consistently","powerpoint","obituaries","punishment","appreciation","subsequently","providence","restriction","incorporate","backgrounds","treasurer","lightweight","transcription","complications","scripting","remembered","synthetic","testament","specifics","partially","wilderness","generations","tournaments","sponsorship","headphones","proceeding","volkswagen","uncertainty","breakdown","reconstruction","subsidiary","strengths","encouraging","furnished","terrorists","comparisons","beneficial","distributions","viewpicture","threatened","republicans","discusses","responded","abstracts","prediction","pharmaceuticals","thesaurus","individually","battlefield","literally","ecological","appraisal","consisting","submitting","citations","geographical","mozambique","disclaimers","championships","sheffield","finishing","wellington","prospects","bulgarian","aboriginal","remarkable","preventing","productive","boulevard","compliant","penalties","imagination","refurbished","activated","conferencing","armstrong","politicians","trackbacks","accommodate","christine","accepting","precipitation","isolation","sustained","approximate","programmer","greetings","inherited","incomplete","chronicle","legitimate","biographies","investigator","plaintiff","prisoners","mediterranean","nightlife","architects","entrepreneur","freelance","excessive","screensaver","valuation","unexpected","cigarette","characteristic","metallica","consequently","appointments","narrative","academics","quantitative","screensavers","subdivision","distinction","livestock","exemption","sustainability","formatting","nutritional","nicaragua","affiliation","relatives","satisfactory","revolutionary","bracelets","telephony","breathing","thickness","adjustments","graphical","discussing","aerospace","meaningful","maintains","shortcuts","voyeurweb","extending","specifies","accreditation","blackberry","meditation","microphone","macedonia","combining","instrumental","organizing","moderators","kazakhstan","standings","partition","invisible","translations","commodity","kilometers","thanksgiving","guarantees","indication","congratulations","cigarettes","controllers","consultancy","conventions","coordinates","responding","physically","stakeholders","hydrocodone","consecutive","attempting","representations","competing","peninsula","accurately","considers","ministries","vacancies","parliamentary","acknowledge","thoroughly","nottingham","identifies","questionnaire","qualification","modelling","miniature","interstate","consequence","systematic","perceived","madagascar","presenting","troubleshooting","uzbekistan","centuries","magnitude","richardson","fragrances","vocabulary","earthquake","fundraising","geological","assessing","introduces","webmasters","computational","acdbentity","participated","handhelds","answering","impressed","conspiracy","organizer","combinations","preceding","cumulative","amplifier","arbitrary","prominent","lexington","contacted","recorders","occasional","innovations","postcards","reviewing","explicitly","transsexual","citizenship","informative","girlfriend","bloomberg","hierarchy","influenced","abandoned","complement","mauritius","checklist","requesting","lauderdale","scenarios","extraction","elevation","utilization","beverages","calibration","efficiently","entertaining","prerequisite","hypothesis","medicines","regression","enhancements","renewable","intersection","passwords","consistency","collectors","azerbaijan","astrology","occurring","supplemental","travelling","induction","precisely","spreading","provinces","widespread","incidence","incidents","enhancing","interference","palestine","listprice","atmospheric","knowledgestorm","referenced","publicity","proposition","allowance","designation","duplicate","criterion","civilization","vietnamese","tremendous","corrected","encountered","internationally","surrounded","creatures","commented","accomplish","vegetarian","newfoundland","investigated","ambassador","stephanie","contacting","vegetation","findarticles","specially","infectious","continuity","phenomenon","conscious","referrals","differently","integrating","revisions","reasoning","charitable","annotated","convinced","burlington","replacing","researcher","watershed","occupations","acknowledged","equilibrium","characterized","privilege","qualifying","estimation","pediatric","techrepublic","institutes","brochures","traveller","appropriations","suspected","benchmark","beginners","instructors","highlighted","stationery","unauthorized","competent","contributor","demonstrates","gradually","desirable","journalist","afterwards","religions","explosion","signatures","disciplines","daughters","conversations","simplified","motherboard","bibliographic","champagne","deviation","superintendent","housewives","influences","inspections","irrigation","hydraulic","robertson","penetration","conviction","omissions","retrieval","qualities","prototype","importantly","apparatus","explaining","nomination","empirical","dependence","sexuality","polyester","commitments","suggesting","remainder","privileges","televisions","specializing","commodities","motorcycles","concentrate","reproductive","molecules","refrigerator","intervals","sentences","exclusion","workstation","holocaust","receivers","disposition","navigator","investigators","marijuana","cathedral","fairfield","fascinating","landscapes","lafayette","computation","cardiovascular","salvation","predictions","accompanying","selective","arbitration","configuring","editorials","sacrifice","removable","convergence","gibraltar","anthropology","malpractice","reporters","necessity","rendering","hepatitis","nationally","waterproof","specialties","humanitarian","invitations","functioning","economies","alexandria","bacterial","undertake","continuously","achievements","convertible","secretariat","paragraphs","adolescent","nominations","cancelled","introductory","reservoir","occurrence","worcester","demographic","disciplinary","respected","portraits","interpreted","evaluations","elimination","hypothetical","immigrants","complimentary","helicopter","performer","commissions","powerseller","graduated","surprising","unnecessary","dramatically","yugoslavia","characterization","likelihood","fundamentals","contamination","endangered","compromise","expiration","namespace","peripheral","negotiation","opponents","nominated","confidentiality","electoral","changelog","alternatively","greensboro","controversial","recovered","upgrading","frontpage","demanding","defensive","forbidden","programmers","monitored","installations","deutschland","practitioner","motivated","smithsonian","examining","revelation","delegation","dictionaries","greenhouse","transparency","currencies","survivors","positioning","descending","temporarily","frequencies","reflections","municipality","detective","experiencing","fireplace","endorsement","psychiatry","persistent","summaries","looksmart","magnificent","colleague","adaptation","paintball","enclosure","supervisors","westminster","distances","absorption","treasures","transcripts","disappointed","continually","communist","collectible","entrepreneurs","creations","acquisitions","biodiversity","excitement","presently","mysterious","librarian","subsidiaries","stockholm","indonesian","therapist","promising","relaxation","thereafter","commissioners","forwarding","nightmare","reductions","southampton","organisms","telescope","portsmouth","advancement","harassment","generators","generates","replication","inexpensive","receptors","interventions","huntington","internship","aluminium","snowboard","beastality","evanescence","coordinated","shipments","antarctica","chancellor","controversy","legendary","beautifully","antibodies","examinations","immunology","departmental","terminology","gentleman","reproduce","convicted","roommates","threatening","spokesman","activists","frankfurt","encourages","assembled","restructuring","terminals","simulations","sufficiently","conditional","crossword","conceptual","liechtenstein","translator","automobiles","continent","longitude","challenged","telecharger","insertion","instrumentation","constraint","groundwater","strengthening","insulation","infringement","subjective","swaziland","varieties","mediawiki","configurations"];class fz extends wm{constructor(e,t){super(t),this.__uuid=e}static clone(e){return new fz(e.__key)}static getType(){return"autocomplete"}static importJSON(e){return gz(e.uuid)}exportJSON(){return{...super.exportJSON(),type:"autocomplete",uuid:this.__uuid,version:1}}updateDOM(e,t,n){return!1}createDOM(e){return document.createElement("span")}decorate(){return this.__uuid!==cz?null:Jb(mz,{})}}function gz(e){return new fz(e)}function mz(){const[e]=a_(),t=window.navigator.userAgentData,n=void 0!==t?t.mobile:window.innerWidth<=800&&window.innerHeight<=600;return Xb("span",{style:{color:"#ccc"},spellCheck:"false",children:[e," ",n?"(SWIPE ⮕)":"(TAB)"]})}class yz extends Hm{constructor(e,t,n){super(t,n),this.__className=e}static getType(){return"emoji"}static clone(e){return new yz(e.__className,e.__text,e.__key)}createDOM(e){const t=document.createElement("span"),n=super.createDOM(e);return t.className=this.__className,n.className="emoji-inner",t.appendChild(n),t}updateDOM(e,t,n){const r=t.firstChild;return null===r||(super.updateDOM(e,r,n),!1)}static importJSON(e){const t=vz(e.className,e.text);return t.setFormat(e.format),t.setDetail(e.detail),t.setMode(e.mode),t.setStyle(e.style),t}exportJSON(){return{...super.exportJSON(),className:this.getClassName(),type:"emoji"}}getClassName(){return this.getLatest().__className}}function vz(e,t){const n=new yz(e,t).setMode("token");return Ug(n)}const bz={},_z=function(e,t){return t&&0!==t.length?Promise.all(t.map((e=>{if((e=`/${e}`)in bz)return;bz[e]=!0;const t=e.endsWith(".css"),n=t?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${n}`))return;const r=document.createElement("link");return r.rel=t?"stylesheet":"modulepreload",t||(r.as="script",r.crossOrigin=""),r.href=e,document.head.appendChild(r),t?new Promise(((t,n)=>{r.addEventListener("load",t),r.addEventListener("error",(()=>n(new Error(`Unable to preload CSS for ${e}`))))})):void 0}))).then((()=>e())):e()};class wz{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new wz(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class xz{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new xz(t,wz.range(this,e))}}class Sz{constructor(e,t){this.position=void 0;var n,r="KaTeX parse error: "+e,i=t&&t.loc;if(i&&i.start<=i.end){var o=i.lexer.input;n=i.start;var a=i.end;n===o.length?r+=" at end of input: ":r+=" at position "+(n+1)+": ";var s=o.slice(n,a).replace(/[^]/g,"$&̲");r+=(n>15?"…"+o.slice(n-15,n):o.slice(0,n))+s+(a+15<o.length?o.slice(a,a+15)+"…":o.slice(a))}var l=new Error(r);return l.name="ParseError",l.__proto__=Sz.prototype,l.position=n,l}}Sz.prototype.__proto__=Error.prototype;var Cz=/([A-Z])/g,Ez={"&":"&",">":">","<":"<",'"':""","'":"'"},Tz=/[&><"']/g;var kz=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},Nz={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(Tz,(e=>Ez[e]))},hyphenate:function(e){return e.replace(Cz,"-$1").toLowerCase()},getBaseElem:kz,isCharacterBox:function(e){var t=kz(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},protocolFromUrl:function(e){var t=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(e);return null!=t?t[1]:"_relative"}},Az={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function Oz(e){if(e.default)return e.default;var t=e.type,n=Array.isArray(t)?t[0]:t;if("string"!=typeof n)return n.enum[0];switch(n){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class Mz{constructor(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},Az)if(Az.hasOwnProperty(t)){var n=Az[t];this[t]=void 0!==e[t]?n.processor?n.processor(e[t]):e[t]:Oz(n)}}reportNonstrict(e,t,n){var r=this.strict;if("function"==typeof r&&(r=r(e,t,n)),r&&"ignore"!==r){if(!0===r||"error"===r)throw new Sz("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",n);"warn"===r?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,n){var r=this.strict;if("function"==typeof r)try{r=r(e,t,n)}catch(aZ){r="error"}return!(!r||"ignore"===r)&&(!0===r||"error"===r||("warn"===r?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]"),!1)))}isTrusted(e){e.url&&!e.protocol&&(e.protocol=Nz.protocolFromUrl(e.url));var t="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(t)}}class Rz{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return Dz[Iz[this.id]]}sub(){return Dz[Pz[this.id]]}fracNum(){return Dz[Lz[this.id]]}fracDen(){return Dz[Bz[this.id]]}cramp(){return Dz[$z[this.id]]}text(){return Dz[zz[this.id]]}isTight(){return this.size>=2}}var Dz=[new Rz(0,0,!1),new Rz(1,0,!0),new Rz(2,1,!1),new Rz(3,1,!0),new Rz(4,2,!1),new Rz(5,2,!0),new Rz(6,3,!1),new Rz(7,3,!0)],Iz=[4,5,4,5,6,7,6,7],Pz=[5,5,5,5,7,7,7,7],Lz=[2,3,4,5,6,7,6,7],Bz=[3,3,5,5,7,7,7,7],$z=[1,1,3,3,5,5,7,7],zz=[0,1,2,3,2,3,2,3],Fz={DISPLAY:Dz[0],TEXT:Dz[2],SCRIPT:Dz[4],SCRIPTSCRIPT:Dz[6]},Uz=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];var Hz=[];function Vz(e){for(var t=0;t<Hz.length;t+=2)if(e>=Hz[t]&&e<=Hz[t+1])return!0;return!1}Uz.forEach((e=>e.blocks.forEach((e=>Hz.push(...e)))));var qz={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class Kz{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return Nz.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map((e=>e.toText())).join("")}}var Wz={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},jz={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Yz={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"};function Gz(e,t,n){if(!Wz[t])throw new Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),i=Wz[t][r];if(!i&&e[0]in Yz&&(r=Yz[e[0]].charCodeAt(0),i=Wz[t][r]),i||"text"!==n||Vz(r)&&(i=Wz[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var Jz={};var Xz=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Zz=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Qz=function(e,t){return t.size<2?e:Xz[e-1][t.size-1]};class eF{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||eF.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=Zz[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return new eF(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Qz(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:Zz[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Qz(eF.BASESIZE,e);return this.size===t&&this.textSize===eF.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==eF.BASESIZE?["sizing","reset-size"+this.size,"size"+eF.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!Jz[t=e>=5?0:e>=3?1:2]){var n=Jz[t]={cssEmPerMu:jz.quad[t]/18};for(var r in jz)jz.hasOwnProperty(r)&&(n[r]=jz[r][t])}return Jz[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}eF.BASESIZE=6;var tF={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},nF={ex:!0,em:!0,mu:!0},rF=function(e){return"string"!=typeof e&&(e=e.unit),e in tF||e in nF||"ex"===e},iF=function(e,t){var n;if(e.unit in tF)n=tF[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)n=t.fontMetrics().cssEmPerMu;else{var r;if(r=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)n=r.fontMetrics().xHeight;else{if("em"!==e.unit)throw new Sz("Invalid unit: '"+e.unit+"'");n=r.fontMetrics().quad}r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},oF=function(e){return+e.toFixed(4)+"em"},aF=function(e){return e.filter((e=>e)).join(" ")},sF=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push("mtight");var r=t.getColor();r&&(this.style.color=r)}},lF=function(e){var t=document.createElement(e);for(var n in t.className=aF(this.classes),this.style)this.style.hasOwnProperty(n)&&(t.style[n]=this.style[n]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&t.setAttribute(r,this.attributes[r]);for(var i=0;i<this.children.length;i++)t.appendChild(this.children[i].toNode());return t},cF=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+Nz.escape(aF(this.classes))+'"');var n="";for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=Nz.hyphenate(r)+":"+this.style[r]+";");for(var i in n&&(t+=' style="'+Nz.escape(n)+'"'),this.attributes)this.attributes.hasOwnProperty(i)&&(t+=" "+i+'="'+Nz.escape(this.attributes[i])+'"');t+=">";for(var o=0;o<this.children.length;o++)t+=this.children[o].toMarkup();return t+="</"+e+">"};class uF{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,sF.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Nz.contains(this.classes,e)}toNode(){return lF.call(this,"span")}toMarkup(){return cF.call(this,"span")}}class dF{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,sF.call(this,t,r),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Nz.contains(this.classes,e)}toNode(){return lF.call(this,"a")}toMarkup(){return cF.call(this,"a")}}class hF{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=n}hasClass(e){return Nz.contains(this.classes,e)}toNode(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e="<img src='"+this.src+" 'alt='"+this.alt+"' ",t="";for(var n in this.style)this.style.hasOwnProperty(n)&&(t+=Nz.hyphenate(n)+":"+this.style[n]+";");return t&&(e+=' style="'+Nz.escape(t)+'"'),e+="'/>"}}var pF={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"};class fF{constructor(e,t,n,r,i,o,a,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=i||0,this.width=o||0,this.classes=a||[],this.style=s||{},this.maxFontSize=0;var l=function(e){for(var t=0;t<Uz.length;t++)for(var n=Uz[t],r=0;r<n.blocks.length;r++){var i=n.blocks[r];if(e>=i[0]&&e<=i[1])return n.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=pF[this.text])}hasClass(e){return Nz.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),t=null;for(var n in this.italic>0&&((t=document.createElement("span")).style.marginRight=oF(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=aF(this.classes)),this.style)this.style.hasOwnProperty(n)&&((t=t||document.createElement("span")).style[n]=this.style[n]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=Nz.escape(aF(this.classes)),t+='"');var n="";for(var r in this.italic>0&&(n+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(r)&&(n+=Nz.hyphenate(r)+":"+this.style[r]+";");n&&(e=!0,t+=' style="'+Nz.escape(n)+'"');var i=Nz.escape(this.text);return e?(t+=">",t+=i,t+="</span>"):i}}class gF{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+"='"+this.attributes[t]+"'");e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</svg>"}}class mF{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",qz[this.pathName]),e}toMarkup(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+qz[this.pathName]+"'/>"}}class yF{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e="<line";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+"='"+this.attributes[t]+"'");return e+="/>"}}function vF(e){if(e instanceof fF)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}var bF={bin:1,close:1,inner:1,open:1,punct:1,rel:1},_F={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},wF={math:{},text:{}};function xF(e,t,n,r,i,o){wF[e][i]={font:t,group:n,replace:r},o&&r&&(wF[e][r]=wF[e][i])}var SF="math",CF="text",EF="main",TF="ams",kF="accent-token",NF="bin",AF="close",OF="mathord",MF="op-token",RF="open",DF="rel",IF="textord";xF(SF,EF,DF,"≡","\\equiv",!0),xF(SF,EF,DF,"≺","\\prec",!0),xF(SF,EF,DF,"≻","\\succ",!0),xF(SF,EF,DF,"∼","\\sim",!0),xF(SF,EF,DF,"⊥","\\perp"),xF(SF,EF,DF,"⪯","\\preceq",!0),xF(SF,EF,DF,"⪰","\\succeq",!0),xF(SF,EF,DF,"≃","\\simeq",!0),xF(SF,EF,DF,"∣","\\mid",!0),xF(SF,EF,DF,"≪","\\ll",!0),xF(SF,EF,DF,"≫","\\gg",!0),xF(SF,EF,DF,"≍","\\asymp",!0),xF(SF,EF,DF,"∥","\\parallel"),xF(SF,EF,DF,"⋈","\\bowtie",!0),xF(SF,EF,DF,"⌣","\\smile",!0),xF(SF,EF,DF,"⊑","\\sqsubseteq",!0),xF(SF,EF,DF,"⊒","\\sqsupseteq",!0),xF(SF,EF,DF,"≐","\\doteq",!0),xF(SF,EF,DF,"⌢","\\frown",!0),xF(SF,EF,DF,"∋","\\ni",!0),xF(SF,EF,DF,"∝","\\propto",!0),xF(SF,EF,DF,"⊢","\\vdash",!0),xF(SF,EF,DF,"⊣","\\dashv",!0),xF(SF,EF,DF,"∋","\\owns"),xF(SF,EF,"punct",".","\\ldotp"),xF(SF,EF,"punct","⋅","\\cdotp"),xF(SF,EF,IF,"#","\\#"),xF(CF,EF,IF,"#","\\#"),xF(SF,EF,IF,"&","\\&"),xF(CF,EF,IF,"&","\\&"),xF(SF,EF,IF,"ℵ","\\aleph",!0),xF(SF,EF,IF,"∀","\\forall",!0),xF(SF,EF,IF,"ℏ","\\hbar",!0),xF(SF,EF,IF,"∃","\\exists",!0),xF(SF,EF,IF,"∇","\\nabla",!0),xF(SF,EF,IF,"♭","\\flat",!0),xF(SF,EF,IF,"ℓ","\\ell",!0),xF(SF,EF,IF,"♮","\\natural",!0),xF(SF,EF,IF,"♣","\\clubsuit",!0),xF(SF,EF,IF,"℘","\\wp",!0),xF(SF,EF,IF,"♯","\\sharp",!0),xF(SF,EF,IF,"♢","\\diamondsuit",!0),xF(SF,EF,IF,"ℜ","\\Re",!0),xF(SF,EF,IF,"♡","\\heartsuit",!0),xF(SF,EF,IF,"ℑ","\\Im",!0),xF(SF,EF,IF,"♠","\\spadesuit",!0),xF(SF,EF,IF,"§","\\S",!0),xF(CF,EF,IF,"§","\\S"),xF(SF,EF,IF,"¶","\\P",!0),xF(CF,EF,IF,"¶","\\P"),xF(SF,EF,IF,"†","\\dag"),xF(CF,EF,IF,"†","\\dag"),xF(CF,EF,IF,"†","\\textdagger"),xF(SF,EF,IF,"‡","\\ddag"),xF(CF,EF,IF,"‡","\\ddag"),xF(CF,EF,IF,"‡","\\textdaggerdbl"),xF(SF,EF,AF,"⎱","\\rmoustache",!0),xF(SF,EF,RF,"⎰","\\lmoustache",!0),xF(SF,EF,AF,"⟯","\\rgroup",!0),xF(SF,EF,RF,"⟮","\\lgroup",!0),xF(SF,EF,NF,"∓","\\mp",!0),xF(SF,EF,NF,"⊖","\\ominus",!0),xF(SF,EF,NF,"⊎","\\uplus",!0),xF(SF,EF,NF,"⊓","\\sqcap",!0),xF(SF,EF,NF,"∗","\\ast"),xF(SF,EF,NF,"⊔","\\sqcup",!0),xF(SF,EF,NF,"◯","\\bigcirc",!0),xF(SF,EF,NF,"∙","\\bullet",!0),xF(SF,EF,NF,"‡","\\ddagger"),xF(SF,EF,NF,"≀","\\wr",!0),xF(SF,EF,NF,"⨿","\\amalg"),xF(SF,EF,NF,"&","\\And"),xF(SF,EF,DF,"⟵","\\longleftarrow",!0),xF(SF,EF,DF,"⇐","\\Leftarrow",!0),xF(SF,EF,DF,"⟸","\\Longleftarrow",!0),xF(SF,EF,DF,"⟶","\\longrightarrow",!0),xF(SF,EF,DF,"⇒","\\Rightarrow",!0),xF(SF,EF,DF,"⟹","\\Longrightarrow",!0),xF(SF,EF,DF,"↔","\\leftrightarrow",!0),xF(SF,EF,DF,"⟷","\\longleftrightarrow",!0),xF(SF,EF,DF,"⇔","\\Leftrightarrow",!0),xF(SF,EF,DF,"⟺","\\Longleftrightarrow",!0),xF(SF,EF,DF,"↦","\\mapsto",!0),xF(SF,EF,DF,"⟼","\\longmapsto",!0),xF(SF,EF,DF,"↗","\\nearrow",!0),xF(SF,EF,DF,"↩","\\hookleftarrow",!0),xF(SF,EF,DF,"↪","\\hookrightarrow",!0),xF(SF,EF,DF,"↘","\\searrow",!0),xF(SF,EF,DF,"↼","\\leftharpoonup",!0),xF(SF,EF,DF,"⇀","\\rightharpoonup",!0),xF(SF,EF,DF,"↙","\\swarrow",!0),xF(SF,EF,DF,"↽","\\leftharpoondown",!0),xF(SF,EF,DF,"⇁","\\rightharpoondown",!0),xF(SF,EF,DF,"↖","\\nwarrow",!0),xF(SF,EF,DF,"⇌","\\rightleftharpoons",!0),xF(SF,TF,DF,"≮","\\nless",!0),xF(SF,TF,DF,"","\\@nleqslant"),xF(SF,TF,DF,"","\\@nleqq"),xF(SF,TF,DF,"⪇","\\lneq",!0),xF(SF,TF,DF,"≨","\\lneqq",!0),xF(SF,TF,DF,"","\\@lvertneqq"),xF(SF,TF,DF,"⋦","\\lnsim",!0),xF(SF,TF,DF,"⪉","\\lnapprox",!0),xF(SF,TF,DF,"⊀","\\nprec",!0),xF(SF,TF,DF,"⋠","\\npreceq",!0),xF(SF,TF,DF,"⋨","\\precnsim",!0),xF(SF,TF,DF,"⪹","\\precnapprox",!0),xF(SF,TF,DF,"≁","\\nsim",!0),xF(SF,TF,DF,"","\\@nshortmid"),xF(SF,TF,DF,"∤","\\nmid",!0),xF(SF,TF,DF,"⊬","\\nvdash",!0),xF(SF,TF,DF,"⊭","\\nvDash",!0),xF(SF,TF,DF,"⋪","\\ntriangleleft"),xF(SF,TF,DF,"⋬","\\ntrianglelefteq",!0),xF(SF,TF,DF,"⊊","\\subsetneq",!0),xF(SF,TF,DF,"","\\@varsubsetneq"),xF(SF,TF,DF,"⫋","\\subsetneqq",!0),xF(SF,TF,DF,"","\\@varsubsetneqq"),xF(SF,TF,DF,"≯","\\ngtr",!0),xF(SF,TF,DF,"","\\@ngeqslant"),xF(SF,TF,DF,"","\\@ngeqq"),xF(SF,TF,DF,"⪈","\\gneq",!0),xF(SF,TF,DF,"≩","\\gneqq",!0),xF(SF,TF,DF,"","\\@gvertneqq"),xF(SF,TF,DF,"⋧","\\gnsim",!0),xF(SF,TF,DF,"⪊","\\gnapprox",!0),xF(SF,TF,DF,"⊁","\\nsucc",!0),xF(SF,TF,DF,"⋡","\\nsucceq",!0),xF(SF,TF,DF,"⋩","\\succnsim",!0),xF(SF,TF,DF,"⪺","\\succnapprox",!0),xF(SF,TF,DF,"≆","\\ncong",!0),xF(SF,TF,DF,"","\\@nshortparallel"),xF(SF,TF,DF,"∦","\\nparallel",!0),xF(SF,TF,DF,"⊯","\\nVDash",!0),xF(SF,TF,DF,"⋫","\\ntriangleright"),xF(SF,TF,DF,"⋭","\\ntrianglerighteq",!0),xF(SF,TF,DF,"","\\@nsupseteqq"),xF(SF,TF,DF,"⊋","\\supsetneq",!0),xF(SF,TF,DF,"","\\@varsupsetneq"),xF(SF,TF,DF,"⫌","\\supsetneqq",!0),xF(SF,TF,DF,"","\\@varsupsetneqq"),xF(SF,TF,DF,"⊮","\\nVdash",!0),xF(SF,TF,DF,"⪵","\\precneqq",!0),xF(SF,TF,DF,"⪶","\\succneqq",!0),xF(SF,TF,DF,"","\\@nsubseteqq"),xF(SF,TF,NF,"⊴","\\unlhd"),xF(SF,TF,NF,"⊵","\\unrhd"),xF(SF,TF,DF,"↚","\\nleftarrow",!0),xF(SF,TF,DF,"↛","\\nrightarrow",!0),xF(SF,TF,DF,"⇍","\\nLeftarrow",!0),xF(SF,TF,DF,"⇏","\\nRightarrow",!0),xF(SF,TF,DF,"↮","\\nleftrightarrow",!0),xF(SF,TF,DF,"⇎","\\nLeftrightarrow",!0),xF(SF,TF,DF,"△","\\vartriangle"),xF(SF,TF,IF,"ℏ","\\hslash"),xF(SF,TF,IF,"▽","\\triangledown"),xF(SF,TF,IF,"◊","\\lozenge"),xF(SF,TF,IF,"Ⓢ","\\circledS"),xF(SF,TF,IF,"®","\\circledR"),xF(CF,TF,IF,"®","\\circledR"),xF(SF,TF,IF,"∡","\\measuredangle",!0),xF(SF,TF,IF,"∄","\\nexists"),xF(SF,TF,IF,"℧","\\mho"),xF(SF,TF,IF,"Ⅎ","\\Finv",!0),xF(SF,TF,IF,"⅁","\\Game",!0),xF(SF,TF,IF,"‵","\\backprime"),xF(SF,TF,IF,"▲","\\blacktriangle"),xF(SF,TF,IF,"▼","\\blacktriangledown"),xF(SF,TF,IF,"■","\\blacksquare"),xF(SF,TF,IF,"⧫","\\blacklozenge"),xF(SF,TF,IF,"★","\\bigstar"),xF(SF,TF,IF,"∢","\\sphericalangle",!0),xF(SF,TF,IF,"∁","\\complement",!0),xF(SF,TF,IF,"ð","\\eth",!0),xF(CF,EF,IF,"ð","ð"),xF(SF,TF,IF,"╱","\\diagup"),xF(SF,TF,IF,"╲","\\diagdown"),xF(SF,TF,IF,"□","\\square"),xF(SF,TF,IF,"□","\\Box"),xF(SF,TF,IF,"◊","\\Diamond"),xF(SF,TF,IF,"¥","\\yen",!0),xF(CF,TF,IF,"¥","\\yen",!0),xF(SF,TF,IF,"✓","\\checkmark",!0),xF(CF,TF,IF,"✓","\\checkmark"),xF(SF,TF,IF,"ℶ","\\beth",!0),xF(SF,TF,IF,"ℸ","\\daleth",!0),xF(SF,TF,IF,"ℷ","\\gimel",!0),xF(SF,TF,IF,"ϝ","\\digamma",!0),xF(SF,TF,IF,"ϰ","\\varkappa"),xF(SF,TF,RF,"┌","\\@ulcorner",!0),xF(SF,TF,AF,"┐","\\@urcorner",!0),xF(SF,TF,RF,"└","\\@llcorner",!0),xF(SF,TF,AF,"┘","\\@lrcorner",!0),xF(SF,TF,DF,"≦","\\leqq",!0),xF(SF,TF,DF,"⩽","\\leqslant",!0),xF(SF,TF,DF,"⪕","\\eqslantless",!0),xF(SF,TF,DF,"≲","\\lesssim",!0),xF(SF,TF,DF,"⪅","\\lessapprox",!0),xF(SF,TF,DF,"≊","\\approxeq",!0),xF(SF,TF,NF,"⋖","\\lessdot"),xF(SF,TF,DF,"⋘","\\lll",!0),xF(SF,TF,DF,"≶","\\lessgtr",!0),xF(SF,TF,DF,"⋚","\\lesseqgtr",!0),xF(SF,TF,DF,"⪋","\\lesseqqgtr",!0),xF(SF,TF,DF,"≑","\\doteqdot"),xF(SF,TF,DF,"≓","\\risingdotseq",!0),xF(SF,TF,DF,"≒","\\fallingdotseq",!0),xF(SF,TF,DF,"∽","\\backsim",!0),xF(SF,TF,DF,"⋍","\\backsimeq",!0),xF(SF,TF,DF,"⫅","\\subseteqq",!0),xF(SF,TF,DF,"⋐","\\Subset",!0),xF(SF,TF,DF,"⊏","\\sqsubset",!0),xF(SF,TF,DF,"≼","\\preccurlyeq",!0),xF(SF,TF,DF,"⋞","\\curlyeqprec",!0),xF(SF,TF,DF,"≾","\\precsim",!0),xF(SF,TF,DF,"⪷","\\precapprox",!0),xF(SF,TF,DF,"⊲","\\vartriangleleft"),xF(SF,TF,DF,"⊴","\\trianglelefteq"),xF(SF,TF,DF,"⊨","\\vDash",!0),xF(SF,TF,DF,"⊪","\\Vvdash",!0),xF(SF,TF,DF,"⌣","\\smallsmile"),xF(SF,TF,DF,"⌢","\\smallfrown"),xF(SF,TF,DF,"≏","\\bumpeq",!0),xF(SF,TF,DF,"≎","\\Bumpeq",!0),xF(SF,TF,DF,"≧","\\geqq",!0),xF(SF,TF,DF,"⩾","\\geqslant",!0),xF(SF,TF,DF,"⪖","\\eqslantgtr",!0),xF(SF,TF,DF,"≳","\\gtrsim",!0),xF(SF,TF,DF,"⪆","\\gtrapprox",!0),xF(SF,TF,NF,"⋗","\\gtrdot"),xF(SF,TF,DF,"⋙","\\ggg",!0),xF(SF,TF,DF,"≷","\\gtrless",!0),xF(SF,TF,DF,"⋛","\\gtreqless",!0),xF(SF,TF,DF,"⪌","\\gtreqqless",!0),xF(SF,TF,DF,"≖","\\eqcirc",!0),xF(SF,TF,DF,"≗","\\circeq",!0),xF(SF,TF,DF,"≜","\\triangleq",!0),xF(SF,TF,DF,"∼","\\thicksim"),xF(SF,TF,DF,"≈","\\thickapprox"),xF(SF,TF,DF,"⫆","\\supseteqq",!0),xF(SF,TF,DF,"⋑","\\Supset",!0),xF(SF,TF,DF,"⊐","\\sqsupset",!0),xF(SF,TF,DF,"≽","\\succcurlyeq",!0),xF(SF,TF,DF,"⋟","\\curlyeqsucc",!0),xF(SF,TF,DF,"≿","\\succsim",!0),xF(SF,TF,DF,"⪸","\\succapprox",!0),xF(SF,TF,DF,"⊳","\\vartriangleright"),xF(SF,TF,DF,"⊵","\\trianglerighteq"),xF(SF,TF,DF,"⊩","\\Vdash",!0),xF(SF,TF,DF,"∣","\\shortmid"),xF(SF,TF,DF,"∥","\\shortparallel"),xF(SF,TF,DF,"≬","\\between",!0),xF(SF,TF,DF,"⋔","\\pitchfork",!0),xF(SF,TF,DF,"∝","\\varpropto"),xF(SF,TF,DF,"◀","\\blacktriangleleft"),xF(SF,TF,DF,"∴","\\therefore",!0),xF(SF,TF,DF,"∍","\\backepsilon"),xF(SF,TF,DF,"▶","\\blacktriangleright"),xF(SF,TF,DF,"∵","\\because",!0),xF(SF,TF,DF,"⋘","\\llless"),xF(SF,TF,DF,"⋙","\\gggtr"),xF(SF,TF,NF,"⊲","\\lhd"),xF(SF,TF,NF,"⊳","\\rhd"),xF(SF,TF,DF,"≂","\\eqsim",!0),xF(SF,EF,DF,"⋈","\\Join"),xF(SF,TF,DF,"≑","\\Doteq",!0),xF(SF,TF,NF,"∔","\\dotplus",!0),xF(SF,TF,NF,"∖","\\smallsetminus"),xF(SF,TF,NF,"⋒","\\Cap",!0),xF(SF,TF,NF,"⋓","\\Cup",!0),xF(SF,TF,NF,"⩞","\\doublebarwedge",!0),xF(SF,TF,NF,"⊟","\\boxminus",!0),xF(SF,TF,NF,"⊞","\\boxplus",!0),xF(SF,TF,NF,"⋇","\\divideontimes",!0),xF(SF,TF,NF,"⋉","\\ltimes",!0),xF(SF,TF,NF,"⋊","\\rtimes",!0),xF(SF,TF,NF,"⋋","\\leftthreetimes",!0),xF(SF,TF,NF,"⋌","\\rightthreetimes",!0),xF(SF,TF,NF,"⋏","\\curlywedge",!0),xF(SF,TF,NF,"⋎","\\curlyvee",!0),xF(SF,TF,NF,"⊝","\\circleddash",!0),xF(SF,TF,NF,"⊛","\\circledast",!0),xF(SF,TF,NF,"⋅","\\centerdot"),xF(SF,TF,NF,"⊺","\\intercal",!0),xF(SF,TF,NF,"⋒","\\doublecap"),xF(SF,TF,NF,"⋓","\\doublecup"),xF(SF,TF,NF,"⊠","\\boxtimes",!0),xF(SF,TF,DF,"⇢","\\dashrightarrow",!0),xF(SF,TF,DF,"⇠","\\dashleftarrow",!0),xF(SF,TF,DF,"⇇","\\leftleftarrows",!0),xF(SF,TF,DF,"⇆","\\leftrightarrows",!0),xF(SF,TF,DF,"⇚","\\Lleftarrow",!0),xF(SF,TF,DF,"↞","\\twoheadleftarrow",!0),xF(SF,TF,DF,"↢","\\leftarrowtail",!0),xF(SF,TF,DF,"↫","\\looparrowleft",!0),xF(SF,TF,DF,"⇋","\\leftrightharpoons",!0),xF(SF,TF,DF,"↶","\\curvearrowleft",!0),xF(SF,TF,DF,"↺","\\circlearrowleft",!0),xF(SF,TF,DF,"↰","\\Lsh",!0),xF(SF,TF,DF,"⇈","\\upuparrows",!0),xF(SF,TF,DF,"↿","\\upharpoonleft",!0),xF(SF,TF,DF,"⇃","\\downharpoonleft",!0),xF(SF,EF,DF,"⊶","\\origof",!0),xF(SF,EF,DF,"⊷","\\imageof",!0),xF(SF,TF,DF,"⊸","\\multimap",!0),xF(SF,TF,DF,"↭","\\leftrightsquigarrow",!0),xF(SF,TF,DF,"⇉","\\rightrightarrows",!0),xF(SF,TF,DF,"⇄","\\rightleftarrows",!0),xF(SF,TF,DF,"↠","\\twoheadrightarrow",!0),xF(SF,TF,DF,"↣","\\rightarrowtail",!0),xF(SF,TF,DF,"↬","\\looparrowright",!0),xF(SF,TF,DF,"↷","\\curvearrowright",!0),xF(SF,TF,DF,"↻","\\circlearrowright",!0),xF(SF,TF,DF,"↱","\\Rsh",!0),xF(SF,TF,DF,"⇊","\\downdownarrows",!0),xF(SF,TF,DF,"↾","\\upharpoonright",!0),xF(SF,TF,DF,"⇂","\\downharpoonright",!0),xF(SF,TF,DF,"⇝","\\rightsquigarrow",!0),xF(SF,TF,DF,"⇝","\\leadsto"),xF(SF,TF,DF,"⇛","\\Rrightarrow",!0),xF(SF,TF,DF,"↾","\\restriction"),xF(SF,EF,IF,"‘","`"),xF(SF,EF,IF,"$","\\$"),xF(CF,EF,IF,"$","\\$"),xF(CF,EF,IF,"$","\\textdollar"),xF(SF,EF,IF,"%","\\%"),xF(CF,EF,IF,"%","\\%"),xF(SF,EF,IF,"_","\\_"),xF(CF,EF,IF,"_","\\_"),xF(CF,EF,IF,"_","\\textunderscore"),xF(SF,EF,IF,"∠","\\angle",!0),xF(SF,EF,IF,"∞","\\infty",!0),xF(SF,EF,IF,"′","\\prime"),xF(SF,EF,IF,"△","\\triangle"),xF(SF,EF,IF,"Γ","\\Gamma",!0),xF(SF,EF,IF,"Δ","\\Delta",!0),xF(SF,EF,IF,"Θ","\\Theta",!0),xF(SF,EF,IF,"Λ","\\Lambda",!0),xF(SF,EF,IF,"Ξ","\\Xi",!0),xF(SF,EF,IF,"Π","\\Pi",!0),xF(SF,EF,IF,"Σ","\\Sigma",!0),xF(SF,EF,IF,"Υ","\\Upsilon",!0),xF(SF,EF,IF,"Φ","\\Phi",!0),xF(SF,EF,IF,"Ψ","\\Psi",!0),xF(SF,EF,IF,"Ω","\\Omega",!0),xF(SF,EF,IF,"A","Α"),xF(SF,EF,IF,"B","Β"),xF(SF,EF,IF,"E","Ε"),xF(SF,EF,IF,"Z","Ζ"),xF(SF,EF,IF,"H","Η"),xF(SF,EF,IF,"I","Ι"),xF(SF,EF,IF,"K","Κ"),xF(SF,EF,IF,"M","Μ"),xF(SF,EF,IF,"N","Ν"),xF(SF,EF,IF,"O","Ο"),xF(SF,EF,IF,"P","Ρ"),xF(SF,EF,IF,"T","Τ"),xF(SF,EF,IF,"X","Χ"),xF(SF,EF,IF,"¬","\\neg",!0),xF(SF,EF,IF,"¬","\\lnot"),xF(SF,EF,IF,"⊤","\\top"),xF(SF,EF,IF,"⊥","\\bot"),xF(SF,EF,IF,"∅","\\emptyset"),xF(SF,TF,IF,"∅","\\varnothing"),xF(SF,EF,OF,"α","\\alpha",!0),xF(SF,EF,OF,"β","\\beta",!0),xF(SF,EF,OF,"γ","\\gamma",!0),xF(SF,EF,OF,"δ","\\delta",!0),xF(SF,EF,OF,"ϵ","\\epsilon",!0),xF(SF,EF,OF,"ζ","\\zeta",!0),xF(SF,EF,OF,"η","\\eta",!0),xF(SF,EF,OF,"θ","\\theta",!0),xF(SF,EF,OF,"ι","\\iota",!0),xF(SF,EF,OF,"κ","\\kappa",!0),xF(SF,EF,OF,"λ","\\lambda",!0),xF(SF,EF,OF,"μ","\\mu",!0),xF(SF,EF,OF,"ν","\\nu",!0),xF(SF,EF,OF,"ξ","\\xi",!0),xF(SF,EF,OF,"ο","\\omicron",!0),xF(SF,EF,OF,"π","\\pi",!0),xF(SF,EF,OF,"ρ","\\rho",!0),xF(SF,EF,OF,"σ","\\sigma",!0),xF(SF,EF,OF,"τ","\\tau",!0),xF(SF,EF,OF,"υ","\\upsilon",!0),xF(SF,EF,OF,"ϕ","\\phi",!0),xF(SF,EF,OF,"χ","\\chi",!0),xF(SF,EF,OF,"ψ","\\psi",!0),xF(SF,EF,OF,"ω","\\omega",!0),xF(SF,EF,OF,"ε","\\varepsilon",!0),xF(SF,EF,OF,"ϑ","\\vartheta",!0),xF(SF,EF,OF,"ϖ","\\varpi",!0),xF(SF,EF,OF,"ϱ","\\varrho",!0),xF(SF,EF,OF,"ς","\\varsigma",!0),xF(SF,EF,OF,"φ","\\varphi",!0),xF(SF,EF,NF,"∗","*",!0),xF(SF,EF,NF,"+","+"),xF(SF,EF,NF,"−","-",!0),xF(SF,EF,NF,"⋅","\\cdot",!0),xF(SF,EF,NF,"∘","\\circ",!0),xF(SF,EF,NF,"÷","\\div",!0),xF(SF,EF,NF,"±","\\pm",!0),xF(SF,EF,NF,"×","\\times",!0),xF(SF,EF,NF,"∩","\\cap",!0),xF(SF,EF,NF,"∪","\\cup",!0),xF(SF,EF,NF,"∖","\\setminus",!0),xF(SF,EF,NF,"∧","\\land"),xF(SF,EF,NF,"∨","\\lor"),xF(SF,EF,NF,"∧","\\wedge",!0),xF(SF,EF,NF,"∨","\\vee",!0),xF(SF,EF,IF,"√","\\surd"),xF(SF,EF,RF,"⟨","\\langle",!0),xF(SF,EF,RF,"∣","\\lvert"),xF(SF,EF,RF,"∥","\\lVert"),xF(SF,EF,AF,"?","?"),xF(SF,EF,AF,"!","!"),xF(SF,EF,AF,"⟩","\\rangle",!0),xF(SF,EF,AF,"∣","\\rvert"),xF(SF,EF,AF,"∥","\\rVert"),xF(SF,EF,DF,"=","="),xF(SF,EF,DF,":",":"),xF(SF,EF,DF,"≈","\\approx",!0),xF(SF,EF,DF,"≅","\\cong",!0),xF(SF,EF,DF,"≥","\\ge"),xF(SF,EF,DF,"≥","\\geq",!0),xF(SF,EF,DF,"←","\\gets"),xF(SF,EF,DF,">","\\gt",!0),xF(SF,EF,DF,"∈","\\in",!0),xF(SF,EF,DF,"","\\@not"),xF(SF,EF,DF,"⊂","\\subset",!0),xF(SF,EF,DF,"⊃","\\supset",!0),xF(SF,EF,DF,"⊆","\\subseteq",!0),xF(SF,EF,DF,"⊇","\\supseteq",!0),xF(SF,TF,DF,"⊈","\\nsubseteq",!0),xF(SF,TF,DF,"⊉","\\nsupseteq",!0),xF(SF,EF,DF,"⊨","\\models"),xF(SF,EF,DF,"←","\\leftarrow",!0),xF(SF,EF,DF,"≤","\\le"),xF(SF,EF,DF,"≤","\\leq",!0),xF(SF,EF,DF,"<","\\lt",!0),xF(SF,EF,DF,"→","\\rightarrow",!0),xF(SF,EF,DF,"→","\\to"),xF(SF,TF,DF,"≱","\\ngeq",!0),xF(SF,TF,DF,"≰","\\nleq",!0),xF(SF,EF,"spacing"," ","\\ "),xF(SF,EF,"spacing"," ","\\space"),xF(SF,EF,"spacing"," ","\\nobreakspace"),xF(CF,EF,"spacing"," ","\\ "),xF(CF,EF,"spacing"," "," "),xF(CF,EF,"spacing"," ","\\space"),xF(CF,EF,"spacing"," ","\\nobreakspace"),xF(SF,EF,"spacing",null,"\\nobreak"),xF(SF,EF,"spacing",null,"\\allowbreak"),xF(SF,EF,"punct",",",","),xF(SF,EF,"punct",";",";"),xF(SF,TF,NF,"⊼","\\barwedge",!0),xF(SF,TF,NF,"⊻","\\veebar",!0),xF(SF,EF,NF,"⊙","\\odot",!0),xF(SF,EF,NF,"⊕","\\oplus",!0),xF(SF,EF,NF,"⊗","\\otimes",!0),xF(SF,EF,IF,"∂","\\partial",!0),xF(SF,EF,NF,"⊘","\\oslash",!0),xF(SF,TF,NF,"⊚","\\circledcirc",!0),xF(SF,TF,NF,"⊡","\\boxdot",!0),xF(SF,EF,NF,"△","\\bigtriangleup"),xF(SF,EF,NF,"▽","\\bigtriangledown"),xF(SF,EF,NF,"†","\\dagger"),xF(SF,EF,NF,"⋄","\\diamond"),xF(SF,EF,NF,"⋆","\\star"),xF(SF,EF,NF,"◃","\\triangleleft"),xF(SF,EF,NF,"▹","\\triangleright"),xF(SF,EF,RF,"{","\\{"),xF(CF,EF,IF,"{","\\{"),xF(CF,EF,IF,"{","\\textbraceleft"),xF(SF,EF,AF,"}","\\}"),xF(CF,EF,IF,"}","\\}"),xF(CF,EF,IF,"}","\\textbraceright"),xF(SF,EF,RF,"{","\\lbrace"),xF(SF,EF,AF,"}","\\rbrace"),xF(SF,EF,RF,"[","\\lbrack",!0),xF(CF,EF,IF,"[","\\lbrack",!0),xF(SF,EF,AF,"]","\\rbrack",!0),xF(CF,EF,IF,"]","\\rbrack",!0),xF(SF,EF,RF,"(","\\lparen",!0),xF(SF,EF,AF,")","\\rparen",!0),xF(CF,EF,IF,"<","\\textless",!0),xF(CF,EF,IF,">","\\textgreater",!0),xF(SF,EF,RF,"⌊","\\lfloor",!0),xF(SF,EF,AF,"⌋","\\rfloor",!0),xF(SF,EF,RF,"⌈","\\lceil",!0),xF(SF,EF,AF,"⌉","\\rceil",!0),xF(SF,EF,IF,"\\","\\backslash"),xF(SF,EF,IF,"∣","|"),xF(SF,EF,IF,"∣","\\vert"),xF(CF,EF,IF,"|","\\textbar",!0),xF(SF,EF,IF,"∥","\\|"),xF(SF,EF,IF,"∥","\\Vert"),xF(CF,EF,IF,"∥","\\textbardbl"),xF(CF,EF,IF,"~","\\textasciitilde"),xF(CF,EF,IF,"\\","\\textbackslash"),xF(CF,EF,IF,"^","\\textasciicircum"),xF(SF,EF,DF,"↑","\\uparrow",!0),xF(SF,EF,DF,"⇑","\\Uparrow",!0),xF(SF,EF,DF,"↓","\\downarrow",!0),xF(SF,EF,DF,"⇓","\\Downarrow",!0),xF(SF,EF,DF,"↕","\\updownarrow",!0),xF(SF,EF,DF,"⇕","\\Updownarrow",!0),xF(SF,EF,MF,"∐","\\coprod"),xF(SF,EF,MF,"⋁","\\bigvee"),xF(SF,EF,MF,"⋀","\\bigwedge"),xF(SF,EF,MF,"⨄","\\biguplus"),xF(SF,EF,MF,"⋂","\\bigcap"),xF(SF,EF,MF,"⋃","\\bigcup"),xF(SF,EF,MF,"∫","\\int"),xF(SF,EF,MF,"∫","\\intop"),xF(SF,EF,MF,"∬","\\iint"),xF(SF,EF,MF,"∭","\\iiint"),xF(SF,EF,MF,"∏","\\prod"),xF(SF,EF,MF,"∑","\\sum"),xF(SF,EF,MF,"⨂","\\bigotimes"),xF(SF,EF,MF,"⨁","\\bigoplus"),xF(SF,EF,MF,"⨀","\\bigodot"),xF(SF,EF,MF,"∮","\\oint"),xF(SF,EF,MF,"∯","\\oiint"),xF(SF,EF,MF,"∰","\\oiiint"),xF(SF,EF,MF,"⨆","\\bigsqcup"),xF(SF,EF,MF,"∫","\\smallint"),xF(CF,EF,"inner","…","\\textellipsis"),xF(SF,EF,"inner","…","\\mathellipsis"),xF(CF,EF,"inner","…","\\ldots",!0),xF(SF,EF,"inner","…","\\ldots",!0),xF(SF,EF,"inner","⋯","\\@cdots",!0),xF(SF,EF,"inner","⋱","\\ddots",!0),xF(SF,EF,IF,"⋮","\\varvdots"),xF(SF,EF,kF,"ˊ","\\acute"),xF(SF,EF,kF,"ˋ","\\grave"),xF(SF,EF,kF,"¨","\\ddot"),xF(SF,EF,kF,"~","\\tilde"),xF(SF,EF,kF,"ˉ","\\bar"),xF(SF,EF,kF,"˘","\\breve"),xF(SF,EF,kF,"ˇ","\\check"),xF(SF,EF,kF,"^","\\hat"),xF(SF,EF,kF,"⃗","\\vec"),xF(SF,EF,kF,"˙","\\dot"),xF(SF,EF,kF,"˚","\\mathring"),xF(SF,EF,OF,"","\\@imath"),xF(SF,EF,OF,"","\\@jmath"),xF(SF,EF,IF,"ı","ı"),xF(SF,EF,IF,"ȷ","ȷ"),xF(CF,EF,IF,"ı","\\i",!0),xF(CF,EF,IF,"ȷ","\\j",!0),xF(CF,EF,IF,"ß","\\ss",!0),xF(CF,EF,IF,"æ","\\ae",!0),xF(CF,EF,IF,"œ","\\oe",!0),xF(CF,EF,IF,"ø","\\o",!0),xF(CF,EF,IF,"Æ","\\AE",!0),xF(CF,EF,IF,"Œ","\\OE",!0),xF(CF,EF,IF,"Ø","\\O",!0),xF(CF,EF,kF,"ˊ","\\'"),xF(CF,EF,kF,"ˋ","\\`"),xF(CF,EF,kF,"ˆ","\\^"),xF(CF,EF,kF,"˜","\\~"),xF(CF,EF,kF,"ˉ","\\="),xF(CF,EF,kF,"˘","\\u"),xF(CF,EF,kF,"˙","\\."),xF(CF,EF,kF,"¸","\\c"),xF(CF,EF,kF,"˚","\\r"),xF(CF,EF,kF,"ˇ","\\v"),xF(CF,EF,kF,"¨",'\\"'),xF(CF,EF,kF,"˝","\\H"),xF(CF,EF,kF,"◯","\\textcircled");var PF={"--":!0,"---":!0,"``":!0,"''":!0};xF(CF,EF,IF,"–","--",!0),xF(CF,EF,IF,"–","\\textendash"),xF(CF,EF,IF,"—","---",!0),xF(CF,EF,IF,"—","\\textemdash"),xF(CF,EF,IF,"‘","`",!0),xF(CF,EF,IF,"‘","\\textquoteleft"),xF(CF,EF,IF,"’","'",!0),xF(CF,EF,IF,"’","\\textquoteright"),xF(CF,EF,IF,"“","``",!0),xF(CF,EF,IF,"“","\\textquotedblleft"),xF(CF,EF,IF,"”","''",!0),xF(CF,EF,IF,"”","\\textquotedblright"),xF(SF,EF,IF,"°","\\degree",!0),xF(CF,EF,IF,"°","\\degree"),xF(CF,EF,IF,"°","\\textdegree",!0),xF(SF,EF,IF,"£","\\pounds"),xF(SF,EF,IF,"£","\\mathsterling",!0),xF(CF,EF,IF,"£","\\pounds"),xF(CF,EF,IF,"£","\\textsterling",!0),xF(SF,TF,IF,"✠","\\maltese"),xF(CF,TF,IF,"✠","\\maltese");for(var LF=0;LF<'0123456789/@."'.length;LF++){var BF='0123456789/@."'.charAt(LF);xF(SF,EF,IF,BF,BF)}for(var $F=0;$F<'0123456789!@*()-=+";:?/.,'.length;$F++){var zF='0123456789!@*()-=+";:?/.,'.charAt($F);xF(CF,EF,IF,zF,zF)}for(var FF="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",UF=0;UF<FF.length;UF++){var HF=FF.charAt(UF);xF(SF,EF,OF,HF,HF),xF(CF,EF,IF,HF,HF)}xF(SF,TF,IF,"C","ℂ"),xF(CF,TF,IF,"C","ℂ"),xF(SF,TF,IF,"H","ℍ"),xF(CF,TF,IF,"H","ℍ"),xF(SF,TF,IF,"N","ℕ"),xF(CF,TF,IF,"N","ℕ"),xF(SF,TF,IF,"P","ℙ"),xF(CF,TF,IF,"P","ℙ"),xF(SF,TF,IF,"Q","ℚ"),xF(CF,TF,IF,"Q","ℚ"),xF(SF,TF,IF,"R","ℝ"),xF(CF,TF,IF,"R","ℝ"),xF(SF,TF,IF,"Z","ℤ"),xF(CF,TF,IF,"Z","ℤ"),xF(SF,EF,OF,"h","ℎ"),xF(CF,EF,OF,"h","ℎ");for(var VF="",qF=0;qF<FF.length;qF++){var KF=FF.charAt(qF);xF(SF,EF,OF,KF,VF=String.fromCharCode(55349,56320+qF)),xF(CF,EF,IF,KF,VF),xF(SF,EF,OF,KF,VF=String.fromCharCode(55349,56372+qF)),xF(CF,EF,IF,KF,VF),xF(SF,EF,OF,KF,VF=String.fromCharCode(55349,56424+qF)),xF(CF,EF,IF,KF,VF),xF(SF,EF,OF,KF,VF=String.fromCharCode(55349,56580+qF)),xF(CF,EF,IF,KF,VF),xF(SF,EF,OF,KF,VF=String.fromCharCode(55349,56736+qF)),xF(CF,EF,IF,KF,VF),xF(SF,EF,OF,KF,VF=String.fromCharCode(55349,56788+qF)),xF(CF,EF,IF,KF,VF),xF(SF,EF,OF,KF,VF=String.fromCharCode(55349,56840+qF)),xF(CF,EF,IF,KF,VF),xF(SF,EF,OF,KF,VF=String.fromCharCode(55349,56944+qF)),xF(CF,EF,IF,KF,VF),qF<26&&(xF(SF,EF,OF,KF,VF=String.fromCharCode(55349,56632+qF)),xF(CF,EF,IF,KF,VF),xF(SF,EF,OF,KF,VF=String.fromCharCode(55349,56476+qF)),xF(CF,EF,IF,KF,VF))}xF(SF,EF,OF,"k",VF=String.fromCharCode(55349,56668)),xF(CF,EF,IF,"k",VF);for(var WF=0;WF<10;WF++){var jF=WF.toString();xF(SF,EF,OF,jF,VF=String.fromCharCode(55349,57294+WF)),xF(CF,EF,IF,jF,VF),xF(SF,EF,OF,jF,VF=String.fromCharCode(55349,57314+WF)),xF(CF,EF,IF,jF,VF),xF(SF,EF,OF,jF,VF=String.fromCharCode(55349,57324+WF)),xF(CF,EF,IF,jF,VF),xF(SF,EF,OF,jF,VF=String.fromCharCode(55349,57334+WF)),xF(CF,EF,IF,jF,VF)}for(var YF=0;YF<"ÐÞþ".length;YF++){var GF="ÐÞþ".charAt(YF);xF(SF,EF,OF,GF,GF),xF(CF,EF,IF,GF,GF)}var JF=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["","",""],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],XF=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],ZF=function(e,t,n){return wF[n][e]&&wF[n][e].replace&&(e=wF[n][e].replace),{value:e,metrics:Gz(e,t,n)}},QF=function(e,t,n,r,i){var o,a=ZF(e,t,n),s=a.metrics;if(e=a.value,s){var l=s.italic;("text"===n||r&&"mathit"===r.font)&&(l=0),o=new fF(e,s.height,s.depth,l,s.skew,s.width,i)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+n+"'"),o=new fF(e,0,0,0,0,0,i);if(r){o.maxFontSize=r.sizeMultiplier,r.style.isTight()&&o.classes.push("mtight");var c=r.getColor();c&&(o.style.color=c)}return o},eU=(e,t)=>{if(aF(e.classes)!==aF(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var n=e.classes[0];if("mbin"===n||"mord"===n)return!1}for(var r in e.style)if(e.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;for(var i in t.style)if(t.style.hasOwnProperty(i)&&e.style[i]!==t.style[i])return!1;return!0},tU=function(e){for(var t=0,n=0,r=0,i=0;i<e.children.length;i++){var o=e.children[i];o.height>t&&(t=o.height),o.depth>n&&(n=o.depth),o.maxFontSize>r&&(r=o.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},nU=function(e,t,n,r){var i=new uF(e,t,n,r);return tU(i),i},rU=(e,t,n,r)=>new uF(e,t,n,r),iU=function(e){var t=new Kz(e);return tU(t),t},oU=function(e,t,n){var r="";switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}return r+"-"+("textbf"===t&&"textit"===n?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},aU={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},sU={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},lU={fontMap:aU,makeSymbol:QF,mathsym:function(e,t,n,r){return void 0===r&&(r=[]),"boldsymbol"===n.font&&ZF(e,"Main-Bold",t).metrics?QF(e,"Main-Bold",t,n,r.concat(["mathbf"])):"\\"===e||"main"===wF[t][e].font?QF(e,"Main-Regular",t,n,r):QF(e,"AMS-Regular",t,n,r.concat(["amsrm"]))},makeSpan:nU,makeSvgSpan:rU,makeLineSpan:function(e,t,n){var r=nU([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=oF(r.height),r.maxFontSize=1,r},makeAnchor:function(e,t,n,r){var i=new dF(e,t,n,r);return tU(i),i},makeFragment:iU,wrapFragment:function(e,t){return e instanceof Kz?nU([],[e],t):e},makeVList:function(e,t){for(var{children:n,depth:r}=function(e){if("individualShift"===e.positionType){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,o=1;o<t.length;o++){var a=-t[o].shift-i-t[o].elem.depth,s=a-(t[o-1].elem.height+t[o-1].elem.depth);i+=a,n.push({type:"kern",size:s}),n.push(t[o])}return{children:n,depth:r}}var l;if("top"===e.positionType){for(var c=e.positionData,u=0;u<e.children.length;u++){var d=e.children[u];c-="kern"===d.type?d.size:d.elem.height+d.elem.depth}l=c}else if("bottom"===e.positionType)l=-e.positionData;else{var h=e.children[0];if("elem"!==h.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)l=-h.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");l=-h.elem.depth}}return{children:e.children,depth:l}}(e),i=0,o=0;o<n.length;o++){var a=n[o];if("elem"===a.type){var s=a.elem;i=Math.max(i,s.maxFontSize,s.height)}}i+=2;var l=nU(["pstrut"],[]);l.style.height=oF(i);for(var c=[],u=r,d=r,h=r,p=0;p<n.length;p++){var f=n[p];if("kern"===f.type)h+=f.size;else{var g=f.elem,m=f.wrapperClasses||[],y=f.wrapperStyle||{},v=nU(m,[l,g],void 0,y);v.style.top=oF(-i-h-g.depth),f.marginLeft&&(v.style.marginLeft=f.marginLeft),f.marginRight&&(v.style.marginRight=f.marginRight),c.push(v),h+=g.height+g.depth}u=Math.min(u,h),d=Math.max(d,h)}var b,_=nU(["vlist"],c);if(_.style.height=oF(d),u<0){var w=nU([],[]),x=nU(["vlist"],[w]);x.style.height=oF(-u);var S=nU(["vlist-s"],[new fF("")]);b=[nU(["vlist-r"],[_,S]),nU(["vlist-r"],[x])]}else b=[nU(["vlist-r"],[_])];var C=nU(["vlist-t"],b);return 2===b.length&&C.classes.push("vlist-t2"),C.height=d,C.depth=-u,C},makeOrd:function(e,t,n){var r=e.mode,i=e.text,o=["mord"],a="math"===r||"text"===r&&t.font,s=a?t.font:t.fontFamily;if(55349===i.charCodeAt(0)){var[l,c]=function(e,t){var n=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,r="math"===t?0:1;if(119808<=n&&n<120484){var i=Math.floor((n-119808)/26);return[JF[i][2],JF[i][r]]}if(120782<=n&&n<=120831){var o=Math.floor((n-120782)/10);return[XF[o][2],XF[o][r]]}if(120485===n||120486===n)return[JF[0][2],JF[0][r]];if(120486<n&&n<120782)return["",""];throw new Sz("Unsupported character: "+e)}(i,r);return QF(i,l,r,t,o.concat(c))}if(s){var u,d;if("boldsymbol"===s){var h=function(e,t,n,r,i){return"textord"!==i&&ZF(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(i,r,0,0,n);u=h.fontName,d=[h.fontClass]}else a?(u=aU[s].fontName,d=[s]):(u=oU(s,t.fontWeight,t.fontShape),d=[s,t.fontWeight,t.fontShape]);if(ZF(i,u,r).metrics)return QF(i,u,r,t,o.concat(d));if(PF.hasOwnProperty(i)&&"Typewriter"===u.substr(0,10)){for(var p=[],f=0;f<i.length;f++)p.push(QF(i[f],u,r,t,o.concat(d)));return iU(p)}}if("mathord"===n)return QF(i,"Math-Italic",r,t,o.concat(["mathnormal"]));if("textord"===n){var g=wF[r][i]&&wF[r][i].font;if("ams"===g){var m=oU("amsrm",t.fontWeight,t.fontShape);return QF(i,m,r,t,o.concat("amsrm",t.fontWeight,t.fontShape))}if("main"!==g&&g){var y=oU(g,t.fontWeight,t.fontShape);return QF(i,y,r,t,o.concat(y,t.fontWeight,t.fontShape))}var v=oU("textrm",t.fontWeight,t.fontShape);return QF(i,v,r,t,o.concat(t.fontWeight,t.fontShape))}throw new Error("unexpected type: "+n+" in makeOrd")},makeGlue:(e,t)=>{var n=nU(["mspace"],[],t),r=iF(e,t);return n.style.marginRight=oF(r),n},staticSvg:function(e,t){var[n,r,i]=sU[e],o=new mF(n),a=new gF([o],{width:oF(r),height:oF(i),style:"width:"+oF(r),viewBox:"0 0 "+1e3*r+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),s=rU(["overlay"],[a],t);return s.height=i,s.style.height=oF(i),s.style.width=oF(r),s},svgData:sU,tryCombineChars:e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof fF&&r instanceof fF&&eU(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e}},cU={number:3,unit:"mu"},uU={number:4,unit:"mu"},dU={number:5,unit:"mu"},hU={mord:{mop:cU,mbin:uU,mrel:dU,minner:cU},mop:{mord:cU,mop:cU,mrel:dU,minner:cU},mbin:{mord:uU,mop:uU,mopen:uU,minner:uU},mrel:{mord:dU,mop:dU,mopen:dU,minner:dU},mopen:{},mclose:{mop:cU,mbin:uU,mrel:dU,minner:cU},mpunct:{mord:cU,mop:cU,mrel:dU,mopen:cU,mclose:cU,mpunct:cU,minner:cU},minner:{mord:cU,mop:cU,mbin:uU,mrel:dU,mopen:cU,mpunct:cU,minner:cU}},pU={mord:{mop:cU},mop:{mord:cU,mop:cU},mbin:{},mrel:{},mopen:{},mclose:{mop:cU},mpunct:{},minner:{mop:cU}},fU={},gU={},mU={};function yU(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:o,mathmlBuilder:a}=e,s={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},l=0;l<n.length;++l)fU[n[l]]=s;t&&(o&&(gU[t]=o),a&&(mU[t]=a))}function vU(e){var{type:t,htmlBuilder:n,mathmlBuilder:r}=e;yU({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:n,mathmlBuilder:r})}var bU=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},_U=function(e){return"ordgroup"===e.type?e.body:[e]},wU=lU.makeSpan,xU=["leftmost","mbin","mopen","mrel","mop","mpunct"],SU=["rightmost","mrel","mclose","mpunct"],CU={display:Fz.DISPLAY,text:Fz.TEXT,script:Fz.SCRIPT,scriptscript:Fz.SCRIPTSCRIPT},EU={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},TU=function(e,t,n,r){void 0===r&&(r=[null,null]);for(var i=[],o=0;o<e.length;o++){var a=RU(e[o],t);if(a instanceof Kz){var s=a.children;i.push(...s)}else i.push(a)}if(lU.tryCombineChars(i),!n)return i;var l=t;if(1===e.length){var c=e[0];"sizing"===c.type?l=t.havingSize(c.size):"styling"===c.type&&(l=t.havingStyle(CU[c.style]))}var u=wU([r[0]||"leftmost"],[],t),d=wU([r[1]||"rightmost"],[],t),h="root"===n;return kU(i,((e,t)=>{var n=t.classes[0],r=e.classes[0];"mbin"===n&&Nz.contains(SU,r)?t.classes[0]="mord":"mbin"===r&&Nz.contains(xU,n)&&(e.classes[0]="mord")}),{node:u},d,h),kU(i,((e,t)=>{var n=OU(t),r=OU(e),i=n&&r?e.hasClass("mtight")?pU[n][r]:hU[n][r]:null;if(i)return lU.makeGlue(i,l)}),{node:u},d,h),i},kU=function e(t,n,r,i,o){i&&t.push(i);for(var a=0;a<t.length;a++){var s=t[a],l=NU(s);if(l)e(l.children,n,r,null,o);else{var c=!s.hasClass("mspace");if(c){var u=n(s,r.node);u&&(r.insertAfter?r.insertAfter(u):(t.unshift(u),a++))}c?r.node=s:o&&s.hasClass("newline")&&(r.node=wU(["leftmost"])),r.insertAfter=(e=>n=>{t.splice(e+1,0,n),a++})(a)}}i&&t.pop()},NU=function(e){return e instanceof Kz||e instanceof dF||e instanceof uF&&e.hasClass("enclosing")?e:null},AU=function e(t,n){var r=NU(t);if(r){var i=r.children;if(i.length){if("right"===n)return e(i[i.length-1],"right");if("left"===n)return e(i[0],"left")}}return t},OU=function(e,t){return e?(t&&(e=AU(e,t)),EU[e.classes[0]]||null):null},MU=function(e,t){var n=["nulldelimiter"].concat(e.baseSizingClasses());return wU(t.concat(n))},RU=function(e,t,n){if(!e)return wU();if(gU[e.type]){var r=gU[e.type](e,t);if(n&&t.size!==n.size){r=wU(t.sizingClasses(n),[r],t);var i=t.sizeMultiplier/n.sizeMultiplier;r.height*=i,r.depth*=i}return r}throw new Sz("Got group of unknown type: '"+e.type+"'")};function DU(e,t){var n=wU(["base"],e,t),r=wU(["strut"]);return r.style.height=oF(n.height+n.depth),n.depth&&(r.style.verticalAlign=oF(-n.depth)),n.children.unshift(r),n}function IU(e,t){var n=null;1===e.length&&"tag"===e[0].type&&(n=e[0].tag,e=e[0].body);var r,i=TU(e,t,"root");2===i.length&&i[1].hasClass("tag")&&(r=i.pop());for(var o,a=[],s=[],l=0;l<i.length;l++)if(s.push(i[l]),i[l].hasClass("mbin")||i[l].hasClass("mrel")||i[l].hasClass("allowbreak")){for(var c=!1;l<i.length-1&&i[l+1].hasClass("mspace")&&!i[l+1].hasClass("newline");)l++,s.push(i[l]),i[l].hasClass("nobreak")&&(c=!0);c||(a.push(DU(s,t)),s=[])}else i[l].hasClass("newline")&&(s.pop(),s.length>0&&(a.push(DU(s,t)),s=[]),a.push(i[l]));s.length>0&&a.push(DU(s,t)),n?((o=DU(TU(n,t,!0))).classes=["tag"],a.push(o)):r&&a.push(r);var u=wU(["katex-html"],a);if(u.setAttribute("aria-hidden","true"),o){var d=o.children[0];d.style.height=oF(u.height+u.depth),u.depth&&(d.style.verticalAlign=oF(-u.depth))}return u}function PU(e){return new Kz(e)}class LU{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=aF(this.classes));for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=Nz.escape(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+Nz.escape(aF(this.classes))+'"'),e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</"+this.type+">"}toText(){return this.children.map((e=>e.toText())).join("")}}class BU{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Nz.escape(this.toText())}toText(){return this.text}}var $U={MathNode:LU,TextNode:BU,SpaceNode:class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?" ":e>=.1666&&e<=.1667?" ":e>=.2222&&e<=.2223?" ":e>=.2777&&e<=.2778?" ":e>=-.05556&&e<=-.05555?" ":e>=-.1667&&e<=-.1666?" ":e>=-.2223&&e<=-.2222?" ":e>=-.2778&&e<=-.2777?" ":null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",oF(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+oF(this.width)+'"/>'}toText(){return this.character?this.character:" "}},newDocumentFragment:PU},zU=function(e,t,n){return!wF[t][e]||!wF[t][e].replace||55349===e.charCodeAt(0)||PF.hasOwnProperty(e)&&n&&(n.fontFamily&&"tt"===n.fontFamily.substr(4,2)||n.font&&"tt"===n.font.substr(4,2))||(e=wF[t][e].replace),new $U.TextNode(e)},FU=function(e){return 1===e.length?e[0]:new $U.MathNode("mrow",e)},UU=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var n=t.font;if(!n||"mathnormal"===n)return null;var r=e.mode;if("mathit"===n)return"italic";if("boldsymbol"===n)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===n)return"bold";if("mathbb"===n)return"double-struck";if("mathfrak"===n)return"fraktur";if("mathscr"===n||"mathcal"===n)return"script";if("mathsf"===n)return"sans-serif";if("mathtt"===n)return"monospace";var i=e.text;return Nz.contains(["\\imath","\\jmath"],i)?null:(wF[r][i]&&wF[r][i].replace&&(i=wF[r][i].replace),Gz(i,lU.fontMap[n].fontName,r)?lU.fontMap[n].variant:null)},HU=function(e,t,n){if(1===e.length){var r=qU(e[0],t);return n&&r instanceof LU&&"mo"===r.type&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var i,o=[],a=0;a<e.length;a++){var s=qU(e[a],t);if(s instanceof LU&&i instanceof LU){if("mtext"===s.type&&"mtext"===i.type&&s.getAttribute("mathvariant")===i.getAttribute("mathvariant")){i.children.push(...s.children);continue}if("mn"===s.type&&"mn"===i.type){i.children.push(...s.children);continue}if("mi"===s.type&&1===s.children.length&&"mn"===i.type){var l=s.children[0];if(l instanceof BU&&"."===l.text){i.children.push(...s.children);continue}}else if("mi"===i.type&&1===i.children.length){var c=i.children[0];if(c instanceof BU&&"̸"===c.text&&("mo"===s.type||"mi"===s.type||"mn"===s.type)){var u=s.children[0];u instanceof BU&&u.text.length>0&&(u.text=u.text.slice(0,1)+"̸"+u.text.slice(1),o.pop())}}}o.push(s),i=s}return o},VU=function(e,t,n){return FU(HU(e,t,n))},qU=function(e,t){if(!e)return new $U.MathNode("mrow");if(mU[e.type])return mU[e.type](e,t);throw new Sz("Got group of unknown type: '"+e.type+"'")};function KU(e,t,n,r,i){var o,a=HU(e,n);o=1===a.length&&a[0]instanceof LU&&Nz.contains(["mrow","mtable"],a[0].type)?a[0]:new $U.MathNode("mrow",a);var s=new $U.MathNode("annotation",[new $U.TextNode(t)]);s.setAttribute("encoding","application/x-tex");var l=new $U.MathNode("semantics",[o,s]),c=new $U.MathNode("math",[l]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&c.setAttribute("display","block");var u=i?"katex":"katex-mathml";return lU.makeSpan([u],[c])}var WU=function(e){return new eF({style:e.displayMode?Fz.DISPLAY:Fz.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},jU=function(e,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),e=lU.makeSpan(n,[e])}return e},YU={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},GU={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},JU=function(e,t,n,r,i){var o,a=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(o=lU.makeSpan(["stretchy",t],[],i),"fbox"===t){var s=i.color&&i.getColor();s&&(o.style.borderColor=s)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new yF({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new yF({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new gF(l,{width:"100%",height:oF(a)});o=lU.makeSvgSpan([],[c],i)}return o.height=a,o.style.height=oF(a),o},XU=function(e){var t=new $U.MathNode("mo",[new $U.TextNode(YU[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},ZU=function(e,t){var{span:n,minWidth:r,height:i}=function(){var n=4e5,r=e.label.substr(1);if(Nz.contains(["widehat","widecheck","widetilde","utilde"],r)){var i,o,a,s="ordgroup"===(p=e.base).type?p.body.length:1;if(s>5)"widehat"===r||"widecheck"===r?(i=420,n=2364,a=.42,o=r+"4"):(i=312,n=2340,a=.34,o="tilde4");else{var l=[1,1,2,2,3,3][s];"widehat"===r||"widecheck"===r?(n=[0,1062,2364,2364,2364][l],i=[0,239,300,360,420][l],a=[0,.24,.3,.3,.36,.42][l],o=r+l):(n=[0,600,1033,2339,2340][l],i=[0,260,286,306,312][l],a=[0,.26,.286,.3,.306,.34][l],o="tilde"+l)}var c=new mF(o),u=new gF([c],{width:"100%",height:oF(a),viewBox:"0 0 "+n+" "+i,preserveAspectRatio:"none"});return{span:lU.makeSvgSpan([],[u],t),minWidth:0,height:a}}var d,h,p,f=[],g=GU[r],[m,y,v]=g,b=v/1e3,_=m.length;if(1===_)d=["hide-tail"],h=[g[3]];else if(2===_)d=["halfarrow-left","halfarrow-right"],h=["xMinYMin","xMaxYMin"];else{if(3!==_)throw new Error("Correct katexImagesData or update code here to support\n "+_+" children.");d=["brace-left","brace-center","brace-right"],h=["xMinYMin","xMidYMin","xMaxYMin"]}for(var w=0;w<_;w++){var x=new mF(m[w]),S=new gF([x],{width:"400em",height:oF(b),viewBox:"0 0 "+n+" "+v,preserveAspectRatio:h[w]+" slice"}),C=lU.makeSvgSpan([d[w]],[S],t);if(1===_)return{span:C,minWidth:y,height:b};C.style.height=oF(b),f.push(C)}return{span:lU.makeSpan(["stretchy"],f,t),minWidth:y,height:b}}();return n.height=i,n.style.height=oF(i),r>0&&(n.style.minWidth=oF(r)),n};function QU(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function eH(e){var t=tH(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function tH(e){return e&&("atom"===e.type||_F.hasOwnProperty(e.type))?e:null}var nH=(e,t)=>{var n,r,i;e&&"supsub"===e.type?(n=(r=QU(e.base,"accent")).base,e.base=n,i=function(e){if(e instanceof uF)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(RU(e,t)),e.base=r):n=(r=QU(e,"accent")).base;var o=RU(n,t.havingCrampedStyle()),a=0;if(r.isShifty&&Nz.isCharacterBox(n)){var s=Nz.getBaseElem(n);a=vF(RU(s,t.havingCrampedStyle())).skew}var l,c="\\c"===r.label,u=c?o.height+o.depth:Math.min(o.height,t.fontMetrics().xHeight);if(r.isStretchy)l=ZU(r,t),l=lU.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"elem",elem:l,wrapperClasses:["svg-align"],wrapperStyle:a>0?{width:"calc(100% - "+oF(2*a)+")",marginLeft:oF(2*a)}:void 0}]},t);else{var d,h;"\\vec"===r.label?(d=lU.staticSvg("vec",t),h=lU.svgData.vec[1]):((d=vF(d=lU.makeOrd({mode:r.mode,text:r.label},t,"textord"))).italic=0,h=d.width,c&&(u+=d.depth)),l=lU.makeSpan(["accent-body"],[d]);var p="\\textcircled"===r.label;p&&(l.classes.push("accent-full"),u=o.height);var f=a;p||(f-=h/2),l.style.left=oF(f),"\\textcircled"===r.label&&(l.style.top=".2em"),l=lU.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:-u},{type:"elem",elem:l}]},t)}var g=lU.makeSpan(["mord","accent"],[l],t);return i?(i.children[0]=g,i.height=Math.max(g.height,i.height),i.classes[0]="mord",i):g},rH=(e,t)=>{var n=e.isStretchy?XU(e.label):new $U.MathNode("mo",[zU(e.label,e.mode)]),r=new $U.MathNode("mover",[qU(e.base,t),n]);return r.setAttribute("accent","true"),r},iH=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((e=>"\\"+e)).join("|"));yU({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var n=bU(t[0]),r=!iH.test(e.funcName),i=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:nH,mathmlBuilder:rH}),yU({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return"math"===r&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:nH,mathmlBuilder:rH}),yU({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=RU(e.base,t),r=ZU(e,t),i="\\utilde"===e.label?.12:0,o=lU.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:n}]},t);return lU.makeSpan(["mord","accentunder"],[o],t)},mathmlBuilder:(e,t)=>{var n=XU(e.label),r=new $U.MathNode("munder",[qU(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var oH=e=>{var t=new $U.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};yU({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r,funcName:i}=e;return{type:"xArrow",mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n,r=t.style,i=t.havingStyle(r.sup()),o=lU.wrapFragment(RU(e.body,i,t),t),a="\\x"===e.label.slice(0,2)?"x":"cd";o.classes.push(a+"-arrow-pad"),e.below&&(i=t.havingStyle(r.sub()),(n=lU.wrapFragment(RU(e.below,i,t),t)).classes.push(a+"-arrow-pad"));var s,l=ZU(e,t),c=-t.fontMetrics().axisHeight+.5*l.height,u=-t.fontMetrics().axisHeight-.5*l.height-.111;if((o.depth>.25||"\\xleftequilibrium"===e.label)&&(u-=o.depth),n){var d=-t.fontMetrics().axisHeight+n.height+.5*l.height+.111;s=lU.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:u},{type:"elem",elem:l,shift:c},{type:"elem",elem:n,shift:d}]},t)}else s=lU.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:u},{type:"elem",elem:l,shift:c}]},t);return s.children[0].children[0].children[1].classes.push("svg-align"),lU.makeSpan(["mrel","x-arrow"],[s],t)},mathmlBuilder(e,t){var n,r=XU(e.label);if(r.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var i=oH(qU(e.body,t));if(e.below){var o=oH(qU(e.below,t));n=new $U.MathNode("munderover",[r,o,i])}else n=new $U.MathNode("mover",[r,i])}else if(e.below){var a=oH(qU(e.below,t));n=new $U.MathNode("munder",[r,a])}else n=oH(),n=new $U.MathNode("mover",[r,n]);return n}});var aH={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},sH=e=>"textord"===e.type&&"@"===e.text;function lH(e,t,n){var r=aH[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var i={type:"atom",text:r,mode:"math",family:"rel"},o={type:"ordgroup",mode:"math",body:[n.callFunction("\\\\cdleft",[t[0]],[]),n.callFunction("\\Big",[i],[]),n.callFunction("\\\\cdright",[t[1]],[])]};return n.callFunction("\\\\cdparent",[o],[]);case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return n.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}yU({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=lU.wrapFragment(RU(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=oF(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new $U.MathNode("mrow",[qU(e.label,t)]);return(n=new $U.MathNode("mpadded",[n])).setAttribute("width","0"),"left"===e.side&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),(n=new $U.MathNode("mstyle",[n])).setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}}),yU({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:"cdlabelparent",mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=lU.wrapFragment(RU(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder:(e,t)=>new $U.MathNode("mrow",[qU(e.fragment,t)])}),yU({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=QU(t[0],"ordgroup").body,i="",o=0;o<r.length;o++){i+=QU(r[o],"textord").text}var a,s=parseInt(i);if(isNaN(s))throw new Sz("\\@char has non-numeric argument "+i);if(s<0||s>=1114111)throw new Sz("\\@char with invalid code point "+i);return s<=65535?a=String.fromCharCode(s):(s-=65536,a=String.fromCharCode(55296+(s>>10),56320+(1023&s))),{type:"textord",mode:n.mode,text:a}}});var cH=(e,t)=>{var n=TU(e.body,t.withColor(e.color),!1);return lU.makeFragment(n)},uH=(e,t)=>{var n=HU(e.body,t.withColor(e.color)),r=new $U.MathNode("mstyle",n);return r.setAttribute("mathcolor",e.color),r};yU({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:n}=e,r=QU(t[0],"color-token").color,i=t[1];return{type:"color",mode:n.mode,color:r,body:_U(i)}},htmlBuilder:cH,mathmlBuilder:uH}),yU({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=QU(t[0],"color-token").color;n.gullet.macros.set("\\current@color",i);var o=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:i,body:o}},htmlBuilder:cH,mathmlBuilder:uH}),yU({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler(e,t,n){var{parser:r}=e,i=n[0],o=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:o,size:i&&QU(i,"size").value}},htmlBuilder(e,t){var n=lU.makeSpan(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=oF(iF(e.size,t)))),n},mathmlBuilder(e,t){var n=new $U.MathNode("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",oF(iF(e.size,t)))),n}});var dH={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},hH=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new Sz("Expected a control sequence",e);return t},pH=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);null==i&&(n.noexpand=!0,i={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};yU({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(dH[r.text])return"\\global"!==n&&"\\\\globallong"!==n||(r.text=dH[r.text]),QU(t.parseFunction(),"internal");throw new Sz("Invalid token after macro prefix",r)}}),yU({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new Sz("Expected a control sequence",r);for(var o,a=0,s=[[]];"{"!==t.gullet.future().text;)if("#"===(r=t.gullet.popToken()).text){if("{"===t.gullet.future().text){o=t.gullet.future(),s[a].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new Sz('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==a+1)throw new Sz('Argument number "'+r.text+'" out of order');a++,s.push([])}else{if("EOF"===r.text)throw new Sz("Expected a macro definition");s[a].push(r.text)}var{tokens:l}=t.gullet.consumeArg();return o&&l.unshift(o),"\\edef"!==n&&"\\xdef"!==n||(l=t.gullet.expandTokens(l)).reverse(),t.gullet.macros.set(i,{tokens:l,numArgs:a,delimiters:s},n===dH[n]),{type:"internal",mode:t.mode}}}),yU({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=hH(t.gullet.popToken());t.gullet.consumeSpaces();var i=(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t})(t);return pH(t,r,i,"\\\\globallet"===n),{type:"internal",mode:t.mode}}}),yU({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=hH(t.gullet.popToken()),i=t.gullet.popToken(),o=t.gullet.popToken();return pH(t,r,o,"\\\\globalfuture"===n),t.gullet.pushToken(o),t.gullet.pushToken(i),{type:"internal",mode:t.mode}}});var fH=function(e,t,n){var r=Gz(wF.math[e]&&wF.math[e].replace||e,t,n);if(!r)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return r},gH=function(e,t,n,r){var i=n.havingBaseStyle(t),o=lU.makeSpan(r.concat(i.sizingClasses(n)),[e],n),a=i.sizeMultiplier/n.sizeMultiplier;return o.height*=a,o.depth*=a,o.maxFontSize=i.sizeMultiplier,o},mH=function(e,t,n){var r=t.havingBaseStyle(n),i=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=oF(i),e.height-=i,e.depth+=i},yH=function(e,t,n,r,i,o){var a=function(e,t,n,r){return lU.makeSymbol(e,"Size"+t+"-Regular",n,r)}(e,t,i,r),s=gH(lU.makeSpan(["delimsizing","size"+t],[a],r),Fz.TEXT,r,o);return n&&mH(s,r,Fz.TEXT),s},vH=function(e,t,n){var r;return r="Size1-Regular"===t?"delim-size1":"delim-size4",{type:"elem",elem:lU.makeSpan(["delimsizinginner",r],[lU.makeSpan([],[lU.makeSymbol(e,t,n)])])}},bH=function(e,t,n){var r=Wz["Size4-Regular"][e.charCodeAt(0)]?Wz["Size4-Regular"][e.charCodeAt(0)][4]:Wz["Size1-Regular"][e.charCodeAt(0)][4],i=new mF("inner",function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),o=new gF([i],{width:oF(r),height:oF(t),style:"width:"+oF(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),a=lU.makeSvgSpan([],[o],n);return a.height=t,a.style.height=oF(t),a.style.width=oF(r),{type:"elem",elem:a}},_H={type:"kern",size:-.008},wH=["|","\\lvert","\\rvert","\\vert"],xH=["\\|","\\lVert","\\rVert","\\Vert"],SH=function(e,t,n,r,i,o){var a,s,l,c;a=l=c=e,s=null;var u="Size1-Regular";"\\uparrow"===e?l=c="⏐":"\\Uparrow"===e?l=c="‖":"\\downarrow"===e?a=l="⏐":"\\Downarrow"===e?a=l="‖":"\\updownarrow"===e?(a="\\uparrow",l="⏐",c="\\downarrow"):"\\Updownarrow"===e?(a="\\Uparrow",l="‖",c="\\Downarrow"):Nz.contains(wH,e)?l="∣":Nz.contains(xH,e)?l="∥":"["===e||"\\lbrack"===e?(a="⎡",l="⎢",c="⎣",u="Size4-Regular"):"]"===e||"\\rbrack"===e?(a="⎤",l="⎥",c="⎦",u="Size4-Regular"):"\\lfloor"===e||"⌊"===e?(l=a="⎢",c="⎣",u="Size4-Regular"):"\\lceil"===e||"⌈"===e?(a="⎡",l=c="⎢",u="Size4-Regular"):"\\rfloor"===e||"⌋"===e?(l=a="⎥",c="⎦",u="Size4-Regular"):"\\rceil"===e||"⌉"===e?(a="⎤",l=c="⎥",u="Size4-Regular"):"("===e||"\\lparen"===e?(a="⎛",l="⎜",c="⎝",u="Size4-Regular"):")"===e||"\\rparen"===e?(a="⎞",l="⎟",c="⎠",u="Size4-Regular"):"\\{"===e||"\\lbrace"===e?(a="⎧",s="⎨",c="⎩",l="⎪",u="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(a="⎫",s="⎬",c="⎭",l="⎪",u="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(a="⎧",c="⎩",l="⎪",u="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(a="⎫",c="⎭",l="⎪",u="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(a="⎧",c="⎭",l="⎪",u="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(a="⎫",c="⎩",l="⎪",u="Size4-Regular");var d=fH(a,u,i),h=d.height+d.depth,p=fH(l,u,i),f=p.height+p.depth,g=fH(c,u,i),m=g.height+g.depth,y=0,v=1;if(null!==s){var b=fH(s,u,i);y=b.height+b.depth,v=2}var _=h+m+y,w=_+Math.max(0,Math.ceil((t-_)/(v*f)))*v*f,x=r.fontMetrics().axisHeight;n&&(x*=r.sizeMultiplier);var S=w/2-x,C=[];if(C.push(vH(c,u,i)),C.push(_H),null===s){var E=w-h-m+.016;C.push(bH(l,E,r))}else{var T=(w-h-m-y)/2+.016;C.push(bH(l,T,r)),C.push(_H),C.push(vH(s,u,i)),C.push(_H),C.push(bH(l,T,r))}C.push(_H),C.push(vH(a,u,i));var k=r.havingBaseStyle(Fz.TEXT),N=lU.makeVList({positionType:"bottom",positionData:S,children:C},k);return gH(lU.makeSpan(["delimsizing","mult"],[N],k),Fz.TEXT,r,o)},CH=function(e,t,n,r,i){var o=function(e,t,n){t*=1e3;var r="";switch(e){case"sqrtMain":r=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,80);break;case"sqrtSize1":r=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,80);break;case"sqrtSize2":r=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,80);break;case"sqrtSize3":r=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,80);break;case"sqrtSize4":r=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,80);break;case"sqrtTall":r=function(e,t,n){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(n-54-t-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,80,n)}return r}(e,r,n),a=new mF(e,o),s=new gF([a],{width:"400em",height:oF(t),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return lU.makeSvgSpan(["hide-tail"],[s],i)},EH=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],TH=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],kH=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],NH=[0,1.2,1.8,2.4,3],AH=[{type:"small",style:Fz.SCRIPTSCRIPT},{type:"small",style:Fz.SCRIPT},{type:"small",style:Fz.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],OH=[{type:"small",style:Fz.SCRIPTSCRIPT},{type:"small",style:Fz.SCRIPT},{type:"small",style:Fz.TEXT},{type:"stack"}],MH=[{type:"small",style:Fz.SCRIPTSCRIPT},{type:"small",style:Fz.SCRIPT},{type:"small",style:Fz.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],RH=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},DH=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size);i<n.length&&"stack"!==n[i].type;i++){var o=fH(e,RH(n[i]),"math"),a=o.height+o.depth;if("small"===n[i].type&&(a*=r.havingBaseStyle(n[i].style).sizeMultiplier),a>t)return n[i]}return n[n.length-1]},IH=function(e,t,n,r,i,o){var a;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),a=Nz.contains(kH,e)?AH:Nz.contains(EH,e)?MH:OH;var s=DH(e,t,a,r);return"small"===s.type?function(e,t,n,r,i,o){var a=lU.makeSymbol(e,"Main-Regular",i,r),s=gH(a,t,r,o);return n&&mH(s,r,t),s}(e,s.style,n,r,i,o):"large"===s.type?yH(e,s.size,n,r,i,o):SH(e,t,n,r,i,o)},PH={sqrtImage:function(e,t){var n,r,i=t.havingBaseSizing(),o=DH("\\surd",e*i.sizeMultiplier,MH,i),a=i.sizeMultiplier,s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),l=0,c=0,u=0;return"small"===o.type?(e<1?a=1:e<1.4&&(a=.7),c=(1+s)/a,(n=CH("sqrtMain",l=(1+s+.08)/a,u=1e3+1e3*s+80,s,t)).style.minWidth="0.853em",r=.833/a):"large"===o.type?(u=1080*NH[o.size],c=(NH[o.size]+s)/a,l=(NH[o.size]+s+.08)/a,(n=CH("sqrtSize"+o.size,l,u,s,t)).style.minWidth="1.02em",r=1/a):(l=e+s+.08,c=e+s,u=Math.floor(1e3*e+s)+80,(n=CH("sqrtTall",l,u,s,t)).style.minWidth="0.742em",r=1.056),n.height=c,n.style.height=oF(l),{span:n,advanceWidth:r,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*a}},sizedDelim:function(e,t,n,r,i){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),Nz.contains(EH,e)||Nz.contains(kH,e))return yH(e,t,!1,n,r,i);if(Nz.contains(TH,e))return SH(e,NH[t],!1,n,r,i);throw new Sz("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:NH,customSizedDelim:IH,leftRightDelim:function(e,t,n,r,i,o){var a=r.fontMetrics().axisHeight*r.sizeMultiplier,s=5/r.fontMetrics().ptPerEm,l=Math.max(t-a,n+a),c=Math.max(l/500*901,2*l-s);return IH(e,c,!0,r,i,o)}},LH={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},BH=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function $H(e,t){var n=tH(e);if(n&&Nz.contains(BH,n.text))return n;throw new Sz(n?"Invalid delimiter '"+n.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function zH(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}yU({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var n=$H(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:LH[e.funcName].size,mclass:LH[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>"."===e.delim?lU.makeSpan([e.mclass]):PH.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(zU(e.delim,e.mode));var n=new $U.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=oF(PH.sizeToMaxHeight[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}}),yU({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");if(n&&"string"!=typeof n)throw new Sz("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:$H(t[0],e).text,color:n}}}),yU({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=$H(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var o=QU(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:i,left:n.text,right:o.delim,rightColor:o.color}},htmlBuilder:(e,t)=>{zH(e);for(var n,r,i=TU(e.body,t,!0,["mopen","mclose"]),o=0,a=0,s=!1,l=0;l<i.length;l++)i[l].isMiddle?s=!0:(o=Math.max(i[l].height,o),a=Math.max(i[l].depth,a));if(o*=t.sizeMultiplier,a*=t.sizeMultiplier,n="."===e.left?MU(t,["mopen"]):PH.leftRightDelim(e.left,o,a,t,e.mode,["mopen"]),i.unshift(n),s)for(var c=1;c<i.length;c++){var u=i[c].isMiddle;u&&(i[c]=PH.leftRightDelim(u.delim,o,a,u.options,e.mode,[]))}if("."===e.right)r=MU(t,["mclose"]);else{var d=e.rightColor?t.withColor(e.rightColor):t;r=PH.leftRightDelim(e.right,o,a,d,e.mode,["mclose"])}return i.push(r),lU.makeSpan(["minner"],i,t)},mathmlBuilder:(e,t)=>{zH(e);var n=HU(e.body,t);if("."!==e.left){var r=new $U.MathNode("mo",[zU(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if("."!==e.right){var i=new $U.MathNode("mo",[zU(e.right,e.mode)]);i.setAttribute("fence","true"),e.rightColor&&i.setAttribute("mathcolor",e.rightColor),n.push(i)}return FU(n)}}),yU({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=$H(t[0],e);if(!e.parser.leftrightDepth)throw new Sz("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;if("."===e.delim)n=MU(t,[]);else{n=PH.sizedDelim(e.delim,1,t,e.mode,[]);var r={delim:e.delim,options:t};n.isMiddle=r}return n},mathmlBuilder:(e,t)=>{var n="\\vert"===e.delim||"|"===e.delim?zU("|","text"):zU(e.delim,e.mode),r=new $U.MathNode("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var FH=(e,t)=>{var n,r,i,o=lU.wrapFragment(RU(e.body,t),t),a=e.label.substr(1),s=t.sizeMultiplier,l=0,c=Nz.isCharacterBox(e.body);if("sout"===a)(n=lU.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/s,l=-.5*t.fontMetrics().xHeight;else if("phase"===a){var u=iF({number:.6,unit:"pt"},t),d=iF({number:.35,unit:"ex"},t);s/=t.havingBaseSizing().sizeMultiplier;var h=o.height+o.depth+u+d;o.style.paddingLeft=oF(h/2+u);var p=Math.floor(1e3*h*s),f="M400000 "+(r=p)+" H0 L"+r/2+" 0 l65 45 L145 "+(r-80)+" H400000z",g=new gF([new mF("phase",f)],{width:"400em",height:oF(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});(n=lU.makeSvgSpan(["hide-tail"],[g],t)).style.height=oF(h),l=o.depth+u+d}else{/cancel/.test(a)?c||o.classes.push("cancel-pad"):"angl"===a?o.classes.push("anglpad"):o.classes.push("boxpad");var m=0,y=0,v=0;/box/.test(a)?(v=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),y=m=t.fontMetrics().fboxsep+("colorbox"===a?0:v)):"angl"===a?(m=4*(v=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),y=Math.max(0,.25-o.depth)):y=m=c?.2:0,n=JU(o,a,m,y,t),/fbox|boxed|fcolorbox/.test(a)?(n.style.borderStyle="solid",n.style.borderWidth=oF(v)):"angl"===a&&.049!==v&&(n.style.borderTopWidth=oF(v),n.style.borderRightWidth=oF(v)),l=o.depth+y,e.backgroundColor&&(n.style.backgroundColor=e.backgroundColor,e.borderColor&&(n.style.borderColor=e.borderColor))}if(e.backgroundColor)i=lU.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:l},{type:"elem",elem:o,shift:0}]},t);else{var b=/cancel|phase/.test(a)?["svg-align"]:[];i=lU.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:n,shift:l,wrapperClasses:b}]},t)}return/cancel/.test(a)&&(i.height=o.height,i.depth=o.depth),/cancel/.test(a)&&!c?lU.makeSpan(["mord","cancel-lap"],[i],t):lU.makeSpan(["mord"],[i],t)},UH=(e,t)=>{var n=0,r=new $U.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[qU(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),"\\fcolorbox"===e.label){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+i+"em solid "+String(e.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};yU({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,n){var{parser:r,funcName:i}=e,o=QU(t[0],"color-token").color,a=t[1];return{type:"enclose",mode:r.mode,label:i,backgroundColor:o,body:a}},htmlBuilder:FH,mathmlBuilder:UH}),yU({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,n){var{parser:r,funcName:i}=e,o=QU(t[0],"color-token").color,a=QU(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:r.mode,label:i,backgroundColor:a,borderColor:o,body:s}},htmlBuilder:FH,mathmlBuilder:UH}),yU({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\fbox",body:t[0]}}}),yU({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"enclose",mode:n.mode,label:r,body:i}},htmlBuilder:FH,mathmlBuilder:UH}),yU({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\angl",body:t[0]}}});var HH={};function VH(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:o,mathmlBuilder:a}=e,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l<n.length;++l)HH[n[l]]=s;o&&(gU[t]=o),a&&(mU[t]=a)}var qH={};function KH(e,t){qH[e]=t}function WH(e){var t=[];e.consumeSpaces();for(var n=e.fetch().text;"\\hline"===n||"\\hdashline"===n;)e.consume(),t.push("\\hdashline"===n),e.consumeSpaces(),n=e.fetch().text;return t}var jH=e=>{if(!e.parser.settings.displayMode)throw new Sz("{"+e.envName+"} can be used only in display mode.")};function YH(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function GH(e,t,n){var{hskipBeforeAndAfter:r,addJot:i,cols:o,arraystretch:a,colSeparationType:s,autoTag:l,singleRow:c,emptySingleRow:u,maxNumCols:d,leqno:h}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!a){var p=e.gullet.expandMacroAsText("\\arraystretch");if(null==p)a=1;else if(!(a=parseFloat(p))||a<0)throw new Sz("Invalid \\arraystretch: "+p)}e.gullet.beginGroup();var f=[],g=[f],m=[],y=[],v=null!=l?[]:void 0;function b(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function _(){v&&(e.gullet.macros.get("\\df@tag")?(v.push(e.subparse([new xz("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):v.push(Boolean(l)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(b(),y.push(WH(e));;){var w=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),w={type:"ordgroup",mode:e.mode,body:w},n&&(w={type:"styling",mode:e.mode,style:n,body:[w]}),f.push(w);var x=e.fetch().text;if("&"===x){if(d&&f.length===d){if(c||s)throw new Sz("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===x){_(),1===f.length&&"styling"===w.type&&0===w.body[0].body.length&&(g.length>1||!u)&&g.pop(),y.length<g.length+1&&y.push([]);break}if("\\\\"!==x)throw new Sz("Expected & or \\\\ or \\cr or \\end",e.nextToken);e.consume();var S=void 0;" "!==e.gullet.future().text&&(S=e.parseSizeGroup(!0)),m.push(S?S.value:null),_(),y.push(WH(e)),f=[],g.push(f),b()}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:i,arraystretch:a,body:g,cols:o,rowGaps:m,hskipBeforeAndAfter:r,hLinesBeforeRow:y,colSeparationType:s,tags:v,leqno:h}}function JH(e){return"d"===e.substr(0,1)?"display":"text"}var XH=function(e,t){var n,r,i=e.body.length,o=e.hLinesBeforeRow,a=0,s=new Array(i),l=[],c=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),u=1/t.fontMetrics().ptPerEm,d=5*u;e.colSeparationType&&"small"===e.colSeparationType&&(d=t.havingStyle(Fz.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778);var h="CD"===e.colSeparationType?iF({number:3,unit:"ex"},t):12*u,p=3*u,f=e.arraystretch*h,g=.7*f,m=.3*f,y=0;function v(e){for(var t=0;t<e.length;++t)t>0&&(y+=.25),l.push({pos:y,isDashed:e[t]})}for(v(o[0]),n=0;n<e.body.length;++n){var b=e.body[n],_=g,w=m;a<b.length&&(a=b.length);var x=new Array(b.length);for(r=0;r<b.length;++r){var S=RU(b[r],t);w<S.depth&&(w=S.depth),_<S.height&&(_=S.height),x[r]=S}var C=e.rowGaps[n],E=0;C&&(E=iF(C,t))>0&&(w<(E+=m)&&(w=E),E=0),e.addJot&&(w+=p),x.height=_,x.depth=w,y+=_,x.pos=y,y+=w+E,s[n]=x,v(o[n+1])}var T,k,N=y/2+t.fontMetrics().axisHeight,A=e.cols||[],O=[],M=[];if(e.tags&&e.tags.some((e=>e)))for(n=0;n<i;++n){var R=s[n],D=R.pos-N,I=e.tags[n],P=void 0;(P=!0===I?lU.makeSpan(["eqn-num"],[],t):!1===I?lU.makeSpan([],[],t):lU.makeSpan([],TU(I,t,!0),t)).depth=R.depth,P.height=R.height,M.push({type:"elem",elem:P,shift:D})}for(r=0,k=0;r<a||k<A.length;++r,++k){for(var L=A[k]||{},B=!0;"separator"===L.type;){if(B||((T=lU.makeSpan(["arraycolsep"],[])).style.width=oF(t.fontMetrics().doubleRuleSep),O.push(T)),"|"!==L.separator&&":"!==L.separator)throw new Sz("Invalid separator type: "+L.separator);var $="|"===L.separator?"solid":"dashed",z=lU.makeSpan(["vertical-separator"],[],t);z.style.height=oF(y),z.style.borderRightWidth=oF(c),z.style.borderRightStyle=$,z.style.margin="0 "+oF(-c/2);var F=y-N;F&&(z.style.verticalAlign=oF(-F)),O.push(z),L=A[++k]||{},B=!1}if(!(r>=a)){var U=void 0;(r>0||e.hskipBeforeAndAfter)&&0!==(U=Nz.deflt(L.pregap,d))&&((T=lU.makeSpan(["arraycolsep"],[])).style.width=oF(U),O.push(T));var H=[];for(n=0;n<i;++n){var V=s[n],q=V[r];if(q){var K=V.pos-N;q.depth=V.depth,q.height=V.height,H.push({type:"elem",elem:q,shift:K})}}H=lU.makeVList({positionType:"individualShift",children:H},t),H=lU.makeSpan(["col-align-"+(L.align||"c")],[H]),O.push(H),(r<a-1||e.hskipBeforeAndAfter)&&0!==(U=Nz.deflt(L.postgap,d))&&((T=lU.makeSpan(["arraycolsep"],[])).style.width=oF(U),O.push(T))}}if(s=lU.makeSpan(["mtable"],O),l.length>0){for(var W=lU.makeLineSpan("hline",t,c),j=lU.makeLineSpan("hdashline",t,c),Y=[{type:"elem",elem:s,shift:0}];l.length>0;){var G=l.pop(),J=G.pos-N;G.isDashed?Y.push({type:"elem",elem:j,shift:J}):Y.push({type:"elem",elem:W,shift:J})}s=lU.makeVList({positionType:"individualShift",children:Y},t)}if(0===M.length)return lU.makeSpan(["mord"],[s],t);var X=lU.makeVList({positionType:"individualShift",children:M},t);return X=lU.makeSpan(["tag"],[X],t),lU.makeFragment([s,X])},ZH={c:"center ",l:"left ",r:"right "},QH=function(e,t){for(var n=[],r=new $U.MathNode("mtd",[],["mtr-glue"]),i=new $U.MathNode("mtd",[],["mml-eqn-num"]),o=0;o<e.body.length;o++){for(var a=e.body[o],s=[],l=0;l<a.length;l++)s.push(new $U.MathNode("mtd",[qU(a[l],t)]));e.tags&&e.tags[o]&&(s.unshift(r),s.push(r),e.leqno?s.unshift(i):s.push(i)),n.push(new $U.MathNode("mtr",s))}var c=new $U.MathNode("mtable",n),u=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);c.setAttribute("rowspacing",oF(u));var d="",h="";if(e.cols&&e.cols.length>0){var p=e.cols,f="",g=!1,m=0,y=p.length;"separator"===p[0].type&&(d+="top ",m=1),"separator"===p[p.length-1].type&&(d+="bottom ",y-=1);for(var v=m;v<y;v++)"align"===p[v].type?(h+=ZH[p[v].align],g&&(f+="none "),g=!0):"separator"===p[v].type&&g&&(f+="|"===p[v].separator?"solid ":"dashed ",g=!1);c.setAttribute("columnalign",h.trim()),/[sd]/.test(f)&&c.setAttribute("columnlines",f.trim())}if("align"===e.colSeparationType){for(var b=e.cols||[],_="",w=1;w<b.length;w++)_+=w%2?"0em ":"1em ";c.setAttribute("columnspacing",_.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?c.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?c.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?c.setAttribute("columnspacing","0.5em"):c.setAttribute("columnspacing","1em");var x="",S=e.hLinesBeforeRow;d+=S[0].length>0?"left ":"",d+=S[S.length-1].length>0?"right ":"";for(var C=1;C<S.length-1;C++)x+=0===S[C].length?"none ":S[C][0]?"dashed ":"solid ";return/[sd]/.test(x)&&c.setAttribute("rowlines",x.trim()),""!==d&&(c=new $U.MathNode("menclose",[c])).setAttribute("notation",d.trim()),e.arraystretch&&e.arraystretch<1&&(c=new $U.MathNode("mstyle",[c])).setAttribute("scriptlevel","1"),c},eV=function(e,t){-1===e.envName.indexOf("ed")&&jH(e);var n,r=[],i=e.envName.indexOf("at")>-1?"alignat":"align",o="split"===e.envName,a=GH(e.parser,{cols:r,addJot:!0,autoTag:o?void 0:YH(e.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:o?2:void 0,leqno:e.parser.settings.leqno},"display"),s=0,l={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var c="",u=0;u<t[0].body.length;u++){c+=QU(t[0].body[u],"textord").text}n=Number(c),s=2*n}var d=!s;a.body.forEach((function(e){for(var t=1;t<e.length;t+=2){var r=QU(e[t],"styling");QU(r.body[0],"ordgroup").body.unshift(l)}if(d)s<e.length&&(s=e.length);else{var i=e.length/2;if(n<i)throw new Sz("Too many math in a row: expected "+n+", but got "+i,e[0])}}));for(var h=0;h<s;++h){var p="r",f=0;h%2==1?p="l":h>0&&d&&(f=1),r[h]={type:"align",align:p,pregap:f,postgap:0}}return a.colSeparationType=d?"align":"alignat",a};VH({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=(tH(t[0])?[t[0]]:QU(t[0],"ordgroup").body).map((function(e){var t=eH(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new Sz("Unknown column alignment: "+t,e)})),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return GH(e.parser,r,JH(e.envName))},htmlBuilder:XH,mathmlBuilder:QH}),VH({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],n="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if("*"===e.envName.charAt(e.envName.length-1)){var i=e.parser;if(i.consumeSpaces(),"["===i.fetch().text){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,-1==="lcr".indexOf(n))throw new Sz("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),r.cols=[{type:"align",align:n}]}}var o=GH(e.parser,r,JH(e.envName)),a=Math.max(0,...o.body.map((e=>e.length)));return o.cols=new Array(a).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[o],left:t[0],right:t[1],rightColor:void 0}:o},htmlBuilder:XH,mathmlBuilder:QH}),VH({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t=GH(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:XH,mathmlBuilder:QH}),VH({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=(tH(t[0])?[t[0]]:QU(t[0],"ordgroup").body).map((function(e){var t=eH(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new Sz("Unknown column alignment: "+t,e)}));if(n.length>1)throw new Sz("{subarray} can contain only one column");var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if((r=GH(e.parser,r,"script")).body.length>0&&r.body[0].length>1)throw new Sz("{subarray} can contain only one column");return r},htmlBuilder:XH,mathmlBuilder:QH}),VH({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=GH(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},JH(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:XH,mathmlBuilder:QH}),VH({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:eV,htmlBuilder:XH,mathmlBuilder:QH}),VH({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){Nz.contains(["gather","gather*"],e.envName)&&jH(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:YH(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return GH(e.parser,t,"display")},htmlBuilder:XH,mathmlBuilder:QH}),VH({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:eV,htmlBuilder:XH,mathmlBuilder:QH}),VH({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){jH(e);var t={autoTag:YH(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return GH(e.parser,t,"display")},htmlBuilder:XH,mathmlBuilder:QH}),VH({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(jH(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if("&"!==n&&"\\\\"!==n){if("\\end"===n){0===t[t.length-1].length&&t.pop();break}throw new Sz("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var r,i,o=[],a=[o],s=0;s<t.length;s++){for(var l=t[s],c={type:"styling",body:[],mode:"math",style:"display"},u=0;u<l.length;u++)if(sH(l[u])){o.push(c);var d=eH(l[u+=1]).text,h=new Array(2);if(h[0]={type:"ordgroup",mode:"math",body:[]},h[1]={type:"ordgroup",mode:"math",body:[]},"=|.".indexOf(d)>-1);else{if(!("<>AV".indexOf(d)>-1))throw new Sz('Expected one of "<>AV=|." after @',l[u]);for(var p=0;p<2;p++){for(var f=!0,g=u+1;g<l.length;g++){if(i=d,("mathord"===(r=l[g]).type||"atom"===r.type)&&r.text===i){f=!1,u=g;break}if(sH(l[g]))throw new Sz("Missing a "+d+" character to complete a CD arrow.",l[g]);h[p].body.push(l[g])}if(f)throw new Sz("Missing a "+d+" character to complete a CD arrow.",l[u])}}var m={type:"styling",body:[lH(d,h,e)],mode:"math",style:"display"};o.push(m),c={type:"styling",body:[],mode:"math",style:"display"}}else c.body.push(l[u]);s%2==0?o.push(c):o.shift(),o=[],a.push(o)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:a,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(a[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(a.length+1).fill([])}}(e.parser)),htmlBuilder:XH,mathmlBuilder:QH}),KH("\\nonumber","\\gdef\\@eqnsw{0}"),KH("\\notag","\\nonumber"),yU({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new Sz(e.funcName+" valid only within array environment")}});var tV=HH;yU({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];if("ordgroup"!==i.type)throw new Sz("Invalid environment name",i);for(var o="",a=0;a<i.body.length;++a)o+=QU(i.body[a],"textord").text;if("\\begin"===r){if(!tV.hasOwnProperty(o))throw new Sz("No such environment: "+o,i);var s=tV[o],{args:l,optArgs:c}=n.parseArguments("\\begin{"+o+"}",s),u={mode:n.mode,envName:o,parser:n},d=s.handler(u,l,c);n.expect("\\end",!1);var h=n.nextToken,p=QU(n.parseFunction(),"environment");if(p.name!==o)throw new Sz("Mismatch: \\begin{"+o+"} matched by \\end{"+p.name+"}",h);return d}return{type:"environment",mode:n.mode,name:o,nameGroup:i}}});var nV=lU.makeSpan;function rV(e,t){var n=TU(e.body,t,!0);return nV([e.mclass],n,t)}function iV(e,t){var n,r=HU(e.body,t);return"minner"===e.mclass?n=new $U.MathNode("mpadded",r):"mord"===e.mclass?e.isCharacterBox?(n=r[0]).type="mi":n=new $U.MathNode("mi",r):(e.isCharacterBox?(n=r[0]).type="mo":n=new $U.MathNode("mo",r),"mbin"===e.mclass?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):"mpunct"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0em"):"minner"===e.mclass&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}yU({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.substr(5),body:_U(i),isCharacterBox:Nz.isCharacterBox(i)}},htmlBuilder:rV,mathmlBuilder:iV});var oV=e=>{var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};yU({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:oV(t[0]),body:_U(t[1]),isCharacterBox:Nz.isCharacterBox(t[1])}}}),yU({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var n,{parser:r,funcName:i}=e,o=t[1],a=t[0];n="\\stackrel"!==i?oV(o):"mrel";var s={type:"op",mode:o.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==i,body:_U(o)},l={type:"supsub",mode:a.mode,base:s,sup:"\\underset"===i?null:a,sub:"\\underset"===i?a:null};return{type:"mclass",mode:r.mode,mclass:n,body:[l],isCharacterBox:Nz.isCharacterBox(l)}},htmlBuilder:rV,mathmlBuilder:iV});var aV=(e,t)=>{var n=e.font,r=t.withFont(n);return RU(e.body,r)},sV=(e,t)=>{var n=e.font,r=t.withFont(n);return qU(e.body,r)},lV={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};yU({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=bU(t[0]),o=r;return o in lV&&(o=lV[o]),{type:"font",mode:n.mode,font:o.slice(1),body:i}},htmlBuilder:aV,mathmlBuilder:sV}),yU({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0],i=Nz.isCharacterBox(r);return{type:"mclass",mode:n.mode,mclass:oV(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:i}}}),yU({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:i}=e,{mode:o}=n,a=n.parseExpression(!0,i);return{type:"font",mode:o,font:"math"+r.slice(1),body:{type:"ordgroup",mode:n.mode,body:a}}},htmlBuilder:aV,mathmlBuilder:sV});var cV=(e,t)=>{var n=t;return"display"===e?n=n.id>=Fz.SCRIPT.id?n.text():Fz.DISPLAY:"text"===e&&n.size===Fz.DISPLAY.size?n=Fz.TEXT:"script"===e?n=Fz.SCRIPT:"scriptscript"===e&&(n=Fz.SCRIPTSCRIPT),n},uV=(e,t)=>{var n,r=cV(e.size,t.style),i=r.fracNum(),o=r.fracDen();n=t.havingStyle(i);var a=RU(e.numer,n,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;a.height=a.height<s?s:a.height,a.depth=a.depth<l?l:a.depth}n=t.havingStyle(o);var c,u,d,h,p,f,g,m,y,v,b=RU(e.denom,n,t);if(e.hasBarLine?(e.barSize?(u=iF(e.barSize,t),c=lU.makeLineSpan("frac-line",t,u)):c=lU.makeLineSpan("frac-line",t),u=c.height,d=c.height):(c=null,u=0,d=t.fontMetrics().defaultRuleThickness),r.size===Fz.DISPLAY.size||"display"===e.size?(h=t.fontMetrics().num1,p=u>0?3*d:7*d,f=t.fontMetrics().denom1):(u>0?(h=t.fontMetrics().num2,p=d):(h=t.fontMetrics().num3,p=3*d),f=t.fontMetrics().denom2),c){var _=t.fontMetrics().axisHeight;h-a.depth-(_+.5*u)<p&&(h+=p-(h-a.depth-(_+.5*u))),_-.5*u-(b.height-f)<p&&(f+=p-(_-.5*u-(b.height-f)));var w=-(_-.5*u);g=lU.makeVList({positionType:"individualShift",children:[{type:"elem",elem:b,shift:f},{type:"elem",elem:c,shift:w},{type:"elem",elem:a,shift:-h}]},t)}else{var x=h-a.depth-(b.height-f);x<p&&(h+=.5*(p-x),f+=.5*(p-x)),g=lU.makeVList({positionType:"individualShift",children:[{type:"elem",elem:b,shift:f},{type:"elem",elem:a,shift:-h}]},t)}return n=t.havingStyle(r),g.height*=n.sizeMultiplier/t.sizeMultiplier,g.depth*=n.sizeMultiplier/t.sizeMultiplier,m=r.size===Fz.DISPLAY.size?t.fontMetrics().delim1:r.size===Fz.SCRIPTSCRIPT.size?t.havingStyle(Fz.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,y=null==e.leftDelim?MU(t,["mopen"]):PH.customSizedDelim(e.leftDelim,m,!0,t.havingStyle(r),e.mode,["mopen"]),v=e.continued?lU.makeSpan([]):null==e.rightDelim?MU(t,["mclose"]):PH.customSizedDelim(e.rightDelim,m,!0,t.havingStyle(r),e.mode,["mclose"]),lU.makeSpan(["mord"].concat(n.sizingClasses(t)),[y,lU.makeSpan(["mfrac"],[g]),v],t)},dV=(e,t)=>{var n=new $U.MathNode("mfrac",[qU(e.numer,t),qU(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var r=iF(e.barSize,t);n.setAttribute("linethickness",oF(r))}}else n.setAttribute("linethickness","0px");var i=cV(e.size,t.style);if(i.size!==t.style.size){n=new $U.MathNode("mstyle",[n]);var o=i.size===Fz.DISPLAY.size?"true":"false";n.setAttribute("displaystyle",o),n.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){var a=[];if(null!=e.leftDelim){var s=new $U.MathNode("mo",[new $U.TextNode(e.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),a.push(s)}if(a.push(n),null!=e.rightDelim){var l=new $U.MathNode("mo",[new $U.TextNode(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),a.push(l)}return FU(a)}return n};yU({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var n,{parser:r,funcName:i}=e,o=t[0],a=t[1],s=null,l=null,c="auto";switch(i){case"\\dfrac":case"\\frac":case"\\tfrac":n=!0;break;case"\\\\atopfrac":n=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":n=!1,s="(",l=")";break;case"\\\\bracefrac":n=!1,s="\\{",l="\\}";break;case"\\\\brackfrac":n=!1,s="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(i){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text"}return{type:"genfrac",mode:r.mode,continued:!1,numer:o,denom:a,hasBarLine:n,leftDelim:s,rightDelim:l,size:c,barSize:null}},htmlBuilder:uV,mathmlBuilder:dV}),yU({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],o=t[1];return{type:"genfrac",mode:n.mode,continued:!0,numer:i,denom:o,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),yU({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:n,funcName:r,token:i}=e;switch(r){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:n.mode,replaceWith:t,token:i}}});var hV=["display","text","script","scriptscript"],pV=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};yU({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var n,{parser:r}=e,i=t[4],o=t[5],a=bU(t[0]),s="atom"===a.type&&"open"===a.family?pV(a.text):null,l=bU(t[1]),c="atom"===l.type&&"close"===l.family?pV(l.text):null,u=QU(t[2],"size"),d=null;n=!!u.isBlank||(d=u.value).number>0;var h="auto",p=t[3];if("ordgroup"===p.type){if(p.body.length>0){var f=QU(p.body[0],"textord");h=hV[Number(f.text)]}}else p=QU(p,"textord"),h=hV[Number(p.text)];return{type:"genfrac",mode:r.mode,numer:i,denom:o,continued:!1,hasBarLine:n,barSize:d,leftDelim:s,rightDelim:c,size:h}},htmlBuilder:uV,mathmlBuilder:dV}),yU({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:n,funcName:r,token:i}=e;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:QU(t[0],"size").value,token:i}}}),yU({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],o=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(QU(t[1],"infix").size),a=t[2],s=o.number>0;return{type:"genfrac",mode:n.mode,numer:i,denom:a,continued:!1,hasBarLine:s,barSize:o,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:uV,mathmlBuilder:dV});var fV=(e,t)=>{var n,r,i=t.style;"supsub"===e.type?(n=e.sup?RU(e.sup,t.havingStyle(i.sup()),t):RU(e.sub,t.havingStyle(i.sub()),t),r=QU(e.base,"horizBrace")):r=QU(e,"horizBrace");var o,a=RU(r.base,t.havingBaseStyle(Fz.DISPLAY)),s=ZU(r,t);if(r.isOver?(o=lU.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(o=lU.makeVList({positionType:"bottom",positionData:a.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a}]},t)).children[0].children[0].children[0].classes.push("svg-align"),n){var l=lU.makeSpan(["mord",r.isOver?"mover":"munder"],[o],t);o=r.isOver?lU.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},t):lU.makeVList({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return lU.makeSpan(["mord",r.isOver?"mover":"munder"],[o],t)};yU({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"horizBrace",mode:n.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:fV,mathmlBuilder:(e,t)=>{var n=XU(e.label);return new $U.MathNode(e.isOver?"mover":"munder",[qU(e.base,t),n])}}),yU({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],i=QU(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:n.mode,href:i,body:_U(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=TU(e.body,t,!1);return lU.makeAnchor(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=VU(e.body,t);return n instanceof LU||(n=new LU("mrow",[n])),n.setAttribute("href",e.href),n}}),yU({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=QU(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var i=[],o=0;o<r.length;o++){var a=r[o];"~"===a&&(a="\\textasciitilde"),i.push({type:"textord",mode:"text",text:a})}var s={type:"text",mode:n.mode,font:"\\texttt",body:i};return{type:"href",mode:n.mode,href:r,body:_U(s)}}}),yU({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:n}=e;return{type:"hbox",mode:n.mode,body:_U(t[0])}},htmlBuilder(e,t){var n=TU(e.body,t,!1);return lU.makeFragment(n)},mathmlBuilder:(e,t)=>new $U.MathNode("mrow",HU(e.body,t))}),yU({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var n,{parser:r,funcName:i,token:o}=e,a=QU(t[0],"raw").string,s=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l={};switch(i){case"\\htmlClass":l.class=a,n={command:"\\htmlClass",class:a};break;case"\\htmlId":l.id=a,n={command:"\\htmlId",id:a};break;case"\\htmlStyle":l.style=a,n={command:"\\htmlStyle",style:a};break;case"\\htmlData":for(var c=a.split(","),u=0;u<c.length;u++){var d=c[u].split("=");if(2!==d.length)throw new Sz("Error parsing key-value for \\htmlData");l["data-"+d[0].trim()]=d[1].trim()}n={command:"\\htmlData",attributes:l};break;default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(n)?{type:"html",mode:r.mode,attributes:l,body:_U(s)}:r.formatUnsupportedCmd(i)},htmlBuilder:(e,t)=>{var n=TU(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=lU.makeSpan(r,n,t);for(var o in e.attributes)"class"!==o&&e.attributes.hasOwnProperty(o)&&i.setAttribute(o,e.attributes[o]);return i},mathmlBuilder:(e,t)=>VU(e.body,t)}),yU({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"htmlmathml",mode:n.mode,html:_U(t[0]),mathml:_U(t[1])}},htmlBuilder:(e,t)=>{var n=TU(e.html,t,!1);return lU.makeFragment(n)},mathmlBuilder:(e,t)=>VU(e.mathml,t)});var gV=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new Sz("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(t[1]+t[2]),unit:t[3]};if(!rF(n))throw new Sz("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};yU({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,n)=>{var{parser:r}=e,i={number:0,unit:"em"},o={number:.9,unit:"em"},a={number:0,unit:"em"},s="";if(n[0])for(var l=QU(n[0],"raw").string.split(","),c=0;c<l.length;c++){var u=l[c].split("=");if(2===u.length){var d=u[1].trim();switch(u[0].trim()){case"alt":s=d;break;case"width":i=gV(d);break;case"height":o=gV(d);break;case"totalheight":a=gV(d);break;default:throw new Sz("Invalid key: '"+u[0]+"' in \\includegraphics.")}}}var h=QU(t[0],"url").url;return""===s&&(s=(s=(s=h).replace(/^.*[\\/]/,"")).substring(0,s.lastIndexOf("."))),r.settings.isTrusted({command:"\\includegraphics",url:h})?{type:"includegraphics",mode:r.mode,alt:s,width:i,height:o,totalheight:a,src:h}:r.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var n=iF(e.height,t),r=0;e.totalheight.number>0&&(r=iF(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=iF(e.width,t));var o={height:oF(n+r)};i>0&&(o.width=oF(i)),r>0&&(o.verticalAlign=oF(-r));var a=new hF(e.src,e.alt,o);return a.height=n,a.depth=r,a},mathmlBuilder:(e,t)=>{var n=new $U.MathNode("mglyph",[]);n.setAttribute("alt",e.alt);var r=iF(e.height,t),i=0;if(e.totalheight.number>0&&(i=iF(e.totalheight,t)-r,n.setAttribute("valign",oF(-i))),n.setAttribute("height",oF(r+i)),e.width.number>0){var o=iF(e.width,t);n.setAttribute("width",oF(o))}return n.setAttribute("src",e.src),n}}),yU({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=QU(t[0],"size");if(n.settings.strict){var o="m"===r[1],a="mu"===i.value.unit;o?(a||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, not "+i.value.unit+" units"),"math"!==n.mode&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):a&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:i.value}},htmlBuilder:(e,t)=>lU.makeGlue(e.dimension,t),mathmlBuilder(e,t){var n=iF(e.dimension,t);return new $U.SpaceNode(n)}}),yU({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;"clap"===e.alignment?(n=lU.makeSpan([],[RU(e.body,t)]),n=lU.makeSpan(["inner"],[n],t)):n=lU.makeSpan(["inner"],[RU(e.body,t)]);var r=lU.makeSpan(["fix"],[]),i=lU.makeSpan([e.alignment],[n,r],t),o=lU.makeSpan(["strut"]);return o.style.height=oF(i.height+i.depth),i.depth&&(o.style.verticalAlign=oF(-i.depth)),i.children.unshift(o),i=lU.makeSpan(["thinbox"],[i],t),lU.makeSpan(["mord","vbox"],[i],t)},mathmlBuilder:(e,t)=>{var n=new $U.MathNode("mpadded",[qU(e.body,t)]);if("rlap"!==e.alignment){var r="llap"===e.alignment?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}}),yU({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,i=r.mode;r.switchMode("math");var o="\\("===n?"\\)":"$",a=r.parseExpression(!1,o);return r.expect(o),r.switchMode(i),{type:"styling",mode:r.mode,style:"text",body:a}}}),yU({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new Sz("Mismatched "+e.funcName)}});var mV=(e,t)=>{switch(t.style.size){case Fz.DISPLAY.size:return e.display;case Fz.TEXT.size:return e.text;case Fz.SCRIPT.size:return e.script;case Fz.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};yU({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:_U(t[0]),text:_U(t[1]),script:_U(t[2]),scriptscript:_U(t[3])}},htmlBuilder:(e,t)=>{var n=mV(e,t),r=TU(n,t,!1);return lU.makeFragment(r)},mathmlBuilder:(e,t)=>{var n=mV(e,t);return VU(n,t)}});var yV=(e,t,n,r,i,o,a)=>{e=lU.makeSpan([],[e]);var s,l,c,u=n&&Nz.isCharacterBox(n);if(t){var d=RU(t,r.havingStyle(i.sup()),r);l={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-d.depth)}}if(n){var h=RU(n,r.havingStyle(i.sub()),r);s={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-h.height)}}if(l&&s){var p=r.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+e.depth+a;c=lU.makeVList({positionType:"bottom",positionData:p,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:oF(-o)},{type:"kern",size:s.kern},{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:oF(o)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(s){var f=e.height-a;c=lU.makeVList({positionType:"top",positionData:f,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:oF(-o)},{type:"kern",size:s.kern},{type:"elem",elem:e}]},r)}else{if(!l)return e;var g=e.depth+a;c=lU.makeVList({positionType:"bottom",positionData:g,children:[{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:oF(o)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}var m=[c];if(s&&0!==o&&!u){var y=lU.makeSpan(["mspace"],[],r);y.style.marginRight=oF(o),m.unshift(y)}return lU.makeSpan(["mop","op-limits"],m,r)},vV=["\\smallint"],bV=(e,t)=>{var n,r,i,o=!1;"supsub"===e.type?(n=e.sup,r=e.sub,i=QU(e.base,"op"),o=!0):i=QU(e,"op");var a,s=t.style,l=!1;if(s.size===Fz.DISPLAY.size&&i.symbol&&!Nz.contains(vV,i.name)&&(l=!0),i.symbol){var c=l?"Size2-Regular":"Size1-Regular",u="";if("\\oiint"!==i.name&&"\\oiiint"!==i.name||(u=i.name.substr(1),i.name="oiint"===u?"\\iint":"\\iiint"),a=lU.makeSymbol(i.name,c,"math",t,["mop","op-symbol",l?"large-op":"small-op"]),u.length>0){var d=a.italic,h=lU.staticSvg(u+"Size"+(l?"2":"1"),t);a=lU.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:0},{type:"elem",elem:h,shift:l?.08:0}]},t),i.name="\\"+u,a.classes.unshift("mop"),a.italic=d}}else if(i.body){var p=TU(i.body,t,!0);1===p.length&&p[0]instanceof fF?(a=p[0]).classes[0]="mop":a=lU.makeSpan(["mop"],p,t)}else{for(var f=[],g=1;g<i.name.length;g++)f.push(lU.mathsym(i.name[g],i.mode,t));a=lU.makeSpan(["mop"],f,t)}var m=0,y=0;return(a instanceof fF||"\\oiint"===i.name||"\\oiiint"===i.name)&&!i.suppressBaseShift&&(m=(a.height-a.depth)/2-t.fontMetrics().axisHeight,y=a.italic),o?yV(a,n,r,t,s,y,m):(m&&(a.style.position="relative",a.style.top=oF(m)),a)},_V=(e,t)=>{var n;if(e.symbol)n=new LU("mo",[zU(e.name,e.mode)]),Nz.contains(vV,e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new LU("mo",HU(e.body,t));else{n=new LU("mi",[new BU(e.name.slice(1))]);var r=new LU("mo",[zU("","text")]);n=e.parentIsSupSub?new LU("mrow",[n,r]):PU([n,r])}return n},wV={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};yU({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=r;return 1===i.length&&(i=wV[i]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:bV,mathmlBuilder:_V}),yU({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:_U(r)}},htmlBuilder:bV,mathmlBuilder:_V});var xV={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};yU({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:bV,mathmlBuilder:_V}),yU({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:bV,mathmlBuilder:_V}),yU({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e,r=n;return 1===r.length&&(r=xV[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:bV,mathmlBuilder:_V});var SV=(e,t)=>{var n,r,i,o,a=!1;if("supsub"===e.type?(n=e.sup,r=e.sub,i=QU(e.base,"operatorname"),a=!0):i=QU(e,"operatorname"),i.body.length>0){for(var s=i.body.map((e=>{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e})),l=TU(s,t.withFont("mathrm"),!0),c=0;c<l.length;c++){var u=l[c];u instanceof fF&&(u.text=u.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}o=lU.makeSpan(["mop"],l,t)}else o=lU.makeSpan(["mop"],[],t);return a?yV(o,n,r,t,t.style,0,0):o};function CV(e,t,n){for(var r=TU(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,o=0;o<r.length;o++){var a=r[o].classes.indexOf("sizing");a<0?Array.prototype.push.apply(r[o].classes,t.sizingClasses(n)):r[o].classes[a+1]==="reset-size"+t.size&&(r[o].classes[a+1]="reset-size"+n.size),r[o].height*=i,r[o].depth*=i}return lU.makeFragment(r)}yU({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"operatorname",mode:n.mode,body:_U(i),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},htmlBuilder:SV,mathmlBuilder:(e,t)=>{for(var n=HU(e.body,t.withFont("mathrm")),r=!0,i=0;i<n.length;i++){var o=n[i];if(o instanceof $U.SpaceNode);else if(o instanceof $U.MathNode)switch(o.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":var a=o.children[0];1===o.children.length&&a instanceof $U.TextNode?a.text=a.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):r=!1;break;default:r=!1}else r=!1}if(r){var s=n.map((e=>e.toText())).join("");n=[new $U.TextNode(s)]}var l=new $U.MathNode("mi",n);l.setAttribute("mathvariant","normal");var c=new $U.MathNode("mo",[zU("","text")]);return e.parentIsSupSub?new $U.MathNode("mrow",[l,c]):$U.newDocumentFragment([l,c])}}),KH("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),vU({type:"ordgroup",htmlBuilder:(e,t)=>e.semisimple?lU.makeFragment(TU(e.body,t,!1)):lU.makeSpan(["mord"],TU(e.body,t,!0),t),mathmlBuilder:(e,t)=>VU(e.body,t,!0)}),yU({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(e,t){var n=RU(e.body,t.havingCrampedStyle()),r=lU.makeLineSpan("overline-line",t),i=t.fontMetrics().defaultRuleThickness,o=lU.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r},{type:"kern",size:i}]},t);return lU.makeSpan(["mord","overline"],[o],t)},mathmlBuilder(e,t){var n=new $U.MathNode("mo",[new $U.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new $U.MathNode("mover",[qU(e.body,t),n]);return r.setAttribute("accent","true"),r}}),yU({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"phantom",mode:n.mode,body:_U(r)}},htmlBuilder:(e,t)=>{var n=TU(e.body,t.withPhantom(),!1);return lU.makeFragment(n)},mathmlBuilder:(e,t)=>{var n=HU(e.body,t);return new $U.MathNode("mphantom",n)}}),yU({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"hphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=lU.makeSpan([],[RU(e.body,t.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(var r=0;r<n.children.length;r++)n.children[r].height=0,n.children[r].depth=0;return n=lU.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},t),lU.makeSpan(["mord"],[n],t)},mathmlBuilder:(e,t)=>{var n=HU(_U(e.body),t),r=new $U.MathNode("mphantom",n),i=new $U.MathNode("mpadded",[r]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i}}),yU({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=lU.makeSpan(["inner"],[RU(e.body,t.withPhantom())]),r=lU.makeSpan(["fix"],[]);return lU.makeSpan(["mord","rlap"],[n,r],t)},mathmlBuilder:(e,t)=>{var n=HU(_U(e.body),t),r=new $U.MathNode("mphantom",n),i=new $U.MathNode("mpadded",[r]);return i.setAttribute("width","0px"),i}}),yU({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e,r=QU(t[0],"size").value,i=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=RU(e.body,t),r=iF(e.dy,t);return lU.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]},t)},mathmlBuilder(e,t){var n=new $U.MathNode("mpadded",[qU(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}}),yU({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),yU({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(e,t,n){var{parser:r}=e,i=n[0],o=QU(t[0],"size"),a=QU(t[1],"size");return{type:"rule",mode:r.mode,shift:i&&QU(i,"size").value,width:o.value,height:a.value}},htmlBuilder(e,t){var n=lU.makeSpan(["mord","rule"],[],t),r=iF(e.width,t),i=iF(e.height,t),o=e.shift?iF(e.shift,t):0;return n.style.borderRightWidth=oF(r),n.style.borderTopWidth=oF(i),n.style.bottom=oF(o),n.width=r,n.height=i+o,n.depth=-o,n.maxFontSize=1.125*i*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=iF(e.width,t),r=iF(e.height,t),i=e.shift?iF(e.shift,t):0,o=t.color&&t.getColor()||"black",a=new $U.MathNode("mspace");a.setAttribute("mathbackground",o),a.setAttribute("width",oF(n)),a.setAttribute("height",oF(r));var s=new $U.MathNode("mpadded",[a]);return i>=0?s.setAttribute("height",oF(i)):(s.setAttribute("height",oF(i)),s.setAttribute("depth",oF(-i))),s.setAttribute("voffset",oF(i)),s}});var EV=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];yU({type:"sizing",names:EV,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:i}=e,o=i.parseExpression(!1,n);return{type:"sizing",mode:i.mode,size:EV.indexOf(r)+1,body:o}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return CV(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=HU(e.body,n),i=new $U.MathNode("mstyle",r);return i.setAttribute("mathsize",oF(n.sizeMultiplier)),i}}),yU({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,i=!1,o=!1,a=n[0]&&QU(n[0],"ordgroup");if(a)for(var s="",l=0;l<a.body.length;++l){if("t"===(s=a.body[l].text))i=!0;else{if("b"!==s){i=!1,o=!1;break}o=!0}}else i=!0,o=!0;var c=t[0];return{type:"smash",mode:r.mode,body:c,smashHeight:i,smashDepth:o}},htmlBuilder:(e,t)=>{var n=lU.makeSpan([],[RU(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0,n.children))for(var r=0;r<n.children.length;r++)n.children[r].height=0;if(e.smashDepth&&(n.depth=0,n.children))for(var i=0;i<n.children.length;i++)n.children[i].depth=0;var o=lU.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},t);return lU.makeSpan(["mord"],[o],t)},mathmlBuilder:(e,t)=>{var n=new $U.MathNode("mpadded",[qU(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}}),yU({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,i=n[0],o=t[0];return{type:"sqrt",mode:r.mode,body:o,index:i}},htmlBuilder(e,t){var n=RU(e.body,t.havingCrampedStyle());0===n.height&&(n.height=t.fontMetrics().xHeight),n=lU.wrapFragment(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;t.style.id<Fz.TEXT.id&&(i=t.fontMetrics().xHeight);var o=r+i/4,a=n.height+n.depth+o+r,{span:s,ruleWidth:l,advanceWidth:c}=PH.sqrtImage(a,t),u=s.height-l;u>n.height+n.depth+o&&(o=(o+u-n.height-n.depth)/2);var d=s.height-n.height-o-l;n.style.paddingLeft=oF(c);var h=lU.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+d)},{type:"elem",elem:s},{type:"kern",size:l}]},t);if(e.index){var p=t.havingStyle(Fz.SCRIPTSCRIPT),f=RU(e.index,p,t),g=.6*(h.height-h.depth),m=lU.makeVList({positionType:"shift",positionData:-g,children:[{type:"elem",elem:f}]},t),y=lU.makeSpan(["root"],[m]);return lU.makeSpan(["mord","sqrt"],[y,h],t)}return lU.makeSpan(["mord","sqrt"],[h],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new $U.MathNode("mroot",[qU(n,t),qU(r,t)]):new $U.MathNode("msqrt",[qU(n,t)])}});var TV={display:Fz.DISPLAY,text:Fz.TEXT,script:Fz.SCRIPT,scriptscript:Fz.SCRIPTSCRIPT};yU({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:i}=e,o=i.parseExpression(!0,n),a=r.slice(1,r.length-5);return{type:"styling",mode:i.mode,style:a,body:o}},htmlBuilder(e,t){var n=TV[e.style],r=t.havingStyle(n).withFont("");return CV(e.body,r,t)},mathmlBuilder(e,t){var n=TV[e.style],r=t.havingStyle(n),i=HU(e.body,r),o=new $U.MathNode("mstyle",i),a={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return o.setAttribute("scriptlevel",a[0]),o.setAttribute("displaystyle",a[1]),o}});vU({type:"supsub",htmlBuilder(e,t){var n=function(e,t){var n=e.base;return n?"op"===n.type?n.limits&&(t.style.size===Fz.DISPLAY.size||n.alwaysHandleSupSub)?bV:null:"operatorname"===n.type?n.alwaysHandleSupSub&&(t.style.size===Fz.DISPLAY.size||n.limits)?SV:null:"accent"===n.type?Nz.isCharacterBox(n.base)?nH:null:"horizBrace"===n.type&&!e.sub===n.isOver?fV:null:null}(e,t);if(n)return n(e,t);var r,i,o,{base:a,sup:s,sub:l}=e,c=RU(a,t),u=t.fontMetrics(),d=0,h=0,p=a&&Nz.isCharacterBox(a);if(s){var f=t.havingStyle(t.style.sup());r=RU(s,f,t),p||(d=c.height-f.fontMetrics().supDrop*f.sizeMultiplier/t.sizeMultiplier)}if(l){var g=t.havingStyle(t.style.sub());i=RU(l,g,t),p||(h=c.depth+g.fontMetrics().subDrop*g.sizeMultiplier/t.sizeMultiplier)}o=t.style===Fz.DISPLAY?u.sup1:t.style.cramped?u.sup3:u.sup2;var m,y=t.sizeMultiplier,v=oF(.5/u.ptPerEm/y),b=null;if(i){var _=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(c instanceof fF||_)&&(b=oF(-c.italic))}if(r&&i){d=Math.max(d,o,r.depth+.25*u.xHeight),h=Math.max(h,u.sub2);var w=4*u.defaultRuleThickness;if(d-r.depth-(i.height-h)<w){h=w-(d-r.depth)+i.height;var x=.8*u.xHeight-(d-r.depth);x>0&&(d+=x,h-=x)}var S=[{type:"elem",elem:i,shift:h,marginRight:v,marginLeft:b},{type:"elem",elem:r,shift:-d,marginRight:v}];m=lU.makeVList({positionType:"individualShift",children:S},t)}else if(i){h=Math.max(h,u.sub1,i.height-.8*u.xHeight);var C=[{type:"elem",elem:i,marginLeft:b,marginRight:v}];m=lU.makeVList({positionType:"shift",positionData:h,children:C},t)}else{if(!r)throw new Error("supsub must have either sup or sub.");d=Math.max(d,o,r.depth+.25*u.xHeight),m=lU.makeVList({positionType:"shift",positionData:-d,children:[{type:"elem",elem:r,marginRight:v}]},t)}var E=OU(c,"right")||"mord";return lU.makeSpan([E],[c,lU.makeSpan(["msupsub"],[m])],t)},mathmlBuilder(e,t){var n,r=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(r=!0,n=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var i,o=[qU(e.base,t)];if(e.sub&&o.push(qU(e.sub,t)),e.sup&&o.push(qU(e.sup,t)),r)i=n?"mover":"munder";else if(e.sub)if(e.sup){var a=e.base;i=a&&"op"===a.type&&a.limits&&t.style===Fz.DISPLAY||a&&"operatorname"===a.type&&a.alwaysHandleSupSub&&(t.style===Fz.DISPLAY||a.limits)?"munderover":"msubsup"}else{var s=e.base;i=s&&"op"===s.type&&s.limits&&(t.style===Fz.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===Fz.DISPLAY)?"munder":"msub"}else{var l=e.base;i=l&&"op"===l.type&&l.limits&&(t.style===Fz.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===Fz.DISPLAY)?"mover":"msup"}return new $U.MathNode(i,o)}}),vU({type:"atom",htmlBuilder:(e,t)=>lU.mathsym(e.text,e.mode,t,["m"+e.family]),mathmlBuilder(e,t){var n=new $U.MathNode("mo",[zU(e.text,e.mode)]);if("bin"===e.family){var r=UU(e,t);"bold-italic"===r&&n.setAttribute("mathvariant",r)}else"punct"===e.family?n.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||n.setAttribute("stretchy","false");return n}});var kV={mi:"italic",mn:"normal",mtext:"normal"};vU({type:"mathord",htmlBuilder:(e,t)=>lU.makeOrd(e,t,"mathord"),mathmlBuilder(e,t){var n=new $U.MathNode("mi",[zU(e.text,e.mode,t)]),r=UU(e,t)||"italic";return r!==kV[n.type]&&n.setAttribute("mathvariant",r),n}}),vU({type:"textord",htmlBuilder:(e,t)=>lU.makeOrd(e,t,"textord"),mathmlBuilder(e,t){var n,r=zU(e.text,e.mode,t),i=UU(e,t)||"normal";return n="text"===e.mode?new $U.MathNode("mtext",[r]):/[0-9]/.test(e.text)?new $U.MathNode("mn",[r]):"\\prime"===e.text?new $U.MathNode("mo",[r]):new $U.MathNode("mi",[r]),i!==kV[n.type]&&n.setAttribute("mathvariant",i),n}});var NV={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},AV={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};vU({type:"spacing",htmlBuilder(e,t){if(AV.hasOwnProperty(e.text)){var n=AV[e.text].className||"";if("text"===e.mode){var r=lU.makeOrd(e,t,"textord");return r.classes.push(n),r}return lU.makeSpan(["mspace",n],[lU.mathsym(e.text,e.mode,t)],t)}if(NV.hasOwnProperty(e.text))return lU.makeSpan(["mspace",NV[e.text]],[],t);throw new Sz('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(!AV.hasOwnProperty(e.text)){if(NV.hasOwnProperty(e.text))return new $U.MathNode("mspace");throw new Sz('Unknown type of space "'+e.text+'"')}return new $U.MathNode("mtext",[new $U.TextNode(" ")])}});var OV=()=>{var e=new $U.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};vU({type:"tag",mathmlBuilder(e,t){var n=new $U.MathNode("mtable",[new $U.MathNode("mtr",[OV(),new $U.MathNode("mtd",[VU(e.body,t)]),OV(),new $U.MathNode("mtd",[VU(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var MV={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},RV={"\\textbf":"textbf","\\textmd":"textmd"},DV={"\\textit":"textit","\\textup":"textup"},IV=(e,t)=>{var n=e.font;return n?MV[n]?t.withTextFontFamily(MV[n]):RV[n]?t.withTextFontWeight(RV[n]):t.withTextFontShape(DV[n]):t};yU({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"text",mode:n.mode,body:_U(i),font:r}},htmlBuilder(e,t){var n=IV(e,t),r=TU(e.body,n,!0);return lU.makeSpan(["mord","text"],r,n)},mathmlBuilder(e,t){var n=IV(e,t);return VU(e.body,n)}}),yU({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"underline",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=RU(e.body,t),r=lU.makeLineSpan("underline-line",t),i=t.fontMetrics().defaultRuleThickness,o=lU.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:i},{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n}]},t);return lU.makeSpan(["mord","underline"],[o],t)},mathmlBuilder(e,t){var n=new $U.MathNode("mo",[new $U.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new $U.MathNode("munder",[qU(e.body,t),n]);return r.setAttribute("accentunder","true"),r}}),yU({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"vcenter",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=RU(e.body,t),r=t.fontMetrics().axisHeight,i=.5*(n.height-r-(n.depth+r));return lU.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:n}]},t)},mathmlBuilder:(e,t)=>new $U.MathNode("mpadded",[qU(e.body,t)],["vcenter"])}),yU({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new Sz("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=PV(e),r=[],i=t.havingStyle(t.style.text()),o=0;o<n.length;o++){var a=n[o];"~"===a&&(a="\\textasciitilde"),r.push(lU.makeSymbol(a,"Typewriter-Regular",e.mode,i,["mord","texttt"]))}return lU.makeSpan(["mord","text"].concat(i.sizingClasses(t)),lU.tryCombineChars(r),i)},mathmlBuilder(e,t){var n=new $U.TextNode(PV(e)),r=new $U.MathNode("mtext",[n]);return r.setAttribute("mathvariant","monospace"),r}});var PV=e=>e.body.replace(/ /g,e.star?"␣":" "),LV=fU,BV=new RegExp("[̀-ͯ]+$");class $V{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp("([ \r\n\t]+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧-豈-][̀-ͯ]*|[\ud800-\udbff][\udc00-\udfff][̀-ͯ]*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|(\\\\[a-zA-Z@]+)[ \r\n\t]*|\\\\[^\ud800-\udfff])","g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new xz("EOF",new wz(this,t,t));var n=this.tokenRegex.exec(e);if(null===n||n.index!==t)throw new Sz("Unexpected character: '"+e[t]+"'",new xz(e[t],new wz(this,t,t+1)));var r=n[6]||n[3]||(n[2]?"\\ ":" ");if(14===this.catcodes[r]){var i=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===i?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=i+1,this.lex()}return new xz(r,new wz(this,t,this.tokenRegex.lastIndex))}}class zV{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new Sz("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,n){if(void 0===n&&(n=!1),n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(e)&&(i[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var FV=qH;KH("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),KH("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),KH("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),KH("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),KH("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return 1===t[0].length&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),KH("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),KH("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var UV={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};KH("\\char",(function(e){var t,n=e.popToken(),r="";if("'"===n.text)t=8,n=e.popToken();else if('"'===n.text)t=16,n=e.popToken();else if("`"===n.text)if("\\"===(n=e.popToken()).text[0])r=n.text.charCodeAt(1);else{if("EOF"===n.text)throw new Sz("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(null==(r=UV[n.text])||r>=t)throw new Sz("Invalid base-"+t+" digit "+n.text);for(var i;null!=(i=UV[e.future().text])&&i<t;)r*=t,r+=i,e.popToken()}return"\\@char{"+r+"}"}));var HV=(e,t,n)=>{var r=e.consumeArg().tokens;if(1!==r.length)throw new Sz("\\newcommand's first argument must be a macro name");var i=r[0].text,o=e.isDefined(i);if(o&&!t)throw new Sz("\\newcommand{"+i+"} attempting to redefine "+i+"; use \\renewcommand");if(!o&&!n)throw new Sz("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var a=0;if(1===(r=e.consumeArg().tokens).length&&"["===r[0].text){for(var s="",l=e.expandNextToken();"]"!==l.text&&"EOF"!==l.text;)s+=l.text,l=e.expandNextToken();if(!s.match(/^\s*[0-9]+\s*$/))throw new Sz("Invalid number of arguments: "+s);a=parseInt(s),r=e.consumeArg().tokens}return e.macros.set(i,{tokens:r,numArgs:a}),""};KH("\\newcommand",(e=>HV(e,!1,!0))),KH("\\renewcommand",(e=>HV(e,!0,!1))),KH("\\providecommand",(e=>HV(e,!0,!0))),KH("\\message",(e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((e=>e.text)).join("")),""})),KH("\\errmessage",(e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((e=>e.text)).join("")),""})),KH("\\show",(e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),LV[n],wF.math[n],wF.text[n]),""})),KH("\\bgroup","{"),KH("\\egroup","}"),KH("~","\\nobreakspace"),KH("\\lq","`"),KH("\\rq","'"),KH("\\aa","\\r a"),KH("\\AA","\\r A"),KH("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),KH("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),KH("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),KH("ℬ","\\mathscr{B}"),KH("ℰ","\\mathscr{E}"),KH("ℱ","\\mathscr{F}"),KH("ℋ","\\mathscr{H}"),KH("ℐ","\\mathscr{I}"),KH("ℒ","\\mathscr{L}"),KH("ℳ","\\mathscr{M}"),KH("ℛ","\\mathscr{R}"),KH("ℭ","\\mathfrak{C}"),KH("ℌ","\\mathfrak{H}"),KH("ℨ","\\mathfrak{Z}"),KH("\\Bbbk","\\Bbb{k}"),KH("·","\\cdotp"),KH("\\llap","\\mathllap{\\textrm{#1}}"),KH("\\rlap","\\mathrlap{\\textrm{#1}}"),KH("\\clap","\\mathclap{\\textrm{#1}}"),KH("\\mathstrut","\\vphantom{(}"),KH("\\underbar","\\underline{\\text{#1}}"),KH("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),KH("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),KH("\\ne","\\neq"),KH("≠","\\neq"),KH("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),KH("∉","\\notin"),KH("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),KH("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),KH("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),KH("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),KH("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),KH("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),KH("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),KH("⟂","\\perp"),KH("‼","\\mathclose{!\\mkern-0.8mu!}"),KH("∌","\\notni"),KH("⌜","\\ulcorner"),KH("⌝","\\urcorner"),KH("⌞","\\llcorner"),KH("⌟","\\lrcorner"),KH("©","\\copyright"),KH("®","\\textregistered"),KH("️","\\textregistered"),KH("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),KH("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),KH("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),KH("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),KH("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),KH("⋮","\\vdots"),KH("\\varGamma","\\mathit{\\Gamma}"),KH("\\varDelta","\\mathit{\\Delta}"),KH("\\varTheta","\\mathit{\\Theta}"),KH("\\varLambda","\\mathit{\\Lambda}"),KH("\\varXi","\\mathit{\\Xi}"),KH("\\varPi","\\mathit{\\Pi}"),KH("\\varSigma","\\mathit{\\Sigma}"),KH("\\varUpsilon","\\mathit{\\Upsilon}"),KH("\\varPhi","\\mathit{\\Phi}"),KH("\\varPsi","\\mathit{\\Psi}"),KH("\\varOmega","\\mathit{\\Omega}"),KH("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),KH("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),KH("\\boxed","\\fbox{$\\displaystyle{#1}$}"),KH("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),KH("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),KH("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var VV={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};KH("\\dots",(function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in VV?t=VV[n]:("\\not"===n.substr(0,4)||n in wF.math&&Nz.contains(["bin","rel"],wF.math[n].group))&&(t="\\dotsb"),t}));var qV={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};KH("\\dotso",(function(e){return e.future().text in qV?"\\ldots\\,":"\\ldots"})),KH("\\dotsc",(function(e){var t=e.future().text;return t in qV&&","!==t?"\\ldots\\,":"\\ldots"})),KH("\\cdots",(function(e){return e.future().text in qV?"\\@cdots\\,":"\\@cdots"})),KH("\\dotsb","\\cdots"),KH("\\dotsm","\\cdots"),KH("\\dotsi","\\!\\cdots"),KH("\\dotsx","\\ldots\\,"),KH("\\DOTSI","\\relax"),KH("\\DOTSB","\\relax"),KH("\\DOTSX","\\relax"),KH("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),KH("\\,","\\tmspace+{3mu}{.1667em}"),KH("\\thinspace","\\,"),KH("\\>","\\mskip{4mu}"),KH("\\:","\\tmspace+{4mu}{.2222em}"),KH("\\medspace","\\:"),KH("\\;","\\tmspace+{5mu}{.2777em}"),KH("\\thickspace","\\;"),KH("\\!","\\tmspace-{3mu}{.1667em}"),KH("\\negthinspace","\\!"),KH("\\negmedspace","\\tmspace-{4mu}{.2222em}"),KH("\\negthickspace","\\tmspace-{5mu}{.277em}"),KH("\\enspace","\\kern.5em "),KH("\\enskip","\\hskip.5em\\relax"),KH("\\quad","\\hskip1em\\relax"),KH("\\qquad","\\hskip2em\\relax"),KH("\\tag","\\@ifstar\\tag@literal\\tag@paren"),KH("\\tag@paren","\\tag@literal{({#1})}"),KH("\\tag@literal",(e=>{if(e.macros.get("\\df@tag"))throw new Sz("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),KH("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),KH("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),KH("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),KH("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),KH("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),KH("\\newline","\\\\\\relax"),KH("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var KV=oF(Wz["Main-Regular"]["T".charCodeAt(0)][1]-.7*Wz["Main-Regular"]["A".charCodeAt(0)][1]);KH("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+KV+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),KH("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+KV+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),KH("\\hspace","\\@ifstar\\@hspacer\\@hspace"),KH("\\@hspace","\\hskip #1\\relax"),KH("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),KH("\\ordinarycolon",":"),KH("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),KH("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),KH("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),KH("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),KH("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),KH("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),KH("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),KH("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),KH("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),KH("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),KH("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),KH("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),KH("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),KH("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),KH("∷","\\dblcolon"),KH("∹","\\eqcolon"),KH("≔","\\coloneqq"),KH("≕","\\eqqcolon"),KH("⩴","\\Coloneqq"),KH("\\ratio","\\vcentcolon"),KH("\\coloncolon","\\dblcolon"),KH("\\colonequals","\\coloneqq"),KH("\\coloncolonequals","\\Coloneqq"),KH("\\equalscolon","\\eqqcolon"),KH("\\equalscoloncolon","\\Eqqcolon"),KH("\\colonminus","\\coloneq"),KH("\\coloncolonminus","\\Coloneq"),KH("\\minuscolon","\\eqcolon"),KH("\\minuscoloncolon","\\Eqcolon"),KH("\\coloncolonapprox","\\Colonapprox"),KH("\\coloncolonsim","\\Colonsim"),KH("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),KH("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),KH("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),KH("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),KH("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),KH("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),KH("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),KH("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),KH("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),KH("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),KH("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),KH("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),KH("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),KH("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),KH("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),KH("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),KH("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),KH("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),KH("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),KH("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),KH("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),KH("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),KH("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),KH("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),KH("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),KH("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),KH("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),KH("\\imath","\\html@mathml{\\@imath}{ı}"),KH("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),KH("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),KH("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),KH("⟦","\\llbracket"),KH("⟧","\\rrbracket"),KH("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),KH("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),KH("⦃","\\lBrace"),KH("⦄","\\rBrace"),KH("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),KH("⦵","\\minuso"),KH("\\darr","\\downarrow"),KH("\\dArr","\\Downarrow"),KH("\\Darr","\\Downarrow"),KH("\\lang","\\langle"),KH("\\rang","\\rangle"),KH("\\uarr","\\uparrow"),KH("\\uArr","\\Uparrow"),KH("\\Uarr","\\Uparrow"),KH("\\N","\\mathbb{N}"),KH("\\R","\\mathbb{R}"),KH("\\Z","\\mathbb{Z}"),KH("\\alef","\\aleph"),KH("\\alefsym","\\aleph"),KH("\\Alpha","\\mathrm{A}"),KH("\\Beta","\\mathrm{B}"),KH("\\bull","\\bullet"),KH("\\Chi","\\mathrm{X}"),KH("\\clubs","\\clubsuit"),KH("\\cnums","\\mathbb{C}"),KH("\\Complex","\\mathbb{C}"),KH("\\Dagger","\\ddagger"),KH("\\diamonds","\\diamondsuit"),KH("\\empty","\\emptyset"),KH("\\Epsilon","\\mathrm{E}"),KH("\\Eta","\\mathrm{H}"),KH("\\exist","\\exists"),KH("\\harr","\\leftrightarrow"),KH("\\hArr","\\Leftrightarrow"),KH("\\Harr","\\Leftrightarrow"),KH("\\hearts","\\heartsuit"),KH("\\image","\\Im"),KH("\\infin","\\infty"),KH("\\Iota","\\mathrm{I}"),KH("\\isin","\\in"),KH("\\Kappa","\\mathrm{K}"),KH("\\larr","\\leftarrow"),KH("\\lArr","\\Leftarrow"),KH("\\Larr","\\Leftarrow"),KH("\\lrarr","\\leftrightarrow"),KH("\\lrArr","\\Leftrightarrow"),KH("\\Lrarr","\\Leftrightarrow"),KH("\\Mu","\\mathrm{M}"),KH("\\natnums","\\mathbb{N}"),KH("\\Nu","\\mathrm{N}"),KH("\\Omicron","\\mathrm{O}"),KH("\\plusmn","\\pm"),KH("\\rarr","\\rightarrow"),KH("\\rArr","\\Rightarrow"),KH("\\Rarr","\\Rightarrow"),KH("\\real","\\Re"),KH("\\reals","\\mathbb{R}"),KH("\\Reals","\\mathbb{R}"),KH("\\Rho","\\mathrm{P}"),KH("\\sdot","\\cdot"),KH("\\sect","\\S"),KH("\\spades","\\spadesuit"),KH("\\sub","\\subset"),KH("\\sube","\\subseteq"),KH("\\supe","\\supseteq"),KH("\\Tau","\\mathrm{T}"),KH("\\thetasym","\\vartheta"),KH("\\weierp","\\wp"),KH("\\Zeta","\\mathrm{Z}"),KH("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),KH("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),KH("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),KH("\\bra","\\mathinner{\\langle{#1}|}"),KH("\\ket","\\mathinner{|{#1}\\rangle}"),KH("\\braket","\\mathinner{\\langle{#1}\\rangle}"),KH("\\Bra","\\left\\langle#1\\right|"),KH("\\Ket","\\left|#1\\right\\rangle");var WV=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,o=t.consumeArg().tokens,a=t.macros.get("|"),s=t.macros.get("\\|");t.macros.beginGroup();var l=t=>n=>{e&&(n.macros.set("|",a),i.length&&n.macros.set("\\|",s));var o=t;!t&&i.length&&("|"===n.future().text&&(n.popToken(),o=!0));return{tokens:o?i:r,numArgs:0}};t.macros.set("|",l(!1)),i.length&&t.macros.set("\\|",l(!0));var c=t.consumeArg().tokens,u=t.expandTokens([...o,...c,...n]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};KH("\\bra@ket",WV(!1)),KH("\\bra@set",WV(!0)),KH("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),KH("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),KH("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),KH("\\angln","{\\angl n}"),KH("\\blue","\\textcolor{##6495ed}{#1}"),KH("\\orange","\\textcolor{##ffa500}{#1}"),KH("\\pink","\\textcolor{##ff00af}{#1}"),KH("\\red","\\textcolor{##df0030}{#1}"),KH("\\green","\\textcolor{##28ae7b}{#1}"),KH("\\gray","\\textcolor{gray}{#1}"),KH("\\purple","\\textcolor{##9d38bd}{#1}"),KH("\\blueA","\\textcolor{##ccfaff}{#1}"),KH("\\blueB","\\textcolor{##80f6ff}{#1}"),KH("\\blueC","\\textcolor{##63d9ea}{#1}"),KH("\\blueD","\\textcolor{##11accd}{#1}"),KH("\\blueE","\\textcolor{##0c7f99}{#1}"),KH("\\tealA","\\textcolor{##94fff5}{#1}"),KH("\\tealB","\\textcolor{##26edd5}{#1}"),KH("\\tealC","\\textcolor{##01d1c1}{#1}"),KH("\\tealD","\\textcolor{##01a995}{#1}"),KH("\\tealE","\\textcolor{##208170}{#1}"),KH("\\greenA","\\textcolor{##b6ffb0}{#1}"),KH("\\greenB","\\textcolor{##8af281}{#1}"),KH("\\greenC","\\textcolor{##74cf70}{#1}"),KH("\\greenD","\\textcolor{##1fab54}{#1}"),KH("\\greenE","\\textcolor{##0d923f}{#1}"),KH("\\goldA","\\textcolor{##ffd0a9}{#1}"),KH("\\goldB","\\textcolor{##ffbb71}{#1}"),KH("\\goldC","\\textcolor{##ff9c39}{#1}"),KH("\\goldD","\\textcolor{##e07d10}{#1}"),KH("\\goldE","\\textcolor{##a75a05}{#1}"),KH("\\redA","\\textcolor{##fca9a9}{#1}"),KH("\\redB","\\textcolor{##ff8482}{#1}"),KH("\\redC","\\textcolor{##f9685d}{#1}"),KH("\\redD","\\textcolor{##e84d39}{#1}"),KH("\\redE","\\textcolor{##bc2612}{#1}"),KH("\\maroonA","\\textcolor{##ffbde0}{#1}"),KH("\\maroonB","\\textcolor{##ff92c6}{#1}"),KH("\\maroonC","\\textcolor{##ed5fa6}{#1}"),KH("\\maroonD","\\textcolor{##ca337c}{#1}"),KH("\\maroonE","\\textcolor{##9e034e}{#1}"),KH("\\purpleA","\\textcolor{##ddd7ff}{#1}"),KH("\\purpleB","\\textcolor{##c6b9fc}{#1}"),KH("\\purpleC","\\textcolor{##aa87ff}{#1}"),KH("\\purpleD","\\textcolor{##7854ab}{#1}"),KH("\\purpleE","\\textcolor{##543b78}{#1}"),KH("\\mintA","\\textcolor{##f5f9e8}{#1}"),KH("\\mintB","\\textcolor{##edf2df}{#1}"),KH("\\mintC","\\textcolor{##e0e5cc}{#1}"),KH("\\grayA","\\textcolor{##f6f7f7}{#1}"),KH("\\grayB","\\textcolor{##f0f1f2}{#1}"),KH("\\grayC","\\textcolor{##e3e5e6}{#1}"),KH("\\grayD","\\textcolor{##d6d8da}{#1}"),KH("\\grayE","\\textcolor{##babec2}{#1}"),KH("\\grayF","\\textcolor{##888d93}{#1}"),KH("\\grayG","\\textcolor{##626569}{#1}"),KH("\\grayH","\\textcolor{##3b3e40}{#1}"),KH("\\grayI","\\textcolor{##21242c}{#1}"),KH("\\kaBlue","\\textcolor{##314453}{#1}"),KH("\\kaGreen","\\textcolor{##71B307}{#1}");var jV={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class YV{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new zV(FV,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new $V(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:r,end:n}=this.consumeArg(["]"]))}else({tokens:r,start:t,end:n}=this.consumeArg());return this.pushToken(new xz("EOF",n.loc)),this.pushTokens(r),t.range(n,"")}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r,i=this.future(),o=0,a=0;do{if(r=this.popToken(),t.push(r),"{"===r.text)++o;else if("}"===r.text){if(-1===--o)throw new Sz("Extra }",r)}else if("EOF"===r.text)throw new Sz("Unexpected end of input in a macro argument, expected '"+(e&&n?e[a]:"}")+"'",r);if(e&&n)if((0===o||1===o&&"{"===e[a])&&r.text===e[a]){if(++a===e.length){t.splice(-a,a);break}}else a=0}while(0!==o||n);return"{"===i.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:i,end:r}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new Sz("The length of delimiters doesn't match the number of args!");for(var n=t[0],r=0;r<n.length;r++){var i=this.popToken();if(n[r]!==i.text)throw new Sz("Use of the macro doesn't match its definition",i)}}for(var o=[],a=0;a<e;a++)o.push(this.consumeArg(t&&t[a+1]).tokens);return o}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(null==r||e&&r.unexpandable){if(e&&null==r&&"\\"===n[0]&&!this.isDefined(n))throw new Sz("Undefined control sequence: "+n);return this.pushToken(t),t}if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new Sz("Too many expansions: infinite loop or need to increase maxExpand setting");var i=r.tokens,o=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs)for(var a=(i=i.slice()).length-1;a>=0;--a){var s=i[a];if("#"===s.text){if(0===a)throw new Sz("Incomplete placeholder at end of macro body",s);if("#"===(s=i[--a]).text)i.splice(a+1,1);else{if(!/^[1-9]$/.test(s.text))throw new Sz("Not a valid argument number",s);i.splice(a,2,...o[+s.text-1])}}}return this.pushTokens(i),i}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;){var e=this.expandOnce();if(e instanceof xz)return e.treatAsRelax&&(e.text="\\relax"),this.stack.pop()}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new xz(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;){var r=this.expandOnce(!0);r instanceof xz&&(r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!1),t.push(this.stack.pop()))}return t}expandMacroAsText(e){var t=this.expandMacro(e);return t?t.map((e=>e.text)).join(""):t}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var n=this.lexer.catcodes[e];if(null!=n&&13!==n)return}var r="function"==typeof t?t(this):t;if("string"==typeof r){var i=0;if(-1!==r.indexOf("#"))for(var o=r.replace(/##/g,"");-1!==o.indexOf("#"+(i+1));)++i;for(var a=new $V(r,this.settings),s=[],l=a.lex();"EOF"!==l.text;)s.push(l),l=a.lex();return s.reverse(),{tokens:s,numArgs:i}}return r}isDefined(e){return this.macros.has(e)||LV.hasOwnProperty(e)||wF.math.hasOwnProperty(e)||wF.text.hasOwnProperty(e)||jV.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:LV.hasOwnProperty(e)&&!LV[e].primitive}}var GV=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,JV=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),XV={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},ZV={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"};class QV{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new YV(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new Sz("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new xz("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,n}parseExpression(e,t){for(var n=[];;){"math"===this.mode&&this.consumeSpaces();var r=this.fetch();if(-1!==QV.endOfExpression.indexOf(r.text))break;if(t&&r.text===t)break;if(e&&LV[r.text]&&LV[r.text].infix)break;var i=this.parseAtom(t);if(!i)break;"internal"!==i.type&&n.push(i)}return"text"===this.mode&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var t,n=-1,r=0;r<e.length;r++)if("infix"===e[r].type){if(-1!==n)throw new Sz("only one infix operator per group",e[r].token);n=r,t=e[r].replaceWith}if(-1!==n&&t){var i,o,a=e.slice(0,n),s=e.slice(n+1);return i=1===a.length&&"ordgroup"===a[0].type?a[0]:{type:"ordgroup",mode:this.mode,body:a},o=1===s.length&&"ordgroup"===s[0].type?s[0]:{type:"ordgroup",mode:this.mode,body:s},["\\\\abovefrac"===t?this.callFunction(t,[i,e[n],o],[]):this.callFunction(t,[i,o],[])]}return e}handleSupSubscript(e){var t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();var r=this.parseGroup(e);if(!r)throw new Sz("Expected group after '"+n+"'",t);return r}formatUnsupportedCmd(e){for(var t=[],n=0;n<e.length;n++)t.push({type:"textord",mode:"text",text:e[n]});var r={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[r]}}parseAtom(e){var t,n,r=this.parseGroup("atom",e);if("text"===this.mode)return r;for(;;){this.consumeSpaces();var i=this.fetch();if("\\limits"===i.text||"\\nolimits"===i.text){if(r&&"op"===r.type){var o="\\limits"===i.text;r.limits=o,r.alwaysHandleSupSub=!0}else{if(!r||"operatorname"!==r.type)throw new Sz("Limit controls must follow a math operator",i);r.alwaysHandleSupSub&&(r.limits="\\limits"===i.text)}this.consume()}else if("^"===i.text){if(t)throw new Sz("Double superscript",i);t=this.handleSupSubscript("superscript")}else if("_"===i.text){if(n)throw new Sz("Double subscript",i);n=this.handleSupSubscript("subscript")}else if("'"===i.text){if(t)throw new Sz("Double superscript",i);var a={type:"textord",mode:this.mode,text:"\\prime"},s=[a];for(this.consume();"'"===this.fetch().text;)s.push(a),this.consume();"^"===this.fetch().text&&s.push(this.handleSupSubscript("superscript")),t={type:"ordgroup",mode:this.mode,body:s}}else{if(!JV[i.text])break;var l=JV[i.text],c=GV.test(i.text);for(this.consume();;){var u=this.fetch().text;if(!JV[u])break;if(GV.test(u)!==c)break;this.consume(),l+=JV[u]}var d=new QV(l,this.settings).parse();c?n={type:"ordgroup",mode:"math",body:d}:t={type:"ordgroup",mode:"math",body:d}}}return t||n?{type:"supsub",mode:this.mode,base:r,sup:t,sub:n}:r}parseFunction(e,t){var n=this.fetch(),r=n.text,i=LV[r];if(!i)return null;if(this.consume(),t&&"atom"!==t&&!i.allowedInArgument)throw new Sz("Got function '"+r+"' with no arguments"+(t?" as "+t:""),n);if("text"===this.mode&&!i.allowedInText)throw new Sz("Can't use function '"+r+"' in text mode",n);if("math"===this.mode&&!1===i.allowedInMath)throw new Sz("Can't use function '"+r+"' in math mode",n);var{args:o,optArgs:a}=this.parseArguments(r,i);return this.callFunction(r,o,a,n,e)}callFunction(e,t,n,r,i){var o={funcName:e,parser:this,token:r,breakOnTokenText:i},a=LV[e];if(a&&a.handler)return a.handler(o,t,n);throw new Sz("No function handler for "+e)}parseArguments(e,t){var n=t.numArgs+t.numOptionalArgs;if(0===n)return{args:[],optArgs:[]};for(var r=[],i=[],o=0;o<n;o++){var a=t.argTypes&&t.argTypes[o],s=o<t.numOptionalArgs;(t.primitive&&null==a||"sqrt"===t.type&&1===o&&null==i[0])&&(a="primitive");var l=this.parseGroupOfType("argument to '"+e+"'",a,s);if(s)i.push(l);else{if(null==l)throw new Sz("Null argument, please report this as a bug");r.push(l)}}return{args:r,optArgs:i}}parseGroupOfType(e,t,n){switch(t){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,t);case"hbox":var r=this.parseArgumentGroup(n,"text");return null!=r?{type:"styling",mode:r.mode,body:[r],style:"text"}:null;case"raw":var i=this.parseStringGroup("raw",n);return null!=i?{type:"raw",mode:"text",string:i.text}:null;case"primitive":if(n)throw new Sz("A primitive argument cannot be optional");var o=this.parseGroup(e);if(null==o)throw new Sz("Expected group as "+e,this.fetch());return o;case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new Sz("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){var n=this.gullet.scanArgument(t);if(null==n)return null;for(var r,i="";"EOF"!==(r=this.fetch()).text;)i+=r.text,this.consume();return this.consume(),n.text=i,n}parseRegexGroup(e,t){for(var n,r=this.fetch(),i=r,o="";"EOF"!==(n=this.fetch()).text&&e.test(o+n.text);)o+=(i=n).text,this.consume();if(""===o)throw new Sz("Invalid "+t+": '"+r.text+"'",r);return r.range(i,o)}parseColorGroup(e){var t=this.parseStringGroup("color",e);if(null==t)return null;var n=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new Sz("Invalid color: '"+t.text+"'",t);var r=n[0];return/^[0-9a-f]{6}$/i.test(r)&&(r="#"+r),{type:"color-token",mode:this.mode,color:r}}parseSizeGroup(e){var t,n=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;e||0!==t.text.length||(t.text="0pt",n=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new Sz("Invalid size: '"+t.text+"'",t);var i={number:+(r[1]+r[2]),unit:r[3]};if(!rF(i))throw new Sz("Invalid unit: '"+i.unit+"'",t);return{type:"size",mode:this.mode,value:i,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t)return null;var n=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:n}}parseArgumentGroup(e,t){var n=this.gullet.scanArgument(e);if(null==n)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var i=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var o={type:"ordgroup",mode:this.mode,loc:n.loc,body:i};return t&&this.switchMode(r),o}parseGroup(e,t){var n,r=this.fetch(),i=r.text;if("{"===i||"\\begingroup"===i){this.consume();var o="{"===i?"}":"\\endgroup";this.gullet.beginGroup();var a=this.parseExpression(!1,o),s=this.fetch();this.expect(o),this.gullet.endGroup(),n={type:"ordgroup",mode:this.mode,loc:wz.range(r,s),body:a,semisimple:"\\begingroup"===i||void 0}}else if(null==(n=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===i[0]&&!jV.hasOwnProperty(i)){if(this.settings.throwOnError)throw new Sz("Undefined control sequence: "+i,r);n=this.formatUnsupportedCmd(i),this.consume()}return n}formLigatures(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n],i=r.text;"-"===i&&"-"===e[n+1].text&&(n+1<t&&"-"===e[n+2].text?(e.splice(n,3,{type:"textord",mode:"text",loc:wz.range(r,e[n+2]),text:"---"}),t-=2):(e.splice(n,2,{type:"textord",mode:"text",loc:wz.range(r,e[n+1]),text:"--"}),t-=1)),"'"!==i&&"`"!==i||e[n+1].text!==i||(e.splice(n,2,{type:"textord",mode:"text",loc:wz.range(r,e[n+1]),text:i+i}),t-=1)}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),r="*"===n.charAt(0);if(r&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new Sz("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:n=n.slice(1,-1),star:r}}ZV.hasOwnProperty(t[0])&&!wF[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=ZV[t[0]]+t.substr(1));var i,o=BV.exec(t);if(o&&("i"===(t=t.substring(0,o.index))?t="ı":"j"===t&&(t="ȷ")),wF[this.mode][t]){this.settings.strict&&"math"===this.mode&&"ÐÞþ".indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var a,s=wF[this.mode][t].group,l=wz.range(e);if(bF.hasOwnProperty(s)){var c=s;a={type:"atom",mode:this.mode,family:c,loc:l,text:t}}else a={type:s,mode:this.mode,loc:l,text:t};i=a}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(Vz(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),i={type:"textord",mode:"text",loc:wz.range(e),text:t}}if(this.consume(),o)for(var u=0;u<o[0].length;u++){var d=o[0][u];if(!XV[d])throw new Sz("Unknown accent ' "+d+"'",e);var h=XV[d][this.mode]||XV[d].text;if(!h)throw new Sz("Accent "+d+" unsupported in "+this.mode+" mode",e);i={type:"accent",mode:this.mode,loc:wz.range(e),label:h,isStretchy:!1,isShifty:!0,base:i}}return i}}QV.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var eq=function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new QV(e,t);delete n.gullet.macros.current["\\df@tag"];var r=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new Sz("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:n.subparse([new xz("\\df@tag")])}]}return r},tq=function(e,t,n){t.textContent="";var r=rq(e,n).toNode();t.appendChild(r)};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),tq=function(){throw new Sz("KaTeX doesn't work in quirks mode.")});var nq=function(e,t,n){if(n.throwOnError||!(e instanceof Sz))throw e;var r=lU.makeSpan(["katex-error"],[new fF(t)]);return r.setAttribute("title",e.toString()),r.setAttribute("style","color:"+n.errorColor),r},rq=function(e,t){var n=new Mz(t);try{return function(e,t,n){var r,i=WU(n);if("mathml"===n.output)return KU(e,t,i,n.displayMode,!0);if("html"===n.output){var o=IU(e,i);r=lU.makeSpan(["katex"],[o])}else{var a=KU(e,t,i,n.displayMode,!1),s=IU(e,i);r=lU.makeSpan(["katex"],[a,s])}return jU(r,n)}(eq(e,n),e,n)}catch(aZ){return nq(aZ,e,n)}},iq={version:"0.15.6",render:tq,renderToString:function(e,t){return rq(e,t).toMarkup()},ParseError:Sz,SETTINGS_SCHEMA:Az,__parse:function(e,t){var n=new Mz(t);return eq(e,n)},__renderToDomTree:rq,__renderToHTMLTree:function(e,t){var n=new Mz(t);try{return function(e,t,n){var r=IU(e,WU(n)),i=lU.makeSpan(["katex"],[r]);return jU(i,n)}(eq(e,n),0,n)}catch(aZ){return nq(aZ,e,n)}},__setFontMetrics:function(e,t){Wz[e]=t},__defineSymbol:xF,__defineMacro:KH,__domTree:{Span:uF,Anchor:dF,SymbolNode:fF,SvgNode:gF,PathNode:mF,LineNode:yF}};const oq=a.exports.lazy((()=>_z((()=>import("./EquationComponent.6db6bfa0.js")),["assets/EquationComponent.6db6bfa0.js","assets/EquationComponent.2ae445bf.css"])));function aq(e){let t=e.getAttribute("data-lexical-equation");const n="true"===e.getAttribute("data-lexical-inline");if(t=atob(t||""),t){return{node:lq(t,n)}}return null}class sq extends wm{constructor(e,t,n){super(n),this.__equation=e,this.__inline=null!=t&&t}static getType(){return"equation"}static clone(e){return new sq(e.__equation,e.__inline,e.__key)}static importJSON(e){return lq(e.equation,e.inline)}exportJSON(){return{equation:this.getEquation(),inline:this.__inline,type:"equation",version:1}}createDOM(e){const t=document.createElement(this.__inline?"span":"div");return t.className="editor-equation",t}exportDOM(){const e=document.createElement(this.__inline?"span":"div"),t=btoa(this.__equation);return e.setAttribute("data-lexical-equation",t),e.setAttribute("data-lexical-inline",`${this.__inline}`),iq.render(this.__equation,e,{displayMode:!this.__inline,errorColor:"#cc0000",output:"html",strict:"warn",throwOnError:!1,trust:!1}),{element:e}}static importDOM(){return{div:e=>e.hasAttribute("data-lexical-equation")?{conversion:aq,priority:2}:null,span:e=>e.hasAttribute("data-lexical-equation")?{conversion:aq,priority:1}:null}}updateDOM(e){return this.__inline!==e.__inline}getTextContent(){return this.__equation}getEquation(){return this.__equation}setEquation(e){this.getWritable().__equation=e}decorate(){return Jb(a.exports.Suspense,{fallback:null,children:Jb(oq,{equation:this.__equation,inline:this.__inline,nodeKey:this.__key})})}}function lq(e="",t=!1){const n=new sq(e,t);return Ug(n)}function cq(e){return e instanceof sq}const uq=a.exports.lazy((()=>_z((()=>import("./ExcalidrawComponent.c66e3028.js")),["assets/ExcalidrawComponent.c66e3028.js","assets/ExcalidrawComponent.09670137.css","assets/ImageResizer.9cd447ab.js"])));function dq(e){const t=e.getAttribute("data-lexical-excalidraw-json");if(t){const e=pq();return e.__data=t,{node:e}}return null}class hq extends wm{constructor(e="[]",t){super(t),this.__data=e}static getType(){return"excalidraw"}static clone(e){return new hq(e.__data,e.__key)}static importJSON(e){return new hq(e.data)}exportJSON(){return{data:this.__data,type:"excalidraw",version:1}}createDOM(e){const t=document.createElement("span"),n=e.theme.image;return void 0!==n&&(t.className=n),t}updateDOM(){return!1}static importDOM(){return{span:e=>e.hasAttribute("data-lexical-excalidraw-json")?{conversion:dq,priority:1}:null}}exportDOM(e){const t=document.createElement("span"),n=e.getElementByKey(this.getKey());if(null!==n){const e=n.querySelector("svg");null!==e&&(t.innerHTML=e.outerHTML)}return t.setAttribute("data-lexical-excalidraw-json",this.__data),{element:t}}setData(e){this.getWritable().__data=e}decorate(e,t){return Jb(a.exports.Suspense,{fallback:null,children:Jb(uq,{nodeKey:this.getKey(),data:this.__data})})}}function pq(){return new hq}function fq(e){return e instanceof hq}const gq=a.exports.lazy((()=>_z((()=>import("./ImageComponent.00db88d9.js")),["assets/ImageComponent.00db88d9.js","assets/ImageComponent.faf47ab5.css","assets/LexicalNestedComposer.412b5854.js","assets/ImageResizer.9cd447ab.js"])));function mq(e){if(e instanceof HTMLImageElement){const{alt:t,src:n,width:r,height:i}=e;return{node:vq({altText:t,height:i,src:n,width:r})}}return null}class yq extends wm{constructor(e,t,n,r,i,o,a,s,l){super(l),this.__src=e,this.__altText=t,this.__maxWidth=n,this.__width=r||"inherit",this.__height=i||"inherit",this.__showCaption=o||!1,this.__caption=a||Km(),this.__captionsEnabled=s||void 0===s}static getType(){return"image"}static clone(e){return new yq(e.__src,e.__altText,e.__maxWidth,e.__width,e.__height,e.__showCaption,e.__caption,e.__captionsEnabled,e.__key)}static importJSON(e){const{altText:t,height:n,width:r,maxWidth:i,caption:o,src:a,showCaption:s}=e,l=vq({altText:t,height:n,maxWidth:i,showCaption:s,src:a,width:r}),c=l.__caption,u=c.parseEditorState(o.editorState);return u.isEmpty()||c.setEditorState(u),l}exportDOM(){const e=document.createElement("img");return e.setAttribute("src",this.__src),e.setAttribute("alt",this.__altText),e.setAttribute("width",this.__width.toString()),e.setAttribute("height",this.__height.toString()),{element:e}}static importDOM(){return{img:e=>({conversion:mq,priority:0})}}exportJSON(){return{altText:this.getAltText(),caption:this.__caption.toJSON(),height:"inherit"===this.__height?0:this.__height,maxWidth:this.__maxWidth,showCaption:this.__showCaption,src:this.getSrc(),type:"image",version:1,width:"inherit"===this.__width?0:this.__width}}setWidthAndHeight(e,t){const n=this.getWritable();n.__width=e,n.__height=t}setShowCaption(e){this.getWritable().__showCaption=e}createDOM(e){const t=document.createElement("span"),n=e.theme.image;return void 0!==n&&(t.className=n),t}updateDOM(){return!1}getSrc(){return this.__src}getAltText(){return this.__altText}decorate(){return Jb(a.exports.Suspense,{fallback:null,children:Jb(gq,{src:this.__src,altText:this.__altText,width:this.__width,height:this.__height,maxWidth:this.__maxWidth,nodeKey:this.getKey(),showCaption:this.__showCaption,caption:this.__caption,captionsEnabled:this.__captionsEnabled,resizable:!0})})}}function vq({altText:e,height:t,maxWidth:n=500,captionsEnabled:r,src:i,width:o,showCaption:a,caption:s,key:l}){return Ug(new yq(i,e,n,o,t,a,s,r,l))}function bq(e){return e instanceof yq}class _q extends Hm{static getType(){return"keyword"}static clone(e){return new _q(e.__text,e.__key)}static importJSON(e){const t=wq(e.text);return t.setFormat(e.format),t.setDetail(e.detail),t.setMode(e.mode),t.setStyle(e.style),t}exportJSON(){return{...super.exportJSON(),type:"keyword",version:1}}createDOM(e){const t=super.createDOM(e);return t.style.cursor="default",t.className="keyword",t}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}isTextEntity(){return!0}}function wq(e){return new _q(e)}function xq(e){const t=e.textContent;if(null!==t){return{node:Cq(t)}}return null}class Sq extends Hm{constructor(e,t,n){super(null!=t?t:e,n),this.__mention=e}static getType(){return"mention"}static clone(e){return new Sq(e.__mention,e.__text,e.__key)}static importJSON(e){const t=Cq(e.mentionName);return t.setTextContent(e.text),t.setFormat(e.format),t.setDetail(e.detail),t.setMode(e.mode),t.setStyle(e.style),t}exportJSON(){return{...super.exportJSON(),mentionName:this.__mention,type:"mention",version:1}}createDOM(e){const t=super.createDOM(e);return t.style.cssText="background-color: rgba(24, 119, 232, 0.2)",t.className="mention",t}exportDOM(){const e=document.createElement("span");return e.setAttribute("data-lexical-mention","true"),e.textContent=this.__text,{element:e}}static importDOM(){return{span:e=>e.hasAttribute("data-lexical-mention")?{conversion:xq,priority:1}:null}}isTextEntity(){return!0}}function Cq(e){const t=new Sq(e);return t.setMode("segmented").toggleDirectionless(),Ug(t)}const Eq=[$b,Tv,Ev,zb,nz,UD,tz,Ly,By,yq,Sq,yz,hq,sq,fz,_q];var Tq=Zu;var kq=function(e){!function(e){let t=document.createElement("input");t.type="file",t.accept=".lexical",t.addEventListener("change",(t=>{if((t=t.target).files){t=t.files[0];let n=new FileReader;n.readAsText(t,"UTF-8"),n.onload=t=>{t.target&&e(t.target.result)}}})),t.click()}((t=>{t=JSON.parse(t),t=e.parseEditorState(JSON.stringify(t.editorState)),e.setEditorState(t),e.dispatchCommand(Tq.CLEAR_HISTORY_COMMAND,void 0)}))},Nq={},Aq=Zu,Oq=h$,Mq=zy,Rq=zv,Dq=Ju,Iq=Gu;function Pq(e,t){let n={};for(let r of e)n[e=t(r)]?n[e].push(r):n[e]=[r];return n}function Lq(e){return{element:(e=Pq(e,(e=>e.type))).element||[],textFormat:e["text-format"]||[],textMatch:e["text-match"]||[]}}let Bq=/[!-/:-@[-`{-~\s]/;function $q(e,t,n,r){for(let i of t)if(null!=(t=i.export(e,(e=>zq(e,n,r)))))return t;return Aq.$isElementNode(e)?zq(e,n,r):Aq.$isDecoratorNode(e)?e.getTextContent():null}function zq(e,t,n){let r=[];e=e.getChildren();e:for(let i of e){for(let o of n)if(null!=(e=o.export(i,(e=>zq(e,t,n)),((e,n)=>Fq(e,n,t))))){r.push(e);continue e}Aq.$isLineBreakNode(i)?r.push("\n"):Aq.$isTextNode(i)?r.push(Fq(i,i.getTextContent(),t)):Aq.$isElementNode(i)?r.push(zq(i,t,n)):Aq.$isDecoratorNode(i)&&r.push(i.getTextContent())}return r.join("")}function Fq(e,t,n){let r=t.trim(),i=r,o=new Set;for(let s of n){n=s.format[0];let t=s.tag;if(Hq(e,n)&&!o.has(n)){o.add(n);var a=Uq(e,!0);Hq(a,n)||(i=t+i),Hq(a=Uq(e,!1),n)||(i+=t)}}return t.replace(r,i)}function Uq(e,t){let n=t?e.getPreviousSibling():e.getNextSibling();for(n||(e=e.getParentOrThrow()).isInline()&&(n=t?e.getPreviousSibling():e.getNextSibling());n;){if(Aq.$isElementNode(n)){if(!n.isInline())break;if(e=t?n.getLastDescendant():n.getFirstDescendant(),Aq.$isTextNode(e))return e;n=t?n.getPreviousSibling():n.getNextSibling()}if(Aq.$isTextNode(n))return n;if(!Aq.$isElementNode(n))break}return null}function Hq(e,t){return Aq.$isTextNode(e)&&e.hasFormat(t)}let Vq="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,qq=Vq&&"documentMode"in document?document.documentMode:null;Vq&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Vq&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Vq&&"InputEvent"in window&&!qq&&new window.InputEvent("input");let Kq=Vq&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Wq=Vq&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,jq=Vq&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Yq=Vq&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!jq,Gq=/^\s{0,3}$/,Jq=/^```(\w{1,10})?\s?$/;function Xq(e){let t=Lq(e),n=function(e){let t={},n={},r=[];for(let i of e){({tag:e}=i),t[e]=i;let o=e.replace(/(\*|\^|\+)/g,"\\$1");r.push(o),n[e]=Kq||Wq||Yq?new RegExp(`(${o})(?![${o}\\s])(.*?[^${o}\\s])${o}(?!${o})`):new RegExp(`(?<![\\\\${o}])(${o})((\\\\${o})?.*?[^${o}\\s](\\\\${o})?)((?<!\\\\)|(?<=\\\\\\\\))(${o})(?![\\\\${o}])`)}return{fullMatchRegExpByTag:n,openTagsRegExp:new RegExp((Kq||Wq||Yq?"":"(?<![\\\\])")+"("+r.join("|")+")","g"),transformersByTag:t}}(t.textFormat);return e=>{var r=e.split("\n"),i=r.length;(e=Aq.$getRoot()).clear();for(let p=0;p<i;p++){var o=r[p];e:{var a=r,s=p,l=e,c=a[s].match(Jq);if(c)for(var u=s,d=a.length;++u<d;)if(a[u].match(Jq)){c=Oq.$createCodeNode(c[1]),a=Aq.$createTextNode(a.slice(s+1,u).join("\n")),c.append(a),l.append(c),l=[c,u];break e}l=[null,s]}let[i,f]=l;if(null!=i)p=f;else{l=o,d=e;var h=t.element;u=n,a=t.textMatch,s=l.trim(),c=Aq.$createTextNode(s),(o=Aq.$createParagraphNode()).append(c),d.append(o);for(let{regExp:e,replace:t}of h)if(d=l.match(e)){c.setTextContent(l.slice(d[0].length)),t(o,[c],d,!0);break}Zq(c,u,a),o.isAttached()&&0<s.length&&(l=o.getPreviousSibling(),Aq.$isParagraphNode(l)||Rq.$isQuoteNode(l)||Mq.$isListNode(l))&&(u=l,Mq.$isListNode(l)&&(u=null==(l=l.getLastDescendant())?null:Dq.$findMatchingParent(l,Mq.$isListItemNode)),null!=u&&0<u.getTextContentSize()&&(u.splice(u.getChildrenSize(),0,[Aq.$createLineBreakNode(),...o.getChildren()]),o.remove()))}}r=e.getChildren();for(let t of r)r=t,Aq.$isParagraphNode(r)?(i=r.getFirstChild(),r=null==i||1===r.getChildrenSize()&&Aq.$isTextNode(i)&&Gq.test(i.getTextContent())):r=!1,r&&t.remove();e.selectEnd()}}function Zq(e,t,n){var r=e.getTextContent();let i=function(e,t){var n=e.match(t.openTagsRegExp);if(null==n)return null;for(let o of n){var r=o.replace(/^\s/,"");if(null!=(n=t.fullMatchRegExpByTag[r])&&(n=e.match(n),r=t.transformersByTag[r],null!=n&&null!=r)){if(!1!==r.intraword)return n;var{index:i=0}=n;if(r=e[i-1],i=e[i+n[0].length],!(r&&!Bq.test(r)||i&&!Bq.test(i)))return n}}return null}(r,t);if(i){var o,a;if(i[0]===r)var s=e;else{let t=(r=i.index||0)+i[0].length;0===r?[s,o]=e.splitText(t):[a,s,o]=e.splitText(r,t)}if(s.setTextContent(i[2]),e=t.transformersByTag[i[1]])for(let t of e.format)s.hasFormat(t)||s.toggleFormat(t);s.hasFormat("code")||Zq(s,t,n),a&&Zq(a,t,n),o&&Zq(o,t,n)}else Qq(e,n)}function Qq(e,t){e:for(;e;){for(let n of t){let r=e.getTextContent().match(n.importRegExp);if(!r)continue;let i,o,a,s=r.index||0,l=s+r[0].length;0===s?[i,e]=e.splitText(l):[o,i,a]=e.splitText(s,l),o&&Qq(o,t),a&&(e=a),n.replace(i,r);continue e}break}}function eK(e,t,n){let r=n.length;for(;t>=r;t--){let i=t-r;if(tK(e,i,n,0,r)&&" "!==e[i+r])return i}return-1}function tK(e,t,n,r,i){for(let o=0;o<i;o++)if(e[t+o]!==n[r+o])return!1;return!0}let nK=e=>(t,n,r)=>{(r=e(r)).append(...n),t.replace(r),r.select(0,0)},rK=e=>(t,n,r)=>{var i=t.getPreviousSibling();const o=Mq.$createListItemNode("check"===e?"x"===r[3]:void 0);Mq.$isListNode(i)&&i.getListType()===e?(i.append(o),t.remove()):((i=Mq.$createListNode(e,"number"===e?Number(r[2]):void 0)).append(o),t.replace(i)),o.append(...n),o.select(0,0),(t=Math.floor(r[1].length/4))&&o.setIndent(t)},iK=(e,t,n)=>{const r=[];var i=e.getChildren();let o=0;for(const s of i)if(Mq.$isListItemNode(s)){if(1===s.getChildrenSize()&&(i=s.getFirstChild(),Mq.$isListNode(i))){r.push(iK(i,t,n+1));continue}i=" ".repeat(4*n);var a=e.getListType();a="number"===a?`${e.getStart()+o}. `:"check"===a?`- [${s.getChecked()?"x":" "}] `:"- ",r.push(i+a+t(s)),o++}return r.join("\n")},oK={dependencies:[Rq.HeadingNode],export:(e,t)=>{if(!Rq.$isHeadingNode(e))return null;const n=Number(e.getTag().slice(1));return"#".repeat(n)+" "+t(e)},regExp:/^(#{1,6})\s/,replace:nK((e=>Rq.$createHeadingNode("h"+e[1].length))),type:"element"},aK={dependencies:[Rq.QuoteNode],export:(e,t)=>{if(!Rq.$isQuoteNode(e))return null;e=t(e).split("\n"),t=[];for(const n of e)t.push("> "+n);return t.join("\n")},regExp:/^>\s/,replace:(e,t,n,r)=>{if(r&&(n=e.getPreviousSibling(),Rq.$isQuoteNode(n)))return n.splice(n.getChildrenSize(),0,[Aq.$createLineBreakNode(),...t]),n.select(0,0),void e.remove();(n=Rq.$createQuoteNode()).append(...t),e.replace(n),n.select(0,0)},type:"element"},sK={dependencies:[Oq.CodeNode],export:e=>{if(!Oq.$isCodeNode(e))return null;const t=e.getTextContent();return"```"+(e.getLanguage()||"")+(t?"\n"+t:"")+"\n```"},regExp:/^```(\w{1,10})?\s/,replace:nK((e=>Oq.$createCodeNode(e?e[1]:void 0))),type:"element"},lK={dependencies:[Mq.ListNode,Mq.ListItemNode],export:(e,t)=>Mq.$isListNode(e)?iK(e,t,0):null,regExp:/^(\s*)[-*+]\s/,replace:rK("bullet"),type:"element"},cK={dependencies:[Mq.ListNode,Mq.ListItemNode],export:(e,t)=>Mq.$isListNode(e)?iK(e,t,0):null,regExp:/^(\s*)(?:-\s)?\s?(\[(\s|x)?\])\s/i,replace:rK("check"),type:"element"},uK={dependencies:[Mq.ListNode,Mq.ListItemNode],export:(e,t)=>Mq.$isListNode(e)?iK(e,t,0):null,regExp:/^(\s*)(\d{1,})\.\s/,replace:rK("number"),type:"element"},dK={format:["code"],tag:"`",type:"text-format"},hK={format:["highlight"],tag:"==",type:"text-format"},pK={format:["bold","italic"],tag:"***",type:"text-format"},fK={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},gK={format:["bold"],tag:"**",type:"text-format"},mK={format:["bold"],intraword:!1,tag:"__",type:"text-format"},yK={format:["strikethrough"],tag:"~~",type:"text-format"},vK={format:["italic"],tag:"*",type:"text-format"},bK={format:["italic"],intraword:!1,tag:"_",type:"text-format"},_K={dependencies:[Iq.LinkNode],export:(e,t,n)=>{if(!Iq.$isLinkNode(e))return null;t=`[${e.getTextContent()}](${e.getURL()})`;const r=e.getFirstChild();return 1===e.getChildrenSize()&&Aq.$isTextNode(r)?n(r,t):t},importRegExp:/(?:\[([^[]+)\])(?:\(([^()]+)\))/,regExp:/(?:\[([^[]+)\])(?:\(([^()]+)\))$/,replace:(e,t)=>{const[,n,r]=t;t=Iq.$createLinkNode(r);const i=Aq.$createTextNode(n);i.setFormat(e.getFormat()),t.append(i),e.replace(t)},trigger:")",type:"text-match"},wK=[oK,aK,sK,lK,uK],xK=[dK,pK,fK,gK,mK,hK,vK,bK,yK],SK=[_K],CK=[...wK,...xK,...SK];var EK=Nq.$convertFromMarkdownString=function(e,t=CK){return Xq(t)(e)},TK=Nq.$convertToMarkdownString=function(e=CK){return function(e){let t=Lq(e),n=t.textFormat.filter((e=>1===e.format.length));return()=>{let e=[];var r=Aq.$getRoot().getChildren();for(let i of r)null!=(r=$q(i,t.element,n,t.textMatch))&&e.push(r);return e.join("\n\n")}}(e)()};Nq.BOLD_ITALIC_STAR=pK,Nq.BOLD_ITALIC_UNDERSCORE=fK,Nq.BOLD_STAR=gK,Nq.BOLD_UNDERSCORE=mK;var kK=Nq.CHECK_LIST=cK;Nq.CODE=sK;var NK=Nq.ELEMENT_TRANSFORMERS=wK;Nq.HEADING=oK,Nq.HIGHLIGHT=hK,Nq.INLINE_CODE=dK,Nq.ITALIC_STAR=vK,Nq.ITALIC_UNDERSCORE=bK,Nq.LINK=_K,Nq.ORDERED_LIST=uK,Nq.QUOTE=aK,Nq.STRIKETHROUGH=yK;var AK=Nq.TEXT_FORMAT_TRANSFORMERS=xK,OK=Nq.TEXT_MATCH_TRANSFORMERS=SK;Nq.TRANSFORMERS=CK,Nq.UNORDERED_LIST=lK,Nq.registerMarkdownShortcuts=function(e,t=CK){let n=Lq(t),r=Pq(n.textFormat,(({tag:e})=>e[e.length-1])),i=Pq(n.textMatch,(({trigger:e})=>e));for(let o of t)if(("element"===(t=o.type)||"text-match"===t)&&!e.hasNodes(o.dependencies))throw Error("Minified Lexical error #79; visit https://lexical.dev/docs/error?code=79 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");return e.registerUpdateListener((({tags:t,dirtyLeaves:o,editorState:a,prevEditorState:s})=>{if(!t.has("historic")){var l=a.read(Aq.$getSelection);if(t=s.read(Aq.$getSelection),Aq.$isRangeSelection(t)&&Aq.$isRangeSelection(l)&&l.isCollapsed()){s=l.anchor.key;var c=l.anchor.offset,u=a._nodeMap.get(s);Aq.$isTextNode(u)&&o.has(s)&&(1===c||c===t.anchor.offset+1)&&e.update((()=>{if(!u.hasFormat("code")){var e=u.getParent();if(null!==e&&!Oq.$isCodeNode(e)){var t=l.anchor.offset;e:{var o=n.element,a=e.getParent();if(Aq.$isRootOrShadowRoot(a)&&e.getFirstChild()===u&&" "===(a=u.getTextContent())[t-1])for(let{regExp:n,replace:r}of o)if((o=a.match(n))&&o[0].length===t){a=u.getNextSiblings();let[n,i]=u.splitText(t);n.remove(),r(e,a=i?[i,...a]:a,o,!1),e=!0;break e}e=!1}if(!e){e:{if(o=u.getTextContent(),null!=(e=i[o[t-1]]))for(c of(t<o.length&&(o=o.slice(0,t)),e))if(null!==(e=o.match(c.regExp))){a=(o=e.index||0)+e[0].length;var s=void 0;0===o?[s]=u.splitText(a):[,s]=u.splitText(o,a),s.selectNext(0,0),c.replace(s,e);var c=!0;break e}c=!1}if(!c)e:{var d=(a=u.getTextContent())[--t];if(c=r[d])for(let n of c){var{tag:h}=n;let r=t-(c=h.length)+1;if(!(1<c&&!tK(a,r,h,0,c)||" "===a[r-1])&&(s=a[t+1],!1!==n.intraword||!s||Bq.test(s))){e=s=u,o=eK(a,r,h);for(var p=e;0>o&&(p=p.getPreviousSibling())&&!Aq.$isLineBreakNode(p);)Aq.$isTextNode(p)&&(o=p.getTextContent(),e=p,o=eK(o,o.length,h));if(!(0>o||e===s&&o+c===r||(h=e.getTextContent(),0<o&&h[o-1]===d||(p=h[o-1],!1===n.intraword&&p&&!Bq.test(p))))){a=(a=s.getTextContent()).slice(0,r)+a.slice(t+1),s.setTextContent(a),a=e===s?a:h,e.setTextContent(a.slice(0,o)+a.slice(o+c)),a=Aq.$getSelection(),d=Aq.$createRangeSelection(),Aq.$setSelection(d),t=t-c*(e===s?2:1)+1,d.anchor.set(e.__key,o,"text"),d.focus.set(s.__key,t,"text");for(let e of n.format)d.hasFormat(e)||d.formatText(e);d.anchor.set(d.focus.key,d.focus.offset,d.focus.type);for(let e of n.format)d.hasFormat(e)&&d.toggleFormat(e);Aq.$isRangeSelection(a)&&(d.format=a.format);break e}}}}}}}}))}}}))};function MK({onClose:e,children:t,title:n,closeOnClickOutside:r}){const i=a.exports.useRef(null);return a.exports.useEffect((()=>{null!==i.current&&i.current.focus()}),[]),a.exports.useEffect((()=>{let t=null;const n=t=>{27===t.keyCode&&e()},o=t=>{const n=t.target;null!==i.current&&!i.current.contains(n)&&r&&e()},a=i.current;return null!==a&&(t=a.parentElement,null!==t&&t.addEventListener("click",o)),window.addEventListener("keydown",n),()=>{window.removeEventListener("keydown",n),null!==t&&(null==t||t.removeEventListener("click",o))}}),[r,e]),Jb("div",{className:"Modal__overlay",role:"dialog",children:Xb("div",{className:"Modal__modal",tabIndex:-1,ref:i,children:[Jb("h2",{className:"Modal__title",children:n}),Jb("button",{className:"Modal__closeButton","aria-label":"Close modal",type:"button",onClick:e,children:"X"}),Jb("div",{className:"Modal__content",children:t})]})})}function RK({onClose:e,children:t,title:n,closeOnClickOutside:r=!1}){return U.exports.createPortal(Jb(MK,{onClose:e,title:n,closeOnClickOutside:r,children:t}),document.body)}function DK(){const[e,t]=a.exports.useState(null),n=a.exports.useCallback((()=>{t(null)}),[]);return[a.exports.useMemo((()=>{if(null===e)return null;const{title:t,content:r,closeOnClickOutside:i}=e;return Jb(RK,{onClose:n,title:t,closeOnClickOutside:i,children:r})}),[e,n]),a.exports.useCallback(((e,r,i=!1)=>{t({closeOnClickOutside:i,content:r(n),title:e})}),[n])]}function IK(...e){return e.filter(Boolean).join(" ")}function PK({"data-test-id":e,children:t,className:n,onClick:r,disabled:i,small:o,title:a}){return Jb("button",{disabled:i,className:IK("Button__root",i&&"Button__disabled",o&&"Button__small",n),onClick:r,title:a,"aria-label":a,...e&&{"data-test-id":e},children:t})}var LK={},BK=Zu;class $K extends BK.DecoratorNode{constructor(e,t){super(t),this.__format=e||""}exportJSON(){return{format:this.__format||"",type:"decorator-block",version:1}}createDOM(){return document.createElement("div")}updateDOM(){return!1}setFormat(e){this.getWritable().__format=e}}var zK=LK.$isDecoratorBlockNode=function(e){return e instanceof $K},FK=LK.DecoratorBlockNode=$K,UK=Nv,HK=LK,VK=lI,qK=Ju,KK=Zu,WK=a.exports,jK=function({children:e,format:t,nodeKey:n,className:r}){let[i]=UK.useLexicalComposerContext(),[o,a,s]=VK.useLexicalNodeSelection(n),l=WK.useRef(null),c=WK.useCallback((e=>(o&&KK.$isNodeSelection(KK.$getSelection())&&(e.preventDefault(),i.update((()=>{const e=KK.$getNodeByKey(n);null!==e&&(KK.$setSelection(e.selectPrevious()),KK.$isDecoratorNode(e)&&e.remove())}))),!1)),[i,o,n]);return WK.useEffect((()=>qK.mergeRegister(i.registerCommand(KK.FORMAT_ELEMENT_COMMAND,(e=>{if(o){var t=KK.$getSelection();if(KK.$isNodeSelection(t)){var r=KK.$getNodeByKey(n);HK.$isDecoratorBlockNode(r)&&r.setFormat(e)}else if(KK.$isRangeSelection(t))for(r of t=t.getNodes())HK.$isDecoratorBlockNode(r)?r.setFormat(e):qK.$getNearestBlockElementAncestorOrThrow(r).setFormat(e);return!0}return!1}),KK.COMMAND_PRIORITY_LOW),i.registerCommand(KK.CLICK_COMMAND,(e=>e.target===l.current&&(e.preventDefault(),e.shiftKey||s(),a(!o),!0)),KK.COMMAND_PRIORITY_LOW),i.registerCommand(KK.KEY_DELETE_COMMAND,c,KK.COMMAND_PRIORITY_LOW),i.registerCommand(KK.KEY_BACKSPACE_COMMAND,c,KK.COMMAND_PRIORITY_LOW))),[s,i,o,n,c,a]),WK.createElement("div",{className:[r.base,o?r.focus:null].filter(Boolean).join(" "),ref:l,style:{textAlign:t||void 0}},e)};function YK(e){const t=e.getAttribute("data-lexical-tweet-id");if(t){return{node:ZK(t)}}return null}let GK=!0;function JK({className:e,format:t,loadingComponent:n,nodeKey:r,onError:i,onLoad:o,tweetID:s}){const l=a.exports.useRef(null),c=a.exports.useRef(""),[u,d]=a.exports.useState(!1),h=a.exports.useCallback((async()=>{try{await window.twttr.widgets.createTweet(s,l.current),d(!1),GK=!1,o&&o()}catch(aZ){i&&i(String(aZ))}}),[i,o,s]);return a.exports.useEffect((()=>{var e;if(s!==c.current){if(d(!0),GK){const t=document.createElement("script");t.src="https://platform.twitter.com/widgets.js",t.async=!0,null==(e=document.body)||e.appendChild(t),t.onload=h,i&&(t.onerror=i)}else h();c&&(c.current=s)}}),[h,i,s]),Xb(jK,{className:e,format:t,nodeKey:r,children:[u?n:null,Jb("div",{style:{display:"inline-block",width:"550px"},ref:l})]})}class XK extends FK{constructor(e,t,n){super(t,n),this.__id=e}static getType(){return"tweet"}static clone(e){return new XK(e.__id,e.__format,e.__key)}static importJSON(e){const t=ZK(e.id);return t.setFormat(e.format),t}exportJSON(){return{...super.exportJSON(),id:this.getId(),type:"tweet",version:1}}static importDOM(){return{div:e=>e.hasAttribute("data-lexical-tweet-id")?{conversion:YK,priority:2}:null}}exportDOM(){const e=document.createElement("div");e.setAttribute("data-lexical-tweet-id",this.__id);const t=document.createTextNode(this.getTextContent());return e.append(t),{element:e}}getId(){return this.__id}getTextContent(e,t){return`https://twitter.com/i/web/status/${this.__id}`}decorate(e,t){const n=t.theme.embedBlock||{},r={base:n.base||"",focus:n.focus||""};return Jb(JK,{className:r,format:this.__format,loadingComponent:"Loading...",nodeKey:this.getKey(),tweetID:this.__id})}isInline(){return!1}}function ZK(e){return new XK(e)}const QK=/^(?:\|)(.+)(?:\|)\s?$/,eW={dependencies:[ML,RL,OL],export:(e,t)=>{if(!TL(e))return null;const n=[];for(const r of e.getChildren()){const e=[];if(kL(r))for(const n of r.getChildren())Zg(n)&&e.push(t(n));n.push(`| ${e.join(" | ")} |`)}return n.join("\n")},regExp:QK,replace:(e,t,n)=>{const r=nW(n[0]);if(null==r)return;const i=[r];let o=e.getPreviousSibling(),a=r.length;for(;o&&em(o)&&1===o.getChildrenSize();){const e=o.getFirstChild();if(!rm(e))break;const t=nW(e.getTextContent());if(null==t)break;a=Math.max(a,t.length),i.unshift(t);const n=o.getPreviousSibling();o.remove(),o=n}const s=gL();for(const c of i){const e=mL();s.append(e);for(let t=0;t<a;t++)e.append(t<c.length?c[t]:tW(null))}const l=e.getPreviousSibling();TL(l)&&function(e){const t=e.getFirstChild();return kL(t)?t.getChildrenSize():0}(l)===a?(l.append(...s.getChildren()),e.remove()):e.replace(s),s.selectEnd()},type:"element"};const tW=e=>{const t=fL(AL.NO_STATUS),n=Vg();return null!=e&&n.append(Kg(e.trim())),t.append(n),t},nW=e=>{const t=e.match(QK);return t&&t[1]?t[1].split("|").map((e=>tW(e))):null},rW=[eW,{dependencies:[kI],export:e=>TI(e)?"***":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(e,t,n,r)=>{const i=EI();r||null!=e.getNextSibling()?e.replace(i):e.insertBefore(i),i.selectNext()},type:"element"},{dependencies:[yq],export:(e,t,n)=>bq(e)?`})`:null,importRegExp:/!(?:\[([^[]*)\])(?:\(([^(]+)\))/,regExp:/!(?:\[([^[]*)\])(?:\(([^(]+)\))$/,replace:(e,t)=>{const[,n,r]=t,i=vq({altText:n,maxWidth:800,src:r});e.replace(i)},trigger:")",type:"text-match"},{dependencies:[sq],export:(e,t,n)=>cq(e)?`$${e.getEquation()}$`:null,importRegExp:/\$([^$]+?)\$/,regExp:/\$([^$]+?)\$$/,replace:(e,t)=>{const[,n]=t,r=lq(n,!0);e.replace(r)},trigger:"$",type:"text-match"},{dependencies:[XK],export:e=>function(e){return e instanceof XK}(e)?`<tweet id="${e.getId()}" />`:null,regExp:/<tweet id="([^"]+?)"\s?\/>\s?$/,replace:(e,t,n)=>{const[,r]=n,i=ZK(r);e.replace(i)},type:"element"},kK,...NK,...AK,...OK],iW=()=>{let e=document.getElementById("report-container");return null===e&&(e=document.createElement("div"),e.id="report-container",e.style.position="fixed",e.style.top="50%",e.style.left="50%",e.style.fontSize="32px",e.style.transform="translate(-50%, -50px)",e.style.padding="20px",e.style.background="rgba(240, 240, 240, 0.4)",e.style.borderRadius="20px",document.body&&document.body.appendChild(e)),e};function oW(){const e=a.exports.useRef(null),t=a.exports.useCallback((()=>{null!==e&&clearTimeout(e.current),document.body&&document.body.removeChild(iW())}),[]);return a.exports.useEffect((()=>t),[t]),a.exports.useCallback((n=>{console.log(n);const r=iW();return clearTimeout(e.current),r.innerHTML=n,e.current=setTimeout(t,1e3),e.current}),[t])}const aW=qm("SPEECH_TO_TEXT_COMMAND"),sW={"\n":({selection:e})=>{e.insertParagraph()},redo:({editor:e})=>{e.dispatchCommand(zm,void 0)},undo:({editor:e})=>{e.dispatchCommand(Vm,void 0)}},lW="SpeechRecognition"in window||"webkitSpeechRecognition"in window;var cW=lW?function(){const[e]=Mv(),[t,n]=a.exports.useState(!1),r=window.SpeechRecognition||window.webkitSpeechRecognition,i=a.exports.useRef(null),o=oW();return a.exports.useEffect((()=>(t&&null===i.current&&(i.current=new r,i.current.continuous=!0,i.current.interimResults=!0,i.current.addEventListener("result",(t=>{const n=t.results.item(t.resultIndex),{transcript:r}=n.item(0);o(r),n.isFinal&&e.update((()=>{const t=Jg();if(tm(t)){const n=sW[r.toLowerCase().trim()];n?n({editor:e,selection:t}):r.match(/\s*\n\s*/)?t.insertParagraph():t.insertText(r)}}))}))),i.current&&(t?i.current.start():i.current.stop()),()=>{null!==i.current&&i.current.stop()})),[r,e,t,o]),a.exports.useEffect((()=>e.registerCommand(aW,(e=>(n(e),!0)),um)),[e]),null}:()=>null;function uW({isRichText:e}){const[t]=Mv(),[n,r]=a.exports.useState((()=>t.isEditable())),[i,o]=a.exports.useState(!1),[s,l]=a.exports.useState(!1),[c,u]=a.exports.useState(!0),[d,h]=DK(),{isCollabActive:p}=uw();a.exports.useEffect((()=>Sy(t.registerEditableListener((e=>{r(e)})),t.registerCommand(vD,(e=>(l(e),!1)),um))),[t]),a.exports.useEffect((()=>t.registerUpdateListener((({dirtyElements:e,prevEditorState:r,tags:i})=>{!n&&e.size>0&&!i.has("historic")&&!i.has("collaboration")&&async function(e){const t=JSON.stringify(e.getEditorState());let n=null;try{n=await fetch("http://localhost:1235/validateEditorState",{body:t,headers:{Accept:"application/json","Content-type":"application/json"},method:"POST"})}catch{}if(null!==n&&403===n.status)throw new Error("Editor state validation failed! Server did not accept changes.")}(t),t.getEditorState().read((()=>{const e=Gg().getChildren();if(e.length>1)u(!1);else if(em(e[0])){const t=e[0].getChildren();u(0===t.length)}else u(!1)}))}))),[t,n]);const f=a.exports.useCallback((()=>{t.update((()=>{const e=Gg(),t=e.getFirstChild();if(Z$(t)&&"markdown"===t.getLanguage())EK(t.getTextContent(),rW);else{const t=TK(rW);e.clear().append(J$("markdown").append(Kg(t)))}e.selectEnd()}))}),[t]);return Xb("div",{className:"actions",children:[lW&&Jb("button",{onClick:()=>{t.dispatchCommand(aW,!i),o(!i)},className:"action-button action-button-mic "+(i?"active":""),title:"Speech To Text","aria-label":(i?"Enable":"Disable")+" speech to text",children:Jb("i",{className:"mic"})}),Jb("button",{className:"action-button import",onClick:()=>kq(t),title:"Import","aria-label":"Import editor state from JSON",children:Jb("i",{className:"import"})}),Jb("button",{className:"action-button export",onClick:()=>function(e,t=Object.freeze({})){var n=new Date;e={editorState:e.getEditorState(),lastSaved:n.getTime(),source:t.source||"Lexical",version:"0.9.0"};{t=`${t.fileName||n.toISOString()}.lexical`,n=document.createElement("a");let r=document.body;null!==r&&(r.appendChild(n),n.style.display="none",e=JSON.stringify(e),e=new Blob([e],{type:"octet/stream"}),e=window.URL.createObjectURL(e),n.href=e,n.download=t,n.click(),window.URL.revokeObjectURL(e),n.remove())}}(t,{fileName:`Playground ${(new Date).toISOString()}`,source:"Playground"}),title:"Export","aria-label":"Export editor state to JSON",children:Jb("i",{className:"export"})}),Jb("button",{className:"action-button clear",disabled:c,onClick:()=>{h("Clear editor",(e=>Jb(dW,{editor:t,onClose:e})))},title:"Clear","aria-label":"Clear editor contents",children:Jb("i",{className:"clear"})}),Jb("button",{className:"action-button "+(n?"lock":"unlock"),onClick:()=>{n&&async function(e){const t=JSON.stringify(e.getEditorState());try{await fetch("http://localhost:1235/setEditorState",{body:t,headers:{Accept:"application/json","Content-type":"application/json"},method:"POST"})}catch{}}(t),t.setEditable(!t.isEditable())},title:"Read-Only Mode","aria-label":(n?"Lock":"Unlock")+" read-only mode",children:Jb("i",{className:n?"lock":"unlock"})}),Jb("button",{className:"action-button",onClick:f,title:"Convert From Markdown","aria-label":"Convert from markdown",children:Jb("i",{className:"markdown"})}),p&&Jb("button",{className:"action-button connect",onClick:()=>{t.dispatchCommand(bD,!s)},title:(s?"Disconnect":"Connect")+" Collaborative Editing","aria-label":(s?"Disconnect from":"Connect to")+" a collaborative editing server",children:Jb("i",{className:s?"disconnect":"connect"})}),d]})}function dW({editor:e,onClose:t}){return Xb(Zb,{children:["Are you sure you want to clear the editor?",Xb("div",{className:"Modal__content",children:[Jb(PK,{onClick:()=>{e.dispatchCommand(sm,void 0),e.focus(),t()},children:"Clear"})," ",Jb(PK,{onClick:()=>{e.focus(),t()},children:"Cancel"})]})]})}var hW={},pW=Nv,fW=Ju,gW=Zu,mW=a.exports,yW="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?mW.useLayoutEffect:mW.useEffect;let vW=e=>{var t=document.getElementById("typeahead-menu");if(t&&(t=t.querySelector(".typeahead-popover"))){var n=t.getBoundingClientRect();n.top+n.height>window.innerHeight&&t.scrollIntoView({block:"center"}),0>n.top&&t.scrollIntoView({block:"center"}),e.scrollIntoView({block:"nearest"})}};function bW(e){mW.startTransition?mW.startTransition(e):e()}function _W(e,t){let n=getComputedStyle(e),r="absolute"===n.position;if(t=t?/(auto|scroll|hidden)/:/(auto|scroll)/,"fixed"===n.position)return document.body;for(;e=e.parentElement;)if(n=getComputedStyle(e),(!r||"static"!==n.position)&&t.test(n.overflow+n.overflowY+n.overflowX))return e;return document.body}function wW(e,t){return e=e.getBoundingClientRect(),t=t.getBoundingClientRect(),e.top>t.top&&e.top<t.bottom}function xW(e,t,n,r){let[i]=pW.useLexicalComposerContext();mW.useEffect((()=>{if(null!=t&&null!=e){let e=i.getRootElement(),o=null!=e?_W(e,!1):document.body,a=!1,s=wW(t,o),l=function(){a||(window.requestAnimationFrame((function(){n(),a=!1})),a=!0);const e=wW(t,o);e!==s&&(s=e,null!=r&&r(e))},c=new ResizeObserver(n);return window.addEventListener("resize",n),document.addEventListener("scroll",l,{capture:!0,passive:!0}),c.observe(t),()=>{c.unobserve(t),window.removeEventListener("resize",n),document.removeEventListener("scroll",l)}}}),[t,i,r,n,e])}let SW=gW.createCommand("SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND");function CW({close:e,editor:t,anchorElementRef:n,resolution:r,options:i,menuRenderFn:o,onSelectOption:a}){let[s,l]=mW.useState(null);mW.useEffect((()=>{l(0)}),[r.match.matchingString]);let c=mW.useCallback((n=>{t.update((()=>{const i=function(e,t){if(e=gW.$getSelection(),!gW.$isRangeSelection(e)||!e.isCollapsed())return null;var n=e.anchor;if("text"!==n.type)return null;if(!(e=n.getNode()).isSimpleText())return null;n=n.offset;let r=e.getTextContent().slice(0,n);var i=t.matchingString;for(let a=t=t.replaceableString.length;a<=i.length;a++)r.substr(-a)===i.substr(0,a)&&(t=a);if(0>(t=n-t))return null;let o;return 0===t?[o]=e.splitText(n):[,o]=e.splitText(t,n),o}(t,r.match);a(n,i,e,r.match.matchingString)}))}),[e,t,r.match,a]),u=mW.useCallback((e=>{const n=t.getRootElement();null!==n&&(n.setAttribute("aria-activedescendant","typeahead-item-"+e),l(e))}),[t]);return mW.useEffect((()=>()=>{let e=t.getRootElement();null!==e&&e.removeAttribute("aria-activedescendant")}),[t]),yW((()=>{null===i?l(null):null===s&&u(0)}),[i,s,u]),mW.useEffect((()=>fW.mergeRegister(t.registerCommand(SW,(({option:e})=>!(!e.ref||null==e.ref.current)&&(vW(e.ref.current),!0)),gW.COMMAND_PRIORITY_LOW))),[t,u]),mW.useEffect((()=>fW.mergeRegister(t.registerCommand(gW.KEY_ARROW_DOWN_COMMAND,(e=>{if(null!==i&&i.length&&null!==s){let n=s!==i.length-1?s+1:0;u(n);let r=i[n];null!=r.ref&&r.ref.current&&t.dispatchCommand(SW,{index:n,option:r}),e.preventDefault(),e.stopImmediatePropagation()}return!0}),gW.COMMAND_PRIORITY_LOW),t.registerCommand(gW.KEY_ARROW_UP_COMMAND,(e=>{if(null!==i&&i.length&&null!==s){var t=0!==s?s-1:i.length-1;u(t),null!=(t=i[t]).ref&&t.ref.current&&vW(t.ref.current),e.preventDefault(),e.stopImmediatePropagation()}return!0}),gW.COMMAND_PRIORITY_LOW),t.registerCommand(gW.KEY_ESCAPE_COMMAND,(t=>(t.preventDefault(),t.stopImmediatePropagation(),e(),!0)),gW.COMMAND_PRIORITY_LOW),t.registerCommand(gW.KEY_TAB_COMMAND,(e=>null!==i&&null!==s&&null!=i[s]&&(e.preventDefault(),e.stopImmediatePropagation(),c(i[s]),!0)),gW.COMMAND_PRIORITY_LOW),t.registerCommand(gW.KEY_ENTER_COMMAND,(e=>null!==i&&null!==s&&null!=i[s]&&(null!==e&&(e.preventDefault(),e.stopImmediatePropagation()),c(i[s]),!0)),gW.COMMAND_PRIORITY_LOW))),[c,e,t,i,s,u]),o(n,mW.useMemo((()=>({options:i,selectOptionAndCleanUp:c,selectedIndex:s,setHighlightedIndex:l})),[c,s,i]),r.match.matchingString)}function EW(e,t,n){let[r]=pW.useLexicalComposerContext(),i=mW.useRef(document.createElement("div")),o=mW.useCallback((()=>{const t=r.getRootElement(),o=i.current;if(null!==t&&null!==e){const{left:r,top:a,width:s,height:l}=e.getRect();o.style.top=`${a+window.pageYOffset}px`,o.style.left=`${r+window.pageXOffset}px`,o.style.height=`${l}px`,o.style.width=`${s}px`,o.isConnected||(null!=n&&(o.className=n),o.setAttribute("aria-label","Typeahead menu"),o.setAttribute("id","typeahead-menu"),o.setAttribute("role","listbox"),o.style.display="block",o.style.position="absolute",document.body.append(o)),i.current=o,t.setAttribute("aria-controls","typeahead-menu")}}),[r,e,n]);mW.useEffect((()=>{let t=r.getRootElement();if(null!==e)return o(),()=>{null!==t&&t.removeAttribute("aria-controls");let e=i.current;null!==e&&e.isConnected&&e.remove()}}),[r,o,e]);let a=mW.useCallback((n=>{null!==e&&(n||t(null))}),[e,t]);return xW(e,i.current,o,a),i}hW.LexicalNodeMenuPlugin=function({options:e,nodeKey:t,onClose:n,onOpen:r,onSelectOption:i,menuRenderFn:o,anchorClassName:a}){let[s]=pW.useLexicalComposerContext(),[l,c]=mW.useState(null);a=EW(l,c,a);let u=mW.useCallback((()=>{c(null),null!=n&&null!==l&&n()}),[n,l]),d=mW.useCallback((e=>{c(e),null!=r&&null===l&&r(e)}),[r,l]),h=mW.useCallback((()=>{t?s.update((()=>{const e=gW.$getNodeByKey(t),n=s.getElementByKey(t);if(null!=e&&null!=n){const t=e.getTextContent();null!=l&&l.match.matchingString===t||bW((()=>d({getRect:()=>n.getBoundingClientRect(),match:{leadOffset:t.length,matchingString:t,replaceableString:t}})))}})):null==t&&null!=l&&u()}),[u,s,t,d,l]);return mW.useEffect((()=>{h()}),[h,t]),mW.useEffect((()=>{if(null!=t)return s.registerUpdateListener((({dirtyElements:e})=>{e.get(t)&&h()}))}),[s,h,t]),null===l||null===s?null:mW.createElement(CW,{close:u,resolution:l,editor:s,anchorElementRef:a,options:e,menuRenderFn:o,onSelectOption:i})};var TW=hW.LexicalTypeaheadMenuPlugin=function({options:e,onQueryChange:t,onSelectOption:n,onOpen:r,onClose:i,menuRenderFn:o,triggerFn:a,anchorClassName:s}){let[l]=pW.useLexicalComposerContext(),[c,u]=mW.useState(null);s=EW(c,u,s);let d=mW.useCallback((()=>{u(null),null!=i&&null!==c&&i()}),[i,c]),h=mW.useCallback((e=>{u(e),null!=r&&null===c&&r(e)}),[r,c]);return mW.useEffect((()=>{let e=l.registerUpdateListener((()=>{l.getEditorState().read((()=>{const e=document.createRange(),n=gW.$getSelection(),r=function(e){let t=null;return e.getEditorState().read((()=>{var e=gW.$getSelection();if(gW.$isRangeSelection(e)){var n=e.anchor;"text"!==n.type?t=null:(e=n.getNode()).isSimpleText()?(n=n.offset,t=e.getTextContent().slice(0,n)):t=null}})),t}(l);if(gW.$isRangeSelection(n)&&n.isCollapsed()&&null!==r&&null!==e){var o=a(r,l);t(o?o.matchingString:null),null===o||function(e,t){return 0===t&&e.getEditorState().read((()=>{var e=gW.$getSelection();return!!gW.$isRangeSelection(e)&&(e=e.anchor.getNode().getPreviousSibling(),gW.$isTextNode(e)&&e.isTextEntity())}))}(l,o.leadOffset)||null===function(e,t){var n=window.getSelection();if(null===n||!n.isCollapsed)return!1;let r=n.anchorNode;if(n=n.anchorOffset,null==r||null==n)return!1;try{t.setStart(r,e),t.setEnd(r,n)}catch(i){return!1}return!0}(o.leadOffset,e)?d():bW((()=>h({getRect:()=>e.getBoundingClientRect(),match:o})))}else d()}))}));return()=>{e()}}),[l,a,t,c,d,h]),null===c||null===l?null:mW.createElement(CW,{close:d,resolution:c,editor:l,anchorElementRef:s,options:e,menuRenderFn:o,onSelectOption:n})};hW.PUNCTUATION="\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'\"~=<>_:;",hW.SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND=SW;var kW=hW.TypeaheadOption=class{constructor(e){this.key=e,this.ref={current:null},this.setRefElement=this.setRefElement.bind(this)}setRefElement(e){this.ref={current:e}}};hW.getScrollParent=_W;var NW=hW.useBasicTypeaheadTriggerMatch=function(e,{minLength:t=1,maxLength:n=75}){return mW.useCallback((r=>{if(null!==(r=new RegExp("(^|\\s|\\()(["+e+"]((?:[^"+e+"\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'\"~=<>_:;\\s]){0,"+n+"}))$").exec(r))){let e=r[1],n=r[3];if(n.length>=t)return{leadOffset:r.index+e.length,matchingString:n,replaceableString:r[2]}}return null}),[n,t,e])};hW.useDynamicPositioning=xW;var AW=Gu,OW=Nv,MW=hW,RW=Ju,DW=Zu,IW=a.exports;let PW=DW.createCommand("INSERT_EMBED_COMMAND");class LW extends MW.TypeaheadOption{constructor(e,t){super(e),this.title=e,this.onSelect=t.onSelect.bind(this)}}var BW=LW,$W=PW,zW=function({embedConfigs:e,onOpenEmbedModalForConfig:t,getMenuOptions:n,menuRenderFn:r}){let[i]=OW.useLexicalComposerContext(),[o,a]=IW.useState(null),[s,l]=IW.useState(null),c=IW.useCallback((()=>{a(null),l(null)}),[]),u=IW.useCallback((t=>{i.getEditorState().read((async()=>{const n=DW.$getNodeByKey(t);if(AW.$isLinkNode(n))for(let t=0;t<e.length;t++){const r=e[t];null!=await Promise.resolve(r.parseUrl(n.__url))&&(l(r),a(n.getKey()))}}))}),[i,e]);IW.useEffect((()=>RW.mergeRegister(...[AW.LinkNode,AW.AutoLinkNode].map((e=>i.registerMutationListener(e,((...e)=>((e,{updateTags:t,dirtyLeaves:n})=>{for(const[r,i]of e)"created"===i&&t.has("paste")&&1===n.size?u(r):r===o&&c()})(...e))))))),[u,i,e,o,c]),IW.useEffect((()=>i.registerCommand(PW,(n=>{let r=e.find((({type:e})=>e===n));return!!r&&(t(r),!0)}),DW.COMMAND_PRIORITY_EDITOR)),[i,e,t]);let d=IW.useCallback((async()=>{if(null!=s&&null!=o){const e=i.getEditorState().read((()=>{const e=DW.$getNodeByKey(o);return AW.$isLinkNode(e)?e:null}));if(AW.$isLinkNode(e)){const t=await Promise.resolve(s.parseUrl(e.__url));null!=t&&i.update((()=>{s.insertNode(i,t),e.isAttached()&&e.remove()}))}}}),[s,i,o]),h=IW.useMemo((()=>null!=s&&null!=o?n(s,d,c):[]),[s,d,n,o,c]),p=IW.useCallback(((e,t,n)=>{i.update((()=>{e.onSelect(t),n()}))}),[i]);return null!=o?IW.createElement(MW.LexicalNodeMenuPlugin,{nodeKey:o,onClose:c,onSelectOption:p,options:h,menuRenderFn:r}):null},FW=/((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/;function UW({children:e}){return Jb("div",{className:"DialogButtonsList",children:e})}function HW({"data-test-id":e,children:t}){return Jb("div",{className:"DialogActions","data-test-id":e,children:t})}function VW({className:e,format:t,nodeKey:n,documentID:r}){return Jb(jK,{className:e,format:t,nodeKey:n,children:Jb("iframe",{width:"560",height:"315",src:`https://www.figma.com/embed?embed_host=lexical&url= https://www.figma.com/file/${r}`,allowFullScreen:!0})})}class qW extends FK{constructor(e,t,n){super(t,n),this.__id=e}static getType(){return"figma"}static clone(e){return new qW(e.__id,e.__format,e.__key)}static importJSON(e){const t=KW(e.documentID);return t.setFormat(e.format),t}exportJSON(){return{...super.exportJSON(),documentID:this.__id,type:"figma",version:1}}updateDOM(){return!1}getId(){return this.__id}getTextContent(e,t){return`https://www.figma.com/file/${this.__id}`}decorate(e,t){const n=t.theme.embedBlock||{},r={base:n.base||"",focus:n.focus||""};return Jb(VW,{className:r,format:this.__format,nodeKey:this.getKey(),documentID:this.__id})}isInline(){return!1}}function KW(e){return new qW(e)}const WW=qm("INSERT_FIGMA_COMMAND");function jW(){const[e]=Mv();return a.exports.useEffect((()=>{if(!e.hasNodes([qW]))throw new Error("FigmaPlugin: FigmaNode not registered on editor");return e.registerCommand(WW,(e=>{const t=KW(e);return vy(t),!0}),um)}),[e]),null}const YW=qm("INSERT_TWEET_COMMAND");function GW(){const[e]=Mv();return a.exports.useEffect((()=>{if(!e.hasNodes([XK]))throw new Error("TwitterPlugin: TweetNode not registered on editor");return e.registerCommand(YW,(e=>{const t=ZK(e);return vy(t),!0}),um)}),[e]),null}function JW({className:e,format:t,nodeKey:n,videoID:r}){return Jb(jK,{className:e,format:t,nodeKey:n,children:Jb("iframe",{width:"560",height:"315",src:`https://www.youtube.com/embed/${r}`,frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,title:"YouTube video"})})}function XW(e){const t=e.getAttribute("data-lexical-youtube");if(t){return{node:QW(t)}}return null}class ZW extends FK{constructor(e,t,n){super(t,n),this.__id=e}static getType(){return"youtube"}static clone(e){return new ZW(e.__id,e.__format,e.__key)}static importJSON(e){const t=QW(e.videoID);return t.setFormat(e.format),t}exportJSON(){return{...super.exportJSON(),type:"youtube",version:1,videoID:this.__id}}exportDOM(){const e=document.createElement("iframe");return e.setAttribute("data-lexical-youtube",this.__id),e.setAttribute("width","560"),e.setAttribute("height","315"),e.setAttribute("src",`https://www.youtube.com/embed/${this.__id}`),e.setAttribute("frameborder","0"),e.setAttribute("allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"),e.setAttribute("allowfullscreen","true"),e.setAttribute("title","YouTube video"),{element:e}}static importDOM(){return{iframe:e=>e.hasAttribute("data-lexical-youtube")?{conversion:XW,priority:1}:null}}updateDOM(){return!1}getId(){return this.__id}getTextContent(e,t){return`https://www.youtube.com/watch?v=${this.__id}`}decorate(e,t){const n=t.theme.embedBlock||{},r={base:n.base||"",focus:n.focus||""};return Jb(JW,{className:r,format:this.__format,nodeKey:this.getKey(),videoID:this.__id})}isInline(){return!1}}function QW(e){return new ZW(e)}const ej=qm("INSERT_YOUTUBE_COMMAND");function tj(){const[e]=Mv();return a.exports.useEffect((()=>{if(!e.hasNodes([ZW]))throw new Error("YouTubePlugin: YouTubeNode not registered on editor");return e.registerCommand(ej,(e=>{const t=QW(e);return vy(t),!0}),um)}),[e]),null}const nj={contentName:"Youtube Video",exampleUrl:"https://www.youtube.com/watch?v=jNQXAC9IVRw",icon:Jb("i",{className:"icon youtube"}),insertNode:(e,t)=>{e.dispatchCommand(ej,t.id)},keywords:["youtube","video"],parseUrl:async e=>{const t=/^.*(youtu\.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/.exec(e),n=t&&11===(null==t?void 0:t[2].length)?t[2]:null;return null!=n?{id:n,url:e}:null},type:"youtube-video"},rj=[{contentName:"Tweet",exampleUrl:"https://twitter.com/jack/status/20",icon:Jb("i",{className:"icon tweet"}),insertNode:(e,t)=>{e.dispatchCommand(YW,t.id)},keywords:["tweet","twitter"],parseUrl:e=>{const t=/^https:\/\/twitter\.com\/(#!\/)?(\w+)\/status(es)*\/(\d+)$/.exec(e);return null!=t?{id:t[4],url:t[0]}:null},type:"tweet"},nj,{contentName:"Figma Document",exampleUrl:"https://www.figma.com/file/LKQ4FJ4bTnCSjedbRpk931/Sample-File",icon:Jb("i",{className:"icon figma"}),insertNode:(e,t)=>{e.dispatchCommand(WW,t.id)},keywords:["figma","figma.com","mock-up"],parseUrl:e=>{const t=/https:\/\/([\w.-]+\.)?figma.com\/(file|proto)\/([0-9a-zA-Z]{22,128})(?:\/.*)?$/.exec(e);return null!=t?{id:t[3],url:t[0]}:null},type:"figma"}];function ij({index:e,isSelected:t,onClick:n,onMouseEnter:r,option:i}){let o="item";return t&&(o+=" selected"),Jb("li",{tabIndex:-1,className:o,ref:i.setRefElement,role:"option","aria-selected":t,id:"typeahead-item-"+e,onMouseEnter:r,onClick:n,children:Jb("span",{className:"text",children:i.title})},i.key)}function oj({options:e,selectedItemIndex:t,onOptionClick:n,onOptionMouseEnter:r}){return Jb("div",{className:"typeahead-popover",children:Jb("ul",{children:e.map(((e,i)=>Jb(ij,{index:i,isSelected:t===i,onClick:()=>n(e,i),onMouseEnter:()=>r(i),option:e},e.key)))})})}function aj({embedConfig:e,onClose:t}){const[n,r]=a.exports.useState(""),[i]=Mv(),[o,s]=a.exports.useState(null),l=a.exports.useMemo((()=>((e,t)=>{let n;return r=>{window.clearTimeout(n),n=window.setTimeout((()=>{e(r)}),t)}})((t=>{const n=FW.exec(t);null!=e&&null!=t&&null!=n?Promise.resolve(e.parseUrl(t)).then((e=>{s(e)})):null!=o&&s(null)}),200)),[e,o]);return Xb("div",{style:{width:"600px"},children:[Jb("div",{className:"Input__wrapper",children:Jb("input",{type:"text",className:"Input__input",placeholder:e.exampleUrl,value:n,"data-test-id":`${e.type}-embed-modal-url`,onChange:e=>{const{value:t}=e.target;r(t),l(t)}})}),Jb(HW,{children:Jb(PK,{disabled:!o,onClick:()=>{null!=o&&(e.insertNode(i,o),t())},"data-test-id":`${e.type}-embed-modal-submit-btn`,children:"Embed"})})]})}function sj(){const[e,t]=DK();return Xb(Zb,{children:[e,Jb(zW,{embedConfigs:rj,onOpenEmbedModalForConfig:e=>{t(`Embed ${e.contentName}`,(t=>Jb(aj,{embedConfig:e,onClose:t})))},getMenuOptions:(e,t,n)=>[new BW("Dismiss",{onSelect:n}),new BW(`Embed ${e.contentName}`,{onSelect:t})],menuRenderFn:(e,{selectedIndex:t,options:n,selectOptionAndCleanUp:r,setHighlightedIndex:i})=>e.current?U.exports.createPortal(Jb("div",{className:"typeahead-popover auto-embed-menu",style:{marginLeft:e.current.style.width,width:200},children:Jb(oj,{options:n,selectedItemIndex:t,onOptionClick:(e,t)=>{i(t),r(e)},onOptionMouseEnter:e=>{i(e)}})}),e.current):null})]})}var lj=Gu,cj=Nv,uj=Ju,dj=Zu,hj=a.exports;function pj(e,t){for(let n=0;n<t.length;n++){let r=t[n](e);if(r)return r}return null}let fj=/[.,;\s]/;function gj(e){var t;return e=e.getPreviousSibling(),dj.$isElementNode(e)&&(e=e.getLastDescendant()),!(t=null===e||dj.$isLineBreakNode(e))&&(t=dj.$isTextNode(e))&&(e=e.getTextContent(),t=fj.test(e[e.length-1])),t}function mj(e){return e=e.getNextSibling(),dj.$isElementNode(e)&&(e=e.getFirstDescendant()),null===e||dj.$isLineBreakNode(e)||dj.$isTextNode(e)&&fj.test(e.getTextContent()[0])}function yj(e,t,n){var r=e.getChildren();let i=r.length;for(let o=0;o<i;o++){let t=r[o];if(!dj.$isTextNode(t)||!t.isSimpleText())return vj(e),void n(null,e.getURL())}null===(t=pj(r=e.getTextContent(),t))||t.text!==r?(vj(e),n(null,e.getURL())):gj(e)&&mj(e)?((r=e.getURL())!==t.url&&(e.setURL(t.url),n(t.url,r)),t.attributes&&((r=e.getRel())!==t.attributes.rel&&(e.setRel(t.attributes.rel||null),n(t.attributes.rel||null,r)),(r=e.getTarget())!==t.attributes.target&&(e.setTarget(t.attributes.target||null),n(t.attributes.target||null,r)))):(vj(e),n(null,e.getURL()))}function vj(e){let t=e.getChildren();var n=t.length;for(--n;0<=n;n--)e.insertAfter(t[n]);return e.remove(),t.map((e=>e.getLatest()))}var bj=function({matchers:e,onChange:t}){let[n]=cj.useLexicalComposerContext();return function(e,t,n){hj.useEffect((()=>{if(!e.hasNodes([lj.AutoLinkNode]))throw Error("Minified Lexical error #77; visit https://lexical.dev/docs/error?code=77 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");let r=(e,t)=>{n&&n(e,t)};return uj.mergeRegister(e.registerNodeTransform(dj.TextNode,(e=>{var i=e.getParentOrThrow(),o=e.getPreviousSibling();if(lj.$isAutoLinkNode(i))yj(i,t,r);else if(!lj.$isLinkNode(i)){if(e.isSimpleText()&&(fj.test(e.getTextContent()[0])||!lj.$isAutoLinkNode(o))){o=i=e.getTextContent();let r=0,h=e;for(var a;(a=pj(o,t))&&null!==a;){let t=a.index,p=a.length,f=t+p;var s=r+t,l=r+f,c=i,u=e;if((0<s?fj.test(c[s-1]):gj(u))&&(l<c.length?fj.test(c[l]):mj(u))){var d=void 0;0===r+t?[d,h]=h.splitText(r+p):[,d,h]=h.splitText(r+t,r+t+p),s=lj.$createAutoLinkNode(a.url,a.attributes),(l=dj.$createTextNode(a.text)).setFormat(d.getFormat()),l.setDetail(d.getDetail()),s.append(l),d.replace(s),n&&n(a.url,null),r=0}else r+=f;o=o.substring(f)}}i=e.getPreviousSibling(),a=e.getNextSibling(),d=e.getTextContent(),lj.$isAutoLinkNode(i)&&!fj.test(d[0])&&(i.append(e),yj(i,t,r),e=i.getURL(),n&&n(null,e)),lj.$isAutoLinkNode(a)&&!fj.test(d[d.length-1])&&(vj(a),yj(a,t,r),e=a.getURL(),n&&n(null,e))}})))}),[e,t,n])}(n,e,t),null},_j=function(e,t=(e=>e)){return n=>{let r=e.exec(n);return null===r?null:{index:r.index,length:r[0].length,text:r[0],url:t(n)}}};const wj=[_j(/((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/,(e=>e.startsWith("http")?e:`https://${e}`)),_j(/(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/,(e=>`mailto:${e}`))];function xj(){return Jb(bj,{matchers:wj})}function Sj({filter:e,newTab:t=!0}){const[n]=Mv();return a.exports.useEffect((()=>{function r(r){const i=r,o=function(e,t){return t.getEditorState().read((()=>{const t=e.target;return Cj(t)?t:t.parentNode&&Cj(t.parentNode)?t.parentNode:null}))}(i,n);if(null===o)return;const a=o.getAttribute("href");if("false"===o.getAttribute("contenteditable")||void 0===a)return;const s=n.getEditorState().read(Jg);if(tm(s)&&!s.isCollapsed())return;let l=null;if(n.update((()=>{const e=Wg(o);Py(e)&&(l=e)})),null!==l&&(void 0===e||e(i,l)))try{if(null!==a){const e="auxclick"===i.type&&1===i.button;window.open(a,t||i.metaKey||i.ctrlKey||e?"_blank":"_self"),i.preventDefault()}}catch{}}return n.registerRootListener(((e,t)=>{null!==t&&(t.removeEventListener("click",r),t.removeEventListener("auxclick",r)),null!==e&&(e.addEventListener("click",r),e.addEventListener("auxclick",r))}))}),[n,e,t]),null}function Cj(e){return"a"===e.nodeName.toLowerCase()}var Ej="object"==typeof global&&global&&global.Object===Object&&global,Tj="object"==typeof self&&self&&self.Object===Object&&self,kj=Ej||Tj||Function("return this")(),Nj=kj.Symbol,Aj=Object.prototype,Oj=Aj.hasOwnProperty,Mj=Aj.toString,Rj=Nj?Nj.toStringTag:void 0;var Dj=Object.prototype.toString;var Ij=Nj?Nj.toStringTag:void 0;function Pj(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Ij&&Ij in Object(e)?function(e){var t=Oj.call(e,Rj),n=e[Rj];try{e[Rj]=void 0;var r=!0}catch(sZ){}var i=Mj.call(e);return r&&(t?e[Rj]=n:delete e[Rj]),i}(e):function(e){return Dj.call(e)}(e)}var Lj=/\s/;var Bj=/^\s+/;function $j(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&Lj.test(e.charAt(t)););return t}(e)+1).replace(Bj,""):e}function zj(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var Fj=/^[-+]0x[0-9a-f]+$/i,Uj=/^0b[01]+$/i,Hj=/^0o[0-7]+$/i,Vj=parseInt;function qj(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return null!=e&&"object"==typeof e}(e)&&"[object Symbol]"==Pj(e)}(e))return NaN;if(zj(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=zj(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=$j(e);var n=Uj.test(e);return n||Hj.test(e)?Vj(e.slice(2),n?2:8):Fj.test(e)?NaN:+e}var Kj=function(){return kj.Date.now()},Wj=Math.max,jj=Math.min;function Yj(e,t,n){var r,i,o,a,s,l,c=0,u=!1,d=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=r,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function f(e){return c=e,s=setTimeout(m,t),u?p(e):a}function g(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=o}function m(){var e=Kj();if(g(e))return y(e);s=setTimeout(m,function(e){var n=t-(e-l);return d?jj(n,o-(e-c)):n}(e))}function y(e){return s=void 0,h&&r?p(e):(r=i=void 0,a)}function v(){var e=Kj(),n=g(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return f(l);if(d)return clearTimeout(s),s=setTimeout(m,t),p(l)}return void 0===s&&(s=setTimeout(m,t)),a}return t=qj(t)||0,zj(n)&&(u=!!n.leading,o=(d="maxWait"in n)?Wj(qj(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h),v.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=i=s=void 0},v.flush=function(){return void 0===s?a:y(Kj())},v}function Gj(e,t,n){const r=a.exports.useRef(null);return r.current=e,a.exports.useMemo((()=>Yj(((...e)=>{r.current&&r.current(...e)}),t,{maxWait:n})),[t,n])}function Jj({editor:e,getCodeDOMNode:t}){const[n,r]=a.exports.useState(!1),i=Gj((()=>{r(!1)}),1e3);return Jb("button",{className:"menu-item",onClick:async function(){const n=t();if(!n)return;let o="";e.update((()=>{const e=Wg(n);Z$(e)&&(o=e.getTextContent());const t=Jg();im(t)}));try{await navigator.clipboard.writeText(o),r(!0),i()}catch(a){console.error("Failed to copy: ",a)}},"aria-label":"copy",children:Jb("i",n?{className:"format success"}:{className:"format copy"})})}const Xj={css:()=>_z((()=>import("./parser-postcss.16fcf3bd.js").then((function(e){return e.p}))),[]),html:()=>_z((()=>import("./parser-html.66e60782.js").then((function(e){return e.p}))),[]),js:()=>_z((()=>import("./parser-babel.6f804a7c.js").then((function(e){return e.p}))),[]),markdown:()=>_z((()=>import("./parser-markdown.3f44829c.js").then((function(e){return e.p}))),[])};async function Zj(e){const t=Xj[e];return await t()}const Qj={css:{parser:"css"},html:{parser:"html"},js:{parser:"babel"},markdown:{parser:"markdown"}},eY=Object.keys(Qj);function tY(e){return eY.includes(e)}function nY({lang:e,editor:t,getCodeDOMNode:n}){const[r,i]=a.exports.useState(""),[o,s]=a.exports.useState(!1);return Xb("div",{className:"prettier-wrapper",children:[Jb("button",{className:"menu-item",onClick:async function(){const r=n();try{const n=await async function(){const{format:e}=await _z((()=>import("./standalone.07cb14af.js").then((function(e){return e.s}))),[]);return e}(),o=function(e){const t=Qj[e];if(!t)throw new Error(`CodeActionMenuPlugin: Prettier does not support this language: ${e}`);return t}(e);if(o.plugins=[await Zj(e)],!r)return;t.update((()=>{const e=Wg(r);if(Z$(e)){const t=e.getTextContent();let r="";if(r=n(t,o),""!==r){e.select(0).insertText(r),i(""),s(!1)}}}))}catch(aZ){aZ instanceof Error?(i(aZ.message),s(!0)):console.error("Unexpected error: ",aZ)}},onMouseEnter:function(){""!==r&&s(!0)},onMouseLeave:function(){""!==r&&s(!1)},"aria-label":"prettier",children:Jb("i",r?{className:"format prettier-error"}:{className:"format prettier"})}),o?Jb("pre",{className:"code-error-tips",children:r}):null]})}function rY({anchorElem:e}){const[t]=Mv(),[n,r]=a.exports.useState(""),[i,o]=a.exports.useState(!1),[s,l]=a.exports.useState(!1),[c,u]=a.exports.useState({right:"0",top:"0"}),d=a.exports.useRef(new Set),h=a.exports.useRef(null);function p(){return h.current}const f=Gj((n=>{const{codeDOMNode:i,isOutside:a}=function(e){const t=e.target;if(t&&t instanceof HTMLElement){const e=t.closest("code.PlaygroundEditorTheme__code");return{codeDOMNode:e,isOutside:!(e||t.closest("div.code-action-menu-container"))}}return{codeDOMNode:null,isOutside:!0}}(n);if(a)return void o(!1);if(!i)return;h.current=i;let s=null,l="";if(t.update((()=>{const e=Wg(i);Z$(e)&&(s=e,l=s.getLanguage()||"")})),s){const{y:t,right:n}=e.getBoundingClientRect(),{y:a,right:s}=i.getBoundingClientRect();r(l),o(!0),u({right:n-s+8+"px",top:a-t+"px"})}}),50,1e3);a.exports.useEffect((()=>{if(s)return document.addEventListener("mousemove",f),()=>{o(!1),f.cancel(),document.removeEventListener("mousemove",f)}}),[s,f]),t.registerMutationListener(nz,(e=>{t.getEditorState().read((()=>{for(const[t,n]of e)switch(n){case"created":d.current.add(t),l(d.current.size>0);break;case"destroyed":d.current.delete(t),l(d.current.size>0)}}))}));const g=iz(n),m=rz(n);return Jb(Zb,{children:i?Xb("div",{className:"code-action-menu-container",style:{...c},children:[Jb("div",{className:"code-highlight-language",children:m}),Jb(Jj,{editor:t,getCodeDOMNode:p}),tY(g)?Jb(nY,{editor:t,getCodeDOMNode:p,lang:g}):null]}):null})}function iY({anchorElem:e=document.body}){return U.exports.createPortal(Jb(rY,{anchorElem:e}),e)}function oY(){const[e]=Mv();return a.exports.useEffect((()=>oz(e)),[e]),null}function aY(e){return{node:lY(void 0===e.open||e.open)}}class sY extends xm{constructor(e,t){super(t),this.__open=e}static getType(){return"collapsible-container"}static clone(e){return new sY(e.__open,e.__key)}createDOM(e,t){const n=document.createElement("details");return n.classList.add("Collapsible__container"),n.open=this.__open,n.addEventListener("toggle",(()=>{t.getEditorState().read((()=>this.getOpen()))!==n.open&&t.update((()=>this.toggleOpen()))})),n}updateDOM(e,t){return e.__open!==this.__open&&(t.open=this.__open),!1}static importDOM(){return{details:e=>({conversion:aY,priority:1})}}static importJSON(e){return lY(e.open)}exportDOM(){const e=document.createElement("details");return e.setAttribute("open",this.__open.toString()),{element:e}}exportJSON(){return{...super.exportJSON(),open:this.__open,type:"collapsible-container",version:1}}setOpen(e){this.getWritable().__open=e}getOpen(){return this.getLatest().__open}toggleOpen(){this.setOpen(!this.getOpen())}}function lY(e){return new sY(e)}function cY(e){return e instanceof sY}function uY(e){return{node:hY()}}class dY extends xm{static getType(){return"collapsible-content"}static clone(e){return new dY(e.__key)}createDOM(e){const t=document.createElement("div");return t.classList.add("Collapsible__content"),t}updateDOM(e,t){return!1}static importDOM(){return{div:e=>e.hasAttribute("data-lexical-collapsible-content")?{conversion:uY,priority:2}:null}}exportDOM(){const e=document.createElement("div");return e.setAttribute("data-lexical-collapsible-content","true"),{element:e}}static importJSON(e){return hY()}isShadowRoot(){return!0}exportJSON(){return{...super.exportJSON(),type:"collapsible-content",version:1}}}function hY(){return new dY}function pY(e){return e instanceof dY}function fY(e){return{node:mY()}}class gY extends xm{static getType(){return"collapsible-title"}static clone(e){return new gY(e.__key)}createDOM(e,t){const n=document.createElement("summary");return n.classList.add("Collapsible__title"),n}updateDOM(e,t){return!1}static importDOM(){return{summary:e=>({conversion:fY,priority:1})}}static importJSON(e){return mY()}exportDOM(){return{element:document.createElement("summary")}}exportJSON(){return{...super.exportJSON(),type:"collapsible-title",version:1}}collapseAtStart(e){return this.getParentOrThrow().insertBefore(this),!0}insertNewAfter(e,t=!0){const n=this.getParentOrThrow();if(!cY(n))throw new Error("CollapsibleTitleNode expects to be child of CollapsibleContainerNode");if(n.getOpen()){const e=this.getNextSibling();if(!pY(e))throw new Error("CollapsibleTitleNode expects to have CollapsibleContentNode sibling");const t=e.getFirstChild();if(Zg(t))return t;{const t=Vg();return e.append(t),t}}{const e=Vg();return n.insertAfter(e,t),e}}}function mY(){return new gY}function yY(e){return e instanceof gY}const vY=qm(),bY=qm();function _Y(){const[e]=Mv();return a.exports.useEffect((()=>{if(!e.hasNodes([sY,gY,dY]))throw new Error("CollapsiblePlugin: CollapsibleContainerNode, CollapsibleTitleNode, or CollapsibleContentNode not registered on editor");return Sy(e.registerNodeTransform(dY,(e=>{if(!cY(e.getParent())){const t=e.getChildren();for(const n of t)e.insertBefore(n);e.remove()}})),e.registerNodeTransform(gY,(e=>{cY(e.getParent())||e.replace(Vg().append(...e.getChildren()))})),e.registerNodeTransform(sY,(e=>{const t=e.getChildren();if(2!==t.length||!yY(t[0])||!pY(t[1])){for(const n of t)e.insertBefore(n);e.remove()}})),e.registerCommand(gm,(()=>{const e=Jg();if(!tm(e)||!e.isCollapsed()||0!==e.anchor.offset)return!1;const t=e.anchor.getNode().getTopLevelElement();if(null===t)return!1;const n=t.getPreviousSibling();return!(!cY(n)||n.getOpen())&&(n.setOpen(!0),!0)}),hm),e.registerCommand(Nm,(()=>{const e=Jg();if(!tm(e)||!e.isCollapsed())return!1;const t=gy(e.anchor.getNode(),cY);if(null===t)return!1;const n=t.getParent();return null!==n&&n.getLastChild()===t&&n.append(Vg()),!1}),hm),e.registerCommand(km,(()=>{var t;const n=null==(t=e._window)?void 0:t.event;if(n&&(n.ctrlKey||n.metaKey)&&"Enter"===n.key){const e=Yg();if(tm(e)&&e.isCollapsed()){const t=gy(e.anchor.getNode(),(e=>Zg(e)&&!e.isInline()));if(yY(t)){const n=t.getParent();if(cY(n))return n.toggleOpen(),im(e.clone()),!0}}}return!1}),hm),e.registerCommand(vY,(()=>(e.update((()=>{const e=Jg();if(!tm(e))return;const t=mY(),n=hY().append(Vg()),r=lY(!0).append(t,n);e.insertNodes([r]),t.selectStart()})),!0)),um),e.registerCommand(bY,(t=>(e.update((()=>{const e=jg(t);cY(e)&&e.toggleOpen()})),!0)),um))}),[e]),null}function wY({equation:e,inline:t,onDoubleClick:n}){const r=a.exports.useRef(null);return a.exports.useEffect((()=>{const n=r.current;null!==n&&iq.render(e,n,{displayMode:!t,errorColor:"#cc0000",output:"html",strict:"warn",throwOnError:!1,trust:!1})}),[e,t]),Xb(Zb,{children:[Jb("img",{src:"#",alt:""}),Jb("span",{role:"button",tabIndex:-1,onDoubleClick:n,ref:r}),Jb("img",{src:"#",alt:""})]})}function xY({onConfirm:e,initialEquation:t=""}){const[n,r]=a.exports.useState(t),[i,o]=a.exports.useState(!0),s=a.exports.useCallback((()=>{e(n,i)}),[e,n,i]),l=a.exports.useCallback((()=>{o(!i)}),[o,i]);return Xb(Zb,{children:[Xb("div",{className:"KatexEquationAlterer_defaultRow",children:["Inline",Jb("input",{type:"checkbox",checked:i,onChange:l})]}),Jb("div",{className:"KatexEquationAlterer_defaultRow",children:"Equation "}),Jb("div",{className:"KatexEquationAlterer_centerRow",children:Jb(i?"input":"textarea",{onChange:e=>{r(e.target.value)},value:n,className:"KatexEquationAlterer_textArea"})}),Jb("div",{className:"KatexEquationAlterer_defaultRow",children:"Visualization "}),Jb("div",{className:"KatexEquationAlterer_centerRow",children:Jb(wY,{equation:n,inline:!1,onDoubleClick:()=>null})}),Jb("div",{className:"KatexEquationAlterer_dialogActions",children:Jb(PK,{onClick:s,children:"Confirm"})})]})}const SY=qm("INSERT_EQUATION_COMMAND");function CY({activeEditor:e,onClose:t}){const n=a.exports.useCallback(((n,r)=>{e.dispatchCommand(SY,{equation:n,inline:r}),t()}),[e,t]);return Jb(xY,{onConfirm:n})}function EY(){const[e]=Mv();return a.exports.useEffect((()=>{if(!e.hasNodes([sq]))throw new Error("EquationsPlugins: EquationsNode not registered on editor");return e.registerCommand(SY,(e=>{const{equation:t,inline:n}=e,r=lq(t,n);return Xg([r]),nm(r.getParentOrThrow())&&_y(r,Vg).selectEnd(),!0}),um)}),[e]),null}const TY=qm("INSERT_EXCALIDRAW_COMMAND");function kY(){const[e]=Mv();return a.exports.useEffect((()=>{if(!e.hasNodes([hq]))throw new Error("ExcalidrawPlugin: ExcalidrawNode not registered on editor");return e.registerCommand(TY,(()=>{const e=pq();return Xg([e]),nm(e.getParentOrThrow())&&_y(e,Vg).selectEnd(),!0}),um)}),[e]),null}function NY({accept:e,label:t,onChange:n,"data-test-id":r}){return Xb("div",{className:"Input__wrapper",children:[Jb("label",{className:"Input__label",children:t}),Jb("input",{type:"file",accept:e,className:"Input__input",onChange:e=>n(e.target.files),"data-test-id":r})]})}function AY({label:e,value:t,onChange:n,placeholder:r="","data-test-id":i}){return Xb("div",{className:"Input__wrapper",children:[Jb("label",{className:"Input__label",children:e}),Jb("input",{type:"text",className:"Input__input",placeholder:r,value:t,onChange:e=>{n(e.target.value)},"data-test-id":i})]})}const OY=qm("INSERT_IMAGE_COMMAND");function MY({onClick:e}){const[t,n]=a.exports.useState(""),[r,i]=a.exports.useState(""),o=""===t;return Xb(Zb,{children:[Jb(AY,{label:"Image URL",placeholder:"i.e. https://source.unsplash.com/random",onChange:n,value:t,"data-test-id":"image-modal-url-input"}),Jb(AY,{label:"Alt Text",placeholder:"Random unsplash image",onChange:i,value:r,"data-test-id":"image-modal-alt-text-input"}),Jb(HW,{children:Jb(PK,{"data-test-id":"image-modal-confirm-btn",disabled:o,onClick:()=>e({altText:r,src:t}),children:"Confirm"})})]})}function RY({onClick:e}){const[t,n]=a.exports.useState(""),[r,i]=a.exports.useState(""),o=""===t;return Xb(Zb,{children:[Jb(NY,{label:"Image Upload",onChange:e=>{const t=new FileReader;t.onload=function(){return"string"==typeof t.result&&n(t.result),""},null!==e&&t.readAsDataURL(e[0])},accept:"image/*","data-test-id":"image-modal-file-upload"}),Jb(AY,{label:"Alt Text",placeholder:"Descriptive alternative text",onChange:i,value:r,"data-test-id":"image-modal-alt-text-input"}),Jb(HW,{children:Jb(PK,{"data-test-id":"image-modal-file-upload-btn",disabled:o,onClick:()=>e({altText:r,src:t}),children:"Confirm"})})]})}function DY({activeEditor:e,onClose:t}){const[n,r]=a.exports.useState(null),i=a.exports.useRef(!1);a.exports.useEffect((()=>{i.current=!1;const e=e=>{i.current=e.altKey};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[e]);const o=n=>{e.dispatchCommand(OY,n),t()};return Xb(Zb,{children:[!n&&Xb(UW,{children:[Jb(PK,{"data-test-id":"image-modal-option-sample",onClick:()=>o(i.current?{altText:"Daylight fir trees forest glacier green high ice landscape",src:"/assets/landscape.21352c66.jpg"}:{altText:"Yellow flower in tilt shift lens",src:"/assets/yellow-flower.a2a7c7a2.jpg"}),children:"Sample"}),Jb(PK,{"data-test-id":"image-modal-option-url",onClick:()=>r("url"),children:"URL"}),Jb(PK,{"data-test-id":"image-modal-option-file",onClick:()=>r("file"),children:"File"})]}),"url"===n&&Jb(MY,{onClick:o}),"file"===n&&Jb(RY,{onClick:o})]})}function IY({captionsEnabled:e}){const[t]=Mv();return a.exports.useEffect((()=>{if(!t.hasNodes([yq]))throw new Error("ImagesPlugin: ImageNode not registered on editor");return Sy(t.registerCommand(OY,(e=>{const t=vq(e);return Xg([t]),nm(t.getParentOrThrow())&&_y(t,Vg).selectEnd(),!0}),um),t.registerCommand(bm,(e=>function(e){const t=LY();if(!t)return!1;const n=e.dataTransfer;if(!n)return!1;return n.setData("text/plain","_"),n.setDragImage(PY,0,0),n.setData("application/x-lexical-drag",JSON.stringify({data:{altText:t.__altText,caption:t.__caption,height:t.__height,key:t.getKey(),maxWidth:t.__maxWidth,showCaption:t.__showCaption,src:t.__src,width:t.__width},type:"image"})),!0}(e)),dm),t.registerCommand(vm,(e=>function(e){if(!LY())return!1;BY(e)||e.preventDefault();return!0}(e)),hm),t.registerCommand(_m,(e=>function(e,t){const n=LY();if(!n)return!1;const r=function(e){var t;const n=null==(t=e.dataTransfer)?void 0:t.getData("application/x-lexical-drag");if(!n)return null;const{type:r,data:i}=JSON.parse(n);if("image"!==r)return null;return i}(e);if(!r)return!1;if(e.preventDefault(),BY(e)){const i=function(e){let t;const n=e.target,r=null==n?null:9===n.nodeType?n.defaultView:n.ownerDocument.defaultView,i=(e=>FL?(e||window).getSelection():null)(r);if(document.caretRangeFromPoint)t=document.caretRangeFromPoint(e.clientX,e.clientY);else{if(!e.rangeParent||null===i)throw Error("Cannot get the selection when dragging");i.collapse(e.rangeParent,e.rangeOffset||0),t=i.getRangeAt(0)}return t}(e);n.remove();const o=qg();null!=i&&o.applyDOMRange(i),im(o),t.dispatchCommand(OY,r)}return!0}(e,t)),dm))}),[e,t]),null}const PY=document.createElement("img");function LY(){const e=Jg();if(!Qg(e))return null;const t=e.getNodes()[0];return bq(t)?t:null}function BY(e){const t=e.target;return!!(t&&t instanceof HTMLElement&&!t.closest("code, span.editor-image")&&t.parentElement&&t.parentElement.closest("div.ContentEditable__root"))}PY.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";const $Y=a.exports.lazy((()=>_z((()=>import("./PollComponent.7b32c9d1.js")),["assets/PollComponent.7b32c9d1.js","assets/PollComponent.e519dbaf.css"])));function zY(e=""){return{text:e,uid:Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5),votes:[]}}function FY(e,t,n){return{text:t,uid:e.uid,votes:n||Array.from(e.votes)}}function UY(e){const t=e.getAttribute("data-lexical-poll-question"),n=e.getAttribute("data-lexical-poll-options");if(null!==t&&null!==n){return{node:VY(t,JSON.parse(n))}}return null}class HY extends wm{constructor(e,t,n){super(n),this.__question=e,this.__options=t}static getType(){return"poll"}static clone(e){return new HY(e.__question,e.__options,e.__key)}static importJSON(e){const t=VY(e.question,e.options);return e.options.forEach(t.addOption),t}exportJSON(){return{options:this.__options,question:this.__question,type:"poll",version:1}}addOption(e){const t=this.getWritable(),n=Array.from(t.__options);n.push(e),t.__options=n}deleteOption(e){const t=this.getWritable(),n=Array.from(t.__options),r=n.indexOf(e);n.splice(r,1),t.__options=n}setOptionText(e,t){const n=this.getWritable(),r=FY(e,t),i=Array.from(n.__options),o=i.indexOf(e);i[o]=r,n.__options=i}toggleVote(e,t){const n=this.getWritable(),r=e.votes,i=Array.from(r),o=r.indexOf(t);-1===o?i.push(t):i.splice(o,1);const a=FY(e,e.text,i),s=Array.from(n.__options),l=s.indexOf(e);s[l]=a,n.__options=s}static importDOM(){return{span:e=>e.hasAttribute("data-lexical-poll-question")?{conversion:UY,priority:2}:null}}exportDOM(){const e=document.createElement("span");return e.setAttribute("data-lexical-poll-question",this.__question),e.setAttribute("data-lexical-poll-options",JSON.stringify(this.__options)),{element:e}}createDOM(){const e=document.createElement("span");return e.style.display="inline-block",e}updateDOM(){return!1}decorate(){return Jb(a.exports.Suspense,{fallback:null,children:Jb($Y,{question:this.__question,options:this.__options,nodeKey:this.__key})})}}function VY(e,t){return new HY(e,t)}function qY(e){return e instanceof HY}const KY=qm("INSERT_POLL_COMMAND");function WY({activeEditor:e,onClose:t}){const[n,r]=a.exports.useState("");return Xb(Zb,{children:[Jb(AY,{label:"Question",onChange:r,value:n}),Jb(HW,{children:Jb(PK,{disabled:""===n.trim(),onClick:()=>{e.dispatchCommand(KY,n),t()},children:"Confirm"})})]})}function jY(){const[e]=Mv();return a.exports.useEffect((()=>{if(!e.hasNodes([HY]))throw new Error("PollPlugin: PollNode not registered on editor");return e.registerCommand(KY,(e=>{const t=VY(e,[zY(),zY()]);return Xg([t]),nm(t.getParentOrThrow())&&_y(t,Vg).selectEnd(),!0}),um)}),[e]),null}function YY(e,t,...n){if(!e)throw new Error("Internal Lexical error: invariant() is meant to be replaced at compile time. There is no runtime version. Error: "+t)}const GY=new Map,JY=new Map,XY='{"root":{"children":[{"children":[],"direction":null,"format":"","indent":0,"type":"paragraph","version":1}],"direction":null,"format":"","indent":0,"type":"root","version":1}}',ZY=e=>""===e?XY:`{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":${e},"type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}`,QY=a.exports.lazy((()=>_z((()=>import("./TableComponent.b31a076f.js")),["assets/TableComponent.b31a076f.js","assets/LexicalNestedComposer.412b5854.js"])));function eG(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function tG(e){return{colSpan:1,id:eG(),json:XY,type:e,width:null}}function nG(){return{cells:[],height:null,id:eG()}}function rG(e){const t=e.querySelectorAll("tr"),n=[];for(let r=0;r<t.length;r++){const e=t[r].querySelectorAll("td,th");if(!e||0===e.length)continue;const i=[];for(let t=0;t<e.length;t++){const n=e[t],r=tG("TH"===n.nodeName?"header":"normal");r.json=ZY(JSON.stringify(n.innerText.replace(/\n/g," "))),i.push(r)}const o=nG();o.cells=i,n.push(o)}return n}function iG(e){const t=e.querySelectorAll("tr");if(!t||0===t.length)return null;const n=[];for(let r=0;r<t.length;r++){const e=t[r].querySelectorAll("td,th");if(!e||0===e.length)continue;const i=[];for(let t=0;t<e.length;t++){const n=e[t],r=tG("TH"===n.nodeName?"header":"normal");r.json=ZY(JSON.stringify(n.innerText.replace(/\n/g," "))),i.push(r)}const o=nG();o.cells=i,n.push(o)}return{node:lG(n)}}function oG(e,t){const n=document.createElement("table"),r=document.createElement("colgroup"),i=document.createElement("tbody"),o=e[0];for(let a=null!=t?t.startX:0;a<(null!=t?t.endX+1:o.cells.length);a++){const e=document.createElement("col");r.append(e)}for(let a=null!=t?t.startY:0;a<(null!=t?t.endY+1:e.length);a++){const n=e[a].cells,r=document.createElement("tr");for(let e=null!=t?t.startX:0;e<(null!=t?t.endX+1:n.length);e++){const t=n[e],i=document.createElement("header"===t.type?"th":"td");i.innerHTML=GY.get(t.json)||"",r.appendChild(i)}i.appendChild(r)}return n.appendChild(r),n.appendChild(i),n}class aG extends wm{constructor(e,t){super(t),this.__rows=e||[]}static getType(){return"tablesheet"}static clone(e){return new aG(Array.from(e.__rows),e.__key)}static importJSON(e){return lG(e.rows)}exportJSON(){return{rows:this.__rows,type:"tablesheet",version:1}}static importDOM(){return{table:e=>({conversion:iG,priority:0})}}exportDOM(){return{element:oG(this.__rows)}}createDOM(){return document.createElement("div")}updateDOM(){return!1}mergeRows(e,t,n){const r=this.getWritable().__rows,i=Math.min(r.length,t+n.length);for(let o=t;o<i;o++){const i=r[o],a=n[o-t],s=i.cells,l=Array.from(s),c={...i,cells:l},u=a.cells,d=Math.min(s.length,e+u.length);for(let t=e;t<d;t++){const n=s[t],r=u[t-e],i={...n,json:r.json,type:r.type};l[t]=i}r[o]=c}}updateCellJSON(e,t,n){const r=this.getWritable().__rows,i=r[t],o=i.cells,a=o[e],s=Array.from(o),l={...a,json:n},c={...i,cells:s};s[e]=l,r[t]=c}updateCellType(e,t,n){const r=this.getWritable().__rows,i=r[t],o=i.cells,a=o[e],s=Array.from(o),l={...a,type:n},c={...i,cells:s};s[e]=l,r[t]=c}insertColumnAt(e){const t=this.getWritable().__rows;for(let n=0;n<t.length;n++){const r=t[n],i=r.cells,o=Array.from(i),a={...r,cells:o},s=(i[e]||i[e-1]).type;o.splice(e,0,tG(s)),t[n]=a}}deleteColumnAt(e){const t=this.getWritable().__rows;for(let n=0;n<t.length;n++){const r=t[n],i=r.cells,o=Array.from(i),a={...r,cells:o};o.splice(e,1),t[n]=a}}addColumns(e){const t=this.getWritable().__rows;for(let n=0;n<t.length;n++){const r=t[n],i=r.cells,o=Array.from(i),a={...r,cells:o},s=i[i.length-1].type;for(let t=0;t<e;t++)o.push(tG(s));t[n]=a}}insertRowAt(e){const t=this.getWritable().__rows,n=t[e]||t[e-1],r=n.cells.length,i=nG();for(let o=0;o<r;o++){const e=tG(n.cells[o].type);i.cells.push(e)}t.splice(e,0,i)}deleteRowAt(e){this.getWritable().__rows.splice(e,1)}addRows(e){const t=this.getWritable().__rows,n=t[t.length-1],r=n.cells.length;for(let i=0;i<e;i++){const e=nG();for(let t=0;t<r;t++){const r=tG(n.cells[t].type);e.cells.push(r)}t.push(e)}}updateColumnWidth(e,t){const n=this.getWritable().__rows;for(let r=0;r<n.length;r++){const i=n[r],o=i.cells,a=Array.from(o),s={...i,cells:a};a[e].width=t,n[r]=s}}decorate(e,t){return Jb(a.exports.Suspense,{children:Jb(QY,{nodeKey:this.__key,theme:t.theme,rows:this.__rows})})}isInline(){return!1}}function sG(e){return e instanceof aG}function lG(e){return new aG(e)}const cG=qm("INSERT_NEW_TABLE_COMMAND"),uG=a.exports.createContext({cellEditorConfig:null,cellEditorPlugins:null,set:()=>{}});function dG({children:e}){const[t,n]=a.exports.useState({cellEditorConfig:null,cellEditorPlugins:null});return Jb(uG.Provider,{value:a.exports.useMemo((()=>({cellEditorConfig:t.cellEditorConfig,cellEditorPlugins:t.cellEditorPlugins,set:(e,t)=>{n({cellEditorConfig:e,cellEditorPlugins:t})}})),[t.cellEditorConfig,t.cellEditorPlugins]),children:e})}function hG({activeEditor:e,onClose:t}){const[n,r]=a.exports.useState("5"),[i,o]=a.exports.useState("5"),[s,l]=a.exports.useState(!0);a.exports.useEffect((()=>{const e=Number(n),t=Number(i);l(!(e&&e>0&&e<=500&&t&&t>0&&t<=50))}),[n,i]);return Xb(Zb,{children:[Jb(AY,{placeholder:"# of rows (1-500)",label:"Rows",onChange:r,value:n,"data-test-id":"table-modal-rows"}),Jb(AY,{placeholder:"# of columns (1-50)",label:"Columns",onChange:o,value:i,"data-test-id":"table-modal-columns"}),Jb(HW,{"data-test-id":"table-model-confirm-insert",children:Jb(PK,{disabled:s,onClick:()=>{e.dispatchCommand(NL,{columns:i,rows:n}),t()},children:"Confirm"})})]})}function pG({activeEditor:e,onClose:t}){const[n,r]=a.exports.useState(""),[i,o]=a.exports.useState(""),[s,l]=a.exports.useState(!0);a.exports.useEffect((()=>{const e=Number(n),t=Number(i);l(!(e&&e>0&&e<=500&&t&&t>0&&t<=50))}),[n,i]);return Xb(Zb,{children:[Jb(AY,{placeholder:"# of rows (1-500)",label:"Rows",onChange:r,value:n,"data-test-id":"table-modal-rows"}),Jb(AY,{placeholder:"# of columns (1-50)",label:"Columns",onChange:o,value:i,"data-test-id":"table-modal-columns"}),Jb(HW,{"data-test-id":"table-model-confirm-insert",children:Jb(PK,{disabled:s,onClick:()=>{e.dispatchCommand(cG,{columns:i,rows:n}),t()},children:"Confirm"})})]})}function fG({cellEditorConfig:e,children:t}){const[n]=Mv(),r=a.exports.useContext(uG);return a.exports.useEffect((()=>(n.hasNodes([aG])||YY(!1,"TablePlugin: TableNode is not registered on editor"),r.set(e,t),n.registerCommand(cG,(({columns:e,rows:t,includeHeaders:n})=>{const r=Jg();if(!tm(r))return!0;const i=r.focus,o=i.getNode();if(null!==o){const r=function(e,t,n=!0){const r=[];for(let i=0;i<t;i++){const t=nG();r.push(t);for(let r=0;r<e;r++)t.cells.push(tG(!0!==n||0!==i&&0!==r?"normal":"header"))}return new aG(r)}(Number(t),Number(e),n);if(nm(o)){const e=o.getChildAtIndex(i.offset);null!==e?e.insertBefore(r):o.append(r),r.insertBefore(Vg())}else{o.getTopLevelElementOrThrow().insertAfter(r)}r.insertAfter(Vg());const a=Hg();a.add(r.getKey()),im(a)}return!0}),um))),[r,e,t,n]),null}class gG extends kW{constructor(e,t){super(e),this.title=e,this.keywords=t.keywords||[],this.icon=t.icon,this.keyboardShortcut=t.keyboardShortcut,this.onSelect=t.onSelect.bind(this)}}function mG({index:e,isSelected:t,onClick:n,onMouseEnter:r,option:i}){let o="item";return t&&(o+=" selected"),Xb("li",{tabIndex:-1,className:o,ref:i.setRefElement,role:"option","aria-selected":t,id:"typeahead-item-"+e,onMouseEnter:r,onClick:n,children:[i.icon,Jb("span",{className:"text",children:i.title})]},i.key)}function yG(){const[e]=Mv(),[t,n]=DK(),[r,i]=a.exports.useState(null),o=NW("/",{minLength:0}),s=a.exports.useCallback((()=>{const t=[];if(null==r)return t;const n=new RegExp(/^([1-9]|10)x([1-9]|10)$/),i=new RegExp(/^([1-9]|10)x?$/),o=n.exec(r),a=i.exec(r);if(o){const[n,r]=o[0].split("x").map((e=>parseInt(e,10)));t.push(new gG(`${n}x${r} Table`,{icon:Jb("i",{className:"icon table"}),keywords:["table"],onSelect:()=>e.dispatchCommand(NL,{columns:r,rows:n})}))}else if(a){const n=parseInt(a[0],10);t.push(...Array.from({length:5},((e,t)=>t+1)).map((t=>new gG(`${n}x${t} Table`,{icon:Jb("i",{className:"icon table"}),keywords:["table"],onSelect:()=>e.dispatchCommand(NL,{columns:t,rows:n})}))))}return t}),[e,r]),l=a.exports.useMemo((()=>{const t=[new gG("Paragraph",{icon:Jb("i",{className:"icon paragraph"}),keywords:["normal","paragraph","p","text"],onSelect:()=>e.update((()=>{const e=Jg();tm(e)&&ly(e,(()=>Vg()))}))}),...Array.from({length:3},((e,t)=>t+1)).map((t=>new gG(`Heading ${t}`,{icon:Jb("i",{className:`icon h${t}`}),keywords:["heading","header",`h${t}`],onSelect:()=>e.update((()=>{const e=Jg();tm(e)&&ly(e,(()=>Ib(`h${t}`)))}))}))),new gG("Table",{icon:Jb("i",{className:"icon table"}),keywords:["table","grid","spreadsheet","rows","columns"],onSelect:()=>n("Insert Table",(t=>Jb(hG,{activeEditor:e,onClose:t})))}),new gG("Table (Experimental)",{icon:Jb("i",{className:"icon table"}),keywords:["table","grid","spreadsheet","rows","columns"],onSelect:()=>n("Insert Table",(t=>Jb(pG,{activeEditor:e,onClose:t})))}),new gG("Numbered List",{icon:Jb("i",{className:"icon number"}),keywords:["numbered list","ordered list","ol"],onSelect:()=>e.dispatchCommand(Sv,void 0)}),new gG("Bulleted List",{icon:Jb("i",{className:"icon bullet"}),keywords:["bulleted list","unordered list","ul"],onSelect:()=>e.dispatchCommand(Cv,void 0)}),new gG("Check List",{icon:Jb("i",{className:"icon check"}),keywords:["check list","todo list"],onSelect:()=>e.dispatchCommand(xv,void 0)}),new gG("Quote",{icon:Jb("i",{className:"icon quote"}),keywords:["block quote"],onSelect:()=>e.update((()=>{const e=Jg();tm(e)&&ly(e,(()=>Pb()))}))}),new gG("Code",{icon:Jb("i",{className:"icon code"}),keywords:["javascript","python","js","codeblock"],onSelect:()=>e.update((()=>{const e=Jg();if(tm(e))if(e.isCollapsed())ly(e,(()=>J$()));else{const t=e.getTextContent(),n=J$();e.insertNodes([n]),e.insertRawText(t)}}))}),new gG("Divider",{icon:Jb("i",{className:"icon horizontal-rule"}),keywords:["horizontal rule","divider","hr"],onSelect:()=>e.dispatchCommand(NI,void 0)}),new gG("Excalidraw",{icon:Jb("i",{className:"icon diagram-2"}),keywords:["excalidraw","diagram","drawing"],onSelect:()=>e.dispatchCommand(TY,void 0)}),new gG("Poll",{icon:Jb("i",{className:"icon poll"}),keywords:["poll","vote"],onSelect:()=>n("Insert Poll",(t=>Jb(WY,{activeEditor:e,onClose:t})))}),...rj.map((t=>new gG(`Embed ${t.contentName}`,{icon:t.icon,keywords:[...t.keywords,"embed"],onSelect:()=>e.dispatchCommand($W,t.type)}))),new gG("Equation",{icon:Jb("i",{className:"icon equation"}),keywords:["equation","latex","math"],onSelect:()=>n("Insert Equation",(t=>Jb(CY,{activeEditor:e,onClose:t})))}),new gG("GIF",{icon:Jb("i",{className:"icon gif"}),keywords:["gif","animate","image","file"],onSelect:()=>e.dispatchCommand(OY,{altText:"Cat typing on a laptop",src:"/assets/cat-typing.29244fe9.gif"})}),new gG("Image",{icon:Jb("i",{className:"icon image"}),keywords:["image","photo","picture","file"],onSelect:()=>n("Insert Image",(t=>Jb(DY,{activeEditor:e,onClose:t})))}),new gG("Collapsible",{icon:Jb("i",{className:"icon caret-right"}),keywords:["collapse","collapsible","toggle"],onSelect:()=>e.dispatchCommand(vY,void 0)}),...["left","center","right","justify"].map((t=>new gG(`Align ${t}`,{icon:Jb("i",{className:`icon ${t}-align`}),keywords:["align","justify",t],onSelect:()=>e.dispatchCommand(Cm,t)})))],i=s();return r?[...i,...t.filter((e=>!(!new RegExp(r,"gi").exec(e.title)&&null==e.keywords)&&e.keywords.some((e=>new RegExp(r,"gi").exec(e)))))]:t}),[e,s,r,n]),c=a.exports.useCallback(((t,n,r,i)=>{e.update((()=>{n&&n.remove(),t.onSelect(i),r()}))}),[e]);return Xb(Zb,{children:[t,Jb(TW,{onQueryChange:i,onSelectOption:c,triggerFn:o,options:l,menuRenderFn:(e,{selectedIndex:t,selectOptionAndCleanUp:n,setHighlightedIndex:r})=>e.current&&l.length?U.exports.createPortal(Jb("div",{className:"typeahead-popover component-picker-menu",children:Jb("ul",{children:l.map(((e,i)=>Jb(mG,{index:i,isSelected:t===i,onClick:()=>{r(i),n(e)},onMouseEnter:()=>{r(i)},option:e},e.key)))})}),e.current):null})]})}const vG=["image/","image/heic","image/heif","image/gif","image/webp"];function bG(){const[e]=Mv();return a.exports.useEffect((()=>e.registerCommand(Bb,(t=>((async()=>{const n=await xy(t,[vG].flatMap((e=>e)));for(const{file:t,result:r}of n)wy(t,vG)&&e.dispatchCommand(OY,{altText:t.name,src:r})})(),!0)),hm)),[e]),null}function _G(e){return e instanceof HTMLElement}class wG{constructor(e,t){this._x=e,this._y=t}get x(){return this._x}get y(){return this._y}equals({x:e,y:t}){return this.x===e&&this.y===t}calcDeltaXTo({x:e}){return this.x-e}calcDeltaYTo({y:e}){return this.y-e}calcHorizontalDistanceTo(e){return Math.abs(this.calcDeltaXTo(e))}calcVerticalDistance(e){return Math.abs(this.calcDeltaYTo(e))}calcDistanceTo(e){return Math.sqrt(Math.pow(this.calcDeltaXTo(e),2)+Math.pow(this.calcDeltaYTo(e),2))}}class xG{constructor(e,t,n,r){const[i,o]=t<=r?[t,r]:[r,t],[a,s]=e<=n?[e,n]:[n,e];this._top=i,this._right=s,this._left=a,this._bottom=o}get top(){return this._top}get right(){return this._right}get bottom(){return this._bottom}get left(){return this._left}get width(){return Math.abs(this._left-this._right)}get height(){return Math.abs(this._bottom-this._top)}equals({top:e,left:t,bottom:n,right:r}){return e===this._top&&n===this._bottom&&t===this._left&&r===this._right}contains(e){if(e instanceof wG){const{x:t,y:n}=e,r=n<this._top,i=n>this._bottom,o=t<this._left,a=t>this._right;return{reason:{isOnBottomSide:i,isOnLeftSide:o,isOnRightSide:a,isOnTopSide:r},result:!(r||i||o||a)}}{const{top:t,left:n,bottom:r,right:i}=e;return t>=this._top&&t<=this._bottom&&r>=this._top&&r<=this._bottom&&n>=this._left&&n<=this._right&&i>=this._left&&i<=this._right}}intersectsWith(e){const{left:t,top:n,width:r,height:i}=e,{left:o,top:a,width:s,height:l}=this;return(t+r>=o+s?t+r:o+s)-(t<=o?t:o)<=r+s&&(n+i>=a+l?n+i:a+l)-(n<=a?n:a)<=i+l}generateNewRect({left:e=this.left,top:t=this.top,right:n=this.right,bottom:r=this.bottom}){return new xG(e,t,n,r)}static fromLTRB(e,t,n,r){return new xG(e,t,n,r)}static fromLWTH(e,t,n,r){return new xG(e,n,e+t,n+r)}static fromPoints(e,t){const{y:n,x:r}=e,{y:i,x:o}=t;return xG.fromLTRB(r,n,o,i)}static fromDOM(e){const{top:t,width:n,left:r,height:i}=e.getBoundingClientRect();return xG.fromLWTH(r,n,t,i)}}let SG=1/0;function CG(e,t,n){const r=e.getBoundingClientRect(),i=function(e){return e.getEditorState().read((()=>Gg().getChildrenKeys()))}(t);let o=null;return t.getEditorState().read((()=>{let e=0===(a=i.length)?1/0:SG>=0&&SG<a?SG:Math.floor(a/2);var a;let s=0;for(;e>=0&&e<i.length;){const a=i[e],l=t.getElementByKey(a);if(null===l)break;const c=new wG(n.x,n.y),u=xG.fromDOM(l),{marginTop:d,marginBottom:h}=window.getComputedStyle(l),p=u.generateNewRect({bottom:u.bottom+parseFloat(h),left:r.left,right:r.right,top:u.top-parseFloat(d)}),{result:f,reason:{isOnTopSide:g,isOnBottomSide:m}}=p.contains(c);if(f){o=l,SG=e;break}0===s&&(s=g?-1:m?1:1/0),e+=s}})),o}function EG(e,t,n){const r=t.parentElement,i=a.exports.useRef(null),o=a.exports.useRef(null),s=a.exports.useRef(!1),[l,c]=a.exports.useState(null);return a.exports.useEffect((()=>{function n(n){const r=n.target;if(!_G(r))return void c(null);if(r.closest(".draggable-block-menu"))return;const i=CG(t,e,n);c(i)}function i(){c(null)}return null==r||r.addEventListener("mousemove",n),null==r||r.addEventListener("mouseleave",i),()=>{null==r||r.removeEventListener("mousemove",n),null==r||r.removeEventListener("mouseleave",i)}}),[r,t,e]),a.exports.useEffect((()=>{i.current&&function(e,t,n){if(!e)return t.style.opacity="0",void(t.style.transform="translate(-10000px, -10000px)");const r=e.getBoundingClientRect(),i=window.getComputedStyle(e),o=t.getBoundingClientRect(),a=n.getBoundingClientRect(),s=r.top+(parseInt(i.lineHeight,10)-o.height)/2-a.top;t.style.opacity="1",t.style.transform=`translate(4px, ${s}px)`}(l,i.current,t)}),[t,l]),a.exports.useEffect((()=>{function n(n){if(!s.current)return!1;const[r]=Fb(n);if(r)return!1;const{pageY:i,target:a}=n;if(!_G(a))return!1;const l=CG(t,e,n),c=o.current;return null!==l&&null!==c&&(function(e,t,n,r){const i=window.getComputedStyle(t),{top:o,height:a}=t.getBoundingClientRect(),{top:s,width:l}=r.getBoundingClientRect();let c=o;n-o>a/2?c+=a+parseFloat(i.marginBottom):c-=parseFloat(i.marginTop);const u=c-s-2;e.style.transform=`translate(24px, ${u}px)`,e.style.width=l-48+"px",e.style.opacity=".4"}(c,l,i,t),n.preventDefault(),!0)}return Sy(e.registerCommand(vm,(e=>n(e)),hm),e.registerCommand(_m,(n=>function(n){if(!s.current)return!1;const[r]=Fb(n);if(r)return!1;const{target:i,dataTransfer:o,pageY:a}=n,l=(null==o?void 0:o.getData("application/x-lexical-drag-block"))||"",u=jg(l);if(!u)return!1;if(!_G(i))return!1;const d=CG(t,e,n);if(!d)return!1;const h=Wg(d);if(!h)return!1;if(h===u)return!0;const{top:p,height:f}=d.getBoundingClientRect();return a-p>f/2?h.insertAfter(u):h.insertBefore(u),c(null),!0}(n)),dm))}),[t,e]),U.exports.createPortal(Xb(Zb,{children:[Jb("div",{className:"icon draggable-block-menu",ref:i,draggable:!0,onDragStart:function(t){const n=t.dataTransfer;if(!n||!l)return;!function(e,t){const{transform:n}=t.style;t.style.transform="translateZ(0)",e.setDragImage(t,0,0),setTimeout((()=>{t.style.transform=n}))}(n,l);let r="";e.update((()=>{const e=Wg(l);e&&(r=e.getKey())})),s.current=!0,n.setData("application/x-lexical-drag-block",r)},onDragEnd:function(){var e;s.current=!1,(e=o.current)&&(e.style.opacity="0",e.style.transform="translate(-10000px, -10000px)")},children:Jb("div",{className:n?"icon":""})}),Jb("div",{className:"draggable-block-target-line",ref:o})]}),t)}function TG({anchorElem:e=document.body}){const[t]=Mv();return EG(t,e,t._editable)}class kG extends kW{constructor(e,t,n){super(e),this.title=e,this.emoji=t,this.keywords=n.keywords||[]}}function NG({index:e,isSelected:t,onClick:n,onMouseEnter:r,option:i}){let o="item";return t&&(o+=" selected"),Jb("li",{tabIndex:-1,className:o,ref:i.setRefElement,role:"option","aria-selected":t,id:"typeahead-item-"+e,onMouseEnter:r,onClick:n,children:Xb("span",{className:"text",children:[i.emoji," ",i.title]})},i.key)}function AG(){const[e]=Mv(),[t,n]=a.exports.useState(null),[r,i]=a.exports.useState([]);a.exports.useEffect((()=>{_z((()=>import("./emoji-list.81a5609c.js")),[]).then((e=>i(e.default)))}),[]);const o=a.exports.useMemo((()=>null!=r?r.map((({emoji:e,aliases:t,tags:n})=>new kG(t[0],e,{keywords:[...t,...n]}))):[]),[r]),s=NW(":",{minLength:0}),l=a.exports.useMemo((()=>o.filter((e=>null!=t?!(!new RegExp(t,"gi").exec(e.title)&&null==e.keywords)&&e.keywords.some((e=>new RegExp(t,"gi").exec(e))):o)).slice(0,10)),[o,t]),c=a.exports.useCallback(((t,n,r)=>{e.update((()=>{const e=Jg();tm(e)&&null!=t&&(n&&n.remove(),e.insertNodes([Kg(t.emoji)]),r())}))}),[e]);return Jb(TW,{onQueryChange:n,onSelectOption:c,triggerFn:s,options:l,menuRenderFn:(e,{selectedIndex:t,selectOptionAndCleanUp:n,setHighlightedIndex:r})=>null==e.current||0===l.length?null:e.current&&l.length?U.exports.createPortal(Jb("div",{className:"typeahead-popover emoji-menu",children:Jb("ul",{children:l.map(((e,i)=>Jb("div",{children:Jb(NG,{index:i,isSelected:t===i,onClick:()=>{r(i),n(e)},onMouseEnter:()=>{r(i)},option:e})},e.key)))})}),e.current):null})}const OG=new Map([[":)",["emoji happysmile","🙂"]],[":D",["emoji veryhappysmile","😀"]],[":(",["emoji unhappysmile","🙁"]],["<3",["emoji heart","❤"]],["🙂",["emoji happysmile","🙂"]],["😀",["emoji veryhappysmile","😀"]],["🙁",["emoji unhappysmile","🙁"]],["❤",["emoji heart","❤"]]]);function MG(e){const t=e.getTextContent();for(let n=0;n<t.length;n++){const r=OG.get(t[n])||OG.get(t.slice(n,n+2));if(void 0!==r){const[t,i]=r;let o;0===n?[o]=e.splitText(n+2):[,o]=e.splitText(n,n+2);const a=vz(t,i);return o.replace(a),a}}return null}function RG(e){let t=e;for(;null!==t;){if(!t.isSimpleText())return;t=MG(t)}}function DG(){const[e]=Mv();return function(e){a.exports.useEffect((()=>{if(!e.hasNodes([yz]))throw new Error("EmojisPlugin: EmojiNode not registered on editor");return e.registerNodeTransform(Hm,RG)}),[e])}(e),null}function IG(e){const t=e.anchor,n=e.focus,r=e.anchor.getNode(),i=e.focus.getNode();if(r===i)return r;return e.isBackward()?iy(n)?r:i:iy(t)?r:i}function PG(e,t,n,r=10,i=5){const o=n.parentElement;if(null===e||!o)return t.style.opacity="0",void(t.style.transform="translate(-10000px, -10000px)");const a=t.getBoundingClientRect(),s=n.getBoundingClientRect(),l=o.getBoundingClientRect();let c=e.top-a.height-r,u=e.left-i;c<l.top&&(c+=a.height+e.height+2*r),u+a.width>l.right&&(u=l.right-a.width-i),c-=s.top,u-=s.left,t.style.opacity="1",t.style.transform=`translate(${u}px, ${c}px)`}function LG(e){return(e=String(e).trim()).match(/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi)||e.match(/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i)?e:"https://"}const BG=new RegExp(/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%/.\w-_]*)?\??(?:[-+=&;%@.\w_]*)#?(?:[\w]*))?)/);function $G(e){return"https://"===e||BG.test(e)}function zG({editor:e,isLink:t,setIsLink:n,anchorElem:r}){const i=a.exports.useRef(null),o=a.exports.useRef(null),[s,l]=a.exports.useState(""),[c,u]=a.exports.useState(""),[d,h]=a.exports.useState(!1),[p,f]=a.exports.useState(null),g=a.exports.useCallback((()=>{const t=Jg();if(tm(t)){const e=IG(t),n=e.getParent();Py(n)?l(n.getURL()):Py(e)?l(e.getURL()):l("")}const n=i.current,o=window.getSelection(),a=document.activeElement;if(null===n)return;const s=e.getRootElement();if(null!==t&&null!==o&&null!==s&&s.contains(o.anchorNode)&&e.isEditable()){const e=o.getRangeAt(0);let i;if(o.anchorNode===s){let e=s;for(;null!=e.firstElementChild;)e=e.firstElementChild;i=e.getBoundingClientRect()}else i=e.getBoundingClientRect();PG(i,n,r),f(t)}else a&&"link-input"===a.className||(null!==s&&PG(null,n,r),f(null),h(!1),l(""));return!0}),[r,e]);a.exports.useEffect((()=>{const t=r.parentElement,n=()=>{e.getEditorState().read((()=>{g()}))};return window.addEventListener("resize",n),t&&t.addEventListener("scroll",n),()=>{window.removeEventListener("resize",n),t&&t.removeEventListener("scroll",n)}}),[r.parentElement,e,g]),a.exports.useEffect((()=>Sy(e.registerUpdateListener((({editorState:e})=>{e.read((()=>{g()}))})),e.registerCommand(Um,(()=>(g(),!0)),hm),e.registerCommand(Pm,(()=>!!t&&(n(!1),!0)),dm))),[e,g,n,t]),a.exports.useEffect((()=>{e.getEditorState().read((()=>{g()}))}),[e,g]),a.exports.useEffect((()=>{d&&o.current&&o.current.focus()}),[d]);const m=()=>{null!==p&&(""!==s&&e.dispatchCommand($y,LG(c)),h(!1))};return Jb("div",{ref:i,className:"link-editor",children:t?d?Xb(Zb,{children:[Jb("input",{ref:o,className:"link-input",value:c,onChange:e=>{u(e.target.value)},onKeyDown:e=>{(e=>{"Enter"===e.key?(e.preventDefault(),m()):"Escape"===e.key&&(e.preventDefault(),h(!1))})(e)}}),Xb("div",{children:[Jb("div",{className:"link-cancel",role:"button",tabIndex:0,onMouseDown:e=>e.preventDefault(),onClick:()=>{h(!1)}}),Jb("div",{className:"link-confirm",role:"button",tabIndex:0,onMouseDown:e=>e.preventDefault(),onClick:m})]})]}):Xb("div",{className:"link-view",children:[Jb("a",{href:s,target:"_blank",rel:"noopener noreferrer",children:s}),Jb("div",{className:"link-edit",role:"button",tabIndex:0,onMouseDown:e=>e.preventDefault(),onClick:()=>{u(s),h(!0)}})]}):null})}function FG({anchorElem:e=document.body}){const[t]=Mv();return function(e,t){const[n,r]=a.exports.useState(e),[i,o]=a.exports.useState(!1),s=a.exports.useCallback((()=>{const e=Jg();if(tm(e)){const t=IG(e),n=gy(t,Py),r=gy(t,Iy);o(null!=n&&null==r)}}),[]);return a.exports.useEffect((()=>Sy(e.registerUpdateListener((({editorState:e})=>{e.read((()=>{s()}))})),e.registerCommand(Um,((e,t)=>(s(),r(t),!1)),cm))),[e,s]),U.exports.createPortal(Jb(zG,{editor:n,isLink:i,anchorElem:t,setIsLink:o}),t)}(t,e)}var UG={},HG=Zu,VG=Ju;class qG extends HG.ElementNode{static getType(){return"mark"}static clone(e){return new qG(Array.from(e.__ids),e.__key)}static importDOM(){return null}static importJSON(e){let t=KG(e.ids);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),ids:this.getIDs(),type:"mark",version:1}}constructor(e,t){super(t),this.__ids=e||[]}createDOM(e){let t=document.createElement("mark");return VG.addClassNamesToElement(t,e.theme.mark),1<this.__ids.length&&VG.addClassNamesToElement(t,e.theme.markOverlap),t}updateDOM(e,t,n){e=e.__ids.length;let r=this.__ids.length;return n=n.theme.markOverlap,e!==r&&(1===e?2===r&&VG.addClassNamesToElement(t,n):1===r&&VG.removeClassNamesFromElement(t,n)),!1}hasID(e){let t=this.getIDs();for(let n=0;n<t.length;n++)if(e===t[n])return!0;return!1}getIDs(){let e=this.getLatest();return WG(e)?e.__ids:[]}addID(e){var t=this.getWritable();if(WG(t)){let n=t.__ids;for(t.__ids=n,t=0;t<n.length;t++)if(e===n[t])return;n.push(e)}}deleteID(e){var t=this.getWritable();if(WG(t)){let n=t.__ids;for(t.__ids=n,t=0;t<n.length;t++)if(e===n[t]){n.splice(t,1);break}}}insertNewAfter(e,t=!0){return e=this.getParentOrThrow().insertNewAfter(e,t),HG.$isElementNode(e)?(t=KG(this.__ids),e.append(t),t):null}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,t,n){if(!HG.$isRangeSelection(t)||"html"===n)return!1;let r=t.anchor,i=t.focus;return e=r.getNode(),n=i.getNode(),t=t.isBackward()?r.offset-i.offset:i.offset-r.offset,this.isParentOf(e)&&this.isParentOf(n)&&this.getTextContent().length===t}excludeFromCopy(e){return"clone"!==e}}function KG(e){return HG.$applyNodeReplacement(new qG(e))}function WG(e){return e instanceof qG}UG.$createMarkNode=KG,UG.$getMarkIDs=function(e,t){for(;null!==e;){if(WG(e))return e.getIDs();if(HG.$isTextNode(e)&&t===e.getTextContentSize()){let t=e.getNextSibling();if(WG(t))return t.getIDs()}e=e.getParent()}return null},UG.$isMarkNode=WG,UG.$unwrapMarkNode=function(e){let t=e.getChildren(),n=null;for(let r=0;r<t.length;r++){let i=t[r];null===n?e.insertBefore(i):n.insertAfter(i),n=i}e.remove()},UG.$wrapSelectionInMarkNode=function(e,t,n,r){let i=e.getNodes();var o=e.anchor.offset,a=e.focus.offset;e=i.length;let s,l,c=t?a:o;for(t=t?o:a,o=0;o<e;o++){var u=i[o];if(HG.$isElementNode(l)&&l.isParentOf(u))continue;a=0===o;let h=o===e-1;var d=null;if(HG.$isTextNode(u)){d=u.getTextContentSize();let e=a?c:0,n=h?t:d;if(0===e&&0===n)continue;d=1<(u=u.splitText(e,n)).length&&(3===u.length||a&&!h||n===d)?u[1]:u[0]}else{if(WG(u))continue;HG.$isElementNode(u)&&u.isInline()&&(d=u)}null!==d?d&&d.is(s)||(null!=(a=d.getParent())&&a.is(s)||(l=void 0),s=a,void 0===l&&(l=(r||KG)([n]),d.insertBefore(l)),l.append(d)):l=s=void 0}};var jG=UG.MarkNode=qG,YG=a.exports;"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?YG.useLayoutEffect:YG.useEffect;const GG={blockCursor:"PlaygroundEditorTheme__blockCursor",characterLimit:"PlaygroundEditorTheme__characterLimit",code:"PlaygroundEditorTheme__code",codeHighlight:{atrule:"PlaygroundEditorTheme__tokenAttr",attr:"PlaygroundEditorTheme__tokenAttr",boolean:"PlaygroundEditorTheme__tokenProperty",builtin:"PlaygroundEditorTheme__tokenSelector",cdata:"PlaygroundEditorTheme__tokenComment",char:"PlaygroundEditorTheme__tokenSelector",class:"PlaygroundEditorTheme__tokenFunction","class-name":"PlaygroundEditorTheme__tokenFunction",comment:"PlaygroundEditorTheme__tokenComment",constant:"PlaygroundEditorTheme__tokenProperty",deleted:"PlaygroundEditorTheme__tokenProperty",doctype:"PlaygroundEditorTheme__tokenComment",entity:"PlaygroundEditorTheme__tokenOperator",function:"PlaygroundEditorTheme__tokenFunction",important:"PlaygroundEditorTheme__tokenVariable",inserted:"PlaygroundEditorTheme__tokenSelector",keyword:"PlaygroundEditorTheme__tokenAttr",namespace:"PlaygroundEditorTheme__tokenVariable",number:"PlaygroundEditorTheme__tokenProperty",operator:"PlaygroundEditorTheme__tokenOperator",prolog:"PlaygroundEditorTheme__tokenComment",property:"PlaygroundEditorTheme__tokenProperty",punctuation:"PlaygroundEditorTheme__tokenPunctuation",regex:"PlaygroundEditorTheme__tokenVariable",selector:"PlaygroundEditorTheme__tokenSelector",string:"PlaygroundEditorTheme__tokenSelector",symbol:"PlaygroundEditorTheme__tokenProperty",tag:"PlaygroundEditorTheme__tokenProperty",url:"PlaygroundEditorTheme__tokenOperator",variable:"PlaygroundEditorTheme__tokenVariable"},embedBlock:{base:"PlaygroundEditorTheme__embedBlock",focus:"PlaygroundEditorTheme__embedBlockFocus"},hashtag:"PlaygroundEditorTheme__hashtag",heading:{h1:"PlaygroundEditorTheme__h1",h2:"PlaygroundEditorTheme__h2",h3:"PlaygroundEditorTheme__h3",h4:"PlaygroundEditorTheme__h4",h5:"PlaygroundEditorTheme__h5",h6:"PlaygroundEditorTheme__h6"},image:"editor-image",indent:"PlaygroundEditorTheme__indent",link:"PlaygroundEditorTheme__link",list:{listitem:"PlaygroundEditorTheme__listItem",listitemChecked:"PlaygroundEditorTheme__listItemChecked",listitemUnchecked:"PlaygroundEditorTheme__listItemUnchecked",nested:{listitem:"PlaygroundEditorTheme__nestedListItem"},olDepth:["PlaygroundEditorTheme__ol1","PlaygroundEditorTheme__ol2","PlaygroundEditorTheme__ol3","PlaygroundEditorTheme__ol4","PlaygroundEditorTheme__ol5"],ul:"PlaygroundEditorTheme__ul"},ltr:"PlaygroundEditorTheme__ltr",mark:"PlaygroundEditorTheme__mark",markOverlap:"PlaygroundEditorTheme__markOverlap",paragraph:"PlaygroundEditorTheme__paragraph",quote:"PlaygroundEditorTheme__quote",rtl:"PlaygroundEditorTheme__rtl",table:"PlaygroundEditorTheme__table",tableAddColumns:"PlaygroundEditorTheme__tableAddColumns",tableAddRows:"PlaygroundEditorTheme__tableAddRows",tableCell:"PlaygroundEditorTheme__tableCell",tableCellActionButton:"PlaygroundEditorTheme__tableCellActionButton",tableCellActionButtonContainer:"PlaygroundEditorTheme__tableCellActionButtonContainer",tableCellEditing:"PlaygroundEditorTheme__tableCellEditing",tableCellHeader:"PlaygroundEditorTheme__tableCellHeader",tableCellPrimarySelected:"PlaygroundEditorTheme__tableCellPrimarySelected",tableCellResizer:"PlaygroundEditorTheme__tableCellResizer",tableCellSelected:"PlaygroundEditorTheme__tableCellSelected",tableCellSortedIndicator:"PlaygroundEditorTheme__tableCellSortedIndicator",tableResizeRuler:"PlaygroundEditorTheme__tableCellResizeRuler",tableSelected:"PlaygroundEditorTheme__tableSelected",text:{bold:"PlaygroundEditorTheme__textBold",code:"PlaygroundEditorTheme__textCode",italic:"PlaygroundEditorTheme__textItalic",strikethrough:"PlaygroundEditorTheme__textStrikethrough",subscript:"PlaygroundEditorTheme__textSubscript",superscript:"PlaygroundEditorTheme__textSuperscript",underline:"PlaygroundEditorTheme__textUnderline",underlineStrikethrough:"PlaygroundEditorTheme__textUnderlineStrikethrough"}};var JG=Nv,XG=a.exports,ZG="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?XG.useLayoutEffect:XG.useEffect,QG=function({ariaActiveDescendant:e,ariaAutoComplete:t,ariaControls:n,ariaDescribedBy:r,ariaExpanded:i,ariaLabel:o,ariaLabelledBy:a,ariaMultiline:s,ariaOwns:l,ariaRequired:c,autoCapitalize:u,className:d,id:h,role:p="textbox",spellCheck:f=!0,style:g,tabIndex:m,"data-testid":y}){let[v]=JG.useLexicalComposerContext(),[b,_]=XG.useState(!1),w=XG.useCallback((e=>{v.setRootElement(e)}),[v]);return ZG((()=>(_(v.isEditable()),v.registerEditableListener((e=>{_(e)})))),[v]),XG.createElement("div",{"aria-activedescendant":b?e:void 0,"aria-autocomplete":b?t:"none","aria-controls":b?n:void 0,"aria-describedby":r,"aria-expanded":b&&"combobox"===p?!!i:void 0,"aria-label":o,"aria-labelledby":a,"aria-multiline":s,"aria-owns":b?l:void 0,"aria-required":c,autoCapitalize:u,className:d,contentEditable:b,"data-testid":y,id:h,ref:w,role:b?p:void 0,spellCheck:f,style:g,tabIndex:m})};function eJ({className:e}){return Jb(QG,{className:e||"ContentEditable__root"})}function tJ({children:e,className:t}){return Jb("div",{className:t||"Placeholder__root",children:e})}const nJ=qm("INSERT_INLINE_COMMAND");function rJ({editor:e,anchorElem:t,isLink:n,isBold:r,isItalic:i,isUnderline:o,isCode:s,isStrikethrough:l,isSubscript:c,isSuperscript:u}){const d=a.exports.useRef(null),h=a.exports.useCallback((()=>{n?e.dispatchCommand($y,null):e.dispatchCommand($y,"https://")}),[e,n]);function p(e){!(null==d?void 0:d.current)||1!==e.buttons&&3!==e.buttons||(d.current.style.pointerEvents="none")}function f(e){(null==d?void 0:d.current)&&(d.current.style.pointerEvents="auto")}a.exports.useEffect((()=>{if(null==d?void 0:d.current)return document.addEventListener("mousemove",p),document.addEventListener("mouseup",f),()=>{document.removeEventListener("mousemove",p),document.removeEventListener("mouseup",f)}}),[d]);const g=a.exports.useCallback((()=>{const n=Jg(),r=d.current,i=window.getSelection();if(null===r)return;const o=e.getRootElement();if(null!==n&&null!==i&&!i.isCollapsed&&null!==o&&o.contains(i.anchorNode)){const e=function(e,t){const n=e.getRangeAt(0);let r;if(e.anchorNode===t){let e=t;for(;null!=e.firstElementChild;)e=e.firstElementChild;r=e.getBoundingClientRect()}else r=n.getBoundingClientRect();return r}(i,o);PG(e,r,t)}}),[e,t]);return a.exports.useEffect((()=>{const n=t.parentElement,r=()=>{e.getEditorState().read((()=>{g()}))};return window.addEventListener("resize",r),n&&n.addEventListener("scroll",r),()=>{window.removeEventListener("resize",r),n&&n.removeEventListener("scroll",r)}}),[e,g,t]),a.exports.useEffect((()=>(e.getEditorState().read((()=>{g()})),Sy(e.registerUpdateListener((({editorState:e})=>{e.read((()=>{g()}))})),e.registerCommand(Um,(()=>(g(),!1)),hm)))),[e,g]),Xb("div",{ref:d,className:"floating-text-format-popup",children:[e.isEditable()&&Xb(Zb,{children:[Jb("button",{onClick:()=>{e.dispatchCommand(Em,"bold")},className:"popup-item spaced "+(r?"active":""),"aria-label":"Format text as bold",children:Jb("i",{className:"format bold"})}),Jb("button",{onClick:()=>{e.dispatchCommand(Em,"italic")},className:"popup-item spaced "+(i?"active":""),"aria-label":"Format text as italics",children:Jb("i",{className:"format italic"})}),Jb("button",{onClick:()=>{e.dispatchCommand(Em,"underline")},className:"popup-item spaced "+(o?"active":""),"aria-label":"Format text to underlined",children:Jb("i",{className:"format underline"})}),Jb("button",{onClick:()=>{e.dispatchCommand(Em,"strikethrough")},className:"popup-item spaced "+(l?"active":""),"aria-label":"Format text with a strikethrough",children:Jb("i",{className:"format strikethrough"})}),Jb("button",{onClick:()=>{e.dispatchCommand(Em,"subscript")},className:"popup-item spaced "+(c?"active":""),title:"Subscript","aria-label":"Format Subscript",children:Jb("i",{className:"format subscript"})}),Jb("button",{onClick:()=>{e.dispatchCommand(Em,"superscript")},className:"popup-item spaced "+(u?"active":""),title:"Superscript","aria-label":"Format Superscript",children:Jb("i",{className:"format superscript"})}),Jb("button",{onClick:()=>{e.dispatchCommand(Em,"code")},className:"popup-item spaced "+(s?"active":""),"aria-label":"Insert code block",children:Jb("i",{className:"format code"})}),Jb("button",{onClick:h,className:"popup-item spaced "+(n?"active":""),"aria-label":"Insert link",children:Jb("i",{className:"format link"})})]}),Jb("button",{onClick:()=>{e.dispatchCommand(nJ,void 0)},className:"popup-item spaced insert-comment","aria-label":"Insert comment",children:Jb("i",{className:"format add-comment"})})]})}function iJ({anchorElem:e=document.body}){const[t]=Mv();return function(e,t){const[n,r]=a.exports.useState(!1),[i,o]=a.exports.useState(!1),[s,l]=a.exports.useState(!1),[c,u]=a.exports.useState(!1),[d,h]=a.exports.useState(!1),[p,f]=a.exports.useState(!1),[g,m]=a.exports.useState(!1),[y,v]=a.exports.useState(!1),[b,_]=a.exports.useState(!1),w=a.exports.useCallback((()=>{e.getEditorState().read((()=>{if(e.isComposing())return;const t=Jg(),n=window.getSelection(),i=e.getRootElement();if(!(null===n||tm(t)&&null!==i&&i.contains(n.anchorNode)))return void r(!1);if(!tm(t))return;const a=IG(t);l(t.hasFormat("bold")),u(t.hasFormat("italic")),h(t.hasFormat("underline")),f(t.hasFormat("strikethrough")),m(t.hasFormat("subscript")),v(t.hasFormat("superscript")),_(t.hasFormat("code"));const s=a.getParent();Py(s)||Py(a)?o(!0):o(!1),X$(t.anchor.getNode())||""===t.getTextContent()?r(!1):r(rm(a));const c=t.getTextContent().replace(/\n/g,"");t.isCollapsed()||""!==c||r(!1)}))}),[e]);return a.exports.useEffect((()=>(document.addEventListener("selectionchange",w),()=>{document.removeEventListener("selectionchange",w)})),[w]),a.exports.useEffect((()=>Sy(e.registerUpdateListener((()=>{w()})),e.registerRootListener((()=>{null===e.getRootElement()&&r(!1)})))),[e,w]),!n||i?null:U.exports.createPortal(Jb(rJ,{editor:e,anchorElem:t,isLink:i,isBold:s,isItalic:c,isStrikethrough:p,isSubscript:g,isSuperscript:y,isUnderline:d,isCode:b}),t)}(t,e)}const oJ=/(^|$|[^A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ])(congrats|congratulations|gratuluju|gratuluji|gratulujeme|blahopřeju|blahopřeji|blahopřejeme|Til lykke|Tillykke|Glückwunsch|Gratuliere|felicitaciones|enhorabuena|paljon onnea|onnittelut|Félicitations|gratula|gratulálok|gratulálunk|congratulazioni|complimenti|おめでとう|おめでとうございます|축하해|축하해요|gratulerer|Gefeliciteerd|gratulacje|Parabéns|parabéns|felicitações|felicitări|мои поздравления|поздравляем|поздравляю|gratulujem|blahoželám|ยินดีด้วย|ขอแสดงความยินดี|tebrikler|tebrik ederim|恭喜|祝贺你|恭喜你|恭喜|恭喜|baie geluk|veels geluk|অভিনন্দন|Čestitam|Čestitke|Čestitamo|Συγχαρητήρια|Μπράβο|અભિનંદન|badhai|बधाई|अभिनंदन|Честитам|Свака част|hongera|வாழ்த்துகள்|வாழ்த்துக்கள்|అభినందనలు|അഭിനന്ദനങ്ങൾ|Chúc mừng|מזל טוב|mazel tov|mazal tov)(^|$|[^A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ])/i;function aJ(){const[e]=Mv();a.exports.useEffect((()=>{if(!e.hasNodes([_q]))throw new Error("KeywordsPlugin: KeywordNode not registered on editor")}),[e]);const t=a.exports.useCallback((e=>wq(e.getTextContent())),[]),n=a.exports.useCallback((e=>{const t=oJ.exec(e);if(null===t)return null;const n=t[2].length,r=t.index+t[1].length;return{end:r+n,start:r}}),[]);return jD(n,_q,t),null}var sJ=Gu,lJ=Nv,cJ=Ju,uJ=Zu,dJ=a.exports,hJ=function({validateUrl:e}){let[t]=lJ.useLexicalComposerContext();return dJ.useEffect((()=>{if(!t.hasNodes([sJ.LinkNode]))throw Error("LinkPlugin: LinkNode not registered on editor");return cJ.mergeRegister(t.registerCommand(sJ.TOGGLE_LINK_COMMAND,(t=>{if(null===t)return sJ.toggleLink(t),!0;if("string"==typeof t)return!(void 0!==e&&!e(t))&&(sJ.toggleLink(t),!0);let{url:n,target:r,rel:i}=t;return sJ.toggleLink(n,{rel:i,target:r}),!0}),uJ.COMMAND_PRIORITY_LOW),void 0!==e?t.registerCommand(uJ.PASTE_COMMAND,(n=>{let r=uJ.$getSelection();if(!uJ.$isRangeSelection(r)||r.isCollapsed()||!(n instanceof ClipboardEvent)||null==n.clipboardData)return!1;let i=n.clipboardData.getData("text");return!!e(i)&&(!r.getNodes().some((e=>uJ.$isElementNode(e)))&&(t.dispatchCommand(sJ.TOGGLE_LINK_COMMAND,i),n.preventDefault(),!0))}),uJ.COMMAND_PRIORITY_LOW):()=>{})}),[t,e]),null};function pJ(){return Jb(hJ,{validateUrl:$G})}function fJ(e){const t=Jg();if(!tm(t))return!1;const n=function(e){const t=e.getNodes();return 0===t.length?new Set([e.anchor.getNode().getParentOrThrow(),e.focus.getNode().getParentOrThrow()]):new Set(t.map((e=>Zg(e)?e:e.getParentOrThrow())))}(t);let r=0;for(const i of n)if(wv(i))r=Math.max(bv(i)+1,r);else if(_v(i)){const e=i.getParent();if(!wv(e))throw new Error("ListMaxIndentLevelPlugin: A ListItemNode must have a ListNode for a parent.");r=Math.max(bv(e)+1,r)}return r<=e}function gJ({maxDepth:e}){const[t]=Mv();return a.exports.useEffect((()=>t.registerCommand(Tm,(()=>!fJ(null!=e?e:7)),cm)),[t,e]),null}var mJ=Nq,yJ=Nv,vJ=sI,bJ=a.exports;let _J=[{dependencies:[vJ.HorizontalRuleNode],export:e=>vJ.$isHorizontalRuleNode(e)?"***":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(e,t,n,r)=>{t=vJ.$createHorizontalRuleNode(),r||null!=e.getNextSibling()?e.replace(t):e.insertBefore(t),t.selectNext()},type:"element"},...mJ.TRANSFORMERS];var wJ=function({transformers:e=_J}){let[t]=yJ.useLexicalComposerContext();return bJ.useEffect((()=>mJ.registerMarkdownShortcuts(t,e)),[t,e]),null};function xJ(){return Jb(wJ,{transformers:rW})}function SJ({maxLength:e}){const[t]=Mv();return a.exports.useEffect((()=>{let n=null;return t.registerNodeTransform(Fm,(r=>{const i=Jg();if(!tm(i)||!i.isCollapsed())return;const o=t.getEditorState(),a=o.read((()=>r.getTextContentSize())),s=r.getTextContentSize();if(a!==s){const r=s-e,l=i.anchor;r>0&&(a===e&&n!==o?(n=o,by(t,o)):cy(t,l,r))}}))}),[t,e]),null}const CJ="\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'\"~=<>_:;",EJ={NAME:"\\b[A-Z][^\\s\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'\"~=<>_:;]",PUNCTUATION:CJ},TJ=new RegExp("(^|[^#])((?:"+EJ.NAME+"{1,})$)"),kJ=EJ.PUNCTUATION,NJ=["@"].join(""),AJ="[^"+NJ+kJ+"\\s]",OJ=new RegExp("(^|\\s|\\()(["+NJ+"]((?:"+AJ+("(?:\\.[ |$]| |["+kJ+"]|)")+"){0,75}))$"),MJ=new RegExp("(^|\\s|\\()(["+NJ+"]((?:"+AJ+"){0,50}))$"),RJ=new Map,DJ=["Aayla Secura","Adi Gallia","Admiral Dodd Rancit","Admiral Firmus Piett","Admiral Gial Ackbar","Admiral Ozzel","Admiral Raddus","Admiral Terrinald Screed","Admiral Trench","Admiral U.O. Statura","Agen Kolar","Agent Kallus","Aiolin and Morit Astarte","Aks Moe","Almec","Alton Kastle","Amee","AP-5","Armitage Hux","Artoo","Arvel Crynyd","Asajj Ventress","Aurra Sing","AZI-3","Bala-Tik","Barada","Bargwill Tomder","Baron Papanoida","Barriss Offee","Baze Malbus","Bazine Netal","BB-8","BB-9E","Ben Quadinaros","Berch Teller","Beru Lars","Bib Fortuna","Biggs Darklighter","Black Krrsantan","Bo-Katan Kryze","Boba Fett","Bobbajo","Bodhi Rook","Borvo the Hutt","Boss Nass","Bossk","Breha Antilles-Organa","Bren Derlin","Brendol Hux","BT-1","C-3PO","C1-10P","Cad Bane","Caluan Ematt","Captain Gregor","Captain Phasma","Captain Quarsh Panaka","Captain Rex","Carlist Rieekan","Casca Panzoro","Cassian Andor","Cassio Tagge","Cham Syndulla","Che Amanwe Papanoida","Chewbacca","Chi Eekway Papanoida","Chief Chirpa","Chirrut Îmwe","Ciena Ree","Cin Drallig","Clegg Holdfast","Cliegg Lars","Coleman Kcaj","Coleman Trebor","Colonel Kaplan","Commander Bly","Commander Cody (CC-2224)","Commander Fil (CC-3714)","Commander Fox","Commander Gree","Commander Jet","Commander Wolffe","Conan Antonio Motti","Conder Kyl","Constable Zuvio","Cordé","Cpatain Typho","Crix Madine","Cut Lawquane","Dak Ralter","Dapp","Darth Bane","Darth Maul","Darth Tyranus","Daultay Dofine","Del Meeko","Delian Mors","Dengar","Depa Billaba","Derek Klivian","Dexter Jettster","Dineé Ellberger","DJ","Doctor Aphra","Doctor Evazan","Dogma","Dormé","Dr. Cylo","Droidbait","Droopy McCool","Dryden Vos","Dud Bolt","Ebe E. Endocott","Echuu Shen-Jon","Eeth Koth","Eighth Brother","Eirtaé","Eli Vanto","Ellé","Ello Asty","Embo","Eneb Ray","Enfys Nest","EV-9D9","Evaan Verlaine","Even Piell","Ezra Bridger","Faro Argyus","Feral","Fifth Brother","Finis Valorum","Finn","Fives","FN-1824","FN-2003","Fodesinbeed Annodue","Fulcrum","FX-7","GA-97","Galen Erso","Gallius Rax",'Garazeb "Zeb" Orrelios',"Gardulla the Hutt","Garrick Versio","Garven Dreis","Gavyn Sykes","Gideon Hask","Gizor Dellso","Gonk droid","Grand Inquisitor","Greeata Jendowanian","Greedo","Greer Sonnel","Grievous","Grummgar","Gungi","Hammerhead","Han Solo","Harter Kalonia","Has Obbit","Hera Syndulla","Hevy","Hondo Ohnaka","Huyang","Iden Versio","IG-88","Ima-Gun Di","Inquisitors","Inspector Thanoth","Jabba","Jacen Syndulla","Jan Dodonna","Jango Fett","Janus Greejatus","Jar Jar Binks","Jas Emari","Jaxxon","Jek Tono Porkins","Jeremoch Colton","Jira","Jobal Naberrie","Jocasta Nu","Joclad Danva","Joh Yowza","Jom Barell","Joph Seastriker","Jova Tarkin","Jubnuk","Jyn Erso","K-2SO","Kanan Jarrus","Karbin","Karina the Great","Kes Dameron","Ketsu Onyo","Ki-Adi-Mundi","King Katuunko","Kit Fisto","Kitster Banai","Klaatu","Klik-Klak","Korr Sella","Kylo Ren","L3-37","Lama Su","Lando Calrissian","Lanever Villecham","Leia Organa","Letta Turmond","Lieutenant Kaydel Ko Connix","Lieutenant Thire","Lobot","Logray","Lok Durd","Longo Two-Guns","Lor San Tekka","Lorth Needa","Lott Dod","Luke Skywalker","Lumat","Luminara Unduli","Lux Bonteri","Lyn Me","Lyra Erso","Mace Windu","Malakili","Mama the Hutt","Mars Guo","Mas Amedda","Mawhonic","Max Rebo","Maximilian Veers","Maz Kanata","ME-8D9","Meena Tills","Mercurial Swift","Mina Bonteri","Miraj Scintel","Mister Bones","Mod Terrik","Moden Canady","Mon Mothma","Moradmin Bast","Moralo Eval","Morley","Mother Talzin","Nahdar Vebb","Nahdonnis Praji","Nien Nunb","Niima the Hutt","Nines","Norra Wexley","Nute Gunray","Nuvo Vindi","Obi-Wan Kenobi","Odd Ball","Ody Mandrell","Omi","Onaconda Farr","Oola","OOM-9","Oppo Rancisis","Orn Free Taa","Oro Dassyne","Orrimarko","Osi Sobeck","Owen Lars","Pablo-Jill","Padmé Amidala","Pagetti Rook","Paige Tico","Paploo","Petty Officer Thanisson","Pharl McQuarrie","Plo Koon","Po Nudo","Poe Dameron","Poggle the Lesser","Pong Krell","Pooja Naberrie","PZ-4CO","Quarrie","Quay Tolsite","Queen Apailana","Queen Jamillia","Queen Neeyutnee","Qui-Gon Jinn","Quiggold","Quinlan Vos","R2-D2","R2-KT","R3-S6","R4-P17","R5-D4","RA-7","Rabé","Rako Hardeen","Ransolm Casterfo","Rappertunie","Ratts Tyerell","Raymus Antilles","Ree-Yees","Reeve Panzoro","Rey","Ric Olié","Riff Tamson","Riley","Rinnriyin Di","Rio Durant","Rogue Squadron","Romba","Roos Tarpals","Rose Tico","Rotta the Hutt","Rukh","Rune Haako","Rush Clovis","Ruwee Naberrie","Ryoo Naberrie","Sabé","Sabine Wren","Saché","Saelt-Marae","Saesee Tiin","Salacious B. Crumb","San Hill","Sana Starros","Sarco Plank","Sarkli","Satine Kryze","Savage Opress","Sebulba","Senator Organa","Sergeant Kreel","Seventh Sister","Shaak Ti","Shara Bey","Shmi Skywalker","Shu Mai","Sidon Ithano","Sifo-Dyas","Sim Aloo","Siniir Rath Velus","Sio Bibble","Sixth Brother","Slowen Lo","Sly Moore","Snaggletooth","Snap Wexley","Snoke","Sola Naberrie","Sora Bulq","Strono Tuggs","Sy Snootles","Tallissan Lintra","Tarfful","Tasu Leech","Taun We","TC-14","Tee Watt Kaa","Teebo","Teedo","Teemto Pagalies","Temiri Blagg","Tessek","Tey How","Thane Kyrell","The Bendu","The Smuggler","Thrawn","Tiaan Jerjerrod","Tion Medon","Tobias Beckett","Tulon Voidgazer","Tup","U9-C4","Unkar Plutt","Val Beckett","Vanden Willard","Vice Admiral Amilyn Holdo","Vober Dand","WAC-47","Wag Too","Wald","Walrus Man","Warok","Wat Tambor","Watto","Wedge Antilles","Wes Janson","Wicket W. Warrick","Wilhuff Tarkin","Wollivan","Wuher","Wullf Yularen","Xamuel Lennox","Yaddle","Yarael Poof","Yoda","Zam Wesell","Zev Senesca","Ziro the Hutt","Zuckuss"],IJ={search(e,t){setTimeout((()=>{const n=DJ.filter((t=>t.toLowerCase().includes(e.toLowerCase())));t(n)}),500)}};function PJ(e){const t=function(e,t){let n=OJ.exec(e);if(null===n&&(n=MJ.exec(e)),null!==n){const e=n[1],r=n[3];if(r.length>=t)return{leadOffset:n.index+e.length,matchingString:r,replaceableString:n[2]}}return null}(e,1);return null===t?function(e,t){const n=TJ.exec(e);if(null!==n){const e=n[1],r=n[2];if(null!=r&&r.length>=t)return{leadOffset:n.index+e.length,matchingString:r,replaceableString:r}}return null}(e,3):t}class LJ extends kW{constructor(e,t){super(e),this.name=e,this.picture=t}}function BJ({index:e,isSelected:t,onClick:n,onMouseEnter:r,option:i}){let o="item";return t&&(o+=" selected"),Xb("li",{tabIndex:-1,className:o,ref:i.setRefElement,role:"option","aria-selected":t,id:"typeahead-item-"+e,onMouseEnter:r,onClick:n,children:[i.picture,Jb("span",{className:"text",children:i.name})]},i.key)}function $J(){const[e]=Mv(),[t,n]=a.exports.useState(null),r=function(e){const[t,n]=a.exports.useState([]);return a.exports.useEffect((()=>{const t=RJ.get(e);null!=e?null!==t&&(void 0===t?(RJ.set(e,null),IJ.search(e,(t=>{RJ.set(e,t),n(t)}))):n(t)):n([])}),[e]),t}(t),i=NW("/",{minLength:0}),o=a.exports.useMemo((()=>r.map((e=>new LJ(e,Jb("i",{className:"icon user"})))).slice(0,5)),[r]),s=a.exports.useCallback(((t,n,r)=>{e.update((()=>{const e=Cq(t.name);n&&n.replace(e),e.select(),r()}))}),[e]),l=a.exports.useCallback((t=>{const n=PJ(t);return!i(t,e)&&n?n:null}),[i,e]);return Jb(TW,{onQueryChange:n,onSelectOption:s,triggerFn:l,options:o,menuRenderFn:(e,{selectedIndex:t,selectOptionAndCleanUp:n,setHighlightedIndex:i})=>e.current&&r.length?U.exports.createPortal(Jb("div",{className:"typeahead-popover mentions-menu",children:Jb("ul",{children:o.map(((e,r)=>Jb(BJ,{index:r,isSelected:t===r,onClick:()=>{i(r),n(e)},onMouseEnter:()=>{i(r)},option:e},e.key)))})}),e.current):null})}let zJ=0,FJ=!1;function UJ(){const[e]=Mv();return a.exports.useEffect((()=>(FJ||(window.addEventListener("keydown",(e=>{9===e.keyCode&&(zJ=e.timeStamp)}),!0),FJ=!0),e.registerCommand(Sm,(e=>{const t=Jg();return tm(t)&&zJ+100>e.timeStamp&&im(t.clone()),!1}),1))),[e]),null}function HJ(e){const t=e.getShape();return{columns:t.toX-t.fromX+1,rows:t.toY-t.fromY+1}}function VJ({onClose:e,tableCellNode:t,setIsMenuOpen:n,contextRef:r,cellMerge:i}){const[o]=Mv(),s=a.exports.useRef(null),[l,c]=a.exports.useState(t),[u,d]=a.exports.useState({columns:1,rows:1}),[h,p]=a.exports.useState(!1);a.exports.useEffect((()=>o.registerMutationListener(OL,(e=>{"updated"===e.get(l.getKey())&&o.getEditorState().read((()=>{c(l.getLatest())}))}))),[o,l]),a.exports.useEffect((()=>{o.getEditorState().read((()=>{const e=Jg();ym(e)&&(d(HJ(e)),p(function(e){const t=e.getNodes(),n=[];let r=null,i=null,o=0;for(let a=0;a<t.length;a++){const e=t[a];if(EL(e)){const t=e.getParentOrThrow();if(YY(kL(t),"Expected CellNode to have a RowNode parent"),r!==t){if(null!==i&&o!==i)return!1;null!==r&&(i=o),r=t,o=0}const a=e.__colSpan;for(let r=0;r<a;r++)void 0===n[o+r]&&(n[o+r]=0),n[o+r]+=e.__rowSpan;o+=a}}return(null===i||o===i)&&n.every((e=>e===n[0]))}(e)))}))}),[o]),a.exports.useEffect((()=>{const e=r.current,t=s.current;if(null!=e&&null!=t){const n=e.getBoundingClientRect();t.style.opacity="1",t.style.left=`${n.left+n.width+window.pageXOffset+5}px`,t.style.top=`${n.top+window.pageYOffset}px`}}),[r,s]),a.exports.useEffect((()=>{function e(e){null==s.current||null==r.current||s.current.contains(e.target)||r.current.contains(e.target)||n(!1)}return window.addEventListener("click",e),()=>window.removeEventListener("click",e)}),[n,r]);const f=a.exports.useCallback((()=>{o.update((()=>{if(l.isAttached()){const e=wL(l),t=o.getElementByKey(e.getKey());if(!t)throw new Error("Expected to find tableElement in DOM");const n=IL(t);null!==n&&n.clearHighlight(),e.markDirty(),c(l.getLatest())}Gg().selectStart()}))}),[o,l]),g=a.exports.useCallback((t=>{o.update((()=>{CL(t),e()}))}),[o,e]),m=a.exports.useCallback((t=>{o.update((()=>{SL(t),e()}))}),[o,e]),y=a.exports.useCallback((()=>{o.update((()=>{vL(),e()}))}),[o,e]),v=a.exports.useCallback((()=>{o.update((()=>{wL(l).remove(),f(),e()}))}),[o,l,f,e]),b=a.exports.useCallback((()=>{o.update((()=>{yL(),e()}))}),[o,e]),_=a.exports.useCallback((()=>{o.update((()=>{const t=wL(l),n=xL(l),r=t.getChildren();if(n>=r.length||n<0)throw new Error("Expected table cell to be inside of table row.");const i=r[n];if(!kL(i))throw new Error("Expected table row");i.getChildren().forEach((e=>{if(!EL(e))throw new Error("Expected table cell");e.toggleHeaderStyle(AL.ROW)})),f(),e()}))}),[o,l,f,e]),w=a.exports.useCallback((()=>{o.update((()=>{const t=wL(l),n=_L(l),r=t.getChildren();for(let e=0;e<r.length;e++){const t=r[e];if(!kL(t))throw new Error("Expected table row");const i=t.getChildren();if(n>=i.length||n<0)throw new Error("Expected table cell to be inside of table row.");const o=i[n];if(!EL(o))throw new Error("Expected table cell");o.toggleHeaderStyle(AL.COLUMN)}f(),e()}))}),[o,l,f,e]);return U.exports.createPortal(Xb("div",{className:"dropdown",ref:s,onClick:e=>{e.stopPropagation()},children:[i&&(u.columns>1||u.rows>1)&&h&&Xb(Zb,{children:[Jb("button",{className:"item",onClick:()=>{o.update((()=>{const t=Jg();if(ym(t)){const{columns:n,rows:r}=HJ(t),i=t.getNodes();let o=!0;for(let e=0;e<i.length;e++){const t=i[e];if(mm(t))if(o){t.setColSpan(n).setRowSpan(r);const e=t.getLastDescendant();YY(null!==e,"Unexpected empty lastDescendant on the resulting merged cell"),e.select(),o=!1}else i[e].remove()}e()}}))},"data-test-id":"table-merge-cells",children:"Merge cells"}),Jb("hr",{})]}),Jb("button",{className:"item",onClick:()=>g(!1),"data-test-id":"table-insert-row-above",children:Xb("span",{className:"text",children:["Insert"," ",1===u.rows?"row":`${u.rows} rows`," ","above"]})}),Jb("button",{className:"item",onClick:()=>g(!0),"data-test-id":"table-insert-row-below",children:Xb("span",{className:"text",children:["Insert"," ",1===u.rows?"row":`${u.rows} rows`," ","below"]})}),Jb("hr",{}),Jb("button",{className:"item",onClick:()=>m(!1),"data-test-id":"table-insert-column-before",children:Xb("span",{className:"text",children:["Insert"," ",1===u.columns?"column":`${u.columns} columns`," ","left"]})}),Jb("button",{className:"item",onClick:()=>m(!0),"data-test-id":"table-insert-column-after",children:Xb("span",{className:"text",children:["Insert"," ",1===u.columns?"column":`${u.columns} columns`," ","right"]})}),Jb("hr",{}),Jb("button",{className:"item",onClick:()=>b(),"data-test-id":"table-delete-columns",children:Jb("span",{className:"text",children:"Delete column"})}),Jb("button",{className:"item",onClick:()=>y(),"data-test-id":"table-delete-rows",children:Jb("span",{className:"text",children:"Delete row"})}),Jb("button",{className:"item",onClick:()=>v(),"data-test-id":"table-delete",children:Jb("span",{className:"text",children:"Delete table"})}),Jb("hr",{}),Jb("button",{className:"item",onClick:()=>_(),children:Xb("span",{className:"text",children:[(l.__headerState&AL.ROW)===AL.ROW?"Remove":"Add"," ","row header"]})}),Jb("button",{className:"item",onClick:()=>w(),children:Xb("span",{className:"text",children:[(l.__headerState&AL.COLUMN)===AL.COLUMN?"Remove":"Add"," ","column header"]})})]}),document.body)}function qJ({anchorElem:e,cellMerge:t}){const[n]=Mv(),r=a.exports.useRef(null),i=a.exports.useRef(null),[o,s]=a.exports.useState(!1),[l,c]=a.exports.useState(null),u=a.exports.useCallback((()=>{const e=r.current,t=Jg(),i=window.getSelection(),o=document.activeElement;if(null==t||null==e)return void c(null);const a=n.getRootElement();if(tm(t)&&null!==a&&null!==i&&a.contains(i.anchorNode)){const e=bL(t.anchor.getNode());if(null==e)return void c(null);if(null==n.getElementByKey(e.getKey()))return void c(null);c(e)}else o||c(null)}),[n]);a.exports.useEffect((()=>n.registerUpdateListener((()=>{n.getEditorState().read((()=>{u()}))})))),a.exports.useEffect((()=>{const t=r.current;if(null!=t&&null!=l){const r=n.getElementByKey(l.getKey());if(null!=r){const n=r.getBoundingClientRect(),i=t.getBoundingClientRect(),o=e.getBoundingClientRect(),a=n.top-o.top+4,s=n.right-i.width-10-o.left;t.style.opacity="1",t.style.transform=`translate(${s}px, ${a}px)`}else t.style.opacity="0",t.style.transform="translate(-10000px, -10000px)"}}),[r,l,n,e]);const d=a.exports.useRef(l);return a.exports.useEffect((()=>{d.current!==l&&s(!1),d.current=l}),[d,l]),Jb("div",{className:"table-cell-action-button-container",ref:r,children:null!=l&&Xb(Zb,{children:[Jb("button",{className:"table-cell-action-button chevron-down",onClick:e=>{e.stopPropagation(),s(!o)},ref:i,children:Jb("i",{className:"chevron-down"})}),o&&Jb(VJ,{contextRef:i,setIsMenuOpen:s,onClose:()=>s(!1),tableCellNode:l,cellMerge:t})]})})}function KJ({anchorElem:e=document.body,cellMerge:t=!1}){const n=KI();return U.exports.createPortal(n?Jb(qJ,{anchorElem:e,cellMerge:t}):null,e)}function WJ({editor:e}){const t=a.exports.useRef(null),n=a.exports.useRef(null),r=a.exports.useRef(null),i=a.exports.useRef(null),[o,s]=a.exports.useState(null),[l,c]=a.exports.useState(null),[u,d]=a.exports.useState(!1),[h,p]=a.exports.useState(null);a.exports.useEffect((()=>e.registerCommand(Um,(e=>{const t=Jg(),n=ym(t);return u!==n&&d(n),!1}),dm)));const f=a.exports.useCallback((()=>{c(null),t.current=null,p(null),i.current=null,r.current=null}),[]);a.exports.useEffect((()=>{const i=i=>{setTimeout((()=>{const o=i.target;if(h)s({x:i.clientX,y:i.clientY});else if(!(n.current&&n.current.contains(o)||t.current===o)){t.current=o;const n=DL(o);n&&l!==n?e.update((()=>{const i=Wg(n.elem);if(!i)throw new Error("TableCellResizer: Table cell node not found.");const a=wL(i),s=e.getElementByKey(a.getKey());if(!s)throw new Error("TableCellResizer: Table element not found.");t.current=o,r.current=s.getBoundingClientRect(),c(n)})):null==n&&f()}}),0)};return document.addEventListener("mousemove",i),()=>{document.removeEventListener("mousemove",i)}}),[l,h,e,f]);const g=e=>"bottom"===e,m=a.exports.useCallback((t=>{if(!l)throw new Error("TableCellResizer: Expected active cell.");e.update((()=>{const e=Wg(l.elem);if(!EL(e))throw new Error("TableCellResizer: Table cell node not found.");const n=wL(e),r=xL(e),i=n.getChildren();if(r>=i.length||r<0)throw new Error("Expected table cell to be inside of table row.");const o=i[r];if(!kL(o))throw new Error("Expected table row");o.setHeight(t)}))}),[l,e]),y=a.exports.useCallback((t=>{if(!l)throw new Error("TableCellResizer: Expected active cell.");e.update((()=>{const e=Wg(l.elem);if(!EL(e))throw new Error("TableCellResizer: Table cell node not found.");const n=wL(e),r=_L(e),i=n.getChildren();for(let o=0;o<i.length;o++){const e=i[o];if(!kL(e))throw new Error("Expected table row");const n=e.getChildren();if(r>=n.length||r<0)throw new Error("Expected table cell to be inside of table row.");const a=n[r];if(!EL(a))throw new Error("Expected table cell");a.setWidth(t)}}))}),[l,e]),v=a.exports.useCallback((e=>t=>{if(t.preventDefault(),t.stopPropagation(),!l)throw new Error("TableCellResizer: Expected active cell.");if(h===e&&i.current){const{x:n,y:r}=i.current;if(null===l)return;const{height:o,width:a}=l.elem.getBoundingClientRect();if(g(e)){const n=Math.abs(t.clientY-r),i="bottom"===e&&r>t.clientY;m(Math.max(i?o-n:n+o,33))}else{const r=Math.abs(t.clientX-n),i="right"===e&&n>t.clientX;y(Math.max(i?a-r:r+a,50))}f()}else i.current={x:t.clientX,y:t.clientY},s(i.current),p(e)}),[l,h,f,y,m]),b=a.exports.useCallback((()=>{if(l){const{height:e,width:t,top:n,left:i}=l.elem.getBoundingClientRect(),a={bottom:{backgroundColor:"none",cursor:"row-resize",height:"10px",left:`${window.pageXOffset+i}px`,top:`${window.pageYOffset+n+e}px`,width:`${t}px`},right:{backgroundColor:"none",cursor:"col-resize",height:`${e}px`,left:`${window.pageXOffset+i+t}px`,top:`${window.pageYOffset+n}px`,width:"10px"}},s=r.current;return h&&o&&s&&(g(h)?(a[h].left=`${window.pageXOffset+s.left}px`,a[h].top=`${window.pageYOffset+o.y}px`,a[h].height="3px",a[h].width=`${s.width}px`):(a[h].top=`${window.pageYOffset+s.top}px`,a[h].left=`${window.pageXOffset+o.x}px`,a[h].width="3px",a[h].height=`${s.height}px`),a[h].backgroundColor="#adf"),a}return{bottom:null,left:null,right:null,top:null}}),[l,h,o])();return Jb("div",{ref:n,children:null!=l&&!u&&Xb(Zb,{children:[Jb("div",{className:"TableCellResizer__resizer TableCellResizer__ui",style:b.right||void 0,onMouseDown:v("right"),onMouseUp:v("right")}),Jb("div",{className:"TableCellResizer__resizer TableCellResizer__ui",style:b.bottom||void 0,onMouseDown:v("bottom"),onMouseUp:v("bottom")})]})})}function jJ(){const[e]=Mv(),t=KI();return a.exports.useMemo((()=>t?U.exports.createPortal(Jb(WJ,{editor:e}),document.body):null),[e,t])}var YJ=Nv,GJ=zv,JJ=Zu,XJ=a.exports;function ZJ(e){return[e.getKey(),e.getTextContent(),e.getTag()]}var QJ=function({children:e}){let[t,n]=XJ.useState([]),[r]=YJ.useLexicalComposerContext();return XJ.useEffect((()=>{let e=[];r.getEditorState().read((()=>{let t=JJ.$getRoot().getChildren();for(let n of t)GJ.$isHeadingNode(n)&&e.push([n.getKey(),n.getTextContent(),n.getTag()]);n(e)}));let t=r.registerMutationListener(GJ.HeadingNode,(t=>{r.getEditorState().read((()=>{for(const[n,l]of t)if("created"===l){var r=JJ.$getNodeByKey(n);if(null!==r){for(var i=r.getPreviousSibling();null!==i&&!GJ.$isHeadingNode(i);)i=i.getPreviousSibling();var o=e;if(null===r)e=o;else{var a=ZJ(r),s=[];if(null===i)s=[a,...o];else for(let e=0;e<o.length;e++){let t=o[e][0];s.push(o[e]),t===i.getKey()&&t!==r.getKey()&&s.push(a)}e=s}}}else if("destroyed"===l){i=n,r=e,o=[];for(let e of r)e[0]!==i&&o.push(e);e=o}else if("updated"===l&&null!==(r=JJ.$getNodeByKey(n))){for(i=r.getPreviousSibling();null!==i&&!GJ.$isHeadingNode(i);)i=i.getPreviousSibling();o=e,a=[],s=ZJ(r),i||a.push(s);for(let e of o)e[0]!==r.getKey()&&(a.push(e),i&&e[0]===i.getKey()&&a.push(s));e=a}n(e)}))})),i=r.registerMutationListener(JJ.TextNode,(t=>{r.getEditorState().read((()=>{for(const[o,a]of t)if("updated"===a){var r=JJ.$getNodeByKey(o);if(null!==r&&(r=r.getParentOrThrow(),GJ.$isHeadingNode(r))){var i=e;let t=[];for(let e of i)e[0]===r.getKey()?t.push(ZJ(r)):t.push(e);e=t,n(e)}}}))}));return()=>{t(),i()}}),[r]),e(t,r)};function eX(e){const t=null==e?void 0:e.getClientRects()[0].y;return t>=624&&t<=633}function tX(e){return(null==e?void 0:e.getClientRects()[0].y)<624}function nX(e){return(null==e?void 0:e.getClientRects()[0].y)>=633}function rX({tableOfContents:e}){const[t,n]=a.exports.useState(""),r=a.exports.useRef(0),[i]=Mv();function o(e,t){i.getEditorState().read((()=>{const o=i.getElementByKey(e);null!==o&&(o.scrollIntoView(),n(e),r.current=t)}))}return a.exports.useEffect((()=>{function t(){if(0!==e.length&&r.current<e.length-1){let t=i.getElementByKey(e[r.current][0]);if(null!==t)if(nX(t)){for(;null!==t&&nX(t)&&r.current>0;){const n=i.getElementByKey(e[r.current-1][0]);null!==n&&(tX(n)||nX(n))&&r.current--,t=n}const o=e[r.current][0];n(o)}else if(tX(t)){for(;null!==t&&tX(t)&&r.current<e.length-1;){const n=i.getElementByKey(e[r.current+1][0]);null!==n&&(eX(n)||tX(n))&&r.current++,t=n}const o=e[r.current][0];n(o)}}else r.current=0}let o;function a(){var e,n;e=t,n=10,clearTimeout(o),o=setTimeout(e,n)}return document.addEventListener("scroll",a),()=>document.removeEventListener("scroll",a)}),[e,i]),Jb("div",{className:"table-of-contents",children:Jb("ul",{className:"headings",children:e.map((([e,n,r],i)=>{return 0===i?Xb("div",{className:"normal-heading-wrapper",children:[Jb("div",{className:"first-heading",onClick:()=>o(e,i),role:"button",tabIndex:0,children:(""+n).length>20?n.substring(0,20)+"...":n}),Jb("br",{})]},e):Jb("div",{className:"normal-heading-wrapper "+(t===e?"selected-heading-wrapper":""),children:Jb("div",{onClick:()=>o(e,i),role:"button",className:(a=r,"h2"===a?"heading2":"h3"===a?"heading3":void 0),tabIndex:0,children:Jb("li",{className:`normal-heading ${t===e?"selected-heading":""}\n `,children:(""+n).length>27?n.substring(0,27)+"...":n})})},e);var a}))})})}function iX(){return Jb(QJ,{children:e=>Jb(rX,{tableOfContents:e})})}const oX=FL&&"documentMode"in document?document.documentMode:null,aX=FL&&/Mac|iPod|iPhone|iPad/.test(navigator.platform);FL&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),FL&&"InputEvent"in window&&!oX&&new window.InputEvent("input"),FL&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),FL&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&window.MSStream;FL&&/^(?=.*Chrome).*/i.test(navigator.userAgent);FL&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent);const sX=a.exports.lazy((()=>_z((()=>import("./StickyComponent.821e162d.js")),["assets/StickyComponent.821e162d.js","assets/StickyComponent.64376704.css","assets/LexicalNestedComposer.412b5854.js"])));class lX extends wm{constructor(e,t,n,r,i){super(i),this.__x=e,this.__y=t,this.__caption=r||Km(),this.__color=n}static getType(){return"sticky"}static clone(e){return new lX(e.__x,e.__y,e.__color,e.__caption,e.__key)}static importJSON(e){const t=new lX(e.xOffset,e.yOffset,e.color),n=e.caption,r=t.__caption,i=r.parseEditorState(n.editorState);return i.isEmpty()||r.setEditorState(i),t}exportJSON(){return{caption:this.__caption.toJSON(),color:this.__color,type:"sticky",version:1,xOffset:this.__x,yOffset:this.__y}}createDOM(e){const t=document.createElement("div");return t.style.display="contents",t}updateDOM(){return!1}setPosition(e,t){const n=this.getWritable();n.__x=e,n.__y=t,im(null)}toggleColor(){const e=this.getWritable();e.__color="pink"===e.__color?"yellow":"pink"}decorate(e,t){return U.exports.createPortal(Jb(a.exports.Suspense,{fallback:null,children:Jb(sX,{color:this.__color,x:this.__x,y:this.__y,nodeKey:this.getKey(),caption:this.__caption})}),document.body)}isIsolated(){return!0}}function cX(e){return e instanceof lX}const uX=a.exports.createContext(null);function dX({children:e,className:t,onClick:n,title:r}){const i=a.exports.useRef(null),o=a.exports.useContext(uX);if(null===o)throw new Error("DropDownItem must be used within a DropDown");const{registerItem:s}=o;return a.exports.useEffect((()=>{i&&i.current&&s(i)}),[i,s]),Jb("button",{className:t,onClick:n,ref:i,title:r,type:"button",children:e})}function hX({children:e,dropDownRef:t,onClose:n}){const[r,i]=a.exports.useState(),[o,s]=a.exports.useState(),l=a.exports.useCallback((e=>{i((t=>t?[...t,e]:[e]))}),[i]),c=a.exports.useMemo((()=>({registerItem:l})),[l]);return a.exports.useEffect((()=>{r&&!o&&s(r[0]),o&&o.current&&o.current.focus()}),[r,o]),Jb(uX.Provider,{value:c,children:Jb("div",{className:"dropdown",ref:t,onKeyDown:e=>{if(!r)return;const t=e.key;["Escape","ArrowUp","ArrowDown","Tab"].includes(t)&&e.preventDefault(),"Escape"===t||"Tab"===t?n():"ArrowUp"===t?s((e=>{if(!e)return r[0];const t=r.indexOf(e)-1;return r[-1===t?r.length-1:t]})):"ArrowDown"===t&&s((e=>e?r[r.indexOf(e)+1]:r[0]))},children:e})})}function pX({disabled:e=!1,buttonLabel:t,buttonAriaLabel:n,buttonClassName:r,buttonIconClassName:i,children:o,stopCloseOnClickSelf:s}){const l=a.exports.useRef(null),c=a.exports.useRef(null),[u,d]=a.exports.useState(!1);return a.exports.useEffect((()=>{const e=c.current,t=l.current;if(u&&null!==e&&null!==t){const{top:n,left:r}=e.getBoundingClientRect();t.style.top=`${n+40}px`,t.style.left=`${Math.min(r,window.innerWidth-t.offsetWidth-20)}px`}}),[l,c,u]),a.exports.useEffect((()=>{const e=c.current;if(null!==e&&u){const t=t=>{const n=t.target;s&&l.current&&l.current.contains(n)||e.contains(n)||d(!1)};return document.addEventListener("click",t),()=>{document.removeEventListener("click",t)}}}),[l,c,u,s]),Xb(Zb,{children:[Xb("button",{disabled:e,"aria-label":n||t,className:r,onClick:()=>d(!u),ref:c,children:[i&&Jb("span",{className:i}),t&&Jb("span",{className:"text dropdown-button-text",children:t}),Jb("i",{className:"chevron-down"})]}),u&&U.exports.createPortal(Jb(hX,{dropDownRef:l,onClose:()=>{d(!1),c&&c.current&&c.current.focus()},children:o}),document.body)]})}const fX=["#d0021b","#f5a623","#f8e71c","#8b572a","#7ed321","#417505","#bd10e0","#9013fe","#4a90e2","#50e3c2","#b8e986","#000000","#4a4a4a","#9b9b9b","#ffffff"];function gX({color:e,children:t,onChange:n,disabled:r=!1,stopCloseOnClickSelf:i=!0,...o}){const[s,l]=a.exports.useState(xX("hex",e)),[c,u]=a.exports.useState(e),d=a.exports.useRef(null),h=a.exports.useMemo((()=>({x:s.hsv.s/100*214,y:(100-s.hsv.v)/100*150})),[s.hsv.s,s.hsv.v]),p=a.exports.useMemo((()=>({x:s.hsv.h/360*214})),[s.hsv]);return a.exports.useEffect((()=>{null!==d.current&&n&&(n(s.hex),u(s.hex))}),[s,n]),a.exports.useEffect((()=>{if(void 0===e)return;const t=xX("hex",e);l(t),u(t.hex)}),[e]),Xb(pX,{...o,disabled:r,stopCloseOnClickSelf:i,children:[Xb("div",{className:"color-picker-wrapper",style:{width:214},ref:d,children:[Jb(AY,{label:"Hex",onChange:e=>{if(u(e),/^#[0-9A-Fa-f]{6}$/i.test(e)){const t=xX("hex",e);l(t)}},value:c}),Jb("div",{className:"color-picker-basic-color",children:fX.map((e=>Jb("button",{className:e===s.hex?" active":"",style:{backgroundColor:e},onClick:()=>{u(e),l(xX("hex",e))}},e)))}),Jb(mX,{className:"color-picker-saturation",style:{backgroundColor:`hsl(${s.hsv.h}, 100%, 50%)`},onChange:({x:e,y:t})=>{const n=xX("hsv",{...s.hsv,s:e/214*100,v:100-t/150*100});l(n),u(n.hex)},children:Jb("div",{className:"color-picker-saturation_cursor",style:{backgroundColor:s.hex,left:h.x,top:h.y}})}),Jb(mX,{className:"color-picker-hue",onChange:({x:e})=>{const t=xX("hsv",{...s.hsv,h:e/214*360});l(t),u(t.hex)},children:Jb("div",{className:"color-picker-hue_cursor",style:{backgroundColor:`hsl(${s.hsv.h}, 100%, 50%)`,left:p.x}})}),Jb("div",{className:"color-picker-color",style:{backgroundColor:s.hex}})]}),t]})}function mX({className:e,style:t,onChange:n,children:r}){const i=a.exports.useRef(null),o=e=>{if(i.current){const{current:t}=i,{width:r,height:o,left:a,top:s}=t.getBoundingClientRect(),l=yX(e.clientX-a,r,0),c=yX(e.clientY-s,o,0);n({x:l,y:c})}};return Jb("div",{ref:i,className:e,style:t,onMouseDown:e=>{if(0!==e.button)return;o(e);const t=e=>{o(e)},n=e=>{document.removeEventListener("mousemove",t,!1),document.removeEventListener("mouseup",n,!1),o(e)};document.addEventListener("mousemove",t,!1),document.addEventListener("mouseup",n,!1)},children:r})}function yX(e,t,n){return e>t?t:e<n?n:e}function vX(e){if(!e.startsWith("#")){const t=document.createElement("canvas").getContext("2d");if(!t)throw new Error("2d context not supported or canvas already initialized");return t.fillStyle=e,t.fillStyle}return 4===e.length||5===e.length?(e=e.split("").map(((e,t)=>t?e+e:"#")).join(""),e):7===e.length||9===e.length?e:"#000000"}function bX(e){const t=(e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,((e,t,n,r)=>"#"+t+t+n+n+r+r)).substring(1).match(/.{2}/g)||[]).map((e=>parseInt(e,16)));return{b:t[2],g:t[1],r:t[0]}}function _X({r:e,g:t,b:n}){e/=255,t/=255,n/=255;const r=Math.max(e,t,n),i=r-Math.min(e,t,n);return{h:i?60*(r===e?(t-n)/i+(t<n?6:0):r===t?2+(n-e)/i:4+(e-t)/i):0,s:r?i/r*100:0,v:100*r}}function wX({b:e,g:t,r:n}){return"#"+[n,t,e].map((e=>e.toString(16).padStart(2,"0"))).join("")}function xX(e,t){let n=vX("#121212"),r=bX(n),i=_X(r);if("hex"===e){n=vX(t),r=bX(n),i=_X(r)}else if("rgb"===e){r=t,n=wX(r),i=_X(r)}else if("hsv"===e){i=t,r=function({h:e,s:t,v:n}){const r=~~(e/60),i=e/60-r,o=(n/=100)*(1-(t/=100)),a=n*(1-t*i),s=n*(1-t*(1-i)),l=r%6,c=Math.round(255*[n,a,o,o,s,n][l]),u=Math.round(255*[s,n,n,a,o,o][l]);return{b:Math.round(255*[o,o,s,n,n,a][l]),g:u,r:c}}(i),n=wX(r)}return{hex:n,hsv:i,rgb:r}}const SX={bullet:"Bulleted List",check:"Check List",code:"Code Block",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6",number:"Numbered List",paragraph:"Normal",quote:"Quote"};const CX=function(){const e=[];for(const[t,n]of Object.entries(Q$))e.push([t,n]);return e}(),EX=[["Arial","Arial"],["Courier New","Courier New"],["Georgia","Georgia"],["Times New Roman","Times New Roman"],["Trebuchet MS","Trebuchet MS"],["Verdana","Verdana"]],TX=[["10px","10px"],["11px","11px"],["12px","12px"],["13px","13px"],["14px","14px"],["15px","15px"],["16px","16px"],["17px","17px"],["18px","18px"],["19px","19px"],["20px","20px"]];function kX(e){return e?"active dropdown-item-active":""}function NX({editor:e,blockType:t,disabled:n=!1}){const r=n=>{t!==n&&e.update((()=>{const e=Jg();(tm(e)||ym(e))&&ly(e,(()=>Ib(n)))}))};return Xb(pX,{disabled:n,buttonClassName:"toolbar-item block-controls",buttonIconClassName:"icon block-type "+t,buttonLabel:SX[t],buttonAriaLabel:"Formatting options for text style",children:[Xb(dX,{className:"item "+kX("paragraph"===t),onClick:()=>{e.update((()=>{const e=Jg();(tm(e)||ym(e))&&ly(e,(()=>Vg()))}))},children:[Jb("i",{className:"icon paragraph"}),Jb("span",{className:"text",children:"Normal"})]}),Xb(dX,{className:"item "+kX("h1"===t),onClick:()=>r("h1"),children:[Jb("i",{className:"icon h1"}),Jb("span",{className:"text",children:"Heading 1"})]}),Xb(dX,{className:"item "+kX("h2"===t),onClick:()=>r("h2"),children:[Jb("i",{className:"icon h2"}),Jb("span",{className:"text",children:"Heading 2"})]}),Xb(dX,{className:"item "+kX("h3"===t),onClick:()=>r("h3"),children:[Jb("i",{className:"icon h3"}),Jb("span",{className:"text",children:"Heading 3"})]}),Xb(dX,{className:"item "+kX("bullet"===t),onClick:()=>{"bullet"!==t?e.dispatchCommand(Cv,void 0):e.dispatchCommand(kv,void 0)},children:[Jb("i",{className:"icon bullet-list"}),Jb("span",{className:"text",children:"Bullet List"})]}),Xb(dX,{className:"item "+kX("number"===t),onClick:()=>{"number"!==t?e.dispatchCommand(Sv,void 0):e.dispatchCommand(kv,void 0)},children:[Jb("i",{className:"icon numbered-list"}),Jb("span",{className:"text",children:"Numbered List"})]}),Xb(dX,{className:"item "+kX("check"===t),onClick:()=>{"check"!==t?e.dispatchCommand(xv,void 0):e.dispatchCommand(kv,void 0)},children:[Jb("i",{className:"icon check-list"}),Jb("span",{className:"text",children:"Check List"})]}),Xb(dX,{className:"item "+kX("quote"===t),onClick:()=>{"quote"!==t&&e.update((()=>{const e=Jg();(tm(e)||ym(e))&&ly(e,(()=>Pb()))}))},children:[Jb("i",{className:"icon quote"}),Jb("span",{className:"text",children:"Quote"})]}),Xb(dX,{className:"item "+kX("code"===t),onClick:()=>{"code"!==t&&e.update((()=>{let e=Jg();if(tm(e)||ym(e))if(e.isCollapsed())ly(e,(()=>J$()));else{const t=e.getTextContent(),n=J$();e.insertNodes([n]),e=Jg(),tm(e)&&e.insertRawText(t)}}))},children:[Jb("i",{className:"icon code"}),Jb("span",{className:"text",children:"Code Block"})]})]})}function AX(){return Jb("div",{className:"divider"})}function OX({editor:e,value:t,style:n,disabled:r=!1}){const i=a.exports.useCallback((t=>{e.update((()=>{const e=Jg();tm(e)&&ay(e,{[n]:t})}))}),[e,n]);return Jb(pX,{disabled:r,buttonClassName:"toolbar-item "+n,buttonLabel:t,buttonIconClassName:"font-family"===n?"icon block-type font-family":"",buttonAriaLabel:"font-family"===n?"Formatting options for font family":"Formatting options for font size",children:("font-family"===n?EX:TX).map((([e,r])=>Jb(dX,{className:`item ${kX(t===e)} ${"font-size"===n?"fontsize-item":""}`,onClick:()=>i(e),children:Jb("span",{className:"text",children:r})},e)))})}function MX(){const[e]=Mv(),[t,n]=a.exports.useState(e),[r,i]=a.exports.useState("paragraph"),[o,s]=a.exports.useState(null),[l,c]=a.exports.useState("15px"),[u,d]=a.exports.useState("#000"),[h,p]=a.exports.useState("#fff"),[f,g]=a.exports.useState("Arial"),[m,y]=a.exports.useState(!1),[v,b]=a.exports.useState(!1),[_,w]=a.exports.useState(!1),[x,S]=a.exports.useState(!1),[C,E]=a.exports.useState(!1),[T,k]=a.exports.useState(!1),[N,A]=a.exports.useState(!1),[O,M]=a.exports.useState(!1),[R,D]=a.exports.useState(!1),[I,P]=a.exports.useState(!1),[L,B]=DK(),[$,z]=a.exports.useState(!1),[F,U]=a.exports.useState(""),[H,V]=a.exports.useState((()=>e.isEditable())),q=a.exports.useCallback((()=>{const e=Jg();if(tm(e)){const n=e.anchor.getNode();let r="root"===n.getKey()?n:gy(n,(e=>{const t=e.getParent();return null!==t&&nm(t)}));null===r&&(r=n.getTopLevelElementOrThrow());const o=r.getKey(),a=t.getElementByKey(o);b(e.hasFormat("bold")),w(e.hasFormat("italic")),S(e.hasFormat("underline")),E(e.hasFormat("strikethrough")),k(e.hasFormat("subscript")),A(e.hasFormat("superscript")),M(e.hasFormat("code")),z(oy(e));const l=IG(e),u=l.getParent();if(Py(u)||Py(l)?y(!0):y(!1),null!==a)if(s(o),wv(r)){const e=yy(n,Tv),t=e?e.getListType():r.getListType();i(t)}else{const e=Lb(r)?r.getTag():r.getType();if(e in SX&&i(e),Z$(r)){const e=r.getLanguage();return void U(e?ez[e]||e:"")}}c(ry(e,"font-size","15px")),d(ry(e,"color","#000")),p(ry(e,"background-color","#fff")),g(ry(e,"font-family","Arial"))}}),[t]);a.exports.useEffect((()=>e.registerCommand(Um,((e,t)=>(q(),n(t),!1)),cm)),[e,q]),a.exports.useEffect((()=>Sy(e.registerEditableListener((e=>{V(e)})),t.registerUpdateListener((({editorState:e})=>{e.read((()=>{q()}))})),t.registerCommand(am,(e=>(D(e),!1)),cm),t.registerCommand(om,(e=>(P(e),!1)),cm))),[t,e,q]);const K=a.exports.useCallback((e=>{t.update((()=>{const t=Jg();tm(t)&&ay(t,e)}))}),[t]),W=a.exports.useCallback((()=>{t.update((()=>{const e=Jg();tm(e)&&(sy(e),e.getNodes().forEach((e=>{rm(e)&&(e.setFormat(0),e.setStyle(""),my(e).setFormat("")),zK(e)&&e.setFormat("")})))}))}),[t]),j=a.exports.useCallback((e=>{K({color:e})}),[K]),Y=a.exports.useCallback((e=>{K({"background-color":e})}),[K]),G=a.exports.useCallback((()=>{m?e.dispatchCommand($y,null):e.dispatchCommand($y,LG("https://"))}),[e,m]),J=a.exports.useCallback((e=>{t.update((()=>{if(null!==o){const t=jg(o);Z$(t)&&t.setLanguage(e)}}))}),[t,o]);return Xb("div",{className:"toolbar",children:[Jb("button",{disabled:!R||!H,onClick:()=>{t.dispatchCommand(Vm,void 0)},title:aX?"Undo (⌘Z)":"Undo (Ctrl+Z)",type:"button",className:"toolbar-item spaced","aria-label":"Undo",children:Jb("i",{className:"format undo"})}),Jb("button",{disabled:!I||!H,onClick:()=>{t.dispatchCommand(zm,void 0)},title:aX?"Redo (⌘Y)":"Redo (Ctrl+Y)",type:"button",className:"toolbar-item","aria-label":"Redo",children:Jb("i",{className:"format redo"})}),Jb(AX,{}),r in SX&&t===e&&Xb(Zb,{children:[Jb(NX,{disabled:!H,blockType:r,editor:e}),Jb(AX,{})]}),"code"===r?Jb(Zb,{children:Jb(pX,{disabled:!H,buttonClassName:"toolbar-item code-language",buttonLabel:rz(F),buttonAriaLabel:"Select language",children:CX.map((([e,t])=>Jb(dX,{className:`item ${kX(e===F)}`,onClick:()=>J(e),children:Jb("span",{className:"text",children:t})},e)))})}):Xb(Zb,{children:[Jb(OX,{disabled:!H,style:"font-family",value:f,editor:e}),Jb(OX,{disabled:!H,style:"font-size",value:l,editor:e}),Jb(AX,{}),Jb("button",{disabled:!H,onClick:()=>{t.dispatchCommand(Em,"bold")},className:"toolbar-item spaced "+(v?"active":""),title:aX?"Bold (⌘B)":"Bold (Ctrl+B)",type:"button","aria-label":"Format text as bold. Shortcut: "+(aX?"⌘B":"Ctrl+B"),children:Jb("i",{className:"format bold"})}),Jb("button",{disabled:!H,onClick:()=>{t.dispatchCommand(Em,"italic")},className:"toolbar-item spaced "+(_?"active":""),title:aX?"Italic (⌘I)":"Italic (Ctrl+I)",type:"button","aria-label":"Format text as italics. Shortcut: "+(aX?"⌘I":"Ctrl+I"),children:Jb("i",{className:"format italic"})}),Jb("button",{disabled:!H,onClick:()=>{t.dispatchCommand(Em,"underline")},className:"toolbar-item spaced "+(x?"active":""),title:aX?"Underline (⌘U)":"Underline (Ctrl+U)",type:"button","aria-label":"Format text to underlined. Shortcut: "+(aX?"⌘U":"Ctrl+U"),children:Jb("i",{className:"format underline"})}),Jb("button",{disabled:!H,onClick:()=>{t.dispatchCommand(Em,"code")},className:"toolbar-item spaced "+(O?"active":""),title:"Insert code block",type:"button","aria-label":"Insert code block",children:Jb("i",{className:"format code"})}),Jb("button",{disabled:!H,onClick:G,className:"toolbar-item spaced "+(m?"active":""),"aria-label":"Insert link",title:"Insert link",type:"button",children:Jb("i",{className:"format link"})}),Jb(gX,{disabled:!H,buttonClassName:"toolbar-item color-picker",buttonAriaLabel:"Formatting text color",buttonIconClassName:"icon font-color",color:u,onChange:j,title:"text color"}),Jb(gX,{disabled:!H,buttonClassName:"toolbar-item color-picker",buttonAriaLabel:"Formatting background color",buttonIconClassName:"icon bg-color",color:h,onChange:Y,title:"bg color"}),Xb(pX,{disabled:!H,buttonClassName:"toolbar-item spaced",buttonLabel:"",buttonAriaLabel:"Formatting options for additional text styles",buttonIconClassName:"icon dropdown-more",children:[Xb(dX,{onClick:()=>{t.dispatchCommand(Em,"strikethrough")},className:"item "+kX(C),title:"Strikethrough","aria-label":"Format text with a strikethrough",children:[Jb("i",{className:"icon strikethrough"}),Jb("span",{className:"text",children:"Strikethrough"})]}),Xb(dX,{onClick:()=>{t.dispatchCommand(Em,"subscript")},className:"item "+kX(T),title:"Subscript","aria-label":"Format text with a subscript",children:[Jb("i",{className:"icon subscript"}),Jb("span",{className:"text",children:"Subscript"})]}),Xb(dX,{onClick:()=>{t.dispatchCommand(Em,"superscript")},className:"item "+kX(N),title:"Superscript","aria-label":"Format text with a superscript",children:[Jb("i",{className:"icon superscript"}),Jb("span",{className:"text",children:"Superscript"})]}),Xb(dX,{onClick:W,className:"item",title:"Clear text formatting","aria-label":"Clear all text formatting",children:[Jb("i",{className:"icon clear"}),Jb("span",{className:"text",children:"Clear Formatting"})]})]}),Jb(AX,{}),Xb(pX,{disabled:!H,buttonClassName:"toolbar-item spaced",buttonLabel:"Insert",buttonAriaLabel:"Insert specialized editor node",buttonIconClassName:"icon plus",children:[Xb(dX,{onClick:()=>{t.dispatchCommand(NI,void 0)},className:"item",children:[Jb("i",{className:"icon horizontal-rule"}),Jb("span",{className:"text",children:"Horizontal Rule"})]}),Xb(dX,{onClick:()=>{B("Insert Image",(e=>Jb(DY,{activeEditor:t,onClose:e})))},className:"item",children:[Jb("i",{className:"icon image"}),Jb("span",{className:"text",children:"Image"})]}),Xb(dX,{onClick:()=>{return e={altText:"Cat typing on a laptop",src:"/assets/cat-typing.29244fe9.gif"},void t.dispatchCommand(OY,e);var e},className:"item",children:[Jb("i",{className:"icon gif"}),Jb("span",{className:"text",children:"GIF"})]}),Xb(dX,{onClick:()=>{t.dispatchCommand(TY,void 0)},className:"item",children:[Jb("i",{className:"icon diagram-2"}),Jb("span",{className:"text",children:"Excalidraw"})]}),Xb(dX,{onClick:()=>{B("Insert Table",(e=>Jb(hG,{activeEditor:t,onClose:e})))},className:"item",children:[Jb("i",{className:"icon table"}),Jb("span",{className:"text",children:"Table"})]}),Xb(dX,{onClick:()=>{B("Insert Table",(e=>Jb(pG,{activeEditor:t,onClose:e})))},className:"item",children:[Jb("i",{className:"icon table"}),Jb("span",{className:"text",children:"Table (Experimental)"})]}),Xb(dX,{onClick:()=>{B("Insert Poll",(e=>Jb(WY,{activeEditor:t,onClose:e})))},className:"item",children:[Jb("i",{className:"icon poll"}),Jb("span",{className:"text",children:"Poll"})]}),Xb(dX,{onClick:()=>{B("Insert Equation",(e=>Jb(CY,{activeEditor:t,onClose:e})))},className:"item",children:[Jb("i",{className:"icon equation"}),Jb("span",{className:"text",children:"Equation"})]}),Xb(dX,{onClick:()=>{e.update((()=>{const e=Gg(),t=new lX(0,0,"yellow");e.append(t)}))},className:"item",children:[Jb("i",{className:"icon sticky"}),Jb("span",{className:"text",children:"Sticky Note"})]}),Xb(dX,{onClick:()=>{e.dispatchCommand(vY,void 0)},className:"item",children:[Jb("i",{className:"icon caret-right"}),Jb("span",{className:"text",children:"Collapsible container"})]}),rj.map((e=>Xb(dX,{onClick:()=>{t.dispatchCommand($W,e.type)},className:"item",children:[e.icon,Jb("span",{className:"text",children:e.contentName})]},e.type)))]})]}),Jb(AX,{}),Xb(pX,{disabled:!H,buttonLabel:"Align",buttonIconClassName:"icon left-align",buttonClassName:"toolbar-item spaced alignment",buttonAriaLabel:"Formatting options for text alignment",children:[Xb(dX,{onClick:()=>{t.dispatchCommand(Cm,"left")},className:"item",children:[Jb("i",{className:"icon left-align"}),Jb("span",{className:"text",children:"Left Align"})]}),Xb(dX,{onClick:()=>{t.dispatchCommand(Cm,"center")},className:"item",children:[Jb("i",{className:"icon center-align"}),Jb("span",{className:"text",children:"Center Align"})]}),Xb(dX,{onClick:()=>{t.dispatchCommand(Cm,"right")},className:"item",children:[Jb("i",{className:"icon right-align"}),Jb("span",{className:"text",children:"Right Align"})]}),Xb(dX,{onClick:()=>{t.dispatchCommand(Cm,"justify")},className:"item",children:[Jb("i",{className:"icon justify-align"}),Jb("span",{className:"text",children:"Justify Align"})]}),Jb(AX,{}),Xb(dX,{onClick:()=>{t.dispatchCommand(Bm,void 0)},className:"item",children:[Jb("i",{className:"icon "+($?"indent":"outdent")}),Jb("span",{className:"text",children:"Outdent"})]}),Xb(dX,{onClick:()=>{t.dispatchCommand(Tm,void 0)},className:"item",children:[Jb("i",{className:"icon "+($?"outdent":"indent")}),Jb("span",{className:"text",children:"Indent"})]})]}),L]})}var RX=Gu,DX=UG,IX=Ju,PX=Zu,LX=a.exports;let BX=Object.freeze({"\t":"\\t","\n":"\\n"}),$X=new RegExp(Object.keys(BX).join("|"),"g"),zX=Object.freeze({ancestorHasNextSibling:"|",ancestorIsLastChild:" ",hasNextSibling:"├",isLastChild:"└",selectedChar:"^",selectedLine:">"});function FX(e,t,n,r,i){let o=" root\n";if(e=e.read((()=>{const e=PX.$getSelection();return UX(PX.$getRoot(),((t,n)=>{const r=`(${t.getKey()})`,i=t.getType()||"",a=t.isSelected(),s=DX.$isMarkNode(t)?` id: [ ${t.getIDs().join(", ")} ] `:"";var l=o,c=a?zX.selectedLine:" ",u=n.join(" ");if(PX.$isTextNode(t)){var d=t.getTextContent(),h=0===d.length?"(empty)":`"${HX(d)}"`;d=[h,0!==(d=[YX(t),WX(t),jX(t)].filter(Boolean).join(", ")).length?`{ ${d} }`:null].filter(Boolean).join(" ").trim()}else if(RX.$isLinkNode(t)){d=0===(d=t.getURL()).length?"(empty)":`"${HX(d)}"`,null!=(h=t.getTarget())&&(h="target: "+h);var p=Boolean;let e=t.getRel();null!=e&&(e="rel: "+e),d=[d,0!==(h=[h,e].filter(p).join(", ")).length?`{ ${h} }`:null].filter(Boolean).join(" ").trim()}else d="";o=l+`${c} ${u} ${r} ${i} ${s} ${d}\n`,o+=function({indent:e,isSelected:t,node:n,nodeKeyDisplay:r,selection:i,typeDisplay:o}){if(!PX.$isTextNode(n)||!PX.$isRangeSelection(i)||!t||PX.$isElementNode(n))return"";t=i.anchor;var a=i.focus;if(""===n.getTextContent()||t.getNode()===i.focus.getNode()&&t.offset===a.offset)return"";a=i.anchor;let s=i.focus,l=n.getTextContent(),c=l.length;if(t=i=-1,"text"===a.type&&"text"===s.type){let e=a.getNode(),r=s.getNode();e===r&&n===e&&a.offset!==s.offset?[i,t]=a.offset<s.offset?[a.offset,s.offset]:[s.offset,a.offset]:[i,t]=n===e?e.isBefore(r)?[a.offset,c]:[0,a.offset]:n===r?r.isBefore(e)?[s.offset,c]:[0,s.offset]:[0,c]}n=(l.slice(0,i).match($X)||[]).length,a=(l.slice(i,t).match($X)||[]).length;let[u,d]=[i+n,t+n+a];return u===d?"":(n=e[e.length-1]===zX.hasNextSibling?zX.ancestorHasNextSibling:zX.ancestorIsLastChild,e=[...e.slice(0,e.length-1),n],n=Array(u+1).fill(" "),i=Array(d-u).fill(zX.selectedChar),r=Array(r.length+(o.length+3)).fill(" "),[zX.selectedLine,e.join(" "),[...r,...n,...i].join("")].join(" ")+"\n")}({indent:n,isSelected:a,node:t,nodeKeyDisplay:r,selection:e,typeDisplay:i})})),null===e?": null":PX.$isRangeSelection(e)?function(e){let t="";var n=YX(e);t+=`: range ${""!==n?`{ ${n} }`:""} ${""!==e.style?`{ style: ${e.style} } `:""}`,n=e.anchor,e=e.focus;let r=n.offset,i=e.offset;return t+=`\n ├ anchor { key: ${n.key}, offset: ${null===r?"null":r}, type: ${n.type} }`,t+`\n └ focus { key: ${e.key}, offset: ${null===i?"null":i}, type: ${e.type} }`}(e):PX.DEPRECATED_$isGridSelection(e)?`: grid\n └ { grid: ${e.gridKey}, anchorCell: ${e.anchor.key}, focusCell: ${e.focus.key} }`:`: node\n └ [${Array.from(e._nodes).join(", ")}]`})),o+="\n selection"+e,o+="\n\n commands:",n.length)for(let{type:a,payload:s}of n)o+=`\n └ { type: ${a}, payload: ${s instanceof Event?s.constructor.name:s} }`;else o+="\n └ None dispatched.";return o+="\n\n editor:",o+=`\n └ namespace ${t.namespace}`,null!==r&&(o+=`\n └ compositionKey ${r}`),o+=`\n └ editable ${String(i)}`}function UX(e,t,n=[]){let r=(e=e.getChildren()).length;e.forEach(((e,i)=>{t(e,n.concat(i===r-1?zX.isLastChild:zX.hasNextSibling)),PX.$isElementNode(e)&&UX(e,t,n.concat(i===r-1?zX.ancestorIsLastChild:zX.ancestorHasNextSibling))}))}function HX(e){return Object.entries(BX).reduce(((e,[t,n])=>e.replace(new RegExp(t,"g"),String(n))),e)}let VX=[e=>e.hasFormat("bold")&&"Bold",e=>e.hasFormat("code")&&"Code",e=>e.hasFormat("italic")&&"Italic",e=>e.hasFormat("strikethrough")&&"Strikethrough",e=>e.hasFormat("subscript")&&"Subscript",e=>e.hasFormat("superscript")&&"Superscript",e=>e.hasFormat("underline")&&"Underline"],qX=[e=>e.isDirectionless()&&"Directionless",e=>e.isUnmergeable()&&"Unmergeable"],KX=[e=>e.isToken()&&"Token",e=>e.isSegmented()&&"Segmented"];function WX(e){let t=qX.map((t=>t(e))).filter(Boolean).join(", ").toLocaleLowerCase();return""!==t&&(t="detail: "+t),t}function jX(e){let t=KX.map((t=>t(e))).filter(Boolean).join(", ").toLocaleLowerCase();return""!==t&&(t="mode: "+t),t}function YX(e){let t=VX.map((t=>t(e))).filter(Boolean).join(", ").toLocaleLowerCase();return""!==t&&(t="format: "+t),t}var GX=function({timeTravelButtonClassName:e,timeTravelPanelSliderClassName:t,timeTravelPanelButtonClassName:n,viewClassName:r,timeTravelPanelClassName:i,editor:o}){let[a,s]=LX.useState([]),[l,c]=LX.useState(""),[u,d]=LX.useState(!1),h=LX.useRef(0),p=LX.useRef(null),f=LX.useRef(null),[g,m]=LX.useState(!1),[y,v]=LX.useState(!1),[b,_]=LX.useState(!1),w=LX.useRef(null),x=function(e){let[t,n]=LX.useState([]);return LX.useEffect((()=>{let t=new Set;for(let[r]of e._commands)t.add(e.registerCommand(r,(e=>(n((t=>((t=[...t]).push({payload:e,type:r.type?r.type:"UNKNOWN"}),10<t.length&&t.shift(),t))),!1)),PX.COMMAND_PRIORITY_HIGH));return()=>t.forEach((e=>e()))}),[e]),LX.useMemo((()=>t),[t])}(o),S=LX.useCallback((e=>{const t=FX(o.getEditorState(),o._config,x,o._compositionKey,o._editable);c(t),u||s((t=>[...t,[Date.now(),e]]))}),[x,o,u]);LX.useEffect((()=>{let e=o.getEditorState();!b&&1e3<e._nodeMap.size&&c(FX(e,o._config,x,o._compositionKey,o._editable))}),[x,o,b]),LX.useEffect((()=>IX.mergeRegister(o.registerUpdateListener((({editorState:e})=>{!b&&1e3<e._nodeMap.size&&(w.current=e,v(!0),!b)||S(e)})),o.registerEditableListener((()=>{let e=FX(o.getEditorState(),o._config,x,o._compositionKey,o._editable);c(e)})))),[x,o,y,S,b]);let C=a.length;return LX.useEffect((()=>{if(g){let e,t=()=>{const n=h.current;n===C-1?m(!1):e=setTimeout((()=>{h.current++;const e=h.current,n=f.current;null!==n&&(n.value=String(e)),o.setEditorState(a[e][1]),t()}),a[n+1][0]-a[n][0])};return t(),()=>{clearTimeout(e)}}}),[a,g,o,C]),LX.useEffect((()=>{let e=p.current;if(null!==e)return e.__lexicalEditor=o,()=>{e.__lexicalEditor=null}}),[o]),LX.createElement("div",{className:r},!b&&y?LX.createElement("div",{style:{padding:20}},LX.createElement("span",{style:{marginRight:20}},"Detected large EditorState, this can impact debugging performance."),LX.createElement("button",{onClick:()=>{_(!0);let e=w.current;null!==e&&(w.current=null,S(e))},style:{background:"transparent",border:"1px solid white",color:"white",cursor:"pointer",padding:5}},"Show full tree")):null,!u&&(b||!y)&&2<C&&LX.createElement("button",{onClick:()=>{let e=o.getRootElement();null!==e&&(e.contentEditable="false",h.current=C-1,d(!0))},className:e,type:"button"},"Time Travel"),(b||!y)&&LX.createElement("pre",{ref:p},l),u&&(b||!y)&&LX.createElement("div",{className:i},LX.createElement("button",{className:n,onClick:()=>{h.current===C-1&&(h.current=1),m(!g)},type:"button"},g?"Pause":"Play"),LX.createElement("input",{className:t,ref:f,onChange:e=>{e=Number(e.target.value);let t=a[e];t&&(h.current=e,o.setEditorState(t[1]))},type:"range",min:"1",max:C-1}),LX.createElement("button",{className:n,onClick:()=>{var e=o.getRootElement();if(null!==e){e.contentEditable="true",e=a.length-1,o.setEditorState(a[e][1]);let t=f.current;null!==t&&(t.value=String(e)),d(!1),m(!1)}},type:"button"},"Exit")))};function JX(){const[e]=Mv();return Jb(GX,{viewClassName:"tree-view-output",timeTravelPanelClassName:"debug-timetravel-panel",timeTravelButtonClassName:"debug-timetravel-button",timeTravelPanelSliderClassName:"debug-timetravel-panel-slider",timeTravelPanelButtonClassName:"debug-timetravel-panel-button",editor:e})}const XX=null!=window.parent&&window.parent.frames.right===window;function ZX(){const{historyState:e}=v_(),{settings:{isCollab:t,isAutocomplete:n,isMaxLength:r,isCharLimit:i,isCharLimitUtf8:o,isRichText:s,showTreeView:l,showTableOfContents:c}}=n_(),u=Jb(tJ,{children:t?"Enter some collaborative rich text...":s?"Enter some rich text...":"Enter some plain text..."}),[d,h]=a.exports.useState(null),[p,f]=a.exports.useState(!1),g={namespace:"Playground",nodes:[...Eq],onError:e=>{throw e},theme:GG};return a.exports.useEffect((()=>{const e=()=>{const e=FL&&window.matchMedia("(max-width: 1025px)").matches;e!==p&&f(e)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[p]),Xb(Zb,{children:[s&&Jb(MX,{}),Xb("div",{className:`editor-container ${l?"tree-view":""} ${s?"":"plain-text"}`,children:[r&&Jb(SJ,{maxLength:30}),Jb(bG,{}),Jb(w_,{}),Jb(iw,{}),Jb(yG,{}),Jb(AG,{}),Jb(sj,{}),Jb($J,{}),Jb(DG,{}),Jb(aI,{}),Jb(aJ,{}),Jb(cW,{}),Jb(xj,{}),Xb(Zb,s?{children:[t?Jb(AD,{id:"main",providerFactory:c$,shouldBootstrap:!XX}):Jb(g_,{externalHistoryState:e}),Jb(OP,{contentEditable:Jb("div",{className:"editor-scroller",children:Jb("div",{className:"editor",ref:e=>{null!==e&&h(e)},children:Jb(eJ,{})})}),placeholder:u,ErrorBoundary:PD}),Jb(xJ,{}),Jb(oY,{}),Jb(FI,{}),Jb(Q_,{}),Jb(gJ,{maxDepth:7}),Jb(zL,{}),Jb(jJ,{}),Xb(fG,{cellEditorConfig:g,children:[Jb(w_,{}),Jb(OP,{contentEditable:Jb(eJ,{className:"TableNode__contentEditable"}),placeholder:null,ErrorBoundary:PD}),Jb($J,{}),Jb(g_,{}),Jb(IY,{captionsEnabled:!1}),Jb(pJ,{}),Jb(Sj,{}),Jb(iJ,{})]}),Jb(IY,{}),Jb(pJ,{}),Jb(jY,{}),Jb(GW,{}),Jb(tj,{}),Jb(jW,{}),Jb(Sj,{}),Jb(II,{}),Jb(EY,{}),Jb(kY,{}),Jb(UJ,{}),Jb(IP,{}),Jb(_Y,{}),d&&!p&&Xb(Zb,{children:[Jb(TG,{anchorElem:d}),Jb(iY,{anchorElem:d}),Jb(FG,{anchorElem:d}),Jb(KJ,{anchorElem:d,cellMerge:!0}),Jb(iJ,{anchorElem:d})]})]}:{children:[Jb(vP,{contentEditable:Jb(eJ,{}),placeholder:u,ErrorBoundary:PD}),Jb(g_,{externalHistoryState:e})]}),(i||o)&&Jb(H_,{charset:i?"UTF-16":"UTF-8",maxLength:5}),n&&Jb(dz,{}),Jb("div",{children:c&&Jb(iX,{})}),Jb(uW,{isRichText:s})]}),l&&Jb(JX,{})]})}const QX=[$b,Tv,Ev,zb,nz,aG,ML,OL,RL,UD,tz,Ly,By,T_,HY,lX,yq,Sq,yz,hq,sq,fz,_q,kI,XK,ZW,qW,jG,sY,dY,gY],eZ=new Set(["insertText","insertCompositionText","insertFromComposition","insertLineBreak","insertParagraph","deleteCompositionText","deleteContentBackward","deleteByComposition","deleteContent","deleteContentForward","deleteWordBackward","deleteWordForward","deleteHardLineBackward","deleteSoftLineBackward","deleteHardLineForward","deleteSoftLineForward"]);function tZ(){const e=oW();return a.exports.useEffect((()=>{let t,n,r=0,i=[],o=!1;const a=function(){null!=n&&(o?o=!1:i.push(performance.now()-r),clearTimeout(n),n=null)},s=function(){null!=t&&(clearTimeout(t),t=null),n=setTimeout(a,0),t=setTimeout((()=>{const t=i.reduce(((e,t)=>e+t),0),n="Typing Perf: "+Math.round(t/i.length*100)/100+"ms";e(n),i=[]}),2e3),r=performance.now()},l=function(e){eZ.has(e.inputType)&&!o?s():o=!1},c=function(e){const t=e.keyCode;8!==t&&13!==t||s()},u=function(){o=!0},d=function(){o=!0};return window.addEventListener("keydown",c,!0),window.addEventListener("selectionchange",a,!0),window.addEventListener("beforeinput",l,!0),window.addEventListener("paste",u,!0),window.addEventListener("cut",d,!0),()=>{window.removeEventListener("keydown",c,!0),window.removeEventListener("selectionchange",a,!0),window.removeEventListener("beforeinput",l,!0),window.removeEventListener("paste",u,!0),window.removeEventListener("cut",d,!0)}}),[e]),null}function nZ(){const e=Gg();if(null===e.getFirstChild()){const t=Ib("h1");t.append(Kg("Welcome to the playground")),e.append(t);const n=Pb();n.append(Kg("In case you were wondering what the black box at the bottom is – it's the debug view, showing the current state of the editor. You can disable it by pressing on the settings control in the bottom-left of your screen and toggling the debug view setting.")),e.append(n);const r=Vg();r.append(Kg("The playground is a demo environment built with "),Kg("@lexical/react").toggleFormat("code"),Kg("."),Kg(" Try typing in "),Kg("some text").toggleFormat("bold"),Kg(" with "),Kg("different").toggleFormat("italic"),Kg(" formats.")),e.append(r);const i=Vg();i.append(Kg("Make sure to check out the various plugins in the toolbar. You can also use #hashtags or @-mentions too!")),e.append(i);const o=Vg();o.append(Kg("If you'd like to find out more about Lexical, you can:")),e.append(o);const a=vv("bullet");a.append(yv().append(Kg("Visit the "),Dy("https://lexical.dev/").append(Kg("Lexical website")),Kg(" for documentation and more information.")),yv().append(Kg("Check out the code on our "),Dy("https://github.com/facebook/lexical").append(Kg("GitHub repository")),Kg(".")),yv().append(Kg("Playground code can be found "),Dy("https://github.com/facebook/lexical/tree/main/packages/lexical-playground").append(Kg("here")),Kg(".")),yv().append(Kg("Join our "),Dy("https://discord.com/invite/KmG4wQnnD9").append(Kg("Discord Server")),Kg(" and chat with the team."))),e.append(a);const s=Vg();s.append(Kg("Lastly, we're constantly adding cool new features to this playground. So make sure you check back here when you next get a chance :).")),e.append(s)}}function rZ(){const{settings:{isCollab:e,emptyEditor:t,measureTypingPerf:n}}=n_(),r={editorState:e?null:t?void 0:nZ,namespace:"Playground",nodes:[...QX],onError:e=>{throw e},theme:GG};return Jb($v,{initialConfig:r,children:Jb(y_,{children:Jb(dG,{children:Xb(o_,{children:[Jb("div",{className:"editor-shell",children:Jb(ZX,{})}),null,null,null,n?Jb(tZ,{}):null]})})})})}function iZ(){return Jb(t_,{children:Jb(rZ,{})})}console.warn("If you are profiling the playground app, please ensure you turn off the debug view. You can disable it by pressing on the settings control in the bottom-left of your screen and toggling the debug view setting.");const oZ=e=>{const t=customElements.get("vite-error-overlay");if(!t)return;const n=new t(e),r=document.body;null!==r&&r.appendChild(n)};window.addEventListener("error",oZ),window.addEventListener("unhandledrejection",(({reason:e})=>oZ(e))),Vu(document.getElementById("root")).render(Jb(a.exports.StrictMode,{children:Jb(iZ,{})}));export{jg as $,w_ as A,PK as B,dm as C,bm as D,DG as E,Zb as F,eJ as G,aI as H,PD as I,ow as J,Pm as K,pJ as L,RK as M,$J as N,Nv as O,tJ as P,qY as Q,OP as R,Um as S,JX as T,IK as U,zY as V,FL as W,GG as X,vP as Y,cX as Z,uG as _,Jb as a,JY as a0,Km as a1,sG as a2,Fg as a3,Gg as a4,Vg as a5,$m as a6,pm as a7,fm as a8,Em as a9,Lm as aa,Mm as ab,tm as ac,Nm as ad,Am as ae,Om as af,qg as ag,GY as ah,jv as ai,aX as aj,cb as ak,ub as al,rG as am,Yv as an,lb as ao,oG as ap,nG as aq,eG as ar,i as as,r as at,cq as b,Jg as c,Qg as d,wY as e,U as f,pI as g,fq as h,lm as i,Xb as j,hm as k,Dm as l,Sy as m,Rm as n,uw as o,bq as p,im as q,a as r,Im as s,v_ as t,Mv as u,n_ as v,aJ as w,AD as x,c$ as y,g_ as z};
|