athif-custom-package 1.0.1 → 1.0.2

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 (3) hide show
  1. package/dist/index.cjs +185 -185
  2. package/dist/index.js +639 -636
  3. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -11,7 +11,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
11
11
  ▯`,insert:`\\enclose{verticalstrike}{#?}`,cls:`template`,directInsert:!0,title:`Vertical Strike`,icon:`vertical-strike-template-image`},{label:`)
12
12
  ¯`,insert:`\\overline{\\left)#?\\right.}`,cls:`template`,directInsert:!0,title:`Overline with Curved Left Boundary`,icon:`overline-left-curve-template-image`},{label:`?
13
13
  ?`,insert:`\\enclose{verticalstrike}{\\htmlStyle{text-decoration:line-through;text-decoration-skip-ink:none;}{#0}}`,cls:`template`,directInsert:!0,title:`Vertical and Horizontal Strike`,icon:`crosshair-strike-template-image`}],arithmeticLayoutExtras:[{label:`diff-array`,insert:`\\frac{\\begin{array}{r}#?\\\\-\\,#?\\end{array}}{\\quad#?}`,directInsert:!0,icon:`difference-array-template-image`,title:`Column Subtraction`},{label:`stack-line`,insert:`\\frac{\\begin{array}{c}#?\\\\#?\\end{array}}{#?}`,cls:`template`,directInsert:!0,icon:`stack-line-template-image`,title:`Stacked Line Layout`},{label:`product-array`,insert:`\\frac{\\begin{array}{r}#?\\\\\\times\\,#?\\end{array}}{\\quad#?}`,cls:`template`,directInsert:!0,icon:`product-array-template-image`,title:`Column Multiplication`},{label:`mixed-fraction`,insert:`#?\\frac{#?}{#?}`,cls:`template`,directInsert:!0,icon:`mixed-fraction-template-image`,title:`Mixed Fraction`},{label:`array-cc`,insert:`\\left.\\begin{array}{c}#?\\\\#?\\end{array}\\right|\\frac{#?}{#?}`,cls:`template`,directInsert:!0,icon:`array-cc-template-image`,title:`Split Column With Fraction`},{label:`division-remainder`,insert:`\\begin{array}{r} \\overset{#?}{\\overline{#?\\big)#?}} \\\\ #? \\end{array}`,cls:`template`,directInsert:!0,icon:`division-remainder-template-image`,title:`Division With Remainder`}]};function _(e,t=`More Symbols`){return{label:`|`,action:`RELATION_MORE_PICKER`,picker:e,title:t,icon:`vertical-line-picker-template-image`,cls:`arrow-picker-tool relation-more-picker-tool`}}var v=[{label:`cancel`,insert:`\\cancel{#0}`,title:`Negate / Cross Out`,icon:`negate-template-image`},{type:`sep`,cols:1},{label:`+`,insert:`+`},{label:`−`,insert:`-`},{label:`±`,insert:`\\pm`},{label:`×`,insert:`\\times`},{label:`÷`,insert:`\\div`},{label:`*`,insert:`\\ast`},{label:`·`,insert:`\\cdot`},{label:`/`,insert:`/`},{label:`∘`,insert:`∘`},_(`operatorExtras`,`More Operators`),{type:`sep`,cols:5},{label:`π`,insert:`\\pi`},{label:`∞`,insert:`\\infty`},{label:`∅`,insert:`\\emptyset`},{label:`∂`,insert:`\\partial`},{label:`Δ`,insert:`\\Delta`},{label:`∇`,insert:`\\nabla`},{label:`°`,insert:`\\degree`},{label:`′`,insert:`'`,cls:`prime-symbol-tool`},{label:`″`,insert:`''`,cls:`prime-symbol-tool`},_(`primeExtras`,`More Prime Symbols`),{type:`sep`,cols:3},{label:`~`,insert:`\\sim`},{label:`≃`,insert:`\\simeq`},{label:`≡`,insert:`\\equiv`},{label:`≈`,insert:`\\approx`},{label:`≅`,insert:`\\cong`},_(`notEqualExtras`,`More Not Equal Relations`),{type:`sep`,cols:3},{label:`>`,insert:`>`},{label:`≥`,insert:`\\geq`},{label:`⩾`,insert:`\\geqslant`,title:`Greater Than or Slanted Equal To`},{label:`<`,insert:`<`},{label:`≤`,insert:`\\leq`},{label:`⩽`,insert:`\\leqslant`,title:`Less Than or Slanted Equal To`},_(`comparisonExtras`,`More Comparison Symbols`),{type:`sep`,cols:3},{label:`∈`,insert:`\\in`},{label:`∪`,insert:`\\cup`},{label:`⊂`,insert:`\\subset`},{label:`∋`,insert:`\\ni`},{label:`∩`,insert:`\\cap`},{label:`⊃`,insert:`\\supset`},_(`setExtras`,`More Set Symbols`),{type:`sep`,cols:3},{label:`∧`,insert:`\\land`},{label:`¬`,insert:`\\neg`},{label:`∃`,insert:`\\exists`},{label:`∨`,insert:`\\lor`},{label:`∀`,insert:`\\forall`},{label:`∄`,insert:`\\nexists`},_(`logicExtras`,`More Logic Symbols`),{type:`sep`,cols:2},{label:`∠`,insert:`\\angle`},{label:`∥`,insert:`\\parallel`},{label:`⊥`,insert:`\\perp`},_(`geometryExtras`,`More Geometry Symbols`),{type:`sep`,cols:3},{label:`□`,insert:`\\square`},{label:`△`,insert:`\\triangle`},{label:`○`,insert:`\\bigcirc`},_(`shapeExtras`,`More Shape Symbols`),{type:`sep`,cols:3},{label:`⊕`,insert:`\\oplus`},{label:`⊗`,insert:`\\otimes`},{label:`⊙`,insert:`\\odot`},_(`circledExtras`,`More Circled Operators`)],y=[{label:`↗`,insert:`\\nearrow`,title:`North East Arrow`},{label:`↘`,insert:`\\searrow`,title:`South East Arrow`},{label:`↖`,insert:`\\nwarrow`,title:`North West Arrow`},{label:`↙`,insert:`\\swarrow`,title:`South West Arrow`},{label:`⤡`,insert:`⤡`,title:`North East and South West Arrow`},{label:`⤢`,insert:`⤢`,title:`North West and South East Arrow`},{label:`↩`,insert:`\\hookleftarrow`,title:`Hook Left Arrow`},{label:`↪`,insert:`\\hookrightarrow`,title:`Hook Right Arrow`},{label:`↼`,insert:`\\leftharpoonup`,title:`Left Harpoon Up`},{label:`⇀`,insert:`\\rightharpoonup`,title:`Right Harpoon Up`},{label:`↑`,insert:`\\uparrow`,title:`Up Arrow`},{label:`↓`,insert:`\\downarrow`,title:`Down Arrow`},{label:`⇑`,insert:`\\Uparrow`,title:`Double Up Arrow`},{label:`⇓`,insert:`\\Downarrow`,title:`Double Down Arrow`},{label:`⥪`,insert:`⥪`,title:`Leftwards Arrow with Hook`},{label:`⥭`,insert:`⥭`,title:`Rightwards Arrow with Hook`},{label:`⇋`,insert:`\\leftrightharpoons`,title:`Reverse Equilibrium Harpoons`},{label:`⇌`,insert:`\\rightleftharpoons`,title:`Equilibrium Harpoons`},{label:`↽`,insert:`\\leftharpoondown`,title:`Left Harpoon Down`},{label:`⇁`,insert:`\\rightharpoondown`,title:`Right Harpoon Down`},{label:`⇆`,insert:`⇆`,title:`Leftwards Arrow over Rightwards Arrow`},{label:`⇄`,insert:`\\rightleftarrows`,title:`Rightwards Arrow over Leftwards Arrow`},{label:`⇅`,insert:`⇅`,title:`Upwards Arrow Left of Downwards Arrow`},{label:`⇵`,insert:`⇵`,title:`Downwards Arrow Left of Upwards Arrow`},{label:`⥮`,insert:`⥮`,title:`Upwards Harpoon with Barb Left beside Downwards Harpoon with Barb Right`},{label:`⥯`,insert:`⥯`,title:`Downwards Harpoon with Barb Left beside Upwards Harpoon with Barb Right`},{label:`⇄`,insert:`\\rightleftarrows`,title:`Rightwards Arrow over Short Leftwards Arrow`,preview:`rightleft-short-left`},{label:`→
14
- ←`,insert:`\\overset{\\to}{\\longleftarrow}`,title:`Short Rightwards Arrow over Leftwards Arrow`,preview:`right-short-over-left-long`},{label:`↕`,insert:`\\updownarrow`,title:`Up Down Arrow`},{label:`⇕`,insert:`\\Updownarrow`,title:`Double Up Down Arrow`},{label:`↵`,insert:`↵`,title:`Downwards Arrow with Corner Leftwards`}],b=[{insert:`\\xleftrightarrow{#0}`,title:`Right Left Arrows with Overscript`,icon:`right-left-arrows-over`},{insert:`\\xleftrightarrow[#0]{}`,title:`Right Left Arrows with Underscript`,icon:`right-left-arrows-under`},{insert:`\\xleftrightarrow[#?]{#0}`,title:`Right Left Arrows with Under and Overscript`,icon:`right-left-arrows-over-under`},{insert:`\\xleftrightarrows{#0}`,title:`Left Arrow over Right Arrow with Overscript`,icon:`left-right-arrows-over`},{insert:`\\xleftrightarrows[#0]{}`,title:`Left Arrow over Right Arrow with Underscript`,icon:`left-right-arrows-under`},{insert:`\\xleftrightarrows[#?]{#0}`,title:`Left Arrow over Right Arrow with Under and Overscript`,icon:`left-right-arrows-over-under`},{insert:`\\xleftright arrows{#0}`,title:`Right Arrow over Left Arrow with Overscript`,icon:`right-left-stacked-arrows-over`},{insert:`\\xleftrightarrows[#0]{}`,title:`Right Arrow over Left Arrow with Underscript`,icon:`right-left-stacked-arrows-under`},{insert:`\\xleftrightarrows[#?]{#0}`,title:`Right Arrow over Left Arrow with Under and Overscript`,icon:`right-left-stacked-arrows-over-under`},{insert:`\\xleftrightharpoons{#0}`,title:`Left Harpoon over Right Harpoon with Overscript`,icon:`left-right-harpoons-over`},{insert:`\\xleftrightharpoons[#0]{}`,title:`Left Harpoon over Right Harpoon with Underscript`,icon:`left-right-harpoons-under`},{insert:`\\xleftrightharpoons[#?]{#0}`,title:`Left Harpoon over Right Harpoon with Under and Overscript`,icon:`left-right-harpoons-over-under`},{insert:`\\xrightleftharpoons{#0}`,title:`Right Harpoon over Left Harpoon with Overscript`,icon:`right-left-harpoons-over`},{insert:`\\xrightleftharpoons[#0]{}`,title:`Right Harpoon over Left Harpoon with Underscript`,icon:`right-left-harpoons-under`},{insert:`\\xrightleftharpoons[#?]{#0}`,title:`Right Harpoon over Left Harpoon with Under and Overscript`,icon:`right-left-harpoons-over-under`},{insert:`\\overset{#0}{\\rightleftarrows}`,title:`Rightwards Arrow over Short Leftwards Arrow with Overscript`,icon:`long-right-short-left-over`},{insert:`\\underset{#0}{\\rightleftarrows}`,title:`Rightwards Arrow over Short Leftwards Arrow with Underscript`,icon:`long-right-short-left-under`},{insert:`\\overset{#0}{\\underset{#?}{\\rightleftarrows}}`,title:`Rightwards Arrow over Short Leftwards Arrow with Under and Overscript`,icon:`long-right-short-left-over-under`},{insert:`\\overset{#0}{\\rightleftarrows}`,title:`Short Rightwards Arrow over Leftwards Arrow with Overscript`,icon:`short-right-long-left-over`},{insert:`\\underset{#0}{\\rightleftarrows}`,title:`Short Rightwards Arrow over Leftwards Arrow with Underscript`,icon:`short-right-long-left-under`},{insert:`\\overset{#0}{\\underset{#?}{\\rightleftarrows}}`,title:`Short Rightwards Arrow over Leftwards Arrow with Under and Overscript`,icon:`short-right-long-left-over-under`}],x=[{label:`Α`,insert:`\\mathit{Α}`,title:`Italic Alpha`},{label:`Β`,insert:`\\mathit{Β}`,title:`Italic Beta`},{label:`Γ`,insert:`\\varGamma`,title:`Italic Gamma`},{label:`Δ`,insert:`\\varDelta`,title:`Italic Delta`},{label:`Ε`,insert:`\\mathit{Ε}`,title:`Italic Epsilon`},{label:`Ζ`,insert:`\\mathit{Ζ}`,title:`Italic Zeta`},{label:`Η`,insert:`\\mathit{Η}`,title:`Italic Eta`},{label:`Θ`,insert:`\\varTheta`,title:`Italic Theta`},{label:`Ι`,insert:`\\mathit{Ι}`,title:`Italic Iota`},{label:`Κ`,insert:`\\mathit{Κ}`,title:`Italic Kappa`},{label:`Λ`,insert:`\\varLambda`,title:`Italic Lambda`},{label:`Μ`,insert:`\\mathit{Μ}`,title:`Italic Mu`},{label:`Ν`,insert:`\\mathit{Ν}`,title:`Italic Nu`},{label:`Ξ`,insert:`\\varXi`,title:`Italic Xi`},{label:`Ο`,insert:`\\mathit{Ο}`,title:`Italic Omicron`},{label:`Π`,insert:`\\varPi`,title:`Italic Pi`},{label:`Ρ`,insert:`\\mathit{Ρ}`,title:`Italic Rho`},{label:`Σ`,insert:`\\varSigma`,title:`Italic Sigma`},{label:`Τ`,insert:`\\mathit{Τ}`,title:`Italic Tau`},{label:`Υ`,insert:`\\varUpsilon`,title:`Italic Upsilon`},{label:`Φ`,insert:`\\varPhi`,title:`Italic Phi`},{label:`Χ`,insert:`\\mathit{Χ}`,title:`Italic Chi`},{label:`Ψ`,insert:`\\varPsi`,title:`Italic Psi`},{label:`Ω`,insert:`\\varOmega`,title:`Italic Omega`}],S=[[`𝔸`,`A`],[`𝔹`,`B`],[`ℂ`,`C`],[`𝔻`,`D`],[`𝔼`,`E`],[`𝔽`,`F`],[`𝔾`,`G`],[`ℍ`,`H`],[`𝕀`,`I`],[`𝕁`,`J`],[`𝕂`,`K`],[`𝕃`,`L`],[`𝕄`,`M`],[`ℕ`,`N`],[`𝕆`,`O`],[`ℙ`,`P`],[`ℚ`,`Q`],[`ℝ`,`R`],[`𝕊`,`S`],[`𝕋`,`T`],[`𝕌`,`U`],[`𝕍`,`V`],[`𝕎`,`W`],[`𝕏`,`X`],[`𝕐`,`Y`],[`ℤ`,`Z`],[`𝕒`,`a`],[`𝕓`,`b`],[`𝕔`,`c`],[`𝕕`,`d`],[`𝕖`,`e`],[`𝕗`,`f`],[`𝕘`,`g`],[`𝕙`,`h`],[`𝕚`,`i`],[`𝕛`,`j`],[`𝕜`,`k`],[`𝕝`,`l`],[`𝕞`,`m`],[`𝕟`,`n`],[`𝕠`,`o`],[`𝕡`,`p`],[`𝕢`,`q`],[`𝕣`,`r`],[`𝕤`,`s`],[`𝕥`,`t`],[`𝕦`,`u`],[`𝕧`,`v`],[`𝕨`,`w`],[`𝕩`,`x`],[`𝕪`,`y`],[`𝕫`,`z`]].map(([e,t])=>({label:e,insert:`\\mathbb{${t}}`,title:`Blackboard Bold ${t}`})),C=[[`𝔄`,`\\mathfrak{A}`,`Fraktur A`],[`𝔅`,`\\mathfrak{B}`,`Fraktur B`],[`ℭ`,`\\mathfrak{C}`,`Fraktur C`],[`𝔇`,`\\mathfrak{D}`,`Fraktur D`],[`𝔈`,`\\mathfrak{E}`,`Fraktur E`],[`𝔉`,`\\mathfrak{F}`,`Fraktur F`],[`𝔊`,`\\mathfrak{G}`,`Fraktur G`],[`ℌ`,`\\mathfrak{H}`,`Fraktur H`],[`ℑ`,`\\mathfrak{I}`,`Fraktur I`],[`𝔍`,`\\mathfrak{J}`,`Fraktur J`],[`𝔎`,`\\mathfrak{K}`,`Fraktur K`],[`𝔏`,`\\mathfrak{L}`,`Fraktur L`],[`𝔐`,`\\mathfrak{M}`,`Fraktur M`],[`𝔑`,`\\mathfrak{N}`,`Fraktur N`],[`𝔒`,`\\mathfrak{O}`,`Fraktur O`],[`𝔓`,`\\mathfrak{P}`,`Fraktur P`],[`𝔔`,`\\mathfrak{Q}`,`Fraktur Q`],[`ℜ`,`\\mathfrak{R}`,`Fraktur R`],[`𝔖`,`\\mathfrak{S}`,`Fraktur S`],[`𝔗`,`\\mathfrak{T}`,`Fraktur T`],[`𝔘`,`\\mathfrak{U}`,`Fraktur U`],[`𝔙`,`\\mathfrak{V}`,`Fraktur V`],[`𝔚`,`\\mathfrak{W}`,`Fraktur W`],[`𝔛`,`\\mathfrak{X}`,`Fraktur X`],[`𝔜`,`\\mathfrak{Y}`,`Fraktur Y`],[`ℨ`,`\\mathfrak{Z}`,`Fraktur Z`],[`𝔞`,`\\mathfrak{a}`,`Fraktur a`],[`𝔟`,`\\mathfrak{b}`,`Fraktur b`],[`𝔠`,`\\mathfrak{c}`,`Fraktur c`],[`𝔡`,`\\mathfrak{d}`,`Fraktur d`],[`𝔢`,`\\mathfrak{e}`,`Fraktur e`],[`𝔣`,`\\mathfrak{f}`,`Fraktur f`],[`𝔤`,`\\mathfrak{g}`,`Fraktur g`],[`𝔥`,`\\mathfrak{h}`,`Fraktur h`],[`𝔦`,`\\mathfrak{i}`,`Fraktur i`],[`𝔧`,`\\mathfrak{j}`,`Fraktur j`],[`𝔨`,`\\mathfrak{k}`,`Fraktur k`],[`𝔩`,`\\mathfrak{l}`,`Fraktur l`],[`𝔪`,`\\mathfrak{m}`,`Fraktur m`],[`𝔫`,`\\mathfrak{n}`,`Fraktur n`],[`𝔬`,`\\mathfrak{o}`,`Fraktur o`],[`𝔭`,`\\mathfrak{p}`,`Fraktur p`],[`𝔮`,`\\mathfrak{q}`,`Fraktur q`],[`𝔯`,`\\mathfrak{r}`,`Fraktur r`],[`𝔰`,`\\mathfrak{s}`,`Fraktur s`],[`𝔱`,`\\mathfrak{t}`,`Fraktur t`],[`𝔲`,`\\mathfrak{u}`,`Fraktur u`],[`𝔳`,`\\mathfrak{v}`,`Fraktur v`],[`𝔴`,`\\mathfrak{w}`,`Fraktur w`],[`𝔵`,`\\mathfrak{x}`,`Fraktur x`],[`𝔶`,`\\mathfrak{y}`,`Fraktur y`],[`𝔷`,`\\mathfrak{z}`,`Fraktur z`],[`𝒜`,`\\mathscr{A}`,`Script A`],[`ℬ`,`\\mathscr{B}`,`Script B`],[`𝒞`,`\\mathscr{C}`,`Script C`],[`𝒟`,`\\mathscr{D}`,`Script D`],[`ℰ`,`\\mathscr{E}`,`Script E`],[`ℱ`,`\\mathscr{F}`,`Script F`],[`𝒢`,`\\mathscr{G}`,`Script G`],[`ℋ`,`\\mathscr{H}`,`Script H`],[`ℐ`,`\\mathscr{I}`,`Script I`],[`𝒥`,`\\mathscr{J}`,`Script J`],[`𝒦`,`\\mathscr{K}`,`Script K`],[`ℒ`,`\\mathscr{L}`,`Script L`],[`ℳ`,`\\mathscr{M}`,`Script M`],[`𝒩`,`\\mathscr{N}`,`Script N`],[`𝒪`,`\\mathscr{O}`,`Script O`],[`𝒫`,`\\mathscr{P}`,`Script P`],[`𝒬`,`\\mathscr{Q}`,`Script Q`],[`ℛ`,`\\mathscr{R}`,`Script R`],[`𝒮`,`\\mathscr{S}`,`Script S`],[`𝒯`,`\\mathscr{T}`,`Script T`],[`𝒰`,`\\mathscr{U}`,`Script U`],[`𝒱`,`\\mathscr{V}`,`Script V`],[`𝒲`,`\\mathscr{W}`,`Script W`],[`𝒳`,`\\mathscr{X}`,`Script X`],[`𝒴`,`\\mathscr{Y}`,`Script Y`],[`𝒵`,`\\mathscr{Z}`,`Script Z`],[`𝒶`,`\\mathscr{a}`,`Script a`],[`𝒷`,`\\mathscr{b}`,`Script b`],[`𝒸`,`\\mathscr{c}`,`Script c`],[`𝒹`,`\\mathscr{d}`,`Script d`],[`ℯ`,`\\mathscr{e}`,`Script e`],[`𝒻`,`\\mathscr{f}`,`Script f`],[`ℊ`,`\\mathscr{g}`,`Script g`],[`𝒽`,`\\mathscr{h}`,`Script h`],[`𝒾`,`\\mathscr{i}`,`Script i`],[`𝒿`,`\\mathscr{j}`,`Script j`],[`𝓀`,`\\mathscr{k}`,`Script k`],[`𝓁`,`\\mathscr{l}`,`Script l`],[`𝓂`,`\\mathscr{m}`,`Script m`],[`𝓃`,`\\mathscr{n}`,`Script n`],[`ℴ`,`\\mathscr{o}`,`Script o`],[`𝓅`,`\\mathscr{p}`,`Script p`],[`𝓆`,`\\mathscr{q}`,`Script q`],[`𝓇`,`\\mathscr{r}`,`Script r`],[`𝓈`,`\\mathscr{s}`,`Script s`],[`𝓉`,`\\mathscr{t}`,`Script t`],[`𝓊`,`\\mathscr{u}`,`Script u`],[`𝓋`,`\\mathscr{v}`,`Script v`],[`𝓌`,`\\mathscr{w}`,`Script w`],[`𝓍`,`\\mathscr{x}`,`Script x`],[`𝓎`,`\\mathscr{y}`,`Script y`],[`𝓏`,`\\mathscr{z}`,`Script z`]].map(([e,t,n])=>({label:e,insert:t,title:n})),w=[{label:`ℵ`,insert:`\\aleph`,title:`Aleph`},{label:`ℒ`,insert:`\\mathscr{L}`,title:`Script L`},{label:`℘`,insert:`\\wp`,title:`Weierstrass p`},{label:`𝒵`,insert:`\\mathscr{Z}`,title:`Script Z`},{label:`ℱ`,insert:`\\mathscr{F}`,title:`Script F`}],T=[`٠`,`١`,`٢`,`٣`,`٤`,`٥`,`٦`,`٧`,`٨`,`٩`],E=[`۰`,`۱`,`۲`,`۳`,`۴`,`۵`,`۶`,`۷`,`۸`,`۹`];function ee(e,t){if(!e||t===`western`)return e;let n=t===`arabicIndic`?T:t===`easternArabicIndic`?E:null;return n?String(e).replace(/\d/g,e=>n[Number(e)]||e):e}var D=31,O=33,k=592,A=295,j=[{row:1,items:[[`H`,1,`hydrogen`],[`He`,18,`noble-gas`]]},{row:2,items:[[`Li`,1,`alkali`],[`Be`,2,`alkaline`],[`B`,13,`nonmetal`],[`C`,14,`nonmetal`],[`N`,15,`nonmetal`],[`O`,16,`nonmetal`],[`F`,17,`nonmetal`],[`Ne`,18,`noble-gas`]]},{row:3,items:[[`Na`,1,`alkali`],[`Mg`,2,`alkaline`],[`Al`,13,`post-transition`],[`Si`,14,`post-transition`],[`P`,15,`nonmetal`],[`S`,16,`nonmetal`],[`Cl`,17,`nonmetal`],[`Ar`,18,`noble-gas`]]},{row:4,items:[[`K`,1,`alkali`],[`Ca`,2,`alkaline`],[`Sc`,3,`transition`],[`Ti`,4,`transition`],[`V`,5,`transition`],[`Cr`,6,`transition`],[`Mn`,7,`transition`],[`Fe`,8,`transition`],[`Co`,9,`transition`],[`Ni`,10,`transition`],[`Cu`,11,`transition`],[`Zn`,12,`transition`],[`Ga`,13,`post-transition`],[`Ge`,14,`post-transition`],[`As`,15,`nonmetal`],[`Se`,16,`nonmetal`],[`Br`,17,`nonmetal`],[`Kr`,18,`noble-gas`]]},{row:5,items:[[`Rb`,1,`alkali`],[`Sr`,2,`alkaline`],[`Y`,3,`transition`],[`Zr`,4,`transition`],[`Nb`,5,`transition`],[`Mo`,6,`transition`],[`Tc`,7,`transition`],[`Ru`,8,`transition`],[`Rh`,9,`transition`],[`Pd`,10,`transition`],[`Ag`,11,`transition`],[`Cd`,12,`transition`],[`In`,13,`post-transition`],[`Sn`,14,`post-transition`],[`Sb`,15,`nonmetal`],[`Te`,16,`nonmetal`],[`I`,17,`nonmetal`],[`Xe`,18,`noble-gas`]]},{row:6,items:[[`Cs`,1,`alkali`],[`Ba`,2,`alkaline`],[`Hf`,4,`transition`],[`Ta`,5,`transition`],[`W`,6,`transition`],[`Re`,7,`transition`],[`Os`,8,`transition`],[`Ir`,9,`transition`],[`Pt`,10,`transition`],[`Au`,11,`transition`],[`Hg`,12,`transition`],[`Tl`,13,`post-transition`],[`Pb`,14,`post-transition`],[`Bi`,15,`post-transition`],[`Po`,16,`post-transition`],[`At`,17,`nonmetal`],[`Rn`,18,`noble-gas`]]},{row:7,items:[[`Fr`,1,`alkali`],[`Ra`,2,`alkaline`],[`Rf`,4,`transition`],[`Db`,5,`transition`],[`Sg`,6,`transition`],[`Bh`,7,`transition`],[`Hs`,8,`transition`],[`Mt`,9,`transition`],[`Ds`,10,`transition`],[`Rg`,11,`transition`],[`Cn`,12,`transition`],[`Nh`,13,`post-transition`],[`Fl`,14,`post-transition`],[`Mc`,15,`post-transition`],[`Lv`,16,`post-transition`],[`Ts`,17,`placeholder`],[`Og`,18,`placeholder`]]},{row:8,items:[[`La`,4,`series-anchor`],[`Ce`,5,`lanthanide`],[`Pr`,6,`lanthanide`],[`Nd`,7,`lanthanide`],[`Pm`,8,`lanthanide`],[`Sm`,9,`lanthanide`],[`Eu`,10,`lanthanide`],[`Gd`,11,`lanthanide`],[`Tb`,12,`lanthanide`],[`Dy`,13,`lanthanide`],[`Ho`,14,`lanthanide`],[`Er`,15,`lanthanide`],[`Tm`,16,`lanthanide`],[`Yb`,17,`lanthanide`],[`Lu`,18,`lanthanide`]]},{row:9,items:[[`Ac`,4,`series-anchor`],[`Th`,5,`actinide`],[`Pa`,6,`actinide`],[`U`,7,`actinide`],[`Np`,8,`actinide`],[`Pu`,9,`actinide`],[`Am`,10,`actinide`],[`Cm`,11,`actinide`],[`Bk`,12,`actinide`],[`Cf`,13,`actinide`],[`Es`,14,`actinide`],[`Fm`,15,`actinide`],[`Md`,16,`actinide`],[`No`,17,`actinide`],[`Lr`,18,`actinide`]]}].flatMap(({row:e,items:t})=>t.map(([t,n,r])=>({label:t,insert:t,row:e,col:n,tone:r,title:t}))),M=[{label:`Times`,value:`family:roman`,style:{fontFamily:`roman`}},{label:`Helvetica`,value:`family:sans-serif`,style:{fontFamily:`sans-serif`}},{label:`Courier`,value:`family:monospace`,style:{fontFamily:`monospace`}},{label:`Calligraphic`,value:`variant:calligraphic`,style:{variant:`calligraphic`}},{label:`Script`,value:`variant:script`,style:{variant:`script`}},{label:`Fraktur`,value:`variant:fraktur`,style:{variant:`fraktur`}},{label:`Blackboard`,value:`variant:double-struck`,style:{variant:`double-struck`}}],te={fontFamily:`none`,variant:`main`},ne=[{label:`8px`,value:`3`},{label:`10px`,value:`4`},{label:`12px`,value:`5`},{label:`14px`,value:`6`},{label:`16px`,value:`7`},{label:`18px`,value:`8`},{label:`24px`,value:`10`}],re={up:{x:0,y:-1},right:{x:1,y:0},left:{x:-1,y:0},down:{x:0,y:1}};function ie(e=``){let t=String(e||``),n=0,r=0,i=/^\\htmlStyle\{([^}]*)\}\{([\s\S]*)\}$/;for(;;){let e=t.match(i);if(!e)break;let a=e[1]||``;if(!a.includes(`display:inline-block`)||!a.includes(`position:relative`))break;let o=a.match(/left:\s*(-?\d+)px/i),s=a.match(/top:\s*(-?\d+)px/i);n+=o?parseInt(o[1],10):0,r+=s?parseInt(s[1],10):0,t=e[2]||``}return{baseLatex:t,offsetX:n,offsetY:r}}function ae(e,t,n){let r=[`display:inline-block`,`position:relative`];return t!==0&&r.push(`left:${t}px`),n!==0&&r.push(`top:${n}px`),`\\htmlStyle{${r.join(`;`)};}{${e}}`}var oe=[{id:`roots-main`,label:(0,i.jsx)(P,{}),items:[{label:`□/□`,insert:`\\frac{#0}{#?}`,title:`Fraction`,cls:`green-template black-glyph-template`,icon:`stacked-fraction`},{label:`□/□`,insert:`{#0}/{#?}`,title:`Bevelled Fraction`,cls:`green-template black-glyph-template`},{label:`√□`,insert:`\\sqrt{#0}`,title:`Square Root`,cls:`green-template black-glyph-template`,icon:`square-root-template`},{label:`□√□`,insert:`\\sqrt[#?]{#0}`,title:`Root`,cls:`green-template black-glyph-template`,icon:`nth-root-template`},{type:`sep`,cols:2},{label:`□^□`,insert:`#0^{#?}`,title:`Superscript`,cls:`green-template black-glyph-template`,icon:`superscript-template`},{label:`□_□`,insert:`#0_{#?}`,title:`Subscript`,cls:`green-template black-glyph-template`,icon:`subscript-template`},{type:`sep`,cols:1},{label:`(□)`,insert:`\\left(#0\\right)`,title:`Parentheses`,cls:`green-template green-placeholder-glyph`},{label:`|□|`,insert:`\\left|#0\\right|`,title:`Absolute Value`,cls:`green-template green-placeholder-glyph`},{label:`[□]`,insert:`\\left[#0\\right]`,title:`Square Brackets`,cls:`green-template green-placeholder-glyph`},{label:`{□}`,insert:`\\left\\{#0\\right\\}`,title:`Curly Braces`,cls:`green-template green-placeholder-glyph`},{type:`sep`,cols:3},{label:`+`,insert:`+`},{label:`−`,insert:`-`},{label:`×`,insert:`\\times`},{label:`÷`,insert:`\\div`},{label:`/`,insert:`/`},{label:`±`,insert:`\\pm`},{type:`sep`,cols:3},{label:`≥`,insert:`\\geq`},{label:`≤`,insert:`\\leq`},{label:`∩`,insert:`\\cap`},{label:`∪`,insert:`\\cup`},{label:`⊂`,insert:`\\subset`},{label:`∈`,insert:`\\in`},{type:`sep`,cols:4},{label:`∅`,insert:`\\emptyset`},{label:`∞`,insert:`\\infty`},{label:`π`,insert:`\\pi`},{type:`sep`,cols:2},{label:`✂`,action:`CUT`,title:`Cut Formula`,cls:`soft-tool`},{label:`⧉`,action:`COPY`,title:`Copy Formula`,cls:`soft-tool`},{label:`⎘`,action:`PASTE`,title:`Paste Formula`,cls:`soft-tool`},{label:`↶`,action:`UNDO`,title:`Undo`,cls:`soft-tool`},{label:`↷`,action:`REDO`,title:`Redo`,cls:`soft-tool`},{label:`⌫`,action:`CLEAR`,title:`Clear Formula`,cls:`soft-tool`},{type:`sep`,cols:3},{label:`B`,action:`BOLD`,cls:`template format-tool`,title:`Bold`},{label:`1b`,action:`ITALIC`,cls:`format-tool`,title:`Italic`},{label:`BI`,action:`BOLD_ITALIC`,cls:`format-tool`,title:`Bold Italic`},{label:`Ω`,action:`SPECIAL_CHARS`,cls:`format-tool omega-tool`,title:`Greek Letters`},{label:`T`,action:`TEXT`,cls:`format-tool text-tool`,title:`Regular Text`},{label:`A`,action:`TEXT_COLOR`,cls:`format-tool color-tool`,title:`Text Color`},{type:`sep`,cols:1},{label:`RTL`,action:`TOGGLE_RTL`,cls:`format-tool rtl-tool`,title:`Right-to-Left Input`,icon:`rtl-input-template-image`},{type:`sep`,cols:1},{type:`dropdown`,label:`Font...`,width:`92px`},{type:`dropdown`,label:`Size`,width:`86px`}]},{id:`relations`,...h[1],items:v,label:(0,i.jsx)(I,{})},{id:`arrows`,...h[4],label:(0,i.jsx)(V,{})},{id:`greek`,label:(0,i.jsx)(L,{}),items:[{category:`Lowercase Greek Letters`,label:`α`,insert:`\\alpha`},{category:`Lowercase Greek Letters`,label:`β`,insert:`\\beta`},{category:`Lowercase Greek Letters`,label:`γ`,insert:`\\gamma`},{category:`Lowercase Greek Letters`,label:`δ`,insert:`\\delta`},{category:`Lowercase Greek Letters`,label:`ε`,insert:`\\epsilon`},{category:`Lowercase Greek Letters`,label:`ζ`,insert:`\\zeta`},{category:`Lowercase Greek Letters`,label:`η`,insert:`\\eta`},{category:`Lowercase Greek Letters`,label:`θ`,insert:`\\theta`},{category:`Lowercase Greek Letters`,label:`ϑ`,insert:`\\vartheta`},{category:`Lowercase Greek Letters`,label:`ι`,insert:`\\iota`},{category:`Lowercase Greek Letters`,label:`κ`,insert:`\\kappa`},{category:`Lowercase Greek Letters`,label:`λ`,insert:`\\lambda`},{category:`Lowercase Greek Letters`,label:`μ`,insert:`\\mu`},{category:`Lowercase Greek Letters`,label:`ν`,insert:`\\nu`},{category:`Lowercase Greek Letters`,label:`ξ`,insert:`\\xi`},{category:`Lowercase Greek Letters`,label:`ο`,insert:`ο`},{category:`Lowercase Greek Letters`,label:`π`,insert:`\\pi`},{category:`Lowercase Greek Letters`,label:`ϖ`,insert:`\\varpi`},{category:`Lowercase Greek Letters`,label:`ρ`,insert:`\\rho`},{category:`Lowercase Greek Letters`,label:`ς`,insert:`\\varsigma`},{category:`Lowercase Greek Letters`,label:`σ`,insert:`\\sigma`},{category:`Lowercase Greek Letters`,label:`τ`,insert:`\\tau`},{category:`Lowercase Greek Letters`,label:`υ`,insert:`\\upsilon`},{category:`Lowercase Greek Letters`,label:`φ`,insert:`\\phi`},{category:`Lowercase Greek Letters`,label:`ϕ`,insert:`\\varphi`},{category:`Lowercase Greek Letters`,label:`χ`,insert:`\\chi`},{category:`Lowercase Greek Letters`,label:`ψ`,insert:`\\psi`},{category:`Lowercase Greek Letters`,label:`ω`,insert:`\\omega`},{category:`Greek Letter Picker`,label:`|`,action:`GREEK_ITALIC_PICKER`,title:`Italic Uppercase Greek`,icon:`vertical-line-picker-template-image`,cls:`arrow-picker-tool greek-italic-picker-tool`},{category:`Blackboard Bold / Number Sets`,label:`ℕ`,insert:`\\mathbb{N}`},{category:`Blackboard Bold / Number Sets`,label:`ℤ`,insert:`\\mathbb{Z}`},{category:`Blackboard Bold / Number Sets`,label:`ℚ`,insert:`\\mathbb{Q}`},{category:`Blackboard Bold / Number Sets`,label:`ℂ`,insert:`\\mathbb{C}`},{category:`Blackboard Bold / Number Sets`,label:`ℝ`,insert:`\\mathbb{R}`},{category:`Blackboard Bold / Number Sets`,label:`ℙ`,insert:`\\mathbb{P}`},{category:`Blackboard Bold Picker`,label:`|`,action:`BLACKBOARD_BOLD_PICKER`,title:`More Blackboard Bold Letters`,icon:`vertical-line-picker-template-image`,cls:`arrow-picker-tool blackboard-bold-picker-tool`},{category:`Fraktur Symbols`,label:`𝔄`,insert:`\\mathfrak{A}`},{category:`Fraktur Symbols`,label:`𝔅`,insert:`\\mathfrak{B}`},{category:`Fraktur Symbols`,label:`𝔊`,insert:`\\mathfrak{G}`},{category:`Script Symbols`,label:`𝒜`,insert:`\\mathscr{A}`},{category:`Script Symbols`,label:`ℬ`,insert:`\\mathscr{B}`},{category:`Script Symbols`,label:`𝒞`,insert:`\\mathscr{C}`},{category:`Fraktur / Script Picker`,label:`|`,action:`FRAKTUR_SCRIPT_PICKER`,title:`More Fraktur and Script Letters`,icon:`vertical-line-picker-template-image`,cls:`arrow-picker-tool fraktur-script-picker-tool`},{category:`Hebrew Mathematical Symbols`,label:`ℑ`,insert:`\\Im`},{category:`Hebrew Mathematical Symbols`,label:`ℜ`,insert:`\\Re`},{category:`Hebrew Mathematical Symbols`,label:`ℓ`,insert:`\\ell`},{category:`Hebrew Symbol Picker`,label:`|`,action:`HEBREW_SYMBOL_PICKER`,title:`More Hebrew Mathematical Symbols`,icon:`vertical-line-picker-template-image`,cls:`arrow-picker-tool hebrew-symbol-picker-tool`},{category:`Arabic-Indic Numeral Systems`,label:`٤٦`,action:`ARABIC_INDIC_NUMERALS`,title:`Arabic-Indic Numerals`,icon:`arabic-indic-numerals-template-image`,cls:`numeral-mode-tool`},{category:`Arabic-Indic Numeral Systems`,label:`۴۶`,action:`EASTERN_ARABIC_INDIC_NUMERALS`,title:`Eastern Arabic-Indic Numerals (Persian/Urdu)`,icon:`eastern-arabic-indic-numerals-template-image`,cls:`numeral-mode-tool`},{category:`Periodic Table Symbols`,label:`H`,insert:`H`},{category:`Periodic Table Symbols`,label:`C`,insert:`C`},{category:`Periodic Table Symbols`,label:`N`,insert:`N`},{category:`Periodic Table Symbols`,label:`O`,insert:`O`},{category:`Periodic Table Symbols`,label:`F`,insert:`F`},{category:`Periodic Table Symbols`,label:`S`,insert:`S`},{category:`Periodic Table Picker`,label:`|`,action:`PERIODIC_TABLE_PICKER`,title:`Periodic Table`,icon:`vertical-line-picker-template-image`,cls:`arrow-picker-tool periodic-table-picker-tool`}]},{id:`matrix`,...h[11],label:(0,i.jsx)(F,{})},{id:`power-frac`,...h[2],label:(0,i.jsx)(le,{})},{id:`brackets`,label:(0,i.jsx)(R,{}),items:[{label:`(□)`,insert:`\\left(#0\\right)`,cls:`green-placeholder-glyph`},{label:`[□]`,insert:`\\left[#0\\right]`,cls:`green-placeholder-glyph`},{label:`|□|`,insert:`\\left|#0\\right|`,cls:`green-placeholder-glyph`},{label:`‖□‖`,insert:`\\left\\| #0 \\right\\|`,cls:`green-placeholder-glyph`},{label:`⟨□⟩`,insert:`\\left\\langle #0 \\right\\rangle`,cls:`green-placeholder-glyph`},{label:`{□}`,insert:`\\left\\{#0\\right\\}`,cls:`green-placeholder-glyph`},_(`bracketDelimiterExtras`,`More Delimiters`),{type:`sep`,cols:2},{label:`overbrace`,insert:`\\overbrace{#0}`,cls:`template`,directInsert:!0,title:`Overbrace`,icon:`overbrace-arc-template-image`},{label:`underbrace`,insert:`\\underbrace{#0}`,cls:`template`,directInsert:!0,title:`Underbrace`,icon:`underbrace-arc-template-image`},{label:`overparen`,insert:`\\overparen{#0}`,cls:`template`,directInsert:!0,title:`Overparen`,icon:`overparen-template-image`},{label:`underparen`,insert:`\\underparen{#0}`,cls:`template`,directInsert:!0,title:`Underparen`,icon:`underparen-template-image`},{type:`sep`,cols:2},{label:`⃗
14
+ ←`,insert:`\\overset{\\to}{\\longleftarrow}`,title:`Short Rightwards Arrow over Leftwards Arrow`,preview:`right-short-over-left-long`},{label:`↕`,insert:`\\updownarrow`,title:`Up Down Arrow`},{label:`⇕`,insert:`\\Updownarrow`,title:`Double Up Down Arrow`},{label:`↵`,insert:`↵`,title:`Downwards Arrow with Corner Leftwards`}],b=[{insert:`\\xleftrightarrow{#0}`,title:`Right Left Arrows with Overscript`,icon:`right-left-arrows-over`},{insert:`\\xleftrightarrow[#0]{}`,title:`Right Left Arrows with Underscript`,icon:`right-left-arrows-under`},{insert:`\\xleftrightarrow[#?]{#0}`,title:`Right Left Arrows with Under and Overscript`,icon:`right-left-arrows-over-under`},{insert:`\\xleftrightarrows{#0}`,title:`Left Arrow over Right Arrow with Overscript`,icon:`left-right-arrows-over`},{insert:`\\xleftrightarrows[#0]{}`,title:`Left Arrow over Right Arrow with Underscript`,icon:`left-right-arrows-under`},{insert:`\\xleftrightarrows[#?]{#0}`,title:`Left Arrow over Right Arrow with Under and Overscript`,icon:`left-right-arrows-over-under`},{insert:`\\xleftright arrows{#0}`,title:`Right Arrow over Left Arrow with Overscript`,icon:`right-left-stacked-arrows-over`},{insert:`\\xleftrightarrows[#0]{}`,title:`Right Arrow over Left Arrow with Underscript`,icon:`right-left-stacked-arrows-under`},{insert:`\\xleftrightarrows[#?]{#0}`,title:`Right Arrow over Left Arrow with Under and Overscript`,icon:`right-left-stacked-arrows-over-under`},{insert:`\\xleftrightharpoons{#0}`,title:`Left Harpoon over Right Harpoon with Overscript`,icon:`left-right-harpoons-over`},{insert:`\\xleftrightharpoons[#0]{}`,title:`Left Harpoon over Right Harpoon with Underscript`,icon:`left-right-harpoons-under`},{insert:`\\xleftrightharpoons[#?]{#0}`,title:`Left Harpoon over Right Harpoon with Under and Overscript`,icon:`left-right-harpoons-over-under`},{insert:`\\xrightleftharpoons{#0}`,title:`Right Harpoon over Left Harpoon with Overscript`,icon:`right-left-harpoons-over`},{insert:`\\xrightleftharpoons[#0]{}`,title:`Right Harpoon over Left Harpoon with Underscript`,icon:`right-left-harpoons-under`},{insert:`\\xrightleftharpoons[#?]{#0}`,title:`Right Harpoon over Left Harpoon with Under and Overscript`,icon:`right-left-harpoons-over-under`},{insert:`\\overset{#0}{\\rightleftarrows}`,title:`Rightwards Arrow over Short Leftwards Arrow with Overscript`,icon:`long-right-short-left-over`},{insert:`\\underset{#0}{\\rightleftarrows}`,title:`Rightwards Arrow over Short Leftwards Arrow with Underscript`,icon:`long-right-short-left-under`},{insert:`\\overset{#0}{\\underset{#?}{\\rightleftarrows}}`,title:`Rightwards Arrow over Short Leftwards Arrow with Under and Overscript`,icon:`long-right-short-left-over-under`},{insert:`\\overset{#0}{\\rightleftarrows}`,title:`Short Rightwards Arrow over Leftwards Arrow with Overscript`,icon:`short-right-long-left-over`},{insert:`\\underset{#0}{\\rightleftarrows}`,title:`Short Rightwards Arrow over Leftwards Arrow with Underscript`,icon:`short-right-long-left-under`},{insert:`\\overset{#0}{\\underset{#?}{\\rightleftarrows}}`,title:`Short Rightwards Arrow over Leftwards Arrow with Under and Overscript`,icon:`short-right-long-left-over-under`}],x=[{label:`Α`,insert:`\\mathit{Α}`,title:`Italic Alpha`},{label:`Β`,insert:`\\mathit{Β}`,title:`Italic Beta`},{label:`Γ`,insert:`\\varGamma`,title:`Italic Gamma`},{label:`Δ`,insert:`\\varDelta`,title:`Italic Delta`},{label:`Ε`,insert:`\\mathit{Ε}`,title:`Italic Epsilon`},{label:`Ζ`,insert:`\\mathit{Ζ}`,title:`Italic Zeta`},{label:`Η`,insert:`\\mathit{Η}`,title:`Italic Eta`},{label:`Θ`,insert:`\\varTheta`,title:`Italic Theta`},{label:`Ι`,insert:`\\mathit{Ι}`,title:`Italic Iota`},{label:`Κ`,insert:`\\mathit{Κ}`,title:`Italic Kappa`},{label:`Λ`,insert:`\\varLambda`,title:`Italic Lambda`},{label:`Μ`,insert:`\\mathit{Μ}`,title:`Italic Mu`},{label:`Ν`,insert:`\\mathit{Ν}`,title:`Italic Nu`},{label:`Ξ`,insert:`\\varXi`,title:`Italic Xi`},{label:`Ο`,insert:`\\mathit{Ο}`,title:`Italic Omicron`},{label:`Π`,insert:`\\varPi`,title:`Italic Pi`},{label:`Ρ`,insert:`\\mathit{Ρ}`,title:`Italic Rho`},{label:`Σ`,insert:`\\varSigma`,title:`Italic Sigma`},{label:`Τ`,insert:`\\mathit{Τ}`,title:`Italic Tau`},{label:`Υ`,insert:`\\varUpsilon`,title:`Italic Upsilon`},{label:`Φ`,insert:`\\varPhi`,title:`Italic Phi`},{label:`Χ`,insert:`\\mathit{Χ}`,title:`Italic Chi`},{label:`Ψ`,insert:`\\varPsi`,title:`Italic Psi`},{label:`Ω`,insert:`\\varOmega`,title:`Italic Omega`}],S=[[`𝔸`,`A`],[`𝔹`,`B`],[`ℂ`,`C`],[`𝔻`,`D`],[`𝔼`,`E`],[`𝔽`,`F`],[`𝔾`,`G`],[`ℍ`,`H`],[`𝕀`,`I`],[`𝕁`,`J`],[`𝕂`,`K`],[`𝕃`,`L`],[`𝕄`,`M`],[`ℕ`,`N`],[`𝕆`,`O`],[`ℙ`,`P`],[`ℚ`,`Q`],[`ℝ`,`R`],[`𝕊`,`S`],[`𝕋`,`T`],[`𝕌`,`U`],[`𝕍`,`V`],[`𝕎`,`W`],[`𝕏`,`X`],[`𝕐`,`Y`],[`ℤ`,`Z`],[`𝕒`,`a`],[`𝕓`,`b`],[`𝕔`,`c`],[`𝕕`,`d`],[`𝕖`,`e`],[`𝕗`,`f`],[`𝕘`,`g`],[`𝕙`,`h`],[`𝕚`,`i`],[`𝕛`,`j`],[`𝕜`,`k`],[`𝕝`,`l`],[`𝕞`,`m`],[`𝕟`,`n`],[`𝕠`,`o`],[`𝕡`,`p`],[`𝕢`,`q`],[`𝕣`,`r`],[`𝕤`,`s`],[`𝕥`,`t`],[`𝕦`,`u`],[`𝕧`,`v`],[`𝕨`,`w`],[`𝕩`,`x`],[`𝕪`,`y`],[`𝕫`,`z`]].map(([e,t])=>({label:e,insert:`\\mathbb{${t}}`,title:`Blackboard Bold ${t}`})),C=[[`𝔄`,`\\mathfrak{A}`,`Fraktur A`],[`𝔅`,`\\mathfrak{B}`,`Fraktur B`],[`ℭ`,`\\mathfrak{C}`,`Fraktur C`],[`𝔇`,`\\mathfrak{D}`,`Fraktur D`],[`𝔈`,`\\mathfrak{E}`,`Fraktur E`],[`𝔉`,`\\mathfrak{F}`,`Fraktur F`],[`𝔊`,`\\mathfrak{G}`,`Fraktur G`],[`ℌ`,`\\mathfrak{H}`,`Fraktur H`],[`ℑ`,`\\mathfrak{I}`,`Fraktur I`],[`𝔍`,`\\mathfrak{J}`,`Fraktur J`],[`𝔎`,`\\mathfrak{K}`,`Fraktur K`],[`𝔏`,`\\mathfrak{L}`,`Fraktur L`],[`𝔐`,`\\mathfrak{M}`,`Fraktur M`],[`𝔑`,`\\mathfrak{N}`,`Fraktur N`],[`𝔒`,`\\mathfrak{O}`,`Fraktur O`],[`𝔓`,`\\mathfrak{P}`,`Fraktur P`],[`𝔔`,`\\mathfrak{Q}`,`Fraktur Q`],[`ℜ`,`\\mathfrak{R}`,`Fraktur R`],[`𝔖`,`\\mathfrak{S}`,`Fraktur S`],[`𝔗`,`\\mathfrak{T}`,`Fraktur T`],[`𝔘`,`\\mathfrak{U}`,`Fraktur U`],[`𝔙`,`\\mathfrak{V}`,`Fraktur V`],[`𝔚`,`\\mathfrak{W}`,`Fraktur W`],[`𝔛`,`\\mathfrak{X}`,`Fraktur X`],[`𝔜`,`\\mathfrak{Y}`,`Fraktur Y`],[`ℨ`,`\\mathfrak{Z}`,`Fraktur Z`],[`𝔞`,`\\mathfrak{a}`,`Fraktur a`],[`𝔟`,`\\mathfrak{b}`,`Fraktur b`],[`𝔠`,`\\mathfrak{c}`,`Fraktur c`],[`𝔡`,`\\mathfrak{d}`,`Fraktur d`],[`𝔢`,`\\mathfrak{e}`,`Fraktur e`],[`𝔣`,`\\mathfrak{f}`,`Fraktur f`],[`𝔤`,`\\mathfrak{g}`,`Fraktur g`],[`𝔥`,`\\mathfrak{h}`,`Fraktur h`],[`𝔦`,`\\mathfrak{i}`,`Fraktur i`],[`𝔧`,`\\mathfrak{j}`,`Fraktur j`],[`𝔨`,`\\mathfrak{k}`,`Fraktur k`],[`𝔩`,`\\mathfrak{l}`,`Fraktur l`],[`𝔪`,`\\mathfrak{m}`,`Fraktur m`],[`𝔫`,`\\mathfrak{n}`,`Fraktur n`],[`𝔬`,`\\mathfrak{o}`,`Fraktur o`],[`𝔭`,`\\mathfrak{p}`,`Fraktur p`],[`𝔮`,`\\mathfrak{q}`,`Fraktur q`],[`𝔯`,`\\mathfrak{r}`,`Fraktur r`],[`𝔰`,`\\mathfrak{s}`,`Fraktur s`],[`𝔱`,`\\mathfrak{t}`,`Fraktur t`],[`𝔲`,`\\mathfrak{u}`,`Fraktur u`],[`𝔳`,`\\mathfrak{v}`,`Fraktur v`],[`𝔴`,`\\mathfrak{w}`,`Fraktur w`],[`𝔵`,`\\mathfrak{x}`,`Fraktur x`],[`𝔶`,`\\mathfrak{y}`,`Fraktur y`],[`𝔷`,`\\mathfrak{z}`,`Fraktur z`],[`𝒜`,`\\mathscr{A}`,`Script A`],[`ℬ`,`\\mathscr{B}`,`Script B`],[`𝒞`,`\\mathscr{C}`,`Script C`],[`𝒟`,`\\mathscr{D}`,`Script D`],[`ℰ`,`\\mathscr{E}`,`Script E`],[`ℱ`,`\\mathscr{F}`,`Script F`],[`𝒢`,`\\mathscr{G}`,`Script G`],[`ℋ`,`\\mathscr{H}`,`Script H`],[`ℐ`,`\\mathscr{I}`,`Script I`],[`𝒥`,`\\mathscr{J}`,`Script J`],[`𝒦`,`\\mathscr{K}`,`Script K`],[`ℒ`,`\\mathscr{L}`,`Script L`],[`ℳ`,`\\mathscr{M}`,`Script M`],[`𝒩`,`\\mathscr{N}`,`Script N`],[`𝒪`,`\\mathscr{O}`,`Script O`],[`𝒫`,`\\mathscr{P}`,`Script P`],[`𝒬`,`\\mathscr{Q}`,`Script Q`],[`ℛ`,`\\mathscr{R}`,`Script R`],[`𝒮`,`\\mathscr{S}`,`Script S`],[`𝒯`,`\\mathscr{T}`,`Script T`],[`𝒰`,`\\mathscr{U}`,`Script U`],[`𝒱`,`\\mathscr{V}`,`Script V`],[`𝒲`,`\\mathscr{W}`,`Script W`],[`𝒳`,`\\mathscr{X}`,`Script X`],[`𝒴`,`\\mathscr{Y}`,`Script Y`],[`𝒵`,`\\mathscr{Z}`,`Script Z`],[`𝒶`,`\\mathscr{a}`,`Script a`],[`𝒷`,`\\mathscr{b}`,`Script b`],[`𝒸`,`\\mathscr{c}`,`Script c`],[`𝒹`,`\\mathscr{d}`,`Script d`],[`ℯ`,`\\mathscr{e}`,`Script e`],[`𝒻`,`\\mathscr{f}`,`Script f`],[`ℊ`,`\\mathscr{g}`,`Script g`],[`𝒽`,`\\mathscr{h}`,`Script h`],[`𝒾`,`\\mathscr{i}`,`Script i`],[`𝒿`,`\\mathscr{j}`,`Script j`],[`𝓀`,`\\mathscr{k}`,`Script k`],[`𝓁`,`\\mathscr{l}`,`Script l`],[`𝓂`,`\\mathscr{m}`,`Script m`],[`𝓃`,`\\mathscr{n}`,`Script n`],[`ℴ`,`\\mathscr{o}`,`Script o`],[`𝓅`,`\\mathscr{p}`,`Script p`],[`𝓆`,`\\mathscr{q}`,`Script q`],[`𝓇`,`\\mathscr{r}`,`Script r`],[`𝓈`,`\\mathscr{s}`,`Script s`],[`𝓉`,`\\mathscr{t}`,`Script t`],[`𝓊`,`\\mathscr{u}`,`Script u`],[`𝓋`,`\\mathscr{v}`,`Script v`],[`𝓌`,`\\mathscr{w}`,`Script w`],[`𝓍`,`\\mathscr{x}`,`Script x`],[`𝓎`,`\\mathscr{y}`,`Script y`],[`𝓏`,`\\mathscr{z}`,`Script z`]].map(([e,t,n])=>({label:e,insert:t,title:n})),w=[{label:`ℵ`,insert:`\\aleph`,title:`Aleph`},{label:`ℒ`,insert:`\\mathscr{L}`,title:`Script L`},{label:`℘`,insert:`\\wp`,title:`Weierstrass p`},{label:`𝒵`,insert:`\\mathscr{Z}`,title:`Script Z`},{label:`ℱ`,insert:`\\mathscr{F}`,title:`Script F`}],T=[`٠`,`١`,`٢`,`٣`,`٤`,`٥`,`٦`,`٧`,`٨`,`٩`],E=[`۰`,`۱`,`۲`,`۳`,`۴`,`۵`,`۶`,`۷`,`۸`,`۹`];function ee(e,t){if(!e||t===`western`)return e;let n=t===`arabicIndic`?T:t===`easternArabicIndic`?E:null;return n?String(e).replace(/\d/g,e=>n[Number(e)]||e):e}var D=31,O=33,k=592,A=295,j=[{row:1,items:[[`H`,1,`hydrogen`],[`He`,18,`noble-gas`]]},{row:2,items:[[`Li`,1,`alkali`],[`Be`,2,`alkaline`],[`B`,13,`nonmetal`],[`C`,14,`nonmetal`],[`N`,15,`nonmetal`],[`O`,16,`nonmetal`],[`F`,17,`nonmetal`],[`Ne`,18,`noble-gas`]]},{row:3,items:[[`Na`,1,`alkali`],[`Mg`,2,`alkaline`],[`Al`,13,`post-transition`],[`Si`,14,`post-transition`],[`P`,15,`nonmetal`],[`S`,16,`nonmetal`],[`Cl`,17,`nonmetal`],[`Ar`,18,`noble-gas`]]},{row:4,items:[[`K`,1,`alkali`],[`Ca`,2,`alkaline`],[`Sc`,3,`transition`],[`Ti`,4,`transition`],[`V`,5,`transition`],[`Cr`,6,`transition`],[`Mn`,7,`transition`],[`Fe`,8,`transition`],[`Co`,9,`transition`],[`Ni`,10,`transition`],[`Cu`,11,`transition`],[`Zn`,12,`transition`],[`Ga`,13,`post-transition`],[`Ge`,14,`post-transition`],[`As`,15,`nonmetal`],[`Se`,16,`nonmetal`],[`Br`,17,`nonmetal`],[`Kr`,18,`noble-gas`]]},{row:5,items:[[`Rb`,1,`alkali`],[`Sr`,2,`alkaline`],[`Y`,3,`transition`],[`Zr`,4,`transition`],[`Nb`,5,`transition`],[`Mo`,6,`transition`],[`Tc`,7,`transition`],[`Ru`,8,`transition`],[`Rh`,9,`transition`],[`Pd`,10,`transition`],[`Ag`,11,`transition`],[`Cd`,12,`transition`],[`In`,13,`post-transition`],[`Sn`,14,`post-transition`],[`Sb`,15,`nonmetal`],[`Te`,16,`nonmetal`],[`I`,17,`nonmetal`],[`Xe`,18,`noble-gas`]]},{row:6,items:[[`Cs`,1,`alkali`],[`Ba`,2,`alkaline`],[`Hf`,4,`transition`],[`Ta`,5,`transition`],[`W`,6,`transition`],[`Re`,7,`transition`],[`Os`,8,`transition`],[`Ir`,9,`transition`],[`Pt`,10,`transition`],[`Au`,11,`transition`],[`Hg`,12,`transition`],[`Tl`,13,`post-transition`],[`Pb`,14,`post-transition`],[`Bi`,15,`post-transition`],[`Po`,16,`post-transition`],[`At`,17,`nonmetal`],[`Rn`,18,`noble-gas`]]},{row:7,items:[[`Fr`,1,`alkali`],[`Ra`,2,`alkaline`],[`Rf`,4,`transition`],[`Db`,5,`transition`],[`Sg`,6,`transition`],[`Bh`,7,`transition`],[`Hs`,8,`transition`],[`Mt`,9,`transition`],[`Ds`,10,`transition`],[`Rg`,11,`transition`],[`Cn`,12,`transition`],[`Nh`,13,`post-transition`],[`Fl`,14,`post-transition`],[`Mc`,15,`post-transition`],[`Lv`,16,`post-transition`],[`Ts`,17,`placeholder`],[`Og`,18,`placeholder`]]},{row:8,items:[[`La`,4,`series-anchor`],[`Ce`,5,`lanthanide`],[`Pr`,6,`lanthanide`],[`Nd`,7,`lanthanide`],[`Pm`,8,`lanthanide`],[`Sm`,9,`lanthanide`],[`Eu`,10,`lanthanide`],[`Gd`,11,`lanthanide`],[`Tb`,12,`lanthanide`],[`Dy`,13,`lanthanide`],[`Ho`,14,`lanthanide`],[`Er`,15,`lanthanide`],[`Tm`,16,`lanthanide`],[`Yb`,17,`lanthanide`],[`Lu`,18,`lanthanide`]]},{row:9,items:[[`Ac`,4,`series-anchor`],[`Th`,5,`actinide`],[`Pa`,6,`actinide`],[`U`,7,`actinide`],[`Np`,8,`actinide`],[`Pu`,9,`actinide`],[`Am`,10,`actinide`],[`Cm`,11,`actinide`],[`Bk`,12,`actinide`],[`Cf`,13,`actinide`],[`Es`,14,`actinide`],[`Fm`,15,`actinide`],[`Md`,16,`actinide`],[`No`,17,`actinide`],[`Lr`,18,`actinide`]]}].flatMap(({row:e,items:t})=>t.map(([t,n,r])=>({label:t,insert:t,row:e,col:n,tone:r,title:t}))),te=[{label:`Times`,value:`family:roman`,style:{fontFamily:`roman`}},{label:`Helvetica`,value:`family:sans-serif`,style:{fontFamily:`sans-serif`}},{label:`Courier`,value:`family:monospace`,style:{fontFamily:`monospace`}},{label:`Calligraphic`,value:`variant:calligraphic`,style:{variant:`calligraphic`}},{label:`Script`,value:`variant:script`,style:{variant:`script`}},{label:`Fraktur`,value:`variant:fraktur`,style:{variant:`fraktur`}},{label:`Blackboard`,value:`variant:double-struck`,style:{variant:`double-struck`}}],ne={fontFamily:`none`,variant:`main`},re=[{label:`8px`,value:`3`},{label:`10px`,value:`4`},{label:`12px`,value:`5`},{label:`14px`,value:`6`},{label:`16px`,value:`7`},{label:`18px`,value:`8`},{label:`24px`,value:`10`}],ie={up:{x:0,y:-1},right:{x:1,y:0},left:{x:-1,y:0},down:{x:0,y:1}};function ae(e=``){let t=String(e||``),n=0,r=0,i=/^\\htmlStyle\{([^}]*)\}\{([\s\S]*)\}$/;for(;;){let e=t.match(i);if(!e)break;let a=e[1]||``;if(!a.includes(`display:inline-block`)||!a.includes(`position:relative`))break;let o=a.match(/left:\s*(-?\d+)px/i),s=a.match(/top:\s*(-?\d+)px/i);n+=o?parseInt(o[1],10):0,r+=s?parseInt(s[1],10):0,t=e[2]||``}return{baseLatex:t,offsetX:n,offsetY:r}}function oe(e,t,n){let r=[`display:inline-block`,`position:relative`];return t!==0&&r.push(`left:${t}px`),n!==0&&r.push(`top:${n}px`),`\\htmlStyle{${r.join(`;`)};}{${e}}`}var se=[{id:`roots-main`,label:(0,i.jsx)(N,{}),items:[{label:`□/□`,insert:`\\frac{#0}{#?}`,title:`Fraction`,cls:`green-template black-glyph-template`,icon:`stacked-fraction`},{label:`□/□`,insert:`{#0}/{#?}`,title:`Bevelled Fraction`,cls:`green-template black-glyph-template`},{label:`√□`,insert:`\\sqrt{#0}`,title:`Square Root`,cls:`green-template black-glyph-template`,icon:`square-root-template`},{label:`□√□`,insert:`\\sqrt[#?]{#0}`,title:`Root`,cls:`green-template black-glyph-template`,icon:`nth-root-template`},{type:`sep`,cols:2},{label:`□^□`,insert:`#0^{#?}`,title:`Superscript`,cls:`green-template black-glyph-template`,icon:`superscript-template`},{label:`□_□`,insert:`#0_{#?}`,title:`Subscript`,cls:`green-template black-glyph-template`,icon:`subscript-template`},{type:`sep`,cols:1},{label:`(□)`,insert:`\\left(#0\\right)`,title:`Parentheses`,cls:`green-template green-placeholder-glyph`},{label:`|□|`,insert:`\\left|#0\\right|`,title:`Absolute Value`,cls:`green-template green-placeholder-glyph`},{label:`[□]`,insert:`\\left[#0\\right]`,title:`Square Brackets`,cls:`green-template green-placeholder-glyph`},{label:`{□}`,insert:`\\left\\{#0\\right\\}`,title:`Curly Braces`,cls:`green-template green-placeholder-glyph`},{type:`sep`,cols:3},{label:`+`,insert:`+`},{label:`−`,insert:`-`},{label:`×`,insert:`\\times`},{label:`÷`,insert:`\\div`},{label:`/`,insert:`/`},{label:`±`,insert:`\\pm`},{type:`sep`,cols:3},{label:`≥`,insert:`\\geq`},{label:`≤`,insert:`\\leq`},{label:`∩`,insert:`\\cap`},{label:`∪`,insert:`\\cup`},{label:`⊂`,insert:`\\subset`},{label:`∈`,insert:`\\in`},{type:`sep`,cols:4},{label:`∅`,insert:`\\emptyset`},{label:`∞`,insert:`\\infty`},{label:`π`,insert:`\\pi`},{type:`sep`,cols:2},{label:`✂`,action:`CUT`,title:`Cut Formula`,cls:`soft-tool`},{label:`⧉`,action:`COPY`,title:`Copy Formula`,cls:`soft-tool`},{label:`⎘`,action:`PASTE`,title:`Paste Formula`,cls:`soft-tool`},{label:`↶`,action:`UNDO`,title:`Undo`,cls:`soft-tool`},{label:`↷`,action:`REDO`,title:`Redo`,cls:`soft-tool`},{label:`⌫`,action:`CLEAR`,title:`Clear Formula`,cls:`soft-tool`},{type:`sep`,cols:3},{label:`B`,action:`BOLD`,cls:`template format-tool`,title:`Bold`},{label:`1b`,action:`ITALIC`,cls:`format-tool`,title:`Italic`},{label:`BI`,action:`BOLD_ITALIC`,cls:`format-tool`,title:`Bold Italic`},{label:`Ω`,action:`SPECIAL_CHARS`,cls:`format-tool omega-tool`,title:`Greek Letters`},{label:`T`,action:`TEXT`,cls:`format-tool text-tool`,title:`Regular Text`},{label:`A`,action:`TEXT_COLOR`,cls:`format-tool color-tool`,title:`Text Color`},{type:`sep`,cols:1},{label:`RTL`,action:`TOGGLE_RTL`,cls:`format-tool rtl-tool`,title:`Right-to-Left Input`,icon:`rtl-input-template-image`},{type:`sep`,cols:1},{type:`dropdown`,label:`Font...`,width:`92px`},{type:`dropdown`,label:`Size`,width:`86px`}]},{id:`relations`,...h[1],items:v,label:(0,i.jsx)(I,{})},{id:`arrows`,...h[4],label:(0,i.jsx)(B,{})},{id:`greek`,label:(0,i.jsx)(L,{}),items:[{category:`Lowercase Greek Letters`,label:`α`,insert:`\\alpha`},{category:`Lowercase Greek Letters`,label:`β`,insert:`\\beta`},{category:`Lowercase Greek Letters`,label:`γ`,insert:`\\gamma`},{category:`Lowercase Greek Letters`,label:`δ`,insert:`\\delta`},{category:`Lowercase Greek Letters`,label:`ε`,insert:`\\epsilon`},{category:`Lowercase Greek Letters`,label:`ζ`,insert:`\\zeta`},{category:`Lowercase Greek Letters`,label:`η`,insert:`\\eta`},{category:`Lowercase Greek Letters`,label:`θ`,insert:`\\theta`},{category:`Lowercase Greek Letters`,label:`ϑ`,insert:`\\vartheta`},{category:`Lowercase Greek Letters`,label:`ι`,insert:`\\iota`},{category:`Lowercase Greek Letters`,label:`κ`,insert:`\\kappa`},{category:`Lowercase Greek Letters`,label:`λ`,insert:`\\lambda`},{category:`Lowercase Greek Letters`,label:`μ`,insert:`\\mu`},{category:`Lowercase Greek Letters`,label:`ν`,insert:`\\nu`},{category:`Lowercase Greek Letters`,label:`ξ`,insert:`\\xi`},{category:`Lowercase Greek Letters`,label:`ο`,insert:`ο`},{category:`Lowercase Greek Letters`,label:`π`,insert:`\\pi`},{category:`Lowercase Greek Letters`,label:`ϖ`,insert:`\\varpi`},{category:`Lowercase Greek Letters`,label:`ρ`,insert:`\\rho`},{category:`Lowercase Greek Letters`,label:`ς`,insert:`\\varsigma`},{category:`Lowercase Greek Letters`,label:`σ`,insert:`\\sigma`},{category:`Lowercase Greek Letters`,label:`τ`,insert:`\\tau`},{category:`Lowercase Greek Letters`,label:`υ`,insert:`\\upsilon`},{category:`Lowercase Greek Letters`,label:`φ`,insert:`\\phi`},{category:`Lowercase Greek Letters`,label:`ϕ`,insert:`\\varphi`},{category:`Lowercase Greek Letters`,label:`χ`,insert:`\\chi`},{category:`Lowercase Greek Letters`,label:`ψ`,insert:`\\psi`},{category:`Lowercase Greek Letters`,label:`ω`,insert:`\\omega`},{category:`Greek Letter Picker`,label:`|`,action:`GREEK_ITALIC_PICKER`,title:`Italic Uppercase Greek`,icon:`vertical-line-picker-template-image`,cls:`arrow-picker-tool greek-italic-picker-tool`},{category:`Blackboard Bold / Number Sets`,label:`ℕ`,insert:`\\mathbb{N}`},{category:`Blackboard Bold / Number Sets`,label:`ℤ`,insert:`\\mathbb{Z}`},{category:`Blackboard Bold / Number Sets`,label:`ℚ`,insert:`\\mathbb{Q}`},{category:`Blackboard Bold / Number Sets`,label:`ℂ`,insert:`\\mathbb{C}`},{category:`Blackboard Bold / Number Sets`,label:`ℝ`,insert:`\\mathbb{R}`},{category:`Blackboard Bold / Number Sets`,label:`ℙ`,insert:`\\mathbb{P}`},{category:`Blackboard Bold Picker`,label:`|`,action:`BLACKBOARD_BOLD_PICKER`,title:`More Blackboard Bold Letters`,icon:`vertical-line-picker-template-image`,cls:`arrow-picker-tool blackboard-bold-picker-tool`},{category:`Fraktur Symbols`,label:`𝔄`,insert:`\\mathfrak{A}`},{category:`Fraktur Symbols`,label:`𝔅`,insert:`\\mathfrak{B}`},{category:`Fraktur Symbols`,label:`𝔊`,insert:`\\mathfrak{G}`},{category:`Script Symbols`,label:`𝒜`,insert:`\\mathscr{A}`},{category:`Script Symbols`,label:`ℬ`,insert:`\\mathscr{B}`},{category:`Script Symbols`,label:`𝒞`,insert:`\\mathscr{C}`},{category:`Fraktur / Script Picker`,label:`|`,action:`FRAKTUR_SCRIPT_PICKER`,title:`More Fraktur and Script Letters`,icon:`vertical-line-picker-template-image`,cls:`arrow-picker-tool fraktur-script-picker-tool`},{category:`Hebrew Mathematical Symbols`,label:`ℑ`,insert:`\\Im`},{category:`Hebrew Mathematical Symbols`,label:`ℜ`,insert:`\\Re`},{category:`Hebrew Mathematical Symbols`,label:`ℓ`,insert:`\\ell`},{category:`Hebrew Symbol Picker`,label:`|`,action:`HEBREW_SYMBOL_PICKER`,title:`More Hebrew Mathematical Symbols`,icon:`vertical-line-picker-template-image`,cls:`arrow-picker-tool hebrew-symbol-picker-tool`},{category:`Arabic-Indic Numeral Systems`,label:`٤٦`,action:`ARABIC_INDIC_NUMERALS`,title:`Arabic-Indic Numerals`,icon:`arabic-indic-numerals-template-image`,cls:`numeral-mode-tool`},{category:`Arabic-Indic Numeral Systems`,label:`۴۶`,action:`EASTERN_ARABIC_INDIC_NUMERALS`,title:`Eastern Arabic-Indic Numerals (Persian/Urdu)`,icon:`eastern-arabic-indic-numerals-template-image`,cls:`numeral-mode-tool`},{category:`Periodic Table Symbols`,label:`H`,insert:`H`},{category:`Periodic Table Symbols`,label:`C`,insert:`C`},{category:`Periodic Table Symbols`,label:`N`,insert:`N`},{category:`Periodic Table Symbols`,label:`O`,insert:`O`},{category:`Periodic Table Symbols`,label:`F`,insert:`F`},{category:`Periodic Table Symbols`,label:`S`,insert:`S`},{category:`Periodic Table Picker`,label:`|`,action:`PERIODIC_TABLE_PICKER`,title:`Periodic Table`,icon:`vertical-line-picker-template-image`,cls:`arrow-picker-tool periodic-table-picker-tool`}]},{id:`matrix`,...h[11],label:(0,i.jsx)(P,{})},{id:`power-frac`,...h[2],label:(0,i.jsx)(F,{})},{id:`brackets`,label:(0,i.jsx)(R,{}),items:[{label:`(□)`,insert:`\\left(#0\\right)`,cls:`green-placeholder-glyph`},{label:`[□]`,insert:`\\left[#0\\right]`,cls:`green-placeholder-glyph`},{label:`|□|`,insert:`\\left|#0\\right|`,cls:`green-placeholder-glyph`},{label:`‖□‖`,insert:`\\left\\| #0 \\right\\|`,cls:`green-placeholder-glyph`},{label:`⟨□⟩`,insert:`\\left\\langle #0 \\right\\rangle`,cls:`green-placeholder-glyph`},{label:`{□}`,insert:`\\left\\{#0\\right\\}`,cls:`green-placeholder-glyph`},_(`bracketDelimiterExtras`,`More Delimiters`),{type:`sep`,cols:2},{label:`overbrace`,insert:`\\overbrace{#0}`,cls:`template`,directInsert:!0,title:`Overbrace`,icon:`overbrace-arc-template-image`},{label:`underbrace`,insert:`\\underbrace{#0}`,cls:`template`,directInsert:!0,title:`Underbrace`,icon:`underbrace-arc-template-image`},{label:`overparen`,insert:`\\overparen{#0}`,cls:`template`,directInsert:!0,title:`Overparen`,icon:`overparen-template-image`},{label:`underparen`,insert:`\\underparen{#0}`,cls:`template`,directInsert:!0,title:`Underparen`,icon:`underparen-template-image`},{type:`sep`,cols:2},{label:`⃗
15
15
  ▯`,insert:`\\overrightharpoon{#0}`,cls:`template`,directInsert:!0,title:`Vector Accent`,icon:`vec-accent-template-image`},{label:`→
16
16
  ▯`,insert:`\\overrightarrow{#?}`,cls:`template`,directInsert:!0,title:`Right Arrow Accent`,icon:`overrightarrow-accent-template-image`},{label:`↔
17
17
  ▯`,insert:`\\overleftrightarrow{#?}`,cls:`template`,directInsert:!0,title:`Left-Right Arrow Accent`,icon:`overleftrightarrow-accent-template-image`},{label:`¯
@@ -30,27 +30,27 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
30
30
  ▯`,insert:`\\cancel{#?}`,cls:`template`,directInsert:!0,title:`Cancel`,icon:`cancel-diagonal-template-image`},{label:`╲
31
31
  ▯`,insert:`\\bcancel{#?}`,cls:`template`,directInsert:!0,title:`Backward Cancel`,icon:`bcancel-template-image`},{label:`?
32
32
  ?`,insert:`\\htmlStyle{text-decoration:line-through;text-decoration-skip-ink:none;}{#0}`,cls:`template`,directInsert:!0,title:`Strikeout Text`,icon:`sout-template-image`},{label:`╳
33
- ▯`,insert:`\\xcancel{#?}`,cls:`template`,directInsert:!0,title:`Cross Cancel`,icon:`xcancel-template-image`},_(`strikeDecorationExtras`,`More Strike Decorations`)]},{id:`sets`,label:(0,i.jsx)(N,{top:`Σ ∪`,compact:!0}),items:[{label:`sum-limits-both`,insert:`\\sum\\limits_{#?}^{#?}`,cls:`template`,directInsert:!0,title:`Summation With Upper and Lower Limits`,icon:`sum-limits-both-template-image`},{label:`sum-limits-lower`,insert:`\\sum\\limits_{#?}`,cls:`template`,directInsert:!0,title:`Summation With Lower Limit`,icon:`sum-limits-lower-template-image`},{label:`sum-right-both`,insert:`\\sum\\nolimits^{#?}_{#?}`,cls:`template`,directInsert:!0,title:`Summation With Right Superscript and Subscript`,icon:`sum-right-both-template-image`},{label:`sum-right-lower`,insert:`\\sum\\nolimits_{#?}`,cls:`template`,directInsert:!0,title:`Summation With Right Subscript`,icon:`sum-right-lower-template-image`},{label:`prod-limits-both`,insert:`\\prod\\limits^{#?}_{#?}`,cls:`template`,directInsert:!0,title:`Product With Upper and Lower Limits`,icon:`prod-limits-both-template-image`},{label:`prod-limits-lower`,insert:`\\prod\\limits_{#?}`,cls:`template`,directInsert:!0,title:`Product With Lower Limit`,icon:`prod-limits-lower-template-image`},{label:`prod-right-both`,insert:`\\prod\\nolimits^{#?}_{#?}`,cls:`template`,directInsert:!0,title:`Product With Right Superscript and Subscript`,icon:`prod-right-both-template-image`},{label:`prod-right-lower`,insert:`\\prod\\nolimits_{#?}`,cls:`template`,directInsert:!0,title:`Product With Right Subscript`,icon:`prod-right-lower-template-image`},{label:`□
33
+ ▯`,insert:`\\xcancel{#?}`,cls:`template`,directInsert:!0,title:`Cross Cancel`,icon:`xcancel-template-image`},_(`strikeDecorationExtras`,`More Strike Decorations`)]},{id:`sets`,label:(0,i.jsx)(M,{top:`Σ ∪`,compact:!0}),items:[{label:`sum-limits-both`,insert:`\\sum\\limits_{#?}^{#?}`,cls:`template`,directInsert:!0,title:`Summation With Upper and Lower Limits`,icon:`sum-limits-both-template-image`},{label:`sum-limits-lower`,insert:`\\sum\\limits_{#?}`,cls:`template`,directInsert:!0,title:`Summation With Lower Limit`,icon:`sum-limits-lower-template-image`},{label:`sum-right-both`,insert:`\\sum\\nolimits^{#?}_{#?}`,cls:`template`,directInsert:!0,title:`Summation With Right Superscript and Subscript`,icon:`sum-right-both-template-image`},{label:`sum-right-lower`,insert:`\\sum\\nolimits_{#?}`,cls:`template`,directInsert:!0,title:`Summation With Right Subscript`,icon:`sum-right-lower-template-image`},{label:`prod-limits-both`,insert:`\\prod\\limits^{#?}_{#?}`,cls:`template`,directInsert:!0,title:`Product With Upper and Lower Limits`,icon:`prod-limits-both-template-image`},{label:`prod-limits-lower`,insert:`\\prod\\limits_{#?}`,cls:`template`,directInsert:!0,title:`Product With Lower Limit`,icon:`prod-limits-lower-template-image`},{label:`prod-right-both`,insert:`\\prod\\nolimits^{#?}_{#?}`,cls:`template`,directInsert:!0,title:`Product With Right Superscript and Subscript`,icon:`prod-right-both-template-image`},{label:`prod-right-lower`,insert:`\\prod\\nolimits_{#?}`,cls:`template`,directInsert:!0,title:`Product With Right Subscript`,icon:`prod-right-lower-template-image`},{label:`□
34
34
 
35
35
  □`,insert:`\\displaystyle{\\underset{\\htmlStyle{font-size:1.1em;display:inline-block;padding-top:0.34em;line-height:1.15}{#?}}{\\overset{\\htmlStyle{font-size:1.1em;display:inline-block;padding-bottom:0.34em;line-height:1.15}{#?}}{\\htmlStyle{font-size:1.45em;line-height:1.1}{#0}}}}`,cls:`template`,directInsert:!0,title:`Operator With Upper and Lower Limits`,icon:`operator-limits-both-template-image`},{label:`▯
36
- □`,insert:`\\displaystyle{\\underset{\\htmlStyle{font-size:1.1em;display:inline-block;padding-top:0.34em;line-height:1.15}{#?}}{\\htmlStyle{font-size:1.45em;line-height:1.1}{#0}}}`,cls:`template`,directInsert:!0,title:`Operator With Lower Limit`,icon:`operator-lower-limit-template-image`},{label:`▯^□_□`,insert:`\\displaystyle{\\htmlStyle{font-size:1.45em;line-height:1.1}{#0}^{\\htmlStyle{font-size:1.1em;display:inline-block;padding-bottom:0.26em;line-height:1.15}{#?}}_{\\htmlStyle{font-size:1.1em;display:inline-block;padding-top:0.26em;line-height:1.15}{#?}}}`,cls:`template`,directInsert:!0,title:`Operator With Right Superscript and Subscript`,icon:`operator-right-sup-sub-template-image`},{label:`▯_□`,insert:`\\displaystyle{\\htmlStyle{font-size:1.45em;line-height:1.1}{#0}_{\\htmlStyle{font-size:1.1em;display:inline-block;padding-top:0.26em;line-height:1.15}{#?}}}`,cls:`template`,directInsert:!0,title:`Operator With Right Subscript`,icon:`operator-right-sub-template-image`},{label:`⋂`,insert:`\\bigcap`},{label:`⋃`,insert:`\\bigcup`},{label:`∏`,insert:`\\prod`},{label:`∐`,insert:`\\coprod`},{label:`⨅`,insert:`\\sqcap`},{label:`⨆`,insert:`\\bigsqcup`},{label:`∑`,insert:`\\sum`}]},{id:`calc`,label:(0,i.jsx)(z,{}),isTemplate:!0,items:[{label:`integral-both`,insert:`\\int_{#?}^{#?}`,cls:`template`,directInsert:!0,title:`Definite Integral`,icon:`integral-both-template-image`},{label:`integral-lower`,insert:`\\int_{#?}`,cls:`template`,directInsert:!0,title:`Integral With Subscript`,icon:`integral-lower-template-image`},{label:`∫□d□`,insert:`\\int_{#?}^{#?} #? \\, d#?`,directInsert:!0,title:`Integral`,icon:`integral-box-differential-template-image`},{label:``,insert:`\\int_{#?} #? \\, d#?`,cls:`template`,directInsert:!0,title:`Integral`,icon:`integral-template-image`},{type:`sep`,cols:4},{label:`d`,insert:`d`,cls:`template`,directInsert:!0,title:`Differential`},{label:`∂`,insert:`∂`,cls:`template`,directInsert:!0,title:`Partial Differential`},{label:`first-derivative`,insert:`\\frac{d#?}{d#?}`,cls:`template`,directInsert:!0,title:`First Derivative`,icon:`first-derivative-template-image`},{label:`partial-derivative`,insert:`\\frac{\\partial#?}{\\partial#?}`,cls:`template`,directInsert:!0,title:`Partial Derivative`,icon:`partial-derivative-template-image`},{type:`sep`,cols:2},{label:`limit-infinity`,insert:`\\lim_{#?\\to\\infty}`,cls:`template`,directInsert:!0,title:`Limit to Infinity`,icon:`limit-infinity-template-image`},{label:`limit-generic`,insert:`\\lim_{#?}`,cls:`template`,directInsert:!0,title:`Limit`,icon:`limit-generic-template-image`},{type:`sep`,cols:2},{label:`∇×□`,insert:`\\nabla \\times #?`,cls:`template green-placeholder-glyph`,directInsert:!0,title:`Curl`},{label:`∇·□`,insert:`\\nabla \\cdot #?`,cls:`template green-placeholder-glyph`,directInsert:!0,title:`Divergence`},{label:`∇□`,insert:`\\nabla #?`,cls:`template green-placeholder-glyph`,directInsert:!0,title:`Gradient`},{label:`Δ□`,insert:`\\Delta #?`,cls:`template green-placeholder-glyph`,directInsert:!0,title:`Delta Expression`},{type:`sep`,cols:3},{label:`∫`,insert:`\\int`,icon:`single-integral-template-image`},{label:`∮`,insert:`\\oint`,icon:`contour-integral-template-image`},{label:`∬`,insert:`\\iint`,icon:`double-integral-template-image`},{label:`∯`,insert:`\\oiint`,icon:`double-contour-integral-template-image`},_(`tripleIntegralExtras`,`More Triple Integrals`),{type:`sep`,cols:2},{label:`log(□)`,insert:`\\log\\left(#0\\right)`,cls:`green-placeholder-glyph`},{label:`log₍□₎(□)`,insert:`\\log_{#?}\\left(#?\\right)`,cls:`template`,directInsert:!0,title:`Logarithm With Base`,icon:`log-base-template-image`},{type:`sep`,cols:4},{label:`sin(□)`,insert:`\\sin\\left(#0\\right)`,cls:`green-placeholder-glyph`},{label:`tan(□)`,insert:`\\tan\\left(#0\\right)`,cls:`green-placeholder-glyph`},{label:`cos(□)`,insert:`\\cos\\left(#0\\right)`,cls:`green-placeholder-glyph`},{label:`ln(□)`,insert:`\\ln\\left(#0\\right)`,cls:`green-placeholder-glyph`},_(`trigFunctionExtras`,`More Trig Functions`)]},{id:`move-text`,label:(0,i.jsx)(B,{}),isTemplate:!0,items:[{label:`Move Up`,action:`MOVE_TEXT_UP`,cls:`template`,title:`Move Up`,icon:`move-text-up-template-image`},{label:`Move Right`,action:`MOVE_TEXT_RIGHT`,cls:`template`,title:`Move Right`,icon:`move-text-right-template-image`},{label:`Move Left`,action:`MOVE_TEXT_LEFT`,cls:`template`,title:`Move Left`,icon:`move-text-left-template-image`},{label:`Move Down`,action:`MOVE_TEXT_DOWN`,cls:`template`,title:`Move Down`,icon:`move-text-down-template-image`}]}],se=[{id:`chem-period-1`,label:(0,i.jsx)(N,{top:`H-Ne`,bottom:`elem`}),isChem:!0,items:[`H`,`He`,`Li`,`Be`,`B`,`C`,`N`,`O`,`F`,`Ne`].map(e=>({label:e,insert:e,cls:`chem-element`}))},{id:`chem-period-2`,label:(0,i.jsx)(N,{top:`Na-Ca`,bottom:`elem`}),isChem:!0,items:[`Na`,`Mg`,`Al`,`Si`,`P`,`S`,`Cl`,`Ar`,`K`,`Ca`].map(e=>({label:e,insert:e,cls:`chem-element`}))},{id:`chem-reactions`,label:(0,i.jsx)(N,{top:`Fe-Zn`,bottom:`→ ⇌`}),isChem:!0,items:[...[`Fe`,`Cu`,`Zn`,`Mn`].map(e=>({label:e,insert:e,cls:`chem-element`})),{type:`sep`,cols:2},...[`Cr`,`Ni`,`Co`,`Ag`].map(e=>({label:e,insert:e,cls:`chem-element`})),{type:`sep`,cols:2},...[`Au`,`Hg`,`Pb`,`Sn`].map(e=>({label:e,insert:e,cls:`chem-element`})),{type:`sep`,cols:2},...[`Br`,`I`,`Ba`,`Pt`].map(e=>({label:e,insert:e,cls:`chem-element`})),{type:`sep`,cols:2},{label:`Xe`,insert:`Xe`,cls:`chem-element`},{type:`sep`,cols:5},{label:`→`,insert:`->`,cls:`chem-arrow`},{label:`⇌`,insert:`<=>`,cls:`chem-arrow`},{label:`←`,insert:`<-`,cls:`chem-arrow`},{label:`⇄`,insert:`<->`,cls:`chem-arrow`},{label:`↑`,insert:`^`,cls:`chem-arrow`},{type:`sep`,cols:4},{label:`↓`,insert:`v`,cls:`chem-arrow`},{label:`+`,insert:` + `,cls:`chem-arrow`},{label:`→(Δ)`,insert:`->[\\Delta]`,cls:`chem-arrow`},{label:`→(aq)`,insert:`->[aq]`,cls:`chem-arrow`}]},{id:`chem-states`,label:(0,i.jsx)(N,{top:`(aq)`,bottom:`± ₂`}),isChem:!0,items:[{label:`(s)`,insert:`(s)`,cls:`chem-state`},{label:`(l)`,insert:`(l)`,cls:`chem-state`},{label:`(g)`,insert:`(g)`,cls:`chem-state`},{label:`(aq)`,insert:`(aq)`,cls:`chem-state`},{type:`sep`,cols:2},{label:`(conc)`,insert:`(conc)`,cls:`chem-state`},{label:`(dil)`,insert:`(dil)`,cls:`chem-state`},{label:`(ppt)`,insert:`(ppt)`,cls:`chem-state`},{type:`sep`,cols:2},{label:`✚`,insert:`^{+}`,cls:`chem-element`},{label:`━`,insert:`^{-}`,cls:`chem-element`},{label:`²⁺`,insert:`^{2+}`,cls:`chem-element`},{label:`²⁻`,insert:`^{2-}`,cls:`chem-element`},{type:`sep`,cols:2},{label:`³⁺`,insert:`^{3+}`,cls:`chem-element`},{label:`³⁻`,insert:`^{3-}`,cls:`chem-element`},{label:`2`,insert:`2`,cls:`chem-element`},{label:`3`,insert:`3`,cls:`chem-element`},{type:`sep`,cols:2},{label:`4`,insert:`4`,cls:`chem-element`},{label:`5`,insert:`5`,cls:`chem-element`},{label:`6`,insert:`6`,cls:`chem-element`},{label:`7`,insert:`7`,cls:`chem-element`},{type:`sep`,cols:3},{label:`8`,insert:`8`,cls:`chem-element`},{label:`x`,insert:`x`,cls:`chem-element`},{label:`n`,insert:`n`,cls:`chem-element`}]},{id:`chem-molecules`,label:(0,i.jsx)(N,{top:`H₂O`,bottom:`ions`}),isChem:!0,items:[{label:`H₂O`,insert:`H2O`,cls:`chem-element`},{label:`CO₂`,insert:`CO2`,cls:`chem-element`},{label:`NH₃`,insert:`NH3`,cls:`chem-element`},{label:`H₂SO₄`,insert:`H2SO4`,cls:`chem-element`},{label:`HCl`,insert:`HCl`,cls:`chem-element`},{label:`NaOH`,insert:`NaOH`,cls:`chem-element`},{label:`NaCl`,insert:`NaCl`,cls:`chem-element`},{label:`CaCO₃`,insert:`CaCO3`,cls:`chem-element`},{label:`HNO₃`,insert:`HNO3`,cls:`chem-element`},{label:`H₃PO₄`,insert:`H3PO4`,cls:`chem-element`},{label:`CH₃COOH`,insert:`CH3COOH`,cls:`chem-element`},{label:`C₆H₁₂O₆`,insert:`C6H12O6`,cls:`chem-element`},{label:`CH₄`,insert:`CH4`,cls:`chem-element`},{label:`C₂H₅OH`,insert:`C2H5OH`,cls:`chem-element`},{label:`CO₃²⁻`,insert:`CO3^{2-}`,cls:`chem-element`},{label:`SO₄²⁻`,insert:`SO4^{2-}`,cls:`chem-element`},{label:`NO₃⁻`,insert:`NO3^-`,cls:`chem-element`},{label:`PO₄³⁻`,insert:`PO4^{3-}`,cls:`chem-element`},{label:`NH₄⁺`,insert:`NH4^+`,cls:`chem-element`},{label:`OH⁻`,insert:`OH^-`,cls:`chem-element`}]}];function ce(e=``){if(String(e).match(/^\\ce\{([\s\S]*)\}$/))return e;let t=e.replace(/\\text\{([^}]*)\}/g,`$1`).replace(/\$/g,``).trim();return t?`\\ce{${t}}`:``}function N({top:e,bottom:t=``,compact:n=!1}){return(0,i.jsxs)(`span`,{className:`cme-tab-icon${n?` compact`:``}`,"aria-hidden":`true`,children:[(0,i.jsx)(`span`,{className:`cme-tab-icon-top`,children:e}),t?(0,i.jsx)(`span`,{className:`cme-tab-icon-bottom`,children:t}):null]})}function P(){return(0,i.jsx)(`span`,{className:`cme-tab-icon cme-tab-icon--svg`,"aria-hidden":`true`,children:(0,i.jsxs)(`svg`,{className:`cme-tab-svg-icon`,viewBox:`0 0 48 24`,focusable:`false`,children:[(0,i.jsx)(`path`,{d:`M2 13 L5 13 L7 18 L10 4 L20 4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,i.jsx)(`rect`,{x:`13`,y:`7`,width:`8`,height:`8`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.7`}),(0,i.jsx)(`rect`,{x:`31`,y:`3`,width:`6`,height:`6`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.7`}),(0,i.jsx)(`line`,{x1:`29`,y1:`12`,x2:`39`,y2:`12`,stroke:`currentColor`,strokeWidth:`1.7`}),(0,i.jsx)(`rect`,{x:`31`,y:`15`,width:`6`,height:`6`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.7`})]})})}function F(){return(0,i.jsx)(`span`,{className:`cme-tab-icon cme-tab-icon--svg`,"aria-hidden":`true`,children:(0,i.jsxs)(`svg`,{className:`cme-tab-svg-icon`,viewBox:`0 0 210 110`,focusable:`false`,children:[(0,i.jsx)(`path`,{d:`M12 8 H4 V102 H12`,fill:`none`,stroke:`currentColor`,strokeWidth:`7`}),(0,i.jsx)(`path`,{d:`M96 8 H104 V102 H96`,fill:`none`,stroke:`currentColor`,strokeWidth:`7`}),(0,i.jsx)(`rect`,{x:`24`,y:`15`,width:`22`,height:`32`,fill:`none`,stroke:`currentColor`,strokeWidth:`7.5`}),(0,i.jsx)(`rect`,{x:`64`,y:`15`,width:`22`,height:`32`,fill:`none`,stroke:`currentColor`,strokeWidth:`7.5`}),(0,i.jsx)(`rect`,{x:`24`,y:`63`,width:`22`,height:`32`,fill:`none`,stroke:`currentColor`,strokeWidth:`7.5`}),(0,i.jsx)(`rect`,{x:`64`,y:`63`,width:`22`,height:`32`,fill:`none`,stroke:`currentColor`,strokeWidth:`7.5`}),(0,i.jsx)(`path`,{d:`M142 8 C132 8 132 18 132 28 C132 38 128 45 124 49 C128 53 132 60 132 70 C132 80 132 90 142 102`,fill:`none`,stroke:`currentColor`,strokeWidth:`7`}),(0,i.jsx)(`rect`,{x:`154`,y:`15`,width:`22`,height:`32`,fill:`none`,stroke:`currentColor`,strokeWidth:`7.5`}),(0,i.jsx)(`rect`,{x:`154`,y:`63`,width:`22`,height:`32`,fill:`none`,stroke:`currentColor`,strokeWidth:`7.5`})]})})}function le(){return(0,i.jsx)(`span`,{className:`cme-tab-icon cme-tab-icon--svg`,"aria-hidden":`true`,children:(0,i.jsxs)(`svg`,{className:`cme-tab-svg-icon`,viewBox:`0 0 70 50`,focusable:`false`,children:[(0,i.jsx)(`rect`,{x:`4`,y:`20`,width:`20`,height:`28`,fill:`none`,stroke:`currentColor`,strokeWidth:`4`}),(0,i.jsx)(`rect`,{x:`24`,y:`6`,width:`12`,height:`22`,fill:`none`,stroke:`currentColor`,strokeWidth:`4`}),(0,i.jsx)(`rect`,{x:`51`,y:`10`,width:`8`,height:`10`,fill:`none`,stroke:`currentColor`,strokeWidth:`4`}),(0,i.jsx)(`rect`,{x:`48`,y:`30`,width:`14`,height:`18`,fill:`none`,stroke:`currentColor`,strokeWidth:`4`})]})})}function I(){return(0,i.jsx)(`span`,{className:`cme-tab-icon cme-tab-icon--svg`,"aria-hidden":`true`,children:(0,i.jsxs)(`svg`,{className:`cme-tab-svg-icon`,viewBox:`0 0 56 28`,focusable:`false`,children:[(0,i.jsx)(`path`,{d:`M18 4 C10 4 6 9 6 14 C6 19 10 24 18 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,i.jsx)(`line`,{x1:`8`,y1:`14`,x2:`18`,y2:`14`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`}),(0,i.jsx)(`text`,{x:`26`,y:`24`,fill:`currentColor`,fontFamily:`Cambria Math, serif`,fontSize:`35`,children:`∞`})]})})}function L(){return(0,i.jsx)(`span`,{className:`cme-tab-icon cme-tab-icon--svg`,"aria-hidden":`true`,children:(0,i.jsx)(`svg`,{className:`cme-tab-svg-icon`,viewBox:`0 0 40 24`,focusable:`false`,children:(0,i.jsx)(`text`,{x:`2`,y:`20`,fill:`currentColor`,fontFamily:`Segoe UI Symbol, Arial Unicode MS, sans-serif`,fontSize:`25`,children:`α Ω`})})})}function R(){return(0,i.jsx)(`span`,{className:`cme-tab-icon cme-tab-icon--svg`,"aria-hidden":`true`,children:(0,i.jsxs)(`svg`,{className:`cme-tab-svg-icon`,viewBox:`0 0 90 50`,focusable:`false`,children:[(0,i.jsx)(`path`,{d:`M12 8 C4 14,4 36,12 42`,fill:`none`,stroke:`currentColor`,strokeWidth:`4`,strokeLinecap:`round`}),(0,i.jsx)(`rect`,{x:`20`,y:`10`,width:`18`,height:`30`,fill:`none`,stroke:`currentColor`,strokeWidth:`4`}),(0,i.jsx)(`path`,{d:`M46 8 C54 14,54 36,46 42`,fill:`none`,stroke:`currentColor`,strokeWidth:`4`,strokeLinecap:`round`}),(0,i.jsx)(`path`,{d:`M65 10 Q75 2 85 10`,fill:`none`,stroke:`currentColor`,strokeWidth:`4`,strokeLinecap:`round`}),(0,i.jsx)(`rect`,{x:`68`,y:`18`,width:`14`,height:`22`,fill:`none`,stroke:`currentColor`,strokeWidth:`4`})]})})}function z(){return(0,i.jsx)(`span`,{className:`cme-tab-icon cme-tab-icon--svg`,"aria-hidden":`true`,children:(0,i.jsxs)(`svg`,{className:`cme-tab-svg-icon`,viewBox:`0 0 80 50`,focusable:`false`,children:[(0,i.jsx)(`text`,{x:`2`,y:`40`,fill:`currentColor`,fontSize:`42`,fontFamily:`Cambria Math, Times New Roman, serif`,fontWeight:`500`,children:`∫`}),(0,i.jsx)(`rect`,{x:`30`,y:`1`,width:`10`,height:`10`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`}),(0,i.jsx)(`rect`,{x:`24`,y:`40`,width:`10`,height:`10`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`}),(0,i.jsx)(`text`,{x:`45`,y:`36`,fill:`currentColor`,fontSize:`32`,fontWeight:`500`,fontFamily:`Cambria Math, Times New Roman, serif`,children:`lim`})]})})}function B(){return(0,i.jsx)(`span`,{className:`cme-tab-icon cme-tab-icon--svg`,"aria-hidden":`true`,children:(0,i.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,children:[(0,i.jsx)(`path`,{d:`M12 3V12`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`}),(0,i.jsx)(`path`,{d:`M8.5 8.5L12 12L15.5 8.5`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`}),(0,i.jsx)(`path`,{d:`M4 15C4 19 7.5 22 12 22C16.5 22 20 19 20 15`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,fill:`none`}),(0,i.jsx)(`path`,{d:`M7 15C7 17.5 9 19 12 19C15 19 17 17.5 17 15`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,fill:`none`})]})})}function V(){return(0,i.jsx)(`span`,{className:`cme-tab-icon cme-tab-icon--svg`,"aria-hidden":`true`,children:(0,i.jsx)(`svg`,{className:`cme-tab-svg-icon`,viewBox:`0 0 64 24`,focusable:`false`,children:(0,i.jsxs)(`g`,{fill:`currentColor`,children:[(0,i.jsx)(`path`,{d:`M4 10h20V5l12 7-12 7v-5H4z`}),(0,i.jsx)(`circle`,{cx:`44`,cy:`18`,r:`2.5`}),(0,i.jsx)(`circle`,{cx:`52`,cy:`12`,r:`2.5`}),(0,i.jsx)(`circle`,{cx:`60`,cy:`6`,r:`2.5`})]})})})}var ue=class extends r.Plugin{static get pluginName(){return`MathInlinePlugin`}static get requires(){return[r.Widget]}init(){let e=this.editor;e.model.schema.register(`mathInline`,{isInline:!0,isObject:!0,allowWhere:`$text`,allowAttributes:[`latex`,`dir`]}),e.model.schema.addChildCheck((e,t)=>{if(t.name===`mathInline`)return!0}),e.conversion.for(`editingDowncast`).elementToElement({model:`mathInline`,view:(t,{writer:n})=>{let i=t.getAttribute(`latex`)||``,a=t.getAttribute(`dir`)===`rtl`?`rtl`:`ltr`,o=`math-`+Math.random().toString(36).substr(2,9);window.__ckMathWidgets.set(o,t);let s=n.createContainerElement(`span`,{class:`ck-math-widget ck-math-inline-word`,contenteditable:`false`,"data-math-id":o,"data-latex":i,"data-dir":a,dir:a}),c=n.createRawElement(`span`,{class:`ck-math-widget-inner`,style:`display:inline-block;vertical-align:middle;margin:0 2px;cursor:pointer;width:auto;max-width:100%;pointer-events:none;`},t=>{let n=document.createElement(`math-field`);n.setAttribute(`read-only`,``),n.setAttribute(`math-virtual-keyboard-policy`,`manual`),n.setAttribute(`tabindex`,`-1`),n.setAttribute(`letter-shape-style`,`upright`),n.setAttribute(`dir`,a),n.style.display=`inline-block`,n.style.width=`auto`,n.style.maxWidth=`100%`,n.style.verticalAlign=`middle`,n.style.border=`none`,n.style.background=`transparent`,n.style.outline=`none`,n.style.fontSize=`inherit`,n.style.minHeight=`auto`,n.style.padding=`0 2px`,n.style.margin=`0`,n.style.pointerEvents=`none`,n.style.direction=a,n.style.textAlign=a===`rtl`?`right`:`left`,n.style.unicodeBidi=a===`rtl`?`plaintext`:`normal`,n.style.color=`#000000`;let r=()=>{n.setValue?n.setValue(i,{silenceNotifications:!0}):n.value=i};customElements.get(`math-field`)?requestAnimationFrame(r):customElements.whenDefined(`math-field`).then(()=>requestAnimationFrame(r)),t.appendChild(n);let o=()=>{let n=t.parentElement;n&&m(e,n)};o(),requestAnimationFrame(o)});return n.insert(n.createPositionAt(s,0),c),(0,r.toWidget)(s,n,{label:`math formula`})}});let t=e.editing.view.document;this.listenTo(t,`mousedown`,(t,n)=>{let r=c(n.domTarget);r&&n.domEvent.button===0&&(t.stop(),n.preventDefault(),p(e,null,l(r),r))},{priority:`high`}),e.conversion.for(`dataDowncast`).elementToElement({model:`mathInline`,view:(e,{writer:t})=>{let n=e.getAttribute(`latex`)||``,r=e.getAttribute(`dir`)===`rtl`?`rtl`:`ltr`,i=t.createContainerElement(`span`,{class:`math-tex`,"data-latex":n,"data-dir":r,dir:r,style:`display:inline;`});return t.insert(t.createPositionAt(i,0),t.createText(n)),i}}),e.conversion.for(`upcast`).elementToElement({view:{name:`span`,classes:`math-tex`},model:(e,{writer:t})=>{let n=e.getAttribute(`data-latex`)||``,r=e.getAttribute(`data-dir`)===`rtl`||e.getAttribute(`dir`)===`rtl`?`rtl`:`ltr`;return t.createElement(`mathInline`,{latex:n,dir:r})}})}},H=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20"><path d="M4 12h3l3 6l5-12h5" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`,de=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20"><rect x="3" y="3" width="18" height="18" rx="3" fill="none" stroke="currentColor" stroke-width="2"/><text x="12" y="16" text-anchor="middle" font-size="12" font-weight="bold" fill="currentColor" font-family="system-ui, sans-serif">C</text><text x="6" y="8" font-size="4" font-weight="bold" fill="currentColor" font-family="system-ui, sans-serif">6</text></svg>`,fe=[{label:`Black`,value:`#000000`},{label:`Dim Gray`,value:`#696969`},{label:`Gray`,value:`#808080`},{label:`Dark Gray`,value:`#a9a9a9`},{label:`Silver`,value:`#c0c0c0`},{label:`White`,value:`#ffffff`},{label:`Red`,value:`#ff0000`},{label:`Orange`,value:`#ffa500`},{label:`Yellow`,value:`#ffff00`},{label:`Lime`,value:`#00ff00`},{label:`Cyan`,value:`#00ffff`},{label:`Blue`,value:`#0000ff`},{label:`Purple`,value:`#800080`},{label:`Magenta`,value:`#ff00ff`},{label:`Pink`,value:`#ffc0cb`},{label:`Brown`,value:`#a52a2a`},{label:`Maroon`,value:`#800000`},{label:`Olive`,value:`#808000`},{label:`Green`,value:`#008000`},{label:`Teal`,value:`#008080`},{label:`Navy`,value:`#000080`},{label:`Indigo`,value:`#4b0082`},{label:`Violet`,value:`#ee82ee`},{label:`Gold`,value:`#ffd700`}];function pe(e){let t=String(e||``).trim();if(!t)return``;if(t===`none`)return`none`;if(typeof document>`u`)return t.toLowerCase();let n=document.createElement(`span`);if(n.style.color=``,n.style.color=t,!n.style.color)return``;n.style.position=`absolute`,n.style.opacity=`0`,n.style.pointerEvents=`none`,document.body.appendChild(n);let r=window.getComputedStyle(n).color;n.remove();let i=r.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)/i);return i?`#${[i[1],i[2],i[3]].map(e=>Number(e).toString(16).padStart(2,`0`)).join(``)}`:r.toLowerCase()}function U(e){return`data:image/svg+xml;utf8,${encodeURIComponent(e)}`}function W(e){return U(`
36
+ □`,insert:`\\displaystyle{\\underset{\\htmlStyle{font-size:1.1em;display:inline-block;padding-top:0.34em;line-height:1.15}{#?}}{\\htmlStyle{font-size:1.45em;line-height:1.1}{#0}}}`,cls:`template`,directInsert:!0,title:`Operator With Lower Limit`,icon:`operator-lower-limit-template-image`},{label:`▯^□_□`,insert:`\\displaystyle{\\htmlStyle{font-size:1.45em;line-height:1.1}{#0}^{\\htmlStyle{font-size:1.1em;display:inline-block;padding-bottom:0.26em;line-height:1.15}{#?}}_{\\htmlStyle{font-size:1.1em;display:inline-block;padding-top:0.26em;line-height:1.15}{#?}}}`,cls:`template`,directInsert:!0,title:`Operator With Right Superscript and Subscript`,icon:`operator-right-sup-sub-template-image`},{label:`▯_□`,insert:`\\displaystyle{\\htmlStyle{font-size:1.45em;line-height:1.1}{#0}_{\\htmlStyle{font-size:1.1em;display:inline-block;padding-top:0.26em;line-height:1.15}{#?}}}`,cls:`template`,directInsert:!0,title:`Operator With Right Subscript`,icon:`operator-right-sub-template-image`},{label:`⋂`,insert:`\\bigcap`},{label:`⋃`,insert:`\\bigcup`},{label:`∏`,insert:`\\prod`},{label:`∐`,insert:`\\coprod`},{label:`⨅`,insert:`\\sqcap`},{label:`⨆`,insert:`\\bigsqcup`},{label:`∑`,insert:`\\sum`}]},{id:`calc`,label:(0,i.jsx)(ue,{}),isTemplate:!0,items:[{label:`integral-both`,insert:`\\int_{#?}^{#?}`,cls:`template`,directInsert:!0,title:`Definite Integral`,icon:`integral-both-template-image`},{label:`integral-lower`,insert:`\\int_{#?}`,cls:`template`,directInsert:!0,title:`Integral With Subscript`,icon:`integral-lower-template-image`},{label:`∫□d□`,insert:`\\int_{#?}^{#?} #? \\, d#?`,directInsert:!0,title:`Integral`,icon:`integral-box-differential-template-image`},{label:``,insert:`\\int_{#?} #? \\, d#?`,cls:`template`,directInsert:!0,title:`Integral`,icon:`integral-template-image`},{type:`sep`,cols:4},{label:`d`,insert:`d`,cls:`template`,directInsert:!0,title:`Differential`},{label:`∂`,insert:`∂`,cls:`template`,directInsert:!0,title:`Partial Differential`},{label:`first-derivative`,insert:`\\frac{d#?}{d#?}`,cls:`template`,directInsert:!0,title:`First Derivative`,icon:`first-derivative-template-image`},{label:`partial-derivative`,insert:`\\frac{\\partial#?}{\\partial#?}`,cls:`template`,directInsert:!0,title:`Partial Derivative`,icon:`partial-derivative-template-image`},{type:`sep`,cols:2},{label:`limit-infinity`,insert:`\\lim_{#?\\to\\infty}`,cls:`template`,directInsert:!0,title:`Limit to Infinity`,icon:`limit-infinity-template-image`},{label:`limit-generic`,insert:`\\lim_{#?}`,cls:`template`,directInsert:!0,title:`Limit`,icon:`limit-generic-template-image`},{type:`sep`,cols:2},{label:`∇×□`,insert:`\\nabla \\times #?`,cls:`template green-placeholder-glyph`,directInsert:!0,title:`Curl`},{label:`∇·□`,insert:`\\nabla \\cdot #?`,cls:`template green-placeholder-glyph`,directInsert:!0,title:`Divergence`},{label:`∇□`,insert:`\\nabla #?`,cls:`template green-placeholder-glyph`,directInsert:!0,title:`Gradient`},{label:`Δ□`,insert:`\\Delta #?`,cls:`template green-placeholder-glyph`,directInsert:!0,title:`Delta Expression`},{type:`sep`,cols:3},{label:`∫`,insert:`\\int`,icon:`single-integral-template-image`},{label:`∮`,insert:`\\oint`,icon:`contour-integral-template-image`},{label:`∬`,insert:`\\iint`,icon:`double-integral-template-image`},{label:`∯`,insert:`\\oiint`,icon:`double-contour-integral-template-image`},_(`tripleIntegralExtras`,`More Triple Integrals`),{type:`sep`,cols:2},{label:`log(□)`,insert:`\\log\\left(#0\\right)`,cls:`green-placeholder-glyph`},{label:`log₍□₎(□)`,insert:`\\log_{#?}\\left(#?\\right)`,cls:`template`,directInsert:!0,title:`Logarithm With Base`,icon:`log-base-template-image`},{type:`sep`,cols:4},{label:`sin(□)`,insert:`\\sin\\left(#0\\right)`,cls:`green-placeholder-glyph`},{label:`tan(□)`,insert:`\\tan\\left(#0\\right)`,cls:`green-placeholder-glyph`},{label:`cos(□)`,insert:`\\cos\\left(#0\\right)`,cls:`green-placeholder-glyph`},{label:`ln(□)`,insert:`\\ln\\left(#0\\right)`,cls:`green-placeholder-glyph`},_(`trigFunctionExtras`,`More Trig Functions`)]},{id:`move-text`,label:(0,i.jsx)(z,{}),isTemplate:!0,items:[{label:`Move Up`,action:`MOVE_TEXT_UP`,cls:`template`,title:`Move Up`,icon:`move-text-up-template-image`},{label:`Move Right`,action:`MOVE_TEXT_RIGHT`,cls:`template`,title:`Move Right`,icon:`move-text-right-template-image`},{label:`Move Left`,action:`MOVE_TEXT_LEFT`,cls:`template`,title:`Move Left`,icon:`move-text-left-template-image`},{label:`Move Down`,action:`MOVE_TEXT_DOWN`,cls:`template`,title:`Move Down`,icon:`move-text-down-template-image`}]}],ce=[{id:`chem-period-1`,label:(0,i.jsx)(M,{top:`H-Ne`,bottom:`elem`}),isChem:!0,items:[`H`,`He`,`Li`,`Be`,`B`,`C`,`N`,`O`,`F`,`Ne`].map(e=>({label:e,insert:e,cls:`chem-element`}))},{id:`chem-period-2`,label:(0,i.jsx)(M,{top:`Na-Ca`,bottom:`elem`}),isChem:!0,items:[`Na`,`Mg`,`Al`,`Si`,`P`,`S`,`Cl`,`Ar`,`K`,`Ca`].map(e=>({label:e,insert:e,cls:`chem-element`}))},{id:`chem-reactions`,label:(0,i.jsx)(M,{top:`Fe-Zn`,bottom:`→ ⇌`}),isChem:!0,items:[...[`Fe`,`Cu`,`Zn`,`Mn`].map(e=>({label:e,insert:e,cls:`chem-element`})),{type:`sep`,cols:2},...[`Cr`,`Ni`,`Co`,`Ag`].map(e=>({label:e,insert:e,cls:`chem-element`})),{type:`sep`,cols:2},...[`Au`,`Hg`,`Pb`,`Sn`].map(e=>({label:e,insert:e,cls:`chem-element`})),{type:`sep`,cols:2},...[`Br`,`I`,`Ba`,`Pt`].map(e=>({label:e,insert:e,cls:`chem-element`})),{type:`sep`,cols:2},{label:`Xe`,insert:`Xe`,cls:`chem-element`},{type:`sep`,cols:5},{label:`→`,insert:`->`,cls:`chem-arrow`},{label:`⇌`,insert:`<=>`,cls:`chem-arrow`},{label:`←`,insert:`<-`,cls:`chem-arrow`},{label:`⇄`,insert:`<->`,cls:`chem-arrow`},{label:`↑`,insert:`^`,cls:`chem-arrow`},{type:`sep`,cols:4},{label:`↓`,insert:`v`,cls:`chem-arrow`},{label:`+`,insert:` + `,cls:`chem-arrow`},{label:`→(Δ)`,insert:`->[\\Delta]`,cls:`chem-arrow`},{label:`→(aq)`,insert:`->[aq]`,cls:`chem-arrow`}]},{id:`chem-states`,label:(0,i.jsx)(M,{top:`(aq)`,bottom:`± ₂`}),isChem:!0,items:[{label:`(s)`,insert:`(s)`,cls:`chem-state`},{label:`(l)`,insert:`(l)`,cls:`chem-state`},{label:`(g)`,insert:`(g)`,cls:`chem-state`},{label:`(aq)`,insert:`(aq)`,cls:`chem-state`},{type:`sep`,cols:2},{label:`(conc)`,insert:`(conc)`,cls:`chem-state`},{label:`(dil)`,insert:`(dil)`,cls:`chem-state`},{label:`(ppt)`,insert:`(ppt)`,cls:`chem-state`},{type:`sep`,cols:2},{label:`✚`,insert:`^{+}`,cls:`chem-element`},{label:`━`,insert:`^{-}`,cls:`chem-element`},{label:`²⁺`,insert:`^{2+}`,cls:`chem-element`},{label:`²⁻`,insert:`^{2-}`,cls:`chem-element`},{type:`sep`,cols:2},{label:`³⁺`,insert:`^{3+}`,cls:`chem-element`},{label:`³⁻`,insert:`^{3-}`,cls:`chem-element`},{label:`2`,insert:`2`,cls:`chem-element`},{label:`3`,insert:`3`,cls:`chem-element`},{type:`sep`,cols:2},{label:`4`,insert:`4`,cls:`chem-element`},{label:`5`,insert:`5`,cls:`chem-element`},{label:`6`,insert:`6`,cls:`chem-element`},{label:`7`,insert:`7`,cls:`chem-element`},{type:`sep`,cols:3},{label:`8`,insert:`8`,cls:`chem-element`},{label:`x`,insert:`x`,cls:`chem-element`},{label:`n`,insert:`n`,cls:`chem-element`}]},{id:`chem-molecules`,label:(0,i.jsx)(M,{top:`H₂O`,bottom:`ions`}),isChem:!0,items:[{label:`H₂O`,insert:`H2O`,cls:`chem-element`},{label:`CO₂`,insert:`CO2`,cls:`chem-element`},{label:`NH₃`,insert:`NH3`,cls:`chem-element`},{label:`H₂SO₄`,insert:`H2SO4`,cls:`chem-element`},{label:`HCl`,insert:`HCl`,cls:`chem-element`},{label:`NaOH`,insert:`NaOH`,cls:`chem-element`},{label:`NaCl`,insert:`NaCl`,cls:`chem-element`},{label:`CaCO₃`,insert:`CaCO3`,cls:`chem-element`},{label:`HNO₃`,insert:`HNO3`,cls:`chem-element`},{label:`H₃PO₄`,insert:`H3PO4`,cls:`chem-element`},{label:`CH₃COOH`,insert:`CH3COOH`,cls:`chem-element`},{label:`C₆H₁₂O₆`,insert:`C6H12O6`,cls:`chem-element`},{label:`CH₄`,insert:`CH4`,cls:`chem-element`},{label:`C₂H₅OH`,insert:`C2H5OH`,cls:`chem-element`},{label:`CO₃²⁻`,insert:`CO3^{2-}`,cls:`chem-element`},{label:`SO₄²⁻`,insert:`SO4^{2-}`,cls:`chem-element`},{label:`NO₃⁻`,insert:`NO3^-`,cls:`chem-element`},{label:`PO₄³⁻`,insert:`PO4^{3-}`,cls:`chem-element`},{label:`NH₄⁺`,insert:`NH4^+`,cls:`chem-element`},{label:`OH⁻`,insert:`OH^-`,cls:`chem-element`}]}];function le(e=``){if(String(e).match(/^\\ce\{([\s\S]*)\}$/))return e;let t=e.replace(/\\text\{([^}]*)\}/g,`$1`).replace(/\$/g,``).trim();return t?`\\ce{${t}}`:``}function M({top:e,bottom:t=``,compact:n=!1}){return(0,i.jsxs)(`span`,{className:`cme-tab-icon${n?` compact`:``}`,"aria-hidden":`true`,children:[(0,i.jsx)(`span`,{className:`cme-tab-icon-top`,children:e}),t?(0,i.jsx)(`span`,{className:`cme-tab-icon-bottom`,children:t}):null]})}function N(){return(0,i.jsx)(`span`,{className:`cme-tab-icon cme-tab-icon--svg`,"aria-hidden":`true`,children:(0,i.jsxs)(`svg`,{className:`cme-tab-svg-icon`,viewBox:`0 0 48 24`,focusable:`false`,children:[(0,i.jsx)(`path`,{d:`M2 13 L5 13 L7 18 L10 4 L20 4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,i.jsx)(`rect`,{x:`13`,y:`7`,width:`8`,height:`8`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.7`}),(0,i.jsx)(`rect`,{x:`31`,y:`3`,width:`6`,height:`6`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.7`}),(0,i.jsx)(`line`,{x1:`29`,y1:`12`,x2:`39`,y2:`12`,stroke:`currentColor`,strokeWidth:`1.7`}),(0,i.jsx)(`rect`,{x:`31`,y:`15`,width:`6`,height:`6`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.7`})]})})}function P(){return(0,i.jsx)(`span`,{className:`cme-tab-icon cme-tab-icon--svg`,"aria-hidden":`true`,children:(0,i.jsxs)(`svg`,{className:`cme-tab-svg-icon`,viewBox:`0 0 210 110`,focusable:`false`,children:[(0,i.jsx)(`path`,{d:`M12 8 H4 V102 H12`,fill:`none`,stroke:`currentColor`,strokeWidth:`7`}),(0,i.jsx)(`path`,{d:`M96 8 H104 V102 H96`,fill:`none`,stroke:`currentColor`,strokeWidth:`7`}),(0,i.jsx)(`rect`,{x:`24`,y:`15`,width:`22`,height:`32`,fill:`none`,stroke:`currentColor`,strokeWidth:`7.5`}),(0,i.jsx)(`rect`,{x:`64`,y:`15`,width:`22`,height:`32`,fill:`none`,stroke:`currentColor`,strokeWidth:`7.5`}),(0,i.jsx)(`rect`,{x:`24`,y:`63`,width:`22`,height:`32`,fill:`none`,stroke:`currentColor`,strokeWidth:`7.5`}),(0,i.jsx)(`rect`,{x:`64`,y:`63`,width:`22`,height:`32`,fill:`none`,stroke:`currentColor`,strokeWidth:`7.5`}),(0,i.jsx)(`path`,{d:`M142 8 C132 8 132 18 132 28 C132 38 128 45 124 49 C128 53 132 60 132 70 C132 80 132 90 142 102`,fill:`none`,stroke:`currentColor`,strokeWidth:`7`}),(0,i.jsx)(`rect`,{x:`154`,y:`15`,width:`22`,height:`32`,fill:`none`,stroke:`currentColor`,strokeWidth:`7.5`}),(0,i.jsx)(`rect`,{x:`154`,y:`63`,width:`22`,height:`32`,fill:`none`,stroke:`currentColor`,strokeWidth:`7.5`})]})})}function F(){return(0,i.jsx)(`span`,{className:`cme-tab-icon cme-tab-icon--svg`,"aria-hidden":`true`,children:(0,i.jsxs)(`svg`,{className:`cme-tab-svg-icon`,viewBox:`0 0 70 50`,focusable:`false`,children:[(0,i.jsx)(`rect`,{x:`4`,y:`20`,width:`20`,height:`28`,fill:`none`,stroke:`currentColor`,strokeWidth:`4`}),(0,i.jsx)(`rect`,{x:`24`,y:`6`,width:`12`,height:`22`,fill:`none`,stroke:`currentColor`,strokeWidth:`4`}),(0,i.jsx)(`rect`,{x:`51`,y:`10`,width:`8`,height:`10`,fill:`none`,stroke:`currentColor`,strokeWidth:`4`}),(0,i.jsx)(`rect`,{x:`48`,y:`30`,width:`14`,height:`18`,fill:`none`,stroke:`currentColor`,strokeWidth:`4`})]})})}function I(){return(0,i.jsx)(`span`,{className:`cme-tab-icon cme-tab-icon--svg`,"aria-hidden":`true`,children:(0,i.jsxs)(`svg`,{className:`cme-tab-svg-icon`,viewBox:`0 0 56 28`,focusable:`false`,children:[(0,i.jsx)(`path`,{d:`M18 4 C10 4 6 9 6 14 C6 19 10 24 18 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,i.jsx)(`line`,{x1:`8`,y1:`14`,x2:`18`,y2:`14`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`}),(0,i.jsx)(`text`,{x:`26`,y:`24`,fill:`currentColor`,fontFamily:`Cambria Math, serif`,fontSize:`35`,children:`∞`})]})})}function L(){return(0,i.jsx)(`span`,{className:`cme-tab-icon cme-tab-icon--svg`,"aria-hidden":`true`,children:(0,i.jsx)(`svg`,{className:`cme-tab-svg-icon`,viewBox:`0 0 40 24`,focusable:`false`,children:(0,i.jsx)(`text`,{x:`2`,y:`20`,fill:`currentColor`,fontFamily:`Segoe UI Symbol, Arial Unicode MS, sans-serif`,fontSize:`25`,children:`α Ω`})})})}function R(){return(0,i.jsx)(`span`,{className:`cme-tab-icon cme-tab-icon--svg`,"aria-hidden":`true`,children:(0,i.jsxs)(`svg`,{className:`cme-tab-svg-icon`,viewBox:`0 0 90 50`,focusable:`false`,children:[(0,i.jsx)(`path`,{d:`M12 8 C4 14,4 36,12 42`,fill:`none`,stroke:`currentColor`,strokeWidth:`4`,strokeLinecap:`round`}),(0,i.jsx)(`rect`,{x:`20`,y:`10`,width:`18`,height:`30`,fill:`none`,stroke:`currentColor`,strokeWidth:`4`}),(0,i.jsx)(`path`,{d:`M46 8 C54 14,54 36,46 42`,fill:`none`,stroke:`currentColor`,strokeWidth:`4`,strokeLinecap:`round`}),(0,i.jsx)(`path`,{d:`M65 10 Q75 2 85 10`,fill:`none`,stroke:`currentColor`,strokeWidth:`4`,strokeLinecap:`round`}),(0,i.jsx)(`rect`,{x:`68`,y:`18`,width:`14`,height:`22`,fill:`none`,stroke:`currentColor`,strokeWidth:`4`})]})})}function ue(){return(0,i.jsx)(`span`,{className:`cme-tab-icon cme-tab-icon--svg`,"aria-hidden":`true`,children:(0,i.jsxs)(`svg`,{className:`cme-tab-svg-icon`,viewBox:`0 0 80 50`,focusable:`false`,children:[(0,i.jsx)(`text`,{x:`2`,y:`40`,fill:`currentColor`,fontSize:`42`,fontFamily:`Cambria Math, Times New Roman, serif`,fontWeight:`500`,children:`∫`}),(0,i.jsx)(`rect`,{x:`30`,y:`1`,width:`10`,height:`10`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`}),(0,i.jsx)(`rect`,{x:`24`,y:`40`,width:`10`,height:`10`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`}),(0,i.jsx)(`text`,{x:`45`,y:`36`,fill:`currentColor`,fontSize:`32`,fontWeight:`500`,fontFamily:`Cambria Math, Times New Roman, serif`,children:`lim`})]})})}function z(){return(0,i.jsx)(`span`,{className:`cme-tab-icon cme-tab-icon--svg`,"aria-hidden":`true`,children:(0,i.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,children:[(0,i.jsx)(`path`,{d:`M12 3V12`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`}),(0,i.jsx)(`path`,{d:`M8.5 8.5L12 12L15.5 8.5`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`}),(0,i.jsx)(`path`,{d:`M4 15C4 19 7.5 22 12 22C16.5 22 20 19 20 15`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,fill:`none`}),(0,i.jsx)(`path`,{d:`M7 15C7 17.5 9 19 12 19C15 19 17 17.5 17 15`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,fill:`none`})]})})}function B(){return(0,i.jsx)(`span`,{className:`cme-tab-icon cme-tab-icon--svg`,"aria-hidden":`true`,children:(0,i.jsx)(`svg`,{className:`cme-tab-svg-icon`,viewBox:`0 0 64 24`,focusable:`false`,children:(0,i.jsxs)(`g`,{fill:`currentColor`,children:[(0,i.jsx)(`path`,{d:`M4 10h20V5l12 7-12 7v-5H4z`}),(0,i.jsx)(`circle`,{cx:`44`,cy:`18`,r:`2.5`}),(0,i.jsx)(`circle`,{cx:`52`,cy:`12`,r:`2.5`}),(0,i.jsx)(`circle`,{cx:`60`,cy:`6`,r:`2.5`})]})})})}var de=class extends r.Plugin{static get pluginName(){return`MathInlinePlugin`}static get requires(){return[r.Widget]}init(){let e=this.editor;e.model.schema.register(`mathInline`,{isInline:!0,isObject:!0,allowWhere:`$text`,allowAttributes:[`latex`,`dir`]}),e.model.schema.addChildCheck((e,t)=>{if(t.name===`mathInline`)return!0}),e.conversion.for(`editingDowncast`).elementToElement({model:`mathInline`,view:(t,{writer:n})=>{let i=t.getAttribute(`latex`)||``,a=t.getAttribute(`dir`)===`rtl`?`rtl`:`ltr`,o=`math-`+Math.random().toString(36).substr(2,9);window.__ckMathWidgets.set(o,t);let s=n.createContainerElement(`span`,{class:`ck-math-widget ck-math-inline-word`,contenteditable:`false`,"data-math-id":o,"data-latex":i,"data-dir":a,dir:a}),c=n.createRawElement(`span`,{class:`ck-math-widget-inner`,style:`display:inline-block;vertical-align:middle;margin:0 2px;cursor:pointer;width:auto;max-width:100%;pointer-events:none;`},t=>{let n=document.createElement(`math-field`);n.setAttribute(`read-only`,``),n.setAttribute(`math-virtual-keyboard-policy`,`manual`),n.setAttribute(`tabindex`,`-1`),n.setAttribute(`letter-shape-style`,`upright`),n.setAttribute(`dir`,a),n.style.display=`inline-block`,n.style.width=`auto`,n.style.maxWidth=`100%`,n.style.verticalAlign=`middle`,n.style.border=`none`,n.style.background=`transparent`,n.style.outline=`none`,n.style.fontSize=`inherit`,n.style.minHeight=`auto`,n.style.padding=`0 2px`,n.style.margin=`0`,n.style.pointerEvents=`none`,n.style.direction=a,n.style.textAlign=a===`rtl`?`right`:`left`,n.style.unicodeBidi=a===`rtl`?`plaintext`:`normal`,n.style.color=`#000000`;let r=()=>{n.setValue?n.setValue(i,{silenceNotifications:!0}):n.value=i};customElements.get(`math-field`)?requestAnimationFrame(r):customElements.whenDefined(`math-field`).then(()=>requestAnimationFrame(r)),t.appendChild(n);let o=()=>{let n=t.parentElement;n&&m(e,n)};o(),requestAnimationFrame(o)});return n.insert(n.createPositionAt(s,0),c),(0,r.toWidget)(s,n,{label:`math formula`})}});let t=e.editing.view.document;this.listenTo(t,`mousedown`,(t,n)=>{let r=c(n.domTarget);r&&n.domEvent.button===0&&(t.stop(),n.preventDefault(),p(e,null,l(r),r))},{priority:`high`}),e.conversion.for(`dataDowncast`).elementToElement({model:`mathInline`,view:(e,{writer:t})=>{let n=e.getAttribute(`latex`)||``,r=e.getAttribute(`dir`)===`rtl`?`rtl`:`ltr`,i=t.createContainerElement(`span`,{class:`math-tex`,"data-latex":n,"data-dir":r,dir:r,style:`display:inline;`});return t.insert(t.createPositionAt(i,0),t.createText(n)),i}}),e.conversion.for(`upcast`).elementToElement({view:{name:`span`,classes:`math-tex`},model:(e,{writer:t})=>{let n=e.getAttribute(`data-latex`)||``,r=e.getAttribute(`data-dir`)===`rtl`||e.getAttribute(`dir`)===`rtl`?`rtl`:`ltr`;return t.createElement(`mathInline`,{latex:n,dir:r})}})}},V=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20"><path d="M4 12h3l3 6l5-12h5" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`,fe=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20"><rect x="3" y="3" width="18" height="18" rx="3" fill="none" stroke="currentColor" stroke-width="2"/><text x="12" y="16" text-anchor="middle" font-size="12" font-weight="bold" fill="currentColor" font-family="system-ui, sans-serif">C</text><text x="6" y="8" font-size="4" font-weight="bold" fill="currentColor" font-family="system-ui, sans-serif">6</text></svg>`,pe=[{label:`Black`,value:`#000000`},{label:`Dim Gray`,value:`#696969`},{label:`Gray`,value:`#808080`},{label:`Dark Gray`,value:`#a9a9a9`},{label:`Silver`,value:`#c0c0c0`},{label:`White`,value:`#ffffff`},{label:`Red`,value:`#ff0000`},{label:`Orange`,value:`#ffa500`},{label:`Yellow`,value:`#ffff00`},{label:`Lime`,value:`#00ff00`},{label:`Cyan`,value:`#00ffff`},{label:`Blue`,value:`#0000ff`},{label:`Purple`,value:`#800080`},{label:`Magenta`,value:`#ff00ff`},{label:`Pink`,value:`#ffc0cb`},{label:`Brown`,value:`#a52a2a`},{label:`Maroon`,value:`#800000`},{label:`Olive`,value:`#808000`},{label:`Green`,value:`#008000`},{label:`Teal`,value:`#008080`},{label:`Navy`,value:`#000080`},{label:`Indigo`,value:`#4b0082`},{label:`Violet`,value:`#ee82ee`},{label:`Gold`,value:`#ffd700`}];function me(e){let t=String(e||``).trim();if(!t)return``;if(t===`none`)return`none`;if(typeof document>`u`)return t.toLowerCase();let n=document.createElement(`span`);if(n.style.color=``,n.style.color=t,!n.style.color)return``;n.style.position=`absolute`,n.style.opacity=`0`,n.style.pointerEvents=`none`,document.body.appendChild(n);let r=window.getComputedStyle(n).color;n.remove();let i=r.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)/i);return i?`#${[i[1],i[2],i[3]].map(e=>Number(e).toString(16).padStart(2,`0`)).join(``)}`:r.toLowerCase()}function H(e){return`data:image/svg+xml;utf8,${encodeURIComponent(e)}`}function U(e){return H(`
37
37
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
38
38
  <g fill="none" stroke="#1f252b" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
39
39
  ${e}
40
40
  </g>
41
41
  </svg>
42
- `)}var me={"fraction-template-image":U(`
42
+ `)}var he={"fraction-template-image":H(`
43
43
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
44
44
  <rect x="6.1" y="1.8" width="6" height="4.8" rx="0" fill="none" stroke="#2c8a43" stroke-width="1.6"/>
45
45
  <line x1="3.2" y1="9" x2="14.8" y2="9" stroke="#000000" stroke-width="1.6" stroke-linecap="square"/>
46
46
  <rect x="6.1" y="11.4" width="6" height="4.8" rx="0" fill="none" stroke="#2c8a43" stroke-width="1.6"/>
47
47
  </svg>
48
- `),"superscript-template-image":U(`
48
+ `),"superscript-template-image":H(`
49
49
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
50
50
  <rect x="3.1" y="7.3" width="6.5" height="7.4" rx="0.6" fill="none" stroke="#2c8a43" stroke-width="1.5"/>
51
51
  <rect x="10.3" y="3.2" width="4.6" height="5.6" rx="0.6" fill="none" stroke="#2c8a43" stroke-width="1.5"/>
52
52
  </svg>
53
- `),"sqrt-template-image":U(`
53
+ `),"sqrt-template-image":H(`
54
54
  <svg width="48" height="32" viewBox="-7 0 48 32" xmlns="http://www.w3.org/2000/svg">
55
55
  <path
56
56
  d="M4 18 L11 25 L18 4 L38 4"
@@ -70,12 +70,12 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
70
70
  stroke-width="2"
71
71
  />
72
72
  </svg>
73
- `),"subscript-template-image":U(`
73
+ `),"subscript-template-image":H(`
74
74
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
75
75
  <rect x="3.1" y="3.2" width="6.5" height="7.4" rx="0.6" fill="none" stroke="#2c8a43" stroke-width="1.5"/>
76
76
  <rect x="10.3" y="9.2" width="4.6" height="5.6" rx="0.6" fill="none" stroke="#2c8a43" stroke-width="1.5"/>
77
77
  </svg>
78
- `),"nth-root-template-image":U(`
78
+ `),"nth-root-template-image":H(`
79
79
  <svg width="48" height="32" viewBox="0 0 48 32" xmlns="http://www.w3.org/2000/svg">
80
80
  <!-- index placeholder -->
81
81
  <rect
@@ -109,51 +109,51 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
109
109
  stroke-width="2"
110
110
  />
111
111
  </svg>
112
- `),"slash-fraction-template-image":U(`
112
+ `),"slash-fraction-template-image":H(`
113
113
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 32" fill="none">
114
114
  <rect x="2" y="4" width="10" height="18" stroke="#008000" stroke-width="1.5"/>
115
115
  <line x1="22" y1="2" x2="14" y2="26" stroke="#000" stroke-width="2" stroke-linecap="round"/>
116
116
  <rect x="32" y="10" width="10" height="18" stroke="#008000" stroke-width="1.5"/>
117
117
  </svg>
118
- `),"right-sup-sub-template-image":U(`
118
+ `),"right-sup-sub-template-image":H(`
119
119
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none">
120
120
  <rect x="8" y="10" width="10" height="14" stroke="#008000" stroke-width="2.5"/>
121
121
  <rect x="20" y="2" width="8" height="10" stroke="#008000" stroke-width="2.5" opacity="1"/>
122
122
  <rect x="20" y="20" width="8" height="10" stroke="#008000" stroke-width="2.5" opacity="1"/>
123
123
  </svg>
124
- `),"left-sup-template-image":U(`
124
+ `),"left-sup-template-image":H(`
125
125
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none">
126
126
  <rect x="4" y="2" width="8" height="10" stroke="#008000" stroke-width="2.5" opacity="1"/>
127
127
  <rect x="16" y="10" width="10" height="14" stroke="#008000" stroke-width="2.5"/>
128
128
  </svg>
129
- `),"left-sub-template-image":U(`
129
+ `),"left-sub-template-image":H(`
130
130
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none">
131
131
  <rect x="16" y="6" width="10" height="14" stroke="#008000" stroke-width="2.5"/>
132
132
  <rect x="4" y="18" width="8" height="10" stroke="#008000" stroke-width="2.5" opacity="1"/>
133
133
  </svg>
134
- `),"left-sup-sub-template-image":U(`
134
+ `),"left-sup-sub-template-image":H(`
135
135
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 36" fill="none">
136
136
  <rect x="4" y="2" width="8" height="10" stroke="#008000" stroke-width="2.5" opacity="1"/>
137
137
  <rect x="4" y="22" width="8" height="10" stroke="#008000" stroke-width="2.5" opacity="1"/>
138
138
  <rect x="16" y="10" width="10" height="14" stroke="#008000" stroke-width="2.5"/>
139
139
  </svg>
140
- `),"overset-template-image":U(`
140
+ `),"overset-template-image":H(`
141
141
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 40" fill="none">
142
142
  <rect x="10" y="2" width="10" height="10" stroke="#008000" stroke-width="2.5" opacity="1"/>
143
143
  <rect x="8" y="18" width="14" height="14" stroke="#008000" stroke-width="2.5"/>
144
144
  </svg>
145
- `),"underset-template-image":U(`
145
+ `),"underset-template-image":H(`
146
146
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 40" fill="none">
147
147
  <rect x="8" y="6" width="14" height="14" stroke="#008000" stroke-width="2.5"/>
148
148
  <rect x="10" y="28" width="10" height="10" stroke="#008000" stroke-width="2.5" opacity="1"/>
149
149
  </svg>
150
- `),"over-under-template-image":U(`
150
+ `),"over-under-template-image":H(`
151
151
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 52" fill="none">
152
152
  <rect x="10" y="2" width="10" height="10" stroke="#008000" stroke-width="2.5" opacity="1"/>
153
153
  <rect x="8" y="18" width="14" height="14" stroke="#008000" stroke-width="2.5"/>
154
154
  <rect x="10" y="40" width="10" height="10" stroke="#008000" stroke-width="2.5" opacity="1"/>
155
155
  </svg>
156
- `),"underbrace-template-image":U(`
156
+ `),"underbrace-template-image":H(`
157
157
  <svg xmlns="http://www.w3.org/2000/svg"
158
158
  viewBox="0 0 24 24"
159
159
  fill="none">
@@ -196,7 +196,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
196
196
  stroke-width="1.4"/>
197
197
 
198
198
  </svg>
199
- `),"overbrace-template-image":U(`
199
+ `),"overbrace-template-image":H(`
200
200
  <svg xmlns="http://www.w3.org/2000/svg"
201
201
  viewBox="0 0 24 24"
202
202
  fill="none">
@@ -239,27 +239,27 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
239
239
  stroke-width="1.6"/>
240
240
 
241
241
  </svg>
242
- `),"overbrace-arc-template-image":U(`
242
+ `),"overbrace-arc-template-image":H(`
243
243
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" fill="none">
244
244
  <path d="M8 10 C8 6,12 6,16 6 C20 6,20 2,20 2 C20 2,20 6,24 6 C28 6,32 6,32 10" stroke="#000000" stroke-width="2"/>
245
245
  <rect x="15" y="16" width="10" height="16" stroke="#1b8f3a" stroke-width="3"/>
246
246
  </svg>
247
- `),"overparen-template-image":U(`
247
+ `),"overparen-template-image":H(`
248
248
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" fill="none">
249
249
  <path d="M8 10 Q20 2 32 10" stroke="#000000" stroke-width="2"/>
250
250
  <rect x="15" y="16" width="10" height="16" stroke="#1b8f3a" stroke-width="3"/>
251
251
  </svg>
252
- `),"underbrace-arc-template-image":U(`
252
+ `),"underbrace-arc-template-image":H(`
253
253
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" fill="none">
254
254
  <rect x="15" y="6" width="10" height="16" stroke="#1b8f3a" stroke-width="3"/>
255
255
  <path d="M8 30 C8 34,12 34,16 34 C20 34,20 38,20 38 C20 38,20 34,24 34 C28 34,32 34,32 30" stroke="#000000" stroke-width="2"/>
256
256
  </svg>
257
- `),"underparen-template-image":U(`
257
+ `),"underparen-template-image":H(`
258
258
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" fill="none">
259
259
  <rect x="15" y="6" width="10" height="16" stroke="#1b8f3a" stroke-width="3"/>
260
260
  <path d="M8 30 Q20 38 32 30" stroke="#000000" stroke-width="2"/>
261
261
  </svg>
262
- `),"vec-accent-template-image":U(`
262
+ `),"vec-accent-template-image":H(`
263
263
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" fill="none">
264
264
  <!-- Right harpoon -->
265
265
  <path
@@ -280,113 +280,113 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
280
280
  stroke="#1b8f3a"
281
281
  stroke-width="3"/>
282
282
  </svg>
283
- `),"overrightarrow-accent-template-image":U(`
283
+ `),"overrightarrow-accent-template-image":H(`
284
284
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" fill="none">
285
285
  <path d="M8 10 H30" stroke="#000000" stroke-width="2"/>
286
286
  <path d="M26 6 L34 10 L26 14" stroke="#000000" stroke-width="2" fill="none"/>
287
287
  <rect x="15" y="18" width="10" height="16" stroke="#1b8f3a" stroke-width="3"/>
288
288
  </svg>
289
- `),"overleftrightarrow-accent-template-image":U(`
289
+ `),"overleftrightarrow-accent-template-image":H(`
290
290
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" fill="none">
291
291
  <path d="M8 10 H32" stroke="#000000" stroke-width="2"/>
292
292
  <path d="M12 6 L4 10 L12 14" stroke="#000000" stroke-width="2" fill="none"/>
293
293
  <path d="M28 6 L36 10 L28 14" stroke="#000000" stroke-width="2" fill="none"/>
294
294
  <rect x="15" y="18" width="10" height="16" stroke="#1b8f3a" stroke-width="3"/>
295
295
  </svg>
296
- `),"overline-accent-template-image":U(`
296
+ `),"overline-accent-template-image":H(`
297
297
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" fill="none">
298
298
  <line x1="10" y1="10" x2="30" y2="10" stroke="#000000" stroke-width="2"/>
299
299
  <rect x="15" y="18" width="10" height="16" stroke="#1b8f3a" stroke-width="3"/>
300
300
  </svg>
301
- `),"hat-accent-template-image":U(`
301
+ `),"hat-accent-template-image":H(`
302
302
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" fill="none">
303
303
  <path d="M12 12 L20 6 L28 12" stroke="#000000" stroke-width="2" fill="none"/>
304
304
  <rect x="15" y="18" width="10" height="16" stroke="#1b8f3a" stroke-width="3"/>
305
305
  </svg>
306
- `),"tilde-accent-template-image":U(`
306
+ `),"tilde-accent-template-image":H(`
307
307
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" fill="none">
308
308
  <path d="M10 11 C14 6,18 16,22 11 C26 6,30 16,34 11" stroke="#000000" stroke-width="2" fill="none"/>
309
309
  <rect x="15" y="18" width="10" height="16" stroke="#1b8f3a" stroke-width="3"/>
310
310
  </svg>
311
- `),"ddot-accent-template-image":U(`
311
+ `),"ddot-accent-template-image":H(`
312
312
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" fill="none">
313
313
  <circle cx="16" cy="10" r="2" fill="#000000"/>
314
314
  <circle cx="24" cy="10" r="2" fill="#000000"/>
315
315
  <rect x="15" y="18" width="10" height="16" stroke="#1b8f3a" stroke-width="3"/>
316
316
  </svg>
317
- `),"dot-accent-template-image":U(`
317
+ `),"dot-accent-template-image":H(`
318
318
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" fill="none">
319
319
  <circle cx="20" cy="10" r="2" fill="#000000"/>
320
320
  <rect x="15" y="18" width="10" height="16" stroke="#1b8f3a" stroke-width="3"/>
321
321
  </svg>
322
- `),"overline-frame-template-image":U(`
322
+ `),"overline-frame-template-image":H(`
323
323
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 40" fill="none">
324
324
  <line x1="8" y1="8" x2="40" y2="8" stroke="#000000" stroke-width="2"/>
325
325
  <rect x="18" y="14" width="12" height="16" stroke="#1b8f3a" stroke-width="3"/>
326
326
  </svg>
327
- `),"left-bar-template-image":U(`
327
+ `),"left-bar-template-image":H(`
328
328
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 40" fill="none">
329
329
  <line x1="12" y1="6" x2="12" y2="34" stroke="#000000" stroke-width="2"/>
330
330
  <rect x="18" y="12" width="12" height="16" stroke="#1b8f3a" stroke-width="3"/>
331
331
  </svg>
332
- `),"boxed-square-template-image":U(`
332
+ `),"boxed-square-template-image":H(`
333
333
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 40" fill="none">
334
334
  <rect x="10" y="6" width="28" height="28" stroke="#000000" stroke-width="2"/>
335
335
  <rect x="18" y="12" width="12" height="16" stroke="#1b8f3a" stroke-width="3"/>
336
336
  </svg>
337
- `),"underline-frame-template-image":U(`
337
+ `),"underline-frame-template-image":H(`
338
338
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 40" fill="none">
339
339
  <rect x="18" y="8" width="12" height="16" stroke="#1b8f3a" stroke-width="3"/>
340
340
  <line x1="8" y1="30" x2="40" y2="30" stroke="#000000" stroke-width="2"/>
341
341
  </svg>
342
- `),"right-bar-template-image":U(`
342
+ `),"right-bar-template-image":H(`
343
343
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 40" fill="none">
344
344
  <rect x="18" y="12" width="12" height="16" stroke="#1b8f3a" stroke-width="3"/>
345
345
  <line x1="36" y1="6" x2="36" y2="34" stroke="#000000" stroke-width="2"/>
346
346
  </svg>
347
- `),"paren-frame-template-image":U(`
347
+ `),"paren-frame-template-image":H(`
348
348
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 40" fill="none">
349
349
  <ellipse cx="24" cy="20" rx="16" ry="14" stroke="#000000" stroke-width="2"/>
350
350
  <rect x="18" y="12" width="12" height="16" stroke="#1b8f3a" stroke-width="3"/>
351
351
  </svg>
352
- `),"overline-right-bar-template-image":U(`
352
+ `),"overline-right-bar-template-image":H(`
353
353
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 40" fill="none">
354
354
  <line x1="10" y1="8" x2="36" y2="8" stroke="#000000" stroke-width="2"/>
355
355
  <line x1="36" y1="8" x2="36" y2="32" stroke="#000000" stroke-width="2"/>
356
356
  <rect x="18" y="12" width="12" height="16" stroke="#1b8f3a" stroke-width="3"/>
357
357
  </svg>
358
- `),"boxed-rounded-template-image":U(`
358
+ `),"boxed-rounded-template-image":H(`
359
359
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 40" fill="none">
360
360
  <rect x="10" y="6" width="28" height="28" rx="6" ry="6" stroke="#000000" stroke-width="2"/>
361
361
  <rect x="18" y="12" width="12" height="16" stroke="#1b8f3a" stroke-width="3"/>
362
362
  </svg>
363
- `),"cancel-diagonal-template-image":U(`
363
+ `),"cancel-diagonal-template-image":H(`
364
364
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 40" fill="none">
365
365
  <line x1="10" y1="30" x2="50" y2="10" stroke="#000000" stroke-width="2"/>
366
366
  <rect x="22" y="12" width="16" height="16" stroke="#1b8f3a" stroke-width="3"/>
367
367
  </svg>
368
- `),"sout-template-image":U(`
368
+ `),"sout-template-image":H(`
369
369
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 40" fill="none">
370
370
  <line x1="8" y1="20" x2="52" y2="20" stroke="#000000" stroke-width="2"/>
371
371
  <rect x="22" y="12" width="16" height="16" stroke="#1b8f3a" stroke-width="3"/>
372
372
  </svg>
373
- `),"bcancel-template-image":U(`
373
+ `),"bcancel-template-image":H(`
374
374
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 40" fill="none">
375
375
  <line x1="10" y1="10" x2="50" y2="30" stroke="#000000" stroke-width="2"/>
376
376
  <rect x="22" y="12" width="16" height="16" stroke="#1b8f3a" stroke-width="3"/>
377
377
  </svg>
378
- `),"xcancel-template-image":U(`
378
+ `),"xcancel-template-image":H(`
379
379
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 40" fill="none">
380
380
  <line x1="10" y1="10" x2="50" y2="30" stroke="#000000" stroke-width="2"/>
381
381
  <line x1="10" y1="30" x2="50" y2="10" stroke="#000000" stroke-width="2"/>
382
382
  <rect x="22" y="12" width="16" height="16" stroke="#1b8f3a" stroke-width="3"/>
383
383
  </svg>
384
- `),"vertical-strike-template-image":U(`
384
+ `),"vertical-strike-template-image":H(`
385
385
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 40" fill="none">
386
386
  <line x1="30" y1="6" x2="30" y2="34" stroke="#000000" stroke-width="2"/>
387
387
  <rect x="22" y="12" width="16" height="16" stroke="#1b8f3a" stroke-width="3"/>
388
388
  </svg>
389
- `),"overline-left-curve-template-image":U(`
389
+ `),"overline-left-curve-template-image":H(`
390
390
  <svg width="70" height="40" viewBox="0 0 80 60" xmlns="http://www.w3.org/2000/svg">
391
391
  <!-- Long division bracket -->
392
392
  <path d="M15 5 H65
@@ -406,13 +406,13 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
406
406
  stroke="#2ca02c"
407
407
  stroke-width="5"/>
408
408
  </svg>
409
- `),"crosshair-strike-template-image":U(`
409
+ `),"crosshair-strike-template-image":H(`
410
410
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 40" fill="none">
411
411
  <line x1="8" y1="20" x2="52" y2="20" stroke="#000000" stroke-width="2"/>
412
412
  <line x1="30" y1="6" x2="30" y2="34" stroke="#000000" stroke-width="2"/>
413
413
  <rect x="22" y="12" width="16" height="16" stroke="#1b8f3a" stroke-width="3"/>
414
414
  </svg>
415
- `),"operator-limits-both-template-image":U(`
415
+ `),"operator-limits-both-template-image":H(`
416
416
  <svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" viewBox="0 0 40 32">
417
417
  <rect x="14" y="8" width="12" height="16"
418
418
  fill="none" stroke="#111" stroke-width="2"/>
@@ -423,7 +423,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
423
423
  <rect x="17" y="25" width="5" height="6"
424
424
  fill="none" stroke="#2ca02c" stroke-width="1.5"/>
425
425
  </svg>
426
- `),"operator-lower-limit-template-image":U(`
426
+ `),"operator-lower-limit-template-image":H(`
427
427
  <svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" viewBox="0 0 40 32">
428
428
  <rect x="14" y="6" width="12" height="15"
429
429
  fill="none" stroke="#111" stroke-width="2"/>
@@ -431,7 +431,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
431
431
  <rect x="17" y="26" width="5" height="5"
432
432
  fill="none" stroke="#2ca02c" stroke-width="1.5"/>
433
433
  </svg>
434
- `),"operator-right-sup-sub-template-image":U(`
434
+ `),"operator-right-sup-sub-template-image":H(`
435
435
  <svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" viewBox="0 0 40 32">
436
436
  <rect x="12" y="4" width="16" height="24"
437
437
  fill="none" stroke="#111" stroke-width="2"/>
@@ -442,7 +442,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
442
442
  <rect x="30" y="21" width="6" height="8"
443
443
  fill="none" stroke="#2ca02c" stroke-width="1.5"/>
444
444
  </svg>
445
- `),"operator-right-sub-template-image":U(`
445
+ `),"operator-right-sub-template-image":H(`
446
446
  <svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" viewBox="0 0 40 32">
447
447
  <rect x="12" y="4" width="16" height="24"
448
448
  fill="none" stroke="#111" stroke-width="2"/>
@@ -450,22 +450,22 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
450
450
  <rect x="30" y="22" width="6" height="8"
451
451
  fill="none" stroke="#2ca02c" stroke-width="1.5"/>
452
452
  </svg>
453
- `),"hphantom-space-template-image":U(`
453
+ `),"hphantom-space-template-image":H(`
454
454
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 52 32" fill="none">
455
455
  <rect x="4" y="4" width="12" height="20" stroke="#008000" stroke-width="2"/>
456
456
  <rect x="36" y="4" width="12" height="20" stroke="#008000" stroke-width="2"/>
457
457
  </svg>
458
- `),"thin-space-template-image":U(`
458
+ `),"thin-space-template-image":H(`
459
459
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 32" fill="none">
460
460
  <rect x="4" y="4" width="12" height="20" stroke="#008000" stroke-width="2"/>
461
461
  <rect x="24" y="4" width="12" height="20" stroke="#008000" stroke-width="2"/>
462
462
  </svg>
463
- `),"negative-thin-space-template-image":U(`
463
+ `),"negative-thin-space-template-image":H(`
464
464
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none">
465
465
  <rect x="4" y="4" width="12" height="20" stroke="#008000" stroke-width="2"/>
466
466
  <rect x="12" y="4" width="12" height="20" stroke="#008000" stroke-width="2"/>
467
467
  </svg>
468
- `),"move-text-up-template-image":U(`
468
+ `),"move-text-up-template-image":H(`
469
469
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
470
470
  <rect x="5" y="2" width="14" height="20" fill="none" stroke="#2e7d32" stroke-width="2"/>
471
471
  <rect x="5" y="14" width="14" height="8" fill="#ffffff"/>
@@ -473,28 +473,28 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
473
473
  <path d="M12 17V8" stroke="#546e7a" stroke-width="2" stroke-linecap="round"/>
474
474
  <path d="M9 11L12 8L15 11" fill="none" stroke="#546e7a" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
475
475
  </svg>
476
- `),"move-text-right-template-image":U(`
476
+ `),"move-text-right-template-image":H(`
477
477
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
478
478
  <rect x="2" y="5" width="20" height="14" fill="none" stroke="#2e7d32" stroke-width="2"/>
479
479
  <rect x="2" y="5" width="8" height="14" fill="none" stroke="#2e7d32" stroke-width="2" stroke-dasharray="2 2"/>
480
480
  <path d="M7 12H16" stroke="#546e7a" stroke-width="2" stroke-linecap="round"/>
481
481
  <path d="M13 9L16 12L13 15" fill="none" stroke="#546e7a" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
482
482
  </svg>
483
- `),"move-text-left-template-image":U(`
483
+ `),"move-text-left-template-image":H(`
484
484
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
485
485
  <rect x="2" y="5" width="20" height="14" fill="none" stroke="#2e7d32" stroke-width="2"/>
486
486
  <rect x="14" y="5" width="8" height="14" fill="none" stroke="#2e7d32" stroke-width="2" stroke-dasharray="2 2"/>
487
487
  <path d="M17 12H8" stroke="#546e7a" stroke-width="2" stroke-linecap="round"/>
488
488
  <path d="M11 9L8 12L11 15" fill="none" stroke="#546e7a" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
489
489
  </svg>
490
- `),"move-text-down-template-image":U(`
490
+ `),"move-text-down-template-image":H(`
491
491
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
492
492
  <rect x="5" y="2" width="14" height="20" fill="none" stroke="#2e7d32" stroke-width="2"/>
493
493
  <rect x="5" y="2" width="14" height="8" fill="none" stroke="#2e7d32" stroke-width="2" stroke-dasharray="2 2"/>
494
494
  <path d="M12 7V16" stroke="#546e7a" stroke-width="2" stroke-linecap="round"/>
495
495
  <path d="M9 13L12 16L15 13" fill="none" stroke="#546e7a" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
496
496
  </svg>
497
- `),"sum-limits-both-template-image":U(`
497
+ `),"sum-limits-both-template-image":H(`
498
498
  <svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" viewBox="0 0 40 32">
499
499
  <!-- Upper box -->
500
500
  <rect x="17" y="1" width="6" height="4"
@@ -510,7 +510,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
510
510
  <rect x="17" y="25" width="6" height="4"
511
511
  fill="none" stroke="#2ca02c" stroke-width="1.5"/>
512
512
  </svg>
513
- `),"sum-right-both-template-image":U(`
513
+ `),"sum-right-both-template-image":H(`
514
514
  <svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" viewBox="0 0 40 32">
515
515
  <text x="6" y="22"
516
516
  font-family="Cambria Math, Times New Roman, serif"
@@ -523,7 +523,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
523
523
  <rect x="28" y="20" width="8" height="8"
524
524
  fill="none" stroke="#2ca02c" stroke-width="1.5"/>
525
525
  </svg>
526
- `),"sum-limits-lower-template-image":U(`
526
+ `),"sum-limits-lower-template-image":H(`
527
527
  <svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" viewBox="0 0 40 32">
528
528
  <!-- Small summation -->
529
529
  <text x="15" y="16"
@@ -538,7 +538,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
538
538
  stroke="#2ca02c"
539
539
  stroke-width="1.5"/>
540
540
  </svg>
541
- `),"sum-right-lower-template-image":U(`
541
+ `),"sum-right-lower-template-image":H(`
542
542
  <svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" viewBox="0 0 40 32">
543
543
  <text x="6" y="22"
544
544
  font-family="Cambria Math, Times New Roman, serif"
@@ -548,7 +548,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
548
548
  <rect x="28" y="20" width="8" height="8"
549
549
  fill="none" stroke="#2ca02c" stroke-width="1.5"/>
550
550
  </svg>
551
- `),"prod-limits-both-template-image":U(`
551
+ `),"prod-limits-both-template-image":H(`
552
552
  <svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" viewBox="0 0 40 32">
553
553
  <rect x="18" y="1" width="6" height="4"
554
554
  fill="none" stroke="#2ca02c" stroke-width="1.5"/>
@@ -561,7 +561,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
561
561
  <rect x="18" y="25" width="6" height="4"
562
562
  fill="none" stroke="#2ca02c" stroke-width="1.5"/>
563
563
  </svg>
564
- `),"prod-limits-lower-template-image":U(`
564
+ `),"prod-limits-lower-template-image":H(`
565
565
  <svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" viewBox="0 0 40 32">
566
566
  <text x="14" y="16"
567
567
  font-family="Cambria Math, Times New Roman, serif"
@@ -571,7 +571,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
571
571
  <rect x="18" y="25" width="6" height="4"
572
572
  fill="none" stroke="#2ca02c" stroke-width="1.5"/>
573
573
  </svg>
574
- `),"prod-right-lower-template-image":U(`
574
+ `),"prod-right-lower-template-image":H(`
575
575
  <svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" viewBox="0 0 40 32">
576
576
  <text x="6" y="22"
577
577
  font-family="Cambria Math, Times New Roman, serif"
@@ -583,7 +583,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
583
583
  stroke="#2ca02c"
584
584
  stroke-width="1.5"/>
585
585
  </svg>
586
- `),"prod-right-both-template-image":U(`
586
+ `),"prod-right-both-template-image":H(`
587
587
  <svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" viewBox="0 0 40 32">
588
588
  <text x="6" y="22"
589
589
  font-family="Cambria Math, Times New Roman, serif"
@@ -596,22 +596,22 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
596
596
  <rect x="28" y="20" width="8" height="8"
597
597
  fill="none" stroke="#2ca02c" stroke-width="1.5"/>
598
598
  </svg>
599
- `),"overline-template-image":U(`
599
+ `),"overline-template-image":H(`
600
600
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
601
601
  <line x1="4" y1="3.4" x2="14" y2="3.4" stroke="#2c8a43" stroke-width="1.6" stroke-linecap="round"/>
602
602
  <rect x="4.6" y="5.6" width="8.8" height="9.4" rx="1.1" fill="none" stroke="#56646d" stroke-width="1.2"/>
603
603
  </svg>
604
- `),"underline-template-image":U(`
604
+ `),"underline-template-image":H(`
605
605
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
606
606
  <rect x="4.6" y="3" width="8.8" height="9.4" rx="1.1" fill="none" stroke="#56646d" stroke-width="1.2"/>
607
607
  <line x1="4" y1="14.6" x2="14" y2="14.6" stroke="#2c8a43" stroke-width="1.6" stroke-linecap="round"/>
608
608
  </svg>
609
- `),"limit-template-image":U(`
609
+ `),"limit-template-image":H(`
610
610
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
611
611
  <text x="9" y="8.1" text-anchor="middle" fill="#2f3b43" font-size="6.4" font-weight="500" font-family="Cambria Math, Times New Roman, serif">lim</text>
612
612
  <rect x="6.7" y="10.1" width="4.6" height="5.2" rx="0.55" fill="none" stroke="#2c8a43" stroke-width="1.2"/>
613
613
  </svg>
614
- `),"integral-template-image":U(`
614
+ `),"integral-template-image":H(`
615
615
  <svg xmlns="http://www.w3.org/2000/svg" width="90" height="60" viewBox="0 0 90 60">
616
616
  <!-- Integral -->
617
617
  <text x="8"
@@ -658,21 +658,21 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
658
658
  stroke="#2ca02c"
659
659
  stroke-width="2"/>
660
660
  </svg>
661
- `),"definite-integral-template-image":U(`
661
+ `),"definite-integral-template-image":H(`
662
662
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
663
663
  <text x="0.95" y="14.05" font-size="14.2" font-family="Cambria Math, STIX Two Math, Times New Roman, serif" font-weight="700" fill="#37474f">∫</text>
664
664
  <rect x="5.1" y="1.2" width="2.55" height="2.55" rx="0.42" fill="none" stroke="#4a5559" stroke-width="1.15"/>
665
665
  <rect x="2.1" y="13.15" width="2.55" height="2.55" rx="0.42" fill="none" stroke="#4a5559" stroke-width="1.15"/>
666
666
  <rect x="8.45" y="6.15" width="3.8" height="3.8" rx="0.58" fill="none" stroke="#4a5559" stroke-width="1.2"/>
667
667
  </svg>
668
- `),"integral-with-differential-template-image":U(`
668
+ `),"integral-with-differential-template-image":H(`
669
669
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
670
670
  <text x="0.95" y="13.85" font-size="14.6" font-family="Cambria Math, STIX Two Math, Times New Roman, serif" font-weight="700" fill="#37474f">∫</text>
671
671
  <rect x="6.55" y="6.15" width="3.05" height="3.05" rx="0.48" fill="none" stroke="#4a5559" stroke-width="1.15"/>
672
672
  <text x="10.55" y="8.95" font-size="4.95" font-family="Arial, Helvetica, sans-serif" font-weight="700" fill="#37474f">d</text>
673
673
  <rect x="13.15" y="6.15" width="3.05" height="3.05" rx="0.48" fill="none" stroke="#4a5559" stroke-width="1.15"/>
674
674
  </svg>
675
- `),"integral-box-differential-template-image":U(`
675
+ `),"integral-box-differential-template-image":H(`
676
676
  <svg xmlns="http://www.w3.org/2000/svg" width="90" height="64" viewBox="0 0 90 64">
677
677
  <!-- Integral -->
678
678
  <text x="8" y="48"
@@ -714,38 +714,38 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
714
714
  stroke="#1f9d2f"
715
715
  stroke-width="2"/>
716
716
  </svg>
717
- `),"single-integral-template-image":U(`
717
+ `),"single-integral-template-image":H(`
718
718
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="32" viewBox="0 0 24 32">
719
719
  <text x="2" y="25" font-family="Cambria Math, Times New Roman, serif" font-size="28" fill="#111">&#8747;</text>
720
720
  </svg>
721
- `),"contour-integral-template-image":U(`
721
+ `),"contour-integral-template-image":H(`
722
722
  <svg xmlns="http://www.w3.org/2000/svg" width="28" height="32" viewBox="0 0 28 32">
723
723
  <text x="1" y="25" font-family="Cambria Math, Times New Roman, serif" font-size="28" fill="#111">&#8750;</text>
724
724
  </svg>
725
- `),"double-integral-template-image":U(`
725
+ `),"double-integral-template-image":H(`
726
726
  <svg xmlns="http://www.w3.org/2000/svg" width="30" height="32" viewBox="0 0 30 32">
727
727
  <text x="1" y="25" font-family="Cambria Math, Times New Roman, serif" font-size="28" fill="#111">&#8748;</text>
728
728
  </svg>
729
- `),"double-contour-integral-template-image":U(`
729
+ `),"double-contour-integral-template-image":H(`
730
730
  <svg xmlns="http://www.w3.org/2000/svg" width="36" height="32" viewBox="0 0 36 32">
731
731
  <text x="1" y="25" font-family="Cambria Math, Times New Roman, serif" font-size="28" fill="#111">&#8751;</text>
732
732
  </svg>
733
- `),"triple-integral-template-image":U(`
733
+ `),"triple-integral-template-image":H(`
734
734
  <svg xmlns="http://www.w3.org/2000/svg" width="38" height="32" viewBox="0 0 38 32">
735
735
  <text x="1" y="25" font-family="Cambria Math, Times New Roman, serif" font-size="28" fill="#111">&#8749;</text>
736
736
  </svg>
737
- `),"triple-contour-integral-template-image":U(`
737
+ `),"triple-contour-integral-template-image":H(`
738
738
  <svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" viewBox="0 0 40 32">
739
739
  <text x="1" y="25" font-family="Cambria Math, Times New Roman, serif" font-size="28" fill="#111">&#8752;</text>
740
740
  </svg>
741
- `),"integral-with-differential":U(`
741
+ `),"integral-with-differential":H(`
742
742
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
743
743
  <text x="0.95" y="13.85" font-size="14.6" font-family="Cambria Math, STIX Two Math, Times New Roman, serif" font-weight="700" fill="#37474f">∫</text>
744
744
  <rect x="6.55" y="6.15" width="3.05" height="3.05" rx="0.48" fill="none" stroke="#4a5559" stroke-width="1.15"/>
745
745
  <text x="10.55" y="8.95" font-size="4.95" font-family="Arial, Helvetica, sans-serif" font-weight="700" fill="#37474f">d</text>
746
746
  <rect x="13.15" y="6.15" width="3.05" height="3.05" rx="0.48" fill="none" stroke="#4a5559" stroke-width="1.15"/>
747
747
  </svg>
748
- `),"integral-with-limits-differential":U(`
748
+ `),"integral-with-limits-differential":H(`
749
749
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 60">
750
750
  <text x="10" y="42" font-size="42" font-family="Times New Roman, serif" fill="#000">∫</text>
751
751
  <rect x="34" y="2" width="8" height="18" fill="none" stroke="#2e8b57" stroke-width="2"/>
@@ -754,18 +754,18 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
754
754
  <text x="64" y="39" font-size="18" font-family="Times New Roman, serif" fill="#000">d</text>
755
755
  <rect x="76" y="22" width="12" height="22" fill="none" stroke="#2e8b57" stroke-width="2"/>
756
756
  </svg>
757
- `),"integral-both-template-image":U(`
757
+ `),"integral-both-template-image":H(`
758
758
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 55 70">
759
759
  <text x="8" y="48" font-size="46" font-family="Times New Roman">∫</text>
760
760
  <rect x="34" y="4" width="8" height="18" fill="none" stroke="#2e8b57" stroke-width="2"/>
761
761
  <rect x="18" y="46" width="8" height="18" fill="none" stroke="#2e8b57" stroke-width="2"/>
762
762
  </svg>
763
- `),"integral-lower-template-image":U(`
763
+ `),"integral-lower-template-image":H(`
764
764
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 60">
765
765
  <text x="8" y="42" font-size="44" font-family="Times New Roman">∫</text>
766
766
  <rect x="20" y="40" width="8" height="18" fill="none" stroke="#2e8b57" stroke-width="2"/>
767
767
  </svg>
768
- `),"first-derivative-template-image":U(`
768
+ `),"first-derivative-template-image":H(`
769
769
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="-10 0 50 50">
770
770
  <text x="5" y="18" font-size="18">d</text>
771
771
  <rect x="18" y="4" width="8" height="16" fill="none" stroke="#2e8b57" stroke-width="2"/>
@@ -773,7 +773,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
773
773
  <text x="5" y="44" font-size="18">d</text>
774
774
  <rect x="18" y="30" width="8" height="16" fill="none" stroke="#2e8b57" stroke-width="2"/>
775
775
  </svg>
776
- `),"partial-derivative-template-image":U(`
776
+ `),"partial-derivative-template-image":H(`
777
777
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="-10 0 55 50">
778
778
  <text x="4" y="18" font-size="18">∂</text>
779
779
  <rect x="20" y="4" width="8" height="16" fill="none" stroke="#2e8b57" stroke-width="2"/>
@@ -781,18 +781,18 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
781
781
  <text x="4" y="44" font-size="18">∂</text>
782
782
  <rect x="20" y="30" width="8" height="16" fill="none" stroke="#2e8b57" stroke-width="2"/>
783
783
  </svg>
784
- `),"limit-infinity-template-image":U(`
784
+ `),"limit-infinity-template-image":H(`
785
785
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="-10 0 70 40">
786
786
  <text x="18" y="15" font-size="18">lim</text>
787
787
  <rect x="4" y="22" width="8" height="14" fill="none" stroke="#2e8b57" stroke-width="2"/>
788
788
  <text x="16" y="33" font-size="16">→∞</text>
789
789
  </svg>
790
- `),"limit-generic-template-image":U(`
790
+ `),"limit-generic-template-image":H(`
791
791
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="-5 0 55 40">
792
792
  <text x="14" y="15" font-size="18">lim</text>
793
793
  <rect x="20" y="22" width="8" height="14" fill="none" stroke="#2e8b57" stroke-width="2"/>
794
794
  </svg>
795
- `),"log-base-template-image":U(`
795
+ `),"log-base-template-image":H(`
796
796
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 28" preserveAspectRatio="xMidYMid meet">
797
797
  <text
798
798
  x="1"
@@ -845,25 +845,25 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
845
845
  )
846
846
  </text>
847
847
  </svg>
848
- `),"integral-limits-template-image":U(`
848
+ `),"integral-limits-template-image":H(`
849
849
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
850
850
  <path d="M6.2 15.5C5.7 10.7 7 4.7 9.1 3.1C9.9 2.5 10.8 2.6 11.2 3.4C11.55 4.05 11.45 5.05 11.05 6.15" fill="none" stroke="#2f3b43" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
851
851
  <rect x="11.7" y="2.2" width="3.2" height="3.2" rx="0.4" fill="none" stroke="#2c8a43" stroke-width="1.1"/>
852
852
  <rect x="10.2" y="12.3" width="3.2" height="3.2" rx="0.4" fill="none" stroke="#2c8a43" stroke-width="1.1"/>
853
853
  </svg>
854
- `),"vector-template-image":U(`
854
+ `),"vector-template-image":H(`
855
855
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
856
856
  <path d="M5.2 4.3H12.7" fill="none" stroke="#2c8a43" stroke-width="1.35" stroke-linecap="round"/>
857
857
  <path d="M10.9 2.95L12.95 4.3L10.9 5.65" fill="none" stroke="#2c8a43" stroke-width="1.35" stroke-linecap="round" stroke-linejoin="round"/>
858
858
  <rect x="4.6" y="6.4" width="8.8" height="9" rx="1.1" fill="none" stroke="#56646d" stroke-width="1.2"/>
859
859
  </svg>
860
- `),"summation-template-image":U(`
860
+ `),"summation-template-image":H(`
861
861
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
862
862
  <rect x="1.9" y="2.2" width="3.1" height="3.1" rx="0.4" fill="none" stroke="#2c8a43" stroke-width="1.1"/>
863
863
  <path d="M12.9 3.1H6.55L10.25 8.85L6.45 14.8H13.1" fill="none" stroke="#2f3b43" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
864
864
  <rect x="1.9" y="12.7" width="3.1" height="3.1" rx="0.4" fill="none" stroke="#2c8a43" stroke-width="1.1"/>
865
865
  </svg>
866
- `),"paren-fraction-template-image":U(`
866
+ `),"paren-fraction-template-image":H(`
867
867
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
868
868
  <path d="M4.55 2.5C3.15 3.85 2.5 5.8 2.5 9C2.5 12.2 3.15 14.15 4.55 15.5" fill="none" stroke="#2f3b43" stroke-width="1.2" stroke-linecap="round"/>
869
869
  <path d="M13.45 2.5C14.85 3.85 15.5 5.8 15.5 9C15.5 12.2 14.85 14.15 13.45 15.5" fill="none" stroke="#2f3b43" stroke-width="1.2" stroke-linecap="round"/>
@@ -871,7 +871,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
871
871
  <line x1="6.15" y1="9" x2="11.85" y2="9" stroke="#2c8a43" stroke-width="1.2" stroke-linecap="round"/>
872
872
  <rect x="6.65" y="10.7" width="4.7" height="4.1" rx="0.5" fill="none" stroke="#2c8a43" stroke-width="1.1"/>
873
873
  </svg>
874
- `),"brace-fraction-template-image":U(`
874
+ `),"brace-fraction-template-image":H(`
875
875
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
876
876
  <path d="M5.15 2.55C3.9 2.55 3.2 3.3 3.2 4.55V6.15C3.2 6.9 2.85 7.35 2.25 7.7C2.85 8.05 3.2 8.5 3.2 9.25V10.85C3.2 12.1 3.9 12.85 5.15 12.85" fill="none" stroke="#2f3b43" stroke-width="1.1" stroke-linecap="round" stroke-linejoin="round"/>
877
877
  <path d="M12.85 2.55C14.1 2.55 14.8 3.3 14.8 4.55V6.15C14.8 6.9 15.15 7.35 15.75 7.7C15.15 8.05 14.8 8.5 14.8 9.25V10.85C14.8 12.1 14.1 12.85 12.85 12.85" fill="none" stroke="#2f3b43" stroke-width="1.1" stroke-linecap="round" stroke-linejoin="round"/>
@@ -879,7 +879,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
879
879
  <line x1="6.05" y1="9" x2="10.95" y2="9" stroke="#2c8a43" stroke-width="1.2" stroke-linecap="round"/>
880
880
  <rect x="6.45" y="10.7" width="4.1" height="4.1" rx="0.5" fill="none" stroke="#2c8a43" stroke-width="1.1"/>
881
881
  </svg>
882
- `),"bracket-fraction-template-image":U(`
882
+ `),"bracket-fraction-template-image":H(`
883
883
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
884
884
  <path d="M4.65 2.6H2.95V15.4H4.65" fill="none" stroke="#2f3b43" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
885
885
  <path d="M13.35 2.6H15.05V15.4H13.35" fill="none" stroke="#2f3b43" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
@@ -887,44 +887,44 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
887
887
  <line x1="6.05" y1="9" x2="11.95" y2="9" stroke="#2c8a43" stroke-width="1.2" stroke-linecap="round"/>
888
888
  <rect x="6.55" y="10.7" width="4.9" height="4.1" rx="0.5" fill="none" stroke="#2c8a43" stroke-width="1.1"/>
889
889
  </svg>
890
- `),"subsup-template-image":U(`
890
+ `),"subsup-template-image":H(`
891
891
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
892
892
  <rect x="2.9" y="5.7" width="6.1" height="8.2" rx="0.75" fill="none" stroke="#56646d" stroke-width="1.2"/>
893
893
  <rect x="10.5" y="2.35" width="4.05" height="4.15" rx="0.5" fill="none" stroke="#2c8a43" stroke-width="1.1"/>
894
894
  <rect x="10.5" y="10.2" width="4.05" height="4.15" rx="0.5" fill="none" stroke="#2c8a43" stroke-width="1.1"/>
895
895
  </svg>
896
- `),"fraction-exponent-template-image":U(`
896
+ `),"fraction-exponent-template-image":H(`
897
897
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
898
898
  <rect x="2.6" y="7.2" width="5.8" height="7.6" rx="0.75" fill="none" stroke="#56646d" stroke-width="1.2"/>
899
899
  <rect x="10.25" y="2.75" width="3.35" height="2.7" rx="0.4" fill="none" stroke="#2c8a43" stroke-width="1.05"/>
900
900
  <line x1="9.8" y1="8.05" x2="14.15" y2="8.05" stroke="#2c8a43" stroke-width="1.1" stroke-linecap="round"/>
901
901
  <rect x="10.25" y="10.1" width="3.35" height="2.7" rx="0.4" fill="none" stroke="#2c8a43" stroke-width="1.05"/>
902
902
  </svg>
903
- `),"double-integral-area-template-image":U(`
903
+ `),"double-integral-area-template-image":H(`
904
904
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
905
905
  <text x="0.7" y="13.55" font-size="11.1" font-family="Cambria Math, STIX Two Math, Times New Roman, serif" font-weight="700" fill="#263238">∫∫</text>
906
906
  <rect x="10.85" y="2.05" width="3.45" height="3.45" rx="0.55" fill="none" stroke="#465257" stroke-width="1.2"/>
907
907
  <rect x="8.05" y="12.05" width="3.1" height="3.1" rx="0.5" fill="none" stroke="#465257" stroke-width="1.2"/>
908
908
  <text x="10.95" y="9.75" font-size="5.45" font-family="Arial, Helvetica, sans-serif" font-weight="700" fill="#263238">dA</text>
909
909
  </svg>
910
- `),"exp-e-template-image":U(`
910
+ `),"exp-e-template-image":H(`
911
911
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
912
912
  <text x="4.95" y="12.85" fill="#2f3b43" font-size="7.6" font-weight="700" font-family="Cambria Math, Times New Roman, serif">e</text>
913
913
  <rect x="10.15" y="2.95" width="3.6" height="3.35" rx="0.42" fill="none" stroke="#2c8a43" stroke-width="1.05"/>
914
914
  </svg>
915
- `),"exp-generic-template-image":U(`
915
+ `),"exp-generic-template-image":H(`
916
916
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
917
917
  <rect x="3.15" y="8.15" width="5.35" height="5.45" rx="0.55" fill="none" stroke="#56646d" stroke-width="1.15"/>
918
918
  <rect x="10.2" y="3.05" width="3.75" height="3.55" rx="0.45" fill="none" stroke="#2c8a43" stroke-width="1.05"/>
919
919
  </svg>
920
- `),"evaluated-expression-template-image":U(`
920
+ `),"evaluated-expression-template-image":H(`
921
921
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
922
922
  <path d="M4.45 2.7H2.9V15.3H4.45" fill="none" stroke="#2f3b43" stroke-width="1.15" stroke-linecap="round" stroke-linejoin="round"/>
923
923
  <rect x="5.8" y="5.55" width="4.55" height="7.2" rx="0.6" fill="none" stroke="#56646d" stroke-width="1.1"/>
924
924
  <rect x="11.95" y="2.95" width="2.8" height="3.05" rx="0.38" fill="none" stroke="#2c8a43" stroke-width="1"/>
925
925
  <rect x="11.95" y="11.95" width="2.8" height="3.05" rx="0.38" fill="none" stroke="#2c8a43" stroke-width="1"/>
926
926
  </svg>
927
- `),"rtl-input-template-image":U(`
927
+ `),"rtl-input-template-image":H(`
928
928
  <svg xmlns="http://www.w3.org/2000/svg" width="70" height="40" viewBox="0 0 70 40">
929
929
  <!-- Arabic text -->
930
930
  <text x="22"
@@ -950,144 +950,144 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
950
950
  stroke-linecap="round"
951
951
  stroke-linejoin="round"/>
952
952
  </svg>
953
- `),"negate-template-image":U(`
953
+ `),"negate-template-image":H(`
954
954
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
955
955
  <rect x="6.2" y="3.05" width="4.35" height="10.35" rx="0.55" fill="none" stroke="#2c8a43" stroke-width="1.15"/>
956
956
  <path d="M5.1 14.7L11.85 2.6" fill="none" stroke="#2f3b43" stroke-width="1.55" stroke-linecap="round" stroke-linejoin="round"/>
957
957
  </svg>
958
- `),"slash-operator-template-image":U(`
958
+ `),"slash-operator-template-image":H(`
959
959
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
960
960
  <path d="M8 4L16 20" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"/>
961
961
  </svg>
962
- `),"setminus-operator-template-image":U(`
962
+ `),"setminus-operator-template-image":H(`
963
963
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
964
964
  <path d="M16 4L8 20" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"/>
965
965
  </svg>
966
- `),"minus-plus-operator-template-image":U(`
966
+ `),"minus-plus-operator-template-image":H(`
967
967
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
968
968
  <line x1="7" y1="8" x2="17" y2="8" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"/>
969
969
  <line x1="7" y1="16" x2="17" y2="16" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"/>
970
970
  <line x1="12" y1="11" x2="12" y2="21" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"/>
971
971
  </svg>
972
- `),"not-equal-template-image":U(`
972
+ `),"not-equal-template-image":H(`
973
973
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
974
974
  <line x1="6" y1="9" x2="18" y2="9" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"/>
975
975
  <line x1="6" y1="15" x2="18" y2="15" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"/>
976
976
  <line x1="16" y1="5" x2="8" y2="19" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"/>
977
977
  </svg>
978
- `),"not-approx-equal-template-image":U(`
978
+ `),"not-approx-equal-template-image":H(`
979
979
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
980
980
  <path d="M6 8C8 6 10 10 12 8C14 6 16 10 18 8" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"/>
981
981
  <path d="M6 14C8 12 10 16 12 14C14 12 16 16 18 14" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"/>
982
982
  <line x1="16" y1="5" x2="8" y2="19" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"/>
983
983
  </svg>
984
- `),"not-similar-template-image":U(`
984
+ `),"not-similar-template-image":H(`
985
985
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
986
986
  <path d="M6 12C8 10 10 14 12 12C14 10 16 14 18 12" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"/>
987
987
  <line x1="16" y1="5" x2="8" y2="19" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"/>
988
988
  </svg>
989
- `),"not-identical-template-image":U(`
989
+ `),"not-identical-template-image":H(`
990
990
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
991
991
  <line x1="6" y1="7" x2="18" y2="7" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"/>
992
992
  <line x1="6" y1="12" x2="18" y2="12" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"/>
993
993
  <line x1="6" y1="17" x2="18" y2="17" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"/>
994
994
  <line x1="16" y1="4" x2="8" y2="20" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"/>
995
995
  </svg>
996
- `),"less-than-not-equal-template-image":U(`
996
+ `),"less-than-not-equal-template-image":H(`
997
997
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
998
998
  <text x="12" y="17" text-anchor="middle" font-size="20" fill="currentColor" font-family="Cambria Math, STIX Two Math, Times New Roman">≨</text>
999
999
  </svg>
1000
- `),"much-greater-than-template-image":U(`
1000
+ `),"much-greater-than-template-image":H(`
1001
1001
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
1002
1002
  <text x="12" y="17" text-anchor="middle" font-size="20" fill="currentColor">≫</text>
1003
1003
  </svg>
1004
- `),"succeeds-template-image":U(`
1004
+ `),"succeeds-template-image":H(`
1005
1005
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
1006
1006
  <text x="12" y="17" text-anchor="middle" font-size="20" fill="currentColor">≻</text>
1007
1007
  </svg>
1008
- `),"greater-than-not-equal-template-image":U(`
1008
+ `),"greater-than-not-equal-template-image":H(`
1009
1009
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
1010
1010
  <text x="12" y="17" text-anchor="middle" font-size="20" fill="currentColor" font-family="Cambria Math, STIX Two Math, Times New Roman">≩</text>
1011
1011
  </svg>
1012
- `),"proportional-to-template-image":U(`
1012
+ `),"proportional-to-template-image":H(`
1013
1013
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
1014
1014
  <text x="12" y="17" text-anchor="middle" font-size="20" fill="currentColor">∝</text>
1015
1015
  </svg>
1016
- `),"normal-subgroup-template-image":U(`
1016
+ `),"normal-subgroup-template-image":H(`
1017
1017
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
1018
1018
  <text x="12" y="17" text-anchor="middle" font-size="20" fill="currentColor">⊲</text>
1019
1019
  </svg>
1020
- `),"much-less-than-template-image":U(`
1020
+ `),"much-less-than-template-image":H(`
1021
1021
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
1022
1022
  <text x="12" y="17" text-anchor="middle" font-size="20" fill="currentColor">≪</text>
1023
1023
  </svg>
1024
- `),"precedes-template-image":U(`
1024
+ `),"precedes-template-image":H(`
1025
1025
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
1026
1026
  <text x="12" y="17" text-anchor="middle" font-size="20" fill="currentColor">≺</text>
1027
1027
  </svg>
1028
- `),"contains-normal-subgroup-template-image":U(`
1028
+ `),"contains-normal-subgroup-template-image":H(`
1029
1029
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
1030
1030
  <text x="12" y="17" text-anchor="middle" font-size="20" fill="currentColor">▷</text>
1031
1031
  </svg>
1032
- `),"not-element-of-template-image":U(`
1032
+ `),"not-element-of-template-image":H(`
1033
1033
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
1034
1034
  <text x="12" y="17" text-anchor="middle" font-size="20" fill="currentColor">∉</text>
1035
1035
  </svg>
1036
- `),"not-contains-member-template-image":U(`
1036
+ `),"not-contains-member-template-image":H(`
1037
1037
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
1038
1038
  <text x="12" y="17" text-anchor="middle" font-size="20" fill="currentColor">∌</text>
1039
1039
  </svg>
1040
- `),"subset-equal-template-image":U(`
1040
+ `),"subset-equal-template-image":H(`
1041
1041
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
1042
1042
  <text x="12" y="17" text-anchor="middle" font-size="20" fill="currentColor">⊆</text>
1043
1043
  </svg>
1044
- `),"superset-equal-template-image":U(`
1044
+ `),"superset-equal-template-image":H(`
1045
1045
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
1046
1046
  <text x="12" y="17" text-anchor="middle" font-size="20" fill="currentColor">⊇</text>
1047
1047
  </svg>
1048
- `),"square-subset-template-image":U(`
1048
+ `),"square-subset-template-image":H(`
1049
1049
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
1050
1050
  <text x="12" y="17" text-anchor="middle" font-size="20" fill="currentColor">⊏</text>
1051
1051
  </svg>
1052
- `),"square-superset-template-image":U(`
1052
+ `),"square-superset-template-image":H(`
1053
1053
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
1054
1054
  <text x="12" y="17" text-anchor="middle" font-size="20" fill="currentColor">⊐</text>
1055
1055
  </svg>
1056
- `),"square-subset-equal-template-image":U(`
1056
+ `),"square-subset-equal-template-image":H(`
1057
1057
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
1058
1058
  <text x="12" y="17" text-anchor="middle" font-size="20" fill="currentColor">⊑</text>
1059
1059
  </svg>
1060
- `),"square-superset-equal-template-image":U(`
1060
+ `),"square-superset-equal-template-image":H(`
1061
1061
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
1062
1062
  <text x="12" y="17" text-anchor="middle" font-size="20" fill="currentColor">⊒</text>
1063
1063
  </svg>
1064
- `),"square-cap-template-image":U(`
1064
+ `),"square-cap-template-image":H(`
1065
1065
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
1066
1066
  <text x="12" y="17" text-anchor="middle" font-size="20" fill="currentColor">⊓</text>
1067
1067
  </svg>
1068
- `),"square-cup-template-image":U(`
1068
+ `),"square-cup-template-image":H(`
1069
1069
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
1070
1070
  <text x="12" y="17" text-anchor="middle" font-size="20" fill="currentColor">⊔</text>
1071
1071
  </svg>
1072
- `),"therefore-template-image":U(`
1072
+ `),"therefore-template-image":H(`
1073
1073
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
1074
1074
  <circle cx="12" cy="6" r="1.8" />
1075
1075
  <circle cx="7" cy="16" r="1.8" />
1076
1076
  <circle cx="17" cy="16" r="1.8" />
1077
1077
  </svg>
1078
- `),"because-template-image":U(`
1078
+ `),"because-template-image":H(`
1079
1079
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
1080
1080
  <circle cx="7" cy="8" r="1.8" />
1081
1081
  <circle cx="17" cy="8" r="1.8" />
1082
1082
  <circle cx="12" cy="18" r="1.8" />
1083
1083
  </svg>
1084
- `),"not-parallel-template-image":U(`
1084
+ `),"not-parallel-template-image":H(`
1085
1085
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
1086
1086
  <line x1="8" y1="3" x2="8" y2="21" stroke="currentColor" stroke-width="2.2" />
1087
1087
  <line x1="16" y1="3" x2="16" y2="21" stroke="currentColor" stroke-width="2.2" />
1088
1088
  <line x1="18" y1="4" x2="6" y2="20" stroke="currentColor" stroke-width="2.2" />
1089
1089
  </svg>
1090
- `),"measured-angle-template-image":U(`
1090
+ `),"measured-angle-template-image":H(`
1091
1091
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
1092
1092
  <text
1093
1093
  x="12"
@@ -1100,7 +1100,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
1100
1100
 
1101
1101
  </text>
1102
1102
  </svg>
1103
- `),"spherical-angle-template-image":U(`
1103
+ `),"spherical-angle-template-image":H(`
1104
1104
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
1105
1105
  <text
1106
1106
  x="12"
@@ -1113,24 +1113,24 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
1113
1113
 
1114
1114
  </text>
1115
1115
  </svg>
1116
- `),"diamond-template-image":U(`
1116
+ `),"diamond-template-image":H(`
1117
1117
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
1118
1118
  <path d="M12 3L18 12L12 21L6 12Z" stroke="currentColor" stroke-width="2.2" stroke-linejoin="round" />
1119
1119
  </svg>
1120
- `),"rectangle-template-image":U(`
1120
+ `),"rectangle-template-image":H(`
1121
1121
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
1122
1122
  <rect x="4" y="7" width="16" height="10" stroke="currentColor" stroke-width="2.2" />
1123
1123
  </svg>
1124
- `),"parallelogram-template-image":U(`
1124
+ `),"parallelogram-template-image":H(`
1125
1125
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
1126
1126
  <path d="M8 5H18L16 19H6L8 5Z" stroke="currentColor" stroke-width="2.2" stroke-linejoin="round" />
1127
1127
  </svg>
1128
- `),"circled-minus-template-image":U(`
1128
+ `),"circled-minus-template-image":H(`
1129
1129
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
1130
1130
  <circle cx="12" cy="12" r="9" stroke="currentColor" stroke-width="2.2" />
1131
1131
  <line x1="8" y1="12" x2="16" y2="12" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" />
1132
1132
  </svg>
1133
- `),"circled-asterisk-template-image":U(`
1133
+ `),"circled-asterisk-template-image":H(`
1134
1134
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
1135
1135
  <circle cx="12" cy="12" r="9" stroke="currentColor" stroke-width="2.2" />
1136
1136
  <line x1="12" y1="7" x2="12" y2="17" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" />
@@ -1138,18 +1138,18 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
1138
1138
  <line x1="8.5" y1="8.5" x2="15.5" y2="15.5" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" />
1139
1139
  <line x1="15.5" y1="8.5" x2="8.5" y2="15.5" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" />
1140
1140
  </svg>
1141
- `),"circled-divide-template-image":U(`
1141
+ `),"circled-divide-template-image":H(`
1142
1142
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
1143
1143
  <circle cx="12" cy="12" r="9" stroke="currentColor" stroke-width="2.2" />
1144
1144
  <rect x="10.9" y="5.8" width="2.2" height="2.2" fill="currentColor" />
1145
1145
  <rect x="7.2" y="10.9" width="9.6" height="2.2" fill="currentColor" />
1146
1146
  <rect x="10.9" y="16" width="2.2" height="2.2" fill="currentColor" />
1147
1147
  </svg>
1148
- `),"raised-bullet-template-image":U(`
1148
+ `),"raised-bullet-template-image":H(`
1149
1149
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
1150
1150
  <circle cx="12" cy="8" r="3" fill="currentColor" />
1151
1151
  </svg>
1152
- `),"matrix-grid-template-image":U(`
1152
+ `),"matrix-grid-template-image":H(`
1153
1153
  <svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" viewBox="0 0 40 32" fill="none">
1154
1154
  <rect x="6" y="3" width="5" height="6" stroke="#2ca02c" stroke-width="2"/>
1155
1155
  <rect x="17" y="3" width="5" height="6" stroke="#2ca02c" stroke-width="2"/>
@@ -1161,7 +1161,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
1161
1161
  <rect x="17" y="23" width="5" height="6" stroke="#2ca02c" stroke-width="2"/>
1162
1162
  <rect x="28" y="23" width="5" height="6" stroke="#2ca02c" stroke-width="2"/>
1163
1163
  </svg>
1164
- `),"matrix-brackets-template-image":U(`
1164
+ `),"matrix-brackets-template-image":H(`
1165
1165
  <svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" viewBox="0 0 40 32" fill="none">
1166
1166
  <path d="M8 2 H4 V30 H8" stroke="#111" stroke-width="2" fill="none"/>
1167
1167
  <path d="M32 2 H36 V30 H32" stroke="#111" stroke-width="2" fill="none"/>
@@ -1172,7 +1172,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
1172
1172
  <rect x="11" y="23" width="5" height="6" stroke="#2ca02c" stroke-width="2"/>
1173
1173
  <rect x="24" y="23" width="5" height="6" stroke="#2ca02c" stroke-width="2"/>
1174
1174
  </svg>
1175
- `),"matrix-bars-template-image":U(`
1175
+ `),"matrix-bars-template-image":H(`
1176
1176
  <svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" viewBox="0 0 40 32" fill="none">
1177
1177
  <line x1="4" y1="2" x2="4" y2="30" stroke="#111" stroke-width="2"/>
1178
1178
  <line x1="36" y1="2" x2="36" y2="30" stroke="#111" stroke-width="2"/>
@@ -1183,7 +1183,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
1183
1183
  <rect x="10" y="23" width="5" height="6" stroke="#2ca02c" stroke-width="2"/>
1184
1184
  <rect x="24" y="23" width="5" height="6" stroke="#2ca02c" stroke-width="2"/>
1185
1185
  </svg>
1186
- `),"matrix-parens-template-image":U(`
1186
+ `),"matrix-parens-template-image":H(`
1187
1187
  <svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" viewBox="0 0 40 32" fill="none">
1188
1188
  <path d="M6 2 C2 8,2 24,6 30" stroke="#111" stroke-width="2" stroke-linecap="round"/>
1189
1189
  <path d="M34 2 C38 8,38 24,34 30" stroke="#111" stroke-width="2" stroke-linecap="round"/>
@@ -1194,7 +1194,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
1194
1194
  <rect x="11" y="23" width="5" height="6" stroke="#2ca02c" stroke-width="2"/>
1195
1195
  <rect x="24" y="23" width="5" height="6" stroke="#2ca02c" stroke-width="2"/>
1196
1196
  </svg>
1197
- `),"cases-template-image":U(`
1197
+ `),"cases-template-image":H(`
1198
1198
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 48" fill="none">
1199
1199
  <path
1200
1200
  d="M9 2 C4 2 4 5 4 8 L4 16 C4 19 3 21 1 24 C3 27 4 29 4 32 L4 40 C4 43 4 46 9 46"
@@ -1206,7 +1206,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
1206
1206
  <rect x="15" y="7" width="8" height="13" stroke="#008000" stroke-width="2.5"/>
1207
1207
  <rect x="15" y="28" width="8" height="13" stroke="#008000" stroke-width="2.5"/>
1208
1208
  </svg>
1209
- `),"rcases-template-image":U(`
1209
+ `),"rcases-template-image":H(`
1210
1210
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 42 72" fill="none">
1211
1211
  <rect x="10" y="8" width="9" height="22" stroke="#0a7a18" stroke-width="4"/>
1212
1212
  <rect x="10" y="42" width="9" height="22" stroke="#0a7a18" stroke-width="4"/>
@@ -1218,7 +1218,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
1218
1218
  stroke-linejoin="round"
1219
1219
  />
1220
1220
  </svg>
1221
- `),"cases-two-by-two-template-image":U(`
1221
+ `),"cases-two-by-two-template-image":H(`
1222
1222
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 42 48" fill="none">
1223
1223
  <path
1224
1224
  d="M8 2 C4 2 4 5 4 8 L4 16 C4 18 3 20 1 24 C3 28 4 30 4 32 L4 40 C4 43 4 46 8 46"
@@ -1232,7 +1232,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
1232
1232
  <rect x="14" y="28" width="6" height="12" stroke="#008000" stroke-width="2.5"/>
1233
1233
  <rect x="28" y="28" width="6" height="12" stroke="#008000" stroke-width="2.5"/>
1234
1234
  </svg>
1235
- `),"aligned-equals-template-image":U(`
1235
+ `),"aligned-equals-template-image":H(`
1236
1236
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 42 48" fill="none">
1237
1237
  <rect x="6" y="6" width="8" height="12" stroke="#008000" stroke-width="2.5"/>
1238
1238
  <text x="21" y="16" font-size="15" text-anchor="middle" fill="#000">=</text>
@@ -1241,31 +1241,31 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
1241
1241
  <text x="21" y="38" font-size="15" text-anchor="middle" fill="#000">=</text>
1242
1242
  <rect x="28" y="28" width="8" height="12" stroke="#008000" stroke-width="2.5"/>
1243
1243
  </svg>
1244
- `),"vertical-ellipsis-template-image":U(`
1244
+ `),"vertical-ellipsis-template-image":H(`
1245
1245
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
1246
1246
  <circle cx="12" cy="5.5" r="1.35" fill="#22343d" />
1247
1247
  <circle cx="12" cy="12" r="1.35" fill="#22343d" />
1248
1248
  <circle cx="12" cy="18.5" r="1.35" fill="#22343d" />
1249
1249
  </svg>
1250
- `),"midline-ellipsis-template-image":U(`
1250
+ `),"midline-ellipsis-template-image":H(`
1251
1251
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
1252
1252
  <circle cx="5.5" cy="12" r="1.35" fill="#22343d" />
1253
1253
  <circle cx="12" cy="12" r="1.35" fill="#22343d" />
1254
1254
  <circle cx="18.5" cy="12" r="1.35" fill="#22343d" />
1255
1255
  </svg>
1256
- `),"upright-ellipsis-template-image":U(`
1256
+ `),"upright-ellipsis-template-image":H(`
1257
1257
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
1258
1258
  <circle cx="6.2" cy="17.8" r="1.35" fill="#22343d" />
1259
1259
  <circle cx="12" cy="12" r="1.35" fill="#22343d" />
1260
1260
  <circle cx="17.8" cy="6.2" r="1.35" fill="#22343d" />
1261
1261
  </svg>
1262
- `),"downright-ellipsis-template-image":U(`
1262
+ `),"downright-ellipsis-template-image":H(`
1263
1263
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
1264
1264
  <circle cx="6.2" cy="6.2" r="1.35" fill="#22343d" />
1265
1265
  <circle cx="12" cy="12" r="1.35" fill="#22343d" />
1266
1266
  <circle cx="17.8" cy="17.8" r="1.35" fill="#22343d" />
1267
1267
  </svg>
1268
- `),"sum-array-template-image":U(`
1268
+ `),"sum-array-template-image":H(`
1269
1269
  <svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" viewBox="0 0 40 32">
1270
1270
  <!-- Upper placeholder -->
1271
1271
  <rect x="24" y="1"
@@ -1300,7 +1300,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
1300
1300
  stroke="#2ca02c"
1301
1301
  stroke-width="1.5"/>
1302
1302
  </svg>
1303
- `),"difference-array-template-image":U(`
1303
+ `),"difference-array-template-image":H(`
1304
1304
  <svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" viewBox="0 0 40 32">
1305
1305
  <!-- Upper placeholder -->
1306
1306
  <rect x="24" y="1"
@@ -1335,7 +1335,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
1335
1335
  stroke="#2ca02c"
1336
1336
  stroke-width="1.5"/>
1337
1337
  </svg>
1338
- `),"stack-line-template-image":U(`
1338
+ `),"stack-line-template-image":H(`
1339
1339
  <svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" viewBox="0 0 40 32">
1340
1340
  <!-- Top placeholder -->
1341
1341
  <rect x="24" y="1"
@@ -1364,7 +1364,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
1364
1364
  stroke="#2ca02c"
1365
1365
  stroke-width="1.5"/>
1366
1366
  </svg>
1367
- `),"division-layout-template-image":U(`
1367
+ `),"division-layout-template-image":H(`
1368
1368
  <svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" viewBox="0 0 40 32">
1369
1369
  <!-- Top placeholder -->
1370
1370
  <rect x="24" y="1"
@@ -1399,7 +1399,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
1399
1399
  stroke="#2ca02c"
1400
1400
  stroke-width="1.5"/>
1401
1401
  </svg>
1402
- `),"product-array-template-image":U(`
1402
+ `),"product-array-template-image":H(`
1403
1403
  <svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" viewBox="0 0 40 32">
1404
1404
  <!-- Upper placeholder -->
1405
1405
  <rect x="24" y="1"
@@ -1434,7 +1434,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
1434
1434
  stroke="#2ca02c"
1435
1435
  stroke-width="1.5"/>
1436
1436
  </svg>
1437
- `),"mixed-fraction-template-image":U(`
1437
+ `),"mixed-fraction-template-image":H(`
1438
1438
  <svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" viewBox="0 0 40 32">
1439
1439
  <!-- Left top box -->
1440
1440
  <rect x="3" y="6"
@@ -1468,7 +1468,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
1468
1468
  stroke="#2ca02c"
1469
1469
  stroke-width="1.5"/>
1470
1470
  </svg>
1471
- `),"array-cc-template-image":U(`
1471
+ `),"array-cc-template-image":H(`
1472
1472
  <svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" viewBox="0 0 40 32">
1473
1473
  <!-- Top left -->
1474
1474
  <rect x="3" y="4"
@@ -1509,7 +1509,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
1509
1509
  stroke="#111"
1510
1510
  stroke-width="2"/>
1511
1511
  </svg>
1512
- `),"division-remainder-template-image":U(`
1512
+ `),"division-remainder-template-image":H(`
1513
1513
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 80" fill="none">
1514
1514
  <!-- Top placeholder -->
1515
1515
  <rect x="32" y="2" width="14" height="18"
@@ -1540,12 +1540,12 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
1540
1540
  stroke="#000"
1541
1541
  stroke-width="4"/>
1542
1542
  </svg>
1543
- `),"vertical-line-picker-template-image":U(`
1543
+ `),"vertical-line-picker-template-image":H(`
1544
1544
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
1545
1545
  <rect x="8.6" y="2.5" width="4.3" height="18.5" rx="1.4" fill="#89a5b6" />
1546
1546
  <path d="M12.8 15L17 18.1L12.8 21.2Z" fill="#ffffff" />
1547
1547
  </svg>
1548
- `),"right-left-arrows-over":W(`
1548
+ `),"right-left-arrows-over":U(`
1549
1549
  <rect
1550
1550
  x="10"
1551
1551
  y="1"
@@ -1583,7 +1583,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
1583
1583
  stroke-linecap="round"
1584
1584
  stroke-linejoin="round"
1585
1585
  />
1586
- `),"right-left-arrows-under":W(`
1586
+ `),"right-left-arrows-under":U(`
1587
1587
  <rect
1588
1588
  x="10"
1589
1589
  y="16"
@@ -1621,7 +1621,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
1621
1621
  stroke-linecap="round"
1622
1622
  stroke-linejoin="round"
1623
1623
  />
1624
- `),"right-left-arrows-over-under":W(`
1624
+ `),"right-left-arrows-over-under":U(`
1625
1625
  <rect
1626
1626
  x="10"
1627
1627
  y="1"
@@ -1669,7 +1669,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
1669
1669
  stroke="#5A9E57"
1670
1670
  stroke-width="0.8"
1671
1671
  />
1672
- `),"left-right-arrows-over":W(`
1672
+ `),"left-right-arrows-over":U(`
1673
1673
  <rect
1674
1674
  x="10"
1675
1675
  y="1"
@@ -1717,7 +1717,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
1717
1717
  stroke-linecap="round"
1718
1718
  stroke-linejoin="round"
1719
1719
  />
1720
- `),"left-right-arrows-under":W(`
1720
+ `),"left-right-arrows-under":U(`
1721
1721
  <line
1722
1722
  x1="4"
1723
1723
  y1="8"
@@ -1765,7 +1765,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
1765
1765
  stroke="#5A9E57"
1766
1766
  stroke-width="0.8"
1767
1767
  />
1768
- `),"left-right-arrows-over-under":W(`
1768
+ `),"left-right-arrows-over-under":U(`
1769
1769
  <rect
1770
1770
  x="10"
1771
1771
  y="1"
@@ -1823,7 +1823,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
1823
1823
  stroke="#5A9E57"
1824
1824
  stroke-width="0.8"
1825
1825
  />
1826
- `),"right-left-stacked-arrows-over":W(`
1826
+ `),"right-left-stacked-arrows-over":U(`
1827
1827
  <rect
1828
1828
  x="10"
1829
1829
  y="1"
@@ -1873,7 +1873,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
1873
1873
  stroke-linecap="round"
1874
1874
  stroke-linejoin="round"
1875
1875
  />
1876
- `),"right-left-stacked-arrows-under":W(`
1876
+ `),"right-left-stacked-arrows-under":U(`
1877
1877
  <line
1878
1878
  x1="20"
1879
1879
  y1="8"
@@ -1921,7 +1921,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
1921
1921
  stroke="#5A9E57"
1922
1922
  stroke-width="0.8"
1923
1923
  />
1924
- `),"right-left-stacked-arrows-over-under":W(`
1924
+ `),"right-left-stacked-arrows-over-under":U(`
1925
1925
  <rect
1926
1926
  x="10"
1927
1927
  y="1"
@@ -1981,7 +1981,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
1981
1981
  stroke="#5A9E57"
1982
1982
  stroke-width="0.8"
1983
1983
  />
1984
- `),"left-right-harpoons-over":W(`
1984
+ `),"left-right-harpoons-over":U(`
1985
1985
  <rect
1986
1986
  x="10"
1987
1987
  y="1"
@@ -2031,7 +2031,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
2031
2031
  stroke-linecap="round"
2032
2032
  stroke-linejoin="round"
2033
2033
  />
2034
- `),"left-right-harpoons-under":W(`
2034
+ `),"left-right-harpoons-under":U(`
2035
2035
  <!-- Top left harpoon -->
2036
2036
  <line
2037
2037
  x1="20"
@@ -2082,7 +2082,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
2082
2082
  stroke="#5A9E57"
2083
2083
  stroke-width="0.8"
2084
2084
  />
2085
- `),"left-right-harpoons-over-under":W(`
2085
+ `),"left-right-harpoons-over-under":U(`
2086
2086
  <rect
2087
2087
  x="10"
2088
2088
  y="1"
@@ -2142,7 +2142,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
2142
2142
  stroke="#5A9E57"
2143
2143
  stroke-width="0.8"
2144
2144
  />
2145
- `),"right-left-harpoons-over":W(`
2145
+ `),"right-left-harpoons-over":U(`
2146
2146
  <rect
2147
2147
  x="10"
2148
2148
  y="1"
@@ -2190,7 +2190,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
2190
2190
  stroke-linecap="round"
2191
2191
  stroke-linejoin="round"
2192
2192
  />
2193
- `),"right-left-harpoons-under":W(`
2193
+ `),"right-left-harpoons-under":U(`
2194
2194
  <!-- Top right harpoon -->
2195
2195
  <line
2196
2196
  x1="4"
@@ -2239,7 +2239,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
2239
2239
  stroke="#5A9E57"
2240
2240
  stroke-width="0.8"
2241
2241
  />
2242
- `),"right-left-harpoons-over-under":W(`
2242
+ `),"right-left-harpoons-over-under":U(`
2243
2243
  <rect
2244
2244
  x="10"
2245
2245
  y="1"
@@ -2299,7 +2299,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
2299
2299
  stroke="#5A9E57"
2300
2300
  stroke-width="0.8"
2301
2301
  />
2302
- `),"long-right-short-left-over":W(`
2302
+ `),"long-right-short-left-over":U(`
2303
2303
  <rect
2304
2304
  x="10"
2305
2305
  y="1"
@@ -2347,7 +2347,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
2347
2347
  stroke-linecap="round"
2348
2348
  stroke-linejoin="round"
2349
2349
  />
2350
- `),"long-right-short-left-under":W(`
2350
+ `),"long-right-short-left-under":U(`
2351
2351
  <!-- Top right arrow -->
2352
2352
  <line
2353
2353
  x1="6"
@@ -2396,7 +2396,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
2396
2396
  stroke="#5A9E57"
2397
2397
  stroke-width="0.8"
2398
2398
  />
2399
- `),"long-right-short-left-over-under":W(`
2399
+ `),"long-right-short-left-over-under":U(`
2400
2400
  <rect
2401
2401
  x="10"
2402
2402
  y="1"
@@ -2454,7 +2454,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
2454
2454
  stroke="#5A9E57"
2455
2455
  stroke-width="0.8"
2456
2456
  />
2457
- `),"short-right-long-left-over":W(`
2457
+ `),"short-right-long-left-over":U(`
2458
2458
  <rect
2459
2459
  x="10"
2460
2460
  y="1"
@@ -2504,7 +2504,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
2504
2504
  stroke-linecap="round"
2505
2505
  stroke-linejoin="round"
2506
2506
  />
2507
- `),"short-right-long-left-under":W(`
2507
+ `),"short-right-long-left-under":U(`
2508
2508
  <rect
2509
2509
  x="10"
2510
2510
  y="17"
@@ -2552,7 +2552,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
2552
2552
  stroke-linecap="round"
2553
2553
  stroke-linejoin="round"
2554
2554
  />
2555
- `),"short-right-long-left-over-under":W(`
2555
+ `),"short-right-long-left-over-under":U(`
2556
2556
  <rect
2557
2557
  x="10"
2558
2558
  y="1"
@@ -2610,16 +2610,16 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
2610
2610
  stroke="#5A9E57"
2611
2611
  stroke-width="0.8"
2612
2612
  />
2613
- `),"arabic-indic-numerals-template-image":U(`
2613
+ `),"arabic-indic-numerals-template-image":H(`
2614
2614
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">
2615
2615
  <text x="4" y="36" font-family="Amiri, Noto Naskh Arabic, serif" font-size="38" fill="#000">٤٦</text>
2616
2616
  </svg>
2617
- `),"eastern-arabic-indic-numerals-template-image":U(`
2617
+ `),"eastern-arabic-indic-numerals-template-image":H(`
2618
2618
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">
2619
2619
  <text x="4" y="36" font-size="36" font-family="sans-serif" fill="#000">۴۶</text>
2620
2620
  </svg>
2621
- `)};function he(e,t={}){if(e.cls?.includes(`arrow-picker-tool`))return(0,i.jsx)(`span`,{className:`cme-toolbar-chevron-indicator`,"aria-hidden":`true`,children:`⏵`});if(e.icon&&me[e.icon])return(0,i.jsx)(`span`,{className:`cme-toolbar-icon-image-wrapper cme-toolbar-icon-image-wrapper--${e.icon}`,"aria-hidden":`true`,children:(0,i.jsx)(`img`,{className:`cme-toolbar-icon-image cme-toolbar-icon-image--${e.icon}`,src:me[e.icon],alt:``})});if(e.icon===`stacked-fraction`)return(0,i.jsx)(`span`,{className:`cme-fraction-icon cme-fraction-stack${e.cls?.includes(`black-glyph-template`)?` cme-fraction-stack--black-glyph-template`:``}`,"aria-hidden":`true`,children:(0,i.jsxs)(`svg`,{className:`cme-fraction-svg`,viewBox:`0 0 24 24`,focusable:`false`,"aria-hidden":`true`,children:[(0,i.jsx)(`rect`,{x:`7.5`,y:`-0.2`,width:`9`,height:`9`}),(0,i.jsx)(`line`,{x1:`5.5`,y1:`12`,x2:`18.5`,y2:`12`}),(0,i.jsx)(`rect`,{x:`7.5`,y:`15.3`,width:`9`,height:`9`})]})});if(e.icon===`arrow-label-right-above`||e.icon===`arrow-label-left-above`||e.icon===`arrow-label-both-above`||e.icon===`arrow-label-right-below`||e.icon===`arrow-label-left-below`||e.icon===`arrow-label-both-below`||e.icon===`arrow-label-both-above-below`||e.icon===`arrow-label-right-above-below`||e.icon===`arrow-label-left-above-below`||e.icon===`harpoon-label-right-left-above`||e.icon===`harpoon-label-right-left-below`||e.icon===`harpoon-label-right-left-above-below`||e.icon===`harpoon-label-left-right-above-below`||e.icon===`bar-harpoon-label-right-left-above-below`||e.icon===`bar-harpoon-label-right-left-above`||e.icon===`bar-harpoon-label-right-left-below`||e.icon===`bar-harpoon-label-left-right-above-below`||e.icon===`bar-arrow-label-right-left-above`||e.icon===`bar-arrow-label-right-left-above-below`||e.icon===`bar-arrow-label-left-right-above`||e.icon===`bar-arrow-label-left-right-above-below`){let{direction:t,arrowY:n,topBox:r,bottomBox:a}={"arrow-label-right-above":{direction:`right`,arrowY:11.25,topBox:{x:6.5,y:1.55,width:4.8,height:5.7}},"arrow-label-left-above":{direction:`left`,arrowY:11.25,topBox:{x:6.5,y:1.55,width:4.8,height:5.7}},"arrow-label-both-above":{direction:`both`,arrowY:11.25,topBox:{x:6.5,y:1.55,width:4.8,height:5.7}},"arrow-label-right-below":{direction:`right`,arrowY:6.7,bottomBox:{x:6.5,y:10.35,width:4.8,height:5.7}},"arrow-label-left-below":{direction:`left`,arrowY:6.7,bottomBox:{x:6.5,y:10.35,width:4.8,height:5.7}},"arrow-label-both-below":{direction:`both`,arrowY:6.7,bottomBox:{x:6.5,y:10.35,width:4.8,height:5.7}},"arrow-label-both-above-below":{direction:`both`,arrowY:8.55,topBox:{x:6.5,y:1.3,width:4.8,height:4.9},bottomBox:{x:6.5,y:11.7,width:4.8,height:4.9}},"arrow-label-right-above-below":{direction:`right`,arrowY:8.55,topBox:{x:6.5,y:1.3,width:4.8,height:4.9},bottomBox:{x:6.5,y:11.7,width:4.8,height:4.9}},"arrow-label-left-above-below":{direction:`left`,arrowY:8.55,topBox:{x:6.5,y:1.3,width:4.8,height:4.9},bottomBox:{x:6.5,y:11.7,width:4.8,height:4.9}},"harpoon-label-right-left-above":{direction:`harpoon-rl`,arrowY:11.15,topBox:{x:6.5,y:1.55,width:4.8,height:5.7}},"harpoon-label-right-left-below":{direction:`harpoon-rl`,arrowY:6.6,bottomBox:{x:6.5,y:10.35,width:4.8,height:5.7}},"harpoon-label-right-left-above-below":{direction:`harpoon-rl`,arrowY:8.55,topBox:{x:6.5,y:1.3,width:4.8,height:4.9},bottomBox:{x:6.5,y:11.7,width:4.8,height:4.9}},"harpoon-label-left-right-above-below":{direction:`harpoon-lr`,arrowY:8.55,topBox:{x:6.5,y:1.3,width:4.8,height:4.9},bottomBox:{x:6.5,y:11.7,width:4.8,height:4.9}},"bar-harpoon-label-right-left-above-below":{direction:`bar-harpoon-rl`,arrowY:8.55,topBox:{x:6.5,y:1.3,width:4.8,height:4.9},bottomBox:{x:6.5,y:11.7,width:4.8,height:4.9}},"bar-harpoon-label-right-left-above":{direction:`bar-harpoon-rl`,arrowY:11.15,topBox:{x:6.5,y:1.55,width:4.8,height:5.7}},"bar-harpoon-label-right-left-below":{direction:`bar-harpoon-rl`,arrowY:6.6,bottomBox:{x:6.5,y:10.35,width:4.8,height:5.7}},"bar-harpoon-label-left-right-above-below":{direction:`bar-harpoon-lr`,arrowY:8.55,topBox:{x:6.5,y:1.3,width:4.8,height:4.9},bottomBox:{x:6.5,y:11.7,width:4.8,height:4.9}},"bar-arrow-label-right-left-above":{direction:`bar-arrow-rl`,arrowY:11.15,topBox:{x:6.5,y:1.55,width:4.8,height:5.7}},"bar-arrow-label-right-left-above-below":{direction:`bar-arrow-rl`,arrowY:8.55,topBox:{x:6.5,y:1.3,width:4.8,height:4.9},bottomBox:{x:6.5,y:11.7,width:4.8,height:4.9}},"bar-arrow-label-left-right-above":{direction:`bar-arrow-lr`,arrowY:11.15,topBox:{x:6.5,y:1.55,width:4.8,height:5.7}},"bar-arrow-label-left-right-above-below":{direction:`bar-arrow-lr`,arrowY:8.55,topBox:{x:6.5,y:1.3,width:4.8,height:4.9},bottomBox:{x:6.5,y:11.7,width:4.8,height:4.9}}}[e.icon],o=t===`left`?(0,i.jsx)(`path`,{d:`M5.1 ${n-1.55}L2.55 ${n}L5.1 ${n+1.55}M2.95 ${n}H14.9`}):t===`both`?(0,i.jsx)(`path`,{d:`M5.1 ${n-1.55}L2.55 ${n}L5.1 ${n+1.55}M2.95 ${n}H15.05M12.5 ${n-1.55}L15.05 ${n}L12.5 ${n+1.55}`}):t===`harpoon-rl`?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`path`,{d:`M3.1 ${n-1.95}H14.35M12.05 ${n-3.15}L14.55 ${n-1.95}L12.05 ${n-.75}`}),(0,i.jsx)(`path`,{d:`M14.45 ${n+1.65}H3.2M5.45 ${n+.45}L2.95 ${n+1.65}L5.45 ${n+2.85}`})]}):t===`harpoon-lr`?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`path`,{d:`M14.45 ${n-1.95}H3.2M5.45 ${n-3.15}L2.95 ${n-1.95}L5.45 ${n-.75}`}),(0,i.jsx)(`path`,{d:`M3.1 ${n+1.65}H14.35M12.05 ${n+.45}L14.55 ${n+1.65}L12.05 ${n+2.85}`})]}):t===`bar-harpoon-rl`?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`path`,{d:`M4.3 ${n-1.95}H14.1M11.8 ${n-3.15}L14.3 ${n-1.95}L11.8 ${n-.75}`}),(0,i.jsx)(`path`,{d:`M14.2 ${n+1.65}H4.1M6.35 ${n+.45}L3.85 ${n+1.65}L6.35 ${n+2.85}`}),(0,i.jsx)(`line`,{x1:`2.95`,y1:n-1.95,x2:`4.15`,y2:n-1.95}),(0,i.jsx)(`line`,{x1:`14.2`,y1:n+1.65,x2:`15.3`,y2:n+1.65})]}):t===`bar-harpoon-lr`?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`path`,{d:`M14.2 ${n-1.95}H4.1M6.35 ${n-3.15}L3.85 ${n-1.95}L6.35 ${n-.75}`}),(0,i.jsx)(`path`,{d:`M4.3 ${n+1.65}H14.1M11.8 ${n+.45}L14.3 ${n+1.65}L11.8 ${n+2.85}`}),(0,i.jsx)(`line`,{x1:`14.2`,y1:n-1.95,x2:`15.3`,y2:n-1.95}),(0,i.jsx)(`line`,{x1:`2.95`,y1:n+1.65,x2:`4.15`,y2:n+1.65})]}):t===`bar-arrow-rl`?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`path`,{d:`M4.2 ${n-1.95}H14.05M11.75 ${n-3.15}L14.25 ${n-1.95}L11.75 ${n-.75}`}),(0,i.jsx)(`path`,{d:`M14.15 ${n+1.65}H4.25M6.55 ${n+.45}L4.05 ${n+1.65}L6.55 ${n+2.85}`}),(0,i.jsx)(`line`,{x1:`4.05`,y1:n+1.65,x2:`14.15`,y2:n+1.65})]}):t===`bar-arrow-lr`?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`path`,{d:`M14.15 ${n-1.95}H4.25M6.55 ${n-3.15}L4.05 ${n-1.95}L6.55 ${n-.75}`}),(0,i.jsx)(`path`,{d:`M4.2 ${n+1.65}H14.05M11.75 ${n+.45}L14.25 ${n+1.65}L11.75 ${n+2.85}`}),(0,i.jsx)(`line`,{x1:`4.05`,y1:n-1.95,x2:`14.15`,y2:n-1.95})]}):(0,i.jsx)(`path`,{d:`M12.5 ${n-1.55}L15.05 ${n}L12.5 ${n+1.55}M2.95 ${n}H14.65`});return(0,i.jsx)(`span`,{className:`cme-arrow-label-icon`,"aria-hidden":`true`,children:(0,i.jsxs)(`svg`,{className:`cme-arrow-label-svg`,viewBox:`0 0 18 18`,focusable:`false`,"aria-hidden":`true`,children:[r?(0,i.jsx)(`rect`,{...r,rx:`0.45`,className:`cme-arrow-label-placeholder-box`}):null,o,a?(0,i.jsx)(`rect`,{...a,rx:`0.45`,className:`cme-arrow-label-placeholder-box`}):null]})})}if(e.insert===`matrix`||e.insert===`bmatrix`||e.insert===`pmatrix`||e.insert===`vmatrix`){let t=e.insert,n=t===`matrix`?[[2.3,3.1],[7.1,3.1],[11.9,3.1],[2.3,7.25],[7.1,7.25],[11.9,7.25],[2.3,11.4],[7.1,11.4],[11.9,11.4]]:[[5.3,2.95],[10.1,2.95],[5.3,7.1],[10.1,7.1],[5.3,11.25],[10.1,11.25]],r;return t===`bmatrix`?r=(0,i.jsx)(`path`,{d:`M3 1.8H1.95V15.85H3M12.95 1.8H14V15.85H12.95`}):t===`pmatrix`?r=(0,i.jsx)(`path`,{d:`M3.15 1.8C1.85 3.05 1.35 4.75 1.35 8.85C1.35 12.95 1.85 14.65 3.15 15.85M12.85 1.8C14.15 3.05 14.65 4.75 14.65 8.85C14.65 12.95 14.15 14.65 12.85 15.85`}):t===`vmatrix`&&(r=(0,i.jsx)(`path`,{d:`M2.6 1.9V15.75M13.4 1.9V15.75`})),(0,i.jsx)(`span`,{className:`cme-matrix-icon`,"aria-hidden":`true`,children:(0,i.jsxs)(`svg`,{className:`cme-matrix-svg`,viewBox:`0 0 16 18`,focusable:`false`,"aria-hidden":`true`,children:[r,n.map(([e,n],r)=>(0,i.jsx)(`rect`,{x:e,y:n,width:`2.35`,height:`2.9`,rx:`0.28`,className:`cme-matrix-svg-cell`},`${t}-${r}`))]})})}let n={"\\begin{matrix} #? & #? & #? \\end{matrix}":{frame:`none`,cells:[[2.15,7.05],[6.85,7.05],[11.55,7.05]]},"\\begin{bmatrix} #? \\\\ #? \\end{bmatrix}":{frame:`brackets`,cells:[[7.05,3.25],[7.05,10.2]]},"\\begin{bmatrix} #? & #? \\end{bmatrix}":{frame:`brackets`,cells:[[4.85,7.05],[9.25,7.05]]},"\\begin{pmatrix} #? \\\\ #? \\end{pmatrix}":{frame:`parentheses`,cells:[[7.05,3.25],[7.05,10.2]]},"\\begin{pmatrix} #? & #? \\end{pmatrix}":{frame:`parentheses`,cells:[[4.85,7.05],[9.25,7.05]]},"\\begin{bmatrix} #? \\\\ #? \\\\ #? \\end{bmatrix}":{frame:`brackets`,cells:[[7.05,1.9],[7.05,7.05],[7.05,12.2]]},"\\begin{pmatrix} #? \\\\ #? \\\\ #? \\end{pmatrix}":{frame:`parentheses`,cells:[[7.05,1.9],[7.05,7.05],[7.05,12.2]]},"\\begin{matrix} #? \\\\ #? \\\\ #? \\end{matrix}":{frame:`none`,cells:[[7.05,1.9],[7.05,7.05],[7.05,12.2]]}}[e.insert];if(n){let e;return n.frame===`brackets`?e=(0,i.jsx)(`path`,{d:`M2.7 1.4H1.75V16.1H2.7M13.3 1.4H14.25V16.1H13.3`}):n.frame===`parentheses`&&(e=(0,i.jsx)(`path`,{d:`M3 1.4C1.95 2.7 1.55 4.65 1.55 8.75C1.55 12.85 1.95 14.8 3 16.1M13 1.4C14.05 2.7 14.45 4.65 14.45 8.75C14.45 12.85 14.05 14.8 13 16.1`})),(0,i.jsx)(`span`,{className:`cme-matrix-template-icon`,"aria-hidden":`true`,children:(0,i.jsxs)(`svg`,{className:`cme-matrix-template-svg`,viewBox:`0 0 16 18`,focusable:`false`,"aria-hidden":`true`,children:[e,n.cells.map(([e,t],n)=>(0,i.jsx)(`rect`,{x:e,y:t,width:`2.35`,height:`3`,rx:`0.28`,className:`cme-matrix-svg-cell`},`matrix-template-${n}`))]})})}if(e.icon===`superscript-template`||e.icon===`subscript-template`)return(0,i.jsx)(`span`,{className:`cme-script-icon`,"aria-hidden":`true`,children:(0,i.jsx)(`svg`,{className:`cme-script-svg`,viewBox:`0 0 18 18`,focusable:`false`,"aria-hidden":`true`,children:e.icon===`superscript-template`?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`rect`,{x:`3`,y:`7`,width:`6`,height:`8`,rx:`0.5`}),(0,i.jsx)(`rect`,{x:`10`,y:`3`,width:`5`,height:`7`,rx:`0.5`})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`rect`,{x:`3`,y:`3`,width:`6`,height:`8`,rx:`0.5`}),(0,i.jsx)(`rect`,{x:`10`,y:`8`,width:`5`,height:`7`,rx:`0.5`})]})})});if(e.icon===`square-root-template`||e.icon===`nth-root-template`){let t=e.icon===`nth-root-template`;return(0,i.jsx)(`span`,{className:`cme-root-icon`,"aria-hidden":`true`,children:(0,i.jsxs)(`svg`,{className:`cme-root-svg`,width:`48`,height:`32`,viewBox:`0 0 46 32`,focusable:`false`,"aria-hidden":`true`,children:[t?(0,i.jsx)(`rect`,{x:`8`,y:`4`,width:`8`,height:`10`,className:`cme-root-svg-box cme-root-svg-box--small`}):null,(0,i.jsx)(`path`,{d:t?`M10 18 L17 25 L24 4 L46 4`:`M4 18 L11 25 L18 4 L42 4`}),(0,i.jsx)(`rect`,{x:t?`30`:`24`,y:`9`,width:`11`,height:`15`,className:`cme-root-svg-box`})]})})}if(e.icon===`accent-harpoon-right`||e.icon===`accent-arrow-right`||e.icon===`accent-arrow-both`||e.icon===`accent-bar`){let t;return t=e.icon===`accent-bar`?(0,i.jsx)(`line`,{x1:`3.5`,y1:`4.5`,x2:`14.5`,y2:`4.5`}):e.icon===`accent-arrow-both`?(0,i.jsx)(`path`,{d:`M3.3 5.5L5 3.9M3.3 5.5L5 7.1M3.5 5.5H14.5M13 3.9L14.7 5.5L13 7.1`}):e.icon===`accent-harpoon-right`?(0,i.jsx)(`path`,{d:`M3.5 5.5H14.5M12 3.9L14.7 5.5M14 5.5V5`}):(0,i.jsx)(`path`,{d:`M3.5 5.5H14.2M11.8 3.9L14.7 5.5L11.8 7.1`}),(0,i.jsx)(`span`,{className:`cme-accent-icon`,"aria-hidden":`true`,children:(0,i.jsxs)(`svg`,{className:`cme-accent-svg`,viewBox:`0 0 18 18`,focusable:`false`,"aria-hidden":`true`,children:[t,(0,i.jsx)(`rect`,{x:`6.4`,y:`8.6`,width:`5.2`,height:`7`,rx:`0.45`,className:`cme-accent-svg-box`})]})})}if(t.isMathMode||t.isChemMode){let n=[`cme-toolbar-glyph`],r=e.cls||``,a=t.groupId===`roots-main`,o=t.groupId===`relations`,s=t.groupId===`greek`,c=!!t.isChemMode,l=String(e.label||``),u=l.length;if(c){let t=/^(?:[⁰¹²³⁴⁵⁶⁷⁸⁹⁺⁻⁼⁽⁾ⁿⁱ₀₁₂₃₄₅₆₇₈₉₊₋₌₍₎ₐₑₒₓᵢⱼₙ])+$/u.test(String(e.label||``));n.push(`cme-toolbar-glyph--chem`);let i=/^(?:[+-]|[²³][⁺⁻])$/u.test(String(e.label||``));r.includes(`chem-element`)&&n.push(`cme-toolbar-glyph--chem-element`),r.includes(`chem-arrow`)&&n.push(`cme-toolbar-glyph--chem-arrow`),r.includes(`chem-state`)&&n.push(`cme-toolbar-glyph--chem-state`),t&&n.push(`cme-toolbar-glyph--chem-script`),i&&n.push(`cme-toolbar-glyph--chem-charge`)}else a&&n.push(`cme-toolbar-glyph--roots-main`),o&&n.push(`cme-toolbar-glyph--relations`),!a&&!o&&n.push(`cme-toolbar-glyph--math`),s&&n.push(`cme-toolbar-glyph--greek`);return r.includes(`green-template`)&&n.push(`cme-toolbar-glyph--template`),r.includes(`soft-tool`)&&n.push(`cme-toolbar-glyph--tool`),r.includes(`format-tool`)&&n.push(`cme-toolbar-glyph--format`),u>=4&&n.push(`cme-toolbar-glyph--wide`),u>=8&&n.push(`cme-toolbar-glyph--very-wide`),(0,i.jsx)(`span`,{className:n.join(` `),"aria-hidden":`true`,children:r.includes(`green-placeholder-glyph`)||r.includes(`black-glyph-template`)||r.includes(`black-placeholder-glyph`)?Array.from(l).map((e,t)=>e===`□`?(0,i.jsx)(`span`,{className:r.includes(`black-placeholder-glyph`)?`cme-toolbar-placeholder-box-black`:`cme-toolbar-placeholder-box-green`,children:e},`placeholder-${t}`):(0,i.jsx)(`span`,{children:e},`glyph-${t}`)):e.label})}return e.label}function ge({position:e,onInsert:t}){let n=Math.min(Math.max(e.x-6,8),window.innerWidth-348),r=Math.min(e.y+2,window.innerHeight-148),a=e=>e.preview===`rightleft-short-left`?(0,i.jsxs)(`svg`,{width:`22`,height:`18`,viewBox:`0 0 50 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,i.jsx)(`line`,{x1:`10`,y1:`8`,x2:`38`,y2:`8`}),(0,i.jsx)(`polyline`,{points:`30,2 38,8 30,14`}),(0,i.jsx)(`line`,{x1:`34`,y1:`16`,x2:`18`,y2:`16`}),(0,i.jsx)(`polyline`,{points:`26,10 18,16 26,22`})]}):e.preview===`right-short-over-left-long`?(0,i.jsxs)(`svg`,{width:`22`,height:`18`,viewBox:`0 0 50 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,i.jsx)(`line`,{x1:`14`,y1:`8`,x2:`30`,y2:`8`}),(0,i.jsx)(`polyline`,{points:`22,2 30,8 22,14`}),(0,i.jsx)(`line`,{x1:`40`,y1:`16`,x2:`12`,y2:`16`}),(0,i.jsx)(`polyline`,{points:`20,10 12,16 20,22`})]}):(0,i.jsx)(`span`,{"aria-hidden":`true`,style:{fontSize:`18px`,lineHeight:1,fontFamily:`"Cambria Math", "STIX Two Math", "Segoe UI Symbol", "Segoe UI", sans-serif`,whiteSpace:`pre-line`},children:e.label});return(0,i.jsx)(`div`,{className:`cme-arrow-picker-popup`,style:{position:`fixed`,left:`${n}px`,top:`${r}px`,zIndex:1e5},onMouseDown:e=>e.stopPropagation(),children:(0,i.jsx)(`div`,{className:`cme-arrow-picker-grid`,children:y.map(e=>(0,i.jsx)(`button`,{type:`button`,className:`cme-arrow-picker-btn`,title:e.title,onMouseDown:n=>{n.preventDefault(),t(e.insert)},children:a(e)},`${e.insert}-${e.title||e.label}`))})})}function _e({position:e,items:t=[],onInsert:n,popupBounds:r=null,picker:a=``}){let o=a===`trigFunctionExtras`||a===`bracketDelimiterExtras`||a===`enclosureFrameExtras`||a===`strikeDecorationExtras`||a===`arithmeticLayoutExtras`,s=o?2:Math.max(1,Math.min(t.length,5)),c=o?88:30,l=o?34:30,u=o?10:8,d=o?8:6,f=o?18:20,p=o?18:16,m=Math.max(1,Math.ceil(t.length/s)),h=s*c+(s-1)*u+f,g=m*l+(m-1)*d+p,_=r?{left:r.left,top:r.top,right:r.right,bottom:r.bottom}:{left:8,top:8,right:window.innerWidth-8,bottom:window.innerHeight-8},v=_.left+8,y=Math.max(v,_.right-h-8),b=_.top+8,x=Math.max(b,_.bottom-g-8),S=Math.min(Math.max(e.x-6,v),y),C=e.y+2,w=e.y-g-6,T=C<=x?C:Math.max(b,Math.min(w,x));return(0,i.jsx)(`div`,{className:`cme-arrow-picker-popup cme-relation-more-picker-popup`,style:{position:`fixed`,left:`${S}px`,top:`${T}px`,zIndex:1e5},onMouseDown:e=>e.stopPropagation(),children:(0,i.jsx)(`div`,{className:`cme-arrow-picker-grid`,style:{gridTemplateColumns:`repeat(${s}, ${c}px)`,gridAutoRows:`${l}px`,gap:`${d}px ${u}px`},children:t.map(e=>(0,i.jsx)(`button`,{type:`button`,className:`cme-arrow-picker-btn${e.cls?` ${e.cls}`:``}`,title:e.title||e.label,style:{width:`${c}px`,height:`${l}px`,padding:o?`0 8px`:0},onMouseDown:t=>{t.preventDefault(),n(e.insert)},children:he(e,{groupId:`relations`,isMathMode:!0,isChemMode:!1})},`${e.insert}-${e.title||e.label}`))})})}function ve({position:e,onInsert:t}){let n=Math.ceil(b.length/4),r=n*34+(n-1)*4+12,a=Math.min(Math.max(e.x-8,8),Math.max(8,window.innerWidth-220-8)),o=Math.min(e.y+2,Math.max(8,window.innerHeight-r-8));return(0,i.jsx)(`div`,{className:`cme-arrow-label-picker-popup`,style:{position:`fixed`,left:`${a}px`,top:`${o}px`,zIndex:1e5},onMouseDown:e=>e.stopPropagation(),children:(0,i.jsx)(`div`,{className:`cme-arrow-label-picker-grid`,style:{gridTemplateColumns:`repeat(4, 48px)`},children:b.map(e=>(0,i.jsx)(`button`,{type:`button`,className:`cme-arrow-label-picker-btn`,title:e.title,onMouseDown:n=>{n.preventDefault(),t(e.insert)},children:he(e,{groupId:`arrows`,isMathMode:!0,isChemMode:!1})},`${e.icon}-${e.title}`))})})}function ye({position:e,onInsert:t}){let n=Math.min(Math.max(e.x-8,8),window.innerWidth-356),r=Math.min(e.y+2,window.innerHeight-148);return(0,i.jsx)(`div`,{className:`cme-greek-italic-picker-popup`,style:{position:`fixed`,left:`${n}px`,top:`${r}px`,zIndex:1e5},onMouseDown:e=>e.stopPropagation(),children:(0,i.jsx)(`div`,{className:`cme-greek-italic-picker-grid`,children:x.map(e=>(0,i.jsx)(`button`,{type:`button`,className:`cme-greek-italic-picker-btn`,title:e.title,onMouseDown:n=>{n.preventDefault(),t(e.insert)},children:(0,i.jsx)(`span`,{className:`cme-greek-italic-picker-glyph`,"aria-hidden":`true`,children:e.label})},e.label))})})}function be({position:e,onInsert:t}){let n=Math.min(Math.max(e.x-8,8),window.innerWidth-356),r=Math.min(e.y+2,window.innerHeight-308);return(0,i.jsx)(`div`,{className:`cme-blackboard-bold-picker-popup`,style:{position:`fixed`,left:`${n}px`,top:`${r}px`,zIndex:1e5},onMouseDown:e=>e.stopPropagation(),children:(0,i.jsx)(`div`,{className:`cme-blackboard-bold-picker-grid`,children:S.map(e=>(0,i.jsx)(`button`,{type:`button`,className:`cme-blackboard-bold-picker-btn`,title:e.title,onMouseDown:n=>{n.preventDefault(),t(e.insert)},children:(0,i.jsx)(`span`,{className:`cme-blackboard-bold-picker-glyph`,"aria-hidden":`true`,children:e.label})},e.insert))})})}function xe({position:e,onInsert:t}){let n=Math.min(Math.max(e.x-8,8),window.innerWidth-356),r=Math.min(e.y+2,window.innerHeight-348);return(0,i.jsx)(`div`,{className:`cme-fraktur-script-picker-popup`,style:{position:`fixed`,left:`${n}px`,top:`${r}px`,zIndex:1e5},onMouseDown:e=>e.stopPropagation(),children:(0,i.jsx)(`div`,{className:`cme-fraktur-script-picker-grid`,children:C.map(e=>(0,i.jsx)(`button`,{type:`button`,className:`cme-fraktur-script-picker-btn`,title:e.title,onMouseDown:n=>{n.preventDefault(),t(e.insert)},children:(0,i.jsx)(`span`,{className:`cme-fraktur-script-picker-glyph`,"aria-hidden":`true`,children:e.label})},e.insert))})})}function Se({position:e,onInsert:t}){let n=Math.min(Math.max(e.x-8,8),window.innerWidth-248),r=Math.min(e.y+2,window.innerHeight-88);return(0,i.jsx)(`div`,{className:`cme-hebrew-symbol-picker-popup`,style:{position:`fixed`,left:`${n}px`,top:`${r}px`,zIndex:1e5},onMouseDown:e=>e.stopPropagation(),children:(0,i.jsx)(`div`,{className:`cme-hebrew-symbol-picker-grid`,children:w.map(e=>(0,i.jsx)(`button`,{type:`button`,className:`cme-hebrew-symbol-picker-btn`,title:e.title,onMouseDown:n=>{n.preventDefault(),t(e.insert)},children:(0,i.jsx)(`span`,{className:`cme-hebrew-symbol-picker-glyph`,"aria-hidden":`true`,children:e.label})},e.insert))})})}function Ce({position:e,onInsert:t}){let n=Math.min(Math.max(e.x-8,8),window.innerWidth-612),r=Math.min(e.y+2,window.innerHeight-313),a=2*O+Math.floor(D/2),o=5*O+Math.floor(D/2),s=7*O+Math.floor(D/2),c=8*O+Math.floor(D/2),l=3*O;return(0,i.jsx)(`div`,{className:`cme-periodic-table-picker-popup`,style:{position:`fixed`,left:`${n}px`,top:`${r}px`,zIndex:1e5},onMouseDown:e=>e.stopPropagation(),children:(0,i.jsxs)(`div`,{className:`cme-periodic-table-board`,style:{width:`${k}px`,height:`${A}px`},children:[(0,i.jsx)(`div`,{className:`cme-periodic-table-connector cme-periodic-table-connector--vertical`,style:{left:`${a}px`,top:`${o}px`,height:`${c-o}px`}}),(0,i.jsx)(`div`,{className:`cme-periodic-table-connector cme-periodic-table-connector--horizontal`,style:{left:`${a}px`,top:`${s}px`,width:`${l-a}px`}}),(0,i.jsx)(`div`,{className:`cme-periodic-table-connector cme-periodic-table-connector--horizontal`,style:{left:`${a}px`,top:`${c}px`,width:`${l-a}px`}}),j.map(e=>(0,i.jsx)(`button`,{type:`button`,className:`cme-periodic-table-cell cme-periodic-table-cell--${e.tone}`,title:e.title,style:{left:`${(e.col-1)*O}px`,top:`${(e.row-1)*O}px`,width:`${D}px`,height:`${D}px`},onMouseDown:n=>{n.preventDefault(),t(e.insert)},children:e.label},`${e.label}-${e.row}-${e.col}`))]})})}function we({position:e,options:t,value:n,onSelect:r,width:a=132}){let o=Math.min(Math.max(e.x,8),window.innerWidth-a-8),s=Math.max(8,Math.min(e.y+4,window.innerHeight-290));return(0,i.jsx)(`div`,{className:`cme-style-dropdown-popup`,style:{position:`fixed`,left:`${o}px`,top:`${s}px`,width:`${a}px`,zIndex:1e5},onMouseDown:e=>e.stopPropagation(),children:t.map(e=>(0,i.jsx)(`button`,{type:`button`,className:`cme-style-dropdown-option${n===e.value?` active`:``}`,onMouseDown:t=>{t.preventDefault(),r(e.value)},children:e.label},e.value))})}function Te(e){return class extends r.Plugin{init(){let t=this.editor;t.ui.componentFactory.add(`mathType`,()=>{let t=new r.ButtonView;return t.set({label:`Math`,icon:H,tooltip:`Insert Math Formula`}),t.on(`execute`,()=>e(`math`)),t}),t.ui.componentFactory.add(`chemType`,()=>{let t=new r.ButtonView;return t.set({label:`Chemistry`,icon:de,tooltip:`Insert Chemistry Formula`}),t.on(`execute`,()=>e(`chem`)),t})}}}function Ee({matrixType:t,x:n,y:r,onSelect:a,onMouseEnter:o,onMouseLeave:s}){let[c,l]=(0,e.useState)({r:2,c:2}),u={matrix:`Plain Matrix`,bmatrix:`Square Matrix`,pmatrix:`Parenthesis Matrix`,vmatrix:`Vertical Matrix`},d=(0,e.useCallback)((e,t)=>{let n=Number.parseInt(t,10);Number.isNaN(n)||l(t=>({...t,[e]:Math.min(20,Math.max(1,n))}))},[]);return(0,e.useEffect)(()=>{let e=e=>{e.key===`Enter`&&(e.preventDefault(),e.stopPropagation(),a(c.r,c.c))};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[c.r,c.c,a]),(0,i.jsxs)(`div`,{className:`cme-matrix-hover-popover ck-only`,style:{top:`${r}px`,left:`${n}px`},onMouseDown:e=>e.stopPropagation(),onMouseEnter:o,onMouseLeave:s,children:[(0,i.jsxs)(`div`,{className:`cme-matrix-hover-title-wrap`,children:[(0,i.jsx)(`div`,{className:`cme-matrix-hover-title`,children:u[t]||`Matrix`}),(0,i.jsxs)(`div`,{className:`cme-matrix-hover-subtitle`,children:[c.r,` × `,c.c]})]}),(0,i.jsx)(`div`,{className:`cme-matrix-hover-grid`,children:Array.from({length:6}).map((e,t)=>(0,i.jsx)(`div`,{className:`cme-matrix-hover-row`,children:Array.from({length:6}).map((e,n)=>(0,i.jsx)(`div`,{className:`cme-matrix-hover-cell${t<c.r&&n<c.c?` selected`:``}`,onMouseEnter:()=>l({r:t+1,c:n+1}),onClick:e=>{e.preventDefault(),e.stopPropagation(),a(t+1,n+1)}},`${t}-${n}`))},t))}),(0,i.jsxs)(`div`,{className:`cme-matrix-hover-footer`,children:[(0,i.jsxs)(`div`,{className:`cme-matrix-counter`,children:[(0,i.jsx)(`span`,{className:`cme-counter-label`,children:`R`}),(0,i.jsx)(`input`,{type:`number`,min:`1`,max:`20`,value:c.r,className:`cme-counter-input`,onChange:e=>d(`r`,e.target.value),onMouseDown:e=>e.stopPropagation()}),(0,i.jsxs)(`div`,{className:`cme-counter-btns`,children:[(0,i.jsx)(`button`,{type:`button`,onClick:()=>l(e=>({...e,r:Math.min(20,e.r+1)})),children:`+`}),(0,i.jsx)(`button`,{type:`button`,onClick:()=>l(e=>({...e,r:Math.max(1,e.r-1)})),children:`-`})]})]}),(0,i.jsxs)(`div`,{className:`cme-matrix-counter`,children:[(0,i.jsx)(`span`,{className:`cme-counter-label`,children:`C`}),(0,i.jsx)(`input`,{type:`number`,min:`1`,max:`20`,value:c.c,className:`cme-counter-input`,onChange:e=>d(`c`,e.target.value),onMouseDown:e=>e.stopPropagation()}),(0,i.jsxs)(`div`,{className:`cme-counter-btns`,children:[(0,i.jsx)(`button`,{type:`button`,onClick:()=>l(e=>({...e,c:Math.min(20,e.c+1)})),children:`+`}),(0,i.jsx)(`button`,{type:`button`,onClick:()=>l(e=>({...e,c:Math.max(1,e.c-1)})),children:`-`})]})]})]})]})}function G({mode:n,onInsert:r,onClose:a,initialLatex:o,initialDirection:c=`ltr`,isEditing:l}){let u=(0,e.useRef)(null),d=(0,e.useRef)(null),f=(0,e.useRef)(null),p=(0,e.useRef)(null),m=(0,e.useRef)(()=>{}),h=(0,e.useRef)(null),[_,v]=(0,e.useState)(0),[y,b]=(0,e.useState)(null),[x,S]=(0,e.useState)(null),[C,w]=(0,e.useState)(null),[T,E]=(0,e.useState)(null),[D,O]=(0,e.useState)(null),[k,A]=(0,e.useState)(null),[j,N]=(0,e.useState)(null),[P,F]=(0,e.useState)(null),[le,I]=(0,e.useState)(null),[L,R]=(0,e.useState)(null),[z,B]=(0,e.useState)(null),[V,ue]=(0,e.useState)(null),[H,de]=(0,e.useState)(`normal`),[U,W]=(0,e.useState)(null),[me,Te]=(0,e.useState)(!1),[G,De]=(0,e.useState)(c===`rtl`),[K,Oe]=(0,e.useState)(``),[ke,Ae]=(0,e.useState)(``),je=n===`math`?oe:se,q=n===`math`,Me=n===`chem`,J=q||Me,Y=je[_]||{},Ne=q&&Y.id?` cme-symbol-subgroup--tab-${Y.id}`:``,Pe=(0,e.useMemo)(()=>fe.map(e=>({...e,normalized:pe(e.value)||e.value.toLowerCase()})),[]),[X,Fe]=(0,e.useState)({bold:!1,italic:!1,boldItalic:!1,color:`none`,fontOption:``,fontSize:`auto`}),[Z,Ie]=(0,e.useState)(`western`),[Le,Re]=(0,e.useState)(`thin`),ze=(0,e.useCallback)((e,t)=>{let n=d.current,r=n?.offsetWidth||720,i=n?.offsetHeight||384,a=Math.max(12,window.innerWidth-r-12),o=Math.max(12,window.innerHeight-i-12);return{x:Math.min(Math.max(12,e),a),y:Math.min(Math.max(12,t),o)}},[]),Be=(0,e.useCallback)(()=>{m.current(),m.current=()=>{},p.current=null,Te(!1)},[]);(0,e.useEffect)(()=>()=>Be(),[Be]),(0,e.useEffect)(()=>{f.current=U},[U]),(0,e.useEffect)(()=>{H===`minimized`&&(b(null),S(null),w(null),E(null),O(null),A(null),N(null),F(null),I(null),R(null),B(null),ue(null))},[H]),(0,e.useEffect)(()=>{if(H===`maximized`)return;let e=()=>{let e=d.current;if(!e)return;let t=f.current;if(t){let e=ze(t.x,t.y);f.current=e,W(e);return}let n=e.getBoundingClientRect(),r=ze(window.innerWidth-n.width-24,window.innerHeight-n.height-24);f.current=r,W(r)},t=requestAnimationFrame(e),n=d.current,r=t=>{t.target===n&&(t.propertyName!==`width`&&t.propertyName!==`height`||e())};return n?.addEventListener(`transitionend`,r),()=>{cancelAnimationFrame(t),n?.removeEventListener(`transitionend`,r)}},[ze,H]),(0,e.useEffect)(()=>{if(H===`maximized`)return;let e=()=>{let e=f.current;if(!e)return;let t=ze(e.x,e.y);f.current=t,W(t)};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[ze,H]);let Ve=(0,e.useCallback)(e=>{if(H===`maximized`||e.button!==void 0&&e.button!==0||e.target.closest(`.cme-popup-actions`))return;let t=d.current;if(!t)return;e.preventDefault(),Te(!0);let n=t.getBoundingClientRect(),r=f.current||{x:n.left,y:n.top};f.current=r,W(r),p.current={offsetX:e.clientX-n.left,offsetY:e.clientY-n.top};let i=e=>{if(!p.current)return;e.preventDefault();let t=ze(e.clientX-p.current.offsetX,e.clientY-p.current.offsetY);f.current=t,W(t)},a=()=>Be();m.current=()=>{window.removeEventListener(`pointermove`,i),window.removeEventListener(`pointerup`,a)},window.addEventListener(`pointermove`,i),window.addEventListener(`pointerup`,a)},[ze,Be,H]);(0,e.useEffect)(()=>{De(c===`rtl`)},[c]),(0,e.useEffect)(()=>{let e=u.current;if(!e)return;let t=G?`rtl`:`ltr`;e.setAttribute(`dir`,t),e.style.direction=t,e.style.textAlign=G?`right`:`left`,e.style.unicodeBidi=G?`plaintext`:`normal`},[G]);let Q=(0,e.useCallback)(()=>{let e=u.current;if(!(!e||typeof e.queryStyle!=`function`))try{let t=e.queryStyle({variantStyle:`bolditalic`})===`all`,n=t||e.queryStyle({fontSeries:`b`})===`all`||e.queryStyle({variantStyle:`bold`})===`all`,r=t||e.queryStyle({fontShape:`it`})===`all`||e.queryStyle({variantStyle:`italic`})===`all`,i=M.find(({style:t})=>Object.entries(t).every(([t,n])=>e.queryStyle({[t]:n})===`all`))||null,a=ne.find(({value:t})=>e.queryStyle({fontSize:parseInt(t,10)})===`all`)?.value||`auto`,o=pe(K),s=[...new Set(Pe.flatMap(e=>[e.normalized,e.value]).concat(X.color===`none`?[]:[X.color]).concat(o?[o,K.trim()]:[]).filter(Boolean))].find(t=>e.queryStyle({color:t})===`all`),c=s?pe(s)||s:`none`;Fe({bold:n,italic:r,boldItalic:t,fontOption:i?.value||``,fontSize:String(a),color:c})}catch(e){console.warn(`Failed to query active styles:`,e)}},[X.color,Pe,K]),He=(0,e.useCallback)(e=>{let t=u.current;if(!t||typeof t.applyStyle!=`function`)return;let n=!!e.bold,r=!!e.italic,i=n&&r?`bolditalic`:n?`bold`:r?`italic`:`up`;t.applyStyle({variantStyle:i,fontSeries:n?`b`:`m`,fontShape:r?`it`:`n`}),t.applyStyle({color:e.color===`none`?`none`:e.color}),t.applyStyle(te);let a=M.find(({value:t})=>t===e.fontOption);if(a&&t.applyStyle(a.style),e.fontSize!==`auto`){let n=parseInt(e.fontSize,10);t.applyStyle({fontSize:n,size:n})}},[]),Ue=(0,e.useCallback)((e,t)=>{let n=u.current;n&&(n.focus(),He({...X,bold:e,italic:t,boldItalic:e&&t}),requestAnimationFrame(Q))},[X,He,Q]),We=(0,e.useCallback)(e=>{let t=u.current;if(!t||typeof t.applyStyle!=`function`)return!1;let n=e===`none`?`none`:pe(e);if(e!==`none`&&!n)return Ae(`Enter a valid hex code or CSS color name.`),!1;let r=e===`none`?`none`:n;return t.focus(),t.applyStyle({color:r}),Fe(e=>({...e,color:r})),Oe(r===`none`?``:r),Ae(``),requestAnimationFrame(Q),!0},[Q]),Ge=(0,e.useCallback)((e,t)=>{let n=u.current;if(!(!n||typeof n.applyStyle!=`function`)){if(n.focus(),e===`font`){n.applyStyle(te);let e=M.find(e=>e.value===t);e&&n.applyStyle(e.style),Fe(e=>({...e,fontOption:t}))}else{let e=t?parseInt(t,10):`auto`;n.applyStyle({fontSize:e,size:e}),Fe(e=>({...e,fontSize:t||`auto`}))}requestAnimationFrame(Q)}},[Q]);(0,e.useEffect)(()=>{if(!y&&!z&&!V&&!C&&!T&&!D&&!k&&!j&&!P&&!le&&!L)return;let e=e=>{!e.target.closest(`.cme-matrix-hover-popover`)&&!e.target.closest(`.cme-matrix-btn-wrapper`)&&b(null),!e.target.closest(`.cme-color-picker-popup`)&&!e.target.closest(`[title="Text Color"]`)&&B(null),!e.target.closest(`.cme-style-dropdown-popup`)&&!e.target.closest(`.cme-style-select-trigger`)&&ue(null),!e.target.closest(`.cme-arrow-picker-popup`)&&!e.target.closest(`.arrow-picker-tool`)&&w(null),!e.target.closest(`.cme-relation-more-picker-popup`)&&!e.target.closest(`.relation-more-picker-tool`)&&E(null),!e.target.closest(`.cme-arrow-label-picker-popup`)&&!e.target.closest(`.arrow-label-picker-tool`)&&O(null),!e.target.closest(`.cme-greek-italic-picker-popup`)&&!e.target.closest(`.greek-italic-picker-tool`)&&A(null),!e.target.closest(`.cme-blackboard-bold-picker-popup`)&&!e.target.closest(`.blackboard-bold-picker-tool`)&&N(null),!e.target.closest(`.cme-fraktur-script-picker-popup`)&&!e.target.closest(`.fraktur-script-picker-tool`)&&F(null),!e.target.closest(`.cme-hebrew-symbol-picker-popup`)&&!e.target.closest(`.hebrew-symbol-picker-tool`)&&I(null),!e.target.closest(`.cme-periodic-table-picker-popup`)&&!e.target.closest(`.periodic-table-picker-tool`)&&R(null)};return window.addEventListener(`mousedown`,e,!0),window.addEventListener(`pointerdown`,e,!0),()=>{window.removeEventListener(`mousedown`,e,!0),window.removeEventListener(`pointerdown`,e,!0)}},[y,z,V,C,T,D,k,j,P,le,L]),(0,e.useEffect)(()=>{let e=u.current;if(!e)return;e.defaultMode=n===`chem`?`text`:`math`,e.letterShapeStyle=`upright`;let t=()=>{let t=o||``;if(n===`chem`&&t){let e=t.match(/^\\ce\{([\s\S]*)\}$/);e&&(t=e[1])}e.setValue?e.setValue(t,{silenceNotifications:!0}):e.value=t,requestAnimationFrame(()=>e.focus())};customElements.get(`math-field`)?requestAnimationFrame(t):customElements.whenDefined(`math-field`).then(()=>requestAnimationFrame(t))},[n,o]),(0,e.useEffect)(()=>{let e=u.current;if(!e)return;let t=()=>e.getValue?e.getValue():e.value||``,n=()=>{try{if(typeof e.executeCommand==`function`)for(let t of[`moveToMathFieldStart`,`moveToMathfieldStart`,`moveToStart`])try{e.executeCommand(t);return}catch{}}catch{}try{typeof e.setSelectionRange==`function`&&e.setSelectionRange(0,0)}catch{}},r=t=>{typeof e.setValue==`function`?e.setValue(t):e.value=t,requestAnimationFrame(()=>{e.focus?.(),n(),Q()})},i=n=>{let i=n.key.length===1&&n.key!==` `&&!n.ctrlKey&&!n.metaKey&&!n.altKey,a=/^\d$/.test(n.key)&&!n.ctrlKey&&!n.metaKey&&!n.altKey;if(Le===`negativeThin`&&i){n.preventDefault();let i=Z!==`western`&&a?ee(n.key,Z):n.key;G?r(`\\!${i}${t()}`):e.executeCommand([`insert`,`\\!${i}`]);return}if(Z!==`western`&&a){n.preventDefault();let i=ee(n.key,Z);G?r(`${i}${t()}`):e.executeCommand([`insert`,i]);return}if(n.key===` `){n.preventDefault();let i=Le===`negativeThin`?`\\!`:`\\, `;G?r(`${i}${t()}`):e.executeCommand([`insert`,i]);return}else if(n.key===`Enter`){n.preventDefault(),G?r(`\\\\${t()}`):e.executeCommand([`insert`,`\\\\`]),setTimeout(()=>{He(X),Q()},10);return}if(G&&n.key===`Backspace`){n.preventDefault(),r(t().slice(1));return}G&&i&&(n.preventDefault(),r(`${n.key}${t()}`))};return e.addEventListener(`keydown`,i),()=>e.removeEventListener(`keydown`,i)},[n,X,He,Q,G,Z,Le]),(0,e.useEffect)(()=>{let e=u.current;if(!e)return;let t=()=>{setTimeout(()=>{let t=e.shadowRoot;if(!t)return;let n=t.querySelector(`.ML__caret`)||t.querySelector(`[class*="caret"]`);n&&n.scrollIntoView({behavior:`auto`,block:`nearest`,inline:`nearest`}),Q()},0)};return e.addEventListener(`selection-change`,t),e.addEventListener(`input`,t),e.addEventListener(`keydown`,t),setTimeout(Q,50),()=>{e.removeEventListener(`selection-change`,t),e.removeEventListener(`input`,t),e.removeEventListener(`keydown`,t)}},[Q]);let $=(0,e.useCallback)(e=>{let t=u.current;if(!t)return;let n=/#(?:0|\?)/.test(e);t.focus(),typeof t.insert==`function`?t.insert(e,{format:`latex`,insertionMode:`replaceSelection`,selectionMode:n?`placeholder`:`after`}):t.executeCommand([`insert`,e]),requestAnimationFrame(()=>t.focus?.())},[]),Ke=(0,e.useCallback)(e=>{let t=u.current;if(t){if(t.focus(),e===`\\hphantom{0}`){t.executeCommand([`insert`,`\\hphantom{0}`]);return}if(e===`\\,`){Re(`thin`),t.executeCommand([`insert`,`\\,`]);return}e===`\\!`&&(Re(`negativeThin`),t.executeCommand([`insert`,`\\!`]))}},[]),qe=(0,e.useCallback)(e=>{let t=u.current,n=re[e];if(!t||!n)return;let r=t.selection||t.model?.selection;if(!(r&&Array.isArray(r.ranges)&&r.ranges.length>0&&r.ranges.some(([e,t])=>e!==t))){h.current=null;return}if(t.focus(),`selection`in t)try{t.selection=r}catch{}let i=typeof t.getValue==`function`?t.getValue(r,`latex`)||``:t.model?.getValue?.(r,`latex`)||``;if(!i){h.current=null;return}let a=ie(i),o=h.current,s=a.baseLatex,c=o?.baseLatex===s,l=c?o.offsetX:a.offsetX,d=c?o.offsetY:a.offsetY,f=l+n.x,p=d+n.y,m=ae(s,f,p);if(h.current={baseLatex:s,offsetX:f,offsetY:p},typeof t.insert==`function`){t.insert(m,{format:`latex`,insertionMode:`replaceSelection`,selectionMode:`item`});return}t.executeCommand([`insert`,m])},[]),Je=(0,e.useCallback)((e,t,n)=>{let r=`\\begin{${e}} `;for(let e=0;e<t;e++){for(let e=0;e<n;e++)r+=`#?`,e<n-1&&(r+=` & `);e<t-1&&(r+=` \\\\ `)}r+=` \\end{${e}}`,$(r)},[$]),Ye=()=>{let e=u.current;if(!e)return;let t=e.getValue?e.getValue():e.value;if(!t||t.trim()===``){a();return}n===`chem`&&(t=ce(t)),r(t,{direction:G?`rtl`:`ltr`}),e.setValue?e.setValue(``):e.value=``,a()},Xe=H!==`maximized`&&U?{left:`${U.x}px`,top:`${U.y}px`,right:`auto`,bottom:`auto`}:void 0;return(0,i.jsxs)(`div`,{ref:d,className:`cme-editor-popup ${H}${me?` dragging`:``}`,style:Xe,onMouseDown:e=>e.stopPropagation(),children:[(0,i.jsxs)(`div`,{className:`cme-popup-header`,onPointerDown:Ve,children:[(0,i.jsx)(`span`,{children:n===`math`?`MathType`:`ChemType`}),(0,i.jsxs)(`div`,{className:`cme-popup-actions`,onPointerDown:e=>e.stopPropagation(),children:[(0,i.jsx)(`button`,{type:`button`,className:`cme-popup-window-btn`,"aria-label":H===`minimized`?`Restore window`:`Minimize window`,onClick:()=>de(e=>e===`minimized`?`normal`:`minimized`),children:H===`minimized`?`+`:`-`}),(0,i.jsx)(`button`,{type:`button`,className:`cme-popup-window-btn`,"aria-label":H===`maximized`?`Restore window`:`Maximize window`,onClick:()=>de(e=>e===`maximized`?`normal`:`maximized`),children:H===`maximized`?`o`:`⤢ `}),(0,i.jsx)(`button`,{type:`button`,className:`cme-popup-close`,onClick:()=>{Be(),a()},children:`x`})]})]}),(0,i.jsxs)(`div`,{className:`cme-toolbar`,role:`toolbar`,"aria-label":`Symbol palette`,children:[(0,i.jsx)(`div`,{className:`cme-toolbar-groups`,children:je.map((e,t)=>(0,i.jsx)(`button`,{className:`cme-group-tab${J?` cme-group-tab--popup`:``}${q?` cme-group-tab--math`:``}${Me?` cme-group-tab--chem`:``}${_===t?` active`:``}`,type:`button`,onClick:()=>{v(t),b(null)},children:(0,i.jsx)(`span`,{className:`cme-group-tab-label`,children:e.label})},e.id||t))}),(0,i.jsx)(`div`,{className:`cme-toolbar-items${_===0&&q?` cme-toolbar-items--first-tab`:``}${Y.id===`greek`?` cme-toolbar-items--greek`:``}${Y.id===`relations`?` cme-toolbar-items--relations`:``}${Y.id===`arrows`?` cme-toolbar-items--arrows`:``}${Y.id===`brackets`?` cme-toolbar-items--brackets`:``}${Y.id===`matrix`?` cme-toolbar-items--matrix`:``}${J?` cme-toolbar-items--popup-compact`:``}`,children:(()=>{let e=Y.items||[];if(Y.id===`greek`){let t=e.reduce((e,t)=>{let n=t.category||`Greek Letters`;return e[n]||(e[n]=[]),e[n].push(t),e},{}),n={"Lowercase Greek Letters":{cols:10,rows:3},"Greek Letter Picker":{cols:1,rows:3},"Blackboard Bold / Number Sets":{cols:2,rows:3},"Blackboard Bold Picker":{cols:1,rows:3},"Fraktur Symbols":{cols:1,rows:3},"Script Symbols":{cols:1,rows:3},"Fraktur / Script Picker":{cols:1,rows:3},"Hebrew Mathematical Symbols":{cols:1,rows:3},"Hebrew Symbol Picker":{cols:1,rows:3},"Arabic-Indic Numeral Systems":{cols:1,rows:3},"Periodic Table Symbols":{cols:2,rows:3},"Periodic Table Picker":{cols:1,rows:3}},r=Object.entries(t);return(0,i.jsx)(`div`,{className:`cme-greek-panel`,children:r.map(([e,t],a)=>{let o=n[e]||{cols:2,rows:Math.max(1,Math.ceil(t.length/2))},s=o.cols,c=o.rows,l=t.every(e=>e.cls?.includes(`arrow-picker-tool`)),d=r[a+1]?.[1]||[],f=d.length>0&&d.every(e=>e.cls?.includes(`arrow-picker-tool`));return(0,i.jsx)(`section`,{className:`cme-symbol-subgroup cme-greek-subgroup${e===`Fraktur Symbols`?` cme-greek-subgroup--no-right-border`:``}${l?` cme-greek-subgroup--picker`:``}${f?` cme-greek-subgroup--before-picker`:``}${J?` cme-symbol-subgroup--compact`:``}${Ne}`,style:{gridTemplateColumns:`repeat(${s}, auto)`,gridTemplateRows:`repeat(${c}, auto)`,"--cme-greek-rows":`repeat(${c}, auto)`},children:t.map((t,n)=>{let r=Y,a=`${r.id||r.label||_}-${e}-${n}-${t.insert||t.action||t.label}`,o=t.action===`GREEK_ITALIC_PICKER`,s=t.action===`BLACKBOARD_BOLD_PICKER`,c=t.action===`FRAKTUR_SCRIPT_PICKER`,l=t.action===`HEBREW_SYMBOL_PICKER`,d=t.action===`PERIODIC_TABLE_PICKER`,f=t.action===`ARABIC_INDIC_NUMERALS`,p=t.action===`EASTERN_ARABIC_INDIC_NUMERALS`,m=o?!!k:s?!!j:c?!!P:l?!!le:d?!!L:f?Z===`arabicIndic`:p?Z===`easternArabicIndic`:!1;return(0,i.jsx)(`button`,{type:`button`,className:`cme-btn cme-greek-btn${J?` cme-btn--compact`:``}${t.cls?` ${t.cls}`:``}${m?` active`:``}`,title:t.title||t.insert,onMouseDown:e=>{if(e.preventDefault(),t.action===`GREEK_ITALIC_PICKER`){let t=e.currentTarget.getBoundingClientRect();w(null),O(null),B(null),S(null),N(null),F(null),I(null),R(null),A(e=>e?null:{x:t.left,y:t.bottom+4});return}if(t.action===`BLACKBOARD_BOLD_PICKER`){let t=e.currentTarget.getBoundingClientRect();w(null),O(null),B(null),S(null),A(null),F(null),I(null),R(null),N(e=>e?null:{x:t.left,y:t.bottom+4});return}if(t.action===`FRAKTUR_SCRIPT_PICKER`){let t=e.currentTarget.getBoundingClientRect();w(null),O(null),B(null),S(null),A(null),N(null),I(null),R(null),F(e=>e?null:{x:t.left,y:t.bottom+4});return}if(t.action===`HEBREW_SYMBOL_PICKER`){let t=e.currentTarget.getBoundingClientRect();w(null),O(null),B(null),S(null),A(null),N(null),F(null),R(null),I(e=>e?null:{x:t.left,y:t.bottom+4});return}if(t.action===`PERIODIC_TABLE_PICKER`){let t=e.currentTarget.getBoundingClientRect();w(null),O(null),B(null),S(null),A(null),N(null),F(null),I(null),R(e=>e?null:{x:t.left,y:t.bottom+4});return}if(t.action===`ARABIC_INDIC_NUMERALS`){w(null),O(null),B(null),S(null),A(null),N(null),F(null),I(null),R(null),Ie(e=>e===`arabicIndic`?`western`:`arabicIndic`),requestAnimationFrame(()=>u.current?.focus?.());return}if(t.action===`EASTERN_ARABIC_INDIC_NUMERALS`){w(null),O(null),B(null),S(null),A(null),N(null),F(null),I(null),R(null),Ie(e=>e===`easternArabicIndic`?`western`:`easternArabicIndic`),requestAnimationFrame(()=>u.current?.focus?.());return}$(t.insert)},children:he(t,{groupId:r.id,isMathMode:q,isChemMode:Me})},a)})},e)})})}let t=e.some(e=>e.type===`sep`),n=[];if(t){let t={cols:2,items:[]};for(let r of e)r.type===`sep`?(t.items.length>0&&n.push(t),t={cols:r.cols||2,items:[]}):t.items.push(r);if(t.items.length>0&&n.push(t),Y.id===`relations`&&(n=n.map(e=>({...e,cols:Math.max(1,Math.ceil(e.items.length/3))}))),Y.id===`roots-main`){let[e=[],t=[],r=[],i=[],a=[],o=[],s=[],c=[],l=[],u=[]]=n.map(e=>e.items||[]),d=(e,t)=>t.map(t=>e[t]).filter(Boolean);n=[{cols:2,rows:2,flow:`row`,equalColumns:!0,className:` cme-roots-main-subgroup`,items:d(e,[0,2,1,3])},{cols:1,rows:2,flow:`row`,equalColumns:!0,className:` cme-roots-main-subgroup cme-roots-main-subgroup--stack`,items:d(t,[0,1])},{cols:2,rows:2,flow:`row`,equalColumns:!0,className:` cme-roots-main-subgroup`,items:d(r,[0,2,1,3])},{cols:2,rows:3,flow:`row`,equalColumns:!0,className:` cme-roots-main-subgroup`,items:d(i,[0,4,2,5,1,3])},{cols:2,rows:3,flow:`row`,equalColumns:!0,className:` cme-roots-main-subgroup`,items:d(a,[0,1,5,4,3,2])},{cols:1,rows:2,flow:`row`,equalColumns:!0,className:` cme-roots-main-subgroup cme-roots-main-subgroup--stack`,items:[]},{cols:1,rows:3,flow:`row`,equalColumns:!0,className:` cme-roots-main-subgroup cme-roots-main-subgroup--stack`,items:d(o,[0,1,2])},{cols:2,rows:3,flow:`row`,equalColumns:!0,className:` cme-roots-main-subgroup`,items:d(s,[1,3,0,4,2,5])},{cols:2,rows:3,flow:`row`,equalColumns:!0,className:` cme-roots-main-subgroup cme-roots-main-subgroup--format`,items:d(c,[0,5,1,3,2,4])},{cols:1,rows:1,flow:`row`,equalColumns:!0,className:` cme-roots-main-subgroup cme-roots-main-subgroup--stack`,items:d(l,[0])},{cols:1,rows:2,flow:`row`,equalColumns:!0,className:` cme-roots-main-subgroup cme-roots-main-subgroup--dropdown`,items:d(u,[0,1])}].filter(e=>e.items.length>0)}if(Y.id===`arrows`){let[e=[],t=[],r=[],i=[],a=[]]=n.map(e=>e.items||[]),o=(e,t)=>t.map(t=>e[t]).filter(Boolean),s=e=>({regular:e.filter(e=>e?.action!==`ARROW_PICKER`&&e?.action!==`ARROW_LABEL_PICKER`),picker:e.find(e=>e?.action===`ARROW_PICKER`||e?.action===`ARROW_LABEL_PICKER`)||null}),c=s(e),l=s(i);n=[{cols:3,trackCols:6,rows:3,flow:`row`,equalColumns:!0,className:` cme-arrows-subgroup cme-arrows-subgroup--before-picker`,items:o(c.regular,[1,0,2,4,3,5,6,7])},c.picker?{cols:1,rows:3,flow:`row`,equalColumns:!0,className:` cme-arrows-subgroup cme-arrows-subgroup--picker`,items:[c.picker]}:null,{cols:2,trackCols:2,rows:3,flow:`row`,equalColumns:!0,className:` cme-arrows-subgroup`,items:o(t,[0,1,2,3,4])},{cols:1,rows:3,flow:`row`,equalColumns:!0,className:` cme-arrows-subgroup cme-arrows-subgroup--stack`,items:o(r,[0,1,2])},{cols:3,rows:2,flow:`row`,equalColumns:!0,className:` cme-arrows-subgroup cme-arrows-subgroup--before-picker`,items:o(l.regular,[0,2,4,1,3,5])},l.picker?{cols:1,rows:2,flow:`row`,equalColumns:!0,className:` cme-arrows-subgroup cme-arrows-subgroup--picker`,items:[l.picker]}:null,{cols:2,trackCols:2,rows:2,flow:`row`,equalColumns:!0,stretchLastRow:!0,className:` cme-arrows-subgroup`,items:o(a,[0,1,2,3])}].filter(e=>e&&e.items.length>0)}if(Y.id===`brackets`){let[e=[],t=[],r=[],i=[],a=[]]=n.map(e=>e.items||[]),o=(e,t)=>t.map(t=>e[t]).filter(Boolean),s=e=>({regular:e.filter(e=>e?.action!==`RELATION_MORE_PICKER`),picker:e.find(e=>e?.action===`RELATION_MORE_PICKER`)||null}),c=s(e),l=s(i),u=s(a),d=o(r,[0,1,2,3,4,5,6,7]);d[6]&&={...d[6],gridColumn:`2`},n=[{cols:3,rows:2,flow:`row`,equalColumns:!0,className:` cme-brackets-subgroup cme-brackets-subgroup--before-picker`,items:o(c.regular,[0,2,4,1,3,5])},c.picker?{cols:1,rows:2,flow:`row`,equalColumns:!0,className:` cme-brackets-subgroup cme-brackets-subgroup--picker`,items:[c.picker]}:null,{cols:2,rows:2,flow:`row`,equalColumns:!0,className:` cme-brackets-subgroup`,items:o(t,[0,2,1,3])},{cols:3,rows:3,flow:`row`,equalColumns:!0,className:` cme-brackets-subgroup`,items:d},{cols:3,rows:2,flow:`row`,equalColumns:!0,className:` cme-brackets-subgroup cme-brackets-subgroup--before-picker`,items:o(l.regular,[0,2,4,1,3,5])},l.picker?{cols:1,rows:2,flow:`row`,equalColumns:!0,className:` cme-brackets-subgroup cme-brackets-subgroup--picker`,items:[l.picker]}:null,{cols:2,rows:2,flow:`row`,equalColumns:!0,className:` cme-brackets-subgroup cme-brackets-subgroup--before-picker`,items:o(u.regular,[0,2,1,3])},u.picker?{cols:1,rows:2,flow:`row`,equalColumns:!0,className:` cme-brackets-subgroup cme-brackets-subgroup--picker`,items:[u.picker]}:null].filter(e=>e&&e.items.length>0)}}else for(let t=0;t<e.length;t+=4)n.push({cols:2,items:e.slice(t,t+4)});return n.map((e,t)=>{let n=e.cols||1,r=e.trackCols||n,a=e.items.length,o=n>0?a%n:0,s=o===0?n:o,c=a-s,l=Math.max(1,Math.floor(r/n));return(0,i.jsx)(`div`,{className:`cme-symbol-subgroup${e.className||``}${J?` cme-symbol-subgroup--compact`:``}${Ne}`,style:{gridTemplateColumns:`repeat(${r}, ${e.equalColumns?`minmax(0, 1fr)`:`auto`})`,gridTemplateRows:`repeat(${e.rows||Math.ceil(e.items.length/n)}, auto)`,gridAutoFlow:e.flow||`column`,...e.rows?{"--cme-subgroup-rows":`repeat(${e.rows}, minmax(0, 1fr))`}:{}},children:e.items.map((o,d)=>{let f=e.stretchLastRow&&a>0&&d>=c&&s<n?`span ${Math.max(1,Math.floor(r/s))}`:l>1?`span ${l}`:void 0,p=Y,m=p.id||p.label||_,h=`${m}-${t*4+d}-${o.insert||o.action||o.label}`;if(o.type===`dropdown`){let t=o.label===`Font...`,n=o.label===`Size`,r=t&&X.fontOption!==``,a=n&&X.fontSize!==`auto`&&X.fontSize!==`5`,s=t?X.fontOption:n?X.fontSize===`auto`||X.fontSize===`5`?``:X.fontSize:``,c=(t?M:ne).find(e=>e.value===s)?.label||o.label,l=V?.buttonKey===h;return(0,i.jsx)(`button`,{type:`button`,className:`cme-style-select-trigger cme-select cme-btn template${r||a||l?` active`:``}`,title:o.label,style:{width:o.width||`60px`,boxSizing:`border-box`,margin:`2px 0`,gridColumn:o.gridColumn||f||(e.cols===3||e.cols===1?`span 1`:`span 2`),gridRow:o.gridRow},onMouseDown:e=>{e.preventDefault(),e.stopPropagation();let n=e.currentTarget.getBoundingClientRect();ue(e=>e?.buttonKey===h?null:{x:n.left,y:n.bottom,type:t?`font`:`size`,buttonKey:h})},children:c},d)}if(p.isMatrix&&!o.directInsert&&!o.action)return(0,i.jsx)(`div`,{className:`cme-matrix-btn-wrapper`,children:(0,i.jsx)(`button`,{type:`button`,className:`cme-btn template${J?` cme-btn--compact`:``}${o.cls?` ${o.cls}`:``}${y?.type===o.insert?` active`:``}`,title:o.insert,onMouseDown:e=>{if(e.preventDefault(),e.stopPropagation(),y?.type===o.insert)b(null);else{let t=e.currentTarget.getBoundingClientRect();b({type:o.insert,x:t.left+t.width/2,y:t.bottom})}},children:he(o,{groupId:p.id,isMathMode:q,isChemMode:Me})})},d);let g=o.action===`BOLD`,v=o.action===`ITALIC`,x=o.action===`BOLD_ITALIC`,k=o.action===`TEXT_COLOR`,te=o.action===`TOGGLE_RTL`,re=o.action===`ARROW_PICKER`,ie=o.action===`RELATION_MORE_PICKER`,ae=o.action===`ARROW_LABEL_PICKER`,oe=o.action===`BLACKBOARD_BOLD_PICKER`,se=o.action===`FRAKTUR_SCRIPT_PICKER`,ce=o.action===`HEBREW_SYMBOL_PICKER`,z=o.action===`PERIODIC_TABLE_PICKER`,H=g&&X.bold&&!X.italic||v&&X.italic&&!X.bold||x&&X.boldItalic||te&&G||re&&!!C||ie&&T?.picker===o.picker||ae&&!!D||oe&&!!j||se&&!!P||ce&&!!le||z&&!!L||k&&X.color!==`none`;return(0,i.jsx)(`button`,{type:`button`,className:`cme-btn${p.isTemplate?` template`:``}${J?` cme-btn--compact`:``}${o.cls?` ${o.cls}`:``}${H?` active`:``}`,title:o.title||o.insert,style:o.gridColumn||o.gridRow||f?{gridColumn:o.gridColumn||f,gridRow:o.gridRow}:void 0,onMouseDown:e=>{e.preventDefault();let t=u.current;if(o.action===`SPECIAL_CHARS`){let t=e.currentTarget.getBoundingClientRect();w(null),E(null),O(null),A(null),N(null),F(null),I(null),R(null),B(null),S({x:t.left,y:t.bottom+4})}else if(o.action===`ARROW_PICKER`){let t=e.currentTarget.getBoundingClientRect();S(null),E(null),O(null),A(null),N(null),F(null),I(null),R(null),B(null),w(e=>e?null:{x:t.left,y:t.bottom+4})}else if(o.action===`RELATION_MORE_PICKER`){let t=e.currentTarget.getBoundingClientRect();S(null),w(null),O(null),A(null),N(null),F(null),I(null),R(null),B(null),E(e=>e?.picker===o.picker?null:{x:t.left,y:t.bottom+4,picker:o.picker})}else if(o.action===`ARROW_LABEL_PICKER`){let t=e.currentTarget.getBoundingClientRect();S(null),w(null),E(null),A(null),N(null),F(null),I(null),R(null),B(null),O(e=>e?null:{x:t.left,y:t.bottom+4})}else if(o.action===`BLACKBOARD_BOLD_PICKER`){let t=e.currentTarget.getBoundingClientRect();S(null),w(null),O(null),B(null),E(null),A(null),F(null),I(null),R(null),N(e=>e?null:{x:t.left,y:t.bottom+4})}else if(o.action===`FRAKTUR_SCRIPT_PICKER`){let t=e.currentTarget.getBoundingClientRect();S(null),w(null),O(null),B(null),E(null),A(null),N(null),I(null),R(null),F(e=>e?null:{x:t.left,y:t.bottom+4})}else if(o.action===`HEBREW_SYMBOL_PICKER`){let t=e.currentTarget.getBoundingClientRect();S(null),w(null),O(null),B(null),E(null),A(null),N(null),F(null),R(null),I(e=>e?null:{x:t.left,y:t.bottom+4})}else if(o.action===`PERIODIC_TABLE_PICKER`){let t=e.currentTarget.getBoundingClientRect();S(null),w(null),O(null),B(null),E(null),A(null),N(null),F(null),I(null),R(e=>e?null:{x:t.left,y:t.bottom+4})}else if(o.action===`TEXT_COLOR`){let t=e.currentTarget.getBoundingClientRect();w(null),E(null),O(null),A(null),N(null),F(null),I(null),R(null),Oe(X.color===`none`?``:X.color),Ae(``),B({x:t.left,y:t.bottom+4})}else if(o.action===`TOGGLE_RTL`)De(e=>!e),requestAnimationFrame(()=>u.current?.focus?.());else if(o.action===`BOLD`)Ue(!X.bold,X.italic);else if(o.action===`BOLD_ITALIC`){let e=!X.boldItalic;Ue(e,e)}else if(o.action===`CUT`){let e=t?t.getValue?t.getValue():t.value||``:``;e&&navigator.clipboard?.writeText&&navigator.clipboard.writeText(e).catch(()=>{}),t&&(typeof t.setValue==`function`?t.setValue(``):t.value=``,t.focus?.())}else if(o.action===`COPY`){let e=t?t.getValue?t.getValue():t.value||``:``;e&&navigator.clipboard?.writeText&&navigator.clipboard.writeText(e).catch(()=>{})}else o.action===`PASTE`?navigator.clipboard?.readText&&navigator.clipboard.readText().then(e=>{e&&$(ee(e,Z))}).catch(()=>{}):o.action===`ARABIC_INDIC_NUMERALS`?(Ie(e=>e===`arabicIndic`?`western`:`arabicIndic`),requestAnimationFrame(()=>u.current?.focus?.())):o.action===`EASTERN_ARABIC_INDIC_NUMERALS`?(Ie(e=>e===`easternArabicIndic`?`western`:`easternArabicIndic`),requestAnimationFrame(()=>u.current?.focus?.())):o.action===`MOVE_TEXT_UP`?qe(`up`):o.action===`MOVE_TEXT_RIGHT`?qe(`right`):o.action===`MOVE_TEXT_LEFT`?qe(`left`):o.action===`MOVE_TEXT_DOWN`?qe(`down`):o.action===`BLACKBOARD`?$(`\\mathbb{#0}`):o.action===`GREEK`?$(`\\Omega`):o.action===`TILDE`?$(`\\widetilde{#0}`):o.action===`ITALIC`?Ue(X.bold,!X.italic):o.action===`TEXT`?$(`\\text{#0}`):o.action===`UNDO`?u.current?.executeCommand(`undo`):o.action===`REDO`?u.current?.executeCommand(`redo`):o.action===`CLEAR`?t&&(typeof t.setValue==`function`?t.setValue(``):t.value=``,t.focus?.()):o.insert===`\\hphantom{0}`||o.insert===`\\,`||o.insert===`\\!`?Ke(o.insert):$(o.insert)},children:he(o,{groupId:p.id,isMathMode:q,isChemMode:Me})},`${m}-${t*4+d}`)})},t)})})()})]}),(0,i.jsx)(`div`,{className:`cme-mathfield-container${G?` cme-mathfield-container--rtl`:``}`,onMouseDown:e=>{u.current&&(e.target===u.current||u.current.contains(e.target))||(e.preventDefault(),requestAnimationFrame(()=>{u.current?.focus?.()}))},children:(0,i.jsx)(`math-field`,{ref:u,class:`cme-mathfield${G?` cme-mathfield--rtl`:``}`,dir:G?`rtl`:`ltr`,"letter-shape-style":`upright`,tabIndex:0,"math-virtual-keyboard-policy":`manual`,placeholder:``})}),(0,i.jsxs)(`div`,{className:`cme-popup-footer`,children:[(0,i.jsx)(`button`,{type:`button`,className:`cme-insert-btn`,onClick:Ye,children:l?`Update`:`Insert`}),(0,i.jsx)(`button`,{type:`button`,className:`cme-cancel-btn`,onClick:a,children:`Cancel`})]}),y&&(0,i.jsx)(Ee,{matrixType:y.type,x:y.x,y:y.y,onSelect:(e,t)=>{Je(y.type,e,t),b(null)},onMouseEnter:()=>{},onMouseLeave:()=>{}}),x&&(0,t.createPortal)((0,i.jsx)(s,{isOpen:!!x,position:x,onClose:()=>S(null),onInsert:e=>{$(e),S(null)}}),document.body),C&&(0,t.createPortal)((0,i.jsx)(ge,{position:C,onInsert:e=>{$(e),w(null)}}),document.body),T&&(0,t.createPortal)((0,i.jsx)(_e,{position:T,picker:T.picker,popupBounds:d.current?.getBoundingClientRect?.()||null,items:g[T.picker]||[],onInsert:e=>{$(e),E(null)}}),document.body),D&&(0,t.createPortal)((0,i.jsx)(ve,{position:D,onInsert:e=>{$(e),O(null)}}),document.body),k&&(0,t.createPortal)((0,i.jsx)(ye,{position:k,onInsert:e=>{$(e),A(null)}}),document.body),j&&(0,t.createPortal)((0,i.jsx)(be,{position:j,onInsert:e=>{$(e),N(null)}}),document.body),P&&(0,t.createPortal)((0,i.jsx)(xe,{position:P,onInsert:e=>{$(e),F(null)}}),document.body),le&&(0,t.createPortal)((0,i.jsx)(Se,{position:le,onInsert:e=>{$(e),I(null)}}),document.body),L&&(0,t.createPortal)((0,i.jsx)(Ce,{position:L,onInsert:e=>{$(e),R(null)}}),document.body),V&&(0,t.createPortal)((0,i.jsx)(we,{position:V,options:V.type===`font`?M:ne,value:V.type===`font`?X.fontOption:X.fontSize,width:V.type===`font`?142:96,onSelect:e=>{Ge(V.type,e),ue(null)}}),document.body),z&&(0,t.createPortal)((0,i.jsxs)(`div`,{className:`cme-color-picker-popup`,style:{position:`fixed`,left:Math.min(z.x,window.innerWidth-260)+`px`,top:Math.min(z.y,window.innerHeight-235)+`px`,zIndex:1e5,width:`244px`,background:`linear-gradient(180deg, #ffffff 0%, #f6fafc 100%)`,border:`1px solid #c8d4dc`,padding:`12px`,display:`flex`,flexDirection:`column`,gap:`10px`,borderRadius:`10px`,boxShadow:`0 16px 28px rgba(15, 23, 42, 0.18), 0 2px 6px rgba(15, 23, 42, 0.08)`},children:[(0,i.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:`10px`},children:[(0,i.jsxs)(`div`,{children:[(0,i.jsx)(`div`,{style:{fontSize:`12px`,fontWeight:700,color:`#1f2f37`,lineHeight:1.1},children:`Text Color`}),(0,i.jsx)(`div`,{style:{fontSize:`10px`,color:`#667b88`,marginTop:`2px`},children:`Pick a swatch or enter a custom value`})]}),(0,i.jsx)(`div`,{style:{width:`28px`,height:`28px`,borderRadius:`8px`,border:`1px solid #b8c8d2`,background:X.color===`none`?`linear-gradient(135deg, #ffffff 0%, #eef3f7 100%)`:pe(K)||X.color,boxShadow:`inset 0 1px 0 rgba(255,255,255,0.8)`},title:X.color===`none`?`No color selected`:X.color})]}),(0,i.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(6, 1fr)`,gap:`6px`,padding:`8px`,border:`1px solid #d7e1e8`,borderRadius:`8px`,background:`rgba(255,255,255,0.78)`},children:Pe.map(e=>{let t=X.color===e.normalized;return(0,i.jsx)(`div`,{title:e.label,style:{width:`22px`,height:`22px`,backgroundColor:e.value,cursor:`pointer`,border:t?`2px solid #d6a528`:`1px solid rgba(31, 47, 55, 0.22)`,borderRadius:`6px`,boxSizing:`border-box`,boxShadow:t?`0 0 0 2px rgba(214, 165, 40, 0.16)`:`inset 0 1px 0 rgba(255,255,255,0.6)`},onMouseDown:t=>{t.preventDefault(),t.stopPropagation(),We(e.normalized)&&B(null)}},e.normalized)})}),(0,i.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`6px`},children:[(0,i.jsx)(`div`,{style:{fontSize:`10px`,fontWeight:700,color:`#5f7481`,letterSpacing:`0.04em`,textTransform:`uppercase`},children:`Custom Value`}),(0,i.jsx)(`input`,{type:`text`,value:K,placeholder:`#2c8a43 or tomato`,style:{width:`100%`,minWidth:0,height:`32px`,border:`1px solid ${ke?`#dc2626`:`#b7c7d1`}`,borderRadius:`8px`,padding:`0 10px`,fontSize:`12px`,color:`#22343d`,background:`#fff`,boxSizing:`border-box`,outline:`none`},onChange:e=>{Oe(e.target.value),ke&&Ae(``)},onMouseDown:e=>e.stopPropagation(),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),e.stopPropagation(),We(K)&&B(null))}})]}),(0,i.jsxs)(`div`,{style:{display:`flex`,gap:`8px`},children:[(0,i.jsx)(`button`,{type:`button`,style:{flex:1,border:`1px solid #7a92a1`,borderRadius:`8px`,background:`linear-gradient(180deg, #8ea3b0 0%, #738d9d 100%)`,color:`#fff`,fontSize:`11px`,fontWeight:600,height:`30px`,minWidth:0,padding:`0 10px`,cursor:`pointer`},onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),We(K)&&B(null)},children:`Apply Color`}),(0,i.jsx)(`button`,{type:`button`,style:{width:`32px`,minWidth:`32px`,border:`1px solid #c4d0d8`,borderRadius:`8px`,background:`#ffffff`,color:`#647987`,fontSize:`12px`,fontWeight:700,height:`30px`,padding:0,cursor:`pointer`},title:`Clear color`,onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),We(`none`),B(null)},children:`×`})]}),ke?(0,i.jsx)(`div`,{style:{fontSize:`10px`,color:`#b91c1c`,lineHeight:1.2,marginTop:`-2px`},children:ke}):null]}),document.body)]})}function De(e){let t=e,n=t.match(/^\\ce\{([\s\S]*)\}$/);n&&(t=n[1]);let r=[[`\\varepsilon`,`ε`],[`\\varphi`,`φ`],[`\\alpha`,`α`],[`\\beta`,`β`],[`\\gamma`,`γ`],[`\\delta`,`δ`],[`\\epsilon`,`ε`],[`\\zeta`,`ζ`],[`\\eta`,`η`],[`\\theta`,`θ`],[`\\iota`,`ι`],[`\\kappa`,`κ`],[`\\lambda`,`λ`],[`\\mu`,`μ`],[`\\nu`,`ν`],[`\\xi`,`ξ`],[`\\pi`,`π`],[`\\rho`,`ρ`],[`\\sigma`,`σ`],[`\\tau`,`τ`],[`\\upsilon`,`υ`],[`\\phi`,`φ`],[`\\chi`,`χ`],[`\\psi`,`ψ`],[`\\omega`,`ω`],[`\\Gamma`,`Γ`],[`\\Delta`,`Δ`],[`\\Theta`,`Θ`],[`\\Lambda`,`Λ`],[`\\Xi`,`Ξ`],[`\\Pi`,`Π`],[`\\Sigma`,`Σ`],[`\\Upsilon`,`Υ`],[`\\Phi`,`Φ`],[`\\Psi`,`Ψ`],[`\\Omega`,`Ω`],[`\\pm`,`±`],[`\\mp`,`∓`],[`\\times`,`×`],[`\\div`,`÷`],[`\\backslash`,`\\`],[`\\cdot`,`·`],[`\\neq`,`≠`],[`\\leq`,`≤`],[`\\geq`,`≥`],[`\\approx`,`≈`],[`\\equiv`,`≡`],[`\\infty`,`∞`],[`\\sum`,`∑`],[`\\prod`,`∏`],[`\\int`,`∫`],[`\\oint`,`∮`],[`\\iint`,`∬`],[`\\iiint`,`∭`],[`\\oiint`,`∯`],[`\\partial`,`∂`],[`\\nabla`,`∇`],[`\\in`,`∈`],[`\\notin`,`∉`],[`\\subset`,`⊂`],[`\\subseteq`,`⊆`],[`\\supset`,`⊃`],[`\\supseteq`,`⊇`],[`\\cup`,`∪`],[`\\cap`,`∩`],[`\\emptyset`,`∅`],[`\\setminus`,`﹨`],[`\\forall`,`∀`],[`\\exists`,`∃`],[`\\neg`,`¬`],[`\\land`,`∧`],[`\\lor`,`∨`],[`\\leftrightarrow`,`↔`],[`\\Leftrightarrow`,`⇔`],[`\\rightarrow`,`→`],[`\\leftarrow`,`←`],[`\\Rightarrow`,`⇒`],[`\\Leftarrow`,`⇐`],[`\\uparrow`,`↑`],[`\\downarrow`,`↓`],[`\\sin`,`sin`],[`\\cos`,`cos`],[`\\tan`,`tan`],[`\\cot`,`cot`],[`\\sec`,`sec`],[`\\csc`,`csc`],[`\\log`,`log`],[`\\ln`,`ln`],[`\\exp`,`exp`],[`\\lim`,`lim`],...S.map(({insert:e,label:t})=>[e,t]),...C.map(({insert:e,label:t})=>[e,t]),...w.map(({insert:e,label:t})=>[e,t]),[`\\wp`,`℘`],[`\\left(`,`(`],[`\\right)`,`)`],[`\\left[`,`[`],[`\\right]`,`]`],[`\\left|`,`|`],[`\\right|`,`|`],[`\\left\\{`,`{`],[`\\right\\}`,`}`],[`\\,`,` `],[`\\;`,` `],[`\\quad`,` `],[`\\qquad`,` `],[`\\prime`,`′`],[`\\vdots`,`⋮`],[`\\cdots`,`⋯`],[`\\ddots`,`⋱`],[`\\ldots`,`…`]];for(let[e,n]of r){let r=e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);t=t.replace(new RegExp(r,`g`),n)}t=t.replace(/\\frac\{([^}]*)\}\{([^}]*)\}/g,`$1/$2`),t=t.replace(/\\sqrt\[([^\]]*)\]\{([^}]*)\}/g,`$1√($2)`),t=t.replace(/\\sqrt\{([^}]*)\}/g,`√($1)`),t=t.replace(/\\vec\{([^}]*)\}/g,`$1⃗`),t=t.replace(/\\hat\{([^}]*)\}/g,`$1̂`),t=t.replace(/\\bar\{([^}]*)\}/g,`$1̄`),t=t.replace(/\\ddot\{([^}]*)\}/g,`$1̈`),t=t.replace(/\\dot\{([^}]*)\}/g,`$1̇`),t=t.replace(/\\text\{([^}]*)\}/g,`$1`),t=t.replace(/\\begin\{pmatrix\}([\s\S]*?)\\end\{pmatrix\}/g,(e,t)=>`[`+t.replace(/\\\\/g,`; `).replace(/&/g,`, `).trim()+`]`);let i={0:`⁰`,1:`¹`,2:`²`,3:`³`,4:`⁴`,5:`⁵`,6:`⁶`,7:`⁷`,8:`⁸`,9:`⁹`,"+":`⁺`,"-":`⁻`,"=":`⁼`,"(":`⁽`,")":`⁾`,n:`ⁿ`,i:`ⁱ`};t=t.replace(/\^\{([^}]*)\}/g,(e,t)=>t.split(``).map(e=>i[e]||e).join(``)),t=t.replace(/\^([a-zA-Z0-9])/g,(e,t)=>i[t]||t);let a={0:`₀`,1:`₁`,2:`₂`,3:`₃`,4:`₄`,5:`₅`,6:`₆`,7:`₇`,8:`₈`,9:`₉`,"+":`₊`,"-":`₋`,"=":`₌`,"(":`₍`,")":`₎`,a:`ₐ`,e:`ₑ`,o:`ₒ`,x:`ₓ`,i:`ᵢ`,j:`ⱼ`,n:`ₙ`};return t=t.replace(/_\{([^}]*)\}/g,(e,t)=>t.split(``).map(e=>a[e]||e).join(``)),t=t.replace(/_([a-zA-Z0-9])/g,(e,t)=>a[t]||t),t=t.replace(/->/g,`→`),t=t.replace(/<=>/g,`⇌`),t=t.replace(/\\[a-zA-Z]+/g,``),t=t.replace(/[{}]/g,``),t=t.replace(/\s+/g,` `),t=t.replace(/\\\\/g,`
2622
- `),t.trim()}function K({value:a,defaultValue:o=``,onChange:s,className:u=``,title:f=`custom ck editor`,showPreviewButton:m=!0,previewButtonLabel:h=`Preview Question`,previewModalTitle:g=`Question Preview`,previewEmptyMessage:_=`Type your question to preview it here.`}){let v=(0,e.useRef)(null),y=(0,e.useRef)(!1),[b,x]=(0,e.useState)(null),[S,C]=(0,e.useState)(null),[w,T]=(0,e.useState)(!1),[E,ee]=(0,e.useState)(``),D=a!==void 0,[O,k]=(0,e.useState)(()=>a??o);(0,e.useEffect)(()=>{y.current=!!b},[b]),(0,e.useEffect)(()=>{D&&k(a??``)},[D,a]),(0,e.useEffect)(()=>()=>{window.__ckMathWidgetClickHandler=null},[]);let A=(0,e.useCallback)(e=>{C(null),y.current=!0,x(e)},[]),j=(0,e.useCallback)(()=>{y.current=!1,x(null),C(null);let e=v.current;e&&e.model.change(e=>{e.setSelection(null)})},[]),[M,te]=(0,e.useState)(!1),ne=(0,e.useCallback)((e,{direction:t=`ltr`}={})=>{let n=v.current;if(!n||!e?.trim())return;let r={latex:e.trim(),dir:t===`rtl`?`rtl`:`ltr`};if(S){let e=d(n,S.modelElement)?S.modelElement:null;e?n.model.change(t=>{let n=t.createElement(`mathInline`,r),i=t.createPositionBefore(e);t.insert(n,i),t.remove(e),t.setSelection(t.createPositionAfter(n))}):n.model.change(e=>{let t=e.createElement(`mathInline`,r);n.model.insertContent(t)}),C(null)}else if(M){let t=De(e.trim());if(!t)return;n.model.change(e=>{let r=e.createText(t);n.model.insertContent(r)})}else n.model.change(e=>{let t=e.createElement(`mathInline`,r);n.model.insertContent(t),n.model.insertContent(e.createText(` `))});n.editing.view.focus()},[M,S]),re=(0,e.useMemo)(()=>Te(A),[A]),ie=(0,e.useCallback)(e=>{v.current=e;let t=(e,t,n=`ltr`)=>{if(!t)return;let r=/^\\ce\{/.test(t),i=e?.getAttribute(`dir`)===`rtl`||n===`rtl`?`rtl`:`ltr`;y.current=!0,C({modelElement:e,latex:t,direction:i}),x(r?`chem`:`math`)};e.mathWidgetClickHandler=t,window.__ckMathWidgetClickHandler=t;let n=e.ui.getEditableElement();if(!n||n._ckMathClickAttached)return;n._ckMathClickAttached=!0;let r=t=>{let n=c(t.target);n&&t.button===0&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation?.(),p(e,null,l(n),n))};n.addEventListener(`mousedown`,r,!0),n.addEventListener(`click`,r,!0)},[]),ae=(0,e.useCallback)(()=>{let e=v.current;ee((e?e.getData():O)||``),T(!0)},[O]),oe=(0,e.useCallback)(()=>{T(!1)},[]);return(0,e.useEffect)(()=>{if(!w)return;let e=e=>{e.key===`Escape`&&T(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[w]),(0,e.useEffect)(()=>{if(!w)return;let e=setTimeout(()=>{let e=document.querySelector(`.ck-preview-render-zone`);e&&e.querySelectorAll(`.math-tex`).forEach(e=>{let t=e.getAttribute(`data-latex`)||e.textContent||``,n=e.getAttribute(`data-dir`)||`ltr`;e.innerHTML=``;let r=document.createElement(`math-field`);r.setAttribute(`read-only`,``),r.setAttribute(`math-virtual-keyboard-policy`,`manual`),r.setAttribute(`tabindex`,`-1`),r.setAttribute(`letter-shape-style`,`upright`),r.setAttribute(`dir`,n),r.style.display=`inline-block`,r.style.width=`auto`,r.style.maxWidth=`100%`,r.style.verticalAlign=`middle`,r.style.border=`none`,r.style.background=`transparent`,r.style.outline=`none`,r.style.fontSize=`inherit`,r.style.minHeight=`auto`,r.style.padding=`0 2px`,r.style.margin=`0`,r.style.pointerEvents=`none`,r.style.direction=n,r.style.textAlign=n===`rtl`?`right`:`left`,r.style.unicodeBidi=n===`rtl`?`plaintext`:`normal`,r.style.color=`#000000`;let i=()=>{r.setValue?r.setValue(t,{silenceNotifications:!0}):r.value=t};customElements.get(`math-field`)?i():customElements.whenDefined(`math-field`).then(()=>i()),e.appendChild(r)})},50);return()=>clearTimeout(e)},[w,E]),(0,i.jsxs)(`div`,{className:`ck-editor-shell ${u}`.trim(),children:[(0,i.jsx)(`style`,{children:`
2621
+ `)};function ge(e,t={}){if(e.cls?.includes(`arrow-picker-tool`))return(0,i.jsx)(`span`,{className:`cme-toolbar-chevron-indicator`,"aria-hidden":`true`,children:`⏵`});if(e.icon&&he[e.icon])return(0,i.jsx)(`span`,{className:`cme-toolbar-icon-image-wrapper cme-toolbar-icon-image-wrapper--${e.icon}`,"aria-hidden":`true`,children:(0,i.jsx)(`img`,{className:`cme-toolbar-icon-image cme-toolbar-icon-image--${e.icon}`,src:he[e.icon],alt:``})});if(e.icon===`stacked-fraction`)return(0,i.jsx)(`span`,{className:`cme-fraction-icon cme-fraction-stack${e.cls?.includes(`black-glyph-template`)?` cme-fraction-stack--black-glyph-template`:``}`,"aria-hidden":`true`,children:(0,i.jsxs)(`svg`,{className:`cme-fraction-svg`,viewBox:`0 0 24 24`,focusable:`false`,"aria-hidden":`true`,children:[(0,i.jsx)(`rect`,{x:`7.5`,y:`-0.2`,width:`9`,height:`9`}),(0,i.jsx)(`line`,{x1:`5.5`,y1:`12`,x2:`18.5`,y2:`12`}),(0,i.jsx)(`rect`,{x:`7.5`,y:`15.3`,width:`9`,height:`9`})]})});if(e.icon===`arrow-label-right-above`||e.icon===`arrow-label-left-above`||e.icon===`arrow-label-both-above`||e.icon===`arrow-label-right-below`||e.icon===`arrow-label-left-below`||e.icon===`arrow-label-both-below`||e.icon===`arrow-label-both-above-below`||e.icon===`arrow-label-right-above-below`||e.icon===`arrow-label-left-above-below`||e.icon===`harpoon-label-right-left-above`||e.icon===`harpoon-label-right-left-below`||e.icon===`harpoon-label-right-left-above-below`||e.icon===`harpoon-label-left-right-above-below`||e.icon===`bar-harpoon-label-right-left-above-below`||e.icon===`bar-harpoon-label-right-left-above`||e.icon===`bar-harpoon-label-right-left-below`||e.icon===`bar-harpoon-label-left-right-above-below`||e.icon===`bar-arrow-label-right-left-above`||e.icon===`bar-arrow-label-right-left-above-below`||e.icon===`bar-arrow-label-left-right-above`||e.icon===`bar-arrow-label-left-right-above-below`){let{direction:t,arrowY:n,topBox:r,bottomBox:a}={"arrow-label-right-above":{direction:`right`,arrowY:11.25,topBox:{x:6.5,y:1.55,width:4.8,height:5.7}},"arrow-label-left-above":{direction:`left`,arrowY:11.25,topBox:{x:6.5,y:1.55,width:4.8,height:5.7}},"arrow-label-both-above":{direction:`both`,arrowY:11.25,topBox:{x:6.5,y:1.55,width:4.8,height:5.7}},"arrow-label-right-below":{direction:`right`,arrowY:6.7,bottomBox:{x:6.5,y:10.35,width:4.8,height:5.7}},"arrow-label-left-below":{direction:`left`,arrowY:6.7,bottomBox:{x:6.5,y:10.35,width:4.8,height:5.7}},"arrow-label-both-below":{direction:`both`,arrowY:6.7,bottomBox:{x:6.5,y:10.35,width:4.8,height:5.7}},"arrow-label-both-above-below":{direction:`both`,arrowY:8.55,topBox:{x:6.5,y:1.3,width:4.8,height:4.9},bottomBox:{x:6.5,y:11.7,width:4.8,height:4.9}},"arrow-label-right-above-below":{direction:`right`,arrowY:8.55,topBox:{x:6.5,y:1.3,width:4.8,height:4.9},bottomBox:{x:6.5,y:11.7,width:4.8,height:4.9}},"arrow-label-left-above-below":{direction:`left`,arrowY:8.55,topBox:{x:6.5,y:1.3,width:4.8,height:4.9},bottomBox:{x:6.5,y:11.7,width:4.8,height:4.9}},"harpoon-label-right-left-above":{direction:`harpoon-rl`,arrowY:11.15,topBox:{x:6.5,y:1.55,width:4.8,height:5.7}},"harpoon-label-right-left-below":{direction:`harpoon-rl`,arrowY:6.6,bottomBox:{x:6.5,y:10.35,width:4.8,height:5.7}},"harpoon-label-right-left-above-below":{direction:`harpoon-rl`,arrowY:8.55,topBox:{x:6.5,y:1.3,width:4.8,height:4.9},bottomBox:{x:6.5,y:11.7,width:4.8,height:4.9}},"harpoon-label-left-right-above-below":{direction:`harpoon-lr`,arrowY:8.55,topBox:{x:6.5,y:1.3,width:4.8,height:4.9},bottomBox:{x:6.5,y:11.7,width:4.8,height:4.9}},"bar-harpoon-label-right-left-above-below":{direction:`bar-harpoon-rl`,arrowY:8.55,topBox:{x:6.5,y:1.3,width:4.8,height:4.9},bottomBox:{x:6.5,y:11.7,width:4.8,height:4.9}},"bar-harpoon-label-right-left-above":{direction:`bar-harpoon-rl`,arrowY:11.15,topBox:{x:6.5,y:1.55,width:4.8,height:5.7}},"bar-harpoon-label-right-left-below":{direction:`bar-harpoon-rl`,arrowY:6.6,bottomBox:{x:6.5,y:10.35,width:4.8,height:5.7}},"bar-harpoon-label-left-right-above-below":{direction:`bar-harpoon-lr`,arrowY:8.55,topBox:{x:6.5,y:1.3,width:4.8,height:4.9},bottomBox:{x:6.5,y:11.7,width:4.8,height:4.9}},"bar-arrow-label-right-left-above":{direction:`bar-arrow-rl`,arrowY:11.15,topBox:{x:6.5,y:1.55,width:4.8,height:5.7}},"bar-arrow-label-right-left-above-below":{direction:`bar-arrow-rl`,arrowY:8.55,topBox:{x:6.5,y:1.3,width:4.8,height:4.9},bottomBox:{x:6.5,y:11.7,width:4.8,height:4.9}},"bar-arrow-label-left-right-above":{direction:`bar-arrow-lr`,arrowY:11.15,topBox:{x:6.5,y:1.55,width:4.8,height:5.7}},"bar-arrow-label-left-right-above-below":{direction:`bar-arrow-lr`,arrowY:8.55,topBox:{x:6.5,y:1.3,width:4.8,height:4.9},bottomBox:{x:6.5,y:11.7,width:4.8,height:4.9}}}[e.icon],o=t===`left`?(0,i.jsx)(`path`,{d:`M5.1 ${n-1.55}L2.55 ${n}L5.1 ${n+1.55}M2.95 ${n}H14.9`}):t===`both`?(0,i.jsx)(`path`,{d:`M5.1 ${n-1.55}L2.55 ${n}L5.1 ${n+1.55}M2.95 ${n}H15.05M12.5 ${n-1.55}L15.05 ${n}L12.5 ${n+1.55}`}):t===`harpoon-rl`?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`path`,{d:`M3.1 ${n-1.95}H14.35M12.05 ${n-3.15}L14.55 ${n-1.95}L12.05 ${n-.75}`}),(0,i.jsx)(`path`,{d:`M14.45 ${n+1.65}H3.2M5.45 ${n+.45}L2.95 ${n+1.65}L5.45 ${n+2.85}`})]}):t===`harpoon-lr`?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`path`,{d:`M14.45 ${n-1.95}H3.2M5.45 ${n-3.15}L2.95 ${n-1.95}L5.45 ${n-.75}`}),(0,i.jsx)(`path`,{d:`M3.1 ${n+1.65}H14.35M12.05 ${n+.45}L14.55 ${n+1.65}L12.05 ${n+2.85}`})]}):t===`bar-harpoon-rl`?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`path`,{d:`M4.3 ${n-1.95}H14.1M11.8 ${n-3.15}L14.3 ${n-1.95}L11.8 ${n-.75}`}),(0,i.jsx)(`path`,{d:`M14.2 ${n+1.65}H4.1M6.35 ${n+.45}L3.85 ${n+1.65}L6.35 ${n+2.85}`}),(0,i.jsx)(`line`,{x1:`2.95`,y1:n-1.95,x2:`4.15`,y2:n-1.95}),(0,i.jsx)(`line`,{x1:`14.2`,y1:n+1.65,x2:`15.3`,y2:n+1.65})]}):t===`bar-harpoon-lr`?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`path`,{d:`M14.2 ${n-1.95}H4.1M6.35 ${n-3.15}L3.85 ${n-1.95}L6.35 ${n-.75}`}),(0,i.jsx)(`path`,{d:`M4.3 ${n+1.65}H14.1M11.8 ${n+.45}L14.3 ${n+1.65}L11.8 ${n+2.85}`}),(0,i.jsx)(`line`,{x1:`14.2`,y1:n-1.95,x2:`15.3`,y2:n-1.95}),(0,i.jsx)(`line`,{x1:`2.95`,y1:n+1.65,x2:`4.15`,y2:n+1.65})]}):t===`bar-arrow-rl`?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`path`,{d:`M4.2 ${n-1.95}H14.05M11.75 ${n-3.15}L14.25 ${n-1.95}L11.75 ${n-.75}`}),(0,i.jsx)(`path`,{d:`M14.15 ${n+1.65}H4.25M6.55 ${n+.45}L4.05 ${n+1.65}L6.55 ${n+2.85}`}),(0,i.jsx)(`line`,{x1:`4.05`,y1:n+1.65,x2:`14.15`,y2:n+1.65})]}):t===`bar-arrow-lr`?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`path`,{d:`M14.15 ${n-1.95}H4.25M6.55 ${n-3.15}L4.05 ${n-1.95}L6.55 ${n-.75}`}),(0,i.jsx)(`path`,{d:`M4.2 ${n+1.65}H14.05M11.75 ${n+.45}L14.25 ${n+1.65}L11.75 ${n+2.85}`}),(0,i.jsx)(`line`,{x1:`4.05`,y1:n-1.95,x2:`14.15`,y2:n-1.95})]}):(0,i.jsx)(`path`,{d:`M12.5 ${n-1.55}L15.05 ${n}L12.5 ${n+1.55}M2.95 ${n}H14.65`});return(0,i.jsx)(`span`,{className:`cme-arrow-label-icon`,"aria-hidden":`true`,children:(0,i.jsxs)(`svg`,{className:`cme-arrow-label-svg`,viewBox:`0 0 18 18`,focusable:`false`,"aria-hidden":`true`,children:[r?(0,i.jsx)(`rect`,{...r,rx:`0.45`,className:`cme-arrow-label-placeholder-box`}):null,o,a?(0,i.jsx)(`rect`,{...a,rx:`0.45`,className:`cme-arrow-label-placeholder-box`}):null]})})}if(e.insert===`matrix`||e.insert===`bmatrix`||e.insert===`pmatrix`||e.insert===`vmatrix`){let t=e.insert,n=t===`matrix`?[[2.3,3.1],[7.1,3.1],[11.9,3.1],[2.3,7.25],[7.1,7.25],[11.9,7.25],[2.3,11.4],[7.1,11.4],[11.9,11.4]]:[[5.3,2.95],[10.1,2.95],[5.3,7.1],[10.1,7.1],[5.3,11.25],[10.1,11.25]],r;return t===`bmatrix`?r=(0,i.jsx)(`path`,{d:`M3 1.8H1.95V15.85H3M12.95 1.8H14V15.85H12.95`}):t===`pmatrix`?r=(0,i.jsx)(`path`,{d:`M3.15 1.8C1.85 3.05 1.35 4.75 1.35 8.85C1.35 12.95 1.85 14.65 3.15 15.85M12.85 1.8C14.15 3.05 14.65 4.75 14.65 8.85C14.65 12.95 14.15 14.65 12.85 15.85`}):t===`vmatrix`&&(r=(0,i.jsx)(`path`,{d:`M2.6 1.9V15.75M13.4 1.9V15.75`})),(0,i.jsx)(`span`,{className:`cme-matrix-icon`,"aria-hidden":`true`,children:(0,i.jsxs)(`svg`,{className:`cme-matrix-svg`,viewBox:`0 0 16 18`,focusable:`false`,"aria-hidden":`true`,children:[r,n.map(([e,n],r)=>(0,i.jsx)(`rect`,{x:e,y:n,width:`2.35`,height:`2.9`,rx:`0.28`,className:`cme-matrix-svg-cell`},`${t}-${r}`))]})})}let n={"\\begin{matrix} #? & #? & #? \\end{matrix}":{frame:`none`,cells:[[2.15,7.05],[6.85,7.05],[11.55,7.05]]},"\\begin{bmatrix} #? \\\\ #? \\end{bmatrix}":{frame:`brackets`,cells:[[7.05,3.25],[7.05,10.2]]},"\\begin{bmatrix} #? & #? \\end{bmatrix}":{frame:`brackets`,cells:[[4.85,7.05],[9.25,7.05]]},"\\begin{pmatrix} #? \\\\ #? \\end{pmatrix}":{frame:`parentheses`,cells:[[7.05,3.25],[7.05,10.2]]},"\\begin{pmatrix} #? & #? \\end{pmatrix}":{frame:`parentheses`,cells:[[4.85,7.05],[9.25,7.05]]},"\\begin{bmatrix} #? \\\\ #? \\\\ #? \\end{bmatrix}":{frame:`brackets`,cells:[[7.05,1.9],[7.05,7.05],[7.05,12.2]]},"\\begin{pmatrix} #? \\\\ #? \\\\ #? \\end{pmatrix}":{frame:`parentheses`,cells:[[7.05,1.9],[7.05,7.05],[7.05,12.2]]},"\\begin{matrix} #? \\\\ #? \\\\ #? \\end{matrix}":{frame:`none`,cells:[[7.05,1.9],[7.05,7.05],[7.05,12.2]]}}[e.insert];if(n){let e;return n.frame===`brackets`?e=(0,i.jsx)(`path`,{d:`M2.7 1.4H1.75V16.1H2.7M13.3 1.4H14.25V16.1H13.3`}):n.frame===`parentheses`&&(e=(0,i.jsx)(`path`,{d:`M3 1.4C1.95 2.7 1.55 4.65 1.55 8.75C1.55 12.85 1.95 14.8 3 16.1M13 1.4C14.05 2.7 14.45 4.65 14.45 8.75C14.45 12.85 14.05 14.8 13 16.1`})),(0,i.jsx)(`span`,{className:`cme-matrix-template-icon`,"aria-hidden":`true`,children:(0,i.jsxs)(`svg`,{className:`cme-matrix-template-svg`,viewBox:`0 0 16 18`,focusable:`false`,"aria-hidden":`true`,children:[e,n.cells.map(([e,t],n)=>(0,i.jsx)(`rect`,{x:e,y:t,width:`2.35`,height:`3`,rx:`0.28`,className:`cme-matrix-svg-cell`},`matrix-template-${n}`))]})})}if(e.icon===`superscript-template`||e.icon===`subscript-template`)return(0,i.jsx)(`span`,{className:`cme-script-icon`,"aria-hidden":`true`,children:(0,i.jsx)(`svg`,{className:`cme-script-svg`,viewBox:`0 0 18 18`,focusable:`false`,"aria-hidden":`true`,children:e.icon===`superscript-template`?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`rect`,{x:`3`,y:`7`,width:`6`,height:`8`,rx:`0.5`}),(0,i.jsx)(`rect`,{x:`10`,y:`3`,width:`5`,height:`7`,rx:`0.5`})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`rect`,{x:`3`,y:`3`,width:`6`,height:`8`,rx:`0.5`}),(0,i.jsx)(`rect`,{x:`10`,y:`8`,width:`5`,height:`7`,rx:`0.5`})]})})});if(e.icon===`square-root-template`||e.icon===`nth-root-template`){let t=e.icon===`nth-root-template`;return(0,i.jsx)(`span`,{className:`cme-root-icon`,"aria-hidden":`true`,children:(0,i.jsxs)(`svg`,{className:`cme-root-svg`,width:`48`,height:`32`,viewBox:`0 0 46 32`,focusable:`false`,"aria-hidden":`true`,children:[t?(0,i.jsx)(`rect`,{x:`8`,y:`4`,width:`8`,height:`10`,className:`cme-root-svg-box cme-root-svg-box--small`}):null,(0,i.jsx)(`path`,{d:t?`M10 18 L17 25 L24 4 L46 4`:`M4 18 L11 25 L18 4 L42 4`}),(0,i.jsx)(`rect`,{x:t?`30`:`24`,y:`9`,width:`11`,height:`15`,className:`cme-root-svg-box`})]})})}if(e.icon===`accent-harpoon-right`||e.icon===`accent-arrow-right`||e.icon===`accent-arrow-both`||e.icon===`accent-bar`){let t;return t=e.icon===`accent-bar`?(0,i.jsx)(`line`,{x1:`3.5`,y1:`4.5`,x2:`14.5`,y2:`4.5`}):e.icon===`accent-arrow-both`?(0,i.jsx)(`path`,{d:`M3.3 5.5L5 3.9M3.3 5.5L5 7.1M3.5 5.5H14.5M13 3.9L14.7 5.5L13 7.1`}):e.icon===`accent-harpoon-right`?(0,i.jsx)(`path`,{d:`M3.5 5.5H14.5M12 3.9L14.7 5.5M14 5.5V5`}):(0,i.jsx)(`path`,{d:`M3.5 5.5H14.2M11.8 3.9L14.7 5.5L11.8 7.1`}),(0,i.jsx)(`span`,{className:`cme-accent-icon`,"aria-hidden":`true`,children:(0,i.jsxs)(`svg`,{className:`cme-accent-svg`,viewBox:`0 0 18 18`,focusable:`false`,"aria-hidden":`true`,children:[t,(0,i.jsx)(`rect`,{x:`6.4`,y:`8.6`,width:`5.2`,height:`7`,rx:`0.45`,className:`cme-accent-svg-box`})]})})}if(t.isMathMode||t.isChemMode){let n=[`cme-toolbar-glyph`],r=e.cls||``,a=t.groupId===`roots-main`,o=t.groupId===`relations`,s=t.groupId===`greek`,c=!!t.isChemMode,l=String(e.label||``),u=l.length;if(c){let t=/^(?:[⁰¹²³⁴⁵⁶⁷⁸⁹⁺⁻⁼⁽⁾ⁿⁱ₀₁₂₃₄₅₆₇₈₉₊₋₌₍₎ₐₑₒₓᵢⱼₙ])+$/u.test(String(e.label||``));n.push(`cme-toolbar-glyph--chem`);let i=/^(?:[+-]|[²³][⁺⁻])$/u.test(String(e.label||``));r.includes(`chem-element`)&&n.push(`cme-toolbar-glyph--chem-element`),r.includes(`chem-arrow`)&&n.push(`cme-toolbar-glyph--chem-arrow`),r.includes(`chem-state`)&&n.push(`cme-toolbar-glyph--chem-state`),t&&n.push(`cme-toolbar-glyph--chem-script`),i&&n.push(`cme-toolbar-glyph--chem-charge`)}else a&&n.push(`cme-toolbar-glyph--roots-main`),o&&n.push(`cme-toolbar-glyph--relations`),!a&&!o&&n.push(`cme-toolbar-glyph--math`),s&&n.push(`cme-toolbar-glyph--greek`);return r.includes(`green-template`)&&n.push(`cme-toolbar-glyph--template`),r.includes(`soft-tool`)&&n.push(`cme-toolbar-glyph--tool`),r.includes(`format-tool`)&&n.push(`cme-toolbar-glyph--format`),u>=4&&n.push(`cme-toolbar-glyph--wide`),u>=8&&n.push(`cme-toolbar-glyph--very-wide`),(0,i.jsx)(`span`,{className:n.join(` `),"aria-hidden":`true`,children:r.includes(`green-placeholder-glyph`)||r.includes(`black-glyph-template`)||r.includes(`black-placeholder-glyph`)?Array.from(l).map((e,t)=>e===`□`?(0,i.jsx)(`span`,{className:r.includes(`black-placeholder-glyph`)?`cme-toolbar-placeholder-box-black`:`cme-toolbar-placeholder-box-green`,children:e},`placeholder-${t}`):(0,i.jsx)(`span`,{children:e},`glyph-${t}`)):e.label})}return e.label}function _e({position:e,onInsert:t}){let n=Math.min(Math.max(e.x-6,8),window.innerWidth-348),r=Math.min(e.y+2,window.innerHeight-148),a=e=>e.preview===`rightleft-short-left`?(0,i.jsxs)(`svg`,{width:`22`,height:`18`,viewBox:`0 0 50 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,i.jsx)(`line`,{x1:`10`,y1:`8`,x2:`38`,y2:`8`}),(0,i.jsx)(`polyline`,{points:`30,2 38,8 30,14`}),(0,i.jsx)(`line`,{x1:`34`,y1:`16`,x2:`18`,y2:`16`}),(0,i.jsx)(`polyline`,{points:`26,10 18,16 26,22`})]}):e.preview===`right-short-over-left-long`?(0,i.jsxs)(`svg`,{width:`22`,height:`18`,viewBox:`0 0 50 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,i.jsx)(`line`,{x1:`14`,y1:`8`,x2:`30`,y2:`8`}),(0,i.jsx)(`polyline`,{points:`22,2 30,8 22,14`}),(0,i.jsx)(`line`,{x1:`40`,y1:`16`,x2:`12`,y2:`16`}),(0,i.jsx)(`polyline`,{points:`20,10 12,16 20,22`})]}):(0,i.jsx)(`span`,{"aria-hidden":`true`,style:{fontSize:`18px`,lineHeight:1,fontFamily:`"Cambria Math", "STIX Two Math", "Segoe UI Symbol", "Segoe UI", sans-serif`,whiteSpace:`pre-line`},children:e.label});return(0,i.jsx)(`div`,{className:`cme-arrow-picker-popup`,style:{position:`fixed`,left:`${n}px`,top:`${r}px`,zIndex:1e5},onMouseDown:e=>e.stopPropagation(),children:(0,i.jsx)(`div`,{className:`cme-arrow-picker-grid`,children:y.map(e=>(0,i.jsx)(`button`,{type:`button`,className:`cme-arrow-picker-btn`,title:e.title,onMouseDown:n=>{n.preventDefault(),t(e.insert)},children:a(e)},`${e.insert}-${e.title||e.label}`))})})}function ve({position:e,items:t=[],onInsert:n,popupBounds:r=null,picker:a=``}){let o=a===`trigFunctionExtras`||a===`bracketDelimiterExtras`||a===`enclosureFrameExtras`||a===`strikeDecorationExtras`||a===`arithmeticLayoutExtras`,s=o?2:Math.max(1,Math.min(t.length,5)),c=o?88:30,l=o?34:30,u=o?10:8,d=o?8:6,f=o?18:20,p=o?18:16,m=Math.max(1,Math.ceil(t.length/s)),h=s*c+(s-1)*u+f,g=m*l+(m-1)*d+p,_=r?{left:r.left,top:r.top,right:r.right,bottom:r.bottom}:{left:8,top:8,right:window.innerWidth-8,bottom:window.innerHeight-8},v=_.left+8,y=Math.max(v,_.right-h-8),b=_.top+8,x=Math.max(b,_.bottom-g-8),S=Math.min(Math.max(e.x-6,v),y),C=e.y+2,w=e.y-g-6,T=C<=x?C:Math.max(b,Math.min(w,x));return(0,i.jsx)(`div`,{className:`cme-arrow-picker-popup cme-relation-more-picker-popup`,style:{position:`fixed`,left:`${S}px`,top:`${T}px`,zIndex:1e5},onMouseDown:e=>e.stopPropagation(),children:(0,i.jsx)(`div`,{className:`cme-arrow-picker-grid`,style:{gridTemplateColumns:`repeat(${s}, ${c}px)`,gridAutoRows:`${l}px`,gap:`${d}px ${u}px`},children:t.map(e=>(0,i.jsx)(`button`,{type:`button`,className:`cme-arrow-picker-btn${e.cls?` ${e.cls}`:``}`,title:e.title||e.label,style:{width:`${c}px`,height:`${l}px`,padding:o?`0 8px`:0},onMouseDown:t=>{t.preventDefault(),n(e.insert)},children:ge(e,{groupId:`relations`,isMathMode:!0,isChemMode:!1})},`${e.insert}-${e.title||e.label}`))})})}function ye({position:e,onInsert:t}){let n=Math.ceil(b.length/4),r=n*34+(n-1)*4+12,a=Math.min(Math.max(e.x-8,8),Math.max(8,window.innerWidth-220-8)),o=Math.min(e.y+2,Math.max(8,window.innerHeight-r-8));return(0,i.jsx)(`div`,{className:`cme-arrow-label-picker-popup`,style:{position:`fixed`,left:`${a}px`,top:`${o}px`,zIndex:1e5},onMouseDown:e=>e.stopPropagation(),children:(0,i.jsx)(`div`,{className:`cme-arrow-label-picker-grid`,style:{gridTemplateColumns:`repeat(4, 48px)`},children:b.map(e=>(0,i.jsx)(`button`,{type:`button`,className:`cme-arrow-label-picker-btn`,title:e.title,onMouseDown:n=>{n.preventDefault(),t(e.insert)},children:ge(e,{groupId:`arrows`,isMathMode:!0,isChemMode:!1})},`${e.icon}-${e.title}`))})})}function be({position:e,onInsert:t}){let n=Math.min(Math.max(e.x-8,8),window.innerWidth-356),r=Math.min(e.y+2,window.innerHeight-148);return(0,i.jsx)(`div`,{className:`cme-greek-italic-picker-popup`,style:{position:`fixed`,left:`${n}px`,top:`${r}px`,zIndex:1e5},onMouseDown:e=>e.stopPropagation(),children:(0,i.jsx)(`div`,{className:`cme-greek-italic-picker-grid`,children:x.map(e=>(0,i.jsx)(`button`,{type:`button`,className:`cme-greek-italic-picker-btn`,title:e.title,onMouseDown:n=>{n.preventDefault(),t(e.insert)},children:(0,i.jsx)(`span`,{className:`cme-greek-italic-picker-glyph`,"aria-hidden":`true`,children:e.label})},e.label))})})}function xe({position:e,onInsert:t}){let n=Math.min(Math.max(e.x-8,8),window.innerWidth-356),r=Math.min(e.y+2,window.innerHeight-308);return(0,i.jsx)(`div`,{className:`cme-blackboard-bold-picker-popup`,style:{position:`fixed`,left:`${n}px`,top:`${r}px`,zIndex:1e5},onMouseDown:e=>e.stopPropagation(),children:(0,i.jsx)(`div`,{className:`cme-blackboard-bold-picker-grid`,children:S.map(e=>(0,i.jsx)(`button`,{type:`button`,className:`cme-blackboard-bold-picker-btn`,title:e.title,onMouseDown:n=>{n.preventDefault(),t(e.insert)},children:(0,i.jsx)(`span`,{className:`cme-blackboard-bold-picker-glyph`,"aria-hidden":`true`,children:e.label})},e.insert))})})}function Se({position:e,onInsert:t}){let n=Math.min(Math.max(e.x-8,8),window.innerWidth-356),r=Math.min(e.y+2,window.innerHeight-348);return(0,i.jsx)(`div`,{className:`cme-fraktur-script-picker-popup`,style:{position:`fixed`,left:`${n}px`,top:`${r}px`,zIndex:1e5},onMouseDown:e=>e.stopPropagation(),children:(0,i.jsx)(`div`,{className:`cme-fraktur-script-picker-grid`,children:C.map(e=>(0,i.jsx)(`button`,{type:`button`,className:`cme-fraktur-script-picker-btn`,title:e.title,onMouseDown:n=>{n.preventDefault(),t(e.insert)},children:(0,i.jsx)(`span`,{className:`cme-fraktur-script-picker-glyph`,"aria-hidden":`true`,children:e.label})},e.insert))})})}function Ce({position:e,onInsert:t}){let n=Math.min(Math.max(e.x-8,8),window.innerWidth-248),r=Math.min(e.y+2,window.innerHeight-88);return(0,i.jsx)(`div`,{className:`cme-hebrew-symbol-picker-popup`,style:{position:`fixed`,left:`${n}px`,top:`${r}px`,zIndex:1e5},onMouseDown:e=>e.stopPropagation(),children:(0,i.jsx)(`div`,{className:`cme-hebrew-symbol-picker-grid`,children:w.map(e=>(0,i.jsx)(`button`,{type:`button`,className:`cme-hebrew-symbol-picker-btn`,title:e.title,onMouseDown:n=>{n.preventDefault(),t(e.insert)},children:(0,i.jsx)(`span`,{className:`cme-hebrew-symbol-picker-glyph`,"aria-hidden":`true`,children:e.label})},e.insert))})})}function we({position:e,onInsert:t}){let n=Math.min(Math.max(e.x-8,8),window.innerWidth-612),r=Math.min(e.y+2,window.innerHeight-313),a=2*O+Math.floor(D/2),o=5*O+Math.floor(D/2),s=7*O+Math.floor(D/2),c=8*O+Math.floor(D/2),l=3*O;return(0,i.jsx)(`div`,{className:`cme-periodic-table-picker-popup`,style:{position:`fixed`,left:`${n}px`,top:`${r}px`,zIndex:1e5},onMouseDown:e=>e.stopPropagation(),children:(0,i.jsxs)(`div`,{className:`cme-periodic-table-board`,style:{width:`${k}px`,height:`${A}px`},children:[(0,i.jsx)(`div`,{className:`cme-periodic-table-connector cme-periodic-table-connector--vertical`,style:{left:`${a}px`,top:`${o}px`,height:`${c-o}px`}}),(0,i.jsx)(`div`,{className:`cme-periodic-table-connector cme-periodic-table-connector--horizontal`,style:{left:`${a}px`,top:`${s}px`,width:`${l-a}px`}}),(0,i.jsx)(`div`,{className:`cme-periodic-table-connector cme-periodic-table-connector--horizontal`,style:{left:`${a}px`,top:`${c}px`,width:`${l-a}px`}}),j.map(e=>(0,i.jsx)(`button`,{type:`button`,className:`cme-periodic-table-cell cme-periodic-table-cell--${e.tone}`,title:e.title,style:{left:`${(e.col-1)*O}px`,top:`${(e.row-1)*O}px`,width:`${D}px`,height:`${D}px`},onMouseDown:n=>{n.preventDefault(),t(e.insert)},children:e.label},`${e.label}-${e.row}-${e.col}`))]})})}function Te({position:e,options:t,value:n,onSelect:r,width:a=132}){let o=Math.min(Math.max(e.x,8),window.innerWidth-a-8),s=Math.max(8,Math.min(e.y+4,window.innerHeight-290));return(0,i.jsx)(`div`,{className:`cme-style-dropdown-popup`,style:{position:`fixed`,left:`${o}px`,top:`${s}px`,width:`${a}px`,zIndex:1e5},onMouseDown:e=>e.stopPropagation(),children:t.map(e=>(0,i.jsx)(`button`,{type:`button`,className:`cme-style-dropdown-option${n===e.value?` active`:``}`,onMouseDown:t=>{t.preventDefault(),r(e.value)},children:e.label},e.value))})}function Ee(e){return class extends r.Plugin{init(){let t=this.editor;t.ui.componentFactory.add(`mathType`,()=>{let t=new r.ButtonView;return t.set({label:`Math`,icon:V,tooltip:`Insert Math Formula`}),t.on(`execute`,()=>e(`math`)),t}),t.ui.componentFactory.add(`chemType`,()=>{let t=new r.ButtonView;return t.set({label:`Chemistry`,icon:fe,tooltip:`Insert Chemistry Formula`}),t.on(`execute`,()=>e(`chem`)),t})}}}function De({matrixType:t,x:n,y:r,onSelect:a,onMouseEnter:o,onMouseLeave:s}){let[c,l]=(0,e.useState)({r:2,c:2}),u={matrix:`Plain Matrix`,bmatrix:`Square Matrix`,pmatrix:`Parenthesis Matrix`,vmatrix:`Vertical Matrix`},d=(0,e.useCallback)((e,t)=>{let n=Number.parseInt(t,10);Number.isNaN(n)||l(t=>({...t,[e]:Math.min(20,Math.max(1,n))}))},[]);return(0,e.useEffect)(()=>{let e=e=>{e.key===`Enter`&&(e.preventDefault(),e.stopPropagation(),a(c.r,c.c))};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[c.r,c.c,a]),(0,i.jsxs)(`div`,{className:`cme-matrix-hover-popover ck-only`,style:{top:`${r}px`,left:`${n}px`},onMouseDown:e=>e.stopPropagation(),onMouseEnter:o,onMouseLeave:s,children:[(0,i.jsxs)(`div`,{className:`cme-matrix-hover-title-wrap`,children:[(0,i.jsx)(`div`,{className:`cme-matrix-hover-title`,children:u[t]||`Matrix`}),(0,i.jsxs)(`div`,{className:`cme-matrix-hover-subtitle`,children:[c.r,` × `,c.c]})]}),(0,i.jsx)(`div`,{className:`cme-matrix-hover-grid`,children:Array.from({length:6}).map((e,t)=>(0,i.jsx)(`div`,{className:`cme-matrix-hover-row`,children:Array.from({length:6}).map((e,n)=>(0,i.jsx)(`div`,{className:`cme-matrix-hover-cell${t<c.r&&n<c.c?` selected`:``}`,onMouseEnter:()=>l({r:t+1,c:n+1}),onClick:e=>{e.preventDefault(),e.stopPropagation(),a(t+1,n+1)}},`${t}-${n}`))},t))}),(0,i.jsxs)(`div`,{className:`cme-matrix-hover-footer`,children:[(0,i.jsxs)(`div`,{className:`cme-matrix-counter`,children:[(0,i.jsx)(`span`,{className:`cme-counter-label`,children:`R`}),(0,i.jsx)(`input`,{type:`number`,min:`1`,max:`20`,value:c.r,className:`cme-counter-input`,onChange:e=>d(`r`,e.target.value),onMouseDown:e=>e.stopPropagation()}),(0,i.jsxs)(`div`,{className:`cme-counter-btns`,children:[(0,i.jsx)(`button`,{type:`button`,onClick:()=>l(e=>({...e,r:Math.min(20,e.r+1)})),children:`+`}),(0,i.jsx)(`button`,{type:`button`,onClick:()=>l(e=>({...e,r:Math.max(1,e.r-1)})),children:`-`})]})]}),(0,i.jsxs)(`div`,{className:`cme-matrix-counter`,children:[(0,i.jsx)(`span`,{className:`cme-counter-label`,children:`C`}),(0,i.jsx)(`input`,{type:`number`,min:`1`,max:`20`,value:c.c,className:`cme-counter-input`,onChange:e=>d(`c`,e.target.value),onMouseDown:e=>e.stopPropagation()}),(0,i.jsxs)(`div`,{className:`cme-counter-btns`,children:[(0,i.jsx)(`button`,{type:`button`,onClick:()=>l(e=>({...e,c:Math.min(20,e.c+1)})),children:`+`}),(0,i.jsx)(`button`,{type:`button`,onClick:()=>l(e=>({...e,c:Math.max(1,e.c-1)})),children:`-`})]})]})]})]})}function W({mode:n,onInsert:r,onClose:a,initialLatex:o,initialDirection:c=`ltr`,isEditing:l}){let u=(0,e.useRef)(null),d=(0,e.useRef)(null),f=(0,e.useRef)(null),p=(0,e.useRef)(null),m=(0,e.useRef)(()=>{}),h=(0,e.useRef)(null),[_,v]=(0,e.useState)(0),[y,b]=(0,e.useState)(null),[x,S]=(0,e.useState)(null),[C,w]=(0,e.useState)(null),[T,E]=(0,e.useState)(null),[D,O]=(0,e.useState)(null),[k,A]=(0,e.useState)(null),[j,M]=(0,e.useState)(null),[N,P]=(0,e.useState)(null),[F,I]=(0,e.useState)(null),[L,R]=(0,e.useState)(null),[ue,z]=(0,e.useState)(null),[B,de]=(0,e.useState)(null),[V,fe]=(0,e.useState)(`normal`),[H,U]=(0,e.useState)(null),[he,Ee]=(0,e.useState)(!1),[W,Oe]=(0,e.useState)(c===`rtl`),[G,ke]=(0,e.useState)(``),[K,Ae]=(0,e.useState)(``),je=n===`math`?se:ce,q=n===`math`,Me=n===`chem`,J=q||Me,Y=je[_]||{},Ne=q&&Y.id?` cme-symbol-subgroup--tab-${Y.id}`:``,Pe=(0,e.useMemo)(()=>pe.map(e=>({...e,normalized:me(e.value)||e.value.toLowerCase()})),[]),[X,Fe]=(0,e.useState)({bold:!1,italic:!1,boldItalic:!1,color:`none`,fontOption:``,fontSize:`auto`}),[Z,Ie]=(0,e.useState)(`western`),[Le,Re]=(0,e.useState)(`thin`),ze=(0,e.useCallback)((e,t)=>{let n=d.current,r=n?.offsetWidth||720,i=n?.offsetHeight||384,a=Math.max(12,window.innerWidth-r-12),o=Math.max(12,window.innerHeight-i-12);return{x:Math.min(Math.max(12,e),a),y:Math.min(Math.max(12,t),o)}},[]),Be=(0,e.useCallback)(()=>{m.current(),m.current=()=>{},p.current=null,Ee(!1)},[]);(0,e.useEffect)(()=>()=>Be(),[Be]),(0,e.useEffect)(()=>{f.current=H},[H]),(0,e.useEffect)(()=>{V===`minimized`&&(b(null),S(null),w(null),E(null),O(null),A(null),M(null),P(null),I(null),R(null),z(null),de(null))},[V]),(0,e.useEffect)(()=>{if(V===`maximized`)return;let e=()=>{let e=d.current;if(!e)return;let t=f.current;if(t){let e=ze(t.x,t.y);f.current=e,U(e);return}let n=e.getBoundingClientRect(),r=ze(window.innerWidth-n.width-24,window.innerHeight-n.height-24);f.current=r,U(r)},t=requestAnimationFrame(e),n=d.current,r=t=>{t.target===n&&(t.propertyName!==`width`&&t.propertyName!==`height`||e())};return n?.addEventListener(`transitionend`,r),()=>{cancelAnimationFrame(t),n?.removeEventListener(`transitionend`,r)}},[ze,V]),(0,e.useEffect)(()=>{if(V===`maximized`)return;let e=()=>{let e=f.current;if(!e)return;let t=ze(e.x,e.y);f.current=t,U(t)};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[ze,V]);let Ve=(0,e.useCallback)(e=>{if(V===`maximized`||e.button!==void 0&&e.button!==0||e.target.closest(`.cme-popup-actions`))return;let t=d.current;if(!t)return;e.preventDefault(),Ee(!0);let n=t.getBoundingClientRect(),r=f.current||{x:n.left,y:n.top};f.current=r,U(r),p.current={offsetX:e.clientX-n.left,offsetY:e.clientY-n.top};let i=e=>{if(!p.current)return;e.preventDefault();let t=ze(e.clientX-p.current.offsetX,e.clientY-p.current.offsetY);f.current=t,U(t)},a=()=>Be();m.current=()=>{window.removeEventListener(`pointermove`,i),window.removeEventListener(`pointerup`,a)},window.addEventListener(`pointermove`,i),window.addEventListener(`pointerup`,a)},[ze,Be,V]);(0,e.useEffect)(()=>{Oe(c===`rtl`)},[c]),(0,e.useEffect)(()=>{let e=u.current;if(!e)return;let t=W?`rtl`:`ltr`;e.setAttribute(`dir`,t),e.style.direction=t,e.style.textAlign=W?`right`:`left`,e.style.unicodeBidi=W?`plaintext`:`normal`},[W]);let Q=(0,e.useCallback)(()=>{let e=u.current;if(!(!e||typeof e.queryStyle!=`function`))try{let t=e.queryStyle({variantStyle:`bolditalic`})===`all`,n=t||e.queryStyle({fontSeries:`b`})===`all`||e.queryStyle({variantStyle:`bold`})===`all`,r=t||e.queryStyle({fontShape:`it`})===`all`||e.queryStyle({variantStyle:`italic`})===`all`,i=te.find(({style:t})=>Object.entries(t).every(([t,n])=>e.queryStyle({[t]:n})===`all`))||null,a=re.find(({value:t})=>e.queryStyle({fontSize:parseInt(t,10)})===`all`)?.value||`auto`,o=me(G),s=[...new Set(Pe.flatMap(e=>[e.normalized,e.value]).concat(X.color===`none`?[]:[X.color]).concat(o?[o,G.trim()]:[]).filter(Boolean))].find(t=>e.queryStyle({color:t})===`all`),c=s?me(s)||s:`none`;Fe({bold:n,italic:r,boldItalic:t,fontOption:i?.value||``,fontSize:String(a),color:c})}catch(e){console.warn(`Failed to query active styles:`,e)}},[X.color,Pe,G]),He=(0,e.useCallback)(e=>{let t=u.current;if(!t||typeof t.applyStyle!=`function`)return;let n=!!e.bold,r=!!e.italic,i=n&&r?`bolditalic`:n?`bold`:r?`italic`:`up`;t.applyStyle({variantStyle:i,fontSeries:n?`b`:`m`,fontShape:r?`it`:`n`}),t.applyStyle({color:e.color===`none`?`none`:e.color}),t.applyStyle(ne);let a=te.find(({value:t})=>t===e.fontOption);if(a&&t.applyStyle(a.style),e.fontSize!==`auto`){let n=parseInt(e.fontSize,10);t.applyStyle({fontSize:n,size:n})}},[]),Ue=(0,e.useCallback)((e,t)=>{let n=u.current;n&&(n.focus(),He({...X,bold:e,italic:t,boldItalic:e&&t}),requestAnimationFrame(Q))},[X,He,Q]),We=(0,e.useCallback)(e=>{let t=u.current;if(!t||typeof t.applyStyle!=`function`)return!1;let n=e===`none`?`none`:me(e);if(e!==`none`&&!n)return Ae(`Enter a valid hex code or CSS color name.`),!1;let r=e===`none`?`none`:n;return t.focus(),t.applyStyle({color:r}),Fe(e=>({...e,color:r})),ke(r===`none`?``:r),Ae(``),requestAnimationFrame(Q),!0},[Q]),Ge=(0,e.useCallback)((e,t)=>{let n=u.current;if(!(!n||typeof n.applyStyle!=`function`)){if(n.focus(),e===`font`){n.applyStyle(ne);let e=te.find(e=>e.value===t);e&&n.applyStyle(e.style),Fe(e=>({...e,fontOption:t}))}else{let e=t?parseInt(t,10):`auto`;n.applyStyle({fontSize:e,size:e}),Fe(e=>({...e,fontSize:t||`auto`}))}requestAnimationFrame(Q)}},[Q]);(0,e.useEffect)(()=>{if(!y&&!ue&&!B&&!C&&!T&&!D&&!k&&!j&&!N&&!F&&!L)return;let e=e=>{!e.target.closest(`.cme-matrix-hover-popover`)&&!e.target.closest(`.cme-matrix-btn-wrapper`)&&b(null),!e.target.closest(`.cme-color-picker-popup`)&&!e.target.closest(`[title="Text Color"]`)&&z(null),!e.target.closest(`.cme-style-dropdown-popup`)&&!e.target.closest(`.cme-style-select-trigger`)&&de(null),!e.target.closest(`.cme-arrow-picker-popup`)&&!e.target.closest(`.arrow-picker-tool`)&&w(null),!e.target.closest(`.cme-relation-more-picker-popup`)&&!e.target.closest(`.relation-more-picker-tool`)&&E(null),!e.target.closest(`.cme-arrow-label-picker-popup`)&&!e.target.closest(`.arrow-label-picker-tool`)&&O(null),!e.target.closest(`.cme-greek-italic-picker-popup`)&&!e.target.closest(`.greek-italic-picker-tool`)&&A(null),!e.target.closest(`.cme-blackboard-bold-picker-popup`)&&!e.target.closest(`.blackboard-bold-picker-tool`)&&M(null),!e.target.closest(`.cme-fraktur-script-picker-popup`)&&!e.target.closest(`.fraktur-script-picker-tool`)&&P(null),!e.target.closest(`.cme-hebrew-symbol-picker-popup`)&&!e.target.closest(`.hebrew-symbol-picker-tool`)&&I(null),!e.target.closest(`.cme-periodic-table-picker-popup`)&&!e.target.closest(`.periodic-table-picker-tool`)&&R(null)};return window.addEventListener(`mousedown`,e,!0),window.addEventListener(`pointerdown`,e,!0),()=>{window.removeEventListener(`mousedown`,e,!0),window.removeEventListener(`pointerdown`,e,!0)}},[y,ue,B,C,T,D,k,j,N,F,L]),(0,e.useEffect)(()=>{let e=u.current;if(!e)return;e.defaultMode=n===`chem`?`text`:`math`,e.letterShapeStyle=`upright`;let t=()=>{let t=o||``;if(n===`chem`&&t){let e=t.match(/^\\ce\{([\s\S]*)\}$/);e&&(t=e[1])}e.setValue?e.setValue(t,{silenceNotifications:!0}):e.value=t,requestAnimationFrame(()=>e.focus())};customElements.get(`math-field`)?requestAnimationFrame(t):customElements.whenDefined(`math-field`).then(()=>requestAnimationFrame(t))},[n,o]),(0,e.useEffect)(()=>{let e=u.current;if(!e)return;let t=()=>e.getValue?e.getValue():e.value||``,n=()=>{try{if(typeof e.executeCommand==`function`)for(let t of[`moveToMathFieldStart`,`moveToMathfieldStart`,`moveToStart`])try{e.executeCommand(t);return}catch{}}catch{}try{typeof e.setSelectionRange==`function`&&e.setSelectionRange(0,0)}catch{}},r=t=>{typeof e.setValue==`function`?e.setValue(t):e.value=t,requestAnimationFrame(()=>{e.focus?.(),n(),Q()})},i=n=>{let i=n.key.length===1&&n.key!==` `&&!n.ctrlKey&&!n.metaKey&&!n.altKey,a=/^\d$/.test(n.key)&&!n.ctrlKey&&!n.metaKey&&!n.altKey;if(Le===`negativeThin`&&i){n.preventDefault();let i=Z!==`western`&&a?ee(n.key,Z):n.key;W?r(`\\!${i}${t()}`):e.executeCommand([`insert`,`\\!${i}`]);return}if(Z!==`western`&&a){n.preventDefault();let i=ee(n.key,Z);W?r(`${i}${t()}`):e.executeCommand([`insert`,i]);return}if(n.key===` `){n.preventDefault();let i=Le===`negativeThin`?`\\!`:`\\, `;W?r(`${i}${t()}`):e.executeCommand([`insert`,i]);return}else if(n.key===`Enter`){n.preventDefault(),W?r(`\\\\${t()}`):e.executeCommand([`insert`,`\\\\`]),setTimeout(()=>{He(X),Q()},10);return}if(W&&n.key===`Backspace`){n.preventDefault(),r(t().slice(1));return}W&&i&&(n.preventDefault(),r(`${n.key}${t()}`))};return e.addEventListener(`keydown`,i),()=>e.removeEventListener(`keydown`,i)},[n,X,He,Q,W,Z,Le]),(0,e.useEffect)(()=>{let e=u.current;if(!e)return;let t=()=>{setTimeout(()=>{let t=e.shadowRoot;if(!t)return;let n=t.querySelector(`.ML__caret`)||t.querySelector(`[class*="caret"]`);n&&n.scrollIntoView({behavior:`auto`,block:`nearest`,inline:`nearest`}),Q()},0)};return e.addEventListener(`selection-change`,t),e.addEventListener(`input`,t),e.addEventListener(`keydown`,t),setTimeout(Q,50),()=>{e.removeEventListener(`selection-change`,t),e.removeEventListener(`input`,t),e.removeEventListener(`keydown`,t)}},[Q]);let $=(0,e.useCallback)(e=>{let t=u.current;if(!t)return;let n=/#(?:0|\?)/.test(e);t.focus(),typeof t.insert==`function`?t.insert(e,{format:`latex`,insertionMode:`replaceSelection`,selectionMode:n?`placeholder`:`after`}):t.executeCommand([`insert`,e]),requestAnimationFrame(()=>t.focus?.())},[]),Ke=(0,e.useCallback)(e=>{let t=u.current;if(t){if(t.focus(),e===`\\hphantom{0}`){t.executeCommand([`insert`,`\\hphantom{0}`]);return}if(e===`\\,`){Re(`thin`),t.executeCommand([`insert`,`\\,`]);return}e===`\\!`&&(Re(`negativeThin`),t.executeCommand([`insert`,`\\!`]))}},[]),qe=(0,e.useCallback)(e=>{let t=u.current,n=ie[e];if(!t||!n)return;let r=t.selection||t.model?.selection;if(!(r&&Array.isArray(r.ranges)&&r.ranges.length>0&&r.ranges.some(([e,t])=>e!==t))){h.current=null;return}if(t.focus(),`selection`in t)try{t.selection=r}catch{}let i=typeof t.getValue==`function`?t.getValue(r,`latex`)||``:t.model?.getValue?.(r,`latex`)||``;if(!i){h.current=null;return}let a=ae(i),o=h.current,s=a.baseLatex,c=o?.baseLatex===s,l=c?o.offsetX:a.offsetX,d=c?o.offsetY:a.offsetY,f=l+n.x,p=d+n.y,m=oe(s,f,p);if(h.current={baseLatex:s,offsetX:f,offsetY:p},typeof t.insert==`function`){t.insert(m,{format:`latex`,insertionMode:`replaceSelection`,selectionMode:`item`});return}t.executeCommand([`insert`,m])},[]),Je=(0,e.useCallback)((e,t,n)=>{let r=`\\begin{${e}} `;for(let e=0;e<t;e++){for(let e=0;e<n;e++)r+=`#?`,e<n-1&&(r+=` & `);e<t-1&&(r+=` \\\\ `)}r+=` \\end{${e}}`,$(r)},[$]),Ye=()=>{let e=u.current;if(!e)return;let t=e.getValue?e.getValue():e.value;if(!t||t.trim()===``){a();return}n===`chem`&&(t=le(t)),r(t,{direction:W?`rtl`:`ltr`}),e.setValue?e.setValue(``):e.value=``,a()},Xe=V!==`maximized`&&H?{left:`${H.x}px`,top:`${H.y}px`,right:`auto`,bottom:`auto`}:void 0;return(0,i.jsxs)(`div`,{ref:d,className:`cme-editor-popup ${V}${he?` dragging`:``}`,style:Xe,onMouseDown:e=>e.stopPropagation(),children:[(0,i.jsxs)(`div`,{className:`cme-popup-header`,onPointerDown:Ve,children:[(0,i.jsx)(`span`,{children:n===`math`?`MathType`:`ChemType`}),(0,i.jsxs)(`div`,{className:`cme-popup-actions`,onPointerDown:e=>e.stopPropagation(),children:[(0,i.jsx)(`button`,{type:`button`,className:`cme-popup-window-btn`,"aria-label":V===`minimized`?`Restore window`:`Minimize window`,onClick:()=>fe(e=>e===`minimized`?`normal`:`minimized`),children:V===`minimized`?`+`:`-`}),(0,i.jsx)(`button`,{type:`button`,className:`cme-popup-window-btn`,"aria-label":V===`maximized`?`Restore window`:`Maximize window`,onClick:()=>fe(e=>e===`maximized`?`normal`:`maximized`),children:V===`maximized`?`o`:`⤢ `}),(0,i.jsx)(`button`,{type:`button`,className:`cme-popup-close`,onClick:()=>{Be(),a()},children:`x`})]})]}),(0,i.jsxs)(`div`,{className:`cme-toolbar`,role:`toolbar`,"aria-label":`Symbol palette`,children:[(0,i.jsx)(`div`,{className:`cme-toolbar-groups`,children:je.map((e,t)=>(0,i.jsx)(`button`,{className:`cme-group-tab${J?` cme-group-tab--popup`:``}${q?` cme-group-tab--math`:``}${Me?` cme-group-tab--chem`:``}${_===t?` active`:``}`,type:`button`,onClick:()=>{v(t),b(null)},children:(0,i.jsx)(`span`,{className:`cme-group-tab-label`,children:e.label})},e.id||t))}),(0,i.jsx)(`div`,{className:`cme-toolbar-items${_===0&&q?` cme-toolbar-items--first-tab`:``}${Y.id===`greek`?` cme-toolbar-items--greek`:``}${Y.id===`relations`?` cme-toolbar-items--relations`:``}${Y.id===`arrows`?` cme-toolbar-items--arrows`:``}${Y.id===`brackets`?` cme-toolbar-items--brackets`:``}${Y.id===`matrix`?` cme-toolbar-items--matrix`:``}${J?` cme-toolbar-items--popup-compact`:``}`,children:(()=>{let e=Y.items||[];if(Y.id===`greek`){let t=e.reduce((e,t)=>{let n=t.category||`Greek Letters`;return e[n]||(e[n]=[]),e[n].push(t),e},{}),n={"Lowercase Greek Letters":{cols:10,rows:3},"Greek Letter Picker":{cols:1,rows:3},"Blackboard Bold / Number Sets":{cols:2,rows:3},"Blackboard Bold Picker":{cols:1,rows:3},"Fraktur Symbols":{cols:1,rows:3},"Script Symbols":{cols:1,rows:3},"Fraktur / Script Picker":{cols:1,rows:3},"Hebrew Mathematical Symbols":{cols:1,rows:3},"Hebrew Symbol Picker":{cols:1,rows:3},"Arabic-Indic Numeral Systems":{cols:1,rows:3},"Periodic Table Symbols":{cols:2,rows:3},"Periodic Table Picker":{cols:1,rows:3}},r=Object.entries(t);return(0,i.jsx)(`div`,{className:`cme-greek-panel`,children:r.map(([e,t],a)=>{let o=n[e]||{cols:2,rows:Math.max(1,Math.ceil(t.length/2))},s=o.cols,c=o.rows,l=t.every(e=>e.cls?.includes(`arrow-picker-tool`)),d=r[a+1]?.[1]||[],f=d.length>0&&d.every(e=>e.cls?.includes(`arrow-picker-tool`));return(0,i.jsx)(`section`,{className:`cme-symbol-subgroup cme-greek-subgroup${e===`Fraktur Symbols`?` cme-greek-subgroup--no-right-border`:``}${l?` cme-greek-subgroup--picker`:``}${f?` cme-greek-subgroup--before-picker`:``}${J?` cme-symbol-subgroup--compact`:``}${Ne}`,style:{gridTemplateColumns:`repeat(${s}, auto)`,gridTemplateRows:`repeat(${c}, auto)`,"--cme-greek-rows":`repeat(${c}, auto)`},children:t.map((t,n)=>{let r=Y,a=`${r.id||r.label||_}-${e}-${n}-${t.insert||t.action||t.label}`,o=t.action===`GREEK_ITALIC_PICKER`,s=t.action===`BLACKBOARD_BOLD_PICKER`,c=t.action===`FRAKTUR_SCRIPT_PICKER`,l=t.action===`HEBREW_SYMBOL_PICKER`,d=t.action===`PERIODIC_TABLE_PICKER`,f=t.action===`ARABIC_INDIC_NUMERALS`,p=t.action===`EASTERN_ARABIC_INDIC_NUMERALS`,m=o?!!k:s?!!j:c?!!N:l?!!F:d?!!L:f?Z===`arabicIndic`:p?Z===`easternArabicIndic`:!1;return(0,i.jsx)(`button`,{type:`button`,className:`cme-btn cme-greek-btn${J?` cme-btn--compact`:``}${t.cls?` ${t.cls}`:``}${m?` active`:``}`,title:t.title||t.insert,onMouseDown:e=>{if(e.preventDefault(),t.action===`GREEK_ITALIC_PICKER`){let t=e.currentTarget.getBoundingClientRect();w(null),O(null),z(null),S(null),M(null),P(null),I(null),R(null),A(e=>e?null:{x:t.left,y:t.bottom+4});return}if(t.action===`BLACKBOARD_BOLD_PICKER`){let t=e.currentTarget.getBoundingClientRect();w(null),O(null),z(null),S(null),A(null),P(null),I(null),R(null),M(e=>e?null:{x:t.left,y:t.bottom+4});return}if(t.action===`FRAKTUR_SCRIPT_PICKER`){let t=e.currentTarget.getBoundingClientRect();w(null),O(null),z(null),S(null),A(null),M(null),I(null),R(null),P(e=>e?null:{x:t.left,y:t.bottom+4});return}if(t.action===`HEBREW_SYMBOL_PICKER`){let t=e.currentTarget.getBoundingClientRect();w(null),O(null),z(null),S(null),A(null),M(null),P(null),R(null),I(e=>e?null:{x:t.left,y:t.bottom+4});return}if(t.action===`PERIODIC_TABLE_PICKER`){let t=e.currentTarget.getBoundingClientRect();w(null),O(null),z(null),S(null),A(null),M(null),P(null),I(null),R(e=>e?null:{x:t.left,y:t.bottom+4});return}if(t.action===`ARABIC_INDIC_NUMERALS`){w(null),O(null),z(null),S(null),A(null),M(null),P(null),I(null),R(null),Ie(e=>e===`arabicIndic`?`western`:`arabicIndic`),requestAnimationFrame(()=>u.current?.focus?.());return}if(t.action===`EASTERN_ARABIC_INDIC_NUMERALS`){w(null),O(null),z(null),S(null),A(null),M(null),P(null),I(null),R(null),Ie(e=>e===`easternArabicIndic`?`western`:`easternArabicIndic`),requestAnimationFrame(()=>u.current?.focus?.());return}$(t.insert)},children:ge(t,{groupId:r.id,isMathMode:q,isChemMode:Me})},a)})},e)})})}let t=e.some(e=>e.type===`sep`),n=[];if(t){let t={cols:2,items:[]};for(let r of e)r.type===`sep`?(t.items.length>0&&n.push(t),t={cols:r.cols||2,items:[]}):t.items.push(r);if(t.items.length>0&&n.push(t),Y.id===`relations`&&(n=n.map(e=>({...e,cols:Math.max(1,Math.ceil(e.items.length/3))}))),Y.id===`roots-main`){let[e=[],t=[],r=[],i=[],a=[],o=[],s=[],c=[],l=[],u=[]]=n.map(e=>e.items||[]),d=(e,t)=>t.map(t=>e[t]).filter(Boolean);n=[{cols:2,rows:2,flow:`row`,equalColumns:!0,className:` cme-roots-main-subgroup`,items:d(e,[0,2,1,3])},{cols:1,rows:2,flow:`row`,equalColumns:!0,className:` cme-roots-main-subgroup cme-roots-main-subgroup--stack`,items:d(t,[0,1])},{cols:2,rows:2,flow:`row`,equalColumns:!0,className:` cme-roots-main-subgroup`,items:d(r,[0,2,1,3])},{cols:2,rows:3,flow:`row`,equalColumns:!0,className:` cme-roots-main-subgroup`,items:d(i,[0,4,2,5,1,3])},{cols:2,rows:3,flow:`row`,equalColumns:!0,className:` cme-roots-main-subgroup`,items:d(a,[0,1,5,4,3,2])},{cols:1,rows:2,flow:`row`,equalColumns:!0,className:` cme-roots-main-subgroup cme-roots-main-subgroup--stack`,items:[]},{cols:1,rows:3,flow:`row`,equalColumns:!0,className:` cme-roots-main-subgroup cme-roots-main-subgroup--stack`,items:d(o,[0,1,2])},{cols:2,rows:3,flow:`row`,equalColumns:!0,className:` cme-roots-main-subgroup`,items:d(s,[1,3,0,4,2,5])},{cols:2,rows:3,flow:`row`,equalColumns:!0,className:` cme-roots-main-subgroup cme-roots-main-subgroup--format`,items:d(c,[0,5,1,3,2,4])},{cols:1,rows:1,flow:`row`,equalColumns:!0,className:` cme-roots-main-subgroup cme-roots-main-subgroup--stack`,items:d(l,[0])},{cols:1,rows:2,flow:`row`,equalColumns:!0,className:` cme-roots-main-subgroup cme-roots-main-subgroup--dropdown`,items:d(u,[0,1])}].filter(e=>e.items.length>0)}if(Y.id===`arrows`){let[e=[],t=[],r=[],i=[],a=[]]=n.map(e=>e.items||[]),o=(e,t)=>t.map(t=>e[t]).filter(Boolean),s=e=>({regular:e.filter(e=>e?.action!==`ARROW_PICKER`&&e?.action!==`ARROW_LABEL_PICKER`),picker:e.find(e=>e?.action===`ARROW_PICKER`||e?.action===`ARROW_LABEL_PICKER`)||null}),c=s(e),l=s(i);n=[{cols:3,trackCols:6,rows:3,flow:`row`,equalColumns:!0,className:` cme-arrows-subgroup cme-arrows-subgroup--before-picker`,items:o(c.regular,[1,0,2,4,3,5,6,7])},c.picker?{cols:1,rows:3,flow:`row`,equalColumns:!0,className:` cme-arrows-subgroup cme-arrows-subgroup--picker`,items:[c.picker]}:null,{cols:2,trackCols:2,rows:3,flow:`row`,equalColumns:!0,className:` cme-arrows-subgroup`,items:o(t,[0,1,2,3,4])},{cols:1,rows:3,flow:`row`,equalColumns:!0,className:` cme-arrows-subgroup cme-arrows-subgroup--stack`,items:o(r,[0,1,2])},{cols:3,rows:2,flow:`row`,equalColumns:!0,className:` cme-arrows-subgroup cme-arrows-subgroup--before-picker`,items:o(l.regular,[0,2,4,1,3,5])},l.picker?{cols:1,rows:2,flow:`row`,equalColumns:!0,className:` cme-arrows-subgroup cme-arrows-subgroup--picker`,items:[l.picker]}:null,{cols:2,trackCols:2,rows:2,flow:`row`,equalColumns:!0,stretchLastRow:!0,className:` cme-arrows-subgroup`,items:o(a,[0,1,2,3])}].filter(e=>e&&e.items.length>0)}if(Y.id===`brackets`){let[e=[],t=[],r=[],i=[],a=[]]=n.map(e=>e.items||[]),o=(e,t)=>t.map(t=>e[t]).filter(Boolean),s=e=>({regular:e.filter(e=>e?.action!==`RELATION_MORE_PICKER`),picker:e.find(e=>e?.action===`RELATION_MORE_PICKER`)||null}),c=s(e),l=s(i),u=s(a),d=o(r,[0,1,2,3,4,5,6,7]);d[6]&&={...d[6],gridColumn:`2`},n=[{cols:3,rows:2,flow:`row`,equalColumns:!0,className:` cme-brackets-subgroup cme-brackets-subgroup--before-picker`,items:o(c.regular,[0,2,4,1,3,5])},c.picker?{cols:1,rows:2,flow:`row`,equalColumns:!0,className:` cme-brackets-subgroup cme-brackets-subgroup--picker`,items:[c.picker]}:null,{cols:2,rows:2,flow:`row`,equalColumns:!0,className:` cme-brackets-subgroup`,items:o(t,[0,2,1,3])},{cols:3,rows:3,flow:`row`,equalColumns:!0,className:` cme-brackets-subgroup`,items:d},{cols:3,rows:2,flow:`row`,equalColumns:!0,className:` cme-brackets-subgroup cme-brackets-subgroup--before-picker`,items:o(l.regular,[0,2,4,1,3,5])},l.picker?{cols:1,rows:2,flow:`row`,equalColumns:!0,className:` cme-brackets-subgroup cme-brackets-subgroup--picker`,items:[l.picker]}:null,{cols:2,rows:2,flow:`row`,equalColumns:!0,className:` cme-brackets-subgroup cme-brackets-subgroup--before-picker`,items:o(u.regular,[0,2,1,3])},u.picker?{cols:1,rows:2,flow:`row`,equalColumns:!0,className:` cme-brackets-subgroup cme-brackets-subgroup--picker`,items:[u.picker]}:null].filter(e=>e&&e.items.length>0)}}else for(let t=0;t<e.length;t+=4)n.push({cols:2,items:e.slice(t,t+4)});return n.map((e,t)=>{let n=e.cols||1,r=e.trackCols||n,a=e.items.length,o=n>0?a%n:0,s=o===0?n:o,c=a-s,l=Math.max(1,Math.floor(r/n));return(0,i.jsx)(`div`,{className:`cme-symbol-subgroup${e.className||``}${J?` cme-symbol-subgroup--compact`:``}${Ne}`,style:{gridTemplateColumns:`repeat(${r}, ${e.equalColumns?`minmax(0, 1fr)`:`auto`})`,gridTemplateRows:`repeat(${e.rows||Math.ceil(e.items.length/n)}, auto)`,gridAutoFlow:e.flow||`column`,...e.rows?{"--cme-subgroup-rows":`repeat(${e.rows}, minmax(0, 1fr))`}:{}},children:e.items.map((o,d)=>{let f=e.stretchLastRow&&a>0&&d>=c&&s<n?`span ${Math.max(1,Math.floor(r/s))}`:l>1?`span ${l}`:void 0,p=Y,m=p.id||p.label||_,h=`${m}-${t*4+d}-${o.insert||o.action||o.label}`;if(o.type===`dropdown`){let t=o.label===`Font...`,n=o.label===`Size`,r=t&&X.fontOption!==``,a=n&&X.fontSize!==`auto`&&X.fontSize!==`5`,s=t?X.fontOption:n?X.fontSize===`auto`||X.fontSize===`5`?``:X.fontSize:``,c=(t?te:re).find(e=>e.value===s)?.label||o.label,l=B?.buttonKey===h;return(0,i.jsx)(`button`,{type:`button`,className:`cme-style-select-trigger cme-select cme-btn template${r||a||l?` active`:``}`,title:o.label,style:{width:o.width||`60px`,boxSizing:`border-box`,margin:`2px 0`,gridColumn:o.gridColumn||f||(e.cols===3||e.cols===1?`span 1`:`span 2`),gridRow:o.gridRow},onMouseDown:e=>{e.preventDefault(),e.stopPropagation();let n=e.currentTarget.getBoundingClientRect();de(e=>e?.buttonKey===h?null:{x:n.left,y:n.bottom,type:t?`font`:`size`,buttonKey:h})},children:c},d)}if(p.isMatrix&&!o.directInsert&&!o.action)return(0,i.jsx)(`div`,{className:`cme-matrix-btn-wrapper`,children:(0,i.jsx)(`button`,{type:`button`,className:`cme-btn template${J?` cme-btn--compact`:``}${o.cls?` ${o.cls}`:``}${y?.type===o.insert?` active`:``}`,title:o.insert,onMouseDown:e=>{if(e.preventDefault(),e.stopPropagation(),y?.type===o.insert)b(null);else{let t=e.currentTarget.getBoundingClientRect();b({type:o.insert,x:t.left+t.width/2,y:t.bottom})}},children:ge(o,{groupId:p.id,isMathMode:q,isChemMode:Me})})},d);let g=o.action===`BOLD`,v=o.action===`ITALIC`,x=o.action===`BOLD_ITALIC`,k=o.action===`TEXT_COLOR`,ne=o.action===`TOGGLE_RTL`,ie=o.action===`ARROW_PICKER`,ae=o.action===`RELATION_MORE_PICKER`,oe=o.action===`ARROW_LABEL_PICKER`,se=o.action===`BLACKBOARD_BOLD_PICKER`,ce=o.action===`FRAKTUR_SCRIPT_PICKER`,le=o.action===`HEBREW_SYMBOL_PICKER`,ue=o.action===`PERIODIC_TABLE_PICKER`,V=g&&X.bold&&!X.italic||v&&X.italic&&!X.bold||x&&X.boldItalic||ne&&W||ie&&!!C||ae&&T?.picker===o.picker||oe&&!!D||se&&!!j||ce&&!!N||le&&!!F||ue&&!!L||k&&X.color!==`none`;return(0,i.jsx)(`button`,{type:`button`,className:`cme-btn${p.isTemplate?` template`:``}${J?` cme-btn--compact`:``}${o.cls?` ${o.cls}`:``}${V?` active`:``}`,title:o.title||o.insert,style:o.gridColumn||o.gridRow||f?{gridColumn:o.gridColumn||f,gridRow:o.gridRow}:void 0,onMouseDown:e=>{e.preventDefault();let t=u.current;if(o.action===`SPECIAL_CHARS`){let t=e.currentTarget.getBoundingClientRect();w(null),E(null),O(null),A(null),M(null),P(null),I(null),R(null),z(null),S({x:t.left,y:t.bottom+4})}else if(o.action===`ARROW_PICKER`){let t=e.currentTarget.getBoundingClientRect();S(null),E(null),O(null),A(null),M(null),P(null),I(null),R(null),z(null),w(e=>e?null:{x:t.left,y:t.bottom+4})}else if(o.action===`RELATION_MORE_PICKER`){let t=e.currentTarget.getBoundingClientRect();S(null),w(null),O(null),A(null),M(null),P(null),I(null),R(null),z(null),E(e=>e?.picker===o.picker?null:{x:t.left,y:t.bottom+4,picker:o.picker})}else if(o.action===`ARROW_LABEL_PICKER`){let t=e.currentTarget.getBoundingClientRect();S(null),w(null),E(null),A(null),M(null),P(null),I(null),R(null),z(null),O(e=>e?null:{x:t.left,y:t.bottom+4})}else if(o.action===`BLACKBOARD_BOLD_PICKER`){let t=e.currentTarget.getBoundingClientRect();S(null),w(null),O(null),z(null),E(null),A(null),P(null),I(null),R(null),M(e=>e?null:{x:t.left,y:t.bottom+4})}else if(o.action===`FRAKTUR_SCRIPT_PICKER`){let t=e.currentTarget.getBoundingClientRect();S(null),w(null),O(null),z(null),E(null),A(null),M(null),I(null),R(null),P(e=>e?null:{x:t.left,y:t.bottom+4})}else if(o.action===`HEBREW_SYMBOL_PICKER`){let t=e.currentTarget.getBoundingClientRect();S(null),w(null),O(null),z(null),E(null),A(null),M(null),P(null),R(null),I(e=>e?null:{x:t.left,y:t.bottom+4})}else if(o.action===`PERIODIC_TABLE_PICKER`){let t=e.currentTarget.getBoundingClientRect();S(null),w(null),O(null),z(null),E(null),A(null),M(null),P(null),I(null),R(e=>e?null:{x:t.left,y:t.bottom+4})}else if(o.action===`TEXT_COLOR`){let t=e.currentTarget.getBoundingClientRect();w(null),E(null),O(null),A(null),M(null),P(null),I(null),R(null),ke(X.color===`none`?``:X.color),Ae(``),z({x:t.left,y:t.bottom+4})}else if(o.action===`TOGGLE_RTL`)Oe(e=>!e),requestAnimationFrame(()=>u.current?.focus?.());else if(o.action===`BOLD`)Ue(!X.bold,X.italic);else if(o.action===`BOLD_ITALIC`){let e=!X.boldItalic;Ue(e,e)}else if(o.action===`CUT`){let e=t?t.getValue?t.getValue():t.value||``:``;e&&navigator.clipboard?.writeText&&navigator.clipboard.writeText(e).catch(()=>{}),t&&(typeof t.setValue==`function`?t.setValue(``):t.value=``,t.focus?.())}else if(o.action===`COPY`){let e=t?t.getValue?t.getValue():t.value||``:``;e&&navigator.clipboard?.writeText&&navigator.clipboard.writeText(e).catch(()=>{})}else o.action===`PASTE`?navigator.clipboard?.readText&&navigator.clipboard.readText().then(e=>{e&&$(ee(e,Z))}).catch(()=>{}):o.action===`ARABIC_INDIC_NUMERALS`?(Ie(e=>e===`arabicIndic`?`western`:`arabicIndic`),requestAnimationFrame(()=>u.current?.focus?.())):o.action===`EASTERN_ARABIC_INDIC_NUMERALS`?(Ie(e=>e===`easternArabicIndic`?`western`:`easternArabicIndic`),requestAnimationFrame(()=>u.current?.focus?.())):o.action===`MOVE_TEXT_UP`?qe(`up`):o.action===`MOVE_TEXT_RIGHT`?qe(`right`):o.action===`MOVE_TEXT_LEFT`?qe(`left`):o.action===`MOVE_TEXT_DOWN`?qe(`down`):o.action===`BLACKBOARD`?$(`\\mathbb{#0}`):o.action===`GREEK`?$(`\\Omega`):o.action===`TILDE`?$(`\\widetilde{#0}`):o.action===`ITALIC`?Ue(X.bold,!X.italic):o.action===`TEXT`?$(`\\text{#0}`):o.action===`UNDO`?u.current?.executeCommand(`undo`):o.action===`REDO`?u.current?.executeCommand(`redo`):o.action===`CLEAR`?t&&(typeof t.setValue==`function`?t.setValue(``):t.value=``,t.focus?.()):o.insert===`\\hphantom{0}`||o.insert===`\\,`||o.insert===`\\!`?Ke(o.insert):$(o.insert)},children:ge(o,{groupId:p.id,isMathMode:q,isChemMode:Me})},`${m}-${t*4+d}`)})},t)})})()})]}),(0,i.jsx)(`div`,{className:`cme-mathfield-container${W?` cme-mathfield-container--rtl`:``}`,onMouseDown:e=>{u.current&&(e.target===u.current||u.current.contains(e.target))||(e.preventDefault(),requestAnimationFrame(()=>{u.current?.focus?.()}))},children:(0,i.jsx)(`math-field`,{ref:u,class:`cme-mathfield${W?` cme-mathfield--rtl`:``}`,dir:W?`rtl`:`ltr`,"letter-shape-style":`upright`,tabIndex:0,"math-virtual-keyboard-policy":`manual`,placeholder:``})}),(0,i.jsxs)(`div`,{className:`cme-popup-footer`,children:[(0,i.jsx)(`button`,{type:`button`,className:`cme-insert-btn`,onClick:Ye,children:l?`Update`:`Insert`}),(0,i.jsx)(`button`,{type:`button`,className:`cme-cancel-btn`,onClick:a,children:`Cancel`})]}),y&&(0,i.jsx)(De,{matrixType:y.type,x:y.x,y:y.y,onSelect:(e,t)=>{Je(y.type,e,t),b(null)},onMouseEnter:()=>{},onMouseLeave:()=>{}}),x&&(0,t.createPortal)((0,i.jsx)(s,{isOpen:!!x,position:x,onClose:()=>S(null),onInsert:e=>{$(e),S(null)}}),document.body),C&&(0,t.createPortal)((0,i.jsx)(_e,{position:C,onInsert:e=>{$(e),w(null)}}),document.body),T&&(0,t.createPortal)((0,i.jsx)(ve,{position:T,picker:T.picker,popupBounds:d.current?.getBoundingClientRect?.()||null,items:g[T.picker]||[],onInsert:e=>{$(e),E(null)}}),document.body),D&&(0,t.createPortal)((0,i.jsx)(ye,{position:D,onInsert:e=>{$(e),O(null)}}),document.body),k&&(0,t.createPortal)((0,i.jsx)(be,{position:k,onInsert:e=>{$(e),A(null)}}),document.body),j&&(0,t.createPortal)((0,i.jsx)(xe,{position:j,onInsert:e=>{$(e),M(null)}}),document.body),N&&(0,t.createPortal)((0,i.jsx)(Se,{position:N,onInsert:e=>{$(e),P(null)}}),document.body),F&&(0,t.createPortal)((0,i.jsx)(Ce,{position:F,onInsert:e=>{$(e),I(null)}}),document.body),L&&(0,t.createPortal)((0,i.jsx)(we,{position:L,onInsert:e=>{$(e),R(null)}}),document.body),B&&(0,t.createPortal)((0,i.jsx)(Te,{position:B,options:B.type===`font`?te:re,value:B.type===`font`?X.fontOption:X.fontSize,width:B.type===`font`?142:96,onSelect:e=>{Ge(B.type,e),de(null)}}),document.body),ue&&(0,t.createPortal)((0,i.jsxs)(`div`,{className:`cme-color-picker-popup`,style:{position:`fixed`,left:Math.min(ue.x,window.innerWidth-260)+`px`,top:Math.min(ue.y,window.innerHeight-235)+`px`,zIndex:1e5,width:`244px`,background:`linear-gradient(180deg, #ffffff 0%, #f6fafc 100%)`,border:`1px solid #c8d4dc`,padding:`12px`,display:`flex`,flexDirection:`column`,gap:`10px`,borderRadius:`10px`,boxShadow:`0 16px 28px rgba(15, 23, 42, 0.18), 0 2px 6px rgba(15, 23, 42, 0.08)`},children:[(0,i.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:`10px`},children:[(0,i.jsxs)(`div`,{children:[(0,i.jsx)(`div`,{style:{fontSize:`12px`,fontWeight:700,color:`#1f2f37`,lineHeight:1.1},children:`Text Color`}),(0,i.jsx)(`div`,{style:{fontSize:`10px`,color:`#667b88`,marginTop:`2px`},children:`Pick a swatch or enter a custom value`})]}),(0,i.jsx)(`div`,{style:{width:`28px`,height:`28px`,borderRadius:`8px`,border:`1px solid #b8c8d2`,background:X.color===`none`?`linear-gradient(135deg, #ffffff 0%, #eef3f7 100%)`:me(G)||X.color,boxShadow:`inset 0 1px 0 rgba(255,255,255,0.8)`},title:X.color===`none`?`No color selected`:X.color})]}),(0,i.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(6, 1fr)`,gap:`6px`,padding:`8px`,border:`1px solid #d7e1e8`,borderRadius:`8px`,background:`rgba(255,255,255,0.78)`},children:Pe.map(e=>{let t=X.color===e.normalized;return(0,i.jsx)(`div`,{title:e.label,style:{width:`22px`,height:`22px`,backgroundColor:e.value,cursor:`pointer`,border:t?`2px solid #d6a528`:`1px solid rgba(31, 47, 55, 0.22)`,borderRadius:`6px`,boxSizing:`border-box`,boxShadow:t?`0 0 0 2px rgba(214, 165, 40, 0.16)`:`inset 0 1px 0 rgba(255,255,255,0.6)`},onMouseDown:t=>{t.preventDefault(),t.stopPropagation(),We(e.normalized)&&z(null)}},e.normalized)})}),(0,i.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`6px`},children:[(0,i.jsx)(`div`,{style:{fontSize:`10px`,fontWeight:700,color:`#5f7481`,letterSpacing:`0.04em`,textTransform:`uppercase`},children:`Custom Value`}),(0,i.jsx)(`input`,{type:`text`,value:G,placeholder:`#2c8a43 or tomato`,style:{width:`100%`,minWidth:0,height:`32px`,border:`1px solid ${K?`#dc2626`:`#b7c7d1`}`,borderRadius:`8px`,padding:`0 10px`,fontSize:`12px`,color:`#22343d`,background:`#fff`,boxSizing:`border-box`,outline:`none`},onChange:e=>{ke(e.target.value),K&&Ae(``)},onMouseDown:e=>e.stopPropagation(),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),e.stopPropagation(),We(G)&&z(null))}})]}),(0,i.jsxs)(`div`,{style:{display:`flex`,gap:`8px`},children:[(0,i.jsx)(`button`,{type:`button`,style:{flex:1,border:`1px solid #7a92a1`,borderRadius:`8px`,background:`linear-gradient(180deg, #8ea3b0 0%, #738d9d 100%)`,color:`#fff`,fontSize:`11px`,fontWeight:600,height:`30px`,minWidth:0,padding:`0 10px`,cursor:`pointer`},onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),We(G)&&z(null)},children:`Apply Color`}),(0,i.jsx)(`button`,{type:`button`,style:{width:`32px`,minWidth:`32px`,border:`1px solid #c4d0d8`,borderRadius:`8px`,background:`#ffffff`,color:`#647987`,fontSize:`12px`,fontWeight:700,height:`30px`,padding:0,cursor:`pointer`},title:`Clear color`,onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),We(`none`),z(null)},children:`×`})]}),K?(0,i.jsx)(`div`,{style:{fontSize:`10px`,color:`#b91c1c`,lineHeight:1.2,marginTop:`-2px`},children:K}):null]}),document.body)]})}function Oe(e){let t=e,n=t.match(/^\\ce\{([\s\S]*)\}$/);n&&(t=n[1]);let r=[[`\\varepsilon`,`ε`],[`\\varphi`,`φ`],[`\\alpha`,`α`],[`\\beta`,`β`],[`\\gamma`,`γ`],[`\\delta`,`δ`],[`\\epsilon`,`ε`],[`\\zeta`,`ζ`],[`\\eta`,`η`],[`\\theta`,`θ`],[`\\iota`,`ι`],[`\\kappa`,`κ`],[`\\lambda`,`λ`],[`\\mu`,`μ`],[`\\nu`,`ν`],[`\\xi`,`ξ`],[`\\pi`,`π`],[`\\rho`,`ρ`],[`\\sigma`,`σ`],[`\\tau`,`τ`],[`\\upsilon`,`υ`],[`\\phi`,`φ`],[`\\chi`,`χ`],[`\\psi`,`ψ`],[`\\omega`,`ω`],[`\\Gamma`,`Γ`],[`\\Delta`,`Δ`],[`\\Theta`,`Θ`],[`\\Lambda`,`Λ`],[`\\Xi`,`Ξ`],[`\\Pi`,`Π`],[`\\Sigma`,`Σ`],[`\\Upsilon`,`Υ`],[`\\Phi`,`Φ`],[`\\Psi`,`Ψ`],[`\\Omega`,`Ω`],[`\\pm`,`±`],[`\\mp`,`∓`],[`\\times`,`×`],[`\\div`,`÷`],[`\\backslash`,`\\`],[`\\cdot`,`·`],[`\\neq`,`≠`],[`\\leq`,`≤`],[`\\geq`,`≥`],[`\\approx`,`≈`],[`\\equiv`,`≡`],[`\\infty`,`∞`],[`\\sum`,`∑`],[`\\prod`,`∏`],[`\\int`,`∫`],[`\\oint`,`∮`],[`\\iint`,`∬`],[`\\iiint`,`∭`],[`\\oiint`,`∯`],[`\\partial`,`∂`],[`\\nabla`,`∇`],[`\\in`,`∈`],[`\\notin`,`∉`],[`\\subset`,`⊂`],[`\\subseteq`,`⊆`],[`\\supset`,`⊃`],[`\\supseteq`,`⊇`],[`\\cup`,`∪`],[`\\cap`,`∩`],[`\\emptyset`,`∅`],[`\\setminus`,`﹨`],[`\\forall`,`∀`],[`\\exists`,`∃`],[`\\neg`,`¬`],[`\\land`,`∧`],[`\\lor`,`∨`],[`\\leftrightarrow`,`↔`],[`\\Leftrightarrow`,`⇔`],[`\\rightarrow`,`→`],[`\\leftarrow`,`←`],[`\\Rightarrow`,`⇒`],[`\\Leftarrow`,`⇐`],[`\\uparrow`,`↑`],[`\\downarrow`,`↓`],[`\\sin`,`sin`],[`\\cos`,`cos`],[`\\tan`,`tan`],[`\\cot`,`cot`],[`\\sec`,`sec`],[`\\csc`,`csc`],[`\\log`,`log`],[`\\ln`,`ln`],[`\\exp`,`exp`],[`\\lim`,`lim`],...S.map(({insert:e,label:t})=>[e,t]),...C.map(({insert:e,label:t})=>[e,t]),...w.map(({insert:e,label:t})=>[e,t]),[`\\wp`,`℘`],[`\\left(`,`(`],[`\\right)`,`)`],[`\\left[`,`[`],[`\\right]`,`]`],[`\\left|`,`|`],[`\\right|`,`|`],[`\\left\\{`,`{`],[`\\right\\}`,`}`],[`\\,`,` `],[`\\;`,` `],[`\\quad`,` `],[`\\qquad`,` `],[`\\prime`,`′`],[`\\vdots`,`⋮`],[`\\cdots`,`⋯`],[`\\ddots`,`⋱`],[`\\ldots`,`…`]];for(let[e,n]of r){let r=e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);t=t.replace(new RegExp(r,`g`),n)}t=t.replace(/\\frac\{([^}]*)\}\{([^}]*)\}/g,`$1/$2`),t=t.replace(/\\sqrt\[([^\]]*)\]\{([^}]*)\}/g,`$1√($2)`),t=t.replace(/\\sqrt\{([^}]*)\}/g,`√($1)`),t=t.replace(/\\vec\{([^}]*)\}/g,`$1⃗`),t=t.replace(/\\hat\{([^}]*)\}/g,`$1̂`),t=t.replace(/\\bar\{([^}]*)\}/g,`$1̄`),t=t.replace(/\\ddot\{([^}]*)\}/g,`$1̈`),t=t.replace(/\\dot\{([^}]*)\}/g,`$1̇`),t=t.replace(/\\text\{([^}]*)\}/g,`$1`),t=t.replace(/\\begin\{pmatrix\}([\s\S]*?)\\end\{pmatrix\}/g,(e,t)=>`[`+t.replace(/\\\\/g,`; `).replace(/&/g,`, `).trim()+`]`);let i={0:`⁰`,1:`¹`,2:`²`,3:`³`,4:`⁴`,5:`⁵`,6:`⁶`,7:`⁷`,8:`⁸`,9:`⁹`,"+":`⁺`,"-":`⁻`,"=":`⁼`,"(":`⁽`,")":`⁾`,n:`ⁿ`,i:`ⁱ`};t=t.replace(/\^\{([^}]*)\}/g,(e,t)=>t.split(``).map(e=>i[e]||e).join(``)),t=t.replace(/\^([a-zA-Z0-9])/g,(e,t)=>i[t]||t);let a={0:`₀`,1:`₁`,2:`₂`,3:`₃`,4:`₄`,5:`₅`,6:`₆`,7:`₇`,8:`₈`,9:`₉`,"+":`₊`,"-":`₋`,"=":`₌`,"(":`₍`,")":`₎`,a:`ₐ`,e:`ₑ`,o:`ₒ`,x:`ₓ`,i:`ᵢ`,j:`ⱼ`,n:`ₙ`};return t=t.replace(/_\{([^}]*)\}/g,(e,t)=>t.split(``).map(e=>a[e]||e).join(``)),t=t.replace(/_([a-zA-Z0-9])/g,(e,t)=>a[t]||t),t=t.replace(/->/g,`→`),t=t.replace(/<=>/g,`⇌`),t=t.replace(/\\[a-zA-Z]+/g,``),t=t.replace(/[{}]/g,``),t=t.replace(/\s+/g,` `),t=t.replace(/\\\\/g,`
2622
+ `),t.trim()}function G(e=``){if(!e||typeof document>`u`)return e||``;let t=document.createElement(`template`);return t.innerHTML=e,t.content.querySelectorAll(`.math-tex`).forEach(e=>{e.getAttribute(`data-latex`)||e.setAttribute(`data-latex`,e.textContent||``),e.textContent=``}),t.innerHTML}function ke(e){e&&e.querySelectorAll(`.math-tex`).forEach(e=>{let t=e.getAttribute(`data-latex`)||e.textContent||``,n=e.getAttribute(`data-dir`)||`ltr`;e.innerHTML=``;let r=document.createElement(`math-field`);r.setAttribute(`read-only`,``),r.setAttribute(`math-virtual-keyboard-policy`,`manual`),r.setAttribute(`tabindex`,`-1`),r.setAttribute(`letter-shape-style`,`upright`),r.setAttribute(`dir`,n),r.style.display=`inline-block`,r.style.width=`auto`,r.style.maxWidth=`100%`,r.style.verticalAlign=`middle`,r.style.border=`none`,r.style.background=`transparent`,r.style.outline=`none`,r.style.fontSize=`inherit`,r.style.minHeight=`auto`,r.style.padding=`0 2px`,r.style.margin=`0`,r.style.pointerEvents=`none`,r.style.direction=n,r.style.textAlign=n===`rtl`?`right`:`left`,r.style.unicodeBidi=n===`rtl`?`plaintext`:`normal`,r.style.color=`#000000`;let i=()=>{r.setValue?r.setValue(t,{silenceNotifications:!0}):r.value=t};customElements.get(`math-field`)?i():customElements.whenDefined(`math-field`).then(i),e.appendChild(r)})}function K({value:a,defaultValue:o=``,onChange:s,className:u=``,title:f=`custom ck editor`,showPreviewButton:m=!0,previewButtonLabel:h=`Preview Question`,previewModalTitle:g=`Question Preview`,previewEmptyMessage:_=`Type your question to preview it here.`}){let v=(0,e.useRef)(null),y=(0,e.useRef)(!1),[b,x]=(0,e.useState)(null),[S,C]=(0,e.useState)(null),[w,T]=(0,e.useState)(!1),[E,ee]=(0,e.useState)(``),D=(0,e.useRef)(null),O=a!==void 0,[k,A]=(0,e.useState)(()=>a??o);(0,e.useEffect)(()=>{y.current=!!b},[b]),(0,e.useEffect)(()=>{O&&A(a??``)},[O,a]),(0,e.useEffect)(()=>()=>{window.__ckMathWidgetClickHandler=null},[]);let j=(0,e.useCallback)(e=>{C(null),y.current=!0,x(e)},[]),te=(0,e.useCallback)(()=>{y.current=!1,x(null),C(null);let e=v.current;e&&e.model.change(e=>{e.setSelection(null)})},[]),[ne,re]=(0,e.useState)(!1),ie=(0,e.useCallback)((e,{direction:t=`ltr`}={})=>{let n=v.current;if(!n||!e?.trim())return;let r={latex:e.trim(),dir:t===`rtl`?`rtl`:`ltr`};if(S){let e=d(n,S.modelElement)?S.modelElement:null;e?n.model.change(t=>{let n=t.createElement(`mathInline`,r),i=t.createPositionBefore(e);t.insert(n,i),t.remove(e),t.setSelection(t.createPositionAfter(n))}):n.model.change(e=>{let t=e.createElement(`mathInline`,r);n.model.insertContent(t)}),C(null)}else if(ne){let t=Oe(e.trim());if(!t)return;n.model.change(e=>{let r=e.createText(t);n.model.insertContent(r)})}else n.model.change(e=>{let t=e.createElement(`mathInline`,r);n.model.insertContent(t),n.model.insertContent(e.createText(` `))});n.editing.view.focus()},[ne,S]),ae=(0,e.useMemo)(()=>Ee(j),[j]),oe=(0,e.useCallback)(e=>{v.current=e;let t=(e,t,n=`ltr`)=>{if(!t)return;let r=/^\\ce\{/.test(t),i=e?.getAttribute(`dir`)===`rtl`||n===`rtl`?`rtl`:`ltr`;y.current=!0,C({modelElement:e,latex:t,direction:i}),x(r?`chem`:`math`)};e.mathWidgetClickHandler=t,window.__ckMathWidgetClickHandler=t;let n=e.ui.getEditableElement();if(!n||n._ckMathClickAttached)return;n._ckMathClickAttached=!0;let r=t=>{let n=c(t.target);n&&t.button===0&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation?.(),p(e,null,l(n),n))};n.addEventListener(`mousedown`,r,!0),n.addEventListener(`click`,r,!0)},[]),se=(0,e.useCallback)(()=>{let e=v.current;ee(G((e?e.getData():k)||``)),T(!0)},[k]),ce=(0,e.useCallback)(()=>{T(!1)},[]);return(0,e.useEffect)(()=>{if(!w)return;let e=e=>{e.key===`Escape`&&T(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[w]),(0,e.useLayoutEffect)(()=>{w&&ke(D.current)},[w,E]),(0,i.jsxs)(`div`,{className:`ck-editor-shell ${u}`.trim(),children:[(0,i.jsx)(`style`,{children:`
2623
2623
  .ck-powered-by { display: none !important; }
2624
2624
  .ck-math-widget {
2625
2625
  display: inline-block !important;
@@ -2655,4 +2655,4 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
2655
2655
  }
2656
2656
  .ck-math-widget:hover,
2657
2657
  .ck-math-widget.ck-widget_selected { outline: 2px solid #0f766e; outline-offset: 1px; border-radius: 4px; }
2658
- `}),(f||m)&&(0,i.jsxs)(`div`,{className:`ck-preview-toolbar`,children:[f?(0,i.jsx)(`p`,{className:`ck-preview-toolbar-label`,children:f}):null,m?(0,i.jsx)(`button`,{id:`ck-preview-question-btn`,type:`button`,className:`ck-preview-trigger`,onClick:ae,children:(0,i.jsx)(`span`,{children:h})}):null]}),(0,i.jsx)(n.CKEditor,{editor:r.ClassicEditor,data:O,onReady:ie,config:{licenseKey:`GPL`,plugins:[r.Essentials,r.Bold,r.Italic,r.Underline,r.Paragraph,r.Heading,r.Table,r.TableToolbar,r.TableCellProperties,r.TableProperties,r.List,r.Link,r.Undo,ue,re],toolbar:{items:[`heading`,`|`,`bold`,`italic`,`underline`,`|`,`bulletedList`,`numberedList`,`|`,`insertTable`,`|`,`link`,`|`,`mathType`,`chemType`,`|`,`undo`,`redo`]},table:{contentToolbar:[`tableColumn`,`tableRow`,`mergeTableCells`,`tableProperties`,`tableCellProperties`]}},onChange:(e,t)=>{let n=t.getData();D||k(n),s&&s(n)}}),b&&(0,i.jsx)(G,{mode:b,onInsert:ne,onClose:j,initialLatex:S?.latex||``,initialDirection:S?.direction||`ltr`,isEditing:!!S}),w&&(0,t.createPortal)((0,i.jsx)(`div`,{id:`ck-preview-modal-overlay`,className:`ck-preview-modal-overlay`,onClick:oe,children:(0,i.jsxs)(`div`,{id:`ck-preview-modal`,className:`ck-preview-modal`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`ck-preview-modal-title`,onClick:e=>e.stopPropagation(),children:[(0,i.jsxs)(`div`,{className:`ck-preview-modal-header`,children:[(0,i.jsx)(`h2`,{id:`ck-preview-modal-title`,className:`ck-preview-modal-title`,children:g}),(0,i.jsx)(`button`,{id:`ck-preview-modal-close-x`,type:`button`,className:`ck-preview-modal-icon-button`,onClick:oe,"aria-label":`Close preview`,children:`×`})]}),(0,i.jsx)(`div`,{className:`ck-preview-modal-body`,children:E&&E.trim()?(0,i.jsx)(`div`,{className:`ck-preview-render-zone`,dangerouslySetInnerHTML:{__html:E}}):(0,i.jsx)(`p`,{className:`ck-preview-empty-state`,children:_})}),(0,i.jsx)(`div`,{className:`ck-preview-modal-footer`,children:(0,i.jsx)(`button`,{id:`ck-preview-modal-close-btn`,type:`button`,className:`ck-preview-modal-close-button`,onClick:oe,children:`Close`})})]})}),document.body)]})}var Oe=K;exports.CkEditor=K,exports.CustomCkEditorPackage=K,exports.default=Oe;
2658
+ `}),(f||m)&&(0,i.jsxs)(`div`,{className:`ck-preview-toolbar`,children:[f?(0,i.jsx)(`p`,{className:`ck-preview-toolbar-label`,children:f}):null,m?(0,i.jsx)(`button`,{id:`ck-preview-question-btn`,type:`button`,className:`ck-preview-trigger`,onClick:se,children:(0,i.jsx)(`span`,{children:h})}):null]}),(0,i.jsx)(n.CKEditor,{editor:r.ClassicEditor,data:k,onReady:oe,config:{licenseKey:`GPL`,plugins:[r.Essentials,r.Bold,r.Italic,r.Underline,r.Paragraph,r.Heading,r.Table,r.TableToolbar,r.TableCellProperties,r.TableProperties,r.List,r.Link,r.Undo,de,ae],toolbar:{items:[`heading`,`|`,`bold`,`italic`,`underline`,`|`,`bulletedList`,`numberedList`,`|`,`insertTable`,`|`,`link`,`|`,`mathType`,`chemType`,`|`,`undo`,`redo`]},table:{contentToolbar:[`tableColumn`,`tableRow`,`mergeTableCells`,`tableProperties`,`tableCellProperties`]}},onChange:(e,t)=>{let n=t.getData();O||A(n),s&&s(n)}}),b&&(0,i.jsx)(W,{mode:b,onInsert:ie,onClose:te,initialLatex:S?.latex||``,initialDirection:S?.direction||`ltr`,isEditing:!!S}),w&&(0,t.createPortal)((0,i.jsx)(`div`,{id:`ck-preview-modal-overlay`,className:`ck-preview-modal-overlay`,onClick:ce,children:(0,i.jsxs)(`div`,{id:`ck-preview-modal`,className:`ck-preview-modal`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`ck-preview-modal-title`,onClick:e=>e.stopPropagation(),children:[(0,i.jsxs)(`div`,{className:`ck-preview-modal-header`,children:[(0,i.jsx)(`h2`,{id:`ck-preview-modal-title`,className:`ck-preview-modal-title`,children:g}),(0,i.jsx)(`button`,{id:`ck-preview-modal-close-x`,type:`button`,className:`ck-preview-modal-icon-button`,onClick:ce,"aria-label":`Close preview`,children:`×`})]}),(0,i.jsx)(`div`,{className:`ck-preview-modal-body`,children:(0,i.jsx)(`div`,{ref:D,className:`ck-preview-render-zone`,dangerouslySetInnerHTML:{__html:E}})}),(0,i.jsx)(`div`,{className:`ck-preview-modal-footer`,children:(0,i.jsx)(`button`,{id:`ck-preview-modal-close-btn`,type:`button`,className:`ck-preview-modal-close-button`,onClick:ce,children:`Close`})})]})}),document.body)]})}var Ae=K;exports.CkEditor=K,exports.CustomCkEditorPackage=K,exports.default=Ae;