rj-editor 0.1.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/README.md +313 -22
  2. package/dist/assets/icons/AttachmentIcon01.d.ts +2 -0
  3. package/dist/assets/icons/BorderRadiusIcon.d.ts +2 -0
  4. package/dist/assets/icons/ChevronSelectorHorizontalIcon.d.ts +2 -0
  5. package/dist/assets/icons/ChevronSelectorVerticalIcon.d.ts +2 -0
  6. package/dist/assets/icons/ImageIcon03.d.ts +2 -0
  7. package/dist/assets/icons/ImageIdentLeftIcon.d.ts +2 -0
  8. package/dist/assets/icons/ImageWrapTopBottomIcon.d.ts +2 -0
  9. package/dist/assets/icons/LayoutGridIcon01.d.ts +2 -0
  10. package/dist/assets/icons/LeftIndentIcon01.d.ts +2 -0
  11. package/dist/assets/icons/LineHeightIcon.d.ts +2 -0
  12. package/dist/assets/icons/MaximizeIcon02.d.ts +2 -0
  13. package/dist/assets/icons/MinimizeIcon02.d.ts +2 -0
  14. package/dist/assets/icons/PaintPourIcon.d.ts +2 -0
  15. package/dist/assets/icons/PaletteIcon.d.ts +2 -0
  16. package/dist/assets/icons/ParagraphSpacingIco.d.ts +2 -0
  17. package/dist/assets/icons/RefreshCcwIcon01.d.ts +2 -0
  18. package/dist/assets/icons/RefreshCcwIcon05.d.ts +2 -0
  19. package/dist/assets/icons/RefreshCwIcon01.d.ts +2 -0
  20. package/dist/assets/icons/RightIndentIcon01.d.ts +2 -0
  21. package/dist/assets/icons/SubscriptIcon.d.ts +2 -0
  22. package/dist/assets/icons/SupscriptIcon.d.ts +2 -0
  23. package/dist/assets/icons/TrashIcon03.d.ts +2 -0
  24. package/dist/assets/icons/VerticalAlignBottomIcon.d.ts +2 -0
  25. package/dist/assets/icons/VerticalAlignMiddleIcon.d.ts +2 -0
  26. package/dist/assets/icons/VerticalAlignTopIcon.d.ts +2 -0
  27. package/dist/assets/icons/YoutubeIcon.d.ts +2 -0
  28. package/dist/components/RJTextEditor.d.ts +3 -9
  29. package/dist/components/equation/EquationComponent.d.ts +10 -0
  30. package/dist/components/global/input-number/InputNumber.d.ts +14 -0
  31. package/dist/components/global/input-number/index.d.ts +2 -0
  32. package/dist/components/global/modal/Modal.d.ts +12 -0
  33. package/dist/components/global/modal/index.d.ts +2 -0
  34. package/dist/components/image/ImageComponent.d.ts +21 -0
  35. package/dist/components/rj-text-editor/HtmlValuePlugin.d.ts +7 -0
  36. package/dist/components/rj-text-editor/RJTextEditor.types.d.ts +18 -0
  37. package/dist/components/rj-text-editor/RJTextEditorContent.d.ts +17 -0
  38. package/dist/components/rj-text-editor/createInitialConfig.d.ts +47 -0
  39. package/dist/components/rj-text-editor/editorTheme.d.ts +26 -0
  40. package/dist/components/rj-text-editor/handleEditorChange.d.ts +3 -0
  41. package/dist/components/toolbar/Toolbar.d.ts +6 -1
  42. package/dist/components/toolbar/equation/EquationToolbar.d.ts +1 -0
  43. package/dist/components/toolbar/equation/utils.d.ts +13 -0
  44. package/dist/components/toolbar/home/HomeToolbar.d.ts +6 -0
  45. package/dist/components/toolbar/home/indent/IndentControls.d.ts +1 -0
  46. package/dist/components/toolbar/home/spacing/SpacingControls.d.ts +1 -0
  47. package/dist/components/toolbar/image/ImageToolbar.d.ts +2 -0
  48. package/dist/components/toolbar/image/divider/ToolbarDivider.d.ts +1 -0
  49. package/dist/components/toolbar/image/utils.d.ts +26 -0
  50. package/dist/components/toolbar/insert/InsertToolbar.d.ts +5 -0
  51. package/dist/components/toolbar/insert/divider/ToolbarDivider.d.ts +1 -0
  52. package/dist/components/toolbar/insert/equation/EquationControl.d.ts +2 -0
  53. package/dist/components/toolbar/insert/equation/EquationExamples.d.ts +6 -0
  54. package/dist/components/toolbar/insert/equation/EquationModal.d.ts +11 -0
  55. package/dist/components/toolbar/insert/equation/EquationPreview.d.ts +8 -0
  56. package/dist/components/toolbar/insert/horizontal-rule/HorizontalRuleControl.d.ts +1 -0
  57. package/dist/components/toolbar/insert/image/ImageControl.d.ts +1 -0
  58. package/dist/components/toolbar/insert/link/LinkControl.d.ts +7 -0
  59. package/dist/components/toolbar/insert/table/TableControl.d.ts +5 -0
  60. package/dist/components/toolbar/insert/youtube/YouTubeControl.d.ts +2 -0
  61. package/dist/components/toolbar/layout/LayoutToolbar.d.ts +1 -0
  62. package/dist/components/toolbar/table/TableToolbar.d.ts +1 -0
  63. package/dist/components/toolbar/table/cell/CellControls.d.ts +1 -0
  64. package/dist/components/toolbar/table/columns/ColumnControls.d.ts +1 -0
  65. package/dist/components/toolbar/table/delete/DeleteTableControls.d.ts +1 -0
  66. package/dist/components/toolbar/table/divider/ToolbarDivider.d.ts +1 -0
  67. package/dist/components/toolbar/table/header-cell/HeaderCellControls.d.ts +1 -0
  68. package/dist/components/toolbar/table/merge/MergeControls.d.ts +1 -0
  69. package/dist/components/toolbar/table/rows/RowControls.d.ts +1 -0
  70. package/dist/components/toolbar/table/utils.d.ts +23 -0
  71. package/dist/components/youtube/YouTubeComponent.d.ts +9 -0
  72. package/dist/constants/equationEditorEventName.d.ts +1 -0
  73. package/dist/constants/equationExamples.d.ts +16 -0
  74. package/dist/constants/equationStructures.d.ts +33 -0
  75. package/dist/constants/equationSymbols.d.ts +1 -0
  76. package/dist/constants/index.d.ts +10 -0
  77. package/dist/constants/insertEquationCommand.d.ts +2 -0
  78. package/dist/constants/insertImageCommand.d.ts +2 -0
  79. package/dist/constants/insertYouTubeCommand.d.ts +2 -0
  80. package/dist/constants/lineHeightOptions.d.ts +1 -0
  81. package/dist/constants/maxImageFileSize.d.ts +1 -0
  82. package/dist/constants/openLinkModalEventName.d.ts +1 -0
  83. package/dist/i18n/I18nContext.d.ts +9 -0
  84. package/dist/i18n/RJEditorI18nContext.d.ts +3 -0
  85. package/dist/i18n/index.d.ts +6 -0
  86. package/dist/i18n/locales/en.d.ts +2 -0
  87. package/dist/i18n/locales/ru.d.ts +2 -0
  88. package/dist/i18n/locales/uz.d.ts +2 -0
  89. package/dist/i18n/mergeTranslations.d.ts +2 -0
  90. package/dist/i18n/useRJEditorI18n.d.ts +1 -0
  91. package/dist/index.d.ts +2 -1
  92. package/dist/nodes/EquationNode.d.ts +26 -0
  93. package/dist/nodes/ExtendedTextNode.d.ts +12 -0
  94. package/dist/nodes/ImageNode.d.ts +62 -0
  95. package/dist/nodes/YouTubeNode.d.ts +25 -0
  96. package/dist/nodes/index.d.ts +4 -0
  97. package/dist/plugins/EquationPlugin.d.ts +1 -0
  98. package/dist/plugins/ImagePlugin.d.ts +1 -0
  99. package/dist/plugins/KeyboardShortcutsPlugin.d.ts +1 -0
  100. package/dist/plugins/TableBoundaryPlugin.d.ts +1 -0
  101. package/dist/plugins/YouTubePlugin.d.ts +1 -0
  102. package/dist/rj-editor.css +1 -1
  103. package/dist/rj-editor.js +32116 -555
  104. package/dist/rj-editor.umd.cjs +259 -1
  105. package/dist/slice/index.d.ts +1 -1
  106. package/dist/slice/toolbarSlice.d.ts +1 -1
  107. package/dist/types/DeepPartial.d.ts +3 -0
  108. package/dist/types/EquationDisplayMode.d.ts +1 -0
  109. package/dist/types/ImageAlignment.d.ts +1 -0
  110. package/dist/types/ImageObjectFit.d.ts +1 -0
  111. package/dist/types/ImageTextWrap.d.ts +1 -0
  112. package/dist/types/InsertEquationPayload.d.ts +5 -0
  113. package/dist/types/InsertImagePayload.d.ts +19 -0
  114. package/dist/types/InsertYouTubePayload.d.ts +4 -0
  115. package/dist/types/RJEditorLocaleCode.d.ts +1 -0
  116. package/dist/types/RJEditorTranslations.d.ts +173 -0
  117. package/dist/types/SerializedEquationNode.d.ts +6 -0
  118. package/dist/types/SerializedImageNode.d.ts +20 -0
  119. package/dist/types/SerializedYouTubeNode.d.ts +5 -0
  120. package/dist/types/ToolbarState.d.ts +35 -0
  121. package/dist/types/index.d.ts +13 -0
  122. package/dist/utils/helpers/clampValue.d.ts +1 -0
  123. package/dist/utils/helpers/formatNumberText.d.ts +1 -0
  124. package/dist/utils/helpers/formatShortcutTitle.d.ts +1 -0
  125. package/dist/utils/helpers/getYouTubeVideoId.d.ts +1 -0
  126. package/dist/utils/helpers/index.d.ts +12 -0
  127. package/dist/utils/helpers/isApplePlatform.d.ts +1 -0
  128. package/dist/utils/helpers/normalizeNumberText.d.ts +1 -0
  129. package/dist/utils/helpers/normalizeRJEditorHtml.d.ts +2 -0
  130. package/dist/utils/helpers/numberToInputText.d.ts +1 -0
  131. package/dist/utils/helpers/openFilePicker.d.ts +1 -0
  132. package/dist/utils/helpers/readFileAsDataUrl.d.ts +1 -0
  133. package/dist/utils/helpers/renderEquationToHtml.d.ts +3 -0
  134. package/dist/utils/helpers/setEditorHtml.d.ts +2 -0
  135. package/package.json +33 -1
  136. /package/dist/components/toolbar/{alignment → home/alignment}/AlignmentControls.d.ts +0 -0
  137. /package/dist/components/toolbar/{divider → home/divider}/ToolbarDivider.d.ts +0 -0
  138. /package/dist/components/toolbar/{history → home/history}/HistoryControls.d.ts +0 -0
  139. /package/dist/components/toolbar/{list → home/list}/ListControls.d.ts +0 -0
  140. /package/dist/components/toolbar/{style-controls → home/style-controls}/StyleControls.d.ts +0 -0
  141. /package/dist/components/toolbar/{style-controls → home/style-controls}/background-color/BackgroundColorControl.d.ts +0 -0
  142. /package/dist/components/toolbar/{style-controls → home/style-controls}/clear-formatting/ClearFormattingControl.d.ts +0 -0
  143. /package/dist/components/toolbar/{style-controls → home/style-controls}/font-family/FontFamilyControl.d.ts +0 -0
  144. /package/dist/components/toolbar/{style-controls → home/style-controls}/font-size/FontSizeControl.d.ts +0 -0
  145. /package/dist/components/toolbar/{style-controls → home/style-controls}/text-color/TextColorControl.d.ts +0 -0
  146. /package/dist/components/toolbar/{style-controls → home/style-controls}/utils.d.ts +0 -0
  147. /package/dist/components/toolbar/{text-format → home/text-format}/TextFormatControls.d.ts +0 -0
@@ -1 +1,259 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`@lexical/html`),require(`lexical`),require(`@lexical/list`),require(`@lexical/react/LexicalAutoFocusPlugin`),require(`@lexical/react/LexicalContentEditable`),require(`@lexical/react/LexicalComposer`),require(`@lexical/react/LexicalErrorBoundary`),require(`@lexical/react/LexicalHistoryPlugin`),require(`@lexical/react/LexicalListPlugin`),require(`@lexical/react/LexicalOnChangePlugin`),require(`@lexical/react/LexicalRichTextPlugin`),require(`react`),require(`react-redux`),require(`@reduxjs/toolkit`),require(`@lexical/selection`),require(`@lexical/react/LexicalComposerContext`),require(`react/jsx-runtime`),require(`antd`)):typeof define==`function`&&define.amd?define([`exports`,`@lexical/html`,`lexical`,`@lexical/list`,`@lexical/react/LexicalAutoFocusPlugin`,`@lexical/react/LexicalContentEditable`,`@lexical/react/LexicalComposer`,`@lexical/react/LexicalErrorBoundary`,`@lexical/react/LexicalHistoryPlugin`,`@lexical/react/LexicalListPlugin`,`@lexical/react/LexicalOnChangePlugin`,`@lexical/react/LexicalRichTextPlugin`,`react`,`react-redux`,`@reduxjs/toolkit`,`@lexical/selection`,`@lexical/react/LexicalComposerContext`,`react/jsx-runtime`,`antd`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.RJEditor={},e.LexicalHtml,e.Lexical,e.LexicalList,e.LexicalReactAutoFocusPlugin,e.LexicalReactContentEditable,e.LexicalReactComposer,e.LexicalReactErrorBoundary,e.LexicalReactHistoryPlugin,e.LexicalReactListPlugin,e.LexicalReactOnChangePlugin,e.LexicalReactRichTextPlugin,e.React,e.ReactRedux,e.RTK,e.LexicalSelection,e.LexicalReactComposerContext,e.jsxRuntime,e.antd))})(this,function(e,t,n,r,i,a,o,s,c,ee,l,u,d,f,p,m,h,g,_){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var v=Object.create,y=Object.defineProperty,b=Object.getOwnPropertyDescriptor,x=Object.getOwnPropertyNames,S=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty,w=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=x(t),a=0,o=i.length,s;a<o;a++)s=i[a],!C.call(e,s)&&s!==n&&y(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=b(t,s))||r.enumerable});return e};d=((e,t,n)=>(n=e==null?{}:v(S(e)),w(t||!e||!e.__esModule?y(n,`default`,{value:e,enumerable:!0}):n,e)))(d,1);var T=[`#FFFFFF`,`#FEF3C7`,`#DBEAFE`,`#DCFCE7`,`#FCE7F3`,`#EDE9FE`,`#E5E7EB`],E=[`Arial`,`Georgia`,`Inter`,`Times New Roman`,`Trebuchet MS`,`Verdana`],te=[`8px`,`9px`,`11px`,`12px`,`14px`,`16px`,`18px`,`20px`,`24px`,`32px`,`48px`,`72px`],D={backgroundColor:``,canRedo:!1,canUndo:!1,fontFamily:void 0,fontSize:void 0,isBold:!1,isItalic:!1,isStrikethrough:!1,isUnderline:!1,textColor:``},O=[`#111827`,`#dc2626`,`#2563eb`,`#059669`,`#9333ea`,`#ca8a04`],k=(0,p.createSlice)({name:`toolbar`,initialState:D,reducers:{setCanRedo(e,t){e.canRedo=t.payload},setCanUndo(e,t){e.canUndo=t.payload},setTextFormats(e,t){e.isBold=t.payload.isBold,e.isItalic=t.payload.isItalic,e.isStrikethrough=t.payload.isStrikethrough,e.isUnderline=t.payload.isUnderline},setStyleFormats(e,t){e.backgroundColor=t.payload.backgroundColor,e.fontFamily=t.payload.fontFamily,e.fontSize=t.payload.fontSize,e.textColor=t.payload.textColor}}}),{setCanRedo:A,setCanUndo:j,setStyleFormats:M,setTextFormats:N}=k.actions,P=k.reducer,F=()=>(0,p.configureStore)({reducer:{toolbar:P}});F();var I=f.useDispatch.withTypes(),L=f.useSelector.withTypes();function R(e){return(0,g.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,g.jsx)(`path`,{d:`M18 10H6M21 6H3M21 14H3M18 18H6`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function z(e){return(0,g.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,g.jsx)(`path`,{d:`M21 10H3M21 18H3M21 6H3M21 14H3`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function B(e){return(0,g.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,g.jsx)(`path`,{d:`M16 10H3M20 6H3M20 14H3M16 18H3`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function V(e){return(0,g.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,g.jsx)(`path`,{d:`M21 10H8M21 6H4M21 14H4M21 18H8`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function H({editor:e}){return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`button`,{"aria-label":`Align left`,onClick:()=>e.dispatchCommand(n.FORMAT_ELEMENT_COMMAND,`left`),type:`button`,children:(0,g.jsx)(B,{})}),(0,g.jsx)(`button`,{"aria-label":`Align center`,onClick:()=>e.dispatchCommand(n.FORMAT_ELEMENT_COMMAND,`center`),type:`button`,children:(0,g.jsx)(R,{})}),(0,g.jsx)(`button`,{"aria-label":`Align right`,onClick:()=>e.dispatchCommand(n.FORMAT_ELEMENT_COMMAND,`right`),type:`button`,children:(0,g.jsx)(V,{})}),(0,g.jsx)(`button`,{"aria-label":`Align justify`,onClick:()=>e.dispatchCommand(n.FORMAT_ELEMENT_COMMAND,`justify`),type:`button`,children:(0,g.jsx)(z,{})})]})}function U(){return(0,g.jsx)(`span`,{className:`rj-editor-toolbar-divider`})}function W(e){return(0,g.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,g.jsx)(`path`,{d:`M3 9H16.5C18.9853 9 21 11.0147 21 13.5C21 15.9853 18.9853 18 16.5 18H12M7 13L3 9L7 5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function G(e){return(0,g.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,g.jsx)(`path`,{d:`M21 9H7.5C5.01472 9 3 11.0147 3 13.5C3 15.9853 5.01472 18 7.5 18H12M17 13L21 9L17 5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function K({editor:e}){let{canRedo:t,canUndo:r}=L(e=>e.toolbar);return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`button`,{"aria-label":`Undo`,disabled:!r,onClick:()=>e.dispatchCommand(n.UNDO_COMMAND,void 0),type:`button`,children:(0,g.jsx)(W,{})}),(0,g.jsx)(`button`,{"aria-label":`Redo`,disabled:!t,onClick:()=>e.dispatchCommand(n.REDO_COMMAND,void 0),type:`button`,children:(0,g.jsx)(G,{})})]})}function q(e){return(0,g.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,g.jsx)(`path`,{d:`M21 5.00001L10 5.00001M21 19L10 19M21 12L12 12M6 5.00001C5.5 5.00004 5.32843 5.00001 4.5 5.00001C3.67157 5.00001 3.5 4.99999 3 5.00001M6 19C5.5 19 5.32843 19 4.5 19C3.67157 19 3.5 19 3 19M11 8C9 10 7 12 7 12M7 12C7 12 5 10 3 8M7 12C7 12 9 14 11 16M7 12C7 12 5 14 3 16`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function ne(e){return(0,g.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,g.jsx)(`path`,{d:`M21 12L9 12M21 6L9 6M21 18L9 18M5 12C5 12.5523 4.55228 13 4 13C3.44772 13 3 12.5523 3 12C3 11.4477 3.44772 11 4 11C4.55228 11 5 11.4477 5 12ZM5 6C5 6.55228 4.55228 7 4 7C3.44772 7 3 6.55228 3 6C3 5.44772 3.44772 5 4 5C4.55228 5 5 5.44772 5 6ZM5 18C5 18.5523 4.55228 19 4 19C3.44772 19 3 18.5523 3 18C3 17.4477 3.44772 17 4 17C4.55228 17 5 17.4477 5 18Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function J(e){return(0,g.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,g.jsx)(`path`,{d:`M21 5.00001L10 5.00001M21 19L10 19M21 12L10 12M6 5.00001C5.5 5.00004 5.32843 5.00001 4.5 5.00001C3.67157 5.00001 3.5 4.99999 3 5.00001M6 19C5.5 19 5.32843 19 4.5 19C3.67157 19 3.5 19 3 19M6 12C5.5 12 5.32843 12 4.5 12C3.67157 12 3.5 12 3 12`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Y({editor:e}){return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`button`,{"aria-label":`Bulleted list`,onClick:()=>e.dispatchCommand(r.INSERT_UNORDERED_LIST_COMMAND,void 0),type:`button`,children:(0,g.jsx)(ne,{})}),(0,g.jsx)(`button`,{"aria-label":`Numbered list`,onClick:()=>e.dispatchCommand(r.INSERT_ORDERED_LIST_COMMAND,void 0),type:`button`,children:(0,g.jsx)(J,{})}),(0,g.jsx)(`button`,{"aria-label":`Remove list`,onClick:()=>e.dispatchCommand(r.REMOVE_LIST_COMMAND,void 0),type:`button`,className:`rj-editor-toolbar--clear-btn`,children:(0,g.jsx)(q,{})})]})}function X(e,t){e.focus(()=>{e.update(()=>{let e=(0,n.$getSelection)();(0,n.$isRangeSelection)(e)&&(0,m.$patchStyleText)(e,t)})})}function Z(e){e.update(()=>{let e=(0,n.$getSelection)();(0,n.$isRangeSelection)(e)&&((0,m.$patchStyleText)(e,{"background-color":null,color:null,"font-family":null,"font-size":null}),[`bold`,`italic`,`strikethrough`,`underline`].forEach(t=>{e.hasFormat(t)&&e.formatText(t)}))})}function re(){let[e]=(0,h.useLexicalComposerContext)(),[t,n]=(0,d.useState)(!1),[r,i]=(0,d.useState)(null),a=I(),o=L(e=>e.toolbar),s=o.backgroundColor,c=t=>{X(e,{"background-color":t||null}),a(M({...o,backgroundColor:t}))};return(0,g.jsx)(_.Dropdown,{menu:{items:[{key:`none`,label:(0,g.jsxs)(`button`,{className:`rj-editor-color-menu-item`,onClick:()=>{c(``),n(!1)},type:`button`,children:[(0,g.jsx)(`span`,{className:`rj-editor-color-none`}),`None`]})},...T.map(e=>({key:e,label:(0,g.jsxs)(`button`,{className:`rj-editor-color-menu-item`,onClick:()=>{c(e),n(!1)},type:`button`,children:[(0,g.jsx)(`span`,{className:`rj-editor-color-swatch`,style:{backgroundColor:e}}),e]})})),{type:`divider`},{key:`more-colors`,label:(0,g.jsxs)(`label`,{className:`rj-editor-color-menu-item`,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),children:[(0,g.jsx)(`span`,{className:`rj-editor-color-swatch`,style:{backgroundColor:s||T[0]}}),`More colors`,(0,g.jsx)(`input`,{"aria-label":`More background colors`,className:`rj-editor-color-menu-input`,onChange:e=>{c(e.target.value),i(e.target.value),n(!0)},onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),type:`color`,value:s||T[0]})]})}]},onOpenChange:t=>{n(t),!t&&r&&(window.setTimeout(()=>{X(e,{"background-color":r})}),i(null))},open:t,trigger:[`click`],children:(0,g.jsx)(`button`,{"aria-label":`Background color`,className:`rj-editor-color-button`,type:`button`,children:(0,g.jsx)(`span`,{className:s?`rj-editor-background-color-mark`:`rj-editor-background-color-mark is-none`,style:s?{backgroundColor:s}:void 0,children:`Bg`})})})}function ie(e){return(0,g.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,g.jsx)(`path`,{d:`M18 6L6 18M6 6L18 18`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function ae(){let[e]=(0,h.useLexicalComposerContext)(),t=I();return(0,g.jsx)(`button`,{"aria-label":`Clear formatting`,onClick:()=>{Z(e),t(N({isBold:!1,isItalic:!1,isStrikethrough:!1,isUnderline:!1})),t(M({backgroundColor:D.backgroundColor,fontFamily:D.fontFamily,fontSize:D.fontSize,textColor:D.textColor}))},type:`button`,className:`rj-editor-toolbar--clear-btn`,children:(0,g.jsx)(ie,{})})}function Q(e){return(0,g.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,g.jsx)(`path`,{d:`M6 9L12 15L18 9`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function oe(){let[e]=(0,h.useLexicalComposerContext)(),t=I(),n=L(e=>e.toolbar);return console.log(n.fontFamily),(0,g.jsx)(_.Select,{"aria-label":`Font family`,className:`rj-editor-toolbar-select rj-editor-toolbar-select-font`,onChange:(r=``)=>{X(e,{"font-family":r||null}),t(M({...n,fontFamily:r}))},options:E.map(e=>({label:e,value:e})),placeholder:`Font`,popupMatchSelectWidth:!1,size:`small`,value:n.fontFamily==``?void 0:n.fontFamily,suffixIcon:(0,g.jsx)(Q,{})})}function se(){let[e]=(0,h.useLexicalComposerContext)(),t=I(),n=L(e=>e.toolbar);return(0,g.jsx)(_.Select,{"aria-label":`Font size`,className:`rj-editor-toolbar-select`,onChange:(r=``)=>{X(e,{"font-size":r||null}),t(M({...n,fontSize:r}))},options:te.map(e=>({label:e.replace(`px`,``),value:e})),placeholder:`Size`,popupMatchSelectWidth:!1,size:`small`,value:n.fontSize==``?void 0:n.fontSize,suffixIcon:(0,g.jsx)(Q,{})})}function ce(){let[e]=(0,h.useLexicalComposerContext)(),[t,n]=(0,d.useState)(!1),[r,i]=(0,d.useState)(null),a=I(),o=L(e=>e.toolbar),s=o.textColor,c=t=>{X(e,{color:t||null}),a(M({...o,textColor:t}))};return(0,g.jsx)(_.Dropdown,{menu:{items:[{key:`none`,label:(0,g.jsxs)(`button`,{className:`rj-editor-color-menu-item`,onClick:()=>{c(``),n(!1)},type:`button`,children:[(0,g.jsx)(`span`,{className:`rj-editor-color-none`}),`None`]})},...O.map(e=>({key:e,label:(0,g.jsxs)(`button`,{className:`rj-editor-color-menu-item`,onClick:()=>{c(e),n(!1)},type:`button`,children:[(0,g.jsx)(`span`,{className:`rj-editor-color-swatch`,style:{backgroundColor:e}}),e]})})),{type:`divider`},{key:`more-colors`,label:(0,g.jsxs)(`label`,{className:`rj-editor-color-menu-item`,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),children:[(0,g.jsx)(`span`,{className:`rj-editor-color-swatch`,style:{backgroundColor:s||O[0]}}),`More colors`,(0,g.jsx)(`input`,{"aria-label":`More text colors`,className:`rj-editor-color-menu-input`,onChange:e=>{c(e.target.value),i(e.target.value),n(!0)},onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),type:`color`,value:s||O[0]})]})}]},onOpenChange:t=>{n(t),!t&&r&&(window.setTimeout(()=>{X(e,{color:r})}),i(null))},open:t,trigger:[`click`],children:(0,g.jsx)(`button`,{"aria-label":`Text color`,className:`rj-editor-color-button`,type:`button`,children:(0,g.jsxs)(`span`,{className:`rj-editor-text-color-mark`,children:[`A`,(0,g.jsx)(`span`,{className:`rj-editor-text-color-line`,style:{backgroundColor:s||`currentColor`}})]})})})}function le(){return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(se,{}),(0,g.jsx)(oe,{}),(0,g.jsx)(ce,{}),(0,g.jsx)(re,{}),(0,g.jsx)(ae,{})]})}function ue(e){return(0,g.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,g.jsx)(`path`,{d:`M6 16C6 18.2091 7.79086 20 10 20H14C16.2091 20 18 18.2091 18 16C18 13.7909 16.2091 12 14 12M18 8C18 5.79086 16.2091 4 14 4H10C7.79086 4 6 5.79086 6 8M3 12H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function de(e){return(0,g.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,g.jsx)(`path`,{d:`M6 12H14C16.2091 12 18 10.2091 18 8C18 5.79086 16.2091 4 14 4H6V12ZM6 12H15C17.2091 12 19 13.7909 19 16C19 18.2091 17.2091 20 15 20H6V12Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function fe(e){return(0,g.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,g.jsx)(`path`,{d:`M19 4H10M14 20H5M15 4L9 20`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function pe(e){return(0,g.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,g.jsx)(`path`,{d:`M18 4V11C18 14.3137 15.3137 17 12 17C8.68629 17 6 14.3137 6 11V4M4 21H20`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function $(){let[e]=(0,h.useLexicalComposerContext)(),{isBold:t,isItalic:r,isStrikethrough:i,isUnderline:a}=L(e=>e.toolbar);return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`button`,{"aria-pressed":t,className:t?`is-active`:void 0,onClick:()=>e.dispatchCommand(n.FORMAT_TEXT_COMMAND,`bold`),type:`button`,children:(0,g.jsx)(de,{})}),(0,g.jsx)(`button`,{"aria-pressed":r,className:r?`is-active`:void 0,onClick:()=>e.dispatchCommand(n.FORMAT_TEXT_COMMAND,`italic`),type:`button`,children:(0,g.jsx)(fe,{})}),(0,g.jsx)(`button`,{"aria-pressed":a,className:a?`is-active`:void 0,onClick:()=>e.dispatchCommand(n.FORMAT_TEXT_COMMAND,`underline`),type:`button`,children:(0,g.jsx)(pe,{})}),(0,g.jsx)(`button`,{"aria-label":`Strikethrough`,"aria-pressed":i,className:i?`is-active`:void 0,onClick:()=>e.dispatchCommand(n.FORMAT_TEXT_COMMAND,`strikethrough`),type:`button`,children:(0,g.jsx)(ue,{"aria-hidden":`true`})})]})}function me(){let[e]=(0,h.useLexicalComposerContext)(),t=I();return d.default.useEffect(()=>{let r=e.registerCommand(n.SELECTION_CHANGE_COMMAND,()=>(e.getEditorState().read(()=>{let e=(0,n.$getSelection)();(0,n.$isRangeSelection)(e)&&(t(N({isBold:e.hasFormat(`bold`),isItalic:e.hasFormat(`italic`),isStrikethrough:e.hasFormat(`strikethrough`),isUnderline:e.hasFormat(`underline`)})),t(M({backgroundColor:(0,m.$getSelectionStyleValueForProperty)(e,`background-color`,``),fontFamily:(0,m.$getSelectionStyleValueForProperty)(e,`font-family`,``),fontSize:(0,m.$getSelectionStyleValueForProperty)(e,`font-size`,``),textColor:(0,m.$getSelectionStyleValueForProperty)(e,`color`,``)})))}),!1),n.COMMAND_PRIORITY_LOW),i=e.registerCommand(n.CAN_UNDO_COMMAND,e=>(t(j(e)),!1),n.COMMAND_PRIORITY_LOW),a=e.registerCommand(n.CAN_REDO_COMMAND,e=>(t(A(e)),!1),n.COMMAND_PRIORITY_LOW);return()=>{r(),i(),a()}},[t,e]),(0,g.jsxs)(`div`,{className:`rj-editor-toolbar`,"aria-label":`Editor toolbar`,children:[(0,g.jsx)(K,{editor:e}),(0,g.jsx)(U,{}),(0,g.jsx)($,{}),(0,g.jsx)(U,{}),(0,g.jsx)(le,{}),(0,g.jsx)(U,{}),(0,g.jsx)(Y,{editor:e}),(0,g.jsx)(U,{}),(0,g.jsx)(H,{editor:e})]})}var he={paragraph:`rj-editor-paragraph`,text:{bold:`rj-editor-text-bold`,italic:`rj-editor-text-italic`,strikethrough:`rj-editor-text-strikethrough`,underline:`rj-editor-text-underline`},list:{ol:`rj-editor-list-ol`,ul:`rj-editor-list-ul`,listitem:`rj-editor-list-item`}};function ge(e,n,r){r&&e.read(()=>{r({editorState:e,html:(0,t.$generateHtmlFromNodes)(n),json:JSON.stringify(e.toJSON())})})}function _e({autofocus:e=!1,className:t,namespace:n=`RJEditor`,onChange:p,placeholder:m=`Matn yozing...`}){return(0,g.jsx)(f.Provider,{store:(0,d.useMemo)(()=>F(),[]),children:(0,g.jsx)(o.LexicalComposer,{initialConfig:{namespace:n,nodes:[r.ListNode,r.ListItemNode],onError(e){throw e},theme:he},children:(0,g.jsxs)(`div`,{className:[`rj-editor`,t].filter(Boolean).join(` `),children:[(0,g.jsx)(me,{}),(0,g.jsxs)(`div`,{className:`rj-editor-body`,children:[(0,g.jsx)(u.RichTextPlugin,{contentEditable:(0,g.jsx)(a.ContentEditable,{className:`rj-editor-input`}),ErrorBoundary:s.LexicalErrorBoundary,placeholder:(0,g.jsx)(`div`,{className:`rj-editor-placeholder`,children:m})}),(0,g.jsx)(c.HistoryPlugin,{}),(0,g.jsx)(ee.ListPlugin,{}),(0,g.jsx)(l.OnChangePlugin,{onChange:(e,t)=>ge(e,t,p)}),e?(0,g.jsx)(i.AutoFocusPlugin,{}):null]})]})})})}e.RJTextEditor=_e});
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`@lexical/react/LexicalComposer`),require(`antd`),require(`react`),require(`react-redux`),require(`@reduxjs/toolkit`),require(`lexical`),require(`react/jsx-runtime`),require(`@lexical/utils`),require(`@lexical/list`),require(`@lexical/html`),require(`@lexical/selection`),require(`@lexical/react/LexicalComposerContext`),require(`@lexical/react/LexicalAutoFocusPlugin`),require(`@lexical/react/LexicalContentEditable`),require(`@lexical/react/LexicalErrorBoundary`),require(`@lexical/react/LexicalHistoryPlugin`),require(`@lexical/react/LexicalListPlugin`),require(`@lexical/react/LexicalOnChangePlugin`),require(`@lexical/react/LexicalRichTextPlugin`),require(`react-dom`)):typeof define==`function`&&define.amd?define([`exports`,`@lexical/react/LexicalComposer`,`antd`,`react`,`react-redux`,`@reduxjs/toolkit`,`lexical`,`react/jsx-runtime`,`@lexical/utils`,`@lexical/list`,`@lexical/html`,`@lexical/selection`,`@lexical/react/LexicalComposerContext`,`@lexical/react/LexicalAutoFocusPlugin`,`@lexical/react/LexicalContentEditable`,`@lexical/react/LexicalErrorBoundary`,`@lexical/react/LexicalHistoryPlugin`,`@lexical/react/LexicalListPlugin`,`@lexical/react/LexicalOnChangePlugin`,`@lexical/react/LexicalRichTextPlugin`,`react-dom`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.RJEditor={},e.LexicalReactComposer,e.antd,e.React,e.ReactRedux,e.RTK,e.Lexical,e.jsxRuntime,e.LexicalUtils,e.LexicalList,e.LexicalHtml,e.LexicalSelection,e.LexicalReactComposerContext,e.LexicalReactAutoFocusPlugin,e.LexicalReactContentEditable,e.LexicalReactErrorBoundary,e.LexicalReactHistoryPlugin,e.LexicalReactListPlugin,e.LexicalReactOnChangePlugin,e.LexicalReactRichTextPlugin,e.ReactDOM))})(this,function(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var x=Object.create,S=Object.defineProperty,C=Object.getOwnPropertyDescriptor,ee=Object.getOwnPropertyNames,te=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,ne=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=ee(t),a=0,o=i.length,s;a<o;a++)s=i[a],!w.call(e,s)&&s!==n&&S(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=C(t,s))||r.enumerable});return e};r=((e,t,n)=>(n=e==null?{}:x(te(e)),ne(t||!e||!e.__esModule?S(n,`default`,{value:e,enumerable:!0}):n,e)))(r,1);var re=[`#FFFFFF`,`#FEF3C7`,`#DBEAFE`,`#DCFCE7`,`#FCE7F3`,`#EDE9FE`,`#E5E7EB`],ie=`rj-editor-equation-insert`,ae=[{label:`Fraction`,snippet:`rj-equation:fraction`,value:String.raw`\frac{x}{y}`},{label:`Script`,snippet:String.raw`x^{2}`,value:String.raw`e^{x}`},{label:`Radical`,snippet:String.raw`\sqrt{x}`,value:String.raw`\sqrt{x}`},{label:`Integral`,snippet:String.raw`\int_a^b f(x)\,dx`,value:String.raw`\int_a^b`},{label:`Large operator`,snippet:String.raw`\sum_{i=1}^{n} i`,value:String.raw`\sum_{i=0}^{n}`},{label:`Bracket`,snippet:String.raw`\left( x \right)`,value:String.raw`\left(\right)`},{label:`Matrix`,snippet:String.raw`\begin{bmatrix} a & b \\ c & d \end{bmatrix}`,value:String.raw`\begin{matrix}a&b\\c&d\end{matrix}`},{label:`Chemistry`,snippet:String.raw`\ce{H2O}`,value:String.raw`\ce{}`}],oe=[`±`,`∞`,`=`,`≠`,`~`,`×`,`÷`,`!`,`∝`,`<`,`≤`,`≥`,`≈`,`≡`,`∀`,`∂`,`√`,`∛`,`∜`,`∪`,`∩`,`∅`,`%`,`°`],se=[`Arial`,`Georgia`,`Inter`,`Times New Roman`,`Trebuchet MS`,`Verdana`],ce=[`8px`,`9px`,`11px`,`12px`,`14px`,`16px`,`18px`,`20px`,`24px`,`32px`,`48px`,`72px`],le={alignment:``,backgroundColor:``,canRedo:!1,canUndo:!1,fontFamily:void 0,fontSize:void 0,isEquationSelected:!1,isBold:!1,isImageSelected:!1,isItalic:!1,isStrikethrough:!1,isSubscript:!1,isSuperscript:!1,isUnderline:!1,isInTable:!1,lineHeight:void 0,listType:void 0,selectedImageAlignment:void 0,selectedImageAltText:void 0,selectedImageAspectRatioLocked:void 0,selectedImageBorderEnabled:void 0,selectedImageBorderRadius:void 0,selectedImageCaption:void 0,selectedImageHeight:void 0,selectedImageKey:void 0,selectedImageLinkUrl:void 0,selectedImageObjectFit:void 0,selectedImageRotation:void 0,selectedImageShadowEnabled:void 0,selectedImageTextWrap:void 0,selectedImageWidth:void 0,selectedEquation:void 0,selectedEquationDisplayMode:void 0,selectedEquationKey:void 0,selectedTableCellsCount:0,tableCellBackgroundColor:``,tableCellVerticalAlign:void 0,tableHasMergedCell:!1,textColor:``},ue=(0,o.createCommand)(`INSERT_EQUATION_COMMAND`),de=(0,o.createCommand)(`INSERT_IMAGE_COMMAND`),fe=(0,o.createCommand)(`INSERT_YOUTUBE_COMMAND`),pe=[`1`,`1.15`,`1.5`,`2`,`2.5`,`3`],me=`rj-editor:open-link-modal`,he=[`#111827`,`#dc2626`,`#2563eb`,`#059669`,`#9333ea`,`#ca8a04`],ge=(0,a.createSlice)({name:`toolbar`,initialState:le,reducers:{setCanRedo(e,t){e.canRedo=t.payload},setCanUndo(e,t){e.canUndo=t.payload},setTextFormats(e,t){e.isBold=t.payload.isBold,e.isItalic=t.payload.isItalic,e.isStrikethrough=t.payload.isStrikethrough,e.isSubscript=t.payload.isSubscript,e.isSuperscript=t.payload.isSuperscript,e.isUnderline=t.payload.isUnderline},setStyleFormats(e,t){e.backgroundColor=t.payload.backgroundColor,e.fontFamily=t.payload.fontFamily,e.fontSize=t.payload.fontSize,e.lineHeight=t.payload.lineHeight,e.textColor=t.payload.textColor},setBlockFormats(e,t){e.alignment=t.payload.alignment,e.listType=t.payload.listType},setTableFormats(e,t){e.isInTable=t.payload.isInTable,e.selectedTableCellsCount=t.payload.selectedTableCellsCount,e.tableCellBackgroundColor=t.payload.tableCellBackgroundColor,e.tableCellVerticalAlign=t.payload.tableCellVerticalAlign,e.tableHasMergedCell=t.payload.tableHasMergedCell},setEquationFormats(e,t){e.isEquationSelected=t.payload.isEquationSelected,e.selectedEquation=t.payload.selectedEquation,e.selectedEquationDisplayMode=t.payload.selectedEquationDisplayMode,e.selectedEquationKey=t.payload.selectedEquationKey},setImageFormats(e,t){e.isImageSelected=t.payload.isImageSelected,e.selectedImageAlignment=t.payload.selectedImageAlignment,e.selectedImageAltText=t.payload.selectedImageAltText,e.selectedImageAspectRatioLocked=t.payload.selectedImageAspectRatioLocked,e.selectedImageBorderEnabled=t.payload.selectedImageBorderEnabled,e.selectedImageBorderRadius=t.payload.selectedImageBorderRadius,e.selectedImageCaption=t.payload.selectedImageCaption,e.selectedImageHeight=t.payload.selectedImageHeight,e.selectedImageKey=t.payload.selectedImageKey,e.selectedImageLinkUrl=t.payload.selectedImageLinkUrl,e.selectedImageObjectFit=t.payload.selectedImageObjectFit,e.selectedImageRotation=t.payload.selectedImageRotation,e.selectedImageShadowEnabled=t.payload.selectedImageShadowEnabled,e.selectedImageTextWrap=t.payload.selectedImageTextWrap,e.selectedImageWidth=t.payload.selectedImageWidth}}}),{setBlockFormats:_e,setCanRedo:ve,setCanUndo:ye,setEquationFormats:be,setImageFormats:xe,setStyleFormats:Se,setTableFormats:Ce,setTextFormats:we}=ge.actions,Te=ge.reducer,Ee=()=>(0,a.configureStore)({reducer:{toolbar:Te}});Ee();var De=i.useDispatch.withTypes(),Oe=i.useSelector.withTypes(),ke={alerts:{imageSizeLimit:`Image size must be 5MB or less.`,onlyImages:`Only image files can be uploaded.`},common:{cancel:`Cancel`,close:`Close`,insert:`Insert`,moreColors:`More colors`,none:`None`,optional:`Optional`,save:`Save`},modal:{closeAriaLabel:`Close modal`},placeholders:{editor:`Write your article here...`},toolbar:{alignment:{center:`Align center`,justify:`Align justify`,left:`Align left`,right:`Align right`},fullscreen:{close:`Exit fullscreen`,open:`Open fullscreen`},history:{redo:`Redo`,undo:`Undo`},image:{alignCenter:`Align image center`,alignLeft:`Align image left`,alignRight:`Align image right`,alt:`Alt text`,altPlaceholder:`Describe this image`,border:`Border`,borderRadius:`Image border radius`,caption:`Caption`,captionPlaceholder:`Image caption`,cropMode:`Image crop mode`,delete:`Delete image`,editAlt:`Edit alt text`,editCaption:`Edit caption`,editLink:`Edit image link`,fitContain:`Contain`,fitCover:`Cover`,fitFill:`Fill`,link:`Link`,linkPlaceholder:`https://example.com`,replace:`Replace image`,rotateLeft:`Rotate left`,rotateRight:`Rotate right`,shadow:`Shadow`,squareWrap:`Square`,topBottomWrap:`Top and Bottom`,width:`Image width`},insert:{equation:`Equation`,horizontalLine:`Horizontal line`,image:`Image`,link:`Link`,table:`Table`,youtube:`YouTube`},link:{openInNewTab:`Open in new tab`,text:`Text`,textPlaceholder:`Link text`,title:`Title`,titlePlaceholder:`Optional`,url:`URL`,urlPlaceholder:`https://example.com`},list:{bullet:`Bulleted list`,numbered:`Numbered list`,remove:`Remove list`},spacing:{default:`Default`,lineAndParagraph:`Line and paragraph spacing`},shortcuts:{backgroundColor:`Background color`,bold:`Bold`,bulletList:`Bulleted list`,clearFormatting:`Clear formatting`,decreaseIndent:`Decrease indent`,fontFamily:`Font family`,fontSize:`Font size`,increaseIndent:`Increase indent`,italic:`Italic`,link:`Insert link`,numberedList:`Numbered list`,redo:`Redo`,removeList:`Remove list`,spacing:`Line spacing`,strikethrough:`Strikethrough`,subscript:`Subscript`,superscript:`Superscript`,textColor:`Text color`,underline:`Underline`,undo:`Undo`},style:{backgroundColor:`Background color`,clearFormatting:`Clear formatting`,fontFamily:`Font family`,fontFamilyPlaceholder:`Font`,fontSize:`Font size`,fontSizePlaceholder:`Size`,textColor:`Text color`},table:{alignBottom:`Align cell content to bottom`,alignMiddle:`Align cell content to middle`,alignTop:`Align cell content to top`,background:`Table cell background`,columns:`Columns`,deleteColumn:`Delete column`,deleteRow:`Delete row`,deleteTable:`Delete table`,headerColumn:`Header col`,headerRow:`Header row`,header:`Header`,insertColumnLeft:`Insert column left`,insertColumnRight:`Insert column right`,insertRowAbove:`Insert row above`,insertRowBelow:`Insert row below`,insertTable:`Insert table`,insertTableSize:`{columns}x{rows} Table`,mergeCells:`Merge selected cells`,columnLeft:`Col ←`,columnRight:`Col →`,rowAbove:`Row ↑`,rowBelow:`Row ↓`,column:`Col`,row:`Row`,rows:`Rows`,unmergeCell:`Unmerge selected cell`},tabs:{equation:`Equation`,home:`Home`,image:`Image`,insert:`Insert`,layout:`Layout`,table:`Table`},textFormat:{bold:`Bold`,italic:`Italic`,strikethrough:`Strikethrough`,subscript:`Subscript`,superscript:`Superscript`,underline:`Underline`},youtube:{invalidUrl:`YouTube link or video ID is invalid.`,title:`Title`,titlePlaceholder:`Optional`,url:`YouTube URL`,urlPlaceholder:`https://www.youtube.com/watch?v=...`}}};function Ae(e){return!e||typeof e!=`object`?e:Array.isArray(e)?e.map(e=>Ae(e)):Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Ae(t)]))}function je(e,...t){return t.reduce((e,t)=>(t&&Object.entries(t).forEach(([t,n])=>{let r=e[t];if(n&&typeof n==`object`&&!Array.isArray(n)&&r&&typeof r==`object`){e[t]=je(r,n);return}e[t]=n}),e),Ae(e))}var Me=je(ke,{alerts:{imageSizeLimit:`Размер изображения должен быть не больше 5MB.`,onlyImages:`Можно загружать только изображения.`},common:{cancel:`Отмена`,close:`Закрыть`,insert:`Вставить`,moreColors:`Больше цветов`,none:`Нет`,optional:`Необязательно`,save:`Сохранить`},modal:{closeAriaLabel:`Закрыть модальное окно`},placeholders:{editor:`Напишите текст здесь...`},toolbar:{fullscreen:{close:`Выйти из полноэкранного режима`,open:`Открыть на весь экран`},image:{border:`Граница`,caption:`Подпись`,captionPlaceholder:`Подпись к изображению`,cropMode:`Режим обрезки изображения`,delete:`Удалить изображение`,replace:`Заменить изображение`,shadow:`Тень`},insert:{equation:`Формула`,horizontalLine:`Горизонтальная линия`,image:`Изображение`,link:`Ссылка`,table:`Таблица`},link:{openInNewTab:`Открывать в новой вкладке`,text:`Текст`,textPlaceholder:`Текст ссылки`,titlePlaceholder:`Необязательно`},table:{columns:`Столбцы`,headerColumn:`Заголовок столбца`,headerRow:`Заголовок строки`,insertTable:`Вставить таблицу`,insertTableSize:`Таблица {columns}x{rows}`,rows:`Строки`},youtube:{invalidUrl:`Ссылка YouTube или video ID неверны.`,titlePlaceholder:`Необязательно`}}}),Ne=je(ke,{alerts:{imageSizeLimit:`Rasm hajmi 5MB yoki undan kichik bo‘lishi kerak.`,onlyImages:`Faqat rasm fayllarini yuklash mumkin.`},common:{cancel:`Bekor qilish`,close:`Yopish`,insert:`Qo‘shish`,moreColors:`Ko‘proq ranglar`,none:`Yo‘q`,optional:`Ixtiyoriy`,save:`Saqlash`},modal:{closeAriaLabel:`Modalni yopish`},placeholders:{editor:`Maqolangizni shu yerga yozing...`},toolbar:{fullscreen:{close:`To‘liq ekrandan chiqish`,open:`To‘liq ekranda ochish`},history:{redo:`Qaytarish`,undo:`Bekor qilish`},image:{alt:`Muqobil matn`,altPlaceholder:`Rasmni tasvirlab yozing`,border:`Chegara`,borderRadius:`Rasm burchak radiusi`,caption:`Izoh`,captionPlaceholder:`Rasm osti yozuvi`,cropMode:`Rasm ko‘rinish rejimi`,delete:`Rasmni o‘chirish`,editAlt:`Muqobil matnni tahrirlash`,editCaption:`Izohni tahrirlash`,editLink:`Rasm linkini tahrirlash`,fitContain:`Sig‘dirish`,fitCover:`Qoplash`,fitFill:`To‘ldirish`,replace:`Rasmni almashtirish`,rotateLeft:`Chapga aylantirish`,rotateRight:`O‘ngga aylantirish`,shadow:`Soya`,squareWrap:`Yonidan matn`,topBottomWrap:`Yuqori va pastdan`,width:`Rasm kengligi`},insert:{equation:`Formula`,horizontalLine:`Gorizontal chiziq`,image:`Rasm`,table:`Jadval`},link:{openInNewTab:`Yangi tabda ochish`,text:`Matn`,textPlaceholder:`Link matni`,titlePlaceholder:`Ixtiyoriy`},list:{bullet:`Nuqtali ro‘yxat`,numbered:`Raqamli ro‘yxat`,remove:`Ro‘yxatni olib tashlash`},spacing:{default:`Standart`,lineAndParagraph:`Qator va paragraf oralig‘i`},shortcuts:{backgroundColor:`Orqa fon rangi`,bold:`Qalin`,bulletList:`Nuqtali ro‘yxat`,clearFormatting:`Formatni tozalash`,decreaseIndent:`Chekinishni kamaytirish`,fontFamily:`Shrift`,fontSize:`O‘lcham`,increaseIndent:`Chekinishni oshirish`,italic:`Kursiv`,link:`Link qo‘shish`,numberedList:`Raqamli ro‘yxat`,redo:`Qaytarish`,removeList:`Ro‘yxatni olib tashlash`,spacing:`Qator oralig‘i`,strikethrough:`Ustidan chizish`,subscript:`Pastki indeks`,superscript:`Yuqori indeks`,textColor:`Matn rangi`,underline:`Tagiga chizish`,undo:`Bekor qilish`},style:{backgroundColor:`Orqa fon rangi`,clearFormatting:`Formatni tozalash`,fontFamily:`Shrift oilasi`,fontFamilyPlaceholder:`Shrift`,fontSize:`Shrift o‘lchami`,fontSizePlaceholder:`O‘lcham`,textColor:`Matn rangi`},table:{alignBottom:`Katak matnini pastga tekislash`,alignMiddle:`Katak matnini o‘rtaga tekislash`,alignTop:`Katak matnini yuqoriga tekislash`,background:`Katak orqa fon rangi`,columns:`Ustunlar`,deleteColumn:`Ustunni o‘chirish`,deleteRow:`Qatorni o‘chirish`,deleteTable:`Jadvalni o‘chirish`,headerColumn:`Sarlavha ustuni`,headerRow:`Sarlavha qatori`,header:`Sarlavha`,insertColumnLeft:`Chapga ustun qo‘shish`,insertColumnRight:`O‘ngga ustun qo‘shish`,insertRowAbove:`Yuqoriga qator qo‘shish`,insertRowBelow:`Pastga qator qo‘shish`,insertTable:`Jadval qo‘shish`,insertTableSize:`{columns}x{rows} jadval`,mergeCells:`Birlashtirish`,columnLeft:`Ustun ←`,columnRight:`Ustun →`,rowAbove:`Qator ↑`,rowBelow:`Qator ↓`,column:`Ustun`,row:`Qator`,rows:`Qatorlar`,unmergeCell:`Ajratish`},tabs:{equation:`Formula`,home:`Asosiy`,image:`Rasm`,insert:`Qo‘shish`,layout:`Joylashuv`,table:`Jadval`},textFormat:{bold:`Qalin`,italic:`Kursiv`,strikethrough:`Ustidan chizish`,subscript:`Pastki indeks`,superscript:`Yuqori indeks`,underline:`Tagiga chizish`},youtube:{invalidUrl:`YouTube link yoki video ID noto‘g‘ri.`,titlePlaceholder:`Ixtiyoriy`}}}),Pe=r.default.createContext(Ne),Fe={en:ke,ru:Me,uz:Ne};function Ie({children:e,locale:t=`uz`,locales:n,translations:i}){let a=r.default.useMemo(()=>je(Fe[t]||ke,n?.[t],i),[t,n,i]);return(0,s.jsx)(Pe.Provider,{value:a,children:e})}function T(){return r.default.useContext(Pe)}var Le=Symbol.for(`preact-signals`);function Re(){if(Ue>1)return void Ue--;let e,t=!1;for(function(){let e=He;for(He=void 0;e!==void 0;)e.S.v===e.v&&(e.S.i=e.i),e=e.o}();Be!==void 0;){let n=Be;for(Be=void 0,We++;n!==void 0;){let r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&Ze(n))try{n.c()}catch(n){t||=(e=n,!0)}n=r}}if(We=0,Ue--,t)throw e}function ze(e){if(Ue>0)return e();Ke=++Ge,Ue++;try{return e()}finally{Re()}}var E,Be;function Ve(e){let t=E;E=void 0;try{return e()}finally{E=t}}var He,Ue=0,We=0,Ge=0,Ke=0,qe=0;function Je(e){if(E===void 0)return;let t=e.n;return t===void 0||t.t!==E?(t={i:0,S:e,p:E.s,n:void 0,t:E,e:void 0,x:void 0,r:t},E.s!==void 0&&(E.s.n=t),E.s=t,e.n=t,32&E.f&&e.S(t),t):t.i===-1?(t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=E.s,t.n=void 0,E.s.n=t,E.s=t),t):void 0}function Ye(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}function Xe(e,t){return new Ye(e,t)}function Ze(e){for(let t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Qe(e){for(let t=e.s;t!==void 0;t=t.n){let n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function $e(e){let t,n=e.s;for(;n!==void 0;){let e=n.p;n.i===-1?(n.S.U(n),e!==void 0&&(e.n=n.n),n.n!==void 0&&(n.n.p=e)):t=n,n.S.n=n.r,n.r!==void 0&&(n.r=void 0),n=e}e.s=t}function et(e,t){Ye.call(this,void 0),this.x=e,this.s=void 0,this.g=qe-1,this.f=4,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}function tt(e,t){return new et(e,t)}function nt(e){let t=e.m;if(e.m=void 0,typeof t==`function`){Ue++;let n=E;E=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,rt(e),t}finally{E=n,Re()}}}function rt(e){for(let t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,nt(e)}function it(e){if(E!==this)throw Error(`Out-of-order effect`);$e(this),E=e,this.f&=-2,8&this.f&&rt(this),Re()}function at(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name}function ot(e,t){let n=new at(e,t);try{n.c()}catch(e){throw n.d(),e}let r=n.d.bind(n);return r[Symbol.dispose]=r,r}function st(e,t={}){let n={};for(let r in e){let i=t[r];n[r]=Xe(i===void 0?e[r]:i)}return n}Ye.prototype.brand=Le,Ye.prototype.h=function(){return!0},Ye.prototype.S=function(e){let t=this.t;t!==e&&e.e===void 0&&(e.x=t,this.t=e,t===void 0?Ve(()=>{var e;(e=this.W)==null||e.call(this)}):t.e=e)},Ye.prototype.U=function(e){if(this.t!==void 0){let t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n,n===void 0&&Ve(()=>{var e;(e=this.Z)==null||e.call(this)}))}},Ye.prototype.subscribe=function(e){return ot(()=>{let t=this.value,n=E;E=void 0;try{e(t)}finally{E=n}},{name:`sub`})},Ye.prototype.valueOf=function(){return this.value},Ye.prototype.toString=function(){return this.value+``},Ye.prototype.toJSON=function(){return this.value},Ye.prototype.peek=function(){let e=E;E=void 0;try{return this.value}finally{E=e}},Object.defineProperty(Ye.prototype,`value`,{get(){let e=Je(this);return e!==void 0&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(We>100)throw Error(`Cycle detected`);(function(e){Ue!==0&&We===0&&e.l!==Ke&&(e.l=Ke,He={S:e,v:e.v,i:e.i,o:He})})(this),this.v=e,this.i++,qe++,Ue++;try{for(let e=this.t;e!==void 0;e=e.x)e.t.N()}finally{Re()}}}}),et.prototype=new Ye,et.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===qe))return!0;if(this.g=qe,this.f|=1,this.i>0&&!Ze(this))return this.f&=-2,!0;let e=E;try{Qe(this),E=this;let e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return E=e,$e(this),this.f&=-2,!0},et.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(let e=this.s;e!==void 0;e=e.n)e.S.S(e)}Ye.prototype.S.call(this,e)},et.prototype.U=function(e){if(this.t!==void 0&&(Ye.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(let e=this.s;e!==void 0;e=e.n)e.S.U(e)}},et.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(et.prototype,`value`,{get(){if(1&this.f)throw Error(`Cycle detected`);let e=Je(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),at.prototype.c=function(){let e=this.S();try{if(8&this.f||this.x===void 0)return;let e=this.x();typeof e==`function`&&(this.m=e)}finally{e()}},at.prototype.S=function(){if(1&this.f)throw Error(`Cycle detected`);this.f|=1,this.f&=-9,nt(this),Qe(this),Ue++;let e=E;return E=this,it.bind(this,e)},at.prototype.N=function(){2&this.f||(this.f|=2,this.u=Be,Be=this)},at.prototype.d=function(){this.f|=8,1&this.f||rt(this)},at.prototype.dispose=function(){this.d()},(0,o.defineExtension)({build:(e,t,n)=>st(t),config:(0,o.safeCast)({defaultSelection:`rootEnd`,disabled:!1}),name:`@lexical/extension/AutoFocus`,register(e,t,n){let r=n.getOutput();return ot(()=>r.disabled.value?void 0:e.registerRootListener(t=>{e.focus(()=>{let e=document.activeElement;t===null||e!==null&&t.contains(e)||t.focus({preventScroll:!0})},{defaultSelection:r.defaultSelection.peek()})}))}});function ct(){let e=(0,o.$getRoot)(),t=(0,o.$getSelection)(),n=(0,o.$createParagraphNode)();e.clear(),e.append(n),t!==null&&n.select(),(0,o.$isRangeSelection)(t)&&(t.format=0)}function lt(e,t=ct){return e.registerCommand(o.CLEAR_EDITOR_COMMAND,n=>(e.update(t),!0),o.COMMAND_PRIORITY_EDITOR)}(0,o.defineExtension)({build:(e,t,n)=>st(t),config:(0,o.safeCast)({$onClear:ct}),name:`@lexical/extension/ClearEditor`,register(e,t,n){let{$onClear:r}=n.getOutput();return ot(()=>lt(e,r.value))}});function ut(e){return(typeof e.nodes==`function`?e.nodes():e.nodes)||[]}var dt=(0,o.createState)(`format`,{parse:e=>typeof e==`number`?e:0}),ft=class extends o.DecoratorNode{$config(){return this.config(`decorator-text`,{extends:o.DecoratorNode,stateConfigs:[{flat:!0,stateConfig:dt}]})}getFormat(){return(0,o.$getState)(this,dt)}getFormatFlags(e,t){return(0,o.toggleTextFormatType)(this.getFormat(),e,t)}hasFormat(e){let t=o.TEXT_TYPE_TO_FORMAT[e];return(this.getFormat()&t)!==0}setFormat(e){return(0,o.$setState)(this,dt,e)}toggleFormat(e){let t=(0,o.toggleTextFormatType)(this.getFormat(),e,null);return this.setFormat(t)}isInline(){return!0}createDOM(){return document.createElement(`span`)}updateDOM(){return!1}};function pt(e){return e instanceof ft}(0,o.defineExtension)({name:`@lexical/extension/DecoratorText`,nodes:()=>[ft],register:(e,t,n)=>e.registerCommand(o.FORMAT_TEXT_COMMAND,e=>{let t=(0,o.$getSelection)();if((0,o.$isNodeSelection)(t)||(0,o.$isRangeSelection)(t))for(let n of t.getNodes())pt(n)&&n.toggleFormat(e);return!1},o.COMMAND_PRIORITY_LOW)});function mt(e,t){let n;return Xe(e(),{unwatched(){n&&=(n(),void 0)},watched(){this.value=e(),n=t(this)}})}var ht=(0,o.defineExtension)({build:e=>mt(()=>e.getEditorState(),t=>e.registerUpdateListener(e=>{t.value=e.editorState})),name:`@lexical/extension/EditorState`});function D(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function gt(e,t){if(e&&t&&!Array.isArray(t)&&typeof e==`object`&&typeof t==`object`){let n=e,r=t;for(let e in r)n[e]=gt(n[e],r[e]);return e}return t}var _t=0,vt=1,yt=2,bt=3,xt=4,St=5,Ct=6,wt=7;function Tt(e){return e.id===_t}function Et(e){return e.id===yt}function Dt(e){return function(e){return e.id===vt}(e)||D(305,String(e.id),String(vt)),Object.assign(e,{id:yt})}var Ot=new Set,kt=class{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(e,t){this.builder=e,this.extension=t,this.configs=new Set,this.state={id:_t}}mergeConfigs(){let e=this.extension.config||{},t=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):o.shallowMergeConfig;for(let n of this.configs)e=t(e,n);return e}init(e){let t=this.state;Et(t)||D(306,String(t.id));let n={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},r={...n,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},i=function(e,t,n){return Object.assign(e,{config:t,id:bt,registerState:n})}(t,this.mergeConfigs(),n),a;this.state=i,this.extension.init&&(a=this.extension.init(e,i.config,n)),this.state=function(e,t,n){return Object.assign(e,{id:xt,initResult:t,registerState:n})}(i,a,r)}build(e){let t=this.state,n;t.id!==xt&&D(307,String(t.id),String(St)),this.extension.build&&(n=this.extension.build(e,t.config,t.registerState));let r={...t.registerState,getOutput:()=>n,getSignal:this.getSignal.bind(this)};this.state=function(e,t,n){return Object.assign(e,{id:St,output:t,registerState:n})}(t,n,r)}register(e,t){this._signal=t;let n=this.state;n.id!==St&&D(308,String(n.id),String(St));let r=this.extension.register&&this.extension.register(e,n.config,n.registerState);return this.state=function(e){return Object.assign(e,{id:Ct})}(n),()=>{let e=this.state;e.id!==wt&&D(309,String(n.id),String(wt)),this.state=function(e){return Object.assign(e,{id:St})}(e),r&&r()}}afterRegistration(e){let t=this.state,n;return t.id!==Ct&&D(310,String(t.id),String(Ct)),this.extension.afterRegistration&&(n=this.extension.afterRegistration(e,t.config,t.registerState)),this.state=function(e){return Object.assign(e,{id:wt})}(t),n}getSignal(){return this._signal===void 0&&D(311),this._signal}getInitResult(){this.extension.init===void 0&&D(312,this.extension.name);let e=this.state;return function(e){return e.id>=xt}(e)||D(313,String(e.id),String(xt)),e.initResult}getInitPeer(e){let t=this.builder.extensionNameMap.get(e);return t?t.getExtensionInitDependency():void 0}getExtensionInitDependency(){let e=this.state;return function(e){return e.id>=bt}(e)||D(314,String(e.id),String(bt)),{config:e.config}}getPeer(e){let t=this.builder.extensionNameMap.get(e);return t?t.getExtensionDependency():void 0}getInitDependency(e){let t=this.builder.getExtensionRep(e);return t===void 0&&D(315,this.extension.name,e.name),t.getExtensionInitDependency()}getDependency(e){let t=this.builder.getExtensionRep(e);return t===void 0&&D(315,this.extension.name,e.name),t.getExtensionDependency()}getState(){let e=this.state;return function(e){return e.id>=wt}(e)||D(316,String(e.id),String(wt)),e}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||Ot}getPeerNameSet(){let e=this._peerNameSet;return e||(e=new Set((this.extension.peerDependencies||[]).map(([e])=>e)),this._peerNameSet=e),e}getExtensionDependency(){if(!this._dependency){let e=this.state;(function(e){return e.id>=St})(e)||D(317,this.extension.name),this._dependency={config:e.config,init:e.initResult,output:e.output}}return this._dependency}},At={tag:o.HISTORY_MERGE_TAG};function jt(){let e=(0,o.$getRoot)();e.isEmpty()&&e.append((0,o.$createParagraphNode)())}var Mt=(0,o.defineExtension)({config:(0,o.safeCast)({setOptions:At,updateOptions:At}),init:({$initialEditorState:e=jt})=>({$initialEditorState:e,initialized:!1}),afterRegistration(e,{updateOptions:t,setOptions:n},r){let i=r.getInitResult();if(!i.initialized){i.initialized=!0;let{$initialEditorState:r}=i;if((0,o.$isEditorState)(r))e.setEditorState(r,n);else if(typeof r==`function`)e.update(()=>{r(e)},t);else if(r&&(typeof r==`string`||typeof r==`object`)){let t=e.parseEditorState(r);e.setEditorState(t,n)}}return()=>{}},name:`@lexical/extension/InitialState`,nodes:[o.RootNode,o.TextNode,o.LineBreakNode,o.TabNode,o.ParagraphNode]}),Nt=Symbol.for(`@lexical/extension/LexicalBuilder`);function Pt(){}function Ft(e){throw e}function It(e){return Array.isArray(e)?e:[e]}var Lt=`0.44.0+prod.esm`,Rt=class e{roots;extensionNameMap;outgoingConfigEdges;incomingEdges;conflicts;_sortedExtensionReps;PACKAGE_VERSION;constructor(e){this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=Lt,this.roots=e;for(let t of e)this.addExtension(t)}static fromExtensions(t){let n=[It(Mt)];for(let e of t)n.push(It(e));return new e(n)}static maybeFromEditor(t){let n=t[Nt];return n&&(n.PACKAGE_VERSION!==Lt&&D(292,n.PACKAGE_VERSION,Lt),n instanceof e||D(293)),n}static fromEditor(t){let n=e.maybeFromEditor(t);return n===void 0&&D(294),n}constructEditor(){let{$initialEditorState:e,onError:t,...n}=this.buildCreateEditorArgs(),r=Object.assign((0,o.createEditor)({...n,...t?{onError:e=>{t(e,r)}}:{}}),{[Nt]:this});for(let e of this.sortedExtensionReps())e.build(r);return r}buildEditor(){let e=Pt;function t(){try{e()}finally{e=Pt}}let n=Object.assign(this.constructEditor(),{dispose:t,[Symbol.dispose]:t});return e=(0,o.mergeRegister)(this.registerEditor(n),()=>n.setRootElement(null)),n}hasExtensionByName(e){return this.extensionNameMap.has(e)}getExtensionRep(e){let t=this.extensionNameMap.get(e.name);if(t)return t.extension!==e&&D(295,e.name),t}addEdge(e,t,n){let r=this.outgoingConfigEdges.get(e);r?r.set(t,n):this.outgoingConfigEdges.set(e,new Map([[t,n]]));let i=this.incomingEdges.get(t);i?i.add(e):this.incomingEdges.set(t,new Set([e]))}addExtension(e){this._sortedExtensionReps!==void 0&&D(296);let[t]=It(e);typeof t.name!=`string`&&D(297,typeof t.name);let n=this.extensionNameMap.get(t.name);if(n!==void 0&&n.extension!==t&&D(298,t.name),!n){n=new kt(this,t),this.extensionNameMap.set(t.name,n);let e=this.conflicts.get(t.name);typeof e==`string`&&D(299,t.name,e);for(let e of t.conflictsWith||[])this.extensionNameMap.has(e)&&D(299,t.name,e),this.conflicts.set(e,t.name);for(let e of t.dependencies||[]){let n=It(e);this.addEdge(t.name,n[0].name,n.slice(1)),this.addExtension(n)}for(let[e,n]of t.peerDependencies||[])this.addEdge(t.name,e,n?[n]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;let e=[],t=(n,r)=>{let i=n.state;if(Et(i))return;let a=n.extension.name;var o;Tt(i)||D(300,a,r||`[unknown]`),Tt(o=i)||D(304,String(o.id),String(_t)),i=Object.assign(o,{id:vt}),n.state=i;let s=this.outgoingConfigEdges.get(a);if(s)for(let e of s.keys()){let n=this.extensionNameMap.get(e);n&&t(n,a)}i=Dt(i),n.state=i,e.push(n)};for(let e of this.extensionNameMap.values())Tt(e.state)&&t(e);for(let t of e)for(let[e,n]of this.outgoingConfigEdges.get(t.extension.name)||[])if(n.length>0){let t=this.extensionNameMap.get(e);if(t)for(let e of n)t.configs.add(e)}for(let[e,...t]of this.roots)if(t.length>0){let n=this.extensionNameMap.get(e.name);n===void 0&&D(301,e.name);for(let e of t)n.configs.add(e)}return this._sortedExtensionReps=e,this._sortedExtensionReps}registerEditor(e){let t=this.sortedExtensionReps(),n=new AbortController,r=[()=>n.abort()],i=n.signal;for(let n of t){let t=n.register(e,i);t&&r.push(t)}for(let n of t){let t=n.afterRegistration(e);t&&r.push(t)}return(0,o.mergeRegister)(...r)}buildCreateEditorArgs(){let e={},t=new Set,n=new Map,r=new Map,i={},a={},o=this.sortedExtensionReps();for(let s of o){let{extension:o}=s;if(o.onError!==void 0&&(e.onError=o.onError),o.disableEvents!==void 0&&(e.disableEvents=o.disableEvents),o.parentEditor!==void 0&&(e.parentEditor=o.parentEditor),o.editable!==void 0&&(e.editable=o.editable),o.namespace!==void 0&&(e.namespace=o.namespace),o.$initialEditorState!==void 0&&(e.$initialEditorState=o.$initialEditorState),o.nodes)for(let e of ut(o)){if(typeof e!=`function`){let t=n.get(e.replace);t&&D(302,o.name,e.replace.name,t.extension.name),n.set(e.replace,s)}t.add(e)}if(o.html){if(o.html.export)for(let[e,t]of o.html.export.entries())r.set(e,t);o.html.import&&Object.assign(i,o.html.import)}o.theme&&gt(a,o.theme)}Object.keys(a).length>0&&(e.theme=a),t.size&&(e.nodes=[...t]);let s=Object.keys(i).length>0,c=r.size>0;(s||c)&&(e.html={},s&&(e.html.import=i),c&&(e.html.export=r));for(let t of o)t.init(e);return e.onError||=Ft,e}};function zt(e,t){let n=Rt.fromEditor(e).getExtensionRep(t);return n===void 0&&D(303,t.name),n.getExtensionDependency()}var Bt=new Set,Vt=(0,o.defineExtension)({build(e,t,n){let r=n.getDependency(ht).output,i=Xe({watchedNodeKeys:new Map}),a=mt(()=>{},()=>ot(()=>{let e=a.peek(),{watchedNodeKeys:t}=i.value,n,s=!1;r.value.read(()=>{if((0,o.$getSelection)())for(let[r,i]of t.entries()){if(i.size===0){t.delete(r);continue}let a=(0,o.$getNodeByKey)(r),c=a&&a.isSelected()||!1;s||=c!==(!!e&&e.has(r)),c&&(n||=new Set,n.add(r))}}),!s&&n&&e&&n.size===e.size||(a.value=n)}));return{watchNodeKey:function(e){let t=tt(()=>(a.value||Bt).has(e)),{watchedNodeKeys:n}=i.peek(),r=n.get(e),o=r!==void 0;return r||=new Set,r.add(t),o||(n.set(e,r),i.value={watchedNodeKeys:n}),t}}},dependencies:[ht],name:`@lexical/extension/NodeSelection`}),Ht=(0,o.createCommand)(`INSERT_HORIZONTAL_RULE_COMMAND`),Ut=class e extends o.DecoratorNode{static getType(){return`horizontalrule`}static clone(t){return new e(t.__key)}static importJSON(e){return Gt().updateFromJSON(e)}static importDOM(){return{hr:()=>({conversion:Wt,priority:0})}}exportDOM(){return{element:document.createElement(`hr`)}}createDOM(e){let t=document.createElement(`hr`);return(0,o.addClassNamesToElement)(t,e.theme.hr),t}getTextContent(){return`
2
+ `}isInline(){return!1}updateDOM(){return!1}};function Wt(){return{node:Gt()}}function Gt(){return(0,o.$create)(Ut)}function Kt(e){return e instanceof Ut}(0,o.defineExtension)({dependencies:[ht,Vt],name:`@lexical/extension/HorizontalRule`,nodes:()=>[Ut],register(e,t,n){let{watchNodeKey:r}=n.getDependency(Vt).output,i=Xe({nodeSelections:new Map}),a=e._config.theme.hrSelected??`selected`;return(0,o.mergeRegister)(e.registerCommand(Ht,e=>{let t=(0,o.$getSelection)();return(0,o.$isRangeSelection)(t)?(t.focus.getNode()!==null&&(0,c.$insertNodeToNearestRoot)(Gt()),!0):!1},o.COMMAND_PRIORITY_EDITOR),e.registerCommand(o.CLICK_COMMAND,e=>{if((0,o.isDOMNode)(e.target)){let t=(0,o.$getNodeFromDOMNode)(e.target);if(Kt(t))return function(e,t=!1){let n=(0,o.$getSelection)(),r=e.isSelected(),i=e.getKey(),a;t&&(0,o.$isNodeSelection)(n)?a=n:(a=(0,o.$createNodeSelection)(),(0,o.$setSelection)(a)),r?a.delete(i):a.add(i)}(t,e.shiftKey),!0}return!1},o.COMMAND_PRIORITY_LOW),e.registerMutationListener(Ut,(t,n)=>{ze(()=>{let n=!1,{nodeSelections:a}=i.peek();for(let[i,o]of t.entries())if(o===`destroyed`)a.delete(i),n=!0;else{let t=a.get(i),o=e.getElementByKey(i);t?t.domNode.value=o:(n=!0,a.set(i,{domNode:Xe(o),selectedSignal:r(i)}))}n&&(i.value={nodeSelections:a})})}),ot(()=>{let e=[];for(let{domNode:t,selectedSignal:n}of i.value.nodeSelections.values())e.push(ot(()=>{let e=t.value;e&&(n.value?(0,o.addClassNamesToElement)(e,a):(0,o.removeClassNamesFromElement)(e,a))}));return(0,o.mergeRegister)(...e)}))}}),(0,o.defineExtension)({build:(e,t)=>st({inheritEditableFromParent:t.inheritEditableFromParent}),config:(0,o.safeCast)({$getParentEditor:function(){let e=(0,o.$getEditor)();return Rt.fromEditor(e),e},inheritEditableFromParent:!1}),init:(e,t,n)=>{let r=t.$getParentEditor();e.parentEditor=r,e.theme=e.theme||r._config.theme},name:`@lexical/extension/NestedEditor`,register:(e,t,n)=>ot(()=>{let t=e._parentEditor;if(t&&n.getOutput().inheritEditableFromParent.value)return e.setEditable(t.isEditable()),t.registerEditableListener(e.setEditable.bind(e))})}),(0,o.defineExtension)({build:(e,t,n)=>st(t),config:(0,o.safeCast)({disabled:!1,onReposition:void 0}),name:`@lexical/utils/SelectionAlwaysOnDisplay`,register:(e,t,n)=>{let r=n.getOutput();return ot(()=>{if(!r.disabled.value)return(0,c.selectionAlwaysOnDisplay)(e,r.onReposition.value)})}});function qt(e){return e.canBeEmpty()}function Jt(e,t,n=qt){return(0,o.mergeRegister)(e.registerCommand(o.KEY_TAB_COMMAND,t=>{let n=(0,o.$getSelection)();if(!(0,o.$isRangeSelection)(n))return!1;t.preventDefault();let r=function(e){if(e.getNodes().filter(e=>(0,o.$isBlockElementNode)(e)&&e.canIndent()).length>0)return!0;let t=e.anchor,n=e.focus,r=n.isBefore(t)?n:t,i=(0,c.$getNearestBlockElementAncestorOrThrow)(r.getNode());if(i.canIndent()){let e=i.getKey(),t=(0,o.$createRangeSelection)();if(t.anchor.set(e,0,`element`),t.focus.set(e,0,`element`),t=(0,o.$normalizeSelection__EXPERIMENTAL)(t),t.anchor.is(r))return!0}return!1}(n)?t.shiftKey?o.OUTDENT_CONTENT_COMMAND:o.INDENT_CONTENT_COMMAND:o.INSERT_TAB_COMMAND;return e.dispatchCommand(r,void 0)},o.COMMAND_PRIORITY_EDITOR),e.registerCommand(o.INDENT_CONTENT_COMMAND,()=>{let e=typeof t==`number`?t:t?t.peek():null;if(!(0,o.$isRangeSelection)((0,o.$getSelection)()))return!1;let r=typeof n==`function`?n:n.peek();return(0,c.$handleIndentAndOutdent)(t=>{if(r(t)){let n=t.getIndent()+1;(!e||n<e)&&t.setIndent(n)}})},o.COMMAND_PRIORITY_CRITICAL))}(0,o.defineExtension)({build:(e,t,n)=>st(t),config:(0,o.safeCast)({$canIndent:qt,disabled:!1,maxIndent:null}),name:`@lexical/extension/TabIndentation`,register(e,t,n){let{disabled:r,maxIndent:i,$canIndent:a}=n.getOutput();return ot(()=>{if(!r.value)return Jt(e,i,a)})}});var Yt=new Set([`http:`,`https:`,`mailto:`,`sms:`,`tel:`]),Xt=class e extends o.ElementNode{__url;__target;__rel;__title;static getType(){return`link`}static clone(t){return new e(t.__url,{rel:t.__rel,target:t.__target,title:t.__title},t.__key)}constructor(e=``,t={},n){super(n);let{target:r=null,rel:i=null,title:a=null}=t;this.__url=e,this.__target=r,this.__rel=i,this.__title=a}afterCloneFrom(e){super.afterCloneFrom(e),this.__url=e.__url,this.__rel=e.__rel,this.__target=e.__target,this.__title=e.__title}createDOM(e){let t=document.createElement(`a`);return this.updateLinkDOM(null,t,e),(0,c.addClassNamesToElement)(t,e.theme.link),t}updateLinkDOM(e,t,n){if((0,c.isHTMLAnchorElement)(t)){e&&e.__url===this.__url||(t.href=this.sanitizeUrl(this.__url));for(let n of[`target`,`rel`,`title`]){let r=`__${n}`,i=this[r];e&&e[r]===i||(i?t[n]=i:t.removeAttribute(n))}}}updateDOM(e,t,n){return this.updateLinkDOM(e,t,n),!1}static importDOM(){return{a:e=>({conversion:en,priority:1})}}static importJSON(e){return tn().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setURL(e.url).setRel(e.rel||null).setTarget(e.target||null).setTitle(e.title||null)}sanitizeUrl(e){e=dn(e);try{let t=new URL(dn(e));if(!Yt.has(t.protocol))return`about:blank`}catch{return e}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(e){let t=this.getWritable();return t.__url=e,t}getTarget(){return this.getLatest().__target}setTarget(e){let t=this.getWritable();return t.__target=e,t}getRel(){return this.getLatest().__rel}setRel(e){let t=this.getWritable();return t.__rel=e,t}getTitle(){return this.getLatest().__title}setTitle(e){let t=this.getWritable();return t.__title=e,t}insertNewAfter(e,t=!0){let n=(0,o.$copyNode)(this);return this.insertAfter(n,t),n}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,t,n){if(!(0,o.$isRangeSelection)(t))return!1;let r=t.anchor.getNode(),i=t.focus.getNode();return this.isParentOf(r)&&this.isParentOf(i)&&t.getTextContent().length>0}isEmailURI(){return this.__url.startsWith(`mailto:`)}isWebSiteURI(){return this.__url.startsWith(`https://`)||this.__url.startsWith(`http://`)}shouldMergeAdjacentLink(e){return this.getType()===e.getType()&&this.__url===e.__url&&this.__target===e.__target&&this.__rel===e.__rel&&this.__title===e.__title}};function Zt(e){let t=(0,o.$caretFromPoint)(e,`next`);return[t,t.getFlipped()]}function Qt(e,t){for(let n of t)if(n.origin.isAttached()){(0,o.$setPointFromCaret)(e,(0,o.$normalizeCaret)(n));return}}function $t(e){let t=(0,o.$getSelection)(),n=null,r=null;function i(){(0,o.$isRangeSelection)(t)&&(Qt(t.anchor,n),Qt(t.focus,r),(0,o.$normalizeSelection__EXPERIMENTAL)(t))}(0,o.$isRangeSelection)(t)&&(n=Zt(t.anchor),r=Zt(t.focus));let a=!1;for(let t of(0,o.$getChildCaret)(e,`next`)){let n=t.origin;if((0,o.$isElementNode)(n)&&!n.isInline()){let r=n.getChildren();if(r.length>0){let t=(0,o.$copyNode)(e);t.append(...r),n.append(t),a=!0}(0,c.$insertNodeToNearestRootAtCaret)(n,(0,o.$rewindSiblingCaret)(t),{$shouldSplit:()=>!1})}}function s(e,t,n){let[r,i]=e,a=e=>(0,o.$isSiblingCaret)(e)&&e.origin.is(t);if(!a(r)&&!a(i))return e;let s=(0,o.$normalizeCaret)((0,o.$getChildCaret)(n,`next`));return[s,s.getFlipped()]}if(e.isAttached()){let t=e.getPreviousSibling();if(nn(t)&&t.shouldMergeAdjacentLink(e))return n&&=s(n,t,e),r&&=s(r,t,e),t.append(...e.getChildren()),e.remove(),void i();let o=e.getNextSibling();nn(o)&&e.shouldMergeAdjacentLink(o)&&(n&&=s(n,e,o),r&&=s(r,e,o),e.append(...o.getChildren()),o.remove(),a=!0)}if(a){if(!e.canBeEmpty()&&e.isEmpty()){let t=e.getParent();e.remove(),t&&t.isEmpty()&&t.remove()}i()}}function en(e){let t=null;if((0,c.isHTMLAnchorElement)(e)){let n=e.textContent;(n!==null&&n!==``||e.children.length>0)&&(t=tn(e.getAttribute(`href`)||``,{rel:e.getAttribute(`rel`),target:e.getAttribute(`target`),title:e.getAttribute(`title`)}))}return{node:t}}function tn(e=``,t){return(0,o.$applyNodeReplacement)(new Xt(e,t))}function nn(e){return e instanceof Xt}var rn=class e extends Xt{__isUnlinked;constructor(e=``,t={},n){super(e,t,n),this.__isUnlinked=t.isUnlinked!==void 0&&t.isUnlinked!==null&&t.isUnlinked}afterCloneFrom(e){super.afterCloneFrom(e),this.__isUnlinked=e.__isUnlinked}static getType(){return`autolink`}static clone(t){return new e(t.__url,{isUnlinked:t.__isUnlinked,rel:t.__rel,target:t.__target,title:t.__title},t.__key)}shouldMergeAdjacentLink(e){return!1}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(e){let t=this.getWritable();return t.__isUnlinked=e,t}createDOM(e){return this.__isUnlinked?document.createElement(`span`):super.createDOM(e)}updateDOM(e,t,n){return super.updateDOM(e,t,n)||e.__isUnlinked!==this.__isUnlinked}static importJSON(e){return an().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setIsUnlinked(e.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(e,t=!0){let n=an(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(n,t),n}};function an(e=``,t){return(0,o.$applyNodeReplacement)(new rn(e,t))}function on(e){return e instanceof rn}var sn=(0,o.createCommand)(`TOGGLE_LINK_COMMAND`);function cn(e,t){if(e.type===`element`){let n=e.getNode();return(0,o.$isElementNode)(n)||function(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(252),n.getChildren()[e.offset+t]||null}return null}function ln(e,t={}){let n;if(e&&typeof e==`object`){let{url:r,...i}=e;n=r,t={...i,...t}}else n=e;let{target:r,title:i}=t,a=t.rel===void 0?`noreferrer`:t.rel,s=(0,o.$getSelection)();if(s===null||!(0,o.$isRangeSelection)(s)&&!(0,o.$isNodeSelection)(s))return;if((0,o.$isNodeSelection)(s)){let e=s.getNodes();if(e.length===0)return;e.forEach(e=>{if(n===null){let t=(0,c.$findMatchingParent)(e,e=>!on(e)&&nn(e));t&&(t.insertBefore(e),t.getChildren().length===0&&t.remove())}else{let t=(0,c.$findMatchingParent)(e,e=>!on(e)&&nn(e));if(t)t.setURL(n),r!==void 0&&t.setTarget(r),a!==void 0&&t.setRel(a);else{let t=tn(n,{rel:a,target:r});e.insertBefore(t),t.append(e)}}});return}if(s.isCollapsed()&&n===null)for(let e of s.getNodes()){let t=(0,c.$findMatchingParent)(e,e=>!on(e)&&nn(e));t!==null&&(t.getChildren().forEach(e=>{t.insertBefore(e)}),t.remove());return}let l=s.extract();if(n===null){let e=new Set;l.forEach(t=>{let n=(0,c.$findMatchingParent)(t,e=>!on(e)&&nn(e));if(n!==null){let t=n.getKey();if(e.has(t))return;(function(e,t){let n=new Set(t.filter(t=>e.isParentOf(t)).map(e=>e.getKey())),r=e.getChildren(),i=r=>n.has(r.getKey())||(0,o.$isElementNode)(r)&&t.some(t=>e.isParentOf(t)&&r.isParentOf(t)),a=r.filter(i);if(a.length===r.length)return r.forEach(t=>e.insertBefore(t)),void e.remove();let s=r.findIndex(i),c=r.findLastIndex(i),l=s===0,u=c===r.length-1;if(l)a.forEach(t=>e.insertBefore(t));else if(u)for(let t=a.length-1;t>=0;t--)e.insertAfter(a[t]);else{for(let t=a.length-1;t>=0;t--)e.insertAfter(a[t]);let t=r.slice(c+1);if(t.length>0){let n=(0,o.$copyNode)(e);a[a.length-1].insertAfter(n),t.forEach(e=>n.append(e))}}})(n,l),e.add(t)}});return}let u=new Set,d=e=>{u.has(e.getKey())||(u.add(e.getKey()),e.setURL(n),r!==void 0&&e.setTarget(r),a!==void 0&&e.setRel(a),i!==void 0&&e.setTitle(i))};if(l.length===1){let e=l[0],t=(0,c.$findMatchingParent)(e,nn);if(t!==null)return d(t)}(function(e){let t=(0,o.$getSelection)();if(!(0,o.$isRangeSelection)(t))return e();let n=(0,o.$normalizeSelection__EXPERIMENTAL)(t),r=n.isBackward(),i=cn(n.anchor,r?-1:0),a=cn(n.focus,r?0:-1);if(e(),i||a){let e=(0,o.$getSelection)();if((0,o.$isRangeSelection)(e)){let t=e.clone();if(i){let e=i.getParent();e&&t.anchor.set(e.getKey(),i.getIndexWithinParent()+ +!!r,`element`)}if(a){let e=a.getParent();e&&t.focus.set(e.getKey(),a.getIndexWithinParent()+ +!r,`element`)}(0,o.$setSelection)((0,o.$normalizeSelection__EXPERIMENTAL)(t))}}})(()=>{let e=null;for(let t of l){if(!t.isAttached())continue;let s=(0,c.$findMatchingParent)(t,nn);if(s){d(s);continue}if((0,o.$isElementNode)(t)){if(!t.isInline())continue;if(nn(t)){if(!(on(t)||e!==null&&e.getParentOrThrow().isParentOf(t))){d(t),e=t;continue}for(let e of t.getChildren())t.insertBefore(e);t.remove();continue}}let l=t.getPreviousSibling();nn(l)&&l.is(e)?l.append(t):(e=tn(n,{rel:a,target:r,title:i}),t.insertAfter(e),e.append(t))}})}var un=/^\+?[0-9\s()-]{5,}$/;function dn(e){return e.match(/^[a-z][a-z0-9+.-]*:/i)||e.match(/^[/#.]/)?e:e.includes(`@`)?`mailto:${e}`:un.test(e)?`tel:${e}`:`https://${e}`}function fn(e,t){return(0,c.mergeRegister)(e.registerNodeTransform(Xt,$t),e.registerCommand(sn,e=>{let n=t.validateUrl.peek(),r=t.attributes.peek();if(e===null)return ln(null),!0;if(typeof e==`string`)return!(n!==void 0&&!n(e))&&(ln(e,r),!0);{let{url:t,target:n,rel:i,title:a}=e;return ln(t,{...r,rel:i,target:n,title:a}),!0}},o.COMMAND_PRIORITY_EDITOR),ot(()=>{let n=t.validateUrl.value;if(!n)return;let r=t.attributes.value;return e.registerCommand(o.PASTE_COMMAND,t=>{let i=(0,o.$getSelection)();if(!(0,o.$isRangeSelection)(i)||i.isCollapsed()||!(0,c.objectKlassEquals)(t,ClipboardEvent)||t.clipboardData===null)return!1;let a=t.clipboardData.getData(`text`);return!!n(a)&&!i.getNodes().some(e=>(0,o.$isElementNode)(e))&&(e.dispatchCommand(sn,{...r,url:a}),t.preventDefault(),!0)},o.COMMAND_PRIORITY_LOW)}))}var pn=(0,o.defineExtension)({build:(e,t,n)=>st(t),config:{attributes:void 0,validateUrl:void 0},mergeConfig(e,t){let n=(0,o.shallowMergeConfig)(e,t);return e.attributes&&(n.attributes=(0,o.shallowMergeConfig)(e.attributes,n.attributes)),n},name:`@lexical/link/Link`,nodes:()=>[Xt],register:(e,t,n)=>fn(e,n.getOutput())});function mn(e,t,n={}){let r=n=>{let r=n.target;if(!(0,o.isDOMNode)(r))return;let i=(0,o.getNearestEditorFromDOMNode)(r);if(i===null)return;let a=null,s=null;if(i.update(()=>{let e=(0,o.$getNearestNodeFromDOMNode)(r);if(e!==null){let n=(0,c.$findMatchingParent)(e,o.$isElementNode);if(!t.disabled.peek())if(nn(n))a=n.sanitizeUrl(n.getURL()),s=n.getTarget();else{let e=function(e,t){let n=e;for(;n!=null;){if(t(n))return n;n=n.parentNode}return null}(r,c.isHTMLAnchorElement);e!==null&&(a=e.href,s=e.target)}}}),a===null||a===``)return;let l=e.getEditorState().read(o.$getSelection,{editor:e});if((0,o.$isRangeSelection)(l)&&!l.isCollapsed())return void n.preventDefault();let u=n.type===`auxclick`&&n.button===1;window.open(a,t.newTab.peek()||u||n.metaKey||n.ctrlKey||s===`_blank`?`_blank`:`_self`),n.preventDefault()},i=e=>{e.button===1&&r(e)};return e.registerRootListener(e=>{if(e)return e.addEventListener(`click`,r,n),e.addEventListener(`mouseup`,i,n),()=>{e.removeEventListener(`click`,r),e.removeEventListener(`mouseup`,i)}})}(0,o.defineExtension)({build:(e,t,n)=>st(t),config:(0,o.safeCast)({disabled:!1,newTab:!1}),dependencies:[pn],name:`@lexical/link/ClickableLink`,register:(e,t,n)=>mn(e,n.getOutput())});function hn(e,t){for(let n=0;n<t.length;n++){let r=t[n](e);if(r)return r}return null}var gn=/[.,;\s]/;function _n(e,t){return t.test(e)}function vn(e,t){return _n(e[e.length-1],t)}function yn(e,t){return _n(e[0],t)}function bn(e,t){let n=e.getPreviousSibling();return(0,o.$isElementNode)(n)&&(n=n.getLastDescendant()),n===null||(0,o.$isLineBreakNode)(n)||(0,o.$isTextNode)(n)&&vn(n.getTextContent(),t)}function xn(e,t){let n=e.getNextSibling();return(0,o.$isElementNode)(n)&&(n=n.getFirstDescendant()),n===null||(0,o.$isLineBreakNode)(n)||(0,o.$isTextNode)(n)&&yn(n.getTextContent(),t)}function Sn(e,t,n,r,i){return(e>0?_n(r[e-1],n):bn(i[0],n))?t<r.length?_n(r[t],n):xn(i[i.length-1],n):!1}function Cn(e,t,n){let r=[],i=[],a=[],o=0,s=0,c=[...e];for(;c.length>0;){let e=c[0],l=e.getTextContent().length,u=s;s+l<=t?(r.push(e),o+=l):u>=n?a.push(e):i.push(e),s+=l,c.shift()}return[o,r,i,a]}function wn(e,t,n,r){let i=an(r.url,r.attributes);if(e.length===1){let a,s=e[0];t===0?[a,s]=s.splitText(n):[,a,s]=s.splitText(t,n);let c=(0,o.$createTextNode)(r.text);return c.setFormat(a.getFormat()),c.setDetail(a.getDetail()),c.setStyle(a.getStyle()),i.append(c),a.replace(i),s}if(e.length>1){let r=e[0],a,s=r.getTextContent().length;t===0?a=r:[,a]=r.splitText(t);let c=[],l;for(let t=1;t<e.length;t++){let r=e[t],i=r.getTextContent().length,a=s;if(a<n)if(s+i<=n)c.push(r);else{let[e,t]=r.splitText(n-a);c.push(e),l=t}s+=i}let u=(0,o.$getSelection)(),d=u?u.getNodes().find(o.$isTextNode):void 0,f=(0,o.$createTextNode)(a.getTextContent());return f.setFormat(a.getFormat()),f.setDetail(a.getDetail()),f.setStyle(a.getStyle()),i.append(f,...c),d&&d===a&&((0,o.$isRangeSelection)(u)?f.select(u.anchor.offset,u.focus.offset):(0,o.$isNodeSelection)(u)&&f.select(0,f.getTextContent().length)),a.replace(i),l}}function Tn(e,t,n,r){let i=e.getChildren(),a=i.length;for(let t=0;t<a;t++){let r=i[t];if(!(0,o.$isTextNode)(r)||!r.isSimpleText())return En(e),void n(null,e.getURL())}let s=e.getTextContent(),c=hn(s,t);if(c===null||c.text!==s||!bn(e,r)||!xn(e,r))return En(e),void n(null,e.getURL());let l=e.getURL();if(l!==c.url&&(e.setURL(c.url),n(c.url,l)),c.attributes){let t=e.getRel();t!==c.attributes.rel&&(e.setRel(c.attributes.rel||null),n(c.attributes.rel||null,t));let r=e.getTarget();r!==c.attributes.target&&(e.setTarget(c.attributes.target||null),n(c.attributes.target||null,r))}}function En(e){let t=e.getChildren();for(let n=t.length-1;n>=0;n--)e.insertAfter(t[n]);return e.remove(),t.map(e=>e.getLatest())}var Dn={changeHandlers:[],excludeParents:[],matchers:[],separatorRegex:gn};function On(e,t=Dn){let{matchers:n,changeHandlers:r,excludeParents:i,separatorRegex:a=gn}=t,s=(e,t)=>{for(let n of r)n(e,t)};return(0,c.mergeRegister)(e.registerNodeTransform(o.TextNode,e=>{let t=e.getParentOrThrow(),r=e.getPreviousSibling();on(t)?Tn(t,n,s,a):!nn(t)&&!i.some(e=>e(t))&&(e.isSimpleText()&&(yn(e.getTextContent(),a)||!on(r))&&(function(e,t,n,r){for(let t of e){let e=t.getParent();if(on(e)&&!e.getIsUnlinked())return}let i=[...e],a=i.map(e=>e.getTextContent()).join(``),o,s=a,c=0;for(;(o=hn(s,t))&&o!==null;){let e=o.index,t=e+o.length;if(Sn(c+e,c+t,r,a,i)){let[r,,a,l]=Cn(i,c+e,c+t),u=!1;for(let e of a){let t=e.getParent();if(on(t)&&!t.getIsUnlinked()){u=!0;break}}if(u){c+=t,s=s.substring(t);continue}let d=wn(a,c+e-r,c+t-r,o);i=d?[d,...l]:l,n(o.url,null),c=0}else c+=t;s=s.substring(t)}})(function(e){let t=[e],n=e.getNextSibling();for(;n!==null&&(0,o.$isTextNode)(n)&&n.isSimpleText()&&(t.push(n),!/[\s]/.test(n.getTextContent()));)n=n.getNextSibling();return t}(e),n,s,a),(function(e,t,n,r){let i=e.getParent(),a=e.getPreviousSibling(),o=e.getNextSibling(),s=e.getTextContent();if(!on(i)||i.getIsUnlinked()){if(on(a)&&!a.getIsUnlinked()&&a.is(e.getPreviousSibling())&&e.getParent()===a.getParent()){if(!yn(s,r))return En(a),void n(null,a.getURL());if(c=s,a.isEmailURI()?/^\.[a-zA-Z]{2,}/.test(c):/^\.[a-zA-Z0-9]{1,}/.test(c)){let i=a.getTextContent()+s,o=hn(i,t);o!==null&&o.text===i&&(a.append(e),Tn(a,t,n,r),n(null,a.getURL()))}}var c;!on(o)||o.getIsUnlinked()||vn(s,r)||o.is(e.getNextSibling())&&e.getParent()===o.getParent()&&(En(o),n(null,o.getURL()))}})(e,n,s,a))}),e.registerCommand(sn,e=>{let t=(0,o.$getSelection)();return e!==null||!(0,o.$isRangeSelection)(t)||t.extract().forEach(e=>{let t=e.getParent();on(t)&&(t.setIsUnlinked(!t.getIsUnlinked()),t.markDirty())}),!1},o.COMMAND_PRIORITY_LOW))}(0,o.defineExtension)({config:Dn,dependencies:[pn],mergeConfig(e,t){let n=(0,o.shallowMergeConfig)(e,t);for(let r of[`matchers`,`changeHandlers`,`excludeParents`]){let i=t[r];Array.isArray(i)&&(n[r]=[...e[r],...i])}return n},name:`@lexical/link/AutoLink`,nodes:[rn],register:On});function kn(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function An(e,t=(0,o.$getSelection)()){return t??kn(166),(0,o.$isRangeSelection)(t)&&t.isCollapsed()||t.getNodes().length===0?``:(0,u.$generateHtmlFromNodes)(e,t)}function jn(e,t=(0,o.$getSelection)()){return t??kn(166),(0,o.$isRangeSelection)(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(Nn(e,t))}function Mn(e,t,n,r=[]){let i=t===null||n.isSelected(t),a=(0,o.$isElementNode)(n)&&n.excludeFromCopy(`html`),s=n;t!==null&&(0,o.$isTextNode)(s)&&(s=(0,d.$sliceSelectedTextNodeContent)(t,s,`clone`));let c=(0,o.$isElementNode)(s)?s.getChildren():[],l=function(e){let t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&kn(58,n.name),(0,o.$isElementNode)(e)){let e=t.children;Array.isArray(e)||kn(59,n.name)}return t}(s);(0,o.$isTextNode)(s)&&s.getTextContentSize()===0&&(i=!1);for(let r=0;r<c.length;r++){let a=c[r],s=Mn(e,t,a,l.children);!i&&(0,o.$isElementNode)(n)&&s&&n.extractWithChild(a,t,`clone`)&&(i=!0)}if(i&&!a)r.push(l);else if(Array.isArray(l.children))for(let e=0;e<l.children.length;e++){let t=l.children[e];r.push(t)}return i}function Nn(e,t){let n=[],r=(0,o.$getRoot)().getChildren();for(let i=0;i<r.length;i++)Mn(e,t,r[i],n);return{namespace:e._config.namespace,nodes:n}}var Pn=null;async function Fn(e,t,n){if(Pn!==null)return!1;if(t!==null)return new Promise((r,i)=>{e.update(()=>{r(In(e,t,n))})});let r=e.getRootElement(),i=e._window||window,a=i.document,s=(0,o.getDOMSelection)(i);if(r===null||s===null)return!1;let l=a.createElement(`span`);l.style.position=`fixed`,l.style.top=`-1000px`,l.append(a.createTextNode(`#`)),r.append(l);let u=new Range;return u.setStart(l,0),u.setEnd(l,1),s.removeAllRanges(),s.addRange(u),new Promise((t,r)=>{let s=e.registerCommand(o.COPY_COMMAND,r=>((0,c.objectKlassEquals)(r,ClipboardEvent)&&(s(),Pn!==null&&(i.clearTimeout(Pn),Pn=null),t(In(e,r,n))),!0),o.COMMAND_PRIORITY_CRITICAL);Pn=i.setTimeout(()=>{s(),Pn=null,t(!1)},50),a.execCommand(`copy`),l.remove()})}function In(e,t,n){if(n===void 0){let t=(0,o.getDOMSelection)(e._window),r=(0,o.$getSelection)();if(!r||r.isCollapsed()||!t)return!1;let i=t.anchorNode,a=t.focusNode;if(i!==null&&a!==null&&!(0,o.isSelectionWithinEditor)(e,i,a))return!1;n=Rn(r)}t.preventDefault();let r=t.clipboardData;return r!==null&&(zn(r,n),!0)}var Ln=[[`text/html`,An],[`application/x-lexical-editor`,jn]];function Rn(e=(0,o.$getSelection)()){return function(e,t){let n={"text/plain":``};for(let[r,i]of Object.entries(e)){let e=Vn(i,t);e!==null&&(n[r]=e)}return n}(function(){let e=(0,o.$getEditor)(),t=Rt.maybeFromEditor(e);return t&&t.hasExtensionByName(Hn.name)?zt(e,Hn).output:Bn}(),e)}function zn(e,t){for(let[n]of Ln)t[n]===void 0&&e.setData(n,``);for(let n in t){let r=t[n];r!==void 0&&e.setData(n,r)}}var Bn={"application/x-lexical-editor":[(e,t)=>e?jn((0,o.$getEditor)(),e):t()],"text/html":[(e,t)=>e?An((0,o.$getEditor)(),e):t()],"text/plain":[(e,t)=>e?e.getTextContent():t()]};function Vn(e,t){let n=r=>e[r]?e[r](t,n.bind(null,r-1)):null;return n(e.length-1)}var Hn=(0,o.defineExtension)({build:(e,t,n)=>t.$exportMimeType,config:(0,o.safeCast)({$exportMimeType:Bn}),mergeConfig(e,t){let n=(0,o.shallowMergeConfig)(e,t);if(t.$exportMimeType){let r={...e.$exportMimeType};for(let[e,n]of Object.entries(t.$exportMimeType))r[e]=[...r[e],...n];n.$exportMimeType=r}return n},name:`@lexical/clipboard/GetClipboardData`}),Un=/^(\d+(?:\.\d+)?)px$/,Wn={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1},Gn=class e extends o.ElementNode{__colSpan;__rowSpan;__headerState;__width;__backgroundColor;__verticalAlign;static getType(){return`tablecell`}static clone(t){return new e(t.__headerState,t.__colSpan,t.__width,t.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__rowSpan=e.__rowSpan,this.__backgroundColor=e.__backgroundColor,this.__verticalAlign=e.__verticalAlign,this.__colSpan=e.__colSpan,this.__headerState=e.__headerState,this.__width=e.__width}static importDOM(){return{td:e=>({conversion:qn,priority:0}),th:e=>({conversion:qn,priority:0})}}static importJSON(e){return Jn().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setHeaderStyles(e.headerState).setColSpan(e.colSpan||1).setRowSpan(e.rowSpan||1).setWidth(e.width||void 0).setBackgroundColor(e.backgroundColor||null).setVerticalAlign(e.verticalAlign||void 0)}constructor(e=Wn.NO_STATUS,t=1,n,r){super(r),this.__colSpan=t,this.__rowSpan=1,this.__headerState=e,this.__width=n,this.__backgroundColor=null,this.__verticalAlign=void 0}createDOM(e){let t=document.createElement(this.getTag());return this.__width&&(t.style.width=`${this.__width}px`),this.__colSpan>1&&(t.colSpan=this.__colSpan),this.__rowSpan>1&&(t.rowSpan=this.__rowSpan),this.__backgroundColor!==null&&(t.style.backgroundColor=this.__backgroundColor),Kn(this.__verticalAlign)&&(t.style.verticalAlign=this.__verticalAlign),(0,c.addClassNamesToElement)(t,e.theme.tableCell,this.hasHeader()&&e.theme.tableCellHeader),t}exportDOM(e){let t=super.exportDOM(e);if((0,o.isHTMLElement)(t.element)){let e=t.element;e.setAttribute(`data-temporary-table-cell-lexical-key`,this.getKey()),e.style.border=`1px solid black`,this.__colSpan>1&&(e.colSpan=this.__colSpan),this.__rowSpan>1&&(e.rowSpan=this.__rowSpan),e.style.width=`${this.getWidth()||75}px`,e.style.verticalAlign=this.getVerticalAlign()||`top`,e.style.textAlign=`start`,this.__backgroundColor===null&&this.hasHeader()&&(e.style.backgroundColor=`#f2f3f5`)}return t}exportJSON(){return{...super.exportJSON(),...Kn(this.__verticalAlign)&&{verticalAlign:this.__verticalAlign},backgroundColor:this.getBackgroundColor(),colSpan:this.__colSpan,headerState:this.__headerState,rowSpan:this.__rowSpan,width:this.getWidth()}}getColSpan(){return this.getLatest().__colSpan}setColSpan(e){let t=this.getWritable();return t.__colSpan=e,t}getRowSpan(){return this.getLatest().__rowSpan}setRowSpan(e){let t=this.getWritable();return t.__rowSpan=e,t}getTag(){return this.hasHeader()?`th`:`td`}setHeaderStyles(e,t=Wn.BOTH){let n=this.getWritable();return n.__headerState=e&t|n.__headerState&~t,n}getHeaderStyles(){return this.getLatest().__headerState}setWidth(e){let t=this.getWritable();return t.__width=e,t}getWidth(){return this.getLatest().__width}getBackgroundColor(){return this.getLatest().__backgroundColor}setBackgroundColor(e){let t=this.getWritable();return t.__backgroundColor=e,t}getVerticalAlign(){return this.getLatest().__verticalAlign}setVerticalAlign(e){let t=this.getWritable();return t.__verticalAlign=e||void 0,t}toggleHeaderStyle(e){let t=this.getWritable();return(t.__headerState&e)===e?t.__headerState-=e:t.__headerState+=e,t}hasHeaderState(e){return(this.getHeaderStyles()&e)===e}hasHeader(){return this.getLatest().__headerState!==Wn.NO_STATUS}updateDOM(e){return e.__headerState!==this.__headerState||e.__width!==this.__width||e.__colSpan!==this.__colSpan||e.__rowSpan!==this.__rowSpan||e.__backgroundColor!==this.__backgroundColor||e.__verticalAlign!==this.__verticalAlign}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}};function Kn(e){return e===`middle`||e===`bottom`}function qn(e){let t=e,n=e.nodeName.toLowerCase(),r;Un.test(t.style.width)&&(r=parseFloat(t.style.width));let i=Wn.NO_STATUS;if(n===`th`){let e=t.getAttribute(`scope`);if(e===`col`)i=Wn.COLUMN;else if(e===`row`)i=Wn.ROW;else{let e=t.parentElement,n=(0,o.isHTMLElement)(e)&&e.nodeName.toLowerCase()===`tr`&&(0,o.isHTMLElement)(e.parentElement)&&(e.parentElement.nodeName.toLowerCase()===`thead`||e.rowIndex===0),r=t.cellIndex===0;n&&(i|=Wn.ROW),r&&(i|=Wn.COLUMN),i===Wn.NO_STATUS&&(i=Wn.ROW)}}let a=Jn(i,t.colSpan,r);a.__rowSpan=t.rowSpan;let s=t.style.backgroundColor;s!==``&&(a.__backgroundColor=s);let c=t.style.verticalAlign;Kn(c)&&(a.__verticalAlign=c);let l=t.style,u=(l&&l.textDecoration||``).split(` `),d=l.fontWeight===`700`||l.fontWeight===`bold`,f=u.includes(`line-through`),p=l.fontStyle===`italic`,m=u.includes(`underline`),h=l.color;return{after:e=>{let t=[],n=null,r=()=>{if(n){let e=n.getFirstChild();(0,o.$isLineBreakNode)(e)&&n.getChildrenSize()===1&&e.remove()}};for(let i of e)if((0,o.$isInlineElementOrDecoratorNode)(i)||(0,o.$isTextNode)(i)||(0,o.$isLineBreakNode)(i)){if((0,o.$isTextNode)(i)&&(d&&i.toggleFormat(`bold`),f&&i.toggleFormat(`strikethrough`),p&&i.toggleFormat(`italic`),m&&i.toggleFormat(`underline`),h)){let e=i.getStyle();e.includes(`color:`)||i.setStyle(e+`color: ${h};`)}n?n.append(i):(n=(0,o.$createParagraphNode)().append(i),t.push(n))}else t.push(i),r(),n=null;return r(),t.length===0&&t.push((0,o.$createParagraphNode)()),t},node:a}}function Jn(e=Wn.NO_STATUS,t=1,n){return(0,o.$applyNodeReplacement)(new Gn(e,t,n))}function O(e){return e instanceof Gn}var Yn=(0,o.createCommand)(`INSERT_TABLE_COMMAND`);function k(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var Xn=class e extends o.ElementNode{__height;static getType(){return`tablerow`}static clone(t){return new e(t.__height,t.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__height=e.__height}static importDOM(){return{tr:e=>({conversion:Zn,priority:0})}}static importJSON(e){return Qn().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setHeight(e.height)}constructor(e,t){super(t),this.__height=e}exportJSON(){let e=this.getHeight();return{...super.exportJSON(),...e===void 0?void 0:{height:e}}}createDOM(e){let t=document.createElement(`tr`);return this.__height&&(t.style.height=`${this.__height}px`),(0,c.addClassNamesToElement)(t,e.theme.tableRow),t}extractWithChild(e,t,n){return n===`html`}isShadowRoot(){return!0}setHeight(e){let t=this.getWritable();return t.__height=e,t}getHeight(){return this.getLatest().__height}updateDOM(e){return e.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}};function Zn(e){let t=e,n;return Un.test(t.style.height)&&(n=parseFloat(t.style.height)),{after:e=>(0,c.$descendantsMatching)(e,O),node:Qn(n)}}function Qn(e){return(0,o.$applyNodeReplacement)(new Xn(e))}function $n(e){return e instanceof Xn}var er=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,tr=er&&`documentMode`in document?document.documentMode:null,nr=er&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);function rr(e,t,n=!0){let r=xi();for(let i=0;i<e;i++){let e=Qn();for(let r=0;r<t;r++){let t=Wn.NO_STATUS;typeof n==`object`?(i===0&&n.rows&&(t|=Wn.ROW),r===0&&n.columns&&(t|=Wn.COLUMN)):n&&(i===0&&(t|=Wn.ROW),r===0&&(t|=Wn.COLUMN));let a=Jn(t),s=(0,o.$createParagraphNode)();s.append((0,o.$createTextNode)()),a.append(s),e.append(a)}r.append(e)}return r}function ir(e){let t=(0,c.$findMatchingParent)(e,e=>Si(e));if(Si(t))return t;throw Error(`Expected table cell to be inside of table.`)}er&&`InputEvent`in window&&!tr&&new window.InputEvent(`input`);var ar=(e,t)=>e===Wn.BOTH||e===t?t:Wn.NO_STATUS;function or(e=!0){let t=(0,o.$getSelection)();(0,o.$isRangeSelection)(t)||A(t)||k(188);let n=t.anchor.getNode(),r=t.focus.getNode(),[i]=br(n),[a,,s]=br(r),[,c,l]=vr(s,a,i),{startRow:u}=l,{startRow:d}=c;return e?sr(u+i.__rowSpan>d+a.__rowSpan?i:a,!0):sr(d<u?a:i,!1)}function sr(e,t=!0){let[,,n]=br(e),[r,i]=vr(n,e,e),a=r[0].length,{startRow:s}=i,c=null;if(t){let t=s+e.__rowSpan-1,i=r[t],l=Qn();for(let e=0;e<a;e++){let{cell:n,startRow:r}=i[e];if(r+n.__rowSpan-1<=t){let t=i[e].cell.__headerState,n=ar(t,Wn.COLUMN);l.append(Jn(n).append((0,o.$createParagraphNode)()))}else n.setRowSpan(n.__rowSpan+1)}let u=n.getChildAtIndex(t);$n(u)||k(256),u.insertAfter(l),c=l}else{let e=s,t=r[e],i=Qn();for(let n=0;n<a;n++){let{cell:r,startRow:a}=t[n];if(a===e){let e=t[n].cell.__headerState,r=ar(e,Wn.COLUMN);i.append(Jn(r).append((0,o.$createParagraphNode)()))}else r.setRowSpan(r.__rowSpan+1)}let l=n.getChildAtIndex(e);$n(l)||k(257),l.insertBefore(i),c=i}return c}function cr(e=!0){let t=(0,o.$getSelection)();(0,o.$isRangeSelection)(t)||A(t)||k(188);let n=t.anchor.getNode(),r=t.focus.getNode(),[i]=br(n),[a,,s]=br(r),[,c,l]=vr(s,a,i),{startColumn:u}=l,{startColumn:d}=c;return e?lr(u+i.__colSpan>d+a.__colSpan?i:a,!0):lr(d<u?a:i,!1)}function lr(e,t=!0,n=!0){let[,,r]=br(e),[i,a]=vr(r,e,e),s=i.length,{startColumn:c}=a,l=t?c+e.__colSpan-1:c-1,u=r.getFirstChild();$n(u)||k(120);let d=null;function f(e=Wn.NO_STATUS){let t=Jn(e).append((0,o.$createParagraphNode)());return d===null&&(d=t),t}let p=u;e:for(let e=0;e<s;e++){if(e!==0){let e=p.getNextSibling();$n(e)||k(121),p=e}let t=i[e],n=t[l<0?0:l].cell.__headerState,r=ar(n,Wn.ROW);if(l<0){pr(p,f(r));continue}let{cell:a,startColumn:o,startRow:s}=t[l];if(o+a.__colSpan-1<=l){let n=a,i=s,o=l;for(;i!==e&&n.__rowSpan>1;){if(o-=a.__colSpan,!(o>=0)){p.append(f(r));continue e}{let{cell:e,startRow:r}=t[o];n=e,i=r}}n.insertAfter(f(r))}else a.setColSpan(a.__colSpan+1)}d!==null&&n&&fr(d);let m=r.getColWidths();if(m){let e=[...m],t=l<0?0:l,n=e[t];e.splice(t,0,n),r.setColWidths(e)}return d}function ur(){let e=(0,o.$getSelection)();(0,o.$isRangeSelection)(e)||A(e)||k(188);let[t,n]=e.isBackward()?[e.focus.getNode(),e.anchor.getNode()]:[e.anchor.getNode(),e.focus.getNode()],[r,,i]=br(t),[a]=br(n),[s,c,l]=vr(i,r,a),{startRow:u}=c,{startRow:d}=l,f=d+a.__rowSpan-1;if(s.length===f-u+1)return void i.remove();let p=s[0].length,m=s[f+1],h=i.getChildAtIndex(f+1);for(let e=f;e>=u;e--){for(let t=p-1;t>=0;t--){let{cell:n,startRow:r,startColumn:i}=s[e][t];if(i===t){if(r<u||r+n.__rowSpan-1>f){let e=Math.max(r,u),t=Math.min(n.__rowSpan+r-1,f),i=e<=t?t-e+1:0;n.setRowSpan(n.__rowSpan-i)}if(r>=u&&r+n.__rowSpan-1>f&&e===f){h===null&&k(122);let r=null;for(let n=0;n<t;n++){let t=m[n],i=t.cell;t.startRow===e+1&&(r=i),i.__colSpan>1&&(n+=i.__colSpan-1)}r===null?pr(h,n):r.insertAfter(n)}}}let t=i.getChildAtIndex(e);$n(t)||k(206,String(e)),t.remove()}if(m!==void 0){let{cell:e}=m[0];fr(e)}else{let{cell:e}=s[u-1][0];fr(e)}}function dr(){let e=(0,o.$getSelection)();(0,o.$isRangeSelection)(e)||A(e)||k(188);let t=e.anchor.getNode(),n=e.focus.getNode(),[r,,i]=br(t),[a]=br(n),[s,c,l]=vr(i,r,a),{startColumn:u}=c,{startRow:d,startColumn:f}=l,p=Math.min(u,f),m=Math.max(u+r.__colSpan-1,f+a.__colSpan-1),h=m-p+1;if(s[0].length===m-p+1)return i.selectPrevious(),void i.remove();let g=s.length;for(let e=0;e<g;e++)for(let t=p;t<=m;t++){let{cell:n,startColumn:r}=s[e][t];if(r<p){if(t===p){let e=p-r;n.setColSpan(n.__colSpan-Math.min(h,n.__colSpan-e))}}else if(r+n.__colSpan-1>m){if(t===m){let e=m-r+1;n.setColSpan(n.__colSpan-e)}}else n.remove()}let _=s[d],v=u>f?_[u+r.__colSpan]:_[f+a.__colSpan];if(v!==void 0){let{cell:e}=v;fr(e)}else{let{cell:e}=f<u?_[f-1]:_[u-1];fr(e)}let y=i.getColWidths();if(y){let e=[...y];e.splice(p,h),i.setColWidths(e)}}function fr(e){let t=e.getFirstDescendant();t==null?e.selectStart():t.getParentOrThrow().selectStart()}function pr(e,t){let n=e.getFirstChild();n===null?e.append(t):n.insertBefore(t)}function mr(e){if(e.length===0)return null;let[t]=yr(ir(e[0]),null,null),n=1/0,r=-1/0,i=1/0,a=-1/0,s=new Set;for(let o of t)for(let t of o){if(!t||!t.cell)continue;let o=t.cell.getKey();if(!s.has(o)&&e.some(e=>e.is(t.cell))){s.add(o);let e=t.startRow,c=t.startColumn,l=t.cell.__rowSpan||1,u=t.cell.__colSpan||1;n=Math.min(n,e),r=Math.max(r,e+l-1),i=Math.min(i,c),a=Math.max(a,c+u-1)}}if(n===1/0||i===1/0)return null;let c=r-n+1,l=a-i+1,u=t[n][i];if(!u.cell)return null;let d=u.cell;d.setColSpan(l),d.setRowSpan(c);let f=new Set([d.getKey()]);for(let e=n;e<=r;e++)for(let n=i;n<=a;n++){let r=t[e][n];if(!r.cell)continue;let i=r.cell,a=i.getKey();f.has(a)||(f.add(a),hr(i)||d.append(...i.getChildren()),i.remove())}return d.getChildrenSize()===0&&d.append((0,o.$createParagraphNode)()),d}function hr(e){if(e.getChildrenSize()!==1)return!1;let t=e.getFirstChildOrThrow();return!(!(0,o.$isParagraphNode)(t)||!t.isEmpty())}function gr(){let e=(0,o.$getSelection)();(0,o.$isRangeSelection)(e)||A(e)||k(188);let t=(0,c.$findMatchingParent)(e.anchor.getNode(),O);return O(t)||k(148),_r(t)}function _r(e){let[t,n,r]=br(e),i=t.__colSpan,a=t.__rowSpan;if(i===1&&a===1)return;let[s,c]=vr(r,t,t),{startColumn:l,startRow:u}=c,d=t.__headerState&Wn.COLUMN,f=Array.from({length:i},(e,t)=>{let n=d;for(let e=0;n!==0&&e<s.length;e++)n&=s[e][t+l].cell.__headerState;return n}),p=t.__headerState&Wn.ROW,m=Array.from({length:a},(e,t)=>{let n=p;for(let e=0;n!==0&&e<s[0].length;e++)n&=s[t+u][e].cell.__headerState;return n});if(i>1){for(let e=1;e<i;e++)t.insertAfter(Jn(f[e]|m[0]).append((0,o.$createParagraphNode)()));t.setColSpan(1)}if(a>1){let e;for(let t=1;t<a;t++){let r=u+t,a=s[r];e=(e||n).getNextSibling(),$n(e)||k(125);let c=null;for(let e=0;e<l;e++){let t=a[e],n=t.cell;t.startRow===r&&(c=n),n.__colSpan>1&&(e+=n.__colSpan-1)}if(c===null)for(let n=i-1;n>=0;n--)pr(e,Jn(f[n]|m[t]).append((0,o.$createParagraphNode)()));else for(let e=i-1;e>=0;e--)c.insertAfter(Jn(f[e]|m[t]).append((0,o.$createParagraphNode)()))}t.setRowSpan(1)}}function vr(e,t,n){let[r,i,a]=yr(e,t,n);return i===null&&k(207),a===null&&k(208),[r,i,a]}function yr(e,t,n){let r=[],i=null,a=null;function o(e){let t=r[e];return t===void 0&&(r[e]=t=[]),t}let s=e.getChildren();for(let e=0;e<s.length;e++){let r=s[e];$n(r)||k(209);let c=o(e);for(let l=r.getFirstChild(),u=0;l!=null;l=l.getNextSibling()){for(O(l)||k(147);c[u]!==void 0;)u++;let r={cell:l,startColumn:u,startRow:e},{__rowSpan:d,__colSpan:f}=l;for(let t=0;t<d&&!(e+t>=s.length);t++){let n=o(e+t);for(let e=0;e<f;e++)n[u+e]=r}t!==null&&i===null&&t.is(l)&&(i=r),n!==null&&a===null&&n.is(l)&&(a=r)}}return[r,i,a]}function br(e){let t;if(e instanceof Gn)t=e;else if(`__type`in e){let n=(0,c.$findMatchingParent)(e,O);O(n)||k(148),t=n}else{let n=(0,c.$findMatchingParent)(e.getNode(),O);O(n)||k(148),t=n}let n=t.getParent();$n(n)||k(149);let r=n.getParent();return Si(r)||k(210),[t,n,r]}function xr(e,t,n){let r,i=Math.min(t.startColumn,n.startColumn),a=Math.min(t.startRow,n.startRow),o=Math.max(t.startColumn+t.cell.__colSpan-1,n.startColumn+n.cell.__colSpan-1),s=Math.max(t.startRow+t.cell.__rowSpan-1,n.startRow+n.cell.__rowSpan-1);do{r=!1;for(let t=0;t<e.length;t++)for(let n=0;n<e[0].length;n++){let c=e[t][n];if(!c)continue;let l=c.startColumn+c.cell.__colSpan-1,u=c.startRow+c.cell.__rowSpan-1,d=c.startColumn<=o&&l>=i,f=c.startRow<=s&&u>=a;if(d&&f){let e=Math.min(i,c.startColumn),t=Math.max(o,l),n=Math.min(a,c.startRow),d=Math.max(s,u);e===i&&t===o&&n===a&&d===s||(i=e,o=t,a=n,s=d,r=!0)}}}while(r);return{maxColumn:o,maxRow:s,minColumn:i,minRow:a}}function Sr(e){let[t,,n]=br(e),r=n.getChildren(),i=r.length,a=r[0].getChildren().length,o=Array(i);for(let e=0;e<i;e++)o[e]=Array(a);for(let e=0;e<i;e++){let n=r[e].getChildren(),i=0;for(let r=0;r<n.length;r++){for(;o[e][i];)i++;let a=n[r],s=a.__rowSpan||1,c=a.__colSpan||1;for(let t=0;t<s;t++)for(let n=0;n<c;n++)o[e+t][i+n]=a;if(t===a)return{colSpan:c,columnIndex:i,rowIndex:e,rowSpan:s};i+=c}}return null}function Cr(e){let[[t,n,r,i],[a,o,s,l]]=[`anchor`,`focus`].map(t=>{let n=e[t].getNode(),r=(0,c.$findMatchingParent)(n,O);O(r)||k(238,t,n.getKey(),n.getType());let i=r.getParent();$n(i)||k(239,t);let a=i.getParent();return Si(a)||k(240,t),[n,r,i,a]});return i.is(l)||k(241),{anchorCell:n,anchorNode:t,anchorRow:r,anchorTable:i,focusCell:o,focusNode:a,focusRow:s,focusTable:l}}var wr=class e{tableKey;anchor;focus;_cachedNodes;dirty;constructor(e,t,n){this.anchor=t,this.focus=n,t._selection=this,n._selection=this,this._cachedNodes=null,this.dirty=!1,this.tableKey=e}getStartEndPoints(){return[this.anchor,this.focus]}isValid(){if(this.tableKey===`root`||this.anchor.key===`root`||this.anchor.type!==`element`||this.focus.key===`root`||this.focus.type!==`element`)return!1;let e=(0,o.$getNodeByKey)(this.tableKey),t=(0,o.$getNodeByKey)(this.anchor.key),n=(0,o.$getNodeByKey)(this.focus.key);return e!==null&&t!==null&&n!==null}isBackward(){return this.focus.isBefore(this.anchor)}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return A(e)&&this.tableKey===e.tableKey&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)}set(e,t,n){this.dirty=this.dirty||e!==this.tableKey||t!==this.anchor.key||n!==this.focus.key,this.tableKey=e,this.anchor.key=t,this.focus.key=n,this._cachedNodes=null}clone(){return new e(this.tableKey,(0,o.$createPoint)(this.anchor.key,this.anchor.offset,this.anchor.type),(0,o.$createPoint)(this.focus.key,this.focus.offset,this.focus.type))}isCollapsed(){return!1}extract(){return this.getNodes()}insertRawText(e){}insertText(){}hasFormat(e){let t=0;this.getNodes().filter(O).forEach(e=>{let n=e.getFirstChild();(0,o.$isParagraphNode)(n)&&(t|=n.getTextFormat())});let n=o.TEXT_TYPE_TO_FORMAT[e];return(t&n)!==0}insertNodes(e){let t=this.focus.getNode();(0,o.$isElementNode)(t)||k(151),(0,o.$normalizeSelection__EXPERIMENTAL)(t.select(0,t.getChildrenSize())).insertNodes(e)}getShape(){let{anchorCell:e,focusCell:t}=Cr(this),n=Sr(e);n===null&&k(153);let r=Sr(t);r===null&&k(155);let i=Math.min(n.columnIndex,r.columnIndex),a=Math.max(n.columnIndex+n.colSpan-1,r.columnIndex+r.colSpan-1),o=Math.min(n.rowIndex,r.rowIndex),s=Math.max(n.rowIndex+n.rowSpan-1,r.rowIndex+r.rowSpan-1);return{fromX:Math.min(i,a),fromY:Math.min(o,s),toX:Math.max(i,a),toY:Math.max(o,s)}}getNodes(){if(!this.isValid())return[];let e=this._cachedNodes;if(e!==null)return e;let{anchorTable:t,anchorCell:n,focusCell:r}=Cr(this),i=r.getParents()[1];if(i!==t){if(t.isParentOf(r)){let e=i.getParent();e??k(159),this.set(this.tableKey,r.getKey(),e.getKey())}else{let e=t.getParent();e??k(158),this.set(this.tableKey,e.getKey(),r.getKey())}return this.getNodes()}let[a,s,c]=vr(t,n,r),{minColumn:l,maxColumn:u,minRow:d,maxRow:f}=xr(a,s,c),p=new Map([[t.getKey(),t]]),m=null;for(let e=d;e<=f;e++)for(let t=l;t<=u;t++){let{cell:n}=a[e][t],r=n.getParent();$n(r)||k(160),r!==m&&(p.set(r.getKey(),r),m=r),p.has(n.getKey())||Dr(n,e=>{p.set(e.getKey(),e)})}let h=Array.from(p.values());return(0,o.isCurrentlyReadOnlyMode)()||(this._cachedNodes=h),h}getTextContent(){let e=this.getNodes().filter(e=>O(e)),t=``;for(let n=0;n<e.length;n++){let r=e[n],i=r.__parent,a=(e[n+1]||{}).__parent;t+=r.getTextContent()+(a===i?` `:`
3
+ `)}return t}};function A(e){return e instanceof wr}function Tr(){return new wr(`root`,(0,o.$createPoint)(`root`,0,`element`),(0,o.$createPoint)(`root`,0,`element`))}function Er(e,t,n){e.getKey(),t.getKey(),n.getKey();let r=(0,o.$getSelection)(),i=A(r)?r.clone():Tr();return i.set(e.getKey(),t.getKey(),n.getKey()),i}function Dr(e,t){let n=[[e]];for(let e=n.at(-1);e!==void 0&&n.length>0;e=n.at(-1)){let r=e.pop();r===void 0?n.pop():!1!==t(r)&&(0,o.$isElementNode)(r)&&n.push(r.getChildren())}}function Or(e,t=(0,o.$getEditor)()){let n=(0,o.$getNodeByKey)(e);Si(n)||k(231,e);let r=Nr(n,t.getElementByKey(e));return r===null&&k(232,e),{tableElement:r,tableNode:n}}var kr=class{observers;nextFocus;shouldCheckSelectionForTable;constructor(){this.observers=new Map,this.nextFocus=null,this.shouldCheckSelectionForTable=null}setNextFocus(e){this.nextFocus=e}getAndClearNextFocus(){let{nextFocus:e}=this;return e!==null&&(this.nextFocus=null),e}setShouldCheckSelectionForTable(e){this.shouldCheckSelectionForTable=e}getAndClearShouldCheckSelectionForTable(){let{shouldCheckSelectionForTable:e}=this;return e?(this.shouldCheckSelectionForTable=null,e):null}},Ar=class{focusX;focusY;listenersToRemove;table;isHighlightingCells;anchorX;anchorY;tableNodeKey;anchorCell;focusCell;anchorCellNodeKey;focusCellNodeKey;editor;tableSelection;hasHijackedSelectionStyles;isSelecting;pointerType;abortController;listenerOptions;constructor(e,t){this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.listenersToRemove=new Set,this.tableNodeKey=t,this.editor=e,this.table={columns:0,domRows:[],rows:0},this.tableSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.isSelecting=!1,this.pointerType=null,this.abortController=new AbortController,this.listenerOptions={signal:this.abortController.signal},this.trackTable()}getTable(){return this.table}removeListeners(){this.abortController.abort(`removeListeners`),Array.from(this.listenersToRemove).forEach(e=>e()),this.listenersToRemove.clear()}$lookup(){return Or(this.tableNodeKey,this.editor)}trackTable(){let e=new MutationObserver(e=>{this.editor.getEditorState().read(()=>{let t=!1;for(let n=0;n<e.length;n++){let r=e[n].target.nodeName;if(r===`TABLE`||r===`TBODY`||r===`THEAD`||r===`TR`){t=!0;break}}if(!t)return;let{tableNode:n,tableElement:r}=this.$lookup();this.table=Kr(n,r)},{editor:this.editor})});this.editor.getEditorState().read(()=>{let{tableNode:t,tableElement:n}=this.$lookup();this.table=Kr(t,n),e.observe(n,{attributes:!0,childList:!0,subtree:!0})},{editor:this.editor})}$clearHighlight(e=!0){let t=this.editor;this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.tableSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.$enableHighlightStyle();let{tableNode:n,tableElement:r}=this.$lookup();qr(t,Kr(n,r),null),e&&(0,o.$getSelection)()!==null&&((0,o.$setSelection)(null),t.dispatchCommand(o.SELECTION_CHANGE_COMMAND,void 0))}$enableHighlightStyle(){let e=this.editor,{tableElement:t}=this.$lookup();(0,c.removeClassNamesFromElement)(t,e._config.theme.tableSelection),t.classList.remove(`disable-selection`),this.hasHijackedSelectionStyles=!1}$disableHighlightStyle(){let{tableElement:e}=this.$lookup();(0,c.addClassNamesToElement)(e,this.editor._config.theme.tableSelection),this.hasHijackedSelectionStyles=!0}$updateTableTableSelection(e){if(e!==null){e.tableKey!==this.tableNodeKey&&k(233,e.tableKey,this.tableNodeKey);let t=this.editor;this.tableSelection=e,this.isHighlightingCells=!0,this.$disableHighlightStyle(),this.updateDOMSelection(),qr(t,this.table,this.tableSelection)}else this.$clearHighlight()}updateDOMSelection(){if(this.anchorCell!==null&&this.focusCell!==null){let e=(0,o.getDOMSelection)(this.editor._window);e&&e.rangeCount>0&&e.removeAllRanges()}}$setFocusCellForSelection(e,t=!1){let n=this.editor,{tableNode:r}=this.$lookup(),i=e.x,a=e.y;if(this.focusCell=e,!this.isHighlightingCells&&(t||this.anchorX!==i||this.anchorY!==a||this.tableSelection!=null&&this.anchorCellNodeKey!=null)&&(this.isHighlightingCells=!0,this.$disableHighlightStyle()),this.focusX!==-1&&this.focusY!==-1&&i===this.focusX&&a===this.focusY)return!1;if(this.focusX=i,this.focusY=a,this.isHighlightingCells){let s=fi(r,e.elem);if(this.tableSelection!=null&&this.anchorCellNodeKey!=null){let e=s;if(e===null&&t&&(e=r.getCellNodeFromCords(i,a,this.table)),e!==null){let t=this.$getAnchorTableCellOrThrow();return this.focusCellNodeKey=e.getKey(),this.tableSelection=Er(r,t,e),(0,o.$setSelection)(this.tableSelection),n.dispatchCommand(o.SELECTION_CHANGE_COMMAND,void 0),qr(n,this.table,this.tableSelection),!0}}}return!1}$getAnchorTableCell(){return this.anchorCellNodeKey?(0,o.$getNodeByKey)(this.anchorCellNodeKey):null}$getAnchorTableCellOrThrow(){let e=this.$getAnchorTableCell();return e===null&&k(234),e}$getFocusTableCell(){return this.focusCellNodeKey?(0,o.$getNodeByKey)(this.focusCellNodeKey):null}$getFocusTableCellOrThrow(){let e=this.$getFocusTableCell();return e===null&&k(235),e}$setAnchorCellForSelection(e){this.isHighlightingCells=!1,this.anchorCell=e,this.anchorX=e.x,this.anchorY=e.y,this.focusX=-1,this.focusY=-1,this.focusCell=null,this.focusCellNodeKey=null;let{tableNode:t}=this.$lookup(),n=fi(t,e.elem);if(n!==null){let e=n.getKey();this.tableSelection==null?this.tableSelection=Er(t,n,n):(this.tableSelection=this.tableSelection.clone(),this.tableSelection.set(t.getKey(),e,e)),this.anchorCellNodeKey=e}}$formatCells(e){let t=(0,o.$getSelection)();A(t)||k(236);let n=(0,o.$createRangeSelection)(),r=n.anchor,i=n.focus,a=t.getNodes().filter(O);a.length>0||k(237);let s=a[0].getFirstChild(),c=(0,o.$isParagraphNode)(s)?s.getFormatFlags(e,null):null;a.forEach(t=>{r.set(t.getKey(),0,`element`),i.set(t.getKey(),t.getChildrenSize(),`element`),n.formatText(e,c)}),(0,o.$setSelection)(t),this.editor.dispatchCommand(o.SELECTION_CHANGE_COMMAND,void 0)}$clearText(){let{editor:e}=this,t=(0,o.$getNodeByKey)(this.tableNodeKey);if(!Si(t))throw Error(`Expected TableNode.`);let n=(0,o.$getSelection)();A(n)||k(253);let r=n.getNodes().filter(O),i=t.getFirstChild(),a=t.getLastChild();if(r.length>0&&i!==null&&a!==null&&$n(i)&&$n(a)&&r[0]===i.getFirstChild()&&r[r.length-1]===a.getLastChild()){t.selectPrevious();let n=t.getParent();t.remove(),(0,o.$isRootNode)(n)&&n.isEmpty()&&e.dispatchCommand(o.INSERT_PARAGRAPH_COMMAND,void 0);return}r.forEach(e=>{if((0,o.$isElementNode)(e)){let t=(0,o.$createParagraphNode)(),n=(0,o.$createTextNode)();t.append(n),e.append(t),e.getChildren().forEach(e=>{e!==t&&e.remove()})}}),qr(e,this.table,null),(0,o.$setSelection)(null),e.dispatchCommand(o.SELECTION_CHANGE_COMMAND,void 0)}},jr=`__lexicalTableSelection`;function Mr(e){return(0,o.isHTMLElement)(e)&&e.nodeName===`TABLE`}function Nr(e,t){if(!t)return t;let n=Mr(t)?t:t.querySelector(`table`);return Mr(n)||k(341,e.constructor.name,e.getType(),e.getKey(),t.nodeName),n}function Pr(e){return e._window}function Fr(e,t){for(let n=t,r=null;n!==null;n=n.getParent()){if(e.is(n))return r;O(n)&&(r=n)}return null}var Ir=[[o.KEY_ARROW_DOWN_COMMAND,`down`],[o.KEY_ARROW_UP_COMMAND,`up`],[o.KEY_ARROW_LEFT_COMMAND,`backward`],[o.KEY_ARROW_RIGHT_COMMAND,`forward`]],Lr=[o.DELETE_WORD_COMMAND,o.DELETE_LINE_COMMAND,o.DELETE_CHARACTER_COMMAND],Rr=[o.KEY_BACKSPACE_COMMAND,o.KEY_DELETE_COMMAND];function zr(e,t){let n=e.getRootElement(),r=e._window;if(!n||!r)return()=>{};let i=r=>{let i=r.target;if(r.button!==0||!(0,o.isDOMNode)(i)||!n.contains(i))return;let a=function(e){let t=Wr(e);if(t===null)return null;let n=t.elem;for(;n!=null;){if(n.nodeName===`TABLE`&&jr in n&&n[jr])return{cellElement:t,tableElement:n,tableObserver:n[jr]};n=n.parentNode}return null}(i);e.update(()=>{if(A((0,o.$getSelection)())){for(let[e]of t.observers.values())e.$clearHighlight(!1);(0,o.$setSelection)(null),e.dispatchCommand(o.SELECTION_CHANGE_COMMAND,void 0)}if(!a)return;let{tableObserver:n,tableElement:i,cellElement:s}=a;(function(e,t,n,r,i,a){let s=e._window;if(!s)return;let c=t=>{if(i.isSelecting)return;i.isSelecting=!0,t!==null&&i.anchorCell===null&&e.update(()=>{i.$setAnchorCellForSelection(t)});let n=()=>{i.isSelecting=!1,s.removeEventListener(`pointerup`,n),s.removeEventListener(`pointermove`,c)},c=t=>{if(!(e=>!(1&~e.buttons))(t)&&i.isSelecting)return i.isSelecting=!1,s.removeEventListener(`pointerup`,n),void s.removeEventListener(`pointermove`,c);if(!(0,o.isDOMNode)(t.target))return;let l=null,u=!(nr||r.contains(t.target));if(u)l=Gr(r,t.target);else for(let e of document.elementsFromPoint(t.clientX,t.clientY))if(l=Gr(r,e),l)break;if(l){let t=l;i.anchorCell===null&&e.update(()=>{i.$setAnchorCellForSelection(t)}),i.focusCell!==null&&l.elem===i.focusCell.elem||(a.setNextFocus({focusCell:l,override:u,tableKey:i.tableNodeKey}),e.dispatchCommand(o.SELECTION_CHANGE_COMMAND,void 0))}};s.addEventListener(`pointerup`,n,i.listenerOptions),s.addEventListener(`pointermove`,c,i.listenerOptions)};i.pointerType=t.pointerType;let l=(0,o.$getNodeByKeyOrThrow)(i.tableNodeKey),u=(0,o.$getPreviousSelection)();if(nr&&t.shiftKey&&ei(u,l)&&((0,o.$isRangeSelection)(u)||A(u))){let e=u.anchor.getNode(),r=Fr(l,u.anchor.getNode());r?(i.$setAnchorCellForSelection(di(i,r)),i.$setFocusCellForSelection(n),ci(t)):(l.isBefore(e)?l.selectStart():l.selectEnd()).anchor.set(u.anchor.key,u.anchor.offset,u.anchor.type)}else t.pointerType!==`touch`&&i.$setAnchorCellForSelection(n);c(n)})(e,r,s,i,n,t)})};return r.addEventListener(`pointerdown`,i),()=>{r.removeEventListener(`pointerdown`,i)}}function Br(e,t,n,r,i){let a=n.getRootElement(),s=Pr(n);a!==null&&s!==null||k(246);let l=new Ar(n,e.getKey()),u=Nr(e,t);(function(e,t){Ur(e)!==null&&k(205),e[jr]=t})(u,l),l.listenersToRemove.add(()=>function(e,t){Ur(e)===t&&delete e[jr]}(u,l));let d=e=>{e.detail>=3&&(0,o.isDOMNode)(e.target)&&Wr(e.target)!==null&&e.preventDefault()};u.addEventListener(`mousedown`,d,l.listenerOptions),l.listenersToRemove.add(()=>{u.removeEventListener(`mousedown`,d)});for(let[t,r]of Ir)l.listenersToRemove.add(n.registerCommand(t,t=>si(n,t,r,e,l,i),o.COMMAND_PRIORITY_HIGH));l.listenersToRemove.add(n.registerCommand(o.KEY_ESCAPE_COMMAND,t=>{let n=(0,o.$getSelection)();if(A(n)){let r=Fr(e,n.focus.getNode());if(r!==null)return ci(t),r.selectEnd(),!0}return!1},o.COMMAND_PRIORITY_HIGH));let f=t=>()=>{let n=(0,o.$getSelection)();if(!ei(n,e))return!1;if(A(n))return l.$clearText(),!0;if((0,o.$isRangeSelection)(n)){if(!O(Fr(e,n.anchor.getNode())))return!1;let r=n.anchor.getNode(),i=n.focus.getNode(),a=e.isParentOf(r),s=e.isParentOf(i);if(a&&!s||s&&!a)return l.$clearText(),!0;let u=(0,c.$findMatchingParent)(n.anchor.getNode(),e=>(0,o.$isElementNode)(e)),d=u&&(0,c.$findMatchingParent)(u,e=>(0,o.$isElementNode)(e)&&O(e.getParent()));if(!(0,o.$isElementNode)(d)||!(0,o.$isElementNode)(u))return!1;if(t===o.DELETE_LINE_COMMAND&&d.getPreviousSibling()===null)return!0}return!1};for(let e of Lr)l.listenersToRemove.add(n.registerCommand(e,f(e),o.COMMAND_PRIORITY_HIGH));let p=t=>{let n=(0,o.$getSelection)();if(!A(n)&&!(0,o.$isRangeSelection)(n))return!1;let r=e.isParentOf(n.anchor.getNode());if(r!==e.isParentOf(n.focus.getNode())){let t=r?`anchor`:`focus`,i=r?`focus`:`anchor`,{key:a,offset:o,type:s}=n[i];return e[n[t].isBefore(n[i])?`selectPrevious`:`selectNext`]()[i].set(a,o,s),!1}return!!ei(n,e)&&!!A(n)&&(t&&(t.preventDefault(),t.stopPropagation()),l.$clearText(),!0)};for(let e of Rr)l.listenersToRemove.add(n.registerCommand(e,p,o.COMMAND_PRIORITY_HIGH));return l.listenersToRemove.add(n.registerCommand(o.CUT_COMMAND,e=>{let t=(0,o.$getSelection)();if(t){if(!A(t)&&!(0,o.$isRangeSelection)(t))return!1;Fn(n,(0,c.objectKlassEquals)(e,ClipboardEvent)?e:null,Rn(t));let r=p(e);return(0,o.$isRangeSelection)(t)?(t.removeText(),!0):r}return!1},o.COMMAND_PRIORITY_HIGH)),l.listenersToRemove.add(n.registerCommand(o.FORMAT_TEXT_COMMAND,t=>{let n=(0,o.$getSelection)();return ei(n,e)?A(n)?(l.$formatCells(t),!0):((0,o.$isRangeSelection)(n)&&O((0,c.$findMatchingParent)(n.anchor.getNode(),e=>O(e))),!1):!1},o.COMMAND_PRIORITY_HIGH)),l.listenersToRemove.add(n.registerCommand(o.FORMAT_ELEMENT_COMMAND,t=>{let n=(0,o.$getSelection)();if(!A(n)||!ei(n,e))return!1;let r=n.anchor.getNode(),i=n.focus.getNode();if(!O(r)||!O(i))return!1;if(function(e,t){if(A(e)){let n=e.anchor.getNode(),r=e.focus.getNode();if(t&&n&&r){let[e]=vr(t,n,r);return n.getKey()===e[0][0].cell.getKey()&&r.getKey()===e[e.length-1].at(-1).cell.getKey()}}return!1}(n,e))return e.setFormat(t),!0;let[a,s,c]=vr(e,r,i),l=Math.max(s.startRow+s.cell.__rowSpan-1,c.startRow+c.cell.__rowSpan-1),u=Math.max(s.startColumn+s.cell.__colSpan-1,c.startColumn+c.cell.__colSpan-1),d=Math.min(s.startRow,c.startRow),f=Math.min(s.startColumn,c.startColumn),p=new Set;for(let e=d;e<=l;e++)for(let n=f;n<=u;n++){let r=a[e][n].cell;if(p.has(r))continue;p.add(r),r.setFormat(t);let i=r.getChildren();for(let e=0;e<i.length;e++){let n=i[e];(0,o.$isElementNode)(n)&&!n.isInline()&&n.setFormat(t)}}return!0},o.COMMAND_PRIORITY_HIGH)),l.listenersToRemove.add(n.registerCommand(o.CONTROLLED_TEXT_INSERTION_COMMAND,t=>{let r=(0,o.$getSelection)();if(!ei(r,e))return!1;if(A(r))return l.$clearHighlight(),!1;if((0,o.$isRangeSelection)(r)){if(!O((0,c.$findMatchingParent)(r.anchor.getNode(),e=>O(e))))return!1;if(typeof t==`string`){let i=ui(n,r,e);if(i)return li(i,e,[(0,o.$createTextNode)(t)]),!0}}return!1},o.COMMAND_PRIORITY_HIGH)),r&&l.listenersToRemove.add(n.registerCommand(o.KEY_TAB_COMMAND,t=>{let n=(0,o.$getSelection)();if(!(0,o.$isRangeSelection)(n)||!n.isCollapsed()||!ei(n,e))return!1;let r=ii(n.anchor.getNode());return!(r===null||!e.is(ai(r)))&&(ci(t),function(e,t){let n=t===`next`?`getNextSibling`:`getPreviousSibling`,r=t===`next`?`getFirstChild`:`getLastChild`,i=e[n]();if((0,o.$isElementNode)(i))return i.selectEnd();let a=(0,c.$findMatchingParent)(e,$n);a===null&&k(247);for(let e=a[n]();$n(e);e=e[n]()){let t=e[r]();if((0,o.$isElementNode)(t))return t.selectEnd()}let s=(0,c.$findMatchingParent)(a,Si);s===null&&k(248),t===`next`?s.selectNext():s.selectPrevious()}(r,t.shiftKey?`previous`:`next`),!0)},o.COMMAND_PRIORITY_HIGH)),l.listenersToRemove.add(n.registerCommand(o.FOCUS_COMMAND,t=>e.isSelected(),o.COMMAND_PRIORITY_HIGH)),l.listenersToRemove.add(n.registerCommand(o.INSERT_PARAGRAPH_COMMAND,()=>{let t=(0,o.$getSelection)();if(!(0,o.$isRangeSelection)(t)||!t.isCollapsed()||!ei(t,e))return!1;let r=ui(n,t,e);return!!r&&(li(r,e),!0)},o.COMMAND_PRIORITY_HIGH)),l}function Vr(e,t){let n=(0,o.$getSelection)(),r=(0,o.$getPreviousSelection)(),i=e.getAndClearNextFocus();if(i!==null){let{tableKey:t,focusCell:r}=i,a=e.observers.get(t);a||k(335,t);let[o]=a;if(A(n)&&n.tableKey===o.tableNodeKey)return(r.x!==o.focusX||r.y!==o.focusY)&&(o.$setFocusCellForSelection(r),!0);if(o.anchorCell!==null&&o.anchorCellNodeKey!==null&&r.elem!==o.anchorCell.elem&&o.tableSelection!==null)return o.$setFocusCellForSelection(r,!0),!0}let a=e.getAndClearShouldCheckSelectionForTable();if(a&&(0,o.$isRangeSelection)(r)&&(0,o.$isRangeSelection)(n)&&n.isCollapsed()){let e=(0,o.$getNodeByKeyOrThrow)(a),t=n.anchor.getNode(),r=e.getFirstChild(),i=ii(t);if(i!==null&&$n(r)){let t=r.getFirstChild();if(O(t)&&e.is((0,c.$findMatchingParent)(i,n=>n.is(e)||n.is(t))))return t.selectStart(),!0}}A(n)&&function(e,t){let n=Pr(e),r=(0,o.$getPreviousSelection)();if(!t.is(r))return;let i=(0,o.$getNodeByKeyOrThrow)(t.tableKey),a=(0,o.getDOMSelection)(n);if(a&&a.anchorNode&&a.focusNode){let n=(0,o.$getNearestNodeFromDOMNode)(a.focusNode),r=n&&!i.isParentOf(n),s=(0,o.$getNearestNodeFromDOMNode)(a.anchorNode),c=s&&i.isParentOf(s);if(r&&c&&a.rangeCount>0){let n=(0,o.$createRangeSelectionFromDom)(a,e);n&&(n.anchor.set(i.getKey(),t.isBackward()?i.getChildrenSize():0,`element`),a.removeAllRanges(),(0,o.$setSelection)(n))}}}(t,n),(0,o.$isRangeSelection)(n)&&function(e,t){let n=(0,o.$getPreviousSelection)(),{anchor:r,focus:i}=e,a=r.getNode(),s=i.getNode(),c=ii(a),l=ii(s),u=c?ai(c):null,d=l?ai(l):null,f=e.isBackward(),p=c&&l&&u&&d&&u.is(d),m=d&&(!u||u.isParentOf(d)),h=u&&(!d||d.isParentOf(u));if(m){let t=e.clone(),[n]=vr(d,l,l),r=n[0][0].cell,i=n[n.length-1].at(-1).cell;t.focus.set(f?r.getKey():i.getKey(),f?0:i.getChildrenSize(),`element`),(0,o.$setSelection)(t)}else if(h){let t=e.clone(),[n]=vr(u,c,c),r=n[0][0].cell,i=n[n.length-1].at(-1).cell;t.anchor.set(f?i.getKey():r.getKey(),f?i.getChildrenSize():0,`element`),(0,o.$setSelection)(t)}else if(p){let r=t.observers.get(u.getKey());r||k(335,u.getKey());let[i]=r;if(c.is(l)||(i.$setAnchorCellForSelection(di(i,c)),i.$setFocusCellForSelection(di(i,l),!0)),i.pointerType===`touch`&&i.isSelecting&&e.isCollapsed()&&(0,o.$isRangeSelection)(n)&&n.isCollapsed()){let e=ii(n.anchor.getNode());e&&!e.is(l)&&(i.$setAnchorCellForSelection(di(i,e)),i.$setFocusCellForSelection(di(i,l),!0),i.pointerType=null)}}}(n,e);let s=Array.from(e.observers.entries()).map(([e,[t]])=>({tableNode:(0,o.$getNodeByKeyOrThrow)(e),tableObserver:t}));for(let{tableNode:e,tableObserver:n}of s)Hr(t,e,n);return!1}function Hr(e,t,n){let r=(0,o.$getSelection)(),i=(0,o.$getPreviousSelection)();r&&!r.is(i)&&(A(r)||A(i))&&n.tableSelection&&!n.tableSelection.is(i)&&(A(r)&&r.tableKey===n.tableNodeKey?n.$updateTableTableSelection(r):!A(r)&&A(i)&&i.tableKey===n.tableNodeKey&&n.$updateTableTableSelection(null)),n.hasHijackedSelectionStyles&&!t.isSelected()?function(e,t){t.$enableHighlightStyle(),Jr(t.table,t=>{let n=t.elem;t.highlighted=!1,ri(e,t),n.getAttribute(`style`)||n.removeAttribute(`style`)})}(e,n):!n.hasHijackedSelectionStyles&&t.isSelected()&&function(e,t){t.$disableHighlightStyle(),Jr(t.table,t=>{t.highlighted=!0,ni(e,t)})}(e,n)}function Ur(e){return e[jr]||null}function Wr(e){let t=e;for(;t!=null;){let e=t.nodeName;if(e===`TD`||e===`TH`){let e=t._cell;return e===void 0?null:e}t=t.parentNode}return null}function Gr(e,t){if(!e.contains(t))return null;let n=null;for(let r=t;r!=null;r=r.parentNode){if(r===e)return n;let t=r.nodeName;t!==`TD`&&t!==`TH`||(n=r._cell||null)}return null}function Kr(e,t){let n=[],r={columns:0,domRows:n,rows:0},i=Nr(e,t).querySelector(`tr`),a=0,o=0;for(n.length=0;i!=null;){let e=i.nodeName;if(e===`TD`||e===`TH`){let e={elem:i,hasBackgroundColor:i.style.backgroundColor!==``,highlighted:!1,x:a,y:o};i._cell=e;let t=n[o];t===void 0&&(t=n[o]=[]),t[a]=e}else{let e=i.firstChild;if(e!=null){i=e;continue}}let t=i.nextSibling;if(t!=null){a++,i=t;continue}let r=i.parentNode;if(r!=null){let e=r.nextSibling;if(e==null)break;o++,a=0,i=e}}return r.columns=a+1,r.rows=o+1,r}function qr(e,t,n){let r=new Set(n?n.getNodes():[]);Jr(t,(t,n)=>{let i=t.elem;r.has(n)?(t.highlighted=!0,ni(e,t)):(t.highlighted=!1,ri(e,t),i.getAttribute(`style`)||i.removeAttribute(`style`))})}function Jr(e,t){let{domRows:n}=e;for(let e=0;e<n.length;e++){let r=n[e];if(r)for(let n=0;n<r.length;n++){let i=r[n];if(!i)continue;let a=(0,o.$getNearestNodeFromDOMNode)(i.elem);a!==null&&t(i,a,{x:n,y:e})}}}var Yr=(e,t,n,r,i)=>{let a=i===`forward`;switch(i){case`backward`:case`forward`:return n===(a?e.table.columns-1:0)?r===(a?e.table.rows-1:0)?a?t.selectNext():t.selectPrevious():ti(t.getCellNodeFromCordsOrThrow(a?0:e.table.columns-1,r+(a?1:-1),e.table),a):ti(t.getCellNodeFromCordsOrThrow(n+(a?1:-1),r,e.table),a),!0;case`up`:return r===0?t.selectPrevious():ti(t.getCellNodeFromCordsOrThrow(n,r-1,e.table),!1),!0;case`down`:return r===e.table.rows-1?t.selectNext():ti(t.getCellNodeFromCordsOrThrow(n,r+1,e.table),!0),!0;default:return!1}};function Xr(e,t){let n,r;if(t.startColumn===e.minColumn)n=`minColumn`;else{if(t.startColumn+t.cell.__colSpan-1!==e.maxColumn)return null;n=`maxColumn`}if(t.startRow===e.minRow)r=`minRow`;else{if(t.startRow+t.cell.__rowSpan-1!==e.maxRow)return null;r=`maxRow`}return[n,r]}function Zr([e,t]){return[e===`minColumn`?`maxColumn`:`minColumn`,t===`minRow`?`maxRow`:`minRow`]}function Qr(e,t,[n,r]){let i=t[r],a=e[i];a===void 0&&k(250,r,String(i));let o=t[n],s=a[o];return s===void 0&&k(250,n,String(o)),s}function $r(e,t,n,r,i){let a=xr(t,n,r),{topSpan:o,leftSpan:s,bottomSpan:c,rightSpan:l}=function(e,t){let{minColumn:n,maxColumn:r,minRow:i,maxRow:a}=t,o=1,s=1,c=1,l=1,u=e[i],d=e[a];for(let e=n;e<=r;e++)o=Math.max(o,u[e].cell.__rowSpan),l=Math.max(l,d[e].cell.__rowSpan);for(let t=i;t<=a;t++)s=Math.max(s,e[t][n].cell.__colSpan),c=Math.max(c,e[t][r].cell.__colSpan);return{bottomSpan:l,leftSpan:s,rightSpan:c,topSpan:o}}(t,a),[u,d]=Zr(function(e,t){let n=Xr(e,t);return n===null&&k(249,t.cell.getKey()),n}(a,n)),f=a[u],p=a[d];i===`forward`?f+=u===`maxColumn`?1:s:i===`backward`?f-=u===`minColumn`?1:l:i===`down`?p+=d===`maxRow`?1:o:i===`up`&&(p-=d===`minRow`?1:c);let m=t[p];if(m===void 0)return!1;let h=m[f];if(h===void 0)return!1;let[g,_]=function(e,t,n){let r=xr(e,t,n),i=Xr(r,t);if(i)return[Qr(e,r,i),Qr(e,r,Zr(i))];let a=Xr(r,n);if(a)return[Qr(e,r,Zr(a)),Qr(e,r,a)];let o=[`minColumn`,`minRow`];return[Qr(e,r,o),Qr(e,r,Zr(o))]}(t,n,h),v=di(e,g.cell),y=di(e,_.cell);return e.$setAnchorCellForSelection(v),e.$setFocusCellForSelection(y,!0),!0}function ei(e,t){if((0,o.$isRangeSelection)(e)||A(e)){let n=t.isParentOf(e.anchor.getNode()),r=t.isParentOf(e.focus.getNode());return n&&r}return!1}function ti(e,t){t?e.selectStart():e.selectEnd()}function ni(e,t){let n=t.elem,r=e._config.theme;O((0,o.$getNearestNodeFromDOMNode)(n))||k(131),(0,c.addClassNamesToElement)(n,r.tableCellSelected)}function ri(e,t){let n=t.elem;O((0,o.$getNearestNodeFromDOMNode)(n))||k(131);let r=e._config.theme;(0,c.removeClassNamesFromElement)(n,r.tableCellSelected)}function ii(e){let t=(0,c.$findMatchingParent)(e,O);return O(t)?t:null}function ai(e){let t=(0,c.$findMatchingParent)(e,Si);return Si(t)?t:null}function oi(e,t,n,r,i,a,s){let l=(0,o.$caretFromPoint)(n.focus,i?`previous`:`next`);if((0,o.$isExtendableTextPointCaret)(l))return!1;let u=l;for(let e of(0,o.$extendCaretToRange)(l).iterNodeCarets(`shadowRoot`)){if(!(0,o.$isSiblingCaret)(e)||!(0,o.$isElementNode)(e.origin))return!1;u=e}let d=u.getParentAtCaret();if(!O(d))return!1;let f=d,p=function(e){for(let t of(0,o.$extendCaretToRange)(e).iterNodeCarets(`root`)){let{origin:n}=t;if(O(n)){if((0,o.$isChildCaret)(t))return(0,o.$getChildCaret)(n,e.direction)}else if(!$n(n))break}return null}((0,o.$getSiblingCaret)(f,u.direction)),m=(0,c.$findMatchingParent)(f,Si);if(!m||!m.is(a))return!1;let h=e.getElementByKey(f.getKey()),g=Wr(h);if(!h||!g)return!1;if(s.table=yi(e,m),p)if(r===`extend`){let t=Wr(e.getElementByKey(p.origin.getKey()));if(!t)return!1;s.$setAnchorCellForSelection(g),s.$setFocusCellForSelection(t,!0)}else{let e=(0,o.$normalizeCaret)(p);(0,o.$setPointFromCaret)(n.anchor,e),(0,o.$setPointFromCaret)(n.focus,e)}else if(r===`extend`)s.$setAnchorCellForSelection(g),s.$setFocusCellForSelection(g,!0);else{let e=function(e){let t=(0,o.$getAdjacentChildCaret)(e);return(0,o.$isChildCaret)(t)?(0,o.$normalizeCaret)(t):e}((0,o.$getSiblingCaret)(m,l.direction));(0,o.$setPointFromCaret)(n.anchor,e),(0,o.$setPointFromCaret)(n.focus,e)}return ci(t),!0}function si(e,t,n,r,i,a){if((n===`up`||n===`down`)&&function(e){let t=e.getRootElement();return t?t.hasAttribute(`aria-controls`)&&t.getAttribute(`aria-controls`)===`typeahead-menu`:!1}(e))return!1;let s=(0,o.$getSelection)();if(!ei(s,r)){if((0,o.$isRangeSelection)(s)){if(n===`backward`){if(s.focus.offset>0)return!1;let e=function(e){for(let t=e,n=e;n!==null;t=n,n=n.getParent())if((0,o.$isElementNode)(n)){if(n!==t&&n.getFirstChild()!==t)return null;if(!n.isInline())return n}return null}(s.focus.getNode());if(!e)return!1;let n=e.getPreviousSibling();return!!Si(n)&&(ci(t),t.shiftKey?s.focus.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent(),`element`):n.selectEnd(),!0)}if(t.shiftKey&&(n===`up`||n===`down`)){let e=s.focus.getNode();if(!s.isCollapsed()&&(n===`up`&&!s.isBackward()||n===`down`&&s.isBackward())){let i=(0,c.$findMatchingParent)(e,e=>Si(e));if(O(i)&&(i=(0,c.$findMatchingParent)(i,Si)),i!==r||!i)return!1;let a=n===`down`?i.getNextSibling():i.getPreviousSibling();if(!a)return!1;let l=0;n===`up`&&(0,o.$isElementNode)(a)&&(l=a.getChildrenSize());let u=a;n===`up`&&(0,o.$isElementNode)(a)&&(u=a.getLastChild()||a,l=(0,o.$isTextNode)(u)?u.getTextContentSize():0);let d=s.clone();return d.focus.set(u.getKey(),l,(0,o.$isTextNode)(u)?`text`:`element`),(0,o.$setSelection)(d),ci(t),!0}if((0,o.$isRootOrShadowRoot)(e)){let e=n===`up`?s.getNodes()[s.getNodes().length-1]:s.getNodes()[0];if(e&&Fr(r,e)!==null){let e=r.getFirstDescendant(),t=r.getLastDescendant();if(!e||!t)return!1;let[n]=br(e),[a]=br(t),o=r.getCordsFromCellNode(n,i.table),s=r.getCordsFromCellNode(a,i.table),c=r.getDOMCellFromCordsOrThrow(o.x,o.y,i.table),l=r.getDOMCellFromCordsOrThrow(s.x,s.y,i.table);return i.$setAnchorCellForSelection(c),i.$setFocusCellForSelection(l,!0),!0}return!1}{let r=(0,c.$findMatchingParent)(e,e=>(0,o.$isElementNode)(e)&&!e.isInline());if(O(r)&&(r=(0,c.$findMatchingParent)(r,Si)),!r)return!1;let a=n===`down`?r.getNextSibling():r.getPreviousSibling();if(Si(a)&&i.tableNodeKey===a.getKey()){let e=a.getFirstDescendant(),r=a.getLastDescendant();if(!e||!r)return!1;let[i]=br(e),[c]=br(r),l=s.clone();return l.focus.set((n===`up`?i:c).getKey(),n===`up`?0:c.getChildrenSize(),`element`),ci(t),(0,o.$setSelection)(l),!0}}}}return n===`down`&&gi(e)&&a.setShouldCheckSelectionForTable(r.getKey()),!1}if((0,o.$isRangeSelection)(s)){if(n===`backward`||n===`forward`)return oi(e,t,s,t.shiftKey?`extend`:`move`,n===`backward`,r,i);if(s.isCollapsed()){let{anchor:l,focus:u}=s,d=(0,c.$findMatchingParent)(l.getNode(),O),f=(0,c.$findMatchingParent)(u.getNode(),O);if(!O(d)||!d.is(f))return!1;let p=ai(d);if(p!==r&&p!=null){let r=Nr(p,e.getElementByKey(p.getKey()));if(r!=null)return i.table=Kr(p,r),si(e,t,n,p,i,a)}let m=e.getElementByKey(d.__key),h=e.getElementByKey(l.key);if(h==null||m==null)return!1;let g;if(l.type===`element`)g=h.getBoundingClientRect();else{let t=(0,o.getDOMSelection)(Pr(e));if(t===null||t.rangeCount===0)return!1;g=t.getRangeAt(0).getBoundingClientRect()}let _=n===`up`?d.getFirstChild():d.getLastChild();if(_==null)return!1;let v=e.getElementByKey(_.__key);if(v==null)return!1;let y=v.getBoundingClientRect();if(n===`up`?y.top>g.top-g.height:g.bottom+g.height>y.bottom){ci(t);let e=r.getCordsFromCellNode(d,i.table);if(!t.shiftKey)return Yr(i,r,e.x,e.y,n);{let t=r.getDOMCellFromCordsOrThrow(e.x,e.y,i.table);i.$setAnchorCellForSelection(t),i.$setFocusCellForSelection(t,!0)}return!0}}}else if(A(s)){let{anchor:a,focus:o}=s,l=(0,c.$findMatchingParent)(a.getNode(),O),u=(0,c.$findMatchingParent)(o.getNode(),O),[d]=s.getNodes();Si(d)||k(251);let f=Nr(d,e.getElementByKey(d.getKey()));if(!O(l)||!O(u)||!Si(d)||f==null)return!1;i.$updateTableTableSelection(s);let p=Kr(d,f),m=r.getCordsFromCellNode(l,p),h=r.getDOMCellFromCordsOrThrow(m.x,m.y,p);if(i.$setAnchorCellForSelection(h),ci(t),t.shiftKey){let[e,t,a]=vr(r,l,u);return $r(i,e,t,a,n)}return u.selectEnd(),!0}return!1}function ci(e){e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation()}function li(e,t,n){let r=(0,o.$createParagraphNode)();e===`first`?t.insertBefore(r):t.insertAfter(r),r.append(...n||[]),r.selectEnd()}function ui(e,t,n){let r=n.getParent();if(!r)return;let i=(0,o.getDOMSelection)(Pr(e));if(!i)return;let a=i.anchorNode,s=e.getElementByKey(r.getKey()),l=Nr(n,e.getElementByKey(n.getKey()));if(!a||!s||!l||!s.contains(a)||l.contains(a))return;let u=(0,c.$findMatchingParent)(t.anchor.getNode(),e=>O(e));if(!u)return;let d=(0,c.$findMatchingParent)(u,e=>Si(e));if(!Si(d)||!d.is(n))return;let[f,p]=vr(n,u,u),m=f[0][0],h=f[f.length-1][f[0].length-1],{startRow:g,startColumn:_}=p,v=g===m.startRow&&_===m.startColumn,y=g===h.startRow&&_===h.startColumn;return v?`first`:y?`last`:void 0}function di(e,t){let{tableNode:n}=e.$lookup(),r=n.getCordsFromCellNode(t,e.table);return n.getDOMCellFromCordsOrThrow(r.x,r.y,e.table)}function fi(e,t,n){return Fr(e,(0,o.$getNearestNodeFromDOMNode)(t,n))}function pi(e,t,n){let r=e.querySelector(`colgroup`);if(!r)return;let i=[];for(let e=0;e<t;e++){let t=document.createElement(`col`),r=n&&n[e];r&&(t.style.width=`${r}px`),i.push(t)}r.replaceChildren(...i)}function mi(e,t,n){if(!t.theme.tableAlignment)return;let r=[],i=[];for(let e of[`center`,`right`]){let a=t.theme.tableAlignment[e];a&&(e===n?i:r).push(a)}(0,c.removeClassNamesFromElement)(e,...r),(0,c.addClassNamesToElement)(e,...i)}var hi=new WeakSet;function gi(e=(0,o.$getEditor)()){return hi.has(e)}function _i(e,t){t?hi.add(e):hi.delete(e)}var vi=class e extends o.ElementNode{__rowStriping;__frozenColumnCount;__frozenRowCount;__colWidths;static getType(){return`table`}getColWidths(){return this.getLatest().__colWidths}setColWidths(e){let t=this.getWritable();return t.__colWidths=e,t}static clone(t){return new e(t.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__colWidths=e.__colWidths,this.__rowStriping=e.__rowStriping,this.__frozenColumnCount=e.__frozenColumnCount,this.__frozenRowCount=e.__frozenRowCount}static importDOM(){return{table:e=>({conversion:bi,priority:1})}}static importJSON(e){return xi().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setRowStriping(e.rowStriping||!1).setFrozenColumns(e.frozenColumnCount||0).setFrozenRows(e.frozenRowCount||0).setColWidths(e.colWidths)}constructor(e){super(e),this.__rowStriping=!1,this.__frozenColumnCount=0,this.__frozenRowCount=0,this.__colWidths=void 0}exportJSON(){return{...super.exportJSON(),colWidths:this.getColWidths(),frozenColumnCount:this.__frozenColumnCount?this.__frozenColumnCount:void 0,frozenRowCount:this.__frozenRowCount?this.__frozenRowCount:void 0,rowStriping:this.__rowStriping?this.__rowStriping:void 0}}extractWithChild(e,t,n){return n===`html`}getDOMSlot(e){let t=Mr(e)?e:e.querySelector(`table`);return Mr(t)||k(229),super.getDOMSlot(e).withElement(t).withAfter(t.querySelector(`colgroup`))}createDOM(e,t){let n=document.createElement(`table`);this.__style&&(0,o.setDOMStyleFromCSS)(n.style,this.__style);let r=document.createElement(`colgroup`);if(n.appendChild(r),(0,o.setDOMUnmanaged)(r),(0,c.addClassNamesToElement)(n,e.theme.table),this.updateTableElement(null,n,e),gi(t)){let t=document.createElement(`div`),r=e.theme.tableScrollableWrapper;return r?(0,c.addClassNamesToElement)(t,r):t.style.overflowX=`auto`,t.appendChild(n),this.updateTableWrapper(null,t,n,e),t}return n}updateTableWrapper(e,t,n,r){this.__frozenColumnCount!==(e?e.__frozenColumnCount:0)&&function(e,t,n,r){r>0?((0,c.addClassNamesToElement)(e,n.theme.tableFrozenColumn),t.setAttribute(`data-lexical-frozen-column`,`true`)):((0,c.removeClassNamesFromElement)(e,n.theme.tableFrozenColumn),t.removeAttribute(`data-lexical-frozen-column`))}(t,n,r,this.__frozenColumnCount),this.__frozenRowCount!==(e?e.__frozenRowCount:0)&&function(e,t,n,r){r>0?((0,c.addClassNamesToElement)(e,n.theme.tableFrozenRow),t.setAttribute(`data-lexical-frozen-row`,`true`)):((0,c.removeClassNamesFromElement)(e,n.theme.tableFrozenRow),t.removeAttribute(`data-lexical-frozen-row`))}(t,n,r,this.__frozenRowCount)}updateTableElement(e,t,n){this.__style!==(e?e.__style:``)&&(0,o.setDOMStyleFromCSS)(t.style,this.__style,e?e.__style:``),this.__rowStriping!==(!!e&&e.__rowStriping)&&function(e,t,n){n?((0,c.addClassNamesToElement)(e,t.theme.tableRowStriping),e.setAttribute(`data-lexical-row-striping`,`true`)):((0,c.removeClassNamesFromElement)(e,t.theme.tableRowStriping),e.removeAttribute(`data-lexical-row-striping`))}(t,n,this.__rowStriping);let r=e?e.getColumnCount():0,i=e?e.__colWidths:void 0;this.getColumnCount()===r&&this.getColWidths()===i||pi(t,this.getColumnCount(),this.getColWidths()),mi(t,n,this.getFormatType())}updateDOM(e,t,n){let r=Nr(this,t);return t===r===gi()||((0,c.isHTMLElement)(i=t)&&i.nodeName===`DIV`&&this.updateTableWrapper(e,t,r,n),this.updateTableElement(e,r,n),!1);var i}scaleDOMColWidths(e,t){let n=this.getColWidths();n&&pi(Nr(this,e),this.getColumnCount(),n.map(e=>e*t))}exportDOM(e){let t=super.exportDOM(e),{element:n}=t;return{after:n=>{if(t.after&&(n=t.after(n)),!Mr(n)&&(0,c.isHTMLElement)(n)&&(n=n.querySelector(`table`)),!Mr(n))return null;mi(n,e._config,this.getFormatType());let[r]=yr(this,null,null),i=new Map;for(let e of r)for(let t of e){let e=t.cell.getKey();i.has(e)||i.set(e,{colSpan:t.cell.getColSpan(),startColumn:t.startColumn})}let a=new Set;for(let e of n.querySelectorAll(`:scope > tr > [data-temporary-table-cell-lexical-key]`)){let t=e.getAttribute(`data-temporary-table-cell-lexical-key`);if(t){let n=i.get(t);if(e.removeAttribute(`data-temporary-table-cell-lexical-key`),n){i.delete(t);for(let e=0;e<n.colSpan;e++)a.add(e+n.startColumn)}}}let o=n.querySelector(`:scope > colgroup`);if(o){let e=Array.from(n.querySelectorAll(`:scope > colgroup > col`)).filter((e,t)=>a.has(t));o.replaceChildren(...e)}let s=n.querySelectorAll(`:scope > tr`);if(s.length>0){let e=document.createElement(`tbody`);for(let t of s)e.appendChild(t);n.append(e)}return n},element:!Mr(n)&&(0,c.isHTMLElement)(n)?n.querySelector(`table`):n}}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(e,t){let{rows:n,domRows:r}=t;for(let t=0;t<n;t++){let n=r[t];if(n!=null)for(let r=0;r<n.length;r++){let i=n[r];if(i==null)continue;let{elem:a}=i,o=fi(this,a);if(o!==null&&e.is(o))return{x:r,y:t}}}throw Error(`Cell not found in table.`)}getDOMCellFromCords(e,t,n){let{domRows:r}=n,i=r[t];return i==null?null:i[e<i.length?e:i.length-1]??null}getDOMCellFromCordsOrThrow(e,t,n){let r=this.getDOMCellFromCords(e,t,n);if(!r)throw Error(`Cell not found at cords.`);return r}getCellNodeFromCords(e,t,n){let r=this.getDOMCellFromCords(e,t,n);if(r==null)return null;let i=(0,o.$getNearestNodeFromDOMNode)(r.elem);return O(i)?i:null}getCellNodeFromCordsOrThrow(e,t,n){let r=this.getCellNodeFromCords(e,t,n);if(!r)throw Error(`Node at cords not TableCellNode.`);return r}getRowStriping(){return!!this.getLatest().__rowStriping}setRowStriping(e){let t=this.getWritable();return t.__rowStriping=e,t}setFrozenColumns(e){let t=this.getWritable();return t.__frozenColumnCount=e,t}getFrozenColumns(){return this.getLatest().__frozenColumnCount}setFrozenRows(e){let t=this.getWritable();return t.__frozenRowCount=e,t}getFrozenRows(){return this.getLatest().__frozenRowCount}canSelectBefore(){return!0}canIndent(){return!1}getColumnCount(){let e=this.getFirstChild();if(!e)return 0;let t=0;return e.getChildren().forEach(e=>{O(e)&&(t+=e.getColSpan())}),t}};function yi(e,t){let n=e.getElementByKey(t.getKey());return n===null&&k(230),Kr(t,n)}function bi(e){let t=xi();e.hasAttribute(`data-lexical-row-striping`)&&t.setRowStriping(!0),e.hasAttribute(`data-lexical-frozen-column`)&&t.setFrozenColumns(1),e.hasAttribute(`data-lexical-frozen-row`)&&t.setFrozenRows(1);let n=e.querySelector(`:scope > colgroup`);if(n){let e=[];for(let t of n.querySelectorAll(`:scope > col`)){let n=t.style.width||``;if(!Un.test(n)&&(n=t.getAttribute(`width`)||``,!/^\d+$/.test(n))){e=void 0;break}e.push(parseFloat(n))}e&&t.setColWidths(e)}return{after:e=>(0,c.$descendantsMatching)(e,$n),node:t}}function xi(){return(0,o.$applyNodeReplacement)(new vi)}function Si(e){return e instanceof vi}function Ci(e){$n(e.getParent())?e.isEmpty()&&e.append((0,o.$createParagraphNode)()):e.remove()}function wi(e){Si(e.getParent())?(0,c.$unwrapAndFilterDescendants)(e,O):e.remove()}function Ti(e){(0,c.$unwrapAndFilterDescendants)(e,$n);let[t]=yr(e,null,null),n=t.reduce((e,t)=>Math.max(e,t.length),0),r=e.getChildren();for(let e=0;e<t.length;++e){let i=r[e];if(!i)continue;$n(i)||k(254,i.constructor.name,i.getType());let a=t[e].reduce((e,t)=>t?1+e:e,0);if(a!==n)for(let e=a;e<n;++e){let e=Jn();e.append((0,o.$createParagraphNode)()),i.append(e)}}let i=e.getColWidths(),a=e.getColumnCount();if(i&&i.length!==a){let t;if(a<i.length)t=i.slice(0,a);else if(i.length>0){let e=i[i.length-1];t=[...i,...Array(a-i.length).fill(e)]}e.setColWidths(t)}}function Ei(e){if(e.detail<3||!(0,o.isDOMNode)(e.target))return!1;let t=(0,o.$getNearestNodeFromDOMNode)(e.target);if(t===null)return!1;let n=(0,c.$findMatchingParent)(t,e=>(0,o.$isElementNode)(e)&&!e.isInline());return n===null?!1:!!O(n.getParent())&&(n.select(0),!0)}function Di(){let e=(0,o.$getSelection)();if(!(0,o.$isRangeSelection)(e))return!1;let t=ai(e.anchor.getNode());if(t===null)return!1;let n=(0,o.$getRoot)();if(!n.is(t.getParent())||n.getChildrenSize()!==1)return!1;let[r]=yr(t,null,null);if(r.length===0||r[0].length===0)return!1;let i=r[0][0];if(!i||!i.cell)return!1;let a=r[r.length-1],s=a[a.length-1];return!s||!s.cell?!1:((0,o.$setSelection)(Er(t,i.cell,s.cell)),!0)}function Oi(e){return e.registerNodeTransform(Gn,e=>{if(e.getColSpan()>1||e.getRowSpan()>1){let[,,t]=br(e),[n]=vr(t,e,e),r=n.length,i=n[0].length,a=t.getFirstChild();$n(a)||k(175);let o=[];for(let e=0;e<r;e++){e!==0&&(a=a.getNextSibling(),$n(a)||k(175));let t=null;for(let r=0;r<i;r++){let i=n[e][r],s=i.cell;if(i.startRow===e&&i.startColumn===r)t=s,o.push(s);else if(s.getColSpan()>1||s.getRowSpan()>1){O(s)||k(176);let e=Jn(s.__headerState);t===null?(0,c.$insertFirst)(a,e):t.insertAfter(e)}}}for(let e of o)e.setColSpan(1),e.setRowSpan(1)}})}function ki(e,t=!0){let n=new kr,r=(r,i,a)=>{let o=Nr(r,a),s=Br(r,o,e,t,n);n.observers.set(i,[s,o])};return(0,c.mergeRegister)(zr(e,n),e.registerCommand(o.SELECTION_CHANGE_COMMAND,()=>Vr(n,e),o.COMMAND_PRIORITY_HIGH),e.registerMutationListener(vi,t=>{e.getEditorState().read(()=>{for(let[e,i]of t){let t=n.observers.get(e);if(i===`created`||i===`updated`){let{tableNode:i,tableElement:a}=Or(e);t===void 0?r(i,e,a):a!==t[1]&&(t[0].removeListeners(),n.observers.delete(e),r(i,e,a))}else i===`destroyed`&&t!==void 0&&(t[0].removeListeners(),n.observers.delete(e))}},{editor:e})},{skipInitialization:!1}),()=>{for(let[,[e]]of n.observers)e.removeListeners()})}function Ai(e,t){e.hasNodes([vi])||k(255);let{hasNestedTables:n=Xe(!1)}=t??{};return(0,c.mergeRegister)(e.registerCommand(Yn,e=>function({rows:e,columns:t,includeHeaders:n},r){let i=(0,o.$getSelection)()||(0,o.$getPreviousSelection)();if(!i||!(0,o.$isRangeSelection)(i)||!r&&ai(i.anchor.getNode()))return!1;let a=rr(Number(e),Number(t),n);(0,c.$insertNodeToNearestRoot)(a);let s=a.getFirstDescendant();return(0,o.$isTextNode)(s)&&s.select(),!0}(e,n.peek()),o.COMMAND_PRIORITY_EDITOR),e.registerCommand(o.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND,(t,r)=>e===r&&function(e,t){let{nodes:n,selection:r}=e;if(!n.some(e=>Si(e)||(0,c.$dfs)(e).some(e=>Si(e.node))))return!1;let i=A(r),a=(0,o.$isRangeSelection)(r);return a&&(0,c.$findMatchingParent)(r.anchor.getNode(),e=>O(e))!==null&&(0,c.$findMatchingParent)(r.focus.getNode(),e=>O(e))!==null||i?n.length===1&&Si(n[0])?function(e,t){let n=t.getStartEndPoints(),r=A(t);if(n===null)return!1;let[i,a]=n,[s,l,u]=br(i),d=(0,c.$findMatchingParent)(a.getNode(),e=>O(e));if(!(O(s)&&O(d)&&$n(l)&&Si(u)))return!1;let[f,p,m]=vr(u,s,d),[h]=yr(e,null,null),g=f.length,_=g>0?f[0].length:0,v=p.startRow,y=p.startColumn,b=h.length,x=b>0?h[0].length:0;if(r){let e=xr(f,p,m),t=e.maxRow-e.minRow+1,n=e.maxColumn-e.minColumn+1;v=e.minRow,y=e.minColumn,b=Math.min(b,t),x=Math.min(x,n)}let S=!1,C=Math.min(g,v+b)-1,ee=Math.min(_,y+x)-1,te=new Set;for(let e=v;e<=C;e++)for(let t=y;t<=ee;t++){let n=f[e][t];te.has(n.cell.getKey())||n.cell.__rowSpan===1&&n.cell.__colSpan===1||(_r(n.cell),te.add(n.cell.getKey()),S=!0)}let[w]=yr(u.getWritable(),null,null),ne=b-g+v;for(let e=0;e<ne;e++)sr(w[g-1][0].cell);let re=x-_+y;for(let e=0;e<re;e++)lr(w[0][_-1].cell,!0,!1);[w]=yr(u.getWritable(),null,null);for(let e=v;e<v+b;e++)for(let t=y;t<y+x;t++){let n=e-v,r=t-y,i=h[n][r];if(i.startRow!==n||i.startColumn!==r)continue;let a=i.cell;if(a.__rowSpan!==1||a.__colSpan!==1){let n=[],r=Math.min(e+a.__rowSpan,v+b)-1,i=Math.min(t+a.__colSpan,y+x)-1;for(let a=e;a<=r;a++)for(let e=t;e<=i;e++){let t=w[a][e];n.push(t.cell)}mr(n),S=!0}let{cell:s}=w[e][t],c=a.getBackgroundColor();c!=null&&s.setBackgroundColor(c);let l=s.getChildren();a.getChildren().forEach(e=>{(0,o.$isTextNode)(e)&&(0,o.$createParagraphNode)().append(e),s.append(e)}),l.forEach(e=>e.remove())}if(r&&S){let[e]=yr(u.getWritable(),null,null);e[p.startRow][p.startColumn].cell.selectEnd()}return!0}(n[0],r):!(a&&t.peek()&&!function(e){return!!(A(e)&&!e.focus.getNode().is(e.anchor.getNode())||(0,o.$isRangeSelection)(e)&&O(e.anchor.getNode())&&!e.anchor.getNode().is(e.focus.getNode()))}(r)):!1}(t,n),o.COMMAND_PRIORITY_EDITOR),e.registerCommand(o.SELECT_ALL_COMMAND,Di,o.COMMAND_PRIORITY_LOW),e.registerCommand(o.CLICK_COMMAND,Ei,o.COMMAND_PRIORITY_EDITOR),e.registerNodeTransform(vi,Ti),e.registerNodeTransform(Xn,wi),e.registerNodeTransform(Gn,Ci))}(0,o.defineExtension)({build:(e,t,n)=>st(t),config:(0,o.safeCast)({hasCellBackgroundColor:!0,hasCellMerge:!0,hasHorizontalScroll:!0,hasNestedTables:!1,hasTabHandler:!0}),name:`@lexical/table/Table`,nodes:()=>[vi,Xn,Gn],register(e,t,n){let r=n.getOutput();return(0,c.mergeRegister)(ot(()=>{let t=r.hasHorizontalScroll.value;gi(e)!==t&&(_i(e,t),e.registerNodeTransform(vi,()=>{})())}),Ai(e,r),ot(()=>ki(e,r.hasTabHandler.value)),ot(()=>r.hasCellMerge.value?void 0:Oi(e)),ot(()=>r.hasCellBackgroundColor.value?void 0:e.registerNodeTransform(Gn,e=>{e.getBackgroundColor()!==null&&e.setBackgroundColor(null)})))}});function ji(e,t){return e.getEditorState().read(()=>{let e=(0,o.$getNodeByKey)(t);return e!==null&&e.isSelected()})}function Mi(e){let[t]=(0,f.useLexicalComposerContext)(),[n,i]=(0,r.useState)(()=>ji(t,e));return(0,r.useEffect)(()=>{let n=!0,r=t.registerUpdateListener(()=>{n&&i(ji(t,e))});return()=>{n=!1,r()}},[t,e]),[n,(0,r.useCallback)(n=>{t.update(()=>{let t=(0,o.$getSelection)();(0,o.$isNodeSelection)(t)||(t=(0,o.$createNodeSelection)(),(0,o.$setSelection)(t)),(0,o.$isNodeSelection)(t)&&(n?t.add(e):t.delete(e))})},[t,e]),(0,r.useCallback)(()=>{t.update(()=>{let e=(0,o.$getSelection)();(0,o.$isNodeSelection)(e)&&e.clear()})},[t])]}function Ni(e,t,n){return typeof t==`number`&&e<t?t:typeof n==`number`&&e>n?n:e}function Pi(e,t){if(!t||e===``)return e;let n=e.endsWith(`.`),[r,i]=e.split(`.`),a=r.replace(/\B(?=(\d{3})+(?!\d))/g,` `);return typeof i==`string`?`${a}.${i}`:n?`${a}.`:a}function Fi(){return typeof navigator>`u`?!1:/Mac|iPhone|iPad|iPod/i.test(navigator.platform)}function Ii(e,t){return`${e.replace(/\bMOD\b/g,Fi()?`CMD`:`CTRL`)} | ${t}`}var Li=/^[a-zA-Z0-9_-]{11}$/;function Ri(e){let t=e.trim();if(Li.test(t))return t;try{let e=new URL(t),n=e.hostname.replace(/^www\./,``);if(n===`youtu.be`){let t=e.pathname.split(`/`).filter(Boolean)[0];return t&&Li.test(t)?t:null}if(n===`youtube.com`||n===`m.youtube.com`||n===`youtube-nocookie.com`){let t=e.searchParams.get(`v`);if(t&&Li.test(t))return t;let[,n,r]=e.pathname.split(`/`);if([`embed`,`live`,`shorts`].includes(n)&&r&&Li.test(r))return r}}catch{return null}return null}function zi(e,t,n){let r=e.replace(/,/g,`.`).replace(/\s/g,``),i=``,a=!1,o=0;for(let e of r){if(/\d/.test(e)){if(a){if(o>=t)continue;o+=1}i+=e;continue}!n&&e===`.`&&!a&&(a=!0,i+=e)}return i}var Bi={borderCollapse:`collapse`,tableLayout:`fixed`,width:`100%`},Vi={border:`1px solid var(--rj-editor-table-border, #cbd5e1)`,minWidth:`80px`,padding:`8px 10px`},Hi=`rgb(242, 243, 245)`,Ui=`var(--rj-editor-table-header-bg, #f1f5f9)`;function Wi(e,t){Object.entries(t).forEach(([t,n])=>{typeof n==`string`&&e.style.setProperty(t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),n)})}function Gi(e,t,n){n===`square`&&t===`left`&&(e.style.float=`left`,e.style.margin=`4px 16px 10px 0`),n===`square`&&t===`right`&&(e.style.float=`right`,e.style.margin=`4px 0 10px 16px`),n!==`square`&&t===`center`&&(e.style.marginLeft=`auto`,e.style.marginRight=`auto`),n!==`square`&&t===`right`&&(e.style.marginLeft=`auto`,e.style.marginRight=`0`),n!==`square`&&t===`left`&&(e.style.marginLeft=`0`,e.style.marginRight=`auto`)}function Ki(e,t){let n=e.createElement(`span`);return n.className=`rj-editor-image-caption`,n.textContent=t,n.style.color=`var(--rj-editor-muted-text, #64748b)`,n.style.display=`block`,n.style.font=`500 12px/1.35 system-ui, sans-serif`,n.style.marginTop=`6px`,n.style.textAlign=`center`,n.style.width=`100%`,n}function qi(e,t,n){let r=n?.trim();if(!r)return t;let i=e.createElement(`a`);return i.href=r,i.rel=`noreferrer`,i.target=`_blank`,i.style.color=`inherit`,i.style.display=`block`,i.style.textDecoration=`none`,t.replaceWith(i),i.append(t),i}function Ji(e,t){let n=t.getAttribute(`data-caption`)?.trim();if(!n)return!1;let r=t.getAttribute(`data-alignment`),i=t.getAttribute(`data-text-wrap`),a=e.createElement(`span`);return a.setAttribute(`data-rj-image-caption-wrapper`,`true`),a.style.display=`block`,a.style.maxWidth=`100%`,a.style.width=t.style.width||`fit-content`,Gi(a,r,i),t.style.float=``,t.style.margin=`0`,t.style.width=`100%`,t.replaceWith(a),a.append(qi(e,t,t.getAttribute(`data-link-url`)),Ki(e,n)),!0}function Yi(e){return(Number(e||0)%360+360)%360}function Xi(e,t,n){let r=t.getAttribute(`data-rj-image-node-key`),i=Yi(t.getAttribute(`data-rotation`));if(!r||i!==90&&i!==270)return!1;let a=(n?.getElementByKey(r))?.querySelector(`.rj-editor-image-rotator`);if(!(a instanceof HTMLElement))return!1;let o=a.getBoundingClientRect(),s=a.offsetWidth,c=a.offsetHeight;if(!o.width||!o.height||!s||!c)return!1;let l=t.getAttribute(`data-alignment`),u=t.getAttribute(`data-caption`)?.trim(),d=t.getAttribute(`data-link-url`),f=t.getAttribute(`data-text-wrap`),p=e.createElement(`span`),m=e.createElement(`span`);return m.setAttribute(`data-rj-image-rotation-wrapper`,`true`),m.style.display=`block`,m.style.height=`${Math.ceil(o.height)}px`,m.style.maxWidth=`100%`,m.style.position=`relative`,m.style.width=`${Math.ceil(o.width)}px`,Gi(m,l,f),p.style.display=`block`,p.style.height=`${Math.ceil(o.height)}px`,p.style.position=`relative`,p.style.width=`${Math.ceil(o.width)}px`,t.style.display=`block`,t.style.float=``,t.style.height=`${c}px`,t.style.left=`50%`,t.style.margin=`0`,t.style.maxWidth=`none`,t.style.position=`absolute`,t.style.top=`50%`,t.style.transform=`translate(-50%, -50%) rotate(${i}deg)`,t.style.transformOrigin=`center`,t.style.width=`${s}px`,t.replaceWith(m),p.append(qi(e,t,d)),m.append(p),u&&m.append(Ki(e,u)),!0}function Zi(e,t){if(!e.trim()||typeof DOMParser>`u`)return e;let n=new DOMParser().parseFromString(e,`text/html`);return n.querySelectorAll(`table`).forEach(e=>{e.classList.add(`rj-editor-table`),Wi(e,Bi)}),n.querySelectorAll(`td, th`).forEach(e=>{let t=e,n=e.tagName.toLowerCase()===`th`,r=t.style.backgroundColor===Hi;t.classList.add(n?`rj-editor-table-cell-header`:`rj-editor-table-cell`),Wi(t,Vi),t.style.verticalAlign||(t.style.verticalAlign=`top`),n&&(!t.style.backgroundColor||r)&&(t.style.backgroundColor=Ui,t.style.fontWeight=`700`)}),n.querySelectorAll(`img[data-alignment]`).forEach(e=>{let r=e,i=r.getAttribute(`data-alignment`),a=r.getAttribute(`data-text-wrap`);Xi(n,r,t)||(r.style.display=`block`,r.style.maxWidth=`100%`,Gi(r,i,a),Ji(n,r)||qi(n,r,r.getAttribute(`data-link-url`)))}),n.body.innerHTML}function Qi(e,t){return typeof e!=`number`||Number.isNaN(e)?``:Pi(String(e),t)}var $i=1200,ea=700;function ta(){return document.fullscreenElement?new Promise(e=>{let t=()=>{window.clearTimeout(n),document.removeEventListener(`fullscreenchange`,t),e()},n=window.setTimeout(t,$i);document.addEventListener(`fullscreenchange`,t,{once:!0})}):Promise.resolve()}function na(){return new Promise(e=>{window.setTimeout(e,ea)})}async function ra(e){if(e){if(document.fullscreenElement)try{let e=ta();await document.exitFullscreen(),await e,await na()}catch{}e.ownerDocument.defaultView?.focus(),e.click()}}function ia(e){return new Promise((t,n)=>{let r=new FileReader;r.addEventListener(`error`,()=>{n(r.error)}),r.addEventListener(`load`,()=>{if(typeof r.result==`string`){t(r.result);return}n(Error(`File could not be converted to base64.`))}),r.readAsDataURL(e)})}var j=class e extends Error{constructor(t,n){var r=`KaTeX parse error: `+t,i,a,o=n&&n.loc;if(o&&o.start<=o.end){var s=o.lexer.input;i=o.start,a=o.end,i===s.length?r+=` at end of input: `:r+=` at position `+(i+1)+`: `;var c=s.slice(i,a).replace(/[^]/g,`$&̲`),l=i>15?`…`+s.slice(i-15,i):s.slice(0,i),u=a+15<s.length?s.slice(a,a+15)+`…`:s.slice(a);r+=l+c+u}super(r),this.name=`ParseError`,this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,e.prototype),this.position=i,i!=null&&a!=null&&(this.length=a-i),this.rawMessage=t}},aa=/([A-Z])/g,oa=e=>e.replace(aa,`-$1`).toLowerCase(),sa={"&":`&amp;`,">":`&gt;`,"<":`&lt;`,'"':`&quot;`,"'":`&#x27;`},ca=/[&><"']/g,la=e=>String(e).replace(ca,e=>sa[e]),ua=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?ua(e.body[0]):e:e.type===`font`?ua(e.body):e,da=new Set([`mathord`,`textord`,`atom`]),fa=e=>da.has(ua(e).type),pa=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},ma={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=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}};function ha(e){if(typeof e!=`string`)return e.enum[0];switch(e){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{};default:throw Error(`Unexpected schema type; settings must declare an explicit default.`)}}function ga(e){return e.default===void 0?ha(Array.isArray(e.type)?e.type[0]:e.type):e.default}function _a(e,t,n,r){var i=n[t];e[t]=i===void 0?ga(r):r.processor?r.processor(i):i}var va=class{constructor(e){e===void 0&&(e={}),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||={};for(var t of Object.keys(ma)){var n=ma[t];n&&_a(this,t,e,n)}}reportNonstrict(e,t,n){var r=this.strict;if(typeof r==`function`&&(r=r(e,t,n)),!(!r||r===`ignore`)){if(r===!0||r===`error`)throw new j(`LaTeX-incompatible input and strict mode is set to 'error': `+(t+` [`+e+`]`),n);r===`warn`?typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)):typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r==`function`)try{r=r(e,t,n)}catch{r=`error`}return!r||r===`ignore`?!1:r===!0||r===`error`?!0:r===`warn`?(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)),!1):(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`)),!1)}isTrusted(e){if(`url`in e&&e.url&&!e.protocol){var t=pa(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}},ya=class{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 Oa[ka[this.id]]}sub(){return Oa[Aa[this.id]]}fracNum(){return Oa[ja[this.id]]}fracDen(){return Oa[Ma[this.id]]}cramp(){return Oa[Na[this.id]]}text(){return Oa[Pa[this.id]]}isTight(){return this.size>=2}},ba=0,xa=1,Sa=2,Ca=3,wa=4,Ta=5,Ea=6,Da=7,Oa=[new ya(ba,0,!1),new ya(xa,0,!0),new ya(Sa,1,!1),new ya(Ca,1,!0),new ya(wa,2,!1),new ya(Ta,2,!0),new ya(Ea,3,!1),new ya(Da,3,!0)],ka=[wa,Ta,wa,Ta,Ea,Da,Ea,Da],Aa=[Ta,Ta,Ta,Ta,Da,Da,Da,Da],ja=[Sa,Ca,wa,Ta,Ea,Da,Ea,Da],Ma=[Ca,Ca,Ta,Ta,Da,Da,Da,Da],Na=[xa,xa,Ca,Ca,Ta,Ta,Da,Da],Pa=[ba,xa,Sa,Ca,Sa,Ca,Sa,Ca],M={DISPLAY:Oa[ba],TEXT:Oa[Sa],SCRIPT:Oa[wa],SCRIPTSCRIPT:Oa[Ea]},Fa=[{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]]}];function Ia(e){for(var t=0;t<Fa.length;t++)for(var n=Fa[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}var La=[];Fa.forEach(e=>e.blocks.forEach(e=>La.push(...e)));function Ra(e){for(var t=0;t<La.length;t+=2)if(e>=La[t]&&e<=La[t+1])return!0;return!1}var za=e=>e+` `+e,Ba=80,Va=function(e,t){return`M95,`+(622+e+t)+`
4
+ c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
5
+ c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
6
+ c44.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
7
+ s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
8
+ c69,-144,104.5,-217.7,106.5,-221
9
+ l`+e/2.075+` -`+e+`
10
+ c5.3,-9.3,12,-14,20,-14
11
+ H400000v`+(40+e)+`H845.2724
12
+ s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
13
+ c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
14
+ M`+(834+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},Ha=function(e,t){return`M263,`+(601+e+t)+`c0.7,0,18,39.7,52,119
15
+ c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
16
+ c340,-704.7,510.7,-1060.3,512,-1067
17
+ l`+e/2.084+` -`+e+`
18
+ c4.7,-7.3,11,-11,19,-11
19
+ H40000v`+(40+e)+`H1012.3
20
+ s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
21
+ c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
22
+ s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
23
+ c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
24
+ M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},Ua=function(e,t){return`M983 `+(10+e+t)+`
25
+ l`+e/3.13+` -`+e+`
26
+ c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`
27
+ H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
28
+ s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
29
+ c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
30
+ c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
31
+ c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
32
+ c53.7,-170.3,84.5,-266.8,92.5,-289.5z
33
+ M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},Wa=function(e,t){return`M424,`+(2398+e+t)+`
34
+ c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
35
+ c0,-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
36
+ s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
37
+ s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
38
+ l`+e/4.223+` -`+e+`c4,-6.7,10,-10,18,-10 H400000
39
+ v`+(40+e)+`H1014.6
40
+ s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
41
+ c-2,6,-10,9,-24,9
42
+ c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+` `+t+`
43
+ h400000v`+(40+e)+`h-400000z`},Ga=function(e,t){return`M473,`+(2713+e+t)+`
44
+ c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+` -`+e+`
45
+ c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7
46
+ s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
47
+ c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
48
+ c0,-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
49
+ s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
50
+ 606zM`+(1001+e)+` `+t+`h400000v`+(40+e)+`H1017.7z`},Ka=function(e){var t=e/2;return`M400000 `+e+` H0 L`+t+` 0 l65 45 L145 `+(e-80)+` H400000z`},qa=function(e,t,n){var r=n-54-t-e;return`M702 `+(e+t)+`H400000`+(40+e)+`
51
+ H742v`+r+`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
52
+ h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
53
+ c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
54
+ 219 661 l218 661zM702 `+t+`H400000v`+(40+e)+`H742z`},Ja=function(e,t,n){t=1e3*t;var r=``;switch(e){case`sqrtMain`:r=Va(t,Ba);break;case`sqrtSize1`:r=Ha(t,Ba);break;case`sqrtSize2`:r=Ua(t,Ba);break;case`sqrtSize3`:r=Wa(t,Ba);break;case`sqrtSize4`:r=Ga(t,Ba);break;case`sqrtTall`:r=qa(t,Ba,n)}return r},Ya=function(e,t){switch(e){case`⎜`:return za(`M291 0 H417 V`+t+` H291z`);case`∣`:return za(`M145 0 H188 V`+t+` H145z`);case`∥`:return za(`M145 0 H188 V`+t+` H145z`)+za(`M367 0 H410 V`+t+` H367z`);case`⎟`:return za(`M457 0 H583 V`+t+` H457z`);case`⎢`:return za(`M319 0 H403 V`+t+` H319z`);case`⎥`:return za(`M263 0 H347 V`+t+` H263z`);case`⎪`:return za(`M384 0 H504 V`+t+` H384z`);case`⏐`:return za(`M312 0 H355 V`+t+` H312z`);case`‖`:return za(`M257 0 H300 V`+t+` H257z`)+za(`M478 0 H521 V`+t+` H478z`);default:return``}},Xa={doubleleftarrow:`M262 157
55
+ l10-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
56
+ 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
57
+ 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
58
+ c2 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
59
+ 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
60
+ -86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
61
+ -2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
62
+ m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
63
+ -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
64
+ 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
65
+ -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
66
+ -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
67
+ -13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
68
+ c-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
69
+ -107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
70
+ 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
71
+ -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
72
+ c-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
73
+ 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
74
+ 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
75
+ l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
76
+ -45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
77
+ 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
78
+ 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
79
+ 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
80
+ -331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
81
+ H435C64 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
82
+ 435 0h399565z`,leftgroupunder:`M400000 262
83
+ H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
84
+ 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
85
+ -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
86
+ -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
87
+ -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
88
+ 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
89
+ -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
90
+ -10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
91
+ m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
92
+ 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
93
+ 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
94
+ -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
95
+ 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
96
+ -2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
97
+ v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
98
+ -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
99
+ -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
100
+ 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:za(`M40 281 V428 H0 V94 H40 V241 H400000 v40z`),leftbracketunder:za(`M0 0 h120 V290 H399995 v120 H0z`),leftbracketover:za(`M0 440 h120 V150 H399995 v-120 H0z`),leftmapsto:za(`M40 281 V448H0V74H40V241H400000v40z`),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
101
+ -.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
102
+ c28.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
103
+ 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:za(`M0 50 h400000 v40H0z m0 194h40000v40H0z`),midbrace:`M200428 334
104
+ c-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
105
+ -53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
106
+ 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
107
+ 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
108
+ c100.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
109
+ 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
110
+ 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
111
+ -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
112
+ -320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
113
+ m368.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
114
+ 60.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
115
+ -451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
116
+ m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
117
+ c0 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
118
+ -480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
119
+ m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
120
+ 85.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
121
+ -707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
122
+ m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
123
+ c0 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
124
+ -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
125
+ 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
126
+ 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
127
+ -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
128
+ -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
129
+ 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
130
+ -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
131
+ s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
132
+ c124.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
133
+ 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
134
+ -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
135
+ 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
136
+ 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
137
+ -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
138
+ -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
139
+ 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
140
+ -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
141
+ 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
142
+ m0 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
143
+ 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
144
+ -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
145
+ -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
146
+ 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
147
+ 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
148
+ -64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
149
+ m0-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
150
+ 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
151
+ -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
152
+ 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:za(`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`),rightbracketunder:za(`M399995 0 h-120 V290 H0 v120 H400000z`),rightbracketover:za(`M399995 440 h-120 V150 H0 v-120 H399995z`),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
153
+ 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
154
+ -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
155
+ -167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
156
+ 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
157
+ -70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
158
+ -40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
159
+ -37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
160
+ 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
161
+ c-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
162
+ 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
163
+ 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
164
+ -19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
165
+ 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
166
+ -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
167
+ 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
168
+ 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
169
+ -68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
170
+ -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
171
+ 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
172
+ c1 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
173
+ 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
174
+ -11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
175
+ 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
176
+ 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
177
+ -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
178
+ -11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
179
+ 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
180
+ 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
181
+ -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
182
+ 3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
183
+ 10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
184
+ -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
185
+ -7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
186
+ H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
187
+ c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
188
+ c-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
189
+ -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
190
+ -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
191
+ -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,
192
+ -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,
193
+ -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,
194
+ -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,
195
+ -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
196
+ c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
197
+ c-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
198
+ s-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
199
+ 121.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
200
+ s2.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
201
+ c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
202
+ M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
203
+ -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
204
+ 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 39
205
+ -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
206
+ -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
207
+ -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
208
+ 151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
209
+ c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
210
+ c2,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
211
+ c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
212
+ c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
213
+ M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
214
+ c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
215
+ -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
216
+ c-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
217
+ M0 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
218
+ c1.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,
219
+ 1c0,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,
220
+ -152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
221
+ M93 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
222
+ c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
223
+ -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
224
+ c-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
225
+ M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Za=function(e,t){switch(e){case`lbrack`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v1759 v84 h347 v-84
226
+ H403z M403 1759 V0 H319 V1759 v`+t+` v1759 v84 h84z`;case`rbrack`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v1759 H0 v84 H347z
227
+ M347 1759 V0 H263 V1759 v`+t+` v1759 h84z`;case`vert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
228
+ c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
229
+ c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z`;case`doublevert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
230
+ c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
231
+ c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z
232
+ M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
233
+ c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
234
+ c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+` v585 h43z`;case`lfloor`:return`M319 602 V0 H403 V602 v`+t+` v1715 h263 v84 H319z
235
+ MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`rfloor`:return`M319 602 V0 H403 V602 v`+t+` v1799 H0 v-84 H319z
236
+ MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`lceil`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v602 h84z
237
+ M403 1759 V0 H319 V1759 v`+t+` v602 h84z`;case`rceil`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v602 h84z
238
+ M347 1759 V0 h-84 V1759 v`+t+` v602 h84z`;case`lparen`:return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
239
+ c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
240
+ -36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
241
+ 949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
242
+ c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
243
+ -544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
244
+ l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
245
+ -210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case`rparen`:return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
246
+ 63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
247
+ c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+`
248
+ c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
249
+ c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
250
+ c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
251
+ c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
252
+ l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
253
+ -470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw Error(`Unknown stretchy delimiter.`)}};function Qa(e){return`toText`in e}var $a=class{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 this.classes.includes(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=>{if(Qa(e))return e.toText();throw Error(`Expected MathDomNode with toText, got `+e.constructor.name)}).join(``)}},eo={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},to={ex:!0,em:!0,mu:!0},no=function(e){return typeof e!=`string`&&(e=e.unit),e in eo||e in to||e===`ex`},ro=function(e,t){var n;if(e.unit in eo)n=eo[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit===`mu`)n=t.fontMetrics().cssEmPerMu;else{var r=t.style.isTight()?t.havingStyle(t.style.text()):t;if(e.unit===`ex`)n=r.fontMetrics().xHeight;else if(e.unit===`em`)n=r.fontMetrics().quad;else throw new j(`Invalid unit: '`+e.unit+`'`);r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},N=function(e){return+e.toFixed(4)+`em`},io=function(e){return e.filter(e=>e).join(` `)},ao=function(e){var t=``;for(var n of Object.keys(e)){var r=e[n];r!==void 0&&(t+=oa(n)+`:`+r+`;`)}return t},oo=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)}},so=function(e){var t=document.createElement(e);t.className=io(this.classes),Object.assign(t.style,this.style);for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t},co=/[\s"'>/=\x00-\x1f]/,lo=function(e){var t=`<`+e;this.classes.length&&(t+=` class="`+la(io(this.classes))+`"`);var n=ao(this.style);n&&(t+=` style="`+la(n)+`"`);for(var r of Object.keys(this.attributes)){if(co.test(r))throw new j(`Invalid attribute name '`+r+`'`);t+=` `+r+`="`+la(this.attributes[r])+`"`}t+=`>`;for(var i=0;i<this.children.length;i++)t+=this.children[i].toMarkup();return t+=`</`+e+`>`,t},uo=class{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,this.italic=void 0,oo.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return so.call(this,`span`)}toMarkup(){return lo.call(this,`span`)}},fo=class{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,oo.call(this,t,r),this.children=n||[],this.setAttribute(`href`,e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return so.call(this,`a`)}toMarkup(){return lo.call(this,`a`)}},po=class{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.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement(`img`);return e.src=this.src,e.alt=this.alt,e.className=`mord`,Object.assign(e.style,this.style),e}toMarkup(){var e=`<img src="`+la(this.src)+`"`+(` alt="`+la(this.alt)+`"`),t=ao(this.style);return t&&(e+=` style="`+la(t)+`"`),e+=`'/>`,e}},mo={î:`ı̂`,ï:`ı̈`,í:`ı́`,ì:`ı̀`},ho=class{constructor(e,t,n,r,i,a,o,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=a||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var c=Ia(this.text.charCodeAt(0));c&&this.classes.push(c+`_fallback`),/[îïíì]/.test(this.text)&&(this.text=mo[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;return this.italic>0&&(t=document.createElement(`span`),t.style.marginRight=N(this.italic)),this.classes.length>0&&(t||=document.createElement(`span`),t.className=io(this.classes)),Object.keys(this.style).length>0&&(t||=document.createElement(`span`),Object.assign(t.style,this.style)),t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t=`<span`;this.classes.length&&(e=!0,t+=` class="`,t+=la(io(this.classes)),t+=`"`);var n=``;this.italic>0&&(n+=`margin-right:`+N(this.italic)+`;`),n+=ao(this.style),n&&(e=!0,t+=` style="`+la(n)+`"`);var r=la(this.text);return e?(t+=`>`,t+=r,t+=`</span>`,t):r}},go=class{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 of Object.keys(this.attributes))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 of Object.keys(this.attributes))e+=` `+t+`="`+la(this.attributes[t])+`"`;e+=`>`;for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+=`</svg>`,e}},_o=class{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`,Xa[this.pathName]),e}toMarkup(){return this.alternate?`<path d="`+la(this.alternate)+`"/>`:`<path d="`+la(Xa[this.pathName])+`"/>`}},vo=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`line`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e=`<line`;for(var t of Object.keys(this.attributes))e+=` `+t+`="`+la(this.attributes[t])+`"`;return e+=`/>`,e}};function yo(e){if(e instanceof ho)return e;throw Error(`Expected symbolNode but got `+String(e)+`.`)}function bo(e){if(e instanceof uo)return e;throw Error(`Expected span<HtmlDomNode> but got `+String(e)+`.`)}var xo=e=>e instanceof uo||e instanceof fo||e instanceof $a,So={"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]}},Co={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]},wo={Å:`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 To(e,t){So[e]=t}function Eo(e,t,n){if(!So[t])throw Error(`Font metrics not found for font: `+t+`.`);var r=e.charCodeAt(0),i=So[t][r];if(!i&&e[0]in wo&&(r=wo[e[0]].charCodeAt(0),i=So[t][r]),!i&&n===`text`&&Ra(r)&&(i=So[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var Do={};function Oo(e){var t=e>=5?0:e>=3?1:2;if(!Do[t]){var n=Do[t]={cssEmPerMu:Co.quad[t]/18};for(var r in Co)Co.hasOwnProperty(r)&&(n[r]=Co[r][t])}return Do[t]}var ko={math:{},text:{}};function P(e,t,n,r,i,a){ko[e][i]={font:t,group:n,replace:r},a&&r&&(ko[e][r]=ko[e][i])}var F=`math`,I=`text`,L=`main`,R=`ams`,Ao=`accent-token`,z=`bin`,jo=`close`,Mo=`inner`,B=`mathord`,No=`op-token`,Po=`open`,Fo=`punct`,V=`rel`,Io=`spacing`,H=`textord`;P(F,L,V,`≡`,`\\equiv`,!0),P(F,L,V,`≺`,`\\prec`,!0),P(F,L,V,`≻`,`\\succ`,!0),P(F,L,V,`∼`,`\\sim`,!0),P(F,L,V,`⊥`,`\\perp`),P(F,L,V,`⪯`,`\\preceq`,!0),P(F,L,V,`⪰`,`\\succeq`,!0),P(F,L,V,`≃`,`\\simeq`,!0),P(F,L,V,`∣`,`\\mid`,!0),P(F,L,V,`≪`,`\\ll`,!0),P(F,L,V,`≫`,`\\gg`,!0),P(F,L,V,`≍`,`\\asymp`,!0),P(F,L,V,`∥`,`\\parallel`),P(F,L,V,`⋈`,`\\bowtie`,!0),P(F,L,V,`⌣`,`\\smile`,!0),P(F,L,V,`⊑`,`\\sqsubseteq`,!0),P(F,L,V,`⊒`,`\\sqsupseteq`,!0),P(F,L,V,`≐`,`\\doteq`,!0),P(F,L,V,`⌢`,`\\frown`,!0),P(F,L,V,`∋`,`\\ni`,!0),P(F,L,V,`∝`,`\\propto`,!0),P(F,L,V,`⊢`,`\\vdash`,!0),P(F,L,V,`⊣`,`\\dashv`,!0),P(F,L,V,`∋`,`\\owns`),P(F,L,Fo,`.`,`\\ldotp`),P(F,L,Fo,`⋅`,`\\cdotp`),P(F,L,Fo,`⋅`,`·`),P(I,L,H,`⋅`,`·`),P(F,L,H,`#`,`\\#`),P(I,L,H,`#`,`\\#`),P(F,L,H,`&`,`\\&`),P(I,L,H,`&`,`\\&`),P(F,L,H,`ℵ`,`\\aleph`,!0),P(F,L,H,`∀`,`\\forall`,!0),P(F,L,H,`ℏ`,`\\hbar`,!0),P(F,L,H,`∃`,`\\exists`,!0),P(F,L,H,`∇`,`\\nabla`,!0),P(F,L,H,`♭`,`\\flat`,!0),P(F,L,H,`ℓ`,`\\ell`,!0),P(F,L,H,`♮`,`\\natural`,!0),P(F,L,H,`♣`,`\\clubsuit`,!0),P(F,L,H,`℘`,`\\wp`,!0),P(F,L,H,`♯`,`\\sharp`,!0),P(F,L,H,`♢`,`\\diamondsuit`,!0),P(F,L,H,`ℜ`,`\\Re`,!0),P(F,L,H,`♡`,`\\heartsuit`,!0),P(F,L,H,`ℑ`,`\\Im`,!0),P(F,L,H,`♠`,`\\spadesuit`,!0),P(F,L,H,`§`,`\\S`,!0),P(I,L,H,`§`,`\\S`),P(F,L,H,`¶`,`\\P`,!0),P(I,L,H,`¶`,`\\P`),P(F,L,H,`†`,`\\dag`),P(I,L,H,`†`,`\\dag`),P(I,L,H,`†`,`\\textdagger`),P(F,L,H,`‡`,`\\ddag`),P(I,L,H,`‡`,`\\ddag`),P(I,L,H,`‡`,`\\textdaggerdbl`),P(F,L,jo,`⎱`,`\\rmoustache`,!0),P(F,L,Po,`⎰`,`\\lmoustache`,!0),P(F,L,jo,`⟯`,`\\rgroup`,!0),P(F,L,Po,`⟮`,`\\lgroup`,!0),P(F,L,z,`∓`,`\\mp`,!0),P(F,L,z,`⊖`,`\\ominus`,!0),P(F,L,z,`⊎`,`\\uplus`,!0),P(F,L,z,`⊓`,`\\sqcap`,!0),P(F,L,z,`∗`,`\\ast`),P(F,L,z,`⊔`,`\\sqcup`,!0),P(F,L,z,`◯`,`\\bigcirc`,!0),P(F,L,z,`∙`,`\\bullet`,!0),P(F,L,z,`‡`,`\\ddagger`),P(F,L,z,`≀`,`\\wr`,!0),P(F,L,z,`⨿`,`\\amalg`),P(F,L,z,`&`,`\\And`),P(F,L,V,`⟵`,`\\longleftarrow`,!0),P(F,L,V,`⇐`,`\\Leftarrow`,!0),P(F,L,V,`⟸`,`\\Longleftarrow`,!0),P(F,L,V,`⟶`,`\\longrightarrow`,!0),P(F,L,V,`⇒`,`\\Rightarrow`,!0),P(F,L,V,`⟹`,`\\Longrightarrow`,!0),P(F,L,V,`↔`,`\\leftrightarrow`,!0),P(F,L,V,`⟷`,`\\longleftrightarrow`,!0),P(F,L,V,`⇔`,`\\Leftrightarrow`,!0),P(F,L,V,`⟺`,`\\Longleftrightarrow`,!0),P(F,L,V,`↦`,`\\mapsto`,!0),P(F,L,V,`⟼`,`\\longmapsto`,!0),P(F,L,V,`↗`,`\\nearrow`,!0),P(F,L,V,`↩`,`\\hookleftarrow`,!0),P(F,L,V,`↪`,`\\hookrightarrow`,!0),P(F,L,V,`↘`,`\\searrow`,!0),P(F,L,V,`↼`,`\\leftharpoonup`,!0),P(F,L,V,`⇀`,`\\rightharpoonup`,!0),P(F,L,V,`↙`,`\\swarrow`,!0),P(F,L,V,`↽`,`\\leftharpoondown`,!0),P(F,L,V,`⇁`,`\\rightharpoondown`,!0),P(F,L,V,`↖`,`\\nwarrow`,!0),P(F,L,V,`⇌`,`\\rightleftharpoons`,!0),P(F,R,V,`≮`,`\\nless`,!0),P(F,R,V,``,`\\@nleqslant`),P(F,R,V,``,`\\@nleqq`),P(F,R,V,`⪇`,`\\lneq`,!0),P(F,R,V,`≨`,`\\lneqq`,!0),P(F,R,V,``,`\\@lvertneqq`),P(F,R,V,`⋦`,`\\lnsim`,!0),P(F,R,V,`⪉`,`\\lnapprox`,!0),P(F,R,V,`⊀`,`\\nprec`,!0),P(F,R,V,`⋠`,`\\npreceq`,!0),P(F,R,V,`⋨`,`\\precnsim`,!0),P(F,R,V,`⪹`,`\\precnapprox`,!0),P(F,R,V,`≁`,`\\nsim`,!0),P(F,R,V,``,`\\@nshortmid`),P(F,R,V,`∤`,`\\nmid`,!0),P(F,R,V,`⊬`,`\\nvdash`,!0),P(F,R,V,`⊭`,`\\nvDash`,!0),P(F,R,V,`⋪`,`\\ntriangleleft`),P(F,R,V,`⋬`,`\\ntrianglelefteq`,!0),P(F,R,V,`⊊`,`\\subsetneq`,!0),P(F,R,V,``,`\\@varsubsetneq`),P(F,R,V,`⫋`,`\\subsetneqq`,!0),P(F,R,V,``,`\\@varsubsetneqq`),P(F,R,V,`≯`,`\\ngtr`,!0),P(F,R,V,``,`\\@ngeqslant`),P(F,R,V,``,`\\@ngeqq`),P(F,R,V,`⪈`,`\\gneq`,!0),P(F,R,V,`≩`,`\\gneqq`,!0),P(F,R,V,``,`\\@gvertneqq`),P(F,R,V,`⋧`,`\\gnsim`,!0),P(F,R,V,`⪊`,`\\gnapprox`,!0),P(F,R,V,`⊁`,`\\nsucc`,!0),P(F,R,V,`⋡`,`\\nsucceq`,!0),P(F,R,V,`⋩`,`\\succnsim`,!0),P(F,R,V,`⪺`,`\\succnapprox`,!0),P(F,R,V,`≆`,`\\ncong`,!0),P(F,R,V,``,`\\@nshortparallel`),P(F,R,V,`∦`,`\\nparallel`,!0),P(F,R,V,`⊯`,`\\nVDash`,!0),P(F,R,V,`⋫`,`\\ntriangleright`),P(F,R,V,`⋭`,`\\ntrianglerighteq`,!0),P(F,R,V,``,`\\@nsupseteqq`),P(F,R,V,`⊋`,`\\supsetneq`,!0),P(F,R,V,``,`\\@varsupsetneq`),P(F,R,V,`⫌`,`\\supsetneqq`,!0),P(F,R,V,``,`\\@varsupsetneqq`),P(F,R,V,`⊮`,`\\nVdash`,!0),P(F,R,V,`⪵`,`\\precneqq`,!0),P(F,R,V,`⪶`,`\\succneqq`,!0),P(F,R,V,``,`\\@nsubseteqq`),P(F,R,z,`⊴`,`\\unlhd`),P(F,R,z,`⊵`,`\\unrhd`),P(F,R,V,`↚`,`\\nleftarrow`,!0),P(F,R,V,`↛`,`\\nrightarrow`,!0),P(F,R,V,`⇍`,`\\nLeftarrow`,!0),P(F,R,V,`⇏`,`\\nRightarrow`,!0),P(F,R,V,`↮`,`\\nleftrightarrow`,!0),P(F,R,V,`⇎`,`\\nLeftrightarrow`,!0),P(F,R,V,`△`,`\\vartriangle`),P(F,R,H,`ℏ`,`\\hslash`),P(F,R,H,`▽`,`\\triangledown`),P(F,R,H,`◊`,`\\lozenge`),P(F,R,H,`Ⓢ`,`\\circledS`),P(F,R,H,`®`,`\\circledR`),P(I,R,H,`®`,`\\circledR`),P(F,R,H,`∡`,`\\measuredangle`,!0),P(F,R,H,`∄`,`\\nexists`),P(F,R,H,`℧`,`\\mho`),P(F,R,H,`Ⅎ`,`\\Finv`,!0),P(F,R,H,`⅁`,`\\Game`,!0),P(F,R,H,`‵`,`\\backprime`),P(F,R,H,`▲`,`\\blacktriangle`),P(F,R,H,`▼`,`\\blacktriangledown`),P(F,R,H,`■`,`\\blacksquare`),P(F,R,H,`⧫`,`\\blacklozenge`),P(F,R,H,`★`,`\\bigstar`),P(F,R,H,`∢`,`\\sphericalangle`,!0),P(F,R,H,`∁`,`\\complement`,!0),P(F,R,H,`ð`,`\\eth`,!0),P(I,L,H,`ð`,`ð`),P(F,R,H,`╱`,`\\diagup`),P(F,R,H,`╲`,`\\diagdown`),P(F,R,H,`□`,`\\square`),P(F,R,H,`□`,`\\Box`),P(F,R,H,`◊`,`\\Diamond`),P(F,R,H,`¥`,`\\yen`,!0),P(I,R,H,`¥`,`\\yen`,!0),P(F,R,H,`✓`,`\\checkmark`,!0),P(I,R,H,`✓`,`\\checkmark`),P(F,R,H,`ℶ`,`\\beth`,!0),P(F,R,H,`ℸ`,`\\daleth`,!0),P(F,R,H,`ℷ`,`\\gimel`,!0),P(F,R,H,`ϝ`,`\\digamma`,!0),P(F,R,H,`ϰ`,`\\varkappa`),P(F,R,Po,`┌`,`\\@ulcorner`,!0),P(F,R,jo,`┐`,`\\@urcorner`,!0),P(F,R,Po,`└`,`\\@llcorner`,!0),P(F,R,jo,`┘`,`\\@lrcorner`,!0),P(F,R,V,`≦`,`\\leqq`,!0),P(F,R,V,`⩽`,`\\leqslant`,!0),P(F,R,V,`⪕`,`\\eqslantless`,!0),P(F,R,V,`≲`,`\\lesssim`,!0),P(F,R,V,`⪅`,`\\lessapprox`,!0),P(F,R,V,`≊`,`\\approxeq`,!0),P(F,R,z,`⋖`,`\\lessdot`),P(F,R,V,`⋘`,`\\lll`,!0),P(F,R,V,`≶`,`\\lessgtr`,!0),P(F,R,V,`⋚`,`\\lesseqgtr`,!0),P(F,R,V,`⪋`,`\\lesseqqgtr`,!0),P(F,R,V,`≑`,`\\doteqdot`),P(F,R,V,`≓`,`\\risingdotseq`,!0),P(F,R,V,`≒`,`\\fallingdotseq`,!0),P(F,R,V,`∽`,`\\backsim`,!0),P(F,R,V,`⋍`,`\\backsimeq`,!0),P(F,R,V,`⫅`,`\\subseteqq`,!0),P(F,R,V,`⋐`,`\\Subset`,!0),P(F,R,V,`⊏`,`\\sqsubset`,!0),P(F,R,V,`≼`,`\\preccurlyeq`,!0),P(F,R,V,`⋞`,`\\curlyeqprec`,!0),P(F,R,V,`≾`,`\\precsim`,!0),P(F,R,V,`⪷`,`\\precapprox`,!0),P(F,R,V,`⊲`,`\\vartriangleleft`),P(F,R,V,`⊴`,`\\trianglelefteq`),P(F,R,V,`⊨`,`\\vDash`,!0),P(F,R,V,`⊪`,`\\Vvdash`,!0),P(F,R,V,`⌣`,`\\smallsmile`),P(F,R,V,`⌢`,`\\smallfrown`),P(F,R,V,`≏`,`\\bumpeq`,!0),P(F,R,V,`≎`,`\\Bumpeq`,!0),P(F,R,V,`≧`,`\\geqq`,!0),P(F,R,V,`⩾`,`\\geqslant`,!0),P(F,R,V,`⪖`,`\\eqslantgtr`,!0),P(F,R,V,`≳`,`\\gtrsim`,!0),P(F,R,V,`⪆`,`\\gtrapprox`,!0),P(F,R,z,`⋗`,`\\gtrdot`),P(F,R,V,`⋙`,`\\ggg`,!0),P(F,R,V,`≷`,`\\gtrless`,!0),P(F,R,V,`⋛`,`\\gtreqless`,!0),P(F,R,V,`⪌`,`\\gtreqqless`,!0),P(F,R,V,`≖`,`\\eqcirc`,!0),P(F,R,V,`≗`,`\\circeq`,!0),P(F,R,V,`≜`,`\\triangleq`,!0),P(F,R,V,`∼`,`\\thicksim`),P(F,R,V,`≈`,`\\thickapprox`),P(F,R,V,`⫆`,`\\supseteqq`,!0),P(F,R,V,`⋑`,`\\Supset`,!0),P(F,R,V,`⊐`,`\\sqsupset`,!0),P(F,R,V,`≽`,`\\succcurlyeq`,!0),P(F,R,V,`⋟`,`\\curlyeqsucc`,!0),P(F,R,V,`≿`,`\\succsim`,!0),P(F,R,V,`⪸`,`\\succapprox`,!0),P(F,R,V,`⊳`,`\\vartriangleright`),P(F,R,V,`⊵`,`\\trianglerighteq`),P(F,R,V,`⊩`,`\\Vdash`,!0),P(F,R,V,`∣`,`\\shortmid`),P(F,R,V,`∥`,`\\shortparallel`),P(F,R,V,`≬`,`\\between`,!0),P(F,R,V,`⋔`,`\\pitchfork`,!0),P(F,R,V,`∝`,`\\varpropto`),P(F,R,V,`◀`,`\\blacktriangleleft`),P(F,R,V,`∴`,`\\therefore`,!0),P(F,R,V,`∍`,`\\backepsilon`),P(F,R,V,`▶`,`\\blacktriangleright`),P(F,R,V,`∵`,`\\because`,!0),P(F,R,V,`⋘`,`\\llless`),P(F,R,V,`⋙`,`\\gggtr`),P(F,R,z,`⊲`,`\\lhd`),P(F,R,z,`⊳`,`\\rhd`),P(F,R,V,`≂`,`\\eqsim`,!0),P(F,L,V,`⋈`,`\\Join`),P(F,R,V,`≑`,`\\Doteq`,!0),P(F,R,z,`∔`,`\\dotplus`,!0),P(F,R,z,`∖`,`\\smallsetminus`),P(F,R,z,`⋒`,`\\Cap`,!0),P(F,R,z,`⋓`,`\\Cup`,!0),P(F,R,z,`⩞`,`\\doublebarwedge`,!0),P(F,R,z,`⊟`,`\\boxminus`,!0),P(F,R,z,`⊞`,`\\boxplus`,!0),P(F,R,z,`⋇`,`\\divideontimes`,!0),P(F,R,z,`⋉`,`\\ltimes`,!0),P(F,R,z,`⋊`,`\\rtimes`,!0),P(F,R,z,`⋋`,`\\leftthreetimes`,!0),P(F,R,z,`⋌`,`\\rightthreetimes`,!0),P(F,R,z,`⋏`,`\\curlywedge`,!0),P(F,R,z,`⋎`,`\\curlyvee`,!0),P(F,R,z,`⊝`,`\\circleddash`,!0),P(F,R,z,`⊛`,`\\circledast`,!0),P(F,R,z,`⋅`,`\\centerdot`),P(F,R,z,`⊺`,`\\intercal`,!0),P(F,R,z,`⋒`,`\\doublecap`),P(F,R,z,`⋓`,`\\doublecup`),P(F,R,z,`⊠`,`\\boxtimes`,!0),P(F,R,V,`⇢`,`\\dashrightarrow`,!0),P(F,R,V,`⇠`,`\\dashleftarrow`,!0),P(F,R,V,`⇇`,`\\leftleftarrows`,!0),P(F,R,V,`⇆`,`\\leftrightarrows`,!0),P(F,R,V,`⇚`,`\\Lleftarrow`,!0),P(F,R,V,`↞`,`\\twoheadleftarrow`,!0),P(F,R,V,`↢`,`\\leftarrowtail`,!0),P(F,R,V,`↫`,`\\looparrowleft`,!0),P(F,R,V,`⇋`,`\\leftrightharpoons`,!0),P(F,R,V,`↶`,`\\curvearrowleft`,!0),P(F,R,V,`↺`,`\\circlearrowleft`,!0),P(F,R,V,`↰`,`\\Lsh`,!0),P(F,R,V,`⇈`,`\\upuparrows`,!0),P(F,R,V,`↿`,`\\upharpoonleft`,!0),P(F,R,V,`⇃`,`\\downharpoonleft`,!0),P(F,L,V,`⊶`,`\\origof`,!0),P(F,L,V,`⊷`,`\\imageof`,!0),P(F,R,V,`⊸`,`\\multimap`,!0),P(F,R,V,`↭`,`\\leftrightsquigarrow`,!0),P(F,R,V,`⇉`,`\\rightrightarrows`,!0),P(F,R,V,`⇄`,`\\rightleftarrows`,!0),P(F,R,V,`↠`,`\\twoheadrightarrow`,!0),P(F,R,V,`↣`,`\\rightarrowtail`,!0),P(F,R,V,`↬`,`\\looparrowright`,!0),P(F,R,V,`↷`,`\\curvearrowright`,!0),P(F,R,V,`↻`,`\\circlearrowright`,!0),P(F,R,V,`↱`,`\\Rsh`,!0),P(F,R,V,`⇊`,`\\downdownarrows`,!0),P(F,R,V,`↾`,`\\upharpoonright`,!0),P(F,R,V,`⇂`,`\\downharpoonright`,!0),P(F,R,V,`⇝`,`\\rightsquigarrow`,!0),P(F,R,V,`⇝`,`\\leadsto`),P(F,R,V,`⇛`,`\\Rrightarrow`,!0),P(F,R,V,`↾`,`\\restriction`),P(F,L,H,`‘`,"`"),P(F,L,H,`$`,`\\$`),P(I,L,H,`$`,`\\$`),P(I,L,H,`$`,`\\textdollar`),P(F,L,H,`%`,`\\%`),P(I,L,H,`%`,`\\%`),P(F,L,H,`_`,`\\_`),P(I,L,H,`_`,`\\_`),P(I,L,H,`_`,`\\textunderscore`),P(F,L,H,`∠`,`\\angle`,!0),P(F,L,H,`∞`,`\\infty`,!0),P(F,L,H,`′`,`\\prime`),P(F,L,H,`△`,`\\triangle`),P(F,L,H,`Γ`,`\\Gamma`,!0),P(F,L,H,`Δ`,`\\Delta`,!0),P(F,L,H,`Θ`,`\\Theta`,!0),P(F,L,H,`Λ`,`\\Lambda`,!0),P(F,L,H,`Ξ`,`\\Xi`,!0),P(F,L,H,`Π`,`\\Pi`,!0),P(F,L,H,`Σ`,`\\Sigma`,!0),P(F,L,H,`Υ`,`\\Upsilon`,!0),P(F,L,H,`Φ`,`\\Phi`,!0),P(F,L,H,`Ψ`,`\\Psi`,!0),P(F,L,H,`Ω`,`\\Omega`,!0),P(F,L,H,`A`,`Α`),P(F,L,H,`B`,`Β`),P(F,L,H,`E`,`Ε`),P(F,L,H,`Z`,`Ζ`),P(F,L,H,`H`,`Η`),P(F,L,H,`I`,`Ι`),P(F,L,H,`K`,`Κ`),P(F,L,H,`M`,`Μ`),P(F,L,H,`N`,`Ν`),P(F,L,H,`O`,`Ο`),P(F,L,H,`P`,`Ρ`),P(F,L,H,`T`,`Τ`),P(F,L,H,`X`,`Χ`),P(F,L,H,`¬`,`\\neg`,!0),P(F,L,H,`¬`,`\\lnot`),P(F,L,H,`⊤`,`\\top`),P(F,L,H,`⊥`,`\\bot`),P(F,L,H,`∅`,`\\emptyset`),P(F,R,H,`∅`,`\\varnothing`),P(F,L,B,`α`,`\\alpha`,!0),P(F,L,B,`β`,`\\beta`,!0),P(F,L,B,`γ`,`\\gamma`,!0),P(F,L,B,`δ`,`\\delta`,!0),P(F,L,B,`ϵ`,`\\epsilon`,!0),P(F,L,B,`ζ`,`\\zeta`,!0),P(F,L,B,`η`,`\\eta`,!0),P(F,L,B,`θ`,`\\theta`,!0),P(F,L,B,`ι`,`\\iota`,!0),P(F,L,B,`κ`,`\\kappa`,!0),P(F,L,B,`λ`,`\\lambda`,!0),P(F,L,B,`μ`,`\\mu`,!0),P(F,L,B,`ν`,`\\nu`,!0),P(F,L,B,`ξ`,`\\xi`,!0),P(F,L,B,`ο`,`\\omicron`,!0),P(F,L,B,`π`,`\\pi`,!0),P(F,L,B,`ρ`,`\\rho`,!0),P(F,L,B,`σ`,`\\sigma`,!0),P(F,L,B,`τ`,`\\tau`,!0),P(F,L,B,`υ`,`\\upsilon`,!0),P(F,L,B,`ϕ`,`\\phi`,!0),P(F,L,B,`χ`,`\\chi`,!0),P(F,L,B,`ψ`,`\\psi`,!0),P(F,L,B,`ω`,`\\omega`,!0),P(F,L,B,`ε`,`\\varepsilon`,!0),P(F,L,B,`ϑ`,`\\vartheta`,!0),P(F,L,B,`ϖ`,`\\varpi`,!0),P(F,L,B,`ϱ`,`\\varrho`,!0),P(F,L,B,`ς`,`\\varsigma`,!0),P(F,L,B,`φ`,`\\varphi`,!0),P(F,L,z,`∗`,`*`,!0),P(F,L,z,`+`,`+`),P(F,L,z,`−`,`-`,!0),P(F,L,z,`⋅`,`\\cdot`,!0),P(F,L,z,`∘`,`\\circ`,!0),P(F,L,z,`÷`,`\\div`,!0),P(F,L,z,`±`,`\\pm`,!0),P(F,L,z,`×`,`\\times`,!0),P(F,L,z,`∩`,`\\cap`,!0),P(F,L,z,`∪`,`\\cup`,!0),P(F,L,z,`∖`,`\\setminus`,!0),P(F,L,z,`∧`,`\\land`),P(F,L,z,`∨`,`\\lor`),P(F,L,z,`∧`,`\\wedge`,!0),P(F,L,z,`∨`,`\\vee`,!0),P(F,L,H,`√`,`\\surd`),P(F,L,Po,`⟨`,`\\langle`,!0),P(F,L,Po,`∣`,`\\lvert`),P(F,L,Po,`∥`,`\\lVert`),P(F,L,jo,`?`,`?`),P(F,L,jo,`!`,`!`),P(F,L,jo,`⟩`,`\\rangle`,!0),P(F,L,jo,`∣`,`\\rvert`),P(F,L,jo,`∥`,`\\rVert`),P(F,L,V,`=`,`=`),P(F,L,V,`:`,`:`),P(F,L,V,`≈`,`\\approx`,!0),P(F,L,V,`≅`,`\\cong`,!0),P(F,L,V,`≥`,`\\ge`),P(F,L,V,`≥`,`\\geq`,!0),P(F,L,V,`←`,`\\gets`),P(F,L,V,`>`,`\\gt`,!0),P(F,L,V,`∈`,`\\in`,!0),P(F,L,V,``,`\\@not`),P(F,L,V,`⊂`,`\\subset`,!0),P(F,L,V,`⊃`,`\\supset`,!0),P(F,L,V,`⊆`,`\\subseteq`,!0),P(F,L,V,`⊇`,`\\supseteq`,!0),P(F,R,V,`⊈`,`\\nsubseteq`,!0),P(F,R,V,`⊉`,`\\nsupseteq`,!0),P(F,L,V,`⊨`,`\\models`),P(F,L,V,`←`,`\\leftarrow`,!0),P(F,L,V,`≤`,`\\le`),P(F,L,V,`≤`,`\\leq`,!0),P(F,L,V,`<`,`\\lt`,!0),P(F,L,V,`→`,`\\rightarrow`,!0),P(F,L,V,`→`,`\\to`),P(F,R,V,`≱`,`\\ngeq`,!0),P(F,R,V,`≰`,`\\nleq`,!0),P(F,L,Io,`\xA0`,`\\ `),P(F,L,Io,`\xA0`,`\\space`),P(F,L,Io,`\xA0`,`\\nobreakspace`),P(I,L,Io,`\xA0`,`\\ `),P(I,L,Io,`\xA0`,` `),P(I,L,Io,`\xA0`,`\\space`),P(I,L,Io,`\xA0`,`\\nobreakspace`),P(F,L,Io,``,`\\nobreak`),P(F,L,Io,``,`\\allowbreak`),P(F,L,Fo,`,`,`,`),P(F,L,Fo,`;`,`;`),P(F,R,z,`⊼`,`\\barwedge`,!0),P(F,R,z,`⊻`,`\\veebar`,!0),P(F,L,z,`⊙`,`\\odot`,!0),P(F,L,z,`⊕`,`\\oplus`,!0),P(F,L,z,`⊗`,`\\otimes`,!0),P(F,L,H,`∂`,`\\partial`,!0),P(F,L,z,`⊘`,`\\oslash`,!0),P(F,R,z,`⊚`,`\\circledcirc`,!0),P(F,R,z,`⊡`,`\\boxdot`,!0),P(F,L,z,`△`,`\\bigtriangleup`),P(F,L,z,`▽`,`\\bigtriangledown`),P(F,L,z,`†`,`\\dagger`),P(F,L,z,`⋄`,`\\diamond`),P(F,L,z,`⋆`,`\\star`),P(F,L,z,`◃`,`\\triangleleft`),P(F,L,z,`▹`,`\\triangleright`),P(F,L,Po,`{`,`\\{`),P(I,L,H,`{`,`\\{`),P(I,L,H,`{`,`\\textbraceleft`),P(F,L,jo,`}`,`\\}`),P(I,L,H,`}`,`\\}`),P(I,L,H,`}`,`\\textbraceright`),P(F,L,Po,`{`,`\\lbrace`),P(F,L,jo,`}`,`\\rbrace`),P(F,L,Po,`[`,`\\lbrack`,!0),P(I,L,H,`[`,`\\lbrack`,!0),P(F,L,jo,`]`,`\\rbrack`,!0),P(I,L,H,`]`,`\\rbrack`,!0),P(F,L,Po,`(`,`\\lparen`,!0),P(F,L,jo,`)`,`\\rparen`,!0),P(I,L,H,`<`,`\\textless`,!0),P(I,L,H,`>`,`\\textgreater`,!0),P(F,L,Po,`⌊`,`\\lfloor`,!0),P(F,L,jo,`⌋`,`\\rfloor`,!0),P(F,L,Po,`⌈`,`\\lceil`,!0),P(F,L,jo,`⌉`,`\\rceil`,!0),P(F,L,H,`\\`,`\\backslash`),P(F,L,H,`∣`,`|`),P(F,L,H,`∣`,`\\vert`),P(I,L,H,`|`,`\\textbar`,!0),P(F,L,H,`∥`,`\\|`),P(F,L,H,`∥`,`\\Vert`),P(I,L,H,`∥`,`\\textbardbl`),P(I,L,H,`~`,`\\textasciitilde`),P(I,L,H,`\\`,`\\textbackslash`),P(I,L,H,`^`,`\\textasciicircum`),P(F,L,V,`↑`,`\\uparrow`,!0),P(F,L,V,`⇑`,`\\Uparrow`,!0),P(F,L,V,`↓`,`\\downarrow`,!0),P(F,L,V,`⇓`,`\\Downarrow`,!0),P(F,L,V,`↕`,`\\updownarrow`,!0),P(F,L,V,`⇕`,`\\Updownarrow`,!0),P(F,L,No,`∐`,`\\coprod`),P(F,L,No,`⋁`,`\\bigvee`),P(F,L,No,`⋀`,`\\bigwedge`),P(F,L,No,`⨄`,`\\biguplus`),P(F,L,No,`⋂`,`\\bigcap`),P(F,L,No,`⋃`,`\\bigcup`),P(F,L,No,`∫`,`\\int`),P(F,L,No,`∫`,`\\intop`),P(F,L,No,`∬`,`\\iint`),P(F,L,No,`∭`,`\\iiint`),P(F,L,No,`∏`,`\\prod`),P(F,L,No,`∑`,`\\sum`),P(F,L,No,`⨂`,`\\bigotimes`),P(F,L,No,`⨁`,`\\bigoplus`),P(F,L,No,`⨀`,`\\bigodot`),P(F,L,No,`∮`,`\\oint`),P(F,L,No,`∯`,`\\oiint`),P(F,L,No,`∰`,`\\oiiint`),P(F,L,No,`⨆`,`\\bigsqcup`),P(F,L,No,`∫`,`\\smallint`),P(I,L,Mo,`…`,`\\textellipsis`),P(F,L,Mo,`…`,`\\mathellipsis`),P(I,L,Mo,`…`,`\\ldots`,!0),P(F,L,Mo,`…`,`\\ldots`,!0),P(F,L,Mo,`⋯`,`\\@cdots`,!0),P(F,L,Mo,`⋱`,`\\ddots`,!0),P(F,L,H,`⋮`,`\\varvdots`),P(I,L,H,`⋮`,`\\varvdots`),P(F,L,Ao,`ˊ`,`\\acute`),P(F,L,Ao,`ˋ`,`\\grave`),P(F,L,Ao,`¨`,`\\ddot`),P(F,L,Ao,`~`,`\\tilde`),P(F,L,Ao,`ˉ`,`\\bar`),P(F,L,Ao,`˘`,`\\breve`),P(F,L,Ao,`ˇ`,`\\check`),P(F,L,Ao,`^`,`\\hat`),P(F,L,Ao,`⃗`,`\\vec`),P(F,L,Ao,`˙`,`\\dot`),P(F,L,Ao,`˚`,`\\mathring`),P(F,L,B,``,`\\@imath`),P(F,L,B,``,`\\@jmath`),P(F,L,H,`ı`,`ı`),P(F,L,H,`ȷ`,`ȷ`),P(I,L,H,`ı`,`\\i`,!0),P(I,L,H,`ȷ`,`\\j`,!0),P(I,L,H,`ß`,`\\ss`,!0),P(I,L,H,`æ`,`\\ae`,!0),P(I,L,H,`œ`,`\\oe`,!0),P(I,L,H,`ø`,`\\o`,!0),P(I,L,H,`Æ`,`\\AE`,!0),P(I,L,H,`Œ`,`\\OE`,!0),P(I,L,H,`Ø`,`\\O`,!0),P(I,L,Ao,`ˊ`,`\\'`),P(I,L,Ao,`ˋ`,"\\`"),P(I,L,Ao,`ˆ`,`\\^`),P(I,L,Ao,`˜`,`\\~`),P(I,L,Ao,`ˉ`,`\\=`),P(I,L,Ao,`˘`,`\\u`),P(I,L,Ao,`˙`,`\\.`),P(I,L,Ao,`¸`,`\\c`),P(I,L,Ao,`˚`,`\\r`),P(I,L,Ao,`ˇ`,`\\v`),P(I,L,Ao,`¨`,`\\"`),P(I,L,Ao,`˝`,`\\H`),P(I,L,Ao,`◯`,`\\textcircled`);var Lo={"--":!0,"---":!0,"``":!0,"''":!0};P(I,L,H,`–`,`--`,!0),P(I,L,H,`–`,`\\textendash`),P(I,L,H,`—`,`---`,!0),P(I,L,H,`—`,`\\textemdash`),P(I,L,H,`‘`,"`",!0),P(I,L,H,`‘`,`\\textquoteleft`),P(I,L,H,`’`,`'`,!0),P(I,L,H,`’`,`\\textquoteright`),P(I,L,H,`“`,"``",!0),P(I,L,H,`“`,`\\textquotedblleft`),P(I,L,H,`”`,`''`,!0),P(I,L,H,`”`,`\\textquotedblright`),P(F,L,H,`°`,`\\degree`,!0),P(I,L,H,`°`,`\\degree`),P(I,L,H,`°`,`\\textdegree`,!0),P(F,L,H,`£`,`\\pounds`),P(F,L,H,`£`,`\\mathsterling`,!0),P(I,L,H,`£`,`\\pounds`),P(I,L,H,`£`,`\\textsterling`,!0),P(F,R,H,`✠`,`\\maltese`),P(I,R,H,`✠`,`\\maltese`);for(var Ro=`0123456789/@."`,zo=0;zo<Ro.length;zo++){var Bo=Ro.charAt(zo);P(F,L,H,Bo,Bo)}for(var Vo=`0123456789!@*()-=+";:?/.,`,Ho=0;Ho<Vo.length;Ho++){var Uo=Vo.charAt(Ho);P(I,L,H,Uo,Uo)}for(var Wo=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,Go=0;Go<Wo.length;Go++){var Ko=Wo.charAt(Go);P(F,L,B,Ko,Ko),P(I,L,H,Ko,Ko)}P(F,R,H,`C`,`ℂ`),P(I,R,H,`C`,`ℂ`),P(F,R,H,`H`,`ℍ`),P(I,R,H,`H`,`ℍ`),P(F,R,H,`N`,`ℕ`),P(I,R,H,`N`,`ℕ`),P(F,R,H,`P`,`ℙ`),P(I,R,H,`P`,`ℙ`),P(F,R,H,`Q`,`ℚ`),P(I,R,H,`Q`,`ℚ`),P(F,R,H,`R`,`ℝ`),P(I,R,H,`R`,`ℝ`),P(F,R,H,`Z`,`ℤ`),P(I,R,H,`Z`,`ℤ`),P(F,L,B,`h`,`ℎ`),P(I,L,B,`h`,`ℎ`);for(var U,qo=0;qo<Wo.length;qo++){var Jo=Wo.charAt(qo);U=String.fromCharCode(55349,56320+qo),P(F,L,B,Jo,U),P(I,L,H,Jo,U),U=String.fromCharCode(55349,56372+qo),P(F,L,B,Jo,U),P(I,L,H,Jo,U),U=String.fromCharCode(55349,56424+qo),P(F,L,B,Jo,U),P(I,L,H,Jo,U),U=String.fromCharCode(55349,56580+qo),P(F,L,B,Jo,U),P(I,L,H,Jo,U),U=String.fromCharCode(55349,56684+qo),P(F,L,B,Jo,U),P(I,L,H,Jo,U),U=String.fromCharCode(55349,56736+qo),P(F,L,B,Jo,U),P(I,L,H,Jo,U),U=String.fromCharCode(55349,56788+qo),P(F,L,B,Jo,U),P(I,L,H,Jo,U),U=String.fromCharCode(55349,56840+qo),P(F,L,B,Jo,U),P(I,L,H,Jo,U),U=String.fromCharCode(55349,56944+qo),P(F,L,B,Jo,U),P(I,L,H,Jo,U),qo<26&&(U=String.fromCharCode(55349,56632+qo),P(F,L,B,Jo,U),P(I,L,H,Jo,U),U=String.fromCharCode(55349,56476+qo),P(F,L,B,Jo,U),P(I,L,H,Jo,U))}U=String.fromCharCode(55349,56668),P(F,L,B,`k`,U),P(I,L,H,`k`,U);for(var Yo=0;Yo<10;Yo++){var Xo=Yo.toString();U=String.fromCharCode(55349,57294+Yo),P(F,L,B,Xo,U),P(I,L,H,Xo,U),U=String.fromCharCode(55349,57314+Yo),P(F,L,B,Xo,U),P(I,L,H,Xo,U),U=String.fromCharCode(55349,57324+Yo),P(F,L,B,Xo,U),P(I,L,H,Xo,U),U=String.fromCharCode(55349,57334+Yo),P(F,L,B,Xo,U),P(I,L,H,Xo,U)}for(var Zo=`ÐÞþ`,Qo=0;Qo<Zo.length;Qo++){var $o=Zo.charAt(Qo);P(F,L,B,$o,$o),P(I,L,H,$o,$o)}var es={mathClass:`mathbf`,textClass:`textbf`,font:`Main-Bold`},ts={mathClass:`mathnormal`,textClass:`textit`,font:`Math-Italic`},ns={mathClass:`boldsymbol`,textClass:`boldsymbol`,font:`Main-BoldItalic`},rs={mathClass:`mathscr`,textClass:`textscr`,font:`Script-Regular`},is={mathClass:``,textClass:``,font:``},as={mathClass:`mathfrak`,textClass:`textfrak`,font:`Fraktur-Regular`},os={mathClass:`mathbb`,textClass:`textbb`,font:`AMS-Regular`},ss={mathClass:`mathboldfrak`,textClass:`textboldfrak`,font:`Fraktur-Regular`},cs={mathClass:`mathsf`,textClass:`textsf`,font:`SansSerif-Regular`},ls={mathClass:`mathboldsf`,textClass:`textboldsf`,font:`SansSerif-Bold`},us={mathClass:`mathitsf`,textClass:`textitsf`,font:`SansSerif-Italic`},ds={mathClass:`mathtt`,textClass:`texttt`,font:`Typewriter-Regular`},fs=[es,es,ts,ts,ns,ns,rs,is,is,is,as,as,os,os,ss,ss,cs,cs,ls,ls,us,us,is,is,ds,ds],ps=[es,is,cs,ls,ds],ms=e=>{var t=e.charCodeAt(0),n=e.charCodeAt(1),r=(t-55296)*1024+(n-56320)+65536;if(119808<=r&&r<120484)return fs[Math.floor((r-119808)/26)];if(120782<=r&&r<=120831)return ps[Math.floor((r-120782)/10)];if(r===120485||r===120486)return fs[0];if(120486<r&&r<120782)return is;throw new j(`Unsupported character: `+e)},hs=function(e,t,n){if(ko[n][e]){var r=ko[n][e].replace;r&&(e=r)}return{value:e,metrics:Eo(e,t,n)}},gs=function(e,t,n,r,i){var a=hs(e,t,n),o=a.metrics;e=a.value;var s;if(o){var c=o.italic;(n===`text`||r&&r.font===`mathit`)&&(c=0),s=new ho(e,o.height,o.depth,c,o.skew,o.width,i)}else typeof console<`u`&&console.warn(`No character metrics `+(`for '`+e+`' in style '`+t+`' and mode '`+n+`'`)),s=new ho(e,0,0,0,0,0,i);if(r){s.maxFontSize=r.sizeMultiplier,r.style.isTight()&&s.classes.push(`mtight`);var l=r.getColor();l&&(s.style.color=l)}return s},_s=function(e,t,n,r){return r===void 0&&(r=[]),n.font===`boldsymbol`&&hs(e,`Main-Bold`,t).metrics?gs(e,`Main-Bold`,t,n,r.concat([`mathbf`])):e===`\\`||ko[t][e].font===`main`?gs(e,`Main-Regular`,t,n,r):gs(e,`AMS-Regular`,t,n,r.concat([`amsrm`]))},vs=function(e,t,n){return n!==`textord`&&hs(e,`Math-BoldItalic`,t).metrics?{fontName:`Math-BoldItalic`,fontClass:`boldsymbol`}:{fontName:`Main-Bold`,fontClass:`mathbf`}},ys=function(e,t){var n=e.type===`mathord`?`mathord`:`textord`,r=e.mode,i=e.text,a=[`mord`],{font:o,fontFamily:s,fontWeight:c,fontShape:l}=t,u=r===`math`||r===`text`&&!!o,d=u?o:s,f=``,p=``;if(i.charCodeAt(0)===55349){var m=ms(i);f=m.font,p=m[r+`Class`]}if(f)return gs(i,f,r,t,a.concat(p));if(d){var h,g;if(d===`boldsymbol`){var _=vs(i,r,n);h=_.fontName,g=[_.fontClass]}else u?(h=js[o].fontName,g=[o]):(h=As(s,c,l),g=[s,c,l]);if(hs(i,h,r).metrics)return gs(i,h,r,t,a.concat(g));if(Lo.hasOwnProperty(i)&&h.slice(0,10)===`Typewriter`){for(var v=[],y=0;y<i.length;y++)v.push(gs(i[y],h,r,t,a.concat(g)));return Es(v)}}if(n===`mathord`)return gs(i,`Math-Italic`,r,t,a.concat([`mathnormal`]));if(n===`textord`){var b=ko[r][i]&&ko[r][i].font;if(b===`ams`)return gs(i,As(`amsrm`,c,l),r,t,a.concat(`amsrm`,c,l));if(b===`main`||!b)return gs(i,As(`textrm`,c,l),r,t,a.concat(c,l));var x=As(b,c,l);return gs(i,x,r,t,a.concat(x,c,l))}else throw Error(`unexpected type: `+n+` in makeOrd`)},bs=(e,t)=>{if(io(e.classes)!==io(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass(`mathnormal`))return!1;if(e.classes.length===1){var n=e.classes[0];if(n===`mbin`||n===`mord`)return!1}for(var r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var i of Object.keys(t.style))if(e.style[i]!==t.style[i])return!1;return!0},xs=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof ho&&r instanceof ho&&bs(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},Ss=function(e){for(var t=0,n=0,r=0,i=0;i<e.children.length;i++){var a=e.children[i];a.height>t&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},W=function(e,t,n,r){var i=new uo(e,t,n,r);return Ss(i),i},Cs=(e,t,n,r)=>new uo(e,t,n,r),ws=function(e,t,n){var r=W([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=N(r.height),r.maxFontSize=1,r},Ts=function(e,t,n,r){var i=new fo(e,t,n,r);return Ss(i),i},Es=function(e){var t=new $a(e);return Ss(t),t},Ds=function(e,t){return e instanceof $a?W([],[e],t):e},Os=function(e){if(e.positionType===`individualShift`){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,a=1;a<t.length;a++){var o=-t[a].shift-i-t[a].elem.depth,s=o-(t[a-1].elem.height+t[a-1].elem.depth);i+=o,n.push({type:`kern`,size:s}),n.push(t[a])}return{children:n,depth:r}}var c;if(e.positionType===`top`){for(var l=e.positionData,u=0;u<e.children.length;u++){var d=e.children[u];l-=d.type===`kern`?d.size:d.elem.height+d.elem.depth}c=l}else if(e.positionType===`bottom`)c=-e.positionData;else{var f=e.children[0];if(f.type!==`elem`)throw Error(`First child must have type "elem".`);if(e.positionType===`shift`)c=-f.elem.depth-e.positionData;else if(e.positionType===`firstBaseline`)c=-f.elem.depth;else throw Error(`Invalid positionType `+e.positionType+`.`)}return{children:e.children,depth:c}},G=function(e,t){for(var{children:n,depth:r}=Os(e),i=0,a=0;a<n.length;a++){var o=n[a];if(o.type===`elem`){var s=o.elem;i=Math.max(i,s.maxFontSize,s.height)}}i+=2;var c=W([`pstrut`],[]);c.style.height=N(i);for(var l=[],u=r,d=r,f=r,p=0;p<n.length;p++){var m=n[p];if(m.type===`kern`)f+=m.size;else{var h=m.elem,g=m.wrapperClasses||[],_=m.wrapperStyle||{},v=W(g,[c,h],void 0,_);v.style.top=N(-i-f-h.depth),m.marginLeft&&(v.style.marginLeft=m.marginLeft),m.marginRight&&(v.style.marginRight=m.marginRight),l.push(v),f+=h.height+h.depth}u=Math.min(u,f),d=Math.max(d,f)}var y=W([`vlist`],l);y.style.height=N(d);var b;if(u<0){var x=W([`vlist`],[W([],[])]);x.style.height=N(-u),b=[W([`vlist-r`],[y,W([`vlist-s`],[new ho(`​`)])]),W([`vlist-r`],[x])]}else b=[W([`vlist-r`],[y])];var S=W([`vlist-t`],b);return b.length===2&&S.classes.push(`vlist-t2`),S.height=d,S.depth=-u,S},ks=(e,t)=>{var n=W([`mspace`],[],t),r=ro(e,t);return n.style.marginRight=N(r),n},As=(e,t,n)=>{var r,i;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 i=t===`textbf`&&n===`textit`?`BoldItalic`:t===`textbf`?`Bold`:n===`textit`?`Italic`:`Regular`,r+`-`+i},js={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`},mathsfit:{variant:`sans-serif-italic`,fontName:`SansSerif-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`}},Ms={vec:[`vec`,.471,.714],oiintSize1:[`oiintSize1`,.957,.499],oiintSize2:[`oiintSize2`,1.472,.659],oiiintSize1:[`oiiintSize1`,1.304,.499],oiiintSize2:[`oiiintSize2`,1.98,.659]},Ns=function(e,t){var[n,r,i]=Ms[e],a=Cs([`overlay`],[new go([new _o(n)],{width:N(r),height:N(i),style:`width:`+N(r),viewBox:`0 0 `+1e3*r+` `+1e3*i,preserveAspectRatio:`xMinYMin`})],t);return a.height=i,a.style.height=N(i),a.style.width=N(r),a},Ps={number:3,unit:`mu`},Fs={number:4,unit:`mu`},Is={number:5,unit:`mu`},Ls={mord:{mop:Ps,mbin:Fs,mrel:Is,minner:Ps},mop:{mord:Ps,mop:Ps,mrel:Is,minner:Ps},mbin:{mord:Fs,mop:Fs,mopen:Fs,minner:Fs},mrel:{mord:Is,mop:Is,mopen:Is,minner:Is},mopen:{},mclose:{mop:Ps,mbin:Fs,mrel:Is,minner:Ps},mpunct:{mord:Ps,mop:Ps,mrel:Is,mopen:Ps,mclose:Ps,mpunct:Ps,minner:Ps},minner:{mord:Ps,mop:Ps,mbin:Fs,mrel:Is,mopen:Ps,mpunct:Ps,minner:Ps}},Rs={mord:{mop:Ps},mop:{mord:Ps,mop:Ps},mbin:{},mrel:{},mopen:{},mclose:{mop:Ps},mpunct:{},minner:{mop:Ps}},zs={},Bs={},Vs={};function K(e){for(var{type:t,names:n,htmlBuilder:r,mathmlBuilder:i}=e,a=0;a<n.length;++a)zs[n[a]]=e;t&&(r&&(Bs[t]=r),i&&(Vs[t]=i))}function Hs(e){var{type:t,htmlBuilder:n,mathmlBuilder:r}=e;n&&(Bs[t]=n),r&&(Vs[t]=r)}var Us=function(e){return e.type===`ordgroup`&&e.body.length===1?e.body[0]:e},Ws=function(e){return e.type===`ordgroup`?e.body:[e]},Gs=new Set([`leftmost`,`mbin`,`mopen`,`mrel`,`mop`,`mpunct`]),Ks=new Set([`rightmost`,`mrel`,`mclose`,`mpunct`]),qs={display:M.DISPLAY,text:M.TEXT,script:M.SCRIPT,scriptscript:M.SCRIPTSCRIPT},Js={mord:`mord`,mop:`mop`,mbin:`mbin`,mrel:`mrel`,mopen:`mopen`,mclose:`mclose`,mpunct:`mpunct`,minner:`minner`},Ys=function(e,t,n,r){r===void 0&&(r=[null,null]);for(var i=[],a=0;a<e.length;a++){var o=q(e[a],t);if(o instanceof $a){var s=o.children;i.push(...s)}else i.push(o)}if(xs(i),!n)return i;var c=t;if(e.length===1){var l=e[0];l.type===`sizing`?c=t.havingSize(l.size):l.type===`styling`&&(c=t.havingStyle(qs[l.style]))}var u=W([r[0]||`leftmost`],[],t),d=W([r[1]||`rightmost`],[],t),f=n===`root`;return Xs(i,(e,t)=>{var n=t.classes[0],r=e.classes[0];n===`mbin`&&Ks.has(r)?t.classes[0]=`mord`:r===`mbin`&&Gs.has(n)&&(e.classes[0]=`mord`)},{node:u},d,f),Xs(i,(e,t)=>{var n=$s(t),r=$s(e),i=n&&r?e.hasClass(`mtight`)?Rs[n]?.[r]:Ls[n]?.[r]:null;if(i)return ks(i,c)},{node:u},d,f),i},Xs=function(e,t,n,r,i){r&&e.push(r);for(var a=0;a<e.length;a++){var o=e[a],s=Zs(o);if(s){Xs(s.children,t,n,null,i);continue}var c=!o.hasClass(`mspace`);if(c){var l=t(o,n.node);l&&(n.insertAfter?n.insertAfter(l):(e.unshift(l),a++))}c?n.node=o:i&&o.hasClass(`newline`)&&(n.node=W([`leftmost`])),n.insertAfter=(t=>n=>{e.splice(t+1,0,n),a++})(a)}r&&e.pop()},Zs=function(e){return e instanceof $a||e instanceof fo||e instanceof uo&&e.hasClass(`enclosing`)?e:null},Qs=function(e,t){var n=Zs(e);if(n){var r=n.children;if(r.length){if(t===`right`)return Qs(r[r.length-1],`right`);if(t===`left`)return Qs(r[0],`left`)}}return e},$s=function(e,t){return e?(t&&(e=Qs(e,t)),Js[e.classes[0]]||null):null},ec=function(e,t){var n=[`nulldelimiter`].concat(e.baseSizingClasses());return W(t.concat(n))},q=function(e,t,n){if(!e)return W();if(Bs[e.type]){var r=Bs[e.type](e,t);if(n&&t.size!==n.size){r=W(t.sizingClasses(n),[r],t);var i=t.sizeMultiplier/n.sizeMultiplier;r.height*=i,r.depth*=i}return r}else throw new j(`Got group of unknown type: '`+e.type+`'`)};function tc(e,t){var n=W([`base`],e,t),r=W([`strut`]);return r.style.height=N(n.height+n.depth),n.depth&&(r.style.verticalAlign=N(-n.depth)),n.children.unshift(r),n}function nc(e,t){var n=null;e.length===1&&e[0].type===`tag`&&(n=e[0].tag,e=e[0].body);var r=Ys(e,t,`root`),i;r.length===2&&r[1].hasClass(`tag`)&&(i=r.pop());for(var a=[],o=[],s=0;s<r.length;s++)if(o.push(r[s]),r[s].hasClass(`mbin`)||r[s].hasClass(`mrel`)||r[s].hasClass(`allowbreak`)){for(var c=!1;s<r.length-1&&r[s+1].hasClass(`mspace`)&&!r[s+1].hasClass(`newline`);)s++,o.push(r[s]),r[s].hasClass(`nobreak`)&&(c=!0);c||(a.push(tc(o,t)),o=[])}else r[s].hasClass(`newline`)&&(o.pop(),o.length>0&&(a.push(tc(o,t)),o=[]),a.push(r[s]));o.length>0&&a.push(tc(o,t));var l;n?(l=tc(Ys(n,t,!0),t),l.classes=[`tag`],a.push(l)):i&&a.push(i);var u=W([`katex-html`],a);if(u.setAttribute(`aria-hidden`,`true`),l){var d=l.children[0];d.style.height=N(u.height+u.depth),u.depth&&(d.style.verticalAlign=N(-u.depth))}return u}function rc(e){return new $a(e)}var J=class{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=io(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof ic&&this.children[n+1]instanceof ic){for(var r=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof ic;)r+=this.children[++n].toText();e.appendChild(new ic(r).toNode())}else 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+=la(this.attributes[t]),e+=`"`);this.classes.length>0&&(e+=` class ="`+la(io(this.classes))+`"`),e+=`>`;for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+=`</`+this.type+`>`,e}toText(){return this.children.map(e=>e.toText()).join(``)}},ic=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return la(this.toText())}toText(){return this.text}},ac=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character=` `:e>=.1666&&e<=.1667?this.character=` `:e>=.2222&&e<=.2223?this.character=` `:e>=.2777&&e<=.2778?this.character=`  `:e>=-.05556&&e<=-.05555?this.character=` ⁣`:e>=-.1667&&e<=-.1666?this.character=` ⁣`:e>=-.2223&&e<=-.2222?this.character=` ⁣`:e>=-.2778&&e<=-.2777?this.character=` ⁣`:this.character=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`,N(this.width)),e}toMarkup(){return this.character?`<mtext>`+this.character+`</mtext>`:`<mspace width="`+N(this.width)+`"/>`}toText(){return this.character?this.character:` `}},oc=new Set([`\\imath`,`\\jmath`]),sc=new Set([`mrow`,`mtable`]),cc=function(e,t,n){return ko[t][e]&&ko[t][e].replace&&e.charCodeAt(0)!==55349&&!(Lo.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)===`tt`||n.font&&n.font.slice(4,6)===`tt`))&&(e=ko[t][e].replace),new ic(e)},lc=function(e){return e.length===1?e[0]:new J(`mrow`,e)},uc={mathit:`italic`,boldsymbol:e=>e.type===`textord`?`bold`:`bold-italic`,mathbf:`bold`,mathbb:`double-struck`,mathsfit:`sans-serif-italic`,mathfrak:`fraktur`,mathscr:`script`,mathcal:`script`,mathsf:`sans-serif`,mathtt:`monospace`},dc=(e,t)=>{if(e.mode===`text`){if(t.fontFamily===`texttt`)return`monospace`;if(t.fontFamily===`textsf`)return t.fontShape===`textit`&&t.fontWeight===`textbf`?`sans-serif-bold-italic`:t.fontShape===`textit`?`sans-serif-italic`:t.fontWeight===`textbf`?`bold-sans-serif`:`sans-serif`;if(t.fontShape===`textit`&&t.fontWeight===`textbf`)return`bold-italic`;if(t.fontShape===`textit`)return`italic`;if(t.fontWeight===`textbf`)return`bold`}var n=t.font;if(!n||n===`mathnormal`)return null;var r=e.mode,i=uc[n];if(i)return typeof i==`function`?i(e):i;var a=e.text;if(oc.has(a))return null;if(ko[r][a]){var o=ko[r][a].replace;o&&(a=o)}var s=js[n].fontName;return Eo(a,s,r)?js[n].variant:null};function fc(e){if(!e)return!1;if(e.type===`mi`&&e.children.length===1){var t=e.children[0];return t instanceof ic&&t.text===`.`}else if(e.type===`mo`&&e.children.length===1&&e.getAttribute(`separator`)===`true`&&e.getAttribute(`lspace`)===`0em`&&e.getAttribute(`rspace`)===`0em`){var n=e.children[0];return n instanceof ic&&n.text===`,`}else return!1}var pc=function(e,t,n){if(e.length===1){var r=Y(e[0],t);return n&&r instanceof J&&r.type===`mo`&&(r.setAttribute(`lspace`,`0em`),r.setAttribute(`rspace`,`0em`)),[r]}for(var i=[],a,o=0;o<e.length;o++){var s=Y(e[o],t);if(s instanceof J&&a instanceof J){if(s.type===`mtext`&&a.type===`mtext`&&s.getAttribute(`mathvariant`)===a.getAttribute(`mathvariant`)){a.children.push(...s.children);continue}else if(s.type===`mn`&&a.type===`mn`){a.children.push(...s.children);continue}else if(fc(s)&&a.type===`mn`){a.children.push(...s.children);continue}else if(s.type===`mn`&&fc(a))s.children=[...a.children,...s.children],i.pop();else if((s.type===`msup`||s.type===`msub`)&&s.children.length>=1&&(a.type===`mn`||fc(a))){var c=s.children[0];c instanceof J&&c.type===`mn`&&(c.children=[...a.children,...c.children],i.pop())}else if(a.type===`mi`&&a.children.length===1){var l=a.children[0];if(l instanceof ic&&l.text===`̸`&&(s.type===`mo`||s.type===`mi`||s.type===`mn`)){var u=s.children[0];u instanceof ic&&u.text.length>0&&(u.text=u.text.slice(0,1)+`̸`+u.text.slice(1),i.pop())}}}i.push(s),a=s}return i},mc=function(e,t,n){return lc(pc(e,t,n))},Y=function(e,t){if(!e)return new J(`mrow`);if(Vs[e.type])return Vs[e.type](e,t);throw new j(`Got group of unknown type: '`+e.type+`'`)};function hc(e,t,n,r,i){var a=pc(e,n),o=a.length===1&&a[0]instanceof J&&sc.has(a[0].type)?a[0]:new J(`mrow`,a),s=new J(`annotation`,[new ic(t)]);s.setAttribute(`encoding`,`application/x-tex`);var c=new J(`math`,[new J(`semantics`,[o,s])]);return c.setAttribute(`xmlns`,`http://www.w3.org/1998/Math/MathML`),r&&c.setAttribute(`display`,`block`),W([i?`katex`:`katex-mathml`],[c])}var gc=[[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]],_c=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],vc=function(e,t){return t.size<2?e:gc[e-1][t.size-1]},yc=class e{constructor(t){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=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||``,this.fontFamily=t.fontFamily||``,this.fontWeight=t.fontWeight||``,this.fontShape=t.fontShape||``,this.sizeMultiplier=_c[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var n={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};return Object.assign(n,t),new e(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:vc(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:_c[e-1]})}havingBaseStyle(t){t||=this.style.text();var n=vc(e.BASESIZE,t);return this.size===n&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}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===e.BASESIZE?[]:[`sizing`,`reset-size`+this.size,`size`+e.BASESIZE]}fontMetrics(){return this._fontMetrics||=Oo(this.size),this._fontMetrics}getColor(){return this.phantom?`transparent`:this.color}};yc.BASESIZE=6;var bc=function(e){return new yc({style:e.displayMode?M.DISPLAY:M.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},xc=function(e,t){if(t.displayMode){var n=[`katex-display`];t.leqno&&n.push(`leqno`),t.fleqn&&n.push(`fleqn`),e=W(n,[e])}return e},Sc=function(e,t,n){var r=bc(n),i;return n.output===`mathml`?hc(e,t,r,n.displayMode,!0):(i=n.output===`html`?W([`katex`],[nc(e,r)]):W([`katex`],[hc(e,t,r,n.displayMode,!1),nc(e,r)]),xc(i,n))},Cc=function(e,t,n){return xc(W([`katex`],[nc(e,bc(n))]),n)},wc={widehat:`^`,widecheck:`ˇ`,widetilde:`~`,utilde:`~`,overleftarrow:`←`,underleftarrow:`←`,xleftarrow:`←`,overrightarrow:`→`,underrightarrow:`→`,xrightarrow:`→`,underbrace:`⏟`,overbrace:`⏞`,underbracket:`⎵`,overbracket:`⎴`,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":`=`},Tc=function(e){var t=new J(`mo`,[new ic(wc[e.replace(/^\\/,``)])]);return t.setAttribute(`stretchy`,`true`),t},Ec={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],overbracket:[[`leftbracketover`,`rightbracketover`],1.6,440],underbracket:[[`leftbracketunder`,`rightbracketunder`],1.6,410],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]},Dc=new Set([`widehat`,`widecheck`,`widetilde`,`utilde`]),Oc=function(e,t){function n(){var n=4e5,r=e.label.slice(1);if(Dc.has(r)&&`base`in e){var i=e.base.type===`ordgroup`?e.base.body.length:1,a,o,s;if(i>5)r===`widehat`||r===`widecheck`?(a=420,n=2364,s=.42,o=r+`4`):(a=312,n=2340,s=.34,o=`tilde4`);else{var c=[1,1,2,2,3,3][i];r===`widehat`||r===`widecheck`?(n=[0,1062,2364,2364,2364][c],a=[0,239,300,360,420][c],s=[0,.24,.3,.3,.36,.42][c],o=r+c):(n=[0,600,1033,2339,2340][c],a=[0,260,286,306,312][c],s=[0,.26,.286,.3,.306,.34][c],o=`tilde`+c)}return{span:Cs([],[new go([new _o(o)],{width:`100%`,height:N(s),viewBox:`0 0 `+n+` `+a,preserveAspectRatio:`none`})],t),minWidth:0,height:s}}else{var l=[],u=Ec[r];if(!u)throw Error(`No SVG data for "`+r+`".`);var[d,f,p]=u,m=p/1e3,h=d.length,g,_;if(h===1){if(u.length!==4)throw Error(`Expected 4-tuple for single-path SVG data "`+r+`".`);g=[`hide-tail`],_=[u[3]]}else if(h===2)g=[`halfarrow-left`,`halfarrow-right`],_=[`xMinYMin`,`xMaxYMin`];else if(h===3)g=[`brace-left`,`brace-center`,`brace-right`],_=[`xMinYMin`,`xMidYMin`,`xMaxYMin`];else throw Error(`Correct katexImagesData or update code here to support
254
+ `+h+` children.`);for(var v=0;v<h;v++){var y=new go([new _o(d[v])],{width:`400em`,height:N(m),viewBox:`0 0 `+n+` `+p,preserveAspectRatio:_[v]+` slice`}),b=Cs([g[v]],[y],t);if(h===1)return{span:b,minWidth:f,height:m};b.style.height=N(m),l.push(b)}return{span:W([`stretchy`],l,t),minWidth:f,height:m}}}var{span:r,minWidth:i,height:a}=n();return r.height=a,r.style.height=N(a),i>0&&(r.style.minWidth=N(i)),r},kc=function(e,t,n,r,i){var a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=W([`stretchy`,t],[],i),t===`fbox`){var s=i.color&&i.getColor();s&&(a.style.borderColor=s)}}else{var c=[];/^[bx]cancel$/.test(t)&&c.push(new vo({x1:`0`,y1:`0`,x2:`100%`,y2:`100%`,"stroke-width":`0.046em`})),/^x?cancel$/.test(t)&&c.push(new vo({x1:`0`,y1:`100%`,x2:`100%`,y2:`0`,"stroke-width":`0.046em`})),a=Cs([],[new go(c,{width:`100%`,height:N(o)})],i)}return a.height=o,a.style.height=N(o),a},Ac={bin:1,close:1,inner:1,open:1,punct:1,rel:1},jc={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function Mc(e){return e in Ac}function X(e,t){if(!e||e.type!==t)throw Error(`Expected node of type `+t+`, but got `+(e?`node of type `+e.type:String(e)));return e}function Nc(e){var t=Pc(e);if(!t)throw Error(`Expected node of symbol group type, but got `+(e?`node of type `+e.type:String(e)));return t}function Pc(e){return e&&(e.type===`atom`||jc.hasOwnProperty(e.type))?e:null}var Fc=e=>{if(e instanceof ho)return e;if(xo(e)&&e.children.length===1)return Fc(e.children[0])},Ic=(e,t)=>{var n,r,i;e&&e.type===`supsub`?(r=X(e.base,`accent`),n=r.base,e.base=n,i=bo(q(e,t)),e.base=r):(r=X(e,`accent`),n=r.base);var a=q(n,t.havingCrampedStyle()),o=r.isShifty&&fa(n),s=0;o&&(s=Fc(a)?.skew??0);var c=r.label===`\\c`,l=c?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),u;if(r.isStretchy)u=Oc(r,t),u=G({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`elem`,elem:u,wrapperClasses:[`svg-align`],wrapperStyle:s>0?{width:`calc(100% - `+N(2*s)+`)`,marginLeft:N(2*s)}:void 0}]});else{var d,f;r.label===`\\vec`?(d=Ns(`vec`,t),f=Ms.vec[1]):(d=ys({type:`textord`,mode:r.mode,text:r.label},t),d=yo(d),d.italic=0,f=d.width,c&&(l+=d.depth)),u=W([`accent-body`],[d]);var p=r.label===`\\textcircled`;p&&(u.classes.push(`accent-full`),l=a.height);var m=s;p||(m-=f/2),u.style.left=N(m),r.label===`\\textcircled`&&(u.style.top=`.2em`),u=G({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:-l},{type:`elem`,elem:u}]})}var h=W([`mord`,`accent`],[u],t);return i?(i.children[0]=h,i.height=Math.max(h.height,i.height),i.classes[0]=`mord`,i):h},Lc=(e,t)=>{var n=e.isStretchy?Tc(e.label):new J(`mo`,[cc(e.label,e.mode)]),r=new J(`mover`,[Y(e.base,t),n]);return r.setAttribute(`accent`,`true`),r},Rc=new RegExp([`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`].map(e=>`\\`+e).join(`|`));K({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`],numArgs:1,handler:(e,t)=>{var n=Us(t[0]),r=!Rc.test(e.funcName),i=!r||e.funcName===`\\widehat`||e.funcName===`\\widetilde`||e.funcName===`\\widecheck`;return{type:`accent`,mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:Ic,mathmlBuilder:Lc}),K({type:`accent`,names:[`\\'`,"\\`",`\\^`,`\\~`,`\\=`,`\\u`,`\\.`,`\\"`,`\\c`,`\\r`,`\\H`,`\\v`,`\\textcircled`],numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`primitive`],handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r===`math`&&(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}}}),K({type:`accentUnder`,names:[`\\underleftarrow`,`\\underrightarrow`,`\\underleftrightarrow`,`\\undergroup`,`\\underlinesegment`,`\\utilde`],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=q(e.base,t),r=Oc(e,t),i=e.label===`\\utilde`?.12:0;return W([`mord`,`accentunder`],[G({positionType:`top`,positionData:n.height,children:[{type:`elem`,elem:r,wrapperClasses:[`svg-align`]},{type:`kern`,size:i},{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=Tc(e.label),r=new J(`munder`,[Y(e.base,t),n]);return r.setAttribute(`accentunder`,`true`),r}});var zc=e=>{var t=new J(`mpadded`,e?[e]:[]);return t.setAttribute(`width`,`+0.6em`),t.setAttribute(`lspace`,`0.3em`),t};K({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`],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=t.style,r=t.havingStyle(n.sup()),i=Ds(q(e.body,r,t),t),a=e.label.slice(0,2)===`\\x`?`x`:`cd`;i.classes.push(a+`-arrow-pad`);var o;e.below&&(r=t.havingStyle(n.sub()),o=Ds(q(e.below,r,t),t),o.classes.push(a+`-arrow-pad`));var s=Oc(e,t),c=-t.fontMetrics().axisHeight+.5*s.height,l=-t.fontMetrics().axisHeight-.5*s.height-.111;(i.depth>.25||e.label===`\\xleftequilibrium`)&&(l-=i.depth);var u;if(o){var d=-t.fontMetrics().axisHeight+o.height+.5*s.height+.111;u=G({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]},{type:`elem`,elem:o,shift:d}]})}else u=G({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]}]});return W([`mrel`,`x-arrow`],[u],t)},mathmlBuilder(e,t){var n=Tc(e.label);n.setAttribute(`minsize`,e.label.charAt(0)===`x`?`1.75em`:`3.0em`);var r;if(e.body){var i=zc(Y(e.body,t));r=e.below?new J(`munderover`,[n,zc(Y(e.below,t)),i]):new J(`mover`,[n,i])}else e.below?r=new J(`munder`,[n,zc(Y(e.below,t))]):(r=zc(),r=new J(`mover`,[n,r]));return r}});function Bc(e,t){var n=Ys(e.body,t,!0);return W([e.mclass],n,t)}function Vc(e,t){var n,r=pc(e.body,t);return e.mclass===`minner`?n=new J(`mpadded`,r):e.mclass===`mord`?e.isCharacterBox?(n=r[0],n.type=`mi`):n=new J(`mi`,r):(e.isCharacterBox?(n=r[0],n.type=`mo`):n=new J(`mo`,r),e.mclass===`mbin`?(n.attributes.lspace=`0.22em`,n.attributes.rspace=`0.22em`):e.mclass===`mpunct`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0.17em`):(e.mclass===`mopen`||e.mclass===`mclose`)&&(n.attributes.lspace=`0em`,n.attributes.rspace=`0em`)),n}K({type:`mclass`,names:[`\\mathord`,`\\mathbin`,`\\mathrel`,`\\mathopen`,`\\mathclose`,`\\mathpunct`,`\\mathinner`],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.slice(5),body:Ws(i),isCharacterBox:fa(i)}},htmlBuilder:Bc,mathmlBuilder:Vc});var Hc=e=>{var t=e.type===`ordgroup`&&e.body.length?e.body[0]:e;return t.type===`atom`&&(t.family===`bin`||t.family===`rel`)?`m`+t.family:`mord`};K({type:`mclass`,names:[`\\@binrel`],numArgs:2,handler(e,t){var{parser:n}=e;return{type:`mclass`,mode:n.mode,mclass:Hc(t[0]),body:Ws(t[1]),isCharacterBox:fa(t[1])}}}),K({type:`mclass`,names:[`\\stackrel`,`\\overset`,`\\underset`],numArgs:2,handler(e,t){var{parser:n,funcName:r}=e,i=t[1],a=t[0],o=r===`\\stackrel`?`mrel`:Hc(i),s={type:`op`,mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!==`\\stackrel`,body:Ws(i)},c=r===`\\underset`?{type:`supsub`,mode:a.mode,base:s,sub:a}:{type:`supsub`,mode:a.mode,base:s,sup:a};return{type:`mclass`,mode:n.mode,mclass:o,body:[c],isCharacterBox:fa(c)}}}),K({type:`pmb`,names:[`\\pmb`],numArgs:1,allowedInText:!0,handler(e,t){var{parser:n}=e;return{type:`pmb`,mode:n.mode,mclass:Hc(t[0]),body:Ws(t[0])}},htmlBuilder(e,t){var n=Ys(e.body,t,!0),r=W([e.mclass],n,t);return r.style.textShadow=`0.02em 0.01em 0.04px`,r},mathmlBuilder(e,t){var n=new J(`mstyle`,pc(e.body,t));return n.setAttribute(`style`,`text-shadow: 0.02em 0.01em 0.04px`),n}});var Uc={">":`\\\\cdrightarrow`,"<":`\\\\cdleftarrow`,"=":`\\\\cdlongequal`,A:`\\uparrow`,V:`\\downarrow`,"|":`\\Vert`,".":`no arrow`},Wc=()=>({type:`styling`,body:[],mode:`math`,style:`display`,resetFont:!0}),Gc=e=>e.type===`textord`&&e.text===`@`,Kc=(e,t)=>(e.type===`mathord`||e.type===`atom`)&&e.text===t;function qc(e,t,n){var r=Uc[e];switch(r){case`\\\\cdrightarrow`:case`\\\\cdleftarrow`:return n.callFunction(r,[t[0]],[t[1]]);case`\\uparrow`:case`\\downarrow`:var i=n.callFunction(`\\\\cdleft`,[t[0]],[]),a={type:`atom`,text:r,mode:`math`,family:`rel`},o={type:`ordgroup`,mode:`math`,body:[i,n.callFunction(`\\Big`,[a],[]),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`}}}function Jc(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===`\\\\`)e.consume();else if(n===`\\end`){t[t.length-1].length===0&&t.pop();break}else throw new j(`Expected \\\\ or \\cr or \\end`,e.nextToken)}for(var r=[],i=[r],a=0;a<t.length;a++){for(var o=t[a],s=Wc(),c=0;c<o.length;c++)if(!Gc(o[c]))s.body.push(o[c]);else{r.push(s),c+=1;var l=Nc(o[c]).text,u=[,,];if(u[0]={type:`ordgroup`,mode:`math`,body:[]},u[1]={type:`ordgroup`,mode:`math`,body:[]},!`=|.`.includes(l))if(`<>AV`.includes(l))for(var d=0;d<2;d++){for(var f=!0,p=c+1;p<o.length;p++){if(Kc(o[p],l)){f=!1,c=p;break}if(Gc(o[p]))throw new j(`Missing a `+l+` character to complete a CD arrow.`,o[p]);u[d].body.push(o[p])}if(f)throw new j(`Missing a `+l+` character to complete a CD arrow.`,o[c])}else throw new j(`Expected one of "<>AV=|." after @`,o[c]);var m={type:`styling`,body:[qc(l,u,e)],mode:`math`,style:`display`,resetFont:!0};r.push(m),s=Wc()}a%2==0?r.push(s):r.shift(),r=[],i.push(r)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:`math`,body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:Array(i[0].length).fill({type:`align`,align:`c`,pregap:.25,postgap:.25}),colSeparationType:`CD`,hLinesBeforeRow:Array(i.length+1).fill([])}}K({type:`cdlabel`,names:[`\\\\cdleft`,`\\\\cdright`],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=Ds(q(e.label,n,t),t);return r.classes.push(`cd-label-`+e.side),r.style.bottom=N(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new J(`mrow`,[Y(e.label,t)]);return n=new J(`mpadded`,[n]),n.setAttribute(`width`,`0`),e.side===`left`&&n.setAttribute(`lspace`,`-1width`),n.setAttribute(`voffset`,`0.7em`),n=new J(`mstyle`,[n]),n.setAttribute(`displaystyle`,`false`),n.setAttribute(`scriptlevel`,`1`),n}}),K({type:`cdlabelparent`,names:[`\\\\cdparent`],numArgs:1,handler(e,t){var{parser:n}=e;return{type:`cdlabelparent`,mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=Ds(q(e.fragment,t),t);return n.classes.push(`cd-vert-arrow`),n},mathmlBuilder(e,t){return new J(`mrow`,[Y(e.fragment,t)])}}),K({type:`textord`,names:[`\\@char`],numArgs:1,allowedInText:!0,handler(e,t){for(var{parser:n}=e,r=X(t[0],`ordgroup`).body,i=``,a=0;a<r.length;a++){var o=X(r[a],`textord`);i+=o.text}var s=parseInt(i),c;if(isNaN(s))throw new j(`\\@char has non-numeric argument `+i);if(s<0||s>=1114111)throw new j(`\\@char with invalid code point `+i);return s<=65535?c=String.fromCharCode(s):(s-=65536,c=String.fromCharCode((s>>10)+55296,(s&1023)+56320)),{type:`textord`,mode:n.mode,text:c}}}),K({type:`color`,names:[`\\textcolor`],numArgs:2,allowedInText:!0,argTypes:[`color`,`original`],handler(e,t){var{parser:n}=e,r=X(t[0],`color-token`).color,i=t[1];return{type:`color`,mode:n.mode,color:r,body:Ws(i)}},htmlBuilder:(e,t)=>Es(Ys(e.body,t.withColor(e.color),!1)),mathmlBuilder:(e,t)=>{var n=new J(`mstyle`,pc(e.body,t.withColor(e.color)));return n.setAttribute(`mathcolor`,e.color),n}}),K({type:`color`,names:[`\\color`],numArgs:1,allowedInText:!0,argTypes:[`color`],handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=X(t[0],`color-token`).color;n.gullet.macros.set(`\\current@color`,i);var a=n.parseExpression(!0,r);return{type:`color`,mode:n.mode,color:i,body:a}}}),K({type:`cr`,names:[`\\\\`],numArgs:0,numOptionalArgs:0,allowedInText:!0,handler(e,t,n){var{parser:r}=e,i=r.gullet.future().text===`[`?r.parseSizeGroup(!0):null,a=!r.settings.displayMode||!r.settings.useStrictBehavior(`newLineInDisplayMode`,`In LaTeX, \\\\ or \\newline does nothing in display mode`);return{type:`cr`,mode:r.mode,newLine:a,size:i&&X(i,`size`).value}},htmlBuilder(e,t){var n=W([`mspace`],[],t);return e.newLine&&(n.classes.push(`newline`),e.size&&(n.style.marginTop=N(ro(e.size,t)))),n},mathmlBuilder(e,t){var n=new J(`mspace`);return e.newLine&&(n.setAttribute(`linebreak`,`newline`),e.size&&n.setAttribute(`height`,N(ro(e.size,t)))),n}});var Yc={"\\global":`\\global`,"\\long":`\\\\globallong`,"\\\\globallong":`\\\\globallong`,"\\def":`\\gdef`,"\\gdef":`\\gdef`,"\\edef":`\\xdef`,"\\xdef":`\\xdef`,"\\let":`\\\\globallet`,"\\futurelet":`\\\\globalfuture`},Xc=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new j(`Expected a control sequence`,e);return t},Zc=e=>{var t=e.gullet.popToken();return t.text===`=`&&(t=e.gullet.popToken(),t.text===` `&&(t=e.gullet.popToken())),t},Qc=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i??=(n.noexpand=!0,{tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};K({type:`internal`,names:[`\\global`,`\\long`,`\\\\globallong`],numArgs:0,allowedInText:!0,handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(Yc[r.text])return(n===`\\global`||n===`\\\\globallong`)&&(r.text=Yc[r.text]),X(t.parseFunction(),`internal`);throw new j(`Invalid token after macro prefix`,r)}}),K({type:`internal`,names:[`\\def`,`\\gdef`,`\\edef`,`\\xdef`],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 j(`Expected a control sequence`,r);for(var a=0,o,s=[[]];t.gullet.future().text!==`{`;)if(r=t.gullet.popToken(),r.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 j(`Invalid argument number "`+r.text+`"`);if(parseInt(r.text)!==a+1)throw new j(`Argument number "`+r.text+`" out of order`);a++,s.push([])}else if(r.text===`EOF`)throw new j(`Expected a macro definition`);else s[a].push(r.text);var{tokens:c}=t.gullet.consumeArg();return o&&c.unshift(o),(n===`\\edef`||n===`\\xdef`)&&(c=t.gullet.expandTokens(c),c.reverse()),t.gullet.macros.set(i,{tokens:c,numArgs:a,delimiters:s},n===Yc[n]),{type:`internal`,mode:t.mode}}}),K({type:`internal`,names:[`\\let`,`\\\\globallet`],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var{parser:t,funcName:n}=e,r=Xc(t.gullet.popToken());return t.gullet.consumeSpaces(),Qc(t,r,Zc(t),n===`\\\\globallet`),{type:`internal`,mode:t.mode}}}),K({type:`internal`,names:[`\\futurelet`,`\\\\globalfuture`],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var{parser:t,funcName:n}=e,r=Xc(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return Qc(t,r,a,n===`\\\\globalfuture`),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:`internal`,mode:t.mode}}});var $c=function(e,t,n){var r=Eo(ko.math[e]&&ko.math[e].replace||e,t,n);if(!r)throw Error(`Unsupported symbol `+e+` and font size `+t+`.`);return r},el=function(e,t,n,r){var i=n.havingBaseStyle(t),a=W(r.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},tl=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=N(i),e.height-=i,e.depth+=i},nl=function(e,t,n,r,i,a){var o=el(gs(e,`Main-Regular`,i,r),t,r,a);return n&&tl(o,r,t),o},rl=function(e,t,n,r){return gs(e,`Size`+t+`-Regular`,n,r)},il=function(e,t,n,r,i,a){var o=rl(e,t,i,r),s=el(W([`delimsizing`,`size`+t],[o],r),M.TEXT,r,a);return n&&tl(s,r,M.TEXT),s},al=function(e,t,n){return{type:`elem`,elem:W([`delimsizinginner`,t===`Size1-Regular`?`delim-size1`:`delim-size4`],[W([],[gs(e,t,n)])])}},ol=function(e,t,n){var r=So[`Size4-Regular`][e.charCodeAt(0)]?So[`Size4-Regular`][e.charCodeAt(0)][4]:So[`Size1-Regular`][e.charCodeAt(0)][4],i=Cs([],[new go([new _o(`inner`,Ya(e,Math.round(1e3*t)))],{width:N(r),height:N(t),style:`width:`+N(r),viewBox:`0 0 `+1e3*r+` `+Math.round(1e3*t),preserveAspectRatio:`xMinYMin`})],n);return i.height=t,i.style.height=N(t),i.style.width=N(r),{type:`elem`,elem:i}},sl=.008,cl={type:`kern`,size:-1*sl},ll=new Set([`|`,`\\lvert`,`\\rvert`,`\\vert`]),ul=new Set([`\\|`,`\\lVert`,`\\rVert`,`\\Vert`]),dl=function(e,t,n,r,i,a){var o,s,c,l,u=``,d=0;o=c=l=e,s=null;var f=`Size1-Regular`;e===`\\uparrow`?c=l=`⏐`:e===`\\Uparrow`?c=l=`‖`:e===`\\downarrow`?o=c=`⏐`:e===`\\Downarrow`?o=c=`‖`:e===`\\updownarrow`?(o=`\\uparrow`,c=`⏐`,l=`\\downarrow`):e===`\\Updownarrow`?(o=`\\Uparrow`,c=`‖`,l=`\\Downarrow`):ll.has(e)?(c=`∣`,u=`vert`,d=333):ul.has(e)?(c=`∥`,u=`doublevert`,d=556):e===`[`||e===`\\lbrack`?(o=`⎡`,c=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lbrack`,d=667):e===`]`||e===`\\rbrack`?(o=`⎤`,c=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rbrack`,d=667):e===`\\lfloor`||e===`⌊`?(c=o=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lfloor`,d=667):e===`\\lceil`||e===`⌈`?(o=`⎡`,c=l=`⎢`,f=`Size4-Regular`,u=`lceil`,d=667):e===`\\rfloor`||e===`⌋`?(c=o=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rfloor`,d=667):e===`\\rceil`||e===`⌉`?(o=`⎤`,c=l=`⎥`,f=`Size4-Regular`,u=`rceil`,d=667):e===`(`||e===`\\lparen`?(o=`⎛`,c=`⎜`,l=`⎝`,f=`Size4-Regular`,u=`lparen`,d=875):e===`)`||e===`\\rparen`?(o=`⎞`,c=`⎟`,l=`⎠`,f=`Size4-Regular`,u=`rparen`,d=875):e===`\\{`||e===`\\lbrace`?(o=`⎧`,s=`⎨`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\}`||e===`\\rbrace`?(o=`⎫`,s=`⎬`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lgroup`||e===`⟮`?(o=`⎧`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\rgroup`||e===`⟯`?(o=`⎫`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lmoustache`||e===`⎰`?(o=`⎧`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):(e===`\\rmoustache`||e===`⎱`)&&(o=`⎫`,l=`⎩`,c=`⎪`,f=`Size4-Regular`);var p=$c(o,f,i),m=p.height+p.depth,h=$c(c,f,i),g=h.height+h.depth,_=$c(l,f,i),v=_.height+_.depth,y=0,b=1;if(s!==null){var x=$c(s,f,i);y=x.height+x.depth,b=2}var S=m+v+y,C=S+Math.max(0,Math.ceil((t-S)/(b*g)))*b*g,ee=r.fontMetrics().axisHeight;n&&(ee*=r.sizeMultiplier);var te=C/2-ee,w=[];if(u.length>0){var ne=C-m-v,re=Math.round(C*1e3),ie=Za(u,Math.round(ne*1e3)),ae=new _o(u,ie),oe=N(d/1e3),se=N(re/1e3),ce=Cs([],[new go([ae],{width:oe,height:se,viewBox:`0 0 `+d+` `+re})],r);ce.height=re/1e3,ce.style.width=oe,ce.style.height=se,w.push({type:`elem`,elem:ce})}else{if(w.push(al(l,f,i)),w.push(cl),s===null){var le=C-m-v+2*sl;w.push(ol(c,le,r))}else{var ue=(C-m-v-y)/2+2*sl;w.push(ol(c,ue,r)),w.push(cl),w.push(al(s,f,i)),w.push(cl),w.push(ol(c,ue,r))}w.push(cl),w.push(al(o,f,i))}var de=r.havingBaseStyle(M.TEXT);return el(W([`delimsizing`,`mult`],[G({positionType:`bottom`,positionData:te,children:w})],de),M.TEXT,r,a)},fl=80,pl=.08,ml=function(e,t,n,r,i){return Cs([`hide-tail`],[new go([new _o(e,Ja(e,r,n))],{width:`400em`,height:N(t),viewBox:`0 0 400000 `+n,preserveAspectRatio:`xMinYMin slice`})],i)},hl=function(e,t){var n=t.havingBaseSizing(),r=Tl(`\\surd`,e*n.sizeMultiplier,Cl,n),i=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,s,c,l,u;return r.type===`small`?(l=1e3+1e3*a+fl,e<1?i=1:e<1.4&&(i=.7),s=(1+a+pl)/i,c=(1+a)/i,o=ml(`sqrtMain`,s,l,a,t),o.style.minWidth=`0.853em`,u=.833/i):r.type===`large`?(l=(1e3+fl)*yl[r.size],c=(yl[r.size]+a)/i,s=(yl[r.size]+a+pl)/i,o=ml(`sqrtSize`+r.size,s,l,a,t),o.style.minWidth=`1.02em`,u=1/i):(s=e+a+pl,c=e+a,l=Math.floor(1e3*e+a)+fl,o=ml(`sqrtTall`,s,l,a,t),o.style.minWidth=`0.742em`,u=1.056),o.height=c,o.style.height=N(s),{span:o,advanceWidth:u,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},gl=new Set([`(`,`\\lparen`,`)`,`\\rparen`,`[`,`\\lbrack`,`]`,`\\rbrack`,`\\{`,`\\lbrace`,`\\}`,`\\rbrace`,`\\lfloor`,`\\rfloor`,`⌊`,`⌋`,`\\lceil`,`\\rceil`,`⌈`,`⌉`,`\\surd`]),_l=new Set([`\\uparrow`,`\\downarrow`,`\\updownarrow`,`\\Uparrow`,`\\Downarrow`,`\\Updownarrow`,`|`,`\\|`,`\\vert`,`\\Vert`,`\\lvert`,`\\rvert`,`\\lVert`,`\\rVert`,`\\lgroup`,`\\rgroup`,`⟮`,`⟯`,`\\lmoustache`,`\\rmoustache`,`⎰`,`⎱`]),vl=new Set([`<`,`>`,`\\langle`,`\\rangle`,`/`,`\\backslash`,`\\lt`,`\\gt`]),yl=[0,1.2,1.8,2.4,3],bl=function(e,t,n,r,i){if(e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`),gl.has(e)||vl.has(e))return il(e,t,!1,n,r,i);if(_l.has(e))return dl(e,yl[t],!1,n,r,i);throw new j(`Illegal delimiter: '`+e+`'`)},xl=[{type:`small`,style:M.SCRIPTSCRIPT},{type:`small`,style:M.SCRIPT},{type:`small`,style:M.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4}],Sl=[{type:`small`,style:M.SCRIPTSCRIPT},{type:`small`,style:M.SCRIPT},{type:`small`,style:M.TEXT},{type:`stack`}],Cl=[{type:`small`,style:M.SCRIPTSCRIPT},{type:`small`,style:M.SCRIPT},{type:`small`,style:M.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4},{type:`stack`}],wl=function(e){if(e.type===`small`)return`Main-Regular`;if(e.type===`large`)return`Size`+e.size+`-Regular`;if(e.type===`stack`)return`Size4-Regular`;var t=e.type;throw Error(`Add support for delim type '`+t+`' here.`)},Tl=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size);i<n.length;i++){var a=n[i];if(a.type===`stack`)break;var o=$c(e,wl(a),`math`),s=o.height+o.depth;if(a.type===`small`){var c=r.havingBaseStyle(a.style);s*=c.sizeMultiplier}if(s>t)return a}return n[n.length-1]},El=function(e,t,n,r,i,a){e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`);var o=vl.has(e)?xl:gl.has(e)?Cl:Sl,s=Tl(e,t,o,r);return s.type===`small`?nl(e,s.style,n,r,i,a):s.type===`large`?il(e,s.size,n,r,i,a):dl(e,t,n,r,i,a)},Dl=function(e,t,n,r,i,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,s=901,c=5/r.fontMetrics().ptPerEm,l=Math.max(t-o,n+o);return El(e,Math.max(l/500*s,2*l-c),!0,r,i,a)},Ol={"\\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}},kl=new Set(`(,\\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,.`.split(`,`));function Al(e){return`isMiddle`in e}function jl(e,t){var n=Pc(e);if(n&&kl.has(n.text))return n;throw n?new j(`Invalid delimiter '`+n.text+`' after '`+t.funcName+`'`,e):new j(`Invalid delimiter type '`+e.type+`'`,e)}K({type:`delimsizing`,names:[`\\bigl`,`\\Bigl`,`\\biggl`,`\\Biggl`,`\\bigr`,`\\Bigr`,`\\biggr`,`\\Biggr`,`\\bigm`,`\\Bigm`,`\\biggm`,`\\Biggm`,`\\big`,`\\Big`,`\\bigg`,`\\Bigg`],numArgs:1,argTypes:[`primitive`],handler:(e,t)=>{var n=jl(t[0],e);return{type:`delimsizing`,mode:e.parser.mode,size:Ol[e.funcName].size,mclass:Ol[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim===`.`?W([e.mclass]):bl(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!==`.`&&t.push(cc(e.delim,e.mode));var n=new J(`mo`,t);e.mclass===`mopen`||e.mclass===`mclose`?n.setAttribute(`fence`,`true`):n.setAttribute(`fence`,`false`),n.setAttribute(`stretchy`,`true`);var r=N(yl[e.size]);return n.setAttribute(`minsize`,r),n.setAttribute(`maxsize`,r),n}});function Ml(e){if(!e.body)throw Error(`Bug: The leftright ParseNode wasn't fully parsed.`)}K({type:`leftright-right`,names:[`\\right`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=e.parser.gullet.macros.get(`\\current@color`);if(n&&typeof n!=`string`)throw new j(`\\current@color set to non-string in \\right`);return{type:`leftright-right`,mode:e.parser.mode,delim:jl(t[0],e).text,color:n}}}),K({type:`leftright`,names:[`\\left`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=jl(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect(`\\right`,!1);var a=X(r.parseFunction(),`leftright-right`);return{type:`leftright`,mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{Ml(e);for(var n=Ys(e.body,t,!0,[`mopen`,`mclose`]),r=0,i=0,a=!1,o=0;o<n.length;o++){var s=n[o];Al(s)?a=!0:(r=Math.max(n[o].height,r),i=Math.max(n[o].depth,i))}r*=t.sizeMultiplier,i*=t.sizeMultiplier;var c=e.left===`.`?ec(t,[`mopen`]):Dl(e.left,r,i,t,e.mode,[`mopen`]);if(n.unshift(c),a)for(var l=1;l<n.length;l++){var u=n[l];if(Al(u)){var d=u.isMiddle;n[l]=Dl(d.delim,r,i,d.options,e.mode,[])}}var f;if(e.right===`.`)f=ec(t,[`mclose`]);else{var p=e.rightColor?t.withColor(e.rightColor):t;f=Dl(e.right,r,i,p,e.mode,[`mclose`])}return n.push(f),W([`minner`],n,t)},mathmlBuilder:(e,t)=>{Ml(e);var n=pc(e.body,t);if(e.left!==`.`){var r=new J(`mo`,[cc(e.left,e.mode)]);r.setAttribute(`fence`,`true`),n.unshift(r)}if(e.right!==`.`){var i=new J(`mo`,[cc(e.right,e.mode)]);i.setAttribute(`fence`,`true`),e.rightColor&&i.setAttribute(`mathcolor`,e.rightColor),n.push(i)}return lc(n)}}),K({type:`middle`,names:[`\\middle`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=jl(t[0],e);if(!e.parser.leftrightDepth)throw new j(`\\middle without preceding \\left`,n);return{type:`middle`,mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;return e.delim===`.`?n=ec(t,[]):(n=bl(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t}),n},mathmlBuilder:(e,t)=>{var n=new J(`mo`,[e.delim===`\\vert`||e.delim===`|`?cc(`|`,`text`):cc(e.delim,e.mode)]);return n.setAttribute(`fence`,`true`),n.setAttribute(`lspace`,`0.05em`),n.setAttribute(`rspace`,`0.05em`),n}}),K({type:`enclose`,names:[`\\colorbox`],numArgs:2,allowedInText:!0,argTypes:[`color`,`hbox`],handler(e,t,n){var{parser:r,funcName:i}=e,a=X(t[0],`color-token`).color,o=t[1];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:(e,t)=>{var n=Ds(q(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,a,o,s=fa(e.body);if(r===`sout`)a=W([`stretchy`,`sout`]),a.height=t.fontMetrics().defaultRuleThickness/i,o=-.5*t.fontMetrics().xHeight;else if(r===`phase`){var c=ro({number:.6,unit:`pt`},t),l=ro({number:.35,unit:`ex`},t),u=t.havingBaseSizing();i/=u.sizeMultiplier;var d=n.height+n.depth+c+l;n.style.paddingLeft=N(d/2+c);var f=Math.floor(1e3*d*i);a=Cs([`hide-tail`],[new go([new _o(`phase`,Ka(f))],{width:`400em`,height:N(f/1e3),viewBox:`0 0 400000 `+f,preserveAspectRatio:`xMinYMin slice`})],t),a.style.height=N(d),o=n.depth+c+l}else{/cancel/.test(r)?s||n.classes.push(`cancel-pad`):r===`angl`?n.classes.push(`anglpad`):n.classes.push(`boxpad`);var p,m,h=0;/box/.test(r)?(h=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),p=t.fontMetrics().fboxsep+(r===`colorbox`?0:h),m=p):r===`angl`?(h=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),p=4*h,m=Math.max(0,.25-n.depth)):(p=s?.2:0,m=p),a=kc(n,r,p,m,t),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle=`solid`,a.style.borderWidth=N(h)):r===`angl`&&h!==.049&&(a.style.borderTopWidth=N(h),a.style.borderRightWidth=N(h)),o=n.depth+m,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var g;if(e.backgroundColor)g=G({positionType:`individualShift`,children:[{type:`elem`,elem:a,shift:o},{type:`elem`,elem:n,shift:0}]});else{var _=/cancel|phase/.test(r)?[`svg-align`]:[];g=G({positionType:`individualShift`,children:[{type:`elem`,elem:n,shift:0},{type:`elem`,elem:a,shift:o,wrapperClasses:_}]})}return/cancel/.test(r)&&(g.height=n.height,g.depth=n.depth),/cancel/.test(r)&&!s?W([`mord`,`cancel-lap`],[g],t):W([`mord`],[g],t)},mathmlBuilder:(e,t)=>{var n,r=new J(e.label.includes(`colorbox`)?`mpadded`:`menclose`,[Y(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`),e.label===`\\fcolorbox`){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute(`style`,`border: `+N(i)+` solid `+e.borderColor)}break;case`\\xcancel`:r.setAttribute(`notation`,`updiagonalstrike downdiagonalstrike`);break}return e.backgroundColor&&r.setAttribute(`mathbackground`,e.backgroundColor),r}}),K({type:`enclose`,names:[`\\fcolorbox`],numArgs:3,allowedInText:!0,argTypes:[`color`,`color`,`hbox`],handler(e,t,n){var{parser:r,funcName:i}=e,a=X(t[0],`color-token`).color,o=X(t[1],`color-token`).color,s=t[2];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:o,borderColor:a,body:s}}}),K({type:`enclose`,names:[`\\fbox`],numArgs:1,argTypes:[`hbox`],allowedInText:!0,handler(e,t){var{parser:n}=e;return{type:`enclose`,mode:n.mode,label:`\\fbox`,body:t[0]}}}),K({type:`enclose`,names:[`\\cancel`,`\\bcancel`,`\\xcancel`,`\\phase`],numArgs:1,handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}}}),K({type:`enclose`,names:[`\\sout`],numArgs:1,allowedInText:!0,handler(e,t){var{parser:n,funcName:r}=e;n.mode===`math`&&n.settings.reportNonstrict(`mathVsSout`,`LaTeX's \\sout works only in text mode`);var i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}}}),K({type:`enclose`,names:[`\\angl`],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 Nl={};function Pl(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},c=0;c<n.length;++c)Nl[n[c]]=s;a&&(Bs[t]=a),o&&(Vs[t]=o)}var Fl={};function Z(e,t){Fl[e]=t}var Il=class e{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(t,n){return n?!t||!t.loc||!n.loc||t.loc.lexer!==n.loc.lexer?null:new e(t.loc.lexer,t.loc.start,n.loc.end):t&&t.loc}},Ll=class e{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(t,n){return new e(n,Il.range(this,t))}};function Rl(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for(n===`\\relax`&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);n===`\\hline`||n===`\\hdashline`;)e.consume(),t.push(n===`\\hdashline`),e.consumeSpaces(),n=e.fetch().text;return t}var zl=e=>{if(!e.parser.settings.displayMode)throw new j(`{`+e.envName+`} can be used only in display mode.`)},Bl=new Set([`gather`,`gather*`]);function Vl(e){if(!e.includes(`ed`))return!e.includes(`*`)}function Hl(e,t,n){var{hskipBeforeAndAfter:r,addJot:i,cols:a,arraystretch:o,colSeparationType:s,autoTag:c,singleRow:l,emptySingleRow:u,maxNumCols:d,leqno:f}=t;if(e.gullet.beginGroup(),l||e.gullet.macros.set(`\\cr`,`\\\\\\relax`),!o){var p=e.gullet.expandMacroAsText(`\\arraystretch`);if(p==null)o=1;else if(o=parseFloat(p),!o||o<0)throw new j(`Invalid \\arraystretch: `+p)}e.gullet.beginGroup();var m=[],h=[m],g=[],_=[],v=c==null?void 0:[];function y(){c&&e.gullet.macros.set(`\\@eqnsw`,`1`,!0)}function b(){v&&(e.gullet.macros.get(`\\df@tag`)?(v.push(e.subparse([new Ll(`\\df@tag`)])),e.gullet.macros.set(`\\df@tag`,void 0,!0)):v.push(!!c&&e.gullet.macros.get(`\\@eqnsw`)===`1`))}for(y(),_.push(Rl(e));;){var x=e.parseExpression(!1,l?`\\end`:`\\\\`);e.gullet.endGroup(),e.gullet.beginGroup();var S={type:`ordgroup`,mode:e.mode,body:x};n&&(S={type:`styling`,mode:e.mode,style:n,resetFont:!0,body:[S]}),m.push(S);var C=e.fetch().text;if(C===`&`){if(d&&m.length===d){if(l||s)throw new j(`Too many tab characters: &`,e.nextToken);e.settings.reportNonstrict(`textEnv`,`Too few columns specified in the {array} column argument.`)}e.consume()}else if(C===`\\end`){b(),m.length===1&&S.type===`styling`&&S.body.length===1&&S.body[0].type===`ordgroup`&&S.body[0].body.length===0&&(h.length>1||!u)&&h.pop(),_.length<h.length+1&&_.push([]);break}else if(C===`\\\\`){e.consume();var ee=void 0;e.gullet.future().text!==` `&&(ee=e.parseSizeGroup(!0)),g.push(ee?ee.value:null),b(),_.push(Rl(e)),m=[],h.push(m),y()}else throw new j(`Expected & or \\\\ or \\cr or \\end`,e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:e.mode,addJot:i,arraystretch:o,body:h,cols:a,rowGaps:g,hskipBeforeAndAfter:r,hLinesBeforeRow:_,colSeparationType:s,tags:v,leqno:f}}function Ul(e){return e.slice(0,1)===`d`?`display`:`text`}var Wl=function(e,t){var n,r,i=e.body.length,a=e.hLinesBeforeRow,o=0,s=Array(i),c=[],l=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),u=1/t.fontMetrics().ptPerEm,d=5*u;e.colSeparationType&&e.colSeparationType===`small`&&(d=.2778*(t.havingStyle(M.SCRIPT).sizeMultiplier/t.sizeMultiplier));var f=e.colSeparationType===`CD`?ro({number:3,unit:`ex`},t):12*u,p=3*u,m=e.arraystretch*f,h=.7*m,g=.3*m,_=0;function v(e){for(var t=0;t<e.length;++t)t>0&&(_+=.25),c.push({pos:_,isDashed:e[t]})}for(v(a[0]),n=0;n<e.body.length;++n){var y=e.body[n],b=h,x=g;o<y.length&&(o=y.length);var S={cells:Array(y.length),height:0,depth:0,pos:0};for(r=0;r<y.length;++r){var C=q(y[r],t);x<C.depth&&(x=C.depth),b<C.height&&(b=C.height),S.cells[r]=C}var ee=e.rowGaps[n],te=0;ee&&(te=ro(ee,t),te>0&&(te+=g,x<te&&(x=te),te=0)),e.addJot&&n<e.body.length-1&&(x+=p),S.height=b,S.depth=x,_+=b,S.pos=_,_+=x+te,s[n]=S,v(a[n+1])}var w=_/2+t.fontMetrics().axisHeight,ne=e.cols||[],re=[],ie,ae,oe=[];if(e.tags&&e.tags.some(e=>e))for(n=0;n<i;++n){var se=s[n],ce=se.pos-w,le=e.tags[n],ue=void 0;ue=le===!0?W([`eqn-num`],[],t):le===!1?W([],[],t):W([],Ys(le,t,!0),t),ue.depth=se.depth,ue.height=se.height,oe.push({type:`elem`,elem:ue,shift:ce})}for(r=0,ae=0;r<o||ae<ne.length;++r,++ae){for(var de=ne[ae],fe=!0;(pe=de)?.type===`separator`;){var pe;if(fe||(ie=W([`arraycolsep`],[]),ie.style.width=N(t.fontMetrics().doubleRuleSep),re.push(ie)),de.separator===`|`||de.separator===`:`){var me=de.separator===`|`?`solid`:`dashed`,he=W([`vertical-separator`],[],t);he.style.height=N(_),he.style.borderRightWidth=N(l),he.style.borderRightStyle=me,he.style.margin=`0 `+N(-l/2);var ge=_-w;ge&&(he.style.verticalAlign=N(-ge)),re.push(he)}else throw new j(`Invalid separator type: `+de.separator);ae++,de=ne[ae],fe=!1}if(!(r>=o)){var _e=void 0;(r>0||e.hskipBeforeAndAfter)&&(_e=de?.pregap??d,_e!==0&&(ie=W([`arraycolsep`],[]),ie.style.width=N(_e),re.push(ie)));var ve=[];for(n=0;n<i;++n){var ye=s[n],be=ye.cells[r];if(be){var xe=ye.pos-w;be.depth=ye.depth,be.height=ye.height,ve.push({type:`elem`,elem:be,shift:xe})}}var Se=G({positionType:`individualShift`,children:ve}),Ce=W([`col-align-`+(de?.align||`c`)],[Se]);re.push(Ce),(r<o-1||e.hskipBeforeAndAfter)&&(_e=de?.postgap??d,_e!==0&&(ie=W([`arraycolsep`],[]),ie.style.width=N(_e),re.push(ie)))}}var we=W([`mtable`],re);if(c.length>0){for(var Te=ws(`hline`,t,l),Ee=ws(`hdashline`,t,l),De=[{type:`elem`,elem:we,shift:0}];c.length>0;){var Oe=c.pop(),ke=Oe.pos-w;Oe.isDashed?De.push({type:`elem`,elem:Ee,shift:ke}):De.push({type:`elem`,elem:Te,shift:ke})}we=G({positionType:`individualShift`,children:De})}if(oe.length===0)return W([`mord`],[we],t);var Ae=W([`tag`],[G({positionType:`individualShift`,children:oe})],t);return Es([we,Ae])},Gl={c:`center `,l:`left `,r:`right `},Kl=function(e,t){for(var n=[],r=new J(`mtd`,[],[`mtr-glue`]),i=new J(`mtd`,[],[`mml-eqn-num`]),a=0;a<e.body.length;a++){for(var o=e.body[a],s=[],c=0;c<o.length;c++)s.push(new J(`mtd`,[Y(o[c],t)]));e.tags&&e.tags[a]&&(s.unshift(r),s.push(r),e.leqno?s.unshift(i):s.push(i)),n.push(new J(`mtr`,s))}var l=new J(`mtable`,n),u=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);l.setAttribute(`rowspacing`,N(u));var d=``,f=``;if(e.cols&&e.cols.length>0){var p=e.cols,m=``,h=!1,g=0,_=p.length;p[0].type===`separator`&&(d+=`top `,g=1),p[p.length-1].type===`separator`&&(d+=`bottom `,--_);for(var v=g;v<_;v++){var y=p[v];y.type===`align`?(f+=Gl[y.align],h&&(m+=`none `),h=!0):y.type===`separator`&&(h&&=(m+=y.separator===`|`?`solid `:`dashed `,!1))}l.setAttribute(`columnalign`,f.trim()),/[sd]/.test(m)&&l.setAttribute(`columnlines`,m.trim())}if(e.colSeparationType===`align`){for(var b=e.cols||[],x=``,S=1;S<b.length;S++)x+=S%2?`0em `:`1em `;l.setAttribute(`columnspacing`,x.trim())}else e.colSeparationType===`alignat`||e.colSeparationType===`gather`?l.setAttribute(`columnspacing`,`0em`):e.colSeparationType===`small`?l.setAttribute(`columnspacing`,`0.2778em`):e.colSeparationType===`CD`?l.setAttribute(`columnspacing`,`0.5em`):l.setAttribute(`columnspacing`,`1em`);var C=``,ee=e.hLinesBeforeRow;d+=ee[0].length>0?`left `:``,d+=ee[ee.length-1].length>0?`right `:``;for(var te=1;te<ee.length-1;te++)C+=ee[te].length===0?`none `:ee[te][0]?`dashed `:`solid `;return/[sd]/.test(C)&&l.setAttribute(`rowlines`,C.trim()),d!==``&&(l=new J(`menclose`,[l]),l.setAttribute(`notation`,d.trim())),e.arraystretch&&e.arraystretch<1&&(l=new J(`mstyle`,[l]),l.setAttribute(`scriptlevel`,`1`)),l},ql=function(e,t){e.envName.includes(`ed`)||zl(e);var n=[],r=e.envName===`split`,i=Hl(e.parser,{cols:n,addJot:!0,autoTag:r?void 0:Vl(e.envName),emptySingleRow:!0,colSeparationType:e.envName.includes(`at`)?`alignat`:`align`,maxNumCols:r?2:void 0,leqno:e.parser.settings.leqno},`display`),a=0,o=0,s={type:`ordgroup`,mode:e.mode,body:[]};if(t[0]&&t[0].type===`ordgroup`){for(var c=``,l=0;l<t[0].body.length;l++){var u=X(t[0].body[l],`textord`);c+=u.text}a=Number(c),o=a*2}var d=!o;i.body.forEach(function(e){for(var t=1;t<e.length;t+=2)X(X(e[t],`styling`).body[0],`ordgroup`).body.unshift(s);if(d)o<e.length&&(o=e.length);else{var n=e.length/2;if(a<n)throw new j(`Too many math in a row: `+(`expected `+a+`, but got `+n),e[0])}});for(var f=0;f<o;++f){var p=`r`,m=0;f%2==1?p=`l`:f>0&&d&&(m=1),n[f]={type:`align`,align:p,pregap:m,postgap:0}}return i.colSeparationType=d?`align`:`alignat`,i};Pl({type:`array`,names:[`array`,`darray`],props:{numArgs:1},handler(e,t){var n=(Pc(t[0])?[t[0]]:X(t[0],`ordgroup`).body).map(function(e){var t=Nc(e).text;if(`lcr`.includes(t))return{type:`align`,align:t};if(t===`|`)return{type:`separator`,separator:`|`};if(t===`:`)return{type:`separator`,separator:`:`};throw new j(`Unknown column alignment: `+t,e)}),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return Hl(e.parser,r,Ul(e.envName))},htmlBuilder:Wl,mathmlBuilder:Kl}),Pl({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,!`lcr`.includes(n))throw new j(`Expected l or c or r`,i.nextToken);i.consume(),i.consumeSpaces(),i.expect(`]`),i.consume(),r.cols=[{type:`align`,align:n}]}}var a=Hl(e.parser,r,Ul(e.envName)),o=Math.max(0,...a.body.map(e=>e.length));return a.cols=Array(o).fill({type:`align`,align:n}),t?{type:`leftright`,mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:Wl,mathmlBuilder:Kl}),Pl({type:`array`,names:[`smallmatrix`],props:{numArgs:0},handler(e){var t=Hl(e.parser,{arraystretch:.5},`script`);return t.colSeparationType=`small`,t},htmlBuilder:Wl,mathmlBuilder:Kl}),Pl({type:`array`,names:[`subarray`],props:{numArgs:1},handler(e,t){var n=(Pc(t[0])?[t[0]]:X(t[0],`ordgroup`).body).map(function(e){var t=Nc(e).text;if(`lc`.includes(t))return{type:`align`,align:t};throw new j(`Unknown column alignment: `+t,e)});if(n.length>1)throw new j(`{subarray} can contain only one column`);var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5},i=Hl(e.parser,r,`script`);if(i.body.length>0&&i.body[0].length>1)throw new j(`{subarray} can contain only one column`);return i},htmlBuilder:Wl,mathmlBuilder:Kl}),Pl({type:`array`,names:[`cases`,`dcases`,`rcases`,`drcases`],props:{numArgs:0},handler(e){var t=Hl(e.parser,{arraystretch:1.2,cols:[{type:`align`,align:`l`,pregap:0,postgap:1},{type:`align`,align:`l`,pregap:0,postgap:0}]},Ul(e.envName));return{type:`leftright`,mode:e.mode,body:[t],left:e.envName.includes(`r`)?`.`:`\\{`,right:e.envName.includes(`r`)?`\\}`:`.`,rightColor:void 0}},htmlBuilder:Wl,mathmlBuilder:Kl}),Pl({type:`array`,names:[`align`,`align*`,`aligned`,`split`],props:{numArgs:0},handler:ql,htmlBuilder:Wl,mathmlBuilder:Kl}),Pl({type:`array`,names:[`gathered`,`gather`,`gather*`],props:{numArgs:0},handler(e){Bl.has(e.envName)&&zl(e);var t={cols:[{type:`align`,align:`c`}],addJot:!0,colSeparationType:`gather`,autoTag:Vl(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Hl(e.parser,t,`display`)},htmlBuilder:Wl,mathmlBuilder:Kl}),Pl({type:`array`,names:[`alignat`,`alignat*`,`alignedat`],props:{numArgs:1},handler:ql,htmlBuilder:Wl,mathmlBuilder:Kl}),Pl({type:`array`,names:[`equation`,`equation*`],props:{numArgs:0},handler(e){zl(e);var t={autoTag:Vl(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Hl(e.parser,t,`display`)},htmlBuilder:Wl,mathmlBuilder:Kl}),Pl({type:`array`,names:[`CD`],props:{numArgs:0},handler(e){return zl(e),Jc(e.parser)},htmlBuilder:Wl,mathmlBuilder:Kl}),Z(`\\nonumber`,`\\gdef\\@eqnsw{0}`),Z(`\\notag`,`\\nonumber`),K({type:`text`,names:[`\\hline`,`\\hdashline`],numArgs:0,allowedInText:!0,allowedInMath:!0,handler(e,t){throw new j(e.funcName+` valid only within array environment`)}});var Jl=Nl;K({type:`environment`,names:[`\\begin`,`\\end`],numArgs:1,argTypes:[`text`],handler(e,t){var{parser:n,funcName:r}=e,i=t[0];if(i.type!==`ordgroup`)throw new j(`Invalid environment name`,i);for(var a=``,o=0;o<i.body.length;++o)a+=X(i.body[o],`textord`).text;if(r===`\\begin`){if(!Jl.hasOwnProperty(a))throw new j(`No such environment: `+a,i);var s=Jl[a],{args:c,optArgs:l}=n.parseArguments(`\\begin{`+a+`}`,s),u={mode:n.mode,envName:a,parser:n},d=s.handler(u,c,l);n.expect(`\\end`,!1);var f=n.nextToken,p=X(n.parseFunction(),`environment`);if(p.name!==a)throw new j(`Mismatch: \\begin{`+a+`} matched by \\end{`+p.name+`}`,f);return d}return{type:`environment`,mode:n.mode,name:a,nameGroup:i}}});var Yl=(e,t)=>{var n=e.font,r=t.withFont(n);return q(e.body,r)},Xl=(e,t)=>{var n=e.font,r=t.withFont(n);return Y(e.body,r)},Zl={"\\Bbb":`\\mathbb`,"\\bold":`\\mathbf`,"\\frak":`\\mathfrak`};K({type:`font`,names:[`\\mathrm`,`\\mathit`,`\\mathbf`,`\\mathnormal`,`\\mathsfit`,`\\mathbb`,`\\mathcal`,`\\mathfrak`,`\\mathscr`,`\\mathsf`,`\\mathtt`,`\\Bbb`,`\\bold`,`\\frak`],numArgs:1,allowedInArgument:!0,handler:(e,t)=>{var{parser:n,funcName:r}=e,i=Us(t[0]),a=r in Zl?Zl[r]:r;return{type:`font`,mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:Yl,mathmlBuilder:Xl}),K({type:`mclass`,names:[`\\boldsymbol`,`\\bm`],numArgs:1,handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`mclass`,mode:n.mode,mclass:Hc(r),body:[{type:`font`,mode:n.mode,font:`boldsymbol`,body:r}],isCharacterBox:fa(r)}}}),K({type:`font`,names:[`\\rm`,`\\sf`,`\\tt`,`\\bf`,`\\it`,`\\cal`],numArgs:0,allowedInText:!0,handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:i}=e,{mode:a}=n,o=n.parseExpression(!0,i);return{type:`font`,mode:a,font:`math`+r.slice(1),body:{type:`ordgroup`,mode:n.mode,body:o}}}});var Ql=(e,t)=>{var n=t.style,r=n.fracNum(),i=n.fracDen(),a=t.havingStyle(r),o=q(e.numer,a,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,c=3.5/t.fontMetrics().ptPerEm;o.height=o.height<s?s:o.height,o.depth=o.depth<c?c:o.depth}a=t.havingStyle(i);var l=q(e.denom,a,t),u,d,f;e.hasBarLine?(e.barSize?(d=ro(e.barSize,t),u=ws(`frac-line`,t,d)):u=ws(`frac-line`,t),d=u.height,f=u.height):(u=null,d=0,f=t.fontMetrics().defaultRuleThickness);var p,m,h;n.size===M.DISPLAY.size?(p=t.fontMetrics().num1,m=d>0?3*f:7*f,h=t.fontMetrics().denom1):(d>0?(p=t.fontMetrics().num2,m=f):(p=t.fontMetrics().num3,m=3*f),h=t.fontMetrics().denom2);var g;if(u){var _=t.fontMetrics().axisHeight;p-o.depth-(_+.5*d)<m&&(p+=m-(p-o.depth-(_+.5*d))),_-.5*d-(l.height-h)<m&&(h+=m-(_-.5*d-(l.height-h)));var v=-(_-.5*d);g=G({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:h},{type:`elem`,elem:u,shift:v},{type:`elem`,elem:o,shift:-p}]})}else{var y=p-o.depth-(l.height-h);y<m&&(p+=.5*(m-y),h+=.5*(m-y)),g=G({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:h},{type:`elem`,elem:o,shift:-p}]})}a=t.havingStyle(n),g.height*=a.sizeMultiplier/t.sizeMultiplier,g.depth*=a.sizeMultiplier/t.sizeMultiplier;var b=n.size===M.DISPLAY.size?t.fontMetrics().delim1:n.size===M.SCRIPTSCRIPT.size?t.havingStyle(M.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,x=e.leftDelim==null?ec(t,[`mopen`]):El(e.leftDelim,b,!0,t.havingStyle(n),e.mode,[`mopen`]),S=e.continued?W([]):e.rightDelim==null?ec(t,[`mclose`]):El(e.rightDelim,b,!0,t.havingStyle(n),e.mode,[`mclose`]);return W([`mord`].concat(a.sizingClasses(t)),[x,W([`mfrac`],[g]),S],t)},$l=(e,t)=>{var n=new J(`mfrac`,[Y(e.numer,t),Y(e.denom,t)]);if(!e.hasBarLine)n.setAttribute(`linethickness`,`0px`);else if(e.barSize){var r=ro(e.barSize,t);n.setAttribute(`linethickness`,N(r))}if(e.leftDelim!=null||e.rightDelim!=null){var i=[];if(e.leftDelim!=null){var a=new J(`mo`,[new ic(e.leftDelim.replace(`\\`,``))]);a.setAttribute(`fence`,`true`),i.push(a)}if(i.push(n),e.rightDelim!=null){var o=new J(`mo`,[new ic(e.rightDelim.replace(`\\`,``))]);o.setAttribute(`fence`,`true`),i.push(o)}return lc(i)}return n},eu=(e,t)=>t?{type:`styling`,mode:e.mode,style:t,body:[e]}:e;K({type:`genfrac`,names:[`\\cfrac`,`\\dfrac`,`\\frac`,`\\tfrac`,`\\dbinom`,`\\binom`,`\\tbinom`,`\\\\atopfrac`,`\\\\bracefrac`,`\\\\brackfrac`],numArgs:2,allowedInArgument:!0,handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=t[1],o,s=null,c=null;switch(r){case`\\cfrac`:case`\\dfrac`:case`\\frac`:case`\\tfrac`:o=!0;break;case`\\\\atopfrac`:o=!1;break;case`\\dbinom`:case`\\binom`:case`\\tbinom`:o=!1,s=`(`,c=`)`;break;case`\\\\bracefrac`:o=!1,s=`\\{`,c=`\\}`;break;case`\\\\brackfrac`:o=!1,s=`[`,c=`]`;break;default:throw Error(`Unrecognized genfrac command`)}var l=r===`\\cfrac`,u=null;return l||r.startsWith(`\\d`)?u=`display`:r.startsWith(`\\t`)&&(u=`text`),eu({type:`genfrac`,mode:n.mode,numer:i,denom:a,continued:l,hasBarLine:o,leftDelim:s,rightDelim:c,barSize:null},u)},htmlBuilder:Ql,mathmlBuilder:$l}),K({type:`infix`,names:[`\\over`,`\\choose`,`\\atop`,`\\brace`,`\\brack`],numArgs:0,infix:!0,handler(e){var{parser:t,funcName:n,token:r}=e,i;switch(n){case`\\over`:i=`\\frac`;break;case`\\choose`:i=`\\binom`;break;case`\\atop`:i=`\\\\atopfrac`;break;case`\\brace`:i=`\\\\bracefrac`;break;case`\\brack`:i=`\\\\brackfrac`;break;default:throw Error(`Unrecognized infix genfrac command`)}return{type:`infix`,mode:t.mode,replaceWith:i,token:r}}});var tu=[`display`,`text`,`script`,`scriptscript`],nu=function(e){var t=null;return e.length>0&&(t=e,t=t===`.`?null:t),t};K({type:`genfrac`,names:[`\\genfrac`],numArgs:6,allowedInArgument:!0,argTypes:[`math`,`math`,`size`,`text`,`math`,`math`],handler(e,t){var{parser:n}=e,r=t[4],i=t[5],a=Us(t[0]),o=a.type===`atom`&&a.family===`open`?nu(a.text):null,s=Us(t[1]),c=s.type===`atom`&&s.family===`close`?nu(s.text):null,l=X(t[2],`size`),u,d=null;l.isBlank?u=!0:(d=l.value,u=d.number>0);var f=null,p=t[3];if(p.type===`ordgroup`){if(p.body.length>0){var m=X(p.body[0],`textord`);f=tu[Number(m.text)]}}else p=X(p,`textord`),f=tu[Number(p.text)];return eu({type:`genfrac`,mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:u,barSize:d,leftDelim:o,rightDelim:c},f)}}),K({type:`infix`,names:[`\\above`],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:X(t[0],`size`).value,token:i}}}),K({type:`genfrac`,names:[`\\\\abovefrac`],numArgs:3,argTypes:[`math`,`size`,`math`],handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=X(t[1],`infix`).size;if(!a)throw Error(`\\\\abovefrac expected size, but got `+String(a));var o=t[2],s=a.number>0;return{type:`genfrac`,mode:n.mode,numer:i,denom:o,continued:!1,hasBarLine:s,barSize:a,leftDelim:null,rightDelim:null}}});var ru=(e,t)=>{var n=t.style,r,i;e.type===`supsub`?(r=e.sup?q(e.sup,t.havingStyle(n.sup()),t):q(e.sub,t.havingStyle(n.sub()),t),i=X(e.base,`horizBrace`)):i=X(e,`horizBrace`);var a=q(i.base,t.havingBaseStyle(M.DISPLAY)),o=Oc(i,t),s=i.isOver?G({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:.1},{type:`elem`,elem:o,wrapperClasses:[`svg-align`]}]}):G({positionType:`bottom`,positionData:a.depth+.1+o.height,children:[{type:`elem`,elem:o,wrapperClasses:[`svg-align`]},{type:`kern`,size:.1},{type:`elem`,elem:a}]});if(r){var c=W([`minner`,i.isOver?`mover`:`munder`],[s],t);s=i.isOver?G({positionType:`firstBaseline`,children:[{type:`elem`,elem:c},{type:`kern`,size:.2},{type:`elem`,elem:r}]}):G({positionType:`bottom`,positionData:c.depth+.2+r.height+r.depth,children:[{type:`elem`,elem:r},{type:`kern`,size:.2},{type:`elem`,elem:c}]})}return W([`minner`,i.isOver?`mover`:`munder`],[s],t)};K({type:`horizBrace`,names:[`\\overbrace`,`\\underbrace`,`\\overbracket`,`\\underbracket`],numArgs:1,handler(e,t){var{parser:n,funcName:r}=e;return{type:`horizBrace`,mode:n.mode,label:r,isOver:r.includes(`\\over`),base:t[0]}},htmlBuilder:ru,mathmlBuilder:(e,t)=>{var n=Tc(e.label);return new J(e.isOver?`mover`:`munder`,[Y(e.base,t),n])}}),K({type:`href`,names:[`\\href`],numArgs:2,argTypes:[`url`,`original`],allowedInText:!0,handler:(e,t)=>{var{parser:n}=e,r=t[1],i=X(t[0],`url`).url;return n.settings.isTrusted({command:`\\href`,url:i})?{type:`href`,mode:n.mode,href:i,body:Ws(r)}:n.formatUnsupportedCmd(`\\href`)},htmlBuilder:(e,t)=>{var n=Ys(e.body,t,!1);return Ts(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=mc(e.body,t);return n instanceof J||(n=new J(`mrow`,[n])),n.setAttribute(`href`,e.href),n}}),K({type:`href`,names:[`\\url`],numArgs:1,argTypes:[`url`],allowedInText:!0,handler:(e,t)=>{var{parser:n}=e,r=X(t[0],`url`).url;if(!n.settings.isTrusted({command:`\\url`,url:r}))return n.formatUnsupportedCmd(`\\url`);for(var i=[],a=0;a<r.length;a++){var o=r[a];o===`~`&&(o=`\\textasciitilde`),i.push({type:`textord`,mode:`text`,text:o})}var s={type:`text`,mode:n.mode,font:`\\texttt`,body:i};return{type:`href`,mode:n.mode,href:r,body:Ws(s)}}}),K({type:`hbox`,names:[`\\hbox`],numArgs:1,argTypes:[`text`],allowedInText:!0,primitive:!0,handler(e,t){var{parser:n}=e;return{type:`hbox`,mode:n.mode,body:Ws(t[0])}},htmlBuilder(e,t){return Es(Ys(e.body,t.withFont(``),!1))},mathmlBuilder(e,t){return new J(`mrow`,pc(e.body,t.withFont(``)))}}),K({type:`html`,names:[`\\htmlClass`,`\\htmlId`,`\\htmlStyle`,`\\htmlData`],numArgs:2,argTypes:[`raw`,`original`],allowedInText:!0,handler:(e,t)=>{var{parser:n,funcName:r,token:i}=e,a=X(t[0],`raw`).string,o=t[1];n.settings.strict&&n.settings.reportNonstrict(`htmlExtension`,`HTML extension is disabled on strict mode`);var s,c={};switch(r){case`\\htmlClass`:c.class=a,s={command:`\\htmlClass`,class:a};break;case`\\htmlId`:c.id=a,s={command:`\\htmlId`,id:a};break;case`\\htmlStyle`:c.style=a,s={command:`\\htmlStyle`,style:a};break;case`\\htmlData`:for(var l=a.split(`,`),u=0;u<l.length;u++){var d=l[u],f=d.indexOf(`=`);if(f<0)throw new j(`\\htmlData key/value '`+d+`' missing equals sign`);var p=d.slice(0,f),m=d.slice(f+1);c[`data-`+p.trim()]=m}s={command:`\\htmlData`,attributes:c};break;default:throw Error(`Unrecognized html command`)}return n.settings.isTrusted(s)?{type:`html`,mode:n.mode,attributes:c,body:Ws(o)}:n.formatUnsupportedCmd(r)},htmlBuilder:(e,t)=>{var n=Ys(e.body,t,!1),r=[`enclosing`];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=W(r,n,t);for(var a in e.attributes)a!==`class`&&e.attributes.hasOwnProperty(a)&&i.setAttribute(a,e.attributes[a]);return i},mathmlBuilder:(e,t)=>mc(e.body,t)}),K({type:`htmlmathml`,names:[`\\html@mathml`],numArgs:2,allowedInArgument:!0,allowedInText:!0,handler:(e,t)=>{var{parser:n}=e;return{type:`htmlmathml`,mode:n.mode,html:Ws(t[0]),mathml:Ws(t[1])}},htmlBuilder:(e,t)=>Es(Ys(e.html,t,!1)),mathmlBuilder:(e,t)=>mc(e.mathml,t)});var iu=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 j(`Invalid size: '`+e+`' in \\includegraphics`);var n={number:+(t[1]+t[2]),unit:t[3]};if(!no(n))throw new j(`Invalid unit: '`+n.unit+`' in \\includegraphics.`);return n};K({type:`includegraphics`,names:[`\\includegraphics`],numArgs:1,numOptionalArgs:1,argTypes:[`raw`,`url`],allowedInText:!1,handler:(e,t,n)=>{var{parser:r}=e,i={number:0,unit:`em`},a={number:.9,unit:`em`},o={number:0,unit:`em`},s=``;if(n[0])for(var c=X(n[0],`raw`).string.split(`,`),l=0;l<c.length;l++){var u=c[l].split(`=`);if(u.length===2){var d=u[1].trim();switch(u[0].trim()){case`alt`:s=d;break;case`width`:i=iu(d);break;case`height`:a=iu(d);break;case`totalheight`:o=iu(d);break;default:throw new j(`Invalid key: '`+u[0]+`' in \\includegraphics.`)}}}var f=X(t[0],`url`).url;return s===``&&(s=f,s=s.replace(/^.*[\\/]/,``),s=s.substring(0,s.lastIndexOf(`.`))),r.settings.isTrusted({command:`\\includegraphics`,url:f})?{type:`includegraphics`,mode:r.mode,alt:s,width:i,height:a,totalheight:o,src:f}:r.formatUnsupportedCmd(`\\includegraphics`)},htmlBuilder:(e,t)=>{var n=ro(e.height,t),r=0;e.totalheight.number>0&&(r=ro(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=ro(e.width,t));var a={height:N(n+r)};i>0&&(a.width=N(i)),r>0&&(a.verticalAlign=N(-r));var o=new po(e.src,e.alt,a);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new J(`mglyph`,[]);n.setAttribute(`alt`,e.alt);var r=ro(e.height,t),i=0;if(e.totalheight.number>0&&(i=ro(e.totalheight,t)-r,n.setAttribute(`valign`,N(-i))),n.setAttribute(`height`,N(r+i)),e.width.number>0){var a=ro(e.width,t);n.setAttribute(`width`,N(a))}return n.setAttribute(`src`,e.src),n}}),K({type:`kern`,names:[`\\kern`,`\\mkern`,`\\hskip`,`\\mskip`],numArgs:1,argTypes:[`size`],primitive:!0,allowedInText:!0,handler(e,t){var{parser:n,funcName:r}=e,i=X(t[0],`size`);if(n.settings.strict){var a=r[1]===`m`,o=i.value.unit===`mu`;a?(o||n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` supports only mu units, `+(`not `+i.value.unit+` units`)),n.mode!==`math`&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` works only in math mode`)):o&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` doesn't support mu units`)}return{type:`kern`,mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return ks(e.dimension,t)},mathmlBuilder(e,t){return new ac(ro(e.dimension,t))}}),K({type:`lap`,names:[`\\mathllap`,`\\mathrlap`,`\\mathclap`],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;e.alignment===`clap`?(n=W([],[q(e.body,t)]),n=W([`inner`],[n],t)):n=W([`inner`],[q(e.body,t)]);var r=W([`fix`],[]),i=W([e.alignment],[n,r],t),a=W([`strut`]);return a.style.height=N(i.height+i.depth),i.depth&&(a.style.verticalAlign=N(-i.depth)),i.children.unshift(a),i=W([`thinbox`],[i],t),W([`mord`,`vbox`],[i],t)},mathmlBuilder:(e,t)=>{var n=new J(`mpadded`,[Y(e.body,t)]);if(e.alignment!==`rlap`){var r=e.alignment===`llap`?`-1`:`-0.5`;n.setAttribute(`lspace`,r+`width`)}return n.setAttribute(`width`,`0px`),n}}),K({type:`styling`,names:[`\\(`,`$`],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){var{funcName:n,parser:r}=e,i=r.mode;r.switchMode(`math`);var a=n===`\\(`?`\\)`:`$`,o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:`styling`,mode:r.mode,style:`text`,resetFont:!0,body:o}}}),K({type:`text`,names:[`\\)`,`\\]`],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){throw new j(`Mismatched `+e.funcName)}});var au=(e,t)=>{switch(t.style.size){case M.DISPLAY.size:return e.display;case M.TEXT.size:return e.text;case M.SCRIPT.size:return e.script;case M.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};K({type:`mathchoice`,names:[`\\mathchoice`],numArgs:4,primitive:!0,handler:(e,t)=>{var{parser:n}=e;return{type:`mathchoice`,mode:n.mode,display:Ws(t[0]),text:Ws(t[1]),script:Ws(t[2]),scriptscript:Ws(t[3])}},htmlBuilder:(e,t)=>Es(Ys(au(e,t),t,!1)),mathmlBuilder:(e,t)=>mc(au(e,t),t)});var ou=(e,t,n,r,i,a,o)=>{e=W([],[e]);var s=n&&fa(n),c,l;if(t){var u=q(t,r.havingStyle(i.sup()),r);l={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var d=q(n,r.havingStyle(i.sub()),r);c={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}var f;if(l&&c)f=G({positionType:`bottom`,positionData:r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:N(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:N(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else if(c)f=G({positionType:`top`,positionData:e.height-o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:N(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e}]});else if(l)f=G({positionType:`bottom`,positionData:e.depth+o,children:[{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:N(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else return e;var p=[f];if(c&&a!==0&&!s){var m=W([`mspace`],[],r);m.style.marginRight=N(a),p.unshift(m)}return W([`mop`,`op-limits`],p,r)},su=new Set([`\\smallint`]),cu=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=X(e.base,`op`),i=!0):a=X(e,`op`);var o=t.style,s=!1;o.size===M.DISPLAY.size&&a.symbol&&!su.has(a.name)&&(s=!0);var c,l;if(a.symbol){var u=s?`Size2-Regular`:`Size1-Regular`,d=``;if((a.name===`\\oiint`||a.name===`\\oiiint`)&&(d=a.name.slice(1),a.name=d===`oiint`?`\\iint`:`\\iiint`),c=gs(a.name,u,`math`,t,[`mop`,`op-symbol`,s?`large-op`:`small-op`]),l=c.italic,d.length>0){var f=Ns(d+`Size`+(s?`2`:`1`),t);c=G({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:0},{type:`elem`,elem:f,shift:s?.08:0}]}),a.name=`\\`+d,c.classes.unshift(`mop`),c.italic=l}}else if(a.body){var p=Ys(a.body,t,!0);p.length===1&&p[0]instanceof ho?(c=p[0],c.classes[0]=`mop`):c=W([`mop`],p,t)}else{for(var m=[],h=1;h<a.name.length;h++)m.push(_s(a.name[h],a.mode,t));c=W([`mop`],m,t)}var g=0,_=0;return(c instanceof ho||a.name===`\\oiint`||a.name===`\\oiiint`)&&!a.suppressBaseShift&&(g=(c.height-c.depth)/2-t.fontMetrics().axisHeight,_=c.italic??0),i?ou(c,n,r,t,o,_,g):(g&&(c.style.position=`relative`,c.style.top=N(g)),c)},lu=(e,t)=>{var n;if(e.symbol)n=new J(`mo`,[cc(e.name,e.mode)]),su.has(e.name)&&n.setAttribute(`largeop`,`false`);else if(e.body)n=new J(`mo`,pc(e.body,t));else{n=new J(`mi`,[new ic(e.name.slice(1))]);var r=new J(`mo`,[cc(`⁡`,`text`)]);n=e.parentIsSupSub?new J(`mrow`,[n,r]):rc([n,r])}return n},uu={"∏":`\\prod`,"∐":`\\coprod`,"∑":`\\sum`,"⋀":`\\bigwedge`,"⋁":`\\bigvee`,"⋂":`\\bigcap`,"⋃":`\\bigcup`,"⨀":`\\bigodot`,"⨁":`\\bigoplus`,"⨂":`\\bigotimes`,"⨄":`\\biguplus`,"⨆":`\\bigsqcup`};K({type:`op`,names:`\\coprod.\\bigvee.\\bigwedge.\\biguplus.\\bigcap.\\bigcup.\\intop.\\prod.\\sum.\\bigotimes.\\bigoplus.\\bigodot.\\bigsqcup.\\smallint.∏.∐.∑.⋀.⋁.⋂.⋃.⨀.⨁.⨂.⨄.⨆`.split(`.`),numArgs:0,handler:(e,t)=>{var{parser:n,funcName:r}=e,i=r;return i.length===1&&(i=uu[i]),{type:`op`,mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:cu,mathmlBuilder:lu}),K({type:`op`,names:[`\\mathop`],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:Ws(r)}}});var du={"∫":`\\int`,"∬":`\\iint`,"∭":`\\iiint`,"∮":`\\oint`,"∯":`\\oiint`,"∰":`\\oiiint`};K({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`.split(`.`),numArgs:0,handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}}}),K({type:`op`,names:[`\\det`,`\\gcd`,`\\inf`,`\\lim`,`\\max`,`\\min`,`\\Pr`,`\\sup`],numArgs:0,handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}}}),K({type:`op`,names:[`\\int`,`\\iint`,`\\iiint`,`\\oint`,`\\oiint`,`\\oiiint`,`∫`,`∬`,`∭`,`∮`,`∯`,`∰`],numArgs:0,allowedInArgument:!0,handler(e){var{parser:t,funcName:n}=e,r=n;return r.length===1&&(r=du[r]),{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}}});var fu=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=X(e.base,`operatorname`),i=!0):a=X(e,`operatorname`);var o;if(a.body.length>0){for(var s=Ys(a.body.map(e=>{var t=`text`in e?e.text:void 0;return typeof t==`string`?{type:`textord`,mode:e.mode,text:t}:e}),t.withFont(`mathrm`),!0),c=0;c<s.length;c++){var l=s[c];l instanceof ho&&(l.text=l.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`))}o=W([`mop`],s,t)}else o=W([`mop`],[],t);return i?ou(o,n,r,t,t.style,0,0):o};K({type:`operatorname`,names:[`\\operatorname@`,`\\operatornamewithlimits`],numArgs:1,handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`operatorname`,mode:n.mode,body:Ws(i),alwaysHandleSupSub:r===`\\operatornamewithlimits`,limits:!1,parentIsSupSub:!1}},htmlBuilder:fu,mathmlBuilder:(e,t)=>{for(var n=pc(e.body,t.withFont(`mathrm`)),r=!0,i=0;i<n.length;i++){var a=n[i];if(!(a instanceof ac))if(a instanceof J)switch(a.type){case`mi`:case`mn`:case`mspace`:case`mtext`:break;case`mo`:var o=a.children[0];a.children.length===1&&o instanceof ic?o.text=o.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`):r=!1;break;default:r=!1}else r=!1}r&&(n=[new ic(n.map(e=>e.toText()).join(``))]);var s=new J(`mi`,n);s.setAttribute(`mathvariant`,`normal`);var c=new J(`mo`,[cc(`⁡`,`text`)]);return e.parentIsSupSub?new J(`mrow`,[s,c]):rc([s,c])}}),Z(`\\operatorname`,`\\@ifstar\\operatornamewithlimits\\operatorname@`),Hs({type:`ordgroup`,htmlBuilder(e,t){return e.semisimple?Es(Ys(e.body,t,!1)):W([`mord`],Ys(e.body,t,!0),t)},mathmlBuilder(e,t){return mc(e.body,t,!0)}}),K({type:`overline`,names:[`\\overline`],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=q(e.body,t.havingCrampedStyle()),r=ws(`overline-line`,t),i=t.fontMetrics().defaultRuleThickness;return W([`mord`,`overline`],[G({positionType:`firstBaseline`,children:[{type:`elem`,elem:n},{type:`kern`,size:3*i},{type:`elem`,elem:r},{type:`kern`,size:i}]})],t)},mathmlBuilder(e,t){var n=new J(`mo`,[new ic(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new J(`mover`,[Y(e.body,t),n]);return r.setAttribute(`accent`,`true`),r}}),K({type:`phantom`,names:[`\\phantom`],numArgs:1,allowedInText:!0,handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`phantom`,mode:n.mode,body:Ws(r)}},htmlBuilder:(e,t)=>Es(Ys(e.body,t.withPhantom(),!1)),mathmlBuilder:(e,t)=>new J(`mphantom`,pc(e.body,t))}),Z(`\\hphantom`,`\\smash{\\phantom{#1}}`),K({type:`vphantom`,names:[`\\vphantom`],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)=>W([`mord`,`rlap`],[W([`inner`],[q(e.body,t.withPhantom())]),W([`fix`],[])],t),mathmlBuilder:(e,t)=>{var n=new J(`mpadded`,[new J(`mphantom`,pc(Ws(e.body),t))]);return n.setAttribute(`width`,`0px`),n}}),K({type:`raisebox`,names:[`\\raisebox`],numArgs:2,argTypes:[`size`,`hbox`],allowedInText:!0,handler(e,t){var{parser:n}=e,r=X(t[0],`size`).value,i=t[1];return{type:`raisebox`,mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=q(e.body,t);return G({positionType:`shift`,positionData:-ro(e.dy,t),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){var n=new J(`mpadded`,[Y(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute(`voffset`,r),n}}),K({type:`internal`,names:[`\\relax`],numArgs:0,allowedInText:!0,allowedInArgument:!0,handler(e){var{parser:t}=e;return{type:`internal`,mode:t.mode}}}),K({type:`rule`,names:[`\\rule`],numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`size`,`size`,`size`],handler(e,t,n){var{parser:r}=e,i=n[0],a=X(t[0],`size`),o=X(t[1],`size`);return{type:`rule`,mode:r.mode,shift:i&&X(i,`size`).value,width:a.value,height:o.value}},htmlBuilder(e,t){var n=W([`mord`,`rule`],[],t),r=ro(e.width,t),i=ro(e.height,t),a=e.shift?ro(e.shift,t):0;return n.style.borderRightWidth=N(r),n.style.borderTopWidth=N(i),n.style.bottom=N(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=ro(e.width,t),r=ro(e.height,t),i=e.shift?ro(e.shift,t):0,a=t.color&&t.getColor()||`black`,o=new J(`mspace`);o.setAttribute(`mathbackground`,a),o.setAttribute(`width`,N(n)),o.setAttribute(`height`,N(r));var s=new J(`mpadded`,[o]);return i>=0?s.setAttribute(`height`,N(i)):(s.setAttribute(`height`,N(i)),s.setAttribute(`depth`,N(-i))),s.setAttribute(`voffset`,N(i)),s}});function pu(e,t,n){for(var r=Ys(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,a=0;a<r.length;a++){var o=r[a].classes.indexOf(`sizing`);o<0?Array.prototype.push.apply(r[a].classes,t.sizingClasses(n)):r[a].classes[o+1]===`reset-size`+t.size&&(r[a].classes[o+1]=`reset-size`+n.size),r[a].height*=i,r[a].depth*=i}return Es(r)}var mu=[`\\tiny`,`\\sixptsize`,`\\scriptsize`,`\\footnotesize`,`\\small`,`\\normalsize`,`\\large`,`\\Large`,`\\LARGE`,`\\huge`,`\\Huge`];K({type:`sizing`,names:mu,numArgs:0,allowedInText:!0,handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!1,n);return{type:`sizing`,mode:i.mode,size:mu.indexOf(r)+1,body:a}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return pu(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=new J(`mstyle`,pc(e.body,n));return r.setAttribute(`mathsize`,N(n.sizeMultiplier)),r}}),K({type:`smash`,names:[`\\smash`],numArgs:1,numOptionalArgs:1,allowedInText:!0,handler:(e,t,n)=>{var{parser:r}=e,i=!1,a=!1,o=n[0]&&X(n[0],`ordgroup`);if(o)for(var s,c=0;c<o.body.length;++c){var l=o.body[c];if(s=Nc(l).text,s===`t`)i=!0;else if(s===`b`)a=!0;else{i=!1,a=!1;break}}else i=!0,a=!0;var u=t[0];return{type:`smash`,mode:r.mode,body:u,smashHeight:i,smashDepth:a}},htmlBuilder:(e,t)=>{var n=W([],[q(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0),e.smashDepth&&(n.depth=0),e.smashHeight&&e.smashDepth)return W([`mord`,`smash`],[n],t);if(n.children)for(var r=0;r<n.children.length;r++)e.smashHeight&&(n.children[r].height=0),e.smashDepth&&(n.children[r].depth=0);return W([`mord`],[G({positionType:`firstBaseline`,children:[{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=new J(`mpadded`,[Y(e.body,t)]);return e.smashHeight&&n.setAttribute(`height`,`0px`),e.smashDepth&&n.setAttribute(`depth`,`0px`),n}}),K({type:`sqrt`,names:[`\\sqrt`],numArgs:1,numOptionalArgs:1,handler(e,t,n){var{parser:r}=e,i=n[0],a=t[0];return{type:`sqrt`,mode:r.mode,body:a,index:i}},htmlBuilder(e,t){var n=q(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=Ds(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;t.style.id<M.TEXT.id&&(i=t.fontMetrics().xHeight);var a=r+i/4,{span:o,ruleWidth:s,advanceWidth:c}=hl(n.height+n.depth+a+r,t),l=o.height-s;l>n.height+n.depth+a&&(a=(a+l-n.height-n.depth)/2);var u=o.height-n.height-a-s;n.style.paddingLeft=N(c);var d=G({positionType:`firstBaseline`,children:[{type:`elem`,elem:n,wrapperClasses:[`svg-align`]},{type:`kern`,size:-(n.height+u)},{type:`elem`,elem:o},{type:`kern`,size:s}]});if(e.index){var f=t.havingStyle(M.SCRIPTSCRIPT),p=q(e.index,f,t);return W([`mord`,`sqrt`],[W([`root`],[G({positionType:`shift`,positionData:-(.6*(d.height-d.depth)),children:[{type:`elem`,elem:p}]})]),d],t)}else return W([`mord`,`sqrt`],[d],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new J(`mroot`,[Y(n,t),Y(r,t)]):new J(`msqrt`,[Y(n,t)])}});var hu={display:M.DISPLAY,text:M.TEXT,script:M.SCRIPT,scriptscript:M.SCRIPTSCRIPT};function gu(e){return e in hu}K({type:`styling`,names:[`\\displaystyle`,`\\textstyle`,`\\scriptstyle`,`\\scriptscriptstyle`],numArgs:0,allowedInText:!0,primitive:!0,handler(e,t){var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!0,n),o=r.slice(1,r.length-5);if(!gu(o))throw Error(`Unknown style: `+o);return{type:`styling`,mode:i.mode,style:o,body:a}},htmlBuilder(e,t){var n=hu[e.style],r=t.havingStyle(n);return e.resetFont&&(r=r.withFont(``)),pu(e.body,r,t)},mathmlBuilder(e,t){var n=hu[e.style],r=t.havingStyle(n);e.resetFont&&(r=r.withFont(``));var i=new J(`mstyle`,pc(e.body,r)),a={display:[`0`,`true`],text:[`0`,`false`],script:[`1`,`false`],scriptscript:[`2`,`false`]}[e.style];return i.setAttribute(`scriptlevel`,a[0]),i.setAttribute(`displaystyle`,a[1]),i}});var _u=function(e,t){var n=e.base;return n?n.type===`op`?n.limits&&(t.style.size===M.DISPLAY.size||n.alwaysHandleSupSub)?cu:null:n.type===`operatorname`?n.alwaysHandleSupSub&&(t.style.size===M.DISPLAY.size||n.limits)?fu:null:n.type===`accent`?fa(n.base)?Ic:null:n.type===`horizBrace`&&!e.sub===n.isOver?ru:null:null};Hs({type:`supsub`,htmlBuilder(e,t){var n=_u(e,t);if(n)return n(e,t);var{base:r,sup:i,sub:a}=e,o=q(r,t),s,c,l=t.fontMetrics(),u=0,d=0,f=r&&fa(r);if(i){var p=t.havingStyle(t.style.sup());s=q(i,p,t),f||(u=o.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(a){var m=t.havingStyle(t.style.sub());c=q(a,m,t),f||(d=o.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}var h=t.style===M.DISPLAY?l.sup1:t.style.cramped?l.sup3:l.sup2,g=t.sizeMultiplier,_=N(.5/l.ptPerEm/g),v=null;if(c){var y=e.base&&e.base.type===`op`&&e.base.name&&(e.base.name===`\\oiint`||e.base.name===`\\oiiint`);(o instanceof ho||y)&&(v=N(-(o.italic??0)))}var b;if(s&&c){u=Math.max(u,h,s.depth+.25*l.xHeight),d=Math.max(d,l.sub2);var x=4*l.defaultRuleThickness;if(u-s.depth-(c.height-d)<x){d=x-(u-s.depth)+c.height;var S=.8*l.xHeight-(u-s.depth);S>0&&(u+=S,d-=S)}b=G({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:d,marginRight:_,marginLeft:v},{type:`elem`,elem:s,shift:-u,marginRight:_}]})}else if(c)d=Math.max(d,l.sub1,c.height-.8*l.xHeight),b=G({positionType:`shift`,positionData:d,children:[{type:`elem`,elem:c,marginLeft:v,marginRight:_}]});else if(s)u=Math.max(u,h,s.depth+.25*l.xHeight),b=G({positionType:`shift`,positionData:-u,children:[{type:`elem`,elem:s,marginRight:_}]});else throw Error(`supsub must have either sup or sub.`);return W([$s(o,`right`)||`mord`],[o,W([`msupsub`],[b])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type===`horizBrace`&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type===`op`||e.base.type===`operatorname`)&&(e.base.parentIsSupSub=!0);var a=[Y(e.base,t)];e.sub&&a.push(Y(e.sub,t)),e.sup&&a.push(Y(e.sup,t));var o;if(n)o=r?`mover`:`munder`;else if(!e.sub){var s=e.base;o=s&&s.type===`op`&&s.limits&&(t.style===M.DISPLAY||s.alwaysHandleSupSub)||s&&s.type===`operatorname`&&s.alwaysHandleSupSub&&(s.limits||t.style===M.DISPLAY)?`mover`:`msup`}else if(e.sup){var c=e.base;o=c&&c.type===`op`&&c.limits&&t.style===M.DISPLAY||c&&c.type===`operatorname`&&c.alwaysHandleSupSub&&(t.style===M.DISPLAY||c.limits)?`munderover`:`msubsup`}else{var l=e.base;o=l&&l.type===`op`&&l.limits&&(t.style===M.DISPLAY||l.alwaysHandleSupSub)||l&&l.type===`operatorname`&&l.alwaysHandleSupSub&&(l.limits||t.style===M.DISPLAY)?`munder`:`msub`}return new J(o,a)}}),Hs({type:`atom`,htmlBuilder(e,t){return _s(e.text,e.mode,t,[`m`+e.family])},mathmlBuilder(e,t){var n=new J(`mo`,[cc(e.text,e.mode)]);if(e.family===`bin`){var r=dc(e,t);r===`bold-italic`&&n.setAttribute(`mathvariant`,r)}else e.family===`punct`?n.setAttribute(`separator`,`true`):(e.family===`open`||e.family===`close`)&&n.setAttribute(`stretchy`,`false`);return n}});var vu={mi:`italic`,mn:`normal`,mtext:`normal`};Hs({type:`mathord`,htmlBuilder(e,t){return ys(e,t)},mathmlBuilder(e,t){var n=new J(`mi`,[cc(e.text,e.mode,t)]),r=dc(e,t)||`italic`;return r!==vu[n.type]&&n.setAttribute(`mathvariant`,r),n}}),Hs({type:`textord`,htmlBuilder(e,t){return ys(e,t)},mathmlBuilder(e,t){var n=cc(e.text,e.mode,t),r=dc(e,t)||`normal`,i=e.mode===`text`?new J(`mtext`,[n]):/[0-9]/.test(e.text)?new J(`mn`,[n]):e.text===`\\prime`?new J(`mo`,[n]):new J(`mi`,[n]);return r!==vu[i.type]&&i.setAttribute(`mathvariant`,r),i}});var yu={"\\nobreak":`nobreak`,"\\allowbreak":`allowbreak`},bu={" ":{},"\\ ":{},"~":{className:`nobreak`},"\\space":{},"\\nobreakspace":{className:`nobreak`}};Hs({type:`spacing`,htmlBuilder(e,t){if(bu.hasOwnProperty(e.text)){var n=bu[e.text].className||``;if(e.mode===`text`){var r=ys(e,t);return r.classes.push(n),r}else return W([`mspace`,n],[_s(e.text,e.mode,t)],t)}else if(yu.hasOwnProperty(e.text))return W([`mspace`,yu[e.text]],[],t);else throw new j(`Unknown type of space "`+e.text+`"`)},mathmlBuilder(e,t){var n;if(bu.hasOwnProperty(e.text))n=new J(`mtext`,[new ic(`\xA0`)]);else if(yu.hasOwnProperty(e.text))return new J(`mspace`);else throw new j(`Unknown type of space "`+e.text+`"`);return n}});var xu=()=>{var e=new J(`mtd`,[]);return e.setAttribute(`width`,`50%`),e};Hs({type:`tag`,mathmlBuilder(e,t){var n=new J(`mtable`,[new J(`mtr`,[xu(),new J(`mtd`,[mc(e.body,t)]),xu(),new J(`mtd`,[mc(e.tag,t)])])]);return n.setAttribute(`width`,`100%`),n}});var Su={"\\text":void 0,"\\textrm":`textrm`,"\\textsf":`textsf`,"\\texttt":`texttt`,"\\textnormal":`textrm`},Cu={"\\textbf":`textbf`,"\\textmd":`textmd`},wu={"\\textit":`textit`,"\\textup":`textup`},Tu=(e,t)=>{var n=e.font;return n?Su[n]?t.withTextFontFamily(Su[n]):Cu[n]?t.withTextFontWeight(Cu[n]):n===`\\emph`?t.fontShape===`textit`?t.withTextFontShape(`textup`):t.withTextFontShape(`textit`):t.withTextFontShape(wu[n]):t};K({type:`text`,names:[`\\text`,`\\textrm`,`\\textsf`,`\\texttt`,`\\textnormal`,`\\textbf`,`\\textmd`,`\\textit`,`\\textup`,`\\emph`],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:Ws(i),font:r}},htmlBuilder(e,t){var n=Tu(e,t);return W([`mord`,`text`],Ys(e.body,n,!0),n)},mathmlBuilder(e,t){var n=Tu(e,t);return mc(e.body,n)}}),K({type:`underline`,names:[`\\underline`],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=q(e.body,t),r=ws(`underline-line`,t),i=t.fontMetrics().defaultRuleThickness;return W([`mord`,`underline`],[G({positionType:`top`,positionData:n.height,children:[{type:`kern`,size:i},{type:`elem`,elem:r},{type:`kern`,size:3*i},{type:`elem`,elem:n}]})],t)},mathmlBuilder(e,t){var n=new J(`mo`,[new ic(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new J(`munder`,[Y(e.body,t),n]);return r.setAttribute(`accentunder`,`true`),r}}),K({type:`vcenter`,names:[`\\vcenter`],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=q(e.body,t),r=t.fontMetrics().axisHeight;return G({positionType:`shift`,positionData:.5*(n.height-r-(n.depth+r)),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){return new J(`mrow`,[new J(`mpadded`,[Y(e.body,t)],[`vcenter`])])}}),K({type:`verb`,names:[`\\verb`],numArgs:0,allowedInText:!0,handler(e,t,n){throw new j(`\\verb ended by end of line instead of matching delimiter`)},htmlBuilder(e,t){for(var n=Eu(e),r=[],i=t.havingStyle(t.style.text()),a=0;a<n.length;a++){var o=n[a];o===`~`&&(o=`\\textasciitilde`),r.push(gs(o,`Typewriter-Regular`,e.mode,i,[`mord`,`texttt`]))}return W([`mord`,`text`].concat(i.sizingClasses(t)),xs(r),i)},mathmlBuilder(e,t){var n=new J(`mtext`,[new ic(Eu(e))]);return n.setAttribute(`mathvariant`,`monospace`),n}});var Eu=e=>e.body.replace(/ /g,e.star?`␣`:`\xA0`),Du=zs,Ou=`[ \r
255
+ ]`,ku=`\\\\[a-zA-Z@]+`,Au=`\\\\[^\ud800-\udfff]`,ju=`(`+ku+`)`+Ou+`*`,Mu=`\\\\(
256
+ |[ \r ]+
257
+ ?)[ \r ]*`,Nu=`[̀-ͯ]`,Pu=RegExp(Nu+`+$`),Fu=`(`+Ou+`+)|`+(Mu+`|`)+`([!-\\[\\]-‧‪-퟿豈-￿]`+(Nu+`*`)+`|[\ud800-\udbff][\udc00-\udfff]`+(Nu+`*`)+`|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5`+(`|`+ju)+(`|`+Au+`)`),Iu=class{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(Fu,`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 Ll(`EOF`,new Il(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new j(`Unexpected character: '`+e[t]+`'`,new Ll(e[t],new Il(this,t,t+1)));var r=n[6]||n[3]||(n[2]?`\\ `:` `);if(this.catcodes[r]===14){var i=e.indexOf(`
258
+ `,this.tokenRegex.lastIndex);return i===-1?(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 Ll(r,new Il(this,t,this.tokenRegex.lastIndex))}},Lu=class{constructor(e,t){e===void 0&&(e={}),t===void 0&&(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(this.undefStack.length===0)throw new j(`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)&&(e[t]==null?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(n===void 0&&(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])}t==null?delete this.current[e]:this.current[e]=t}},Ru=Fl;Z(`\\noexpand`,function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),Z(`\\expandafter`,function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),Z(`\\@firstoftwo`,function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),Z(`\\@secondoftwo`,function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),Z(`\\@ifnextchar`,function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),Z(`\\@ifstar`,`\\@ifnextchar *{\\@firstoftwo{#1}}`),Z(`\\TextOrMath`,function(e){var t=e.consumeArgs(2);return e.mode===`text`?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var zu={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};Z(`\\char`,function(e){var t=e.popToken(),n,r=0;if(t.text===`'`)n=8,t=e.popToken();else if(t.text===`"`)n=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]===`\\`)r=t.text.charCodeAt(1);else if(t.text===`EOF`)throw new j("\\char` missing argument");else r=t.text.charCodeAt(0);else n=10;if(n){if(r=zu[t.text],r==null||r>=n)throw new j(`Invalid base-`+n+` digit `+t.text);for(var i;(i=zu[e.future().text])!=null&&i<n;)r*=n,r+=i,e.popToken()}return`\\@char{`+r+`}`});var Bu=(e,t,n,r)=>{var i=e.consumeArg().tokens;if(i.length!==1)throw new j(`\\newcommand's first argument must be a macro name`);var a=i[0].text,o=e.isDefined(a);if(o&&!t)throw new j(`\\newcommand{`+a+`} attempting to redefine `+(a+`; use \\renewcommand`));if(!o&&!n)throw new j(`\\renewcommand{`+a+`} when command `+a+` does not yet exist; use \\newcommand`);var s=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text===`[`){for(var c=``,l=e.expandNextToken();l.text!==`]`&&l.text!==`EOF`;)c+=l.text,l=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new j(`Invalid number of arguments: `+c);s=parseInt(c),i=e.consumeArg().tokens}return o&&r||e.macros.set(a,{tokens:i,numArgs:s}),``};Z(`\\newcommand`,e=>Bu(e,!1,!0,!1)),Z(`\\renewcommand`,e=>Bu(e,!0,!1,!1)),Z(`\\providecommand`,e=>Bu(e,!0,!0,!0)),Z(`\\message`,e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join(``)),``}),Z(`\\errmessage`,e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join(``)),``}),Z(`\\show`,e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),Du[n],ko.math[n],ko.text[n]),``}),Z(`\\bgroup`,`{`),Z(`\\egroup`,`}`),Z(`~`,`\\nobreakspace`),Z(`\\lq`,"`"),Z(`\\rq`,`'`),Z(`\\aa`,`\\r a`),Z(`\\AA`,`\\r A`),Z(`\\textcopyright`,"\\html@mathml{\\textcircled{c}}{\\char`©}"),Z(`\\copyright`,`\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}`),Z(`\\textregistered`,"\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),Z(`ℬ`,`\\mathscr{B}`),Z(`ℰ`,`\\mathscr{E}`),Z(`ℱ`,`\\mathscr{F}`),Z(`ℋ`,`\\mathscr{H}`),Z(`ℐ`,`\\mathscr{I}`),Z(`ℒ`,`\\mathscr{L}`),Z(`ℳ`,`\\mathscr{M}`),Z(`ℛ`,`\\mathscr{R}`),Z(`ℭ`,`\\mathfrak{C}`),Z(`ℌ`,`\\mathfrak{H}`),Z(`ℨ`,`\\mathfrak{Z}`),Z(`\\Bbbk`,`\\Bbb{k}`),Z(`\\llap`,`\\mathllap{\\textrm{#1}}`),Z(`\\rlap`,`\\mathrlap{\\textrm{#1}}`),Z(`\\clap`,`\\mathclap{\\textrm{#1}}`),Z(`\\mathstrut`,`\\vphantom{(}`),Z(`\\underbar`,`\\underline{\\text{#1}}`),Z(`\\not`,`\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}`),Z(`\\neq`,"\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),Z(`\\ne`,`\\neq`),Z(`≠`,`\\neq`),Z(`\\notin`,"\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),Z(`∉`,`\\notin`),Z(`≘`,"\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),Z(`≙`,"\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),Z(`≚`,"\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),Z(`≛`,"\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),Z(`≝`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),Z(`≞`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),Z(`≟`,"\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),Z(`⟂`,`\\perp`),Z(`‼`,`\\mathclose{!\\mkern-0.8mu!}`),Z(`∌`,`\\notni`),Z(`⌜`,`\\ulcorner`),Z(`⌝`,`\\urcorner`),Z(`⌞`,`\\llcorner`),Z(`⌟`,`\\lrcorner`),Z(`©`,`\\copyright`),Z(`®`,`\\textregistered`),Z(`\\ulcorner`,`\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}`),Z(`\\urcorner`,`\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}`),Z(`\\llcorner`,`\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}`),Z(`\\lrcorner`,`\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}`),Z(`\\vdots`,`{\\varvdots\\rule{0pt}{15pt}}`),Z(`⋮`,`\\vdots`),Z(`\\varGamma`,`\\mathit{\\Gamma}`),Z(`\\varDelta`,`\\mathit{\\Delta}`),Z(`\\varTheta`,`\\mathit{\\Theta}`),Z(`\\varLambda`,`\\mathit{\\Lambda}`),Z(`\\varXi`,`\\mathit{\\Xi}`),Z(`\\varPi`,`\\mathit{\\Pi}`),Z(`\\varSigma`,`\\mathit{\\Sigma}`),Z(`\\varUpsilon`,`\\mathit{\\Upsilon}`),Z(`\\varPhi`,`\\mathit{\\Phi}`),Z(`\\varPsi`,`\\mathit{\\Psi}`),Z(`\\varOmega`,`\\mathit{\\Omega}`),Z(`\\substack`,`\\begin{subarray}{c}#1\\end{subarray}`),Z(`\\colon`,`\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax`),Z(`\\boxed`,`\\fbox{$\\displaystyle{#1}$}`),Z(`\\iff`,`\\DOTSB\\;\\Longleftrightarrow\\;`),Z(`\\implies`,`\\DOTSB\\;\\Longrightarrow\\;`),Z(`\\impliedby`,`\\DOTSB\\;\\Longleftarrow\\;`),Z(`\\dddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}`),Z(`\\ddddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}`);var Vu={",":`\\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`},Hu=new Set([`bin`,`rel`]);Z(`\\dots`,function(e){var t=`\\dotso`,n=e.expandAfterFuture().text;return n in Vu?t=Vu[n]:(n.slice(0,4)===`\\not`||n in ko.math&&Hu.has(ko.math[n].group))&&(t=`\\dotsb`),t});var Uu={")":!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};Z(`\\dotso`,function(e){return e.future().text in Uu?`\\ldots\\,`:`\\ldots`}),Z(`\\dotsc`,function(e){var t=e.future().text;return t in Uu&&t!==`,`?`\\ldots\\,`:`\\ldots`}),Z(`\\cdots`,function(e){return e.future().text in Uu?`\\@cdots\\,`:`\\@cdots`}),Z(`\\dotsb`,`\\cdots`),Z(`\\dotsm`,`\\cdots`),Z(`\\dotsi`,`\\!\\cdots`),Z(`\\dotsx`,`\\ldots\\,`),Z(`\\DOTSI`,`\\relax`),Z(`\\DOTSB`,`\\relax`),Z(`\\DOTSX`,`\\relax`),Z(`\\tmspace`,`\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax`),Z(`\\,`,`\\tmspace+{3mu}{.1667em}`),Z(`\\thinspace`,`\\,`),Z(`\\>`,`\\mskip{4mu}`),Z(`\\:`,`\\tmspace+{4mu}{.2222em}`),Z(`\\medspace`,`\\:`),Z(`\\;`,`\\tmspace+{5mu}{.2777em}`),Z(`\\thickspace`,`\\;`),Z(`\\!`,`\\tmspace-{3mu}{.1667em}`),Z(`\\negthinspace`,`\\!`),Z(`\\negmedspace`,`\\tmspace-{4mu}{.2222em}`),Z(`\\negthickspace`,`\\tmspace-{5mu}{.277em}`),Z(`\\enspace`,`\\kern.5em `),Z(`\\enskip`,`\\hskip.5em\\relax`),Z(`\\quad`,`\\hskip1em\\relax`),Z(`\\qquad`,`\\hskip2em\\relax`),Z(`\\tag`,`\\@ifstar\\tag@literal\\tag@paren`),Z(`\\tag@paren`,`\\tag@literal{({#1})}`),Z(`\\tag@literal`,e=>{if(e.macros.get(`\\df@tag`))throw new j(`Multiple \\tag`);return`\\gdef\\df@tag{\\text{#1}}`}),Z(`\\bmod`,`\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}`),Z(`\\pod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)`),Z(`\\pmod`,`\\pod{{\\rm mod}\\mkern6mu#1}`),Z(`\\mod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1`),Z(`\\newline`,`\\\\\\relax`),Z(`\\TeX`,`\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}`);var Wu=N(So[`Main-Regular`][84][1]-.7*So[`Main-Regular`][65][1]);Z(`\\LaTeX`,`\\textrm{\\html@mathml{`+(`L\\kern-.36em\\raisebox{`+Wu+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{LaTeX}}`),Z(`\\KaTeX`,`\\textrm{\\html@mathml{`+(`K\\kern-.17em\\raisebox{`+Wu+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{KaTeX}}`),Z(`\\hspace`,`\\@ifstar\\@hspacer\\@hspace`),Z(`\\@hspace`,`\\hskip #1\\relax`),Z(`\\@hspacer`,`\\rule{0pt}{0pt}\\hskip #1\\relax`),Z(`\\ordinarycolon`,`:`),Z(`\\vcentcolon`,`\\mathrel{\\mathop\\ordinarycolon}`),Z(`\\dblcolon`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}`),Z(`\\coloneqq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}`),Z(`\\Coloneqq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}`),Z(`\\coloneq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}`),Z(`\\Coloneq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}`),Z(`\\eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}`),Z(`\\Eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}`),Z(`\\eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}`),Z(`\\Eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}`),Z(`\\colonapprox`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}`),Z(`\\Colonapprox`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}`),Z(`\\colonsim`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}`),Z(`\\Colonsim`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}`),Z(`∷`,`\\dblcolon`),Z(`∹`,`\\eqcolon`),Z(`≔`,`\\coloneqq`),Z(`≕`,`\\eqqcolon`),Z(`⩴`,`\\Coloneqq`),Z(`\\ratio`,`\\vcentcolon`),Z(`\\coloncolon`,`\\dblcolon`),Z(`\\colonequals`,`\\coloneqq`),Z(`\\coloncolonequals`,`\\Coloneqq`),Z(`\\equalscolon`,`\\eqqcolon`),Z(`\\equalscoloncolon`,`\\Eqqcolon`),Z(`\\colonminus`,`\\coloneq`),Z(`\\coloncolonminus`,`\\Coloneq`),Z(`\\minuscolon`,`\\eqcolon`),Z(`\\minuscoloncolon`,`\\Eqcolon`),Z(`\\coloncolonapprox`,`\\Colonapprox`),Z(`\\coloncolonsim`,`\\Colonsim`),Z(`\\simcolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),Z(`\\simcoloncolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}`),Z(`\\approxcolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),Z(`\\approxcoloncolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}`),Z(`\\notni`,"\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),Z(`\\limsup`,`\\DOTSB\\operatorname*{lim\\,sup}`),Z(`\\liminf`,`\\DOTSB\\operatorname*{lim\\,inf}`),Z(`\\injlim`,`\\DOTSB\\operatorname*{inj\\,lim}`),Z(`\\projlim`,`\\DOTSB\\operatorname*{proj\\,lim}`),Z(`\\varlimsup`,`\\DOTSB\\operatorname*{\\overline{lim}}`),Z(`\\varliminf`,`\\DOTSB\\operatorname*{\\underline{lim}}`),Z(`\\varinjlim`,`\\DOTSB\\operatorname*{\\underrightarrow{lim}}`),Z(`\\varprojlim`,`\\DOTSB\\operatorname*{\\underleftarrow{lim}}`),Z(`\\gvertneqq`,`\\html@mathml{\\@gvertneqq}{≩}`),Z(`\\lvertneqq`,`\\html@mathml{\\@lvertneqq}{≨}`),Z(`\\ngeqq`,`\\html@mathml{\\@ngeqq}{≱}`),Z(`\\ngeqslant`,`\\html@mathml{\\@ngeqslant}{≱}`),Z(`\\nleqq`,`\\html@mathml{\\@nleqq}{≰}`),Z(`\\nleqslant`,`\\html@mathml{\\@nleqslant}{≰}`),Z(`\\nshortmid`,`\\html@mathml{\\@nshortmid}{∤}`),Z(`\\nshortparallel`,`\\html@mathml{\\@nshortparallel}{∦}`),Z(`\\nsubseteqq`,`\\html@mathml{\\@nsubseteqq}{⊈}`),Z(`\\nsupseteqq`,`\\html@mathml{\\@nsupseteqq}{⊉}`),Z(`\\varsubsetneq`,`\\html@mathml{\\@varsubsetneq}{⊊}`),Z(`\\varsubsetneqq`,`\\html@mathml{\\@varsubsetneqq}{⫋}`),Z(`\\varsupsetneq`,`\\html@mathml{\\@varsupsetneq}{⊋}`),Z(`\\varsupsetneqq`,`\\html@mathml{\\@varsupsetneqq}{⫌}`),Z(`\\imath`,`\\html@mathml{\\@imath}{ı}`),Z(`\\jmath`,`\\html@mathml{\\@jmath}{ȷ}`),Z(`\\llbracket`,"\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),Z(`\\rrbracket`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),Z(`⟦`,`\\llbracket`),Z(`⟧`,`\\rrbracket`),Z(`\\lBrace`,"\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),Z(`\\rBrace`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),Z(`⦃`,`\\lBrace`),Z(`⦄`,`\\rBrace`),Z(`\\minuso`,"\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),Z(`⦵`,`\\minuso`),Z(`\\darr`,`\\downarrow`),Z(`\\dArr`,`\\Downarrow`),Z(`\\Darr`,`\\Downarrow`),Z(`\\lang`,`\\langle`),Z(`\\rang`,`\\rangle`),Z(`\\uarr`,`\\uparrow`),Z(`\\uArr`,`\\Uparrow`),Z(`\\Uarr`,`\\Uparrow`),Z(`\\N`,`\\mathbb{N}`),Z(`\\R`,`\\mathbb{R}`),Z(`\\Z`,`\\mathbb{Z}`),Z(`\\alef`,`\\aleph`),Z(`\\alefsym`,`\\aleph`),Z(`\\Alpha`,`\\mathrm{A}`),Z(`\\Beta`,`\\mathrm{B}`),Z(`\\bull`,`\\bullet`),Z(`\\Chi`,`\\mathrm{X}`),Z(`\\clubs`,`\\clubsuit`),Z(`\\cnums`,`\\mathbb{C}`),Z(`\\Complex`,`\\mathbb{C}`),Z(`\\Dagger`,`\\ddagger`),Z(`\\diamonds`,`\\diamondsuit`),Z(`\\empty`,`\\emptyset`),Z(`\\Epsilon`,`\\mathrm{E}`),Z(`\\Eta`,`\\mathrm{H}`),Z(`\\exist`,`\\exists`),Z(`\\harr`,`\\leftrightarrow`),Z(`\\hArr`,`\\Leftrightarrow`),Z(`\\Harr`,`\\Leftrightarrow`),Z(`\\hearts`,`\\heartsuit`),Z(`\\image`,`\\Im`),Z(`\\infin`,`\\infty`),Z(`\\Iota`,`\\mathrm{I}`),Z(`\\isin`,`\\in`),Z(`\\Kappa`,`\\mathrm{K}`),Z(`\\larr`,`\\leftarrow`),Z(`\\lArr`,`\\Leftarrow`),Z(`\\Larr`,`\\Leftarrow`),Z(`\\lrarr`,`\\leftrightarrow`),Z(`\\lrArr`,`\\Leftrightarrow`),Z(`\\Lrarr`,`\\Leftrightarrow`),Z(`\\Mu`,`\\mathrm{M}`),Z(`\\natnums`,`\\mathbb{N}`),Z(`\\Nu`,`\\mathrm{N}`),Z(`\\Omicron`,`\\mathrm{O}`),Z(`\\plusmn`,`\\pm`),Z(`\\rarr`,`\\rightarrow`),Z(`\\rArr`,`\\Rightarrow`),Z(`\\Rarr`,`\\Rightarrow`),Z(`\\real`,`\\Re`),Z(`\\reals`,`\\mathbb{R}`),Z(`\\Reals`,`\\mathbb{R}`),Z(`\\Rho`,`\\mathrm{P}`),Z(`\\sdot`,`\\cdot`),Z(`\\sect`,`\\S`),Z(`\\spades`,`\\spadesuit`),Z(`\\sub`,`\\subset`),Z(`\\sube`,`\\subseteq`),Z(`\\supe`,`\\supseteq`),Z(`\\Tau`,`\\mathrm{T}`),Z(`\\thetasym`,`\\vartheta`),Z(`\\weierp`,`\\wp`),Z(`\\Zeta`,`\\mathrm{Z}`),Z(`\\argmin`,`\\DOTSB\\operatorname*{arg\\,min}`),Z(`\\argmax`,`\\DOTSB\\operatorname*{arg\\,max}`),Z(`\\plim`,`\\DOTSB\\mathop{\\operatorname{plim}}\\limits`),Z(`\\bra`,`\\mathinner{\\langle{#1}|}`),Z(`\\ket`,`\\mathinner{|{#1}\\rangle}`),Z(`\\braket`,`\\mathinner{\\langle{#1}\\rangle}`),Z(`\\Bra`,`\\left\\langle#1\\right|`),Z(`\\Ket`,`\\left|#1\\right\\rangle`);var Gu=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.macros.get(`|`),s=t.macros.get(`\\|`);t.macros.beginGroup();var c=t=>n=>{e&&(n.macros.set(`|`,o),i.length&&n.macros.set(`\\|`,s));var a=t;return!t&&i.length&&n.future().text===`|`&&(n.popToken(),a=!0),{tokens:a?i:r,numArgs:0}};t.macros.set(`|`,c(!1)),i.length&&t.macros.set(`\\|`,c(!0));var l=t.consumeArg().tokens,u=t.expandTokens([...a,...l,...n]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};Z(`\\bra@ket`,Gu(!1)),Z(`\\bra@set`,Gu(!0)),Z(`\\Braket`,`\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}`),Z(`\\Set`,`\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}`),Z(`\\set`,`\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}`),Z(`\\angln`,`{\\angl n}`),Z(`\\blue`,`\\textcolor{##6495ed}{#1}`),Z(`\\orange`,`\\textcolor{##ffa500}{#1}`),Z(`\\pink`,`\\textcolor{##ff00af}{#1}`),Z(`\\red`,`\\textcolor{##df0030}{#1}`),Z(`\\green`,`\\textcolor{##28ae7b}{#1}`),Z(`\\gray`,`\\textcolor{gray}{#1}`),Z(`\\purple`,`\\textcolor{##9d38bd}{#1}`),Z(`\\blueA`,`\\textcolor{##ccfaff}{#1}`),Z(`\\blueB`,`\\textcolor{##80f6ff}{#1}`),Z(`\\blueC`,`\\textcolor{##63d9ea}{#1}`),Z(`\\blueD`,`\\textcolor{##11accd}{#1}`),Z(`\\blueE`,`\\textcolor{##0c7f99}{#1}`),Z(`\\tealA`,`\\textcolor{##94fff5}{#1}`),Z(`\\tealB`,`\\textcolor{##26edd5}{#1}`),Z(`\\tealC`,`\\textcolor{##01d1c1}{#1}`),Z(`\\tealD`,`\\textcolor{##01a995}{#1}`),Z(`\\tealE`,`\\textcolor{##208170}{#1}`),Z(`\\greenA`,`\\textcolor{##b6ffb0}{#1}`),Z(`\\greenB`,`\\textcolor{##8af281}{#1}`),Z(`\\greenC`,`\\textcolor{##74cf70}{#1}`),Z(`\\greenD`,`\\textcolor{##1fab54}{#1}`),Z(`\\greenE`,`\\textcolor{##0d923f}{#1}`),Z(`\\goldA`,`\\textcolor{##ffd0a9}{#1}`),Z(`\\goldB`,`\\textcolor{##ffbb71}{#1}`),Z(`\\goldC`,`\\textcolor{##ff9c39}{#1}`),Z(`\\goldD`,`\\textcolor{##e07d10}{#1}`),Z(`\\goldE`,`\\textcolor{##a75a05}{#1}`),Z(`\\redA`,`\\textcolor{##fca9a9}{#1}`),Z(`\\redB`,`\\textcolor{##ff8482}{#1}`),Z(`\\redC`,`\\textcolor{##f9685d}{#1}`),Z(`\\redD`,`\\textcolor{##e84d39}{#1}`),Z(`\\redE`,`\\textcolor{##bc2612}{#1}`),Z(`\\maroonA`,`\\textcolor{##ffbde0}{#1}`),Z(`\\maroonB`,`\\textcolor{##ff92c6}{#1}`),Z(`\\maroonC`,`\\textcolor{##ed5fa6}{#1}`),Z(`\\maroonD`,`\\textcolor{##ca337c}{#1}`),Z(`\\maroonE`,`\\textcolor{##9e034e}{#1}`),Z(`\\purpleA`,`\\textcolor{##ddd7ff}{#1}`),Z(`\\purpleB`,`\\textcolor{##c6b9fc}{#1}`),Z(`\\purpleC`,`\\textcolor{##aa87ff}{#1}`),Z(`\\purpleD`,`\\textcolor{##7854ab}{#1}`),Z(`\\purpleE`,`\\textcolor{##543b78}{#1}`),Z(`\\mintA`,`\\textcolor{##f5f9e8}{#1}`),Z(`\\mintB`,`\\textcolor{##edf2df}{#1}`),Z(`\\mintC`,`\\textcolor{##e0e5cc}{#1}`),Z(`\\grayA`,`\\textcolor{##f6f7f7}{#1}`),Z(`\\grayB`,`\\textcolor{##f0f1f2}{#1}`),Z(`\\grayC`,`\\textcolor{##e3e5e6}{#1}`),Z(`\\grayD`,`\\textcolor{##d6d8da}{#1}`),Z(`\\grayE`,`\\textcolor{##babec2}{#1}`),Z(`\\grayF`,`\\textcolor{##888d93}{#1}`),Z(`\\grayG`,`\\textcolor{##626569}{#1}`),Z(`\\grayH`,`\\textcolor{##3b3e40}{#1}`),Z(`\\grayI`,`\\textcolor{##21242c}{#1}`),Z(`\\kaBlue`,`\\textcolor{##314453}{#1}`),Z(`\\kaGreen`,`\\textcolor{##71B307}{#1}`);var Ku={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},qu=class{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 Lu(Ru,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new Iu(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&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 Ll(`EOF`,n.loc)),this.pushTokens(r),new Ll(``,Il.range(t,n))}consumeSpaces(){for(;this.future().text===` `;)this.stack.pop()}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r=this.future(),i,a=0,o=0;do{if(i=this.popToken(),t.push(i),i.text===`{`)++a;else if(i.text===`}`){if(--a,a===-1)throw new j(`Extra }`,i)}else if(i.text===`EOF`)throw new j(`Unexpected end of input in a macro argument, expected '`+(e&&n?e[o]:`}`)+`'`,i);if(e&&n)if((a===0||a===1&&e[o]===`{`)&&i.text===e[o]){if(++o,o===e.length){t.splice(-o,o);break}}else o=0}while(a!==0||n);return r.text===`{`&&t[t.length-1].text===`}`&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:r,end:i}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new j(`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 j(`Use of the macro doesn't match its definition`,i)}}for(var a=[],o=0;o<e;o++)a.push(this.consumeArg(t&&t[o+1]).tokens);return a}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new j(`Too many expansions: infinite loop or need to increase maxExpand setting`)}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(r==null||e&&r.unexpandable){if(e&&r==null&&n[0]===`\\`&&!this.isDefined(n))throw new j(`Undefined control sequence: `+n);return this.pushToken(t),!1}this.countExpansion(1);var i=r.tokens,a=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var s=i[o];if(s.text===`#`){if(o===0)throw new j(`Incomplete placeholder at end of macro body`,s);if(s=i[--o],s.text===`#`)i.splice(o+1,1);else if(/^[1-9]$/.test(s.text))i.splice(o,2,...a[s.text-1]);else throw new j(`Not a valid argument number`,s)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text=`\\relax`),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Ll(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var r=this.stack.pop();r.treatAsRelax&&=(r.noexpand=!1,!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(e=>e.text).join(``)}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t==`function`?t(this):t;if(typeof r==`string`){var i=0;if(r.includes(`#`))for(var a=r.replace(/##/g,``);a.includes(`#`+(i+1));)++i;for(var o=new Iu(r,this.settings),s=[],c=o.lex();c.text!==`EOF`;)s.push(c),c=o.lex();return s.reverse(),{tokens:s,numArgs:i}}return r}isDefined(e){return this.macros.has(e)||Du.hasOwnProperty(e)||ko.math.hasOwnProperty(e)||ko.text.hasOwnProperty(e)||Ku.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t==null?Du.hasOwnProperty(e)&&!Du[e].primitive:typeof t==`string`||typeof t==`function`||!t.unexpandable}},Ju=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Yu=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`,ᵝ:`β`,ᵞ:`γ`,ᵟ:`δ`,ᵠ:`ϕ`,ᵡ:`χ`,ᶿ:`θ`}),Xu={"́":{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`}},Zu={á:`á`,à:`à`,ä:`ä`,ǟ:`ǟ`,ã:`ã`,ā:`ā`,ă:`ă`,ắ:`ắ`,ằ:`ằ`,ẵ:`ẵ`,ǎ:`ǎ`,â:`â`,ấ:`ấ`,ầ:`ầ`,ẫ:`ẫ`,ȧ:`ȧ`,ǡ:`ǡ`,å:`å`,ǻ:`ǻ`,ḃ:`ḃ`,ć:`ć`,ḉ:`ḉ`,č:`č`,ĉ:`ĉ`,ċ:`ċ`,ç:`ç`,ď:`ď`,ḋ:`ḋ`,ḑ:`ḑ`,é:`é`,è:`è`,ë:`ë`,ẽ:`ẽ`,ē:`ē`,ḗ:`ḗ`,ḕ:`ḕ`,ĕ:`ĕ`,ḝ:`ḝ`,ě:`ě`,ê:`ê`,ế:`ế`,ề:`ề`,ễ:`ễ`,ė:`ė`,ȩ:`ȩ`,ḟ:`ḟ`,ǵ:`ǵ`,ḡ:`ḡ`,ğ:`ğ`,ǧ:`ǧ`,ĝ:`ĝ`,ġ:`ġ`,ģ:`ģ`,ḧ:`ḧ`,ȟ:`ȟ`,ĥ:`ĥ`,ḣ:`ḣ`,ḩ:`ḩ`,í:`í`,ì:`ì`,ï:`ï`,ḯ:`ḯ`,ĩ:`ĩ`,ī:`ī`,ĭ:`ĭ`,ǐ:`ǐ`,î:`î`,ǰ:`ǰ`,ĵ:`ĵ`,ḱ:`ḱ`,ǩ:`ǩ`,ķ:`ķ`,ĺ:`ĺ`,ľ:`ľ`,ļ:`ļ`,ḿ:`ḿ`,ṁ:`ṁ`,ń:`ń`,ǹ:`ǹ`,ñ:`ñ`,ň:`ň`,ṅ:`ṅ`,ņ:`ņ`,ó:`ó`,ò:`ò`,ö:`ö`,ȫ:`ȫ`,õ:`õ`,ṍ:`ṍ`,ṏ:`ṏ`,ȭ:`ȭ`,ō:`ō`,ṓ:`ṓ`,ṑ:`ṑ`,ŏ:`ŏ`,ǒ:`ǒ`,ô:`ô`,ố:`ố`,ồ:`ồ`,ỗ:`ỗ`,ȯ:`ȯ`,ȱ:`ȱ`,ő:`ő`,ṕ:`ṕ`,ṗ:`ṗ`,ŕ:`ŕ`,ř:`ř`,ṙ:`ṙ`,ŗ:`ŗ`,ś:`ś`,ṥ:`ṥ`,š:`š`,ṧ:`ṧ`,ŝ:`ŝ`,ṡ:`ṡ`,ş:`ş`,ẗ:`ẗ`,ť:`ť`,ṫ:`ṫ`,ţ:`ţ`,ú:`ú`,ù:`ù`,ü:`ü`,ǘ:`ǘ`,ǜ:`ǜ`,ǖ:`ǖ`,ǚ:`ǚ`,ũ:`ũ`,ṹ:`ṹ`,ū:`ū`,ṻ:`ṻ`,ŭ:`ŭ`,ǔ:`ǔ`,û:`û`,ů:`ů`,ű:`ű`,ṽ:`ṽ`,ẃ:`ẃ`,ẁ:`ẁ`,ẅ:`ẅ`,ŵ:`ŵ`,ẇ:`ẇ`,ẘ:`ẘ`,ẍ:`ẍ`,ẋ:`ẋ`,ý:`ý`,ỳ:`ỳ`,ÿ:`ÿ`,ỹ:`ỹ`,ȳ:`ȳ`,ŷ:`ŷ`,ẏ:`ẏ`,ẙ:`ẙ`,ź:`ź`,ž:`ž`,ẑ:`ẑ`,ż:`ż`,Á:`Á`,À:`À`,Ä:`Ä`,Ǟ:`Ǟ`,Ã:`Ã`,Ā:`Ā`,Ă:`Ă`,Ắ:`Ắ`,Ằ:`Ằ`,Ẵ:`Ẵ`,Ǎ:`Ǎ`,Â:`Â`,Ấ:`Ấ`,Ầ:`Ầ`,Ẫ:`Ẫ`,Ȧ:`Ȧ`,Ǡ:`Ǡ`,Å:`Å`,Ǻ:`Ǻ`,Ḃ:`Ḃ`,Ć:`Ć`,Ḉ:`Ḉ`,Č:`Č`,Ĉ:`Ĉ`,Ċ:`Ċ`,Ç:`Ç`,Ď:`Ď`,Ḋ:`Ḋ`,Ḑ:`Ḑ`,É:`É`,È:`È`,Ë:`Ë`,Ẽ:`Ẽ`,Ē:`Ē`,Ḗ:`Ḗ`,Ḕ:`Ḕ`,Ĕ:`Ĕ`,Ḝ:`Ḝ`,Ě:`Ě`,Ê:`Ê`,Ế:`Ế`,Ề:`Ề`,Ễ:`Ễ`,Ė:`Ė`,Ȩ:`Ȩ`,Ḟ:`Ḟ`,Ǵ:`Ǵ`,Ḡ:`Ḡ`,Ğ:`Ğ`,Ǧ:`Ǧ`,Ĝ:`Ĝ`,Ġ:`Ġ`,Ģ:`Ģ`,Ḧ:`Ḧ`,Ȟ:`Ȟ`,Ĥ:`Ĥ`,Ḣ:`Ḣ`,Ḩ:`Ḩ`,Í:`Í`,Ì:`Ì`,Ï:`Ï`,Ḯ:`Ḯ`,Ĩ:`Ĩ`,Ī:`Ī`,Ĭ:`Ĭ`,Ǐ:`Ǐ`,Î:`Î`,İ:`İ`,Ĵ:`Ĵ`,Ḱ:`Ḱ`,Ǩ:`Ǩ`,Ķ:`Ķ`,Ĺ:`Ĺ`,Ľ:`Ľ`,Ļ:`Ļ`,Ḿ:`Ḿ`,Ṁ:`Ṁ`,Ń:`Ń`,Ǹ:`Ǹ`,Ñ:`Ñ`,Ň:`Ň`,Ṅ:`Ṅ`,Ņ:`Ņ`,Ó:`Ó`,Ò:`Ò`,Ö:`Ö`,Ȫ:`Ȫ`,Õ:`Õ`,Ṍ:`Ṍ`,Ṏ:`Ṏ`,Ȭ:`Ȭ`,Ō:`Ō`,Ṓ:`Ṓ`,Ṑ:`Ṑ`,Ŏ:`Ŏ`,Ǒ:`Ǒ`,Ô:`Ô`,Ố:`Ố`,Ồ:`Ồ`,Ỗ:`Ỗ`,Ȯ:`Ȯ`,Ȱ:`Ȱ`,Ő:`Ő`,Ṕ:`Ṕ`,Ṗ:`Ṗ`,Ŕ:`Ŕ`,Ř:`Ř`,Ṙ:`Ṙ`,Ŗ:`Ŗ`,Ś:`Ś`,Ṥ:`Ṥ`,Š:`Š`,Ṧ:`Ṧ`,Ŝ:`Ŝ`,Ṡ:`Ṡ`,Ş:`Ş`,Ť:`Ť`,Ṫ:`Ṫ`,Ţ:`Ţ`,Ú:`Ú`,Ù:`Ù`,Ü:`Ü`,Ǘ:`Ǘ`,Ǜ:`Ǜ`,Ǖ:`Ǖ`,Ǚ:`Ǚ`,Ũ:`Ũ`,Ṹ:`Ṹ`,Ū:`Ū`,Ṻ:`Ṻ`,Ŭ:`Ŭ`,Ǔ:`Ǔ`,Û:`Û`,Ů:`Ů`,Ű:`Ű`,Ṽ:`Ṽ`,Ẃ:`Ẃ`,Ẁ:`Ẁ`,Ẅ:`Ẅ`,Ŵ:`Ŵ`,Ẇ:`Ẇ`,Ẍ:`Ẍ`,Ẋ:`Ẋ`,Ý:`Ý`,Ỳ:`Ỳ`,Ÿ:`Ÿ`,Ỹ:`Ỹ`,Ȳ:`Ȳ`,Ŷ:`Ŷ`,Ẏ:`Ẏ`,Ź:`Ź`,Ž:`Ž`,Ẑ:`Ẑ`,Ż:`Ż`,ά:`ά`,ὰ:`ὰ`,ᾱ:`ᾱ`,ᾰ:`ᾰ`,έ:`έ`,ὲ:`ὲ`,ή:`ή`,ὴ:`ὴ`,ί:`ί`,ὶ:`ὶ`,ϊ:`ϊ`,ΐ:`ΐ`,ῒ:`ῒ`,ῑ:`ῑ`,ῐ:`ῐ`,ό:`ό`,ὸ:`ὸ`,ύ:`ύ`,ὺ:`ὺ`,ϋ:`ϋ`,ΰ:`ΰ`,ῢ:`ῢ`,ῡ:`ῡ`,ῠ:`ῠ`,ώ:`ώ`,ὼ:`ὼ`,Ύ:`Ύ`,Ὺ:`Ὺ`,Ϋ:`Ϋ`,Ῡ:`Ῡ`,Ῠ:`Ῠ`,Ώ:`Ώ`,Ὼ:`Ὼ`},Qu=class e{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 qu(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new j(`Expected '`+e+`', got '`+this.fetch().text+`'`,this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return 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 Ll(`}`)),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect(`}`),this.nextToken=t,n}parseExpression(t,n){for(var r=[];;){this.mode===`math`&&this.consumeSpaces();var i=this.fetch();if(e.endOfExpression.has(i.text)||n&&i.text===n||t&&Du[i.text]&&Du[i.text].infix)break;var a=this.parseAtom(n);if(!a)break;a.type!==`internal`&&r.push(a)}return this.mode===`text`&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t=-1,n,r=0;r<e.length;r++){var i=e[r];if(i.type===`infix`){if(t!==-1)throw new j(`only one infix operator per group`,i.token);t=r,n=i.replaceWith}}if(t!==-1&&n){var a,o,s=e.slice(0,t),c=e.slice(t+1);return a=s.length===1&&s[0].type===`ordgroup`?s[0]:{type:`ordgroup`,mode:this.mode,body:s},o=c.length===1&&c[0].type===`ordgroup`?c[0]:{type:`ordgroup`,mode:this.mode,body:c},[n===`\\\\abovefrac`?this.callFunction(n,[a,e[t],o],[]):this.callFunction(n,[a,o],[])]}else return e}handleSupSubscript(e){var t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();var r;do r=this.parseGroup(e);while(r?.type===`internal`);if(!r)throw new j(`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=this.parseGroup(`atom`,e);if(t?.type===`internal`||this.mode===`text`)return t;for(var n,r;;){this.consumeSpaces();var i=this.fetch();if(i.text===`\\limits`||i.text===`\\nolimits`){if(t&&t.type===`op`)t.limits=i.text===`\\limits`,t.alwaysHandleSupSub=!0;else if(t&&t.type===`operatorname`)t.alwaysHandleSupSub&&(t.limits=i.text===`\\limits`);else throw new j(`Limit controls must follow a math operator`,i);this.consume()}else if(i.text===`^`){if(n)throw new j(`Double superscript`,i);n=this.handleSupSubscript(`superscript`)}else if(i.text===`_`){if(r)throw new j(`Double subscript`,i);r=this.handleSupSubscript(`subscript`)}else if(i.text===`'`){if(n)throw new j(`Double superscript`,i);var a={type:`textord`,mode:this.mode,text:`\\prime`},o=[a];for(this.consume();this.fetch().text===`'`;)o.push(a),this.consume();this.fetch().text===`^`&&o.push(this.handleSupSubscript(`superscript`)),n={type:`ordgroup`,mode:this.mode,body:o}}else if(Yu[i.text]){var s=Ju.test(i.text),c=[];for(c.push(new Ll(Yu[i.text])),this.consume();;){var l=this.fetch().text;if(!Yu[l]||Ju.test(l)!==s)break;c.unshift(new Ll(Yu[l])),this.consume()}var u=this.subparse(c);s?r={type:`ordgroup`,mode:`math`,body:u}:n={type:`ordgroup`,mode:`math`,body:u}}else break}return n&&r?{type:`supsub`,mode:this.mode,base:t,sup:n,sub:r}:n?{type:`supsub`,mode:this.mode,base:t,sup:n}:r?{type:`supsub`,mode:this.mode,base:t,sub:r}:t}parseFunction(e,t){var n=this.fetch(),r=n.text,i=Du[r];if(!i)return null;if(this.consume(),t&&t!==`atom`&&!i.allowedInArgument)throw new j(`Got function '`+r+`' with no arguments`+(t?` as `+t:``),n);if(this.mode===`text`&&!i.allowedInText)throw new j(`Can't use function '`+r+`' in text mode`,n);if(this.mode===`math`&&i.allowedInMath===!1)throw new j(`Can't use function '`+r+`' in math mode`,n);var{args:a,optArgs:o}=this.parseArguments(r,i);return this.callFunction(r,a,o,n,e)}callFunction(e,t,n,r,i){var a={funcName:e,parser:this,token:r,breakOnTokenText:i},o=Du[e];if(o&&o.handler)return o.handler(a,t,n);throw new j(`No function handler for `+e)}parseArguments(e,t){var n=t.numOptionalArgs??0,r=t.numArgs+n;if(r===0)return{args:[],optArgs:[]};for(var i=[],a=[],o=0;o<r;o++){var s=t.argTypes?.[o],c=o<n;(`primitive`in t&&t.primitive&&s==null||t.type===`sqrt`&&o===1&&a[0]==null)&&(s=`primitive`);var l=this.parseGroupOfType(`argument to '`+e+`'`,s,c);if(c)a.push(l);else if(l!=null)i.push(l);else throw new j(`Null argument, please report this as a bug`)}return{args:i,optArgs:a}}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 r==null?null:{type:`styling`,mode:r.mode,body:[r],style:`text`,resetFont:!0};case`raw`:var i=this.parseStringGroup(n);return i==null?null:{type:`raw`,mode:`text`,string:i.text};case`primitive`:if(n)throw new j(`A primitive argument cannot be optional`);var a=this.parseGroup(e);if(a==null)throw new j(`Expected group as `+e,this.fetch());return a;case`original`:case void 0:return this.parseArgumentGroup(n);default:throw new j(`Unknown group type as `+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===` `;)this.consume()}parseStringGroup(e){var t=this.gullet.scanArgument(e);if(t==null)return null;for(var n=``,r;(r=this.fetch()).text!==`EOF`;)n+=r.text,this.consume();return this.consume(),t.text=n,t}parseRegexGroup(e,t){for(var n=this.fetch(),r=n,i=``,a;(a=this.fetch()).text!==`EOF`&&e.test(i+a.text);)r=a,i+=r.text,this.consume();if(i===``)throw new j(`Invalid `+t+`: '`+n.text+`'`,n);return n.range(r,i)}parseColorGroup(e){var t=this.parseStringGroup(e);if(t==null)return null;var n=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new j(`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.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,`size`):this.parseStringGroup(e),!t)return null;!e&&t.text.length===0&&(t.text=`0pt`,n=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new j(`Invalid size: '`+t.text+`'`,t);var i={number:+(r[1]+r[2]),unit:r[3]};if(!no(i))throw new j(`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(e);if(this.gullet.lexer.setCatcode(`%`,14),this.gullet.lexer.setCatcode(`~`,13),t==null)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(n==null)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 a={type:`ordgroup`,mode:this.mode,loc:n.loc,body:i};return t&&this.switchMode(r),a}parseGroup(e,t){var n=this.fetch(),r=n.text,i;if(r===`{`||r===`\\begingroup`){this.consume();var a=r===`{`?`}`:`\\endgroup`;this.gullet.beginGroup();var o=this.parseExpression(!1,a),s=this.fetch();this.expect(a),this.gullet.endGroup(),i={type:`ordgroup`,mode:this.mode,loc:Il.range(n,s),body:o,semisimple:r===`\\begingroup`||void 0}}else if(i=this.parseFunction(t,e)||this.parseSymbol(),i==null&&r[0]===`\\`&&!Ku.hasOwnProperty(r)){if(this.settings.throwOnError)throw new j(`Undefined control sequence: `+r,n);i=this.formatUnsupportedCmd(r),this.consume()}return i}formLigatures(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n];if(r.type===`textord`){var i=r.text,a=e[n+1];if(!(!a||a.type!==`textord`)){if(i===`-`&&a.text===`-`){var o=e[n+2];n+1<t&&o&&o.type===`textord`&&o.text===`-`?(e.splice(n,3,{type:`textord`,mode:`text`,loc:Il.range(r,o),text:`---`}),t-=2):(e.splice(n,2,{type:`textord`,mode:`text`,loc:Il.range(r,a),text:`--`}),--t)}(i===`'`||i==="`")&&a.text===i&&(e.splice(n,2,{type:`textord`,mode:`text`,loc:Il.range(r,a),text:i+i}),--t)}}}}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 j(`\\verb assertion failed --
259
+ please report what input caused this bug`);return n=n.slice(1,-1),{type:`verb`,mode:`text`,body:n,star:r}}Zu.hasOwnProperty(t[0])&&!ko[this.mode][t[0]]&&(this.settings.strict&&this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Accented Unicode text character "`+t[0]+`" used in math mode`,e),t=Zu[t[0]]+t.slice(1));var i=Pu.exec(t);i&&(t=t.substring(0,i.index),t===`i`?t=`ı`:t===`j`&&(t=`ȷ`));var a;if(ko[this.mode][t]){this.settings.strict&&this.mode===`math`&&Zo.includes(t)&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Latin-1/Unicode text character "`+t[0]+`" used in math mode`,e);var o=ko[this.mode][t].group,s=Il.range(e);a=Mc(o)?{type:`atom`,mode:this.mode,family:o,loc:s,text:t}:{type:o,mode:this.mode,loc:s,text:t}}else if(t.charCodeAt(0)>=128)this.settings.strict&&(Ra(t.charCodeAt(0))?this.mode===`math`&&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)),a={type:`textord`,mode:`text`,loc:Il.range(e),text:t};else return null;if(this.consume(),i)for(var c=0;c<i[0].length;c++){var l=i[0][c];if(!Xu[l])throw new j(`Unknown accent ' `+l+`'`,e);var u=Xu[l][this.mode]||Xu[l].text;if(!u)throw new j(`Accent `+l+` unsupported in `+this.mode+` mode`,e);a={type:`accent`,mode:this.mode,loc:Il.range(e),label:u,isStretchy:!1,isShifty:!0,base:a}}return a}};Qu.endOfExpression=new Set([`}`,`\\endgroup`,`\\end`,`\\right`,`&`]);var $u=function(e,t){if(!(typeof e==`string`||e instanceof String))throw TypeError(`KaTeX can only parse string typed expression`);var n=new Qu(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 j(`\\tag works only in display equations`);r=[{type:`tag`,mode:`text`,body:r,tag:n.subparse([new Ll(`\\df@tag`)])}]}return r},ed=function(e,t,n){t.textContent=``;var r=id(e,n).toNode();t.appendChild(r)};typeof document<`u`&&document.compatMode!==`CSS1Compat`&&(typeof console<`u`&&console.warn(`Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype.`),ed=function(){throw new j(`KaTeX doesn't work in quirks mode.`)});var td=function(e,t){return id(e,t).toMarkup()},nd=function(e,t){return $u(e,new va(t))},rd=function(e,t,n){if(n.throwOnError||!(e instanceof j))throw e;var r=W([`katex-error`],[new ho(t)]);return r.setAttribute(`title`,e.toString()),r.setAttribute(`style`,`color:`+n.errorColor),r},id=function(e,t){var n=new va(t);try{return Sc($u(e,n),e,n)}catch(t){return rd(t,e,n)}},ad={version:`0.17.0`,render:ed,renderToString:td,ParseError:j,SETTINGS_SCHEMA:ma,__parse:nd,__renderToDomTree:id,__renderToHTMLTree:function(e,t){var n=new va(t);try{return Cc($u(e,n),e,n)}catch(t){return rd(t,e,n)}},__setFontMetrics:To,__defineSymbol:P,__defineFunction:K,__defineMacro:Z,__domTree:{Span:uo,Anchor:fo,SymbolNode:ho,SvgNode:go,PathNode:_o,LineNode:vo}};ad.__defineMacro(`\\ce`,function(e){return od(e.consumeArgs(1)[0],`ce`)}),ad.__defineMacro(`\\pu`,function(e){return od(e.consumeArgs(1)[0],`pu`)}),ad.__defineMacro(`\\tripledash`,`{\\vphantom{-}\\raisebox{2.56mu}{$\\mkern2mu\\tiny\\text{-}\\mkern1mu\\text{-}\\mkern1mu\\text{-}\\mkern2mu$}}`);var od=function(e,t){for(var n=``,r=e.length&&e[e.length-1].loc.start,i=e.length-1;i>=0;i--)e[i].loc.start>r&&(n+=` `,r=e[i].loc.start),n+=e[i].text,r+=e[i].text.length;return $.go(Q.go(n,t))},Q={go:function(e,t){if(!e)return[];t===void 0&&(t=`ce`);var n=`0`,r={};r.parenthesisLevel=0,e=e.replace(/\n/g,` `),e=e.replace(/[\u2212\u2013\u2014\u2010]/g,`-`),e=e.replace(/[\u2026]/g,`...`);for(var i,a=10,o=[];;){i===e?a--:(a=10,i=e);var s=Q.stateMachines[t],c=s.transitions[n]||s.transitions[`*`];iterateTransitions:for(var l=0;l<c.length;l++){var u=Q.patterns.match_(c[l].pattern,e);if(u){for(var d=c[l].task,f=0;f<d.action_.length;f++){var p;if(s.actions[d.action_[f].type_])p=s.actions[d.action_[f].type_](r,u.match_,d.action_[f].option);else if(Q.actions[d.action_[f].type_])p=Q.actions[d.action_[f].type_](r,u.match_,d.action_[f].option);else throw[`MhchemBugA`,`mhchem bug A. Please report. (`+d.action_[f].type_+`)`];Q.concatArray(o,p)}if(n=d.nextState||n,e.length>0){if(d.revisit||(e=u.remainder),!d.toContinue)break iterateTransitions}else return o}}if(a<=0)throw[`MhchemBugU`,`mhchem bug U. Please report.`]}},concatArray:function(e,t){if(t)if(Array.isArray(t))for(var n=0;n<t.length;n++)e.push(t[n]);else e.push(t)},patterns:{patterns:{empty:/^$/,else:/^./,else2:/^./,space:/^\s/,"space A":/^\s(?=[A-Z\\$])/,space$:/^\s$/,"a-z":/^[a-z]/,x:/^x/,x$:/^x$/,i$:/^i$/,letters:/^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,"\\greek":/^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,"one lowercase latin letter $":/^(?:([a-z])(?:$|[^a-zA-Z]))$/,"$one lowercase latin letter$ $":/^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,"one lowercase greek letter $":/^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,digits:/^[0-9]+/,"-9.,9":/^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,"-9.,9 no missing 0":/^[+\-]?[0-9]+(?:[.,][0-9]+)?/,"(-)(9.,9)(e)(99)":function(e){var t=e.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))?(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))\))?(?:([eE]|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);return t&&t[0]?{match_:t.splice(1),remainder:e.substr(t[0].length)}:null},"(-)(9)^(-9)":function(e){var t=e.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/);return t&&t[0]?{match_:t.splice(1),remainder:e.substr(t[0].length)}:null},"state of aggregation $":function(e){var t=Q.patterns.findObserveGroups(e,``,/^\([a-z]{1,3}(?=[\),])/,`)`,``);if(t&&t.remainder.match(/^($|[\s,;\)\]\}])/))return t;var n=e.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return n?{match_:n[0],remainder:e.substr(n[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". ":/^([.\u22C5\u00B7\u2022])\s*/,"...":/^\.\.\.(?=$|[^.])/,"* ":/^([*])\s*/,"^{(...)}":function(e){return Q.patterns.findObserveGroups(e,`^{`,``,``,`}`)},"^($...$)":function(e){return Q.patterns.findObserveGroups(e,`^`,`$`,`$`,``)},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(e){return Q.patterns.findObserveGroups(e,`^`,/^\\[a-zA-Z]+\{/,`}`,``,``,`{`,`}`,``,!0)},"^\\x{}":function(e){return Q.patterns.findObserveGroups(e,`^`,/^\\[a-zA-Z]+\{/,`}`,``)},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(e){return Q.patterns.findObserveGroups(e,`_{`,``,``,`}`)},"_($...$)":function(e){return Q.patterns.findObserveGroups(e,`_`,`$`,`$`,``)},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(e){return Q.patterns.findObserveGroups(e,`_`,/^\\[a-zA-Z]+\{/,`}`,``,``,`{`,`}`,``,!0)},"_\\x{}":function(e){return Q.patterns.findObserveGroups(e,`_`,/^\\[a-zA-Z]+\{/,`}`,``)},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(e){return Q.patterns.findObserveGroups(e,``,`{`,`}`,``)},"{(...)}":function(e){return Q.patterns.findObserveGroups(e,`{`,``,``,`}`)},"$...$":function(e){return Q.patterns.findObserveGroups(e,``,`$`,`$`,``)},"${(...)}$":function(e){return Q.patterns.findObserveGroups(e,"${",``,``,`}$`)},"$(...)$":function(e){return Q.patterns.findObserveGroups(e,`$`,``,``,`$`)},"=<>":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(e){return Q.patterns.findObserveGroups(e,`\\bond{`,``,``,`}`)},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(e){return Q.patterns.findObserveGroups(e,`[`,``,``,`]`)},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(e){return Q.patterns.findObserveGroups(e,``,/^\\[a-zA-Z]+\{/,`}`,``,``,`{`,`}`,``,!0)},"\\x{}":function(e){return Q.patterns.findObserveGroups(e,``,/^\\[a-zA-Z]+\{/,`}`,``)},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(e){return Q.patterns.findObserveGroups(e,`\\frac{`,``,``,`}`,`{`,``,``,`}`)},"\\overset{(...)}":function(e){return Q.patterns.findObserveGroups(e,`\\overset{`,``,``,`}`,`{`,``,``,`}`)},"\\underset{(...)}":function(e){return Q.patterns.findObserveGroups(e,`\\underset{`,``,``,`}`,`{`,``,``,`}`)},"\\underbrace{(...)}":function(e){return Q.patterns.findObserveGroups(e,`\\underbrace{`,``,``,`}_`,`{`,``,``,`}`)},"\\color{(...)}0":function(e){return Q.patterns.findObserveGroups(e,`\\color{`,``,``,`}`)},"\\color{(...)}{(...)}1":function(e){return Q.patterns.findObserveGroups(e,`\\color{`,``,``,`}`,`{`,``,``,`}`)},"\\color(...){(...)}2":function(e){return Q.patterns.findObserveGroups(e,`\\color`,`\\`,``,/^(?=\{)/,`{`,``,``,`}`)},"\\ce{(...)}":function(e){return Q.patterns.findObserveGroups(e,`\\ce{`,``,``,`}`)},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(e){var t=e.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/);if(t)return{match_:t[0],remainder:e.substr(t[0].length)};var n=Q.patterns.findObserveGroups(e,``,`$`,`$`,``);return n&&(t=n.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/),t)?{match_:t[0],remainder:e.substr(t[0].length)}:null},amount2:function(e){return this.amount(e)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(e){if(e.match(/^\([a-z]+\)$/))return null;var t=e.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return t?{match_:t[0],remainder:e.substr(t[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(e,t,n,r,i,a,o,s,c,l){var u=function(e,t){if(typeof t==`string`)return e.indexOf(t)===0?t:null;var n=e.match(t);return n?n[0]:null},d=function(e,t,n){for(var r=0;t<e.length;){var i=e.charAt(t),a=u(e.substr(t),n);if(a!==null&&r===0)return{endMatchBegin:t,endMatchEnd:t+a.length};if(i===`{`)r++;else if(i===`}`){if(r===0)throw[`ExtraCloseMissingOpen`,`Extra close brace or missing open brace`];r--}t++}return null},f=u(e,t);if(f===null||(e=e.substr(f.length),f=u(e,n),f===null))return null;var p=d(e,f.length,r||i);if(p===null)return null;var m=e.substring(0,r?p.endMatchEnd:p.endMatchBegin);if(a||o){var h=this.findObserveGroups(e.substr(p.endMatchEnd),a,o,s,c);if(h===null)return null;var g=[m,h.match_];return{match_:l?g.join(``):g,remainder:h.remainder}}else return{match_:m,remainder:e.substr(p.endMatchEnd)}},match_:function(e,t){var n=Q.patterns.patterns[e];if(n===void 0)throw[`MhchemBugP`,`mhchem bug P. Please report. (`+e+`)`];if(typeof n==`function`)return Q.patterns.patterns[e](t);var r=t.match(n);return r?{match_:r[2]?[r[1],r[2]]:r[1]?r[1]:r[0],remainder:t.substr(r[0].length)}:null}},actions:{"a=":function(e,t){e.a=(e.a||``)+t},"b=":function(e,t){e.b=(e.b||``)+t},"p=":function(e,t){e.p=(e.p||``)+t},"o=":function(e,t){e.o=(e.o||``)+t},"q=":function(e,t){e.q=(e.q||``)+t},"d=":function(e,t){e.d=(e.d||``)+t},"rm=":function(e,t){e.rm=(e.rm||``)+t},"text=":function(e,t){e.text_=(e.text_||``)+t},insert:function(e,t,n){return{type_:n}},"insert+p1":function(e,t,n){return{type_:n,p1:t}},"insert+p1+p2":function(e,t,n){return{type_:n,p1:t[0],p2:t[1]}},copy:function(e,t){return t},rm:function(e,t){return{type_:`rm`,p1:t||``}},text:function(e,t){return Q.go(t,`text`)},"{text}":function(e,t){var n=[`{`];return Q.concatArray(n,Q.go(t,`text`)),n.push(`}`),n},"tex-math":function(e,t){return Q.go(t,`tex-math`)},"tex-math tight":function(e,t){return Q.go(t,`tex-math tight`)},bond:function(e,t,n){return{type_:`bond`,kind_:n||t}},"color0-output":function(e,t){return{type_:`color0`,color:t[0]}},ce:function(e,t){return Q.go(t)},"1/2":function(e,t){var n=[];t.match(/^[+\-]/)&&(n.push(t.substr(0,1)),t=t.substr(1));var r=t.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);return r[1]=r[1].replace(/\$/g,``),n.push({type_:`frac`,p1:r[1],p2:r[2]}),r[3]&&(r[3]=r[3].replace(/\$/g,``),n.push({type_:`tex-math`,p1:r[3]})),n},"9,9":function(e,t){return Q.go(t,`9,9`)}},createTransitions:function(e){var t,n,r,i,a={};for(t in e)for(n in e[t])for(r=n.split(`|`),e[t][n].stateArray=r,i=0;i<r.length;i++)a[r[i]]=[];for(t in e)for(n in e[t])for(r=e[t][n].stateArray||[],i=0;i<r.length;i++){var o=e[t][n];if(o.action_){o.action_=[].concat(o.action_);for(var s=0;s<o.action_.length;s++)typeof o.action_[s]==`string`&&(o.action_[s]={type_:o.action_[s]})}else o.action_=[];for(var c=t.split(`|`),l=0;l<c.length;l++)if(r[i]===`*`)for(var u in a)a[u].push({pattern:c[l],task:o});else a[r[i]].push({pattern:c[l],task:o})}return a},stateMachines:{}};Q.stateMachines={ce:{transitions:Q.createTransitions({empty:{"*":{action_:`output`}},else:{"0|1|2":{action_:`beginsWithBond=false`,revisit:!0,toContinue:!0}},oxidation$:{0:{action_:`oxidation-output`}},CMT:{r:{action_:`rdt=`,nextState:`rt`},rd:{action_:`rqt=`,nextState:`rdt`}},arrowUpDown:{"0|1|2|as":{action_:[`sb=false`,`output`,`operator`],nextState:`1`}},uprightEntities:{"0|1|2":{action_:[`o=`,`output`],nextState:`1`}},orbital:{"0|1|2|3":{action_:`o=`,nextState:`o`}},"->":{"0|1|2|3":{action_:`r=`,nextState:`r`},"a|as":{action_:[`output`,`r=`],nextState:`r`},"*":{action_:[`output`,`r=`],nextState:`r`}},"+":{o:{action_:`d= kv`,nextState:`d`},"d|D":{action_:`d=`,nextState:`d`},q:{action_:`d=`,nextState:`qd`},"qd|qD":{action_:`d=`,nextState:`qd`},dq:{action_:[`output`,`d=`],nextState:`d`},3:{action_:[`sb=false`,`output`,`operator`],nextState:`0`}},amount:{"0|2":{action_:`a=`,nextState:`a`}},"pm-operator":{"0|1|2|a|as":{action_:[`sb=false`,`output`,{type_:`operator`,option:`\\pm`}],nextState:`0`}},operator:{"0|1|2|a|as":{action_:[`sb=false`,`output`,`operator`],nextState:`0`}},"-$":{"o|q":{action_:[`charge or bond`,`output`],nextState:`qd`},d:{action_:`d=`,nextState:`d`},D:{action_:[`output`,{type_:`bond`,option:`-`}],nextState:`3`},q:{action_:`d=`,nextState:`qd`},qd:{action_:`d=`,nextState:`qd`},"qD|dq":{action_:[`output`,{type_:`bond`,option:`-`}],nextState:`3`}},"-9":{"3|o":{action_:[`output`,{type_:`insert`,option:`hyphen`}],nextState:`3`}},"- orbital overlap":{o:{action_:[`output`,{type_:`insert`,option:`hyphen`}],nextState:`2`},d:{action_:[`output`,{type_:`insert`,option:`hyphen`}],nextState:`2`}},"-":{"0|1|2":{action_:[{type_:`output`,option:1},`beginsWithBond=true`,{type_:`bond`,option:`-`}],nextState:`3`},3:{action_:{type_:`bond`,option:`-`}},a:{action_:[`output`,{type_:`insert`,option:`hyphen`}],nextState:`2`},as:{action_:[{type_:`output`,option:2},{type_:`bond`,option:`-`}],nextState:`3`},b:{action_:`b=`},o:{action_:{type_:`- after o/d`,option:!1},nextState:`2`},q:{action_:{type_:`- after o/d`,option:!1},nextState:`2`},"d|qd|dq":{action_:{type_:`- after o/d`,option:!0},nextState:`2`},"D|qD|p":{action_:[`output`,{type_:`bond`,option:`-`}],nextState:`3`}},amount2:{"1|3":{action_:`a=`,nextState:`a`}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:`o=`,nextState:`o`},"q|dq":{action_:[`output`,`o=`],nextState:`o`},"d|D|qd|qD":{action_:`o after d`,nextState:`o`}},digits:{o:{action_:`q=`,nextState:`q`},"d|D":{action_:`q=`,nextState:`dq`},q:{action_:[`output`,`o=`],nextState:`o`},a:{action_:`o=`,nextState:`o`}},"space A":{"b|p|bp":{}},space:{a:{nextState:`as`},0:{action_:`sb=false`},"1|2":{action_:`sb=true`},"r|rt|rd|rdt|rdq":{action_:`output`,nextState:`0`},"*":{action_:[`output`,`sb=true`],nextState:`1`}},"1st-level escape":{"1|2":{action_:[`output`,{type_:`insert+p1`,option:`1st-level escape`}]},"*":{action_:[`output`,{type_:`insert+p1`,option:`1st-level escape`}],nextState:`0`}},"[(...)]":{"r|rt":{action_:`rd=`,nextState:`rd`},"rd|rdt":{action_:`rq=`,nextState:`rdq`}},"...":{"o|d|D|dq|qd|qD":{action_:[`output`,{type_:`bond`,option:`...`}],nextState:`3`},"*":{action_:[{type_:`output`,option:1},{type_:`insert`,option:`ellipsis`}],nextState:`1`}},". |* ":{"*":{action_:[`output`,{type_:`insert`,option:`addition compound`}],nextState:`1`}},"state of aggregation $":{"*":{action_:[`output`,`state of aggregation`],nextState:`1`}},"{[(":{"a|as|o":{action_:[`o=`,`output`,`parenthesisLevel++`],nextState:`2`},"0|1|2|3":{action_:[`o=`,`output`,`parenthesisLevel++`],nextState:`2`},"*":{action_:[`output`,`o=`,`output`,`parenthesisLevel++`],nextState:`2`}},")]}":{"0|1|2|3|b|p|bp|o":{action_:[`o=`,`parenthesisLevel--`],nextState:`o`},"a|as|d|D|q|qd|qD|dq":{action_:[`output`,`o=`,`parenthesisLevel--`],nextState:`o`}},", ":{"*":{action_:[`output`,`comma`],nextState:`0`}},"^_":{"*":{}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:`b=`,nextState:`b`},p:{action_:`b=`,nextState:`bp`},"3|o":{action_:`d= kv`,nextState:`D`},q:{action_:`d=`,nextState:`qD`},"d|D|qd|qD|dq":{action_:[`output`,`d=`],nextState:`D`}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:`b=`,nextState:`b`},p:{action_:`b=`,nextState:`bp`},"3|o":{action_:`d= kv`,nextState:`d`},q:{action_:`d=`,nextState:`qd`},"d|qd|D|qD":{action_:`d=`},dq:{action_:[`output`,`d=`],nextState:`d`}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:[`output`,`q=`],nextState:`q`}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:`p=`,nextState:`p`},b:{action_:`p=`,nextState:`bp`},"3|o":{action_:`q=`,nextState:`q`},"d|D":{action_:`q=`,nextState:`dq`},"q|qd|qD|dq":{action_:[`output`,`q=`],nextState:`q`}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:`output`,option:2},`bond`],nextState:`3`}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:`output`,option:2},{type_:`bond`,option:`#`}],nextState:`3`}},"{}":{"*":{action_:{type_:`output`,option:1},nextState:`1`}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:`o=`,nextState:`o`},"o|d|D|q|qd|qD|dq":{action_:[`output`,`o=`],nextState:`o`}},"$...$":{a:{action_:`a=`},"0|1|2|3|as|b|p|bp|o":{action_:`o=`,nextState:`o`},"as|o":{action_:`o=`},"q|d|D|qd|qD|dq":{action_:[`output`,`o=`],nextState:`o`}},"\\bond{(...)}":{"*":{action_:[{type_:`output`,option:2},`bond`],nextState:`3`}},"\\frac{(...)}":{"*":{action_:[{type_:`output`,option:1},`frac-output`],nextState:`3`}},"\\overset{(...)}":{"*":{action_:[{type_:`output`,option:2},`overset-output`],nextState:`3`}},"\\underset{(...)}":{"*":{action_:[{type_:`output`,option:2},`underset-output`],nextState:`3`}},"\\underbrace{(...)}":{"*":{action_:[{type_:`output`,option:2},`underbrace-output`],nextState:`3`}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:`output`,option:2},`color-output`],nextState:`3`}},"\\color{(...)}0":{"*":{action_:[{type_:`output`,option:2},`color0-output`]}},"\\ce{(...)}":{"*":{action_:[{type_:`output`,option:2},`ce`],nextState:`3`}},"\\,":{"*":{action_:[{type_:`output`,option:1},`copy`],nextState:`1`}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:[`o=`,`output`],nextState:`3`},"*":{action_:[`output`,`o=`,`output`],nextState:`3`}},others:{"*":{action_:[{type_:`output`,option:1},`copy`],nextState:`3`}},else2:{a:{action_:`a to o`,nextState:`o`,revisit:!0},as:{action_:[`output`,`sb=true`],nextState:`1`,revisit:!0},"r|rt|rd|rdt|rdq":{action_:[`output`],nextState:`0`,revisit:!0},"*":{action_:[`output`,`copy`],nextState:`3`}}}),actions:{"o after d":function(e,t){var n;if((e.d||``).match(/^[0-9]+$/)){var r=e.d;e.d=void 0,n=this.output(e),e.b=r}else n=this.output(e);return Q.actions[`o=`](e,t),n},"d= kv":function(e,t){e.d=t,e.dType=`kv`},"charge or bond":function(e,t){if(e.beginsWithBond){var n=[];return Q.concatArray(n,this.output(e)),Q.concatArray(n,Q.actions.bond(e,t,`-`)),n}else e.d=t},"- after o/d":function(e,t,n){var r=Q.patterns.match_(`orbital`,e.o||``),i=Q.patterns.match_(`one lowercase greek letter $`,e.o||``),a=Q.patterns.match_(`one lowercase latin letter $`,e.o||``),o=Q.patterns.match_(`$one lowercase latin letter$ $`,e.o||``),s=t===`-`&&(r&&r.remainder===``||i||a||o);s&&!e.a&&!e.b&&!e.p&&!e.d&&!e.q&&!r&&a&&(e.o=`$`+e.o+`$`);var c=[];return s?(Q.concatArray(c,this.output(e)),c.push({type_:`hyphen`})):(r=Q.patterns.match_(`digits`,e.d||``),n&&r&&r.remainder===``?(Q.concatArray(c,Q.actions[`d=`](e,t)),Q.concatArray(c,this.output(e))):(Q.concatArray(c,this.output(e)),Q.concatArray(c,Q.actions.bond(e,t,`-`)))),c},"a to o":function(e){e.o=e.a,e.a=void 0},"sb=true":function(e){e.sb=!0},"sb=false":function(e){e.sb=!1},"beginsWithBond=true":function(e){e.beginsWithBond=!0},"beginsWithBond=false":function(e){e.beginsWithBond=!1},"parenthesisLevel++":function(e){e.parenthesisLevel++},"parenthesisLevel--":function(e){e.parenthesisLevel--},"state of aggregation":function(e,t){return{type_:`state of aggregation`,p1:Q.go(t,`o`)}},comma:function(e,t){var n=t.replace(/\s*$/,``);return n!==t&&e.parenthesisLevel===0?{type_:`comma enumeration L`,p1:n}:{type_:`comma enumeration M`,p1:n}},output:function(e,t,n){var r;if(!e.r)r=[],!e.a&&!e.b&&!e.p&&!e.o&&!e.q&&!e.d&&!n||(e.sb&&r.push({type_:`entitySkip`}),!e.o&&!e.q&&!e.d&&!e.b&&!e.p&&n!==2?(e.o=e.a,e.a=void 0):!e.o&&!e.q&&!e.d&&(e.b||e.p)?(e.o=e.a,e.d=e.b,e.q=e.p,e.a=e.b=e.p=void 0):e.o&&e.dType===`kv`&&Q.patterns.match_(`d-oxidation$`,e.d||``)?e.dType=`oxidation`:e.o&&e.dType===`kv`&&!e.q&&(e.dType=void 0),r.push({type_:`chemfive`,a:Q.go(e.a,`a`),b:Q.go(e.b,`bd`),p:Q.go(e.p,`pq`),o:Q.go(e.o,`o`),q:Q.go(e.q,`pq`),d:Q.go(e.d,e.dType===`oxidation`?`oxidation`:`bd`),dType:e.dType}));else{var i=e.rdt===`M`?Q.go(e.rd,`tex-math`):e.rdt===`T`?[{type_:`text`,p1:e.rd||``}]:Q.go(e.rd),a=e.rqt===`M`?Q.go(e.rq,`tex-math`):e.rqt===`T`?[{type_:`text`,p1:e.rq||``}]:Q.go(e.rq);r={type_:`arrow`,r:e.r,rd:i,rq:a}}for(var o in e)o!==`parenthesisLevel`&&o!==`beginsWithBond`&&delete e[o];return r},"oxidation-output":function(e,t){var n=[`{`];return Q.concatArray(n,Q.go(t,`oxidation`)),n.push(`}`),n},"frac-output":function(e,t){return{type_:`frac-ce`,p1:Q.go(t[0]),p2:Q.go(t[1])}},"overset-output":function(e,t){return{type_:`overset`,p1:Q.go(t[0]),p2:Q.go(t[1])}},"underset-output":function(e,t){return{type_:`underset`,p1:Q.go(t[0]),p2:Q.go(t[1])}},"underbrace-output":function(e,t){return{type_:`underbrace`,p1:Q.go(t[0]),p2:Q.go(t[1])}},"color-output":function(e,t){return{type_:`color`,color1:t[0],color2:Q.go(t[1])}},"r=":function(e,t){e.r=t},"rdt=":function(e,t){e.rdt=t},"rd=":function(e,t){e.rd=t},"rqt=":function(e,t){e.rqt=t},"rq=":function(e,t){e.rq=t},operator:function(e,t,n){return{type_:`operator`,kind_:n||t}}}},a:{transitions:Q.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:`1/2`}},else:{0:{nextState:`1`,revisit:!0}},"$(...)$":{"*":{action_:`tex-math tight`,nextState:`1`}},",":{"*":{action_:{type_:`insert`,option:`commaDecimal`}}},else2:{"*":{action_:`copy`}}}),actions:{}},o:{transitions:Q.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:`1/2`}},else:{0:{nextState:`1`,revisit:!0}},letters:{"*":{action_:`rm`}},"\\ca":{"*":{action_:{type_:`insert`,option:`circa`}}},"\\x{}{}|\\x{}|\\x":{"*":{action_:`copy`}},"${(...)}$|$(...)$":{"*":{action_:`tex-math`}},"{(...)}":{"*":{action_:`{text}`}},else2:{"*":{action_:`copy`}}}),actions:{}},text:{transitions:Q.createTransitions({empty:{"*":{action_:`output`}},"{...}":{"*":{action_:`text=`}},"${(...)}$|$(...)$":{"*":{action_:`tex-math`}},"\\greek":{"*":{action_:[`output`,`rm`]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:[`output`,`copy`]}},else:{"*":{action_:`text=`}}}),actions:{output:function(e){if(e.text_){var t={type_:`text`,p1:e.text_};for(var n in e)delete e[n];return t}}}},pq:{transitions:Q.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:`state of aggregation`}},i$:{0:{nextState:`!f`,revisit:!0}},"(KV letters),":{0:{action_:`rm`,nextState:`0`}},formula$:{0:{nextState:`f`,revisit:!0}},"1/2$":{0:{action_:`1/2`}},else:{0:{nextState:`!f`,revisit:!0}},"${(...)}$|$(...)$":{"*":{action_:`tex-math`}},"{(...)}":{"*":{action_:`text`}},"a-z":{f:{action_:`tex-math`}},letters:{"*":{action_:`rm`}},"-9.,9":{"*":{action_:`9,9`}},",":{"*":{action_:{type_:`insert+p1`,option:`comma enumeration S`}}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:`color-output`}},"\\color{(...)}0":{"*":{action_:`color0-output`}},"\\ce{(...)}":{"*":{action_:`ce`}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:`copy`}},else2:{"*":{action_:`copy`}}}),actions:{"state of aggregation":function(e,t){return{type_:`state of aggregation subscript`,p1:Q.go(t,`o`)}},"color-output":function(e,t){return{type_:`color`,color1:t[0],color2:Q.go(t[1],`pq`)}}}},bd:{transitions:Q.createTransitions({empty:{"*":{}},x$:{0:{nextState:`!f`,revisit:!0}},formula$:{0:{nextState:`f`,revisit:!0}},else:{0:{nextState:`!f`,revisit:!0}},"-9.,9 no missing 0":{"*":{action_:`9,9`}},".":{"*":{action_:{type_:`insert`,option:`electron dot`}}},"a-z":{f:{action_:`tex-math`}},x:{"*":{action_:{type_:`insert`,option:`KV x`}}},letters:{"*":{action_:`rm`}},"'":{"*":{action_:{type_:`insert`,option:`prime`}}},"${(...)}$|$(...)$":{"*":{action_:`tex-math`}},"{(...)}":{"*":{action_:`text`}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:`color-output`}},"\\color{(...)}0":{"*":{action_:`color0-output`}},"\\ce{(...)}":{"*":{action_:`ce`}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:`copy`}},else2:{"*":{action_:`copy`}}}),actions:{"color-output":function(e,t){return{type_:`color`,color1:t[0],color2:Q.go(t[1],`bd`)}}}},oxidation:{transitions:Q.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:`roman-numeral`}},"${(...)}$|$(...)$":{"*":{action_:`tex-math`}},else:{"*":{action_:`copy`}}}),actions:{"roman-numeral":function(e,t){return{type_:`roman numeral`,p1:t||``}}}},"tex-math":{transitions:Q.createTransitions({empty:{"*":{action_:`output`}},"\\ce{(...)}":{"*":{action_:[`output`,`ce`]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:`o=`}},else:{"*":{action_:`o=`}}}),actions:{output:function(e){if(e.o){var t={type_:`tex-math`,p1:e.o};for(var n in e)delete e[n];return t}}}},"tex-math tight":{transitions:Q.createTransitions({empty:{"*":{action_:`output`}},"\\ce{(...)}":{"*":{action_:[`output`,`ce`]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:`o=`}},"-|+":{"*":{action_:`tight operator`}},else:{"*":{action_:`o=`}}}),actions:{"tight operator":function(e,t){e.o=(e.o||``)+`{`+t+`}`},output:function(e){if(e.o){var t={type_:`tex-math`,p1:e.o};for(var n in e)delete e[n];return t}}}},"9,9":{transitions:Q.createTransitions({empty:{"*":{}},",":{"*":{action_:`comma`}},else:{"*":{action_:`copy`}}}),actions:{comma:function(){return{type_:`commaDecimal`}}}},pu:{transitions:Q.createTransitions({empty:{"*":{action_:`output`}},space$:{"*":{action_:[`output`,`space`]}},"{[(|)]}":{"0|a":{action_:`copy`}},"(-)(9)^(-9)":{0:{action_:`number^`,nextState:`a`}},"(-)(9.,9)(e)(99)":{0:{action_:`enumber`,nextState:`a`}},space:{"0|a":{}},"pm-operator":{"0|a":{action_:{type_:`operator`,option:`\\pm`},nextState:`0`}},operator:{"0|a":{action_:`copy`,nextState:`0`}},"//":{d:{action_:`o=`,nextState:`/`}},"/":{d:{action_:`o=`,nextState:`/`}},"{...}|else":{"0|d":{action_:`d=`,nextState:`d`},a:{action_:[`space`,`d=`],nextState:`d`},"/|q":{action_:`q=`,nextState:`q`}}}),actions:{enumber:function(e,t){var n=[];return t[0]===`+-`||t[0]===`+/-`?n.push(`\\pm `):t[0]&&n.push(t[0]),t[1]&&(Q.concatArray(n,Q.go(t[1],`pu-9,9`)),t[2]&&(t[2].match(/[,.]/)?Q.concatArray(n,Q.go(t[2],`pu-9,9`)):n.push(t[2])),t[3]=t[4]||t[3],t[3]&&(t[3]=t[3].trim(),t[3]===`e`||t[3].substr(0,1)===`*`?n.push({type_:`cdot`}):n.push({type_:`times`}))),t[3]&&n.push(`10^{`+t[5]+`}`),n},"number^":function(e,t){var n=[];return t[0]===`+-`||t[0]===`+/-`?n.push(`\\pm `):t[0]&&n.push(t[0]),Q.concatArray(n,Q.go(t[1],`pu-9,9`)),n.push(`^{`+t[2]+`}`),n},operator:function(e,t,n){return{type_:`operator`,kind_:n||t}},space:function(){return{type_:`pu-space-1`}},output:function(e){var t,n=Q.patterns.match_(`{(...)}`,e.d||``);n&&n.remainder===``&&(e.d=n.match_);var r=Q.patterns.match_(`{(...)}`,e.q||``);if(r&&r.remainder===``&&(e.q=r.match_),e.d&&=(e.d=e.d.replace(/\u00B0C|\^oC|\^{o}C/g,`{}^{\\circ}C`),e.d.replace(/\u00B0F|\^oF|\^{o}F/g,`{}^{\\circ}F`)),e.q){e.q=e.q.replace(/\u00B0C|\^oC|\^{o}C/g,`{}^{\\circ}C`),e.q=e.q.replace(/\u00B0F|\^oF|\^{o}F/g,`{}^{\\circ}F`);var i={d:Q.go(e.d,`pu`),q:Q.go(e.q,`pu`)};e.o===`//`?t={type_:`pu-frac`,p1:i.d,p2:i.q}:(t=i.d,i.d.length>1||i.q.length>1?t.push({type_:` / `}):t.push({type_:`/`}),Q.concatArray(t,i.q))}else t=Q.go(e.d,`pu-2`);for(var a in e)delete e[a];return t}}},"pu-2":{transitions:Q.createTransitions({empty:{"*":{action_:`output`}},"*":{"*":{action_:[`output`,`cdot`],nextState:`0`}},"\\x":{"*":{action_:`rm=`}},space:{"*":{action_:[`output`,`space`],nextState:`0`}},"^{(...)}|^(-1)":{1:{action_:`^(-1)`}},"-9.,9":{0:{action_:`rm=`,nextState:`0`},1:{action_:`^(-1)`,nextState:`0`}},"{...}|else":{"*":{action_:`rm=`,nextState:`1`}}}),actions:{cdot:function(){return{type_:`tight cdot`}},"^(-1)":function(e,t){e.rm+=`^{`+t+`}`},space:function(){return{type_:`pu-space-2`}},output:function(e){var t=[];if(e.rm){var n=Q.patterns.match_(`{(...)}`,e.rm||``);t=n&&n.remainder===``?Q.go(n.match_,`pu`):{type_:`rm`,p1:e.rm}}for(var r in e)delete e[r];return t}}},"pu-9,9":{transitions:Q.createTransitions({empty:{0:{action_:`output-0`},o:{action_:`output-o`}},",":{0:{action_:[`output-0`,`comma`],nextState:`o`}},".":{0:{action_:[`output-0`,`copy`],nextState:`o`}},else:{"*":{action_:`text=`}}}),actions:{comma:function(){return{type_:`commaDecimal`}},"output-0":function(e){var t=[];if(e.text_=e.text_||``,e.text_.length>4){var n=e.text_.length%3;n===0&&(n=3);for(var r=e.text_.length-3;r>0;r-=3)t.push(e.text_.substr(r,3)),t.push({type_:`1000 separator`});t.push(e.text_.substr(0,n)),t.reverse()}else t.push(e.text_);for(var i in e)delete e[i];return t},"output-o":function(e){var t=[];if(e.text_=e.text_||``,e.text_.length>4){for(var n=e.text_.length-3,r=0;r<n;r+=3)t.push(e.text_.substr(r,3)),t.push({type_:`1000 separator`});t.push(e.text_.substr(r))}else t.push(e.text_);for(var i in e)delete e[i];return t}}}};var $={go:function(e,t){if(!e)return``;for(var n=``,r=!1,i=0;i<e.length;i++){var a=e[i];typeof a==`string`?n+=a:(n+=$._go2(a),a.type_===`1st-level escape`&&(r=!0))}return!t&&!r&&n&&(n=`{`+n+`}`),n},_goInner:function(e){return e&&$.go(e,!0)},_go2:function(e){var t;switch(e.type_){case`chemfive`:t=``;var n={a:$._goInner(e.a),b:$._goInner(e.b),p:$._goInner(e.p),o:$._goInner(e.o),q:$._goInner(e.q),d:$._goInner(e.d)};n.a&&(n.a.match(/^[+\-]/)&&(n.a=`{`+n.a+`}`),t+=n.a+`\\,`),(n.b||n.p)&&(t+=`{\\vphantom{X}}`,t+=`^{\\hphantom{`+(n.b||``)+`}}_{\\hphantom{`+(n.p||``)+`}}`,t+=`{\\vphantom{X}}`,t+=`^{\\smash[t]{\\vphantom{2}}\\mathllap{`+(n.b||``)+`}}`,t+=`_{\\vphantom{2}\\mathllap{\\smash[t]{`+(n.p||``)+`}}}`),n.o&&(n.o.match(/^[+\-]/)&&(n.o=`{`+n.o+`}`),t+=n.o),e.dType===`kv`?((n.d||n.q)&&(t+=`{\\vphantom{X}}`),n.d&&(t+=`^{`+n.d+`}`),n.q&&(t+=`_{\\smash[t]{`+n.q+`}}`)):e.dType===`oxidation`?(n.d&&(t+=`{\\vphantom{X}}`,t+=`^{`+n.d+`}`),n.q&&(t+=`{\\vphantom{X}}`,t+=`_{\\smash[t]{`+n.q+`}}`)):(n.q&&(t+=`{\\vphantom{X}}`,t+=`_{\\smash[t]{`+n.q+`}}`),n.d&&(t+=`{\\vphantom{X}}`,t+=`^{`+n.d+`}`));break;case`rm`:t=`\\mathrm{`+e.p1+`}`;break;case`text`:e.p1.match(/[\^_]/)?(e.p1=e.p1.replace(` `,`~`).replace(`-`,`\\text{-}`),t=`\\mathrm{`+e.p1+`}`):t=`\\text{`+e.p1+`}`;break;case`roman numeral`:t=`\\mathrm{`+e.p1+`}`;break;case`state of aggregation`:t=`\\mskip2mu `+$._goInner(e.p1);break;case`state of aggregation subscript`:t=`\\mskip1mu `+$._goInner(e.p1);break;case`bond`:if(t=$._getBond(e.kind_),!t)throw[`MhchemErrorBond`,`mhchem Error. Unknown bond type (`+e.kind_+`)`];break;case`frac`:var r=`\\frac{`+e.p1+`}{`+e.p2+`}`;t=`\\mathchoice{\\textstyle`+r+`}{`+r+`}{`+r+`}{`+r+`}`;break;case`pu-frac`:var i=`\\frac{`+$._goInner(e.p1)+`}{`+$._goInner(e.p2)+`}`;t=`\\mathchoice{\\textstyle`+i+`}{`+i+`}{`+i+`}{`+i+`}`;break;case`tex-math`:t=e.p1+` `;break;case`frac-ce`:t=`\\frac{`+$._goInner(e.p1)+`}{`+$._goInner(e.p2)+`}`;break;case`overset`:t=`\\overset{`+$._goInner(e.p1)+`}{`+$._goInner(e.p2)+`}`;break;case`underset`:t=`\\underset{`+$._goInner(e.p1)+`}{`+$._goInner(e.p2)+`}`;break;case`underbrace`:t=`\\underbrace{`+$._goInner(e.p1)+`}_{`+$._goInner(e.p2)+`}`;break;case`color`:t=`{\\color{`+e.color1+`}{`+$._goInner(e.color2)+`}}`;break;case`color0`:t=`\\color{`+e.color+`}`;break;case`arrow`:var a={rd:$._goInner(e.rd),rq:$._goInner(e.rq)},o=`\\x`+$._getArrow(e.r);a.rq&&(o+=`[{`+a.rq+`}]`),a.rd?o+=`{`+a.rd+`}`:o+=`{}`,t=o;break;case`operator`:t=$._getOperator(e.kind_);break;case`1st-level escape`:t=e.p1+` `;break;case`space`:t=` `;break;case`entitySkip`:t=`~`;break;case`pu-space-1`:t=`~`;break;case`pu-space-2`:t=`\\mkern3mu `;break;case`1000 separator`:t=`\\mkern2mu `;break;case`commaDecimal`:t=`{,}`;break;case`comma enumeration L`:t=`{`+e.p1+`}\\mkern6mu `;break;case`comma enumeration M`:t=`{`+e.p1+`}\\mkern3mu `;break;case`comma enumeration S`:t=`{`+e.p1+`}\\mkern1mu `;break;case`hyphen`:t=`\\text{-}`;break;case`addition compound`:t=`\\,{\\cdot}\\,`;break;case`electron dot`:t=`\\mkern1mu \\bullet\\mkern1mu `;break;case`KV x`:t=`{\\times}`;break;case`prime`:t=`\\prime `;break;case`cdot`:t=`\\cdot `;break;case`tight cdot`:t=`\\mkern1mu{\\cdot}\\mkern1mu `;break;case`times`:t=`\\times `;break;case`circa`:t=`{\\sim}`;break;case`^`:t=`uparrow`;break;case`v`:t=`downarrow`;break;case`ellipsis`:t=`\\ldots `;break;case`/`:t=`/`;break;case` / `:t=`\\,/\\,`;break;default:throw[`MhchemBugT`,`mhchem bug T. Please report.`]}return t},_getArrow:function(e){switch(e){case`->`:return`rightarrow`;case`→`:return`rightarrow`;case`⟶`:return`rightarrow`;case`<-`:return`leftarrow`;case`<->`:return`leftrightarrow`;case`<-->`:return`rightleftarrows`;case`<=>`:return`rightleftharpoons`;case`⇌`:return`rightleftharpoons`;case`<=>>`:return`rightequilibrium`;case`<<=>`:return`leftequilibrium`;default:throw[`MhchemBugT`,`mhchem bug T. Please report.`]}},_getBond:function(e){switch(e){case`-`:return`{-}`;case`1`:return`{-}`;case`=`:return`{=}`;case`2`:return`{=}`;case`#`:return`{\\equiv}`;case`3`:return`{\\equiv}`;case`~`:return`{\\tripledash}`;case`~-`:return`{\\mathrlap{\\raisebox{-.1em}{$-$}}\\raisebox{.1em}{$\\tripledash$}}`;case`~=`:return`{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$\\tripledash$}}-}`;case`~--`:return`{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$\\tripledash$}}-}`;case`-~-`:return`{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$-$}}\\tripledash}`;case`...`:return`{{\\cdot}{\\cdot}{\\cdot}}`;case`....`:return`{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}`;case`->`:return`{\\rightarrow}`;case`<-`:return`{\\leftarrow}`;case`<`:return`{<}`;case`>`:return`{>}`;default:throw[`MhchemBugT`,`mhchem bug T. Please report.`]}},_getOperator:function(e){switch(e){case`+`:return` {}+{} `;case`-`:return` {}-{} `;case`=`:return` {}={} `;case`<`:return` {}<{} `;case`>`:return` {}>{} `;case`<<`:return` {}\\ll{} `;case`>>`:return` {}\\gg{} `;case`\\pm`:return` {}\\pm{} `;case`\\approx`:return` {}\\approx{} `;case`$\\approx$`:return` {}\\approx{} `;case`v`:return` \\downarrow{} `;case`(v)`:return` \\downarrow{} `;case`^`:return` \\uparrow{} `;case`(^)`:return` \\uparrow{} `;default:throw[`MhchemBugT`,`mhchem bug T. Please report.`]}}};function sd(e,t){return ad.renderToString(e,{displayMode:t===`block`,output:`mathml`,strict:!1,throwOnError:!1,trust:!1})}function cd(e,t){let n=(0,u.$generateNodesFromDOM)(e,new DOMParser().parseFromString(t||``,`text/html`)),r=(0,o.$getRoot)();if(r.clear(),n.length>0){r.append(...n);return}r.append((0,o.$createParagraphNode)())}var ld=`rj-equation:fraction`;function ud(e,t){let n=(0,o.$getNodeByKey)(e);_d(n)&&t(n)}function dd(e){let t=e.match(/^\\frac\{([^{}]*)\}\{([^{}]*)\}$/);return t?{denominator:t[2],numerator:t[1]}:null}function fd(e=``,t=``){return String.raw`\frac{${e}}{${t}}`}var pd=r.default.memo(function({displayMode:e,equation:t,nodeKey:n}){let[i]=(0,f.useLexicalComposerContext)(),a=De(),c=r.default.useRef(`main`),l=r.default.useRef(null),u=r.default.useRef(null),d=r.default.useRef(null),[p,m,h]=Mi(n),g=r.default.useMemo(()=>dd(t),[t]),_=r.default.useMemo(()=>t.trim()?sd(t,e):``,[e,t]),v=r.default.useCallback(t=>{i.update(()=>{ud(n,e=>{_d(e)&&e.setEquation(t)})}),a(be({isEquationSelected:!0,selectedEquation:t,selectedEquationDisplayMode:e,selectedEquationKey:n}))},[a,e,i,n]),y=r.default.useCallback(()=>{h(),m(!0),a(be({isEquationSelected:!0,selectedEquation:t,selectedEquationDisplayMode:e,selectedEquationKey:n})),window.requestAnimationFrame(()=>{if(g){u.current?.focus();return}l.current?.focus()})},[h,a,e,t,g,n,m]);r.default.useEffect(()=>{if(!p)return;let e=i.registerCommand(o.KEY_DELETE_COMMAND,e=>(e.preventDefault(),i.update(()=>{ud(n,e=>{e?.remove()})}),!0),o.COMMAND_PRIORITY_LOW),t=i.registerCommand(o.KEY_BACKSPACE_COMMAND,e=>(e.preventDefault(),i.update(()=>{ud(n,e=>{e?.remove()})}),!0),o.COMMAND_PRIORITY_LOW);return()=>{e(),t()}},[i,p,n]),r.default.useEffect(()=>{if(!p)return;let e=e=>{let n=e.detail;if(!n)return;if(n===ld){v(fd()),window.requestAnimationFrame(()=>{u.current?.focus()});return}if(g){let e=c.current,t={...g,[e===`denominator`?`denominator`:`numerator`]:`${g[e===`denominator`?`denominator`:`numerator`]}${n}`};v(fd(t.numerator,t.denominator)),window.requestAnimationFrame(()=>{e===`denominator`?d.current?.focus():u.current?.focus()});return}let r=l.current;if(!r){v(`${t}${n}`);return}let i=r.selectionStart??r.value.length,a=r.selectionEnd??i,o=`${r.value.slice(0,i)}${n}${r.value.slice(a)}`,s=i+n.length;v(o),window.requestAnimationFrame(()=>{r.focus(),r.setSelectionRange(s,s)})};return window.addEventListener(ie,e),()=>{window.removeEventListener(ie,e)}},[t,g,p,v]);let b=(e,t)=>{let n=g||{denominator:``,numerator:``};v(fd(t===`numerator`?e:n.numerator,t===`denominator`?e:n.denominator))};return(0,s.jsx)(`span`,{className:[`rj-editor-equation`,`rj-editor-equation--${e}`,p?`is-selected`:``].filter(Boolean).join(` `),"data-display-mode":e,"data-equation":t,onClick:e=>{e.preventDefault(),e.stopPropagation(),y()},role:`button`,tabIndex:-1,children:p?(0,s.jsxs)(`span`,{className:`rj-editor-equation-editor`,children:[g?(0,s.jsxs)(`span`,{className:`rj-editor-equation-fraction-editor`,children:[(0,s.jsx)(`input`,{"aria-label":`Fraction numerator`,onChange:e=>b(e.target.value,`numerator`),onFocus:()=>{c.current=`numerator`},onKeyDown:e=>{e.stopPropagation()},placeholder:`□`,ref:u,type:`text`,value:g.numerator}),(0,s.jsx)(`span`,{className:`rj-editor-equation-fraction-line`}),(0,s.jsx)(`input`,{"aria-label":`Fraction denominator`,onChange:e=>b(e.target.value,`denominator`),onFocus:()=>{c.current=`denominator`},onKeyDown:e=>{e.stopPropagation()},placeholder:`□`,ref:d,type:`text`,value:g.denominator})]}):(0,s.jsx)(`input`,{"aria-label":`Equation input`,onChange:e=>v(e.target.value),onClick:e=>{e.stopPropagation()},onFocus:()=>{c.current=`main`},onKeyDown:e=>{e.stopPropagation()},onMouseDown:e=>{e.stopPropagation()},placeholder:`Type equation here.`,ref:l,type:`text`,value:t}),t.trim()&&!g?(0,s.jsx)(`span`,{className:`rj-editor-equation-content`,dangerouslySetInnerHTML:{__html:_}}):null]}):(0,s.jsx)(`span`,{className:[`rj-editor-equation-content`,t.trim()?``:`is-empty`].filter(Boolean).join(` `),dangerouslySetInnerHTML:{__html:_||`<span>Type equation here.</span>`}})})});function md(e){let t=e.getAttribute(`data-equation`);return t?{node:gd({displayMode:e.getAttribute(`data-display-mode`)===`inline`?`inline`:`block`,equation:t})}:null}var hd=class e extends o.DecoratorNode{__displayMode;__equation;static clone(t){return new e(t.__equation,t.__displayMode,t.__key)}static getType(){return`equation`}static importDOM(){return{div:e=>e.hasAttribute(`data-equation`)?{conversion:md,priority:1}:null,span:e=>e.hasAttribute(`data-equation`)?{conversion:md,priority:1}:null}}static importJSON(e){return gd({displayMode:e.displayMode,equation:e.equation})}constructor(e,t=`block`,n){super(n),this.__equation=e,this.__displayMode=t}createDOM(e){let t=document.createElement(`span`);return t.className=e.theme.equation||`rj-editor-equation-node`,t}decorate(){return(0,s.jsx)(pd,{displayMode:this.__displayMode,equation:this.__equation,nodeKey:this.__key})}exportDOM(){let e=this.__displayMode===`inline`?document.createElement(`span`):document.createElement(`div`);e.setAttribute(`data-equation`,this.__equation),e.setAttribute(`data-display-mode`,this.__displayMode);try{e.innerHTML=sd(this.__equation,this.__displayMode)}catch{e.textContent=this.__equation}return{element:e}}exportJSON(){return{displayMode:this.__displayMode,equation:this.__equation,type:`equation`,version:1}}getDisplayMode(){return this.getLatest().__displayMode}getEquation(){return this.getLatest().__equation}getTextContent(){return this.__equation}isInline(){return this.getLatest().__displayMode===`inline`}setDisplayMode(e){let t=this.getWritable();return t.__displayMode=e,t}setEquation(e){let t=this.getWritable();return t.__equation=e,t}updateDOM(){return!1}};function gd({displayMode:e=`block`,equation:t}){return new hd(t,e)}function _d(e){return e instanceof hd}var vd=[`b`,`code`,`em`,`font`,`i`,`mark`,`s`,`span`,`strong`,`sub`,`sup`,`u`];function yd(e){let t=[],n=e.style.backgroundColor,r=e.style.color||e.getAttribute(`color`)||``,i=e.style.fontFamily||e.getAttribute(`face`)||``,a=e.style.fontSize,o=e.style.lineHeight;return n&&t.push(`background-color: ${n}`),r&&t.push(`color: ${r}`),i&&t.push(`font-family: ${i}`),a&&t.push(`font-size: ${a}`),o&&t.push(`line-height: ${o}`),t.join(`; `)}function bd(e,t){return e?t?`${e}; ${t}`:e:t}function xd(e){return e?{...e,conversion:t=>{let n=e.conversion(t);if(!n)return n;let r=n.forChild,i=yd(t);return i?{...n,forChild:(e,t)=>{let n=r?r(e,t):e;return(0,o.$isTextNode)(n)&&n.setStyle(bd(n.getStyle(),i)),n}}:n}}:null}function Sd(e,t){return t.setDetail(e.getDetail()),t.setFormat(e.getFormat()),t.setMode(e.getMode()),t.setStyle(e.getStyle()),t}var Cd=class e extends o.TextNode{static clone(t){return new e(t.__text,t.__key)}static getType(){return`extended-text`}static importDOM(){let e=o.TextNode.importDOM();if(!e)return null;let t={...e};return vd.forEach(n=>{let r=e[n];r&&(t[n]=e=>xd(r(e)))}),t}static importJSON(e){return wd(e.text).updateFromJSON(e)}constructor(e=``,t){super(e,t)}exportJSON(){return{...super.exportJSON(),type:`extended-text`,version:1}}};function wd(e=``){return new Cd(e)}function Td(e){return Sd(e,wd(e.getTextContent()))}function Ed(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M18 10H6M21 6H3M21 14H3M18 18H6`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Dd(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M16 10H3M20 6H3M20 14H3M16 18H3`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Od(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M21 10H8M21 6H4M21 14H4M21 18H8`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function kd(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M9 3H15M3 6H21M19 6L18.2987 16.5193C18.1935 18.0975 18.1409 18.8867 17.8 19.485C17.4999 20.0118 17.0472 20.4353 16.5017 20.6997C15.882 21 15.0911 21 13.5093 21H10.4907C8.90891 21 8.11803 21 7.49834 20.6997C6.95276 20.4353 6.50009 20.0118 6.19998 19.485C5.85911 18.8867 5.8065 18.0975 5.70129 16.5193L5 6M10 10.5V15.5M14 10.5V15.5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Ad(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M8.54661 19.7675C10.9457 20.8319 13.8032 20.7741 16.2502 19.3613C20.3157 17.0141 21.7086 11.8156 19.3614 7.75008L19.1114 7.31706M4.63851 16.2502C2.2913 12.1847 3.68424 6.98619 7.74972 4.63898C10.1967 3.22621 13.0542 3.16841 15.4533 4.23277M2.49341 16.3338L5.22546 17.0659L5.95751 14.3338M18.0426 9.6659L18.7747 6.93385L21.5067 7.6659`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var jd=100,Md=2e3,Nd=10,Pd=32,Fd=42,Id=340,Ld=12,Rd=[`top-left`,`top`,`top-right`,`right`,`bottom-right`,`bottom`,`bottom-left`,`left`];function zd(e,t){let n=(0,o.$getNodeByKey)(e);tf(n)&&t(n)}function Bd(e,t){let n=t?.getBoundingClientRect();if(!n)return{x:8,y:8};let r=e.clientX-n.left,i=e.clientY-n.top,a=Math.max(8,n.width-Id-8),o=Math.max(8,n.height-Fd-8),s=r+Ld,c=i+Ld;return{x:Math.min(Math.max(s,8),a),y:Math.max(c>o?i-Fd-Ld:c,8)}}function Vd({alignment:e,altText:t,aspectRatioLocked:n,borderEnabled:i,borderRadius:a,caption:c,height:l,linkUrl:u,nodeKey:d,objectFit:p,rotation:m,shadowEnabled:h,src:g,textWrap:_,width:v}){let[y]=(0,f.useLexicalComposerContext)(),b=T(),x=De(),[S,C,ee]=Mi(d),te=r.default.useRef(null),w=r.default.useRef(null),ne=r.default.useRef(null),[re,ie]=r.default.useState({x:0,y:0}),[ae,oe]=r.default.useState(0),[se,ce]=r.default.useState(1),le=(m%360+360)%360,ue=le===90||le===270,de=_===`square`&&e!==`center`;r.default.useEffect(()=>{let e=w.current?.parentElement;if(!e)return;let t=()=>{oe(e.getBoundingClientRect().width)};if(t(),typeof ResizeObserver>`u`)return window.addEventListener(`resize`,t),()=>{window.removeEventListener(`resize`,t)};let n=new ResizeObserver(t);return n.observe(e),()=>{n.disconnect()}},[]),r.default.useEffect(()=>{if(!S)return;let e=y.registerCommand(o.KEY_DELETE_COMMAND,e=>(e.preventDefault(),y.update(()=>{zd(d,e=>{e?.remove()})}),!0),o.COMMAND_PRIORITY_LOW),t=y.registerCommand(o.KEY_BACKSPACE_COMMAND,e=>(e.preventDefault(),y.update(()=>{zd(d,e=>{e?.remove()})}),!0),o.COMMAND_PRIORITY_LOW);return()=>{e(),t()}},[y,S,d]);let fe=e=>{y.update(()=>{zd(d,t=>{tf(t)&&t.setAlignment(e)})})},pe=e=>{y.update(()=>{zd(d,t=>{tf(t)&&t.setWidth(Math.min(jd,Math.max(Nd,e)))})})},me=(e,t)=>{y.update(()=>{zd(d,n=>{tf(n)&&(n.setWidth(Math.min(jd,Math.max(Nd,e))),n.setHeight(t===void 0?void 0:Math.min(Md,Math.max(Pd,t))))})}),C(!0)},he=(e,t)=>{e.preventDefault(),e.stopPropagation(),C(!0);let n=w.current?.getBoundingClientRect(),r=w.current?.parentElement?.getBoundingClientRect()||n,i=ne.current?.getBoundingClientRect();if(!r?.width||!i?.width||!i?.height)return;let a=e.clientX,o=e.clientY,s=v,c=l??i.height,u=i.width/i.height,d=e=>{let n=e.clientX-a,l=e.clientY-o,d=t.includes(`right`)?n:t.includes(`left`)?-n:0,f=t.includes(`bottom`)?l:t.includes(`top`)?-l:0;if(e.shiftKey){let e=Math.abs(d)>=Math.abs(f*u)?d:f*u,t=i.width+e;me(s+e/r.width*100,t/u);return}me(d===0?s:s+d/r.width*100,f===0?c:c+f)},f=()=>{window.removeEventListener(`pointermove`,d),window.removeEventListener(`pointerup`,f),y.focus(),window.requestAnimationFrame(()=>{C(!0)})};window.addEventListener(`pointermove`,d),window.addEventListener(`pointerup`,f)},ge=()=>{y.update(()=>{zd(d,e=>{e?.remove()})})},_e=async e=>{let t=e.target.files?.[0];if(e.target.value=``,!t)return;if(!t.type.startsWith(`image/`)){window.alert(b.alerts.onlyImages);return}if(t.size>5242880){window.alert(b.alerts.imageSizeLimit);return}let n=await ia(t);y.update(()=>{zd(d,e=>{tf(e)&&(e.setSrc(n),e.setAltText(t.name))})})},ve=ae>0?ae*v/100:void 0,ye=l??(ve?ve/se:void 0),be=ue&&ye?ye:void 0,Se=ue&&ve?ve:void 0,Ce={"--rj-image-rotated-aspect-ratio":`1 / ${se}`,height:Se?`${Se}px`:void 0,width:ue&&be?`${be}px`:de?`100%`:`${v}%`},we=de?{maxWidth:`100%`,width:ue&&be?`${be}px`:`${v}%`}:void 0,Te=(0,s.jsx)(`img`,{alt:t,className:`rj-editor-image`,draggable:!1,onLoad:e=>{let t=e.currentTarget;t.naturalWidth&&t.naturalHeight&&ce(t.naturalWidth/t.naturalHeight)},ref:ne,src:g,style:{borderRadius:a,height:l?`${l}px`:void 0,objectFit:p}}),Ee={"--rj-image-rotation":`${m}deg`,height:ue&&ye?`${ye}px`:void 0,width:ue&&ve?`${ve}px`:void 0};return(0,s.jsxs)(`span`,{className:[`rj-editor-image-frame`,`rj-editor-image-frame--${e}`,`rj-editor-image-frame--wrap-${_}`,S?`is-selected`:``].filter(Boolean).join(` `),ref:w,style:we,children:[S?(0,s.jsxs)(`span`,{className:`rj-editor-image-floating-toolbar`,onClick:e=>{e.stopPropagation()},onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},style:{left:re.x,top:re.y},children:[(0,s.jsx)(`button`,{"aria-label":b.toolbar.image.alignLeft,onClick:()=>fe(`left`),type:`button`,children:(0,s.jsx)(Dd,{"aria-hidden":`true`})}),(0,s.jsx)(`button`,{"aria-label":b.toolbar.image.alignCenter,onClick:()=>fe(`center`),type:`button`,children:(0,s.jsx)(Ed,{"aria-hidden":`true`})}),(0,s.jsx)(`button`,{"aria-label":b.toolbar.image.alignRight,onClick:()=>fe(`right`),type:`button`,children:(0,s.jsx)(Od,{"aria-hidden":`true`})}),(0,s.jsx)(`button`,{onClick:()=>pe(25),type:`button`,children:`25%`}),(0,s.jsx)(`button`,{onClick:()=>pe(50),type:`button`,children:`50%`}),(0,s.jsx)(`button`,{onClick:()=>pe(100),type:`button`,children:`100%`}),(0,s.jsx)(`button`,{"aria-label":b.toolbar.image.replace,onClick:()=>void ra(te.current),type:`button`,children:(0,s.jsx)(Ad,{"aria-hidden":`true`})}),(0,s.jsx)(`button`,{"aria-label":b.toolbar.image.delete,className:`rj-editor-toolbar--clear-btn`,onClick:ge,type:`button`,children:(0,s.jsx)(kd,{"aria-hidden":`true`})})]}):null,(0,s.jsxs)(`span`,{className:[`rj-editor-image-box`,i?`has-border`:``,h?`has-shadow`:``,n?`is-aspect-ratio-locked`:``,ue?`is-quarter-turn`:``].filter(Boolean).join(` `),onClick:r=>{r.preventDefault(),r.stopPropagation(),ee(),C(!0),ie(Bd(r,w.current)),x(xe({isImageSelected:!0,selectedImageAlignment:e,selectedImageAltText:t,selectedImageAspectRatioLocked:n,selectedImageBorderEnabled:i,selectedImageBorderRadius:a,selectedImageCaption:c,selectedImageHeight:l,selectedImageKey:d,selectedImageLinkUrl:u,selectedImageObjectFit:p,selectedImageRotation:m,selectedImageShadowEnabled:h,selectedImageTextWrap:_,selectedImageWidth:v}))},style:Ce,children:[(0,s.jsx)(`span`,{className:`rj-editor-image-rotator`,style:Ee,children:u?(0,s.jsx)(`a`,{className:`rj-editor-image-link`,href:u,rel:`noreferrer`,target:`_blank`,children:Te}):Te}),c?(0,s.jsx)(`span`,{className:`rj-editor-image-caption`,children:c}):null,S?(0,s.jsx)(s.Fragment,{children:Rd.map(e=>(0,s.jsx)(`span`,{"aria-hidden":`true`,className:[`rj-editor-image-resize-handle`,`rj-editor-image-resize-handle--${e}`].join(` `),onPointerDown:t=>he(t,e)},e))}):null]}),(0,s.jsx)(`input`,{accept:`image/*`,className:`rj-editor-hidden-file-input`,onChange:_e,ref:te,type:`file`})]})}function Hd(e){return e===`square`||e===`around`?`square`:`top-bottom`}function Ud(e){return e===`left`||e===`right`||e===`center`?e:`center`}function Wd(e){return e===`cover`||e===`fill`||e===`contain`?e:`contain`}function Gd(e){let t=Number.parseFloat(e||``);return Number.isFinite(t)?t:void 0}function Kd(e){let t=Gd(e.getAttribute(`data-width`));if(t!==void 0)return t;let n=e.closest(`[data-rj-image-caption-wrapper="true"], [data-rj-image-rotation-wrapper="true"]`),r=Gd(n?.style.width);if(r!==void 0&&n?.style.width.includes(`%`))return r;let i=Gd(e.style.width);return i!==void 0&&e.style.width.includes(`%`)?i:100}function qd(e){let t=e.getAttribute(`data-alignment`);if(t)return Ud(t);let n=e.closest(`[data-rj-image-caption-wrapper="true"], [data-rj-image-rotation-wrapper="true"]`)||e;return n.style.float===`left`?`left`:n.style.float===`right`||n.style.marginLeft===`auto`&&[`0`,`0px`].includes(n.style.marginRight)?`right`:[`0`,`0px`].includes(n.style.marginLeft)&&n.style.marginRight===`auto`?`left`:`center`}function Jd(e){let t=e.getAttribute(`data-text-wrap`);return t?Hd(t):(e.closest(`[data-rj-image-caption-wrapper="true"], [data-rj-image-rotation-wrapper="true"]`)||e).style.float?`square`:`top-bottom`}function Yd(e){return e.getAttribute(`data-caption`)||e.closest(`[data-rj-image-caption-wrapper="true"], [data-rj-image-rotation-wrapper="true"]`)?.querySelector(`.rj-editor-image-caption`)?.textContent||``}function Xd(e){return e.getAttribute(`data-link-url`)||e.closest(`a`)?.href||``}function Zd(e){if(!(e instanceof HTMLImageElement))return null;let t=e.getAttribute(`src`);return t?{node:ef({alignment:qd(e),altText:e.getAttribute(`alt`)||``,aspectRatioLocked:e.getAttribute(`data-aspect-ratio-locked`)!==`false`,borderEnabled:!!e.style.border,borderRadius:Gd(e.style.borderRadius)||0,caption:Yd(e),height:Gd(e.getAttribute(`data-height`))||Gd(e.style.height),linkUrl:Xd(e),objectFit:Wd(e.getAttribute(`data-object-fit`)||e.style.objectFit),rotation:Gd(e.getAttribute(`data-rotation`))||0,shadowEnabled:!!e.style.boxShadow,src:t,textWrap:Jd(e),width:Kd(e)})}:null}function Qd(e){let t=e.querySelector(`img`);return t?Zd(t):null}var $d=class e extends o.DecoratorNode{__alignment;__aspectRatioLocked;__altText;__borderEnabled;__borderRadius;__caption;__height;__linkUrl;__objectFit;__rotation;__shadowEnabled;__src;__textWrap;__width;static clone(t){return new e(t.__src,t.__altText,t.__width,t.__alignment,t.__caption,t.__height,t.__linkUrl,t.__objectFit,t.__textWrap,t.__borderRadius,t.__borderEnabled,t.__shadowEnabled,t.__rotation,t.__aspectRatioLocked,t.__key)}static getType(){return`image`}static importDOM(){return{a:e=>!(e instanceof HTMLAnchorElement)||!e.querySelector(`img`)?null:{conversion:Qd,priority:2},img:()=>({conversion:Zd,priority:0}),span:e=>!(e instanceof HTMLElement)||e.getAttribute(`data-rj-image-caption-wrapper`)!==`true`&&e.getAttribute(`data-rj-image-rotation-wrapper`)!==`true`?null:{conversion:Qd,priority:2}}}static importJSON(e){return ef({alignment:e.alignment,altText:e.altText,aspectRatioLocked:e.aspectRatioLocked,borderEnabled:e.borderEnabled,borderRadius:e.borderRadius,caption:e.caption,height:e.height,linkUrl:e.linkUrl,objectFit:e.objectFit,rotation:e.rotation,shadowEnabled:e.shadowEnabled,src:e.src,textWrap:Hd(e.textWrap),width:e.width})}constructor(e,t=``,n=100,r=`center`,i=``,a,o=``,s=`contain`,c=`top-bottom`,l=0,u=!1,d=!1,f=0,p=!0,m){super(m),this.__src=e,this.__altText=t,this.__width=n,this.__alignment=r,this.__caption=i,this.__height=a,this.__linkUrl=o,this.__objectFit=s,this.__textWrap=c,this.__borderRadius=l,this.__borderEnabled=u,this.__shadowEnabled=d,this.__rotation=f,this.__aspectRatioLocked=p}createDOM(e){let t=document.createElement(`span`);return t.className=e.theme.image||`rj-editor-image-node`,t}decorate(){return(0,s.jsx)(Vd,{alignment:this.__alignment,altText:this.__altText,aspectRatioLocked:this.__aspectRatioLocked,borderEnabled:this.__borderEnabled,borderRadius:this.__borderRadius,caption:this.__caption,height:this.__height,linkUrl:this.__linkUrl,nodeKey:this.__key,objectFit:this.__objectFit,rotation:this.__rotation,shadowEnabled:this.__shadowEnabled,src:this.__src,textWrap:this.__textWrap,width:this.__width})}exportDOM(){let e=document.createElement(`img`);return e.setAttribute(`src`,this.__src),this.__altText&&e.setAttribute(`alt`,this.__altText),e.setAttribute(`data-alignment`,this.__alignment),e.setAttribute(`data-caption`,this.__caption),e.setAttribute(`data-height`,this.__height?String(this.__height):``),e.setAttribute(`data-link-url`,this.__linkUrl),e.setAttribute(`data-object-fit`,this.__objectFit),e.setAttribute(`data-rj-image-node-key`,this.__key),e.setAttribute(`data-rotation`,String(this.__rotation)),e.setAttribute(`data-text-wrap`,this.__textWrap),e.setAttribute(`data-width`,String(this.__width)),e.setAttribute(`data-aspect-ratio-locked`,String(this.__aspectRatioLocked)),e.style.display=`block`,e.style.borderRadius=`${this.__borderRadius}px`,e.style.maxWidth=`100%`,e.style.objectFit=this.__objectFit,e.style.transform=`rotate(${this.__rotation}deg)`,e.style.width=`${this.__width}%`,this.__textWrap===`square`&&this.__alignment===`left`&&(e.style.float=`left`,e.style.margin=`4px 16px 10px 0`),this.__textWrap===`square`&&this.__alignment===`right`&&(e.style.float=`right`,e.style.margin=`4px 0 10px 16px`),this.__textWrap!==`square`&&this.__alignment===`center`&&(e.style.marginLeft=`auto`,e.style.marginRight=`auto`),this.__textWrap!==`square`&&this.__alignment===`right`&&(e.style.marginLeft=`auto`,e.style.marginRight=`0`),this.__textWrap!==`square`&&this.__alignment===`left`&&(e.style.marginLeft=`0`,e.style.marginRight=`auto`),this.__borderEnabled&&(e.style.border=`1px solid var(--rj-editor-image-border, #94a3b8)`),this.__shadowEnabled&&(e.style.boxShadow=`var(--rj-editor-image-shadow, 0 14px 32px rgb(15 23 42 / 18%))`),this.__height&&(e.style.height=`${this.__height}px`),{element:e}}exportJSON(){return{alignment:this.__alignment,aspectRatioLocked:this.__aspectRatioLocked,altText:this.__altText,borderEnabled:this.__borderEnabled,borderRadius:this.__borderRadius,caption:this.__caption,height:this.__height,linkUrl:this.__linkUrl,objectFit:this.__objectFit,rotation:this.__rotation,shadowEnabled:this.__shadowEnabled,src:this.__src,textWrap:this.__textWrap,type:`image`,version:1,width:this.__width}}getAlignment(){return this.getLatest().__alignment}getAltText(){return this.getLatest().__altText}getAspectRatioLocked(){return this.getLatest().__aspectRatioLocked}getBorderEnabled(){return this.getLatest().__borderEnabled}getBorderRadius(){return this.getLatest().__borderRadius}getCaption(){return this.getLatest().__caption}getLinkUrl(){return this.getLatest().__linkUrl}getHeight(){return this.getLatest().__height}getObjectFit(){return this.getLatest().__objectFit}getRotation(){return this.getLatest().__rotation}getShadowEnabled(){return this.getLatest().__shadowEnabled}getSrc(){return this.getLatest().__src}getTextWrap(){return this.getLatest().__textWrap}getWidth(){return this.getLatest().__width}setAlignment(e){let t=this.getWritable();return t.__alignment=e,t}setAltText(e){let t=this.getWritable();return t.__altText=e,t}setAspectRatioLocked(e){let t=this.getWritable();return t.__aspectRatioLocked=e,t}setBorderEnabled(e){let t=this.getWritable();return t.__borderEnabled=e,t}setBorderRadius(e){let t=this.getWritable();return t.__borderRadius=e,t}setCaption(e){let t=this.getWritable();return t.__caption=e,t}setLinkUrl(e){let t=this.getWritable();return t.__linkUrl=e,t}setHeight(e){let t=this.getWritable();return t.__height=e,t}setObjectFit(e){let t=this.getWritable();return t.__objectFit=e,t}setRotation(e){let t=this.getWritable();return t.__rotation=e,t}setShadowEnabled(e){let t=this.getWritable();return t.__shadowEnabled=e,t}setSrc(e){let t=this.getWritable();return t.__src=e,t}setTextWrap(e){let t=this.getWritable();return t.__textWrap=e,t}setWidth(e){let t=this.getWritable();return t.__width=e,t}getTextContent(){return this.__altText}isInline(){return!1}updateDOM(){return!1}};function ef({alignment:e,aspectRatioLocked:t,altText:n,borderEnabled:r,borderRadius:i,caption:a,height:o,linkUrl:s,objectFit:c,rotation:l,shadowEnabled:u,src:d,textWrap:f,width:p}){return new $d(d,n,p,e,a,o,s,c,f,i,r,u,l,t)}function tf(e){return e instanceof $d}function nf(e){let t=(0,o.$getNodeByKey)(e);cf(t)&&t.remove()}var rf=r.default.memo(function({nodeKey:e,title:t,videoId:n}){let[i]=(0,f.useLexicalComposerContext)(),[a,c,l]=Mi(e),u=t||`YouTube video`;return r.default.useEffect(()=>{if(!a)return;let t=i.registerCommand(o.KEY_DELETE_COMMAND,t=>(t.preventDefault(),i.update(()=>nf(e)),!0),o.COMMAND_PRIORITY_LOW),n=i.registerCommand(o.KEY_BACKSPACE_COMMAND,t=>(t.preventDefault(),i.update(()=>nf(e)),!0),o.COMMAND_PRIORITY_LOW);return()=>{t(),n()}},[i,a,e]),(0,s.jsx)(`div`,{className:[`rj-editor-youtube`,a?`is-selected`:``].filter(Boolean).join(` `),onClick:e=>{e.preventDefault(),e.stopPropagation(),l(),c(!0)},role:`presentation`,children:(0,s.jsx)(`iframe`,{allow:`accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share`,allowFullScreen:!0,loading:`lazy`,referrerPolicy:`strict-origin-when-cross-origin`,src:`https://www.youtube-nocookie.com/embed/${n}`,title:u})})});function af(e){let t=Ri(e.getAttribute(`data-youtube-video-id`)||e.getAttribute(`src`)||``);return t?{node:sf({title:e.getAttribute(`title`)||``,videoId:t})}:null}var of=class e extends o.DecoratorNode{__title;__videoId;static clone(t){return new e(t.__videoId,t.__title,t.__key)}static getType(){return`youtube`}static importDOM(){return{iframe:e=>Ri(e.getAttribute(`src`)||``)?{conversion:af,priority:1}:null}}static importJSON(e){return sf({title:e.title,videoId:e.videoId})}constructor(e,t=``,n){super(n),this.__videoId=e,this.__title=t}createDOM(e){let t=document.createElement(`div`);return t.className=e.theme.youtube||`rj-editor-youtube-node`,t}decorate(){return(0,s.jsx)(rf,{nodeKey:this.__key,title:this.__title,videoId:this.__videoId})}exportDOM(){let e=document.createElement(`div`),t=document.createElement(`iframe`);return e.className=`rj-editor-youtube`,e.style.aspectRatio=`16 / 9`,e.style.background=`var(--rj-editor-toolbar-bg, #f8fafc)`,e.style.border=`1px solid var(--rj-editor-border, #d9dde5)`,e.style.borderRadius=`8px`,e.style.maxWidth=`720px`,e.style.overflow=`hidden`,e.style.width=`100%`,t.setAttribute(`allow`,`accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share`),t.setAttribute(`allowfullscreen`,`true`),t.setAttribute(`data-youtube-video-id`,this.__videoId),t.setAttribute(`loading`,`lazy`),t.setAttribute(`referrerpolicy`,`strict-origin-when-cross-origin`),t.setAttribute(`src`,`https://www.youtube-nocookie.com/embed/${this.__videoId}`),t.setAttribute(`title`,this.__title||`YouTube video`),t.style.border=`0`,t.style.display=`block`,t.style.height=`100%`,t.style.width=`100%`,e.append(t),{element:e}}exportJSON(){return{title:this.__title,type:`youtube`,version:1,videoId:this.__videoId}}getTextContent(){return`https://www.youtube.com/watch?v=${this.__videoId}`}getTitle(){return this.getLatest().__title}getVideoId(){return this.getLatest().__videoId}isInline(){return!1}setTitle(e){let t=this.getWritable();return t.__title=e,t}updateDOM(){return!1}};function sf({title:e=``,videoId:t}){return new of(t,e)}function cf(e){return e instanceof of}var lf={paragraph:`rj-editor-paragraph`,text:{bold:`rj-editor-text-bold`,italic:`rj-editor-text-italic`,strikethrough:`rj-editor-text-strikethrough`,subscript:`rj-editor-text-subscript`,superscript:`rj-editor-text-superscript`,underline:`rj-editor-text-underline`},list:{ol:`rj-editor-list-ol`,ul:`rj-editor-list-ul`,listitem:`rj-editor-list-item`},equation:`rj-editor-equation-node`,image:`rj-editor-image-node`,youtube:`rj-editor-youtube-node`,table:`rj-editor-table`,tableCell:`rj-editor-table-cell`,tableCellHeader:`rj-editor-table-cell-header`,tableCellSelected:`rj-editor-table-cell-selected`,tableRow:`rj-editor-table-row`,tableScrollableWrapper:`rj-editor-table-scrollable-wrapper`,tableSelection:`rj-editor-table-selection`};function uf({defaultValue:e,namespace:t,value:n}){return{namespace:t,nodes:[Cd,{replace:o.TextNode,with:Td,withKlass:Cd},hd,$d,of,Xt,l.ListNode,l.ListItemNode,Gn,vi,Xn],onError(e){throw e},editorState:n||e?t=>cd(t,n||e||``):void 0,theme:lf}}function df({validateUrl:e,attributes:t}){let[n]=(0,f.useLexicalComposerContext)();return(0,r.useEffect)(()=>{if(!n.hasNodes([Xt]))throw Error(`LinkPlugin: LinkNode not registered on editor`)}),(0,r.useEffect)(()=>fn(n,st({attributes:t,validateUrl:e})),[n,e,t]),null}function ff({hasCellMerge:e=!0,hasCellBackgroundColor:t=!0,hasTabHandler:n=!0,hasHorizontalScroll:i=!1,hasNestedTables:a=!1}){let[o]=(0,f.useLexicalComposerContext)();(0,r.useEffect)(()=>{gi(o)!==i&&(_i(o,i),o.registerNodeTransform(vi,()=>{})())},[o,i]);let s=function(e){let[t]=(0,r.useState)(()=>Xe(e));return t.peek()!==e&&(t.value=e),t}(a);return(0,r.useEffect)(()=>Ai(o,{hasNestedTables:s}),[o,s]),(0,r.useEffect)(()=>ki(o,n),[o,n]),(0,r.useEffect)(()=>{if(!e)return Oi(o)},[o,e]),(0,r.useEffect)(()=>{if(!t)return o.registerNodeTransform(Gn,e=>{e.getBackgroundColor()!==null&&e.setBackgroundColor(null)})},[o,t,e]),null}function pf(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M21 10H3M21 18H3M21 6H3M21 14H3`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function mf({editor:e}){let t=T(),n=Oe(e=>e.toolbar.alignment),r=n===``||n===`start`?`left`:n===`end`?`right`:n;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(`button`,{"aria-label":t.toolbar.alignment.left,"aria-pressed":r===`left`,className:r===`left`?`is-active`:void 0,onClick:()=>e.dispatchCommand(o.FORMAT_ELEMENT_COMMAND,`left`),title:Ii(`MOD+SHIFT+L`,t.toolbar.alignment.left),type:`button`,children:(0,s.jsx)(Dd,{})}),(0,s.jsx)(`button`,{"aria-label":t.toolbar.alignment.center,"aria-pressed":r===`center`,className:r===`center`?`is-active`:void 0,onClick:()=>e.dispatchCommand(o.FORMAT_ELEMENT_COMMAND,`center`),title:Ii(`MOD+SHIFT+C`,t.toolbar.alignment.center),type:`button`,children:(0,s.jsx)(Ed,{})}),(0,s.jsx)(`button`,{"aria-label":t.toolbar.alignment.right,"aria-pressed":r===`right`,className:r===`right`?`is-active`:void 0,onClick:()=>e.dispatchCommand(o.FORMAT_ELEMENT_COMMAND,`right`),title:Ii(`MOD+SHIFT+R`,t.toolbar.alignment.right),type:`button`,children:(0,s.jsx)(Od,{})}),(0,s.jsx)(`button`,{"aria-label":t.toolbar.alignment.justify,"aria-pressed":r===`justify`,className:r===`justify`?`is-active`:void 0,onClick:()=>e.dispatchCommand(o.FORMAT_ELEMENT_COMMAND,`justify`),title:Ii(`MOD+SHIFT+J`,t.toolbar.alignment.justify),type:`button`,children:(0,s.jsx)(pf,{})})]})}function hf(){return(0,s.jsx)(`span`,{className:`rj-editor-toolbar-divider`})}function gf(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M3 9H16.5C18.9853 9 21 11.0147 21 13.5C21 15.9853 18.9853 18 16.5 18H12M7 13L3 9L7 5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function _f(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M21 9H7.5C5.01472 9 3 11.0147 3 13.5C3 15.9853 5.01472 18 7.5 18H12M17 13L21 9L17 5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function vf({editor:e}){let t=T(),{canRedo:n,canUndo:r}=Oe(e=>e.toolbar);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(`button`,{"aria-label":t.toolbar.history.undo,disabled:!r,onClick:()=>e.dispatchCommand(o.UNDO_COMMAND,void 0),title:Ii(`MOD+Z`,t.toolbar.shortcuts.undo),type:`button`,children:(0,s.jsx)(gf,{})}),(0,s.jsx)(`button`,{"aria-label":t.toolbar.history.redo,disabled:!n,onClick:()=>e.dispatchCommand(o.REDO_COMMAND,void 0),title:Ii(`MOD+Y`,t.toolbar.shortcuts.redo),type:`button`,children:(0,s.jsx)(_f,{})})]})}function yf(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M21 9.25H12M21 4H3M21 14.75H12M21 20H3M4.28 8.56L8.14667 11.46C8.43616 11.6771 8.5809 11.7857 8.63266 11.9188C8.678 12.0353 8.678 12.1647 8.63266 12.2812C8.5809 12.4143 8.43616 12.5229 8.14667 12.74L4.28 15.64C3.86802 15.949 3.66203 16.1035 3.48961 16.0999C3.33956 16.0968 3.19885 16.0264 3.10632 15.9082C3 15.7725 3 15.515 3 15V9.2C3 8.68503 3 8.42754 3.10632 8.29175C3.19885 8.17358 3.33956 8.10323 3.48961 8.10011C3.66203 8.09652 3.86802 8.25102 4.28 8.56Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function bf(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M21 4H3M21 20H3M12 9.25H3M12 14.75H3M19.72 8.46L15.8533 11.36C15.5638 11.5771 15.4191 11.6857 15.3673 11.8188C15.322 11.9353 15.322 12.0647 15.3673 12.1812C15.4191 12.3143 15.5638 12.4229 15.8533 12.64L19.72 15.54C20.132 15.849 20.338 16.0035 20.5104 15.9999C20.6604 15.9968 20.8012 15.9264 20.8937 15.8082C21 15.6725 21 15.415 21 14.9V9.1C21 8.58503 21 8.32754 20.8937 8.19175C20.8012 8.07358 20.6604 8.00323 20.5104 8.00011C20.338 7.99652 20.132 8.15102 19.72 8.46Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function xf(){let[e]=(0,f.useLexicalComposerContext)(),t=T();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(`button`,{"aria-label":t.toolbar.shortcuts.increaseIndent,onClick:()=>e.dispatchCommand(o.INDENT_CONTENT_COMMAND,void 0),title:Ii(`MOD+]`,t.toolbar.shortcuts.increaseIndent),type:`button`,children:(0,s.jsx)(yf,{"aria-hidden":`true`})}),(0,s.jsx)(`button`,{"aria-label":t.toolbar.shortcuts.decreaseIndent,onClick:()=>e.dispatchCommand(o.OUTDENT_CONTENT_COMMAND,void 0),title:Ii(`MOD+[`,t.toolbar.shortcuts.decreaseIndent),type:`button`,children:(0,s.jsx)(bf,{"aria-hidden":`true`})})]})}function Sf(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M21 5.00001L10 5.00001M21 19L10 19M21 12L12 12M6 5.00001C5.5 5.00004 5.32843 5.00001 4.5 5.00001C3.67157 5.00001 3.5 4.99999 3 5.00001M6 19C5.5 19 5.32843 19 4.5 19C3.67157 19 3.5 19 3 19M11 8C9 10 7 12 7 12M7 12C7 12 5 10 3 8M7 12C7 12 9 14 11 16M7 12C7 12 5 14 3 16`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Cf(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M21 12L9 12M21 6L9 6M21 18L9 18M5 12C5 12.5523 4.55228 13 4 13C3.44772 13 3 12.5523 3 12C3 11.4477 3.44772 11 4 11C4.55228 11 5 11.4477 5 12ZM5 6C5 6.55228 4.55228 7 4 7C3.44772 7 3 6.55228 3 6C3 5.44772 3.44772 5 4 5C4.55228 5 5 5.44772 5 6ZM5 18C5 18.5523 4.55228 19 4 19C3.44772 19 3 18.5523 3 18C3 17.4477 3.44772 17 4 17C4.55228 17 5 17.4477 5 18Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function wf(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M21 5.00001L10 5.00001M21 19L10 19M21 12L10 12M6 5.00001C5.5 5.00004 5.32843 5.00001 4.5 5.00001C3.67157 5.00001 3.5 4.99999 3 5.00001M6 19C5.5 19 5.32843 19 4.5 19C3.67157 19 3.5 19 3 19M6 12C5.5 12 5.32843 12 4.5 12C3.67157 12 3.5 12 3 12`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Tf({editor:e}){let t=T(),n=Oe(e=>e.toolbar.listType);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(`button`,{"aria-label":t.toolbar.list.bullet,"aria-pressed":n===`bullet`,className:n===`bullet`?`is-active`:void 0,onClick:()=>e.dispatchCommand(l.INSERT_UNORDERED_LIST_COMMAND,void 0),title:Ii(`MOD+SHIFT+8`,t.toolbar.shortcuts.bulletList),type:`button`,children:(0,s.jsx)(Cf,{})}),(0,s.jsx)(`button`,{"aria-label":t.toolbar.list.numbered,"aria-pressed":n===`number`,className:n===`number`?`is-active`:void 0,onClick:()=>e.dispatchCommand(l.INSERT_ORDERED_LIST_COMMAND,void 0),title:Ii(`MOD+SHIFT+7`,t.toolbar.shortcuts.numberedList),type:`button`,children:(0,s.jsx)(wf,{})}),(0,s.jsx)(`button`,{"aria-label":t.toolbar.list.remove,"aria-pressed":n===void 0?void 0:!1,onClick:()=>e.dispatchCommand(l.REMOVE_LIST_COMMAND,void 0),title:t.toolbar.shortcuts.removeList,type:`button`,className:`rj-editor-toolbar--clear-btn`,children:(0,s.jsx)(Sf,{})})]})}function Ef(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M21 10H13M21 6H13M21 14H13M21 18H13M6 20L6 4M9 17L6 20L3 17M9 7L6 4L3 7`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Df(e,t){e.focus(()=>{e.update(()=>{let e=(0,o.$getSelection)();(0,o.$isRangeSelection)(e)&&(0,d.$patchStyleText)(e,t)})})}function Of(e){e.update(()=>{let e=(0,o.$getSelection)();if(!(0,o.$isRangeSelection)(e))return;(0,d.$patchStyleText)(e,{"background-color":null,color:null,"font-family":null,"font-size":null,"line-height":null}),[`bold`,`capitalize`,`code`,`highlight`,`italic`,`lowercase`,`strikethrough`,`subscript`,`superscript`,`underline`,`uppercase`].forEach(t=>{e.hasFormat(t)&&e.formatText(t)}),e.setFormat(0),(0,l.$isListNode)((0,c.$getNearestNodeOfType)(e.anchor.getNode(),l.ListNode))&&(0,l.$removeList)(),(0,d.$setBlocksType)((0,o.$getSelection)(),o.$createParagraphNode,(e,t)=>{t.setFormat(``),t.setIndent(0),t.setDirection(null)});let t=(0,o.$getSelection)();(0,o.$isRangeSelection)(t)&&t.getNodes().forEach(e=>{let t=e.getTopLevelElement();(0,o.$isElementNode)(t)&&(t.setFormat(``),t.setIndent(0),t.setDirection(null))})})}function kf(){let[e]=(0,f.useLexicalComposerContext)(),t=T(),r=De(),i=Oe(e=>e.toolbar),a=t=>{Df(e,{"line-height":t||null}),r(Se({...i,lineHeight:t}))};return(0,s.jsx)(n.Dropdown,{menu:{items:[{key:`default`,label:(0,s.jsx)(`button`,{className:`rj-editor-spacing-menu-item`,onClick:()=>a(void 0),type:`button`,children:t.toolbar.spacing.default})},{type:`divider`},...pe.map(e=>({key:e,label:(0,s.jsx)(`button`,{className:`rj-editor-spacing-menu-item`,onClick:()=>a(e),type:`button`,children:e})}))]},trigger:[`click`],children:(0,s.jsx)(`button`,{"aria-label":t.toolbar.spacing.lineAndParagraph,className:i.lineHeight?`is-active`:void 0,title:t.toolbar.shortcuts.spacing,type:`button`,children:(0,s.jsx)(Ef,{"aria-hidden":`true`})})})}function Af(e){return(0,s.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,s.jsx)(`path`,{d:`M2 12C2 17.5228 6.47715 22 12 22C13.6569 22 15 20.6569 15 19V18.5C15 18.0356 15 17.8034 15.0257 17.6084C15.2029 16.2622 16.2622 15.2029 17.6084 15.0257C17.8034 15 18.0356 15 18.5 15H19C20.6569 15 22 13.6569 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,s.jsx)(`path`,{d:`M7 13C7.55228 13 8 12.5523 8 12C8 11.4477 7.55228 11 7 11C6.44772 11 6 11.4477 6 12C6 12.5523 6.44772 13 7 13Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,s.jsx)(`path`,{d:`M16 9C16.5523 9 17 8.55228 17 8C17 7.44772 16.5523 7 16 7C15.4477 7 15 7.44772 15 8C15 8.55228 15.4477 9 16 9Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,s.jsx)(`path`,{d:`M10 8C10.5523 8 11 7.55228 11 7C11 6.44772 10.5523 6 10 6C9.44772 6 9 6.44772 9 7C9 7.55228 9.44772 8 10 8Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function jf(){let[e]=(0,f.useLexicalComposerContext)(),t=T(),[i,a]=(0,r.useState)(!1),[o,c]=(0,r.useState)(null),l=De(),u=Oe(e=>e.toolbar),d=u.backgroundColor,p=t=>{Df(e,{"background-color":t||null}),l(Se({...u,backgroundColor:t}))};return(0,s.jsx)(n.Dropdown,{menu:{items:[{key:`none`,label:(0,s.jsxs)(`button`,{className:`rj-editor-color-menu-item`,onClick:()=>{p(``),a(!1)},type:`button`,children:[(0,s.jsx)(`span`,{className:`rj-editor-color-none`}),t.common.none]})},...re.map(e=>({key:e,label:(0,s.jsxs)(`button`,{className:`rj-editor-color-menu-item`,onClick:()=>{p(e),a(!1)},type:`button`,children:[(0,s.jsx)(`span`,{className:`rj-editor-color-swatch`,style:{backgroundColor:e}}),e]})})),{type:`divider`},{key:`more-colors`,label:(0,s.jsxs)(`label`,{className:`rj-editor-color-menu-item`,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),children:[(0,s.jsx)(`span`,{className:`rj-editor-color-swatch`,style:{backgroundColor:d||re[0]}}),t.common.moreColors,(0,s.jsx)(`input`,{"aria-label":t.common.moreColors,className:`rj-editor-color-menu-input`,onChange:e=>{p(e.target.value),c(e.target.value),a(!0)},onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),type:`color`,value:d||re[0]})]})}]},onOpenChange:t=>{a(t),!t&&o&&(window.setTimeout(()=>{Df(e,{"background-color":o})}),c(null))},open:i,trigger:[`click`],children:(0,s.jsx)(`button`,{"aria-label":t.toolbar.style.backgroundColor,className:`rj-editor-color-button`,title:t.toolbar.shortcuts.backgroundColor,type:`button`,children:(0,s.jsx)(`span`,{className:d?`rj-editor-background-color-mark`:`rj-editor-background-color-mark is-none`,style:d?{backgroundColor:d}:void 0,children:(0,s.jsx)(Af,{})})})})}function Mf(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M18 6L6 18M6 6L18 18`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Nf(){let[e]=(0,f.useLexicalComposerContext)(),t=T(),n=De();return(0,s.jsx)(`button`,{"aria-label":t.toolbar.style.clearFormatting,onClick:()=>{Of(e),n(we({isBold:!1,isItalic:!1,isStrikethrough:!1,isSubscript:!1,isSuperscript:!1,isUnderline:!1})),n(Se({backgroundColor:le.backgroundColor,fontFamily:le.fontFamily,fontSize:le.fontSize,lineHeight:le.lineHeight,textColor:le.textColor})),n(_e({alignment:le.alignment,listType:le.listType}))},title:Ii(`MOD+\\`,t.toolbar.shortcuts.clearFormatting),type:`button`,className:`rj-editor-toolbar--clear-btn`,children:(0,s.jsx)(Mf,{})})}function Pf(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M6 9L12 15L18 9`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Ff(){let[e]=(0,f.useLexicalComposerContext)(),t=T(),r=De(),i=Oe(e=>e.toolbar);return(0,s.jsx)(n.Select,{"aria-label":t.toolbar.style.fontFamily,className:`rj-editor-toolbar-select rj-editor-toolbar-select-font`,onChange:(t=``)=>{Df(e,{"font-family":t||null}),r(Se({...i,fontFamily:t}))},options:se.map(e=>({label:e,value:e})),placeholder:t.toolbar.style.fontFamilyPlaceholder,popupMatchSelectWidth:!1,size:`small`,title:t.toolbar.shortcuts.fontFamily,value:i.fontFamily==``?void 0:i.fontFamily,suffixIcon:(0,s.jsx)(Pf,{})})}function If(){let[e]=(0,f.useLexicalComposerContext)(),t=T(),r=De(),i=Oe(e=>e.toolbar);return(0,s.jsx)(n.Select,{"aria-label":t.toolbar.style.fontSize,className:`rj-editor-toolbar-select`,onChange:(t=``)=>{Df(e,{"font-size":t||null}),r(Se({...i,fontSize:t}))},options:ce.map(e=>({label:e.replace(`px`,``),value:e})),placeholder:t.toolbar.style.fontSizePlaceholder,popupMatchSelectWidth:!1,size:`small`,title:t.toolbar.shortcuts.fontSize,value:i.fontSize==``?void 0:i.fontSize,suffixIcon:(0,s.jsx)(Pf,{})})}function Lf(){let[e]=(0,f.useLexicalComposerContext)(),t=T(),[i,a]=(0,r.useState)(!1),[o,c]=(0,r.useState)(null),l=De(),u=Oe(e=>e.toolbar),d=u.textColor,p=t=>{Df(e,{color:t||null}),l(Se({...u,textColor:t}))};return(0,s.jsx)(n.Dropdown,{menu:{items:[{key:`none`,label:(0,s.jsxs)(`button`,{className:`rj-editor-color-menu-item`,onClick:()=>{p(``),a(!1)},type:`button`,children:[(0,s.jsx)(`span`,{className:`rj-editor-color-none`}),t.common.none]})},...he.map(e=>({key:e,label:(0,s.jsxs)(`button`,{className:`rj-editor-color-menu-item`,onClick:()=>{p(e),a(!1)},type:`button`,children:[(0,s.jsx)(`span`,{className:`rj-editor-color-swatch`,style:{backgroundColor:e}}),e]})})),{type:`divider`},{key:`more-colors`,label:(0,s.jsxs)(`label`,{className:`rj-editor-color-menu-item`,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),children:[(0,s.jsx)(`span`,{className:`rj-editor-color-swatch`,style:{backgroundColor:d||he[0]}}),t.common.moreColors,(0,s.jsx)(`input`,{"aria-label":t.common.moreColors,className:`rj-editor-color-menu-input`,onChange:e=>{p(e.target.value),c(e.target.value),a(!0)},onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),type:`color`,value:d||he[0]})]})}]},onOpenChange:t=>{a(t),!t&&o&&(window.setTimeout(()=>{Df(e,{color:o})}),c(null))},open:i,trigger:[`click`],children:(0,s.jsx)(`button`,{"aria-label":t.toolbar.style.textColor,className:`rj-editor-color-button`,title:t.toolbar.shortcuts.textColor,type:`button`,children:(0,s.jsxs)(`span`,{className:`rj-editor-text-color-mark`,children:[`A`,(0,s.jsx)(`span`,{className:`rj-editor-text-color-line`,style:{backgroundColor:d||`currentColor`}})]})})})}function Rf(){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Ff,{}),(0,s.jsx)(If,{}),(0,s.jsx)(Lf,{}),(0,s.jsx)(jf,{}),(0,s.jsx)(Nf,{})]})}function zf(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M6 16C6 18.2091 7.79086 20 10 20H14C16.2091 20 18 18.2091 18 16C18 13.7909 16.2091 12 14 12M18 8C18 5.79086 16.2091 4 14 4H10C7.79086 4 6 5.79086 6 8M3 12H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Bf(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M6 12H14C16.2091 12 18 10.2091 18 8C18 5.79086 16.2091 4 14 4H6V12ZM6 12H15C17.2091 12 19 13.7909 19 16C19 18.2091 17.2091 20 15 20H6V12Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Vf(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M19 4H10M14 20H5M15 4L9 20`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Hf(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M3 5L13 15M13 5L3 15M21 19.0001H17C17 17.5001 17.44 17.0001 18.5 16.5001C19.56 16.0001 21 15.3301 21 14.0001C21 13.5301 20.83 13.0701 20.52 12.7101C20.1999 12.3476 19.7649 12.1061 19.2879 12.026C18.811 11.9459 18.321 12.0321 17.9 12.2701C17.48 12.5101 17.16 12.8901 17 13.3401`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Uf(e){return(0,s.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,s.jsx)(`path`,{d:`M3 19L13 9M13 19L3 9`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,s.jsx)(`path`,{d:`M17 6.20449C17.824 4.52464 20.0058 4.6741 20.7484 6.20449C20.907 6.53145 21 6.92143 21 7.37007C21 10.428 17 8.60237 17 11.301C17 12.4597 17 11.8301 17 12H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]})}function Wf(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M18 4V11C18 14.3137 15.3137 17 12 17C8.68629 17 6 14.3137 6 11V4M4 21H20`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Gf(){let[e]=(0,f.useLexicalComposerContext)(),t=T(),{isBold:n,isItalic:r,isStrikethrough:i,isSubscript:a,isSuperscript:c,isUnderline:l}=Oe(e=>e.toolbar);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(`button`,{"aria-label":t.toolbar.textFormat.bold,"aria-pressed":n,className:n?`is-active`:void 0,onClick:()=>e.dispatchCommand(o.FORMAT_TEXT_COMMAND,`bold`),title:Ii(`MOD+B`,t.toolbar.shortcuts.bold),type:`button`,children:(0,s.jsx)(Bf,{})}),(0,s.jsx)(`button`,{"aria-label":t.toolbar.textFormat.italic,"aria-pressed":r,className:r?`is-active`:void 0,onClick:()=>e.dispatchCommand(o.FORMAT_TEXT_COMMAND,`italic`),title:Ii(`MOD+I`,t.toolbar.shortcuts.italic),type:`button`,children:(0,s.jsx)(Vf,{})}),(0,s.jsx)(`button`,{"aria-label":t.toolbar.textFormat.underline,"aria-pressed":l,className:l?`is-active`:void 0,onClick:()=>e.dispatchCommand(o.FORMAT_TEXT_COMMAND,`underline`),title:Ii(`MOD+U`,t.toolbar.shortcuts.underline),type:`button`,children:(0,s.jsx)(Wf,{})}),(0,s.jsx)(`button`,{"aria-label":t.toolbar.textFormat.strikethrough,"aria-pressed":i,className:i?`is-active`:void 0,onClick:()=>e.dispatchCommand(o.FORMAT_TEXT_COMMAND,`strikethrough`),title:Ii(`MOD+SHIFT+X`,t.toolbar.shortcuts.strikethrough),type:`button`,children:(0,s.jsx)(zf,{"aria-hidden":`true`})}),(0,s.jsx)(`button`,{"aria-label":t.toolbar.textFormat.subscript,"aria-pressed":a,className:a?`is-active`:void 0,onClick:()=>e.dispatchCommand(o.FORMAT_TEXT_COMMAND,`subscript`),title:Ii(`MOD+=`,t.toolbar.shortcuts.subscript),type:`button`,children:(0,s.jsx)(Hf,{"aria-hidden":`true`})}),(0,s.jsx)(`button`,{"aria-label":t.toolbar.textFormat.superscript,"aria-pressed":c,className:c?`is-active`:void 0,onClick:()=>e.dispatchCommand(o.FORMAT_TEXT_COMMAND,`superscript`),title:Ii(`MOD+SHIFT+=`,t.toolbar.shortcuts.superscript),type:`button`,children:(0,s.jsx)(Uf,{"aria-hidden":`true`})})]})}function Kf({editor:e}){return(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-panel rj-editor-toolbar-panel--home`,role:`tabpanel`,children:[(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-row`,children:[(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,s.jsx)(vf,{editor:e}),(0,s.jsx)(hf,{})]}),(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,s.jsx)(Gf,{}),(0,s.jsx)(hf,{})]}),(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,s.jsx)(kf,{}),(0,s.jsx)(hf,{})]}),(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,s.jsx)(mf,{editor:e}),(0,s.jsx)(hf,{})]})]}),(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-row`,children:[(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,s.jsx)(Rf,{}),(0,s.jsx)(hf,{})]}),(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,s.jsx)(Tf,{editor:e}),(0,s.jsx)(hf,{})]}),(0,s.jsx)(`div`,{className:`rj-editor-toolbar-group`,children:(0,s.jsx)(xf,{})})]})]})}function qf(){let e=(0,o.$getSelection)();if(!(0,o.$isNodeSelection)(e))return null;let t=e.getNodes().find(_d);return _d(t)?t:null}function Jf(){let e=qf();return{isEquationSelected:!!e,selectedEquation:e?.getEquation(),selectedEquationDisplayMode:e?.getDisplayMode(),selectedEquationKey:e?.getKey()}}function Yf(e,t){e.update(()=>{let e=qf();e&&t(e)}),e.focus()}function Xf(e,t){Yf(e,e=>{e.setDisplayMode(t)})}function Zf(e){Yf(e,e=>{e.remove()})}function Qf(e){window.dispatchEvent(new CustomEvent(ie,{detail:e}))}function $f(){let[e]=(0,f.useLexicalComposerContext)(),{isEquationSelected:t,selectedEquationDisplayMode:n}=Oe(e=>e.toolbar);return(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-panel rj-editor-equation-toolbar`,role:`tabpanel`,children:[(0,s.jsx)(`div`,{className:`rj-editor-toolbar-row`,children:(0,s.jsx)(`div`,{className:`rj-editor-toolbar-group rj-editor-equation-symbols`,children:oe.map(e=>(0,s.jsx)(`button`,{disabled:!t,onClick:()=>Qf(e),type:`button`,children:e},e))})}),(0,s.jsx)(`div`,{className:`rj-editor-toolbar-row`,children:(0,s.jsx)(`div`,{className:`rj-editor-toolbar-group`,children:ae.map(e=>(0,s.jsxs)(`button`,{className:`rj-editor-equation-structure`,disabled:!t,onClick:()=>Qf(e.snippet),type:`button`,children:[(0,s.jsx)(`span`,{children:e.value}),(0,s.jsx)(`small`,{children:e.label})]},e.label))})}),(0,s.jsx)(`div`,{className:`rj-editor-toolbar-row`,children:(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,s.jsx)(`button`,{className:n===`block`?`is-active`:void 0,disabled:!t,onClick:()=>Xf(e,`block`),type:`button`,children:`Block`}),(0,s.jsx)(`button`,{className:n===`inline`?`is-active`:void 0,disabled:!t,onClick:()=>Xf(e,`inline`),type:`button`,children:`Inline`}),(0,s.jsx)(`button`,{"aria-label":`Delete equation`,className:`rj-editor-toolbar--clear-btn`,disabled:!t,onClick:()=>Zf(e),type:`button`,children:(0,s.jsx)(kd,{"aria-hidden":`true`})})]})})]})}function ep(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M21 9.25H15M21 4H3M21 14.75H15M21 20H3M4.6 16H9.4C9.96005 16 10.2401 16 10.454 15.891C10.6422 15.7951 10.7951 15.6422 10.891 15.454C11 15.2401 11 14.9601 11 14.4V9.6C11 9.03995 11 8.75992 10.891 8.54601C10.7951 8.35785 10.6422 8.20487 10.454 8.10899C10.2401 8 9.96005 8 9.4 8H4.6C4.03995 8 3.75992 8 3.54601 8.10899C3.35785 8.20487 3.20487 8.35785 3.10899 8.54601C3 8.75992 3 9.03995 3 9.6V14.4C3 14.9601 3 15.2401 3.10899 15.454C3.20487 15.6422 3.35785 15.7951 3.54601 15.891C3.75992 16 4.03995 16 4.6 16Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function tp(e){return(0,s.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,s.jsx)(`path`,{d:`M3 4H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`}),(0,s.jsx)(`path`,{d:`M3 20H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`}),(0,s.jsx)(`rect`,{x:`3`,y:`8`,width:`8`,height:`8`,stroke:`currentColor`,strokeWidth:`2`,strokeLinejoin:`round`})]})}var np={wrapper:`_wrapper_qwfas_1`,disabled:`_disabled_qwfas_20`,affix:`_affix_qwfas_25`,input:`_input_qwfas_40`,inputAffix:`_inputAffix_qwfas_52`};function rp({className:e,decimalScale:t=2,defaultValue:n,integerOnly:i=!1,locale:a=!1,max:o,min:c,onBlur:l,onChange:u,prefix:d,suffix:f,value:p,...m}){let h=r.default.useRef(null),g=typeof p==`number`,[_,v]=r.default.useState(!1),[y,b]=r.default.useState(()=>Qi(g?p:n,a)),x=g&&!_?Qi(p,a):y,S=e=>{let n=zi(e.target.value,t,i),r=Pi(n,a),s=Number(n);b(r),n!==``&&n!==`.`&&Number.isFinite(s)&&u?.(Ni(s,c,o))},C=e=>{v(!1);let t=x.replace(/\s/g,``),n=Number(t);if(t===``||t===`.`||!Number.isFinite(n))b(``);else{let e=Ni(n,c,o);b(Qi(e,a)),u?.(e)}l?.(e)},ee=e=>{let t=h.current;if(!t)return;t.focus();let n=e===`start`?0:t.value.length;t.setSelectionRange(n,n)},te=(0,s.jsx)(`input`,{...m,className:[np.input,d||f?np.inputAffix:``,d||f?``:e].filter(Boolean).join(` `),inputMode:i?`numeric`:`decimal`,onBlur:C,onChange:S,onFocus:e=>{v(!0),m.onFocus?.(e)},ref:h,type:`text`,value:x});return!d&&!f?te:(0,s.jsxs)(`span`,{className:[np.wrapper,m.disabled?np.disabled:``,e].filter(Boolean).join(` `),children:[d?(0,s.jsx)(`span`,{className:np.affix,onMouseDown:e=>{e.preventDefault(),ee(`start`)},children:d}):null,te,f?(0,s.jsx)(`span`,{className:np.affix,onMouseDown:e=>{e.preventDefault(),ee(`end`)},children:f}):null]})}var ip={overlay:`_overlay_n2wo9_1`,modal:`_modal_n2wo9_12`,header:`_header_n2wo9_24`,title:`_title_n2wo9_34`,closeButton:`_closeButton_n2wo9_39`,body:`_body_n2wo9_62`,footer:`_footer_n2wo9_68`,button:`_button_n2wo9_77`,cancelButton:`_cancelButton_n2wo9_90`,okButton:`_okButton_n2wo9_100`};function ap({cancelText:e,children:t,okText:n,onCancel:i,onOk:a,open:o,title:c,width:l=420}){let u=T(),d=r.default.useRef(null),f=r.default.useRef({x:0,y:0}),[p,m]=r.default.useState(null);if(r.default.useEffect(()=>{if(!o)return;let e=e=>{if(e.key===`Escape`){i();return}e.key===`Enter`&&a&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!(e.target instanceof HTMLTextAreaElement)&&(e.preventDefault(),a())};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[i,a,o]),!o||typeof document>`u`)return null;let h=document.fullscreenElement||document.body,g=(e,t)=>{let n=d.current?.getBoundingClientRect(),r=n?.width||l,i=n?.height||0,a=Math.max(8,window.innerWidth-r-8),o=Math.max(8,window.innerHeight-i-8);return{x:Math.min(Math.max(e,8),a),y:Math.min(Math.max(t,8),o)}};return(0,b.createPortal)((0,s.jsx)(`div`,{className:ip.overlay,onMouseDown:e=>{e.target===e.currentTarget&&i()},role:`presentation`,children:(0,s.jsxs)(`div`,{"aria-modal":`true`,className:ip.modal,ref:d,role:`dialog`,style:{"--rj-modal-width":`${l}px`,left:p?.x,position:p?`fixed`:void 0,top:p?.y},children:[(0,s.jsxs)(`div`,{className:ip.header,onPointerDown:e=>{if(e.button!==0)return;let t=d.current?.getBoundingClientRect();t&&(e.currentTarget.setPointerCapture(e.pointerId),f.current={x:e.clientX-t.left,y:e.clientY-t.top},m(g(t.left,t.top)))},onPointerMove:e=>{e.currentTarget.hasPointerCapture(e.pointerId)&&m(g(e.clientX-f.current.x,e.clientY-f.current.y))},onPointerUp:e=>{e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId)},children:[c?(0,s.jsx)(`h2`,{className:ip.title,children:c}):(0,s.jsx)(`span`,{}),(0,s.jsx)(`button`,{"aria-label":u.modal.closeAriaLabel,className:ip.closeButton,onClick:i,onPointerDown:e=>{e.stopPropagation()},type:`button`,children:(0,s.jsx)(Mf,{"aria-hidden":`true`})})]}),(0,s.jsx)(`div`,{className:ip.body,children:t}),a?(0,s.jsxs)(`div`,{className:ip.footer,children:[(0,s.jsx)(`button`,{className:`${ip.button} ${ip.cancelButton}`,onClick:i,type:`button`,children:e||u.common.close}),(0,s.jsx)(`button`,{className:`${ip.button} ${ip.okButton}`,onClick:a,type:`button`,children:n||u.common.save})]}):null]})}),h)}function op(){return(0,s.jsx)(`span`,{className:`rj-editor-toolbar-divider`,"aria-hidden":`true`})}function sp(){let e=(0,o.$getSelection)();if(!(0,o.$isNodeSelection)(e))return null;let t=e.getNodes().find(tf);return tf(t)?t:null}function cp(){let e=sp();return{isImageSelected:!!e,selectedImageAlignment:e?.getAlignment(),selectedImageAltText:e?.getAltText(),selectedImageAspectRatioLocked:e?.getAspectRatioLocked(),selectedImageBorderEnabled:e?.getBorderEnabled(),selectedImageBorderRadius:e?.getBorderRadius(),selectedImageCaption:e?.getCaption(),selectedImageHeight:e?.getHeight(),selectedImageKey:e?.getKey(),selectedImageLinkUrl:e?.getLinkUrl(),selectedImageObjectFit:e?.getObjectFit(),selectedImageRotation:e?.getRotation(),selectedImageShadowEnabled:e?.getShadowEnabled(),selectedImageTextWrap:e?.getTextWrap(),selectedImageWidth:e?.getWidth()}}function lp(e,t){e.update(()=>{let e=sp();e&&t(e)}),e.focus()}function up(e,t,n){e.update(()=>{let e=(0,o.$getNodeByKey)(t);tf(e)&&n(e)}),e.focus()}function dp(e,t){lp(e,e=>{e.setAlignment(t)})}function fp(e,t){lp(e,e=>{e.setWidth(t)})}function pp(e,t){lp(e,e=>{e.setTextWrap(t),t===`square`&&e.getAlignment()===`center`&&e.setAlignment(`left`);let n=e.getParent();n&&!(0,o.$isRootOrShadowRoot)(n)&&n.insertBefore(e)})}function mp(e){lp(e,e=>{e.remove()})}function hp(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M18 5.00802C13.6667 4.84146 5 7.20666 5 18`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})})}function gp(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M2 10C2 10 4.00498 7.26822 5.63384 5.63824C7.26269 4.00827 9.5136 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.89691 21 4.43511 18.2543 3.35177 14.5M8 10H2V4`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function _p(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M21 10C21 10 18.995 7.26822 17.3662 5.63824C15.7373 4.00827 13.4864 3 11 3C6.02944 3 2 7.02944 2 12C2 16.9706 6.02944 21 11 21C15.1031 21 18.5649 18.2543 19.6482 14.5M15 10H21V4`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function vp(){let[e]=(0,f.useLexicalComposerContext)(),t=T(),i=r.default.useRef(null),{isImageSelected:a,selectedImageAlignment:o,selectedImageAltText:c,selectedImageBorderEnabled:l,selectedImageBorderRadius:u,selectedImageCaption:d,selectedImageKey:p,selectedImageLinkUrl:m,selectedImageObjectFit:h,selectedImageRotation:g,selectedImageShadowEnabled:_,selectedImageTextWrap:v,selectedImageWidth:y}=Oe(e=>e.toolbar),[b,x]=r.default.useState(null),[S,C]=r.default.useState(``),ee=r.default.useMemo(()=>[{label:t.toolbar.image.fitContain,value:`contain`},{label:t.toolbar.image.fitCover,value:`cover`},{label:t.toolbar.image.fitFill,value:`fill`}],[t]),te=r.default.useMemo(()=>({alt:{label:t.toolbar.image.alt,placeholder:t.toolbar.image.altPlaceholder,title:t.toolbar.image.editAlt},caption:{label:t.toolbar.image.caption,placeholder:t.toolbar.image.captionPlaceholder,title:t.toolbar.image.editCaption},link:{label:t.toolbar.image.link,placeholder:t.toolbar.image.linkPlaceholder,title:t.toolbar.image.editLink}}),[t]),w=e=>{let t={alt:c||``,caption:d||``,link:m||``};x(e),C(t[e])},ne=()=>{x(null),C(``),e.focus()};return(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-panel rj-editor-toolbar-panel--image`,role:`tabpanel`,children:[(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-row`,children:[(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,s.jsx)(`button`,{"aria-label":t.toolbar.image.alignLeft,className:o===`left`?`is-active`:void 0,disabled:!a,onClick:()=>dp(e,`left`),type:`button`,children:(0,s.jsx)(Dd,{"aria-hidden":`true`})}),(0,s.jsx)(`button`,{"aria-label":t.toolbar.image.alignCenter,className:o===`center`?`is-active`:void 0,disabled:!a,onClick:()=>dp(e,`center`),type:`button`,children:(0,s.jsx)(Ed,{"aria-hidden":`true`})}),(0,s.jsx)(`button`,{"aria-label":t.toolbar.image.alignRight,className:o===`right`?`is-active`:void 0,disabled:!a,onClick:()=>dp(e,`right`),type:`button`,children:(0,s.jsx)(Od,{"aria-hidden":`true`})}),(0,s.jsx)(op,{})]}),(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,s.jsx)(rp,{"aria-label":t.toolbar.image.width,className:`rj-editor-image-width-input`,max:100,min:10,decimalScale:3,suffix:`%`,onChange:t=>fp(e,t),value:y||100}),[25,50,100].map(t=>(0,s.jsxs)(`button`,{className:y===t?`is-active`:void 0,disabled:!a,onClick:()=>fp(e,t),type:`button`,children:[t,`%`]},t)),(0,s.jsx)(op,{})]}),(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,s.jsx)(`button`,{disabled:!a,onClick:()=>w(`alt`),type:`button`,children:t.toolbar.image.alt}),(0,s.jsx)(`button`,{className:d?`is-active`:void 0,disabled:!a,onClick:()=>w(`caption`),type:`button`,children:t.toolbar.image.caption}),(0,s.jsx)(`button`,{className:m?`is-active`:void 0,disabled:!a,onClick:()=>w(`link`),type:`button`,children:t.toolbar.image.link}),(0,s.jsx)(op,{})]})]}),(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-row`,children:[(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,s.jsx)(`button`,{className:l?`is-active`:void 0,disabled:!a,onClick:()=>lp(e,e=>{e.setBorderEnabled(!e.getBorderEnabled())}),type:`button`,children:t.toolbar.image.border}),(0,s.jsx)(rp,{"aria-label":t.toolbar.image.borderRadius,className:`rj-editor-image-border-radius-input`,integerOnly:!0,max:64,min:0,prefix:(0,s.jsx)(hp,{}),onChange:t=>lp(e,e=>e.setBorderRadius(t)),value:u||0}),(0,s.jsx)(`button`,{className:_?`is-active`:void 0,disabled:!a,onClick:()=>lp(e,e=>{e.setShadowEnabled(!e.getShadowEnabled())}),type:`button`,children:t.toolbar.image.shadow}),(0,s.jsx)(op,{})]}),(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,s.jsx)(n.Select,{"aria-label":t.toolbar.image.cropMode,className:`rj-editor-toolbar-select rj-editor-toolbar-select-crop`,disabled:!a,onChange:t=>lp(e,e=>e.setObjectFit(t)),options:ee,size:`small`,suffixIcon:(0,s.jsx)(Pf,{}),value:h||`contain`}),(0,s.jsx)(`button`,{"aria-label":t.toolbar.image.topBottomWrap,className:v===`top-bottom`?`is-active`:void 0,disabled:!a,onClick:()=>pp(e,`top-bottom`),title:t.toolbar.image.topBottomWrap,type:`button`,children:(0,s.jsx)(tp,{"aria-hidden":`true`})}),(0,s.jsx)(`button`,{"aria-label":t.toolbar.image.squareWrap,className:v===`square`?`is-active`:void 0,disabled:!a,onClick:()=>pp(e,`square`),title:t.toolbar.image.squareWrap,type:`button`,children:(0,s.jsx)(ep,{"aria-hidden":`true`})}),(0,s.jsx)(`button`,{"aria-label":t.toolbar.image.rotateLeft,disabled:!a,onClick:()=>lp(e,e=>e.setRotation((g||0)-90)),type:`button`,children:(0,s.jsx)(gp,{})}),(0,s.jsx)(`button`,{"aria-label":t.toolbar.image.rotateRight,disabled:!a,onClick:()=>lp(e,e=>e.setRotation((g||0)+90)),type:`button`,children:(0,s.jsx)(_p,{})}),(0,s.jsx)(op,{})]}),(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,s.jsx)(`button`,{"aria-label":t.toolbar.image.replace,disabled:!a,onClick:()=>{ra(i.current)},type:`button`,children:(0,s.jsx)(Ad,{"aria-hidden":`true`})}),(0,s.jsx)(`button`,{"aria-label":t.toolbar.image.delete,className:`rj-editor-toolbar--clear-btn`,disabled:!a,onClick:()=>mp(e),type:`button`,children:(0,s.jsx)(kd,{"aria-hidden":`true`})}),(0,s.jsx)(`input`,{accept:`image/*`,className:`rj-editor-hidden-file-input`,onChange:async n=>{let r=n.target.files?.[0];if(n.target.value=``,!r)return;if(!r.type.startsWith(`image/`)){window.alert(t.alerts.onlyImages);return}if(r.size>5242880){window.alert(t.alerts.imageSizeLimit);return}let i=await ia(r);lp(e,e=>{e.setSrc(i),e.setAltText(r.name)})},ref:i,type:`file`})]})]}),(0,s.jsx)(ap,{okText:t.common.save,onCancel:ne,onOk:()=>{if(!b||!p){ne();return}let t=S.trim();up(e,p,e=>{if(b===`alt`){e.setAltText(t);return}if(b===`caption`){e.setCaption(t);return}e.setLinkUrl(t?dn(t):``)}),x(null),C(``)},open:!!b,title:b?te[b].title:void 0,children:b?(0,s.jsxs)(`div`,{className:`rj-editor-image-edit-form`,children:[(0,s.jsx)(`label`,{htmlFor:`rj-editor-image-edit-input`,children:te[b].label}),b===`caption`?(0,s.jsx)(`textarea`,{autoFocus:!0,id:`rj-editor-image-edit-input`,onChange:e=>C(e.target.value),placeholder:te[b].placeholder,rows:4,value:S}):(0,s.jsx)(`input`,{autoFocus:!0,id:`rj-editor-image-edit-input`,onChange:e=>C(e.target.value),placeholder:te[b].placeholder,type:b===`link`?`url`:`text`,value:S})]}):null})]})}function yp(){return(0,s.jsx)(`span`,{className:`rj-editor-toolbar-divider`,"aria-hidden":`true`})}function bp(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M4.27209 20.7279L10.8686 14.1314C11.2646 13.7354 11.4627 13.5373 11.691 13.4632C11.8918 13.3979 12.1082 13.3979 12.309 13.4632C12.5373 13.5373 12.7354 13.7354 13.1314 14.1314L19.6839 20.6839M14 15L16.8686 12.1314C17.2646 11.7354 17.4627 11.5373 17.691 11.4632C17.8918 11.3979 18.1082 11.3979 18.309 11.4632C18.5373 11.5373 18.7354 11.7354 19.1314 12.1314L22 15M10 9C10 10.1046 9.10457 11 8 11C6.89543 11 6 10.1046 6 9C6 7.89543 6.89543 7 8 7C9.10457 7 10 7.89543 10 9ZM6.8 21H17.2C18.8802 21 19.7202 21 20.362 20.673C20.9265 20.3854 21.3854 19.9265 21.673 19.362C22 18.7202 22 17.8802 22 16.2V7.8C22 6.11984 22 5.27976 21.673 4.63803C21.3854 4.07354 20.9265 3.6146 20.362 3.32698C19.7202 3 18.8802 3 17.2 3H6.8C5.11984 3 4.27976 3 3.63803 3.32698C3.07354 3.6146 2.6146 4.07354 2.32698 4.63803C2 5.27976 2 6.11984 2 7.8V16.2C2 17.8802 2 18.7202 2.32698 19.362C2.6146 19.9265 3.07354 20.3854 3.63803 20.673C4.27976 21 5.11984 21 6.8 21Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function xp(){let[e]=(0,f.useLexicalComposerContext)(),t=T(),n=r.default.useRef(null);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(`button`,{"aria-label":t.toolbar.insert.image,onClick:()=>{ra(n.current)},onMouseDown:e=>{e.preventDefault()},title:t.toolbar.insert.image,type:`button`,children:(0,s.jsx)(bp,{})}),(0,s.jsx)(`input`,{accept:`image/*`,className:`rj-editor-hidden-file-input`,onChange:async n=>{let r=n.target.files?.[0];if(n.target.value=``,!r){e.focus();return}if(!r.type.startsWith(`image/`)){window.alert(t.alerts.onlyImages),e.focus();return}if(r.size>5242880){window.alert(t.alerts.imageSizeLimit),e.focus();return}let i=await ia(r);e.dispatchCommand(de,{altText:r.name,src:i}),e.focus()},ref:n,type:`file`})]})}function Sp(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M21.1525 10.8999L12.1369 19.9156C10.0866 21.9658 6.7625 21.9658 4.71225 19.9156C2.662 17.8653 2.662 14.5412 4.71225 12.4909L13.7279 3.47532C15.0947 2.10849 17.3108 2.10849 18.6776 3.47532C20.0444 4.84216 20.0444 7.05823 18.6776 8.42507L10.0156 17.0871C9.33213 17.7705 8.22409 17.7705 7.54068 17.0871C6.85726 16.4037 6.85726 15.2957 7.54068 14.6123L15.1421 7.01086`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var Cp=`noreferrer`;function wp({enableShortcutListener:e=!0,showButton:t=!0}){let[n]=(0,f.useLexicalComposerContext)(),i=T(),[a,c]=r.default.useState(!1),[l,u]=r.default.useState(``),[d,p]=r.default.useState(``),[m,h]=r.default.useState(``),[g,_]=r.default.useState(!0),v=r.default.useCallback(()=>{c(!1),n.focus()},[n]),y=r.default.useCallback(()=>{let e=``;n.getEditorState().read(()=>{let t=(0,o.$getSelection)();(0,o.$isRangeSelection)(t)&&(e=t.getTextContent())}),u(e),p(``),h(``),_(!0),c(!0)},[n]);return r.default.useEffect(()=>{if(!e)return;let t=()=>y();return window.addEventListener(me,t),()=>{window.removeEventListener(me,t)}},[e,y]),(0,s.jsxs)(s.Fragment,{children:[t?(0,s.jsx)(`button`,{"aria-label":i.toolbar.insert.link,onClick:y,onMouseDown:e=>{e.preventDefault()},title:Ii(`MOD+K`,i.toolbar.shortcuts.link),type:`button`,children:(0,s.jsx)(Sp,{})}):null,(0,s.jsx)(ap,{okText:i.common.insert,onCancel:v,onOk:()=>{let e=m.trim();if(!e){n.focus();return}let t={rel:Cp,target:g?`_blank`:null,title:d.trim()||null,url:dn(e)};n.focus(()=>{n.update(()=>{let e=(0,o.$getSelection)();if(!(0,o.$isRangeSelection)(e))return;let n=l.trim();if(e.isCollapsed()){let r=tn(t.url,{rel:t.rel,target:t.target,title:t.title});r.append((0,o.$createTextNode)(n||t.url)),e.insertNodes([r]),r.selectEnd();return}n&&n!==e.getTextContent()&&e.insertText(n),ln(t)})}),c(!1)},open:a,title:i.toolbar.insert.link,children:(0,s.jsxs)(`div`,{className:`rj-editor-link-form`,children:[(0,s.jsxs)(`div`,{className:`rj-editor-link-field`,children:[(0,s.jsx)(`label`,{htmlFor:`rj-editor-link-url`,children:i.toolbar.link.url}),(0,s.jsx)(`input`,{autoFocus:!0,id:`rj-editor-link-url`,onChange:e=>h(e.target.value),placeholder:i.toolbar.link.urlPlaceholder,type:`text`,value:m})]}),(0,s.jsxs)(`div`,{className:`rj-editor-link-field`,children:[(0,s.jsx)(`label`,{htmlFor:`rj-editor-link-text`,children:i.toolbar.link.text}),(0,s.jsx)(`input`,{id:`rj-editor-link-text`,onChange:e=>u(e.target.value),placeholder:i.toolbar.link.textPlaceholder,type:`text`,value:l})]}),(0,s.jsxs)(`div`,{className:`rj-editor-link-field`,children:[(0,s.jsx)(`label`,{htmlFor:`rj-editor-link-title`,children:i.toolbar.link.title}),(0,s.jsx)(`input`,{id:`rj-editor-link-title`,onChange:e=>p(e.target.value),placeholder:i.toolbar.link.titlePlaceholder,type:`text`,value:d})]}),(0,s.jsxs)(`label`,{className:`rj-editor-link-checkbox`,children:[(0,s.jsx)(`input`,{checked:g,onChange:e=>_(e.target.checked),type:`checkbox`}),i.toolbar.link.openInNewTab]})]})})]})}function Tp(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M3 12H21M12 3V21M7.8 3H16.2C17.8802 3 18.7202 3 19.362 3.32698C19.9265 3.6146 20.3854 4.07354 20.673 4.63803C21 5.27976 21 6.11984 21 7.8V16.2C21 17.8802 21 18.7202 20.673 19.362C20.3854 19.9265 19.9265 20.3854 19.362 20.673C18.7202 21 17.8802 21 16.2 21H7.8C6.11984 21 5.27976 21 4.63803 20.673C4.07354 20.3854 3.6146 19.9265 3.32698 19.362C3 18.7202 3 17.8802 3 16.2V7.8C3 6.11984 3 5.27976 3.32698 4.63803C3.6146 4.07354 4.07354 3.6146 4.63803 3.32698C5.27976 3 6.11984 3 7.8 3Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var Ep=1,Dp=20,Op=8,kp=10;function Ap({onTableInserted:e}){let[t]=(0,f.useLexicalComposerContext)(),i=T(),a=r.default.useId(),o=r.default.useId(),[c,l]=r.default.useState(!1),[u,d]=r.default.useState(3),[p,m]=r.default.useState(3),[h,g]=r.default.useState(3),[_,v]=r.default.useState(3),[y,b]=r.default.useState(!0),x=(n=u,r=p)=>{t.dispatchCommand(Yn,{columns:String(r),includeHeaders:y?{columns:!1,rows:!0}:!1,rows:String(n)}),l(!1),e?.(),t.focus()};return(0,s.jsx)(n.Dropdown,{dropdownRender:()=>(0,s.jsxs)(`div`,{className:`rj-editor-table-menu`,children:[(0,s.jsx)(`div`,{className:`rj-editor-table-menu-title`,children:i.toolbar.table.insertTableSize.replace(`{columns}`,String(_)).replace(`{rows}`,String(h))}),(0,s.jsx)(`div`,{className:`rj-editor-table-grid`,onMouseLeave:()=>{g(u),v(p)},children:Array.from({length:Op}).map((e,t)=>(0,s.jsx)(r.default.Fragment,{children:Array.from({length:kp}).map((e,n)=>{let r=t+1,a=n+1,o=r<=h&&a<=_;return(0,s.jsx)(`button`,{"aria-label":i.toolbar.table.insertTableSize.replace(`{columns}`,String(a)).replace(`{rows}`,String(r)),className:o?`is-selected`:void 0,onClick:()=>x(r,a),onMouseEnter:()=>{g(r),v(a)},type:`button`},`${t}-${n}`)})},t))}),(0,s.jsx)(`div`,{className:`rj-editor-table-menu-divider`}),(0,s.jsxs)(`div`,{className:`rj-editor-table-menu-row`,children:[(0,s.jsx)(`label`,{htmlFor:a,children:i.toolbar.table.rows}),(0,s.jsx)(rp,{id:a,integerOnly:!0,max:Dp,min:Ep,onChange:d,value:u})]}),(0,s.jsxs)(`div`,{className:`rj-editor-table-menu-row`,children:[(0,s.jsx)(`label`,{htmlFor:o,children:i.toolbar.table.columns}),(0,s.jsx)(rp,{id:o,integerOnly:!0,max:Dp,min:Ep,onChange:m,value:p})]}),(0,s.jsx)(n.Checkbox,{checked:y,onChange:e=>{b(e.target.checked)},children:i.toolbar.table.headerRow}),(0,s.jsx)(n.Button,{block:!0,onClick:()=>x(),size:`small`,type:`primary`,children:i.toolbar.table.insertTable})]}),onOpenChange:e=>{l(e),g(u),v(p)},open:c,trigger:[`click`],children:(0,s.jsx)(`button`,{"aria-label":i.toolbar.table.insertTable,className:c?`is-active`:void 0,onMouseDown:e=>{e.preventDefault()},title:i.toolbar.insert.table,type:`button`,children:(0,s.jsx)(Tp,{})})})}function jp(e){return(0,s.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,s.jsx)(`path`,{d:`M21.5813 7.19989C21.4733 6.76846 21.2534 6.37318 20.9438 6.05395C20.6341 5.73473 20.2457 5.50287 19.8178 5.3818C18.2542 5 12 5 12 5C12 5 5.74578 5 4.18222 5.41816C3.75429 5.53923 3.36588 5.77109 3.05623 6.09031C2.74659 6.40954 2.52666 6.80482 2.41868 7.23625C2.13253 8.82303 1.99255 10.4327 2.00052 12.0451C1.99032 13.6696 2.1303 15.2916 2.41868 16.8903C2.53773 17.3083 2.76258 17.6886 3.0715 17.9943C3.38043 18.3 3.76299 18.5209 4.18222 18.6357C5.74578 19.0538 12 19.0538 12 19.0538C12 19.0538 18.2542 19.0538 19.8178 18.6357C20.2457 18.5146 20.6341 18.2827 20.9438 17.9635C21.2534 17.6443 21.4733 17.249 21.5813 16.8176C21.8653 15.2427 22.0052 13.6453 21.9995 12.0451C22.0097 10.4206 21.8697 8.79862 21.5813 7.19989Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,s.jsx)(`path`,{d:`M9.75 9.46533C9.75 8.98805 9.75 8.74941 9.84974 8.61618C9.93666 8.50008 10.0697 8.42744 10.2144 8.4171C10.3804 8.40525 10.5811 8.53429 10.9826 8.79239L14.9254 11.3271C15.2738 11.551 15.448 11.663 15.5082 11.8054C15.5607 11.9298 15.5607 12.0702 15.5082 12.1946C15.448 12.337 15.2738 12.449 14.9254 12.6729L10.9826 15.2076C10.5811 15.4657 10.3804 15.5948 10.2144 15.5829C10.0697 15.5726 9.93666 15.4999 9.84974 15.3838C9.75 15.2506 9.75 15.012 9.75 14.5347V9.46533Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function Mp(){let[e]=(0,f.useLexicalComposerContext)(),t=T(),[n,i]=r.default.useState(!1),[a,o]=r.default.useState(``),[c,l]=r.default.useState(``),[u,d]=r.default.useState(``);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(`button`,{"aria-label":t.toolbar.insert.youtube,onClick:()=>{o(``),l(``),d(``),i(!0)},onMouseDown:e=>{e.preventDefault()},title:t.toolbar.insert.youtube,type:`button`,children:(0,s.jsx)(jp,{"aria-hidden":`true`})}),(0,s.jsx)(ap,{okText:t.common.insert,onCancel:()=>{i(!1),d(``),e.focus()},onOk:()=>{let n=Ri(c);if(!n){d(t.toolbar.youtube.invalidUrl);return}e.dispatchCommand(fe,{title:a.trim(),videoId:n}),i(!1),d(``),e.focus()},open:n,title:t.toolbar.insert.youtube,children:(0,s.jsxs)(`div`,{className:`rj-editor-youtube-form`,children:[(0,s.jsxs)(`div`,{className:`rj-editor-youtube-field`,children:[(0,s.jsx)(`label`,{htmlFor:`rj-editor-youtube-url`,children:t.toolbar.youtube.url}),(0,s.jsx)(`input`,{autoFocus:!0,id:`rj-editor-youtube-url`,onChange:e=>{l(e.target.value),d(``)},placeholder:t.toolbar.youtube.urlPlaceholder,type:`text`,value:c})]}),(0,s.jsxs)(`div`,{className:`rj-editor-youtube-field`,children:[(0,s.jsx)(`label`,{htmlFor:`rj-editor-youtube-title`,children:t.toolbar.youtube.title}),(0,s.jsx)(`input`,{id:`rj-editor-youtube-title`,onChange:e=>o(e.target.value),placeholder:t.toolbar.youtube.titlePlaceholder,type:`text`,value:a})]}),u?(0,s.jsx)(`p`,{className:`rj-editor-youtube-error`,children:u}):null]})})]})}function Np({onTableInserted:e}){return(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-panel`,role:`tabpanel`,children:[(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,s.jsx)(Ap,{onTableInserted:e}),(0,s.jsx)(wp,{enableShortcutListener:!1}),(0,s.jsx)(yp,{})]}),(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,s.jsx)(xp,{}),(0,s.jsx)(Mp,{})]})]})}function Pp(){return(0,s.jsx)(`div`,{className:`rj-editor-toolbar-panel`,role:`tabpanel`})}function Fp(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M15.9997 11L1.9997 11M9.9997 4L7.9997 2M13.9997 22L1.9997 22M21.9997 16C21.9997 17.1046 21.1043 18 19.9997 18C18.8951 18 17.9997 17.1046 17.9997 16C17.9997 14.8954 19.9997 13 19.9997 13C19.9997 13 21.9997 14.8954 21.9997 16ZM8.9997 3L15.8683 9.86863C16.2643 10.2646 16.4624 10.4627 16.5365 10.691C16.6018 10.8918 16.6018 11.1082 16.5365 11.309C16.4624 11.5373 16.2643 11.7354 15.8683 12.1314L11.2624 16.7373C10.4704 17.5293 10.0744 17.9253 9.61773 18.0737C9.21605 18.2042 8.78335 18.2042 8.38166 18.0737C7.92501 17.9253 7.52899 17.5293 6.73696 16.7373L3.26244 13.2627C2.4704 12.4707 2.07439 12.0747 1.92601 11.618C1.7955 11.2163 1.7955 10.7837 1.92601 10.382C2.07439 9.92531 2.47041 9.52929 3.26244 8.73726L8.9997 3Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Ip(e){return(0,s.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,s.jsx)(`path`,{d:`M3 14H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`}),(0,s.jsx)(`path`,{d:`M3 18H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]})}function Lp(e){return(0,s.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,s.jsx)(`path`,{d:`M3 10H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`}),(0,s.jsx)(`path`,{d:`M3 14H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]})}function Rp(e){return(0,s.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,s.jsx)(`path`,{d:`M3 6H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`}),(0,s.jsx)(`path`,{d:`M3 10H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]})}function zp(){let e=(0,o.$getSelection)();return(0,o.$isRangeSelection)(e)?e.anchor.getNode():A(e)?(0,o.$getNodeByKey)(e.anchor.key):null}function Bp(){let e=(0,o.$getSelection)();if(A(e)){let t=e.getNodes().filter(O);return Array.from(new Map(t.map(e=>[e.getKey(),e])).values())}let t=zp(),n=t?(0,c.$getNearestNodeOfType)(t,Gn):null;return n?[n]:[]}function Vp(){let e=(0,o.$getSelection)();if(A(e)){let t=(0,o.$getNodeByKey)(e.tableKey);return Si(t)?t:null}let t=zp();return t?(0,c.$getNearestNodeOfType)(t,vi):null}function Hp(){let e=Bp(),t=e[0];return{isInTable:e.length>0,selectedTableCellsCount:e.length,tableCellBackgroundColor:t?.getBackgroundColor()||``,tableCellVerticalAlign:t?.getVerticalAlign(),tableHasMergedCell:e.some(e=>e.getColSpan()>1||e.getRowSpan()>1)}}function Up(e,t){e.update(t),e.focus()}function Wp(e,t){Up(e,()=>{or(t)})}function Gp(e,t){Up(e,()=>{cr(t)})}function Kp(e){Up(e,()=>{ur()})}function qp(e){Up(e,()=>{dr()})}function Jp(e){Up(e,()=>{let e=Vp();if(!e)return;let t=(0,o.$createParagraphNode)();e.insertAfter(t),e.remove(),t.select(),(0,o.$getRoot)().getChildrenSize()===0&&(0,o.$getRoot)().append((0,o.$createParagraphNode)())})}function Yp(e){Up(e,()=>{let e=Bp();e.length>1&&mr(e)})}function Xp(e){Up(e,()=>{gr()})}function Zp(e,t){Up(e,()=>{Bp().forEach(e=>{e.setBackgroundColor(t)})})}function Qp(e,t){Up(e,()=>{Bp().forEach(e=>{e.setVerticalAlign(t)})})}function $p(e){Up(e,()=>{let e=Bp()[0];if(!e)return;let[,t]=br(e);t.getChildren().forEach(e=>{O(e)&&e.toggleHeaderStyle(Wn.ROW)})})}function em(e){Up(e,()=>{let e=Bp()[0],t=Vp(),n=e?Sr(e):null;if(!e||!t||!n)return;let[r]=yr(t,null,null),i=new Set;r.forEach(e=>{e.forEach(({cell:e,startColumn:t})=>{t<=n.columnIndex&&t+e.getColSpan()>n.columnIndex&&!i.has(e.getKey())&&(i.add(e.getKey()),e.toggleHeaderStyle(Wn.COLUMN))})})})}function tm(){let[e]=(0,f.useLexicalComposerContext)(),t=T(),[i,a]=(0,r.useState)(!1),[o,c]=(0,r.useState)(null),{isInTable:l,tableCellBackgroundColor:u,tableCellVerticalAlign:d}=Oe(e=>e.toolbar);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.Dropdown,{disabled:!l,menu:{items:[{key:`none`,label:(0,s.jsxs)(`button`,{className:`rj-editor-color-menu-item`,onClick:()=>{Zp(e,null),a(!1)},type:`button`,children:[(0,s.jsx)(`span`,{className:`rj-editor-color-none`}),t.common.none]})},{type:`divider`},...re.map(t=>({key:t,label:(0,s.jsxs)(`button`,{className:`rj-editor-color-menu-item`,onClick:()=>{Zp(e,t),a(!1)},type:`button`,children:[(0,s.jsx)(`span`,{className:`rj-editor-color-swatch`,style:{backgroundColor:t}}),t]})})),{type:`divider`},{key:`more-colors`,label:(0,s.jsxs)(`label`,{className:`rj-editor-color-menu-item`,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),children:[(0,s.jsx)(`span`,{className:`rj-editor-color-swatch`,style:{backgroundColor:u||re[0]}}),t.common.moreColors,(0,s.jsx)(`input`,{"aria-label":t.common.moreColors,className:`rj-editor-color-menu-input`,onChange:t=>{Zp(e,t.target.value),c(t.target.value),a(!0)},onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),type:`color`,value:u||re[0]})]})}]},onOpenChange:t=>{a(t),!t&&o&&(window.setTimeout(()=>{Zp(e,o)}),c(null))},open:i,trigger:[`click`],children:(0,s.jsx)(`button`,{"aria-label":t.toolbar.table.background,className:u?`is-active`:void 0,disabled:!l,onMouseDown:e=>{e.preventDefault()},type:`button`,children:(0,s.jsx)(Fp,{"aria-hidden":`true`})})}),(0,s.jsx)(`button`,{"aria-label":t.toolbar.table.alignTop,className:d===`top`?`is-active`:void 0,disabled:!l,onClick:()=>Qp(e,`top`),type:`button`,children:(0,s.jsx)(Rp,{"aria-hidden":`true`})}),(0,s.jsx)(`button`,{"aria-label":t.toolbar.table.alignMiddle,className:d===`middle`?`is-active`:void 0,disabled:!l,onClick:()=>Qp(e,`middle`),type:`button`,children:(0,s.jsx)(Lp,{"aria-hidden":`true`})}),(0,s.jsx)(`button`,{"aria-label":t.toolbar.table.alignBottom,className:d===`bottom`?`is-active`:void 0,disabled:!l,onClick:()=>Qp(e,`bottom`),type:`button`,children:(0,s.jsx)(Ip,{"aria-hidden":`true`})})]})}function nm(){let[e]=(0,f.useLexicalComposerContext)(),t=T(),n=!Oe(e=>e.toolbar.isInTable);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(`button`,{"aria-label":t.toolbar.table.insertColumnLeft,disabled:n,onClick:()=>Gp(e,!1),type:`button`,children:t.toolbar.table.columnLeft}),(0,s.jsx)(`button`,{"aria-label":t.toolbar.table.insertColumnRight,disabled:n,onClick:()=>Gp(e,!0),type:`button`,children:t.toolbar.table.columnRight})]})}function rm(){let[e]=(0,f.useLexicalComposerContext)(),t=T(),n=!Oe(e=>e.toolbar.isInTable);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(`button`,{"aria-label":t.toolbar.table.deleteRow,className:`rj-editor-toolbar--clear-btn`,disabled:n,onClick:()=>Kp(e),type:`button`,children:[(0,s.jsx)(kd,{"aria-hidden":`true`}),`\xA0`,t.toolbar.table.row]}),(0,s.jsxs)(`button`,{"aria-label":t.toolbar.table.deleteColumn,className:`rj-editor-toolbar--clear-btn`,disabled:n,onClick:()=>qp(e),type:`button`,children:[(0,s.jsx)(kd,{"aria-hidden":`true`}),`\xA0`,t.toolbar.table.column]}),(0,s.jsx)(`button`,{"aria-label":t.toolbar.table.deleteTable,className:`rj-editor-toolbar--clear-btn`,disabled:n,onClick:()=>Jp(e),type:`button`,children:(0,s.jsx)(kd,{"aria-hidden":`true`})})]})}function im(){return(0,s.jsx)(`span`,{className:`rj-editor-toolbar-divider`,"aria-hidden":`true`})}function am(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M9 7L4 12L9 17M15 7L20 12L15 17`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function om(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M7 15L12 20L17 15M7 9L12 4L17 9`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function sm(){let[e]=(0,f.useLexicalComposerContext)(),t=T(),{isInTable:n}=Oe(e=>e.toolbar);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(`button`,{"aria-label":t.toolbar.table.headerRow,disabled:!n,onClick:()=>$p(e),type:`button`,title:t.toolbar.table.headerRow,children:[(0,s.jsx)(am,{}),` \xA0 `,t.toolbar.table.header]}),(0,s.jsxs)(`button`,{"aria-label":t.toolbar.table.header,disabled:!n,onClick:()=>em(e),type:`button`,title:t.toolbar.table.headerColumn,children:[(0,s.jsx)(om,{}),` \xA0 `,t.toolbar.table.header]})]})}function cm(){let[e]=(0,f.useLexicalComposerContext)(),t=T(),{isInTable:n,selectedTableCellsCount:r,tableHasMergedCell:i}=Oe(e=>e.toolbar);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(`button`,{"aria-label":t.toolbar.table.mergeCells,disabled:!n||r<2,onClick:()=>Yp(e),type:`button`,children:t.toolbar.table.mergeCells}),(0,s.jsx)(`button`,{"aria-label":t.toolbar.table.unmergeCell,disabled:!n||!i,onClick:()=>Xp(e),type:`button`,children:t.toolbar.table.unmergeCell})]})}function lm(){let[e]=(0,f.useLexicalComposerContext)(),t=T(),n=!Oe(e=>e.toolbar.isInTable);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(`button`,{"aria-label":t.toolbar.table.insertRowAbove,disabled:n,onClick:()=>Wp(e,!1),type:`button`,children:t.toolbar.table.rowAbove}),(0,s.jsx)(`button`,{"aria-label":t.toolbar.table.insertRowBelow,disabled:n,onClick:()=>Wp(e,!0),type:`button`,children:t.toolbar.table.rowBelow})]})}function um(){return(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-panel`,role:`tabpanel`,children:[(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,s.jsx)(lm,{}),(0,s.jsx)(im,{})]}),(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,s.jsx)(nm,{}),(0,s.jsx)(im,{})]}),(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,s.jsx)(cm,{}),(0,s.jsx)(im,{})]}),(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,s.jsx)(tm,{}),(0,s.jsx)(im,{})]}),(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,s.jsx)(sm,{}),(0,s.jsx)(im,{})]}),(0,s.jsx)(`div`,{className:`rj-editor-toolbar-group`,children:(0,s.jsx)(rm,{})})]})}function dm(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M8 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V8M8 21H7.8C6.11984 21 5.27976 21 4.63803 20.673C4.07354 20.3854 3.6146 19.9265 3.32698 19.362C3 18.7202 3 17.8802 3 16.2V16M21 8V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H16M21 16V16.2C21 17.8802 21 18.7202 20.673 19.362C20.3854 19.9265 19.9265 20.3854 19.362 20.673C18.7202 21 17.8802 21 16.2 21H16`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function fm(e){return(0,s.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,s.jsx)(`path`,{d:`M2.99986 8H3.19986C4.88002 8 5.7201 8 6.36183 7.67302C6.92632 7.3854 7.38526 6.92646 7.67288 6.36197C7.99986 5.72024 7.99986 4.88016 7.99986 3.2V3M2.99986 16H3.19986C4.88002 16 5.7201 16 6.36183 16.327C6.92632 16.6146 7.38526 17.0735 7.67288 17.638C7.99986 18.2798 7.99986 19.1198 7.99986 20.8V21M15.9999 3V3.2C15.9999 4.88016 15.9999 5.72024 16.3268 6.36197C16.6145 6.92646 17.0734 7.3854 17.6379 7.67302C18.2796 8 19.1197 8 20.7999 8H20.9999M15.9999 21V20.8C15.9999 19.1198 15.9999 18.2798 16.3268 17.638C16.6145 17.0735 17.0734 16.6146 17.6379 16.327C18.2796 16 19.1197 16 20.7999 16H20.9999`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var pm=[{value:`home`},{value:`insert`},{value:`equation`},{value:`image`},{value:`table`}];function mm({isFullscreen:e,onToggleFullscreen:t}){let[n]=(0,f.useLexicalComposerContext)(),i=T(),[a,u]=r.default.useState(`home`),p=De(),m=Oe(e=>e.toolbar.isEquationSelected),h=Oe(e=>e.toolbar.isImageSelected),g=Oe(e=>e.toolbar.isInTable),_=m?`equation`:h?`image`:a===`table`&&!g||a===`image`&&!h||a===`equation`&&!m?`home`:a,v=pm.filter(e=>(e.value!==`table`||g)&&(e.value!==`equation`||m)&&(e.value!==`image`||h));return r.default.useEffect(()=>{let e=()=>{let e=(0,o.$getSelection)(),t=Jf(),n=cp(),r=Hp();if(p(be(t)),p(xe(n)),p(Ce(r)),!(0,o.$isRangeSelection)(e))return;let i=e.anchor.getNode(),a=i.getTopLevelElementOrThrow(),s=(0,c.$getNearestNodeOfType)(i,l.ListNode);p(we({isBold:e.hasFormat(`bold`),isItalic:e.hasFormat(`italic`),isStrikethrough:e.hasFormat(`strikethrough`),isSubscript:e.hasFormat(`subscript`),isSuperscript:e.hasFormat(`superscript`),isUnderline:e.hasFormat(`underline`)})),p(Se({backgroundColor:(0,d.$getSelectionStyleValueForProperty)(e,`background-color`,``),fontFamily:(0,d.$getSelectionStyleValueForProperty)(e,`font-family`,``),fontSize:(0,d.$getSelectionStyleValueForProperty)(e,`font-size`,``),lineHeight:(0,d.$getSelectionStyleValueForProperty)(e,`line-height`,``)||void 0,textColor:(0,d.$getSelectionStyleValueForProperty)(e,`color`,``)})),p(_e({alignment:a.getFormatType(),listType:(0,l.$isListNode)(s)?s.getListType():void 0}))},t=n.registerCommand(o.SELECTION_CHANGE_COMMAND,()=>(n.getEditorState().read(e),!1),o.COMMAND_PRIORITY_LOW),r=n.registerUpdateListener(({editorState:t})=>{t.read(e)}),i=n.registerCommand(o.CAN_UNDO_COMMAND,e=>(p(ye(e)),!1),o.COMMAND_PRIORITY_LOW),a=n.registerCommand(o.CAN_REDO_COMMAND,e=>(p(ve(e)),!1),o.COMMAND_PRIORITY_LOW);return()=>{t(),r(),i(),a()}},[p,n]),(0,s.jsxs)(`div`,{className:`rj-editor-toolbar`,"aria-label":`Editor toolbar`,children:[(0,s.jsxs)(`div`,{className:`rj-editor-toolbar-tabs`,children:[(0,s.jsx)(`div`,{className:`rj-editor-toolbar-tabs-list`,role:`tablist`,children:v.map(e=>(0,s.jsx)(`button`,{"aria-selected":_===e.value,className:_===e.value?`is-active`:void 0,onClick:()=>{u(e.value),window.requestAnimationFrame(()=>{n.focus()})},onMouseDown:e=>{e.preventDefault()},role:`tab`,type:`button`,children:i.toolbar.tabs[e.value]},e.value))}),(0,s.jsx)(`button`,{"aria-label":e?i.toolbar.fullscreen.close:i.toolbar.fullscreen.open,className:`rj-editor-toolbar-fullscreen`,onClick:t,type:`button`,children:e?(0,s.jsx)(fm,{"aria-hidden":`true`}):(0,s.jsx)(dm,{"aria-hidden":`true`})})]}),_===`home`?(0,s.jsx)(Kf,{editor:n}):null,_===`equation`?(0,s.jsx)($f,{}):null,_===`image`?(0,s.jsx)(vp,{}):null,_===`insert`?(0,s.jsx)(Np,{onTableInserted:()=>u(`table`)}):null,_===`table`?(0,s.jsx)(um,{}):null,_===`layout`?(0,s.jsx)(Pp,{}):null,(0,s.jsx)(wp,{showButton:!1})]})}function hm(){let[e]=(0,f.useLexicalComposerContext)();return(0,r.useEffect)(()=>e.registerCommand(ue,e=>{let t=gd(e);(0,c.$insertNodeToNearestRoot)(t),e.displayMode!==`inline`&&t.insertAfter((0,o.$createParagraphNode)());let n=(0,o.$createNodeSelection)();return n.add(t.getKey()),(0,o.$setSelection)(n),!0},o.COMMAND_PRIORITY_EDITOR),[e]),null}function gm(e,t){let n=new Map;return Array.from(e||[]).forEach(e=>{e.type.startsWith(`image/`)&&n.set(`${e.name}-${e.size}-${e.lastModified}`,e)}),Array.from(t||[]).forEach(e=>{if(e.kind!==`file`||!e.type.startsWith(`image/`))return;let t=e.getAsFile();t&&n.set(`${t.name}-${t.size}-${t.lastModified}`,t)}),Array.from(n.values())}async function _m(e,t){if(e.size>5242880)return window.alert(t),null;let n=await ia(e);return{altText:e.name,src:n}}function vm(){let[e]=(0,f.useLexicalComposerContext)(),t=T();return(0,r.useEffect)(()=>{let n=async n=>{for(let r of n){let n=await _m(r,t.alerts.imageSizeLimit);n&&e.dispatchCommand(de,n)}},r=e.registerCommand(de,e=>{let t=ef(e);return(0,c.$insertNodeToNearestRoot)(t),t.insertAfter((0,o.$createParagraphNode)()),!0},o.COMMAND_PRIORITY_EDITOR),i=e.registerCommand(o.PASTE_COMMAND,e=>{if(!(e instanceof ClipboardEvent))return!1;let t=gm(e.clipboardData?.files,e.clipboardData?.items);return t.length===0?!1:(e.preventDefault(),n(t),!0)},o.COMMAND_PRIORITY_LOW),a=e.registerCommand(o.DRAGOVER_COMMAND,e=>gm(e.dataTransfer?.files,e.dataTransfer?.items).length===0?!1:(e.preventDefault(),!0),o.COMMAND_PRIORITY_LOW),s=e.registerCommand(o.DROP_COMMAND,e=>{let t=gm(e.dataTransfer?.files,e.dataTransfer?.items);return t.length===0?!1:(e.preventDefault(),n(t),!0)},o.COMMAND_PRIORITY_LOW);return()=>{r(),i(),a(),s()}},[e,t.alerts.imageSizeLimit]),null}function ym(e){return e.metaKey||e.ctrlKey}function bm(e){return e instanceof HTMLElement?[`INPUT`,`SELECT`,`TEXTAREA`].includes(e.tagName):!1}function xm(){let[e]=(0,f.useLexicalComposerContext)(),t=De();return(0,r.useEffect)(()=>{let n=()=>{Of(e),t(we({isBold:!1,isItalic:!1,isStrikethrough:!1,isSubscript:!1,isSuperscript:!1,isUnderline:!1})),t(Se({backgroundColor:le.backgroundColor,fontFamily:le.fontFamily,fontSize:le.fontSize,lineHeight:le.lineHeight,textColor:le.textColor})),t(_e({alignment:le.alignment,listType:le.listType}))};return e.registerCommand(o.KEY_DOWN_COMMAND,t=>{if(!ym(t)||t.altKey||bm(t.target))return!1;let r=t.key.toLowerCase(),i=t.shiftKey;return r===`b`&&!i?(t.preventDefault(),e.dispatchCommand(o.FORMAT_TEXT_COMMAND,`bold`),!0):r===`i`&&!i?(t.preventDefault(),e.dispatchCommand(o.FORMAT_TEXT_COMMAND,`italic`),!0):r===`u`&&!i?(t.preventDefault(),e.dispatchCommand(o.FORMAT_TEXT_COMMAND,`underline`),!0):r===`x`&&i?(t.preventDefault(),e.dispatchCommand(o.FORMAT_TEXT_COMMAND,`strikethrough`),!0):t.key===`=`&&!i?(t.preventDefault(),e.dispatchCommand(o.FORMAT_TEXT_COMMAND,`subscript`),!0):(t.key===`=`||t.key===`+`)&&i?(t.preventDefault(),e.dispatchCommand(o.FORMAT_TEXT_COMMAND,`superscript`),!0):r===`z`&&!i?(t.preventDefault(),e.dispatchCommand(o.UNDO_COMMAND,void 0),!0):r===`z`&&i||r===`y`?(t.preventDefault(),e.dispatchCommand(o.REDO_COMMAND,void 0),!0):r===`k`&&!i?(t.preventDefault(),window.dispatchEvent(new CustomEvent(me)),!0):t.key===`7`&&i?(t.preventDefault(),e.dispatchCommand(l.INSERT_ORDERED_LIST_COMMAND,void 0),!0):t.key===`8`&&i?(t.preventDefault(),e.dispatchCommand(l.INSERT_UNORDERED_LIST_COMMAND,void 0),!0):t.key===`[`&&!i?(t.preventDefault(),e.dispatchCommand(o.OUTDENT_CONTENT_COMMAND,void 0),!0):t.key===`]`&&!i?(t.preventDefault(),e.dispatchCommand(o.INDENT_CONTENT_COMMAND,void 0),!0):t.key===`\\`&&!i?(t.preventDefault(),n(),!0):i?r===`l`?(t.preventDefault(),e.dispatchCommand(o.FORMAT_ELEMENT_COMMAND,`left`),!0):r===`c`?(t.preventDefault(),e.dispatchCommand(o.FORMAT_ELEMENT_COMMAND,`center`),!0):r===`r`?(t.preventDefault(),e.dispatchCommand(o.FORMAT_ELEMENT_COMMAND,`right`),!0):r===`j`?(t.preventDefault(),e.dispatchCommand(o.FORMAT_ELEMENT_COMMAND,`justify`),!0):!1:!1},o.COMMAND_PRIORITY_CRITICAL)},[t,e]),null}function Sm(e){return Si(e)||tf(e)||cf(e)}function Cm(){let[e]=(0,f.useLexicalComposerContext)();return(0,r.useEffect)(()=>e.registerUpdateListener(({editorState:t})=>{let n=!1,r=null;t.read(()=>{let e=(0,o.$getRoot)().getChildren();n=Sm(e.at(-1));for(let t=0;t<e.length-1;t+=1)if(Sm(e[t])&&Sm(e[t+1])){r=e[t].getKey();break}}),!(!n&&!r)&&e.update(()=>{if(r){let e=(0,o.$getRoot)().getChildren().find(e=>e.getKey()===r);if(Sm(e)){e.insertAfter((0,o.$createParagraphNode)());return}}let e=(0,o.$getRoot)().getLastChild();Sm(e)&&e.insertAfter((0,o.$createParagraphNode)())})}),[e]),null}function wm(){let[e]=(0,f.useLexicalComposerContext)();return(0,r.useEffect)(()=>{let t=e.registerCommand(fe,e=>{let t=sf(e),n=(0,o.$createParagraphNode)();return(0,c.$insertNodeToNearestRoot)(t),t.insertAfter(n),n.select(),!0},o.COMMAND_PRIORITY_EDITOR),n=e.registerUpdateListener(({editorState:t})=>{let n=!1;t.read(()=>{n=cf((0,o.$getRoot)().getLastChild())}),n&&e.update(()=>{let e=(0,o.$getRoot)().getLastChild();cf(e)&&e.insertAfter((0,o.$createParagraphNode)())})});return()=>{t(),n()}},[e]),null}function Tm(e,t,n){n&&e.read(()=>{n(Zi((0,u.$generateHtmlFromNodes)(t),t),JSON.stringify(e.toJSON()),e)})}function Em({lastHtmlRef:e,value:t}){let[n]=(0,f.useLexicalComposerContext)();return r.default.useEffect(()=>{t===void 0||t===e.current||n.update(()=>{cd(n,t),e.current=t})},[n,e,t]),null}function Dm({autofocus:e,className:t,editorRef:n,id:i,isFullscreen:a,onBlur:o,onChange:c,onFocus:l,onToggleFullscreen:d,placeholder:f,value:b}){let x=T(),S=r.default.useRef(b);return(0,s.jsxs)(`div`,{className:[`rj-editor`,a?`rj-editor--fullscreen`:``,t].filter(Boolean).join(` `),id:i,onBlur:o,onFocus:l,ref:n,children:[(0,s.jsx)(mm,{isFullscreen:a,onToggleFullscreen:d}),(0,s.jsxs)(`div`,{className:`rj-editor-body`,children:[(0,s.jsx)(y.RichTextPlugin,{contentEditable:(0,s.jsx)(m.ContentEditable,{className:`rj-editor-input`}),ErrorBoundary:h.LexicalErrorBoundary,placeholder:(0,s.jsx)(`div`,{className:`rj-editor-placeholder`,children:f===void 0?x.placeholders.editor:f})}),(0,s.jsx)(g.HistoryPlugin,{}),(0,s.jsx)(hm,{}),(0,s.jsx)(vm,{}),(0,s.jsx)(xm,{}),(0,s.jsx)(wm,{}),(0,s.jsx)(df,{}),(0,s.jsx)(_.ListPlugin,{}),(0,s.jsx)(ff,{hasHorizontalScroll:!0}),(0,s.jsx)(Cm,{}),(0,s.jsx)(Em,{lastHtmlRef:S,value:b}),(0,s.jsx)(v.OnChangePlugin,{onChange:(e,t)=>{e.read(()=>{S.current=Zi((0,u.$generateHtmlFromNodes)(t),t)}),Tm(e,t,c)}}),e?(0,s.jsx)(p.AutoFocusPlugin,{}):null]})]})}function Om({autofocus:e=!1,className:a,defaultValue:o,id:c,locale:l=`en`,locales:u,namespace:d=`RJEditor`,onBlur:f,onChange:p,onFocus:m,placeholder:h,translations:g,value:_}){let v=r.default.useMemo(()=>Ee(),[]),y=r.default.useRef(null),[b,x]=r.default.useState(!1),S=uf({defaultValue:o,namespace:d,value:_});return r.default.useEffect(()=>{let e=()=>{x(document.fullscreenElement===y.current)};return document.addEventListener(`fullscreenchange`,e),()=>{document.removeEventListener(`fullscreenchange`,e)}},[]),(0,s.jsx)(i.Provider,{store:v,children:(0,s.jsx)(Ie,{locale:l,locales:u,translations:g,children:(0,s.jsx)(n.ConfigProvider,{getPopupContainer:r.default.useCallback(e=>document.fullscreenElement||y.current||e?.parentElement||document.body,[]),children:(0,s.jsx)(t.LexicalComposer,{initialConfig:S,children:(0,s.jsx)(Dm,{autofocus:e,className:a,editorRef:y,id:c,isFullscreen:b,onBlur:f,onChange:p,onFocus:m,onToggleFullscreen:async()=>{if(document.fullscreenElement===y.current){await document.exitFullscreen();return}await y.current?.requestFullscreen()},placeholder:h,value:_})})})})})}e.RJEditorI18nProvider=Ie,e.RJTextEditor=Om,e.enTranslations=ke,e.mergeTranslations=je,e.ruTranslations=Me,e.useRJEditorI18n=T,e.uzTranslations=Ne});