You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Problemset__Preview__ind...

3261 lines
1.0 MiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

!(function(){var po=Math.pow;var rs=(wr,xt,x)=>new Promise((D,G)=>{var ye=Y=>{try{H(x.next(Y))}catch(he){G(he)}},me=Y=>{try{H(x.throw(Y))}catch(he){G(he)}},H=Y=>Y.done?D(Y.value):Promise.resolve(Y.value).then(ye,me);H((x=x.apply(wr,xt)).next())});(self.webpackChunk=self.webpackChunk||[]).push([[1581],{84105:function(wr,xt,x){"use strict";x.d(xt,{Z:function(){return S}});var D=x(54476),G=x(59301),ye={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},me=ye,H=x(7657),Y=function(Ge,Ze){return G.createElement(H.Z,(0,D.Z)({},Ge,{ref:Ze,icon:me}))},he=G.forwardRef(Y),S=he},18785:function(wr,xt,x){"use strict";x.d(xt,{Z:function(){return S}});var D=x(54476),G=x(59301),ye={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},me=ye,H=x(7657),Y=function(Ge,Ze){return G.createElement(H.Z,(0,D.Z)({},Ge,{ref:Ze,icon:me}))},he=G.forwardRef(Y),S=he},33853:function(wr,xt,x){"use strict";x.d(xt,{Z:function(){return S}});var D=x(54476),G=x(59301),ye={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},me=ye,H=x(7657),Y=function(Ge,Ze){return G.createElement(H.Z,(0,D.Z)({},Ge,{ref:Ze,icon:me}))},he=G.forwardRef(Y),S=he},62772:function(wr,xt,x){"use strict";x.d(xt,{Z:function(){return S}});var D=x(54476),G=x(59301),ye={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},me=ye,H=x(7657),Y=function(Ge,Ze){return G.createElement(H.Z,(0,D.Z)({},Ge,{ref:Ze,icon:me}))},he=G.forwardRef(Y),S=he},38819:function(wr,xt,x){"use strict";x.d(xt,{Z:function(){return S}});var D=x(54476),G=x(59301),ye={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},me=ye,H=x(7657),Y=function(Ge,Ze){return G.createElement(H.Z,(0,D.Z)({},Ge,{ref:Ze,icon:me}))},he=G.forwardRef(Y),S=he},87395:function(wr,xt,x){"use strict";x.d(xt,{Z:function(){return S}});var D=x(54476),G=x(59301),ye={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},me=ye,H=x(7657),Y=function(Ge,Ze){return G.createElement(H.Z,(0,D.Z)({},Ge,{ref:Ze,icon:me}))},he=G.forwardRef(Y),S=he},27431:function(wr,xt){"use strict";xt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},64179:function(wr,xt,x){"use strict";x.d(xt,{t:function(){return A}});var D=x(59301),G=x(3113),ye={buttonFixed:"buttonFixed___vyq30",button:"button___hxmYv",buttonWrap:"buttonWrap___uK8dl"},me=x(92310),H=x.n(me),Y=Object.defineProperty,he=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable,Ge=(R,Ne,mt)=>Ne in R?Y(R,Ne,{enumerable:!0,configurable:!0,writable:!0,value:mt}):R[Ne]=mt,Ze=(R,Ne)=>{for(var mt in Ne||(Ne={}))S.call(Ne,mt)&&Ge(R,mt,Ne[mt]);if(he)for(var mt of he(Ne))_.call(Ne,mt)&&Ge(R,mt,Ne[mt]);return R};const A=({cancelText:R="\u53D6\u6D88",okText:Ne="\u786E\u5B9A",loading:mt=!1,hasOkBtn:gt=!0,hasCancelBtn:Qe=!0,okButtonProps:Ie={},onCancel:Ft=()=>{},onOk:Me=()=>{},className:we=""})=>D.createElement("div",{className:H()(ye.buttonFixed,we)},D.createElement("div",{className:ye.buttonWrap},Qe&&D.createElement(G.ZP,{size:"middle",className:`${ye.button} mr20`,onClick:Ft},R),gt&&D.createElement(G.ZP,Ze({size:"middle",type:"primary",className:`${ye.button} mr20`,loading:mt,onClick:Me},Ie),Ne)))},37975:function(wr,xt,x){"use strict";var D=x(59301),G=x(27431),ye=x(48136),me=x(24638),H=x(43418),Y=x(59301);const he=(0,D.forwardRef)(({callback:S,width:_,onChange:Ge,disabled:Ze,readOnly:A,type:R="",value:Ne="",style:mt={}},gt)=>{const Qe=(0,D.useRef)(),Ie=(0,D.useRef)(),[Ft,Me]=(0,D.useState)(0),[we,O]=(0,D.useState)(0),[z,Q]=(0,D.useState)(!1),ne=()=>{var lt=document.createElement("div");lt.innerHTML=Qe.current.getValue();var ge=lt.innerText;return S&&S(ge),ge};(0,D.useImperativeHandle)(gt,()=>({getData:ne}));const We=lt=>{lt.preventDefault();const ge=lt.clientX-Ft,ve=lt.clientY-we;document.body.onmousemove=et=>{let U=et.clientX-ge,Re=et.clientY-ve;const Je=document.getElementsByClassName("markdown-popup-form")[0],F=window.innerWidth-Je.offsetWidth,be=window.innerHeight-Je.offsetHeight;U=Math.max(0,Math.min(U,F)),Re=Math.max(0,Math.min(Re,be)),fe(et.clientX,et.clientY,ge,ve)&&(Me(U),O(Re))},document.body.onmouseup=function(){document.body.onmousemove=null}},fe=(lt,ge,ve,et)=>{const U=document.body.clientHeight,Re=document.body.clientWidth;return lt<20&&ve>lt||lt>Re-20&&ve<lt||ge<20&&et>ge||ge>U-20&&et<ge?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};(0,D.useEffect)(()=>{z&&setTimeout(()=>{const lt=document.getElementsByClassName("markdown-popup-form")[0],ge=window.innerWidth/2-lt.offsetWidth/2,ve=window.innerHeight/2-lt.offsetHeight/2;Me(ge),O(ve)},0)},[z]);const st=()=>{Ze||A||Q(!0)};return Y.createElement("div",{style:mt},Y.createElement("div",{style:{width:_||"100%",position:"relative"},className:`${G.Z.mathFillWrap} ${Ze||A?"cursorDefault":""}`,onClick:()=>st()},Y.createElement("math-field",{disabled:Ze,locale:"zh_cn",class:`${G.Z.mathField} ${R}`,readOnly:A,placeholder:"\u8BF7\u8F93\u5165\u516C\u5F0F",ref:Qe,style:{width:"100%",fontSize:Ne?18:14},value:Ne||""})),Y.createElement(H.default,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:Ft,top:we},title:Y.createElement("div",{style:{cursor:"move"},onMouseDown:We},"\u8F93\u5165\u516C\u5F0F"),open:z,onOk:()=>{const lt=Ie.current.getData();Qe.current.setValue(lt),Ge(lt),Q(!1)},onCancel:()=>{Q(!1)},destroyOnClose:!0,className:"markdown-popup-form"},Y.createElement(me.Z,{value:Ne,ref:Ie,onChange:Ge,showSaveButton:!1})))});xt.Z=he},24638:function(wr,xt,x){"use strict";var D=x(59301),G=x(95237),ye=x(43604),me=x(99313),H=x(3113),Y=x(76818),he=x(27431),S=x(48136),_=x(59301);const Ge=(0,D.forwardRef)(({callback:Ze,showSaveButton:A,value:R=""},Ne)=>{const mt=(0,D.useRef)(),gt=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],Qe=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r
x=a + r\\text{cos}\\theta \\ \r
y=b + r\\text{sin}\\theta \r
\\end{matrix}\\right. `},{value:`\\begin{array}{l} \r
\\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r
\\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r
\\end{array} `},{value:`\\begin{array}{l} \r
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
\\left\\{\\begin{matrix} \r
\\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
\\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
\\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r
\\end{matrix}\\right. \r
\\end{array} `},{value:`\\begin{array}{l} \r
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
\\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r
\\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r
\\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r
\\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r
\\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r
a \\perp \\alpha \\ \r
b \\perp \\alpha \r
\\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r
\\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r
a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r
a \\parallel \\partial ,b \\parallel \\partial \r
\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r
m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r
a \\perp m,a \\perp n \r
\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r
\\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r
a^{2}+b^{2}=c^{2} \r
\\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r
a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r
a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r
\\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r
a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r
\\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r
\\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r
\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r
a,b \\in R^{+} \\ \r
\\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
\\end{array}`},{value:`\\begin{array}{c} \r
a,b \\in R \\ \r
\\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
\\end{array}`},{value:`\\begin{array}{c} \r
H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r
\\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r
\\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r
\\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r
\\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r
P \\left( \\emptyset \\right) =0 \\\\ \r
P \\left( S \\right) =1 \r
\\end{array}`},{value:`\\begin{array}{c} \r
\\forall A \\in S \\\\ \r
P \\left( A \\right) \\ge 0 \r
\\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r
S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r
P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r
\\end{array}`},{value:`\\begin{array}{c} \r
P_{n}=n! \\\\ \r
A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r
\\end{array}`}]}]}],Ie=we=>{mt.current.setValue(mt.current.getValue()+" "+we.value+" ")},Ft=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:_.createElement(G.Z,{className:he.Z.lists,gutter:[10,10]},gt.map((we,O)=>_.createElement(ye.Z,{flex:"110px",className:he.Z.item},_.createElement("div",null,_.createElement(Y.Z,{value:`$$${we.value}$$`}),we.name),_.createElement("div",{className:he.Z.children},we.children.map((z,Q)=>_.createElement("div",{key:Q},_.createElement("h1",null,z.name),_.createElement(G.Z,{gutter:[10,10]},z.data.map((ne,We)=>_.createElement(ye.Z,{key:We,onClick:()=>Ie(ne),className:he.Z.diamond},_.createElement(Y.Z,{value:"`$$"+ne.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:_.createElement(G.Z,{className:he.Z.lists,gutter:[10,10]},Qe.map((we,O)=>_.createElement(ye.Z,{flex:"110px",className:he.Z.item},_.createElement("div",null,_.createElement(Y.Z,{value:"`$$"+we.value+"$$`"}),we.name),_.createElement("div",{className:he.Z.children},we.children.map((z,Q)=>_.createElement("div",{key:Q},z.name&&_.createElement("h1",null,z.name),_.createElement(G.Z,{gutter:[10,10]},z.data.map((ne,We)=>_.createElement(ye.Z,{key:We,onClick:()=>Ie(ne),className:he.Z.diamond},_.createElement(Y.Z,{value:"`$$"+ne.value+"$$`"}))))))))))}],Me=()=>{var we=document.createElement("div");we.innerHTML=mt.current.getValue();var O=we.innerText;return Ze&&Ze(O),O};return(0,D.useImperativeHandle)(Ne,()=>({getData:Me})),_.createElement("div",{className:he.Z.mathWrap},_.createElement(me.default,{defaultActiveKey:"1",items:Ft}),_.createElement("math-field",{locale:"zh_cn",className:he.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:mt,style:{width:800,marginTop:30,fontSize:18}},R||""),A&&_.createElement("div",{className:he.Z.button},_.createElement(H.ZP,{size:"large",onClick:Me,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});xt.Z=Ge},16067:function(wr,xt,x){"use strict";x.r(xt),x.d(xt,{default:function(){return Je},formatTypeNameToDefaultScore:function(){return U}});var D=x(59301),G=x(95392),ye=x(43418),me=x(5871),H=x(66104),Y=x(11414),he=x(5112),S=x(76818),_={flexRow:"flexRow____Sm4b",flexColumn:"flexColumn___mQNZs",action:"action___QUVEn",setScore:"setScore___yZ0Yb",delete:"delete___e4taL",content:"content___jR4Y6",titleWrap:"titleWrap___zsXYY",titleNumber:"titleNumber___p60vi",score:"score___DbCHw",titleHtml:"titleHtml___FALbj",answerWrap:"answerWrap___uPjYq",answer:"answer___pfiPk",answerText:"answerText___K3TNr"},Ge=x(24334),Ze=x(37975),A=x(59301);const R=["A\uFF0E","B\uFF0E","C\uFF0E","D\uFF0E","E\uFF0E","F\uFF0E","G\uFF0E","H\uFF0E","I\uFF0E","J\uFF0E","K\uFF0E","L\uFF0E","M\uFF0E","N\uFF0E","O\uFF0E","P\uFF0E","Q\uFF0E","R\uFF0E","S\uFF0E","T\uFF0E","U\uFF0E","V\uFF0E","W\uFF0E","X\uFF0E","Y\uFF0E","Z\uFF0E"],Ne=[{type:"single",name:"\u5355\u9009\u9898"},{type:"multiple",name:"\u591A\u9009\u9898"},{type:"judgement",name:"\u5224\u65AD\u9898"},{type:"completion",name:"\u586B\u7A7A\u9898"},{type:"subjective",name:"\u7B80\u7B54\u9898"}];var gt=({index:F,typeName:be,type:pe,data:X={},inMouseId:Oe,isshow:Le,onSetScore:Be=()=>{},onDelete:se=()=>{},onMouseEnter:at=()=>{},showAnswer:ut=!1})=>{var Nt;const[Wt,Ct]=(0,D.useState)(!1),er=()=>{var ee;return A.createElement("div",{className:_.answerWrap},(ee=X==null?void 0:X.choices)==null?void 0:ee.map((ie,rt)=>A.createElement("div",{className:`${_.flexRow} mt15`,key:rt},A.createElement("div",{style:{lineHeight:"24px",flexShrink:0}},R[rt]),A.createElement("div",{className:`${_.answer} ml5`},A.createElement(S.Z,{value:ie==null?void 0:ie.choice_text})))),ut&&A.createElement("div",{className:`mt10 ${_.answerText}`},"\u53C2\u8003\u7B54\u6848\uFF1A",X==null?void 0:X.standard_answer_show))},zt=()=>{var ee;return A.createElement("div",{className:_.answerWrap},A.createElement("div",{className:`${_.flexRow} mt15`},(ee=X==null?void 0:X.choices)==null?void 0:ee.map((ie,rt)=>A.createElement(he.ZP,{disabled:!0,key:rt},ie==null?void 0:ie.choice_text))),ut&&A.createElement("div",{className:`mt10 ${_.answerText}`},"\u53C2\u8003\u7B54\u6848\uFF1A",X==null?void 0:X.standard_answer_show))},nr=()=>{var ee;return A.createElement("div",{className:_.answerWrap},A.createElement("div",{className:`${_.flexRow} mt15`},A.createElement(S.Z,{value:(ee=X==null?void 0:X.program_attr)==null?void 0:ee.description})),ut&&A.createElement("div",{className:"mt15"},A.createElement("div",{className:_.answerText},"\u53C2\u8003\u7B54\u6848\uFF1A",!(X!=null&&X.answer_text)&&"\u6682\u65E0"),A.createElement(S.Z,{value:(X==null?void 0:X.answer_text)||""})))},Lt=()=>{var ee;return A.createElement("div",{className:_.answerWrap},ut&&A.createElement("div",{className:`${_.flexColumn} mt15`},(ee=X==null?void 0:X.standard_answer)==null?void 0:ee.map((ie,rt)=>A.createElement("div",null,(ie==null?void 0:ie.model)===1?A.createElement(S.Z,{key:rt,value:`\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A${ie.position}\uFF09\uFF1A${ie.answer_text.join("\u3001")}`,className:_.answerText}):A.createElement("span",{style:{display:"inline-flex",alignItems:"center",marginBottom:5}},"\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A ",ie.position,"\uFF09\uFF1A",A.createElement(Ze.Z,{disabled:!0,width:"180px",value:ie.answer_text.join("\u3001")}))))))},ae=()=>{var ee;return A.createElement("div",{className:_.answerWrap},ut&&A.createElement("div",{className:"mt15"},A.createElement("div",{className:_.answerText},"\u53C2\u8003\u7B54\u6848\uFF1A"),A.createElement(S.Z,{value:(ee=X==null?void 0:X.answer_texts)==null?void 0:ee[0],className:_.answerText})))},Z=()=>{var ee,ie;return A.createElement("div",{className:_.answerWrap,style:{marginTop:10}},A.createElement(S.Z,{showProgramFill:!0,disabledFill:!0,value:Ge.Base64.decode((ee=X==null?void 0:X.program_attr)==null?void 0:ee.code)}),ut&&A.createElement("div",{className:`${_.flexColumn} mt15`},(ie=X==null?void 0:X.standard_answer)==null?void 0:ie.map((rt,Ye)=>A.createElement(S.Z,{key:Ye,value:`\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A${rt.position}\uFF09\uFF1A${rt.answer_text}`}))))},K=()=>{var ee;return A.createElement("div",{className:_.answerWrap},A.createElement("div",{className:"mt10"},"\u9636\u6BB5\u6210\u7EE9"),(ee=X==null?void 0:X.shixun)==null?void 0:ee.map((ie,rt)=>{var Ye,nt;return A.createElement("div",null,A.createElement("div",{className:"mt10 font14",key:rt},"\u7B2C",rt+1,"\u5173 ",ie==null?void 0:ie.challenge_name," \uFF08",ie.challenge_score,"\u5206\uFF09"),ut&&A.createElement("div",null,A.createElement("div",{className:_.answerText},"\u53C2\u8003\u7B54\u6848\uFF1A",((Ye=ie.challenge_answers)==null?void 0:Ye.length)===0?"\u6682\u65E0":""),(nt=ie.challenge_answers)==null?void 0:nt.map((Bt,St)=>A.createElement("div",{className:"mt15"},A.createElement("div",null,"\u7EA7\u522B",St+1,"\uFF1A",Bt.name),A.createElement(S.Z,{value:(Bt==null?void 0:Bt.contents)||"",className:_.answerText})))))}))},ce=()=>{var ee;return A.createElement("div",{className:_.answerWrap,style:{display:Wt&&"none"}},(ee=X==null?void 0:X.sub_questions)==null?void 0:ee.map((ie,rt)=>{var Ye,nt,Bt,St,W;const _t=`<span style="margin-right: 10px">${F+1}.${rt+1}</span><span>\uFF08${(Ye=Ne.find(bt=>bt.type==ie.item_type))==null?void 0:Ye.name}\uFF09</span><span class="c-grey-999">\uFF08${ie.score}\u5206\uFF09</span>`;return A.createElement(D.Fragment,{key:ie==null?void 0:ie.id},A.createElement("div",{className:_.titleWrap,style:{marginTop:16}},A.createElement(S.Z,{className:_.titleHtml,value:_t+ie.name})),(ie.item_type=="single"||ie.item_type=="multiple")&&A.createElement(A.Fragment,null,(nt=ie==null?void 0:ie.choices)==null?void 0:nt.map((bt,N)=>A.createElement("div",{className:`${_.flexRow} mt15`,key:N},A.createElement("div",{style:{lineHeight:"24px",flexShrink:0}},R[N]),A.createElement("div",{className:`${_.answer} ml5`},A.createElement(S.Z,{value:bt==null?void 0:bt.choice_text})))),ut&&A.createElement("div",{className:`mt10 ${_.answerText}`},"\u53C2\u8003\u7B54\u6848\uFF1A",ie==null?void 0:ie.standard_answer_show)),ie.item_type=="judgement"&&A.createElement("div",{className:_.answerWrap},A.createElement("div",{className:`${_.flexRow} mt15`},(Bt=ie==null?void 0:ie.choices)==null?void 0:Bt.map((bt,N)=>A.createElement(he.ZP,{disabled:!0,key:N},bt==null?void 0:bt.choice_text))),ut&&A.createElement("div",{className:`mt10 ${_.answerText}`},"\u53C2\u8003\u7B54\u6848\uFF1A",ie==null?void 0:ie.standard_answer_show)),ie.item_type=="completion"&&A.createElement("div",{className:_.answerWrap},ut&&A.createElement("div",{className:`${_.flexColumn} mt15`},(St=ie==null?void 0:ie.standard_answer)==null?void 0:St.map((bt,N)=>A.createElement("div",null,(bt==null?void 0:bt.model)===1?A.createElement(S.Z,{key:N,value:`\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A${bt.position}\uFF09\uFF1A${bt.answer_text.join("\u3001")}`,className:_.answerText}):A.createElement("span",null,"\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A$",bt.position,"\uFF09\uFF1A",A.createElement(Ze.Z,{value:bt.answer_text.join("\u3001")})))))),ie.item_type=="subjective"&&A.createElement("div",{className:_.answerWrap},ut&&A.createElement("div",{className:"mt15"},A.createElement("div",{className:_.answerText},"\u53C2\u8003\u7B54\u6848\uFF1A"),A.createElement(S.Z,{value:(W=ie==null?void 0:ie.answer_texts)==null?void 0:W[0],className:_.answerText}))))}))},ue=()=>{const ee={SINGLE:er,MULTIPLE:er,JUDGMENT:zt,PROGRAM:nr,COMPLETION:Lt,SUBJECTIVE:ae,PRACTICAL:K,COMBINATION:ce,BPROGRAM:Z};return ee[pe]?ee[pe]():null},Fe=(ee,ie)=>{var rt;return`<span style="margin-right: -10px">${ie+1}\u3001</span><span class="c-grey-999">\uFF08${(ee==null?void 0:ee.item_type)==="combination"?`\u5171${(rt=ee==null?void 0:ee.sub_questions)==null?void 0:rt.length}\u5C0F\u9898\uFF0C`:""}${ee.score}\u5206\uFF09</span> `};return A.createElement("div",{onMouseEnter:()=>at(X.id)},Oe===X.id&&A.createElement("div",{className:_.action},A.createElement("div",{className:_.setScore,onClick:()=>Be(X.id,be,X==null?void 0:X.shixun,X.score,X)},"\u8BBE\u7F6E\u5F97\u5206"),A.createElement("div",{className:_.delete,onClick:()=>se(X.id)},"\u5220\u9664")),A.createElement("div",{className:_.content},A.createElement("div",{className:_.titleWrap,style:{justifyContent:"space-between"}},(X==null?void 0:X.item_type)==="bprogram"?A.createElement(S.Z,{className:_.titleHtml,value:Fe(X,F)+((Nt=X==null?void 0:X.program_attr)==null?void 0:Nt.description)}):A.createElement(S.Z,{className:_.titleHtml,value:Fe(X,F)+((X==null?void 0:X.item_type)==="combination"?"\uFF08\u9898\u5E72\uFF09":"")+(X.name||(X==null?void 0:X.shixun_name))}),(X==null?void 0:X.item_type)==="combination"&&!Le&&A.createElement("span",{onClick:ee=>{Ct(!Wt)},style:{textAlign:"end",flexShrink:0,cursor:"pointer"}},Wt?"\u5C55\u5F00":"\u6536\u8D77")),ue()))},Qe={bg:"bg___uBTSf",wrap:"wrap___u47s7",flexRow:"flexRow___QK3mq",flexColumn:"flexColumn___IEH4c",flexJustifyBetween:"flexJustifyBetween___VROqY",relative:"relative___iGg_n",questionNumber:"questionNumber___CYWUo",score:"score___pHhZR",selectTopicButton:"selectTopicButton___aNhaw",line:"line___zzL1y",dragTip:"dragTip___eJpug",typeActive:"typeActive___cHbxQ",mouseTypeActive:"mouseTypeActive___THFkb",typeName:"typeName___PsYTO",typeNumber:"typeNumber___IW6t9",typeAction:"typeAction___gdIEg",setScore:"setScore___ftbgZ",delete:"delete___d1fFi",modal:"modal___COzbG",modalColumn:"modalColumn___Z8nDu",shixunModal:"shixunModal___xxSWV",shixunScore:"shixunScore___zrpkw"},Ie=x(64179),Ft=x(89392),Me=x.n(Ft),we=x(55301),O=Object.defineProperty,z=Object.defineProperties,Q=Object.getOwnPropertyDescriptors,ne=Object.getOwnPropertySymbols,We=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable,st=(F,be,pe)=>be in F?O(F,be,{enumerable:!0,configurable:!0,writable:!0,value:pe}):F[be]=pe,lt=(F,be)=>{for(var pe in be||(be={}))We.call(be,pe)&&st(F,pe,be[pe]);if(ne)for(var pe of ne(be))fe.call(be,pe)&&st(F,pe,be[pe]);return F},ge=(F,be)=>z(F,Q(be)),ve=(F,be)=>{var pe={};for(var X in F)We.call(F,X)&&be.indexOf(X)<0&&(pe[X]=F[X]);if(F!=null&&ne)for(var X of ne(F))be.indexOf(X)<0&&fe.call(F,X)&&(pe[X]=F[X]);return pe},et=(F,be,pe)=>new Promise((X,Oe)=>{var Le=at=>{try{se(pe.next(at))}catch(ut){Oe(ut)}},Be=at=>{try{se(pe.throw(at))}catch(ut){Oe(ut)}},se=at=>at.done?X(at.value):Promise.resolve(at.value).then(Le,Be);se((pe=pe.apply(F,be)).next())});const U=F=>({\u5355\u9009\u9898:2,\u591A\u9009\u9898:5,\u586B\u7A7A\u9898:2,\u5224\u65AD\u9898:2,\u7B80\u7B54\u9898:10,\u7F16\u7A0B\u9898:10,\u5B9E\u8BAD\u9898:5,\u7EC4\u5408\u9898:10})[F]||0,Re=F=>{var be=F,{problemsetPreview:pe,user:X,globalSetting:Oe,loading:Le,dispatch:Be}=be,se=ve(be,["problemsetPreview","user","globalSetting","loading","dispatch"]),at,ut,Nt,Wt;const[Ct,er]=(0,D.useState)(),[zt,nr]=(0,D.useState)(),Lt=(0,D.useRef)();console.log(pe,"problemsetPreview"),(0,D.useEffect)(()=>(Be({type:"globalSetting/footerToggle",payload:!1}),()=>{Be({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,D.useEffect)(()=>{ae()},[]);const ae=()=>{Be({type:"problemsetPreview/getPaperData"})},Z=(ee,ie,rt=[],Ye,nt)=>{var Bt;const St=Me().cloneDeep(nt),W=Me().cloneDeep(rt).map(_t=>ge(lt({},_t),{challenge_score:_t.challenge_score||5}));if(Lt.current=Ye||U(ie),ie==="\u5B9E\u8BAD\u9898")return ye.default.confirm({centered:!0,width:530,title:"\u8BBE\u7F6E\u5206\u6570",content:D.createElement("div",{className:Qe.shixunModal},D.createElement("div",null,"\u5173\u5361\uFF1A"),W==null?void 0:W.map((_t,bt)=>D.createElement("div",{className:Qe.shixunScore},bt+1,"\u3001",_t.challenge_name,D.createElement("div",{style:{minWidth:"130px"}},D.createElement(me.Z,{defaultValue:_t.challenge_score,min:1,onChange:N=>{_t.challenge_score=N}}),D.createElement("span",{className:"ml5"},"\u5206/\u9898"))))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>et(void 0,null,function*(){yield(0,we.Cc)({id:ee,challenge_scores:W.map(_t=>({challenge_id:_t.challenge_id,score:_t.challenge_score}))}),Lt.current=null,ae()})});if(ie==="\u7EC4\u5408\u9898")return ye.default.confirm({centered:!0,width:530,title:"\u8BBE\u7F6E\u5206\u6570",content:D.createElement("div",{className:Qe.shixunModal,style:{maxHeight:200,overflow:"auto"}},(Bt=St==null?void 0:St.sub_questions)==null?void 0:Bt.map((_t,bt)=>D.createElement("div",{className:Qe.shixunScore},"\u7B2C",bt+1,"\u5C0F\u9898",D.createElement("div",{style:{minWidth:"130px"}},D.createElement(me.Z,{defaultValue:_t.score,min:1,onChange:N=>{_t.score=N}}),D.createElement("span",{className:"ml5"},"\u5206"))))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>et(void 0,null,function*(){var _t;yield(0,we.Vl)({id:ee,subs:(_t=St==null?void 0:St.sub_questions)==null?void 0:_t.map(bt=>({basket_id:bt.basket_id,score:bt.score}))}),Lt.current=null,ae()})});ye.default.confirm({centered:!0,title:"\u8BBE\u7F6E\u5206\u6570",content:D.createElement("div",{className:""},D.createElement("span",null,"\u672C\u9898\u5206\u503C\uFF1A"),D.createElement(me.Z,{min:1,defaultValue:Lt.current,onChange:_t=>{Lt.current=_t}}),D.createElement("span",{className:"ml5"},"\u5206/\u9898"),D.createElement("br",null),ie==="\u586B\u7A7A\u9898"&&D.createElement("div",{style:{color:"rgb(255, 0, 0)"}},"\u6BCF\u7A7A\u5206\u503C\u6309\u6BCF\u9898\u5206\u503C\u53D6\u5E73\u5747\u5206\u8BA1\u7B97")),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>et(void 0,null,function*(){yield Be({type:"problemsetPreview/setScore",payload:{id:ee,score:Lt.current}}),Lt.current=null,ae()})})},K=ee=>{ye.default.confirm({centered:!0,title:"\u63D0\u793A",content:D.createElement("div",{className:Qe.modal},"\u786E\u8BA4\u5220\u9664\u8BE5\u8BD5\u9898\uFF1F"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>et(void 0,null,function*(){yield Be({type:"problemsetPreview/handleDelete",payload:{id:ee}}),ae()})})},ce=(ee,ie)=>{Lt.current=U(ie),ye.default.confirm({centered:!0,title:"\u6279\u91CF\u8BBE\u7F6E\u5206\u6570",content:D.createElement("div",{className:""},D.createElement("span",null,ie==="\u7EC4\u5408\u9898"?"\u7EC4\u5408\u9898\u4E2D\u7684\u6BCF\u5C0F\u9898":ie,"\uFF1A"),D.createElement(me.Z,{min:1,defaultValue:Lt.current,onChange:rt=>{Lt.current=rt}}),D.createElement("span",{className:"ml5"},"\u5206/\u9898"),D.createElement("br",null),ie==="\u586B\u7A7A\u9898"&&D.createElement("div",{style:{color:"rgb(255, 0, 0)"}},"\u6BCF\u7A7A\u5206\u503C\u6309\u6BCF\u9898\u5206\u503C\u53D6\u5E73\u5747\u5206\u8BA1\u7B97")),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>et(void 0,null,function*(){yield Be({type:"problemsetPreview/batchSetScore",payload:{item_type:ee,score:Lt.current}}),Lt.current=null,ae()})})},ue=ee=>{ye.default.confirm({centered:!0,title:"\u63D0\u793A",content:D.createElement("div",{className:Qe.modalColumn},D.createElement("p",null,"\u5220\u9664\u5927\u9898\uFF0C\u5C06\u5220\u9664\u8BE5\u5927\u9898\u4E0B\u6240\u6709\u5C0F\u9898"),D.createElement("p",null,"\u786E\u8BA4\u5220\u9664\u8BE5\u5927\u9898\uFF1F")),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>et(void 0,null,function*(){yield Be({type:"problemsetPreview/batchDelete",payload:{item_type:ee}}),ae()})})},Fe=(ee,ie)=>et(void 0,null,function*(){if(!ee.destination||!ee.source)return;const rt=ie.questions[ee.source.index].id,Ye=ee.destination.index+1;(yield Be({type:"problemsetPreview/adjustPosition",payload:{id:rt,position:Ye}})).status!==-1&&ae()});return D.createElement("section",{className:Qe.bg},D.createElement(H.Z,{className:"mt30",separator:">"},D.createElement(H.Z.Item,null,"\u8BD5\u9898\u5E93"),D.createElement(H.Z.Item,{href:"/problemset"},"\u4EBA\u5DE5\u7EC4\u5377"),D.createElement(H.Z.Item,null,"\u8BD5\u5377\u9884\u89C8")),D.createElement("div",{className:Qe.wrap},D.createElement("div",{className:"pt20 pb20"},D.createElement("div",{className:`${Qe.flexRow} ${Qe.flexJustifyBetween}`},D.createElement("div",null,D.createElement("span",{className:Qe.questionNumber},"\u9898\u6570\uFF1A",(at=pe.paperData)==null?void 0:at.all_questions_count),D.createElement("span",{className:Qe.score},"\u603B\u5206\uFF1A",(ut=pe.paperData)==null?void 0:ut.all_score)),D.createElement("div",{className:Qe.selectTopicButton,onClick:()=>G.history.push("/problemset/preview_select")},"\u7EE7\u7EED\u9009\u9898")),D.createElement("div",{className:Qe.line}),D.createElement("div",{className:Qe.dragTip},"\u5C0F\u9898\u4E4B\u95F4\u53EF\u4EE5\u62D6\u52A8\u6392\u5E8F"),(Wt=(Nt=pe.paperData)==null?void 0:Nt.questionList)==null?void 0:Wt.map((ee,ie)=>{const rt=ee.type===zt;return console.log(ee,"paperItem"),D.createElement("div",{className:`${Qe.relative} mt20 mb20`,key:ie},D.createElement("div",{className:`${Qe.typeActive} ${rt?Qe.mouseTypeActive:""}`,onMouseEnter:()=>{nr(ee.type),er(null)}},D.createElement("span",{className:`${Qe.typeName} ${rt?"ml20":""}`},ee.number,"\u3001",ee.name),D.createElement("span",{className:Qe.typeNumber},"\uFF08\u5171",ee.questions_count,"\u9898\uFF0C",(ee==null?void 0:ee.type)==="COMBINATION"?`\u5305\u542B${ee==null?void 0:ee.sub_questions_count}\u5C0F\u9898\uFF0C`:"","\u5171",ee.questions_score,"\u5206\uFF09")),rt&&D.createElement("div",{className:`${Qe.typeAction} ${Qe.flexRow}`},ee.type!=="PRACTICAL"&&D.createElement("div",{className:Qe.setScore,onClick:()=>ce(ee.type,ee.name)},"\u6279\u91CF\u8BBE\u7F6E\u5F97\u5206"),D.createElement("div",{className:Qe.delete,onClick:()=>ue(ee.type)},"\u5220\u9664")),D.createElement(Y.Z5,{onDragEnd:Ye=>Fe(Ye,ee)},D.createElement(Y.bK,{droppableId:ie.toString()},(Ye,nt)=>{var Bt;return D.createElement("div",ge(lt({className:"mt20",ref:Ye.innerRef},Ye.droppableProps),{onScroll:()=>{}}),(Bt=ee.questions)==null?void 0:Bt.map((St,W)=>D.createElement(Y._l,{draggableId:St.id.toString(),index:W,key:St.id},_t=>D.createElement("div",lt(lt({ref:_t.innerRef},_t.draggableProps),_t.dragHandleProps),D.createElement(gt,{index:W,typeName:ee.name,type:ee.type,data:St,inMouseId:Ct,onSetScore:Z,onDelete:K,onMouseEnter:bt=>{er(bt),nr(null)}})))))})))}))),D.createElement(Ie.t,{okText:"\u4FDD\u5B58\u8BD5\u5377",onCancel:()=>G.history.replace("/problemset"),onOk:()=>G.history.push("/problemset/preview_new")}))};var Je=(0,G.connect)(({problemsetPreview:F,user:be,loading:pe,globalSetting:X})=>({problemsetPreview:F,user:be,globalSetting:X,loading:pe.effects}))(Re)},19080:function(wr,xt,x){"use strict";x.d(xt,{F:function(){return H},Z:function(){return me}});var D=x(92310),G=x.n(D);const ye=null;function me(Y,he,S){return G()({[`${Y}-status-success`]:he==="success",[`${Y}-status-warning`]:he==="warning",[`${Y}-status-error`]:he==="error",[`${Y}-status-validating`]:he==="validating",[`${Y}-has-feedback`]:S})}const H=(Y,he)=>he||Y},66104:function(wr,xt,x){"use strict";x.d(xt,{Z:function(){return et}});var D=x(92310),G=x.n(D),ye=x(11592),me=x(26112),H=x(59301),Y=x(92343),he=x(36355),S=x(84105),_=x(91857);const Ge=U=>{let{children:Re}=U;const{getPrefixCls:Je}=H.useContext(he.E_),F=Je("breadcrumb");return H.createElement("li",{className:`${F}-separator`,"aria-hidden":"true"},Re===""?Re:Re||"/")};Ge.__ANT_BREADCRUMB_SEPARATOR=!0;var Ze=Ge,A=function(U,Re){var Je={};for(var F in U)Object.prototype.hasOwnProperty.call(U,F)&&Re.indexOf(F)<0&&(Je[F]=U[F]);if(U!=null&&typeof Object.getOwnPropertySymbols=="function")for(var be=0,F=Object.getOwnPropertySymbols(U);be<F.length;be++)Re.indexOf(F[be])<0&&Object.prototype.propertyIsEnumerable.call(U,F[be])&&(Je[F[be]]=U[F[be]]);return Je};function R(U,Re){if(U.title===void 0||U.title===null)return null;const Je=Object.keys(Re).join("|");return typeof U.title=="object"?U.title:String(U.title).replace(new RegExp(`:(${Je})`,"g"),(F,be)=>Re[be]||F)}function Ne(U,Re,Je,F){if(Je==null)return null;const{className:be,onClick:pe}=Re,X=A(Re,["className","onClick"]),Oe=Object.assign(Object.assign({},(0,me.Z)(X,{data:!0,aria:!0})),{onClick:pe});return F!==void 0?H.createElement("a",Object.assign({},Oe,{className:G()(`${U}-link`,be),href:F}),Je):H.createElement("span",Object.assign({},Oe,{className:G()(`${U}-link`,be)}),Je)}function mt(U,Re){return(F,be,pe,X,Oe)=>{if(Re)return Re(F,be,pe,X);const Le=R(F,be);return Ne(U,F,Le,Oe)}}var gt=function(U,Re){var Je={};for(var F in U)Object.prototype.hasOwnProperty.call(U,F)&&Re.indexOf(F)<0&&(Je[F]=U[F]);if(U!=null&&typeof Object.getOwnPropertySymbols=="function")for(var be=0,F=Object.getOwnPropertySymbols(U);be<F.length;be++)Re.indexOf(F[be])<0&&Object.prototype.propertyIsEnumerable.call(U,F[be])&&(Je[F[be]]=U[F[be]]);return Je};const Qe=U=>{const{prefixCls:Re,separator:Je="/",children:F,menu:be,overlay:pe,dropdownProps:X,href:Oe}=U,Be=(se=>{if(be||pe){const at=Object.assign({},X);if(be){const ut=be||{},{items:Nt}=ut,Wt=gt(ut,["items"]);at.menu=Object.assign(Object.assign({},Wt),{items:Nt==null?void 0:Nt.map((Ct,er)=>{var{key:zt,title:nr,label:Lt,path:ae}=Ct,Z=gt(Ct,["key","title","label","path"]);let K=Lt!=null?Lt:nr;return ae&&(K=H.createElement("a",{href:`${Oe}${ae}`},K)),Object.assign(Object.assign({},Z),{key:zt!=null?zt:er,label:K})})})}else pe&&(at.overlay=pe);return H.createElement(_.Z,Object.assign({placement:"bottom"},at),H.createElement("span",{className:`${Re}-overlay-link`},se,H.createElement(S.Z,null)))}return se})(F);return Be!=null?H.createElement(H.Fragment,null,H.createElement("li",null,Be),Je&&H.createElement(Ze,null,Je)):null},Ie=U=>{const{prefixCls:Re,children:Je,href:F}=U,be=gt(U,["prefixCls","children","href"]),{getPrefixCls:pe}=H.useContext(he.E_),X=pe("breadcrumb",Re);return H.createElement(Qe,Object.assign({},be,{prefixCls:X}),Ne(X,be,Je,F))};Ie.__ANT_BREADCRUMB_ITEM=!0;var Ft=Ie,Me=x(17313),we=x(83116),O=x(37613);const z=U=>{const{componentCls:Re,iconCls:Je}=U;return{[Re]:Object.assign(Object.assign({},(0,Me.Wf)(U)),{color:U.itemColor,fontSize:U.fontSize,[Je]:{fontSize:U.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:U.linkColor,transition:`color ${U.motionDurationMid}`,padding:`0 ${U.paddingXXS}px`,borderRadius:U.borderRadiusSM,height:U.lineHeight*U.fontSize,display:"inline-block",marginInline:-U.marginXXS,"&:hover":{color:U.linkHoverColor,backgroundColor:U.colorBgTextHover}},(0,Me.Qy)(U)),"li:last-child":{color:U.lastItemColor},[`${Re}-separator`]:{marginInline:U.separatorMargin,color:U.separatorColor},[`${Re}-link`]:{[`
> ${Je} + span,
> ${Je} + a
`]:{marginInlineStart:U.marginXXS}},[`${Re}-overlay-link`]:{borderRadius:U.borderRadiusSM,height:U.lineHeight*U.fontSize,display:"inline-block",padding:`0 ${U.paddingXXS}px`,marginInline:-U.marginXXS,[`> ${Je}`]:{marginInlineStart:U.marginXXS,fontSize:U.fontSizeIcon},"&:hover":{color:U.linkHoverColor,backgroundColor:U.colorBgTextHover,a:{color:U.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${U.componentCls}-rtl`]:{direction:"rtl"}})}};var Q=(0,we.Z)("Breadcrumb",U=>{const Re=(0,O.TS)(U,{});return[z(Re)]},U=>({itemColor:U.colorTextDescription,lastItemColor:U.colorText,iconFontSize:U.fontSize,linkColor:U.colorTextDescription,linkHoverColor:U.colorText,separatorColor:U.colorTextDescription,separatorMargin:U.marginXS})),ne=function(U,Re){var Je={};for(var F in U)Object.prototype.hasOwnProperty.call(U,F)&&Re.indexOf(F)<0&&(Je[F]=U[F]);if(U!=null&&typeof Object.getOwnPropertySymbols=="function")for(var be=0,F=Object.getOwnPropertySymbols(U);be<F.length;be++)Re.indexOf(F[be])<0&&Object.prototype.propertyIsEnumerable.call(U,F[be])&&(Je[F[be]]=U[F[be]]);return Je};function We(U){const{breadcrumbName:Re,children:Je}=U,F=ne(U,["breadcrumbName","children"]),be=Object.assign({title:Re},F);return Je&&(be.menu={items:Je.map(pe=>{var{breadcrumbName:X}=pe,Oe=ne(pe,["breadcrumbName"]);return Object.assign(Object.assign({},Oe),{title:X})})}),be}function fe(U,Re){return(0,H.useMemo)(()=>U||(Re?Re.map(We):null),[U,Re])}var st=function(U,Re){var Je={};for(var F in U)Object.prototype.hasOwnProperty.call(U,F)&&Re.indexOf(F)<0&&(Je[F]=U[F]);if(U!=null&&typeof Object.getOwnPropertySymbols=="function")for(var be=0,F=Object.getOwnPropertySymbols(U);be<F.length;be++)Re.indexOf(F[be])<0&&Object.prototype.propertyIsEnumerable.call(U,F[be])&&(Je[F[be]]=U[F[be]]);return Je};const lt=(U,Re)=>{if(Re===void 0)return Re;let Je=(Re||"").replace(/^\//,"");return Object.keys(U).forEach(F=>{Je=Je.replace(`:${F}`,U[F])}),Je},ge=U=>{const{prefixCls:Re,separator:Je="/",style:F,className:be,rootClassName:pe,routes:X,items:Oe,children:Le,itemRender:Be,params:se={}}=U,at=st(U,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:ut,direction:Nt,breadcrumb:Wt}=H.useContext(he.E_);let Ct;const er=ut("breadcrumb",Re),[zt,nr]=Q(er),Lt=fe(Oe,X),ae=mt(er,Be);if(Lt&&Lt.length>0){const ce=[],ue=Oe||X;Ct=Lt.map((Fe,ee)=>{const{path:ie,key:rt,type:Ye,menu:nt,overlay:Bt,onClick:St,className:W,separator:_t,dropdownProps:bt}=Fe,N=lt(se,ie);N!==void 0&&ce.push(N);const J=rt!=null?rt:ee;if(Ye==="separator")return H.createElement(Ze,{key:J},_t);const le={},ot=ee===Lt.length-1;nt?le.menu=nt:Bt&&(le.overlay=Bt);let{href:Te}=Fe;return ce.length&&N!==void 0&&(Te=`#/${ce.join("/")}`),H.createElement(Qe,Object.assign({key:J},le,(0,me.Z)(Fe,{data:!0,aria:!0}),{className:W,dropdownProps:bt,href:Te,separator:ot?"":Je,onClick:St,prefixCls:er}),ae(Fe,se,ue,ce,Te))})}else if(Le){const ce=(0,ye.Z)(Le).length;Ct=(0,ye.Z)(Le).map((ue,Fe)=>{if(!ue)return ue;const ee=Fe===ce-1;return(0,Y.Tm)(ue,{separator:ee?"":Je,key:Fe})})}const Z=G()(er,Wt==null?void 0:Wt.className,{[`${er}-rtl`]:Nt==="rtl"},be,pe,nr),K=Object.assign(Object.assign({},Wt==null?void 0:Wt.style),F);return zt(H.createElement("nav",Object.assign({className:Z,style:K},at),H.createElement("ol",null,Ct)))};ge.Item=Ft,ge.Separator=Ze;var ve=ge,et=ve},91857:function(wr,xt,x){"use strict";var D=x(59301),G=x(38819),ye=x(92310),me=x.n(ye),H=x(31561),Y=x(70425),he=x(18929),S=x(2738),_=x(79676),Ge=x(53487),Ze=x(92343),A=x(36355),R=x(20834),Ne=x(40875),mt=x(88088),gt=x(47211);const Qe=null,Ie=O=>{const{menu:z,arrow:Q,prefixCls:ne,children:We,trigger:fe,disabled:st,dropdownRender:lt,getPopupContainer:ge,overlayClassName:ve,rootClassName:et,open:U,onOpenChange:Re,visible:Je,onVisibleChange:F,mouseEnterDelay:be=.15,mouseLeaveDelay:pe=.1,autoAdjustOverflow:X=!0,placement:Oe="",overlay:Le,transitionName:Be}=O,{getPopupContainer:se,getPrefixCls:at,direction:ut}=D.useContext(A.E_),Nt=D.useMemo(()=>{const nt=at();return Be!==void 0?Be:Oe.includes("top")?`${nt}-slide-down`:`${nt}-slide-up`},[at,Oe,Be]),Wt=D.useMemo(()=>Oe?Oe.includes("Center")?Oe.slice(0,Oe.indexOf("Center")):Oe:ut==="rtl"?"bottomRight":"bottomLeft",[Oe,ut]),Ct=at("dropdown",ne),[er,zt]=(0,gt.Z)(Ct),[,nr]=(0,mt.Z)(),Lt=D.Children.only(We),ae=(0,Ze.Tm)(Lt,{className:me()(`${Ct}-trigger`,{[`${Ct}-rtl`]:ut==="rtl"},Lt.props.className),disabled:st}),Z=st?[]:fe;let K;Z&&Z.includes("contextMenu")&&(K=!0);const[ce,ue]=(0,he.Z)(!1,{value:U!=null?U:Je}),Fe=(0,Y.useEvent)(nt=>{Re==null||Re(nt),F==null||F(nt),ue(nt)}),ee=me()(ve,et,zt,{[`${Ct}-rtl`]:ut==="rtl"}),ie=(0,_.Z)({arrowPointAtCenter:typeof Q=="object"&&Q.pointAtCenter,autoAdjustOverflow:X,offset:nr.marginXXS,arrowWidth:Q?nr.sizePopupArrow:0,borderRadius:nr.borderRadius}),rt=D.useCallback(()=>{ue(!1)},[]),Ye=()=>{let nt;return z!=null&&z.items?nt=D.createElement(R.default,Object.assign({},z)):typeof Le=="function"?nt=Le():nt=Le,lt&&(nt=lt(nt)),nt=D.Children.only(typeof nt=="string"?D.createElement("span",null,nt):nt),D.createElement(Ne.J,{prefixCls:`${Ct}-menu`,expandIcon:D.createElement("span",{className:`${Ct}-menu-submenu-arrow`},D.createElement(G.Z,{className:`${Ct}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:rt,validator:Bt=>{let{mode:St}=Bt}},nt)};return er(D.createElement(H.Z,Object.assign({alignPoint:K},(0,S.Z)(O,["rootClassName"]),{mouseEnterDelay:be,mouseLeaveDelay:pe,visible:ce,builtinPlacements:ie,arrow:!!Q,overlayClassName:ee,prefixCls:Ct,getPopupContainer:ge||se,transitionName:Nt,trigger:Z,overlay:Ye,placement:Wt,onVisibleChange:Fe}),ae))};function Ft(O){return Object.assign(Object.assign({},O),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const Me=(0,Ge.Z)(Ie,"dropdown",O=>O,Ft),we=O=>D.createElement(Me,Object.assign({},O),D.createElement("span",null));Ie._InternalPanelDoNotUseOrYouWillBeFired=we,xt.Z=Ie},47211:function(wr,xt,x){"use strict";x.d(xt,{Z:function(){return Ze}});var D=x(17313),G=x(13826),ye=x(92899),me=x(29878),H=x(19447),Y=x(83116),he=x(37613),_=A=>{const{componentCls:R,menuCls:Ne,colorError:mt,colorTextLightSolid:gt}=A,Qe=`${Ne}-item`;return{[`${R}, ${R}-menu-submenu`]:{[`${Ne} ${Qe}`]:{[`&${Qe}-danger:not(${Qe}-disabled)`]:{color:mt,"&:hover":{color:gt,backgroundColor:mt}}}}}};const Ge=A=>{const{componentCls:R,menuCls:Ne,zIndexPopup:mt,dropdownArrowDistance:gt,sizePopupArrow:Qe,antCls:Ie,iconCls:Ft,motionDurationMid:Me,dropdownPaddingVertical:we,fontSize:O,dropdownEdgeChildPadding:z,colorTextDisabled:Q,fontSizeIcon:ne,controlPaddingHorizontal:We,colorBgElevated:fe}=A;return[{[R]:Object.assign(Object.assign({},(0,D.Wf)(A)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:mt,display:"block","&::before":{position:"absolute",insetBlock:-gt+Qe/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${Ie}-btn`]:{[`& > ${Ft}-down, & > ${Ie}-btn-icon > ${Ft}-down`]:{fontSize:ne}},[`${R}-wrap`]:{position:"relative",[`${Ie}-btn > ${Ft}-down`]:{fontSize:ne},[`${Ft}-down::before`]:{transition:`transform ${Me}`}},[`${R}-wrap-open`]:{[`${Ft}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${Ie}-slide-down-enter${Ie}-slide-down-enter-active${R}-placement-bottomLeft,
&${Ie}-slide-down-appear${Ie}-slide-down-appear-active${R}-placement-bottomLeft,
&${Ie}-slide-down-enter${Ie}-slide-down-enter-active${R}-placement-bottom,
&${Ie}-slide-down-appear${Ie}-slide-down-appear-active${R}-placement-bottom,
&${Ie}-slide-down-enter${Ie}-slide-down-enter-active${R}-placement-bottomRight,
&${Ie}-slide-down-appear${Ie}-slide-down-appear-active${R}-placement-bottomRight`]:{animationName:G.fJ},[`&${Ie}-slide-up-enter${Ie}-slide-up-enter-active${R}-placement-topLeft,
&${Ie}-slide-up-appear${Ie}-slide-up-appear-active${R}-placement-topLeft,
&${Ie}-slide-up-enter${Ie}-slide-up-enter-active${R}-placement-top,
&${Ie}-slide-up-appear${Ie}-slide-up-appear-active${R}-placement-top,
&${Ie}-slide-up-enter${Ie}-slide-up-enter-active${R}-placement-topRight,
&${Ie}-slide-up-appear${Ie}-slide-up-appear-active${R}-placement-topRight`]:{animationName:G.Qt},[`&${Ie}-slide-down-leave${Ie}-slide-down-leave-active${R}-placement-bottomLeft,
&${Ie}-slide-down-leave${Ie}-slide-down-leave-active${R}-placement-bottom,
&${Ie}-slide-down-leave${Ie}-slide-down-leave-active${R}-placement-bottomRight`]:{animationName:G.Uw},[`&${Ie}-slide-up-leave${Ie}-slide-up-leave-active${R}-placement-topLeft,
&${Ie}-slide-up-leave${Ie}-slide-up-leave-active${R}-placement-top,
&${Ie}-slide-up-leave${Ie}-slide-up-leave-active${R}-placement-topRight`]:{animationName:G.ly}})},(0,H.ZP)(A,{colorBg:fe,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${R} ${Ne}`]:{position:"relative",margin:0},[`${Ne}-submenu-popup`]:{position:"absolute",zIndex:mt,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${R}, ${R}-menu-submenu`]:{[Ne]:Object.assign(Object.assign({padding:z,listStyleType:"none",backgroundColor:fe,backgroundClip:"padding-box",borderRadius:A.borderRadiusLG,outline:"none",boxShadow:A.boxShadowSecondary},(0,D.Qy)(A)),{[`${Ne}-item-group-title`]:{padding:`${we}px ${We}px`,color:A.colorTextDescription,transition:`all ${Me}`},[`${Ne}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${Ne}-item-icon`]:{minWidth:O,marginInlineEnd:A.marginXS,fontSize:A.fontSizeSM},[`${Ne}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${Me}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${Ne}-item, ${Ne}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${we}px ${We}px`,color:A.colorText,fontWeight:"normal",fontSize:O,lineHeight:A.lineHeight,cursor:"pointer",transition:`all ${Me}`,borderRadius:A.borderRadiusSM,"&:hover, &-active":{backgroundColor:A.controlItemBgHover}},(0,D.Qy)(A)),{"&-selected":{color:A.colorPrimary,backgroundColor:A.controlItemBgActive,"&:hover, &-active":{backgroundColor:A.controlItemBgActiveHover}},"&-disabled":{color:Q,cursor:"not-allowed","&:hover":{color:Q,backgroundColor:fe,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${A.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:A.colorSplit},[`${R}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:A.paddingXS,[`${R}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:A.colorTextDescription,fontSize:ne,fontStyle:"normal"}}}),[`${Ne}-item-group-list`]:{margin:`0 ${A.marginXS}px`,padding:0,listStyle:"none"},[`${Ne}-submenu-title`]:{paddingInlineEnd:We+A.fontSizeSM},[`${Ne}-submenu-vertical`]:{position:"relative"},[`${Ne}-submenu${Ne}-submenu-disabled ${R}-menu-submenu-title`]:{[`&, ${R}-menu-submenu-arrow-icon`]:{color:Q,backgroundColor:fe,cursor:"not-allowed"}},[`${Ne}-submenu-selected ${R}-menu-submenu-title`]:{color:A.colorPrimary}})}},[(0,G.oN)(A,"slide-up"),(0,G.oN)(A,"slide-down"),(0,ye.Fm)(A,"move-up"),(0,ye.Fm)(A,"move-down"),(0,me._y)(A,"zoom-big")]]};var Ze=(0,Y.Z)("Dropdown",(A,R)=>{let{rootPrefixCls:Ne}=R;const{marginXXS:mt,sizePopupArrow:gt,controlHeight:Qe,fontSize:Ie,lineHeight:Ft,paddingXXS:Me,componentCls:we,borderRadiusLG:O}=A,z=(Qe-Ie*Ft)/2,{dropdownArrowOffset:Q}=(0,H.fS)({contentRadius:O}),ne=(0,he.TS)(A,{menuCls:`${we}-menu`,rootPrefixCls:Ne,dropdownArrowDistance:gt/2+mt,dropdownArrowOffset:Q,dropdownPaddingVertical:z,dropdownEdgeChildPadding:Me});return[Ge(ne),_(ne)]},A=>({zIndexPopup:A.zIndexPopupBase+50}))},5871:function(wr,xt,x){"use strict";x.d(xt,{Z:function(){return bt}});var D=x(84105),G=x(87395),ye=x(92310),me=x.n(ye),H=x(54476),Y=x(20068),he=x(76190),S=x(42978),_=x(75931),Ge=x(67732),Ze=x(83652);function A(){return typeof BigInt=="function"}function R(N){return!N&&N!==0&&!Number.isNaN(N)||!String(N).trim()}function Ne(N){var J=N.trim(),le=J.startsWith("-");le&&(J=J.slice(1)),J=J.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),J.startsWith(".")&&(J="0".concat(J));var ot=J||"0",Te=ot.split("."),Ce=Te[0]||"0",ir=Te[1]||"0";Ce==="0"&&ir==="0"&&(le=!1);var Ht=le?"-":"";return{negative:le,negativeStr:Ht,trimStr:ot,integerStr:Ce,decimalStr:ir,fullStr:"".concat(Ht).concat(ot)}}function mt(N){var J=String(N);return!Number.isNaN(Number(J))&&J.includes("e")}function gt(N){var J=String(N);if(mt(N)){var le=Number(J.slice(J.indexOf("e-")+2)),ot=J.match(/\.(\d+)/);return ot!=null&&ot[1]&&(le+=ot[1].length),le}return J.includes(".")&&Ie(J)?J.length-J.indexOf(".")-1:0}function Qe(N){var J=String(N);if(mt(N)){if(N>Number.MAX_SAFE_INTEGER)return String(A()?BigInt(N).toString():Number.MAX_SAFE_INTEGER);if(N<Number.MIN_SAFE_INTEGER)return String(A()?BigInt(N).toString():Number.MIN_SAFE_INTEGER);J=N.toFixed(gt(J))}return Ne(J).fullStr}function Ie(N){return typeof N=="number"?!Number.isNaN(N):N?/^\s*-?\d+(\.\d+)?\s*$/.test(N)||/^\s*-?\d+\.\s*$/.test(N)||/^\s*-?\.\d+\s*$/.test(N):!1}var Ft=function(){function N(J){if((0,Ge.Z)(this,N),(0,Y.Z)(this,"origin",""),(0,Y.Z)(this,"negative",void 0),(0,Y.Z)(this,"integer",void 0),(0,Y.Z)(this,"decimal",void 0),(0,Y.Z)(this,"decimalLen",void 0),(0,Y.Z)(this,"empty",void 0),(0,Y.Z)(this,"nan",void 0),R(J)){this.empty=!0;return}if(this.origin=String(J),J==="-"||Number.isNaN(J)){this.nan=!0;return}var le=J;if(mt(le)&&(le=Number(le)),le=typeof le=="string"?le:Qe(le),Ie(le)){var ot=Ne(le);this.negative=ot.negative;var Te=ot.trimStr.split(".");this.integer=BigInt(Te[0]);var Ce=Te[1]||"0";this.decimal=BigInt(Ce),this.decimalLen=Ce.length}else this.nan=!0}return(0,Ze.Z)(N,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(le){var ot="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(le,"0"));return BigInt(ot)}},{key:"negate",value:function(){var le=new N(this.toString());return le.negative=!le.negative,le}},{key:"cal",value:function(le,ot,Te){var Ce=Math.max(this.getDecimalStr().length,le.getDecimalStr().length),ir=this.alignDecimal(Ce),Ht=le.alignDecimal(Ce),qt=ot(ir,Ht).toString(),Gt=Te(Ce),tr=Ne(qt),Mt=tr.negativeStr,Mr=tr.trimStr,pr="".concat(Mt).concat(Mr.padStart(Gt+1,"0"));return new N("".concat(pr.slice(0,-Gt),".").concat(pr.slice(-Gt)))}},{key:"add",value:function(le){if(this.isInvalidate())return new N(le);var ot=new N(le);return ot.isInvalidate()?this:this.cal(ot,function(Te,Ce){return Te+Ce},function(Te){return Te})}},{key:"multi",value:function(le){var ot=new N(le);return this.isInvalidate()||ot.isInvalidate()?new N(NaN):this.cal(ot,function(Te,Ce){return Te*Ce},function(Te){return Te*2})}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(le){return this.toString()===(le==null?void 0:le.toString())}},{key:"lessEquals",value:function(le){return this.add(le.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return le?this.isInvalidate()?"":Ne("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),N}(),Me=function(){function N(J){if((0,Ge.Z)(this,N),(0,Y.Z)(this,"origin",""),(0,Y.Z)(this,"number",void 0),(0,Y.Z)(this,"empty",void 0),R(J)){this.empty=!0;return}this.origin=String(J),this.number=Number(J)}return(0,Ze.Z)(N,[{key:"negate",value:function(){return new N(-this.toNumber())}},{key:"add",value:function(le){if(this.isInvalidate())return new N(le);var ot=Number(le);if(Number.isNaN(ot))return this;var Te=this.number+ot;if(Te>Number.MAX_SAFE_INTEGER)return new N(Number.MAX_SAFE_INTEGER);if(Te<Number.MIN_SAFE_INTEGER)return new N(Number.MIN_SAFE_INTEGER);var Ce=Math.max(gt(this.number),gt(ot));return new N(Te.toFixed(Ce))}},{key:"multi",value:function(le){var ot=Number(le);if(this.isInvalidate()||Number.isNaN(ot))return new N(NaN);var Te=this.number*ot;if(Te>Number.MAX_SAFE_INTEGER)return new N(Number.MAX_SAFE_INTEGER);if(Te<Number.MIN_SAFE_INTEGER)return new N(Number.MIN_SAFE_INTEGER);var Ce=Math.max(gt(this.number),gt(ot));return new N(Te.toFixed(Ce))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(le){return this.toNumber()===(le==null?void 0:le.toNumber())}},{key:"lessEquals",value:function(le){return this.add(le.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return le?this.isInvalidate()?"":Qe(this.number):this.origin}}]),N}();function we(N){return A()?new Ft(N):new Me(N)}function O(N,J,le){var ot=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(N==="")return"";var Te=Ne(N),Ce=Te.negativeStr,ir=Te.integerStr,Ht=Te.decimalStr,qt="".concat(J).concat(Ht),Gt="".concat(Ce).concat(ir);if(le>=0){var tr=Number(Ht[le]);if(tr>=5&&!ot){var Mt=we(N).add("".concat(Ce,"0.").concat("0".repeat(le)).concat(10-tr));return O(Mt.toString(),J,le,ot)}return le===0?Gt:"".concat(Gt).concat(J).concat(Ht.padEnd(le,"0").slice(0,le))}return qt===".0"?Gt:"".concat(Gt).concat(qt)}var z=we,Q=x(93681),ne=x(34280),We=x(8654),fe=x(59301),st=x(48736);function lt(N,J){var le=(0,fe.useRef)(null);function ot(){try{var Ce=N.selectionStart,ir=N.selectionEnd,Ht=N.value,qt=Ht.substring(0,Ce),Gt=Ht.substring(ir);le.current={start:Ce,end:ir,value:Ht,beforeTxt:qt,afterTxt:Gt}}catch(tr){}}function Te(){if(N&&le.current&&J)try{var Ce=N.value,ir=le.current,Ht=ir.beforeTxt,qt=ir.afterTxt,Gt=ir.start,tr=Ce.length;if(Ce.endsWith(qt))tr=Ce.length-le.current.afterTxt.length;else if(Ce.startsWith(Ht))tr=Ht.length;else{var Mt=Ht[Gt-1],Mr=Ce.indexOf(Mt,Gt-1);Mr!==-1&&(tr=Mr+1)}N.setSelectionRange(tr,tr)}catch(pr){(0,st.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(pr.message))}}return[ot,Te]}var ge=x(49658),ve=function(){var J=(0,fe.useState)(!1),le=(0,S.Z)(J,2),ot=le[0],Te=le[1];return(0,ne.Z)(function(){Te((0,ge.Z)())},[]),ot},et=ve,U=x(16089),Re=200,Je=600;function F(N){var J=N.prefixCls,le=N.upNode,ot=N.downNode,Te=N.upDisabled,Ce=N.downDisabled,ir=N.onStep,Ht=fe.useRef(),qt=fe.useRef([]),Gt=fe.useRef();Gt.current=ir;var tr=function(){clearTimeout(Ht.current)},Mt=function(rn,nn){rn.preventDefault(),tr(),Gt.current(nn);function qr(){Gt.current(nn),Ht.current=setTimeout(qr,Re)}Ht.current=setTimeout(qr,Je)};fe.useEffect(function(){return function(){tr(),qt.current.forEach(function(Vt){return U.Z.cancel(Vt)})}},[]);var Mr=et();if(Mr)return null;var pr="".concat(J,"-handler"),Vr=me()(pr,"".concat(pr,"-up"),(0,Y.Z)({},"".concat(pr,"-up-disabled"),Te)),Cr=me()(pr,"".concat(pr,"-down"),(0,Y.Z)({},"".concat(pr,"-down-disabled"),Ce)),fr=function(){return qt.current.push((0,U.Z)(tr))},on={unselectable:"on",role:"button",onMouseUp:fr,onMouseLeave:fr};return fe.createElement("div",{className:"".concat(pr,"-wrap")},fe.createElement("span",(0,H.Z)({},on,{onMouseDown:function(rn){Mt(rn,!0)},"aria-label":"Increase Value","aria-disabled":Te,className:Vr}),le||fe.createElement("span",{unselectable:"on",className:"".concat(J,"-handler-up-inner")})),fe.createElement("span",(0,H.Z)({},on,{onMouseDown:function(rn){Mt(rn,!1)},"aria-label":"Decrease Value","aria-disabled":Ce,className:Cr}),ot||fe.createElement("span",{unselectable:"on",className:"".concat(J,"-handler-down-inner")})))}function be(N){var J=typeof N=="number"?Qe(N):Ne(N).fullStr,le=J.includes(".");return le?Ne(J.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:N+"0"}var pe=x(5643),X=function(){var N=(0,fe.useRef)(0),J=function(){U.Z.cancel(N.current)};return(0,fe.useEffect)(function(){return J},[]),function(le){J(),N.current=(0,U.Z)(function(){le()})}},Oe=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep"],Le=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","classes","className","classNames"],Be=function(J,le){return J||le.isEmpty()?le.toString():le.toNumber()},se=function(J){var le=z(J);return le.isInvalidate()?null:le},at=fe.forwardRef(function(N,J){var le,ot=N.prefixCls,Te=ot===void 0?"rc-input-number":ot,Ce=N.className,ir=N.style,Ht=N.min,qt=N.max,Gt=N.step,tr=Gt===void 0?1:Gt,Mt=N.defaultValue,Mr=N.value,pr=N.disabled,Vr=N.readOnly,Cr=N.upHandler,fr=N.downHandler,on=N.keyboard,Vt=N.controls,rn=Vt===void 0?!0:Vt,nn=N.classNames,qr=N.stringMode,Xr=N.parser,Sr=N.formatter,Jr=N.precision,Fr=N.decimalSeparator,Xn=N.onChange,In=N.onInput,yn=N.onPressEnter,dn=N.onStep,C=(0,_.Z)(N,Oe),I="".concat(Te,"-input"),Ae=fe.useRef(null),Pe=fe.useState(!1),ze=(0,S.Z)(Pe,2),Ke=ze[0],ht=ze[1],ct=fe.useRef(!1),Et=fe.useRef(!1),ar=fe.useRef(!1),jt=fe.useState(function(){return z(Mr!=null?Mr:Mt)}),Pt=(0,S.Z)(jt,2),$t=Pt[0],Xt=Pt[1];function xe(At){Mr===void 0&&Xt(At)}var zr=fe.useCallback(function(At,ft){if(!ft)return Jr>=0?Jr:Math.max(gt(At),gt(tr))},[Jr,tr]),Br=fe.useCallback(function(At){var ft=String(At);if(Xr)return Xr(ft);var sr=ft;return Fr&&(sr=sr.replace(Fr,".")),sr.replace(/[^\w.-]+/g,"")},[Xr,Fr]),hr=fe.useRef(""),Ur=fe.useCallback(function(At,ft){if(Sr)return Sr(At,{userTyping:ft,input:String(hr.current)});var sr=typeof At=="number"?Qe(At):At;if(!ft){var Kt=zr(sr,ft);if(Ie(sr)&&(Fr||Kt>=0)){var xr=Fr||".";sr=O(sr,xr,Kt)}}return sr},[Sr,zr,Fr]),mr=fe.useState(function(){var At=Mt!=null?Mt:Mr;return $t.isInvalidate()&&["string","number"].includes((0,he.Z)(At))?Number.isNaN(At)?"":At:Ur($t.toString(),!1)}),Rt=(0,S.Z)(mr,2),j=Rt[0],V=Rt[1];hr.current=j;function de(At,ft){V(Ur(At.isInvalidate()?At.toString(!1):At.toString(!ft),ft))}var Ee=fe.useMemo(function(){return se(qt)},[qt,Jr]),q=fe.useMemo(function(){return se(Ht)},[Ht,Jr]),ke=fe.useMemo(function(){return!Ee||!$t||$t.isInvalidate()?!1:Ee.lessEquals($t)},[Ee,$t]),_e=fe.useMemo(function(){return!q||!$t||$t.isInvalidate()?!1:$t.lessEquals(q)},[q,$t]),je=lt(Ae.current,Ke),vt=(0,S.Z)(je,2),dt=vt[0],Zt=vt[1],lr=function(ft){return Ee&&!ft.lessEquals(Ee)?Ee:q&&!q.lessEquals(ft)?q:null},gr=function(ft){return!lr(ft)},vr=function(ft,sr){var Kt=ft,xr=gr(Kt)||Kt.isEmpty();if(!Kt.isEmpty()&&!sr&&(Kt=lr(Kt)||Kt,xr=!0),!Vr&&!pr&&xr){var fn=Kt.toString(),ur=zr(fn,sr);return ur>=0&&(Kt=z(O(fn,".",ur)),gr(Kt)||(Kt=z(O(fn,".",ur,!0)))),Kt.equals($t)||(xe(Kt),Xn==null||Xn(Kt.isEmpty()?null:Be(qr,Kt)),Mr===void 0&&de(Kt,sr)),Kt}return $t},rr=X(),Ir=function At(ft){if(dt(),hr.current=ft,V(ft),!Et.current){var sr=Br(ft),Kt=z(sr);Kt.isNaN()||vr(Kt,!0)}In==null||In(ft),rr(function(){var xr=ft;Xr||(xr=ft.replace(/。/g,".")),xr!==ft&&At(xr)})},Tr=function(){Et.current=!0},Jt=function(){Et.current=!1,Ir(Ae.current.value)},Yt=function(ft){Ir(ft.target.value)},or=function(ft){var sr;if(!(ft&&ke||!ft&&_e)){ct.current=!1;var Kt=z(ar.current?be(tr):tr);ft||(Kt=Kt.negate());var xr=($t||z(0)).add(Kt.toString()),fn=vr(xr,!1);dn==null||dn(Be(qr,fn),{offset:ar.current?be(tr):tr,type:ft?"up":"down"}),(sr=Ae.current)===null||sr===void 0||sr.focus()}},Ut=function(ft){var sr=z(Br(j)),Kt=sr;sr.isNaN()?Kt=vr($t,ft):Kt=vr(sr,ft),Mr!==void 0?de($t,!1):Kt.isNaN()||de(Kt,!1)},Qt=function(){ct.current=!0},dr=function(ft){var sr=ft.key,Kt=ft.shiftKey;ct.current=!0,ar.current=Kt,sr==="Enter"&&(Et.current||(ct.current=!1),Ut(!1),yn==null||yn(ft)),on!==!1&&!Et.current&&["Up","ArrowUp","Down","ArrowDown"].includes(sr)&&(or(sr==="Up"||sr==="ArrowUp"),ft.preventDefault())},$r=function(){ct.current=!1,ar.current=!1},Dr=function(){Ut(!1),ht(!1),ct.current=!1};return(0,ne.o)(function(){$t.isInvalidate()||de($t,!1)},[Jr]),(0,ne.o)(function(){var At=z(Mr);Xt(At);var ft=z(Br(j));(!At.equals(ft)||!ct.current||Sr)&&de(At,ct.current)},[Mr]),(0,ne.o)(function(){Sr&&Zt()},[j]),fe.createElement("div",{className:me()(Te,nn==null?void 0:nn.input,Ce,(le={},(0,Y.Z)(le,"".concat(Te,"-focused"),Ke),(0,Y.Z)(le,"".concat(Te,"-disabled"),pr),(0,Y.Z)(le,"".concat(Te,"-readonly"),Vr),(0,Y.Z)(le,"".concat(Te,"-not-a-number"),$t.isNaN()),(0,Y.Z)(le,"".concat(Te,"-out-of-range"),!$t.isInvalidate()&&!gr($t)),le)),style:ir,onFocus:function(){ht(!0)},onBlur:Dr,onKeyDown:dr,onKeyUp:$r,onCompositionStart:Tr,onCompositionEnd:Jt,onBeforeInput:Qt},rn&&fe.createElement(F,{prefixCls:Te,upNode:Cr,downNode:fr,upDisabled:ke,downDisabled:_e,onStep:or}),fe.createElement("div",{className:"".concat(I,"-wrap")},fe.createElement("input",(0,H.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":Ht,"aria-valuemax":qt,"aria-valuenow":$t.isInvalidate()?null:$t.toString(),step:tr},C,{ref:(0,We.sQ)(Ae,J),className:I,value:j,onChange:Yt,disabled:pr,readOnly:Vr}))))}),ut=fe.forwardRef(function(N,J){var le=N.disabled,ot=N.style,Te=N.prefixCls,Ce=N.value,ir=N.prefix,Ht=N.suffix,qt=N.addonBefore,Gt=N.addonAfter,tr=N.classes,Mt=N.className,Mr=N.classNames,pr=(0,_.Z)(N,Le),Vr=fe.useRef(null),Cr=function(on){Vr.current&&(0,pe.nH)(Vr.current,on)};return fe.createElement(Q.BaseInput,{inputElement:fe.createElement(at,(0,H.Z)({prefixCls:Te,disabled:le,classNames:Mr,ref:(0,We.sQ)(Vr,J)},pr)),className:Mt,triggerFocus:Cr,prefixCls:Te,value:Ce,disabled:le,style:ot,prefix:ir,suffix:Ht,addonAfter:Gt,addonBefore:qt,classes:tr,classNames:Mr,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"}})});ut.displayName="InputNumber";var Nt=ut,Wt=Nt,Ct=x(19080),er=x(36355),zt=x(92736),nr=x(1684),Lt=x(19716),ae=x(32441),Z=x(33234),K=x(9937),ce=x(17313),ue=x(74207),Fe=x(83116),ee=x(37613);const ie=(N,J)=>{let{componentCls:le,borderRadiusSM:ot,borderRadiusLG:Te}=N;const Ce=J==="lg"?Te:ot;return{[`&-${J}`]:{[`${le}-handler-wrap`]:{borderStartEndRadius:Ce,borderEndEndRadius:Ce},[`${le}-handler-up`]:{borderStartEndRadius:Ce},[`${le}-handler-down`]:{borderEndEndRadius:Ce}}}},rt=N=>{const{componentCls:J,lineWidth:le,lineType:ot,colorBorder:Te,borderRadius:Ce,fontSizeLG:ir,controlHeightLG:Ht,controlHeightSM:qt,colorError:Gt,paddingInlineSM:tr,colorTextDescription:Mt,motionDurationMid:Mr,handleHoverColor:pr,paddingInline:Vr,paddingBlock:Cr,handleBg:fr,handleActiveBg:on,colorTextDisabled:Vt,borderRadiusSM:rn,borderRadiusLG:nn,controlWidth:qr,handleVisible:Xr,handleBorderColor:Sr}=N;return[{[J]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,ce.Wf)(N)),(0,K.ik)(N)),(0,K.bi)(N,J)),{display:"inline-block",width:qr,margin:0,padding:0,border:`${le}px ${ot} ${Te}`,borderRadius:Ce,"&-rtl":{direction:"rtl",[`${J}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:ir,borderRadius:nn,[`input${J}-input`]:{height:Ht-2*le}},"&-sm":{padding:0,borderRadius:rn,[`input${J}-input`]:{height:qt-2*le,padding:`0 ${tr}px`}},"&:hover":Object.assign({},(0,K.pU)(N)),"&-focused":Object.assign({},(0,K.M1)(N)),"&-out-of-range":{[`${J}-input-wrap`]:{input:{color:Gt}}},"&-group":Object.assign(Object.assign(Object.assign({},(0,ce.Wf)(N)),(0,K.s7)(N)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${J}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${J}-group-addon`]:{borderRadius:nn,fontSize:N.fontSizeLG}},"&-sm":{[`${J}-group-addon`]:{borderRadius:rn}},[`${J}-wrapper-disabled > ${J}-group-addon`]:Object.assign({},(0,K.Xy)(N))}}),[`&-disabled ${J}-input`]:{cursor:"not-allowed"},[J]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},(0,ce.Wf)(N)),{width:"100%",padding:`${Cr}px ${Vr}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:Ce,outline:0,transition:`all ${Mr} linear`,appearance:"textfield",fontSize:"inherit"}),(0,K.nz)(N.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[J]:Object.assign(Object.assign(Object.assign({[`&:hover ${J}-handler-wrap, &-focused ${J}-handler-wrap`]:{opacity:1},[`${J}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:N.handleWidth,height:"100%",background:fr,borderStartStartRadius:0,borderStartEndRadius:Ce,borderEndEndRadius:Ce,borderEndStartRadius:0,opacity:Xr===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${Mr} linear ${Mr}`,[`${J}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
${J}-handler-up-inner,
${J}-handler-down-inner
`]:{marginInlineEnd:0,fontSize:N.handleFontSize}}},[`${J}-handler`]:{height:"50%",overflow:"hidden",color:Mt,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${le}px ${ot} ${Sr}`,transition:`all ${Mr} linear`,"&:active":{background:on},"&:hover":{height:"60%",[`
${J}-handler-up-inner,
${J}-handler-down-inner
`]:{color:pr}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},(0,ce.Ro)()),{color:Mt,transition:`all ${Mr} linear`,userSelect:"none"})},[`${J}-handler-up`]:{borderStartEndRadius:Ce},[`${J}-handler-down`]:{borderBlockStart:`${le}px ${ot} ${Sr}`,borderEndEndRadius:Ce}},ie(N,"lg")),ie(N,"sm")),{"&-disabled, &-readonly":{[`${J}-handler-wrap`]:{display:"none"},[`${J}-input`]:{color:"inherit"}},[`
${J}-handler-up-disabled,
${J}-handler-down-disabled
`]:{cursor:"not-allowed"},[`
${J}-handler-up-disabled:hover &-handler-up-inner,
${J}-handler-down-disabled:hover &-handler-down-inner
`]:{color:Vt}})},{[`${J}-borderless`]:{borderColor:"transparent",boxShadow:"none",[`${J}-handler-down`]:{borderBlockStartWidth:0}}}]},Ye=N=>{const{componentCls:J,paddingBlock:le,paddingInline:ot,inputAffixPadding:Te,controlWidth:Ce,borderRadiusLG:ir,borderRadiusSM:Ht}=N;return{[`${J}-affix-wrapper`]:Object.assign(Object.assign(Object.assign({},(0,K.ik)(N)),(0,K.bi)(N,`${J}-affix-wrapper`)),{position:"relative",display:"inline-flex",width:Ce,padding:0,paddingInlineStart:ot,"&-lg":{borderRadius:ir},"&-sm":{borderRadius:Ht},[`&:not(${J}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},(0,K.pU)(N)),{zIndex:1}),"&-focused, &:focus":{zIndex:1},[`&-disabled > ${J}-disabled`]:{background:"transparent"},[`> div${J}`]:{width:"100%",border:"none",outline:"none",[`&${J}-focused`]:{boxShadow:"none !important"}},[`input${J}-input`]:{padding:`${le}px 0`},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${J}-handler-wrap`]:{zIndex:2},[J]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:Te},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:ot,marginInlineStart:Te}}})}};var nt=(0,Fe.Z)("InputNumber",N=>{const J=(0,ee.TS)(N,(0,K.e5)(N));return[rt(J),Ye(J),(0,ue.c)(J)]},N=>Object.assign(Object.assign({},(0,K.TM)(N)),{controlWidth:90,handleWidth:N.controlHeightSM-N.lineWidth*2,handleFontSize:N.fontSize/2,handleVisible:"auto",handleActiveBg:N.colorFillAlter,handleBg:N.colorBgContainer,handleHoverColor:N.colorPrimary,handleBorderColor:N.colorBorder})),Bt=function(N,J){var le={};for(var ot in N)Object.prototype.hasOwnProperty.call(N,ot)&&J.indexOf(ot)<0&&(le[ot]=N[ot]);if(N!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Te=0,ot=Object.getOwnPropertySymbols(N);Te<ot.length;Te++)J.indexOf(ot[Te])<0&&Object.prototype.propertyIsEnumerable.call(N,ot[Te])&&(le[ot[Te]]=N[ot[Te]]);return le};const St=fe.forwardRef((N,J)=>{const{getPrefixCls:le,direction:ot}=fe.useContext(er.E_),Te=fe.useRef(null);fe.useImperativeHandle(J,()=>Te.current);const{className:Ce,rootClassName:ir,size:Ht,disabled:qt,prefixCls:Gt,addonBefore:tr,addonAfter:Mt,prefix:Mr,bordered:pr=!0,readOnly:Vr,status:Cr,controls:fr}=N,on=Bt(N,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","bordered","readOnly","status","controls"]),Vt=le("input-number",Gt),[rn,nn]=nt(Vt),{compactSize:qr,compactItemClassnames:Xr}=(0,Z.ri)(Vt,ot);let Sr=fe.createElement(G.Z,{className:`${Vt}-handler-up-inner`}),Jr=fe.createElement(D.Z,{className:`${Vt}-handler-down-inner`});const Fr=typeof fr=="boolean"?fr:void 0;typeof fr=="object"&&(Sr=typeof fr.upIcon=="undefined"?Sr:fe.createElement("span",{className:`${Vt}-handler-up-inner`},fr.upIcon),Jr=typeof fr.downIcon=="undefined"?Jr:fe.createElement("span",{className:`${Vt}-handler-down-inner`},fr.downIcon));const{hasFeedback:Xn,status:In,isFormItemInput:yn,feedbackIcon:dn}=fe.useContext(ae.aM),C=(0,Ct.F)(In,Cr),I=(0,Lt.Z)(ct=>{var Et;return(Et=Ht!=null?Ht:qr)!==null&&Et!==void 0?Et:ct}),Ae=fe.useContext(nr.Z),Pe=qt!=null?qt:Ae,ze=me()({[`${Vt}-lg`]:I==="large",[`${Vt}-sm`]:I==="small",[`${Vt}-rtl`]:ot==="rtl",[`${Vt}-borderless`]:!pr,[`${Vt}-in-form-item`]:yn},(0,Ct.Z)(Vt,C),Xr,nn),Ke=`${Vt}-group`,ht=fe.createElement(Wt,Object.assign({ref:Te,disabled:Pe,className:me()(Ce,ir),upHandler:Sr,downHandler:Jr,prefixCls:Vt,readOnly:Vr,controls:Fr,prefix:Mr,suffix:Xn&&dn,addonAfter:Mt&&fe.createElement(Z.BR,null,fe.createElement(ae.Ux,{override:!0,status:!0},Mt)),addonBefore:tr&&fe.createElement(Z.BR,null,fe.createElement(ae.Ux,{override:!0,status:!0},tr)),classNames:{input:ze},classes:{affixWrapper:me()((0,Ct.Z)(`${Vt}-affix-wrapper`,C,Xn),{[`${Vt}-affix-wrapper-sm`]:I==="small",[`${Vt}-affix-wrapper-lg`]:I==="large",[`${Vt}-affix-wrapper-rtl`]:ot==="rtl",[`${Vt}-affix-wrapper-borderless`]:!pr},nn),wrapper:me()({[`${Ke}-rtl`]:ot==="rtl",[`${Vt}-wrapper-disabled`]:Pe},nn),group:me()({[`${Vt}-group-wrapper-sm`]:I==="small",[`${Vt}-group-wrapper-lg`]:I==="large",[`${Vt}-group-wrapper-rtl`]:ot==="rtl"},(0,Ct.Z)(`${Vt}-group-wrapper`,C,Xn),nn)}},on));return rn(ht)}),W=St,_t=N=>fe.createElement(zt.ZP,{theme:{components:{InputNumber:{handleVisible:!0}}}},fe.createElement(St,Object.assign({},N)));W._InternalPanelDoNotUseOrYouWillBeFired=_t;var bt=W},9937:function(wr,xt,x){"use strict";x.d(xt,{M1:function(){return he},TM:function(){return we},Xy:function(){return S},bi:function(){return Ze},e5:function(){return Me},ik:function(){return A},nz:function(){return H},pU:function(){return Y},s7:function(){return R},x0:function(){return Ge}});var D=x(17313),G=x(74207),ye=x(37613),me=x(83116);const H=O=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:O,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),Y=O=>({borderColor:O.hoverBorderColor}),he=O=>({borderColor:O.activeBorderColor,boxShadow:O.activeShadow,outline:0}),S=O=>({color:O.colorTextDisabled,backgroundColor:O.colorBgContainerDisabled,borderColor:O.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},Y((0,ye.TS)(O,{hoverBorderColor:O.colorBorder})))}),_=O=>{const{paddingBlockLG:z,fontSizeLG:Q,lineHeightLG:ne,borderRadiusLG:We,paddingInlineLG:fe}=O;return{padding:`${z}px ${fe}px`,fontSize:Q,lineHeight:ne,borderRadius:We}},Ge=O=>({padding:`${O.paddingBlockSM}px ${O.paddingInlineSM}px`,borderRadius:O.borderRadiusSM}),Ze=(O,z)=>{const{componentCls:Q,colorError:ne,colorWarning:We,errorActiveShadow:fe,warningActiveShadow:st,colorErrorBorderHover:lt,colorWarningBorderHover:ge}=O;return{[`&-status-error:not(${z}-disabled):not(${z}-borderless)${z}`]:{borderColor:ne,"&:hover":{borderColor:lt},"&:focus, &-focused":Object.assign({},he((0,ye.TS)(O,{activeBorderColor:ne,activeShadow:fe}))),[`${Q}-prefix, ${Q}-suffix`]:{color:ne}},[`&-status-warning:not(${z}-disabled):not(${z}-borderless)${z}`]:{borderColor:We,"&:hover":{borderColor:ge},"&:focus, &-focused":Object.assign({},he((0,ye.TS)(O,{activeBorderColor:We,activeShadow:st}))),[`${Q}-prefix, ${Q}-suffix`]:{color:We}}}},A=O=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${O.paddingBlock}px ${O.paddingInline}px`,color:O.colorText,fontSize:O.fontSize,lineHeight:O.lineHeight,backgroundColor:O.colorBgContainer,backgroundImage:"none",borderWidth:O.lineWidth,borderStyle:O.lineType,borderColor:O.colorBorder,borderRadius:O.borderRadius,transition:`all ${O.motionDurationMid}`},H(O.colorTextPlaceholder)),{"&:hover":Object.assign({},Y(O)),"&:focus, &-focused":Object.assign({},he(O)),"&-disabled, &[disabled]":Object.assign({},S(O)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:O.controlHeight,lineHeight:O.lineHeight,verticalAlign:"bottom",transition:`all ${O.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},_(O)),"&-sm":Object.assign({},Ge(O)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),R=O=>{const{componentCls:z,antCls:Q}=O;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:O.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${z}, &-lg > ${z}-group-addon`]:Object.assign({},_(O)),[`&-sm ${z}, &-sm > ${z}-group-addon`]:Object.assign({},Ge(O)),[`&-lg ${Q}-select-single ${Q}-select-selector`]:{height:O.controlHeightLG},[`&-sm ${Q}-select-single ${Q}-select-selector`]:{height:O.controlHeightSM},[`> ${z}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${z}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${O.paddingInline}px`,color:O.colorText,fontWeight:"normal",fontSize:O.fontSize,textAlign:"center",backgroundColor:O.colorFillAlter,border:`${O.lineWidth}px ${O.lineType} ${O.colorBorder}`,borderRadius:O.borderRadius,transition:`all ${O.motionDurationSlow}`,lineHeight:1,[`${Q}-select`]:{margin:`-${O.paddingBlock+1}px -${O.paddingInline}px`,[`&${Q}-select-single:not(${Q}-select-customize-input)`]:{[`${Q}-select-selector`]:{backgroundColor:"inherit",border:`${O.lineWidth}px ${O.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${Q}-select-selector`]:{color:O.colorPrimary}}},[`${Q}-cascader-picker`]:{margin:`-9px -${O.paddingInline}px`,backgroundColor:"transparent",[`${Q}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${z}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${z}-search-with-button &`]:{zIndex:0}}},[`> ${z}:first-child, ${z}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${Q}-select ${Q}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${z}-affix-wrapper`]:{[`&:not(:first-child) ${z}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${z}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${z}:last-child, ${z}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${Q}-select ${Q}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${z}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${z}-search &`]:{borderStartStartRadius:O.borderRadius,borderEndStartRadius:O.borderRadius}},[`&:not(:first-child), ${z}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${z}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,D.dF)()),{[`${z}-group-addon, ${z}-group-wrap, > ${z}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:O.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
& > ${z}-affix-wrapper,
& > ${z}-number-affix-wrapper,
& > ${Q}-picker-range
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-O.lineWidth,borderInlineEndWidth:O.lineWidth},[`${z}`]:{float:"none"},[`& > ${Q}-select > ${Q}-select-selector,
& > ${Q}-select-auto-complete ${z},
& > ${Q}-cascader-picker ${z},
& > ${z}-group-wrapper ${z}`]:{borderInlineEndWidth:O.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${Q}-select-focused`]:{zIndex:1},[`& > ${Q}-select > ${Q}-select-arrow`]:{zIndex:1},[`& > *:first-child,
& > ${Q}-select:first-child > ${Q}-select-selector,
& > ${Q}-select-auto-complete:first-child ${z},
& > ${Q}-cascader-picker:first-child ${z}`]:{borderStartStartRadius:O.borderRadius,borderEndStartRadius:O.borderRadius},[`& > *:last-child,
& > ${Q}-select:last-child > ${Q}-select-selector,
& > ${Q}-cascader-picker:last-child ${z},
& > ${Q}-cascader-picker-focused:last-child ${z}`]:{borderInlineEndWidth:O.lineWidth,borderStartEndRadius:O.borderRadius,borderEndEndRadius:O.borderRadius},[`& > ${Q}-select-auto-complete ${z}`]:{verticalAlign:"top"},[`${z}-group-wrapper + ${z}-group-wrapper`]:{marginInlineStart:-O.lineWidth,[`${z}-affix-wrapper`]:{borderRadius:0}},[`${z}-group-wrapper:not(:last-child)`]:{[`&${z}-search > ${z}-group`]:{[`& > ${z}-group-addon > ${z}-search-button`]:{borderRadius:0},[`& > ${z}`]:{borderStartStartRadius:O.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:O.borderRadius}}}})}},Ne=O=>{const{componentCls:z,controlHeightSM:Q,lineWidth:ne}=O,fe=(Q-ne*2-16)/2;return{[z]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,D.Wf)(O)),A(O)),Ze(O,z)),{'&[type="color"]':{height:O.controlHeight,[`&${z}-lg`]:{height:O.controlHeightLG},[`&${z}-sm`]:{height:Q,paddingTop:fe,paddingBottom:fe}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},mt=O=>{const{componentCls:z}=O;return{[`${z}-clear-icon`]:{margin:0,color:O.colorTextQuaternary,fontSize:O.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${O.motionDurationSlow}`,"&:hover":{color:O.colorTextTertiary},"&:active":{color:O.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${O.inputAffixPadding}px`}}}},gt=O=>{const{componentCls:z,inputAffixPadding:Q,colorTextDescription:ne,motionDurationSlow:We,colorIcon:fe,colorIconHover:st,iconCls:lt}=O;return{[`${z}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},A(O)),{display:"inline-flex",[`&:not(${z}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},Y(O)),{zIndex:1,[`${z}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${z}[disabled]`]:{background:"transparent"}},[`> input${z}`]:{padding:0,fontSize:"inherit",border:"none",borderRadius:0,outline:"none","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${z}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:O.paddingXS}},"&-show-count-suffix":{color:ne},"&-show-count-has-suffix":{marginInlineEnd:O.paddingXXS},"&-prefix":{marginInlineEnd:Q},"&-suffix":{marginInlineStart:Q}}}),mt(O)),{[`${lt}${z}-password-icon`]:{color:fe,cursor:"pointer",transition:`all ${We}`,"&:hover":{color:st}}}),Ze(O,`${z}-affix-wrapper`))}},Qe=O=>{const{componentCls:z,colorError:Q,colorWarning:ne,borderRadiusLG:We,borderRadiusSM:fe}=O;return{[`${z}-group`]:Object.assign(Object.assign(Object.assign({},(0,D.Wf)(O)),R(O)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${z}-group-addon`]:{borderRadius:We,fontSize:O.fontSizeLG}},"&-sm":{[`${z}-group-addon`]:{borderRadius:fe}},"&-status-error":{[`${z}-group-addon`]:{color:Q,borderColor:Q}},"&-status-warning":{[`${z}-group-addon`]:{color:ne,borderColor:ne}},"&-disabled":{[`${z}-group-addon`]:Object.assign({},S(O))},[`&:not(${z}-compact-first-item):not(${z}-compact-last-item)${z}-compact-item`]:{[`${z}, ${z}-group-addon`]:{borderRadius:0}},[`&:not(${z}-compact-last-item)${z}-compact-first-item`]:{[`${z}, ${z}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${z}-compact-first-item)${z}-compact-last-item`]:{[`${z}, ${z}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},Ie=O=>{const{componentCls:z,antCls:Q}=O,ne=`${z}-search`;return{[ne]:{[`${z}`]:{"&:hover, &:focus":{borderColor:O.colorPrimaryHover,[`+ ${z}-group-addon ${ne}-button:not(${Q}-btn-primary)`]:{borderInlineStartColor:O.colorPrimaryHover}}},[`${z}-affix-wrapper`]:{borderRadius:0},[`${z}-lg`]:{lineHeight:O.lineHeightLG-2e-4},[`> ${z}-group`]:{[`> ${z}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${ne}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:O.borderRadius,borderEndEndRadius:O.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${ne}-button:not(${Q}-btn-primary)`]:{color:O.colorTextDescription,"&:hover":{color:O.colorPrimaryHover},"&:active":{color:O.colorPrimaryActive},[`&${Q}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${ne}-button`]:{height:O.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${ne}-button`]:{height:O.controlHeightLG},[`&-small ${ne}-button`]:{height:O.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${z}-compact-item`]:{[`&:not(${z}-compact-last-item)`]:{[`${z}-group-addon`]:{[`${z}-search-button`]:{marginInlineEnd:-O.lineWidth,borderRadius:0}}},[`&:not(${z}-compact-first-item)`]:{[`${z},${z}-affix-wrapper`]:{borderRadius:0}},[`> ${z}-group-addon ${z}-search-button,
> ${z},
${z}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${z}-affix-wrapper-focused`]:{zIndex:2}}}}},Ft=O=>{const{componentCls:z,paddingLG:Q}=O,ne=`${z}-textarea`;return{[ne]:{position:"relative","&-show-count":{[`> ${z}`]:{height:"100%"},[`${z}-data-count`]:{position:"absolute",bottom:-O.fontSize*O.lineHeight,insetInlineEnd:0,color:O.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${z}`]:{paddingInlineEnd:Q}},[`&-affix-wrapper${ne}-has-feedback`]:{[`${z}`]:{paddingInlineEnd:Q}},[`&-affix-wrapper${z}-affix-wrapper`]:{padding:0,[`> textarea${z}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${z}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${z}-clear-icon`]:{position:"absolute",insetInlineEnd:O.paddingXS,insetBlockStart:O.paddingXS},[`${ne}-suffix`]:{position:"absolute",top:0,insetInlineEnd:O.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function Me(O){return(0,ye.TS)(O,{inputAffixPadding:O.paddingXXS})}const we=O=>{const{controlHeight:z,fontSize:Q,lineHeight:ne,lineWidth:We,controlHeightSM:fe,controlHeightLG:st,fontSizeLG:lt,lineHeightLG:ge,paddingSM:ve,controlPaddingHorizontalSM:et,controlPaddingHorizontal:U,colorFillAlter:Re,colorPrimaryHover:Je,controlOutlineWidth:F,controlOutline:be,colorErrorOutline:pe,colorWarningOutline:X}=O;return{paddingBlock:Math.max(Math.round((z-Q*ne)/2*10)/10-We,3),paddingBlockSM:Math.max(Math.round((fe-Q*ne)/2*10)/10-We,0),paddingBlockLG:Math.ceil((st-lt*ge)/2*10)/10-We,paddingInline:ve-We,paddingInlineSM:et-We,paddingInlineLG:U-We,addonBg:Re,activeBorderColor:Je,hoverBorderColor:Je,activeShadow:`0 0 0 ${F}px ${be}`,errorActiveShadow:`0 0 0 ${F}px ${pe}`,warningActiveShadow:`0 0 0 ${F}px ${X}`}};xt.ZP=(0,me.Z)("Input",O=>{const z=(0,ye.TS)(O,Me(O));return[Ne(z),Ft(z),gt(z),Qe(z),Ie(z),(0,G.c)(z)]},we)},45818:function(wr,xt,x){"use strict";x.d(xt,{D:function(){return Me},Z:function(){return z}});var D=x(54476),G=x(59301),ye={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},me=ye,H=x(7657),Y=function(ne,We){return G.createElement(H.Z,(0,D.Z)({},ne,{ref:We,icon:me}))},he=G.forwardRef(Y),S=he,_=x(33853),Ge=x(38819),Ze=x(92310),A=x.n(Ze),R=x(2738),mt=Q=>!isNaN(parseFloat(Q))&&isFinite(Q),gt=x(36355),Qe=x(84966),Ie=function(Q,ne){var We={};for(var fe in Q)Object.prototype.hasOwnProperty.call(Q,fe)&&ne.indexOf(fe)<0&&(We[fe]=Q[fe]);if(Q!=null&&typeof Object.getOwnPropertySymbols=="function")for(var st=0,fe=Object.getOwnPropertySymbols(Q);st<fe.length;st++)ne.indexOf(fe[st])<0&&Object.prototype.propertyIsEnumerable.call(Q,fe[st])&&(We[fe[st]]=Q[fe[st]]);return We};const Ft={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},Me=G.createContext({}),we=(()=>{let Q=0;return function(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return Q+=1,`${ne}${Q}`}})();var z=G.forwardRef((Q,ne)=>{const{prefixCls:We,className:fe,trigger:st,children:lt,defaultCollapsed:ge=!1,theme:ve="dark",style:et={},collapsible:U=!1,reverseArrow:Re=!1,width:Je=200,collapsedWidth:F=80,zeroWidthTriggerStyle:be,breakpoint:pe,onCollapse:X,onBreakpoint:Oe}=Q,Le=Ie(Q,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:Be}=(0,G.useContext)(Qe.Gs),[se,at]=(0,G.useState)("collapsed"in Q?Q.collapsed:ge),[ut,Nt]=(0,G.useState)(!1);(0,G.useEffect)(()=>{"collapsed"in Q&&at(Q.collapsed)},[Q.collapsed]);const Wt=(ae,Z)=>{"collapsed"in Q||at(ae),X==null||X(ae,Z)},Ct=(0,G.useRef)();Ct.current=ae=>{Nt(ae.matches),Oe==null||Oe(ae.matches),se!==ae.matches&&Wt(ae.matches,"responsive")},(0,G.useEffect)(()=>{function ae(K){return Ct.current(K)}let Z;if(typeof window!="undefined"){const{matchMedia:K}=window;if(K&&pe&&pe in Ft){Z=K(`(max-width: ${Ft[pe]})`);try{Z.addEventListener("change",ae)}catch(ce){Z.addListener(ae)}ae(Z)}}return()=>{try{Z==null||Z.removeEventListener("change",ae)}catch(K){Z==null||Z.removeListener(ae)}}},[pe]),(0,G.useEffect)(()=>{const ae=we("ant-sider-");return Be.addSider(ae),()=>Be.removeSider(ae)},[]);const er=()=>{Wt(!se,"clickTrigger")},{getPrefixCls:zt}=(0,G.useContext)(gt.E_),nr=()=>{const ae=zt("layout-sider",We),Z=(0,R.Z)(Le,["collapsed"]),K=se?F:Je,ce=mt(K)?`${K}px`:String(K),ue=parseFloat(String(F||0))===0?G.createElement("span",{onClick:er,className:A()(`${ae}-zero-width-trigger`,`${ae}-zero-width-trigger-${Re?"right":"left"}`),style:be},st||G.createElement(S,null)):null,ie={expanded:Re?G.createElement(Ge.Z,null):G.createElement(_.Z,null),collapsed:Re?G.createElement(_.Z,null):G.createElement(Ge.Z,null)}[se?"collapsed":"expanded"],rt=st!==null?ue||G.createElement("div",{className:`${ae}-trigger`,onClick:er,style:{width:ce}},st||ie):null,Ye=Object.assign(Object.assign({},et),{flex:`0 0 ${ce}`,maxWidth:ce,minWidth:ce,width:ce}),nt=A()(ae,`${ae}-${ve}`,{[`${ae}-collapsed`]:!!se,[`${ae}-has-trigger`]:U&&st!==null&&!ue,[`${ae}-below`]:!!ut,[`${ae}-zero-width`]:parseFloat(ce)===0},fe);return G.createElement("aside",Object.assign({className:nt},Z,{style:Ye,ref:ne}),G.createElement("div",{className:`${ae}-children`},lt),U||ut&&ue?rt:null)},Lt=G.useMemo(()=>({siderCollapsed:se}),[se]);return G.createElement(Me.Provider,{value:Lt},nr())})},84966:function(wr,xt,x){"use strict";x.d(xt,{VY:function(){return Me},$_:function(){return Ft},h4:function(){return Ie},Gs:function(){return R},ZP:function(){return we}});var D=x(94480),G=x(92310),ye=x.n(G),me=x(2738),H=x(59301),Y=x(36355),he=x(83116),_=O=>{const{componentCls:z,bodyBg:Q,lightSiderBg:ne,lightTriggerBg:We,lightTriggerColor:fe}=O;return{[`${z}-sider-light`]:{background:ne,[`${z}-sider-trigger`]:{color:fe,background:We},[`${z}-sider-zero-width-trigger`]:{color:fe,background:We,border:`1px solid ${Q}`,borderInlineStart:0}}}};const Ge=O=>{const{antCls:z,componentCls:Q,colorText:ne,triggerColor:We,footerBg:fe,triggerBg:st,headerHeight:lt,headerPadding:ge,headerColor:ve,footerPadding:et,triggerHeight:U,zeroTriggerHeight:Re,zeroTriggerWidth:Je,motionDurationMid:F,motionDurationSlow:be,fontSize:pe,borderRadius:X,bodyBg:Oe,headerBg:Le,siderBg:Be}=O;return{[Q]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:Oe,"&, *":{boxSizing:"border-box"},[`&${Q}-has-sider`]:{flexDirection:"row",[`> ${Q}, > ${Q}-content`]:{width:0}},[`${Q}-header, &${Q}-footer`]:{flex:"0 0 auto"},[`${Q}-sider`]:{position:"relative",minWidth:0,background:Be,transition:`all ${F}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${z}-menu${z}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:U},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:U,color:We,lineHeight:`${U}px`,textAlign:"center",background:st,cursor:"pointer",transition:`all ${F}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:lt,insetInlineEnd:-Je,zIndex:1,width:Je,height:Re,color:We,fontSize:O.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:Be,borderStartStartRadius:0,borderStartEndRadius:X,borderEndEndRadius:X,borderEndStartRadius:0,cursor:"pointer",transition:`background ${be} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${be}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-Je,borderStartStartRadius:X,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:X}}}}},_(O)),{"&-rtl":{direction:"rtl"}}),[`${Q}-header`]:{height:lt,padding:ge,color:ve,lineHeight:`${lt}px`,background:Le,[`${z}-menu`]:{lineHeight:"inherit"}},[`${Q}-footer`]:{padding:et,color:ne,fontSize:pe,background:fe},[`${Q}-content`]:{flex:"auto",minHeight:0}}};var Ze=(0,he.Z)("Layout",O=>[Ge(O)],O=>{const{colorBgLayout:z,controlHeight:Q,controlHeightLG:ne,colorText:We,controlHeightSM:fe,marginXXS:st,colorTextLightSolid:lt,colorBgContainer:ge}=O,ve=ne*1.25;return{colorBgHeader:"#001529",colorBgBody:z,colorBgTrigger:"#002140",bodyBg:z,headerBg:"#001529",headerHeight:Q*2,headerPadding:`0 ${ve}px`,headerColor:We,footerPadding:`${fe}px ${ve}px`,footerBg:z,siderBg:"#001529",triggerHeight:ne+st*2,triggerBg:"#002140",triggerColor:lt,zeroTriggerWidth:ne,zeroTriggerHeight:ne,lightSiderBg:ge,lightTriggerBg:ge,lightTriggerColor:We}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),A=function(O,z){var Q={};for(var ne in O)Object.prototype.hasOwnProperty.call(O,ne)&&z.indexOf(ne)<0&&(Q[ne]=O[ne]);if(O!=null&&typeof Object.getOwnPropertySymbols=="function")for(var We=0,ne=Object.getOwnPropertySymbols(O);We<ne.length;We++)z.indexOf(ne[We])<0&&Object.prototype.propertyIsEnumerable.call(O,ne[We])&&(Q[ne[We]]=O[ne[We]]);return Q};const R=H.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function Ne(O){let{suffixCls:z,tagName:Q,displayName:ne}=O;return We=>H.forwardRef((st,lt)=>H.createElement(We,Object.assign({ref:lt,suffixCls:z,tagName:Q},st)))}const mt=H.forwardRef((O,z)=>{const{prefixCls:Q,suffixCls:ne,className:We,tagName:fe}=O,st=A(O,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:lt}=H.useContext(Y.E_),ge=lt("layout",Q),[ve,et]=Ze(ge),U=ne?`${ge}-${ne}`:ge;return ve(H.createElement(fe,Object.assign({className:ye()(Q||U,We,et),ref:z},st)))}),gt=H.forwardRef((O,z)=>{const{direction:Q}=H.useContext(Y.E_),[ne,We]=H.useState([]),{prefixCls:fe,className:st,rootClassName:lt,children:ge,hasSider:ve,tagName:et,style:U}=O,Re=A(O,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),Je=(0,me.Z)(Re,["suffixCls"]),{getPrefixCls:F,layout:be}=H.useContext(Y.E_),pe=F("layout",fe),[X,Oe]=Ze(pe),Le=ye()(pe,{[`${pe}-has-sider`]:typeof ve=="boolean"?ve:ne.length>0,[`${pe}-rtl`]:Q==="rtl"},be==null?void 0:be.className,st,lt,Oe),Be=H.useMemo(()=>({siderHook:{addSider:se=>{We(at=>[].concat((0,D.Z)(at),[se]))},removeSider:se=>{We(at=>at.filter(ut=>ut!==se))}}}),[]);return X(H.createElement(R.Provider,{value:Be},H.createElement(et,Object.assign({ref:z,className:Le,style:Object.assign(Object.assign({},be==null?void 0:be.style),U)},Je),ge)))}),Qe=Ne({tagName:"div",displayName:"Layout"})(gt),Ie=Ne({suffixCls:"header",tagName:"header",displayName:"Header"})(mt),Ft=Ne({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(mt),Me=Ne({suffixCls:"content",tagName:"main",displayName:"Content"})(mt);var we=Qe},40875:function(wr,xt,x){"use strict";x.d(xt,{J:function(){return Y}});var D=x(59301),G=x(33234),ye=x(70425),me=function(he,S){var _={};for(var Ge in he)Object.prototype.hasOwnProperty.call(he,Ge)&&S.indexOf(Ge)<0&&(_[Ge]=he[Ge]);if(he!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,Ge=Object.getOwnPropertySymbols(he);Ze<Ge.length;Ze++)S.indexOf(Ge[Ze])<0&&Object.prototype.propertyIsEnumerable.call(he,Ge[Ze])&&(_[Ge[Ze]]=he[Ge[Ze]]);return _};const H=D.createContext(null),Y=D.forwardRef((he,S)=>{const{children:_}=he,Ge=me(he,["children"]),Ze=D.useContext(H),A=D.useMemo(()=>Object.assign(Object.assign({},Ze),Ge),[Ze,Ge.prefixCls,Ge.mode,Ge.selectable]);return D.createElement(H.Provider,{value:A},D.createElement(G.BR,null,(0,ye.supportNodeRef)(_)?D.cloneElement(_,{ref:S}):_))});xt.Z=H},20834:function(wr,xt,x){"use strict";x.d(xt,{default:function(){return Lt}});var D=x(15285),G=x(59301),ye=x(45818),me=x(92310),H=x.n(me),Y=x(36355),he=function(ae,Z){var K={};for(var ce in ae)Object.prototype.hasOwnProperty.call(ae,ce)&&Z.indexOf(ce)<0&&(K[ce]=ae[ce]);if(ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ue=0,ce=Object.getOwnPropertySymbols(ae);ue<ce.length;ue++)Z.indexOf(ce[ue])<0&&Object.prototype.propertyIsEnumerable.call(ae,ce[ue])&&(K[ce[ue]]=ae[ce[ue]]);return K},_=ae=>{const{prefixCls:Z,className:K,dashed:ce}=ae,ue=he(ae,["prefixCls","className","dashed"]),{getPrefixCls:Fe}=G.useContext(Y.E_),ee=Fe("menu",Z),ie=H()({[`${ee}-item-divider-dashed`]:!!ce},K);return G.createElement(D.iz,Object.assign({className:ie},ue))},Ge=x(11592),Ze=x(2738),A=x(6848),R=x(92343),mt=(0,G.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),Qe=ae=>{var Z;const{className:K,children:ce,icon:ue,title:Fe,danger:ee}=ae,{prefixCls:ie,firstLevel:rt,direction:Ye,disableMenuItemTitleTooltip:nt,inlineCollapsed:Bt}=G.useContext(mt),St=le=>{const ot=G.createElement("span",{className:`${ie}-title-content`},ce);return(!ue||(0,R.l$)(ce)&&ce.type==="span")&&ce&&le&&rt&&typeof ce=="string"?G.createElement("div",{className:`${ie}-inline-collapsed-noicon`},ce.charAt(0)):ot},{siderCollapsed:W}=G.useContext(ye.D);let _t=Fe;typeof Fe=="undefined"?_t=rt?ce:"":Fe===!1&&(_t="");const bt={title:_t};!W&&!Bt&&(bt.title=null,bt.open=!1);const N=(0,Ge.Z)(ce).length;let J=G.createElement(D.ck,Object.assign({},(0,Ze.Z)(ae,["title","icon","danger"]),{className:H()({[`${ie}-item-danger`]:ee,[`${ie}-item-only-child`]:(ue?N+1:N)===1},K),title:typeof Fe=="string"?Fe:void 0}),(0,R.Tm)(ue,{className:H()((0,R.l$)(ue)?(Z=ue.props)===null||Z===void 0?void 0:Z.className:"",`${ie}-item-icon`)}),St(Bt));return nt||(J=G.createElement(A.Z,Object.assign({},bt,{placement:Ye==="rtl"?"left":"right",overlayClassName:`${ie}-inline-collapsed-tooltip`}),J)),J},Ft=ae=>{var Z;const{popupClassName:K,icon:ce,title:ue,theme:Fe}=ae,ee=G.useContext(mt),{prefixCls:ie,inlineCollapsed:rt,theme:Ye}=ee,nt=(0,D.Xl)();let Bt;if(!ce)Bt=rt&&!nt.length&&ue&&typeof ue=="string"?G.createElement("div",{className:`${ie}-inline-collapsed-noicon`},ue.charAt(0)):G.createElement("span",{className:`${ie}-title-content`},ue);else{const W=(0,R.l$)(ue)&&ue.type==="span";Bt=G.createElement(G.Fragment,null,(0,R.Tm)(ce,{className:H()((0,R.l$)(ce)?(Z=ce.props)===null||Z===void 0?void 0:Z.className:"",`${ie}-item-icon`)}),W?ue:G.createElement("span",{className:`${ie}-title-content`},ue))}const St=G.useMemo(()=>Object.assign(Object.assign({},ee),{firstLevel:!1}),[ee]);return G.createElement(mt.Provider,{value:St},G.createElement(D.Wd,Object.assign({},(0,Ze.Z)(ae,["icon"]),{title:Bt,popupClassName:H()(ie,K,`${ie}-${Fe||Ye}`)})))},Me=x(18785),we=x(70425),O=x(62892),z=x(40875),Q=function(ae,Z){var K={};for(var ce in ae)Object.prototype.hasOwnProperty.call(ae,ce)&&Z.indexOf(ce)<0&&(K[ce]=ae[ce]);if(ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ue=0,ce=Object.getOwnPropertySymbols(ae);ue<ce.length;ue++)Z.indexOf(ce[ue])<0&&Object.prototype.propertyIsEnumerable.call(ae,ce[ue])&&(K[ce[ue]]=ae[ce[ue]]);return K};function ne(ae){return(ae||[]).map((Z,K)=>{if(Z&&typeof Z=="object"){const ce=Z,{label:ue,children:Fe,key:ee,type:ie}=ce,rt=Q(ce,["label","children","key","type"]),Ye=ee!=null?ee:`tmp-${K}`;return Fe||ie==="group"?ie==="group"?G.createElement(D.BW,Object.assign({key:Ye},rt,{title:ue}),ne(Fe)):G.createElement(Ft,Object.assign({key:Ye},rt,{title:ue}),ne(Fe)):ie==="divider"?G.createElement(_,Object.assign({key:Ye},rt)):G.createElement(Qe,Object.assign({key:Ye},rt),ue)}return null}).filter(Z=>Z)}function We(ae){return G.useMemo(()=>ae&&ne(ae),[ae])}var fe=x(64993),st=x(17313),lt=x(8378),ge=x(13826),ve=x(29878),et=x(83116),U=x(37613),Je=ae=>{const{componentCls:Z,motionDurationSlow:K,horizontalLineHeight:ce,colorSplit:ue,lineWidth:Fe,lineType:ee,itemPaddingInline:ie}=ae;return{[`${Z}-horizontal`]:{lineHeight:ce,border:0,borderBottom:`${Fe}px ${ee} ${ue}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${Z}-item, ${Z}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:ie},[`> ${Z}-item:hover,
> ${Z}-item-active,
> ${Z}-submenu ${Z}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${Z}-item, ${Z}-submenu-title`]:{transition:[`border-color ${K}`,`background ${K}`].join(",")},[`${Z}-submenu-arrow`]:{display:"none"}}}},be=ae=>{let{componentCls:Z,menuArrowOffset:K}=ae;return{[`${Z}-rtl`]:{direction:"rtl"},[`${Z}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${Z}-rtl${Z}-vertical,
${Z}-submenu-rtl ${Z}-vertical`]:{[`${Z}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${K})`},"&::after":{transform:`rotate(45deg) translateY(${K})`}}}}};const pe=ae=>Object.assign({},(0,st.oN)(ae));var Oe=(ae,Z)=>{const{componentCls:K,itemColor:ce,itemSelectedColor:ue,groupTitleColor:Fe,itemBg:ee,subMenuItemBg:ie,itemSelectedBg:rt,activeBarHeight:Ye,activeBarWidth:nt,activeBarBorderWidth:Bt,motionDurationSlow:St,motionEaseInOut:W,motionEaseOut:_t,itemPaddingInline:bt,motionDurationMid:N,itemHoverColor:J,lineType:le,colorSplit:ot,itemDisabledColor:Te,dangerItemColor:Ce,dangerItemHoverColor:ir,dangerItemSelectedColor:Ht,dangerItemActiveBg:qt,dangerItemSelectedBg:Gt,itemHoverBg:tr,itemActiveBg:Mt,menuSubMenuBg:Mr,horizontalItemSelectedColor:pr,horizontalItemSelectedBg:Vr,horizontalItemBorderRadius:Cr,horizontalItemHoverBg:fr,popupBg:on}=ae;return{[`${K}-${Z}, ${K}-${Z} > ${K}`]:{color:ce,background:ee,[`&${K}-root:focus-visible`]:Object.assign({},pe(ae)),[`${K}-item-group-title`]:{color:Fe},[`${K}-submenu-selected`]:{[`> ${K}-submenu-title`]:{color:ue}},[`${K}-item-disabled, ${K}-submenu-disabled`]:{color:`${Te} !important`},[`${K}-item:not(${K}-item-selected):not(${K}-submenu-selected)`]:{[`&:hover, > ${K}-submenu-title:hover`]:{color:J}},[`&:not(${K}-horizontal)`]:{[`${K}-item:not(${K}-item-selected)`]:{"&:hover":{backgroundColor:tr},"&:active":{backgroundColor:Mt}},[`${K}-submenu-title`]:{"&:hover":{backgroundColor:tr},"&:active":{backgroundColor:Mt}}},[`${K}-item-danger`]:{color:Ce,[`&${K}-item:hover`]:{[`&:not(${K}-item-selected):not(${K}-submenu-selected)`]:{color:ir}},[`&${K}-item:active`]:{background:qt}},[`${K}-item a`]:{"&, &:hover":{color:"inherit"}},[`${K}-item-selected`]:{color:ue,[`&${K}-item-danger`]:{color:Ht},"a, a:hover":{color:"inherit"}},[`& ${K}-item-selected`]:{backgroundColor:rt,[`&${K}-item-danger`]:{backgroundColor:Gt}},[`${K}-item, ${K}-submenu-title`]:{[`&:not(${K}-item-disabled):focus-visible`]:Object.assign({},pe(ae))},[`&${K}-submenu > ${K}`]:{backgroundColor:Mr},[`&${K}-popup > ${K}`]:{backgroundColor:on},[`&${K}-horizontal`]:Object.assign(Object.assign({},Z==="dark"?{borderBottom:0}:{}),{[`> ${K}-item, > ${K}-submenu`]:{top:Bt,marginTop:-Bt,marginBottom:0,borderRadius:Cr,"&::after":{position:"absolute",insetInline:bt,bottom:0,borderBottom:`${Ye}px solid transparent`,transition:`border-color ${St} ${W}`,content:'""'},"&:hover, &-active, &-open":{background:fr,"&::after":{borderBottomWidth:Ye,borderBottomColor:pr}},"&-selected":{color:pr,backgroundColor:Vr,"&:hover":{backgroundColor:Vr},"&::after":{borderBottomWidth:Ye,borderBottomColor:pr}}}}),[`&${K}-root`]:{[`&${K}-inline, &${K}-vertical`]:{borderInlineEnd:`${Bt}px ${le} ${ot}`}},[`&${K}-inline`]:{[`${K}-sub${K}-inline`]:{background:ie},[`${K}-item, ${K}-submenu-title`]:Bt&&nt?{width:`calc(100% + ${Bt}px)`}:{},[`${K}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${nt}px solid ${ue}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${N} ${_t}`,`opacity ${N} ${_t}`].join(","),content:'""'},[`&${K}-item-danger`]:{"&::after":{borderInlineEndColor:Ht}}},[`${K}-selected, ${K}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${N} ${W}`,`opacity ${N} ${W}`].join(",")}}}}}};const Le=ae=>{const{componentCls:Z,itemHeight:K,itemMarginInline:ce,padding:ue,menuArrowSize:Fe,marginXS:ee,itemMarginBlock:ie}=ae,rt=ue+Fe+ee;return{[`${Z}-item`]:{position:"relative",overflow:"hidden"},[`${Z}-item, ${Z}-submenu-title`]:{height:K,lineHeight:`${K}px`,paddingInline:ue,overflow:"hidden",textOverflow:"ellipsis",marginInline:ce,marginBlock:ie,width:`calc(100% - ${ce*2}px)`},[`> ${Z}-item,
> ${Z}-submenu > ${Z}-submenu-title`]:{height:K,lineHeight:`${K}px`},[`${Z}-item-group-list ${Z}-submenu-title,
${Z}-submenu-title`]:{paddingInlineEnd:rt}}};var se=ae=>{const{componentCls:Z,iconCls:K,itemHeight:ce,colorTextLightSolid:ue,dropdownWidth:Fe,controlHeightLG:ee,motionDurationMid:ie,motionEaseOut:rt,paddingXL:Ye,itemMarginInline:nt,fontSizeLG:Bt,motionDurationSlow:St,paddingXS:W,boxShadowSecondary:_t,collapsedWidth:bt,collapsedIconSize:N}=ae,J={height:ce,lineHeight:`${ce}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[Z]:{"&-inline, &-vertical":Object.assign({[`&${Z}-root`]:{boxShadow:"none"}},Le(ae))},[`${Z}-submenu-popup`]:{[`${Z}-vertical`]:Object.assign(Object.assign({},Le(ae)),{boxShadow:_t})}},{[`${Z}-submenu-popup ${Z}-vertical${Z}-sub`]:{minWidth:Fe,maxHeight:`calc(100vh - ${ee*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${Z}-inline`]:{width:"100%",[`&${Z}-root`]:{[`${Z}-item, ${Z}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${St}`,`background ${St}`,`padding ${ie} ${rt}`].join(","),[`> ${Z}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${Z}-sub${Z}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${Z}-submenu > ${Z}-submenu-title`]:J,[`& ${Z}-item-group-title`]:{paddingInlineStart:Ye}},[`${Z}-item`]:J}},{[`${Z}-inline-collapsed`]:{width:bt,[`&${Z}-root`]:{[`${Z}-item, ${Z}-submenu ${Z}-submenu-title`]:{[`> ${Z}-inline-collapsed-noicon`]:{fontSize:Bt,textAlign:"center"}}},[`> ${Z}-item,
> ${Z}-item-group > ${Z}-item-group-list > ${Z}-item,
> ${Z}-item-group > ${Z}-item-group-list > ${Z}-submenu > ${Z}-submenu-title,
> ${Z}-submenu > ${Z}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${Bt/2}px - ${nt}px)`,textOverflow:"clip",[`
${Z}-submenu-arrow,
${Z}-submenu-expand-icon
`]:{opacity:0},[`${Z}-item-icon, ${K}`]:{margin:0,fontSize:N,lineHeight:`${ce}px`,"+ span":{display:"inline-block",opacity:0}}},[`${Z}-item-icon, ${K}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${Z}-item-icon, ${K}`]:{display:"none"},"a, a:hover":{color:ue}},[`${Z}-item-group-title`]:Object.assign(Object.assign({},st.vS),{paddingInline:W})}}]};const at=ae=>{const{componentCls:Z,motionDurationSlow:K,motionDurationMid:ce,motionEaseInOut:ue,motionEaseOut:Fe,iconCls:ee,iconSize:ie,iconMarginInlineEnd:rt}=ae;return{[`${Z}-item, ${Z}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${K}`,`background ${K}`,`padding ${K} ${ue}`].join(","),[`${Z}-item-icon, ${ee}`]:{minWidth:ie,fontSize:ie,transition:[`font-size ${ce} ${Fe}`,`margin ${K} ${ue}`,`color ${K}`].join(","),"+ span":{marginInlineStart:rt,opacity:1,transition:[`opacity ${K} ${ue}`,`margin ${K}`,`color ${K}`].join(",")}},[`${Z}-item-icon`]:Object.assign({},(0,st.Ro)()),[`&${Z}-item-only-child`]:{[`> ${ee}, > ${Z}-item-icon`]:{marginInlineEnd:0}}},[`${Z}-item-disabled, ${Z}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${Z}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},ut=ae=>{const{componentCls:Z,motionDurationSlow:K,motionEaseInOut:ce,borderRadius:ue,menuArrowSize:Fe,menuArrowOffset:ee}=ae;return{[`${Z}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:ae.margin,width:Fe,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${K} ${ce}, opacity ${K}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Fe*.6,height:Fe*.15,backgroundColor:"currentcolor",borderRadius:ue,transition:[`background ${K} ${ce}`,`transform ${K} ${ce}`,`top ${K} ${ce}`,`color ${K} ${ce}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${ee})`},"&::after":{transform:`rotate(-45deg) translateY(${ee})`}}}}},Nt=ae=>{const{antCls:Z,componentCls:K,fontSize:ce,motionDurationSlow:ue,motionDurationMid:Fe,motionEaseInOut:ee,paddingXS:ie,padding:rt,colorSplit:Ye,lineWidth:nt,zIndexPopup:Bt,borderRadiusLG:St,subMenuItemBorderRadius:W,menuArrowSize:_t,menuArrowOffset:bt,lineType:N,menuPanelMaskInset:J,groupTitleLineHeight:le,groupTitleFontSize:ot}=ae;return[{"":{[`${K}`]:Object.assign(Object.assign({},(0,st.dF)()),{"&-hidden":{display:"none"}})},[`${K}-submenu-hidden`]:{display:"none"}},{[K]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,st.Wf)(ae)),(0,st.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:ce,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${ue} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${K}-item`]:{flex:"none"}},[`${K}-item, ${K}-submenu, ${K}-submenu-title`]:{borderRadius:ae.itemBorderRadius},[`${K}-item-group-title`]:{padding:`${ie}px ${rt}px`,fontSize:ot,lineHeight:le,transition:`all ${ue}`},[`&-horizontal ${K}-submenu`]:{transition:[`border-color ${ue} ${ee}`,`background ${ue} ${ee}`].join(",")},[`${K}-submenu, ${K}-submenu-inline`]:{transition:[`border-color ${ue} ${ee}`,`background ${ue} ${ee}`,`padding ${Fe} ${ee}`].join(",")},[`${K}-submenu ${K}-sub`]:{cursor:"initial",transition:[`background ${ue} ${ee}`,`padding ${ue} ${ee}`].join(",")},[`${K}-title-content`]:{transition:`color ${ue}`},[`${K}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${K}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:Ye,borderStyle:N,borderWidth:0,borderTopWidth:nt,marginBlock:nt,padding:0,"&-dashed":{borderStyle:"dashed"}}}),at(ae)),{[`${K}-item-group`]:{[`${K}-item-group-list`]:{margin:0,padding:0,[`${K}-item, ${K}-submenu-title`]:{paddingInline:`${ce*2}px ${rt}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:Bt,borderRadius:St,boxShadow:"none",transformOrigin:"0 0",[`&${K}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${J}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:J},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:ae.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:ae.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:ae.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:ae.paddingXS},[`> ${K}`]:Object.assign(Object.assign(Object.assign({borderRadius:St},at(ae)),ut(ae)),{[`${K}-item, ${K}-submenu > ${K}-submenu-title`]:{borderRadius:W},[`${K}-submenu-title::after`]:{transition:`transform ${ue} ${ee}`}})}}),ut(ae)),{[`&-inline-collapsed ${K}-submenu-arrow,
&-inline ${K}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${bt})`},"&::after":{transform:`rotate(45deg) translateX(-${bt})`}},[`${K}-submenu-open${K}-submenu-inline > ${K}-submenu-title > ${K}-submenu-arrow`]:{transform:`translateY(-${_t*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${bt})`},"&::before":{transform:`rotate(45deg) translateX(${bt})`}}})},{[`${Z}-layout-header`]:{[K]:{lineHeight:"inherit"}}}]};var Wt=(ae,Z)=>(0,et.Z)("Menu",ce=>{if(Z===!1)return[];const{colorBgElevated:ue,colorPrimary:Fe,colorTextLightSolid:ee,controlHeightLG:ie,fontSize:rt,darkItemColor:Ye,darkDangerItemColor:nt,darkItemBg:Bt,darkSubMenuItemBg:St,darkItemSelectedColor:W,darkItemSelectedBg:_t,darkDangerItemSelectedBg:bt,darkItemHoverBg:N,darkGroupTitleColor:J,darkItemHoverColor:le,darkItemDisabledColor:ot,darkDangerItemHoverColor:Te,darkDangerItemSelectedColor:Ce,darkDangerItemActiveBg:ir}=ce,Ht=rt/7*5,qt=(0,U.TS)(ce,{menuArrowSize:Ht,menuHorizontalHeight:ie*1.15,menuArrowOffset:`${Ht*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:ue}),Gt=(0,U.TS)(qt,{itemColor:Ye,itemHoverColor:le,groupTitleColor:J,itemSelectedColor:W,itemBg:Bt,popupBg:Bt,subMenuItemBg:St,itemActiveBg:"transparent",itemSelectedBg:_t,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:N,itemDisabledColor:ot,dangerItemColor:nt,dangerItemHoverColor:Te,dangerItemSelectedColor:Ce,dangerItemActiveBg:ir,dangerItemSelectedBg:bt,menuSubMenuBg:St,horizontalItemSelectedColor:ee,horizontalItemSelectedBg:Fe});return[Nt(qt),Je(qt),se(qt),Oe(qt,"light"),Oe(Gt,"dark"),be(qt),(0,lt.Z)(qt),(0,ge.oN)(qt,"slide-up"),(0,ge.oN)(qt,"slide-down"),(0,ve._y)(qt,"zoom-big")]},ce=>{const{colorPrimary:ue,colorError:Fe,colorTextDisabled:ee,colorErrorBg:ie,colorText:rt,colorTextDescription:Ye,colorBgContainer:nt,colorFillAlter:Bt,colorFillContent:St,lineWidth:W,lineWidthBold:_t,controlItemBgActive:bt,colorBgTextHover:N,controlHeightLG:J,lineHeight:le,colorBgElevated:ot,marginXXS:Te,padding:Ce,fontSize:ir,controlHeightSM:Ht,fontSizeLG:qt,colorTextLightSolid:Gt,colorErrorHover:tr}=ce,Mt=new fe.C(Gt).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:ce.zIndexPopupBase+50,radiusItem:ce.borderRadiusLG,itemBorderRadius:ce.borderRadiusLG,radiusSubMenuItem:ce.borderRadiusSM,subMenuItemBorderRadius:ce.borderRadiusSM,colorItemText:rt,itemColor:rt,colorItemTextHover:rt,itemHoverColor:rt,colorItemTextHoverHorizontal:ue,horizontalItemHoverColor:ue,colorGroupTitle:Ye,groupTitleColor:Ye,colorItemTextSelected:ue,itemSelectedColor:ue,colorItemTextSelectedHorizontal:ue,horizontalItemSelectedColor:ue,colorItemBg:nt,itemBg:nt,colorItemBgHover:N,itemHoverBg:N,colorItemBgActive:St,itemActiveBg:bt,colorSubItemBg:Bt,subMenuItemBg:Bt,colorItemBgSelected:bt,itemSelectedBg:bt,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:_t,activeBarHeight:_t,colorActiveBarBorderSize:W,activeBarBorderWidth:W,colorItemTextDisabled:ee,itemDisabledColor:ee,colorDangerItemText:Fe,dangerItemColor:Fe,colorDangerItemTextHover:Fe,dangerItemHoverColor:Fe,colorDangerItemTextSelected:Fe,dangerItemSelectedColor:Fe,colorDangerItemBgActive:ie,dangerItemActiveBg:ie,colorDangerItemBgSelected:ie,dangerItemSelectedBg:ie,itemMarginInline:ce.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:J,groupTitleLineHeight:le,collapsedWidth:J*2,popupBg:ot,itemMarginBlock:Te,itemPaddingInline:Ce,horizontalLineHeight:`${J*1.15}px`,iconSize:ir,iconMarginInlineEnd:Ht-ir,collapsedIconSize:qt,groupTitleFontSize:ir,darkItemDisabledColor:new fe.C(Gt).setAlpha(.25).toRgbString(),darkItemColor:Mt,darkDangerItemColor:Fe,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:Gt,darkItemSelectedBg:ue,darkDangerItemSelectedBg:Fe,darkItemHoverBg:"transparent",darkGroupTitleColor:Mt,darkItemHoverColor:Gt,darkDangerItemHoverColor:tr,darkDangerItemSelectedColor:Gt,darkDangerItemActiveBg:Fe}},{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]]})(ae),Ct=function(ae,Z){var K={};for(var ce in ae)Object.prototype.hasOwnProperty.call(ae,ce)&&Z.indexOf(ce)<0&&(K[ce]=ae[ce]);if(ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ue=0,ce=Object.getOwnPropertySymbols(ae);ue<ce.length;ue++)Z.indexOf(ce[ue])<0&&Object.prototype.propertyIsEnumerable.call(ae,ce[ue])&&(K[ce[ue]]=ae[ce[ue]]);return K},zt=(0,G.forwardRef)((ae,Z)=>{var K,ce;const ue=G.useContext(z.Z),Fe=ue||{},{getPrefixCls:ee,getPopupContainer:ie,direction:rt,menu:Ye}=G.useContext(Y.E_),nt=ee(),{prefixCls:Bt,className:St,style:W,theme:_t="light",expandIcon:bt,_internalDisableMenuItemTitleTooltip:N,inlineCollapsed:J,siderCollapsed:le,items:ot,children:Te,rootClassName:Ce,mode:ir,selectable:Ht,onClick:qt,overflowedIndicatorPopupClassName:Gt}=ae,tr=Ct(ae,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),Mt=(0,Ze.Z)(tr,["collapsedWidth"]),Mr=We(ot)||Te;(K=Fe.validator)===null||K===void 0||K.call(Fe,{mode:ir});const pr=(0,we.useEvent)(function(){var Jr;qt==null||qt.apply(void 0,arguments),(Jr=Fe.onClick)===null||Jr===void 0||Jr.call(Fe)}),Vr=Fe.mode||ir,Cr=Ht!=null?Ht:Fe.selectable,fr=G.useMemo(()=>le!==void 0?le:J,[J,le]),on={horizontal:{motionName:`${nt}-slide-up`},inline:(0,O.Z)(nt),other:{motionName:`${nt}-zoom-big`}},Vt=ee("menu",Bt||Fe.prefixCls),[rn,nn]=Wt(Vt,!ue),qr=H()(`${Vt}-${_t}`,Ye==null?void 0:Ye.className,St);let Xr;if(typeof bt=="function")Xr=bt;else if(bt===null||bt===!1)Xr=null;else if(Fe.expandIcon===null||Fe.expandIcon===!1)Xr=null;else{const Jr=bt!=null?bt:Fe.expandIcon;Xr=(0,R.Tm)(Jr,{className:H()(`${Vt}-submenu-expand-icon`,(0,R.l$)(Jr)?(ce=Jr.props)===null||ce===void 0?void 0:ce.className:"")})}const Sr=G.useMemo(()=>({prefixCls:Vt,inlineCollapsed:fr||!1,direction:rt,firstLevel:!0,theme:_t,mode:Vr,disableMenuItemTitleTooltip:N}),[Vt,fr,rt,N,_t]);return rn(G.createElement(z.Z.Provider,{value:null},G.createElement(mt.Provider,{value:Sr},G.createElement(D.ZP,Object.assign({getPopupContainer:ie,overflowedIndicator:G.createElement(Me.Z,null),overflowedIndicatorPopupClassName:H()(Vt,`${Vt}-${_t}`,Gt),mode:Vr,selectable:Cr,onClick:pr},Mt,{inlineCollapsed:fr,style:Object.assign(Object.assign({},Ye==null?void 0:Ye.style),W),className:qr,prefixCls:Vt,direction:rt,defaultMotions:on,expandIcon:Xr,ref:Z,rootClassName:H()(Ce,nn)}),Mr))))});const nr=(0,G.forwardRef)((ae,Z)=>{const K=(0,G.useRef)(null),ce=G.useContext(ye.D);return(0,G.useImperativeHandle)(Z,()=>({menu:K.current,focus:ue=>{var Fe;(Fe=K.current)===null||Fe===void 0||Fe.focus(ue)}})),G.createElement(zt,Object.assign({ref:K},ae,ce))});nr.Item=Qe,nr.SubMenu=Ft,nr.Divider=_,nr.ItemGroup=D.BW;var Lt=nr},5112:function(wr,xt,x){"use strict";x.d(xt,{ZP:function(){return be}});var D=x(92310),G=x.n(D),ye=x(18929),me=x(26112),H=x(59301),Y=x(36355),he=x(19716);const S=H.createContext(null),_=S.Provider;var Ge=S;const Ze=H.createContext(null),A=Ze.Provider;var R=x(5630),Ne=x(8654),mt=x(1684),gt=x(32441),Qe=x(17313),Ie=x(83116),Ft=x(37613);const Me=pe=>{const{componentCls:X,antCls:Oe}=pe,Le=`${X}-group`;return{[Le]:Object.assign(Object.assign({},(0,Qe.Wf)(pe)),{display:"inline-block",fontSize:0,[`&${Le}-rtl`]:{direction:"rtl"},[`${Oe}-badge ${Oe}-badge-count`]:{zIndex:1},[`> ${Oe}-badge:not(:first-child) > ${Oe}-button-wrapper`]:{borderInlineStart:"none"}})}},we=pe=>{const{componentCls:X,wrapperMarginInlineEnd:Oe,colorPrimary:Le,radioSize:Be,motionDurationSlow:se,motionDurationMid:at,motionEaseInOutCirc:ut,colorBgContainer:Nt,colorBorder:Wt,lineWidth:Ct,dotSize:er,colorBgContainerDisabled:zt,colorTextDisabled:nr,paddingXS:Lt,dotColorDisabled:ae,lineType:Z,radioDotDisabledSize:K,wireframe:ce,colorWhite:ue}=pe,Fe=`${X}-inner`;return{[`${X}-wrapper`]:Object.assign(Object.assign({},(0,Qe.Wf)(pe)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:Oe,cursor:"pointer",[`&${X}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:pe.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${X}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${Ct}px ${Z} ${Le}`,borderRadius:"50%",visibility:"hidden",content:'""'},[X]:Object.assign(Object.assign({},(0,Qe.Wf)(pe)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${X}-wrapper:hover &,
&:hover ${Fe}`]:{borderColor:Le},[`${X}-input:focus-visible + ${Fe}`]:Object.assign({},(0,Qe.oN)(pe)),[`${X}:hover::after, ${X}-wrapper:hover &::after`]:{visibility:"visible"},[`${X}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:Be,height:Be,marginBlockStart:Be/-2,marginInlineStart:Be/-2,backgroundColor:ce?Le:ue,borderBlockStart:0,borderInlineStart:0,borderRadius:Be,transform:"scale(0)",opacity:0,transition:`all ${se} ${ut}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:Be,height:Be,backgroundColor:Nt,borderColor:Wt,borderStyle:"solid",borderWidth:Ct,borderRadius:"50%",transition:`all ${at}`},[`${X}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${X}-checked`]:{[Fe]:{borderColor:Le,backgroundColor:ce?Nt:Le,"&::after":{transform:`scale(${er/Be})`,opacity:1,transition:`all ${se} ${ut}`}}},[`${X}-disabled`]:{cursor:"not-allowed",[Fe]:{backgroundColor:zt,borderColor:Wt,cursor:"not-allowed","&::after":{backgroundColor:ae}},[`${X}-input`]:{cursor:"not-allowed"},[`${X}-disabled + span`]:{color:nr,cursor:"not-allowed"},[`&${X}-checked`]:{[Fe]:{"&::after":{transform:`scale(${K/Be})`}}}},[`span${X} + *`]:{paddingInlineStart:Lt,paddingInlineEnd:Lt}})}},O=pe=>{const{buttonColor:X,controlHeight:Oe,componentCls:Le,lineWidth:Be,lineType:se,colorBorder:at,motionDurationSlow:ut,motionDurationMid:Nt,buttonPaddingInline:Wt,fontSize:Ct,buttonBg:er,fontSizeLG:zt,controlHeightLG:nr,controlHeightSM:Lt,paddingXS:ae,borderRadius:Z,borderRadiusSM:K,borderRadiusLG:ce,buttonCheckedBg:ue,buttonSolidCheckedColor:Fe,colorTextDisabled:ee,colorBgContainerDisabled:ie,buttonCheckedBgDisabled:rt,buttonCheckedColorDisabled:Ye,colorPrimary:nt,colorPrimaryHover:Bt,colorPrimaryActive:St,buttonSolidCheckedBg:W,buttonSolidCheckedHoverBg:_t,buttonSolidCheckedActiveBg:bt}=pe;return{[`${Le}-button-wrapper`]:{position:"relative",display:"inline-block",height:Oe,margin:0,paddingInline:Wt,paddingBlock:0,color:X,fontSize:Ct,lineHeight:`${Oe-Be*2}px`,background:er,border:`${Be}px ${se} ${at}`,borderBlockStartWidth:Be+.02,borderInlineStartWidth:0,borderInlineEndWidth:Be,cursor:"pointer",transition:[`color ${Nt}`,`background ${Nt}`,`box-shadow ${Nt}`].join(","),a:{color:X},[`> ${Le}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-Be,insetInlineStart:-Be,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:Be,paddingInline:0,backgroundColor:at,transition:`background-color ${ut}`,content:'""'}},"&:first-child":{borderInlineStart:`${Be}px ${se} ${at}`,borderStartStartRadius:Z,borderEndStartRadius:Z},"&:last-child":{borderStartEndRadius:Z,borderEndEndRadius:Z},"&:first-child:last-child":{borderRadius:Z},[`${Le}-group-large &`]:{height:nr,fontSize:zt,lineHeight:`${nr-Be*2}px`,"&:first-child":{borderStartStartRadius:ce,borderEndStartRadius:ce},"&:last-child":{borderStartEndRadius:ce,borderEndEndRadius:ce}},[`${Le}-group-small &`]:{height:Lt,paddingInline:ae-Be,paddingBlock:0,lineHeight:`${Lt-Be*2}px`,"&:first-child":{borderStartStartRadius:K,borderEndStartRadius:K},"&:last-child":{borderStartEndRadius:K,borderEndEndRadius:K}},"&:hover":{position:"relative",color:nt},"&:has(:focus-visible)":Object.assign({},(0,Qe.oN)(pe)),[`${Le}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${Le}-button-wrapper-disabled)`]:{zIndex:1,color:nt,background:ue,borderColor:nt,"&::before":{backgroundColor:nt},"&:first-child":{borderColor:nt},"&:hover":{color:Bt,borderColor:Bt,"&::before":{backgroundColor:Bt}},"&:active":{color:St,borderColor:St,"&::before":{backgroundColor:St}}},[`${Le}-group-solid &-checked:not(${Le}-button-wrapper-disabled)`]:{color:Fe,background:W,borderColor:W,"&:hover":{color:Fe,background:_t,borderColor:_t},"&:active":{color:Fe,background:bt,borderColor:bt}},"&-disabled":{color:ee,backgroundColor:ie,borderColor:at,cursor:"not-allowed","&:first-child, &:hover":{color:ee,backgroundColor:ie,borderColor:at}},[`&-disabled${Le}-button-wrapper-checked`]:{color:Ye,backgroundColor:rt,borderColor:at,boxShadow:"none"}}}},z=pe=>pe-4*2;var Q=(0,Ie.Z)("Radio",pe=>{const{controlOutline:X,controlOutlineWidth:Oe,radioSize:Le}=pe,Be=`0 0 0 ${Oe}px ${X}`,se=Be,at=z(Le),ut=(0,Ft.TS)(pe,{radioDotDisabledSize:at,radioFocusShadow:Be,radioButtonFocusShadow:se});return[Me(ut),we(ut),O(ut)]},pe=>{const{wireframe:X,padding:Oe,marginXS:Le,lineWidth:Be,fontSizeLG:se,colorText:at,colorBgContainer:ut,colorTextDisabled:Nt,controlItemBgActiveDisabled:Wt,colorTextLightSolid:Ct,colorPrimary:er,colorPrimaryHover:zt,colorPrimaryActive:nr}=pe,Lt=4,ae=se,Z=X?z(ae):ae-(Lt+Be)*2;return{radioSize:ae,dotSize:Z,dotColorDisabled:Nt,buttonSolidCheckedColor:Ct,buttonSolidCheckedBg:er,buttonSolidCheckedHoverBg:zt,buttonSolidCheckedActiveBg:nr,buttonBg:ut,buttonCheckedBg:ut,buttonColor:at,buttonCheckedBgDisabled:Wt,buttonCheckedColorDisabled:Nt,buttonPaddingInline:Oe-Be,wrapperMarginInlineEnd:Le}}),ne=x(14088),We=x(4572),fe=function(pe,X){var Oe={};for(var Le in pe)Object.prototype.hasOwnProperty.call(pe,Le)&&X.indexOf(Le)<0&&(Oe[Le]=pe[Le]);if(pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Be=0,Le=Object.getOwnPropertySymbols(pe);Be<Le.length;Be++)X.indexOf(Le[Be])<0&&Object.prototype.propertyIsEnumerable.call(pe,Le[Be])&&(Oe[Le[Be]]=pe[Le[Be]]);return Oe};const st=(pe,X)=>{var Oe,Le;const Be=H.useContext(Ge),se=H.useContext(Ze),{getPrefixCls:at,direction:ut,radio:Nt}=H.useContext(Y.E_),Wt=H.useRef(null),Ct=(0,Ne.sQ)(X,Wt),{isFormItemInput:er}=H.useContext(gt.aM),zt=St=>{var W,_t;(W=pe.onChange)===null||W===void 0||W.call(pe,St),(_t=Be==null?void 0:Be.onChange)===null||_t===void 0||_t.call(Be,St)},{prefixCls:nr,className:Lt,rootClassName:ae,children:Z,style:K}=pe,ce=fe(pe,["prefixCls","className","rootClassName","children","style"]),ue=at("radio",nr),Fe=((Be==null?void 0:Be.optionType)||se)==="button",ee=Fe?`${ue}-button`:ue,[ie,rt]=Q(ue),Ye=Object.assign({},ce),nt=H.useContext(mt.Z);Be&&(Ye.name=Be.name,Ye.onChange=zt,Ye.checked=pe.value===Be.value,Ye.disabled=(Oe=Ye.disabled)!==null&&Oe!==void 0?Oe:Be.disabled),Ye.disabled=(Le=Ye.disabled)!==null&&Le!==void 0?Le:nt;const Bt=G()(`${ee}-wrapper`,{[`${ee}-wrapper-checked`]:Ye.checked,[`${ee}-wrapper-disabled`]:Ye.disabled,[`${ee}-wrapper-rtl`]:ut==="rtl",[`${ee}-wrapper-in-form-item`]:er},Nt==null?void 0:Nt.className,Lt,ae,rt);return ie(H.createElement(ne.Z,{component:"Radio",disabled:Ye.disabled},H.createElement("label",{className:Bt,style:Object.assign(Object.assign({},Nt==null?void 0:Nt.style),K),onMouseEnter:pe.onMouseEnter,onMouseLeave:pe.onMouseLeave},H.createElement(R.Z,Object.assign({},Ye,{className:G()(Ye.className,!Fe&&We.A),type:"radio",prefixCls:ee,ref:Ct})),Z!==void 0?H.createElement("span",null,Z):null)))};var ge=H.forwardRef(st);const ve=H.forwardRef((pe,X)=>{const{getPrefixCls:Oe,direction:Le}=H.useContext(Y.E_),[Be,se]=(0,ye.Z)(pe.defaultValue,{value:pe.value}),at=W=>{const _t=Be,bt=W.target.value;"value"in pe||se(bt);const{onChange:N}=pe;N&&bt!==_t&&N(W)},{prefixCls:ut,className:Nt,rootClassName:Wt,options:Ct,buttonStyle:er="outline",disabled:zt,children:nr,size:Lt,style:ae,id:Z,onMouseEnter:K,onMouseLeave:ce,onFocus:ue,onBlur:Fe}=pe,ee=Oe("radio",ut),ie=`${ee}-group`,[rt,Ye]=Q(ee);let nt=nr;Ct&&Ct.length>0&&(nt=Ct.map(W=>typeof W=="string"||typeof W=="number"?H.createElement(ge,{key:W.toString(),prefixCls:ee,disabled:zt,value:W,checked:Be===W},W):H.createElement(ge,{key:`radio-group-value-options-${W.value}`,prefixCls:ee,disabled:W.disabled||zt,value:W.value,checked:Be===W.value,title:W.title,style:W.style},W.label)));const Bt=(0,he.Z)(Lt),St=G()(ie,`${ie}-${er}`,{[`${ie}-${Bt}`]:Bt,[`${ie}-rtl`]:Le==="rtl"},Nt,Wt,Ye);return rt(H.createElement("div",Object.assign({},(0,me.Z)(pe,{aria:!0,data:!0}),{className:St,style:ae,onMouseEnter:K,onMouseLeave:ce,onFocus:ue,onBlur:Fe,id:Z,ref:X}),H.createElement(_,{value:{onChange:at,value:Be,disabled:pe.disabled,name:pe.name,optionType:pe.optionType}},nt)))});var et=H.memo(ve),U=function(pe,X){var Oe={};for(var Le in pe)Object.prototype.hasOwnProperty.call(pe,Le)&&X.indexOf(Le)<0&&(Oe[Le]=pe[Le]);if(pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Be=0,Le=Object.getOwnPropertySymbols(pe);Be<Le.length;Be++)X.indexOf(Le[Be])<0&&Object.prototype.propertyIsEnumerable.call(pe,Le[Be])&&(Oe[Le[Be]]=pe[Le[Be]]);return Oe};const Re=(pe,X)=>{const{getPrefixCls:Oe}=H.useContext(Y.E_),{prefixCls:Le}=pe,Be=U(pe,["prefixCls"]),se=Oe("radio",Le);return H.createElement(A,{value:"button"},H.createElement(ge,Object.assign({prefixCls:se},Be,{type:"radio",ref:X})))};var Je=H.forwardRef(Re);const F=ge;F.Button=Je,F.Group=et,F.__ANT_RADIO=!0;var be=F},8378:function(wr,xt){"use strict";const x=D=>({[D.componentCls]:{[`${D.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${D.motionDurationMid} ${D.motionEaseInOut},
opacity ${D.motionDurationMid} ${D.motionEaseInOut} !important`}},[`${D.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${D.motionDurationMid} ${D.motionEaseInOut},
opacity ${D.motionDurationMid} ${D.motionEaseInOut} !important`}}});xt.Z=x},92899:function(wr,xt,x){"use strict";x.d(xt,{Fm:function(){return A}});var D=x(36237),G=x(95406);const ye=new D.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),me=new D.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),H=new D.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Y=new D.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),he=new D.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),S=new D.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),_=new D.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Ge=new D.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),Ze={"move-up":{inKeyframes:_,outKeyframes:Ge},"move-down":{inKeyframes:ye,outKeyframes:me},"move-left":{inKeyframes:H,outKeyframes:Y},"move-right":{inKeyframes:he,outKeyframes:S}},A=(R,Ne)=>{const{antCls:mt}=R,gt=`${mt}-${Ne}`,{inKeyframes:Qe,outKeyframes:Ie}=Ze[Ne];return[(0,G.R)(gt,Qe,Ie,R.motionDurationMid),{[`
${gt}-enter,
${gt}-appear
`]:{opacity:0,animationTimingFunction:R.motionEaseOutCirc},[`${gt}-leave`]:{animationTimingFunction:R.motionEaseInOutCirc}}]}},13826:function(wr,xt,x){"use strict";x.d(xt,{Qt:function(){return H},Uw:function(){return me},fJ:function(){return ye},ly:function(){return Y},oN:function(){return A}});var D=x(36237),G=x(95406);const ye=new D.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),me=new D.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),H=new D.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Y=new D.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),he=new D.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),S=new D.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),_=new D.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),Ge=new D.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),Ze={"slide-up":{inKeyframes:ye,outKeyframes:me},"slide-down":{inKeyframes:H,outKeyframes:Y},"slide-left":{inKeyframes:he,outKeyframes:S},"slide-right":{inKeyframes:_,outKeyframes:Ge}},A=(R,Ne)=>{const{antCls:mt}=R,gt=`${mt}-${Ne}`,{inKeyframes:Qe,outKeyframes:Ie}=Ze[Ne];return[(0,G.R)(gt,Qe,Ie,R.motionDurationMid),{[`
${gt}-enter,
${gt}-appear
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:R.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${gt}-leave`]:{animationTimingFunction:R.motionEaseInQuint}}]}},99313:function(wr,xt,x){"use strict";x.d(xt,{default:function(){return dn}});var D=x(99267),G=x(18785),ye=x(62772),me=x(92310),H=x.n(me),Y=x(54476),he=x(20068),S=x(33885),_=x(42978),Ge=x(76190),Ze=x(75931),A=x(59301),R=x(49658),Ne=x(18929),mt=x(77900),gt=(0,A.createContext)(null),Qe=A.forwardRef(function(C,I){var Ae=C.prefixCls,Pe=C.className,ze=C.style,Ke=C.id,ht=C.active,ct=C.tabKey,Et=C.children;return A.createElement("div",{id:Ke&&"".concat(Ke,"-panel-").concat(ct),role:"tabpanel",tabIndex:ht?0:-1,"aria-labelledby":Ke&&"".concat(Ke,"-tab-").concat(ct),"aria-hidden":!ht,style:ze,className:H()(Ae,ht&&"".concat(Ae,"-active"),Pe),ref:I},Et)}),Ie=Qe,Ft=["key","forceRender","style","className"];function Me(C){var I=C.id,Ae=C.activeKey,Pe=C.animated,ze=C.tabPosition,Ke=C.destroyInactiveTabPane,ht=A.useContext(gt),ct=ht.prefixCls,Et=ht.tabs,ar=Pe.tabPane,jt="".concat(ct,"-tabpane");return A.createElement("div",{className:H()("".concat(ct,"-content-holder"))},A.createElement("div",{className:H()("".concat(ct,"-content"),"".concat(ct,"-content-").concat(ze),(0,he.Z)({},"".concat(ct,"-content-animated"),ar))},Et.map(function(Pt){var $t=Pt.key,Xt=Pt.forceRender,xe=Pt.style,zr=Pt.className,Br=(0,Ze.Z)(Pt,Ft),hr=$t===Ae;return A.createElement(mt.default,(0,Y.Z)({key:$t,visible:hr,forceRender:Xt,removeOnLeave:!!Ke,leavedClassName:"".concat(jt,"-hidden")},Pe.tabPaneMotion),function(Ur,mr){var Rt=Ur.style,j=Ur.className;return A.createElement(Ie,(0,Y.Z)({},Br,{prefixCls:jt,id:I,tabKey:$t,animated:ar,active:hr,style:(0,S.Z)((0,S.Z)({},xe),Rt),className:H()(zr,j),ref:mr}))})})))}var we=x(94480),O=x(29301),z=x(6089),Q=x(8654),ne={width:0,height:0,left:0,top:0};function We(C,I,Ae){return(0,A.useMemo)(function(){for(var Pe,ze=new Map,Ke=I.get((Pe=C[0])===null||Pe===void 0?void 0:Pe.key)||ne,ht=Ke.left+Ke.width,ct=0;ct<C.length;ct+=1){var Et=C[ct].key,ar=I.get(Et);if(!ar){var jt;ar=I.get((jt=C[ct-1])===null||jt===void 0?void 0:jt.key)||ne}var Pt=ze.get(Et)||(0,S.Z)({},ar);Pt.right=ht-Pt.left-Pt.width,ze.set(Et,Pt)}return ze},[C.map(function(Pe){return Pe.key}).join("_"),I,Ae])}function fe(C,I){var Ae=A.useRef(C),Pe=A.useState({}),ze=(0,_.Z)(Pe,2),Ke=ze[1];function ht(ct){var Et=typeof ct=="function"?ct(Ae.current):ct;Et!==Ae.current&&I(Et,Ae.current),Ae.current=Et,Ke({})}return[Ae.current,ht]}var st=.1,lt=.01,ge=20,ve=Math.pow(.995,ge);function et(C,I){var Ae=(0,A.useState)(),Pe=(0,_.Z)(Ae,2),ze=Pe[0],Ke=Pe[1],ht=(0,A.useState)(0),ct=(0,_.Z)(ht,2),Et=ct[0],ar=ct[1],jt=(0,A.useState)(0),Pt=(0,_.Z)(jt,2),$t=Pt[0],Xt=Pt[1],xe=(0,A.useState)(),zr=(0,_.Z)(xe,2),Br=zr[0],hr=zr[1],Ur=(0,A.useRef)();function mr(q){var ke=q.touches[0],_e=ke.screenX,je=ke.screenY;Ke({x:_e,y:je}),window.clearInterval(Ur.current)}function Rt(q){if(ze){q.preventDefault();var ke=q.touches[0],_e=ke.screenX,je=ke.screenY;Ke({x:_e,y:je});var vt=_e-ze.x,dt=je-ze.y;I(vt,dt);var Zt=Date.now();ar(Zt),Xt(Zt-Et),hr({x:vt,y:dt})}}function j(){if(ze&&(Ke(null),hr(null),Br)){var q=Br.x/$t,ke=Br.y/$t,_e=Math.abs(q),je=Math.abs(ke);if(Math.max(_e,je)<st)return;var vt=q,dt=ke;Ur.current=window.setInterval(function(){if(Math.abs(vt)<lt&&Math.abs(dt)<lt){window.clearInterval(Ur.current);return}vt*=ve,dt*=ve,I(vt*ge,dt*ge)},ge)}}var V=(0,A.useRef)();function de(q){var ke=q.deltaX,_e=q.deltaY,je=0,vt=Math.abs(ke),dt=Math.abs(_e);vt===dt?je=V.current==="x"?ke:_e:vt>dt?(je=ke,V.current="x"):(je=_e,V.current="y"),I(-je,-je)&&q.preventDefault()}var Ee=(0,A.useRef)(null);Ee.current={onTouchStart:mr,onTouchMove:Rt,onTouchEnd:j,onWheel:de},A.useEffect(function(){function q(vt){Ee.current.onTouchStart(vt)}function ke(vt){Ee.current.onTouchMove(vt)}function _e(vt){Ee.current.onTouchEnd(vt)}function je(vt){Ee.current.onWheel(vt)}return document.addEventListener("touchmove",ke,{passive:!1}),document.addEventListener("touchend",_e,{passive:!1}),C.current.addEventListener("touchstart",q,{passive:!1}),C.current.addEventListener("wheel",je),function(){document.removeEventListener("touchmove",ke),document.removeEventListener("touchend",_e)}},[])}var U=x(34280);function Re(C){var I=(0,A.useState)(0),Ae=(0,_.Z)(I,2),Pe=Ae[0],ze=Ae[1],Ke=(0,A.useRef)(0),ht=(0,A.useRef)();return ht.current=C,(0,U.o)(function(){var ct;(ct=ht.current)===null||ct===void 0||ct.call(ht)},[Pe]),function(){Ke.current===Pe&&(Ke.current+=1,ze(Ke.current))}}function Je(C){var I=(0,A.useRef)([]),Ae=(0,A.useState)({}),Pe=(0,_.Z)(Ae,2),ze=Pe[1],Ke=(0,A.useRef)(typeof C=="function"?C():C),ht=Re(function(){var Et=Ke.current;I.current.forEach(function(ar){Et=ar(Et)}),I.current=[],Ke.current=Et,ze({})});function ct(Et){I.current.push(Et),ht()}return[Ke.current,ct]}var F={width:0,height:0,left:0,top:0,right:0};function be(C,I,Ae,Pe,ze,Ke,ht){var ct=ht.tabs,Et=ht.tabPosition,ar=ht.rtl,jt,Pt,$t;return["top","bottom"].includes(Et)?(jt="width",Pt=ar?"right":"left",$t=Math.abs(Ae)):(jt="height",Pt="top",$t=-Ae),(0,A.useMemo)(function(){if(!ct.length)return[0,0];for(var Xt=ct.length,xe=Xt,zr=0;zr<Xt;zr+=1){var Br=C.get(ct[zr].key)||F;if(Br[Pt]+Br[jt]>$t+I){xe=zr-1;break}}for(var hr=0,Ur=Xt-1;Ur>=0;Ur-=1){var mr=C.get(ct[Ur].key)||F;if(mr[Pt]<$t){hr=Ur+1;break}}return hr>=xe?[0,0]:[hr,xe]},[C,I,Pe,ze,Ke,$t,Et,ct.map(function(Xt){return Xt.key}).join("_"),ar])}function pe(C){var I;return C instanceof Map?(I={},C.forEach(function(Ae,Pe){I[Pe]=Ae})):I=C,JSON.stringify(I)}var X="TABS_DQ";function Oe(C){return String(C).replace(/"/g,X)}function Le(C,I,Ae,Pe){return!(!Ae||Pe||C===!1||C===void 0&&(I===!1||I===null))}function Be(C,I){var Ae=C.prefixCls,Pe=C.editable,ze=C.locale,Ke=C.style;return!Pe||Pe.showAdd===!1?null:A.createElement("button",{ref:I,type:"button",className:"".concat(Ae,"-nav-add"),style:Ke,"aria-label":(ze==null?void 0:ze.addAriaLabel)||"Add tab",onClick:function(ct){Pe.onEdit("add",{event:ct})}},Pe.addIcon||"+")}var se=A.forwardRef(Be),at=A.forwardRef(function(C,I){var Ae=C.position,Pe=C.prefixCls,ze=C.extra;if(!ze)return null;var Ke,ht={};return(0,Ge.Z)(ze)==="object"&&!A.isValidElement(ze)?ht=ze:ht.right=ze,Ae==="right"&&(Ke=ht.right),Ae==="left"&&(Ke=ht.left),Ke?A.createElement("div",{className:"".concat(Pe,"-extra-content"),ref:I},Ke):null}),ut=at,Nt=x(31561),Wt=x(15285),Ct=x(10228);function er(C,I){var Ae=C.prefixCls,Pe=C.id,ze=C.tabs,Ke=C.locale,ht=C.mobile,ct=C.moreIcon,Et=ct===void 0?"More":ct,ar=C.moreTransitionName,jt=C.style,Pt=C.className,$t=C.editable,Xt=C.tabBarGutter,xe=C.rtl,zr=C.removeAriaLabel,Br=C.onTabClick,hr=C.getPopupContainer,Ur=C.popupClassName,mr=(0,A.useState)(!1),Rt=(0,_.Z)(mr,2),j=Rt[0],V=Rt[1],de=(0,A.useState)(null),Ee=(0,_.Z)(de,2),q=Ee[0],ke=Ee[1],_e="".concat(Pe,"-more-popup"),je="".concat(Ae,"-dropdown"),vt=q!==null?"".concat(_e,"-").concat(q):null,dt=Ke==null?void 0:Ke.dropdownAriaLabel;function Zt(Jt,Yt){Jt.preventDefault(),Jt.stopPropagation(),$t.onEdit("remove",{key:Yt,event:Jt})}var lr=A.createElement(Wt.ZP,{onClick:function(Yt){var or=Yt.key,Ut=Yt.domEvent;Br(or,Ut),V(!1)},prefixCls:"".concat(je,"-menu"),id:_e,tabIndex:-1,role:"listbox","aria-activedescendant":vt,selectedKeys:[q],"aria-label":dt!==void 0?dt:"expanded dropdown"},ze.map(function(Jt){var Yt=Jt.closable,or=Jt.disabled,Ut=Jt.closeIcon,Qt=Jt.key,dr=Jt.label,$r=Le(Yt,Ut,$t,or);return A.createElement(Wt.sN,{key:Qt,id:"".concat(_e,"-").concat(Qt),role:"option","aria-controls":Pe&&"".concat(Pe,"-panel-").concat(Qt),disabled:or},A.createElement("span",null,dr),$r&&A.createElement("button",{type:"button","aria-label":zr||"remove",tabIndex:0,className:"".concat(je,"-menu-item-remove"),onClick:function(At){At.stopPropagation(),Zt(At,Qt)}},Ut||$t.removeIcon||"\xD7"))}));function gr(Jt){for(var Yt=ze.filter(function($r){return!$r.disabled}),or=Yt.findIndex(function($r){return $r.key===q})||0,Ut=Yt.length,Qt=0;Qt<Ut;Qt+=1){or=(or+Jt+Ut)%Ut;var dr=Yt[or];if(!dr.disabled){ke(dr.key);return}}}function vr(Jt){var Yt=Jt.which;if(!j){[Ct.Z.DOWN,Ct.Z.SPACE,Ct.Z.ENTER].includes(Yt)&&(V(!0),Jt.preventDefault());return}switch(Yt){case Ct.Z.UP:gr(-1),Jt.preventDefault();break;case Ct.Z.DOWN:gr(1),Jt.preventDefault();break;case Ct.Z.ESC:V(!1);break;case Ct.Z.SPACE:case Ct.Z.ENTER:q!==null&&Br(q,Jt);break}}(0,A.useEffect)(function(){var Jt=document.getElementById(vt);Jt&&Jt.scrollIntoView&&Jt.scrollIntoView(!1)},[q]),(0,A.useEffect)(function(){j||ke(null)},[j]);var rr=(0,he.Z)({},xe?"marginRight":"marginLeft",Xt);ze.length||(rr.visibility="hidden",rr.order=1);var Ir=H()((0,he.Z)({},"".concat(je,"-rtl"),xe)),Tr=ht?null:A.createElement(Nt.Z,{prefixCls:je,overlay:lr,trigger:["hover"],visible:ze.length?j:!1,transitionName:ar,onVisibleChange:V,overlayClassName:H()(Ir,Ur),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:hr},A.createElement("button",{type:"button",className:"".concat(Ae,"-nav-more"),style:rr,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":_e,id:"".concat(Pe,"-more"),"aria-expanded":j,onKeyDown:vr},Et));return A.createElement("div",{className:H()("".concat(Ae,"-nav-operations"),Pt),style:jt,ref:I},Tr,A.createElement(se,{prefixCls:Ae,locale:Ke,editable:$t}))}var zt=A.memo(A.forwardRef(er),function(C,I){return I.tabMoving});function nr(C){var I,Ae=C.prefixCls,Pe=C.id,ze=C.active,Ke=C.tab,ht=Ke.key,ct=Ke.label,Et=Ke.disabled,ar=Ke.closeIcon,jt=C.closable,Pt=C.renderWrapper,$t=C.removeAriaLabel,Xt=C.editable,xe=C.onClick,zr=C.onFocus,Br=C.style,hr="".concat(Ae,"-tab"),Ur=Le(jt,ar,Xt,Et);function mr(V){Et||xe(V)}function Rt(V){V.preventDefault(),V.stopPropagation(),Xt.onEdit("remove",{key:ht,event:V})}var j=A.createElement("div",{key:ht,"data-node-key":Oe(ht),className:H()(hr,(I={},(0,he.Z)(I,"".concat(hr,"-with-remove"),Ur),(0,he.Z)(I,"".concat(hr,"-active"),ze),(0,he.Z)(I,"".concat(hr,"-disabled"),Et),I)),style:Br,onClick:mr},A.createElement("div",{role:"tab","aria-selected":ze,id:Pe&&"".concat(Pe,"-tab-").concat(ht),className:"".concat(hr,"-btn"),"aria-controls":Pe&&"".concat(Pe,"-panel-").concat(ht),"aria-disabled":Et,tabIndex:Et?null:0,onClick:function(de){de.stopPropagation(),mr(de)},onKeyDown:function(de){[Ct.Z.SPACE,Ct.Z.ENTER].includes(de.which)&&(de.preventDefault(),mr(de))},onFocus:zr},ct),Ur&&A.createElement("button",{type:"button","aria-label":$t||"remove",tabIndex:0,className:"".concat(hr,"-remove"),onClick:function(de){de.stopPropagation(),Rt(de)}},ar||Xt.removeIcon||"\xD7"));return Pt?Pt(j):j}var Lt=nr,ae=x(16089),Z=function(I){var Ae=I.activeTabOffset,Pe=I.horizontal,ze=I.rtl,Ke=I.indicatorSize,ht=(0,A.useState)(),ct=(0,_.Z)(ht,2),Et=ct[0],ar=ct[1],jt=(0,A.useRef)(),Pt=function(xe){return typeof Ke=="function"?Ke(xe):typeof Ke=="number"?Ke:xe};function $t(){ae.Z.cancel(jt.current)}return(0,A.useEffect)(function(){var Xt={};return Ae&&(Pe?(ze?(Xt.right=Ae.right+Ae.width/2,Xt.transform="translateX(50%)"):(Xt.left=Ae.left+Ae.width/2,Xt.transform="translateX(-50%)"),Xt.width=Pt(Ae.width)):(Xt.top=Ae.top+Ae.height/2,Xt.transform="translateY(-50%)",Xt.height=Pt(Ae.height))),$t(),jt.current=(0,ae.Z)(function(){ar(Xt)}),$t},[Ae,Pe,ze,Ke]),{style:Et}},K=Z,ce=function(I){var Ae=I.current||{},Pe=Ae.offsetWidth,ze=Pe===void 0?0:Pe,Ke=Ae.offsetHeight,ht=Ke===void 0?0:Ke;return[ze,ht]},ue=function(I,Ae){return I[Ae?0:1]};function Fe(C,I){var Ae,Pe=A.useContext(gt),ze=Pe.prefixCls,Ke=Pe.tabs,ht=C.className,ct=C.style,Et=C.id,ar=C.animated,jt=C.activeKey,Pt=C.rtl,$t=C.extra,Xt=C.editable,xe=C.locale,zr=C.tabPosition,Br=C.tabBarGutter,hr=C.children,Ur=C.onTabClick,mr=C.onTabScroll,Rt=C.indicatorSize,j=(0,A.useRef)(),V=(0,A.useRef)(),de=(0,A.useRef)(),Ee=(0,A.useRef)(),q=(0,A.useRef)(),ke=(0,A.useRef)(),_e=(0,A.useRef)(),je=zr==="top"||zr==="bottom",vt=fe(0,function(Kr,Er){je&&mr&&mr({direction:Kr>Er?"left":"right"})}),dt=(0,_.Z)(vt,2),Zt=dt[0],lr=dt[1],gr=fe(0,function(Kr,Er){!je&&mr&&mr({direction:Kr>Er?"top":"bottom"})}),vr=(0,_.Z)(gr,2),rr=vr[0],Ir=vr[1],Tr=(0,A.useState)([0,0]),Jt=(0,_.Z)(Tr,2),Yt=Jt[0],or=Jt[1],Ut=(0,A.useState)([0,0]),Qt=(0,_.Z)(Ut,2),dr=Qt[0],$r=Qt[1],Dr=(0,A.useState)([0,0]),At=(0,_.Z)(Dr,2),ft=At[0],sr=At[1],Kt=(0,A.useState)([0,0]),xr=(0,_.Z)(Kt,2),fn=xr[0],ur=xr[1],an=Je(new Map),Pr=(0,_.Z)(an,2),Tn=Pr[0],ri=Pr[1],gn=We(Ke,Tn,dr[0]),Jn=ue(Yt,je),kn=ue(dr,je),ni=ue(ft,je),vn=ue(fn,je),mi=Jn<kn+ni,Rr=mi?Jn-vn:Jn-ni,Pn="".concat(ze,"-nav-operations-hidden"),_n=0,zn=0;je&&Pt?(_n=0,zn=Math.max(0,kn-Rr)):(_n=Math.min(0,Rr-kn),zn=0);function gi(Kr){return Kr<_n?_n:Kr>zn?zn:Kr}var Mn=(0,A.useRef)(),ci=(0,A.useState)(),Yn=(0,_.Z)(ci,2),Pi=Yn[0],Kn=Yn[1];function vi(){Kn(Date.now())}function Zi(){window.clearTimeout(Mn.current)}et(Ee,function(Kr,Er){function pn(An,ii){An(function(On){var Na=gi(On+ii);return Na})}return mi?(je?pn(lr,Kr):pn(Ir,Er),Zi(),vi(),!0):!1}),(0,A.useEffect)(function(){return Zi(),Pi&&(Mn.current=window.setTimeout(function(){Kn(0)},100)),Zi},[Pi]);var _i=be(gn,Rr,je?Zt:rr,kn,ni,vn,(0,S.Z)((0,S.Z)({},C),{},{tabs:Ke})),Mi=(0,_.Z)(_i,2),ji=Mi[0],Ri=Mi[1],ui=(0,z.Z)(function(){var Kr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:jt,Er=gn.get(Kr)||{width:0,height:0,left:0,right:0,top:0};if(je){var pn=Zt;Pt?Er.right<Zt?pn=Er.right:Er.right+Er.width>Zt+Rr&&(pn=Er.right+Er.width-Rr):Er.left<-Zt?pn=-Er.left:Er.left+Er.width>-Zt+Rr&&(pn=-(Er.left+Er.width-Rr)),Ir(0),lr(gi(pn))}else{var An=rr;Er.top<-rr?An=-Er.top:Er.top+Er.height>-rr+Rr&&(An=-(Er.top+Er.height-Rr)),lr(0),Ir(gi(An))}}),hn={};zr==="top"||zr==="bottom"?hn[Pt?"marginRight":"marginLeft"]=Br:hn.marginTop=Br;var xa=Ke.map(function(Kr,Er){var pn=Kr.key;return A.createElement(Lt,{id:Et,prefixCls:ze,key:pn,tab:Kr,style:Er===0?void 0:hn,closable:Kr.closable,editable:Xt,active:pn===jt,renderWrapper:hr,removeAriaLabel:xe==null?void 0:xe.removeAriaLabel,onClick:function(ii){Ur(pn,ii)},onFocus:function(){ui(pn),vi(),Ee.current&&(Pt||(Ee.current.scrollLeft=0),Ee.current.scrollTop=0)}})}),Ci=function(){return ri(function(){var Er=new Map;return Ke.forEach(function(pn){var An,ii=pn.key,On=(An=q.current)===null||An===void 0?void 0:An.querySelector('[data-node-key="'.concat(Oe(ii),'"]'));On&&Er.set(ii,{width:On.offsetWidth,height:On.offsetHeight,left:On.offsetLeft,top:On.offsetTop})}),Er})};(0,A.useEffect)(function(){Ci()},[Ke.map(function(Kr){return Kr.key}).join("_")]);var Oi=Re(function(){var Kr=ce(j),Er=ce(V),pn=ce(de);or([Kr[0]-Er[0]-pn[0],Kr[1]-Er[1]-pn[1]]);var An=ce(_e);sr(An);var ii=ce(ke);ur(ii);var On=ce(q);$r([On[0]-An[0],On[1]-An[1]]),Ci()}),bi=Ke.slice(0,ji),Ui=Ke.slice(Ri+1),Ei=[].concat((0,we.Z)(bi),(0,we.Z)(Ui)),Gi=gn.get(jt),Ni=K({activeTabOffset:Gi,horizontal:je,rtl:Pt,indicatorSize:Rt}),Fi=Ni.style;(0,A.useEffect)(function(){ui()},[jt,_n,zn,pe(Gi),pe(gn),je]),(0,A.useEffect)(function(){Oi()},[Pt]);var Dn=!!Ei.length,di="".concat(ze,"-nav-wrap"),fi,Rn,Hn,zi;return je?Pt?(Rn=Zt>0,fi=Zt!==zn):(fi=Zt<0,Rn=Zt!==_n):(Hn=rr<0,zi=rr!==_n),A.createElement(O.Z,{onResize:Oi},A.createElement("div",{ref:(0,Q.x1)(I,j),role:"tablist",className:H()("".concat(ze,"-nav"),ht),style:ct,onKeyDown:function(){vi()}},A.createElement(ut,{ref:V,position:"left",extra:$t,prefixCls:ze}),A.createElement(O.Z,{onResize:Oi},A.createElement("div",{className:H()(di,(Ae={},(0,he.Z)(Ae,"".concat(di,"-ping-left"),fi),(0,he.Z)(Ae,"".concat(di,"-ping-right"),Rn),(0,he.Z)(Ae,"".concat(di,"-ping-top"),Hn),(0,he.Z)(Ae,"".concat(di,"-ping-bottom"),zi),Ae)),ref:Ee},A.createElement(O.Z,{onResize:Oi},A.createElement("div",{ref:q,className:"".concat(ze,"-nav-list"),style:{transform:"translate(".concat(Zt,"px, ").concat(rr,"px)"),transition:Pi?"none":void 0}},xa,A.createElement(se,{ref:_e,prefixCls:ze,locale:xe,editable:Xt,style:(0,S.Z)((0,S.Z)({},xa.length===0?void 0:hn),{},{visibility:Dn?"hidden":null})}),A.createElement("div",{className:H()("".concat(ze,"-ink-bar"),(0,he.Z)({},"".concat(ze,"-ink-bar-animated"),ar.inkBar)),style:Fi}))))),A.createElement(zt,(0,Y.Z)({},C,{removeAriaLabel:xe==null?void 0:xe.removeAriaLabel,ref:ke,prefixCls:ze,tabs:Ei,className:!Dn&&Pn,tabMoving:!!Pi})),A.createElement(ut,{ref:de,position:"right",extra:$t,prefixCls:ze})))}var ee=A.forwardRef(Fe),ie=["renderTabBar"],rt=["label","key"];function Ye(C){var I=C.renderTabBar,Ae=(0,Ze.Z)(C,ie),Pe=A.useContext(gt),ze=Pe.tabs;if(I){var Ke=(0,S.Z)((0,S.Z)({},Ae),{},{panes:ze.map(function(ht){var ct=ht.label,Et=ht.key,ar=(0,Ze.Z)(ht,rt);return A.createElement(Ie,(0,Y.Z)({tab:ct,key:Et,tabKey:Et},ar))})});return I(Ke,ee)}return A.createElement(ee,Ae)}var nt=x(48736);function Bt(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},I;return C===!1?I={inkBar:!1,tabPane:!1}:C===!0?I={inkBar:!0,tabPane:!1}:I=(0,S.Z)({inkBar:!0},(0,Ge.Z)(C)==="object"?C:{}),I.tabPaneMotion&&I.tabPane===void 0&&(I.tabPane=!0),!I.tabPaneMotion&&I.tabPane&&(I.tabPane=!1),I}var St=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicatorSize"],W=0;function _t(C,I){var Ae,Pe=C.id,ze=C.prefixCls,Ke=ze===void 0?"rc-tabs":ze,ht=C.className,ct=C.items,Et=C.direction,ar=C.activeKey,jt=C.defaultActiveKey,Pt=C.editable,$t=C.animated,Xt=C.tabPosition,xe=Xt===void 0?"top":Xt,zr=C.tabBarGutter,Br=C.tabBarStyle,hr=C.tabBarExtraContent,Ur=C.locale,mr=C.moreIcon,Rt=C.moreTransitionName,j=C.destroyInactiveTabPane,V=C.renderTabBar,de=C.onChange,Ee=C.onTabClick,q=C.onTabScroll,ke=C.getPopupContainer,_e=C.popupClassName,je=C.indicatorSize,vt=(0,Ze.Z)(C,St),dt=A.useMemo(function(){return(ct||[]).filter(function(ur){return ur&&(0,Ge.Z)(ur)==="object"&&"key"in ur})},[ct]),Zt=Et==="rtl",lr=Bt($t),gr=(0,A.useState)(!1),vr=(0,_.Z)(gr,2),rr=vr[0],Ir=vr[1];(0,A.useEffect)(function(){Ir((0,R.Z)())},[]);var Tr=(0,Ne.Z)(function(){var ur;return(ur=dt[0])===null||ur===void 0?void 0:ur.key},{value:ar,defaultValue:jt}),Jt=(0,_.Z)(Tr,2),Yt=Jt[0],or=Jt[1],Ut=(0,A.useState)(function(){return dt.findIndex(function(ur){return ur.key===Yt})}),Qt=(0,_.Z)(Ut,2),dr=Qt[0],$r=Qt[1];(0,A.useEffect)(function(){var ur=dt.findIndex(function(Pr){return Pr.key===Yt});if(ur===-1){var an;ur=Math.max(0,Math.min(dr,dt.length-1)),or((an=dt[ur])===null||an===void 0?void 0:an.key)}$r(ur)},[dt.map(function(ur){return ur.key}).join("_"),Yt,dr]);var Dr=(0,Ne.Z)(null,{value:Pe}),At=(0,_.Z)(Dr,2),ft=At[0],sr=At[1];(0,A.useEffect)(function(){Pe||(sr("rc-tabs-".concat(W)),W+=1)},[]);function Kt(ur,an){Ee==null||Ee(ur,an);var Pr=ur!==Yt;or(ur),Pr&&(de==null||de(ur))}var xr={id:ft,activeKey:Yt,animated:lr,tabPosition:xe,rtl:Zt,mobile:rr},fn=(0,S.Z)((0,S.Z)({},xr),{},{editable:Pt,locale:Ur,moreIcon:mr,moreTransitionName:Rt,tabBarGutter:zr,onTabClick:Kt,onTabScroll:q,extra:hr,style:Br,panes:null,getPopupContainer:ke,popupClassName:_e,indicatorSize:je});return A.createElement(gt.Provider,{value:{tabs:dt,prefixCls:Ke}},A.createElement("div",(0,Y.Z)({ref:I,id:Pe,className:H()(Ke,"".concat(Ke,"-").concat(xe),(Ae={},(0,he.Z)(Ae,"".concat(Ke,"-mobile"),rr),(0,he.Z)(Ae,"".concat(Ke,"-editable"),Pt),(0,he.Z)(Ae,"".concat(Ke,"-rtl"),Zt),Ae),ht)},vt),A.createElement(Ye,(0,Y.Z)({},fn,{renderTabBar:V})),A.createElement(Me,(0,Y.Z)({destroyInactiveTabPane:j},xr,{animated:lr}))))}var bt=A.forwardRef(_t),N=bt,J=N,le=x(36355),ot=x(19716),Ce=()=>null,ir=x(62892);const Ht={motionAppear:!1,motionEnter:!0,motionLeave:!0};function qt(C){let I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inkBar:!0,tabPane:!1},Ae;return I===!1?Ae={inkBar:!1,tabPane:!1}:I===!0?Ae={inkBar:!0,tabPane:!0}:Ae=Object.assign({inkBar:!0},typeof I=="object"?I:{}),Ae.tabPane&&(Ae.tabPaneMotion=Object.assign(Object.assign({},Ht),{motionName:(0,ir.m)(C,"switch")})),Ae}var Gt=x(11592),tr=function(C,I){var Ae={};for(var Pe in C)Object.prototype.hasOwnProperty.call(C,Pe)&&I.indexOf(Pe)<0&&(Ae[Pe]=C[Pe]);if(C!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ze=0,Pe=Object.getOwnPropertySymbols(C);ze<Pe.length;ze++)I.indexOf(Pe[ze])<0&&Object.prototype.propertyIsEnumerable.call(C,Pe[ze])&&(Ae[Pe[ze]]=C[Pe[ze]]);return Ae};function Mt(C){return C.filter(I=>I)}function Mr(C,I){if(C)return C;const Ae=(0,Gt.Z)(I).map(Pe=>{if(A.isValidElement(Pe)){const{key:ze,props:Ke}=Pe,ht=Ke||{},{tab:ct}=ht,Et=tr(ht,["tab"]);return Object.assign(Object.assign({key:String(ze)},Et),{label:ct})}return null});return Mt(Ae)}var pr=x(17313),Vr=x(83116),Cr=x(37613),fr=x(13826),Vt=C=>{const{componentCls:I,motionDurationSlow:Ae}=C;return[{[I]:{[`${I}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${Ae}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${Ae}`}}}}},[(0,fr.oN)(C,"slide-up"),(0,fr.oN)(C,"slide-down")]]};const rn=C=>{const{componentCls:I,tabsCardPadding:Ae,cardBg:Pe,cardGutter:ze,colorBorderSecondary:Ke,itemSelectedColor:ht}=C;return{[`${I}-card`]:{[`> ${I}-nav, > div > ${I}-nav`]:{[`${I}-tab`]:{margin:0,padding:Ae,background:Pe,border:`${C.lineWidth}px ${C.lineType} ${Ke}`,transition:`all ${C.motionDurationSlow} ${C.motionEaseInOut}`},[`${I}-tab-active`]:{color:ht,background:C.colorBgContainer},[`${I}-ink-bar`]:{visibility:"hidden"}},[`&${I}-top, &${I}-bottom`]:{[`> ${I}-nav, > div > ${I}-nav`]:{[`${I}-tab + ${I}-tab`]:{marginLeft:{_skip_check_:!0,value:`${ze}px`}}}},[`&${I}-top`]:{[`> ${I}-nav, > div > ${I}-nav`]:{[`${I}-tab`]:{borderRadius:`${C.borderRadiusLG}px ${C.borderRadiusLG}px 0 0`},[`${I}-tab-active`]:{borderBottomColor:C.colorBgContainer}}},[`&${I}-bottom`]:{[`> ${I}-nav, > div > ${I}-nav`]:{[`${I}-tab`]:{borderRadius:`0 0 ${C.borderRadiusLG}px ${C.borderRadiusLG}px`},[`${I}-tab-active`]:{borderTopColor:C.colorBgContainer}}},[`&${I}-left, &${I}-right`]:{[`> ${I}-nav, > div > ${I}-nav`]:{[`${I}-tab + ${I}-tab`]:{marginTop:`${ze}px`}}},[`&${I}-left`]:{[`> ${I}-nav, > div > ${I}-nav`]:{[`${I}-tab`]:{borderRadius:{_skip_check_:!0,value:`${C.borderRadiusLG}px 0 0 ${C.borderRadiusLG}px`}},[`${I}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:C.colorBgContainer}}}},[`&${I}-right`]:{[`> ${I}-nav, > div > ${I}-nav`]:{[`${I}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${C.borderRadiusLG}px ${C.borderRadiusLG}px 0`}},[`${I}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:C.colorBgContainer}}}}}}},nn=C=>{const{componentCls:I,itemHoverColor:Ae,dropdownEdgeChildVerticalPadding:Pe}=C;return{[`${I}-dropdown`]:Object.assign(Object.assign({},(0,pr.Wf)(C)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:C.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${I}-dropdown-menu`]:{maxHeight:C.tabsDropdownHeight,margin:0,padding:`${Pe}px 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:C.colorBgContainer,backgroundClip:"padding-box",borderRadius:C.borderRadiusLG,outline:"none",boxShadow:C.boxShadowSecondary,"&-item":Object.assign(Object.assign({},pr.vS),{display:"flex",alignItems:"center",minWidth:C.tabsDropdownWidth,margin:0,padding:`${C.paddingXXS}px ${C.paddingSM}px`,color:C.colorText,fontWeight:"normal",fontSize:C.fontSize,lineHeight:C.lineHeight,cursor:"pointer",transition:`all ${C.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:C.marginSM},color:C.colorTextDescription,fontSize:C.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:Ae}},"&:hover":{background:C.controlItemBgHover},"&-disabled":{"&, &:hover":{color:C.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},qr=C=>{const{componentCls:I,margin:Ae,colorBorderSecondary:Pe,horizontalMargin:ze,verticalItemPadding:Ke,verticalItemMargin:ht}=C;return{[`${I}-top, ${I}-bottom`]:{flexDirection:"column",[`> ${I}-nav, > div > ${I}-nav`]:{margin:ze,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${C.lineWidth}px ${C.lineType} ${Pe}`,content:"''"},[`${I}-ink-bar`]:{height:C.lineWidthBold,"&-animated":{transition:`width ${C.motionDurationSlow}, left ${C.motionDurationSlow},
right ${C.motionDurationSlow}`}},[`${I}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:C.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:C.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:C.boxShadowTabsOverflowRight},[`&${I}-nav-wrap-ping-left::before`]:{opacity:1},[`&${I}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${I}-top`]:{[`> ${I}-nav,
> div > ${I}-nav`]:{"&::before":{bottom:0},[`${I}-ink-bar`]:{bottom:0}}},[`${I}-bottom`]:{[`> ${I}-nav, > div > ${I}-nav`]:{order:1,marginTop:`${Ae}px`,marginBottom:0,"&::before":{top:0},[`${I}-ink-bar`]:{top:0}},[`> ${I}-content-holder, > div > ${I}-content-holder`]:{order:0}},[`${I}-left, ${I}-right`]:{[`> ${I}-nav, > div > ${I}-nav`]:{flexDirection:"column",minWidth:C.controlHeight*1.25,[`${I}-tab`]:{padding:Ke,textAlign:"center"},[`${I}-tab + ${I}-tab`]:{margin:ht},[`${I}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:C.controlHeight},"&::before":{top:0,boxShadow:C.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:C.boxShadowTabsOverflowBottom},[`&${I}-nav-wrap-ping-top::before`]:{opacity:1},[`&${I}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${I}-ink-bar`]:{width:C.lineWidthBold,"&-animated":{transition:`height ${C.motionDurationSlow}, top ${C.motionDurationSlow}`}},[`${I}-nav-list, ${I}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${I}-left`]:{[`> ${I}-nav, > div > ${I}-nav`]:{[`${I}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${I}-content-holder, > div > ${I}-content-holder`]:{marginLeft:{_skip_check_:!0,value:`-${C.lineWidth}px`},borderLeft:{_skip_check_:!0,value:`${C.lineWidth}px ${C.lineType} ${C.colorBorder}`},[`> ${I}-content > ${I}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:C.paddingLG}}}},[`${I}-right`]:{[`> ${I}-nav, > div > ${I}-nav`]:{order:1,[`${I}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${I}-content-holder, > div > ${I}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:-C.lineWidth},borderRight:{_skip_check_:!0,value:`${C.lineWidth}px ${C.lineType} ${C.colorBorder}`},[`> ${I}-content > ${I}-tabpane`]:{paddingRight:{_skip_check_:!0,value:C.paddingLG}}}}}},Xr=C=>{const{componentCls:I,cardPaddingSM:Ae,cardPaddingLG:Pe,horizontalItemPaddingSM:ze,horizontalItemPaddingLG:Ke}=C;return{[I]:{"&-small":{[`> ${I}-nav`]:{[`${I}-tab`]:{padding:ze,fontSize:C.titleFontSizeSM}}},"&-large":{[`> ${I}-nav`]:{[`${I}-tab`]:{padding:Ke,fontSize:C.titleFontSizeLG}}}},[`${I}-card`]:{[`&${I}-small`]:{[`> ${I}-nav`]:{[`${I}-tab`]:{padding:Ae}},[`&${I}-bottom`]:{[`> ${I}-nav ${I}-tab`]:{borderRadius:`0 0 ${C.borderRadius}px ${C.borderRadius}px`}},[`&${I}-top`]:{[`> ${I}-nav ${I}-tab`]:{borderRadius:`${C.borderRadius}px ${C.borderRadius}px 0 0`}},[`&${I}-right`]:{[`> ${I}-nav ${I}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${C.borderRadius}px ${C.borderRadius}px 0`}}},[`&${I}-left`]:{[`> ${I}-nav ${I}-tab`]:{borderRadius:{_skip_check_:!0,value:`${C.borderRadius}px 0 0 ${C.borderRadius}px`}}}},[`&${I}-large`]:{[`> ${I}-nav`]:{[`${I}-tab`]:{padding:Pe}}}}}},Sr=C=>{const{componentCls:I,itemActiveColor:Ae,itemHoverColor:Pe,iconCls:ze,tabsHorizontalItemMargin:Ke,horizontalItemPadding:ht,itemSelectedColor:ct,itemColor:Et}=C,ar=`${I}-tab`;return{[ar]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:ht,fontSize:C.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:Et,"&-btn, &-remove":Object.assign({"&:focus:not(:focus-visible), &:active":{color:Ae}},(0,pr.Qy)(C)),"&-btn":{outline:"none",transition:"all 0.3s"},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:-C.marginXXS},marginLeft:{_skip_check_:!0,value:C.marginXS},color:C.colorTextDescription,fontSize:C.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${C.motionDurationSlow}`,"&:hover":{color:C.colorTextHeading}},"&:hover":{color:Pe},[`&${ar}-active ${ar}-btn`]:{color:ct,textShadow:C.tabsActiveTextShadow},[`&${ar}-disabled`]:{color:C.colorTextDisabled,cursor:"not-allowed"},[`&${ar}-disabled ${ar}-btn, &${ar}-disabled ${I}-remove`]:{"&:focus, &:active":{color:C.colorTextDisabled}},[`& ${ar}-remove ${ze}`]:{margin:0},[ze]:{marginRight:{_skip_check_:!0,value:C.marginSM}}},[`${ar} + ${ar}`]:{margin:{_skip_check_:!0,value:Ke}}}},Jr=C=>{const{componentCls:I,tabsHorizontalItemMarginRTL:Ae,iconCls:Pe,cardGutter:ze}=C;return{[`${I}-rtl`]:{direction:"rtl",[`${I}-nav`]:{[`${I}-tab`]:{margin:{_skip_check_:!0,value:Ae},[`${I}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[Pe]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:`${C.marginSM}px`}},[`${I}-tab-remove`]:{marginRight:{_skip_check_:!0,value:`${C.marginXS}px`},marginLeft:{_skip_check_:!0,value:`-${C.marginXXS}px`},[Pe]:{margin:0}}}},[`&${I}-left`]:{[`> ${I}-nav`]:{order:1},[`> ${I}-content-holder`]:{order:0}},[`&${I}-right`]:{[`> ${I}-nav`]:{order:0},[`> ${I}-content-holder`]:{order:1}},[`&${I}-card${I}-top, &${I}-card${I}-bottom`]:{[`> ${I}-nav, > div > ${I}-nav`]:{[`${I}-tab + ${I}-tab`]:{marginRight:{_skip_check_:!0,value:ze},marginLeft:{_skip_check_:!0,value:0}}}}},[`${I}-dropdown-rtl`]:{direction:"rtl"},[`${I}-menu-item`]:{[`${I}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},Fr=C=>{const{componentCls:I,tabsCardPadding:Ae,cardHeight:Pe,cardGutter:ze,itemHoverColor:Ke,itemActiveColor:ht,colorBorderSecondary:ct}=C;return{[I]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,pr.Wf)(C)),{display:"flex",[`> ${I}-nav, > div > ${I}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${I}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${C.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${I}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${C.motionDurationSlow}`},[`${I}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${I}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${I}-nav-more`]:{position:"relative",padding:Ae,background:"transparent",border:0,color:C.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:C.controlHeightLG/8,transform:"translateY(100%)",content:"''"}},[`${I}-nav-add`]:Object.assign({minWidth:Pe,marginLeft:{_skip_check_:!0,value:ze},padding:`0 ${C.paddingXS}px`,background:"transparent",border:`${C.lineWidth}px ${C.lineType} ${ct}`,borderRadius:`${C.borderRadiusLG}px ${C.borderRadiusLG}px 0 0`,outline:"none",cursor:"pointer",color:C.colorText,transition:`all ${C.motionDurationSlow} ${C.motionEaseInOut}`,"&:hover":{color:Ke},"&:active, &:focus:not(:focus-visible)":{color:ht}},(0,pr.Qy)(C))},[`${I}-extra-content`]:{flex:"none"},[`${I}-ink-bar`]:{position:"absolute",background:C.inkBarColor,pointerEvents:"none"}}),Sr(C)),{[`${I}-content`]:{position:"relative",width:"100%"},[`${I}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${I}-tabpane`]:{outline:"none","&-hidden":{display:"none"}}}),[`${I}-centered`]:{[`> ${I}-nav, > div > ${I}-nav`]:{[`${I}-nav-wrap`]:{[`&:not([class*='${I}-nav-wrap-ping'])`]:{justifyContent:"center"}}}}}};var Xn=(0,Vr.Z)("Tabs",C=>{const I=(0,Cr.TS)(C,{tabsCardPadding:C.cardPadding||`${(C.cardHeight-Math.round(C.fontSize*C.lineHeight))/2-C.lineWidth}px ${C.padding}px`,dropdownEdgeChildVerticalPadding:C.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${C.horizontalItemGutter}px`,tabsHorizontalItemMarginRTL:`0 0 0 ${C.horizontalItemGutter}px`});return[Xr(I),Jr(I),qr(I),nn(I),rn(I),Fr(I),Vt(I)]},C=>{const I=C.controlHeightLG;return{zIndexPopup:C.zIndexPopupBase+50,cardBg:C.colorFillAlter,cardHeight:I,cardPadding:"",cardPaddingSM:`${C.paddingXXS*1.5}px ${C.padding}px`,cardPaddingLG:`${C.paddingXS}px ${C.padding}px ${C.paddingXXS*1.5}px`,titleFontSize:C.fontSize,titleFontSizeLG:C.fontSizeLG,titleFontSizeSM:C.fontSize,inkBarColor:C.colorPrimary,horizontalMargin:`0 0 ${C.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${C.paddingSM}px 0`,horizontalItemPaddingSM:`${C.paddingXS}px 0`,horizontalItemPaddingLG:`${C.padding}px 0`,verticalItemPadding:`${C.paddingXS}px ${C.paddingLG}px`,verticalItemMargin:`${C.margin}px 0 0 0`,itemColor:C.colorText,itemSelectedColor:C.colorPrimary,itemHoverColor:C.colorPrimaryHover,itemActiveColor:C.colorPrimaryActive,cardGutter:C.marginXXS/2}}),In=function(C,I){var Ae={};for(var Pe in C)Object.prototype.hasOwnProperty.call(C,Pe)&&I.indexOf(Pe)<0&&(Ae[Pe]=C[Pe]);if(C!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ze=0,Pe=Object.getOwnPropertySymbols(C);ze<Pe.length;ze++)I.indexOf(Pe[ze])<0&&Object.prototype.propertyIsEnumerable.call(C,Pe[ze])&&(Ae[Pe[ze]]=C[Pe[ze]]);return Ae};const yn=C=>{const{type:I,className:Ae,rootClassName:Pe,size:ze,onEdit:Ke,hideAdd:ht,centered:ct,addIcon:Et,popupClassName:ar,children:jt,items:Pt,animated:$t,style:Xt,indicatorSize:xe}=C,zr=In(C,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","popupClassName","children","items","animated","style","indicatorSize"]),{prefixCls:Br,moreIcon:hr=A.createElement(G.Z,null)}=zr,{direction:Ur,tabs:mr,getPrefixCls:Rt,getPopupContainer:j}=A.useContext(le.E_),V=Rt("tabs",Br),[de,Ee]=Xn(V);let q;I==="editable-card"&&(q={onEdit:(Zt,lr)=>{let{key:gr,event:vr}=lr;Ke==null||Ke(Zt==="add"?vr:gr,Zt)},removeIcon:A.createElement(D.Z,null),addIcon:Et||A.createElement(ye.Z,null),showAdd:ht!==!0});const ke=Rt(),_e=Mr(Pt,jt),je=qt(V,$t),vt=(0,ot.Z)(ze),dt=Object.assign(Object.assign({},mr==null?void 0:mr.style),Xt);return de(A.createElement(J,Object.assign({direction:Ur,getPopupContainer:j,moreTransitionName:`${ke}-slide-up`},zr,{items:_e,className:H()({[`${V}-${vt}`]:vt,[`${V}-card`]:["card","editable-card"].includes(I),[`${V}-editable-card`]:I==="editable-card",[`${V}-centered`]:ct},mr==null?void 0:mr.className,Ae,Pe,Ee),popupClassName:H()(ar,Ee),style:dt,editable:q,moreIcon:hr,prefixCls:V,animated:je,indicatorSize:xe!=null?xe:mr==null?void 0:mr.indicatorSize})))};yn.TabPane=Ce;var dn=yn},24334:function(wr,xt,x){var D,G;(function(ye,me){wr.exports=me(ye)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof x.g!="undefined"?x.g:this,function(ye){"use strict";ye=ye||{};var me=ye.Base64,H="2.6.4",Y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",he=function(ve){for(var et={},U=0,Re=ve.length;U<Re;U++)et[ve.charAt(U)]=U;return et}(Y),S=String.fromCharCode,_=function(ve){if(ve.length<2){var et=ve.charCodeAt(0);return et<128?ve:et<2048?S(192|et>>>6)+S(128|et&63):S(224|et>>>12&15)+S(128|et>>>6&63)+S(128|et&63)}else{var et=65536+(ve.charCodeAt(0)-55296)*1024+(ve.charCodeAt(1)-56320);return S(240|et>>>18&7)+S(128|et>>>12&63)+S(128|et>>>6&63)+S(128|et&63)}},Ge=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Ze=function(ve){return ve.replace(Ge,_)},A=function(ve){var et=[0,2,1][ve.length%3],U=ve.charCodeAt(0)<<16|(ve.length>1?ve.charCodeAt(1):0)<<8|(ve.length>2?ve.charCodeAt(2):0),Re=[Y.charAt(U>>>18),Y.charAt(U>>>12&63),et>=2?"=":Y.charAt(U>>>6&63),et>=1?"=":Y.charAt(U&63)];return Re.join("")},R=ye.btoa&&typeof ye.btoa=="function"?function(ve){return ye.btoa(ve)}:function(ve){if(ve.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return ve.replace(/[\s\S]{1,3}/g,A)},Ne=function(ve){return R(Ze(String(ve)))},mt=function(ve){return ve.replace(/[+\/]/g,function(et){return et=="+"?"-":"_"}).replace(/=/g,"")},gt=function(ve,et){return et?mt(Ne(ve)):Ne(ve)},Qe=function(ve){return gt(ve,!0)},Ie;ye.Uint8Array&&(Ie=function(ve,et){for(var U="",Re=0,Je=ve.length;Re<Je;Re+=3){var F=ve[Re],be=ve[Re+1],pe=ve[Re+2],X=F<<16|be<<8|pe;U+=Y.charAt(X>>>18)+Y.charAt(X>>>12&63)+(typeof be!="undefined"?Y.charAt(X>>>6&63):"=")+(typeof pe!="undefined"?Y.charAt(X&63):"=")}return et?mt(U):U});var Ft=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Me=function(ve){switch(ve.length){case 4:var et=(7&ve.charCodeAt(0))<<18|(63&ve.charCodeAt(1))<<12|(63&ve.charCodeAt(2))<<6|63&ve.charCodeAt(3),U=et-65536;return S((U>>>10)+55296)+S((U&1023)+56320);case 3:return S((15&ve.charCodeAt(0))<<12|(63&ve.charCodeAt(1))<<6|63&ve.charCodeAt(2));default:return S((31&ve.charCodeAt(0))<<6|63&ve.charCodeAt(1))}},we=function(ve){return ve.replace(Ft,Me)},O=function(ve){var et=ve.length,U=et%4,Re=(et>0?he[ve.charAt(0)]<<18:0)|(et>1?he[ve.charAt(1)]<<12:0)|(et>2?he[ve.charAt(2)]<<6:0)|(et>3?he[ve.charAt(3)]:0),Je=[S(Re>>>16),S(Re>>>8&255),S(Re&255)];return Je.length-=[0,0,2,1][U],Je.join("")},z=ye.atob&&typeof ye.atob=="function"?function(ve){return ye.atob(ve)}:function(ve){return ve.replace(/\S{1,4}/g,O)},Q=function(ve){return z(String(ve).replace(/[^A-Za-z0-9\+\/]/g,""))},ne=function(ve){return we(z(ve))},We=function(ve){return String(ve).replace(/[-_]/g,function(et){return et=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},fe=function(ve){return ne(We(ve))},st;ye.Uint8Array&&(st=function(ve){return Uint8Array.from(Q(We(ve)),function(et){return et.charCodeAt(0)})});var lt=function(){var ve=ye.Base64;return ye.Base64=me,ve};if(ye.Base64={VERSION:H,atob:Q,btoa:R,fromBase64:fe,toBase64:gt,utob:Ze,encode:gt,encodeURI:Qe,btou:we,decode:fe,noConflict:lt,fromUint8Array:Ie,toUint8Array:st},typeof Object.defineProperty=="function"){var ge=function(ve){return{value:ve,enumerable:!1,writable:!0,configurable:!0}};ye.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",ge(function(){return fe(this)})),Object.defineProperty(String.prototype,"toBase64",ge(function(ve){return gt(this,ve)})),Object.defineProperty(String.prototype,"toBase64URI",ge(function(){return gt(this,!0)}))}}return ye.Meteor&&(Base64=ye.Base64),wr.exports?wr.exports.Base64=ye.Base64:(D=[],G=function(){return ye.Base64}.apply(xt,D),G!==void 0&&(wr.exports=G)),{Base64:ye.Base64}})},5630:function(wr,xt,x){"use strict";var D=x(54476),G=x(33885),ye=x(20068),me=x(42978),H=x(75931),Y=x(92310),he=x.n(Y),S=x(18929),_=x(59301),Ge=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],Ze=(0,_.forwardRef)(function(A,R){var Ne,mt=A.prefixCls,gt=mt===void 0?"rc-checkbox":mt,Qe=A.className,Ie=A.style,Ft=A.checked,Me=A.disabled,we=A.defaultChecked,O=we===void 0?!1:we,z=A.type,Q=z===void 0?"checkbox":z,ne=A.title,We=A.onChange,fe=(0,H.Z)(A,Ge),st=(0,_.useRef)(null),lt=(0,S.Z)(O,{value:Ft}),ge=(0,me.Z)(lt,2),ve=ge[0],et=ge[1];(0,_.useImperativeHandle)(R,function(){return{focus:function(){var F;(F=st.current)===null||F===void 0||F.focus()},blur:function(){var F;(F=st.current)===null||F===void 0||F.blur()},input:st.current}});var U=he()(gt,Qe,(Ne={},(0,ye.Z)(Ne,"".concat(gt,"-checked"),ve),(0,ye.Z)(Ne,"".concat(gt,"-disabled"),Me),Ne)),Re=function(F){Me||("checked"in A||et(F.target.checked),We==null||We({target:(0,G.Z)((0,G.Z)({},A),{},{type:Q,checked:F.target.checked}),stopPropagation:function(){F.stopPropagation()},preventDefault:function(){F.preventDefault()},nativeEvent:F.nativeEvent}))};return _.createElement("span",{className:U,title:ne,style:Ie},_.createElement("input",(0,D.Z)({},fe,{className:"".concat(gt,"-input"),ref:st,onChange:Re,disabled:Me,checked:!!ve,type:Q})),_.createElement("span",{className:"".concat(gt,"-inner")}))});xt.Z=Ze},31561:function(wr,xt,x){"use strict";x.d(xt,{Z:function(){return Q}});var D=x(54476),G=x(20068),ye=x(42978),me=x(75931),H=x(35593),Y=x(92310),he=x.n(Y),S=x(8654),_=x(59301),Ge=x(10228),Ze=x(16089),A=Ge.Z.ESC,R=Ge.Z.TAB;function Ne(ne){var We=ne.visible,fe=ne.triggerRef,st=ne.onVisibleChange,lt=ne.autoFocus,ge=ne.overlayRef,ve=_.useRef(!1),et=function(){if(We){var F,be;(F=fe.current)===null||F===void 0||(be=F.focus)===null||be===void 0||be.call(F),st==null||st(!1)}},U=function(){var F;return(F=ge.current)!==null&&F!==void 0&&F.focus?(ge.current.focus(),ve.current=!0,!0):!1},Re=function(F){switch(F.keyCode){case A:et();break;case R:{var be=!1;ve.current||(be=U()),be?F.preventDefault():et();break}}};_.useEffect(function(){return We?(window.addEventListener("keydown",Re),lt&&(0,Ze.Z)(U,3),function(){window.removeEventListener("keydown",Re),ve.current=!1}):function(){ve.current=!1}},[We])}var mt=(0,_.forwardRef)(function(ne,We){var fe=ne.overlay,st=ne.arrow,lt=ne.prefixCls,ge=(0,_.useMemo)(function(){var et;return typeof fe=="function"?et=fe():et=fe,et},[fe]),ve=(0,S.sQ)(We,ge==null?void 0:ge.ref);return _.createElement(_.Fragment,null,st&&_.createElement("div",{className:"".concat(lt,"-arrow")}),_.cloneElement(ge,{ref:(0,S.Yr)(ge)?ve:void 0}))}),gt=mt,Qe={adjustX:1,adjustY:1},Ie=[0,0],Ft={topLeft:{points:["bl","tl"],overflow:Qe,offset:[0,-4],targetOffset:Ie},top:{points:["bc","tc"],overflow:Qe,offset:[0,-4],targetOffset:Ie},topRight:{points:["br","tr"],overflow:Qe,offset:[0,-4],targetOffset:Ie},bottomLeft:{points:["tl","bl"],overflow:Qe,offset:[0,4],targetOffset:Ie},bottom:{points:["tc","bc"],overflow:Qe,offset:[0,4],targetOffset:Ie},bottomRight:{points:["tr","br"],overflow:Qe,offset:[0,4],targetOffset:Ie}},Me=Ft,we=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function O(ne,We){var fe,st=ne.arrow,lt=st===void 0?!1:st,ge=ne.prefixCls,ve=ge===void 0?"rc-dropdown":ge,et=ne.transitionName,U=ne.animation,Re=ne.align,Je=ne.placement,F=Je===void 0?"bottomLeft":Je,be=ne.placements,pe=be===void 0?Me:be,X=ne.getPopupContainer,Oe=ne.showAction,Le=ne.hideAction,Be=ne.overlayClassName,se=ne.overlayStyle,at=ne.visible,ut=ne.trigger,Nt=ut===void 0?["hover"]:ut,Wt=ne.autoFocus,Ct=ne.overlay,er=ne.children,zt=ne.onVisibleChange,nr=(0,me.Z)(ne,we),Lt=_.useState(),ae=(0,ye.Z)(Lt,2),Z=ae[0],K=ae[1],ce="visible"in ne?at:Z,ue=_.useRef(null),Fe=_.useRef(null),ee=_.useRef(null);_.useImperativeHandle(We,function(){return ue.current});var ie=function(N){K(N),zt==null||zt(N)};Ne({visible:ce,triggerRef:ee,onVisibleChange:ie,autoFocus:Wt,overlayRef:Fe});var rt=function(N){var J=ne.onOverlayClick;K(!1),J&&J(N)},Ye=function(){return _.createElement(gt,{ref:Fe,overlay:Ct,prefixCls:ve,arrow:lt})},nt=function(){return typeof Ct=="function"?Ye:Ye()},Bt=function(){var N=ne.minOverlayWidthMatchTrigger,J=ne.alignPoint;return"minOverlayWidthMatchTrigger"in ne?N:!J},St=function(){var N=ne.openClassName;return N!==void 0?N:"".concat(ve,"-open")},W=_.cloneElement(er,{className:he()((fe=er.props)===null||fe===void 0?void 0:fe.className,ce&&St()),ref:(0,S.Yr)(er)?(0,S.sQ)(ee,er.ref):void 0}),_t=Le;return!_t&&Nt.indexOf("contextMenu")!==-1&&(_t=["click"]),_.createElement(H.Z,(0,D.Z)({builtinPlacements:pe},nr,{prefixCls:ve,ref:ue,popupClassName:he()(Be,(0,G.Z)({},"".concat(ve,"-show-arrow"),lt)),popupStyle:se,action:Nt,showAction:Oe,hideAction:_t,popupPlacement:F,popupAlign:Re,popupTransitionName:et,popupAnimation:U,popupVisible:ce,stretch:Bt()?"minWidth":"",popup:nt(),onPopupVisibleChange:ie,onPopupClick:rt,getPopupContainer:X}),W)}var z=_.forwardRef(O),Q=z},93681:function(wr,xt,x){"use strict";x.r(xt),x.d(xt,{BaseInput:function(){return Ge},default:function(){return Ft}});var D=x(54476),G=x(33885),ye=x(20068),me=x(76190),H=x(92310),Y=x.n(H),he=x(59301),S=x(5643),_=function(we){var O,z,Q=we.inputElement,ne=we.prefixCls,We=we.prefix,fe=we.suffix,st=we.addonBefore,lt=we.addonAfter,ge=we.className,ve=we.style,et=we.disabled,U=we.readOnly,Re=we.focused,Je=we.triggerFocus,F=we.allowClear,be=we.value,pe=we.handleReset,X=we.hidden,Oe=we.classes,Le=we.classNames,Be=we.dataAttrs,se=we.styles,at=we.components,ut=(at==null?void 0:at.affixWrapper)||"span",Nt=(at==null?void 0:at.groupWrapper)||"span",Wt=(at==null?void 0:at.wrapper)||"span",Ct=(at==null?void 0:at.groupAddon)||"span",er=(0,he.useRef)(null),zt=function(Ye){var nt;(nt=er.current)!==null&&nt!==void 0&&nt.contains(Ye.target)&&(Je==null||Je())},nr=function(){var Ye;if(!F)return null;var nt=!et&&!U&&be,Bt="".concat(ne,"-clear-icon"),St=(0,me.Z)(F)==="object"&&F!==null&&F!==void 0&&F.clearIcon?F.clearIcon:"\u2716";return he.createElement("span",{onClick:pe,onMouseDown:function(_t){return _t.preventDefault()},className:Y()(Bt,(Ye={},(0,ye.Z)(Ye,"".concat(Bt,"-hidden"),!nt),(0,ye.Z)(Ye,"".concat(Bt,"-has-suffix"),!!fe),Ye)),role:"button",tabIndex:-1},St)},Lt=(0,he.cloneElement)(Q,{value:be,hidden:X,className:Y()((O=Q.props)===null||O===void 0?void 0:O.className,!(0,S.X3)(we)&&!(0,S.He)(we)&&ge)||null,style:(0,G.Z)((0,G.Z)({},(z=Q.props)===null||z===void 0?void 0:z.style),!(0,S.X3)(we)&&!(0,S.He)(we)?ve:{})});if((0,S.X3)(we)){var ae,Z="".concat(ne,"-affix-wrapper"),K=Y()(Z,(ae={},(0,ye.Z)(ae,"".concat(Z,"-disabled"),et),(0,ye.Z)(ae,"".concat(Z,"-focused"),Re),(0,ye.Z)(ae,"".concat(Z,"-readonly"),U),(0,ye.Z)(ae,"".concat(Z,"-input-with-clear-btn"),fe&&F&&be),ae),!(0,S.He)(we)&&ge,Oe==null?void 0:Oe.affixWrapper,Le==null?void 0:Le.affixWrapper),ce=(fe||F)&&he.createElement("span",{className:Y()("".concat(ne,"-suffix"),Le==null?void 0:Le.suffix),style:se==null?void 0:se.suffix},nr(),fe);Lt=he.createElement(ut,(0,D.Z)({className:K,style:(0,G.Z)((0,G.Z)({},(0,S.He)(we)?void 0:ve),se==null?void 0:se.affixWrapper),hidden:!(0,S.He)(we)&&X,onClick:zt},Be==null?void 0:Be.affixWrapper,{ref:er}),We&&he.createElement("span",{className:Y()("".concat(ne,"-prefix"),Le==null?void 0:Le.prefix),style:se==null?void 0:se.prefix},We),(0,he.cloneElement)(Q,{value:be,hidden:null}),ce)}if((0,S.He)(we)){var ue="".concat(ne,"-group"),Fe="".concat(ue,"-addon"),ee=Y()("".concat(ne,"-wrapper"),ue,Oe==null?void 0:Oe.wrapper),ie=Y()("".concat(ne,"-group-wrapper"),ge,Oe==null?void 0:Oe.group);return he.createElement(Nt,{className:ie,style:ve,hidden:X},he.createElement(Wt,{className:ee},st&&he.createElement(Ct,{className:Fe},st),(0,he.cloneElement)(Lt,{hidden:null}),lt&&he.createElement(Ct,{className:Fe},lt)))}return Lt},Ge=_,Ze=x(94480),A=x(42978),R=x(75931),Ne=x(18929),mt=x(2738),gt=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],Qe=(0,he.forwardRef)(function(Me,we){var O=Me.autoComplete,z=Me.onChange,Q=Me.onFocus,ne=Me.onBlur,We=Me.onPressEnter,fe=Me.onKeyDown,st=Me.prefixCls,lt=st===void 0?"rc-input":st,ge=Me.disabled,ve=Me.htmlSize,et=Me.className,U=Me.maxLength,Re=Me.suffix,Je=Me.showCount,F=Me.type,be=F===void 0?"text":F,pe=Me.classes,X=Me.classNames,Oe=Me.styles,Le=(0,R.Z)(Me,gt),Be=(0,Ne.Z)(Me.defaultValue,{value:Me.value}),se=(0,A.Z)(Be,2),at=se[0],ut=se[1],Nt=(0,he.useState)(!1),Wt=(0,A.Z)(Nt,2),Ct=Wt[0],er=Wt[1],zt=(0,he.useRef)(null),nr=function(ie){zt.current&&(0,S.nH)(zt.current,ie)};(0,he.useImperativeHandle)(we,function(){return{focus:nr,blur:function(){var ie;(ie=zt.current)===null||ie===void 0||ie.blur()},setSelectionRange:function(ie,rt,Ye){var nt;(nt=zt.current)===null||nt===void 0||nt.setSelectionRange(ie,rt,Ye)},select:function(){var ie;(ie=zt.current)===null||ie===void 0||ie.select()},input:zt.current}}),(0,he.useEffect)(function(){er(function(ee){return ee&&ge?!1:ee})},[ge]);var Lt=function(ie){Me.value===void 0&&ut(ie.target.value),zt.current&&(0,S.rJ)(zt.current,ie,z)},ae=function(ie){We&&ie.key==="Enter"&&We(ie),fe==null||fe(ie)},Z=function(ie){er(!0),Q==null||Q(ie)},K=function(ie){er(!1),ne==null||ne(ie)},ce=function(ie){ut(""),nr(),zt.current&&(0,S.rJ)(zt.current,ie,z)},ue=function(){var ie=(0,mt.Z)(Me,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return he.createElement("input",(0,D.Z)({autoComplete:O},ie,{onChange:Lt,onFocus:Z,onBlur:K,onKeyDown:ae,className:Y()(lt,(0,ye.Z)({},"".concat(lt,"-disabled"),ge),X==null?void 0:X.input),style:Oe==null?void 0:Oe.input,ref:zt,size:ve,type:be}))},Fe=function(){var ie=Number(U)>0;if(Re||Je){var rt=(0,S.D7)(at),Ye=(0,Ze.Z)(rt).length,nt=(0,me.Z)(Je)==="object"?Je.formatter({value:rt,count:Ye,maxLength:U}):"".concat(Ye).concat(ie?" / ".concat(U):"");return he.createElement(he.Fragment,null,!!Je&&he.createElement("span",{className:Y()("".concat(lt,"-show-count-suffix"),(0,ye.Z)({},"".concat(lt,"-show-count-has-suffix"),!!Re),X==null?void 0:X.count),style:(0,G.Z)({},Oe==null?void 0:Oe.count)},nt),Re)}return null};return he.createElement(Ge,(0,D.Z)({},Le,{prefixCls:lt,className:et,inputElement:ue(),handleReset:ce,value:(0,S.D7)(at),focused:Ct,triggerFocus:nr,suffix:Fe(),disabled:ge,classes:pe,classNames:X,styles:Oe}))}),Ie=Qe,Ft=Ie},5643:function(wr,xt,x){"use strict";x.d(xt,{D7:function(){return H},He:function(){return D},X3:function(){return G},nH:function(){return me},rJ:function(){return ye}});function D(Y){return!!(Y.addonBefore||Y.addonAfter)}function G(Y){return!!(Y.prefix||Y.suffix||Y.allowClear)}function ye(Y,he,S,_){if(S){var Ge=he;if(he.type==="click"){var Ze=Y.cloneNode(!0);Ge=Object.create(he,{target:{value:Ze},currentTarget:{value:Ze}}),Ze.value="",S(Ge);return}if(_!==void 0){Ge=Object.create(he,{target:{value:Y},currentTarget:{value:Y}}),Y.value=_,S(Ge);return}S(Ge)}}function me(Y,he){if(Y){Y.focus(he);var S=he||{},_=S.cursor;if(_){var Ge=Y.value.length;switch(_){case"start":Y.setSelectionRange(0,0);break;case"end":Y.setSelectionRange(Ge,Ge);break;default:Y.setSelectionRange(0,Ge)}}}}function H(Y){return typeof Y=="undefined"||Y===null?"":String(Y)}},15285:function(wr,xt,x){"use strict";x.d(xt,{iz:function(){return Pt},ck:function(){return Cr},BW:function(){return jt},sN:function(){return Cr},Wd:function(){return Ke},ZP:function(){return Rt},Xl:function(){return fe}});var D=x(54476),G=x(20068),ye=x(33885),me=x(94480),H=x(42978),Y=x(75931),he=x(92310),S=x.n(he),_=x(11780),Ge=x(18929),Ze=x(13697),A=x(48736),R=x(59301),Ne=x(4676),mt=R.createContext(null);function gt(j,V){return j===void 0?null:"".concat(j,"-").concat(V)}function Qe(j){var V=R.useContext(mt);return gt(V,j)}var Ie=x(80547),Ft=["children","locked"],Me=R.createContext(null);function we(j,V){var de=(0,ye.Z)({},j);return Object.keys(V).forEach(function(Ee){var q=V[Ee];q!==void 0&&(de[Ee]=q)}),de}function O(j){var V=j.children,de=j.locked,Ee=(0,Y.Z)(j,Ft),q=R.useContext(Me),ke=(0,Ie.Z)(function(){return we(q,Ee)},[q,Ee],function(_e,je){return!de&&(_e[0]!==je[0]||!(0,Ze.Z)(_e[1],je[1],!0))});return R.createElement(Me.Provider,{value:ke},V)}var z=[],Q=R.createContext(null);function ne(){return R.useContext(Q)}var We=R.createContext(z);function fe(j){var V=R.useContext(We);return R.useMemo(function(){return j!==void 0?[].concat((0,me.Z)(V),[j]):V},[V,j])}var st=R.createContext(null),lt=R.createContext({}),ge=lt,ve=x(29194);function et(j){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,ve.Z)(j)){var de=j.nodeName.toLowerCase(),Ee=["input","select","textarea","button"].includes(de)||j.isContentEditable||de==="a"&&!!j.getAttribute("href"),q=j.getAttribute("tabindex"),ke=Number(q),_e=null;return q&&!Number.isNaN(ke)?_e=ke:Ee&&_e===null&&(_e=0),Ee&&j.disabled&&(_e=null),_e!==null&&(_e>=0||V&&_e<0)}return!1}function U(j){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,de=(0,me.Z)(j.querySelectorAll("*")).filter(function(Ee){return et(Ee,V)});return et(j,V)&&de.unshift(j),de}var Re=null;function Je(){Re=document.activeElement}function F(){Re=null}function be(){if(Re)try{Re.focus()}catch(j){}}function pe(j,V){if(V.keyCode===9){var de=U(j),Ee=de[V.shiftKey?0:de.length-1],q=Ee===document.activeElement||j===document.activeElement;if(q){var ke=de[V.shiftKey?de.length-1:0];ke.focus(),V.preventDefault()}}}var X=x(10228),Oe=x(16089),Le=X.Z.LEFT,Be=X.Z.RIGHT,se=X.Z.UP,at=X.Z.DOWN,ut=X.Z.ENTER,Nt=X.Z.ESC,Wt=X.Z.HOME,Ct=X.Z.END,er=[se,at,Le,Be];function zt(j,V,de,Ee){var q,ke,_e,je,vt="prev",dt="next",Zt="children",lr="parent";if(j==="inline"&&Ee===ut)return{inlineTrigger:!0};var gr=(q={},(0,G.Z)(q,se,vt),(0,G.Z)(q,at,dt),q),vr=(ke={},(0,G.Z)(ke,Le,de?dt:vt),(0,G.Z)(ke,Be,de?vt:dt),(0,G.Z)(ke,at,Zt),(0,G.Z)(ke,ut,Zt),ke),rr=(_e={},(0,G.Z)(_e,se,vt),(0,G.Z)(_e,at,dt),(0,G.Z)(_e,ut,Zt),(0,G.Z)(_e,Nt,lr),(0,G.Z)(_e,Le,de?Zt:lr),(0,G.Z)(_e,Be,de?lr:Zt),_e),Ir={inline:gr,horizontal:vr,vertical:rr,inlineSub:gr,horizontalSub:rr,verticalSub:rr},Tr=(je=Ir["".concat(j).concat(V?"":"Sub")])===null||je===void 0?void 0:je[Ee];switch(Tr){case vt:return{offset:-1,sibling:!0};case dt:return{offset:1,sibling:!0};case lr:return{offset:-1,sibling:!1};case Zt:return{offset:1,sibling:!1};default:return null}}function nr(j){for(var V=j;V;){if(V.getAttribute("data-menu-list"))return V;V=V.parentElement}return null}function Lt(j,V){for(var de=j||document.activeElement;de;){if(V.has(de))return de;de=de.parentElement}return null}function ae(j,V){var de=U(j,!0);return de.filter(function(Ee){return V.has(Ee)})}function Z(j,V,de){var Ee=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!j)return null;var q=ae(j,V),ke=q.length,_e=q.findIndex(function(je){return de===je});return Ee<0?_e===-1?_e=ke-1:_e-=1:Ee>0&&(_e+=1),_e=(_e+ke)%ke,q[_e]}var K=function(V,de){var Ee=new Set,q=new Map,ke=new Map;return V.forEach(function(_e){var je=document.querySelector("[data-menu-id='".concat(gt(de,_e),"']"));je&&(Ee.add(je),ke.set(je,_e),q.set(_e,je))}),{elements:Ee,key2element:q,element2key:ke}};function ce(j,V,de,Ee,q,ke,_e,je,vt,dt){var Zt=R.useRef(),lr=R.useRef();lr.current=V;var gr=function(){Oe.Z.cancel(Zt.current)};return R.useEffect(function(){return function(){gr()}},[]),function(vr){var rr=vr.which;if([].concat(er,[ut,Nt,Wt,Ct]).includes(rr)){var Ir=ke(),Tr=K(Ir,Ee),Jt=Tr,Yt=Jt.elements,or=Jt.key2element,Ut=Jt.element2key,Qt=or.get(V),dr=Lt(Qt,Yt),$r=Ut.get(dr),Dr=zt(j,_e($r,!0).length===1,de,rr);if(!Dr&&rr!==Wt&&rr!==Ct)return;(er.includes(rr)||[Wt,Ct].includes(rr))&&vr.preventDefault();var At=function(Pr){if(Pr){var Tn=Pr,ri=Pr.querySelector("a");ri!=null&&ri.getAttribute("href")&&(Tn=ri);var gn=Ut.get(Pr);je(gn),gr(),Zt.current=(0,Oe.Z)(function(){lr.current===gn&&Tn.focus()})}};if([Wt,Ct].includes(rr)||Dr.sibling||!dr){var ft;!dr||j==="inline"?ft=q.current:ft=nr(dr);var sr,Kt=ae(ft,Yt);rr===Wt?sr=Kt[0]:rr===Ct?sr=Kt[Kt.length-1]:sr=Z(ft,Yt,dr,Dr.offset),At(sr)}else if(Dr.inlineTrigger)vt($r);else if(Dr.offset>0)vt($r,!0),gr(),Zt.current=(0,Oe.Z)(function(){Tr=K(Ir,Ee);var an=dr.getAttribute("aria-controls"),Pr=document.getElementById(an),Tn=Z(Pr,Tr.elements);At(Tn)},5);else if(Dr.offset<0){var xr=_e($r,!0),fn=xr[xr.length-2],ur=or.get(fn);vt(fn,!1),At(ur)}}dt==null||dt(vr)}}function ue(j){Promise.resolve().then(j)}var Fe="__RC_UTIL_PATH_SPLIT__",ee=function(V){return V.join(Fe)},ie=function(V){return V.split(Fe)},rt="rc-menu-more";function Ye(){var j=R.useState({}),V=(0,H.Z)(j,2),de=V[1],Ee=(0,R.useRef)(new Map),q=(0,R.useRef)(new Map),ke=R.useState([]),_e=(0,H.Z)(ke,2),je=_e[0],vt=_e[1],dt=(0,R.useRef)(0),Zt=(0,R.useRef)(!1),lr=function(){Zt.current||de({})},gr=(0,R.useCallback)(function(or,Ut){var Qt=ee(Ut);q.current.set(Qt,or),Ee.current.set(or,Qt),dt.current+=1;var dr=dt.current;ue(function(){dr===dt.current&&lr()})},[]),vr=(0,R.useCallback)(function(or,Ut){var Qt=ee(Ut);q.current.delete(Qt),Ee.current.delete(or)},[]),rr=(0,R.useCallback)(function(or){vt(or)},[]),Ir=(0,R.useCallback)(function(or,Ut){var Qt=Ee.current.get(or)||"",dr=ie(Qt);return Ut&&je.includes(dr[0])&&dr.unshift(rt),dr},[je]),Tr=(0,R.useCallback)(function(or,Ut){return or.some(function(Qt){var dr=Ir(Qt,!0);return dr.includes(Ut)})},[Ir]),Jt=function(){var Ut=(0,me.Z)(Ee.current.keys());return je.length&&Ut.push(rt),Ut},Yt=(0,R.useCallback)(function(or){var Ut="".concat(Ee.current.get(or)).concat(Fe),Qt=new Set;return(0,me.Z)(q.current.keys()).forEach(function(dr){dr.startsWith(Ut)&&Qt.add(q.current.get(dr))}),Qt},[]);return R.useEffect(function(){return function(){Zt.current=!0}},[]),{registerPath:gr,unregisterPath:vr,refreshOverflowKeys:rr,isSubPathKey:Tr,getKeyPath:Ir,getKeys:Jt,getSubPathKeys:Yt}}function nt(j){var V=R.useRef(j);V.current=j;var de=R.useCallback(function(){for(var Ee,q=arguments.length,ke=new Array(q),_e=0;_e<q;_e++)ke[_e]=arguments[_e];return(Ee=V.current)===null||Ee===void 0?void 0:Ee.call.apply(Ee,[V].concat(ke))},[]);return j?de:void 0}var Bt=Math.random().toFixed(5).toString().slice(2),St=0;function W(j){var V=(0,Ge.Z)(j,{value:j}),de=(0,H.Z)(V,2),Ee=de[0],q=de[1];return R.useEffect(function(){St+=1;var ke="".concat(Bt,"-").concat(St);q("rc-menu-uuid-".concat(ke))},[]),Ee}var _t=x(67732),bt=x(83652),N=x(42403),J=x(158),le=x(2738),ot=x(8654);function Te(j,V,de,Ee){var q=R.useContext(Me),ke=q.activeKey,_e=q.onActive,je=q.onInactive,vt={active:ke===j};return V||(vt.onMouseEnter=function(dt){de==null||de({key:j,domEvent:dt}),_e(j)},vt.onMouseLeave=function(dt){Ee==null||Ee({key:j,domEvent:dt}),je(j)}),vt}function Ce(j){var V=R.useContext(Me),de=V.mode,Ee=V.rtl,q=V.inlineIndent;if(de!=="inline")return null;var ke=j;return Ee?{paddingRight:ke*q}:{paddingLeft:ke*q}}function ir(j){var V=j.icon,de=j.props,Ee=j.children,q;return V===null||V===!1?null:(typeof V=="function"?q=R.createElement(V,(0,ye.Z)({},de)):typeof V!="boolean"&&(q=V),q||Ee||null)}var Ht=["item"];function qt(j){var V=j.item,de=(0,Y.Z)(j,Ht);return Object.defineProperty(de,"item",{get:function(){return(0,A.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),V}}),de}var Gt=["title","attribute","elementRef"],tr=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Mt=["active"],Mr=function(j){(0,N.Z)(de,j);var V=(0,J.Z)(de);function de(){return(0,_t.Z)(this,de),V.apply(this,arguments)}return(0,bt.Z)(de,[{key:"render",value:function(){var q=this.props,ke=q.title,_e=q.attribute,je=q.elementRef,vt=(0,Y.Z)(q,Gt),dt=(0,le.Z)(vt,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,A.ZP)(!_e,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),R.createElement(_.Z.Item,(0,D.Z)({},_e,{title:typeof ke=="string"?ke:void 0},dt,{ref:je}))}}]),de}(R.Component),pr=R.forwardRef(function(j,V){var de,Ee=j.style,q=j.className,ke=j.eventKey,_e=j.warnKey,je=j.disabled,vt=j.itemIcon,dt=j.children,Zt=j.role,lr=j.onMouseEnter,gr=j.onMouseLeave,vr=j.onClick,rr=j.onKeyDown,Ir=j.onFocus,Tr=(0,Y.Z)(j,tr),Jt=Qe(ke),Yt=R.useContext(Me),or=Yt.prefixCls,Ut=Yt.onItemClick,Qt=Yt.disabled,dr=Yt.overflowDisabled,$r=Yt.itemIcon,Dr=Yt.selectedKeys,At=Yt.onActive,ft=R.useContext(ge),sr=ft._internalRenderMenuItem,Kt="".concat(or,"-item"),xr=R.useRef(),fn=R.useRef(),ur=Qt||je,an=(0,ot.x1)(V,fn),Pr=fe(ke),Tn=function(Mn){return{key:ke,keyPath:(0,me.Z)(Pr).reverse(),item:xr.current,domEvent:Mn}},ri=vt||$r,gn=Te(ke,ur,lr,gr),Jn=gn.active,kn=(0,Y.Z)(gn,Mt),ni=Dr.includes(ke),vn=Ce(Pr.length),mi=function(Mn){if(!ur){var ci=Tn(Mn);vr==null||vr(qt(ci)),Ut(ci)}},Rr=function(Mn){if(rr==null||rr(Mn),Mn.which===X.Z.ENTER){var ci=Tn(Mn);vr==null||vr(qt(ci)),Ut(ci)}},Pn=function(Mn){At(ke),Ir==null||Ir(Mn)},_n={};j.role==="option"&&(_n["aria-selected"]=ni);var zn=R.createElement(Mr,(0,D.Z)({ref:xr,elementRef:an,role:Zt===null?"none":Zt||"menuitem",tabIndex:je?null:-1,"data-menu-id":dr&&Jt?null:Jt},Tr,kn,_n,{component:"li","aria-disabled":je,style:(0,ye.Z)((0,ye.Z)({},vn),Ee),className:S()(Kt,(de={},(0,G.Z)(de,"".concat(Kt,"-active"),Jn),(0,G.Z)(de,"".concat(Kt,"-selected"),ni),(0,G.Z)(de,"".concat(Kt,"-disabled"),ur),de),q),onClick:mi,onKeyDown:Rr,onFocus:Pn}),dt,R.createElement(ir,{props:(0,ye.Z)((0,ye.Z)({},j),{},{isSelected:ni}),icon:ri}));return sr&&(zn=sr(zn,j,{selected:ni})),zn});function Vr(j,V){var de=j.eventKey,Ee=ne(),q=fe(de);return R.useEffect(function(){if(Ee)return Ee.registerPath(de,q),function(){Ee.unregisterPath(de,q)}},[q]),Ee?null:R.createElement(pr,(0,D.Z)({},j,{ref:V}))}var Cr=R.forwardRef(Vr),fr=["className","children"],on=function(V,de){var Ee=V.className,q=V.children,ke=(0,Y.Z)(V,fr),_e=R.useContext(Me),je=_e.prefixCls,vt=_e.mode,dt=_e.rtl;return R.createElement("ul",(0,D.Z)({className:S()(je,dt&&"".concat(je,"-rtl"),"".concat(je,"-sub"),"".concat(je,"-").concat(vt==="inline"?"inline":"vertical"),Ee),role:"menu"},ke,{"data-menu-list":!0,ref:de}),q)},Vt=R.forwardRef(on);Vt.displayName="SubMenuList";var rn=Vt,nn=x(11592);function qr(j,V){return(0,nn.Z)(j).map(function(de,Ee){if(R.isValidElement(de)){var q,ke,_e=de.key,je=(q=(ke=de.props)===null||ke===void 0?void 0:ke.eventKey)!==null&&q!==void 0?q:_e,vt=je==null;vt&&(je="tmp_key-".concat([].concat((0,me.Z)(V),[Ee]).join("-")));var dt={key:je,eventKey:je};return R.cloneElement(de,dt)}return de})}var Xr=x(35593),Sr={adjustX:1,adjustY:1},Jr={topLeft:{points:["bl","tl"],overflow:Sr},topRight:{points:["br","tr"],overflow:Sr},bottomLeft:{points:["tl","bl"],overflow:Sr},bottomRight:{points:["tr","br"],overflow:Sr},leftTop:{points:["tr","tl"],overflow:Sr},leftBottom:{points:["br","bl"],overflow:Sr},rightTop:{points:["tl","tr"],overflow:Sr},rightBottom:{points:["bl","br"],overflow:Sr}},Fr={topLeft:{points:["bl","tl"],overflow:Sr},topRight:{points:["br","tr"],overflow:Sr},bottomLeft:{points:["tl","bl"],overflow:Sr},bottomRight:{points:["tr","br"],overflow:Sr},rightTop:{points:["tr","tl"],overflow:Sr},rightBottom:{points:["br","bl"],overflow:Sr},leftTop:{points:["tl","tr"],overflow:Sr},leftBottom:{points:["bl","br"],overflow:Sr}},Xn=null;function In(j,V,de){if(V)return V;if(de)return de[j]||de.other}var yn={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function dn(j){var V=j.prefixCls,de=j.visible,Ee=j.children,q=j.popup,ke=j.popupStyle,_e=j.popupClassName,je=j.popupOffset,vt=j.disabled,dt=j.mode,Zt=j.onVisibleChange,lr=R.useContext(Me),gr=lr.getPopupContainer,vr=lr.rtl,rr=lr.subMenuOpenDelay,Ir=lr.subMenuCloseDelay,Tr=lr.builtinPlacements,Jt=lr.triggerSubMenuAction,Yt=lr.forceSubMenuRender,or=lr.rootClassName,Ut=lr.motion,Qt=lr.defaultMotions,dr=R.useState(!1),$r=(0,H.Z)(dr,2),Dr=$r[0],At=$r[1],ft=vr?(0,ye.Z)((0,ye.Z)({},Fr),Tr):(0,ye.Z)((0,ye.Z)({},Jr),Tr),sr=yn[dt],Kt=In(dt,Ut,Qt),xr=R.useRef(Kt);dt!=="inline"&&(xr.current=Kt);var fn=(0,ye.Z)((0,ye.Z)({},xr.current),{},{leavedClassName:"".concat(V,"-hidden"),removeOnLeave:!1,motionAppear:!0}),ur=R.useRef();return R.useEffect(function(){return ur.current=(0,Oe.Z)(function(){At(de)}),function(){Oe.Z.cancel(ur.current)}},[de]),R.createElement(Xr.Z,{prefixCls:V,popupClassName:S()("".concat(V,"-popup"),(0,G.Z)({},"".concat(V,"-rtl"),vr),_e,or),stretch:dt==="horizontal"?"minWidth":null,getPopupContainer:gr,builtinPlacements:ft,popupPlacement:sr,popupVisible:Dr,popup:q,popupStyle:ke,popupAlign:je&&{offset:je},action:vt?[]:[Jt],mouseEnterDelay:rr,mouseLeaveDelay:Ir,onPopupVisibleChange:Zt,forceRender:Yt,popupMotion:fn,fresh:!0},Ee)}var C=x(77900);function I(j){var V=j.id,de=j.open,Ee=j.keyPath,q=j.children,ke="inline",_e=R.useContext(Me),je=_e.prefixCls,vt=_e.forceSubMenuRender,dt=_e.motion,Zt=_e.defaultMotions,lr=_e.mode,gr=R.useRef(!1);gr.current=lr===ke;var vr=R.useState(!gr.current),rr=(0,H.Z)(vr,2),Ir=rr[0],Tr=rr[1],Jt=gr.current?de:!1;R.useEffect(function(){gr.current&&Tr(!1)},[lr]);var Yt=(0,ye.Z)({},In(ke,dt,Zt));Ee.length>1&&(Yt.motionAppear=!1);var or=Yt.onVisibleChanged;return Yt.onVisibleChanged=function(Ut){return!gr.current&&!Ut&&Tr(!0),or==null?void 0:or(Ut)},Ir?null:R.createElement(O,{mode:ke,locked:!gr.current},R.createElement(C.default,(0,D.Z)({visible:Jt},Yt,{forceRender:vt,removeOnLeave:!1,leavedClassName:"".concat(je,"-hidden")}),function(Ut){var Qt=Ut.className,dr=Ut.style;return R.createElement(rn,{id:V,className:Qt,style:dr},q)}))}var Ae=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Pe=["active"],ze=function(V){var de,Ee=V.style,q=V.className,ke=V.title,_e=V.eventKey,je=V.warnKey,vt=V.disabled,dt=V.internalPopupClose,Zt=V.children,lr=V.itemIcon,gr=V.expandIcon,vr=V.popupClassName,rr=V.popupOffset,Ir=V.popupStyle,Tr=V.onClick,Jt=V.onMouseEnter,Yt=V.onMouseLeave,or=V.onTitleClick,Ut=V.onTitleMouseEnter,Qt=V.onTitleMouseLeave,dr=(0,Y.Z)(V,Ae),$r=Qe(_e),Dr=R.useContext(Me),At=Dr.prefixCls,ft=Dr.mode,sr=Dr.openKeys,Kt=Dr.disabled,xr=Dr.overflowDisabled,fn=Dr.activeKey,ur=Dr.selectedKeys,an=Dr.itemIcon,Pr=Dr.expandIcon,Tn=Dr.onItemClick,ri=Dr.onOpenChange,gn=Dr.onActive,Jn=R.useContext(ge),kn=Jn._internalRenderSubMenuItem,ni=R.useContext(st),vn=ni.isSubPathKey,mi=fe(),Rr="".concat(At,"-submenu"),Pn=Kt||vt,_n=R.useRef(),zn=R.useRef(),gi=lr!=null?lr:an,Mn=gr!=null?gr:Pr,ci=sr.includes(_e),Yn=!xr&&ci,Pi=vn(ur,_e),Kn=Te(_e,Pn,Ut,Qt),vi=Kn.active,Zi=(0,Y.Z)(Kn,Pe),_i=R.useState(!1),Mi=(0,H.Z)(_i,2),ji=Mi[0],Ri=Mi[1],ui=function(Hn){Pn||Ri(Hn)},hn=function(Hn){ui(!0),Jt==null||Jt({key:_e,domEvent:Hn})},xa=function(Hn){ui(!1),Yt==null||Yt({key:_e,domEvent:Hn})},Ci=R.useMemo(function(){return vi||(ft!=="inline"?ji||vn([fn],_e):!1)},[ft,vi,fn,ji,_e,vn]),Oi=Ce(mi.length),bi=function(Hn){Pn||(or==null||or({key:_e,domEvent:Hn}),ft==="inline"&&ri(_e,!ci))},Ui=nt(function(Rn){Tr==null||Tr(qt(Rn)),Tn(Rn)}),Ei=function(Hn){ft!=="inline"&&ri(_e,Hn)},Gi=function(){gn(_e)},Ni=$r&&"".concat($r,"-popup"),Fi=R.createElement("div",(0,D.Z)({role:"menuitem",style:Oi,className:"".concat(Rr,"-title"),tabIndex:Pn?null:-1,ref:_n,title:typeof ke=="string"?ke:null,"data-menu-id":xr&&$r?null:$r,"aria-expanded":Yn,"aria-haspopup":!0,"aria-controls":Ni,"aria-disabled":Pn,onClick:bi,onFocus:Gi},Zi),ke,R.createElement(ir,{icon:ft!=="horizontal"?Mn:void 0,props:(0,ye.Z)((0,ye.Z)({},V),{},{isOpen:Yn,isSubMenu:!0})},R.createElement("i",{className:"".concat(Rr,"-arrow")}))),Dn=R.useRef(ft);if(ft!=="inline"&&mi.length>1?Dn.current="vertical":Dn.current=ft,!xr){var di=Dn.current;Fi=R.createElement(dn,{mode:di,prefixCls:Rr,visible:!dt&&Yn&&ft!=="inline",popupClassName:vr,popupOffset:rr,popupStyle:Ir,popup:R.createElement(O,{mode:di==="horizontal"?"vertical":di},R.createElement(rn,{id:Ni,ref:zn},Zt)),disabled:Pn,onVisibleChange:Ei},Fi)}var fi=R.createElement(_.Z.Item,(0,D.Z)({role:"none"},dr,{component:"li",style:Ee,className:S()(Rr,"".concat(Rr,"-").concat(ft),q,(de={},(0,G.Z)(de,"".concat(Rr,"-open"),Yn),(0,G.Z)(de,"".concat(Rr,"-active"),Ci),(0,G.Z)(de,"".concat(Rr,"-selected"),Pi),(0,G.Z)(de,"".concat(Rr,"-disabled"),Pn),de)),onMouseEnter:hn,onMouseLeave:xa}),Fi,!xr&&R.createElement(I,{id:Ni,open:Yn,keyPath:mi},Zt));return kn&&(fi=kn(fi,V,{selected:Pi,active:Ci,open:Yn,disabled:Pn})),R.createElement(O,{onItemClick:Ui,mode:ft==="horizontal"?"vertical":ft,itemIcon:gi,expandIcon:Mn},fi)};function Ke(j){var V=j.eventKey,de=j.children,Ee=fe(V),q=qr(de,Ee),ke=ne();R.useEffect(function(){if(ke)return ke.registerPath(V,Ee),function(){ke.unregisterPath(V,Ee)}},[Ee]);var _e;return ke?_e=q:_e=R.createElement(ze,j,q),R.createElement(We.Provider,{value:Ee},_e)}var ht=x(76190),ct=["className","title","eventKey","children"],Et=["children"],ar=function(V){var de=V.className,Ee=V.title,q=V.eventKey,ke=V.children,_e=(0,Y.Z)(V,ct),je=R.useContext(Me),vt=je.prefixCls,dt="".concat(vt,"-item-group");return R.createElement("li",(0,D.Z)({role:"presentation"},_e,{onClick:function(lr){return lr.stopPropagation()},className:S()(dt,de)}),R.createElement("div",{role:"presentation",className:"".concat(dt,"-title"),title:typeof Ee=="string"?Ee:void 0},Ee),R.createElement("ul",{role:"group",className:"".concat(dt,"-list")},ke))};function jt(j){var V=j.children,de=(0,Y.Z)(j,Et),Ee=fe(de.eventKey),q=qr(V,Ee),ke=ne();return ke?q:R.createElement(ar,(0,le.Z)(de,["warnKey"]),q)}function Pt(j){var V=j.className,de=j.style,Ee=R.useContext(Me),q=Ee.prefixCls,ke=ne();return ke?null:R.createElement("li",{role:"separator",className:S()("".concat(q,"-item-divider"),V),style:de})}var $t=["label","children","key","type"];function Xt(j){return(j||[]).map(function(V,de){if(V&&(0,ht.Z)(V)==="object"){var Ee=V,q=Ee.label,ke=Ee.children,_e=Ee.key,je=Ee.type,vt=(0,Y.Z)(Ee,$t),dt=_e!=null?_e:"tmp-".concat(de);return ke||je==="group"?je==="group"?R.createElement(jt,(0,D.Z)({key:dt},vt,{title:q}),Xt(ke)):R.createElement(Ke,(0,D.Z)({key:dt},vt,{title:q}),Xt(ke)):je==="divider"?R.createElement(Pt,(0,D.Z)({key:dt},vt)):R.createElement(Cr,(0,D.Z)({key:dt},vt),q)}return null}).filter(function(V){return V})}function xe(j,V,de){var Ee=j;return V&&(Ee=Xt(V)),qr(Ee,de)}var zr=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem"],Br=[],hr=R.forwardRef(function(j,V){var de,Ee,q=j,ke=q.prefixCls,_e=ke===void 0?"rc-menu":ke,je=q.rootClassName,vt=q.style,dt=q.className,Zt=q.tabIndex,lr=Zt===void 0?0:Zt,gr=q.items,vr=q.children,rr=q.direction,Ir=q.id,Tr=q.mode,Jt=Tr===void 0?"vertical":Tr,Yt=q.inlineCollapsed,or=q.disabled,Ut=q.disabledOverflow,Qt=q.subMenuOpenDelay,dr=Qt===void 0?.1:Qt,$r=q.subMenuCloseDelay,Dr=$r===void 0?.1:$r,At=q.forceSubMenuRender,ft=q.defaultOpenKeys,sr=q.openKeys,Kt=q.activeKey,xr=q.defaultActiveFirst,fn=q.selectable,ur=fn===void 0?!0:fn,an=q.multiple,Pr=an===void 0?!1:an,Tn=q.defaultSelectedKeys,ri=q.selectedKeys,gn=q.onSelect,Jn=q.onDeselect,kn=q.inlineIndent,ni=kn===void 0?24:kn,vn=q.motion,mi=q.defaultMotions,Rr=q.triggerSubMenuAction,Pn=Rr===void 0?"hover":Rr,_n=q.builtinPlacements,zn=q.itemIcon,gi=q.expandIcon,Mn=q.overflowedIndicator,ci=Mn===void 0?"...":Mn,Yn=q.overflowedIndicatorPopupClassName,Pi=q.getPopupContainer,Kn=q.onClick,vi=q.onOpenChange,Zi=q.onKeyDown,_i=q.openAnimation,Mi=q.openTransitionName,ji=q._internalRenderMenuItem,Ri=q._internalRenderSubMenuItem,ui=(0,Y.Z)(q,zr),hn=R.useMemo(function(){return xe(vr,gr,Br)},[vr,gr]),xa=R.useState(!1),Ci=(0,H.Z)(xa,2),Oi=Ci[0],bi=Ci[1],Ui=R.useRef(),Ei=W(Ir),Gi=rr==="rtl",Ni=(0,Ge.Z)(ft,{value:sr,postState:function(Zr){return Zr||Br}}),Fi=(0,H.Z)(Ni,2),Dn=Fi[0],di=Fi[1],fi=function(Zr){var Yr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function ai(){di(Zr),vi==null||vi(Zr)}Yr?(0,Ne.flushSync)(ai):ai()},Rn=R.useState(Dn),Hn=(0,H.Z)(Rn,2),zi=Hn[0],Kr=Hn[1],Er=R.useRef(!1),pn=R.useMemo(function(){return(Jt==="inline"||Jt==="vertical")&&Yt?["vertical",Yt]:[Jt,!1]},[Jt,Yt]),An=(0,H.Z)(pn,2),ii=An[0],On=An[1],Na=ii==="inline",Ws=R.useState(ii),Nn=(0,H.Z)(Ws,2),qi=Nn[0],ns=Nn[1],Xi=R.useState(On),wa=(0,H.Z)(Xi,2),Wn=wa[0],Sa=wa[1];R.useEffect(function(){ns(ii),Sa(On),Er.current&&(Na?di(zi):fi(Br))},[ii,On]);var aa=R.useState(0),_a=(0,H.Z)(aa,2),mo=_a[0],go=_a[1],ki=mo>=hn.length-1||qi!=="horizontal"||Ut;R.useEffect(function(){Na&&Kr(Dn)},[Dn]),R.useEffect(function(){return Er.current=!0,function(){Er.current=!1}},[]);var bn=Ye(),xn=bn.registerPath,Ma=bn.unregisterPath,Ji=bn.refreshOverflowKeys,Ca=bn.isSubPathKey,Vs=bn.getKeyPath,is=bn.getKeys,yi=bn.getSubPathKeys,as=R.useMemo(function(){return{registerPath:xn,unregisterPath:Ma}},[xn,Ma]),Zs=R.useMemo(function(){return{isSubPathKey:Ca}},[Ca]);R.useEffect(function(){Ji(ki?Br:hn.slice(mo+1).map(function(Nr){return Nr.key}))},[mo,ki]);var os=(0,Ge.Z)(Kt||xr&&((de=hn[0])===null||de===void 0?void 0:de.key),{value:Kt}),ss=(0,H.Z)(os,2),Fa=ss[0],vo=ss[1],bo=nt(function(Nr){vo(Nr)}),ls=nt(function(){vo(void 0)});(0,R.useImperativeHandle)(V,function(){return{list:Ui.current,focus:function(Zr){var Yr,ai=is(),Vn=K(ai,Ei),Aa=Vn.elements,oa=Vn.key2element,Fo=Vn.element2key,zo=ae(Ui.current,Aa),fs=Fa!=null?Fa:zo[0]?Fo.get(zo[0]):(Yr=hn.find(function(Gs){return!Gs.props.disabled}))===null||Yr===void 0?void 0:Yr.key,sa=oa.get(fs);if(fs&&sa){var La;sa==null||(La=sa.focus)===null||La===void 0||La.call(sa,Zr)}}}});var Ea=(0,Ge.Z)(Tn||[],{value:ri,postState:function(Zr){return Array.isArray(Zr)?Zr:Zr==null?Br:[Zr]}}),cs=(0,H.Z)(Ea,2),za=cs[0],ka=cs[1],js=function(Zr){if(ur){var Yr=Zr.key,ai=za.includes(Yr),Vn;Pr?ai?Vn=za.filter(function(oa){return oa!==Yr}):Vn=[].concat((0,me.Z)(za),[Yr]):Vn=[Yr],ka(Vn);var Aa=(0,ye.Z)((0,ye.Z)({},Zr),{},{selectedKeys:Vn});ai?Jn==null||Jn(Aa):gn==null||gn(Aa)}!Pr&&Dn.length&&qi!=="inline"&&fi(Br)},us=nt(function(Nr){Kn==null||Kn(qt(Nr)),js(Nr)}),yo=nt(function(Nr,Zr){var Yr=Dn.filter(function(Vn){return Vn!==Nr});if(Zr)Yr.push(Nr);else if(qi!=="inline"){var ai=yi(Nr);Yr=Yr.filter(function(Vn){return!ai.has(Vn)})}(0,Ze.Z)(Dn,Yr,!0)||fi(Yr,!0)}),ds=function(Zr,Yr){var ai=Yr!=null?Yr:!Dn.includes(Zr);yo(Zr,ai)},Da=ce(qi,Fa,Gi,Ei,Ui,is,Vs,vo,ds,Zi);R.useEffect(function(){bi(!0)},[]);var xo=R.useMemo(function(){return{_internalRenderMenuItem:ji,_internalRenderSubMenuItem:Ri}},[ji,Ri]),Us=qi!=="horizontal"||Ut?hn:hn.map(function(Nr,Zr){return R.createElement(O,{key:Nr.key,overflowDisabled:Zr>mo},Nr)}),Ka=R.createElement(_.Z,(0,D.Z)({id:Ir,ref:Ui,prefixCls:"".concat(_e,"-overflow"),component:"ul",itemComponent:Cr,className:S()(_e,"".concat(_e,"-root"),"".concat(_e,"-").concat(qi),dt,(Ee={},(0,G.Z)(Ee,"".concat(_e,"-inline-collapsed"),Wn),(0,G.Z)(Ee,"".concat(_e,"-rtl"),Gi),Ee),je),dir:rr,style:vt,role:"menu",tabIndex:lr,data:Us,renderRawItem:function(Zr){return Zr},renderRawRest:function(Zr){var Yr=Zr.length,ai=Yr?hn.slice(-Yr):null;return R.createElement(Ke,{eventKey:rt,title:ci,disabled:ki,internalPopupClose:Yr===0,popupClassName:Yn},ai)},maxCount:qi!=="horizontal"||Ut?_.Z.INVALIDATE:_.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Zr){go(Zr)},onKeyDown:Da},ui));return R.createElement(ge.Provider,{value:xo},R.createElement(mt.Provider,{value:Ei},R.createElement(O,{prefixCls:_e,rootClassName:je,mode:qi,openKeys:Dn,rtl:Gi,disabled:or,motion:Oi?vn:null,defaultMotions:Oi?mi:null,activeKey:Fa,onActive:bo,onInactive:ls,selectedKeys:za,inlineIndent:ni,subMenuOpenDelay:dr,subMenuCloseDelay:Dr,forceSubMenuRender:At,builtinPlacements:_n,triggerSubMenuAction:Pn,getPopupContainer:Pi,itemIcon:zn,expandIcon:gi,onItemClick:us,onOpenChange:yo},R.createElement(st.Provider,{value:Zs},Ka),R.createElement("div",{style:{display:"none"},"aria-hidden":!0},R.createElement(Q.Provider,{value:as},hn)))))}),Ur=hr,mr=Ur;mr.Item=Cr,mr.SubMenu=Ke,mr.ItemGroup=jt,mr.Divider=Pt;var Rt=mr},11780:function(wr,xt,x){"use strict";x.d(xt,{Z:function(){return Je}});var D=x(54476),G=x(33885),ye=x(42978),me=x(75931),H=x(59301),Y=x(92310),he=x.n(Y),S=x(29301),_=x(34280),Ge=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Ze=void 0;function A(F,be){var pe=F.prefixCls,X=F.invalidate,Oe=F.item,Le=F.renderItem,Be=F.responsive,se=F.responsiveDisabled,at=F.registerSize,ut=F.itemKey,Nt=F.className,Wt=F.style,Ct=F.children,er=F.display,zt=F.order,nr=F.component,Lt=nr===void 0?"div":nr,ae=(0,me.Z)(F,Ge),Z=Be&&!er;function K(ie){at(ut,ie)}H.useEffect(function(){return function(){K(null)}},[]);var ce=Le&&Oe!==Ze?Le(Oe,{index:zt}):Ct,ue;X||(ue={opacity:Z?0:1,height:Z?0:Ze,overflowY:Z?"hidden":Ze,order:Be?zt:Ze,pointerEvents:Z?"none":Ze,position:Z?"absolute":Ze});var Fe={};Z&&(Fe["aria-hidden"]=!0);var ee=H.createElement(Lt,(0,D.Z)({className:he()(!X&&pe,Nt),style:(0,G.Z)((0,G.Z)({},ue),Wt)},Fe,ae,{ref:be}),ce);return Be&&(ee=H.createElement(S.Z,{onResize:function(rt){var Ye=rt.offsetWidth;K(Ye)},disabled:se},ee)),ee}var R=H.forwardRef(A);R.displayName="Item";var Ne=R,mt=x(6089),gt=x(4676),Qe=x(16089);function Ie(F){if(typeof MessageChannel=="undefined")(0,Qe.Z)(F);else{var be=new MessageChannel;be.port1.onmessage=function(){return F()},be.port2.postMessage(void 0)}}function Ft(){var F=H.useRef(null),be=function(X){F.current||(F.current=[],Ie(function(){(0,gt.unstable_batchedUpdates)(function(){F.current.forEach(function(Oe){Oe()}),F.current=null})})),F.current.push(X)};return be}function Me(F,be){var pe=H.useState(be),X=(0,ye.Z)(pe,2),Oe=X[0],Le=X[1],Be=(0,mt.Z)(function(se){F(function(){Le(se)})});return[Oe,Be]}var we=H.createContext(null),O=["component"],z=["className"],Q=["className"],ne=function(be,pe){var X=H.useContext(we);if(!X){var Oe=be.component,Le=Oe===void 0?"div":Oe,Be=(0,me.Z)(be,O);return H.createElement(Le,(0,D.Z)({},Be,{ref:pe}))}var se=X.className,at=(0,me.Z)(X,z),ut=be.className,Nt=(0,me.Z)(be,Q);return H.createElement(we.Provider,{value:null},H.createElement(Ne,(0,D.Z)({ref:pe,className:he()(se,ut)},at,Nt)))},We=H.forwardRef(ne);We.displayName="RawItem";var fe=We,st=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],lt="responsive",ge="invalidate";function ve(F){return"+ ".concat(F.length," ...")}function et(F,be){var pe=F.prefixCls,X=pe===void 0?"rc-overflow":pe,Oe=F.data,Le=Oe===void 0?[]:Oe,Be=F.renderItem,se=F.renderRawItem,at=F.itemKey,ut=F.itemWidth,Nt=ut===void 0?10:ut,Wt=F.ssr,Ct=F.style,er=F.className,zt=F.maxCount,nr=F.renderRest,Lt=F.renderRawRest,ae=F.suffix,Z=F.component,K=Z===void 0?"div":Z,ce=F.itemComponent,ue=F.onVisibleChange,Fe=(0,me.Z)(F,st),ee=Wt==="full",ie=Ft(),rt=Me(ie,null),Ye=(0,ye.Z)(rt,2),nt=Ye[0],Bt=Ye[1],St=nt||0,W=Me(ie,new Map),_t=(0,ye.Z)(W,2),bt=_t[0],N=_t[1],J=Me(ie,0),le=(0,ye.Z)(J,2),ot=le[0],Te=le[1],Ce=Me(ie,0),ir=(0,ye.Z)(Ce,2),Ht=ir[0],qt=ir[1],Gt=Me(ie,0),tr=(0,ye.Z)(Gt,2),Mt=tr[0],Mr=tr[1],pr=(0,H.useState)(null),Vr=(0,ye.Z)(pr,2),Cr=Vr[0],fr=Vr[1],on=(0,H.useState)(null),Vt=(0,ye.Z)(on,2),rn=Vt[0],nn=Vt[1],qr=H.useMemo(function(){return rn===null&&ee?Number.MAX_SAFE_INTEGER:rn||0},[rn,nt]),Xr=(0,H.useState)(!1),Sr=(0,ye.Z)(Xr,2),Jr=Sr[0],Fr=Sr[1],Xn="".concat(X,"-item"),In=Math.max(ot,Ht),yn=zt===lt,dn=Le.length&&yn,C=zt===ge,I=dn||typeof zt=="number"&&Le.length>zt,Ae=(0,H.useMemo)(function(){var Rt=Le;return dn?nt===null&&ee?Rt=Le:Rt=Le.slice(0,Math.min(Le.length,St/Nt)):typeof zt=="number"&&(Rt=Le.slice(0,zt)),Rt},[Le,Nt,nt,zt,dn]),Pe=(0,H.useMemo)(function(){return dn?Le.slice(qr+1):Le.slice(Ae.length)},[Le,Ae,dn,qr]),ze=(0,H.useCallback)(function(Rt,j){var V;return typeof at=="function"?at(Rt):(V=at&&(Rt==null?void 0:Rt[at]))!==null&&V!==void 0?V:j},[at]),Ke=(0,H.useCallback)(Be||function(Rt){return Rt},[Be]);function ht(Rt,j,V){rn===Rt&&(j===void 0||j===Cr)||(nn(Rt),V||(Fr(Rt<Le.length-1),ue==null||ue(Rt)),j!==void 0&&fr(j))}function ct(Rt,j){Bt(j.clientWidth)}function Et(Rt,j){N(function(V){var de=new Map(V);return j===null?de.delete(Rt):de.set(Rt,j),de})}function ar(Rt,j){qt(j),Te(Ht)}function jt(Rt,j){Mr(j)}function Pt(Rt){return bt.get(ze(Ae[Rt],Rt))}(0,_.Z)(function(){if(St&&typeof In=="number"&&Ae){var Rt=Mt,j=Ae.length,V=j-1;if(!j){ht(0,null);return}for(var de=0;de<j;de+=1){var Ee=Pt(de);if(ee&&(Ee=Ee||0),Ee===void 0){ht(de-1,void 0,!0);break}if(Rt+=Ee,V===0&&Rt<=St||de===V-1&&Rt+Pt(V)<=St){ht(V,null);break}else if(Rt+In>St){ht(de-1,Rt-Ee-Mt+Ht);break}}ae&&Pt(0)+Mt>St&&fr(null)}},[St,bt,Ht,Mt,ze,Ae]);var $t=Jr&&!!Pe.length,Xt={};Cr!==null&&dn&&(Xt={position:"absolute",left:Cr,top:0});var xe={prefixCls:Xn,responsive:dn,component:ce,invalidate:C},zr=se?function(Rt,j){var V=ze(Rt,j);return H.createElement(we.Provider,{key:V,value:(0,G.Z)((0,G.Z)({},xe),{},{order:j,item:Rt,itemKey:V,registerSize:Et,display:j<=qr})},se(Rt,j))}:function(Rt,j){var V=ze(Rt,j);return H.createElement(Ne,(0,D.Z)({},xe,{order:j,key:V,item:Rt,renderItem:Ke,itemKey:V,registerSize:Et,display:j<=qr}))},Br={order:$t?qr:Number.MAX_SAFE_INTEGER,className:"".concat(Xn,"-rest"),registerSize:ar,display:$t},hr=nr||ve,Ur=Lt?H.createElement(we.Provider,{value:(0,G.Z)((0,G.Z)({},xe),Br)},Lt(Pe)):H.createElement(Ne,(0,D.Z)({},xe,Br),typeof hr=="function"?hr(Pe):hr),mr=H.createElement(K,(0,D.Z)({className:he()(!C&&X,er),style:Ct,ref:be},Fe),Ae.map(zr),I?Ur:null,ae&&H.createElement(Ne,(0,D.Z)({},xe,{responsive:yn,responsiveDisabled:!dn,order:qr,className:"".concat(Xn,"-suffix"),registerSize:jt,display:!0,style:Xt}),ae));return yn?H.createElement(S.Z,{onResize:ct,disabled:!dn},mr):mr}var U=H.forwardRef(et);U.displayName="Overflow",U.Item=fe,U.RESPONSIVE=lt,U.INVALIDATE=ge;var Re=U,Je=Re},11414:function(wr,xt,x){"use strict";x.d(xt,{Z5:function(){return L0},_l:function(){return jr},bK:function(){return cn}});var D=x(59301),G=x(18773);function ye(o,l){o.prototype=Object.create(l.prototype),o.prototype.constructor=o,(0,G.Z)(o,l)}var me=x(54476),H=x(59781),Y=D.createContext(null),he=null;function S(o){o()}var _=S,Ge=function(l){return _=l},Ze=function(){return _};function A(){var o=Ze(),l=null,c=null;return{clear:function(){l=null,c=null},notify:function(){o(function(){for(var m=l;m;)m.callback(),m=m.next})},get:function(){for(var m=[],g=l;g;)m.push(g),g=g.next;return m},subscribe:function(m){var g=!0,v=c={callback:m,next:null,prev:c};return v.prev?v.prev.next=v:l=v,function(){!g||l===null||(g=!1,v.next?v.next.prev=v.prev:c=v.prev,v.prev?v.prev.next=v.next:l=v.next)}}}}var R={notify:function(){},get:function(){return[]}};function Ne(o,l){var c,f=R;function m(E){return k(),f.subscribe(E)}function g(){f.notify()}function v(){w.onStateChange&&w.onStateChange()}function b(){return!!c}function k(){c||(c=l?l.addNestedSub(v):o.subscribe(v),f=A())}function T(){c&&(c(),c=void 0,f.clear(),f=R)}var w={addNestedSub:m,notifyNestedSubs:g,handleChangeWrapper:v,isSubscribed:b,trySubscribe:k,tryUnsubscribe:T,getListeners:function(){return f}};return w}var mt=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?D.useLayoutEffect:D.useEffect;function gt(o){var l=o.store,c=o.context,f=o.children,m=(0,D.useMemo)(function(){var b=Ne(l);return{store:l,subscription:b}},[l]),g=(0,D.useMemo)(function(){return l.getState()},[l]);mt(function(){var b=m.subscription;return b.onStateChange=b.notifyNestedSubs,b.trySubscribe(),g!==l.getState()&&b.notifyNestedSubs(),function(){b.tryUnsubscribe(),b.onStateChange=null}},[m,g]);var v=c||Y;return D.createElement(v.Provider,{value:m},f)}var Qe=gt,Ie=x(85377),Ft=x(94266),Me=x.n(Ft),we=x(53410),O=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],z=["reactReduxForwardedRef"],Q=[],ne=[null,null],We=function(l){try{return JSON.stringify(l)}catch(c){return String(l)}};function fe(o,l){var c=o[1];return[l.payload,c+1]}function st(o,l,c){mt(function(){return o.apply(void 0,l)},c)}function lt(o,l,c,f,m,g,v){o.current=f,l.current=m,c.current=!1,g.current&&(g.current=null,v())}function ge(o,l,c,f,m,g,v,b,k,T){if(o){var w=!1,E=null,L=function(){if(!w){var He=l.getState(),qe,tt;try{qe=f(He,m.current)}catch(pt){tt=pt,E=pt}tt||(E=null),qe===g.current?v.current||k():(g.current=qe,b.current=qe,v.current=!0,T({type:"STORE_UPDATED",payload:{error:tt}}))}};c.onStateChange=L,c.trySubscribe(),L();var P=function(){if(w=!0,c.tryUnsubscribe(),c.onStateChange=null,E)throw E};return P}}var ve=function(){return[null,0]};function et(o,l){l===void 0&&(l={});var c=l,f=c.getDisplayName,m=f===void 0?function(Tt){return"ConnectAdvanced("+Tt+")"}:f,g=c.methodName,v=g===void 0?"connectAdvanced":g,b=c.renderCountProp,k=b===void 0?void 0:b,T=c.shouldHandleStateChanges,w=T===void 0?!0:T,E=c.storeKey,L=E===void 0?"store":E,P=c.withRef,te=P===void 0?!1:P,He=c.forwardRef,qe=He===void 0?!1:He,tt=c.context,pt=tt===void 0?Y:tt,kt=(0,Ie.Z)(c,O);if(0)var It;var cr=pt;return function(br){var mn=br.displayName||br.name||"Component",yr=m(mn),Hr=(0,me.Z)({},kt,{getDisplayName:m,methodName:v,renderCountProp:k,shouldHandleStateChanges:w,storeKey:L,displayName:yr,wrappedComponentName:mn,WrappedComponent:br}),jn=kt.pure;function Bn(ei){return o(ei.dispatch,Hr)}var xi=jn?D.useMemo:function(ei){return ei()};function Wi(ei){var to=(0,D.useMemo)(function(){var As=ei.reactReduxForwardedRef,Ls=(0,Ie.Z)(ei,z);return[ei.context,As,Ls]},[ei]),ma=to[0],Pa=to[1],Qi=to[2],ga=(0,D.useMemo)(function(){return ma&&ma.Consumer&&(0,we.isContextConsumer)(D.createElement(ma.Consumer,null))?ma:cr},[ma,cr]),li=(0,D.useContext)(ga),wi=!!ei.store&&!!ei.store.getState&&!!ei.store.dispatch,Bl=!!li&&!!li.store,ea=wi?ei.store:li.store,To=(0,D.useMemo)(function(){return Bn(ea)},[ea]),ks=(0,D.useMemo)(function(){if(!w)return ne;var As=Ne(ea,wi?null:li.subscription),Ls=As.notifyNestedSubs.bind(As);return[As,Ls]},[ea,wi,li]),Jo=ks[0],Il=ks[1],$l=(0,D.useMemo)(function(){return wi?li:(0,me.Z)({},li,{subscription:Jo})},[wi,li,Jo]),Dd=(0,D.useReducer)(fe,Q,ve),J0=Dd[0],Ds=J0[0],Y0=Dd[1];if(Ds&&Ds.error)throw Ds.error;var Ad=(0,D.useRef)(),Nc=(0,D.useRef)(Qi),Tl=(0,D.useRef)(),Ld=(0,D.useRef)(!1),Pl=xi(function(){return Tl.current&&Qi===Nc.current?Tl.current:To(ea.getState(),Qi)},[ea,Ds,Qi]);st(lt,[Nc,Ad,Ld,Qi,Pl,Tl,Il]),st(ge,[w,ea,Jo,To,Nc,Ad,Ld,Tl,Il,Y0],[ea,Jo,To]);var Fc=(0,D.useMemo)(function(){return D.createElement(br,(0,me.Z)({},Pl,{ref:Pa}))},[Pa,br,Pl]),Q0=(0,D.useMemo)(function(){return w?D.createElement(ga.Provider,{value:$l},Fc):Fc},[ga,Fc,$l]);return Q0}var Bi=jn?D.memo(Wi):Wi;if(Bi.WrappedComponent=br,Bi.displayName=Wi.displayName=yr,qe){var Ii=D.forwardRef(function(to,ma){return D.createElement(Bi,(0,me.Z)({},to,{reactReduxForwardedRef:ma}))});return Ii.displayName=yr,Ii.WrappedComponent=br,Me()(Ii,br)}return Me()(Bi,br)}}function U(o,l){return o===l?o!==0||l!==0||1/o===1/l:o!==o&&l!==l}function Re(o,l){if(U(o,l))return!0;if(typeof o!="object"||o===null||typeof l!="object"||l===null)return!1;var c=Object.keys(o),f=Object.keys(l);if(c.length!==f.length)return!1;for(var m=0;m<c.length;m++)if(!Object.prototype.hasOwnProperty.call(l,c[m])||!U(o[c[m]],l[c[m]]))return!1;return!0}function Je(o,l){var c={},f=function(v){var b=o[v];typeof b=="function"&&(c[v]=function(){return l(b.apply(void 0,arguments))})};for(var m in o)f(m);return c}function F(o){return function(c,f){var m=o(c,f);function g(){return m}return g.dependsOnOwnProps=!1,g}}function be(o){return o.dependsOnOwnProps!==null&&o.dependsOnOwnProps!==void 0?!!o.dependsOnOwnProps:o.length!==1}function pe(o,l){return function(f,m){var g=m.displayName,v=function(k,T){return v.dependsOnOwnProps?v.mapToProps(k,T):v.mapToProps(k)};return v.dependsOnOwnProps=!0,v.mapToProps=function(k,T){v.mapToProps=o,v.dependsOnOwnProps=be(o);var w=v(k,T);return typeof w=="function"&&(v.mapToProps=w,v.dependsOnOwnProps=be(w),w=v(k,T)),w},v}}function X(o){return typeof o=="function"?pe(o,"mapDispatchToProps"):void 0}function Oe(o){return o?void 0:F(function(l){return{dispatch:l}})}function Le(o){return o&&typeof o=="object"?F(function(l){return Je(o,l)}):void 0}var Be=[X,Oe,Le];function se(o){return typeof o=="function"?pe(o,"mapStateToProps"):void 0}function at(o){return o?void 0:F(function(){return{}})}var ut=[se,at];function Nt(o,l,c){return(0,me.Z)({},c,o,l)}function Wt(o){return function(c,f){var m=f.displayName,g=f.pure,v=f.areMergedPropsEqual,b=!1,k;return function(w,E,L){var P=o(w,E,L);return b?(!g||!v(P,k))&&(k=P):(b=!0,k=P),k}}}function Ct(o){return typeof o=="function"?Wt(o):void 0}function er(o){return o?void 0:function(){return Nt}}var zt=[Ct,er],nr=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function Lt(o,l,c,f){return function(g,v){return c(o(g,v),l(f,v),v)}}function ae(o,l,c,f,m){var g=m.areStatesEqual,v=m.areOwnPropsEqual,b=m.areStatePropsEqual,k=!1,T,w,E,L,P;function te(kt,It){return T=kt,w=It,E=o(T,w),L=l(f,w),P=c(E,L,w),k=!0,P}function He(){return E=o(T,w),l.dependsOnOwnProps&&(L=l(f,w)),P=c(E,L,w),P}function qe(){return o.dependsOnOwnProps&&(E=o(T,w)),l.dependsOnOwnProps&&(L=l(f,w)),P=c(E,L,w),P}function tt(){var kt=o(T,w),It=!b(kt,E);return E=kt,It&&(P=c(E,L,w)),P}function pt(kt,It){var cr=!v(It,w),Tt=!g(kt,T,It,w);return T=kt,w=It,cr&&Tt?He():cr?qe():Tt?tt():P}return function(It,cr){return k?pt(It,cr):te(It,cr)}}function Z(o,l){var c=l.initMapStateToProps,f=l.initMapDispatchToProps,m=l.initMergeProps,g=(0,Ie.Z)(l,nr),v=c(o,g),b=f(o,g),k=m(o,g),T=g.pure?ae:Lt;return T(v,b,k,o,g)}var K=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function ce(o,l,c){for(var f=l.length-1;f>=0;f--){var m=l[f](o);if(m)return m}return function(g,v){throw new Error("Invalid value of type "+typeof o+" for "+c+" argument when connecting component "+v.wrappedComponentName+".")}}function ue(o,l){return o===l}function Fe(o){var l=o===void 0?{}:o,c=l.connectHOC,f=c===void 0?et:c,m=l.mapStateToPropsFactories,g=m===void 0?ut:m,v=l.mapDispatchToPropsFactories,b=v===void 0?Be:v,k=l.mergePropsFactories,T=k===void 0?zt:k,w=l.selectorFactory,E=w===void 0?Z:w;return function(P,te,He,qe){qe===void 0&&(qe={});var tt=qe,pt=tt.pure,kt=pt===void 0?!0:pt,It=tt.areStatesEqual,cr=It===void 0?ue:It,Tt=tt.areOwnPropsEqual,br=Tt===void 0?Re:Tt,mn=tt.areStatePropsEqual,yr=mn===void 0?Re:mn,Hr=tt.areMergedPropsEqual,jn=Hr===void 0?Re:Hr,Bn=(0,Ie.Z)(tt,K),xi=ce(P,g,"mapStateToProps"),Wi=ce(te,b,"mapDispatchToProps"),Bi=ce(He,T,"mergeProps");return f(E,(0,me.Z)({methodName:"connect",getDisplayName:function(ei){return"Connect("+ei+")"},shouldHandleStateChanges:!!P,initMapStateToProps:xi,initMapDispatchToProps:Wi,initMergeProps:Bi,pure:kt,areStatesEqual:cr,areOwnPropsEqual:br,areStatePropsEqual:yr,areMergedPropsEqual:jn},Bn))}}var ee=Fe();function ie(){var o=useContext(ReactReduxContext);return o}function rt(o){o===void 0&&(o=ReactReduxContext);var l=o===ReactReduxContext?useDefaultReduxContext:function(){return useContext(o)};return function(){var f=l(),m=f.store;return m}}var Ye=null;function nt(o){o===void 0&&(o=ReactReduxContext);var l=o===ReactReduxContext?useDefaultStore:createStoreHook(o);return function(){var f=l();return f.dispatch}}var Bt=null,St=function(l,c){return l===c};function W(o,l,c,f){var m=useReducer(function(te){return te+1},0),g=m[1],v=useMemo(function(){return createSubscription(c,f)},[c,f]),b=useRef(),k=useRef(),T=useRef(),w=useRef(),E=c.getState(),L;try{if(o!==k.current||E!==T.current||b.current){var P=o(E);w.current===void 0||!l(P,w.current)?L=P:L=w.current}else L=w.current}catch(te){throw b.current&&(te.message+=`
The error may be correlated with this previous error:
`+b.current.stack+`
`),te}return useIsomorphicLayoutEffect(function(){k.current=o,T.current=E,w.current=L,b.current=void 0}),useIsomorphicLayoutEffect(function(){function te(){try{var He=c.getState();if(He===T.current)return;var qe=k.current(He);if(l(qe,w.current))return;w.current=qe,T.current=He}catch(tt){b.current=tt}g()}return v.onStateChange=te,v.trySubscribe(),te(),function(){return v.tryUnsubscribe()}},[c,v]),L}function _t(o){o===void 0&&(o=ReactReduxContext);var l=o===ReactReduxContext?useDefaultReduxContext:function(){return useContext(o)};return function(f,m){m===void 0&&(m=St);var g=l(),v=g.store,b=g.subscription,k=W(f,m,v,b);return useDebugValue(k),k}}var bt=null,N=x(4676);Ge(N.unstable_batchedUpdates);function J(o,l){if(o.length!==l.length)return!1;for(var c=0;c<o.length;c++)if(o[c]!==l[c])return!1;return!0}function le(o,l){var c=(0,D.useState)(function(){return{inputs:l,result:o()}})[0],f=(0,D.useRef)(!0),m=(0,D.useRef)(c),g=f.current||!!(l&&m.current.inputs&&J(l,m.current.inputs)),v=g?m.current:{inputs:l,result:o()};return(0,D.useEffect)(function(){f.current=!1,m.current=v},[v]),v.result}function ot(o,l){return le(function(){return o},l)}var Te=le,Ce=ot,ir=!0,Ht="Invariant failed";function qt(o,l){if(!o){if(ir)throw new Error(Ht);var c=typeof l=="function"?l():l,f=c?"".concat(Ht,": ").concat(c):Ht;throw new Error(f)}}var Gt=function(l){var c=l.top,f=l.right,m=l.bottom,g=l.left,v=f-g,b=m-c,k={top:c,right:f,bottom:m,left:g,width:v,height:b,x:g,y:c,center:{x:(f+g)/2,y:(m+c)/2}};return k},tr=function(l,c){return{top:l.top-c.top,left:l.left-c.left,bottom:l.bottom+c.bottom,right:l.right+c.right}},Mt=function(l,c){return{top:l.top+c.top,left:l.left+c.left,bottom:l.bottom-c.bottom,right:l.right-c.right}},Mr=function(l,c){return{top:l.top+c.y,left:l.left+c.x,bottom:l.bottom+c.y,right:l.right+c.x}},pr={top:0,right:0,bottom:0,left:0},Vr=function(l){var c=l.borderBox,f=l.margin,m=f===void 0?pr:f,g=l.border,v=g===void 0?pr:g,b=l.padding,k=b===void 0?pr:b,T=Gt(tr(c,m)),w=Gt(Mt(c,v)),E=Gt(Mt(w,k));return{marginBox:T,borderBox:Gt(c),paddingBox:w,contentBox:E,margin:m,border:v,padding:k}},Cr=function(l){var c=l.slice(0,-2),f=l.slice(-2);if(f!=="px")return 0;var m=Number(c);return isNaN(m)&&qt(!1),m},fr=function(){return{x:window.pageXOffset,y:window.pageYOffset}},on=function(l,c){var f=l.borderBox,m=l.border,g=l.margin,v=l.padding,b=Mr(f,c);return Vr({borderBox:b,border:m,margin:g,padding:v})},Vt=function(l,c){return c===void 0&&(c=fr()),on(l,c)},rn=function(l,c){var f={top:Cr(c.marginTop),right:Cr(c.marginRight),bottom:Cr(c.marginBottom),left:Cr(c.marginLeft)},m={top:Cr(c.paddingTop),right:Cr(c.paddingRight),bottom:Cr(c.paddingBottom),left:Cr(c.paddingLeft)},g={top:Cr(c.borderTopWidth),right:Cr(c.borderRightWidth),bottom:Cr(c.borderBottomWidth),left:Cr(c.borderLeftWidth)};return Vr({borderBox:l,margin:f,padding:m,border:g})},nn=function(l){var c=l.getBoundingClientRect(),f=window.getComputedStyle(l);return rn(c,f)},qr=Number.isNaN||function(l){return typeof l=="number"&&l!==l};function Xr(o,l){return!!(o===l||qr(o)&&qr(l))}function Sr(o,l){if(o.length!==l.length)return!1;for(var c=0;c<o.length;c++)if(!Xr(o[c],l[c]))return!1;return!0}function Jr(o,l){l===void 0&&(l=Sr);var c,f=[],m,g=!1;function v(){for(var b=[],k=0;k<arguments.length;k++)b[k]=arguments[k];return g&&c===this&&l(b,f)||(m=o.apply(this,b),g=!0,c=this,f=b),m}return v}var Fr=Jr,Xn=function(l){var c=[],f=null,m=function(){for(var v=arguments.length,b=new Array(v),k=0;k<v;k++)b[k]=arguments[k];c=b,!f&&(f=requestAnimationFrame(function(){f=null,l.apply(void 0,c)}))};return m.cancel=function(){f&&(cancelAnimationFrame(f),f=null)},m},In=Xn,yn=!0,dn=/[ \t]{2,}/g,C=/^[ \t]*/gm,I=function(l){return l.replace(dn," ").replace(C,"").trim()},Ae=function(l){return I(`
%creact-beautiful-dnd
%c`+I(l)+`
%c\u{1F477}\u200D This is a development only message. It will be removed in production builds.
`)},Pe=function(l){return[Ae(l),"color: #00C584; font-size: 1.2em; font-weight: bold;","line-height: 1.5","color: #723874;"]},ze="__react-beautiful-dnd-disable-dev-warnings";function Ke(o,l){var c;yn||typeof window!="undefined"&&window[ze]||(c=console)[o].apply(c,Pe(l))}var ht=Ke.bind(null,"warn"),ct=Ke.bind(null,"error");function Et(){}function ar(o,l){return(0,me.Z)({},o,{},l)}function jt(o,l,c){var f=l.map(function(m){var g=ar(c,m.options);return o.addEventListener(m.eventName,m.fn,g),function(){o.removeEventListener(m.eventName,m.fn,g)}});return function(){f.forEach(function(g){g()})}}var Pt=!0,$t="Invariant failed";function Xt(o){this.message=o}Xt.prototype.toString=function(){return this.message};function xe(o,l){if(!o)throw Pt?new Xt($t):new Xt($t+": "+(l||""))}var zr=function(o){ye(l,o);function l(){for(var f,m=arguments.length,g=new Array(m),v=0;v<m;v++)g[v]=arguments[v];return f=o.call.apply(o,[this].concat(g))||this,f.callbacks=null,f.unbind=Et,f.onWindowError=function(b){var k=f.getCallbacks();k.isDragging()&&k.tryAbort();var T=b.error;T instanceof Xt&&b.preventDefault()},f.getCallbacks=function(){if(!f.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return f.callbacks},f.setCallbacks=function(b){f.callbacks=b},f}var c=l.prototype;return c.componentDidMount=function(){this.unbind=jt(window,[{eventName:"error",fn:this.onWindowError}])},c.componentWillUnmount=function(){this.unbind()},c.componentDidCatch=function(m){if(m instanceof Xt){this.setState({});return}throw m},c.render=function(){return this.props.children(this.setCallbacks)},l}(D.Component),Br=`
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
`,hr=function(l){return l+1},Ur=function(l){return`
You have lifted an item in position `+hr(l.source.index)+`
`},mr=function(l,c){var f=l.droppableId===c.droppableId,m=hr(l.index),g=hr(c.index);return f?`
You have moved the item from position `+m+`
to position `+g+`
`:`
You have moved the item from position `+m+`
in list `+l.droppableId+`
to list `+c.droppableId+`
in position `+g+`
`},Rt=function(l,c,f){var m=c.droppableId===f.droppableId;return m?`
The item `+l+`
has been combined with `+f.draggableId:`
The item `+l+`
in list `+c.droppableId+`
has been combined with `+f.draggableId+`
in list `+f.droppableId+`
`},j=function(l){var c=l.destination;if(c)return mr(l.source,c);var f=l.combine;return f?Rt(l.draggableId,l.source,f):"You are over an area that cannot be dropped on"},V=function(l){return`
The item has returned to its starting position
of `+hr(l.index)+`
`},de=function(l){if(l.reason==="CANCEL")return`
Movement cancelled.
`+V(l.source)+`
`;var c=l.destination,f=l.combine;return c?`
You have dropped the item.
`+mr(l.source,c)+`
`:f?`
You have dropped the item.
`+Rt(l.draggableId,l.source,f)+`
`:`
The item has been dropped while not over a drop area.
`+V(l.source)+`
`},Ee={dragHandleUsageInstructions:Br,onDragStart:Ur,onDragUpdate:j,onDragEnd:de},q={x:0,y:0},ke=function(l,c){return{x:l.x+c.x,y:l.y+c.y}},_e=function(l,c){return{x:l.x-c.x,y:l.y-c.y}},je=function(l,c){return l.x===c.x&&l.y===c.y},vt=function(l){return{x:l.x!==0?-l.x:0,y:l.y!==0?-l.y:0}},dt=function(l,c,f){var m;return f===void 0&&(f=0),m={},m[l]=c,m[l==="x"?"y":"x"]=f,m},Zt=function(l,c){return Math.sqrt(Math.pow(c.x-l.x,2)+Math.pow(c.y-l.y,2))},lr=function(l,c){return Math.min.apply(Math,c.map(function(f){return Zt(l,f)}))},gr=function(l){return function(c){return{x:l(c.x),y:l(c.y)}}},vr=function(o,l){var c=Gt({top:Math.max(l.top,o.top),right:Math.min(l.right,o.right),bottom:Math.min(l.bottom,o.bottom),left:Math.max(l.left,o.left)});return c.width<=0||c.height<=0?null:c},rr=function(l,c){return{top:l.top+c.y,left:l.left+c.x,bottom:l.bottom+c.y,right:l.right+c.x}},Ir=function(l){return[{x:l.left,y:l.top},{x:l.right,y:l.top},{x:l.left,y:l.bottom},{x:l.right,y:l.bottom}]},Tr={top:0,right:0,bottom:0,left:0},Jt=function(l,c){return c?rr(l,c.scroll.diff.displacement):l},Yt=function(l,c,f){if(f&&f.increasedBy){var m;return(0,me.Z)({},l,(m={},m[c.end]=l[c.end]+f.increasedBy[c.line],m))}return l},or=function(l,c){return c&&c.shouldClipSubject?vr(c.pageMarginBox,l):Gt(l)},Ut=function(o){var l=o.page,c=o.withPlaceholder,f=o.axis,m=o.frame,g=Jt(l.marginBox,m),v=Yt(g,f,c),b=or(v,m);return{page:l,withPlaceholder:c,active:b}},Qt=function(o,l){o.frame||xe(!1);var c=o.frame,f=_e(l,c.scroll.initial),m=vt(f),g=(0,me.Z)({},c,{scroll:{initial:c.scroll.initial,current:l,diff:{value:f,displacement:m},max:c.scroll.max}}),v=Ut({page:o.subject.page,withPlaceholder:o.subject.withPlaceholder,axis:o.axis,frame:g}),b=(0,me.Z)({},o,{frame:g,subject:v});return b};function dr(o){return Number.isInteger?Number.isInteger(o):typeof o=="number"&&isFinite(o)&&Math.floor(o)===o}function $r(o){return Object.values?Object.values(o):Object.keys(o).map(function(l){return o[l]})}function Dr(o,l){if(o.findIndex)return o.findIndex(l);for(var c=0;c<o.length;c++)if(l(o[c]))return c;return-1}function At(o,l){if(o.find)return o.find(l);var c=Dr(o,l);if(c!==-1)return o[c]}function ft(o){return Array.prototype.slice.call(o)}var sr=Fr(function(o){return o.reduce(function(l,c){return l[c.descriptor.id]=c,l},{})}),Kt=Fr(function(o){return o.reduce(function(l,c){return l[c.descriptor.id]=c,l},{})}),xr=Fr(function(o){return $r(o)}),fn=Fr(function(o){return $r(o)}),ur=Fr(function(o,l){var c=fn(l).filter(function(f){return o===f.descriptor.droppableId}).sort(function(f,m){return f.descriptor.index-m.descriptor.index});return c});function an(o){return o.at&&o.at.type==="REORDER"?o.at.destination:null}function Pr(o){return o.at&&o.at.type==="COMBINE"?o.at.combine:null}var Tn=Fr(function(o,l){return l.filter(function(c){return c.descriptor.id!==o.descriptor.id})}),ri=function(o){var l=o.isMovingForward,c=o.draggable,f=o.destination,m=o.insideDestination,g=o.previousImpact;if(!f.isCombineEnabled)return null;var v=an(g);if(!v)return null;function b(He){var qe={type:"COMBINE",combine:{draggableId:He,droppableId:f.descriptor.id}};return(0,me.Z)({},g,{at:qe})}var k=g.displaced.all,T=k.length?k[0]:null;if(l)return T?b(T):null;var w=Tn(c,m);if(!T){if(!w.length)return null;var E=w[w.length-1];return b(E.descriptor.id)}var L=Dr(w,function(He){return He.descriptor.id===T});L===-1&&xe(!1);var P=L-1;if(P<0)return null;var te=w[P];return b(te.descriptor.id)},gn=function(o,l){return o.descriptor.droppableId===l.descriptor.id},Jn={point:q,value:0},kn={invisible:{},visible:{},all:[]},ni={displaced:kn,displacedBy:Jn,at:null},vn=function(o,l){return function(c){return o<=c&&c<=l}},mi=function(o){var l=vn(o.top,o.bottom),c=vn(o.left,o.right);return function(f){var m=l(f.top)&&l(f.bottom)&&c(f.left)&&c(f.right);if(m)return!0;var g=l(f.top)||l(f.bottom),v=c(f.left)||c(f.right),b=g&&v;if(b)return!0;var k=f.top<o.top&&f.bottom>o.bottom,T=f.left<o.left&&f.right>o.right,w=k&&T;if(w)return!0;var E=k&&v||T&&g;return E}},Rr=function(o){var l=vn(o.top,o.bottom),c=vn(o.left,o.right);return function(f){var m=l(f.top)&&l(f.bottom)&&c(f.left)&&c(f.right);return m}},Pn={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},_n={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},zn=function(o){return function(l){var c=vn(l.top,l.bottom),f=vn(l.left,l.right);return function(m){return o===Pn?c(m.top)&&c(m.bottom):f(m.left)&&f(m.right)}}},gi=function(l,c){var f=c.frame?c.frame.scroll.diff.displacement:q;return rr(l,f)},Mn=function(l,c,f){return c.subject.active?f(c.subject.active)(l):!1},ci=function(l,c,f){return f(c)(l)},Yn=function(l){var c=l.target,f=l.destination,m=l.viewport,g=l.withDroppableDisplacement,v=l.isVisibleThroughFrameFn,b=g?gi(c,f):c;return Mn(b,f,v)&&ci(b,m,v)},Pi=function(l){return Yn((0,me.Z)({},l,{isVisibleThroughFrameFn:mi}))},Kn=function(l){return Yn((0,me.Z)({},l,{isVisibleThroughFrameFn:Rr}))},vi=function(l){return Yn((0,me.Z)({},l,{isVisibleThroughFrameFn:zn(l.destination.axis)}))},Zi=function(l,c,f){if(typeof f=="boolean")return f;if(!c)return!0;var m=c.invisible,g=c.visible;if(m[l])return!1;var v=g[l];return v?v.shouldAnimate:!0};function _i(o,l){var c=o.page.marginBox,f={top:l.point.y,right:0,bottom:0,left:l.point.x};return Gt(tr(c,f))}function Mi(o){var l=o.afterDragging,c=o.destination,f=o.displacedBy,m=o.viewport,g=o.forceShouldAnimate,v=o.last;return l.reduce(function(k,T){var w=_i(T,f),E=T.descriptor.id;k.all.push(E);var L=Pi({target:w,destination:c,viewport:m,withDroppableDisplacement:!0});if(!L)return k.invisible[T.descriptor.id]=!0,k;var P=Zi(E,v,g),te={draggableId:E,shouldAnimate:P};return k.visible[E]=te,k},{all:[],visible:{},invisible:{}})}function ji(o,l){if(!o.length)return 0;var c=o[o.length-1].descriptor.index;return l.inHomeList?c:c+1}function Ri(o){var l=o.insideDestination,c=o.inHomeList,f=o.displacedBy,m=o.destination,g=ji(l,{inHomeList:c});return{displaced:kn,displacedBy:f,at:{type:"REORDER",destination:{droppableId:m.descriptor.id,index:g}}}}function ui(o){var l=o.draggable,c=o.insideDestination,f=o.destination,m=o.viewport,g=o.displacedBy,v=o.last,b=o.index,k=o.forceShouldAnimate,T=gn(l,f);if(b==null)return Ri({insideDestination:c,inHomeList:T,displacedBy:g,destination:f});var w=At(c,function(He){return He.descriptor.index===b});if(!w)return Ri({insideDestination:c,inHomeList:T,displacedBy:g,destination:f});var E=Tn(l,c),L=c.indexOf(w),P=E.slice(L),te=Mi({afterDragging:P,destination:f,displacedBy:g,last:v,viewport:m.frame,forceShouldAnimate:k});return{displaced:te,displacedBy:g,at:{type:"REORDER",destination:{droppableId:f.descriptor.id,index:b}}}}function hn(o,l){return!!l.effected[o]}var xa=function(o){var l=o.isMovingForward,c=o.destination,f=o.draggables,m=o.combine,g=o.afterCritical;if(!c.isCombineEnabled)return null;var v=m.draggableId,b=f[v],k=b.descriptor.index,T=hn(v,g);return T?l?k:k-1:l?k+1:k},Ci=function(o){var l=o.isMovingForward,c=o.isInHomeList,f=o.insideDestination,m=o.location;if(!f.length)return null;var g=m.index,v=l?g+1:g-1,b=f[0].descriptor.index,k=f[f.length-1].descriptor.index,T=c?k:k+1;return v<b||v>T?null:v},Oi=function(o){var l=o.isMovingForward,c=o.isInHomeList,f=o.draggable,m=o.draggables,g=o.destination,v=o.insideDestination,b=o.previousImpact,k=o.viewport,T=o.afterCritical,w=b.at;if(w||xe(!1),w.type==="REORDER"){var E=Ci({isMovingForward:l,isInHomeList:c,location:w.destination,insideDestination:v});return E==null?null:ui({draggable:f,insideDestination:v,destination:g,viewport:k,last:b.displaced,displacedBy:b.displacedBy,index:E})}var L=xa({isMovingForward:l,destination:g,displaced:b.displaced,draggables:m,combine:w.combine,afterCritical:T});return L==null?null:ui({draggable:f,insideDestination:v,destination:g,viewport:k,last:b.displaced,displacedBy:b.displacedBy,index:L})},bi=function(o){var l=o.displaced,c=o.afterCritical,f=o.combineWith,m=o.displacedBy,g=!!(l.visible[f]||l.invisible[f]);return hn(f,c)?g?q:vt(m.point):g?m.point:q},Ui=function(o){var l=o.afterCritical,c=o.impact,f=o.draggables,m=Pr(c);m||xe(!1);var g=m.draggableId,v=f[g].page.borderBox.center,b=bi({displaced:c.displaced,afterCritical:l,combineWith:g,displacedBy:c.displacedBy});return ke(v,b)},Ei=function(l,c){return c.margin[l.start]+c.borderBox[l.size]/2},Gi=function(l,c){return c.margin[l.end]+c.borderBox[l.size]/2},Ni=function(l,c,f){return c[l.crossAxisStart]+f.margin[l.crossAxisStart]+f.borderBox[l.crossAxisSize]/2},Fi=function(l){var c=l.axis,f=l.moveRelativeTo,m=l.isMoving;return dt(c.line,f.marginBox[c.end]+Ei(c,m),Ni(c,f.marginBox,m))},Dn=function(l){var c=l.axis,f=l.moveRelativeTo,m=l.isMoving;return dt(c.line,f.marginBox[c.start]-Gi(c,m),Ni(c,f.marginBox,m))},di=function(l){var c=l.axis,f=l.moveInto,m=l.isMoving;return dt(c.line,f.contentBox[c.start]+Ei(c,m),Ni(c,f.contentBox,m))},fi=function(o){var l=o.impact,c=o.draggable,f=o.draggables,m=o.droppable,g=o.afterCritical,v=ur(m.descriptor.id,f),b=c.page,k=m.axis;if(!v.length)return di({axis:k,moveInto:m.page,isMoving:b});var T=l.displaced,w=l.displacedBy,E=T.all[0];if(E){var L=f[E];if(hn(E,g))return Dn({axis:k,moveRelativeTo:L.page,isMoving:b});var P=on(L.page,w.point);return Dn({axis:k,moveRelativeTo:P,isMoving:b})}var te=v[v.length-1];if(te.descriptor.id===c.descriptor.id)return b.borderBox.center;if(hn(te.descriptor.id,g)){var He=on(te.page,vt(g.displacedBy.point));return Fi({axis:k,moveRelativeTo:He,isMoving:b})}return Fi({axis:k,moveRelativeTo:te.page,isMoving:b})},Rn=function(o,l){var c=o.frame;return c?ke(l,c.scroll.diff.displacement):l},Hn=function(l){var c=l.impact,f=l.draggable,m=l.droppable,g=l.draggables,v=l.afterCritical,b=f.page.borderBox.center,k=c.at;return!m||!k?b:k.type==="REORDER"?fi({impact:c,draggable:f,draggables:g,droppable:m,afterCritical:v}):Ui({impact:c,draggables:g,afterCritical:v})},zi=function(o){var l=Hn(o),c=o.droppable,f=c?Rn(c,l):l;return f},Kr=function(o,l){var c=_e(l,o.scroll.initial),f=vt(c),m=Gt({top:l.y,bottom:l.y+o.frame.height,left:l.x,right:l.x+o.frame.width}),g={frame:m,scroll:{initial:o.scroll.initial,max:o.scroll.max,current:l,diff:{value:c,displacement:f}}};return g};function Er(o,l){return o.map(function(c){return l[c]})}function pn(o,l){for(var c=0;c<l.length;c++){var f=l[c].visible[o];if(f)return f}return null}var An=function(o){var l=o.impact,c=o.viewport,f=o.destination,m=o.draggables,g=o.maxScrollChange,v=Kr(c,ke(c.scroll.current,g)),b=f.frame?Qt(f,ke(f.frame.scroll.current,g)):f,k=l.displaced,T=Mi({afterDragging:Er(k.all,m),destination:f,displacedBy:l.displacedBy,viewport:v.frame,last:k,forceShouldAnimate:!1}),w=Mi({afterDragging:Er(k.all,m),destination:b,displacedBy:l.displacedBy,viewport:c.frame,last:k,forceShouldAnimate:!1}),E={},L={},P=[k,T,w];k.all.forEach(function(He){var qe=pn(He,P);if(qe){L[He]=qe;return}E[He]=!0});var te=(0,me.Z)({},l,{displaced:{all:k.all,invisible:E,visible:L}});return te},ii=function(o,l){return ke(o.scroll.diff.displacement,l)},On=function(o){var l=o.pageBorderBoxCenter,c=o.draggable,f=o.viewport,m=ii(f,l),g=_e(m,c.page.borderBox.center);return ke(c.client.borderBox.center,g)},Na=function(o){var l=o.draggable,c=o.destination,f=o.newPageBorderBoxCenter,m=o.viewport,g=o.withDroppableDisplacement,v=o.onlyOnMainAxis,b=v===void 0?!1:v,k=_e(f,l.page.borderBox.center),T=rr(l.page.borderBox,k),w={target:T,destination:c,withDroppableDisplacement:g,viewport:m};return b?vi(w):Kn(w)},Ws=function(o){var l=o.isMovingForward,c=o.draggable,f=o.destination,m=o.draggables,g=o.previousImpact,v=o.viewport,b=o.previousPageBorderBoxCenter,k=o.previousClientSelection,T=o.afterCritical;if(!f.isEnabled)return null;var w=ur(f.descriptor.id,m),E=gn(c,f),L=ri({isMovingForward:l,draggable:c,destination:f,insideDestination:w,previousImpact:g})||Oi({isMovingForward:l,isInHomeList:E,draggable:c,draggables:m,destination:f,insideDestination:w,previousImpact:g,viewport:v,afterCritical:T});if(!L)return null;var P=zi({impact:L,draggable:c,droppable:f,draggables:m,afterCritical:T}),te=Na({draggable:c,destination:f,newPageBorderBoxCenter:P,viewport:v.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(te){var He=On({pageBorderBoxCenter:P,draggable:c,viewport:v});return{clientSelection:He,impact:L,scrollJumpRequest:null}}var qe=_e(P,b),tt=An({impact:L,viewport:v,destination:f,draggables:m,maxScrollChange:qe});return{clientSelection:k,impact:tt,scrollJumpRequest:qe}},Nn=function(l){var c=l.subject.active;return c||xe(!1),c},qi=function(o){var l=o.isMovingForward,c=o.pageBorderBoxCenter,f=o.source,m=o.droppables,g=o.viewport,v=f.subject.active;if(!v)return null;var b=f.axis,k=vn(v[b.start],v[b.end]),T=xr(m).filter(function(E){return E!==f}).filter(function(E){return E.isEnabled}).filter(function(E){return!!E.subject.active}).filter(function(E){return mi(g.frame)(Nn(E))}).filter(function(E){var L=Nn(E);return l?v[b.crossAxisEnd]<L[b.crossAxisEnd]:L[b.crossAxisStart]<v[b.crossAxisStart]}).filter(function(E){var L=Nn(E),P=vn(L[b.start],L[b.end]);return k(L[b.start])||k(L[b.end])||P(v[b.start])||P(v[b.end])}).sort(function(E,L){var P=Nn(E)[b.crossAxisStart],te=Nn(L)[b.crossAxisStart];return l?P-te:te-P}).filter(function(E,L,P){return Nn(E)[b.crossAxisStart]===Nn(P[0])[b.crossAxisStart]});if(!T.length)return null;if(T.length===1)return T[0];var w=T.filter(function(E){var L=vn(Nn(E)[b.start],Nn(E)[b.end]);return L(c[b.line])});return w.length===1?w[0]:w.length>1?w.sort(function(E,L){return Nn(E)[b.start]-Nn(L)[b.start]})[0]:T.sort(function(E,L){var P=lr(c,Ir(Nn(E))),te=lr(c,Ir(Nn(L)));return P!==te?P-te:Nn(E)[b.start]-Nn(L)[b.start]})[0]},ns=function(l,c){var f=l.page.borderBox.center;return hn(l.descriptor.id,c)?_e(f,c.displacedBy.point):f},Xi=function(l,c){var f=l.page.borderBox;return hn(l.descriptor.id,c)?rr(f,vt(c.displacedBy.point)):f},wa=function(o){var l=o.pageBorderBoxCenter,c=o.viewport,f=o.destination,m=o.insideDestination,g=o.afterCritical,v=m.filter(function(b){return Kn({target:Xi(b,g),destination:f,viewport:c.frame,withDroppableDisplacement:!0})}).sort(function(b,k){var T=Zt(l,Rn(f,ns(b,g))),w=Zt(l,Rn(f,ns(k,g)));return T<w?-1:w<T?1:b.descriptor.index-k.descriptor.index});return v[0]||null},Wn=Fr(function(l,c){var f=c[l.line];return{value:f,point:dt(l.line,f)}}),Sa=function(l,c,f){var m=l.axis;if(l.descriptor.mode==="virtual")return dt(m.line,c[m.line]);var g=l.subject.page.contentBox[m.size],v=ur(l.descriptor.id,f),b=v.reduce(function(w,E){return w+E.client.marginBox[m.size]},0),k=b+c[m.line],T=k-g;return T<=0?null:dt(m.line,T)},aa=function(l,c){return(0,me.Z)({},l,{scroll:(0,me.Z)({},l.scroll,{max:c})})},_a=function(l,c,f){var m=l.frame;gn(c,l)&&xe(!1),l.subject.withPlaceholder&&xe(!1);var g=Wn(l.axis,c.displaceBy).point,v=Sa(l,g,f),b={placeholderSize:g,increasedBy:v,oldFrameMaxScroll:l.frame?l.frame.scroll.max:null};if(!m){var k=Ut({page:l.subject.page,withPlaceholder:b,axis:l.axis,frame:l.frame});return(0,me.Z)({},l,{subject:k})}var T=v?ke(m.scroll.max,v):m.scroll.max,w=aa(m,T),E=Ut({page:l.subject.page,withPlaceholder:b,axis:l.axis,frame:w});return(0,me.Z)({},l,{subject:E,frame:w})},mo=function(l){var c=l.subject.withPlaceholder;c||xe(!1);var f=l.frame;if(!f){var m=Ut({page:l.subject.page,axis:l.axis,frame:null,withPlaceholder:null});return(0,me.Z)({},l,{subject:m})}var g=c.oldFrameMaxScroll;g||xe(!1);var v=aa(f,g),b=Ut({page:l.subject.page,axis:l.axis,frame:v,withPlaceholder:null});return(0,me.Z)({},l,{subject:b,frame:v})},go=function(o){var l=o.previousPageBorderBoxCenter,c=o.moveRelativeTo,f=o.insideDestination,m=o.draggable,g=o.draggables,v=o.destination,b=o.viewport,k=o.afterCritical;if(!c){if(f.length)return null;var T={displaced:kn,displacedBy:Jn,at:{type:"REORDER",destination:{droppableId:v.descriptor.id,index:0}}},w=zi({impact:T,draggable:m,droppable:v,draggables:g,afterCritical:k}),E=gn(m,v)?v:_a(v,m,g),L=Na({draggable:m,destination:E,newPageBorderBoxCenter:w,viewport:b.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return L?T:null}var P=l[v.axis.line]<=c.page.borderBox.center[v.axis.line],te=function(){var qe=c.descriptor.index;return c.descriptor.id===m.descriptor.id||P?qe:qe+1}(),He=Wn(v.axis,m.displaceBy);return ui({draggable:m,insideDestination:f,destination:v,viewport:b,displacedBy:He,last:kn,index:te})},ki=function(o){var l=o.isMovingForward,c=o.previousPageBorderBoxCenter,f=o.draggable,m=o.isOver,g=o.draggables,v=o.droppables,b=o.viewport,k=o.afterCritical,T=qi({isMovingForward:l,pageBorderBoxCenter:c,source:m,droppables:v,viewport:b});if(!T)return null;var w=ur(T.descriptor.id,g),E=wa({pageBorderBoxCenter:c,viewport:b,destination:T,insideDestination:w,afterCritical:k}),L=go({previousPageBorderBoxCenter:c,destination:T,draggable:f,draggables:g,moveRelativeTo:E,insideDestination:w,viewport:b,afterCritical:k});if(!L)return null;var P=zi({impact:L,draggable:f,droppable:T,draggables:g,afterCritical:k}),te=On({pageBorderBoxCenter:P,draggable:f,viewport:b});return{clientSelection:te,impact:L,scrollJumpRequest:null}},bn=function(o){var l=o.at;return l?l.type==="REORDER"?l.destination.droppableId:l.combine.droppableId:null},xn=function(l,c){var f=bn(l);return f?c[f]:null},Ma=function(o){var l=o.state,c=o.type,f=xn(l.impact,l.dimensions.droppables),m=!!f,g=l.dimensions.droppables[l.critical.droppable.id],v=f||g,b=v.axis.direction,k=b==="vertical"&&(c==="MOVE_UP"||c==="MOVE_DOWN")||b==="horizontal"&&(c==="MOVE_LEFT"||c==="MOVE_RIGHT");if(k&&!m)return null;var T=c==="MOVE_DOWN"||c==="MOVE_RIGHT",w=l.dimensions.draggables[l.critical.draggable.id],E=l.current.page.borderBoxCenter,L=l.dimensions,P=L.draggables,te=L.droppables;return k?Ws({isMovingForward:T,previousPageBorderBoxCenter:E,draggable:w,destination:v,draggables:P,viewport:l.viewport,previousClientSelection:l.current.client.selection,previousImpact:l.impact,afterCritical:l.afterCritical}):ki({isMovingForward:T,previousPageBorderBoxCenter:E,draggable:w,isOver:v,draggables:P,droppables:te,viewport:l.viewport,afterCritical:l.afterCritical})};function Ji(o){return o.phase==="DRAGGING"||o.phase==="COLLECTING"}function Ca(o){var l=vn(o.top,o.bottom),c=vn(o.left,o.right);return function(m){return l(m.y)&&c(m.x)}}function Vs(o,l){return o.left<l.right&&o.right>l.left&&o.top<l.bottom&&o.bottom>l.top}function is(o){var l=o.pageBorderBox,c=o.draggable,f=o.candidates,m=c.page.borderBox.center,g=f.map(function(v){var b=v.axis,k=dt(v.axis.line,l.center[b.line],v.page.borderBox.center[b.crossAxisLine]);return{id:v.descriptor.id,distance:Zt(m,k)}}).sort(function(v,b){return b.distance-v.distance});return g[0]?g[0].id:null}function yi(o){var l=o.pageBorderBox,c=o.draggable,f=o.droppables,m=xr(f).filter(function(g){if(!g.isEnabled)return!1;var v=g.subject.active;if(!v||!Vs(l,v))return!1;if(Ca(v)(l.center))return!0;var b=g.axis,k=v.center[b.crossAxisLine],T=l[b.crossAxisStart],w=l[b.crossAxisEnd],E=vn(v[b.crossAxisStart],v[b.crossAxisEnd]),L=E(T),P=E(w);return!L&&!P?!0:L?T<k:w>k});return m.length?m.length===1?m[0].descriptor.id:is({pageBorderBox:l,draggable:c,candidates:m}):null}var as=function(l,c){return Gt(rr(l,c))},Zs=function(o,l){var c=o.frame;return c?as(l,c.scroll.diff.value):l};function os(o){var l=o.displaced,c=o.id;return!!(l.visible[c]||l.invisible[c])}function ss(o){var l=o.draggable,c=o.closest,f=o.inHomeList;return c?f&&c.descriptor.index>l.descriptor.index?c.descriptor.index-1:c.descriptor.index:null}var Fa=function(o){var l=o.pageBorderBoxWithDroppableScroll,c=o.draggable,f=o.destination,m=o.insideDestination,g=o.last,v=o.viewport,b=o.afterCritical,k=f.axis,T=Wn(f.axis,c.displaceBy),w=T.value,E=l[k.start],L=l[k.end],P=Tn(c,m),te=At(P,function(qe){var tt=qe.descriptor.id,pt=qe.page.borderBox.center[k.line],kt=hn(tt,b),It=os({displaced:g,id:tt});return kt?It?L<=pt:E<pt-w:It?L<=pt+w:E<pt}),He=ss({draggable:c,closest:te,inHomeList:gn(c,f)});return ui({draggable:c,insideDestination:m,destination:f,viewport:v,last:g,displacedBy:T,index:He})},vo=4,bo=function(o){var l=o.draggable,c=o.pageBorderBoxWithDroppableScroll,f=o.previousImpact,m=o.destination,g=o.insideDestination,v=o.afterCritical;if(!m.isCombineEnabled)return null;var b=m.axis,k=Wn(m.axis,l.displaceBy),T=k.value,w=c[b.start],E=c[b.end],L=Tn(l,g),P=At(L,function(He){var qe=He.descriptor.id,tt=He.page.borderBox,pt=tt[b.size],kt=pt/vo,It=hn(qe,v),cr=os({displaced:f.displaced,id:qe});return It?cr?E>tt[b.start]+kt&&E<tt[b.end]-kt:w>tt[b.start]-T+kt&&w<tt[b.end]-T-kt:cr?E>tt[b.start]+T+kt&&E<tt[b.end]+T-kt:w>tt[b.start]+kt&&w<tt[b.end]-kt});if(!P)return null;var te={displacedBy:k,displaced:f.displaced,at:{type:"COMBINE",combine:{draggableId:P.descriptor.id,droppableId:m.descriptor.id}}};return te},ls=function(o){var l=o.pageOffset,c=o.draggable,f=o.draggables,m=o.droppables,g=o.previousImpact,v=o.viewport,b=o.afterCritical,k=as(c.page.borderBox,l),T=yi({pageBorderBox:k,draggable:c,droppables:m});if(!T)return ni;var w=m[T],E=ur(w.descriptor.id,f),L=Zs(w,k);return bo({pageBorderBoxWithDroppableScroll:L,draggable:c,previousImpact:g,destination:w,insideDestination:E,afterCritical:b})||Fa({pageBorderBoxWithDroppableScroll:L,draggable:c,destination:w,insideDestination:E,last:g.displaced,viewport:v,afterCritical:b})},Ea=function(o,l){var c;return(0,me.Z)({},o,(c={},c[l.descriptor.id]=l,c))},cs=function(l){var c=l.previousImpact,f=l.impact,m=l.droppables,g=bn(c),v=bn(f);if(!g||g===v)return m;var b=m[g];if(!b.subject.withPlaceholder)return m;var k=mo(b);return Ea(m,k)},za=function(o){var l=o.draggable,c=o.draggables,f=o.droppables,m=o.previousImpact,g=o.impact,v=cs({previousImpact:m,impact:g,droppables:f}),b=bn(g);if(!b)return v;var k=f[b];if(gn(l,k)||k.subject.withPlaceholder)return v;var T=_a(k,l,c);return Ea(v,T)},ka=function(o){var l=o.state,c=o.clientSelection,f=o.dimensions,m=o.viewport,g=o.impact,v=o.scrollJumpRequest,b=m||l.viewport,k=f||l.dimensions,T=c||l.current.client.selection,w=_e(T,l.initial.client.selection),E={offset:w,selection:T,borderBoxCenter:ke(l.initial.client.borderBoxCenter,w)},L={selection:ke(E.selection,b.scroll.current),borderBoxCenter:ke(E.borderBoxCenter,b.scroll.current),offset:ke(E.offset,b.scroll.diff.value)},P={client:E,page:L};if(l.phase==="COLLECTING")return(0,me.Z)({phase:"COLLECTING"},l,{dimensions:k,viewport:b,current:P});var te=k.draggables[l.critical.draggable.id],He=g||ls({pageOffset:L.offset,draggable:te,draggables:k.draggables,droppables:k.droppables,previousImpact:l.impact,viewport:b,afterCritical:l.afterCritical}),qe=za({draggable:te,impact:He,previousImpact:l.impact,draggables:k.draggables,droppables:k.droppables}),tt=(0,me.Z)({},l,{current:P,dimensions:{draggables:k.draggables,droppables:qe},impact:He,viewport:b,scrollJumpRequest:v||null,forceShouldAnimate:v?!1:null});return tt};function js(o,l){return o.map(function(c){return l[c]})}var us=function(o){var l=o.impact,c=o.viewport,f=o.draggables,m=o.destination,g=o.forceShouldAnimate,v=l.displaced,b=js(v.all,f),k=Mi({afterDragging:b,destination:m,displacedBy:l.displacedBy,viewport:c.frame,forceShouldAnimate:g,last:v});return(0,me.Z)({},l,{displaced:k})},yo=function(o){var l=o.impact,c=o.draggable,f=o.droppable,m=o.draggables,g=o.viewport,v=o.afterCritical,b=zi({impact:l,draggable:c,draggables:m,droppable:f,afterCritical:v});return On({pageBorderBoxCenter:b,draggable:c,viewport:g})},ds=function(o){var l=o.state,c=o.dimensions,f=o.viewport;l.movementMode!=="SNAP"&&xe(!1);var m=l.impact,g=f||l.viewport,v=c||l.dimensions,b=v.draggables,k=v.droppables,T=b[l.critical.draggable.id],w=bn(m);w||xe(!1);var E=k[w],L=us({impact:m,viewport:g,destination:E,draggables:b}),P=yo({impact:L,draggable:T,droppable:E,draggables:b,viewport:g,afterCritical:l.afterCritical});return ka({impact:L,clientSelection:P,state:l,dimensions:v,viewport:g})},Da=function(o){return{index:o.index,droppableId:o.droppableId}},xo=function(o){var l=o.draggable,c=o.home,f=o.draggables,m=o.viewport,g=Wn(c.axis,l.displaceBy),v=ur(c.descriptor.id,f),b=v.indexOf(l);b===-1&&xe(!1);var k=v.slice(b+1),T=k.reduce(function(P,te){return P[te.descriptor.id]=!0,P},{}),w={inVirtualList:c.descriptor.mode==="virtual",displacedBy:g,effected:T},E=Mi({afterDragging:k,destination:c,displacedBy:g,last:null,viewport:m.frame,forceShouldAnimate:!1}),L={displaced:E,displacedBy:g,at:{type:"REORDER",destination:Da(l.descriptor)}};return{impact:L,afterCritical:w}},Us=function(o,l){return{draggables:o.draggables,droppables:Ea(o.droppables,l)}},Ka=function(l){},Nr=function(l){},Zr=function(o){var l=o.draggable,c=o.offset,f=o.initialWindowScroll,m=on(l.client,c),g=Vt(m,f),v=(0,me.Z)({},l,{placeholder:(0,me.Z)({},l.placeholder,{client:m}),client:m,page:g});return v},Yr=function(o){var l=o.frame;return l||xe(!1),l},ai=function(o){var l=o.additions,c=o.updatedDroppables,f=o.viewport,m=f.scroll.diff.value;return l.map(function(g){var v=g.descriptor.droppableId,b=c[v],k=Yr(b),T=k.scroll.diff.value,w=ke(m,T),E=Zr({draggable:g,offset:w,initialWindowScroll:f.scroll.initial});return E})},Vn=function(o){var l=o.state,c=o.published;Ka();var f=c.modified.map(function(kt){var It=l.dimensions.droppables[kt.droppableId],cr=Qt(It,kt.scroll);return cr}),m=(0,me.Z)({},l.dimensions.droppables,{},sr(f)),g=Kt(ai({additions:c.additions,updatedDroppables:m,viewport:l.viewport})),v=(0,me.Z)({},l.dimensions.draggables,{},g);c.removals.forEach(function(kt){delete v[kt]});var b={droppables:m,draggables:v},k=bn(l.impact),T=k?b.droppables[k]:null,w=b.draggables[l.critical.draggable.id],E=b.droppables[l.critical.droppable.id],L=xo({draggable:w,home:E,draggables:v,viewport:l.viewport}),P=L.impact,te=L.afterCritical,He=T&&T.isCombineEnabled?l.impact:P,qe=ls({pageOffset:l.current.page.offset,draggable:b.draggables[l.critical.draggable.id],draggables:b.draggables,droppables:b.droppables,previousImpact:He,viewport:l.viewport,afterCritical:te});Nr();var tt=(0,me.Z)({phase:"DRAGGING"},l,{phase:"DRAGGING",impact:qe,onLiftImpact:P,dimensions:b,afterCritical:te,forceShouldAnimate:!1});if(l.phase==="COLLECTING")return tt;var pt=(0,me.Z)({phase:"DROP_PENDING"},tt,{phase:"DROP_PENDING",reason:l.reason,isWaiting:!1});return pt},Aa=function(l){return l.movementMode==="SNAP"},oa=function(l,c,f){var m=Us(l.dimensions,c);return!Aa(l)||f?ka({state:l,dimensions:m}):ds({state:l,dimensions:m})};function Fo(o){return o.isDragging&&o.movementMode==="SNAP"?(0,me.Z)({phase:"DRAGGING"},o,{scrollJumpRequest:null}):o}var zo={phase:"IDLE",completed:null,shouldFlush:!1},fs=function(o,l){if(o===void 0&&(o=zo),l.type==="FLUSH")return(0,me.Z)({},zo,{shouldFlush:!0});if(l.type==="INITIAL_PUBLISH"){o.phase!=="IDLE"&&xe(!1);var c=l.payload,f=c.critical,m=c.clientSelection,g=c.viewport,v=c.dimensions,b=c.movementMode,k=v.draggables[f.draggable.id],T=v.droppables[f.droppable.id],w={selection:m,borderBoxCenter:k.client.borderBox.center,offset:q},E={client:w,page:{selection:ke(w.selection,g.scroll.initial),borderBoxCenter:ke(w.selection,g.scroll.initial),offset:ke(w.selection,g.scroll.diff.value)}},L=xr(v.droppables).every(function($l){return!$l.isFixedOnPage}),P=xo({draggable:k,home:T,draggables:v.draggables,viewport:g}),te=P.impact,He=P.afterCritical,qe={phase:"DRAGGING",isDragging:!0,critical:f,movementMode:b,dimensions:v,initial:E,current:E,isWindowScrollAllowed:L,impact:te,afterCritical:He,onLiftImpact:te,viewport:g,scrollJumpRequest:null,forceShouldAnimate:null};return qe}if(l.type==="COLLECTION_STARTING"){if(o.phase==="COLLECTING"||o.phase==="DROP_PENDING")return o;o.phase!=="DRAGGING"&&xe(!1);var tt=(0,me.Z)({phase:"COLLECTING"},o,{phase:"COLLECTING"});return tt}if(l.type==="PUBLISH_WHILE_DRAGGING")return o.phase==="COLLECTING"||o.phase==="DROP_PENDING"||xe(!1),Vn({state:o,published:l.payload});if(l.type==="MOVE"){if(o.phase==="DROP_PENDING")return o;Ji(o)||xe(!1);var pt=l.payload.client;return je(pt,o.current.client.selection)?o:ka({state:o,clientSelection:pt,impact:Aa(o)?o.impact:null})}if(l.type==="UPDATE_DROPPABLE_SCROLL"){if(o.phase==="DROP_PENDING"||o.phase==="COLLECTING")return Fo(o);Ji(o)||xe(!1);var kt=l.payload,It=kt.id,cr=kt.newScroll,Tt=o.dimensions.droppables[It];if(!Tt)return o;var br=Qt(Tt,cr);return oa(o,br,!1)}if(l.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(o.phase==="DROP_PENDING")return o;Ji(o)||xe(!1);var mn=l.payload,yr=mn.id,Hr=mn.isEnabled,jn=o.dimensions.droppables[yr];jn||xe(!1),jn.isEnabled===Hr&&xe(!1);var Bn=(0,me.Z)({},jn,{isEnabled:Hr});return oa(o,Bn,!0)}if(l.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(o.phase==="DROP_PENDING")return o;Ji(o)||xe(!1);var xi=l.payload,Wi=xi.id,Bi=xi.isCombineEnabled,Ii=o.dimensions.droppables[Wi];Ii||xe(!1),Ii.isCombineEnabled===Bi&&xe(!1);var ei=(0,me.Z)({},Ii,{isCombineEnabled:Bi});return oa(o,ei,!0)}if(l.type==="MOVE_BY_WINDOW_SCROLL"){if(o.phase==="DROP_PENDING"||o.phase==="DROP_ANIMATING")return o;Ji(o)||xe(!1),o.isWindowScrollAllowed||xe(!1);var to=l.payload.newScroll;if(je(o.viewport.scroll.current,to))return Fo(o);var ma=Kr(o.viewport,to);return Aa(o)?ds({state:o,viewport:ma}):ka({state:o,viewport:ma})}if(l.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!Ji(o))return o;var Pa=l.payload.maxScroll;if(je(Pa,o.viewport.scroll.max))return o;var Qi=(0,me.Z)({},o.viewport,{scroll:(0,me.Z)({},o.viewport.scroll,{max:Pa})});return(0,me.Z)({phase:"DRAGGING"},o,{viewport:Qi})}if(l.type==="MOVE_UP"||l.type==="MOVE_DOWN"||l.type==="MOVE_LEFT"||l.type==="MOVE_RIGHT"){if(o.phase==="COLLECTING"||o.phase==="DROP_PENDING")return o;o.phase!=="DRAGGING"&&xe(!1);var ga=Ma({state:o,type:l.type});return ga?ka({state:o,impact:ga.impact,clientSelection:ga.clientSelection,scrollJumpRequest:ga.scrollJumpRequest}):o}if(l.type==="DROP_PENDING"){var li=l.payload.reason;o.phase!=="COLLECTING"&&xe(!1);var wi=(0,me.Z)({phase:"DROP_PENDING"},o,{phase:"DROP_PENDING",isWaiting:!0,reason:li});return wi}if(l.type==="DROP_ANIMATE"){var Bl=l.payload,ea=Bl.completed,To=Bl.dropDuration,ks=Bl.newHomeClientOffset;o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||xe(!1);var Jo={phase:"DROP_ANIMATING",completed:ea,dropDuration:To,newHomeClientOffset:ks,dimensions:o.dimensions};return Jo}if(l.type==="DROP_COMPLETE"){var Il=l.payload.completed;return{phase:"IDLE",completed:Il,shouldFlush:!1}}return o},sa=function(l){return{type:"BEFORE_INITIAL_CAPTURE",payload:l}},La=function(l){return{type:"LIFT",payload:l}},Gs=function(l){return{type:"INITIAL_PUBLISH",payload:l}},ou=function(l){return{type:"PUBLISH_WHILE_DRAGGING",payload:l}},su=function(){return{type:"COLLECTION_STARTING",payload:null}},lu=function(l){return{type:"UPDATE_DROPPABLE_SCROLL",payload:l}},cu=function(l){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:l}},uu=function(l){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:l}},ec=function(l){return{type:"MOVE",payload:l}},hs=function(l){return{type:"MOVE_BY_WINDOW_SCROLL",payload:l}},du=function(l){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:l}},fu=function(){return{type:"MOVE_UP",payload:null}},hu=function(){return{type:"MOVE_DOWN",payload:null}},pu=function(){return{type:"MOVE_RIGHT",payload:null}},mu=function(){return{type:"MOVE_LEFT",payload:null}},Fn=function(){return{type:"FLUSH",payload:null}},Ba=function(l){return{type:"DROP_ANIMATE",payload:l}},la=function(l){return{type:"DROP_COMPLETE",payload:l}},tc=function(l){return{type:"DROP",payload:l}},rc=function(l){return{type:"DROP_PENDING",payload:l}},nc=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}};function u0(o){if(!(o.length<=1)){for(var l=o.map(function(b){return b.descriptor.index}),c={},f=1;f<l.length;f++){var m=l[f],g=l[f-1];m!==g+1&&(c[m]=!0)}if(Object.keys(c).length)var v=l.map(function(b){var k=!!c[b];return k?"[\u{1F525}"+b+"]":""+b}).join(", ")}}function ic(o,l){if(0)var c}var gu=function(o){return function(l){var c=l.getState,f=l.dispatch;return function(m){return function(g){if(g.type!=="LIFT"){m(g);return}var v=g.payload,b=v.id,k=v.clientSelection,T=v.movementMode,w=c();w.phase==="DROP_ANIMATING"&&f(la({completed:w.completed})),c().phase!=="IDLE"&&xe(!1),f(Fn()),f(sa({draggableId:b,movementMode:T}));var E={shouldPublishImmediately:T==="SNAP"},L={draggableId:b,scrollOptions:E},P=o.startPublishing(L),te=P.critical,He=P.dimensions,qe=P.viewport;ic(te,He),f(Gs({critical:te,dimensions:He,clientSelection:k,movementMode:T,viewport:qe}))}}}},vu=function(o){return function(){return function(l){return function(c){c.type==="INITIAL_PUBLISH"&&o.dragging(),c.type==="DROP_ANIMATE"&&o.dropping(c.payload.completed.result.reason),(c.type==="FLUSH"||c.type==="DROP_COMPLETE")&&o.resting(),l(c)}}}},qs={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},Ha={opacity:{drop:0,combining:.7},scale:{drop:.75}},Xs={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Wa=Xs.outOfTheWay+"s "+qs.outOfTheWay,wo={fluid:"opacity "+Wa,snap:"transform "+Wa+", opacity "+Wa,drop:function(l){var c=l+"s "+qs.drop;return"transform "+c+", opacity "+c},outOfTheWay:"transform "+Wa,placeholder:"height "+Wa+", width "+Wa+", margin "+Wa},Js=function(l){return je(l,q)?null:"translate("+l.x+"px, "+l.y+"px)"},Ki={moveTo:Js,drop:function(l,c){var f=Js(l);return f?c?f+" scale("+Ha.scale.drop+")":f:null}},ps=Xs.minDropTime,Ys=Xs.maxDropTime,bu=Ys-ps,ac=1500,yu=.6,xu=function(o){var l=o.current,c=o.destination,f=o.reason,m=Zt(l,c);if(m<=0)return ps;if(m>=ac)return Ys;var g=m/ac,v=ps+bu*g,b=f==="CANCEL"?v*yu:v;return Number(b.toFixed(2))},oc=function(o){var l=o.impact,c=o.draggable,f=o.dimensions,m=o.viewport,g=o.afterCritical,v=f.draggables,b=f.droppables,k=bn(l),T=k?b[k]:null,w=b[c.descriptor.droppableId],E=yo({impact:l,draggable:c,draggables:v,afterCritical:g,droppable:T||w,viewport:m}),L=_e(E,c.client.borderBox.center);return L},wu=function(o){var l=o.draggables,c=o.reason,f=o.lastImpact,m=o.home,g=o.viewport,v=o.onLiftImpact;if(!f.at||c!=="DROP"){var b=us({draggables:l,impact:v,destination:m,viewport:g,forceShouldAnimate:!0});return{impact:b,didDropInsideDroppable:!1}}if(f.at.type==="REORDER")return{impact:f,didDropInsideDroppable:!0};var k=(0,me.Z)({},f,{displaced:kn});return{impact:k,didDropInsideDroppable:!0}},Su=function(o){var l=o.getState,c=o.dispatch;return function(f){return function(m){if(m.type!=="DROP"){f(m);return}var g=l(),v=m.payload.reason;if(g.phase==="COLLECTING"){c(rc({reason:v}));return}if(g.phase!=="IDLE"){var b=g.phase==="DROP_PENDING"&&g.isWaiting;b&&xe(!1),g.phase==="DRAGGING"||g.phase==="DROP_PENDING"||xe(!1);var k=g.critical,T=g.dimensions,w=T.draggables[g.critical.draggable.id],E=wu({reason:v,lastImpact:g.impact,afterCritical:g.afterCritical,onLiftImpact:g.onLiftImpact,home:g.dimensions.droppables[g.critical.droppable.id],viewport:g.viewport,draggables:g.dimensions.draggables}),L=E.impact,P=E.didDropInsideDroppable,te=P?an(L):null,He=P?Pr(L):null,qe={index:k.draggable.index,droppableId:k.droppable.id},tt={draggableId:w.descriptor.id,type:w.descriptor.type,source:qe,reason:v,mode:g.movementMode,destination:te,combine:He},pt=oc({impact:L,draggable:w,dimensions:T,viewport:g.viewport,afterCritical:g.afterCritical}),kt={critical:g.critical,afterCritical:g.afterCritical,result:tt,impact:L},It=!je(g.current.client.offset,pt)||!!tt.combine;if(!It){c(la({completed:kt}));return}var cr=xu({current:g.current.client.offset,destination:pt,reason:v}),Tt={newHomeClientOffset:pt,dropDuration:cr,completed:kt};c(Ba(Tt))}}}},sc=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function _u(o){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(c){c.target!==window&&c.target!==window.document||o()}}}function Mu(o){var l=o.onWindowScroll;function c(){l(sc())}var f=In(c),m=_u(f),g=Et;function v(){return g!==Et}function b(){v()&&xe(!1),g=jt(window,[m])}function k(){v()||xe(!1),f.cancel(),g(),g=Et}return{start:b,stop:k,isActive:v}}var Cu=function(l){return l.type==="DROP_COMPLETE"||l.type==="DROP_ANIMATE"||l.type==="FLUSH"},ca=function(o){var l=Mu({onWindowScroll:function(f){o.dispatch(hs({newScroll:f}))}});return function(c){return function(f){!l.isActive()&&f.type==="INITIAL_PUBLISH"&&l.start(),l.isActive()&&Cu(f)&&l.stop(),c(f)}}},lc=function(o){var l=!1,c=!1,f=setTimeout(function(){c=!0}),m=function(v){l||c||(l=!0,o(v),clearTimeout(f))};return m.wasCalled=function(){return l},m},Ia=function(){var o=[],l=function(g){var v=Dr(o,function(T){return T.timerId===g});v===-1&&xe(!1);var b=o.splice(v,1),k=b[0];k.callback()},c=function(g){var v=setTimeout(function(){return l(v)}),b={timerId:v,callback:g};o.push(b)},f=function(){if(o.length){var g=[].concat(o);o.length=0,g.forEach(function(v){clearTimeout(v.timerId),v.callback()})}};return{add:c,flush:f}},Eu=function(l,c){return l==null&&c==null?!0:l==null||c==null?!1:l.droppableId===c.droppableId&&l.index===c.index},cc=function(l,c){return l==null&&c==null?!0:l==null||c==null?!1:l.draggableId===c.draggableId&&l.droppableId===c.droppableId},uc=function(l,c){if(l===c)return!0;var f=l.draggable.id===c.draggable.id&&l.draggable.droppableId===c.draggable.droppableId&&l.draggable.type===c.draggable.type&&l.draggable.index===c.draggable.index,m=l.droppable.id===c.droppable.id&&l.droppable.type===c.droppable.type;return f&&m},Ko=function(l,c){Ka(),c(),Nr()},Ho=function(l,c){return{draggableId:l.draggable.id,type:l.droppable.type,source:{droppableId:l.droppable.id,index:l.draggable.index},mode:c}},Qs=function(l,c,f,m){if(!l){f(m(c));return}var g=lc(f),v={announce:g};l(c,v),g.wasCalled()||f(m(c))},ku=function(o,l){var c=Ia(),f=null,m=function(L,P){f&&xe(!1),Ko("onBeforeCapture",function(){var te=o().onBeforeCapture;if(te){var He={draggableId:L,mode:P};te(He)}})},g=function(L,P){f&&xe(!1),Ko("onBeforeDragStart",function(){var te=o().onBeforeDragStart;te&&te(Ho(L,P))})},v=function(L,P){f&&xe(!1);var te=Ho(L,P);f={mode:P,lastCritical:L,lastLocation:te.source,lastCombine:null},c.add(function(){Ko("onDragStart",function(){return Qs(o().onDragStart,te,l,Ee.onDragStart)})})},b=function(L,P){var te=an(P),He=Pr(P);f||xe(!1);var qe=!uc(L,f.lastCritical);qe&&(f.lastCritical=L);var tt=!Eu(f.lastLocation,te);tt&&(f.lastLocation=te);var pt=!cc(f.lastCombine,He);if(pt&&(f.lastCombine=He),!(!qe&&!tt&&!pt)){var kt=(0,me.Z)({},Ho(L,f.mode),{combine:He,destination:te});c.add(function(){Ko("onDragUpdate",function(){return Qs(o().onDragUpdate,kt,l,Ee.onDragUpdate)})})}},k=function(){f||xe(!1),c.flush()},T=function(L){f||xe(!1),f=null,Ko("onDragEnd",function(){return Qs(o().onDragEnd,L,l,Ee.onDragEnd)})},w=function(){if(f){var L=(0,me.Z)({},Ho(f.lastCritical,f.mode),{combine:null,destination:null,reason:"CANCEL"});T(L)}};return{beforeCapture:m,beforeStart:g,start:v,update:b,flush:k,drop:T,abort:w}},Du=function(o,l){var c=ku(o,l);return function(f){return function(m){return function(g){if(g.type==="BEFORE_INITIAL_CAPTURE"){c.beforeCapture(g.payload.draggableId,g.payload.movementMode);return}if(g.type==="INITIAL_PUBLISH"){var v=g.payload.critical;c.beforeStart(v,g.payload.movementMode),m(g),c.start(v,g.payload.movementMode);return}if(g.type==="DROP_COMPLETE"){var b=g.payload.completed.result;c.flush(),m(g),c.drop(b);return}if(m(g),g.type==="FLUSH"){c.abort();return}var k=f.getState();k.phase==="DRAGGING"&&c.update(k.critical,k.impact)}}}},Au=function(o){return function(l){return function(c){if(c.type!=="DROP_ANIMATION_FINISHED"){l(c);return}var f=o.getState();f.phase!=="DROP_ANIMATING"&&xe(!1),o.dispatch(la({completed:f.completed}))}}},Lu=function(o){var l=null,c=null;function f(){c&&(cancelAnimationFrame(c),c=null),l&&(l(),l=null)}return function(m){return function(g){if((g.type==="FLUSH"||g.type==="DROP_COMPLETE"||g.type==="DROP_ANIMATION_FINISHED")&&f(),m(g),g.type==="DROP_ANIMATE"){var v={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var k=o.getState();k.phase==="DROP_ANIMATING"&&o.dispatch(nc())}};c=requestAnimationFrame(function(){c=null,l=jt(window,[v])})}}}},Bu=function(o){return function(){return function(l){return function(c){(c.type==="DROP_COMPLETE"||c.type==="FLUSH"||c.type==="DROP_ANIMATE")&&o.stopPublishing(),l(c)}}}},Iu=function(o){var l=!1;return function(){return function(c){return function(f){if(f.type==="INITIAL_PUBLISH"){l=!0,o.tryRecordFocus(f.payload.critical.draggable.id),c(f),o.tryRestoreFocusRecorded();return}if(c(f),!!l){if(f.type==="FLUSH"){l=!1,o.tryRestoreFocusRecorded();return}if(f.type==="DROP_COMPLETE"){l=!1;var m=f.payload.completed.result;m.combine&&o.tryShiftRecord(m.draggableId,m.combine.draggableId),o.tryRestoreFocusRecorded()}}}}}},$u=function(l){return l.type==="DROP_COMPLETE"||l.type==="DROP_ANIMATE"||l.type==="FLUSH"},Tu=function(o){return function(l){return function(c){return function(f){if($u(f)){o.stop(),c(f);return}if(f.type==="INITIAL_PUBLISH"){c(f);var m=l.getState();m.phase!=="DRAGGING"&&xe(!1),o.start(m);return}c(f),o.scroll(l.getState())}}}},el=function(o){return function(l){return function(c){if(l(c),c.type==="PUBLISH_WHILE_DRAGGING"){var f=o.getState();f.phase==="DROP_PENDING"&&(f.isWaiting||o.dispatch(tc({reason:f.reason})))}}}},Pu=H.qC,Ru=function(o){var l=o.dimensionMarshal,c=o.focusMarshal,f=o.styleMarshal,m=o.getResponders,g=o.announce,v=o.autoScroller;return(0,H.MT)(fs,Pu((0,H.md)(vu(f),Bu(l),gu(l),Su,Au,Lu,el,Tu(v),ca,Iu(c),Du(m,g))))},tl=function(){return{additions:{},removals:{},modified:{}}};function Ou(o){var l=o.registry,c=o.callbacks,f=tl(),m=null,g=function(){m||(c.collectionStarting(),m=requestAnimationFrame(function(){m=null,Ka();var w=f,E=w.additions,L=w.removals,P=w.modified,te=Object.keys(E).map(function(tt){return l.draggable.getById(tt).getDimension(q)}).sort(function(tt,pt){return tt.descriptor.index-pt.descriptor.index}),He=Object.keys(P).map(function(tt){var pt=l.droppable.getById(tt),kt=pt.callbacks.getScrollWhileDragging();return{droppableId:tt,scroll:kt}}),qe={additions:te,removals:Object.keys(L),modified:He};f=tl(),Nr(),c.publish(qe)}))},v=function(w){var E=w.descriptor.id;f.additions[E]=w,f.modified[w.descriptor.droppableId]=!0,f.removals[E]&&delete f.removals[E],g()},b=function(w){var E=w.descriptor;f.removals[E.id]=!0,f.modified[E.droppableId]=!0,f.additions[E.id]&&delete f.additions[E.id],g()},k=function(){m&&(cancelAnimationFrame(m),m=null,f=tl())};return{add:v,remove:b,stop:k}}var dc=function(o){var l=o.scrollHeight,c=o.scrollWidth,f=o.height,m=o.width,g=_e({x:c,y:l},{x:m,y:f}),v={x:Math.max(0,g.x),y:Math.max(0,g.y)};return v},So=function(){var o=document.documentElement;return o||xe(!1),o},_o=function(){var o=So(),l=dc({scrollHeight:o.scrollHeight,scrollWidth:o.scrollWidth,width:o.clientWidth,height:o.clientHeight});return l},fc=function(){var o=sc(),l=_o(),c=o.y,f=o.x,m=So(),g=m.clientWidth,v=m.clientHeight,b=f+g,k=c+v,T=Gt({top:c,left:f,right:b,bottom:k}),w={frame:T,scroll:{initial:o,current:o,max:l,diff:{value:q,displacement:q}}};return w},Nu=function(o){var l=o.critical,c=o.scrollOptions,f=o.registry;Ka();var m=fc(),g=m.scroll.current,v=l.droppable,b=f.droppable.getAllByType(v.type).map(function(E){return E.callbacks.getDimensionAndWatchScroll(g,c)}),k=f.draggable.getAllByType(l.draggable.type).map(function(E){return E.getDimension(g)}),T={draggables:Kt(k),droppables:sr(b)};Nr();var w={dimensions:T,critical:l,viewport:m};return w};function hc(o,l,c){if(c.descriptor.id===l.id||c.descriptor.type!==l.type)return!1;var f=o.droppable.getById(c.descriptor.droppableId);return f.descriptor.mode==="virtual"}var Fu=function(o,l){var c=null,f=Ou({callbacks:{publish:l.publishWhileDragging,collectionStarting:l.collectionStarting},registry:o}),m=function(P,te){o.droppable.exists(P)||xe(!1),c&&l.updateDroppableIsEnabled({id:P,isEnabled:te})},g=function(P,te){c&&(o.droppable.exists(P)||xe(!1),l.updateDroppableIsCombineEnabled({id:P,isCombineEnabled:te}))},v=function(P,te){c&&(o.droppable.exists(P)||xe(!1),l.updateDroppableScroll({id:P,newScroll:te}))},b=function(P,te){c&&o.droppable.getById(P).callbacks.scroll(te)},k=function(){if(c){f.stop();var P=c.critical.droppable;o.droppable.getAllByType(P.type).forEach(function(te){return te.callbacks.dragStopped()}),c.unsubscribe(),c=null}},T=function(P){c||xe(!1);var te=c.critical.draggable;P.type==="ADDITION"&&hc(o,te,P.value)&&f.add(P.value),P.type==="REMOVAL"&&hc(o,te,P.value)&&f.remove(P.value)},w=function(P){c&&xe(!1);var te=o.draggable.getById(P.draggableId),He=o.droppable.getById(te.descriptor.droppableId),qe={draggable:te.descriptor,droppable:He.descriptor},tt=o.subscribe(T);return c={critical:qe,unsubscribe:tt},Nu({critical:qe,registry:o,scrollOptions:P.scrollOptions})},E={updateDroppableIsEnabled:m,updateDroppableIsCombineEnabled:g,scrollDroppable:b,updateDroppableScroll:v,startPublishing:w,stopPublishing:k};return E},pc=function(o,l){return o.phase==="IDLE"?!0:o.phase!=="DROP_ANIMATING"||o.completed.result.draggableId===l?!1:o.completed.result.reason==="DROP"},rl=function(o){window.scrollBy(o.x,o.y)},zu=Fr(function(o){return xr(o).filter(function(l){return!(!l.isEnabled||!l.frame)})}),Ku=function(l,c){var f=At(zu(c),function(m){return m.frame||xe(!1),Ca(m.frame.pageMarginBox)(l)});return f},Hu=function(o){var l=o.center,c=o.destination,f=o.droppables;if(c){var m=f[c];return m.frame?m:null}var g=Ku(l,f);return g},Di={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(l){return Math.pow(l,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},nl=function(o,l){var c=o[l.size]*Di.startFromPercentage,f=o[l.size]*Di.maxScrollAtPercentage,m={startScrollingFrom:c,maxScrollValueAt:f};return m},mc=function(o){var l=o.startOfRange,c=o.endOfRange,f=o.current,m=c-l;if(m===0)return 0;var g=f-l,v=g/m;return v},ms=1,Wu=function(o,l){if(o>l.startScrollingFrom)return 0;if(o<=l.maxScrollValueAt)return Di.maxPixelScroll;if(o===l.startScrollingFrom)return ms;var c=mc({startOfRange:l.maxScrollValueAt,endOfRange:l.startScrollingFrom,current:o}),f=1-c,m=Di.maxPixelScroll*Di.ease(f);return Math.ceil(m)},gc=Di.durationDampening.accelerateAt,vc=Di.durationDampening.stopDampeningAt,il=function(o,l){var c=l,f=vc,m=Date.now(),g=m-c;if(g>=vc)return o;if(g<gc)return ms;var v=mc({startOfRange:gc,endOfRange:f,current:g}),b=o*Di.ease(v);return Math.ceil(b)},gs=function(o){var l=o.distanceToEdge,c=o.thresholds,f=o.dragStartTime,m=o.shouldUseTimeDampening,g=Wu(l,c);return g===0?0:m?Math.max(il(g,f),ms):g},vs=function(o){var l=o.container,c=o.distanceToEdges,f=o.dragStartTime,m=o.axis,g=o.shouldUseTimeDampening,v=nl(l,m),b=c[m.end]<c[m.start];return b?gs({distanceToEdge:c[m.end],thresholds:v,dragStartTime:f,shouldUseTimeDampening:g}):-1*gs({distanceToEdge:c[m.start],thresholds:v,dragStartTime:f,shouldUseTimeDampening:g})},Vu=function(o){var l=o.container,c=o.subject,f=o.proposedScroll,m=c.height>l.height,g=c.width>l.width;return!g&&!m?f:g&&m?null:{x:g?0:f.x,y:m?0:f.y}},Zu=gr(function(o){return o===0?0:o}),bc=function(o){var l=o.dragStartTime,c=o.container,f=o.subject,m=o.center,g=o.shouldUseTimeDampening,v={top:m.y-c.top,right:c.right-m.x,bottom:c.bottom-m.y,left:m.x-c.left},b=vs({container:c,distanceToEdges:v,dragStartTime:l,axis:Pn,shouldUseTimeDampening:g}),k=vs({container:c,distanceToEdges:v,dragStartTime:l,axis:_n,shouldUseTimeDampening:g}),T=Zu({x:k,y:b});if(je(T,q))return null;var w=Vu({container:c,subject:f,proposedScroll:T});return w?je(w,q)?null:w:null},al=gr(function(o){return o===0?0:o>0?1:-1}),Wo=function(){var o=function(c,f){return c<0?c:c>f?c-f:0};return function(l){var c=l.current,f=l.max,m=l.change,g=ke(c,m),v={x:o(g.x,f.x),y:o(g.y,f.y)};return je(v,q)?null:v}}(),bs=function(l){var c=l.max,f=l.current,m=l.change,g={x:Math.max(f.x,c.x),y:Math.max(f.y,c.y)},v=al(m),b=Wo({max:g,current:f,change:v});return!b||v.x!==0&&b.x===0||v.y!==0&&b.y===0},Vo=function(l,c){return bs({current:l.scroll.current,max:l.scroll.max,change:c})},ju=function(l,c){if(!Vo(l,c))return null;var f=l.scroll.max,m=l.scroll.current;return Wo({current:m,max:f,change:c})},ys=function(l,c){var f=l.frame;return f?bs({current:f.scroll.current,max:f.scroll.max,change:c}):!1},ol=function(l,c){var f=l.frame;return!f||!ys(l,c)?null:Wo({current:f.scroll.current,max:f.scroll.max,change:c})},Uu=function(o){var l=o.viewport,c=o.subject,f=o.center,m=o.dragStartTime,g=o.shouldUseTimeDampening,v=bc({dragStartTime:m,container:l.frame,subject:c,center:f,shouldUseTimeDampening:g});return v&&Vo(l,v)?v:null},Gu=function(o){var l=o.droppable,c=o.subject,f=o.center,m=o.dragStartTime,g=o.shouldUseTimeDampening,v=l.frame;if(!v)return null;var b=bc({dragStartTime:m,container:v.pageMarginBox,subject:c,center:f,shouldUseTimeDampening:g});return b&&ys(l,b)?b:null},yc=function(o){var l=o.state,c=o.dragStartTime,f=o.shouldUseTimeDampening,m=o.scrollWindow,g=o.scrollDroppable,v=l.current.page.borderBoxCenter,b=l.dimensions.draggables[l.critical.draggable.id],k=b.page.marginBox;if(l.isWindowScrollAllowed){var T=l.viewport,w=Uu({dragStartTime:c,viewport:T,subject:k,center:v,shouldUseTimeDampening:f});if(w){m(w);return}}var E=Hu({center:v,destination:bn(l.impact),droppables:l.dimensions.droppables});if(E){var L=Gu({dragStartTime:c,droppable:E,subject:k,center:v,shouldUseTimeDampening:f});L&&g(E.descriptor.id,L)}},qu=function(o){var l=o.scrollWindow,c=o.scrollDroppable,f=In(l),m=In(c),g=null,v=function(w){g||xe(!1);var E=g,L=E.shouldUseTimeDampening,P=E.dragStartTime;yc({state:w,scrollWindow:f,scrollDroppable:m,dragStartTime:P,shouldUseTimeDampening:L})},b=function(w){Ka(),g&&xe(!1);var E=Date.now(),L=!1,P=function(){L=!0};yc({state:w,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:P,scrollDroppable:P}),g={dragStartTime:E,shouldUseTimeDampening:L},Nr(),L&&v(w)},k=function(){g&&(f.cancel(),m.cancel(),g=null)};return{start:b,stop:k,scroll:v}},sl=function(o){var l=o.move,c=o.scrollDroppable,f=o.scrollWindow,m=function(T,w){var E=ke(T.current.client.selection,w);l({client:E})},g=function(T,w){if(!ys(T,w))return w;var E=ol(T,w);if(!E)return c(T.descriptor.id,w),null;var L=_e(w,E);c(T.descriptor.id,L);var P=_e(w,L);return P},v=function(T,w,E){if(!T||!Vo(w,E))return E;var L=ju(w,E);if(!L)return f(E),null;var P=_e(E,L);f(P);var te=_e(E,P);return te},b=function(T){var w=T.scrollJumpRequest;if(w){var E=bn(T.impact);E||xe(!1);var L=g(T.dimensions.droppables[E],w);if(L){var P=T.viewport,te=v(T.isWindowScrollAllowed,P,L);te&&m(T,te)}}};return b},wt=function(o){var l=o.scrollDroppable,c=o.scrollWindow,f=o.move,m=qu({scrollWindow:c,scrollDroppable:l}),g=sl({move:f,scrollWindow:c,scrollDroppable:l}),v=function(T){if(T.phase==="DRAGGING"){if(T.movementMode==="FLUID"){m.scroll(T);return}T.scrollJumpRequest&&g(T)}},b={scroll:v,start:m.start,stop:m.stop};return b},oi="data-rbd",Mo=function(){var o=oi+"-drag-handle";return{base:o,draggableId:o+"-draggable-id",contextId:o+"-context-id"}}(),ll=function(){var o=oi+"-draggable";return{base:o,contextId:o+"-context-id",id:o+"-id"}}(),hi=function(){var o=oi+"-droppable";return{base:o,contextId:o+"-context-id",id:o+"-id"}}(),Zo={contextId:oi+"-scroll-container-context-id"},Xu=function(l){return function(c){return"["+c+'="'+l+'"]'}},xs=function(l,c){return l.map(function(f){var m=f.styles[c];return m?f.selector+" { "+m+" }":""}).join(" ")},d0="pointer-events: none;",jo=function(o){var l=Xu(o),c=function(){var b=`
cursor: -webkit-grab;
cursor: grab;
`;return{selector:l(Mo.contextId),styles:{always:`
-webkit-touch-callout: none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
touch-action: manipulation;
`,resting:b,dragging:d0,dropAnimating:b}}}(),f=function(){var b=`
transition: `+wo.outOfTheWay+`;
`;return{selector:l(ll.contextId),styles:{dragging:b,dropAnimating:b,userCancel:b}}}(),m={selector:l(hi.contextId),styles:{always:"overflow-anchor: none;"}},g={selector:"body",styles:{dragging:`
cursor: grabbing;
cursor: -webkit-grabbing;
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
overflow-anchor: none;
`}},v=[f,c,m,g];return{always:xs(v,"always"),resting:xs(v,"resting"),dragging:xs(v,"dragging"),dropAnimating:xs(v,"dropAnimating"),userCancel:xs(v,"userCancel")}},wn=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?D.useLayoutEffect:D.useEffect,xc=function(){var l=document.querySelector("head");return l||xe(!1),l},$a=function(l){var c=document.createElement("style");return l&&c.setAttribute("nonce",l),c.type="text/css",c};function Ju(o,l){var c=Te(function(){return jo(o)},[o]),f=(0,D.useRef)(null),m=(0,D.useRef)(null),g=Ce(Fr(function(E){var L=m.current;L||xe(!1),L.textContent=E}),[]),v=Ce(function(E){var L=f.current;L||xe(!1),L.textContent=E},[]);wn(function(){!f.current&&!m.current||xe(!1);var E=$a(l),L=$a(l);return f.current=E,m.current=L,E.setAttribute(oi+"-always",o),L.setAttribute(oi+"-dynamic",o),xc().appendChild(E),xc().appendChild(L),v(c.always),g(c.resting),function(){var P=function(He){var qe=He.current;qe||xe(!1),xc().removeChild(qe),He.current=null};P(f),P(m)}},[l,v,g,c.always,c.resting,o]);var b=Ce(function(){return g(c.dragging)},[g,c.dragging]),k=Ce(function(E){if(E==="DROP"){g(c.dropAnimating);return}g(c.userCancel)},[g,c.dropAnimating,c.userCancel]),T=Ce(function(){m.current&&g(c.resting)},[g,c.resting]),w=Te(function(){return{dragging:b,dropping:k,resting:T}},[b,k,T]);return w}var cl=function(o){return o&&o.ownerDocument?o.ownerDocument.defaultView:window};function Co(o){return o instanceof cl(o).HTMLElement}function wc(o,l){var c="["+Mo.contextId+'="'+o+'"]',f=ft(document.querySelectorAll(c));if(!f.length)return null;var m=At(f,function(g){return g.getAttribute(Mo.draggableId)===l});return!m||!Co(m)?null:m}function Uo(o){var l=(0,D.useRef)({}),c=(0,D.useRef)(null),f=(0,D.useRef)(null),m=(0,D.useRef)(!1),g=Ce(function(L,P){var te={id:L,focus:P};return l.current[L]=te,function(){var qe=l.current,tt=qe[L];tt!==te&&delete qe[L]}},[]),v=Ce(function(L){var P=wc(o,L);P&&P!==document.activeElement&&P.focus()},[o]),b=Ce(function(L,P){c.current===L&&(c.current=P)},[]),k=Ce(function(){f.current||m.current&&(f.current=requestAnimationFrame(function(){f.current=null;var L=c.current;L&&v(L)}))},[v]),T=Ce(function(L){c.current=null;var P=document.activeElement;P&&P.getAttribute(Mo.draggableId)===L&&(c.current=L)},[]);wn(function(){return m.current=!0,function(){m.current=!1;var L=f.current;L&&cancelAnimationFrame(L)}},[]);var w=Te(function(){return{register:g,tryRecordFocus:T,tryRestoreFocusRecorded:k,tryShiftRecord:b}},[g,T,k,b]);return w}function Sc(){var o={draggables:{},droppables:{}},l=[];function c(E){return l.push(E),function(){var P=l.indexOf(E);P!==-1&&l.splice(P,1)}}function f(E){l.length&&l.forEach(function(L){return L(E)})}function m(E){return o.draggables[E]||null}function g(E){var L=m(E);return L||xe(!1),L}var v={register:function(L){o.draggables[L.descriptor.id]=L,f({type:"ADDITION",value:L})},update:function(L,P){var te=o.draggables[P.descriptor.id];te&&te.uniqueId===L.uniqueId&&(delete o.draggables[P.descriptor.id],o.draggables[L.descriptor.id]=L)},unregister:function(L){var P=L.descriptor.id,te=m(P);te&&L.uniqueId===te.uniqueId&&(delete o.draggables[P],f({type:"REMOVAL",value:L}))},getById:g,findById:m,exists:function(L){return!!m(L)},getAllByType:function(L){return $r(o.draggables).filter(function(P){return P.descriptor.type===L})}};function b(E){return o.droppables[E]||null}function k(E){var L=b(E);return L||xe(!1),L}var T={register:function(L){o.droppables[L.descriptor.id]=L},unregister:function(L){var P=b(L.descriptor.id);P&&L.uniqueId===P.uniqueId&&delete o.droppables[L.descriptor.id]},getById:k,findById:b,exists:function(L){return!!b(L)},getAllByType:function(L){return $r(o.droppables).filter(function(P){return P.descriptor.type===L})}};function w(){o.draggables={},o.droppables={},l.length=0}return{draggable:v,droppable:T,subscribe:c,clean:w}}function _c(){var o=Te(Sc,[]);return(0,D.useEffect)(function(){return function(){requestAnimationFrame(o.clean)}},[o]),o}var ul=D.createContext(null),ws=function(){var o=document.body;return o||xe(!1),o},f0={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},h0=function(l){return"rbd-announcement-"+l};function dl(o){var l=Te(function(){return h0(o)},[o]),c=(0,D.useRef)(null);(0,D.useEffect)(function(){var g=document.createElement("div");return c.current=g,g.id=l,g.setAttribute("aria-live","assertive"),g.setAttribute("aria-atomic","true"),(0,me.Z)(g.style,f0),ws().appendChild(g),function(){setTimeout(function(){var k=ws();k.contains(g)&&k.removeChild(g),g===c.current&&(c.current=null)})}},[l]);var f=Ce(function(m){var g=c.current;if(g){g.textContent=m;return}},[]);return f}var Yu=0,fl={separator:"::"};function Qu(){Yu=0}function hl(o,l){return l===void 0&&(l=fl),Te(function(){return""+o+l.separator+Yu++},[l.separator,o])}function p0(o){var l=o.contextId,c=o.uniqueId;return"rbd-hidden-text-"+l+"-"+c}function ed(o){var l=o.contextId,c=o.text,f=hl("hidden-text",{separator:"-"}),m=Te(function(){return p0({contextId:l,uniqueId:f})},[f,l]);return(0,D.useEffect)(function(){var v=document.createElement("div");return v.id=m,v.textContent=c,v.style.display="none",ws().appendChild(v),function(){var k=ws();k.contains(v)&&k.removeChild(v)}},[m,c]),m}var pl=D.createContext(null),m0={react:"^16.8.5","react-dom":"^16.8.5"},ml=/(\d+)\.(\d+)\.(\d+)/,kr=function(l){var c=ml.exec(l);c==null&&xe(!1);var f=Number(c[1]),m=Number(c[2]),g=Number(c[3]);return{major:f,minor:m,patch:g,raw:l}},sn=function(l,c){return c.major>l.major?!0:c.major<l.major?!1:c.minor>l.minor?!0:c.minor<l.minor?!1:c.patch>=l.patch},Eo=function(o,l){var c=kr(o),f=kr(l);sn(c,f)},g0=`
We expect a html5 doctype: <!doctype html>
This is to ensure consistent browser layout and measurement
More information: https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/doctype.md
`,Ai=function(o){var l=o.doctype;l&&(l.name.toLowerCase(),l.publicId)};function v0(o){}function Hi(o,l){}function td(){Hi(function(){Eo(m0.react,D.version),Ai(document)},[])}function Mc(o){var l=(0,D.useRef)(o);return(0,D.useEffect)(function(){l.current=o}),l}function b0(){var o=null;function l(){return!!o}function c(v){return v===o}function f(v){o&&xe(!1);var b={abandon:v};return o=b,b}function m(){o||xe(!1),o=null}function g(){o&&(o.abandon(),m())}return{isClaimed:l,isActive:c,claim:f,release:m,tryAbandon:g}}var Cc=9,Ss=13,ko=27,Ue=32,Ec=33,gl=34,vl=35,bl=36,y0=37,x0=38,w0=39,Ln=40,yl,kc=(yl={},yl[Ss]=!0,yl[Cc]=!0,yl),_s=function(o){kc[o.keyCode]&&o.preventDefault()},Do=function(){var o="visibilitychange";if(typeof document=="undefined")return o;var l=[o,"ms"+o,"webkit"+o,"moz"+o,"o"+o],c=At(l,function(f){return"on"+f in document});return c||o}(),Va=0,Ao=5;function Li(o,l){return Math.abs(l.x-o.x)>=Ao||Math.abs(l.y-o.y)>=Ao}var Za={type:"IDLE"};function si(o){var l=o.cancel,c=o.completed,f=o.getPhase,m=o.setPhase;return[{eventName:"mousemove",fn:function(v){var b=v.button,k=v.clientX,T=v.clientY;if(b===Va){var w={x:k,y:T},E=f();if(E.type==="DRAGGING"){v.preventDefault(),E.actions.move(w);return}E.type!=="PENDING"&&xe(!1);var L=E.point;if(Li(L,w)){v.preventDefault();var P=E.actions.fluidLift(w);m({type:"DRAGGING",actions:P})}}}},{eventName:"mouseup",fn:function(v){var b=f();if(b.type!=="DRAGGING"){l();return}v.preventDefault(),b.actions.drop({shouldBlockNextClick:!0}),c()}},{eventName:"mousedown",fn:function(v){f().type==="DRAGGING"&&v.preventDefault(),l()}},{eventName:"keydown",fn:function(v){var b=f();if(b.type==="PENDING"){l();return}if(v.keyCode===ko){v.preventDefault(),l();return}_s(v)}},{eventName:"resize",fn:l},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){f().type==="PENDING"&&l()}},{eventName:"webkitmouseforcedown",fn:function(v){var b=f();if(b.type==="IDLE"&&xe(!1),b.actions.shouldRespectForcePress()){l();return}v.preventDefault()}},{eventName:Do,fn:l}]}function ja(o){var l=(0,D.useRef)(Za),c=(0,D.useRef)(Et),f=Te(function(){return{eventName:"mousedown",fn:function(E){if(!E.defaultPrevented&&E.button===Va&&!(E.ctrlKey||E.metaKey||E.shiftKey||E.altKey)){var L=o.findClosestDraggableId(E);if(L){var P=o.tryGetLock(L,v,{sourceEvent:E});if(P){E.preventDefault();var te={x:E.clientX,y:E.clientY};c.current(),T(P,te)}}}}}},[o]),m=Te(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(E){if(!E.defaultPrevented){var L=o.findClosestDraggableId(E);if(L){var P=o.findOptionsForDraggable(L);P&&(P.shouldRespectForcePress||o.canGetLock(L)&&E.preventDefault())}}}}},[o]),g=Ce(function(){var E={passive:!1,capture:!0};c.current=jt(window,[m,f],E)},[m,f]),v=Ce(function(){var w=l.current;w.type!=="IDLE"&&(l.current=Za,c.current(),g())},[g]),b=Ce(function(){var w=l.current;v(),w.type==="DRAGGING"&&w.actions.cancel({shouldBlockNextClick:!0}),w.type==="PENDING"&&w.actions.abort()},[v]),k=Ce(function(){var E={capture:!0,passive:!1},L=si({cancel:b,completed:v,getPhase:function(){return l.current},setPhase:function(te){l.current=te}});c.current=jt(window,L,E)},[b,v]),T=Ce(function(E,L){l.current.type!=="IDLE"&&xe(!1),l.current={type:"PENDING",point:L,actions:E},k()},[k]);wn(function(){return g(),function(){c.current()}},[g])}var ua;function da(){}var rd=(ua={},ua[gl]=!0,ua[Ec]=!0,ua[bl]=!0,ua[vl]=!0,ua);function nd(o,l){function c(){l(),o.cancel()}function f(){l(),o.drop()}return[{eventName:"keydown",fn:function(g){if(g.keyCode===ko){g.preventDefault(),c();return}if(g.keyCode===Ue){g.preventDefault(),f();return}if(g.keyCode===Ln){g.preventDefault(),o.moveDown();return}if(g.keyCode===x0){g.preventDefault(),o.moveUp();return}if(g.keyCode===w0){g.preventDefault(),o.moveRight();return}if(g.keyCode===y0){g.preventDefault(),o.moveLeft();return}if(rd[g.keyCode]){g.preventDefault();return}_s(g)}},{eventName:"mousedown",fn:c},{eventName:"mouseup",fn:c},{eventName:"click",fn:c},{eventName:"touchstart",fn:c},{eventName:"resize",fn:c},{eventName:"wheel",fn:c,options:{passive:!0}},{eventName:Do,fn:c}]}function Dc(o){var l=(0,D.useRef)(da),c=Te(function(){return{eventName:"keydown",fn:function(g){if(g.defaultPrevented||g.keyCode!==Ue)return;var v=o.findClosestDraggableId(g);if(!v)return;var b=o.tryGetLock(v,w,{sourceEvent:g});if(!b)return;g.preventDefault();var k=!0,T=b.snapLift();l.current();function w(){k||xe(!1),k=!1,l.current(),f()}l.current=jt(window,nd(T,w),{capture:!0,passive:!1})}}},[o]),f=Ce(function(){var g={passive:!1,capture:!0};l.current=jt(window,[c],g)},[c]);wn(function(){return f(),function(){l.current()}},[f])}var Ac={type:"IDLE"},Zn=120,fa=.15;function S0(o){var l=o.cancel,c=o.getPhase;return[{eventName:"orientationchange",fn:l},{eventName:"resize",fn:l},{eventName:"contextmenu",fn:function(m){m.preventDefault()}},{eventName:"keydown",fn:function(m){if(c().type!=="DRAGGING"){l();return}m.keyCode===ko&&m.preventDefault(),l()}},{eventName:Do,fn:l}]}function id(o){var l=o.cancel,c=o.completed,f=o.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(g){var v=f();if(v.type!=="DRAGGING"){l();return}v.hasMoved=!0;var b=g.touches[0],k=b.clientX,T=b.clientY,w={x:k,y:T};g.preventDefault(),v.actions.move(w)}},{eventName:"touchend",fn:function(g){var v=f();if(v.type!=="DRAGGING"){l();return}g.preventDefault(),v.actions.drop({shouldBlockNextClick:!0}),c()}},{eventName:"touchcancel",fn:function(g){if(f().type!=="DRAGGING"){l();return}g.preventDefault(),l()}},{eventName:"touchforcechange",fn:function(g){var v=f();v.type==="IDLE"&&xe(!1);var b=g.touches[0];if(b){var k=b.force>=fa;if(k){var T=v.actions.shouldRespectForcePress();if(v.type==="PENDING"){T&&l();return}if(T){if(v.hasMoved){g.preventDefault();return}l();return}g.preventDefault()}}}},{eventName:Do,fn:l}]}function Lc(o){var l=(0,D.useRef)(Ac),c=(0,D.useRef)(Et),f=Ce(function(){return l.current},[]),m=Ce(function(P){l.current=P},[]),g=Te(function(){return{eventName:"touchstart",fn:function(P){if(!P.defaultPrevented){var te=o.findClosestDraggableId(P);if(te){var He=o.tryGetLock(te,b,{sourceEvent:P});if(He){var qe=P.touches[0],tt=qe.clientX,pt=qe.clientY,kt={x:tt,y:pt};c.current(),E(He,kt)}}}}}},[o]),v=Ce(function(){var P={capture:!0,passive:!1};c.current=jt(window,[g],P)},[g]),b=Ce(function(){var L=l.current;L.type!=="IDLE"&&(L.type==="PENDING"&&clearTimeout(L.longPressTimerId),m(Ac),c.current(),v())},[v,m]),k=Ce(function(){var L=l.current;b(),L.type==="DRAGGING"&&L.actions.cancel({shouldBlockNextClick:!0}),L.type==="PENDING"&&L.actions.abort()},[b]),T=Ce(function(){var P={capture:!0,passive:!1},te={cancel:k,completed:b,getPhase:f},He=jt(window,id(te),P),qe=jt(window,S0(te),P);c.current=function(){He(),qe()}},[k,f,b]),w=Ce(function(){var P=f();P.type!=="PENDING"&&xe(!1);var te=P.actions.fluidLift(P.point);m({type:"DRAGGING",actions:te,hasMoved:!1})},[f,m]),E=Ce(function(P,te){f().type!=="IDLE"&&xe(!1);var He=setTimeout(w,Zn);m({type:"PENDING",point:te,actions:P,longPressTimerId:He}),T()},[T,f,m,w]);wn(function(){return v(),function(){c.current();var te=f();te.type==="PENDING"&&(clearTimeout(te.longPressTimerId),m(Ac))}},[f,v,m]),wn(function(){var P=jt(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return P},[])}function Ar(o){}var Go={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Ua(o,l){if(l==null)return!1;var c=!!Go[l.tagName.toLowerCase()];if(c)return!0;var f=l.getAttribute("contenteditable");return f==="true"||f===""?!0:l===o?!1:Ua(o,l.parentElement)}function xl(o,l){var c=l.target;return Co(c)?Ua(o,c):!1}var Se=function(o){return Gt(o.getBoundingClientRect()).center};function _0(o){return o instanceof cl(o).Element}var M0=function(){var o="matches";if(typeof document=="undefined")return o;var l=[o,"msMatchesSelector","webkitMatchesSelector"],c=At(l,function(f){return f in Element.prototype});return c||o}();function wl(o,l){return o==null?null:o[M0](l)?o:wl(o.parentElement,l)}function C0(o,l){return o.closest?o.closest(l):wl(o,l)}function Ms(o){return"["+Mo.contextId+'="'+o+'"]'}function E0(o,l){var c=l.target;if(!_0(c))return null;var f=Ms(o),m=C0(c,f);return!m||!Co(m)?null:m}function k0(o,l){var c=E0(o,l);return c?c.getAttribute(Mo.draggableId):null}function Qn(o,l){var c="["+ll.contextId+'="'+o+'"]',f=ft(document.querySelectorAll(c)),m=At(f,function(g){return g.getAttribute(ll.id)===l});return!m||!Co(m)?null:m}function Ga(o){o.preventDefault()}function Lo(o){var l=o.expected,c=o.phase,f=o.isLockActive,m=o.shouldWarn;return!(!f()||l!==c)}function Cs(o){var l=o.lockAPI,c=o.store,f=o.registry,m=o.draggableId;if(l.isClaimed())return!1;var g=f.draggable.findById(m);return!(!g||!g.options.isEnabled||!pc(c.getState(),m))}function D0(o){var l=o.lockAPI,c=o.contextId,f=o.store,m=o.registry,g=o.draggableId,v=o.forceSensorStop,b=o.sourceEvent,k=Cs({lockAPI:l,store:f,registry:m,draggableId:g});if(!k)return null;var T=m.draggable.getById(g),w=Qn(c,T.descriptor.id);if(!w||b&&!T.options.canDragInteractiveElements&&xl(w,b))return null;var E=l.claim(v||Et),L="PRE_DRAG";function P(){return T.options.shouldRespectForcePress}function te(){return l.isActive(E)}function He(Tt,br){Lo({expected:Tt,phase:L,isLockActive:te,shouldWarn:!0})&&f.dispatch(br())}var qe=He.bind(null,"DRAGGING");function tt(Tt){function br(){l.release(),L="COMPLETED"}L!=="PRE_DRAG"&&(br(),L!=="PRE_DRAG"&&xe(!1)),f.dispatch(La(Tt.liftActionArgs)),L="DRAGGING";function mn(yr,Hr){if(Hr===void 0&&(Hr={shouldBlockNextClick:!1}),Tt.cleanup(),Hr.shouldBlockNextClick){var jn=jt(window,[{eventName:"click",fn:Ga,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(jn)}br(),f.dispatch(tc({reason:yr}))}return(0,me.Z)({isActive:function(){return Lo({expected:"DRAGGING",phase:L,isLockActive:te,shouldWarn:!1})},shouldRespectForcePress:P,drop:function(Hr){return mn("DROP",Hr)},cancel:function(Hr){return mn("CANCEL",Hr)}},Tt.actions)}function pt(Tt){var br=In(function(yr){qe(function(){return ec({client:yr})})}),mn=tt({liftActionArgs:{id:g,clientSelection:Tt,movementMode:"FLUID"},cleanup:function(){return br.cancel()},actions:{move:br}});return(0,me.Z)({},mn,{move:br})}function kt(){var Tt={moveUp:function(){return qe(fu)},moveRight:function(){return qe(pu)},moveDown:function(){return qe(hu)},moveLeft:function(){return qe(mu)}};return tt({liftActionArgs:{id:g,clientSelection:Se(w),movementMode:"SNAP"},cleanup:Et,actions:Tt})}function It(){var Tt=Lo({expected:"PRE_DRAG",phase:L,isLockActive:te,shouldWarn:!0});Tt&&l.release()}var cr={isActive:function(){return Lo({expected:"PRE_DRAG",phase:L,isLockActive:te,shouldWarn:!1})},shouldRespectForcePress:P,fluidLift:pt,snapLift:kt,abort:It};return cr}var A0=[ja,Dc,Lc];function Bc(o){var l=o.contextId,c=o.store,f=o.registry,m=o.customSensors,g=o.enableDefaultSensors,v=[].concat(g?A0:[],m||[]),b=(0,D.useState)(function(){return b0()})[0],k=Ce(function(pt,kt){pt.isDragging&&!kt.isDragging&&b.tryAbandon()},[b]);wn(function(){var pt=c.getState(),kt=c.subscribe(function(){var It=c.getState();k(pt,It),pt=It});return kt},[b,c,k]),wn(function(){return b.tryAbandon},[b.tryAbandon]);var T=Ce(function(tt){return Cs({lockAPI:b,registry:f,store:c,draggableId:tt})},[b,f,c]),w=Ce(function(tt,pt,kt){return D0({lockAPI:b,registry:f,contextId:l,store:c,draggableId:tt,forceSensorStop:pt,sourceEvent:kt&&kt.sourceEvent?kt.sourceEvent:null})},[l,b,f,c]),E=Ce(function(tt){return k0(l,tt)},[l]),L=Ce(function(tt){var pt=f.draggable.findById(tt);return pt?pt.options:null},[f.draggable]),P=Ce(function(){b.isClaimed()&&(b.tryAbandon(),c.getState().phase!=="IDLE"&&c.dispatch(Fn()))},[b,c]),te=Ce(b.isClaimed,[b]),He=Te(function(){return{canGetLock:T,tryGetLock:w,findClosestDraggableId:E,findOptionsForDraggable:L,tryReleaseLock:P,isLockClaimed:te}},[T,w,E,L,P,te]);Ar(v);for(var qe=0;qe<v.length;qe++)v[qe](He)}var ad=function(l){return{onBeforeCapture:l.onBeforeCapture,onBeforeDragStart:l.onBeforeDragStart,onDragStart:l.onDragStart,onDragEnd:l.onDragEnd,onDragUpdate:l.onDragUpdate}};function qa(o){return o.current||xe(!1),o.current}function pi(o){var l=o.contextId,c=o.setCallbacks,f=o.sensors,m=o.nonce,g=o.dragHandleUsageInstructions,v=(0,D.useRef)(null);td();var b=Mc(o),k=Ce(function(){return ad(b.current)},[b]),T=dl(l),w=ed({contextId:l,text:g}),E=Ju(l,m),L=Ce(function(yr){qa(v).dispatch(yr)},[]),P=Te(function(){return(0,H.DE)({publishWhileDragging:ou,updateDroppableScroll:lu,updateDroppableIsEnabled:cu,updateDroppableIsCombineEnabled:uu,collectionStarting:su},L)},[L]),te=_c(),He=Te(function(){return Fu(te,P)},[te,P]),qe=Te(function(){return wt((0,me.Z)({scrollWindow:rl,scrollDroppable:He.scrollDroppable},(0,H.DE)({move:ec},L)))},[He.scrollDroppable,L]),tt=Uo(l),pt=Te(function(){return Ru({announce:T,autoScroller:qe,dimensionMarshal:He,focusMarshal:tt,getResponders:k,styleMarshal:E})},[T,qe,He,tt,k,E]);v.current=pt;var kt=Ce(function(){var yr=qa(v),Hr=yr.getState();Hr.phase!=="IDLE"&&yr.dispatch(Fn())},[]),It=Ce(function(){var yr=qa(v).getState();return yr.isDragging||yr.phase==="DROP_ANIMATING"},[]),cr=Te(function(){return{isDragging:It,tryAbort:kt}},[It,kt]);c(cr);var Tt=Ce(function(yr){return pc(qa(v).getState(),yr)},[]),br=Ce(function(){return Ji(qa(v).getState())},[]),mn=Te(function(){return{marshal:He,focus:tt,contextId:l,canLift:Tt,isMovementAllowed:br,dragHandleUsageInstructionsId:w,registry:te}},[l,He,w,tt,Tt,br,te]);return Bc({contextId:l,store:pt,registry:te,customSensors:f,enableDefaultSensors:o.enableDefaultSensors!==!1}),(0,D.useEffect)(function(){return kt},[kt]),D.createElement(pl.Provider,{value:mn},D.createElement(Qe,{context:ul,store:pt},o.children))}var Xa=0;function od(){Xa=0}function sd(){return Te(function(){return""+Xa++},[])}function ld(){od(),Qu()}function L0(o){var l=sd(),c=o.dragHandleUsageInstructions||Ee.dragHandleUsageInstructions;return D.createElement(zr,null,function(f){return D.createElement(pi,{nonce:o.nonce,contextId:l,setCallbacks:f,dragHandleUsageInstructions:c,enableDefaultSensors:o.enableDefaultSensors,sensors:o.sensors,onBeforeCapture:o.onBeforeCapture,onBeforeDragStart:o.onBeforeDragStart,onDragStart:o.onDragStart,onDragUpdate:o.onDragUpdate,onDragEnd:o.onDragEnd},o.children)})}var Ic=function(l){return function(c){return l===c}},B0=Ic("scroll"),I0=Ic("auto"),cd=Ic("visible"),Qr=function(l,c){return c(l.overflowX)||c(l.overflowY)},$0=function(l,c){return c(l.overflowX)&&c(l.overflowY)},ud=function(l){var c=window.getComputedStyle(l),f={overflowX:c.overflowX,overflowY:c.overflowY};return Qr(f,B0)||Qr(f,I0)},Bo=function(){return!1;var l,c,f,m},dd=function o(l){return l==null?null:l===document.body?Bo()?l:null:l===document.documentElement?null:ud(l)?l:o(l.parentElement)},Sl=function(o){if(o)var l=dd(o.parentElement)},$c=function(o){return{x:o.scrollLeft,y:o.scrollTop}},fd=function o(l){if(!l)return!1;var c=window.getComputedStyle(l);return c.position==="fixed"?!0:o(l.parentElement)},hd=function(o){var l=dd(o),c=fd(o);return{closestScrollable:l,isFixedOnPage:c}},Es=function(o){var l=o.descriptor,c=o.isEnabled,f=o.isCombineEnabled,m=o.isFixedOnPage,g=o.direction,v=o.client,b=o.page,k=o.closest,T=function(){if(!k)return null;var P=k.scrollSize,te=k.client,He=dc({scrollHeight:P.scrollHeight,scrollWidth:P.scrollWidth,height:te.paddingBox.height,width:te.paddingBox.width});return{pageMarginBox:k.page.marginBox,frameClient:te,scrollSize:P,shouldClipSubject:k.shouldClipSubject,scroll:{initial:k.scroll,current:k.scroll,max:He,diff:{value:q,displacement:q}}}}(),w=g==="vertical"?Pn:_n,E=Ut({page:b,withPlaceholder:null,axis:w,frame:T}),L={descriptor:l,isCombineEnabled:f,isFixedOnPage:m,axis:w,isEnabled:c,client:v,page:b,frame:T,subject:E};return L},T0=function(l,c){var f=nn(l);if(!c||l!==c)return f;var m=f.paddingBox.top-c.scrollTop,g=f.paddingBox.left-c.scrollLeft,v=m+c.scrollHeight,b=g+c.scrollWidth,k={top:m,right:b,bottom:v,left:g},T=tr(k,f.border),w=Vr({borderBox:T,margin:f.margin,border:f.border,padding:f.padding});return w},pd=function(o){var l=o.ref,c=o.descriptor,f=o.env,m=o.windowScroll,g=o.direction,v=o.isDropDisabled,b=o.isCombineEnabled,k=o.shouldClipSubject,T=f.closestScrollable,w=T0(l,T),E=Vt(w,m),L=function(){if(!T)return null;var te=nn(T),He={scrollHeight:T.scrollHeight,scrollWidth:T.scrollWidth};return{client:te,page:Vt(te,m),scroll:$c(T),scrollSize:He,shouldClipSubject:k}}(),P=Es({descriptor:c,isEnabled:!v,isCombineEnabled:b,isFixedOnPage:f.isFixedOnPage,direction:g,client:w,page:E,closest:L});return P},Tc={passive:!1},md={passive:!0},gd=function(o){return o.shouldPublishImmediately?Tc:md};function _l(o){var l=(0,D.useContext)(o);return l||xe(!1),l}var Ml=function(l){return l&&l.env.closestScrollable||null};function P0(o){var l=(0,D.useRef)(null),c=_l(pl),f=hl("droppable"),m=c.registry,g=c.marshal,v=Mc(o),b=Te(function(){return{id:o.droppableId,type:o.type,mode:o.mode}},[o.droppableId,o.mode,o.type]),k=(0,D.useRef)(b),T=Te(function(){return Fr(function(It,cr){l.current||xe(!1);var Tt={x:It,y:cr};g.updateDroppableScroll(b.id,Tt)})},[b.id,g]),w=Ce(function(){var It=l.current;return!It||!It.env.closestScrollable?q:$c(It.env.closestScrollable)},[]),E=Ce(function(){var It=w();T(It.x,It.y)},[w,T]),L=Te(function(){return In(E)},[E]),P=Ce(function(){var It=l.current,cr=Ml(It);It&&cr||xe(!1);var Tt=It.scrollOptions;if(Tt.shouldPublishImmediately){E();return}L()},[L,E]),te=Ce(function(It,cr){l.current&&xe(!1);var Tt=v.current,br=Tt.getDroppableRef();br||xe(!1);var mn=hd(br),yr={ref:br,descriptor:b,env:mn,scrollOptions:cr};l.current=yr;var Hr=pd({ref:br,descriptor:b,env:mn,windowScroll:It,direction:Tt.direction,isDropDisabled:Tt.isDropDisabled,isCombineEnabled:Tt.isCombineEnabled,shouldClipSubject:!Tt.ignoreContainerClipping}),jn=mn.closestScrollable;return jn&&(jn.setAttribute(Zo.contextId,c.contextId),jn.addEventListener("scroll",P,gd(yr.scrollOptions))),Hr},[c.contextId,b,P,v]),He=Ce(function(){var It=l.current,cr=Ml(It);return It&&cr||xe(!1),$c(cr)},[]),qe=Ce(function(){var It=l.current;It||xe(!1);var cr=Ml(It);l.current=null,cr&&(L.cancel(),cr.removeAttribute(Zo.contextId),cr.removeEventListener("scroll",P,gd(It.scrollOptions)))},[P,L]),tt=Ce(function(It){var cr=l.current;cr||xe(!1);var Tt=Ml(cr);Tt||xe(!1),Tt.scrollTop+=It.y,Tt.scrollLeft+=It.x},[]),pt=Te(function(){return{getDimensionAndWatchScroll:te,getScrollWhileDragging:He,dragStopped:qe,scroll:tt}},[qe,te,He,tt]),kt=Te(function(){return{uniqueId:f,descriptor:b,callbacks:pt}},[pt,b,f]);wn(function(){return k.current=kt.descriptor,m.droppable.register(kt),function(){l.current&&qe(),m.droppable.unregister(kt)}},[pt,b,qe,kt,g,m.droppable]),wn(function(){l.current&&g.updateDroppableIsEnabled(k.current.id,!o.isDropDisabled)},[o.isDropDisabled,g]),wn(function(){l.current&&g.updateDroppableIsCombineEnabled(k.current.id,o.isCombineEnabled)},[o.isCombineEnabled,g])}function Pc(){}var vd={width:0,height:0,margin:Tr},R0=function(l){var c=l.isAnimatingOpenOnMount,f=l.placeholder,m=l.animate;return c||m==="close"?vd:{height:f.client.borderBox.height,width:f.client.borderBox.width,margin:f.client.margin}},O0=function(l){var c=l.isAnimatingOpenOnMount,f=l.placeholder,m=l.animate,g=R0({isAnimatingOpenOnMount:c,placeholder:f,animate:m});return{display:f.display,boxSizing:"border-box",width:g.width,height:g.height,marginTop:g.margin.top,marginRight:g.margin.right,marginBottom:g.margin.bottom,marginLeft:g.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:m!=="none"?wo.placeholder:null}};function Ja(o){var l=(0,D.useRef)(null),c=Ce(function(){l.current&&(clearTimeout(l.current),l.current=null)},[]),f=o.animate,m=o.onTransitionEnd,g=o.onClose,v=o.contextId,b=(0,D.useState)(o.animate==="open"),k=b[0],T=b[1];(0,D.useEffect)(function(){return k?f!=="open"?(c(),T(!1),Pc):l.current?Pc:(l.current=setTimeout(function(){l.current=null,T(!1)}),c):Pc},[f,k,c]);var w=Ce(function(L){L.propertyName==="height"&&(m(),f==="close"&&g())},[f,g,m]),E=O0({isAnimatingOpenOnMount:k,animate:o.animate,placeholder:o.placeholder});return D.createElement(o.placeholder.tagName,{style:E,"data-rbd-placeholder-context-id":v,onTransitionEnd:w,ref:o.innerRef})}var Io=D.memo(Ja),Ya=D.createContext(null);function ha(o){o&&Co(o)||xe(!1)}function Yi(o){return typeof o=="boolean"}function pa(o,l){l.forEach(function(c){return c(o)})}var Cl=[function(l){var c=l.props;c.droppableId||xe(!1),typeof c.droppableId!="string"&&xe(!1)},function(l){var c=l.props;Yi(c.isDropDisabled)||xe(!1),Yi(c.isCombineEnabled)||xe(!1),Yi(c.ignoreContainerClipping)||xe(!1)},function(l){var c=l.getDroppableRef;ha(c())}],El=[function(l){var c=l.props,f=l.getPlaceholderRef;if(c.placeholder)var m=f()}],kl=[function(l){var c=l.props;c.renderClone||xe(!1)},function(l){var c=l.getPlaceholderRef;c()&&xe(!1)}];function Dl(o){Hi(function(){pa(o,Cl),o.props.mode==="standard"&&pa(o,El),o.props.mode==="virtual"&&pa(o,kl)})}var N0=function(o){ye(l,o);function l(){for(var f,m=arguments.length,g=new Array(m),v=0;v<m;v++)g[v]=arguments[v];return f=o.call.apply(o,[this].concat(g))||this,f.state={isVisible:!!f.props.on,data:f.props.on,animate:f.props.shouldAnimate&&f.props.on?"open":"none"},f.onClose=function(){f.state.animate==="close"&&f.setState({isVisible:!1})},f}l.getDerivedStateFromProps=function(m,g){return m.shouldAnimate?m.on?{isVisible:!0,data:m.on,animate:"open"}:g.isVisible?{isVisible:!0,data:g.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!m.on,data:m.on,animate:"none"}};var c=l.prototype;return c.render=function(){if(!this.state.isVisible)return null;var m={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(m)},l}(D.PureComponent),Rc={dragging:5e3,dropAnimating:4500},bd=function(l,c){return c?wo.drop(c.duration):l?wo.snap:wo.fluid},yd=function(l,c){return l?c?Ha.opacity.drop:Ha.opacity.combining:null},F0=function(l){return l.forceShouldAnimate!=null?l.forceShouldAnimate:l.mode==="SNAP"};function xd(o){var l=o.dimension,c=l.client,f=o.offset,m=o.combineWith,g=o.dropping,v=!!m,b=F0(o),k=!!g,T=k?Ki.drop(f,v):Ki.moveTo(f),w={position:"fixed",top:c.marginBox.top,left:c.marginBox.left,boxSizing:"border-box",width:c.borderBox.width,height:c.borderBox.height,transition:bd(b,g),transform:T,opacity:yd(v,k),zIndex:k?Rc.dropAnimating:Rc.dragging,pointerEvents:"none"};return w}function z0(o){return{transform:Ki.moveTo(o.offset),transition:o.shouldAnimateDisplacement?null:"none"}}function K0(o){return o.type==="DRAGGING"?xd(o):z0(o)}function H0(o,l,c){c===void 0&&(c=q);var f=window.getComputedStyle(l),m=l.getBoundingClientRect(),g=rn(m,f),v=Vt(g,c),b={client:g,tagName:l.tagName.toLowerCase(),display:f.display},k={x:g.marginBox.width,y:g.marginBox.height},T={descriptor:o,placeholder:b,displaceBy:k,client:g,page:v};return T}function W0(o){var l=hl("draggable"),c=o.descriptor,f=o.registry,m=o.getDraggableRef,g=o.canDragInteractiveElements,v=o.shouldRespectForcePress,b=o.isEnabled,k=Te(function(){return{canDragInteractiveElements:g,shouldRespectForcePress:v,isEnabled:b}},[g,b,v]),T=Ce(function(P){var te=m();return te||xe(!1),H0(c,te,P)},[c,m]),w=Te(function(){return{uniqueId:l,descriptor:c,options:k,getDimension:T}},[c,T,k,l]),E=(0,D.useRef)(w),L=(0,D.useRef)(!0);wn(function(){return f.draggable.register(E.current),function(){return f.draggable.unregister(E.current)}},[f.draggable]),wn(function(){if(L.current){L.current=!1;return}var P=E.current;E.current=w,f.draggable.update(w,P)},[w,f.draggable])}function V0(o,l,c){Hi(function(){function f(g){return"Draggable[id: "+g+"]: "}var m=o.draggableId;m||xe(!1),typeof m!="string"&&xe(!1),dr(o.index)||xe(!1),o.mapped.type!=="DRAGGING"&&(ha(c()),o.isEnabled&&(wc(l,m)||xe(!1)))})}function Z0(o){}function j0(o){o.preventDefault()}function Al(o){var l=(0,D.useRef)(null),c=Ce(function(yr){l.current=yr},[]),f=Ce(function(){return l.current},[]),m=_l(pl),g=m.contextId,v=m.dragHandleUsageInstructionsId,b=m.registry,k=_l(Ya),T=k.type,w=k.droppableId,E=Te(function(){return{id:o.draggableId,index:o.index,type:T,droppableId:w}},[o.draggableId,o.index,T,w]),L=o.children,P=o.draggableId,te=o.isEnabled,He=o.shouldRespectForcePress,qe=o.canDragInteractiveElements,tt=o.isClone,pt=o.mapped,kt=o.dropAnimationFinished;if(V0(o,g,f),Z0(tt),!tt){var It=Te(function(){return{descriptor:E,registry:b,getDraggableRef:f,canDragInteractiveElements:qe,shouldRespectForcePress:He,isEnabled:te}},[E,b,f,qe,He,te]);W0(It)}var cr=Te(function(){return te?{tabIndex:0,role:"button","aria-describedby":v,"data-rbd-drag-handle-draggable-id":P,"data-rbd-drag-handle-context-id":g,draggable:!1,onDragStart:j0}:null},[g,v,P,te]),Tt=Ce(function(yr){pt.type==="DRAGGING"&&pt.dropping&&yr.propertyName==="transform"&&kt()},[kt,pt]),br=Te(function(){var yr=K0(pt),Hr=pt.type==="DRAGGING"&&pt.dropping?Tt:null,jn={innerRef:c,draggableProps:{"data-rbd-draggable-context-id":g,"data-rbd-draggable-id":P,style:yr,onTransitionEnd:Hr},dragHandleProps:cr};return jn},[g,cr,P,pt,Tt,c]),mn=Te(function(){return{draggableId:E.id,type:E.type,source:{index:E.index,droppableId:E.droppableId}}},[E.droppableId,E.id,E.index,E.type]);return L(br,pt.snapshot,mn)}var qo=function(o,l){return o===l},Qa=function(o){var l=o.combine,c=o.destination;return c?c.droppableId:l?l.droppableId:null},Ta=function(l){return l.combine?l.combine.draggableId:null},wd=function(l){return l.at&&l.at.type==="COMBINE"?l.at.combine.draggableId:null};function Sd(){var o=Fr(function(m,g){return{x:m,y:g}}),l=Fr(function(m,g,v,b,k){return{isDragging:!0,isClone:g,isDropAnimating:!!k,dropAnimation:k,mode:m,draggingOver:v,combineWith:b,combineTargetFor:null}}),c=Fr(function(m,g,v,b,k,T,w){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:k,combineWith:T,mode:g,offset:m,dimension:v,forceShouldAnimate:w,snapshot:l(g,b,k,T,null)}}}),f=function(g,v){if(g.isDragging){if(g.critical.draggable.id!==v.draggableId)return null;var b=g.current.client.offset,k=g.dimensions.draggables[v.draggableId],T=bn(g.impact),w=wd(g.impact),E=g.forceShouldAnimate;return c(o(b.x,b.y),g.movementMode,k,v.isClone,T,w,E)}if(g.phase==="DROP_ANIMATING"){var L=g.completed;if(L.result.draggableId!==v.draggableId)return null;var P=v.isClone,te=g.dimensions.draggables[v.draggableId],He=L.result,qe=He.mode,tt=Qa(He),pt=Ta(He),kt=g.dropDuration,It={duration:kt,curve:qs.drop,moveTo:g.newHomeClientOffset,opacity:pt?Ha.opacity.drop:null,scale:pt?Ha.scale.drop:null};return{mapped:{type:"DRAGGING",offset:g.newHomeClientOffset,dimension:te,dropping:It,draggingOver:tt,combineWith:pt,mode:qe,forceShouldAnimate:null,snapshot:l(qe,P,tt,pt,It)}}}return null};return f}function Oc(o){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:o,combineWith:null}}var U0={mapped:{type:"SECONDARY",offset:q,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Oc(null)}};function G0(){var o=Fr(function(v,b){return{x:v,y:b}}),l=Fr(Oc),c=Fr(function(v,b,k){return b===void 0&&(b=null),{mapped:{type:"SECONDARY",offset:v,combineTargetFor:b,shouldAnimateDisplacement:k,snapshot:l(b)}}}),f=function(b){return b?c(q,b,!0):null},m=function(b,k,T,w){var E=T.displaced.visible[b],L=!!(w.inVirtualList&&w.effected[b]),P=Pr(T),te=P&&P.draggableId===b?k:null;if(!E){if(!L)return f(te);if(T.displaced.invisible[b])return null;var He=vt(w.displacedBy.point),qe=o(He.x,He.y);return c(qe,te,!0)}if(L)return f(te);var tt=T.displacedBy.point,pt=o(tt.x,tt.y);return c(pt,te,E.shouldAnimate)},g=function(b,k){if(b.isDragging)return b.critical.draggable.id===k.draggableId?null:m(k.draggableId,b.critical.draggable.id,b.impact,b.afterCritical);if(b.phase==="DROP_ANIMATING"){var T=b.completed;return T.result.draggableId===k.draggableId?null:m(k.draggableId,T.result.draggableId,T.impact,T.afterCritical)}return null};return g}var _d=function(){var l=Sd(),c=G0(),f=function(g,v){return l(g,v)||c(g,v)||U0};return f},q0={dropAnimationFinished:nc},X0=ee(_d,q0,null,{context:ul,pure:!0,areStatePropsEqual:qo})(Al);function Md(o){var l=_l(Ya),c=l.isUsingCloneFor;return c===o.draggableId&&!o.isClone?null:D.createElement(X0,o)}function jr(o){var l=typeof o.isDragDisabled=="boolean"?!o.isDragDisabled:!0,c=!!o.disableInteractiveElementBlocking,f=!!o.shouldRespectForcePress;return D.createElement(Md,(0,me.Z)({},o,{isClone:!1,isEnabled:l,canDragInteractiveElements:c,shouldRespectForcePress:f}))}function Ll(o){var l=(0,D.useContext)(pl);l||xe(!1);var c=l.contextId,f=l.isMovementAllowed,m=(0,D.useRef)(null),g=(0,D.useRef)(null),v=o.children,b=o.droppableId,k=o.type,T=o.mode,w=o.direction,E=o.ignoreContainerClipping,L=o.isDropDisabled,P=o.isCombineEnabled,te=o.snapshot,He=o.useClone,qe=o.updateViewportMaxScroll,tt=o.getContainerForClone,pt=Ce(function(){return m.current},[]),kt=Ce(function(Bn){m.current=Bn},[]),It=Ce(function(){return g.current},[]),cr=Ce(function(Bn){g.current=Bn},[]);Dl({props:o,getDroppableRef:pt,getPlaceholderRef:It});var Tt=Ce(function(){f()&&qe({maxScroll:_o()})},[f,qe]);P0({droppableId:b,type:k,mode:T,direction:w,isDropDisabled:L,isCombineEnabled:P,ignoreContainerClipping:E,getDroppableRef:pt});var br=D.createElement(N0,{on:o.placeholder,shouldAnimate:o.shouldAnimatePlaceholder},function(Bn){var xi=Bn.onClose,Wi=Bn.data,Bi=Bn.animate;return D.createElement(Io,{placeholder:Wi,onClose:xi,innerRef:cr,animate:Bi,contextId:c,onTransitionEnd:Tt})}),mn=Te(function(){return{innerRef:kt,placeholder:br,droppableProps:{"data-rbd-droppable-id":b,"data-rbd-droppable-context-id":c}}},[c,b,br,kt]),yr=He?He.dragging.draggableId:null,Hr=Te(function(){return{droppableId:b,type:k,isUsingCloneFor:yr}},[b,yr,k]);function jn(){if(!He)return null;var Bn=He.dragging,xi=He.render,Wi=D.createElement(Md,{draggableId:Bn.draggableId,index:Bn.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(Bi,Ii){return xi(Bi,Ii,Bn)});return N.createPortal(Wi,tt())}return D.createElement(Ya.Provider,{value:Hr},v(mn,te),jn())}var Xo=function(l,c){return l===c.droppable.type},Cd=function(l,c){return c.draggables[l.draggable.id]},eo=function(){var l={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},c=(0,me.Z)({},l,{shouldAnimatePlaceholder:!1}),f=Fr(function(v){return{draggableId:v.id,type:v.type,source:{index:v.index,droppableId:v.droppableId}}}),m=Fr(function(v,b,k,T,w,E){var L=w.descriptor.id,P=w.descriptor.droppableId===v;if(P){var te=E?{render:E,dragging:f(w.descriptor)}:null,He={isDraggingOver:k,draggingOverWith:k?L:null,draggingFromThisWith:L,isUsingPlaceholder:!0};return{placeholder:w.placeholder,shouldAnimatePlaceholder:!1,snapshot:He,useClone:te}}if(!b)return c;if(!T)return l;var qe={isDraggingOver:k,draggingOverWith:L,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:w.placeholder,shouldAnimatePlaceholder:!0,snapshot:qe,useClone:null}}),g=function(b,k){var T=k.droppableId,w=k.type,E=!k.isDropDisabled,L=k.renderClone;if(b.isDragging){var P=b.critical;if(!Xo(w,P))return c;var te=Cd(P,b.dimensions),He=bn(b.impact)===T;return m(T,E,He,He,te,L)}if(b.phase==="DROP_ANIMATING"){var qe=b.completed;if(!Xo(w,qe.critical))return c;var tt=Cd(qe.critical,b.dimensions);return m(T,E,Qa(qe.result)===T,bn(qe.impact)===T,tt,L)}if(b.phase==="IDLE"&&b.completed&&!b.shouldFlush){var pt=b.completed;if(!Xo(w,pt.critical))return c;var kt=bn(pt.impact)===T,It=!!(pt.impact.at&&pt.impact.at.type==="COMBINE"),cr=pt.critical.droppable.id===T;return kt?It?l:c:cr?l:c}return c};return g},Ed={updateViewportMaxScroll:du};function $o(){return document.body||xe(!1),document.body}var kd={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:$o},cn=ee(eo,Ed,null,{context:ul,pure:!0,areStatePropsEqual:qo})(Ll);cn.defaultProps=kd},38486:function(wr,xt){"use strict";var x;var D=60103,G=60106,ye=60107,me=60108,H=60114,Y=60109,he=60110,S=60112,_=60113,Ge=60120,Ze=60115,A=60116,R=60121,Ne=60122,mt=60117,gt=60129,Qe=60131;if(typeof Symbol=="function"&&Symbol.for){var Ie=Symbol.for;D=Ie("react.element"),G=Ie("react.portal"),ye=Ie("react.fragment"),me=Ie("react.strict_mode"),H=Ie("react.profiler"),Y=Ie("react.provider"),he=Ie("react.context"),S=Ie("react.forward_ref"),_=Ie("react.suspense"),Ge=Ie("react.suspense_list"),Ze=Ie("react.memo"),A=Ie("react.lazy"),R=Ie("react.block"),Ne=Ie("react.server.block"),mt=Ie("react.fundamental"),gt=Ie("react.debug_trace_mode"),Qe=Ie("react.legacy_hidden")}function Ft(ge){if(typeof ge=="object"&&ge!==null){var ve=ge.$$typeof;switch(ve){case D:switch(ge=ge.type,ge){case ye:case H:case me:case _:case Ge:return ge;default:switch(ge=ge&&ge.$$typeof,ge){case he:case S:case A:case Ze:case Y:return ge;default:return ve}}case G:return ve}}}var Me=Y,we=D,O=S,z=ye,Q=A,ne=Ze,We=G,fe=H,st=me,lt=_;x=he,x=Me,x=we,x=O,x=z,x=Q,x=ne,x=We,x=fe,x=st,x=lt,x=function(){return!1},x=function(){return!1},xt.isContextConsumer=function(ge){return Ft(ge)===he},x=function(ge){return Ft(ge)===Y},x=function(ge){return typeof ge=="object"&&ge!==null&&ge.$$typeof===D},x=function(ge){return Ft(ge)===S},x=function(ge){return Ft(ge)===ye},x=function(ge){return Ft(ge)===A},x=function(ge){return Ft(ge)===Ze},x=function(ge){return Ft(ge)===G},x=function(ge){return Ft(ge)===H},x=function(ge){return Ft(ge)===me},x=function(ge){return Ft(ge)===_},x=function(ge){return typeof ge=="string"||typeof ge=="function"||ge===ye||ge===H||ge===gt||ge===me||ge===_||ge===Ge||ge===Qe||typeof ge=="object"&&ge!==null&&(ge.$$typeof===A||ge.$$typeof===Ze||ge.$$typeof===Y||ge.$$typeof===he||ge.$$typeof===S||ge.$$typeof===mt||ge.$$typeof===R||ge[0]===Ne)},x=Ft},53410:function(wr,xt,x){"use strict";wr.exports=x(38486)},48136:function(wr,xt,x){"use strict";var D=Object.defineProperty,G=Object.defineProperties,ye=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,H=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable,he=(e,t,r)=>t in e?D(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,S=(e,t)=>{for(var r in t||(t={}))H.call(t,r)&&he(e,r,t[r]);if(me)for(var r of me(t))Y.call(t,r)&&he(e,r,t[r]);return e},_=(e,t)=>G(e,ye(t)),Ge=e=>typeof e=="symbol"?e:e+"",Ze=(e,t)=>{var r={};for(var n in e)H.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&me)for(var n of me(e))t.indexOf(n)<0&&Y.call(e,n)&&(r[n]=e[n]);return r};function A(e){return Array.isArray(e)}var R={en:{"keyboard.tooltip.symbols":"\u7B26\u53F7","keyboard.tooltip.greek":"\u5E0C\u814A\u5B57\u6BCD","keyboard.tooltip.numeric":"\u6570\u5B57","keyboard.tooltip.alphabetic":"\u7F57\u9A6C\u5B57\u6BCD","tooltip.cut to clipboard":"\u526A\u5207\u5230\u526A\u8D34\u677F","tooltip.copy to clipboard":"\u590D\u5236\u5230\u526A\u8D34\u677F","tooltip.paste from clipboard":"\u7C98\u8D34","tooltip.redo":"\u91CD\u505A","tooltip.toggle virtual keyboard":"\u5207\u6362\u865A\u62DF\u952E\u76D8","tooltip.undo":"\u64A4\u6D88","menu.insert matrix":"\u63D2\u5165\u77E9\u9635","menu.borders":"\u77E9\u9635\u5206\u9694\u7B26","menu.array.add row above":"\u5728\u540E\u9762\u6DFB\u52A0\u884C","menu.array.add row below":"\u5728\u524D\u9762\u6DFB\u52A0\u884C","menu.array.add column after":"\u5728\u540E\u9762\u6DFB\u52A0\u5217r","menu.array.add column before":"\u5728\u524D\u9762\u6DFB\u52A0\u5217","menu.array.delete row":"\u5220\u9664\u884C","menu.array.delete rows":"\u5220\u9664\u9009\u5B9A\u884C","menu.array.delete column":"\u5220\u9664\u5217","menu.array.delete columns":"\u5220\u9664\u9009\u5B9A\u7684\u5217","menu.mode":"\u6A21\u5F0F","menu.mode-math":"\u6570\u5B66","menu.mode-text":"\u6587\u672C","menu.mode-latex":"LaTeX","tooltip.blackboard":"\u9ED1\u677F","tooltip.bold":"\u7C97\u4F53","tooltip.italic":"\u659C\u4F53","tooltip.fraktur":"Fraktur","tooltip.script":"\u811A\u672C","tooltip.caligraphic":"\u8349\u4E66","tooltip.typewriter":"\u6253\u5B57\u673A","tooltip.roman-upright":"\u7F57\u9A6C\u76F4\u7ACB","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"\u5B57\u4F53\u6837\u5F0F","menu.accent":"\u91CD\u97F3","menu.decoration":"\u88C5\u9970","menu.color":"\u989C\u8272","menu.background-color":"\u80CC\u666F","menu.evaluate":"\u8BA1\u7B97","menu.simplify":"\u7B80\u5316","menu.solve":"\u6C42\u89E3","menu.solve-for":"\u6C42\u89E3 %@","menu.cut":"\u526A\u5207","menu.copy":"\u590D\u5236","menu.copy-as-latex":"\u590D\u5236\u4E3A LaTeX","menu.copy-as-ascii-math":"\u590D\u5236\u4E3A ASCII Math","menu.copy-as-mathml":"\u590D\u5236\u4E3A MathML","menu.paste":"\u7C98\u8D34","menu.select-all":"\u5168\u9009","color.red":"\u7EA2\u8272","color.orange":"\u6A59\u8272","color.yellow":"\u9EC4\u8272","color.lime":"\u7EFF\u9EC4\u8272","color.green":"\u7EFF\u8272","color.teal":"\u9752\u8272","color.cyan":"\u84DD\u7EFF\u8272","color.blue":"\u84DD\u8272","color.indigo":"\u975B\u84DD\u8272","color.purple":"\u7D2B\u8272","color.magenta":"\u6D0B\u7EA2\u8272","color.black":"\u9ED1\u8272","color.dark-grey":"\u6DF1\u7070\u8272","color.grey":"\u7070\u8272","color.light-grey":"\u6D45\u7070\u8272","color.white":"\u767D\u8272"}};function Ne(){return"window"in globalThis&&"document"in globalThis}function mt(){return"matchMedia"in window?window.matchMedia("(pointer: coarse)").matches:"ontouchstart"in window||navigator.maxTouchPoints>0}function gt(){return typeof navigator.vibrate=="function"}function Qe(){var e,t;if(!Ne())return"other";const r=(t=(e=navigator.userAgentData)==null?void 0:e.platform)!=null?t:navigator.platform;return/^mac/i.test(r)?navigator.maxTouchPoints===5?"ios":"macos":/^win/i.test(r)?"windows":/android/i.test(navigator.userAgent)?"android":/iphone|ipod|ipad/i.test(navigator.userAgent)?"ios":/\bcros\b/i.test(navigator.userAgent)?"chromeos":"other"}function Ie(){if(!Ne())return!0;if(/firefox/i.test(navigator.userAgent)){const e=navigator.userAgent.match(/firefox\/(\d+)/i);return e?parseInt(e[1])>=78:!1}if(/trident/i.test(navigator.userAgent))return!1;if(/edge/i.test(navigator.userAgent)){const e=navigator.userAgent.match(/edg\/(\d+)/i);return e?parseInt(e[1])>=79:!1}return!0}function Ft(){return HTMLElement.prototype.hasOwnProperty("popover")}var Me={strings:R,_locale:"",_dirty:!1,_subscribers:[],_numberFormatter:void 0,get locale(){return Me._locale||(Me._locale=Ne()?navigator.language.slice(0,5):"en-US"),Me._locale},set locale(e){Me._locale=e,Me._numberFormatter=void 0,Me.dirty=!0},get numberFormatter(){return Me._numberFormatter||(Me._numberFormatter=new Intl.NumberFormat(Me.locale)),Me._numberFormatter},merge(e,t){if(typeof e=="string"&&t)Me.strings[e]=S(S({},Me.strings[e]),t),Me.dirty=!0;else for(const r of Object.keys(e))Me.merge(r,e[r])},get dirty(){return Me._dirty},set dirty(e){Me._dirty||Me._dirty===e||(Me._dirty=!0,setTimeout(()=>{Me._dirty=!1,this._subscribers.forEach(t=>t==null?void 0:t())},0))},subscribe(e){return Me._subscribers.push(e),Me._subscribers.length-1},unsubscribe(e){e<0||e>=Me._subscribers.length||(Me._subscribers[e]=void 0)},update(e){let t=e.querySelectorAll("[data-l10n-tooltip]");for(const r of t){const n=r.getAttribute("data-l10n-tooltip");if(n){const i=we(n);i&&r.setAttribute("data-tooltip",i)}}t=e.querySelectorAll("[data-l10n-arial-label]");for(const r of t){const n=r.getAttribute("data-l10n-arial-label");if(n){const i=we(n);i&&r.setAttribute("aria-label",i)}}}};function we(e,...t){if(e===void 0)return;let r="";const n=Me.locale;Me.strings[n]&&(r=Me.strings[n][e]);const i=n.slice(0,2);if(!r&&Me.strings[i]&&(r=Me.strings[i][e]),r||(r=Me.strings.en[e]),!r)return;const a=/(%@|%([0-9]+)\$@)/g;let s=a.exec(r),u=0;for(;s;){if(t[u++]){const h=s[2]?parseInt(s[2],10)-1:u-1;let p=t[h];typeof p=="number"&&(p=Me.numberFormatter.format(p)),r=r.replace(s[1],p)}s=a.exec(r)}return r=r.replace(/%%/g,"%"),r}var O={m0:"#3F3D99",m1:"#993D71",m2:"#998B3D",m3:"#3D9956",m4:"#3D5A99",m5:"#993D90",m6:"#996D3D",m7:"#43993D",m8:"#3D7999",m9:"#843D99"},z={blue:"#0072BD",orange:"#D95319",yellow:"#EDB120",purple:"#7E2F8E",green:"#77AC30",cyan:"#4DBEEE",red:"#A2142F"},Q={red:"#fbbbb6",orange:"#ffe0c2",yellow:"#fff1c2",lime:"#d0e8b9",green:"#bceac4",teal:"#b9f1f1",cyan:"#b8e5c9",blue:"#b6d9fb",indigo:"#d1c2f0",purple:"#e3baf8",magenta:"#f9c8e0",black:"#353535","dark-grey":"#8C8C8C",grey:"#D0D0D0","light-grey":"#F0F0F0",white:"#ffffff"},ne={red:"#d7170b",orange:"#fe8a2b",yellow:"#ffc02b",lime:"#63b215",green:"#21ba3a",teal:"#17cfcf",cyan:"#13a7ec",blue:"#0d80f2",indigo:"#63c",purple:"#a219e6",magenta:"#eb4799",black:"#000","dark-grey":"#666",grey:"#A6A6A6","light-grey":"#d4d5d2",white:"#ffffff"},We={Red:"red",Orange:"orange",Yellow:"yellow",LimeGreen:"lime",Green:"green",TealBlue:"teal",Blue:"blue",Violet:"indigo",Purple:"purple",Magenta:"magenta",Black:"black",Gray:"grey",White:"white"},fe={Apricot:"#FBB982",Aquamarine:"#00B5BE",Bittersweet:"#C04F17",Black:"#221E1F",Blue:"#2D2F92",BlueGreen:"#00B3B8",BlueViolet:"#473992",BrickRed:"#B6321C",Brown:"#792500",BurntOrange:"#F7921D",CadetBlue:"#74729A",CarnationPink:"#F282B4",Cerulean:"#00A2E3",CornflowerBlue:"#41B0E4",Cyan:"#00AEEF",Dandelion:"#FDBC42",DarkOrchid:"#A4538A",Emerald:"#00A99D",ForestGreen:"#009B55",Fuchsia:"#8C368C",Goldenrod:"#FFDF42",Gray:"#949698",Green:"#00A64F",GreenYellow:"#DFE674",JungleGreen:"#00A99A",Lavender:"#F49EC4",Limegreen:"#8DC73E",Magenta:"#EC008C",Mahogany:"#A9341F",Maroon:"#AF3235",Melon:"#F89E7B",MidnightBlue:"#006795",Mulberry:"#A93C93",NavyBlue:"#006EB8",OliveGreen:"#3C8031",Orange:"#F58137",OrangeRed:"#ED135A",Orchid:"#AF72B0",Peach:"#F7965A",Periwinkle:"#7977B8",PineGreen:"#008B72",Plum:"#92268F",ProcessBlue:"#00B0F0",Purple:"#99479B",RawSienna:"#974006",Red:"#ED1B23",RedOrange:"#F26035",RedViolet:"#A1246B",Rhodamine:"#EF559F",RoyalBlue:"#0071BC",RoyalPurple:"#613F99",RubineRed:"#ED017D",Salmon:"#F69289",SeaGreen:"#3FBC9D",Sepia:"#671800",SkyBlue:"#46C5DD",SpringGreen:"#C6DC67",Tan:"#DA9D76",TealBlue:"#00AEB3",Thistle:"#D883B7",Turquoise:"#00B4CE",Violet:"#58429B",VioletRed:"#EF58A0",White:"#FFFFFF",WildStrawberry:"#EE2967",Yellow:"#FFF200",YellowGreen:"#98CC70",YellowOrange:"#FAA21A"};function st(e){var t,r,n,i,a,s;const u=e.split("!");let d,h,p,y=255,M=255,B=255,$=-1;const oe=u.length>0&&u[0].startsWith("-");oe&&(u[0]=u[0].slice(1));for(let Ve=0;Ve<u.length;Ve++){d=y,h=M,p=B;const re=(t=u[Ve].trim().match(/^([A-Za-z\d-]+)/))==null?void 0:t[1],De=re==null?void 0:re.toLowerCase(),Xe=re&&(s=(a=(i=(n=(r=ne[De])!=null?r:ne[We[re]])!=null?n:z[re])!=null?i:fe[re])!=null?a:O[re])!=null?s:u[Ve].trim();let $e=Xe.match(/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i);if($e!=null&&$e[1]&&$e[2]&&$e[3])y=Math.max(0,Math.min(255,Number.parseInt($e[1],16))),M=Math.max(0,Math.min(255,Number.parseInt($e[2],16))),B=Math.max(0,Math.min(255,Number.parseInt($e[3],16)));else if($e=Xe.match(/^#([\da-f]{3})$/i),$e!=null&&$e[1]){const yt=Number.parseInt($e[1][0],16),Ot=Number.parseInt($e[1][1],16),Dt=Number.parseInt($e[1][2],16);y=Math.max(0,Math.min(255,yt*16+yt)),M=Math.max(0,Math.min(255,Ot*16+Ot)),B=Math.max(0,Math.min(255,Dt*16+Dt))}else if($e=Xe.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i),$e!=null&&$e[1]&&$e[2]&&$e[3])y=Math.max(0,Math.min(255,Number.parseInt($e[1]))),M=Math.max(0,Math.min(255,Number.parseInt($e[2]))),B=Math.max(0,Math.min(255,Number.parseInt($e[3])));else return;$>=0&&(y=(1-$)*y+$*d,M=(1-$)*M+$*h,B=(1-$)*B+$*p,$=-1),Ve+1<u.length&&($=Math.max(0,Math.min(100,Number.parseInt(u[++Ve])))/100)}return $>=0&&(y=$*y+(1-$)*d,M=$*M+(1-$)*h,B=$*B+(1-$)*p),oe&&(y=255-y,M=255-M,B=255-B),"#"+("00"+Math.round(y).toString(16)).slice(-2)+("00"+Math.round(M).toString(16)).slice(-2)+("00"+Math.round(B).toString(16)).slice(-2)}function lt(e){var t,r;return e=e.trim(),(r=(t=Q[e.toLowerCase()])!=null?t:Q[We[e]])!=null?r:st(e)}function ge(e){if(!e||e[0]!=="#")return;e=e.slice(1);let t;return e.length<=4?(t={r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16)},e.length===4&&(t.a=parseInt(e[3]+e[3],16)/255)):(t={r:parseInt(e[0]+e[1],16),g:parseInt(e[2]+e[3],16),b:parseInt(e[4]+e[5],16)},e.length===8&&(t.a=parseInt(e[6]+e[7],16)/255)),t&&t.a===void 0&&(t.a=1),t}function ve(e,t,r){return r<0&&(r+=6),r>=6&&(r-=6),r<1?(t-e)*r+e:r<3?t:r<4?(t-e)*(4-r)+e:e}function et(e){let[t,r,n]=[e.h,e.s,e.l];t=(t+360)%360/60,n=Math.max(0,Math.min(n,1)),r=Math.max(0,Math.min(r,1));const i=n<=.5?n*(r+1):n+r-n*r,a=n*2-i;return{r:Math.round(255*ve(a,i,t+2)),g:Math.round(255*ve(a,i,t)),b:Math.round(255*ve(a,i,t-2))}}function U(e){return e<0?0:e>255?255:Math.round(e)}function Re(e){const{r:t,g:r,b:n}=e;let i=((1<<24)+(U(t)<<16)+(U(r)<<8)+U(n)).toString(16).slice(1);return i[0]===i[1]&&i[2]===i[3]&&i[4]===i[5]&&i[6]===i[7]&&(i=i[0]+i[2]+i[4]),"#"+i}function Je(e){let{r:t,g:r,b:n}=e;t=t/255,r=r/255,n=n/255;const i=Math.min(t,r,n),a=Math.max(t,r,n),s=a-i;let u,d;a===i?u=0:t===a?u=(r-n)/s:r===a?u=2+(n-t)/s:n===a&&(u=4+(t-r)/s),u=Math.min(u*60,360),u<0&&(u+=360);const h=(i+a)/2;return a===i?d=0:h<=.5?d=s/(a+i):d=s/(2-a-i),{h:u,s:d,l:h}}function F(e){let t=ge(e);if(!t)return e;let{h:r,s:n,l:i}=Je(t);return n+=.1,i-=.1,Re(et({h:r,s:n,l:i}))}var be={60:"\\lt",62:"\\gt",111:"o",38:"\\&",123:"\\lbrace",125:"\\rbrace",91:"\\lbrack",93:"\\rbrack",58:"\\colon",160:"~",172:"\\neg",183:"\\cdot",188:"\\frac{1}{4}",189:"\\frac{1}{2}",190:"\\frac{3}{4}",8304:"^{0}",8305:"^{i}",185:"^{1}",178:"^{2}",179:"^{3}",8224:"\\dagger",8225:"\\ddagger",8230:"\\ldots",8308:"^{4}",8309:"^{5}",8310:"^{6}",8311:"^{7}",8312:"^{8}",8313:"^{9}",8314:"^{+}",8315:"^{-}",8316:"^{=}",8319:"^{n}",8320:"_{0}",8321:"_{1}",8322:"_{2}",8323:"_{3}",8324:"_{4}",8325:"_{5}",8326:"_{6}",8327:"_{7}",8328:"_{8}",8329:"_{9}",8330:"_{+}",8331:"_{-}",8332:"_{=}",8336:"_{a}",8337:"_{e}",8338:"_{o}",8339:"_{x}",8242:"\\prime",39:"\\prime",8592:"\\gets",8594:"\\to",9651:"\\triangle",9661:"\\triangledown",8715:"\\owns",8727:"\\ast",8739:"\\vert",8741:"\\Vert",8743:"\\land",8744:"\\lor",8901:"\\cdot",8904:"\\bowtie",8800:"\\ne",8804:"\\le",8805:"\\ge",8869:"\\bot",10231:"\\biconditional",10232:"\\impliedby",10233:"\\implies",10234:"\\iff",8450:"\\mathbb{C}",8469:"\\mathbb{N}",8473:"\\mathbb{P}",8474:"\\mathbb{Q}",8477:"\\mathbb{R}",8484:"\\mathbb{Z}",8461:"\\mathbb{H}",8476:"\\Re",8465:"\\Im",42:"\\ast",11036:"\\square",9633:"\\square",8720:"\\coprod",8716:"\\not\\ni",9671:"\\diamond",8846:"\\uplus",8851:"\\sqcap",8852:"\\sqcup",8768:"\\wr",8750:"\\oint",8226:"\\textbullet",8722:"-",978:"\\Upsilon"},pe={119893:8462,119965:8492,119968:8496,119969:8497,119971:8459,119972:8464,119975:8466,119976:8499,119981:8475,119994:8495,119996:8458,120004:8500,120070:8493,120075:8460,120076:8465,120085:8476,120093:8488,120122:8450,120127:8461,120133:8469,120135:8473,120136:8474,120137:8477,120145:8484},X=[{start:119808,len:26,offset:65,style:"bold"},{start:119834,len:26,offset:97,style:"bold"},{start:119860,len:26,offset:65,style:"italic"},{start:119886,len:26,offset:97,style:"italic"},{start:119912,len:26,offset:65,style:"bolditalic"},{start:119938,len:26,offset:97,style:"bolditalic"},{start:119964,len:26,offset:65,variant:"script"},{start:119990,len:26,offset:97,variant:"script"},{start:120016,len:26,offset:65,variant:"script",style:"bold"},{start:120042,len:26,offset:97,variant:"script",style:"bold"},{start:120068,len:26,offset:65,variant:"fraktur"},{start:120094,len:26,offset:97,variant:"fraktur"},{start:120172,len:26,offset:65,variant:"fraktur",style:"bold"},{start:120198,len:26,offset:97,variant:"fraktur",style:"bold"},{start:120120,len:26,offset:65,variant:"double-struck"},{start:120146,len:26,offset:97,variant:"double-struck"},{start:120224,len:26,offset:65,variant:"sans-serif"},{start:120250,len:26,offset:97,variant:"sans-serif"},{start:120276,len:26,offset:65,variant:"sans-serif",style:"bold"},{start:120302,len:26,offset:97,variant:"sans-serif",style:"bold"},{start:120328,len:26,offset:65,variant:"sans-serif",style:"italic"},{start:120354,len:26,offset:97,variant:"sans-serif",style:"italic"},{start:120380,len:26,offset:65,variant:"sans-serif",style:"bolditalic"},{start:120406,len:26,offset:97,variant:"sans-serif",style:"bolditalic"},{start:120432,len:26,offset:65,variant:"monospace"},{start:120458,len:26,offset:97,variant:"monospace"},{start:120488,len:25,offset:913,style:"bold"},{start:120514,len:25,offset:945,style:"bold"},{start:120546,len:25,offset:913,style:"italic"},{start:120572,len:25,offset:945,style:"italic"},{start:120604,len:25,offset:913,style:"bolditalic"},{start:120630,len:25,offset:945,style:"bolditalic"},{start:120662,len:25,offset:913,variant:"sans-serif",style:"bold"},{start:120688,len:25,offset:945,variant:"sans-serif",style:"bold"},{start:120720,len:25,offset:913,variant:"sans-serif",style:"bolditalic"},{start:120746,len:25,offset:945,variant:"sans-serif",style:"bolditalic"},{start:120782,len:10,offset:48,variant:"main",style:"bold"},{start:120792,len:10,offset:48,variant:"double-struck"},{start:120803,len:10,offset:48,variant:"sans-serif"},{start:120812,len:10,offset:48,variant:"sans-serif",style:"bold"},{start:120822,len:10,offset:48,variant:"monospace"}];function Oe(e,t,r){if(!/[A-Za-z\d]/.test(e)||(r==="up"&&(r=void 0),!t&&!r))return e;const n=e.codePointAt(0);if(n===void 0)return e;for(const i of X)if((!t||i.variant===t)&&(!r||i.style===r)&&n>=i.offset&&n<i.offset+i.len){const a=i.start+n-i.offset;return String.fromCodePoint(pe[a]||a)}return e}function Le(e){var t;if((e<119808||e>120831)&&(e<8448||e>8527))return{char:String.fromCodePoint(e)};for(const r in pe)if(pe[r]===e){e=(t=r.codePointAt(0))!=null?t:0;break}for(const r of X)if(e>=r.start&&e<r.start+r.len)return{char:String.fromCodePoint(e-r.start+r.offset),variant:r.variant,style:r.style};return{char:String.fromCodePoint(e)}}function Be(e){var t;let r="";for(const n of e){if("{}<>[]$&#^_%:'\u02DC".includes(n)){r+=n;continue}const i=(t=n.codePointAt(0))!=null?t:0;let a=be[i];if(a)a.startsWith("\\")?r+=a+" ":r+=a;else{const{char:s,variant:u,style:d}=Le(i);switch(a=s,u){case"double-struck":a=`\\mathbb{${a}}`;break;case"fraktur":a=`\\mathfrak{${a}}`;break;case"script":a=`\\mathscr{${a}}`;break;case"sans-serif":a=`\\mathsf{${a}}`;break;case"monospace":a=`\\mathtt{${a}}`;break;case"calligraphic":a=`\\mathcal{${a}}`;break}switch(d){case"bold":a=`\\mathbf{${a}}`;break;case"italic":a=`\\mathit{${a}}`;break;case"bolditalic":a=`\\mathbfit{${a}}`;break}r+=a}}return r}function se(e){return e?Array.isArray(e)?e:typeof e=="object"&&"group"in e?e.group:[]:[]}var at={},ut=S({},be),Nt={},Wt={},Ct={darr:"\\downarrow",dArr:"\\Downarrow",Darr:"\\Downarrow",lang:"\\langle",rang:"\\rangle",uarr:"\\uparrow",uArr:"\\Uparrow",Uarr:"\\Uparrow",N:"\\mathbb{N}",R:"\\mathbb{R}",Z:"\\mathbb{Z}",alef:"\\aleph",alefsym:"\\aleph",Alpha:"\\mathrm{A}",Beta:"\\mathrm{B}",bull:"\\bullet",Chi:"\\mathrm{X}",clubs:"\\clubsuit",cnums:"\\mathbb{C}",Complex:"\\mathbb{C}",Dagger:"\\ddagger",diamonds:"\\diamondsuit",empty:"\\emptyset",Epsilon:"\\mathrm{E}",Eta:"\\mathrm{H}",exist:"\\exists",harr:"\\leftrightarrow",hArr:"\\Leftrightarrow",Harr:"\\Leftrightarrow",hearts:"\\heartsuit",image:"\\Im",infin:"\\infty",Iota:"\\mathrm{I}",isin:"\\in",Kappa:"\\mathrm{K}",larr:"\\leftarrow",lArr:"\\Leftarrow",Larr:"\\Leftarrow",lrarr:"\\leftrightarrow",lrArr:"\\Leftrightarrow",Lrarr:"\\Leftrightarrow",Mu:"\\mathrm{M}",natnums:"\\mathbb{N}",Nu:"\\mathrm{N}",Omicron:"\\mathrm{O}",plusmn:"\\pm",rarr:"\\rightarrow",rArr:"\\Rightarrow",Rarr:"\\Rightarrow",real:"\\Re",reals:"\\mathbb{R}",Reals:"\\mathbb{R}",Rho:"\\mathrm{P}",sdot:"\\cdot",sect:"\\S",spades:"\\spadesuit",sub:"\\subset",sube:"\\subseteq",supe:"\\supseteq",Tau:"\\mathrm{T}",thetasym:"\\vartheta",weierp:"\\wp",Zeta:"\\mathrm{Z}"},er={varGamma:"\\mathit{\\Gamma}",varDelta:"\\mathit{\\Delta}",varTheta:"\\mathit{\\Theta}",varLambda:"\\mathit{\\Lambda}",varXi:"\\mathit{\\Xi}",varPi:"\\mathit{\\Pi}",varSigma:"\\mathit{\\Sigma}",varUpsilon:"\\mathit{\\Upsilon}",varPhi:"\\mathit{\\Phi}",varPsi:"\\mathit{\\Psi}",varOmega:"\\mathit{\\Omega}",pmod:{def:"\\quad(\\operatorname{mod}\\ #1)",args:1,expand:!1,captureSelection:!1},mod:{def:"\\quad\\operatorname{mod}\\,\\,#1",args:1,expand:!1},bmod:{def:"\\;\\mathbin{\\operatorname{mod }}",expand:!1}},zt={bra:{def:"\\mathinner{\\langle{#1}|}",args:1,captureSelection:!1},ket:{def:"\\mathinner{|{#1}\\rangle}",args:1,captureSelection:!1},braket:{def:"\\mathinner{\\langle{#1}\\rangle}",args:1,captureSelection:!1},set:{def:"\\mathinner{\\lbrace #1 \\rbrace}",args:1,captureSelection:!1},Bra:{def:"\\left\\langle #1\\right|",args:1,captureSelection:!1},Ket:{def:"\\left|#1\\right\\rangle",args:1,captureSelection:!1},Braket:{def:"\\left\\langle{#1}\\right\\rangle",args:1,captureSelection:!1},Set:{def:"\\left\\lbrace #1 \\right\\rbrace",args:1,captureSelection:!1}},nr={iff:{primitive:!0,captureSelection:!0,def:"\\;\u27FA\\;"},nicefrac:"^{#1}\\!\\!/\\!_{#2}",phase:{def:"\\enclose{phasorangle}{#1}",args:1,captureSelection:!1},rd:"\\mathrm{d}",rD:"\\mathrm{D}",doubleStruckCapitalN:"\\mathbb{N}",doubleStruckCapitalR:"\\mathbb{R}",doubleStruckCapitalQ:"\\mathbb{Q}",doubleStruckCapitalZ:"\\mathbb{Z}",doubleStruckCapitalP:"\\mathbb{P}",scriptCapitalE:"\\mathscr{E}",scriptCapitalH:"\\mathscr{H}",scriptCapitalL:"\\mathscr{L}",gothicCapitalC:"\\mathfrak{C}",gothicCapitalH:"\\mathfrak{H}",gothicCapitalI:"\\mathfrak{I}",gothicCapitalR:"\\mathfrak{R}",imaginaryI:"\\mathrm{i}",imaginaryJ:"\\mathrm{j}",exponentialE:"\\mathrm{e}",differentialD:"\\mathrm{d}",capitalDifferentialD:"\\mathrm{D}",mathstrut:{def:"\\vphantom{(}",primitive:!0},angl:"\\enclose{actuarial}{#1}",angln:"\\enclose{actuarial}{n}",anglr:"\\enclose{actuarial}{r}",anglk:"\\enclose{actuarial}{k}",mathtools:{primitive:!0,package:{ordinarycolon:":",vcentcolon:"\\mathrel{\\mathop\\ordinarycolon}",dblcolon:'{\\mathop{\\char"2237}}',coloneqq:'{\\mathop{\\char"2254}}',Coloneqq:'{\\mathop{\\char"2237\\char"3D}}',coloneq:'{\\mathop{\\char"3A\\char"2212}}',Coloneq:'{\\mathop{\\char"2237\\char"2212}}',eqqcolon:'{\\mathop{\\char"2255}}',Eqqcolon:'{\\mathop{\\char"3D\\char"2237}}',eqcolon:'{\\mathop{\\char"2239}}',Eqcolon:'{\\mathop{\\char"2212\\char"2237}}',colonapprox:'{\\mathop{\\char"003A\\char"2248}}',Colonapprox:'{\\mathop{\\char"2237\\char"2248}}',colonsim:'{\\mathop{\\char"3A\\char"223C}}',Colonsim:'{\\mathop{\\char"2237\\char"223C}}',colondash:"\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}",Colondash:"\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}",dashcolon:"\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}",Dashcolon:"\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}"}},ratio:"\\vcentcolon",coloncolon:"\\dblcolon",colonequals:"\\coloneq",coloncolonequals:"\\Coloneq",equalscolon:"\\eqcolon",equalscoloncolon:"\\Eqcolon",colonminus:"\\colondash",coloncolonminus:"\\Colondash",minuscolon:"\\dashcolon",minuscoloncolon:"\\Dashcolon",coloncolonapprox:"\\Colonapprox",coloncolonsim:"\\Colonsim",simcolon:"\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}",Simcolon:"\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}",simcoloncolon:"\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}",approxcolon:"\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}",Approxcolon:"\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}",approxcoloncolon:"\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}",notni:"\\mathrel{\\char`\u220C}",limsup:"\\operatorname*{lim\\,sup}",liminf:"\\operatorname*{lim\\,inf}",injlim:"\\operatorname*{inj\\,lim}",projlim:"\\operatorname*{proj\\,lim}",varlimsup:"\\operatorname*{\\overline{lim}}",varliminf:"\\operatorname*{\\underline{lim}}",varinjlim:"\\operatorname*{\\underrightarrow{lim}}",varprojlim:"\\operatorname*{\\underleftarrow{lim}}",argmin:"\\operatorname*{arg\\,min}",argmax:"\\operatorname*{arg\\,max}",plim:"\\mathop{\\operatorname{plim}}\\limits",tripledash:{def:"\\vphantom{-}\\raise{4mu}{\\mkern1.5mu\\rule{2mu}{1.5mu}\\mkern{2.25mu}\\rule{2mu}{1.5mu}\\mkern{2.25mu}\\rule{2mu}{1.5mu}\\mkern{2mu}}",expand:!0},"braket.sty":{package:zt},"amsmath.sty":{package:er,primitive:!0},"texvc.sty":{package:Ct,primitive:!1}},Lt={" ":32,"\\!":33,"\\#":35,"\\$":36,"\\%":37,"\\&":38,"-":45,"\\textunderscore":95,"\\euro":8364,"\\maltese":10016,"\\{":123,"\\}":125,"\\textbraceleft":123,"\\textbraceright":125,"\\lbrace":123,"\\rbrace":125,"\\lbrack":91,"\\rbrack":93,"\\nobreakspace":160,"\\ldots":8230,"\\textellipsis":8230,"\\backslash":92,"`":8216,"'":8217,"``":8220,"''":8221,"\\degree":176,"\\textasciicircum":94,"\\textasciitilde":126,"\\textasteriskcentered":42,"\\textbackslash":92,"\\textbullet":8226,"\\textdollar":36,"\\textsterling":163,"\\textdagger":8224,"\\textdaggerdbl":8225,"\u2013":8211,"\u2014":8212,"\u2018":8216,"\u2019":8217,"\u201C":8220,"\u201D":8221,'"':8221,"\\ss":223,"\\ae":230,"\\oe":339,"\\AE":198,"\\OE":338,"\\O":216,"\\i":305,"\\j":567,"\\aa":229,"\\AA":197},ae=/[\w!@*()-=+{}\[\]\\';:?/.,~<>`|$%#&^" ]/,Z,K;Ie()?(Z=new RegExp("\\p{Letter}","u"),K=new RegExp("[0-9\\p{Letter}]","u")):(Z=/[a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/,K=/[\da-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/);function ce(e,t,r="mord",n){t!==void 0&&(at[e]={definitionType:"symbol",type:r,variant:n,codepoint:t},ut[t]||(ut[t]=e))}function ue(e,t,r){if(typeof e=="string"){for(let n=0;n<e.length;n++){const i=e.charAt(n);ce(i,i.codePointAt(0))}return}for(const[n,i,a,s]of e)ce(n,i,a!=null?a:t,s!=null?s:r)}function Fe(e,t){for(let r=e;r<=t;r++)ce(String.fromCodePoint(r),r)}function ee(e){var t;return(t=Wt[e])!=null?t:null}function ie(e,t){var r,n;if(t.length===0||t==="\\"||!t.startsWith("\\"))return[];const i=[];for(const s in Nt)s.startsWith(t)&&!Nt[s].infix&&i.push({match:s,frequency:(r=Nt[s].frequency)!=null?r:0});for(const s in at)s.startsWith(t)&&i.push({match:s,frequency:(n=at[s].frequency)!=null?n:0});const a=t.substring(1);for(const s of Object.keys(e.options.macros))s.startsWith(a)&&i.push({match:"\\"+s,frequency:0});return i.sort((s,u)=>{var d,h;return s.frequency===u.frequency?s.match.length===u.match.length?s.match<u.match?-1:1:s.match.length-u.match.length:((d=u.frequency)!=null?d:0)-((h=s.frequency)!=null?h:0)}),i.map(s=>s.match)}function rt(e){let t="auto";const r=e.match(/:([^=]+)/);return r&&(t=r[1].trim()),t}function Ye(e){if(!e)return[];const t=[];let r=e.split("]");if(r[0].startsWith("[")){t.push({isOptional:!0,type:rt(r[0].slice(1))});for(let n=1;n<=r.length;n++)t.push(...Ye(r[n]))}else if(r=e.split("}"),r[0].startsWith("{")){t.push({isOptional:!1,type:rt(r[0].slice(1))});for(let n=1;n<=r.length;n++)t.push(...Ye(r[n]))}return t}function nt(e){if(!e)return"";let t="",r=!0;for(const n of e)typeof n.value=="string"?t+=n.value:r=!1;return r?t:""}function Bt(e,t){typeof e=="string"&&(e=[e]);const r={tabular:!1,params:[],createAtom:t};for(const n of e)Wt[n]=r}function St(e,t,r){typeof e=="string"&&(e=[e]);const i={tabular:!0,params:Ye(t),createAtom:r};for(const a of e)Wt[a]=i}function W(e,t,r){var n,i;r||(r={});const a={definitionType:"function",params:Ye(t),ifMode:r.ifMode,isFunction:(n=r.isFunction)!=null?n:!1,applyMode:r.applyMode,infix:(i=r.infix)!=null?i:!1,parse:r.parse,createAtom:r.createAtom,applyStyle:r.applyStyle,serialize:r.serialize,render:r.render};if(typeof e=="string")Nt["\\"+e]=a;else for(const s of e)Nt["\\"+s]=a}var _t;function bt(e){return _t||(_t=J(nr)),e?J(S(S({},_t),e)):_t}function N(e,t){var r,n,i,a;if(typeof e=="string"){let s=0;const u=e;return/(^|[^\\])#1/.test(u)&&(s=1),/(^|[^\\])#2/.test(u)&&(s=2),/(^|[^\\])#3/.test(u)&&(s=3),/(^|[^\\])#4/.test(u)&&(s=4),/(^|[^\\])#5/.test(u)&&(s=5),/(^|[^\\])#6/.test(u)&&(s=6),/(^|[^\\])#7/.test(u)&&(s=7),/(^|[^\\])#8/.test(u)&&(s=8),/(^|[^\\])#9/.test(u)&&(s=9),{expand:(r=t==null?void 0:t.expand)!=null?r:!0,captureSelection:(n=t==null?void 0:t.captureSelection)!=null?n:!0,args:s,def:u}}return S({expand:(i=t==null?void 0:t.expand)!=null?i:!0,captureSelection:(a=t==null?void 0:t.captureSelection)!=null?a:!0,args:0},e)}function J(e){if(!e)return{};const t={};for(const r of Object.keys(e)){const n=e[r];if(n==null)delete t[r];else if(typeof n=="object"&&"package"in n)for(const i of Object.keys(n.package))t[i]=N(n.package[i],{expand:!n.primitive,captureSelection:n.captureSelection});else t[r]=N(n)}return t}function le(e,t="math"){if(!e||e.length===0)return null;let r=null;if(e.startsWith("\\")){if(r=Nt[e],r)return!r.ifMode||r.ifMode===t?r:null;t==="math"?r=at[e]:Lt[e]&&(r={definitionType:"symbol",type:"mord",codepoint:Lt[e]})}else if(t==="math"){if(r=at[e],!r&&e.length===1){const n=Te("math",e.codePointAt(0));return n.startsWith("\\")?_(S({},le(n,"math")),{command:n}):null}}else Lt[e]?r={definitionType:"symbol",type:"mord",codepoint:Lt[e]}:t==="text"&&(r={definitionType:"symbol",type:"mord",codepoint:e.codePointAt(0)});return r!=null?r:null}function ot(e,t){if(!e.startsWith("\\"))return null;const r=e.slice(1);return t[r]}function Te(e,t){if(t===void 0)return"";if(e==="math"&&ut[t])return ut[t];if(e==="text"){const r=Object.keys(Lt).find(n=>Lt[n]===t);return r||String.fromCodePoint(t)}return String.fromCodePoint(t)}var Ce=[0,.68889,0,0,.72222],ir=[0,.68889,0,0,.66667],Ht=[0,.68889,0,0,.77778],qt=[0,.68889,0,0,.61111],Gt=[.16667,.68889,0,0,.77778],tr=[0,.68889,0,0,.55556],Mt=[0,0,0,0,.25],Mr=[0,.825,0,0,2.33334],pr=[0,.9,0,0,2.33334],Vr=[0,.68889,0,0,.54028],Cr=[-.03598,.46402,0,0,.5],fr=[-.13313,.36687,0,0,1],on=[.01354,.52239,0,0,1],Vt=[.01354,.52239,0,0,1.11111],rn=[0,.54986,0,0,1],nn=[0,.69224,0,0,.5],qr=[0,.43056,0,0,1],Xr=[.08198,.58198,0,0,.77778],Sr=[.19444,.69224,0,0,.41667],Jr=[.1808,.675,0,0,1],Fr=[.19444,.69224,0,0,.83334],Xn=[.13667,.63667,0,0,1],In=[-.064,.437,0,0,1.334],yn=[.08167,.58167,0,0,.77778],dn=[0,.69224,0,0,.72222],C=[0,.69224,0,0,.66667],I=[-.13313,.36687,0,0,.77778],Ae=[.06062,.54986,0,0,.77778],Pe=[0,.69224,0,0,.77778],ze=[.25583,.75583,0,0,.77778],Ke=[.25142,.75726,0,0,.77778],ht=[.20576,.70576,0,0,.77778],ct=[.30274,.79383,0,0,.77778],Et=[.22958,.72958,0,0,.77778],ar=[.1808,.675,0,0,.77778],jt=[.13667,.63667,0,0,.77778],Pt=[.13597,.63597,0,0,.77778],$t=[.03517,.54986,0,0,.77778],Xt=[0,.675,0,0,.77778],xe=[.19444,.69224,0,0,.61111],zr=[0,.54986,0,0,.76042],Br=[0,.54986,0,0,.66667],hr=[.0391,.5391,0,0,.77778],Ur=[.03517,.54986,0,0,1.33334],mr=[.38569,.88569,0,0,.77778],Rt=[.23222,.74111,0,0,.77778],j=[.19444,.69224,0,0,.77778],V=[0,.37788,0,0,.5],de=[0,.54986,0,0,.72222],Ee=[0,.69224,0,0,.83334],q=[.11111,.69224,0,0,.66667],ke=[.26167,.75726,0,0,.77778],_e=[.48256,.98256,0,0,.77778],je=[.28481,.79383,0,0,.77778],vt=[.08167,.58167,0,0,.22222],dt=[.08167,.58167,0,0,.38889],Zt=[0,.43056,.04028,0,.66667],lr=[.41951,.91951,0,0,.77778],gr=[.24982,.74947,0,0,.38865],vr=[.08319,.58283,0,0,.75623],rr=[0,.10803,0,0,.27764],Ir=[0,.47534,0,0,.50181],Tr=[.18906,.47534,0,0,.50181],Jt=[0,.69141,0,0,.50181],Yt=[.24982,.74947,0,0,.27764],or=[0,.69141,0,0,.21471],Ut=[.25,.75,0,0,.44722],Qt=[0,.64444,0,0,.575],dr=[.08556,.58556,0,0,.89444],$r=[0,.69444,0,0,.89444],Dr=[0,.68611,0,0,.9],At=[0,.68611,0,0,.86944],ft=[.25,.75,0,0,.575],sr=[.25,.75,0,0,.31944],Kt=[0,.69444,0,0,.63889],xr=[0,.69444,0,0,.31944],fn=[0,.44444,0,0,.63889],ur=[0,.44444,0,0,.51111],an=[0,.69444,0,0,.575],Pr=[.13333,.63333,0,0,.89444],Tn=[0,.44444,0,0,.31944],ri=[0,.69444,0,0,.86944],gn=[0,.68611,0,0,.69166],Jn=[0,.68611,0,0,.83055],kn=[0,.68611,0,0,.89444],ni=[0,.69444,0,0,.60278],vn=[.19444,.69444,0,0,.51111],mi=[0,.69444,0,0,.83055],Rr=[-.10889,.39111,0,0,1.14999],Pn=[.19444,.69444,0,0,.575],_n=[.19444,.69444,0,0,1.14999],zn=[.19444,.69444,0,0,.70277],gi=[.05556,.75,0,0,.575],Mn=[0,.68611,0,0,.95833],ci=[.08556,.58556,0,0,.76666],Yn=[-.02639,.47361,0,0,.575],Pi=[0,.44444,0,0,.89444],Kn=[0,.55556,0,0,.76666],vi=[-.10889,.39111,0,0,.89444],Zi=[.00222,.50222,0,0,.89444],_i=[.19667,.69667,0,0,.89444],Mi=[.08556,.58556,0,0,1.14999],ji=[0,.69444,0,0,.70277],Ri=[-.02778,.47222,0,0,.575],ui=[.25,.75,0,0,.51111],hn=[-.13889,.36111,0,0,1.14999],xa=[.19444,.69444,0,0,1.02222],Ci=[.12963,.69444,0,0,.89444],Oi=[.19444,.69444,0,0,.44722],bi=[0,.64444,.13167,0,.59111],Ui=[.19444,.64444,.13167,0,.59111],Ei=[0,.68611,.17208,0,.8961],Gi=[.19444,.44444,.105,0,.53222],Ni=[0,.44444,.085,0,.82666],Fi=[0,.69444,.06709,0,.59111],Dn=[0,.69444,.12945,0,.35555],di=[0,.69444,0,0,.94888],fi=[0,.69444,.11472,0,.59111],Rn=[0,.68611,.10778,0,.88555],Hn=[0,.69444,.07939,0,.62055],zi=[0,.69444,.12417,0,.30667],Kr=[0,.64444,.13556,0,.51111],Er=[.19444,.64444,.13556,0,.51111],pn=[0,.68333,.16389,0,.74333],An=[.19444,.43056,.08847,0,.46],ii=[0,.43056,.07514,0,.71555],On=[0,.69444,.06646,0,.51111],Na=[0,.69444,0,0,.83129],Ws=[0,.69444,.1225,0,.51111],Nn=[0,.68333,.09403,0,.76666],qi=[0,.68333,.11111,0,.76666],ns=[0,.69444,.06961,0,.51444],Xi=[0,.69444,0,0,.27778],wa=[.25,.75,0,0,.38889],Wn=[0,.64444,0,0,.5],Sa=[0,.69444,0,0,.77778],aa=[0,.68333,0,0,.75],_a=[0,.68333,0,0,.77778],mo=[0,.68333,0,0,.68056],go=[0,.68333,0,0,.72222],ki=[.25,.75,0,0,.5],bn=[.25,.75,0,0,.27778],xn=[0,.69444,0,0,.5],Ma=[0,.69444,0,0,.55556],Ji=[0,.43056,0,0,.44445],Ca=[0,.43056,0,0,.5],Vs=[.19444,.43056,0,0,.55556],is=[0,.43056,0,0,.55556],yi=[.08333,.58333,0,0,.77778],as=[0,.43056,0,0,.27778],Zs=[0,.66786,0,0,.27778],os=[0,.69444,0,0,.75],ss=[0,.66786,0,0,.5],Fa=[0,.68333,0,0,.625],vo=[.19444,.69444,0,0,.44445],bo=[0,.69444,0,0,.72222],ls=[.19444,.69444,0,0,.5],Ea=[.19444,.69444,0,0,1],cs=[.011,.511,0,0,1.126],za=[.19444,.69444,0,0,.61111],ka=[.05556,.75,0,0,.5],js=[0,.68333,0,0,.83334],us=[.0391,.5391,0,0,.66667],yo=[-.05555,.44445,0,0,.5],ds=[0,.43056,0,0,.77778],Da=[0,.55556,0,0,.66667],xo=[-.03625,.46375,0,0,.77778],Us=[-.01688,.48312,0,0,.77778],Ka=[.0391,.5391,0,0,1],Nr=[0,.69444,0,0,.61111],Zr=[-.03472,.46528,0,0,.5],Yr=[.25,.75,0,0,.44445],ai=[-.14236,.35764,0,0,1],Vn=[.244,.744,0,0,.412],Aa=[.19444,.69444,0,0,.88889],oa=[.12963,.69444,0,0,.77778],Fo=[.19444,.69444,0,0,.38889],zo=[.011,.511,0,0,1.638],fs=[.19444,.69444,0,0,0],sa=[0,.44444,0,0,.575],La=[.19444,.44444,0,0,.575],Gs=[0,.68611,0,0,.75555],ou=[0,.69444,0,0,.66759],su=[0,.68611,0,0,.80555],lu=[0,.68611,.08229,0,.98229],cu=[0,.68611,0,0,.76666],uu=[0,.44444,0,0,.58472],ec=[.19444,.44444,0,0,.6118],hs=[.19444,.43056,0,0,.5],du=[0,.68333,.02778,.08334,.76278],fu=[0,.68333,.08125,.05556,.83125],hu=[0,.43056,0,.05556,.48472],pu=[.19444,.43056,0,.08334,.51702],mu=[.25,.75,0,0,.42778],Fn=[0,.69444,0,0,.55],Ba=[0,.69444,0,0,.73334],la=[0,.69444,0,0,.79445],tc=[0,.69444,0,0,.51945],rc=[0,.69444,0,0,.70278],nc=[0,.69444,0,0,.76389],u0=[.25,.75,0,0,.34306],ic=[0,.69444,0,0,.56111],gu=[0,.69444,0,0,.25556],vu=[.19444,.45833,0,0,.56111],qs=[0,.45833,0,0,.56111],Ha=[0,.69444,0,0,.30556],Xs=[0,.69444,0,0,.58056],Wa=[0,.69444,0,0,.67223],wo=[0,.69444,0,0,.85556],Js=[0,.69444,0,0,.55834],Ki=[0,.65556,.11156,0,.5],ps=[0,.69444,.08094,0,.70834],Ys=[.17014,0,0,0,.44445],bu=[0,.69444,.0799,0,.5],ac=[0,.69444,0,0,.73752],yu=[0,.69444,.09205,0,.5],xu=[0,.69444,.09031,0,.77778],oc=[0,.69444,.07816,0,.27778],wu=[0,.69444,.00316,0,.5],Su=[.19444,.69444,0,0,.83334],sc=[.05556,.75,0,0,.83334],_u=[0,.75,0,0,.5],Mu=[.125,.08333,0,0,.27778],Cu=[0,.08333,0,0,.27778],ca=[0,.65556,0,0,.5],lc=[0,.69444,0,0,.47222],Ia=[0,.69444,0,0,.66667],Eu=[0,.69444,0,0,.59722],cc=[0,.69444,0,0,.54167],uc=[0,.69444,0,0,.70834],Ko=[.25,.75,0,0,.28889],Ho=[0,.69444,0,0,.51667],Qs=[0,.44444,0,0,.44445],ku=[.19444,.44444,0,0,.51667],Du=[0,.44444,0,0,.38333],Au=[0,.44444,0,0,.51667],Lu=[0,.69444,0,0,.83334],Bu=[.35001,.85,0,0,.45834],Iu=[.35001,.85,0,0,.57778],$u=[.35001,.85,0,0,.41667],Tu=[.35001,.85,0,0,.58334],el=[0,.72222,0,0,.55556],Pu=[1e-5,.6,0,0,.66667],Ru=[1e-5,.6,0,0,.77778],tl=[.25001,.75,0,0,.94445],Ou=[.306,.805,.19445,0,.47222],dc=[.30612,.805,.19445,0,.47222],So=[.25001,.75,0,0,.83334],_o=[.35001,.85,0,0,.47222],fc=[.25001,.75,0,0,1.11111],Nu=[.65002,1.15,0,0,.59722],hc=[.65002,1.15,0,0,.81111],Fu=[.65002,1.15,0,0,.47222],pc=[.65002,1.15,0,0,.66667],rl=[0,.75,0,0,1],zu=[.55001,1.05,0,0,1.27778],Ku=[.862,1.36,.44445,0,.55556],Hu=[.86225,1.36,.44445,0,.55556],Di=[.55001,1.05,0,0,1.11111],nl=[.65002,1.15,0,0,.52778],mc=[.65002,1.15,0,0,.61111],ms=[.55001,1.05,0,0,1.51112],Wu=[.95003,1.45,0,0,.73611],gc=[.95003,1.45,0,0,1.04445],vc=[.95003,1.45,0,0,.52778],il=[.95003,1.45,0,0,.75],gs=[0,.75,0,0,1.44445],vs=[.95003,1.45,0,0,.58334],Vu=[1.25003,1.75,0,0,.79167],Zu=[1.25003,1.75,0,0,1.27778],bc=[1.25003,1.75,0,0,.58334],al=[1.25003,1.75,0,0,.80556],Wo=[0,.825,0,0,1.8889],bs=[1.25003,1.75,0,0,.63889],Vo=[.64502,1.155,0,0,.875],ju=[1e-5,.6,0,0,.875],ys=[-99e-5,.601,0,0,.66667],ol=[.64502,1.155,0,0,.66667],Uu=[1e-5,.9,0,0,.88889],Gu=[.65002,1.15,0,0,.88889],yc=[.90001,0,0,0,.88889],qu=[-.00499,.605,0,0,1.05556],sl=[0,.12,0,0,.45],wt=[0,.61111,0,0,.525],oi=[.08333,.69444,0,0,.525],Mo=[-.08056,.53055,0,0,.525],ll=[-.05556,.55556,0,0,.525],hi=[0,.43056,0,0,.525],Zo=[.22222,.43056,0,0,.525],Xu=[0,0,0,0,.525],xs={"AMS-Regular":{32:Mt,65:Ce,66:ir,67:Ce,68:Ce,69:ir,70:qt,71:Ht,72:Ht,73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:Ht,76:ir,77:[0,.68889,0,0,.94445],78:Ce,79:Gt,80:qt,81:Gt,82:Ce,83:tr,84:ir,85:Ce,86:Ce,87:[0,.68889,0,0,1],88:Ce,89:Ce,90:ir,107:tr,160:Mt,165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:tr,295:Vr,710:Mr,732:pr,770:Mr,771:pr,989:yn,1008:Zt,8245:[0,.54986,0,0,.275],8463:Vr,8487:Ce,8498:tr,8502:ir,8503:[0,.68889,0,0,.44445],8504:ir,8513:[0,.68889,0,0,.63889],8592:Cr,8594:Cr,8602:fr,8603:fr,8606:on,8608:on,8610:Vt,8611:Vt,8619:rn,8620:rn,8621:[-.13313,.37788,0,0,1.38889],8622:fr,8624:nn,8625:nn,8630:qr,8631:qr,8634:Xr,8635:Xr,8638:Sr,8639:Sr,8642:Sr,8643:Sr,8644:Jr,8646:Jr,8647:Jr,8648:Fr,8649:Jr,8650:Fr,8651:on,8652:on,8653:fr,8654:fr,8655:fr,8666:Xn,8667:Xn,8669:[-.13313,.37788,0,0,1],8672:In,8674:In,8705:[0,.825,0,0,.5],8708:tr,8709:yn,8717:[0,.43056,0,0,.42917],8722:Cr,8724:[.08198,.69224,0,0,.77778],8726:yn,8733:Pe,8736:dn,8737:dn,8738:[.03517,.52239,0,0,.72222],8739:vt,8740:[.25142,.74111,0,0,.27778],8741:dt,8742:[.25142,.74111,0,0,.5],8756:C,8757:C,8764:I,8765:[-.13313,.37788,0,0,.77778],8769:I,8770:xo,8774:ct,8776:Us,8778:yn,8782:Ae,8783:Ae,8785:Xr,8786:Xr,8787:Xr,8790:Pe,8791:Et,8796:[.08198,.91667,0,0,.77778],8806:ze,8807:ze,8808:Ke,8809:Ke,8812:[.25583,.75583,0,0,.5],8814:ht,8815:ht,8816:ct,8817:ct,8818:Et,8819:Et,8822:ar,8823:ar,8828:jt,8829:jt,8830:Et,8831:Et,8832:ht,8833:ht,8840:ct,8841:ct,8842:Pt,8843:Pt,8847:$t,8848:$t,8858:Xr,8859:Xr,8861:Xr,8862:Xt,8863:Xt,8864:Xt,8865:Xt,8872:[0,.69224,0,0,.61111],8873:dn,8874:[0,.69224,0,0,.88889],8876:qt,8877:qt,8878:Ce,8879:Ce,8882:$t,8883:$t,8884:jt,8885:jt,8888:[0,.54986,0,0,1.11111],8890:Vs,8891:xe,8892:xe,8901:[0,.54986,0,0,.27778],8903:yn,8905:yn,8906:yn,8907:Pe,8908:Pe,8909:[-.03598,.46402,0,0,.77778],8910:zr,8911:zr,8912:$t,8913:$t,8914:Br,8915:Br,8916:C,8918:hr,8919:hr,8920:Ur,8921:Ur,8922:mr,8923:mr,8926:jt,8927:jt,8928:ct,8929:ct,8934:Rt,8935:Rt,8936:Rt,8937:Rt,8938:ht,8939:ht,8940:ct,8941:ct,8994:j,8995:j,9416:[.15559,.69224,0,0,.90222],9484:nn,9488:nn,9492:V,9496:V,9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:Xt,9633:Xt,9650:de,9651:de,9654:$t,9660:de,9661:de,9664:$t,9674:q,9733:[.19444,.69224,0,0,.94445],10003:Ee,10016:Ee,10731:q,10846:[.19444,.75583,0,0,.61111],10877:jt,10878:jt,10885:ze,10886:ze,10887:Pt,10888:Pt,10889:ke,10890:ke,10891:_e,10892:_e,10901:jt,10902:jt,10933:Ke,10934:Ke,10935:ke,10936:ke,10937:ke,10938:ke,10949:ze,10950:ze,10955:je,10956:je,57350:vt,57351:dt,57352:yn,57353:Zt,57356:Ke,57357:Ke,57358:lr,57359:ct,57360:ct,57361:lr,57366:Ke,57367:Ke,57368:Ke,57369:Ke,57370:Pt,57371:Pt},"Caligraphic-Regular":{32:Mt,65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:Mt},"Fraktur-Regular":{32:Mt,33:[0,.69141,0,0,.29574],34:or,38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:gr,41:gr,42:[0,.62119,0,0,.27764],43:vr,44:rr,45:vr,46:rr,47:[.24982,.74947,0,0,.50181],48:Ir,49:Ir,50:Ir,51:Tr,52:Tr,53:Tr,54:Jt,55:Tr,56:Jt,57:Tr,58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:Yt,93:Yt,94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:Mt,8216:or,8217:or,58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:Mt,33:[0,.69444,0,0,.35],34:ni,35:[.19444,.69444,0,0,.95833],36:gi,37:[.05556,.75,0,0,.95833],38:$r,39:xr,40:Ut,41:Ut,42:[0,.75,0,0,.575],43:Pr,44:[.19444,.15556,0,0,.31944],45:Du,46:[0,.15556,0,0,.31944],47:ft,48:Qt,49:Qt,50:Qt,51:Qt,52:Qt,53:Qt,54:Qt,55:Qt,56:Qt,57:Qt,58:Tn,59:[.19444,.44444,0,0,.31944],60:dr,61:vi,62:dr,63:[0,.69444,0,0,.54305],64:$r,65:At,66:[0,.68611,0,0,.81805],67:Jn,68:[0,.68611,0,0,.88194],69:Gs,70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:Dr,73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:gn,77:[0,.68611,0,0,1.09166],78:Dr,79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:At,89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:sr,92:ft,93:sr,94:an,95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:Kt,99:ur,100:Kt,101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:Kt,105:xr,106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:xr,109:[0,.44444,0,0,.95833],110:fn,111:sa,112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:fn,118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:ur,123:ft,124:sr,125:ft,126:[.35,.34444,0,0,.575],160:Mt,163:[0,.69444,0,0,.86853],168:an,172:[0,.44444,0,0,.76666],176:ri,177:Pr,184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:Pr,216:[.04861,.73472,0,0,.89444],223:Eu,230:[0,.44444,0,0,.83055],247:Pr,248:[.09722,.54167,0,0,.575],305:Tn,338:[0,.68611,0,0,1.16944],339:Pi,567:[.19444,.44444,0,0,.35139],710:an,711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:an,715:an,728:an,729:xr,730:ri,732:an,733:an,915:gn,916:Mn,920:kn,923:su,926:cu,928:Dr,931:Jn,933:kn,934:Jn,936:kn,937:Jn,8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:xr,8217:xr,8220:ni,8221:ni,8224:vn,8225:vn,8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:ou,8465:mi,8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:mi,8501:ji,8592:Rr,8593:Pn,8594:Rr,8595:Pn,8596:Rr,8597:ft,8598:_n,8599:_n,8600:_n,8601:_n,8636:Rr,8637:Rr,8640:Rr,8641:Rr,8656:Rr,8657:zn,8658:Rr,8659:zn,8660:Rr,8661:[.25,.75,0,0,.70277],8704:Kt,8706:[0,.69444,.06389,0,.62847],8707:Kt,8709:gi,8711:Mn,8712:ci,8715:ci,8722:Pr,8723:Pr,8725:ft,8726:ft,8727:Ri,8728:Yn,8729:Yn,8730:[.18,.82,0,0,.95833],8733:Pi,8734:[0,.44444,0,0,1.14999],8736:dn,8739:sr,8741:ft,8743:Kn,8744:Kn,8745:Kn,8746:Kn,8747:[.19444,.69444,.12778,0,.56875],8764:vi,8768:[.19444,.69444,0,0,.31944],8771:Zi,8776:[.02444,.52444,0,0,.89444],8781:Zi,8801:Zi,8804:_i,8805:_i,8810:Mi,8811:Mi,8826:dr,8827:dr,8834:dr,8835:dr,8838:_i,8839:_i,8846:Kn,8849:_i,8850:_i,8851:Kn,8852:Kn,8853:Pr,8854:Pr,8855:Pr,8856:Pr,8857:Pr,8866:ji,8867:ji,8868:$r,8869:$r,8900:Yn,8901:[-.02639,.47361,0,0,.31944],8902:Ri,8968:ui,8969:ui,8970:ui,8971:ui,8994:hn,8995:hn,9651:xa,9657:Ri,9661:xa,9667:Ri,9711:_n,9824:Ci,9825:Ci,9826:Ci,9827:Ci,9837:[0,.75,0,0,.44722],9838:Oi,9839:Oi,10216:Ut,10217:Ut,10815:Dr,10927:_i,10928:_i,57376:fs},"Main-BoldItalic":{32:Mt,33:[0,.69444,.11417,0,.38611],34:Hn,35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:Dn,40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:bi,49:bi,50:bi,51:bi,52:Ui,53:bi,54:bi,55:Ui,56:bi,57:bi,58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:fi,64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:Ei,73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:Ei,79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:Fi,95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:Gi,104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:Gi,114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:Mt,168:[0,.69444,.11473,0,.59111],176:di,184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:Ni,248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:Ni,567:[.19444,.44444,.04611,0,.385],710:Fi,711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:Dn,730:di,732:fi,733:fi,915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:Ei,931:[0,.68611,.11431,0,.82666],933:Rn,934:[0,.68611,.05632,0,.82666],936:Rn,937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:Dn,8217:Dn,8220:[0,.69444,.16772,0,.62055],8221:Hn},"Main-Italic":{32:Mt,33:zi,34:ns,35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:zi,40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:Kr,49:Kr,50:Kr,51:Kr,52:Er,53:Kr,54:Kr,55:Er,56:Kr,57:Kr,58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:Ws,64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:pn,73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:pn,79:Nn,80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:pn,86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:On,95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:An,104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:An,114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:Mt,168:[0,.66786,.10474,0,.51111],176:Na,184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:ii,248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:ii,710:On,711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:Na,732:[0,.66786,.11585,0,.51111],733:Ws,915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:Nn,923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:pn,931:[0,.68333,.12028,0,.71555],933:qi,934:[0,.68333,.05986,0,.71555],936:qi,937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:zi,8217:zi,8220:[0,.69444,.1685,0,.51444],8221:ns,8463:Vr},"Main-Regular":{32:Mt,33:Xi,34:xn,35:Su,36:ka,37:sc,38:Sa,39:Xi,40:wa,41:wa,42:_u,43:yi,44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:ki,48:Wn,49:Wn,50:Wn,51:Wn,52:Wn,53:Wn,54:Wn,55:Wn,56:Wn,57:Wn,58:as,59:[.19444,.43056,0,0,.27778],60:hr,61:I,62:hr,63:lc,64:Sa,65:aa,66:[0,.68333,0,0,.70834],67:go,68:[0,.68333,0,0,.76389],69:mo,70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:aa,73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:_a,76:Fa,77:[0,.68333,0,0,.91667],78:aa,79:_a,80:mo,81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:go,85:aa,86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:aa,89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:bn,92:ki,93:bn,94:xn,95:[.31,.12056,.02778,0,.5],97:Ca,98:Ma,99:Ji,100:Ma,101:Ji,102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:Ma,105:Zs,106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:Xi,109:[0,.43056,0,0,.83334],110:is,111:Ca,112:Vs,113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:is,118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:Ji,123:ki,124:bn,125:ki,126:[.35,.31786,0,0,.5],160:Mt,163:[0,.69444,0,0,.76909],167:vo,168:ss,172:[0,.43056,0,0,.66667],176:os,177:yi,182:za,184:Ys,198:[0,.68333,0,0,.90278],215:yi,216:[.04861,.73194,0,0,.77778],223:xn,230:[0,.43056,0,0,.72222],247:yi,248:[.09722,.52778,0,0,.5],305:as,338:[0,.68333,0,0,1.01389],339:ds,567:[.19444,.43056,0,0,.30556],710:xn,711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:xn,715:xn,728:xn,729:Zs,730:os,732:ss,733:xn,915:Fa,916:js,920:_a,923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:aa,931:go,933:_a,934:go,936:_a,937:go,8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:Xi,8217:Xi,8220:xn,8221:xn,8224:vo,8225:vo,8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:Vr,8465:bo,8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:bo,8501:Nr,8592:fr,8593:ls,8594:fr,8595:ls,8596:fr,8597:ki,8598:Ea,8599:Ea,8600:Ea,8601:Ea,8614:[.011,.511,0,0,1],8617:cs,8618:cs,8636:fr,8637:fr,8640:fr,8641:fr,8652:[.011,.671,0,0,1],8656:fr,8657:za,8658:fr,8659:za,8660:fr,8661:[.25,.75,0,0,.61111],8704:Ma,8706:[0,.69444,.05556,.08334,.5309],8707:Ma,8709:ka,8711:js,8712:us,8715:us,8722:yi,8723:yi,8725:ki,8726:ki,8727:Zr,8728:yo,8729:yo,8730:[.2,.8,0,0,.83334],8733:ds,8734:qr,8736:dn,8739:bn,8741:ki,8743:Da,8744:Da,8745:Da,8746:Da,8747:[.19444,.69444,.11111,0,.41667],8764:I,8768:[.19444,.69444,0,0,.27778],8771:xo,8773:[-.022,.589,0,0,1],8776:Us,8781:xo,8784:[-.133,.67,0,0,.778],8801:xo,8804:Pt,8805:Pt,8810:Ka,8811:Ka,8826:hr,8827:hr,8834:hr,8835:hr,8838:Pt,8839:Pt,8846:Da,8849:Pt,8850:Pt,8851:Da,8852:Da,8853:yi,8854:yi,8855:yi,8856:yi,8857:yi,8866:Nr,8867:Nr,8868:Sa,8869:Sa,8872:[.249,.75,0,0,.867],8900:yo,8901:[-.05555,.44445,0,0,.27778],8902:Zr,8904:[.005,.505,0,0,.9],8942:[.03,.9,0,0,.278],8943:[-.19,.31,0,0,1.172],8945:[-.1,.82,0,0,1.282],8968:Yr,8969:Yr,8970:Yr,8971:Yr,8994:ai,8995:ai,9136:Vn,9137:Vn,9651:Aa,9657:Zr,9661:Aa,9667:Zr,9711:Ea,9824:oa,9825:oa,9826:oa,9827:oa,9837:[0,.75,0,0,.38889],9838:Fo,9839:Fo,10216:wa,10217:wa,10222:Vn,10223:Vn,10229:[.011,.511,0,0,1.609],10230:zo,10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:zo,10815:aa,10927:Pt,10928:Pt,57376:fs},"Math-BoldItalic":{32:Mt,48:sa,49:sa,50:sa,51:La,52:La,53:La,54:Qt,55:La,56:Qt,57:La,65:At,66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:lu,73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:Gs,77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:ou,105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:uu,112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:Mt,915:[0,.68611,.15972,0,.65694],916:Mn,920:[0,.68611,.03194,0,.86722],923:su,926:[0,.68611,.07458,0,.84125],928:lu,931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:cu,936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:uu,960:[0,.44444,.03704,0,.68241],961:ec,962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:ec,1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:Mt,48:Ca,49:Ca,50:Ca,51:hs,52:hs,53:hs,54:Wn,55:hs,56:Wn,57:hs,65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:fu,73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:du,80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:hu,112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:Mt,915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:du,923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:fu,931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:hu,960:[0,.43056,.03588,0,.57003],961:pu,962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:pu,1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:Mt,33:[0,.69444,0,0,.36667],34:Js,35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:Ha,40:mu,41:mu,42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:Fn,49:Fn,50:Fn,51:Fn,52:Fn,53:Fn,54:Fn,55:Fn,56:Fn,57:Fn,58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:tc,64:Ba,65:Ba,66:Ba,67:rc,68:la,69:[0,.69444,0,0,.64167],70:Nr,71:Ba,72:la,73:[0,.69444,0,0,.33056],74:tc,75:nc,76:Xs,77:[0,.69444,0,0,.97778],78:la,79:la,80:rc,81:[.10556,.69444,0,0,.79445],82:rc,83:Nr,84:Ba,85:nc,86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:Ba,89:[0,.69444,.0275,0,.73334],90:Wa,91:u0,93:u0,94:Fn,95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:ic,99:[0,.45833,0,0,.48889],100:ic,101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:ic,105:gu,106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:gu,109:[0,.45833,0,0,.86667],110:qs,111:[0,.45833,0,0,.55],112:vu,113:vu,114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:qs,118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:Mt,168:Fn,176:Ba,180:Fn,184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:Fn,711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:Fn,729:Ha,730:Ba,732:Fn,733:Fn,915:Xs,916:[0,.69444,0,0,.91667],920:wo,923:Wa,926:Ba,928:la,931:la,933:wo,934:la,936:wo,937:la,8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:Ha,8217:Ha,8220:Js,8221:Js},"SansSerif-Italic":{32:Mt,33:[0,.69444,.05733,0,.31945],34:wu,35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:oc,40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:Mu,45:[0,.44444,.01946,0,.33333],46:Cu,47:[.25,.75,.13164,0,.5],48:Ki,49:Ki,50:Ki,51:Ki,52:Ki,53:Ki,54:Ki,55:Ki,56:Ki,57:Ki,58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:Ia,66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:ps,73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:cc,77:[0,.69444,.08094,0,.875],78:ps,79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:bu,95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:Mt,168:[0,.67937,.06385,0,.5],176:ac,184:Ys,305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:bu,711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:yu,715:xn,728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:ac,732:[0,.67659,.08826,0,.5],733:yu,915:[0,.69444,.13372,0,.54167],916:Lu,920:[0,.69444,.07555,0,.77778],923:Nr,926:[0,.69444,.12816,0,.66667],928:ps,931:[0,.69444,.11983,0,.72222],933:xu,934:[0,.69444,.04603,0,.72222],936:xu,937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:oc,8217:oc,8220:[0,.69444,.14205,0,.5],8221:wu},"SansSerif-Regular":{32:Mt,33:[0,.69444,0,0,.31945],34:xn,35:Su,36:ka,37:sc,38:[0,.69444,0,0,.75834],39:Xi,40:wa,41:wa,42:_u,43:yi,44:Mu,45:[0,.44444,0,0,.33333],46:Cu,47:ki,48:ca,49:ca,50:ca,51:ca,52:ca,53:ca,54:ca,55:ca,56:ca,57:ca,58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:lc,64:Ia,65:Ia,66:Ia,67:Kt,68:[0,.69444,0,0,.72223],69:Eu,70:[0,.69444,0,0,.56945],71:Ia,72:uc,73:Xi,74:lc,75:[0,.69444,0,0,.69445],76:cc,77:[0,.69444,0,0,.875],78:uc,79:[0,.69444,0,0,.73611],80:Kt,81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:Ma,84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:Ia,89:[0,.69444,.025,0,.66667],90:Nr,91:Ko,93:Ko,94:xn,95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:Ho,99:Qs,100:Ho,101:Qs,102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:Ho,105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:Au,111:[0,.44444,0,0,.5],112:ku,113:ku,114:[0,.44444,.01389,0,.34167],115:Du,116:[0,.57143,0,0,.36111],117:Au,118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:Mt,168:[0,.67937,0,0,.5],176:Ia,184:Ys,305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:xn,711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:xn,715:xn,728:xn,729:[0,.67937,0,0,.27778],730:Ia,732:[0,.67659,0,0,.5],733:xn,915:cc,916:Lu,920:Sa,923:Nr,926:Ia,928:uc,931:bo,933:Sa,934:bo,936:Sa,937:bo,8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:Xi,8217:Xi,8220:xn,8221:xn},"Script-Regular":{32:Mt,65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:Mt},"Size1-Regular":{32:Mt,40:Bu,41:Bu,47:Iu,91:$u,92:Iu,93:$u,123:Tu,125:Tu,160:Mt,710:el,732:el,770:el,771:el,8214:[-99e-5,.601,0,0,.77778],8593:Pu,8595:Pu,8657:Ru,8659:Ru,8719:tl,8720:tl,8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:dc,8748:Ou,8749:Ou,8750:dc,8896:So,8897:So,8898:So,8899:So,8968:_o,8969:_o,8970:_o,8971:_o,9168:ys,10216:_o,10217:_o,10752:fc,10753:fc,10754:fc,10756:So,10758:So},"Size2-Regular":{32:Mt,40:Nu,41:Nu,47:hc,91:Fu,92:hc,93:Fu,123:pc,125:pc,160:Mt,710:rl,732:rl,770:rl,771:rl,8719:zu,8720:zu,8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:Hu,8748:Ku,8749:Ku,8750:Hu,8896:Di,8897:Di,8898:Di,8899:Di,8968:nl,8969:nl,8970:nl,8971:nl,10216:mc,10217:mc,10752:ms,10753:ms,10754:ms,10756:Di,10758:Di},"Size3-Regular":{32:Mt,40:Wu,41:Wu,47:gc,91:vc,92:gc,93:vc,123:il,125:il,160:Mt,710:gs,732:gs,770:gs,771:gs,8730:[.95003,1.45,0,0,1],8968:vs,8969:vs,8970:vs,8971:vs,10216:il,10217:il},"Size4-Regular":{32:Mt,40:Vu,41:Vu,47:Zu,91:bc,92:Zu,93:bc,123:al,125:al,160:Mt,710:Wo,732:Wo,770:Wo,771:Wo,8730:[1.25003,1.75,0,0,1],8968:bs,8969:bs,8970:bs,8971:bs,9115:Vo,9116:ju,9117:Vo,9118:Vo,9119:ju,9120:Vo,9121:ol,9122:ys,9123:ol,9124:ol,9125:ys,9126:ol,9127:Uu,9128:Gu,9129:yc,9130:[0,.3,0,0,.88889],9131:Uu,9132:Gu,9133:yc,9143:[.88502,.915,0,0,1.05556],10216:al,10217:al,57344:qu,57345:qu,57680:sl,57681:sl,57682:sl,57683:sl},"Typewriter-Regular":{32:Xu,33:wt,34:wt,35:wt,36:oi,37:oi,38:wt,39:wt,40:oi,41:oi,42:[0,.52083,0,0,.525],43:Mo,44:[.13889,.125,0,0,.525],45:Mo,46:[0,.125,0,0,.525],47:oi,48:wt,49:wt,50:wt,51:wt,52:wt,53:wt,54:wt,55:wt,56:wt,57:wt,58:hi,59:[.13889,.43056,0,0,.525],60:ll,61:[-.19549,.41562,0,0,.525],62:ll,63:wt,64:wt,65:wt,66:wt,67:wt,68:wt,69:wt,70:wt,71:wt,72:wt,73:wt,74:wt,75:wt,76:wt,77:wt,78:wt,79:wt,80:wt,81:[.13889,.61111,0,0,.525],82:wt,83:wt,84:wt,85:wt,86:wt,87:wt,88:wt,89:wt,90:wt,91:oi,92:oi,93:oi,94:wt,95:[.09514,0,0,0,.525],96:wt,97:hi,98:wt,99:hi,100:wt,101:hi,102:wt,103:Zo,104:wt,105:wt,106:[.22222,.61111,0,0,.525],107:wt,108:wt,109:hi,110:hi,111:hi,112:Zo,113:Zo,114:hi,115:hi,116:[0,.55358,0,0,.525],117:hi,118:hi,119:hi,120:hi,121:Zo,122:hi,123:oi,124:oi,125:oi,126:wt,127:wt,160:Xu,176:wt,184:[.19445,0,0,0,.525],305:hi,567:Zo,711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:wt,715:wt,728:wt,730:wt,770:wt,771:wt,776:wt,915:wt,916:wt,920:wt,923:wt,926:wt,928:wt,931:wt,933:wt,934:wt,936:wt,937:wt,8216:wt,8217:wt,8242:wt,9251:[.11111,.21944,0,0,.525]}},d0=/[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FAF]|[\uAC00-\uD7AF]/,jo=10,wn=.25,xc=1.2,$a=.431,Ju={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[$a,$a,$a],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.5,.732,.925],num2:[.394,.384,.5],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[wn,wn,wn],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04]},cl=[0,.5,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Co=5,wc={"\xA0":" ","\u200B":" ",\u00C5:"A",\u00C7:"C",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00E7:"c",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};function Uo(e,t){e===void 0&&(e=77);const r=xs[t][e];if(r)return{defaultMetrics:!1,depth:r[0],height:r[1],italic:r[2],skew:r[3],width:r[4]};if(e===11034)return{defaultMetrics:!0,depth:.2,height:.8,italic:0,skew:0,width:.8};const n=String.fromCodePoint(e);if(n in wc)e=wc[n].codePointAt(0);else if(d0.test(n))return e=77,{defaultMetrics:!0,depth:.2,height:.9,italic:0,skew:0,width:1};return{defaultMetrics:!0,depth:.2,height:.7,italic:0,skew:0,width:.8}}var Sc={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],longrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],longleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],longleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],longrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],longleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xleftrightarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],longleftrightarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xRightleftharpoons:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],longRightleftharpoons:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xLeftrightharpoons:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716],longLeftrightharpoons:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},_c={widehat1:[1062,239,.24],widehat2:[2364,300,.3],widehat3:[2364,360,.36],widehat4:[2364,420,.42],widecheck1:[1062,239,.24],widecheck2:[2364,300,.3],widecheck3:[2364,360,.36],widecheck4:[2364,420,.42],widetilde1:[600,260,.26],widetilde2:[1033,286,.286],widetilde3:[2339,306,.306],widetilde4:[2340,312,.34],overarc:[1061,159,.3],underarc:[1061,159,.3]},ul={doubleleftarrow:`M262 157
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,overarc:"M529 0c179 0 524 115 524 115 5 1 9 5 9 10 0 1-1 2-1 3l-4 22c-1 5-5 9-11 9h-2s-338-93-512-92c-174 0-513 92-513 92h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13 0 0 342-115 520-115z",underarc:`m 529 160
c -179 0 -524 -115 -524 -115
c -5 -1 -9 -5 -9 -10
c 0 -1 1 -2 1 -3
l 4 -22
c 1 -5 5 -9 11 -9
h 2
s 338 93 512 92
c 174 0 513 -92 513 -92
h 2
c 5 0 9 4 11 9
l 5 22
c 1 6 -2 12 -8 13
c 0 0 -342 115 -520 115
z
`,leftgroup:`M400000 80
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
435 0h399565z`,leftgroupunder:`M400000 262
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,widetilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
-68.267.847-113-73.952-191-73.952z`,widetilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,widetilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
-338 0-409-156.573-744-156.573z`,widetilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`};function ws(e){if(_c[e]){const[h,p,y]=_c[e],M=`<span class="stretchy" style="height:${y}em"><svg width="100%" height="${y}em" viewBox="0 0 ${h} ${p}" preserveAspectRatio="none" ><path fill="currentcolor" d="${ul[e]}"></path></svg></span>`;return`<span style="display:inline-block;height:${Math.floor(100*y/2)/100}em;min-width:0">${M}</span>`}const[t,r,n,i]=Sc[e];let a,s;const u=n/1e3;t.length===3?(a=["slice-1-of-3","slice-2-of-3","slice-3-of-3"],s=["xMinYMin","xMidYMin","xMaxYMin"]):t.length===2?(a=["slice-1-of-2","slice-2-of-2"],s=["xMinYMin","xMaxYMin"]):(a=["slice-1-of-1"],s=[i]);const d=t.map((h,p)=>`<span class="${a[p]}" style=height:${u}em><svg width=400em height=${u}em viewBox="0 0 400000 ${n}" preserveAspectRatio="${s[p]} slice"><path fill="currentcolor" d="${ul[h]}"></path></svg></span>`).join("");return`<span style="display:inline-block;height:${u}em;min-width:${r}em;">${d}</span>`}function f0(e){return Sc[e]?Sc[e][2]/1e3:_c[e][2]}function h0(e){const t=[];for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);if(n===13&&e.charCodeAt(r+1)===10&&(n=10,r++),(n===13||n===12)&&(n=10),n===0&&(n=65533),n>=55296&&n<=56319){const i=e.charCodeAt(r+1);if(i>=56320&&i<=57343){const a=n-55296,s=i-56320;n=po(2,16)+a*po(2,10)+s,r++}}t.push(n)}return t}var dl=8205,Yu=[[dl,1],[65038,2],[127995,5],[129456,4],[917536,96]],fl,Qu=[127462,127487];function hl(e){var t;if(fl===void 0){fl={};for(const r of Yu)for(let n=r[0];n<=r[0]+r[1]-1;n++)fl[n]=!0}return(t=fl[e])!=null?t:!1}function p0(e){return e>=Qu[0]&&e<=Qu[1]}function ed(e){if(/^[\u0020-\u00FF]*$/.test(e))return e;const t=[],r=h0(e);let n=0;for(;n<r.length;){const i=r[n++],a=r[n];if(a===dl){const s=n-1;for(n+=2;r[n]===dl;)n+=2;t.push(String.fromCodePoint(...r.slice(s,n-s+1)))}else if(hl(a)){const s=n-1;for(;hl(r[n]);)n+=r[n]===dl?2:1;t.push(String.fromCodePoint(...r.slice(s,2*n-s-1)))}else p0(i)?(n+=1,t.push(String.fromCodePoint(...r.slice(n-2,2)))):t.push(String.fromCodePoint(i))}return t}var pl=class{constructor(e){this.obeyspaces=!1,this.pos=0,this.s=ed(e)}end(){return this.pos>=this.s.length}get(){return this.pos<this.s.length?this.s[this.pos++]:""}peek(){return this.s[this.pos]}match(e){const t=typeof this.s=="string"?e.exec(this.s.slice(this.pos)):e.exec(this.s.slice(this.pos).join(""));return t!=null&&t[0]?(this.pos+=t[0].length,t[0]):""}next(){if(this.end())return null;if(!this.obeyspaces&&this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]+/)||this.obeyspaces&&this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]/))return"<space>";const e=this.get();if(e==="\\"){if(!this.end()){let t=this.match(/^[a-zA-Z\*]+/);return t?this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]*/):t=this.get(),"\\"+t}}else{if(e==="{")return"<{>";if(e==="}")return"<}>";if(e==="^"){if(this.peek()==="^"){this.get();const t=this.match(/^(\^(\^(\^(\^[\da-f])?[\da-f])?[\da-f])?[\da-f])?[\da-f]{2}/);if(t)return String.fromCodePoint(Number.parseInt(t.slice(t.lastIndexOf("^")+1),16))}return e}else if(e==="#"){if(!this.end()){let t=!1;if(/[\d?@]/.test(this.peek())&&(t=!0,this.pos+1<this.s.length)){const r=this.s[this.pos+1];t=/[^\dA-Za-z]/.test(r)}return t?"#"+this.get():"#"}}else if(e==="$")return this.peek()==="$"?(this.get(),"<$$>"):"<$>"}return e}};function m0(e,t){var r,n,i,a;const s=[];let u=e.next();if(u&&u!=="\\relax"){if(u==="\\noexpand")u=e.next(),u&&s.push(u);else if(u==="\\obeyspaces")e.obeyspaces=!0;else if(u==="\\bgroup")s.push("<{>");else if(u==="\\egroup")s.push("<}>");else if(u==="\\string"){if(u=e.next(),u)if(u.startsWith("\\"))for(const d of u)s.push(d==="\\"?"\\backslash":d);else u==="<{>"?s.push("\\{"):u==="<space>"?s.push("~"):u==="<}>"&&s.push("\\}")}else if(u==="\\csname"){for(;e.peek()==="<space>";)e.next();let d="",h=!1,p=[];do{if(p.length===0)if(/^#[\d?@]$/.test(e.peek())){const y=e.get().slice(1);p=ml((n=(r=t==null?void 0:t(y))!=null?r:t==null?void 0:t("?"))!=null?n:"\\placeholder{}",t),u=p[0]}else u=e.next(),p=u?[u]:[];h=p.length===0,!h&&u==="\\endcsname"&&(h=!0,p.shift()),h||(h=u==="<$>"||u==="<$$>"||u==="<{>"||u==="<}>"||typeof u=="string"&&u.length>1&&u.startsWith("\\")),h||(d+=p.shift())}while(!h);d&&s.push("\\"+d),s.push(...p)}else if(u!=="\\endcsname")if(u.length>1&&u.startsWith("#")){const d=u.slice(1);s.push(...ml((a=(i=t==null?void 0:t(d))!=null?i:t==null?void 0:t("?"))!=null?a:"\\placeholder{}",t))}else s.push(u)}return s}function ml(e,t=null){const r=[];let n="";for(const s of e.toString().split(/\r?\n/)){n&&r.push(n),n=" ";const u=s.match(/((?:\\%)|[^%])*/);u!==null&&r.push(u[0])}const i=new pl(Be(r.join(""))),a=[];do a.push(...m0(i,t));while(!i.end());return a}function kr(e){let t="";const r=[];for(const n of e)n&&(t&&/^[a-zA-Z\*]/.test(n)&&r.push(t),r.push(n),/^\\[a-zA-Z]+\*?[\"\'][^\ ]+$/.test(n)&&r.push(" "),t=/\\[a-zA-Z]+\*?$/.test(n)?" ":"");return r.join("")}function sn(e,...t){return console.assert(e.startsWith("\\")),t.length===0?e:kr([e,...t.map(r=>`{${r}}`)])}function Eo(e){return kr(e.map(t=>{var r;return(r={"<space>":" ","<$$>":"$$","<$>":"$","<{>":"{","<}>":"}"}[t])!=null?r:t}))}var g0=class au{constructor(t){au._registry[t]=this}static createAtom(t,r,n){return au._registry[t].createAtom(r,le(r,t),n)}static serialize(t,r){var n;if(!t||t.length===0)return"";if((n=r.skipStyles)!=null&&n){const i=[];for(const a of v0(t)){const s=au._registry[a[0].mode];i.push(...s.serialize(a,r))}return kr(i)}return kr(b0(t,r))}static getFont(t,r,n){return au._registry[t].getFont(r,n)}};g0._registry={};var Ai=g0;function v0(e){const t=[];let r=[],n="NONE";for(const i of e)i.type!=="first"&&(i.mode!==n?(r.length>0&&t.push(r),r=[i],n=i.mode):r.push(i));return r.length>0&&t.push(r),t}function Hi(e,t){const r=[];let n=[],i;for(const a of e)if(a.type!=="first"&&a.style){let s;t==="variant"?(s=a.style.variant,a.style.variantStyle&&a.style.variantStyle!=="up"&&(s+="-"+a.style.variantStyle)):s=a.style[t],s===i?n.push(a):(n.length>0&&r.push(n),n=[a],i=s)}return n.length>0&&r.push(n),r}function td(e,t){var r;const{parent:n}=e[0],i=n==null?void 0:n.computedStyle.color,a=[];for(const s of v0(e)){const u=t.defaultMode;for(const d of Hi(s,"color")){const h=d[0].computedStyle,p=Ai._registry[d[0].mode].serialize(d,_(S({},t),{defaultMode:u==="text"?"text":"math"}));!t.skipStyles&&h.color&&h.color!=="none"&&(!n||i!==h.color)?a.push(sn("\\textcolor",(r=h.verbatimColor)!=null?r:h.color,kr(p))):a.push(kr(p))}}return a}function Mc(e,t){const{parent:r}=e[0],n=r==null?void 0:r.computedStyle.backgroundColor;return Hi(e,"backgroundColor").map(i=>{var a;if(i.length>0||i[0].type!=="box"){const s=i[0].computedStyle;if(s.backgroundColor&&s.backgroundColor!=="none"&&(!r||n!==s.backgroundColor))return sn("\\colorbox",(a=s.verbatimBackgroundColor)!=null?a:s.backgroundColor,kr(td(i,_(S({},t),{defaultMode:"text"}))))}return kr(td(i,t))})}function b0(e,t){if(e.length===0)return[];const{parent:r}=e[0],n=r==null?void 0:r.computedStyle.fontSize,i=[];for(const a of Hi(e,"fontSize")){const s=a[0].computedStyle.fontSize,u=Mc(a,t);u&&(s&&s!=="auto"&&(!r||n!==s)?i.push(["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][s],...u):i.push(...u))}return i}function Cc(e){return e?{mord:"ord",mbin:"bin",mop:"op",mrel:"rel",mopen:"open",mclose:"close",mpunct:"punct",minner:"inner",spacing:"ignore",latex:"latex",composition:"inner",error:"inner",placeholder:"ord",supsub:"ignore"}[e]:void 0}function Ss(e){if(e.length===0)return"ord";const t=Cc(e[0].type),r=Cc(e[e.length-1].type);return t&&t===r?t:"ord"}function ko(e,t){if(typeof e=="string")return e;if(typeof e=="number"){console.assert(Number.isFinite(e));const r=Math.ceil(100*e)/100;return r===0?"0":r.toString()+(t!=null?t:"")}return""}var Ue=class Qh{constructor(t,r){var n,i,a,s,u;if(typeof t=="number"?this.value=String.fromCodePoint(t):typeof t=="string"?this.value=t:A(t)?this.children=t.filter(h=>h!==null):t&&t instanceof Qh&&(this.children=[t]),this.children)for(const h of this.children)h.parent=this;this.type=(n=r==null?void 0:r.type)!=null?n:"ignore",this.isSelected=(r==null?void 0:r.isSelected)===!0,r!=null&&r.caret&&(this.caret=r.caret),this.classes=(i=r==null?void 0:r.classes)!=null?i:"",this.isTight=(a=r==null?void 0:r.isTight)!=null?a:!1,r!=null&&r.attributes&&(this.attributes=r.attributes);let d=r==null?void 0:r.fontFamily;r!=null&&r.style&&this.value&&(d=(u=Ai.getFont((s=r.mode)!=null?s:"math",this,_(S({variant:"normal"},r.style),{letterShapeStyle:r.letterShapeStyle})))!=null?u:void 0),d||(d="Main-Regular"),this._height=0,this._depth=0,this._width=0,this.hasExplicitWidth=!1,this.skew=0,this.italic=0,this.maxFontSize=0,this.scale=1,(r==null?void 0:r.maxFontSize)!==void 0&&(this.maxFontSize=r.maxFontSize),y0(this,d)}set atomID(t){t===void 0||t.length===0||(this.id=t)}selected(t){if(this.isSelected!==t&&(this.isSelected=t,this.children))for(const r of this.children)r.selected(t)}setStyle(t,r,n){if(r===void 0)return;const i=ko(r,n);i.length>0&&(this.cssProperties||(this.cssProperties={}),this.cssProperties[t]=i)}setTop(t){Number.isFinite(t)&&Math.abs(t)>.01&&(this.cssProperties||(this.cssProperties={}),this.cssProperties.top=ko(t,"em"),this.height-=t,this.depth+=t)}get left(){var t;return(t=this.cssProperties)!=null&&t["margin-left"]?Number.parseFloat(this.cssProperties["margin-left"]):0}set left(t){Number.isFinite(t)&&(t===0?this.cssProperties&&delete this.cssProperties["margin-left"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-left"]=ko(t,"em")))}set right(t){Number.isFinite(t)&&(t===0?this.cssProperties&&delete this.cssProperties["margin-right"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-right"]=ko(t,"em")))}set bottom(t){Number.isFinite(t)&&(t===0?this.cssProperties&&delete this.cssProperties["margin-bottom"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-bottom"]=ko(t,"em")))}get width(){return this._width*this.scale}set width(t){this._width=t,this.hasExplicitWidth=!0}set softWidth(t){}get height(){return this._height*this.scale}set height(t){this._height=t}get depth(){return this._depth*this.scale}set depth(t){this._depth=t}wrap(t){const r=t.parent;if(!r)return this;t.isPhantom&&this.setStyle("opacity",0);const n=t.color;n&&n!==r.color&&this.setStyle("color",n);let i=t.backgroundColor;this.isSelected&&(i=F(i)),i&&i!==r.backgroundColor&&(this.setStyle("background-color",i),this.setStyle("display","inline-block"));const a=t.scalingFactor;return this.scale=a,this.skew*=a,this.italic*=a,this}toMarkup(){var t,r,n,i;let a=(t=this.value)!=null?t:"";if(this.children)for(const B of this.children)a+=B.toMarkup();let s="";if(this.svgBody)s=ws(this.svgBody);else if(this.svgOverlay){s='<span style="',s+="display: inline-block;",s+=`height:${Math.floor(100*(this.height+this.depth))/100}em;`,s+=`vertical-align:${Math.floor(100*this.depth)/100}em;`,s+='">',s+=a,s+="</span>",s+='<svg style="position:absolute;overflow:visible;',s+=`height:${Math.floor(100*(this.height+this.depth))/100}em;`;const B=(r=this.cssProperties)==null?void 0:r.padding;B?(s+=`top:${B};`,s+=`left:${B};`,s+=`width:calc(100% - 2 * ${B} );`):s+="top:0;left:0;width:100%;",s+="z-index:2;",s+='"',this.svgStyle&&(s+=this.svgStyle),s+=` viewBox="0 0 ${Math.floor(100*this.width)/100} ${Math.floor(100*(this.height+this.depth))/100}"`,s+=`>${this.svgOverlay}</svg>`}let u="";const d=this.classes.split(" ");d.push((n={latex:"ML__raw-latex",placeholder:"ML__placeholder",error:"ML__error"}[this.type])!=null?n:""),this.caret==="latex"&&d.push("ML__latex-caret"),this.isSelected&&d.push("ML__selected");const h=d.length===1?d[0]:d.filter((B,$,oe)=>B.length>0&&oe.indexOf(B)===$).join(" ");if(h.length>0&&(u+=` class="${h}"`),this.id&&(u+=` data-atom-id=${this.id}`),this.cssId&&(u+=` id="${this.cssId.replace(/ /g,"-")}" `),this.attributes&&(u+=" "+Object.keys(this.attributes).map(B=>`${B}="${this.attributes[B]}"`).join(" ")),this.htmlData){const B=this.htmlData.split(",");for(const $ of B){const oe=$.match(/([^=]+)=(.+$)/);if(oe){const Ve=oe[1].trim().replace(/ /g,"-");Ve&&(u+=` data-${Ve}="${oe[2]}" `)}else{const Ve=$.trim().replace(/ /g,"-");Ve&&(u+=` data-${Ve} `)}}}const p=(i=this.cssProperties)!=null?i:{};this.hasExplicitWidth&&p.width===void 0&&(p.width=`${Math.ceil(this._width*100)/100}em`);const y=Object.keys(p).map(B=>`${B}:${p[B]}`);if(this.scale!==void 0&&this.scale!==1&&(a.length>0||s.length>0)&&y.push(`font-size: ${Math.ceil(this.scale*1e4)/100}%`),this.htmlStyle){const B=this.htmlStyle.split(";");let $="";for(const oe of B){const Ve=oe.match(/([^=]+):(.+$)/);if(Ve){const re=Ve[1].trim().replace(/ /g,"-");re&&($+=`${re}:${Ve[2]};`)}}$&&(u+=` style="${$}"`)}y.length>0&&(u+=` style="${y.join(";")}"`);let M="";return u.length>0||s.length>0?M=`<span${u}>${a}${s}</span>`:M=a,this.caret==="text"?M+='<span class="ML__text-caret"></span>':this.caret==="math"&&(M+='<span class="ML__caret"></span>'),M}tryCoalesceWith(t){if(this.svgBody||!this.value||t.svgBody||!t.value)return!1;const r=this.children&&this.children.length>0,n=t.children&&t.children.length>0;if(r||n)return!1;if(t.cssProperties||this.cssProperties){for(const d of["border","border-left","border-right","border-right-width","left","margin","margin-left","margin-right","padding","position","width"])if(t.cssProperties&&d in t.cssProperties||this.cssProperties&&d in this.cssProperties)return!1}const i=this.cssProperties?Object.keys(this.cssProperties).length:0,a=t.cssProperties?Object.keys(t.cssProperties).length:0;if(i!==a)return!1;if(i>0){for(const d of Object.keys(this.cssProperties))if(this.cssProperties[d]!==t.cssProperties[d])return!1}const s=this.classes.trim().replace(/\s+/g," ").split(" "),u=t.classes.trim().replace(/\s+/g," ").split(" ");if(s.length!==u.length)return!1;s.sort(),u.sort();for(const[d,h]of s.entries())if(h==="vertical-separator"||h!==u[d])return!1;return this.value+=t.value,this.height=Math.max(this.height,t.height),this.depth=Math.max(this.depth,t.depth),this._width=this._width+t._width,this.maxFontSize=Math.max(this.maxFontSize,t.maxFontSize),this.italic=t.italic,!0}};function Ec(e){if(!e||e.length===0)return[];e[0].children=Ec(e[0].children);const t=[e[0]];for(let r=1;r<e.length;r++)t[t.length-1].tryCoalesceWith(e[r])||(e[r].children=Ec(e[r].children),t.push(e[r]));return t}function gl(e){return e.children&&(e.children=Ec(e.children)),e}function vl(e,t){if(!e)return new Ue(null,t);const r=new Ue(null,{classes:"ML__strut",type:"ignore"});r.setStyle("height",Math.max(0,e.height),"em");const n=[r];if(e.depth!==0){const i=new Ue(null,{classes:"ML__strut--bottom",type:"ignore"});i.setStyle("height",e.height+e.depth,"em"),i.setStyle("vertical-align",-e.depth,"em"),n.push(i)}return n.push(e),new Ue(n,_(S({},t),{type:"lift"}))}function bl(e){const t=f0(e)/2,r=new Ue(null,{maxFontSize:0});return r.height=t+.166,r.depth=t-.166,r.svgBody=e,r}function y0(e,t){var r;if(e.type==="latex"){e.height=.9,e.depth=.2,e._width=1;return}if(e.value){e.height=-1/0,e.depth=-1/0,e._width=0,e.skew=-1/0,e.italic=-1/0;for(let n=0;n<e.value.length;n++){const i=Uo(e.value.codePointAt(n),t);e.height=Math.max(e.height,i.height),e.depth=Math.max(e.depth,i.depth),e._width+=i.width,e.skew=i.skew,e.italic=i.italic}return}if(e.children&&e.children.length>0){let n=-1/0,i=-1/0,a=0;for(const s of e.children)s.height>n&&(n=s.height),s.depth>i&&(i=s.depth),a=Math.max(a,(r=s.maxFontSize)!=null?r:0);e.height=n,e.depth=i,e._width=e.children.reduce((s,u)=>s+u.width,0),e.maxFontSize=a}}function x0(e){if("individualShift"in e){const t=e.individualShift;let r=t[0];const n=[r],i=-r.shift-r.box.depth;let a=i;for(let s=1;s<t.length;s++){const u=t[s],d=-u.shift-a-u.box.depth,h=d-(r.box.height+r.box.depth);a=a+d,n.push(h),n.push(u),r=u}return[n,i]}if("top"in e){let t=e.top;for(const r of e.children)t-=typeof r=="number"?r:r.box.height+r.box.depth;return[e.children,t]}else{if("bottom"in e)return[e.children,-e.bottom];if("firstBaseline"in e){const t=e.firstBaseline[0];if(typeof t=="number")throw new Error("First child must be an element.");return[e.firstBaseline,-t.box.depth]}else if("shift"in e){const t=e.children[0];if(typeof t=="number")throw new Error("First child must be an element.");return[e.children,-t.box.depth-e.shift]}}return[null,0]}function w0(e){var t;const[r,n]=x0(e);if(!r)return[[],0,0];const i=new Ue(null,{classes:"pstrut"});let a=0;for(const $ of r)if(typeof $!="number"){const oe=$.box;a=Math.max(a,oe.maxFontSize,oe.height)}a+=2,i.height=a,i.setStyle("height",a,"em");const s=[];let u=n,d=n,h=n,p=0;for(const $ of r){if(typeof $=="number")h+=$;else{const oe=$.box,Ve=(t=$.classes)!=null?t:[],re=new Ue([i,oe],{classes:Ve.join(" "),style:$.style});oe.setStyle("height",oe.height+oe.depth,"em"),oe.setStyle("display","inline-block"),re.setStyle("top",-a-h-oe.depth,"em"),$.marginLeft&&re.setStyle("margin-left",$.marginLeft,"em"),$.marginRight&&re.setStyle("margin-right",$.marginRight,"em"),s.push(re),h+=oe.height+oe.depth,p=Math.max(p,re.width)}u=Math.min(u,h),d=Math.max(d,h)}s.forEach($=>{$.softWidth=p});const y=new Ue(s,{classes:"vlist"});if(y.softWidth=p,y.height=d,y.setStyle("height",d,"em"),u>=0)return[[new Ue(y,{classes:"vlist-r"})],d,-u];const M=new Ue(new Ue(null),{classes:"vlist"});M.height=-u,M.setStyle("height",-u,"em");const B=new Ue(8203,{classes:"vlist-s",maxFontSize:0});return B.softWidth=0,B.height=0,B.depth=0,[[new Ue([y,B],{classes:"vlist-r"}),new Ue(M,{classes:"vlist-r"})],d,-u]}var Ln=class extends Ue{constructor(e,t){var r;const[n,i,a]=w0(e);super(n.length===1?n[0]:n,{type:t==null?void 0:t.type,classes:((r=t==null?void 0:t.classes)!=null?r:"")+" vlist-t"+(n.length===2?" vlist-t2":"")}),this.height=i,this.depth=a,this.softWidth=n.reduce((s,u)=>Math.max(s,u.width),0)}};function yl(e,t){var r,n,i,a,s;const u=e.metrics,d=new Ue(t.base),h=(r=t.baseShift)!=null?r:0,p=(n=t.slant)!=null?n:0;let y=0,M=0;t.above&&(y=(i=t.aboveShift)!=null?i:Math.max(u.bigOpSpacing1,u.bigOpSpacing3-t.above.depth)),t.below&&(M=(a=t.belowShift)!=null?a:Math.max(u.bigOpSpacing2,u.bigOpSpacing4-t.below.height));let B=null;if(t.below&&t.above){const $=u.bigOpSpacing5+t.below.height+t.below.depth+M+d.depth+h;B=new Ln({bottom:$,children:[u.bigOpSpacing5,{box:t.below,marginLeft:-p,classes:["ML__center"]},M,{box:d,classes:["ML__center"]},y,{box:t.above,marginLeft:p,classes:["ML__center"]},u.bigOpSpacing5]}).wrap(e)}else if(t.below&&!t.above)B=new Ln({top:d.height-h,children:[u.bigOpSpacing5,{box:t.below,marginLeft:-p,classes:["ML__center"]},M,{box:d,classes:["ML__center"]}]}).wrap(e);else if(!t.below&&t.above){const $=d.depth+h;B=new Ln({bottom:$,children:[{box:d,classes:["ML__center"]},y,{box:t.above,marginLeft:p,classes:["ML__center"]},u.bigOpSpacing5]}).wrap(e)}else{const $=d.depth+h;B=new Ln({bottom:$,children:[{box:d},u.bigOpSpacing5]}).wrap(e)}return new Ue(B,{type:(s=t.type)!=null?s:"op"})}var kc=7,_s=6,Do=5,Va=4,Ao=3,Li=2,Za=1,si=0,ja=class{constructor(e,t,r){this.id=e,this.sizeDelta=t,this.cramped=r;const n={"-4":2,"-3":1,0:0}[t];this.metrics=Object.keys(Ju).reduce((i,a)=>_(S({},i),{[a]:Ju[a][n]}),{})}getFontSize(e){return Math.max(1,e+this.sizeDelta)}get sup(){return da[[si,Za,si,Za,Li,Ao,Li,Ao][this.id]]}get sub(){return da[[si,si,si,si,Li,Li,Li,Li][this.id]]}get fracNum(){return da[[si,Za,si,Za,Li,Ao,Va,Do][this.id]]}get fracDen(){return da[[si,si,si,si,Li,Li,Va,Va][this.id]]}get cramp(){return da[[si,si,Li,Li,Va,Va,_s,_s][this.id]]}get isTight(){return this.sizeDelta<0}},ua={7:new ja(kc,0,!1),6:new ja(_s,0,!0),5:new ja(Do,0,!1),4:new ja(Va,0,!0),3:new ja(Ao,-3,!1),2:new ja(Li,-3,!0),1:new ja(Za,-4,!1),0:new ja(si,-4,!0)},da=_(S({},ua),{displaystyle:ua[kc],textstyle:ua[Do],scriptstyle:ua[Ao],scriptscriptstyle:ua[Za]});function rd(e,t){var r;if(!e)return 0;const n={pt:1,mm:7227/2540,cm:7227/254,ex:35271/8192,px:3/4,em:jo,bp:803/800,dd:1238/1157,pc:12,in:72.27,mu:10/18}[(r=e.unit)!=null?r:"pt"];if(Number.isFinite(t)){const i=po(10,t);return Math.round(e.dimension/jo*n*i)/i}return e.dimension*n}function nd(e,t){if(e===null)return 0;const r=rd(e)/jo;if(Number.isFinite(t)){const n=po(10,t);return Math.round(r*n)/n}return r}function Dc(e){var t;return`${e.dimension}${(t=e.unit)!=null?t:"pt"}`}function Ac(e){let t=Dc(e.glue);return e.grow&&e.grow.dimension!==0&&(t+=` plus ${Dc(e.grow)}`),e.shrink&&e.shrink.dimension!==0&&(t+=` minus ${Dc(e.shrink)}`),t}function Zn(e){var t,r;if(e==null)return null;let n="";if("dimension"in e&&(n=`${e.dimension}${(t=e.unit)!=null?t:"pt"}`),"glue"in e&&(n=Ac(e)),"number"in e)if(!("base"in e)||e.base==="decimal")n=Number(e.number).toString();else if(e.base==="alpha")n=`\`${String.fromCodePoint(e.number)}`;else{const i=Math.round(e.number)>>>0;e.base==="hexadecimal"?(n=Number(i).toString(16).toUpperCase(),i<=255?n=n.padStart(2,"0"):i<=65535?n=n.padStart(4,"0"):i<=16777215?n=n.padStart(6,"0"):n=n.padStart(8,"0"),n=`"${n}`):e.base==="octal"&&(n=Number(i).toString(8),i<=63?n=n.padStart(2,"0"):i<=30583?n=n.padStart(4,"0"):n=n.padStart(8,"0"),n=`'${n}`)}return"register"in e&&("factor"in e&&(e.factor===-1?n="-":e.factor!==1&&(n=Number(e.factor).toString())),"global"in e&&e.global&&(n+="\\global"),n+=`\\${e.register}`),"string"in e&&(n=e.string),(r=e.relax)!=null&&r&&(n+="\\relax"),n}function fa(e,t){return e==null?null:"number"in e?_(S({},e),{number:e.number*t}):"register"in e?"factor"in e&&e.factor?_(S({},e),{factor:e.factor*t}):_(S({},e),{factor:t}):"dimension"in e?_(S({},e),{dimension:e.dimension*t}):"glue"in e?e.shrink&&e.grow?{glue:fa(e.glue,t),shrink:fa(e.shrink,t),grow:fa(e.grow,t)}:e.shrink?{glue:fa(e.glue,t),shrink:fa(e.shrink,t)}:e.grow?{glue:fa(e.glue,t),grow:fa(e.grow,t)}:{glue:fa(e.glue,t)}:null}var S0={"p@":{dimension:1},"z@":{dimension:0},maxdimen:{dimension:16383.99999},hfuzz:{dimension:.1},vfuzz:{dimension:.1},overfullrule:{dimension:5},hsize:{dimension:6.5,unit:"in"},vsize:{dimension:8.9,unit:"in"},parindent:{dimension:20},maxdepth:{dimension:4},splitmaxdepth:{register:"maxdimen"},boxmaxdepth:{register:"maxdimen"},delimitershortfall:{dimension:5},nulldelimiterspace:{dimension:1.2,unit:"pt"},scriptspace:{dimension:.5},topskip:{dimension:10},splittopskip:{dimension:10},normalbaselineskip:{dimension:12},normallineskip:{dimension:1},normallineskiplimit:{dimension:0},jot:{dimension:3},doublerulesep:{dimension:2},arrayrulewidth:{dimension:.4},arraycolsep:{dimension:5},fboxsep:{dimension:3},fboxrule:{dimension:.4},"z@skip":{glue:{dimension:0},shrink:{dimension:0},grow:{dimension:0}},hideskip:{glue:{dimension:-1e3},grow:{dimension:1,unit:"fill"}},"@flushglue":{glue:{dimension:0},grow:{dimension:1,unit:"fill"}},parskip:{glue:{dimension:0},grow:{dimension:1}},abovedisplayskip:{glue:{dimension:12},grow:{dimension:3},shrink:{dimension:9}},abovedisplayshortskip:{glue:{dimension:0},grow:{dimension:3}},belowdisplayskip:{glue:{dimension:12},grow:{dimension:3},shrink:{dimension:9}},belowdisplayshortskip:{glue:{dimension:7},grow:{dimension:3},shrink:{dimension:4}},parfillskip:{glue:{dimension:0},grow:{dimension:1,unit:"fil"}},thinmuskip:{glue:{dimension:3,unit:"mu"}},medmuskip:{glue:{dimension:4,unit:"mu"},grow:{dimension:2,unit:"mu"},shrink:{dimension:4,unit:"mu"}},thickmuskip:{glue:{dimension:5,unit:"mu"},grow:{dimension:5,unit:"mu"}},smallskipamount:{glue:{dimension:3},grow:{dimension:1},shrink:{dimension:1}},medskipamount:{glue:{dimension:6},grow:{dimension:2},shrink:{dimension:3}},bigskipamount:{glue:{dimension:12},grow:{dimension:2},shrink:{dimension:4}},pretolerance:100,tolerance:200,hbadness:1e3,vbadness:1e3,linepenalty:10,hyphenpenalty:50,exhyphenpenalty:50,binoppenalty:700,relpenalty:500,clubpenalty:150,widowpenalty:150,displaywidowpenalty:50,brokenpenalty:100,predisplaypenalty:1e4,doublehyphendemerits:1e4,finalhyphendemerits:5e3,adjdemerits:1e4,tracinglostchars:1,uchyph:1,delimiterfactor:901,defaulthyphenchar:"\\-",defaultskewchar:-1,newlinechar:-1,showboxbreadth:5,showboxdepth:3,errorcontextlines:5,interdisplaylinepenalty:100,interfootnotelinepenalty:100,baselineSkip:1.2,arraystretch:1,month:new Date().getMonth()+1,day:new Date().getDate(),year:new Date().getFullYear()};function id(){return S({},S0)}function Lc(){return{registers:id(),smartFence:!1,renderPlaceholder:void 0,placeholderSymbol:"\u25A2",letterShapeStyle:Me.locale.startsWith("fr")?"french":"tex",minFontScale:0,colorMap:st,backgroundColorMap:lt,getMacro:e=>ot(e,bt())}}var Ar=class ep{constructor(t,r){var n,i,a,s,u,d,h,p,y,M,B,$,oe,Ve,re;let De;t!=null&&t.parent?(this.parent=t.parent,De=t.parent,this.registers={}):(De=S(S({},Lc()),(n=t==null?void 0:t.from)!=null?n:{}),this.registers=De.registers),De.atomIdsSettings&&(this.atomIdsSettings=S({},De.atomIdsSettings)),this.renderPlaceholder=De.renderPlaceholder,this.isPhantom=(s=(a=t==null?void 0:t.isPhantom)!=null?a:(i=this.parent)==null?void 0:i.isPhantom)!=null?s:!1,this.letterShapeStyle=De.letterShapeStyle,this.minFontScale=De.minFontScale,r!=null&&r.color&&r.color!=="none"?this.color=r.color:this.color=(d=(u=this.parent)==null?void 0:u.color)!=null?d:"",r!=null&&r.backgroundColor&&r.backgroundColor!=="none"?this.backgroundColor=r.backgroundColor:this.backgroundColor=(p=(h=this.parent)==null?void 0:h.backgroundColor)!=null?p:"",r!=null&&r.fontSize&&r.fontSize!=="auto"&&r.fontSize!==((y=this.parent)==null?void 0:y.size)?this.size=r.fontSize:this.size=(B=(M=this.parent)==null?void 0:M.size)!=null?B:Co;let Xe=(oe=($=this.parent)==null?void 0:$.mathstyle)!=null?oe:da.displaystyle;if(typeof(t==null?void 0:t.mathstyle)=="string"){if(De instanceof ep)switch(t.mathstyle){case"cramp":Xe=Xe.cramp;break;case"superscript":Xe=Xe.sup;break;case"subscript":Xe=Xe.sub;break;case"numerator":Xe=Xe.fracNum;break;case"denominator":Xe=Xe.fracDen;break}switch(t.mathstyle){case"textstyle":Xe=da.textstyle;break;case"displaystyle":Xe=da.displaystyle;break;case"scriptstyle":Xe=da.scriptstyle;break;case"scriptscriptstyle":Xe=da.scriptscriptstyle;break;case"":case"auto":break}}this.mathstyle=Xe,this.smartFence=De.smartFence,this.placeholderSymbol=De.placeholderSymbol,this.colorMap=(Ve=De.colorMap)!=null?Ve:$e=>$e,this.backgroundColorMap=(re=De.backgroundColorMap)!=null?re:$e=>$e,this.getMacro=De.getMacro,console.assert(this.parent!==void 0||this.registers!==void 0)}makeID(){if(!this.atomIdsSettings)return;if(this.atomIdsSettings.overrideID)return this.atomIdsSettings.overrideID;if(typeof this.atomIdsSettings.seed!="number")return`${Date.now().toString(36).slice(-2)}${Math.floor(Math.random()*1e5).toString(36)}`;const t=this.atomIdsSettings.seed.toString(36);return this.atomIdsSettings.seed+=1,t}scale(t){return t*this.effectiveFontSize}get scalingFactor(){return this.parent?this.effectiveFontSize/this.parent.effectiveFontSize:1}get isDisplayStyle(){return this.mathstyle.id===kc||this.mathstyle.id===_s}get isCramped(){return this.mathstyle.cramped}get isTight(){return this.mathstyle.isTight}get metrics(){return this.mathstyle.metrics}get effectiveFontSize(){return Math.max(cl[Math.max(1,this.size+this.mathstyle.sizeDelta)],this.minFontScale)}getRegister(t){var r;if((r=this.registers)!=null&&r[t])return this.registers[t];if(this.parent)return this.parent.getRegister(t)}getRegisterAsNumber(t){const r=this.getRegister(t);if(typeof r=="number")return r;if(typeof r=="string")return Number(r)}getRegisterAsGlue(t){var r;if((r=this.registers)!=null&&r[t]){const n=this.registers[t];return typeof n=="object"&&"glue"in n?n:typeof n=="object"&&"dimension"in n?{glue:{dimension:n.dimension}}:typeof n=="number"?{glue:{dimension:n}}:void 0}if(this.parent)return this.parent.getRegisterAsGlue(t)}getRegisterAsEm(t,r){return nd(this.getRegisterAsDimension(t),r)}getRegisterAsDimension(t){var r;if((r=this.registers)!=null&&r[t]){const n=this.registers[t];return typeof n=="object"&&"glue"in n?n.glue:typeof n=="object"&&"dimension"in n?n:typeof n=="number"?{dimension:n}:void 0}if(this.parent)return this.parent.getRegisterAsDimension(t)}setRegister(t,r){if(r===void 0){delete this.registers[t];return}this.registers[t]=r}evaluate(t){if(!t||!("register"in t))return t;let r=this;if("global"in t&&t.global)for(;r.parent;)r=r.parent;let n=1;"factor"in t&&t.factor!==1&&t.factor!==void 0&&(n=t.factor);const i=r.getRegister(t.register);if(i===void 0)return;if(typeof i=="string")return{string:Number(i).toString()+i};if(typeof i=="number")return{number:n*i};const a=r.evaluate(i);if(a!==void 0)return"string"in a?{string:Number(i).toString()+a.string}:"number"in a?{number:n*a.number}:"dimension"in a?_(S({},a),{dimension:n*a.dimension}):"glue"in a?_(S({},a),{glue:_(S({},a.glue),{dimension:n*a.glue.dimension}),shrink:a.shrink?_(S({},a.shrink),{dimension:n*a.shrink.dimension}):void 0,grow:a.grow?_(S({},a.grow),{dimension:n*a.grow.dimension}):void 0}):t}toDimension(t){const r=this.evaluate(t);return r===void 0?null:"dimension"in r?r:"glue"in r?r.glue:"number"in r?{dimension:r.number}:null}toEm(t,r){if(t===null)return 0;const n=this.toDimension(t);return n===null?0:rd(n,r)/jo}toNumber(t){if(t===null)return null;const r=this.evaluate(t);return r===void 0?null:"number"in r?r.number:"dimension"in r?r.dimension:"glue"in r?r.glue.dimension:"string"in r?Number(r.string):null}toColor(t){var r,n;if(t===null)return null;const i=this.evaluate(t);return i===void 0?null:"string"in i?(n=(r=this.colorMap)==null?void 0:r.call(this,i.string))!=null?n:i.string:null}toBackgroundColor(t){var r,n;if(t===null)return null;const i=this.evaluate(t);return i===void 0?null:"string"in i?(n=(r=this.backgroundColorMap)==null?void 0:r.call(this,i.string))!=null?n:i.string:null}},Go=["body","above","below","superscript","subscript"];function Ua(e){return typeof e=="string"&&Go.includes(e)}function xl(e){return e!==void 0&&Array.isArray(e)&&e.length===2}var Se=class Oo{constructor(t){var r,n,i,a,s,u;this.type=t.type,typeof t.value=="string"&&(this.value=t.value),this.command=(n=(r=t.command)!=null?r:this.value)!=null?n:"",this.mode=(i=t.mode)!=null?i:"math",t.isFunction&&(this.isFunction=!0),t.limits&&(this.subsupPlacement=t.limits),this.style=S({},t.style),this.displayContainsHighlight=(a=t.displayContainsHighlight)!=null?a:!1,this.captureSelection=(s=t.captureSelection)!=null?s:!1,this.skipBoundary=(u=t.skipBoundary)!=null?u:!1,t.verbatimLatex!==void 0&&t.verbatimLatex!==null&&(this.verbatimLatex=t.verbatimLatex),t.args&&(this.args=t.args),t.body&&(this.body=t.body),this._changeCounter=0}static createBox(t,r,n){var i;if(!r)return null;const a=_0(r),s=[];for(const d of a){const h=d[0].style,p=M0(t,d,{style:{color:h.color,backgroundColor:h.backgroundColor,fontSize:h.fontSize}});p&&s.push(p)}if(s.length===0)return null;const u=((i=n==null?void 0:n.classes)!=null?i:"").trim();return s.length===1&&!u&&!(n!=null&&n.type)?s[0].wrap(t):new Ue(s,{classes:u,type:n==null?void 0:n.type}).wrap(t)}static serialize(t,r){return Ai.serialize(t,r)}static commonAncestor(t,r){if(t===r||t.parent===r.parent)return t.parent;const n=new WeakSet;let{parent:i}=t;for(;i;)n.add(i),i=i.parent;for(i=r.parent;i;){if(n.has(i))return i;i=i.parent}console.assert(!!i)}static fromJson(t){return typeof t=="string"?new Oo({type:"mord",value:t,mode:"math"}):new Oo(t)}get latexMode(){return this.mode==="math"?"math":"text"}toJson(){const t={};if(this.type&&(t.type=this.type),this.mode!=="math"&&(t.mode=this.mode),this.command&&this.command!==this.value&&(t.command=this.command),this.value!==void 0&&(t.value=this.value),this.style&&Object.keys(this.style).length>0&&(t.style=S({},this.style)),this.verbatimLatex!==void 0&&(t.verbatimLatex=this.verbatimLatex),this.subsupPlacement&&(t.subsupPlacement=this.subsupPlacement),this.explicitSubsupPlacement&&(t.explicitSubsupPlacement=!0),this.isFunction&&(t.isFunction=!0),this.displayContainsHighlight&&(t.displayContainsHighlight=!0),this.isExtensibleSymbol&&(t.isExtensibleSymbol=!0),this.skipBoundary&&(t.skipBoundary=!0),this.captureSelection&&(t.captureSelection=!0),this.args&&(t.args=C0(this.args)),this._branches)for(const r of Object.keys(this._branches))this._branches[r]&&(t[r]=this._branches[r].filter(n=>n.type!=="first").map(n=>n.toJson()));return t.type==="mord"&&Object.keys(t).length===2&&"value"in t?t.value:t}get changeCounter(){return this.parent?this.parent.changeCounter:this._changeCounter}set isDirty(t){if(t){this.parent||this._changeCounter++,"verbatimLatex"in this&&(this.verbatimLatex=void 0),this._children=void 0;let{parent:r}=this;for(;r;)r.parent||r._changeCounter++,"verbatimLatex"in r&&(r.verbatimLatex=void 0),r._children=void 0,r=r.parent}}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const r=le(this.command,this.mode);return r!=null&&r.serialize?r.serialize(this,t):this.body&&this.command?kr([sn(this.command,this.bodyToLatex(t)),this.supsubToLatex(t)]):this.body?kr([this.bodyToLatex(t),this.supsubToLatex(t)]):!this.value||this.value==="\u200B"?"":this.command}bodyToLatex(t){var r;return Ai.serialize(this.body,_(S({},t),{defaultMode:(r=t.defaultMode)!=null?r:this.latexMode}))}aboveToLatex(t){return Ai.serialize(this.above,t)}belowToLatex(t){return Ai.serialize(this.below,t)}supsubToLatex(t){let r="";if(t=_(S({},t),{defaultMode:"math"}),this.branch("subscript")!==void 0){const n=Ai.serialize(this.subscript,t);n.length===0?r+="_{}":n.length===1?/^[0-9]$/.test(n)?r+=`_${n}`:r+=`_{${n}}`:r+=`_{${n}}`}if(this.branch("superscript")!==void 0){const n=Ai.serialize(this.superscript,t);n.length===0?r+="^{}":n.length===1?n==="\u2032"?r+="^\\prime ":n==="\u2033"?r+="^\\doubleprime ":/^[0-9]$/.test(n)?r+=`^${n}`:r+=`^{${n}}`:r+=`^{${n}}`}return r}get treeDepth(){let t=1,r=this.parent;for(;r;)r=r.parent,t+=1;return t}get inCaptureSelection(){let t=this;for(;t;){if(t.captureSelection)return!0;t=t.parent}return!1}get parentPrompt(){let t=this.parent;for(;t;){if(t.type==="prompt"&&!t.captureSelection)return t;t=t.parent}return null}branch(t){if(Ua(t)&&this._branches)return this._branches[t]}get branches(){if(!this._branches)return[];const t=[];for(const r of Go)this._branches[r]&&t.push(r);return t}createBranch(t){return console.assert(Ua(t)),Ua(t)?(this._branches?this._branches[t]||(this._branches[t]=[this.makeFirstAtom(t)]):this._branches={[t]:[this.makeFirstAtom(t)]},this.isDirty=!0,this._branches[t]):[]}get row(){return xl(this.parentBranch)?this.parentBranch[0]:-1}get col(){return xl(this.parentBranch)?this.parentBranch[1]:-1}get body(){var t;return(t=this._branches)==null?void 0:t.body}set body(t){this.setChildren(t,"body")}get superscript(){var t;return(t=this._branches)==null?void 0:t.superscript}set superscript(t){this.setChildren(t,"superscript")}get subscript(){var t;return(t=this._branches)==null?void 0:t.subscript}set subscript(t){this.setChildren(t,"subscript")}get above(){var t;return(t=this._branches)==null?void 0:t.above}set above(t){this.setChildren(t,"above")}get below(){var t;return(t=this._branches)==null?void 0:t.below}set below(t){this.setChildren(t,"below")}get computedStyle(){var t,r;const n=typeof this.style.verbatimColor=="string",i=typeof this.style.verbatimBackgroundColor=="string",a=S(S({},(r=(t=this.parent)==null?void 0:t.computedStyle)!=null?r:{}),this.style);return delete a.variant,delete a.variantStyle,i||delete a.verbatimBackgroundColor,n||delete a.verbatimColor,a}applyStyle(t){this.isDirty=!0,this.style=S(S({},this.style),t),this.style.fontFamily==="none"&&delete this.style.fontFamily,this.style.fontShape==="auto"&&delete this.style.fontShape,this.style.fontSeries==="auto"&&delete this.style.fontSeries,this.style.color==="none"&&(delete this.style.color,delete this.style.verbatimColor),this.style.backgroundColor==="none"&&(delete this.style.backgroundColor,delete this.style.verbatimBackgroundColor),this.style.fontSize==="auto"&&delete this.style.fontSize;for(const r of this.children)r.applyStyle(t)}getInitialBaseElement(){var t,r,n;return this.hasEmptyBranch("body")?this:(console.assert(((t=this.body)==null?void 0:t[0].type)==="first"),(n=(r=this.body[1])==null?void 0:r.getInitialBaseElement())!=null?n:this)}getFinalBaseElement(){return this.hasEmptyBranch("body")?this:this.body[this.body.length-1].getFinalBaseElement()}isCharacterBox(){return this.type==="leftright"||this.type==="genfrac"||this.type==="subsup"||this.type==="delim"||this.type==="array"||this.type==="surd"?!1:this.getFinalBaseElement().type==="mord"}hasEmptyBranch(t){const r=this.branch(t);return r?(console.assert(r.length>0),console.assert(r[0].type==="first"),r.length===1):!0}setChildren(t,r){var n;if(!t||(console.assert(Ua(r)),!Ua(r)))return;console.assert(((n=t[0])==null?void 0:n.type)!=="first");const i=[this.makeFirstAtom(r),...t];this._branches?this._branches[r]=i:this._branches={[r]:i};for(const a of t)a.parent=this,a.parentBranch=r;this.isDirty=!0}makeFirstAtom(t){const r=new Oo({type:"first",mode:this.mode});return r.parent=this,r.parentBranch=t,r}addChild(t,r){console.assert(t.type!=="first"),this.createBranch(r).push(t),this.isDirty=!0,t.parent=this,t.parentBranch=r}addChildBefore(t,r){console.assert(r.parentBranch!==void 0);const n=this.createBranch(r.parentBranch);n.splice(n.indexOf(r),0,t),this.isDirty=!0,t.parent=this,t.parentBranch=r.parentBranch}addChildAfter(t,r){console.assert(r.parentBranch!==void 0);const n=this.createBranch(r.parentBranch);n.splice(n.indexOf(r)+1,0,t),this.isDirty=!0,t.parent=this,t.parentBranch=r.parentBranch}addChildren(t,r){const n=this.createBranch(r);for(const i of t)i.parent=this,i.parentBranch=r,n.push(i);this.isDirty=!0}addChildrenAfter(t,r){console.assert(t.length===0||t[0].type!=="first"),console.assert(r.parentBranch!==void 0);const n=this.createBranch(r.parentBranch);n.splice(n.indexOf(r)+1,0,...t),this.isDirty=!0;for(const i of t)i.parent=this,i.parentBranch=r.parentBranch;return t[t.length-1]}removeBranch(t){const r=this.branch(t);if(Ua(t)&&(this._branches[t]=void 0),!r)return[];for(const n of r)n.parent=void 0,n.parentBranch=void 0;return console.assert(r[0].type==="first"),r.shift(),this.isDirty=!0,r}removeChild(t){if(console.assert(t.parent===this),t.type==="first")return;const r=this.branch(t.parentBranch),n=r.indexOf(t);console.assert(n>=0),r.splice(n,1),this.isDirty=!0,t.parent=void 0,t.parentBranch=void 0}get siblings(){return this.parent?this.parent.branch(this.parentBranch):[]}get firstSibling(){return this.siblings[0]}get lastSibling(){const{siblings:t}=this;return t[t.length-1]}get isFirstSibling(){return this===this.firstSibling}get isLastSibling(){return this===this.lastSibling}get hasNoSiblings(){return this.siblings.length===1}get leftSibling(){console.assert(this.parent!==void 0);const t=this.parent.branch(this.parentBranch);return t[t.indexOf(this)-1]}get rightSibling(){console.assert(this.parent!==void 0);const t=this.parent.branch(this.parentBranch);return t[t.indexOf(this)+1]}get hasChildren(){return!!(this._branches&&this.children.length>0)}get firstChild(){return console.assert(this.hasChildren),this.children[0]}get lastChild(){console.assert(this.hasChildren);const{children:t}=this;return t[t.length-1]}get children(){if(this._children)return this._children;if(!this._branches)return[];const t=[];for(const r of Go)if(this._branches[r])for(const n of this._branches[r])t.push(...n.children),t.push(n);return this._children=t,t}render(t){if(this.type==="first"&&!t.atomIdsSettings)return null;const r=le(this.command,this.mode);if(r!=null&&r.render)return r.render(this,t);const n=new Ar({parent:t},this.style);let i=this.createBox(n,{classes:this.parent?"":"ML__base"});return i?(!this.subsupPlacement&&(this.superscript||this.subscript)&&(i=this.attachSupsub(n,{base:i})),i.wrap(n)):null}attachSupsub(t,r){var n;const i=r.base,a=this.superscript,s=this.subscript;if(!a&&!s)return i;let u=null,d=null;const h=(n=r.isCharacterBox)!=null?n:this.isCharacterBox();let p=0;if(a){const oe=new Ar({parent:t,mathstyle:"superscript"});u=Oo.createBox(oe,a),h||(p=i.height-t.metrics.supDrop*oe.scalingFactor)}let y=0;if(s){const oe=new Ar({parent:t,mathstyle:"subscript"});d=Oo.createBox(oe,s),h||(y=i.depth+t.metrics.subDrop*oe.scalingFactor)}let M;t.isDisplayStyle?M=t.metrics.sup1:t.isCramped?M=t.metrics.sup3:M=t.metrics.sup2;const B=.5/jo/t.scalingFactor;let $=null;if(d&&u){p=Math.max(p,M,u.depth+.25*t.metrics.xHeight),y=Math.max(y,t.metrics.sub2);const oe=t.metrics.defaultRuleThickness;if(p-u.depth-(d.height-y)<4*oe){y=4*oe-(p-u.depth)+d.height;const re=.8*t.metrics.xHeight-(p-u.depth);re>0&&(p+=re,y-=re)}const Ve=this.isExtensibleSymbol&&i.italic?-i.italic:0;$=new Ln({individualShift:[{box:d,shift:y,marginLeft:Ve},{box:u,shift:-p}]}).wrap(t)}else d&&!u?(y=Math.max(y,t.metrics.sub1,d.height-.8*$a),$=new Ln({shift:y,children:[{box:d,marginRight:B,marginLeft:this.isCharacterBox()?-i.italic:0}]})):!d&&u&&(p=Math.max(p,M,u.depth+.25*$a),$=new Ln({shift:-p,children:[{box:u,marginRight:B}]}));return new Ue([i,new Ue($,{caret:this.caret,isSelected:this.isSelected,classes:"msubsup"})],{type:r.type})}attachLimits(t,r){const n=this.superscript?Oo.createBox(new Ar({parent:t,mathstyle:"superscript"},this.style),this.superscript):null,i=this.subscript?Oo.createBox(new Ar({parent:t,mathstyle:"subscript"},this.style),this.subscript):null;return!n&&!i?r.base.wrap(t):yl(t,_(S({},r),{above:n,below:i}))}bind(t,r){if(!r||t.isPhantom||this.value==="\u200B")return r;let n=this.parent;for(;n&&!n.captureSelection;)n=n.parent;return n!=null&&n.captureSelection||(this.id||(this.id=t.makeID()),r.atomID=this.id),r}createBox(t,r){var n,i,a,s;const u=(n=this.value)!=null?n:this.body,d=(i=r==null?void 0:r.boxType)!=null?i:Cc(this.type);let h=(a=r==null?void 0:r.classes)!=null?a:"";this.mode==="text"&&(h+=" ML__text");const p=typeof u=="string"||u===void 0?new Ue(u!=null?u:null,{type:d,isSelected:this.isSelected,mode:this.mode,maxFontSize:t.scalingFactor,style:_(S({variant:"normal"},this.style),{fontSize:Math.max(1,t.size+t.mathstyle.sizeDelta)}),letterShapeStyle:t.letterShapeStyle,classes:h}):(s=Oo.createBox(t,u,{type:d,classes:h}))!=null?s:new Ue(null);return t.isTight&&(p.isTight=!0),(this.mode!=="math"||this.style.variant==="main")&&(p.italic=0),p.right=p.italic,this.bind(t,p),this.caret&&!this.superscript&&!this.subscript&&(p.caret=this.caret),p}isDigit(){var t;return this.type==="mord"&&this.value?/^[\d,\.]$/.test(this.value):this.type==="group"&&((t=this.body)==null?void 0:t.length)===2?this.body[0].type==="first"&&this.body[1].value===",":!1}asDigit(){var t;return this.type==="mord"&&this.value&&/^[\d,\.]$/.test(this.value)?this.value:this.type==="group"&&((t=this.body)==null?void 0:t.length)===2&&this.body[0].type==="first"&&this.body[1].value===","?".":""}};function _0(e){let t;const r=[];let n=[];for(const i of e)if(!t&&!i.style)n.push(i);else{const a=i.computedStyle;t&&a.color===t.color&&a.backgroundColor===t.backgroundColor&&a.fontSize===t.fontSize?n.push(i):(n.length>0&&r.push(n),n=[i],t=a)}return n.length>0&&r.push(n),r}function M0(e,t,r){var n,i,a,s,u;if(!t||t.length===0)return null;const d=new Ar({parent:e},r.style),h=!((n=d.atomIdsSettings)!=null&&n.groupNumbers);let p=[];if(t.length===1){const M=t[0],B=M.render(d);B&&(h&&M.isSelected&&B.selected(!0),p=[B])}else{let M="",B=!0;for(const $ of t){(i=d.atomIdsSettings)!=null&&i.groupNumbers&&M&&(B&&$.isDigit()||!B&&wl($))&&(d.atomIdsSettings.overrideID=M);const oe=$.render(d);d.atomIdsSettings&&(d.atomIdsSettings.overrideID=void 0),oe&&((a=d.atomIdsSettings)!=null&&a.groupNumbers&&(($.isDigit()||wl($))&&(!M||B!==$.isDigit())&&(B=$.isDigit(),M=(s=$.id)!=null?s:""),M&&(!($.isDigit()||wl($))||!$.hasEmptyBranch("superscript")||!$.hasEmptyBranch("subscript"))&&(M="")),h&&$.isSelected&&oe.selected(!0),p.push(oe))}}if(p.length===0)return null;const y=new Ue(p,_(S({isTight:d.isTight},r),{type:(u=r.type)!=null?u:"lift"}));return y.isSelected=p.every(M=>M.isSelected),y.wrap(d)}function wl(e){return e.mode==="text"}function C0(e){return e.map(t=>t===null?"<null>":Array.isArray(t)&&t[0]instanceof Se?{atoms:t.map(r=>r.toJson())}:typeof t=="object"&&"group"in t?{group:t.group.map(r=>r.toJson())}:t)}var Ms=class tp extends Se{constructor(t,r,n){super({type:"text",command:t,mode:"text",displayContainsHighlight:!0}),this.value=r,this.verbatimLatex=r,this.applyStyle(n)}static fromJson(t){return new tp(t.command,t.value,t.style)}render(t){const r=this.createBox(t);return this.caret&&(r.caret=this.caret),r}_serialize(t){var r;return(r=this.verbatimLatex)!=null?r:Te("text",this.value.codePointAt(0))}};function E0(e,t){if(e.direction===t.direction){const r=e.ranges.length;if(t.ranges.length===r){let n=0;for(;n<r&&k0(e.ranges[n],t.ranges[n])==="equal";)n++;return n===r?"equal":"different"}}return"different"}function k0(e,t){return e[0]===t[0]&&e[1]===t[1]?"equal":"different"}function Qn(e){let t=1/0,r=-1/0;for(const n of e.ranges)t=Math.min(t,n[0],n[1]),r=Math.max(r,n[0],n[1]);return[t,r]}function Ga(e){return typeof e=="number"&&!Number.isNaN(e)}function Lo(e){return Array.isArray(e)&&e.length===2}function Cs(e){return e!=null&&typeof e=="object"&&"ranges"in e&&Array.isArray(e.ranges)}function D0(e,t){const r=e.at(t);let n;if(r){n=r.mode;let i=r.parent;for(;!n&&i;)i&&(n=i.mode),i=i.parent}return n}function A0(e,t){if(!t)return"";if(typeof t=="string")return t;if(!e||t.after===void 0)return t.value;let r=!1,n=!1,i=!1,a=!1,s=!1,u=!1,d=!1,h=!1,p=!1,y=!1,M=!1,B=!1,$=!1,oe=!1,Ve=!1,re=e[0],De=0;for(;re!=null&&re.type&&/^(subsup|placeholder)$/.test(re.type);)De+=1,re=e[De];return r=!re||re.type==="first",re&&(oe=re.mode==="text",n=!oe&&re.type==="mord"&&Z.test(re.value),i=!oe&&re.type==="mord"&&/\d+$/.test(re.value),a=!oe&&re.isFunction,s=re.type==="genfrac",u=re.type==="surd",d=re.type==="mbin",h=re.type==="mrel",p=re.type==="mop"||re.type==="operator"||re.type==="extensible-symbol",y=re.type==="mpunct"||re.type==="minner",M=re.type==="array",B=re.type==="mopen",$=re.type==="mclose"||re.type==="leftright",Ve=re.type==="space"),t.after.includes("nothing")&&r||t.after.includes("letter")&&n||t.after.includes("digit")&&i||t.after.includes("function")&&a||t.after.includes("frac")&&s||t.after.includes("surd")&&u||t.after.includes("binop")&&d||t.after.includes("relop")&&h||t.after.includes("operator")&&p||t.after.includes("punct")&&y||t.after.includes("array")&&M||t.after.includes("openfence")&&B||t.after.includes("closefence")&&$||t.after.includes("text")&&oe||t.after.includes("space")&&Ve?t.value:""}function Bc(e,t,r){return r?A0(e,r[t]):""}var ad={"&":"\\&","%":"\\%",$:"\\$","''":"^{\\doubleprime}","'''":"^{\\prime\\prime\\prime}","''''":"^{\\prime\\prime\\prime\\prime}",alpha:"\\alpha",delta:"\\delta",Delta:"\\Delta",pi:"\\pi",Pi:"\\Pi",theta:"\\theta",Theta:"\\Theta",ii:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryI"},jj:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryJ"},ee:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\exponentialE"},nabla:"\\nabla",grad:"\\nabla",del:"\\partial",deg:{after:"digit+space",value:"\\degree"},infty:"\\infty","\u221E":"\\infty",oo:{after:"nothing+digit+frac+surd+binop+relop+punct+array+openfence+closefence+space",value:"\\infty"},"\u2211":"\\sum",sum:"\\sum_{#?}^{#?}",int:"\\int_{#?}^{#?}",prod:"\\prod_{#?}^{#?}",sqrt:"\\sqrt{#?}","\u2206":"\\differentialD","\u2202":"\\differentialD",arcsin:"\\arcsin",arccos:"\\arccos",arctan:"\\arctan",arcsec:"\\arcsec",arccsc:"\\arccsc",arsinh:"\\arsinh",arcosh:"\\arcosh",artanh:"\\artanh",arcsech:"\\arcsech",arccsch:"\\arccsch",arg:"\\arg",ch:"\\ch",cosec:"\\cosec",cosh:"\\cosh",cot:"\\cot",cotg:"\\cotg",coth:"\\coth",csc:"\\csc",ctg:"\\ctg",cth:"\\cth",sec:"\\sec",sinh:"\\sinh",sh:"\\sh",tanh:"\\tanh",tg:"\\tg",th:"\\th",sin:"\\sin",cos:"\\cos",tan:"\\tan",lg:"\\lg",lb:"\\lb",log:"\\log",ln:"\\ln",exp:"\\exp",lim:"\\lim_{#?}",dx:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD x"},dy:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD y"},dt:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD t"},AA:"\\forall",EE:"\\exists","!EE":"\\nexists","&&":"\\land",xin:{after:"nothing+text+relop+punct+openfence+space",value:"x \\in"},sint:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\sin t"},in:{after:"nothing+letter+closefence",value:"\\in"},"!in":"\\notin",NN:"\\mathbb{N}",ZZ:"\\Z",QQ:"\\Q",RR:"\\R",CC:"\\C",xx:"\\times","+-":"\\pm","\u2260":"\\ne","!=":"\\ne","\u2265":"\\ge",">=":"\\ge","\u2264":"\\le","<=":"\\le","<<":"\\ll",">>":"\\gg","~~":"\\approx","\u2248":"\\approx","?=":"\\questeq","\xF7":"\\div","\xAC":"\\neg",":=":"\\coloneq","::":"\\Colon","(:":"\\langle",":)":"\\rangle",beta:"\\beta",chi:"\\chi",epsilon:"\\epsilon",varepsilon:"\\varepsilon",eta:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\eta"},gamma:"\\gamma",Gamma:"\\Gamma",iota:"\\iota",kappa:"\\kappa",lambda:"\\lambda",Lambda:"\\Lambda",mu:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\mu"},nu:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\nu"},\u00B5:"\\mu",phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\phi"},Phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Phi"},varphi:"\\varphi",psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\psi"},Psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Psi"},rho:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\rho"},sigma:"\\sigma",Sigma:"\\Sigma",tau:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\tau"},vartheta:"\\vartheta",upsilon:"\\upsilon",xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space",value:"\\xi"},Xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Xi"},zeta:"\\zeta",omega:"\\omega",Omega:"\\Omega",\u03A9:"\\omega",forall:"\\forall",exists:"\\exists","!exists":"\\nexists",":.":"\\therefore",liminf:"\\liminf_{#?}",limsup:"\\limsup_{#?}",argmin:"\\operatorname*{arg~min}_{#?}",argmax:"\\operatorname*{arg~max}_{#?}",det:"\\det",mod:"\\bmod{#?}","(mod":"\\pmod{#?}",max:"\\max",min:"\\min",erf:"\\operatorname{erf}",erfc:"\\operatorname{erfc}",bessel:"\\operatorname{bessel}",mean:"\\operatorname{mean}",median:"\\operatorname{median}",fft:"\\operatorname{fft}",lcm:"\\operatorname{lcm}",gcd:"\\operatorname{gcd}",randomReal:"\\operatorname{randomReal}",randomInteger:"\\operatorname{randomInteger}",Re:"\\operatorname{Re}",Im:"\\operatorname{Im}",mm:{after:"nothing+digit+operator",value:"\\operatorname{mm}"},cm:{after:"nothing+digit+operator",value:"\\operatorname{cm}"},km:{after:"nothing+digit+operator",value:"\\operatorname{km}"},kg:{after:"nothing+digit+operator",value:"\\operatorname{kg}"},"...":"\\ldots","+...":"+\\cdots","-...":"-\\cdots","->...":"\\to\\cdots","-->...":"\\longrightarrow\\cdots","->":"\\to","|->":"\\mapsto","-->":"\\longrightarrow","<--":"\\longleftarrow","=>":"\\Rightarrow","==>":"\\Longrightarrow","<=>":"\\Leftrightarrow","<->":"\\leftrightarrow","(.)":"\\odot","(+)":"\\oplus","(/)":"\\oslash","(*)":"\\otimes","(-)":"\\ominus","||":"\\Vert","*":"\\cdot","**":"\\star","***":"\\ast","//":"\\slash","\\\\":"\\backslash",setminus:"\\backslash","|><":"\\ltimes","><|":"\\rtimes","|><|":"\\bowtie","-:":"\\div",divide:"\\div","@":"\\circ","^^":"\\wedge","^^^":"\\bigwedge",vv:"\\vee",vvv:"\\bigvee",nn:"\\cap",nnn:"\\bigcap",uu:"\\cup",uuu:"\\bigcup","-=":"\\equiv","~=":"\\cong",lt:"<","lt=":"\\leq",gt:">","gt=":"\\geq","-<":"\\prec","-lt":"\\prec","-<=":"\\preceq",">-=":"\\succeq",prop:"\\propto",diamond:"\\diamond",square:"\\square",iff:"\\iff",sub:"\\subset",sup:"\\supset",sube:"\\subseteq",supe:"\\supseteq",uarr:"\\uparrow",darr:"\\downarrow",rarr:"\\rightarrow",rArr:"\\Rightarrow",larr:"\\leftarrow",lArr:"\\Leftarrow",harr:"\\leftrightarrow",hArr:"\\Leftrightarrow",aleph:"\\aleph",and:"\\land",or:"\\lor",not:"\\neg","_|_":"\\bot",TT:"\\top","|--":"\\vdash","|==":"\\models","|__":"\\lfloor","__|":"\\rfloor","|~":"\\lceil","~|":"\\rceil",">->":"\\rightarrowtail","->>":"\\twoheadrightarrow",">->>":"\\twoheadrightarrowtail",frac:"\\frac{#?}{#?}",cbrt:"\\sqrt[3]{#?}",nthroot:"\\sqrt[#?]{#?}"};function qa(e,t){var r;let n=(r=t==null?void 0:t.format)!=null?r:"auto";return n==="auto"&&([n,e]=L0(e)),n==="ascii-math"?(e=e.replace(/\u2061/gu,""),e=e.replace(/\u3016/gu,"{"),e=e.replace(/\u3017/gu,"}"),e=e.replace(/([^\\])sinx/g,"$1\\sin x"),e=e.replace(/([^\\])cosx/g,"$1\\cos x "),e=e.replace(/\u2013/g,"-"),["ascii-math",pi(e,{inlineShortcuts:t==null?void 0:t.inlineShortcuts})]):["latex",e]}function pi(e,t){var r,n,i;if(!e)return"";let a=!1,s;const u=(r=t.inlineShortcuts)!=null?r:ad;if(!a&&(e.startsWith("^")||e.startsWith("_"))&&(s=Xa(e.slice(1),{inlineShortcuts:u,noWrap:!0}),e=e[0]+"{"+s.match+"}",e+=pi(s.rest,t),a=!0),a||(s=e.match(/^(sqrt|\u221A)(.*)/),s&&(s=Xa(s[2],{inlineShortcuts:u,noWrap:!0}),e="\\sqrt{"+((n=s.match)!=null?n:"\\placeholder{}")+"}",e+=pi(s.rest,t),a=!0)),a||(s=e.match(/^(\\cbrt|\u221B)(.*)/),s&&(s=Xa(s[2],{inlineShortcuts:u,noWrap:!0}),e="\\sqrt[3]{"+((i=s.match)!=null?i:"\\placeholder{}")+"}",e+=pi(s.rest,t),a=!0)),a||(s=e.match(/^abs(.*)/),s&&(s=Xa(s[1],{inlineShortcuts:u,noWrap:!0}),e="\\left|"+s.match+"\\right|",e+=pi(s.rest,t),a=!0)),a||(s=e.match(/^["”“](.*?)["”“](.*)/),s&&(e="\\text{"+s[1]+"}",e+=pi(s[2],t),a=!0)),a||(s=e.match(/^([^a-zA-Z\(\{\[\_\^\\\s"]+)(.*)/),s&&(e=od(s[1],u),e+=pi(s[2],t),a=!0)),!a&&/^([fgh])[^a-zA-Z]/.test(e)&&(s=Xa(e.slice(1),{inlineShortcuts:u,noWrap:!0}),e=e[1]==="("?e[0]+"\\left("+s.match+"\\right)":e[0]+s.match,e+=pi(s.rest,t),a=!0),a||(s=e.match(/^([a-zA-Z]+)(.*)/),s&&(e=od(s[1],u),e+=pi(s[2],t),a=!0)),!a)if(s=Xa(e,{inlineShortcuts:u,noWrap:!0}),s.match&&s.rest[0]==="/"){const d=Xa(s.rest.slice(1),{inlineShortcuts:u,noWrap:!0});d.match&&(e="\\frac{"+s.match+"}{"+d.match+"}"+pi(d.rest,t)),a=!0}else s.match&&(e=e.startsWith("(")?"\\left("+s.match+"\\right)"+pi(s.rest,t):s.match+pi(s.rest,t),a=!0);return a||(s=e.match(/^(\s+)(.*)$/),s&&(e=" "+pi(s[2],t),a=!0)),e}function Xa(e,t){let r="";e=e.trim();let n=e,i=e.charAt(0),a={"(":")","{":"}","[":"]"}[i];if(a){let s=1,u=1;for(;u<e.length&&s>0;)e[u]===i&&s++,e[u]===a&&s--,u++;s===0?(t.noWrap&&i==="("?r=pi(e.substring(1,u-1),t):(i==="{"&&a==="}"&&(i="\\{",a="\\}"),r="\\left"+i+pi(e.substring(1,u-1),t)+"\\right"+a),n=e.slice(Math.max(0,u))):(r=e.substring(1,u),n="")}else{let s=e.match(/^([a-zA-Z]+)/);if(s){let u=Bc(null,e,t.inlineShortcuts);if(u)return u=u.replace("_{#?}",""),u=u.replace("^{#?}",""),{match:u,rest:e.slice(u.length)}}if(s=e.match(/^([a-zA-Z])/),s)return{match:s[1],rest:e.slice(1)};if(s=e.match(/^(-)?\d+(\.\d*)?/),s)return{match:s[0],rest:e.slice(s[0].length)};/^\\(left|right)/.test(e)||(s=e.match(/^(\\[a-zA-Z]+)/),s&&(n=e.slice(s[1].length),r=s[1]))}return{match:r,rest:n}}function od(e,t){let r=Bc(null,e,t);return r?(r=r.replace("_{#?}",""),r=r.replace("^{#?}",""),r+=" "):r=e,r}var sd=[["\\[","\\]"],["\\(","\\)"],["$$","$$"],["$","$"],["\\begin{math}","\\end{math}"],["\\begin{displaymath}","\\end{displaymath}"],["\\begin{equation}","\\end{equation}"],["\\begin{equation*}","\\end{equation*}"]];function ld(e){const t=e.trim();for(const r of sd)if(t.startsWith(r[0])&&t.endsWith(r[1]))return[!0,t.substring(r[0].length,t.length-r[1].length)];return[!1,e]}function L0(e){if(e=e.trim(),e.length<=1)return["latex",e];let t;return[t,e]=ld(e),t?["latex",e]:e.startsWith("`")&&e.endsWith("`")?(e=e.substring(1,e.length-1),["ascii-math",e]):e.includes("\\")?["latex",e]:/\$.+\$/.test(e)?["latex",`\\text{${e}}`]:[void 0,e]}var Ic="$$",B0="$$",I0=(e,t,r)=>(sd.some(n=>t.startsWith(n[0])&&t.endsWith(n[1]))||(t=`${Ic} ${t} ${B0}`),t),cd=class c0{constructor(t){c0._modes[t]=this}static onPaste(t,r,n){var i;if(!r.contentEditable&&r.userSelect==="none")return r.model.announce("plonk"),!1;if(typeof n=="string"){const s=new DataTransfer;s.setData("text/plain",n),n=s}const a=new ClipboardEvent("paste",{clipboardData:n,cancelable:!0});return(i=r.host)!=null&&i.dispatchEvent(a)?c0._modes[t].onPaste(r,n):!1}static copyToClipboard(t,r){if(!t.contentEditable&&t.userSelect==="none"){t.model.announce("plonk");return}const n=t.model,i=n.selectionIsCollapsed?[0,n.lastOffset]:Qn(n.selection),a=n.getValue(i,r);navigator.clipboard.writeText(a).then(()=>{},()=>t.model.announce("plonk"))}static onCopy(t,r){var n;if(!r.clipboardData)return;if(!t.contentEditable&&t.userSelect==="none"){t.model.announce("plonk");return}const i=t.model,a=i.selectionIsCollapsed?[0,i.lastOffset]:Qn(i.selection);let s=i.getAtoms(a);if(s.every(u=>u.mode==="text"||!u.mode))r.clipboardData.setData("text/plain",s.filter(u=>u instanceof Ms).map(u=>u.value).join(""));else if(s.every(u=>u.mode==="latex"))r.clipboardData.setData("text/plain",i.getAtoms(a,{includeChildren:!0}).map(u=>{var d;return(d=u.value)!=null?d:""}).join(""));else{let u;s.length===1&&s[0].verbatimLatex!==void 0?u=s[0].verbatimLatex:u=i.getValue(a,"latex-expanded"),r.clipboardData.setData("application/x-latex",u);try{r.clipboardData.setData("text/plain",t.options.onExport(t,u,a))}catch(d){}if(s.length===1){const d=s[0];(d.type==="root"||d.type==="group")&&(s=d.body.filter(h=>h.type!=="first"))}try{r.clipboardData.setData("application/json+mathlive",JSON.stringify(s.map(d=>d.toJson())))}catch(d){}if((n=window[Symbol.for("io.cortexjs.compute-engine")])!=null&&n.ComputeEngine){const d=window.MathfieldElement.computeEngine;if(d)try{const h=d.jsonSerializationOptions;d.jsonSerializationOptions={metadata:["latex"]};const p=d.parse(i.getValue(a,"latex-unstyled"));d.jsonSerializationOptions=h;const y=JSON.stringify(p.json);y&&r.clipboardData.setData("application/json",y)}catch(h){}}}r.preventDefault()}static insert(t,r,n={}){var i;const a=n.mode==="auto"?t.mode:(i=n.mode)!=null?i:t.mode;return c0._modes[a].insert(t,r,n)}onPaste(t,r){return!1}insert(t,r,n){return!1}};cd._modes={};var Qr=cd,$0=[{key:"left",command:"moveToPreviousChar"},{key:"right",command:"moveToNextChar"},{key:"up",command:"moveUp"},{key:"down",command:"moveDown"},{key:"shift+[ArrowLeft]",command:"extendSelectionBackward"},{key:"shift+[ArrowRight]",command:"extendSelectionForward"},{key:"shift+[ArrowUp]",command:"extendSelectionUpward"},{key:"shift+[ArrowDown]",command:"extendSelectionDownward"},{key:"[Backspace]",command:"deleteBackward"},{key:"alt+[Delete]",command:"deleteBackward"},{key:"[Delete]",command:"deleteForward"},{key:"alt+[Backspace]",command:"deleteForward"},{key:"alt+[ArrowLeft]",command:"moveToPreviousWord"},{key:"alt+[ArrowRight]",command:"moveToNextWord"},{key:"shift+alt+[ArrowLeft]",command:"extendToPreviousWord"},{key:"shift+alt+[ArrowRight]",command:"extendToNextWord"},{key:"ctrl+[ArrowLeft]",command:"moveToGroupStart"},{key:"ctrl+[ArrowRight]",command:"moveToGroupEnd"},{key:"shift+ctrl+[ArrowLeft]",command:"extendToGroupStart"},{key:"shift+ctrl+[ArrowRight]",command:"extendToGroupEnd"},{key:"[Home]",command:"moveToMathfieldStart"},{key:"cmd+[ArrowLeft]",command:"moveToMathfieldStart"},{key:"shift+[Home]",command:"extendToMathFieldStart"},{key:"shift+cmd+[ArrowLeft]",command:"extendToMathFieldStart"},{key:"[End]",command:"moveToMathfieldEnd"},{key:"cmd+[ArrowRight]",command:"moveToMathfieldEnd"},{key:"shift+[End]",command:"extendToMathFieldEnd"},{key:"shift+cmd+[ArrowRight]",command:"extendToMathFieldEnd"},{key:"[Pageup]",command:"moveToGroupStart"},{key:"[Pagedown]",command:"moveToGroupEnd"},{key:"[Tab]",command:"moveToNextGroup"},{key:"shift+[Tab]",command:"moveToPreviousGroup"},{key:"[Escape]",ifMode:"math",command:["switchMode","latex"]},{key:"[Escape]",ifMode:"text",command:["switchMode","latex"]},{key:"[Escape]",ifMode:"latex",command:["complete","complete",{selectItem:"true"}]},{key:"\\",ifMode:"math",command:["switchMode","latex","\\"]},{key:"[IntlBackslash]",ifMode:"math",command:["switchMode","latex","\\"]},{key:"[Tab]",ifMode:"latex",command:["complete","accept-suggestion"]},{key:"[Return]",ifMode:"latex",command:"complete"},{key:"[Enter]",ifMode:"latex",command:"complete"},{key:"shift+[Escape]",ifMode:"latex",command:["complete","reject"]},{key:"[ArrowDown]",ifMode:"latex",command:"nextSuggestion"},{key:"[ArrowUp]",ifMode:"latex",command:"previousSuggestion"},{key:"ctrl+a",ifPlatform:"!macos",command:"selectAll"},{key:"cmd+a",command:"selectAll"},{key:"[Cut]",command:"cutToClipboard"},{key:"[Copy]",command:"copyToClipboard"},{key:"[Paste]",command:"pasteFromClipboard"},{key:"[Clear]",command:"deleteBackward"},{key:"[Undo]",command:"undo"},{key:"[Redo]",command:"redo"},{key:"[EraseEof]",command:"deleteToGroupEnd"},{key:"ctrl+x",ifPlatform:"ios",command:"cutToClipboard"},{key:"cmd+x",ifPlatform:"ios",command:"cutToClipboard"},{key:"ctrl+c",ifPlatform:"ios",command:"copyToClipboard"},{key:"cmd+c",ifPlatform:"ios",command:"copyToClipboard"},{key:"ctrl+v",ifPlatform:"ios",command:"pasteFromClipboard"},{key:"cmd+v",ifPlatform:"ios",command:"pasteFromClipboard"},{key:"ctrl+z",ifPlatform:"!macos",command:"undo"},{key:"cmd+z",command:"undo"},{key:"ctrl+y",ifPlatform:"!macos",command:"redo"},{key:"shift+cmd+y",command:"redo"},{key:"shift+ctrl+z",ifPlatform:"!macos",command:"redo"},{key:"shift+cmd+z",command:"redo"},{key:"ctrl+b",ifPlatform:"macos",command:"moveToPreviousChar"},{key:"ctrl+f",ifPlatform:"macos",command:"moveToNextChar"},{key:"ctrl+p",ifPlatform:"macos",command:"moveUp"},{key:"ctrl+n",ifPlatform:"macos",command:"moveDown"},{key:"ctrl+a",ifPlatform:"macos",command:"moveToMathfieldStart"},{key:"ctrl+e",ifPlatform:"macos",command:"moveToMathfieldEnd"},{key:"shift+ctrl+b",ifPlatform:"macos",command:"extendSelectionBackward"},{key:"shift+ctrl+f",ifPlatform:"macos",command:"extendSelectionForward"},{key:"shift+ctrl+p",ifPlatform:"macos",command:"extendSelectionUpward"},{key:"shift+ctrl+n",ifPlatform:"macos",command:"extendSelectionDownward"},{key:"shift+ctrl+a",ifPlatform:"macos",command:"extendToMathFieldStart"},{key:"shift+ctrl+e",ifPlatform:"macos",command:"extendToMathFieldEnd"},{key:"alt+ctrl+b",ifPlatform:"macos",command:"moveToPreviousWord"},{key:"alt+ctrl+f",ifPlatform:"macos",command:"moveToNextWord"},{key:"shift+alt+ctrl+b",ifPlatform:"macos",command:"extendToPreviousWord"},{key:"shift+alt+ctrl+f",ifPlatform:"macos",command:"extendToNextWord"},{key:"ctrl+h",ifPlatform:"macos",command:"deleteBackward"},{key:"ctrl+d",ifPlatform:"macos",command:"deleteForward"},{key:"ctrl+l",ifPlatform:"macos",command:"scrollIntoView"},{key:"ctrl+[Digit2]",ifMode:"math",command:["insert","\\sqrt{#0}"]},{key:"ctrl+[Digit5]",ifMode:"math",command:"moveToOpposite"},{key:"ctrl+[Digit6]",ifMode:"math",command:"moveToSuperscript"},{key:"ctrl+[Return]",ifMode:"math",command:"addRowAfter"},{key:"ctrl+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"cmd+[Return]",ifMode:"math",command:"addRowAfter"},{key:"cmd+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"alt+p",ifMode:"math",command:["insert","\\pi"]},{key:"alt+v",ifMode:"math",command:["insert","\\sqrt{#0}"]},{key:"alt+o",ifMode:"math",command:["insert","\\emptyset"]},{key:"alt+d",ifMode:"math",command:["insert","\\differentialD"]},{key:"shift+alt+o",ifMode:"math",command:["insert","\\varnothing"]},{key:"shift+alt+d",ifMode:"math",command:["insert","\\partial"]},{key:"alt+[Backslash]",ifMode:"math",command:["insert","\\backslash"]},{key:"[NumpadDivide]",ifMode:"math",command:["insert","\\frac{#@}{#?}"]},{key:"alt+[NumpadDivide]",ifMode:"math",command:["insert","\\frac{#?}{#@}"]},{key:"shift+alt+k",command:"toggleKeystrokeCaption"},{key:"alt+[Space]",command:"toggleContextMenu"},{key:"alt+shift+[Space]",command:"toggleVirtualKeyboard"},{key:"alt+ctrl+[ArrowUp]",command:["speak","all",{withHighlighting:!1}]},{key:"alt+ctrl+[ArrowDown]",command:["speak","selection",{withHighlighting:!1}]},{key:"shift+[Quote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["switchMode","text","",""]},{key:"shift+alt+[KeyT]",ifMode:"math",command:["switchMode","text","",""]},{key:"shift+[Quote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"text",command:["switchMode","math","",""]},{key:"shift+alt+[KeyT]",ifMode:"text",command:["switchMode","math","",""]},{key:"/",ifMode:"math",command:["insert","\\frac{#@}{#?}"]},{key:"alt+/",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","/"]},{key:"alt+shift+/",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","/"]},{key:"alt+[BracketLeft]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\left\\lbrack #0 \\right\\rbrack"]},{key:"ctrl+[Minus]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"moveToSubscript"},{key:"shift+alt+[BracketLeft]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\left\\lbrace #0 \\right\\rbrace"]},{key:"ctrl+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowAfter"},{key:"cmd+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowAfter"},{key:"shift+ctrl+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowBefore"},{key:"shift+cmd+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowBefore"},{key:"ctrl+[Backspace]",ifMode:"math",command:"removeRow"},{key:"cmd+[Backspace]",ifMode:"math",command:"removeRow"},{key:"alt+[Tab]",ifMode:"math",command:"addColumnAfter"},{key:"shift+alt+[Tab]",ifMode:"math",command:"addColumnBefore"},{key:"alt+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"shift+alt+[Enter]",ifMode:"math",command:"addRowBefore"},{key:"alt+[Return]",ifMode:"math",command:"addRowAfter"},{key:"shift+alt+[Return]",ifMode:"math",command:"addRowBefore"},{key:"shift+[Backspace]",ifMode:"math",command:"removeColumn"},{key:"alt+[Digit5]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","$\\infty"]},{key:"alt+[Digit9]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","("]},{key:"alt+[Digit0]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert",")"]},{key:"alt+|",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","|"]},{key:"shift+[Backquote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\~"]},{key:"[Backquote]",ifLayout:["windows.french","linux.french"],ifMode:"math",command:["insert","^2"]},{key:"[Backquote]",ifLayout:["windows.german","linux.german"],ifMode:"math",command:["insert","^"]},{key:"[IntlBackslash]",ifLayout:["apple.german"],ifMode:"math",command:["insert","^"]}],ud={"\\sqrt":["alt+v","ctrl+[Digit2]"],"\\pi":"alt+p","\\infty":"alt+[Digit5]","\\differentialD":"alt+d","\\partial":"shift+alt+d","\\frac":"Slash","\\emptyset":"alt+o","\\varnothing":"shift+alt+o","\\~":"~"};function Bo(e){var t;return((t=e.element)==null?void 0:t.mathfield)===e}function dd(e){var t,r;return(r=(t=e.querySelector(".ML__caret"))!=null?t:e.querySelector(".ML__text-caret"))!=null?r:e.querySelector(".ML__latex-caret")}function Sl(e){const t=dd(e);if(!t)return null;const r=t.getBoundingClientRect();return{x:r.right,y:r.bottom,height:r.height}}function $c(e){var t;if(!e.parent)return"root";let r=(t=e.parent.id)!=null?t:"";return r+=typeof e.parentBranch=="string"?"-"+e.parentBranch:`-${e.parentBranch[0]}/${e.parentBranch[0]}`,r}function fd(e,t,r){if(!t)return null;const n=e.field.getBoundingClientRect(),i=t.right-t.left,a=t.bottom-t.top,s=Math.ceil(t.left-n.left+e.field.scrollLeft*r),u=Math.ceil(t.top-n.top);return{left:s,right:s+i,top:u,bottom:u+a}}function hd(e){const t=e.getBoundingClientRect(),r=parseInt(getComputedStyle(e).marginRight),n={top:t.top-1,bottom:t.bottom,left:t.left,right:t.right-1+r};if(e.children.length===0||e.tagName.toUpperCase()==="SVG")return n;for(const i of e.children)if(i.nodeType===1&&"atomId"in i.dataset&&!i.classList.contains("pstrut")){const a=hd(i);n.left=Math.min(n.left,a.left),n.right=Math.max(n.right,a.right),n.top=Math.min(n.top,a.top),n.bottom=Math.max(n.bottom,a.bottom)}return n}function Es(e,t){var r,n;if(!t.id)return null;let i=(n=(r=e.atomBoundsCache)==null?void 0:r.get(t.id))!=null?n:null;if(i!==null)return i;const a=e.field.querySelector(`[data-atom-id="${t.id}"]`);return i=a?hd(a):null,e.atomBoundsCache&&(i?e.atomBoundsCache.set(t.id,i):e.atomBoundsCache.delete(t.id)),i!=null?i:null}function T0(e,t,r){const n=new Map;for(const i of e.model.getAtoms(t,{includeChildren:!0})){if(r!=null&&r.excludeAtomsWithBackground&&i.style.backgroundColor)continue;const a=e.field,s=a.offsetWidth;let d=Math.floor(a.getBoundingClientRect().width)/s;d=isNaN(d)?1:d;const h=fd(e,Es(e,i),d);if(h){const p=$c(i);if(n.has(p)){const y=n.get(p);n.set(p,{left:Math.min(y.left,h.left),right:Math.max(y.right,h.right),top:Math.min(y.top,h.top),bottom:Math.max(y.bottom,h.bottom)})}else n.set(p,h)}}return[...n.values()]}function pd(e,t){return e.model.selection.ranges.reduce((r,n)=>r.concat(...T0(e,n,t)),[])}function Tc(e,t){return e==="*"||t==="none"?!0:t==="same-origin"?!window.origin||e===window.origin:typeof t=="function"?t(e):!1}function md(e){let t=0,r=0;const n=e.offsetWidth,i=e.offsetHeight;for(;e instanceof HTMLElement;)t+=e.offsetTop,r+=e.offsetLeft,e=e.offsetParent;return new DOMRect(r,t,n,i)}var gd=`@keyframes ML__caret-blink {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0;
}
}
.ML__container {
display: inline-flex;
flex-flow: row;
justify-content: space-between;
align-items: flex-end;
min-height: 39px;
/* Need some room for the virtual keyboard toggle */
width: 100%;
/* Encourage browsers to consider allocating a hardware accelerated
layer for this element. */
isolation: isolate;
/* Prevent the browser from trying to interpret touch gestures in the field */
/* "Disabling double-tap to zoom removes the need for browsers to
delay the generation of click events when the user taps the screen." */
touch-action: none;
--_caret-color: var(--caret-color, hsl(var(--_hue), 40%, 49%));
--_selection-color: var(--selection-color, #000);
--_selection-background-color: var(--selection-background-color, hsl(var(--_hue), 70%, 85%));
--_text-highlight-background-color: var(--highlight-text, hsla(var(--_hue), 40%, 50%, 0.1));
--_contains-highlight-background-color: var(--contains-highlight-background-color, hsl(var(--_hue), 40%, 95%));
--_smart-fence-color: var(--smart-fence-color, currentColor);
--_smart-fence-opacity: var(--smart-fence-opacity, 0.5);
--_latex-color: var(--latex-color, hsl(var(--_hue), 80%, 40%));
--_correct-color: var(--correct-color, #10a000);
--_incorrect-color: var(--incorrect-color, #a01b00);
--_composition-background-color: var(--composition-background-color, #fff1c2);
--_composition-text-color: var(--composition-text-color, black);
--_composition-underline-color: var(--composition-underline-color, transparent);
}
/* This is the actual field content (formula) */
.ML__content {
display: flex;
align-items: center;
align-self: center;
position: relative;
overflow: hidden;
padding: 2px 3px 2px 1px;
width: 100%;
}
.ML__virtual-keyboard-toggle,
.ML__menu-toggle {
box-sizing: border-box;
display: flex;
align-self: center;
align-items: center;
flex-shrink: 0;
flex-direction: column;
justify-content: center;
width: 34px;
height: 34px;
padding: 0;
margin-right: 4px;
cursor: pointer;
/* Avoid some weird blinking with :hover */
border-radius: 8px;
border: 1px solid transparent;
transition: background 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
color: hsl(var(--_hue), 40%, 50%);
fill: currentColor;
background: transparent;
}
.ML__virtual-keyboard-toggle:hover,
.ML__menu-toggle:hover {
background: hsla(0, 0%, 70%, 0.3);
color: #333;
fill: currentColor;
}
.ML__virtual-keyboard-toggle > span,
.ML__menu-toggle > span {
display: flex;
align-self: center;
align-items: center;
}
/* The invisible element used to capture keyboard events. We're just trying
really hard to make sure it doesn't show. */
.ML__keyboard-sink {
display: inline-block;
resize: none;
outline: none;
border: none;
/* Need these for Microsoft Edge */
position: fixed;
clip: rect(0 0 0 0);
/* Need this to prevent iOS Safari from auto-zooming */
font-size: 1em;
font-family: KaTeX_Main;
line-height: 0.5;
/* On Chromium, if this is 0, no keyboard events are received */
}
[part="placeholder"] {
color: var(--neutral-400);
}
.ML__composition {
background: var(--_composition-background-color);
color: var(--_composition-text-color);
text-decoration: underline var(--_composition-underline-color);
}
.ML__caret::after {
content: '';
visibility: hidden;
width: 0;
display: inline-block;
height: 0.76em;
--_caret-width: clamp(2px, 0.08em, 10px);
border: none;
border-radius: calc(var(--_caret-width) / 2);
border-right: var(--_caret-width) solid var(--_caret-color);
margin-right: calc(-1 * var(--_caret-width));
position: relative;
left: -0.045em;
bottom: -0.05em;
animation: ML__caret-blink 1.05s step-end forwards infinite;
}
.ML__text-caret::after {
content: '';
visibility: hidden;
width: 0;
display: inline-block;
height: 0.76em;
--_caret-width: clamp(2px, 0.08em, 10px);
border: none;
border-radius: calc(var(--_caret-width) / 2);
border-right: var(--_caret-width) solid var(--_caret-color);
margin-right: calc(-1 * var(--_caret-width));
position: relative;
left: -0.045em;
bottom: -0.05em;
animation: ML__caret-blink 1.05s step-end forwards infinite;
}
.ML__latex-caret::after {
content: '';
visibility: hidden;
--_caret-width: clamp(2px, 0.08em, 10px);
border: none;
border-radius: calc(var(--_caret-width) / 2);
border-right: var(--_caret-width) solid var(--_latex-color);
margin-right: calc(-1 * var(--_caret-width));
position: relative;
left: -0.019em;
animation: ML__caret-blink 1.05s step-end forwards infinite;
}
.ML__focused .ML__latex-caret::after,
.ML__focused .ML__text-caret::after,
.ML__focused .ML__caret::after {
visibility: visible;
}
.ML__focused .ML__text {
background: var(--_text-highlight-background-color);
}
/* When using smartFence, the anticipated closing fence is displayed
with this style */
.ML__smart-fence__close {
opacity: var(--_smart-fence-opacity);
color: var(--_smart-fence-color);
}
.ML__selected,
.ML__focused .ML__selected .ML__contains-caret,
.ML__focused .ML__selected .ML__smart-fence__close,
.ML__focused .ML__selected .ML__placeholder {
color: var(--_selection-color);
opacity: 1;
}
.ML__selection {
box-sizing: border-box;
background: var(--_selection-background-color) !important;
}
.ML__contains-caret.ML__close,
.ML__contains-caret.ML__open,
.ML__contains-caret > .ML__close,
.ML__contains-caret > .ML__open,
.ML__contains-caret .ML__sqrt-sign,
.ML__contains-caret .ML__sqrt-line {
color: var(--_caret-color);
}
.ML__contains-highlight {
box-sizing: border-box;
background: transparent;
}
.ML__focused .ML__contains-highlight {
background: var(--_contains-highlight-background-color);
}
.ML__raw-latex {
font-family: 'Berkeley Mono', 'IBM Plex Mono', 'Source Code Pro', Consolas, 'Roboto Mono', Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Courier, monospace;
font-weight: 400;
font-size: 0.8em;
letter-spacing: -0.05em;
color: var(--_latex-color);
}
.ML__suggestion {
color: var(--neutral-500);
}
.ML__virtual-keyboard-toggle.is-visible.is-pressed:hover {
background: hsl(var(--_hue), 25%, 35%);
color: #fafafa;
fill: currentColor;
}
.ML__virtual-keyboard-toggle:focus {
outline: none;
border-radius: 8px;
border: 2px solid hsl(var(--_hue), 40%, 50%);
}
.ML__virtual-keyboard-toggle.is-pressed,
.ML__virtual-keyboard-toggle.is-active:hover,
.ML__virtual-keyboard-toggle.is-active {
background: hsl(var(--_hue), 25%, 35%);
color: #fafafa;
fill: currentColor;
}
/* Add an attribute 'data-tooltip' to automatically show a
tooltip over a element on hover.
*/
[data-tooltip] {
position: relative;
}
[data-tooltip]::after {
content: attr(data-tooltip);
position: absolute;
display: block;
z-index: 2;
pointer-events: none;
right: auto;
top: calc(-100% - 4px);
width: max-content;
max-width: 200px;
padding: 8px 8px;
border-radius: 4px;
background: #616161;
color: #fff;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
text-align: center;
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
font-style: normal;
font-weight: 400;
font-size: 13px;
/* Phone */
opacity: 0;
transform: scale(0.5);
}
@media only screen and (max-width: 767px) {
[data-tooltip]::after {
padding: 8px 16px;
font-size: 16px;
}
}
menu [data-tooltip]::after {
left: 100%;
top: 0%;
}
menu .ML__base {
cursor: default;
}
/** Don't display if we're tracking, i.e. have the pointer down */
.tracking [data-tooltip]:hover::after {
/* Use visibility, not display. Display will remove the after from the DOM, and the override below will not work */
visibility: hidden;
}
/** But do display if tracking and inside a menu */
.tracking menu li[data-tooltip]:hover::after,
[data-tooltip]:hover::after {
visibility: visible;
opacity: 1;
transform: scale(1);
transition-property: opacity, scale;
transition-duration: 0.15s;
transition-delay: 1s;
transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
}
.ML__prompt {
border-radius: 2px;
}
.ML__editablePromptBox {
outline: 1px solid #acacac;
border-radius: 2px;
z-index: -1;
}
.ML__focusedPromptBox {
outline: highlight auto 1px;
}
.ML__lockedPromptBox {
background-color: rgba(142, 142, 141, 0.4);
z-index: -1;
}
.ML__correctPromptBox {
outline: 1px solid var(--_correct-color);
box-shadow: 0 0 5px var(--_correct-color);
}
.ML__incorrectPromptBox {
outline: 1px solid var(--_incorrect-color);
box-shadow: 0 0 5px var(--_incorrect-color);
}
.variant-submenu {
display: flex;
flex-direction: column;
padding: 8px;
}
.variant-submenu [part=menu-item] {
font-size: 2rem;
text-align: center;
margin: 0;
}
.insert-matrix-submenu {
display: grid;
padding: 8px;
align-content: center;
justify-content: center;
grid-template-columns: repeat(5, minmax(0, 1fr));
}
.insert-matrix-submenu [part=menu-item] {
font-size: 21px;
border: none;
border-radius: 0;
line-height: 21px;
text-align: center;
padding: 0;
margin: 0;
}
.border-submenu [part=menu-item] {
font-size: 2rem;
line-height: 1.2;
text-align: center;
}
.swatches-submenu {
--_swatch-size: 2rem;
--_columns: 4;
display: flex;
flex-flow: wrap;
padding: 8px;
max-width: calc(var(--_columns) * (var(--_swatch-size) + 18px) + 16px);
box-sizing: border-box;
}
.menu-swatch {
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
width: fit-content;
height: fit-content;
margin: 2px;
padding: 0;
background: var(--neutral-200);
}
.menu-swatch > .label {
padding: 0;
margin: 0;
line-height: 0;
}
.menu-swatch > .label > span {
display: inline-block;
margin: 6px;
min-width: var(--_swatch-size);
min-height: var(--_swatch-size);
border-radius: 50%;
}
.menu-swatch.active {
background: var(--neutral-100);
scale: 1.4;
}
.menu-swatch.active > .label > span {
border-radius: 2px;
}
.menu-swatch .ui-checkmark,
.menu-swatch .ui-mixedmark {
position: absolute;
margin: 0;
padding: 0;
color: white;
}
.menu-swatch.dark-contrast .ui-checkmark,
.menu-swatch.dark-contrast .ui-mixedmark {
color: #000;
}
`,_l=`.ML__container {
min-height: auto !important;
--_hue: var(--hue, 212);
--_placeholder-color: var(--placeholder-color, hsl(var(--_hue), 40%, 49%));
--_placeholder-opacity: var(--placeholder-opacity, 0.4);
--_text-font-family: var(--text-font-family, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif);
}
.ML__sr-only {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
clip-path: inset(50%);
white-space: nowrap;
border: 0;
}
.ML__is-inline {
display: inline-block;
}
.ML__base {
visibility: inherit;
display: inline-block;
position: relative;
cursor: text;
padding: 0;
margin: 0;
box-sizing: content-box;
border: 0;
outline: 0;
vertical-align: baseline;
font-weight: inherit;
font-family: inherit;
font-style: inherit;
text-decoration: none;
width: min-content;
}
.ML__strut,
.ML__strut--bottom {
display: inline-block;
min-height: 0.5em;
}
.ML__small-delim {
font-family: KaTeX_Main;
}
/* Text mode */
.ML__text {
font-family: var(--_text-font-family);
white-space: pre;
}
/* Use cmr for 'math upright' */
.ML__cmr {
font-family: KaTeX_Main;
font-style: normal;
}
.ML__mathit {
font-family: KaTeX_Math;
/* The KaTeX_Math font is italic by default, so the font-style below is only
useful when a fallback font is used
*/
font-style: italic;
}
.ML__mathbf {
font-family: KaTeX_Main;
font-weight: bold;
}
/* Lowercase greek symbols should stick to math font when \\mathbf is applied
to match TeX idiosyncratic behavior */
.lcGreek.ML__mathbf {
font-family: KaTeX_Math;
font-weight: normal;
}
.ML__mathbfit {
font-family: KaTeX_Math;
font-weight: bold;
font-style: italic;
}
.ML__ams {
font-family: KaTeX_AMS;
}
/* Blackboard */
.ML__bb {
font-family: KaTeX_AMS;
}
.ML__cal {
font-family: KaTeX_Caligraphic;
}
.ML__frak {
font-family: KaTeX_Fraktur;
}
.ML__tt {
font-family: KaTeX_Typewriter;
}
.ML__script {
font-family: KaTeX_Script;
}
.ML__sans {
font-family: KaTeX_SansSerif;
}
.ML__series_ul {
font-weight: 100;
}
.ML__series_el {
font-weight: 100;
}
.ML__series_l {
font-weight: 200;
}
.ML__series_sl {
font-weight: 300;
}
.ML__series_sb {
font-weight: 500;
}
.ML__bold,
.ML__boldsymbol {
font-weight: 700;
}
.ML__series_eb {
font-weight: 800;
}
.ML__series_ub {
font-weight: 900;
}
.ML__series_uc {
font-stretch: ultra-condensed;
}
.ML__series_ec {
font-stretch: extra-condensed;
}
.ML__series_c {
font-stretch: condensed;
}
.ML__series_sc {
font-stretch: semi-condensed;
}
.ML__series_sx {
font-stretch: semi-expanded;
}
.ML__series_x {
font-stretch: expanded;
}
.ML__series_ex {
font-stretch: extra-expanded;
}
.ML__series_ux {
font-stretch: ultra-expanded;
}
.ML__it {
font-style: italic;
}
.ML__shape_ol {
-webkit-text-stroke: 1px black;
text-stroke: 1px black;
color: transparent;
}
.ML__shape_sc {
font-variant: small-caps;
}
.ML__shape_sl {
font-style: oblique;
}
/* First level emphasis */
.ML__emph {
color: #bc2612;
}
/* Second level emphasis */
.ML__emph .ML__emph {
color: #0c7f99;
}
.ML__highlight {
color: #007cb2;
background: #edd1b0;
}
.ML__center {
text-align: center;
}
.ML__label_padding {
padding: 0 0.5em;
}
.ML__frac-line {
width: 100%;
min-height: 1px;
}
.ML__frac-line:after {
content: '';
display: block;
margin-top: max(-1px, -0.04em);
min-height: max(1px, 0.04em);
/* Ensure the line is visible when printing even if "turn off background images" is on*/
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
/* There's a bug since Chrome 62 where
sub-pixel border lines don't draw at some zoom
levels (110%, 90%).
Setting the min-height used to work around it, but that workaround
broke in Chrome 84 or so.
Setting the background (and the min-height) seems to work for now.
*/
background: currentColor;
box-sizing: content-box;
/* Vuetify sets the box-sizing to inherit
causes the fraction line to not draw at all sizes (see #26) */
/* On some versions of Firefox on Windows, the line fails to
draw at some zoom levels, but setting the transform triggers
the hardware accelerated path, which works */
transform: translate(0, 0);
}
.ML__sqrt {
display: inline-block;
}
.ML__sqrt-sign {
display: inline-block;
position: relative;
}
.ML__sqrt-line {
display: inline-block;
height: max(1px, 0.04em);
width: 100%;
}
.ML__sqrt-line:before {
content: '';
display: block;
margin-top: min(-1px, -0.04em);
min-height: max(1px, 0.04em);
/* Ensure the line is visible when printing even if "turn off background images" is on*/
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
background: currentColor;
/* On some versions of Firefox on Windows, the line fails to
draw at some zoom levels, but setting the transform triggers
the hardware accelerated path, which works */
transform: translate(0, 0);
}
.ML__sqrt-line:after {
border-bottom-width: 1px;
content: ' ';
display: block;
margin-top: -0.1em;
}
.ML__sqrt-index {
margin-left: 0.27777778em;
margin-right: -0.55555556em;
}
.ML__delim-size1 {
font-family: KaTeX_Size1;
}
.ML__delim-size2 {
font-family: KaTeX_Size2;
}
.ML__delim-size3 {
font-family: KaTeX_Size3;
}
.ML__delim-size4 {
font-family: KaTeX_Size4;
}
.ML__delim-mult .delim-size1 > span {
font-family: KaTeX_Size1;
}
.ML__delim-mult .delim-size4 > span {
font-family: KaTeX_Size4;
}
.ML__accent-body > span {
font-family: KaTeX_Main;
width: 0;
}
.ML__accent-vec {
position: relative;
left: 0.24em;
}
/** The markup for a LaTeX formula, either in an editable mathfield or
in a static display.
*/
.ML__latex {
display: inline-block;
direction: ltr;
text-align: left;
text-indent: 0;
text-rendering: auto;
font-family: KaTeX_Main, 'Times New Roman', serif;
font-style: normal;
font-size-adjust: none;
font-stretch: normal;
font-variant-caps: normal;
letter-spacing: normal;
line-height: 1.2;
word-wrap: normal;
word-spacing: normal;
white-space: nowrap;
text-shadow: none;
-webkit-user-select: none;
user-select: none;
width: min-content;
}
.ML__latex .style-wrap {
position: relative;
}
.ML__latex .mfrac {
display: inline-block;
}
.ML__latex .left-right {
display: inline-block;
}
.ML__latex .vlist-t {
display: inline-table;
table-layout: fixed;
border-collapse: collapse;
}
.ML__latex .vlist-r {
display: table-row;
}
.ML__latex .vlist {
display: table-cell;
vertical-align: bottom;
position: relative;
}
.ML__latex .vlist > span {
display: block;
height: 0;
position: relative;
}
.ML__latex .vlist > span > span {
display: inline-block;
}
.ML__latex .vlist > span > .pstrut {
overflow: hidden;
width: 0;
}
.ML__latex .vlist-t2 {
margin-right: -2px;
}
.ML__latex .vlist-s {
display: table-cell;
vertical-align: bottom;
font-size: 1px;
width: 2px;
min-width: 2px;
}
.ML__latex .msubsup {
text-align: left;
}
.ML__latex .negativethinspace {
display: inline-block;
margin-left: -0.16667em;
height: 0.71em;
}
.ML__latex .thinspace {
display: inline-block;
width: 0.16667em;
height: 0.71em;
}
.ML__latex .mediumspace {
display: inline-block;
width: 0.22222em;
height: 0.71em;
}
.ML__latex .thickspace {
display: inline-block;
width: 0.27778em;
height: 0.71em;
}
.ML__latex .enspace {
display: inline-block;
width: 0.5em;
height: 0.71em;
}
.ML__latex .quad {
display: inline-block;
width: 1em;
height: 0.71em;
}
.ML__latex .qquad {
display: inline-block;
width: 2em;
height: 0.71em;
}
.ML__latex .llap,
.ML__latex .rlap {
width: 0;
position: relative;
display: inline-block;
}
.ML__latex .llap > .inner,
.ML__latex .rlap > .inner {
position: absolute;
}
.ML__latex .llap > .fix,
.ML__latex .rlap > .fix {
display: inline-block;
}
.ML__latex .llap > .inner {
right: 0;
}
.ML__latex .rlap > .inner {
left: 0;
}
.ML__latex .rule {
display: inline-block;
border: solid 0;
position: relative;
box-sizing: border-box;
}
.ML__latex .overline .overline-line,
.ML__latex .underline .underline-line {
width: 100%;
}
.ML__latex .overline .overline-line:before,
.ML__latex .underline .underline-line:before {
content: '';
border-bottom-style: solid;
border-bottom-width: max(1px, 0.04em);
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
display: block;
}
.ML__latex .overline .overline-line:after,
.ML__latex .underline .underline-line:after {
border-bottom-style: solid;
border-bottom-width: max(1px, 0.04em);
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
content: '';
display: block;
margin-top: -1px;
}
.ML__latex .stretchy {
display: block;
position: absolute;
width: 100%;
left: 0;
overflow: hidden;
}
.ML__latex .stretchy:before,
.ML__latex .stretchy:after {
content: '';
}
.ML__latex .stretchy svg {
display: block;
position: absolute;
width: 100%;
height: inherit;
fill: currentColor;
stroke: currentColor;
fill-rule: nonzero;
fill-opacity: 1;
stroke-width: 1;
stroke-linecap: butt;
stroke-linejoin: miter;
stroke-miterlimit: 4;
stroke-dasharray: none;
stroke-dashoffset: 0;
stroke-opacity: 1;
}
.ML__latex .slice-1-of-2 {
display: inline-flex;
position: absolute;
left: 0;
width: 50.2%;
overflow: hidden;
}
.ML__latex .slice-2-of-2 {
display: inline-flex;
position: absolute;
right: 0;
width: 50.2%;
overflow: hidden;
}
.ML__latex .slice-1-of-3 {
display: inline-flex;
position: absolute;
left: 0;
width: 25.1%;
overflow: hidden;
}
.ML__latex .slice-2-of-3 {
display: inline-flex;
position: absolute;
left: 25%;
width: 50%;
overflow: hidden;
}
.ML__latex .slice-3-of-3 {
display: inline-flex;
position: absolute;
right: 0;
width: 25.1%;
overflow: hidden;
}
.ML__latex .slice-1-of-1 {
display: inline-flex;
position: absolute;
width: 100%;
left: 0;
overflow: hidden;
}
.ML__latex .nulldelimiter {
display: inline-block;
}
.ML__latex .op-group {
display: inline-block;
}
.ML__latex .op-symbol {
position: relative;
}
.ML__latex .op-symbol.small-op {
font-family: KaTeX_Size1;
}
.ML__latex .op-symbol.large-op {
font-family: KaTeX_Size2;
}
.ML__latex .mtable .vertical-separator {
display: inline-block;
min-width: 1px;
box-sizing: border-box;
}
.ML__latex .mtable .arraycolsep {
display: inline-block;
}
.ML__latex .mtable .col-align-m > .vlist-t {
text-align: center;
}
.ML__latex .mtable .col-align-c > .vlist-t {
text-align: center;
}
.ML__latex .mtable .col-align-l > .vlist-t {
text-align: left;
}
.ML__latex .mtable .col-align-r > .vlist-t {
text-align: right;
}
.ML__error {
display: inline-block;
background-image: radial-gradient(ellipse at center, hsl(341, 100%, 40%), rgba(0, 0, 0, 0) 70%);
background-color: hsla(341, 100%, 40%, 0.1);
background-repeat: repeat-x;
background-size: 3px 3px;
padding-bottom: 3px;
background-position: 0 100%;
}
.ML__error > .ML__error {
background: transparent;
padding: 0;
}
.ML__placeholder {
color: var(--_placeholder-color);
opacity: var(--_placeholder-opacity);
padding-left: 0.4ex;
padding-right: 0.4ex;
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}
.ML__notation {
position: absolute;
box-sizing: border-box;
line-height: 0;
}
/* This class is used to implement the \`\\mathtip\` and \`\\texttip\` commands
For UI elements, see \`[data-ML__tooltip]\`
*/
.ML__tooltip-container {
position: relative;
transform: scale(0);
}
.ML__tooltip-container .ML__tooltip-content {
position: fixed;
display: inline-table;
visibility: hidden;
z-index: 2;
width: max-content;
max-width: 400px;
padding: 12px 12px;
border-radius: 8px;
background: #616161;
--_selection-color: #fff;
color: #fff;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
opacity: 0;
transition: opacity 0.15s cubic-bezier(0.4, 0, 1, 1);
}
.ML__tooltip-container .ML__tooltip-content .ML__text {
white-space: normal;
}
.ML__tooltip-container .ML__tooltip-content .ML__base {
display: contents;
}
.ML__tooltip-container:hover .ML__tooltip-content {
visibility: visible;
opacity: 1;
font-size: 0.75em;
transform: scale(1) translate(0, 3em);
}
`,Ml=`#mathlive-environment-popover.is-visible {
visibility: visible;
}
#mathlive-environment-popover {
--_environment-panel-height: var(--environment-panel-height, 70px);
--_accent-color: var(--accent-color, #aaa);
--_background: var(--environment-panel-background, #fff);
--_button-background: var(--environment-panel-button-background, white);
--_button-background-hover: var(--environment-panel-button-background-hover, #f5f5f7);
--_button-background-active: var(--environment-panel-button-background-active, #f5f5f7);
--_button-text: var(--environment-panel-button-text, #e3e4e8);
position: absolute;
width: calc(var(--_environment-panel-height) * 2);
height: var(--_environment-panel-height);
border-radius: 4px;
border: 1.5px solid var(--_accent-color);
background-color: var(--_background);
box-shadow: 0 0 30px 0 var(--environment-shadow, rgba(0, 0, 0, 0.4));
pointer-events: all;
visibility: hidden;
}
#mathlive-environment-popover .MLEP__array-buttons {
height: calc(var(--_environment-panel-height) * 5/4);
width: calc(var(--_environment-panel-height) * 5/4);
margin-left: calc(0px - var(--_environment-panel-height) * 0.16);
margin-top: calc(0px - var(--_environment-panel-height) * 0.19);
}
#mathlive-environment-popover .MLEP__array-buttons .font {
fill: white;
}
#mathlive-environment-popover .MLEP__array-buttons circle {
fill: #7f7f7f;
transition: fill 300ms;
}
#mathlive-environment-popover .MLEP__array-buttons .MLEP__array-insert-background {
fill-opacity: 1;
fill: var(--_background);
stroke: var(--_accent-color);
stroke-width: 3px;
}
#mathlive-environment-popover .MLEP__array-buttons line {
stroke: var(--_accent-color);
stroke-opacity: 0;
stroke-width: 40;
pointer-events: none;
transition: stroke-opacity 300ms;
stroke-linecap: round;
}
#mathlive-environment-popover .MLEP__array-buttons g[data-command]:hover circle {
fill: var(--_accent-color);
}
#mathlive-environment-popover .MLEP__array-buttons g[data-command]:hover line {
stroke-opacity: 1;
}
#mathlive-environment-popover .MLEP__environment-delimiter-controls {
height: 100%;
width: 50%;
}
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options {
width: var(--_environment-panel-height);
height: var(--_environment-panel-height);
display: flex;
flex-wrap: wrap;
flex-direction: row;
justify-content: space-around;
}
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg {
pointer-events: all;
margin-top: 2px;
width: calc(var(--_environment-panel-height) / 3 * 28 / 24);
height: calc(var(--_environment-panel-height) / 3 - 2px);
border-radius: calc(var(--_environment-panel-height) / 25);
background-color: var(--_button-background);
}
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg:hover {
background-color: var(--_button-background-hover);
}
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg path,
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg line {
stroke: var(--_button-text);
stroke-width: 2;
stroke-linecap: round;
}
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg rect,
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg path {
fill-opacity: 0;
}
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active {
pointer-events: none;
background-color: var(--_button-background-active);
}
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active path,
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active line {
stroke: var(--_accent-color);
}
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active circle {
fill: var(--_accent-color);
}
`,P0=`/* The element that display info while in latex mode */
#mathlive-suggestion-popover {
background-color: rgba(97, 97, 97);
color: #fff;
text-align: center;
border-radius: 8px;
position: fixed;
z-index: 1;
display: none;
flex-direction: column;
justify-content: center;
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
}
#mathlive-suggestion-popover.top-tip::after {
content: '';
position: absolute;
top: -15px;
left: calc(50% - 15px);
width: 0;
height: 0;
border-left: 15px solid transparent;
border-right: 15px solid transparent;
border-bottom: 15px solid rgba(97, 97, 97);
font-size: 1rem;
}
#mathlive-suggestion-popover.bottom-tip::after {
content: '';
position: absolute;
bottom: -15px;
left: calc(50% - 15px);
width: 0;
height: 0;
border-left: 15px solid transparent;
border-right: 15px solid transparent;
border-top: 15px solid rgba(97, 97, 97);
font-size: 1rem;
}
#mathlive-suggestion-popover.is-animated {
transition: all 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
animation: ML__fade-in cubic-bezier(0, 0, 0.2, 1) 0.15s;
}
#mathlive-suggestion-popover.is-visible {
display: flex;
}
@keyframes ML__fade-in {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* The wrapper class for the entire content of the popover panel */
#mathlive-suggestion-popover ul {
display: flex;
flex-flow: column;
list-style: none;
margin: 0;
padding: 0;
align-items: flex-start;
max-height: 400px;
overflow-y: auto;
}
#mathlive-suggestion-popover li {
display: flex;
flex-direction: row;
justify-content: space-between;
margin: 8px;
padding: 8px;
width: calc(100% - 16px - 16px);
column-gap: 1em;
border-radius: 8px;
cursor: pointer;
/* Since the content can be clicked on, provide feedback on hover */
}
#mathlive-suggestion-popover li a {
color: #5ea6fd;
padding-top: 0.3em;
margin-top: 0.4em;
display: block;
}
#mathlive-suggestion-popover li a:hover {
color: #5ea6fd;
text-decoration: underline;
}
#mathlive-suggestion-popover li:hover,
#mathlive-suggestion-popover li.is-pressed,
#mathlive-suggestion-popover li.is-active {
background: rgba(255, 255, 255, 0.1);
}
/* The command inside a popover (inside a #mathlive-suggestion-popover) */
.ML__popover__command {
font-size: 1.6rem;
font-family: KaTeX_Main;
}
.ML__popover__current {
background: #5ea6fd;
color: #fff;
}
.ML__popover__latex {
font-family: 'IBM Plex Mono', 'Source Code Pro', Consolas, 'Roboto Mono', Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Courier, monospace;
align-self: center;
}
/* The keyboard shortcuts for a symbol as displayed in the popover */
.ML__popover__keybinding {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
font-size: 0.8em;
opacity: 0.7;
}
/* Style for the character that joins the modifiers of a keyboard shortcut
(usually a "+" sign)*/
.ML__shortcut-join {
opacity: 0.5;
}
`,Pc=`/* The element that displays the keys as the user type them */
#mathlive-keystroke-caption-panel {
visibility: hidden;
/*min-width: 160px;*/
/*background-color: rgba(97, 97, 200, .95);*/
background: var(--secondary, hsl(var(--_hue), 19%, 26%));
border-color: var(--secondary-border, hsl(0, 0%, 91%));
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
text-align: center;
border-radius: 6px;
padding: 16px;
position: absolute;
z-index: 1;
display: flex;
flex-direction: row-reverse;
justify-content: center;
--keystroke: white;
--on-keystroke: #555;
--keystroke-border: #f7f7f7;
}
@media (prefers-color-scheme: dark) {
body:not([theme='light']) #mathlive-keystroke-caption-panel {
--keystroke: hsl(var(--_hue), 50%, 30%);
--on-keystroke: hsl(0, 0%, 98%);
--keystroke-border: hsl(var(--_hue), 50%, 25%);
}
}
body[theme='dark'] #mathlive-keystroke-caption-panel {
--keystroke: hsl(var(--_hue), 50%, 30%);
--on-keystroke: hsl(0, 0%, 98%);
--keystroke-border: hsl(var(--_hue), 50%, 25%);
}
#mathlive-keystroke-caption-panel > span {
min-width: 14px;
/*height: 8px;*/
margin: 0 8px 0 0;
padding: 4px;
background-color: var(--keystroke);
color: var(--on-keystroke);
fill: currentColor;
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
font-size: 1em;
border-radius: 6px;
border: 2px solid var(--keystroke-border);
/*box-shadow: 0 7px 14px rgba(0,0,0,0.25), 0 5px 5px rgba(0,0,0,0.22);*/
}
`,vd=`.ML__keyboard {
--_keyboard-height: 0;
--_keyboard-zindex: var(--keyboard-zindex, 105);
--_accent-color: var(--keyboard-accent-color, #0c75d8);
--_background: var(--keyboard-background, #cacfd7);
--_border: var(--keyboard-border, #ddd);
--_padding-horizontal: var(--keyboard-padding-horizontal, 0px);
--_padding-top: var(--keyboard-padding-top, 5px);
--_padding-bottom: var(--keyboard-padding-bottom, 0px);
--_row-padding-left: var(--keyboard-row-padding-left, 0px);
--_row-padding-right: var(--keyboard-row-padding-right, 0px);
--_toolbar-text: var(--keyboard-toolbar-text, #2c2e2f);
--_toolbar-text-active: var(--keyboard-toolbar-text-active, var(--_accent-color));
--_toolbar-background: var(--keyboard-toolbar-background, transparent);
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #eee);
--_toolbar-background-selected: var(--keyboard-toolbar-background-selected, transparent);
--_toolbar-font-size: var(--keyboard-toolbar-font-size, '135%');
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #fff);
--_keycap-background: var(--keycap-background, white);
--_keycap-background-hover: var(--keycap-background-hover, #f5f5f7);
--_keycap-background-active: var(--keycap-background-active, var(--_accent-color));
--_keycap-background-pressed: var(--keycap-background-pressed, var(--_accent-color));
--_keycap-border: var(--keycap-border, #e5e6e9);
--_keycap-border-bottom: var(--keycap-border-bottom, #8d8f92);
--_keycap-text: var(--keycap-text, #000);
--_keycap-text-active: var(--keycap-text-active, #fff);
--_keycap-text-hover: var(--keycap-text-hover, var(--_keycap-text));
--_keycap-text-pressed: var(--keycap-text-pressed, #fff);
--_keycap-shift-text: var(--keycap-shift-text, var(--_accent-color));
--_keycap-primary-background: var(--keycap-primary-background, var(--_accent-color));
--_keycap-primary-text: var(--keycap-primary-text, #ddd);
--_keycap-primary-background-hover: var(--keycap-primary-background-hover, #0d80f2);
--_keycap-secondary-background: var(--keycap-secondary-background, #a0a9b8);
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #7d8795);
--_keycap-secondary-text: var(--keycap-secondary-text, #060707);
--_keycap-secondary-border: var(--keycap-secondary-border, #c5c9d0);
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, #989da6);
--_keycap-height: var(--keycap-height, 60px);
/* Keycap width (incl. margin) */
--_keycap-max-width: var(--keycap-max-width, 100px);
--_keycap-gap: var(--keycap-gap, 8px);
--_keycap-font-size: var(--keycap-font-size, clamp(16px, 4cqw, 24px));
--_keycap-small-font-size: var(--keycap-small-font-size, calc(var(--keycap-font-size) * 0.8));
--_keycap-extra-small-font-size: var(--keycap-extra-small-font-size, calc(var(--keycap-font-size) / 1.42));
--_variant-panel-background: var(--variant-panel-background, #fff);
--_variant-keycap-text: var(--variant-keycap-text, var(--_keycap-text));
--_variant-keycap-text-active: var(--variant-keycap-text-active, var(--_keycap-text-active));
--_variant-keycap-background-active: var(--variant-keycap-background-active, var(--_accent-color));
--_variant-keycap-length: var(--variant-keycap-length, 70px);
--_variant-keycap-font-size: var(--variant-keycap-font-size, 30px);
--_variant-keycap-aside-font-size: var(--variant-keycap-aside-font-size, 12px);
--_keycap-shift-font-size: var(--keycap-shift-font-size, 16px);
--_keycap-shift-color: var(--keycap-shift-color, var(--_accent-color));
--_box-placeholder-color: var(--box-placeholder-color, var(--_accent-color));
--_box-placeholder-pressed-color: var(--box-placeholder-pressed-color, var(--keycap-text-pressed));
}
.is-math-mode .MLK__rows .if-text-mode,
.is-text-mode .MLK__rows .if-math-mode {
display: none;
}
.if-can-undo,
.if-can-redo,
.if-can-copy,
.if-can-cut,
.if-can-paste {
opacity: 0.4;
pointer-events: none;
}
.can-undo .if-can-undo,
.can-redo .if-can-redo,
.can-copy .if-can-copy,
.can-cut .if-can-cut,
.can-paste .if-can-paste {
opacity: 1;
pointer-events: all;
}
body > .ML__keyboard {
position: fixed;
--_padding-bottom: calc(var(--keyboard-padding-bottom, 0px) + env(safe-area-inset-bottom, 0));
}
body > .ML__keyboard.is-visible > .MLK__backdrop {
box-shadow: 0 -5px 6px rgba(0, 0, 0, 0.08);
border-top: 1px solid var(--_border);
}
body > .ML__keyboard.backdrop-is-transparent.is-visible > .MLK__backdrop {
box-shadow: none;
border: none;
}
body > .ML__keyboard.is-visible.animate > .MLK__backdrop {
transition: 0.28s cubic-bezier(0, 0, 0.2, 1);
transition-property: transform, opacity;
transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
}
.ML__keyboard {
position: relative;
overflow: hidden;
top: 0;
left: 0;
height: 100%;
width: 100%;
z-index: var(--_keyboard-zindex);
box-sizing: border-box;
outline: none;
border: none;
margin: 0;
padding: 0;
line-height: 1;
overflow-wrap: unset;
text-align: left;
vertical-align: baseline;
cursor: auto;
white-space: pre;
box-shadow: none;
opacity: 1;
transform: none;
pointer-events: none;
}
.ML__keyboard :where(div) {
box-sizing: border-box;
outline: none;
border: none;
margin: 0;
padding: 0;
line-height: 1;
overflow-wrap: unset;
text-align: left;
vertical-align: baseline;
cursor: auto;
white-space: pre;
box-shadow: none;
transform: none;
}
.MLK__backdrop {
position: absolute;
bottom: calc(-1 * var(--_keyboard-height));
width: 100%;
height: var(--_keyboard-height);
box-sizing: border-box;
padding-top: var(--_padding-top);
padding-bottom: var(--_padding-bottom);
padding-left: var(--_padding-horizontal);
padding-right: var(--_padding-horizontal);
opacity: 0;
visibility: hidden;
transform: translate(0, 0);
background: var(--_background);
}
.backdrop-is-transparent .MLK__backdrop {
background: transparent;
}
/* If a custom layout has a custom container/backdrop
(backdrop-is-transparent), make sure to let pointer event go through. */
.backdrop-is-transparent .MLK__plate {
background: transparent;
pointer-events: none;
}
/* If a custom layout has a custom container/backdrop, make sure to
allow pointer events on it. */
.backdrop-is-transparent .MLK__layer > div > div {
pointer-events: all;
}
.ML__keyboard.is-visible > .MLK__backdrop {
transform: translate(0, calc(-1 * var(--_keyboard-height)));
opacity: 1;
visibility: visible;
}
.caps-lock-indicator {
display: none;
width: 8px;
height: 8px;
background: #0cbc0c;
box-shadow: inset 0 0 4px 0 #13ca13, 0 0 4px 0 #a9ef48;
border-radius: 8px;
right: 8px;
top: 8px;
position: absolute;
}
.ML__keyboard.is-caps-lock .caps-lock-indicator {
display: block;
}
.ML__keyboard.is-caps-lock .shift {
background: var(--_keycap-background-active);
color: var(--_keycap-text-active);
}
.MLK__plate {
position: absolute;
top: var(--_padding-top);
left: var(--_padding-horizontal);
width: calc(100% - 2 * var(--_padding-horizontal));
margin: 0;
padding: 0;
box-sizing: border-box;
container-type: inline-size;
touch-action: none;
-webkit-user-select: none;
user-select: none;
pointer-events: all;
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
font-size: 16px;
/* Size of toolbar labels */
font-weight: 400;
text-shadow: none;
}
.ML__box-placeholder {
color: var(--_box-placeholder-color);
}
.MLK__tex {
font-family: KaTeX_Main, KaTeX_Math, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
}
.MLK__tex-math {
font-family: KaTeX_Math, KaTeX_Main, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
font-style: italic;
}
.MLK__layer {
display: none;
outline: none;
}
.MLK__layer.is-visible {
display: flex;
flex-flow: column;
}
/* Keyboard layouts are made or rows of keys... */
.MLK__rows {
--_keycap-width: min(var(--_keycap-max-width), 10cqw);
display: flex;
flex-flow: column;
align-items: center;
border-collapse: separate;
clear: both;
border: 0;
margin: 0;
margin-bottom: var(--_keycap-gap);
gap: var(--_keycap-gap);
/* If the styling include, e.g., some shadows, they will be
cut off by the overflow. In that case, set the padding to
compensate. */
padding-left: var(--_row-padding-left);
padding-right: var(--_row-padding-right);
overflow: visible;
touch-action: none;
}
.MLK__rows > .MLK__row {
display: flex;
flex-flow: row;
justify-content: center;
width: 100%;
gap: var(--_keycap-gap);
margin: 0;
padding: 0;
/* For the alignment of the text on some modifiers (e.g. shift) */
/* Extra spacing between two adjacent keys */
}
.MLK__rows > .MLK__row .tex {
font-family: KaTeX_Math, KaTeX_Main, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
}
.MLK__rows > .MLK__row .tex-math {
font-family: KaTeX_Math, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
}
.MLK__rows > .MLK__row .big-op {
font-size: calc(1.25 * var(--_keycap-font-size));
}
.MLK__rows > .MLK__row .small {
font-size: var(--_keycap-small-font-size);
}
.MLK__rows > .MLK__row .bottom {
justify-content: flex-end;
}
.MLK__rows > .MLK__row .left {
align-items: flex-start;
padding-left: 12px;
}
.MLK__rows > .MLK__row .right {
align-items: flex-end;
padding-right: 12px;
}
.MLK__rows > .MLK__row .w0 {
width: 0;
}
.MLK__rows > .MLK__row .w5 {
width: calc(0.5 * var(--_keycap-width) - var(--_keycap-gap));
}
.MLK__rows > .MLK__row .w15 {
width: calc(1.5 * var(--_keycap-width) - var(--_keycap-gap));
}
.MLK__rows > .MLK__row .w20 {
width: calc(2 * var(--_keycap-width) - var(--_keycap-gap));
}
.MLK__rows > .MLK__row .w40 {
width: calc(4 * var(--_keycap-width) - var(--_keycap-gap));
}
.MLK__rows > .MLK__row .w50 {
width: calc(5 * var(--_keycap-width) - var(--_keycap-gap));
}
.MLK__rows > .MLK__row .MLK__keycap.w50 {
font-size: 80%;
padding-top: 10px;
font-weight: 100;
}
.MLK__rows > .MLK__row .separator {
background: transparent;
border: none;
pointer-events: none;
}
.MLK__rows > .MLK__row .horizontal-rule {
height: 6px;
margin-top: 3px;
margin-bottom: 0;
width: 100%;
border-radius: 0;
border-top: var(--_horizontal-rule);
}
.MLK__rows > .MLK__row .ghost {
background: var(--_toolbar-background);
border: none;
color: var(--_toolbar-text);
}
.MLK__rows > .MLK__row .ghost:hover {
background: var(--_toolbar-background-hover);
}
.MLK__rows > .MLK__row .bigfnbutton {
font-size: var(--_keycap-extra-small-font-size);
}
.MLK__rows > .MLK__row .shift,
.MLK__rows > .MLK__row .action {
color: var(--_keycap-secondary-text);
background: var(--_keycap-secondary-background);
border-color: var(--_keycap-secondary-border);
border-bottom-color: var(--_keycap-secondary-border-bottom);
line-height: 0.8;
font-size: min(1rem, var(--_keycap-small-font-size));
font-weight: 600;
padding: 8px 12px 8px 12px;
}
.MLK__rows > .MLK__row .shift:hover,
.MLK__rows > .MLK__row .action:hover {
background: var(--_keycap-secondary-background-hover);
}
.MLK__rows > .MLK__row .action.primary {
background: var(--_keycap-primary-background);
color: var(--_keycap-primary-text);
}
.MLK__rows > .MLK__row .action.primary:hover {
background: var(--_keycap-primary-background-hover);
color: var(--_keycap-primary-text);
}
.MLK__rows > .MLK__row .shift.selected,
.MLK__rows > .MLK__row .action.selected {
color: var(--_toolbar-text-active);
}
.MLK__rows > .MLK__row .shift.selected.is-pressed,
.MLK__rows > .MLK__row .action.selected.is-pressed,
.MLK__rows > .MLK__row .shift.selected.is-active,
.MLK__rows > .MLK__row .action.selected.is-active {
color: white;
}
.MLK__rows > .MLK__row .warning {
background: #cd0030;
color: white;
}
.MLK__rows > .MLK__row .warning svg.svg-glyph {
width: 24px;
height: 24px;
min-height: 24px;
}
/** A regular keycap
* Use the :where() pseudo-class to give it a very low specifity,
* so that it can be overriden by custom style.
*/
:where(.MLK__rows > .MLK__row div) {
display: flex;
flex-flow: column;
align-items: center;
justify-content: space-evenly;
width: calc(var(--_keycap-width) - var(--_keycap-gap));
height: var(--_keycap-height);
box-sizing: border-box;
padding: 0;
vertical-align: top;
text-align: center;
float: left;
color: var(--_keycap-text);
fill: currentColor;
font-size: var(--_keycap-font-size);
background: var(--_keycap-background);
border: 1px solid var(--_keycap-border);
border-bottom-color: var(--_keycap-border-bottom);
border-radius: 6px;
cursor: pointer;
touch-action: none;
/* Keys with a variants panel */
position: relative;
overflow: hidden;
-webkit-user-select: none;
user-select: none;
-webkit-tap-highlight-color: transparent;
}
:where(.MLK__rows > .MLK__row div):hover {
overflow: visible;
background: var(--_keycap-background-hover);
}
:where(.MLK__rows > .MLK__row div) .ML__latex {
pointer-events: none;
touch-action: none;
}
:where(.MLK__rows > .MLK__row div) svg.svg-glyph {
margin: 8px 0;
width: 20px;
height: 20px;
min-height: 20px;
}
:where(.MLK__rows > .MLK__row div) svg.svg-glyph-lg {
margin: 8px 0;
width: 24px;
height: 24px;
min-height: 24px;
}
:where(.MLK__rows > .MLK__row div).MLK__tex-math {
font-size: 25px;
}
:where(.MLK__rows > .MLK__row div).is-pressed {
background: var(--_keycap-background-pressed);
color: var(--_keycap-text-pressed);
--_box-placeholder-color: var(--_box-placeholder-pressed-color);
}
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active,
:where(.MLK__rows > .MLK__row div).action.is-active,
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed,
:where(.MLK__rows > .MLK__row div).action.is-pressed {
z-index: calc(var(--_keyboard-zindex) - 5);
}
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active aside,
:where(.MLK__rows > .MLK__row div).action.is-active aside,
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed aside,
:where(.MLK__rows > .MLK__row div).action.is-pressed aside {
display: none;
}
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active .MLK__shift,
:where(.MLK__rows > .MLK__row div).action.is-active .MLK__shift,
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed .MLK__shift,
:where(.MLK__rows > .MLK__row div).action.is-pressed .MLK__shift {
display: none;
}
:where(.MLK__rows > .MLK__row div).shift.is-pressed,
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed,
:where(.MLK__rows > .MLK__row div).action.is-pressed {
background: var(--_keycap-background-pressed);
color: var(--_keycap-text-pressed);
}
:where(.MLK__rows > .MLK__row div).shift.is-active,
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active,
:where(.MLK__rows > .MLK__row div).action.is-active {
background: var(--_keycap-background-active);
color: var(--_keycap-text-active);
--_box-placeholder-color: var(--_box-placeholder-pressed-color);
}
:where(.MLK__rows > .MLK__row div) small {
color: var(--_keycap-secondary-text);
}
:where(.MLK__rows > .MLK__row div) aside {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
font-size: 10px;
line-height: 10px;
color: var(--_keycap-secondary-text);
}
/* Add an attribute 'data-tooltip' to display a tooltip on hover.
Note there are a different set of tooltip rules for the keyboard toggle
(it's in a different CSS tree) */
.ML__keyboard [data-tooltip] {
position: relative;
}
.ML__keyboard [data-tooltip]::after {
position: absolute;
display: inline-table;
content: attr(data-tooltip);
top: inherit;
bottom: 100%;
width: max-content;
max-width: 200px;
padding: 8px 8px;
background: #616161;
color: #fff;
text-align: center;
z-index: 2;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
border-radius: 2px;
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
font-weight: 400;
font-size: 12px;
transition: all 0.15s cubic-bezier(0.4, 0, 1, 1) 1s;
opacity: 0;
transform: scale(0.5);
}
.ML__keyboard [data-tooltip]:hover {
position: relative;
}
.ML__keyboard [data-tooltip]:hover::after {
opacity: 1;
transform: scale(1);
}
.MLK__toolbar {
align-self: center;
display: flex;
flex-flow: row;
justify-content: space-between;
width: 100%;
max-width: 996px;
min-height: 32px;
/* Icons for undo/redo, etc. */
}
.MLK__toolbar svg {
height: 20px;
width: 20px;
}
.MLK__toolbar > .left {
position: relative;
display: flex;
justify-content: flex-start;
flex-flow: row;
}
.MLK__toolbar > .right {
display: flex;
justify-content: flex-end;
flex-flow: row;
}
.MLK__toolbar > div > div {
/* "button" in the toolbar */
display: flex;
align-items: center;
justify-content: center;
color: var(--_toolbar-text);
fill: currentColor;
background: var(--_toolbar-background);
font-size: var(--_toolbar-font-size);
padding: 4px 15px;
cursor: pointer;
width: max-content;
min-width: 42px;
min-height: 34px;
border: none;
padding-left: 10px;
padding-right: 10px;
padding-bottom: 8px;
padding-top: 8px;
margin-top: 0;
margin-bottom: 4px;
margin-left: 4px;
margin-right: 4px;
border-radius: 8px;
box-shadow: none;
border-bottom: 2px solid transparent;
}
.MLK__toolbar > div > div:not(.disabled):not(.selected):hover {
background: var(--_toolbar-background-hover);
}
.MLK__toolbar > div > div.disabled svg,
.MLK__toolbar > div > div.disabled:hover svg,
.MLK__toolbar > div > div.disabled.is-pressed svg {
color: var(--_toolbar-text);
opacity: 0.2;
}
.MLK__toolbar > div > div:hover,
.MLK__toolbar > div > div:active,
.MLK__toolbar > div > div.is-pressed,
.MLK__toolbar > div > div.is-active {
color: var(--_toolbar-text-active);
}
.MLK__toolbar > div > div.selected {
color: var(--_toolbar-text-active);
background: var(--_toolbar-background-selected);
border-radius: 0;
border-bottom-color: var(--_toolbar-text-active);
padding-bottom: 4px;
margin-bottom: 8px;
}
/* This is the element that displays variants on press+hold */
.MLK__variant-panel {
visibility: hidden;
position: fixed;
display: flex;
flex-flow: row wrap-reverse;
justify-content: center;
align-content: center;
margin: 0;
padding: 0;
bottom: auto;
top: 0;
box-sizing: content-box;
transform: none;
z-index: calc(var(--_keyboard-zindex) + 1);
touch-action: none;
max-width: 350px;
background: var(--_variant-panel-background);
text-align: center;
border-radius: 6px;
padding: 6px;
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
transition: none;
}
.MLK__variant-panel.is-visible {
visibility: visible;
}
.MLK__variant-panel.compact {
--_variant-keycap-length: var(--variant-keycap-length, 50px);
--_variant-keycap-font-size: var(--variant-keycap-font-size, 24px);
--_variant-keycap-aside-font-size: var(--variant-keycap-aside-font-size, 10px);
}
.MLK__variant-panel .item {
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
font-size: var(--_variant-keycap-font-size);
height: var(--_variant-keycap-length);
width: var(--_variant-keycap-length);
margin: 0;
box-sizing: border-box;
border-radius: 5px;
border: 1px solid transparent;
background: transparent;
pointer-events: all;
cursor: pointer;
color: var(--_variant-keycap-text);
fill: currentColor;
}
@media (max-height: 412px) {
.MLK__variant-panel .item {
--_variant-keycap-font-size: var(--variant-keycap-font-size, 24px);
--_variant-keycap-length: var(--variant-keycap-length, 50px);
}
}
.MLK__variant-panel .item .ML__latex {
pointer-events: none;
}
.MLK__variant-panel .item.is-active {
background: var(--_variant-keycap-background-active);
color: var(--_variant-keycap-text-active);
}
.MLK__variant-panel .item.is-pressed {
background: var(--_variant-keycap-background-pressed);
color: var(--_variant-keycap-text-pressed);
}
.MLK__variant-panel .item.small {
font-size: var(--_keycap-small-font-size);
}
.MLK__variant-panel .item.swatch-button {
box-sizing: border-box;
background: #fbfbfb;
}
.MLK__variant-panel .item.swatch-button > span {
display: inline-block;
margin: 6px;
width: calc(100% - 12px);
height: calc(100% - 12px);
border-radius: 50%;
}
.MLK__variant-panel .item.swatch-button:hover {
background: #f0f0f0;
}
.MLK__variant-panel .item.swatch-button:hover > span {
border-radius: 2px;
}
.MLK__variant-panel .item.box > div,
.MLK__variant-panel .item.box > span {
border: 1px dashed rgba(0, 0, 0, 0.24);
}
.MLK__variant-panel .item .warning {
min-height: 60px;
min-width: 60px;
background: #cd0030;
color: white;
padding: 5px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 5px;
}
.MLK__variant-panel .item .warning.is-pressed,
.MLK__variant-panel .item .warning.is-active {
background: red;
}
.MLK__variant-panel .item .warning svg.svg-glyph {
width: 50px;
height: 50px;
}
.MLK__variant-panel .item aside {
font-size: var(--_variant-keycap-aside-font-size);
line-height: 12px;
opacity: 0.78;
padding-top: 2px;
}
.MLK__keycap {
position: relative;
}
.MLK__shift {
display: block;
position: absolute;
right: 4px;
top: 4px;
font-size: var(--_keycap-shift-font-size);
color: var(--_keycap-shift-color);
}
.hide-shift .MLK__shift {
display: none;
}
@media (max-width: 414px) {
.MLK__variant-panel {
max-width: 350px;
--_variant-keycap-font-size: var(--variant-keycap-font-size, 24px);
--_variant-keycap-length: var(--variant-keycap-length, 50px);
}
}
/* @xs breakpoint: iPhone 5 */
@container (max-width: 414px) {
.MLK__rows {
--_keycap-gap: max(var(--_keycap-gap, 2px), 2px);
--_keycap-height: max(var(--_keycap-height), 42px);
--_keycap-width: min(min(var(--_keycap-max-width), 10cqw), 62px);
}
.MLK__toolbar > div > div {
font-size: 100%;
margin-left: 2px;
margin-right: 2px;
}
.MLK__rows .shift,
.MLK__rows .action {
font-size: 65%;
}
.MLK__rows .warning svg.svg-glyph {
width: 14px;
height: 14px;
min-height: 14px;
}
}
@container (max-width: 744px) {
.MLK__rows {
--_keycap-gap: max(var(--keycap-gap, 2px), 2px);
--_keycap-height: max(var(--keycap-height, 52px), 52px);
--_keycap-width: min(min(var(--_keycap-max-width), 10cqw), 62px);
}
.MLK__toolbar > div > div {
padding-left: 0;
padding-right: 0;
}
.MLK__tooltip::after {
padding: 8px 16px;
font-size: 16px;
}
.MLK__rows > .MLK__row > div.fnbutton {
font-size: 16px;
}
.MLK__rows > .MLK__row > div.bigfnbutton {
font-size: calc(var(--_keycap-extra-small-font-size) / 1.55);
}
.MLK__rows > .MLK__row > div.small {
font-size: 13px;
}
.MLK__rows > .MLK__row > div > aside {
display: none;
}
.MLK__shift {
display: none;
}
}
/* Medium breakpoint: larger phones */
@container (max-width: 768px) {
.MLK__rows {
--_keycap-height: max(var(--keycap-height, 42px), 42px);
}
.MLK__rows > .MLK__row > div > small {
font-size: 14px;
}
}
@media (max-height: 768px) {
.MLK__rows {
--_keycap-height: max(var(--keycap-height, 42px), 42px);
}
.MLK__rows > .MLK__row > div > small {
font-size: 14px;
}
}
@container (max-width: 1444px) {
.MLK__rows .if-wide {
display: none;
}
}
@media (prefers-color-scheme: dark) {
.ML__keyboard {
--_accent-color: var(--keyboard-accent-color, #0b5c9c);
--_background: var(--keyboard-background, #151515);
--_border: var(--keyboard-border, transparent);
--_toolbar-text: var(--keyboard-toolbar-text, #e3e4e8);
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #303030);
--keyboard-toolbar-background-hover: #303030;
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #303030);
--_keycap-background: var(--keycap-background, #1f2022);
--_keycap-background-hover: var(--keycap-background-hover, #2f3032);
--_keycap-border: var(--_keycap-border, transparent);
--_keycap-border-bottom: var(--_keycap-border-bottom, transparent);
--_keycap-text: var(--keycap-text, #e3e4e8);
--_keycap-secondary-background: var(--keycap-secondary-background, #3d4144);
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #4d5154);
--_keycap-secondary-text: var(--keycap-secondary-text, #e7ebee);
--keycap-secondary-border: transparent;
--keycap-secondary-border-bottom: transparent;
--_keycap-secondary-border: var(--keycap-secondary-border, transparent);
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, transparent);
--_variant-panel-background: var(--variant-panel-background, #303030);
--_variant-keycap-text-active: var(--variant-keycap-text-active, #fff);
}
}
/* Same as the media query, but with a class */
[theme='dark'] .ML__keyboard {
--_accent-color: var(--keyboard-accent-color, #0b5c9c);
--_background: var(--keyboard-background, #151515);
--_border: var(--keyboard-border, transparent);
--_toolbar-text: var(--keyboard-toolbar-text, #e3e4e8);
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #303030);
--keyboard-toolbar-background-hover: #303030;
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #303030);
--_keycap-background: var(--keycap-background, #1f2022);
--_keycap-background-hover: var(--keycap-background-hover, #2f3032);
--_keycap-border: var(--_keycap-border, transparent);
--_keycap-border-bottom: var(--_keycap-border-bottom, transparent);
--_keycap-text: var(--keycap-text, #e3e4e8);
--_keycap-secondary-background: var(--keycap-secondary-background, #3d4144);
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #4d5154);
--_keycap-secondary-text: var(--keycap-secondary-text, #e7ebee);
--keycap-secondary-border: transparent;
--keycap-secondary-border-bottom: transparent;
--_keycap-secondary-border: var(--keycap-secondary-border, transparent);
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, transparent);
--_variant-panel-background: var(--variant-panel-background, #303030);
--_variant-keycap-text-active: var(--variant-keycap-text-active, #fff);
}
[theme='light'] .ML__keyboard {
--_accent-color: var(--keyboard-accent-color, #0c75d8);
--_background: var(--keyboard-background, #cacfd7);
--_border: var(--keyboard-border, #ddd);
--_toolbar-text: var(--keyboard-toolbar-text, #2c2e2f);
--_toolbar-background: var(--keyboard-toolbar-background, transparent);
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #eee);
--_toolbar-background-selected: var(--keyboard-toolbar-background-selected, transparent);
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #fff);
--_keycap-background: var(--keycap-background, white);
--_keycap-background-hover: var(--keycap-background-hover, #f5f5f7);
--_keycap-background-active: var(--keycap-background-active, var(--_accent-color));
--_keycap-background-pressed: var(--keycap-background-pressed, var(--_accent-color));
--_keycap-border: var(--_keycap-border, #e5e6e9);
--_keycap-border-bottom: var(--_keycap-border-bottom, #8d8f92);
--_keycap-text: var(--keycap-text, #000);
--_keycap-text-active: var(--keycap-text-active, #fff);
--_keycap-text-hover: var(--keycap-text-hover, var(--_keycap-text));
--_keycap-text-pressed: var(--keycap-text-pressed, #fff);
--_keycap-shift-text: var(--keycap-shift-text, var(--_accent-color));
--_keycap-secondary-background: var(--keycap-secondary-background, #a0a9b8);
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #7d8795);
--_keycap-secondary-text: var(--keycap-secondary-text, #060707);
--_keycap-secondary-border: var(--keycap-secondary-border, #c5c9d0);
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, #989da6);
--_variant-panel-background: var(--variant-panel-background, #fff);
--_variant-keycap-text: var(--variant-keycap-textvar, var(--_keycap-text));
--_variant-keycap-text-active: var(--variant-keycap-text-active, var(--_keycap-text-active));
--_variant-keycap-background-active: var(--variant-keycap-background-active, var(--_accent-color));
}
`,R0=`:host {
--primary-color: #5898ff;
--primary-color-dimmed: #c0c0f0;
--primary-color-dark: var(--blue-500);
--primary-color-light: var(--blue-100);
--primary-color-reverse: #ffffff;
--secondary-color: #ff8a65;
--secondary-color-dimmed: #f0d5c5;
--secondary-color-dark: var(--orange-500);
--secondary-color-light: var(--orange-100);
--secondary-color-reverse: #ffffff;
--link-color: #5898ff;
--link-color-dimmed: #c5c5c5;
--link-color-dark: #121212;
--link-color-light: #e2e2e2;
--link-color-reverse: #ffffff;
--semantic-blue: var(--blue-700);
--semantic-red: var(--red-400);
--semantic-orange: var(--orange-400);
--semantic-green: var(--green-700);
--neutral-100: #f5f5f5;
--neutral-200: #eeeeee;
--neutral-300: #e0e0e0;
--neutral-400: #bdbdbd;
--neutral-500: #9e9e9e;
--neutral-600: #757575;
--neutral-700: #616161;
--neutral-800: #424242;
--neutral-900: #212121;
--red-25: #fff8f7;
--red-50: #fff1ef;
--red-100: #ffeae6;
--red-200: #ffcac1;
--red-300: #ffa495;
--red-400: #ff7865;
--red-500: #f21c0d;
--red-600: #e50018;
--red-700: #d30024;
--red-800: #bd002c;
--red-900: #a1002f;
--orange-25: #fffbf8;
--orange-50: #fff7f1;
--orange-100: #fff3ea;
--orange-200: #ffe1c9;
--orange-300: #ffcca2;
--orange-400: #ffb677;
--orange-500: #fe9310;
--orange-600: #f58700;
--orange-700: #ea7c00;
--orange-800: #dc6d00;
--orange-900: #ca5b00;
--brown-25: #fff8ef;
--brown-50: #fff1df;
--brown-100: #ffe9ce;
--brown-200: #ebcca6;
--brown-300: #cdaf8a;
--brown-400: #af936f;
--brown-500: #856a47;
--brown-600: #7f5e34;
--brown-700: #78511f;
--brown-800: #6e4200;
--brown-900: #593200;
--yellow-25: #fffdf9;
--yellow-50: #fffcf2;
--yellow-100: #fffaec;
--yellow-200: #fff2ce;
--yellow-300: #ffe8ab;
--yellow-400: #ffdf85;
--yellow-500: #ffcf33;
--yellow-600: #f1c000;
--yellow-700: #dfb200;
--yellow-800: #c9a000;
--yellow-900: #ad8a00;
--lime-25: #f4ffee;
--lime-50: #e9ffdd;
--lime-100: #ddffca;
--lime-200: #a8fb6f;
--lime-300: #94e659;
--lime-400: #80d142;
--lime-500: #63b215;
--lime-600: #45a000;
--lime-700: #268e00;
--lime-800: #007417;
--lime-900: #005321;
--green-25: #f5fff5;
--green-50: #ebffea;
--green-100: #e0ffdf;
--green-200: #a7ffa7;
--green-300: #5afa65;
--green-400: #45e953;
--green-500: #17cf36;
--green-600: #00b944;
--green-700: #00a34a;
--green-800: #008749;
--green-900: #00653e;
--teal-25: #f3ffff;
--teal-50: #e6fffe;
--teal-100: #d9fffe;
--teal-200: #8dfffe;
--teal-300: #57f4f4;
--teal-400: #43e5e5;
--teal-500: #17cfcf;
--teal-600: #00c2c0;
--teal-700: #00b5b1;
--teal-800: #00a49e;
--teal-900: #009087;
--cyan-25: #f7fcff;
--cyan-50: #eff8ff;
--cyan-100: #e7f5ff;
--cyan-200: #c2e6ff;
--cyan-300: #95d5ff;
--cyan-400: #61c4ff;
--cyan-500: #13a7ec;
--cyan-600: #069eda;
--cyan-700: #0095c9;
--cyan-800: #0088b2;
--cyan-900: #0a7897;
--blue-25: #f7faff;
--blue-50: #eef5ff;
--blue-100: #e5f1ff;
--blue-200: #bfdbff;
--blue-300: #92c2ff;
--blue-400: #63a8ff;
--blue-500: #0d80f2;
--blue-600: #0077db;
--blue-700: #006dc4;
--blue-800: #0060a7;
--blue-900: #005086;
--indigo-25: #f8f7ff;
--indigo-50: #f1efff;
--indigo-100: #eae7ff;
--indigo-200: #ccc3ff;
--indigo-300: #ac99ff;
--indigo-400: #916aff;
--indigo-500: #63c;
--indigo-600: #5a21b2;
--indigo-700: #4e0b99;
--indigo-800: #3b0071;
--indigo-900: #220040;
--purple-25: #fbf7ff;
--purple-50: #f8f0ff;
--purple-100: #f4e8ff;
--purple-200: #e4c4ff;
--purple-300: #d49aff;
--purple-400: #c36aff;
--purple-500: #a219e6;
--purple-600: #9000c4;
--purple-700: #7c009f;
--purple-800: #600073;
--purple-900: #3d0043;
--magenta-25: #fff8fb;
--magenta-50: #fff2f6;
--magenta-100: #ffebf2;
--magenta-200: #ffcddf;
--magenta-300: #ffa8cb;
--magenta-400: #ff7fb7;
--magenta-500: #eb4799;
--magenta-600: #da3689;
--magenta-700: #c82179;
--magenta-800: #b00065;
--magenta-900: #8a004c;
}
@media (prefers-color-scheme: dark) {
:host {
--semantic-blue: var(--blue-700);
--semantic-red: var(--red-400);
--semantic-orange: var(--orange-400);
--semantic-green: var(--green-700);
--semantic-bg-blue: var(--blue-25);
--semantic-bg-red: var(--red-25);
--semantic-bg-orange: var(--orange-25);
--semantic-bg-green: var(--green-25);
--neutral-100: #121212;
--neutral-200: #424242;
--neutral-300: #616161;
--neutral-400: #757575;
--neutral-500: #9e9e9e;
--neutral-600: #bdbdbd;
--neutral-700: #e0e0e0;
--neutral-800: #eeeeee;
--neutral-900: #f5f5f5;
}
}
:host([theme='dark']) {
--semantic-blue: var(--blue-700);
--semantic-red: var(--red-400);
--semantic-orange: var(--orange-400);
--semantic-green: var(--green-700);
--semantic-bg-blue: var(--blue-25);
--semantic-bg-red: var(--red-25);
--semantic-bg-orange: var(--orange-25);
--semantic-bg-green: var(--green-25);
--neutral-100: #121212;
--neutral-200: #424242;
--neutral-300: #616161;
--neutral-400: #757575;
--neutral-500: #9e9e9e;
--neutral-600: #bdbdbd;
--neutral-700: #e0e0e0;
--neutral-800: #eeeeee;
--neutral-900: #f5f5f5;
}
/* @media (prefers-color-scheme: dark) {
:host {
--label-color: #fff;
--active-label-color: #000;
--menu-bg: #525252;
--active-bg: #5898ff;
--active-bg-dimmed: #5c5c5c;
}
} */
:host {
--ui-font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji',
'Segoe UI Emoji', 'Segoe UI Symbol';
--ui-font-size: 14px;
--ui-line-height: 1.5;
--ui-letter-spacing: 0.007em;
--mono-font-family: 'Berkeley Mono', 'JetBrains Mono', 'IBM Plex Mono',
'Source Code Pro', Menlo, Monaco, 'Courier New', monospace;
--ui-layer-1: var(--neutral-100);
--ui-layer-2: var(--neutral-200);
--ui-layer-3: var(--neutral-300);
--ui-layer-4: var(--neutral-400);
--ui-layer-5: var(--neutral-500);
--ui-layer-6: var(--neutral-600);
--ui-border-color: var(--primary-color);
--ui-border-radius: 4px;
--ui-text: var(--neutral-900);
--ui-text-secondary: var(--neutral-700);
--ui-text-placeholder: var(--neutral-500);
--ui-text-muted: var(--neutral-300);
/** A field is a UI element in which a user can type data, for
* example an input or textarea element.
*/
--ui-field-bg: var(--neutral-100);
--ui-field-bg-hover: var(--neutral-100);
--ui-field-bg-disabled: var(--neutral-300);
--ui-field-bg-invalid: var(--red-100);
--ui-field-bg-focus: var(--neutral-100);
--ui-field-border: 0.5px solid var(--border-color);
--ui-field-border-hover: 0.5px solid var(--border-color);
--ui-field-border-disabled: 0.5px solid var(--border-color);
--ui-field-border-invalid: 0.5px solid var(--border-color);
--ui-field-border-focus: 0.5px solid var(--border-color);
--ui-menu-bg: var(--neutral-100);
--ui-menu-text: var(--neutral-900);
--ui-menu-bg-hover: var(--neutral-200);
--ui-menu-text-hover: var(--neutral-900);
/** The \`active\` state is used for the state of menu items
* when they are selected.
*/
--ui-menu-bg-active: var(--primary-color);
--ui-menu-text-active: var(--primary-color-reverse);
/** The \`active-muted\` set is used for the state of
* submenus when they are open.
*/
--ui-menu-bg-active-muted: var(--neutral-300);
--ui-menu-text-active-muted: var(--neutral-900);
/* --ui-menu-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.302),
0 2px 6px 2px rgba(60, 64, 67, 0.149); */
--ui-menu-shadow: 0 0 2px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.2);
--ui-menu-divider: 0.5px solid #c7c7c7;
/* var(--neutral-300); */
--ui-menu-z-index: 10000;
--page-bg: var(--neutral-100);
--content-bg: var(--neutral-200);
}
@media (prefers-color-scheme: dark) {
:host {
--ui-menu-bg: var(--neutral-200);
}
}
:host([theme='dark']) {
--ui-menu-bg: var(--neutral-200);
}
/* PingFang SC is a macOS font. Microsoft Yahei is a Windows font.
Noto is a Linux/Android font.
*/
:lang(zh-cn),
:lang(zh-sg),
:lang(zh-my),
:lang(zh) {
--ui-font-family: -apple-system, system-ui, 'PingFang SC', 'Hiragino Sans GB',
'Noto Sans CJK SC', 'Noto Sans SC', 'Noto Sans', 'Microsoft Yahei UI',
'Microsoft YaHei New', 'Microsoft Yahei', '\u5FAE\u8F6F\u96C5\u9ED1', SimSun, '\u5B8B\u4F53',
STXihei, '\u534E\u6587\u7EC6\u9ED1', sans-serif;
}
:lang(zh-tw),
:lang(zh-hk),
:lang(zh-mo) {
--ui-font-family: -apple-system, system-ui, 'Noto Sans',
'Microsoft JhengHei UI', 'Microsoft JhengHei', '\u5FAE\u8EDF\u6B63\u9ED1\u9AD4', '\u65B0\u7D30\u660E\u9AD4',
'PMingLiU', '\u7D30\u660E\u9AD4', 'MingLiU', sans-serif;
}
:lang(ja),
:lang(ja-jp),
:lang(ja-jp-mac) {
--ui-font-family: -apple-system, system-ui, 'Hiragino Sans',
'Hiragino Kaku Gothic ProN', 'Noto Sans CJK JP', 'Noto Sans JP', 'Noto Sans',
'\u6E38\u30B4\u30B7\u30C3\u30AF', '\u6E38\u30B4\u30B7\u30C3\u30AF\u4F53', YuGothic, 'Yu Gothic', '\u30E1\u30A4\u30EA\u30AA', Meiryo,
'\uFF2D\uFF33 \uFF30\u30B4\u30B7\u30C3\u30AF', 'MS PGothic', sans-serif;
}
:lang(ko),
:lang(ko-kr),
:lang(ko-kr-std) {
--ui-font-family: -apple-system, system-ui, 'Noto Sans CJK KR', 'Noto Sans KR',
'Noto Sans', 'Malgun Gothic', '\uB9D1\uC740 \uACE0\uB515', 'Apple SD Gothic Neo',
'\uC560\uD50C SD \uC0B0\uB3CC\uACE0\uB515 Neo', 'Apple SD \uC0B0\uB3CC\uACE0\uB515 Neo', '\uB3CB\uC6C0', Dotum, sans-serif;
}
:lang(ko-kr-apple) {
--ui-font-family: -apple-system, system-ui, 'Noto Sans CJK KR', 'Noto Sans KR',
'Noto Sans', 'Apple SD Gothic Neo', '\uC560\uD50C SD \uC0B0\uB3CC\uACE0\uB515 Neo',
'Apple SD \uC0B0\uB3CC\uACE0\uB515 Neo', '\uB3CB\uC6C0', Dotum, sans-serif;
}
:lang(zh-cn),
:lang(zh-sg),
:lang(zh-my),
:lang(zh),
:lang(zh-tw),
:lang(zh-hk),
:lang(zh-mo),
:lang(ja),
:lang(ja-jp),
:lang(ja-jp-mac),
:lang(ko),
:lang(ko-kr),
:lang(ko-kr-std),
:lang(ko-kr-apple) {
--ui-font-size: 1rem;
--ui-line-height: 1.7;
--ui-letter-spacing: 0;
}
:dir(rtl) {
--ui-line-height: auto;
--ui-letter-spacing: 0;
}
`,O0=`.ui-menu *,
.ui-menu ::before,
.ui-menu ::after {
box-sizing: border-box;
}
.ui-menu {
display: none;
color-scheme: light dark;
-webkit-user-select: none;
/* Important: Safari iOS doesn't respect user-select */
user-select: none;
cursor: default;
-webkit-touch-callout: none;
-webkit-tap-highlight-color: rgba(0 0 0 0);
--active-label-color: #fff;
/* ui-menu-text-active */
--label-color: #121212;
/* ui-menu-text */
--menu-bg: #e2e2e2;
/* ui-menu-background */
--active-bg: #5898ff;
/* ui-menu-background-active */
--active-bg-dimmed: #c5c5c5;
/* ui-menu-background-active-muted */
}
/** Use the :where pseudo selector to make the specificity of the
* selector 0, so that it can be overridden by the user.
*/
:where(.ui-menu-container) {
position: absolute;
overflow: visible;
width: auto;
height: auto;
z-index: 10000;
border-radius: 8px;
background: var(--ui-menu-bg);
box-shadow: var(--ui-menu-shadow);
list-style: none;
padding: 6px 0 6px 0;
margin: 0;
user-select: none;
cursor: default;
color: var(--ui-menu-text);
font-weight: normal;
font-style: normal;
text-shadow: none;
text-transform: none;
letter-spacing: 0;
outline: none;
opacity: 1;
/* The [popover] elements have a 1px solid black border. Ugh. */
border: none;
width: fit-content;
height: fit-content;
}
:where(.ui-menu-container > li) {
display: flex;
flex-flow: row;
align-items: center;
padding: 1px 7px 1px 7px;
margin-top: 0;
margin-left: 6px;
margin-right: 6px;
border-radius: 4px;
white-space: nowrap;
position: relative;
outline: none;
fill: currentColor;
user-select: none;
cursor: default;
text-align: left;
color: inherit;
font-family: var(--ui-font-family);
font-size: var(--ui-font-size);
line-height: var(--ui-line-height);
letter-spacing: var(--ui-letter-spacing);
}
:where(.ui-menu-container > li > .label) {
appearance: none;
background: none;
outline: none;
width: 100%;
margin: 0;
padding: 1px 2px 1px 1px;
overflow: visible;
border: 1px solid transparent;
white-space: nowrap;
text-align: start;
}
:where(.ui-menu-container > li:has(.heading)) {
margin-top: 0.5em;
}
:where(.ui-menu-container > li > .label.heading) {
font-weight: bold;
opacity: 0.4;
}
:where(.ui-menu-container > li.indent > .label) {
margin-inline-start: 12px;
}
:where(.ui-menu-container > li > .label.indent) {
margin-inline-start: 12px;
}
:where(.ui-menu-container > li[role='divider']) {
border-bottom: 1px solid var(--ui-menu-divider);
border-radius: 0;
padding: 0;
margin-left: 15px;
margin-right: 15px;
padding-top: 5px;
margin-bottom: 5px;
width: calc(100% - 30px);
/** 100% - (margin-left + margin-right) */
}
:where(.ui-menu-container > li[aria-disabled='true']) {
opacity: 0.5;
}
:where(.ui-menu-container > li.active) {
background: var(--ui-menu-bg-active);
background: -apple-system-control-accent;
color: var(--ui-menu-text-active);
}
:where(.ui-menu-container > li.active.is-submenu-open) {
background: var(--ui-menu-bg-active-muted);
color: inherit;
}
:where(.ui-menu-container > li[aria-haspopup='true'] > .label) {
padding-inline-end: 0;
}
:where(.ui-menu-container > li[aria-haspopup='true'].active::after) {
color: var(--ui-menu-text-active);
}
/** Keyboard shortcut */
:where(.ui-menu-container > li > kbd) {
font-family: var(--ui-font-family);
margin-inline-start: 12px;
opacity: 0.4;
}
:where(.ui-menu-container > li.active > kbd) {
opacity: 0.85;
}
.ui-trailing-chevron {
display: flex;
margin-inline-start: 24px;
width: 10px;
height: 10px;
margin-bottom: 4px;
}
.ui-trailing-chevron:dir(rtl) {
transform: scaleX(-1);
}
.ui-checkmark {
display: flex;
margin-inline-end: -11px;
margin-inline-start: -4px;
margin-top: 2px;
width: 16px;
height: 16px;
}
.ui-mixedmark {
display: flex;
margin-inline-end: -11px;
margin-inline-start: -4px;
margin-top: 2px;
width: 16px;
height: 16px;
}
`,Ja;function Io(e){let t="";switch(e){case"mathfield-element":t=`
:host { display: inline-block; background-color: field; color: fieldtext; border-width: 1px; border-style: solid; border-color: #acacac; border-radius: 2px; padding:4px;}
:host([hidden]) { display: none; }
:host([disabled]), :host([disabled]:focus), :host([disabled]:focus-within) { outline: none; opacity: .5; }
:host(:focus), :host(:focus-within) {
outline: Highlight auto 1px; /* For Firefox */
outline: -webkit-focus-ring-color auto 1px;
}
:host([readonly]:focus), :host([readonly]:focus-within),
:host([read-only]:focus), :host([read-only]:focus-within) {
outline: none;
}
@media (hover: none) and (pointer: coarse) {
:host(:not(:focus)) :first-child { pointer-events: none !important; }
}`;break;case"core":t=_l;break;case"mathfield":t=gd;break;case"environment-popover":t=Ml;break;case"suggestion-popover":t=P0;break;case"keystroke-caption":t=Pc;break;case"virtual-keyboard":t=vd;break;case"ui":t=R0;break;case"menu":t=O0;break;default:debugger}return t}function Ya(e){return Ja||(Ja={}),Ja[e]||(Ja[e]=new CSSStyleSheet,Ja[e].replaceSync(Io(e))),Ja[e]}var ha;function Yi(e){var t;if(!("adoptedStyleSheets"in document)){if(window.document.getElementById(`mathlive-style-${e}`))return;const r=window.document.createElement("style");r.id=`mathlive-style-${e}`,r.append(window.document.createTextNode(Io(e))),window.document.head.appendChild(r);return}if(ha||(ha={}),((t=ha[e])!=null?t:0)!==0)ha[e]+=1;else{const r=Ya(e);document.adoptedStyleSheets=[...document.adoptedStyleSheets,r],ha[e]=1}}function pa(e){if("adoptedStyleSheets"in document&&ha!=null&&ha[e]&&(ha[e]-=1,ha[e]<=0)){const t=Ja[e];document.adoptedStyleSheets=document.adoptedStyleSheets.filter(r=>r!==t)}}var Cl=class rp extends Se{constructor(t){var r;super(_(S({},t),{type:"accent",body:(r=t.body)!=null?r:void 0})),t.accentChar?this.accent=t.accentChar:this.svgAccent=t==null?void 0:t.svgAccent,this.skipBoundary=!0,this.captureSelection=!0}static fromJson(t){return new rp(t)}toJson(){return _(S({},super.toJson()),{accentChar:this.accent,svgAccent:this.svgAccent})}render(t){var r;const n=new Ar({parent:t,mathstyle:"cramp"},this.style),i=(r=Se.createBox(n,this.body))!=null?r:new Ue("\u25A2",{style:this.style});let a=0;!this.hasEmptyBranch("body")&&this.body.length===2&&this.body[1].isCharacterBox()&&(a=i.skew);let s=Math.min(i.height,$a),u;if(this.svgAccent)u=bl(this.svgAccent),s=n.metrics.bigOpSpacing1-s;else if(this.accent){const h=new Ue(this.accent,{fontFamily:"Main-Regular"});h.italic=0;const p=this.accent===8407?" ML__accent-vec":"";u=new Ue(new Ue(h),{classes:"ML__accent-body"+p})}u=new Ln({shift:0,children:[{box:new Ue(i)},-s,{box:u,marginLeft:i.left+2*a,classes:["ML__center"]}]});const d=new Ue(u,{type:"lift"});return this.caret&&(d.caret=this.caret),this.bind(n,d.wrap(n)),this.attachSupsub(n,{base:d})}},El={"(":")","{":"}","[":"]","|":"|","\\lbrace":"\\rbrace","\\lparen":"\\rparen","\\{":"\\}","\\langle":"\\rangle","\\lfloor":"\\rfloor","\\lceil":"\\rceil","\\vert":"\\vert","\\lvert":"\\rvert","\\Vert":"\\Vert","\\lVert":"\\rVert","\\lbrack":"\\rbrack","\\ulcorner":"\\urcorner","\\llcorner":"\\lrcorner","\\lgroup":"\\rgroup","\\lmoustache":"\\rmoustache"},kl=Object.fromEntries(Object.entries(El).map(([e,t])=>[t,e]));function Dl(e){var t;return(t={"[":91,"]":93,"(":40,")":41,"\\mid":8739,"|":8739,"\u2223":8739,"\u2225":8741,"\\|":8739,"\\{":123,"\\}":125,"\\lbrace":123,"\\rbrace":125,"\\lparen":40,"\\rparen":41,"\\lbrack":91,"\\rbrack":93,"\\vert":8739,"\\lvert":8739,"\\mvert":8739,"\\rvert":8739,"\\Vert":8741,"\\lVert":8741,"\\mVert":8741,"\\rVert":8741,"\\parallel":8741,"\\shortparallel":8741,"\\langle":10216,"\\rangle":10217,"\\lfloor":8970,"\\rfloor":8971,"\\lceil":8968,"\\rceil":8969,"\\ulcorner":9484,"\\urcorner":9488,"\\llcorner":9492,"\\lrcorner":9496,"\\lgroup":10222,"\\rgroup":10223,"\\lmoustache":9136,"\\rmoustache":9137,"\\surd":8730}[e])!=null?t:e.codePointAt(0)}function N0(e,t,r,n){var i;const s=new Ue(Dl(e),{fontFamily:"Main-Regular",isSelected:n.isSelected,classes:"ML__small-delim "+((i=n.classes)!=null?i:"")}).wrap(t);return r&&s.setTop((1-t.scalingFactor)*wn),s}function Rc(e,t,r,n,i){var a,s;const u=new Ar({parent:n,mathstyle:"textstyle"},i==null?void 0:i.style),d=new Ue(Dl(e),{fontFamily:`Size${t}-Regular`,isSelected:i.isSelected,classes:((a=i.classes)!=null?a:"")+` ML__delim-size${t}`,type:(s=i.type)!=null?s:"ignore"}).wrap(u);return r&&d.setTop((1-u.scalingFactor)*wn),d}function bd(e,t,r,n,i){var a;let s,u,d,h;s=d=h=Dl(e),u=null;let p="Size1-Regular";e==="\\vert"||e==="\\lvert"||e==="\\rvert"||e==="\\mvert"||e==="\\mid"?d=s=h=8739:e==="\\Vert"||e==="\\lVert"||e==="\\rVert"||e==="\\mVert"||e==="\\|"?d=s=h=8741:e==="\\uparrow"?d=h=9168:e==="\\Uparrow"?d=h=8214:e==="\\downarrow"?s=d=9168:e==="\\Downarrow"?s=d=8214:e==="\\updownarrow"?(s=8593,d=9168,h=8595):e==="\\Updownarrow"?(s=8657,d=8214,h=8659):e==="["||e==="\\lbrack"?(s=9121,d=9122,h=9123,p="Size4-Regular"):e==="]"||e==="\\rbrack"?(s=9124,d=9125,h=9126,p="Size4-Regular"):e==="\\lfloor"||e==="\u230A"?(d=s=9122,h=9123,p="Size4-Regular"):e==="\\lceil"||e==="\u2308"?(s=9121,d=h=9122,p="Size4-Regular"):e==="\\rfloor"||e==="\u230B"?(d=s=9125,h=9126,p="Size4-Regular"):e==="\\rceil"||e==="\u2309"?(s=9124,d=h=9125,p="Size4-Regular"):e==="("||e==="\\lparen"?(s=9115,d=9116,h=9117,p="Size4-Regular"):e===")"||e==="\\rparen"?(s=9118,d=9119,h=9120,p="Size4-Regular"):e==="\\{"||e==="\\lbrace"?(s=9127,u=9128,h=9129,d=9130,p="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(s=9131,u=9132,h=9133,d=9130,p="Size4-Regular"):e==="\\lgroup"||e==="\u27EE"?(s=9127,h=9129,d=9130,p="Size4-Regular"):e==="\\rgroup"||e==="\u27EF"?(s=9131,h=9133,d=9130,p="Size4-Regular"):e==="\\lmoustache"||e==="\u23B0"?(s=9127,h=9133,d=9130,p="Size4-Regular"):e==="\\rmoustache"||e==="\u23B1"?(s=9131,h=9129,d=9130,p="Size4-Regular"):e==="\\surd"?(s=57345,h=9143,d=57344,p="Size4-Regular"):e==="\\ulcorner"?(s=9484,d=h=32):e==="\\urcorner"?(s=9488,d=h=32):e==="\\llcorner"?(h=9492,d=s=32):e==="\\lrcorner"&&(s=9496,d=s=32);const y=Uo(s,p),M=y.height+y.depth,B=Uo(d,p),$=B.height+B.depth,oe=Uo(h,p),Ve=oe.height+oe.depth;let re=0,De=1;if(u!==null){const Gn=Uo(u,p);re=Gn.height+Gn.depth,De=2}const Xe=M+Ve+re,$e=Math.max(0,Math.ceil((t-Xe)/(De*$))),yt=Xe+$e*De*$;let Ot=wn;r&&(Ot=Ot*n.scalingFactor);const Dt=yt/2-Ot,Lr=.008,Gr=[];Gr.push({box:new Ue(h,{fontFamily:p})}),Gr.push(-Lr);const it=new Ue(d,{fontFamily:p});if(u===null)for(let Gn=0;Gn<$e;Gn++)Gr.push({box:it});else{for(let Gn=0;Gn<$e;Gn++)Gr.push({box:it});Gr.push(-Lr),Gr.push({box:new Ue(u,{fontFamily:p})}),Gr.push(-Lr);for(let Gn=0;Gn<$e;Gn++)Gr.push({box:it})}Gr.push(-Lr),Gr.push({box:new Ue(s,{fontFamily:p})});let na="";p==="Size1-Regular"?na=" delim-size1":p==="Size4-Regular"&&(na=" delim-size4");const lo=new Ln({bottom:Dt,children:Gr},{classes:na});return new Ue(lo,_(S({},i!=null?i:{}),{classes:((a=i==null?void 0:i.classes)!=null?a:"")+" ML__delim-mult"}))}var yd=new Set(["(",")","\\lparen","\\rparen","[","]","\\lbrack","\\rbrack","\\{","\\}","\\lbrace","\\rbrace","\\lfloor","\\rfloor","\\lceil","\\rceil","\\surd","\u230A","\u230B","\u2308","\u2309"]),F0=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\mvert","\\mid","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache","\u27EE","\u27EF","\u23B0","\u23B1"]),xd=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),z0=[0,1.2,1.8,2.4,3];function K0(e,t,r,n){return e===void 0||e==="."?Qa(r,n.classes):(e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle"),yd.has(e)||xd.has(e)?Rc(e,t,!1,r,n):F0.has(e)?bd(e,z0[t],!1,r,n):(console.assert(!1,"Unknown delimiter '"+e+"'"),null))}var H0=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],W0=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"stack"}],V0=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}];function Z0(e){return e.type==="small"?"Main-Regular":e.type==="large"?"Size"+e.size+"-Regular":(console.assert(e.type==="stack"),"Size4-Regular")}function j0(e,t,r,n){const i={"-4":0,"-3":1,0:2}[n.mathstyle.sizeDelta];for(let a=i;a<r.length&&r[a].type!=="stack";a++){const s=Uo(e,Z0(r[a]));if(s.defaultMetrics)return{type:"small",mathstyle:"scriptstyle"};let u=s.height+s.depth;if(r[a].type==="small"&&(r[a].mathstyle==="scriptscriptstyle"?u*=Math.max(cl[Math.max(1,n.size-2)],n.minFontScale):r[a].mathstyle==="scriptstyle"&&(u*=Math.max(cl[Math.max(1,n.size-1)],n.minFontScale))),u>t)return r[a]}return r[r.length-1]}function Al(e,t,r,n,i,a){if(!t||t.length===0||t===".")return Qa(i);t==="<"||t==="\\lt"?t="\\langle":(t===">"||t==="\\gt")&&(t="\\rangle");let s;xd.has(t)?s=H0:yd.has(t)?s=V0:s=W0;const u=j0(Dl(t),r,s,i),d=new Ar({parent:i,mathstyle:u.mathstyle},a==null?void 0:a.style);return u.type==="small"?N0(t,d,n,_(S({},a),{type:e})):u.type==="large"?Rc(t,u.size,n,d,_(S({},a),{type:e})):(console.assert(u.type==="stack"),bd(t,r,n,d,_(S({},a),{type:e})))}function qo(e,t,r,n,i,a){if(t===".")return Qa(i,a==null?void 0:a.classes);const s=wn*i.scalingFactor,u=901,d=5/jo,h=Math.max(r-s,n+s),p=Math.max(h/500*u,2*h-d);return Al(e,t,p,!0,i,a)}function Qa(e,t){const r=new Ue(null,{classes:" nulldelimiter "+(t!=null?t:""),type:"ignore"});return r.width=e.getRegisterAsEm("nulldelimiterspace"),r.wrap(new Ar({parent:e,mathstyle:"textstyle"}))}var Ta=class np extends Se{constructor(t){var r;super({type:"placeholder",command:"\\placeholder",mode:(r=t==null?void 0:t.mode)!=null?r:"math",style:t==null?void 0:t.style}),this.captureSelection=!0}static fromJson(t){return new np(t)}toJson(){return super.toJson()}render(t){let r;return this.value=t.placeholderSymbol,typeof t.renderPlaceholder=="function"?r=t.renderPlaceholder(t):r=this.createBox(t),this.caret&&(r.classes+=" ML__placeholder-selected"),r}_serialize(t){return t.skipPlaceholders?"":"\\placeholder{}"}},wd=["matrix","matrix*","pmatrix","pmatrix*","bmatrix","bmatrix*","Bmatrix","Bmatrix*","vmatrix","vmatrix*","Vmatrix","Vmatrix*"],Sd=["cases","dcases","rcases"],Oc=["align","align*","aligned","gather","gathered","split"],U0=["array","subequations","eqnarray"];function G0(e){return U0.concat(Oc).concat(Sd).concat(wd).includes(e)}function _d(e){return wd.includes(e)}function q0(e){return Sd.includes(e)}function X0(e){return Oc.includes(e)}function Md(e,t,r){let n=0;for(const h of r)"align"in h&&(n+=1);let i=0;const a=[];for(const h of t){let p=0;for(i=Math.max(i,Math.min(h.length,n));p<h.length;){const y=[],M=Math.min(h.length,p+n);for(;p<M;){const B=h[p];B.length===0?y.push([new Se({type:"first",mode:e.mode})]):B[0].type!=="first"?y.push([new Se({type:"first",mode:e.mode}),...B]):(console.assert(!B.slice(1).some($=>$.type==="first")),y.push(B)),p+=1}a.push(y)}}a.length>0&&a[a.length-1].length===1&&a[a.length-1][0].length===1&&a[a.length-1][0][0].type==="first"&&a.pop();const s=[];for(const h of a){if(h.length!==i)for(let p=h.length;p<i;p++)h.push([new Se({type:"first",mode:e.mode}),new Ta]);s.push(h)}let u=0,d=0;for(const h of s){d=0;for(const p of h){for(const y of p)y.parent=e,y.parentBranch=[u,d];d+=1}u+=1}return e.isDirty=!0,s}var jr=class ip extends Se{constructor(t,r,n,i={}){var a;super({type:"array"}),this.environmentName=t,this.rowGaps=n,i.mathstyleName&&(this.mathstyleName=i.mathstyleName),i.columns&&(i.columns.length===0?this.colFormat=[{align:"l"}]:this.colFormat=i.columns),this.colFormat||(this.colFormat=[{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"}]),this.array=Md(this,r,this.colFormat),i.leftDelim&&(this.leftDelim=i.leftDelim),i.rightDelim&&(this.rightDelim=i.rightDelim),i.arraycolsep!==void 0&&(this.arraycolsep=i.arraycolsep),this.colSeparationType=i.colSeparationType,i.arraystretch!==void 0&&(this.arraystretch=i.arraystretch),this.minColumns=(a=i.minColumns)!=null?a:1}static fromJson(t){return new ip(t.environmentName,t.array,t.rowGaps,t)}toJson(){const t=_(S({},super.toJson()),{environmentName:this.environmentName,array:this.array.map(r=>r.map(n=>n.map(i=>i.toJson()))),rowGaps:this.rowGaps,columns:this.colFormat,colSeparationType:this.colSeparationType});return this.arraystretch!==void 0&&(t.arraystretch=this.arraystretch),this.arraycolsep!==void 0&&(t.arraycolsep=this.arraycolsep),this.leftDelim&&(t.leftDelim=this.leftDelim),this.rightDelim&&(t.rightDelim=this.rightDelim),t}branch(t){var r;if(xl(t))return(r=this.array[t[0]][t[1]])!=null?r:void 0}createBranch(t){var r;return xl(t)?(this.isDirty=!0,(r=this.branch(t))!=null?r:[]):[]}get rowCount(){return this.array.length}get colCount(){return this.array[0].length}get maxColumns(){return this.colFormat.filter(t=>!!t.align).length}removeBranch(t){if(Ua(t))return super.removeBranch(t);const r=this.branch(t);return this.array[t[0]][t[1]]=void 0,r.forEach(n=>{n.parent=void 0,n.parentBranch=void 0}),console.assert(r[0].type==="first"),r.shift(),this.isDirty=!0,r}get hasChildren(){return this.children.length>0}get children(){const t=[];for(const r of this.array)for(const n of r)if(n)for(const i of n)t.push(...i.children),t.push(i);return[...t,...super.children]}render(t){var r,n,i,a,s,u;const d=new Ar({parent:t,mathstyle:this.mathstyleName},this.style),h=d.getRegisterAsEm("arrayrulewidth"),p=d.getRegisterAsEm("arraycolsep"),y=d.getRegisterAsEm("doublerulesep"),M=(n=(r=this.arraystretch)!=null?r:d.getRegisterAsNumber("arraystretch"))!=null?n:1;let B=typeof this.arraycolsep=="number"?this.arraycolsep:p;this.colSeparationType==="small"&&(B=.2778*(new Ar({parent:t,mathstyle:"scriptstyle"}).scalingFactor/t.scalingFactor));const $=M*xc,oe=.7*$,Ve=.3*$;let re=0;const De=[];let Xe=0;const $e=this.array.length;for(let tn=0;tn<$e;++tn){const En=this.array[tn];Xe=Math.max(Xe,En.length);const qn=new Ar({parent:d,mathstyle:this.mathstyleName},this.style);let co=oe/qn.scalingFactor,uo=Ve/qn.scalingFactor;const fo={cells:[],height:0,depth:0,pos:0};for(const Oa of En){const Ff=(i=Se.createBox(qn,Oa,{type:"ignore"}))!=null?i:new Ue(null,{type:"ignore"});uo=Math.max(uo,Ff.depth),co=Math.max(co,Ff.height),fo.cells.push(Ff)}let ho=(a=nd(this.rowGaps[tn]))!=null?a:0;ho>0&&(ho+=Ve,uo=Math.max(uo,ho),ho=0),tn<$e-1&&!_d(this.environmentName)&&this.environmentName!=="cases"&&this.environmentName!=="array"&&(uo+=d.getRegisterAsEm("jot")),fo.height=co,fo.depth=uo,re+=co,fo.pos=re,re+=uo+ho,De.push(fo)}const yt=re/2+wn,Ot=[];for(let tn=0;tn<Xe;tn++){const En=[];for(const qn of De){const co=qn.cells[tn];co.depth=qn.depth,co.height=qn.height,En.push({box:co,shift:qn.pos-yt})}En.length>0&&Ot.push(new Ln({individualShift:En}))}const Dt=[];let Lr=!1,Gr=!1,it=0,na=!this.leftDelim;const{colFormat:lo}=this;for(const tn of lo){if("align"in tn&&it>=Ot.length)break;if("align"in tn)Lr?Dt.push(Xo(2*B)):(Gr||na)&&Dt.push(Xo(B)),Dt.push(new Ue(Ot[it],{classes:"col-align-"+tn.align})),it++,Lr=!0,Gr=!1,na=!1;else if("gap"in tn){if(typeof tn.gap=="number")Dt.push(Xo(tn.gap));else{const En=Cd(t,De,yt,tn.gap);En&&Dt.push(En)}Lr=!1,Gr=!1,na=!1}else if("separator"in tn){const En=new Ue(null,{classes:"vertical-separator"});En.height=re,En.setStyle("height",re,"em"),En.setStyle("border-right",`${h}em ${tn.separator} currentColor`),En.setStyle("vertical-align",-(re-yt),"em");let qn=0;Gr?qn=y-h:Lr&&(qn=B-h),En.left=qn,Dt.push(En),Lr=!1,Gr=!0,na=!1}}Lr&&!this.rightDelim&&Dt.push(Xo(B));const ba=new Ue(Dt,{classes:"mtable"});if((!this.leftDelim||this.leftDelim===".")&&(!this.rightDelim||this.rightDelim==="."))return this.caret&&(ba.caret=this.caret),this.bind(t,ba);const Gn=ba.height,ia=ba.depth,Ti=this.bind(t,new Ue([this.bind(t,qo("open",(s=this.leftDelim)!=null?s:".",Gn,ia,d,{isSelected:this.isSelected})),ba,this.bind(t,qo("close",(u=this.rightDelim)!=null?u:".",Gn,ia,d,{isSelected:this.isSelected}))],{type:"ord"}));return Ti?(Ti.setStyle("display","inline-block"),this.caret&&(Ti.caret=this.caret),this.bind(t,this.attachSupsub(t,{base:Ti}))):null}_serialize(t){var r;const n=[];if(this.environmentName==="lines"?n.push("{\\displaylines"):n.push(`\\begin{${this.environmentName}}`),this.environmentName==="array"){if(n.push("{"),this.colFormat!==void 0)for(const i of this.colFormat)"align"in i&&typeof i.align=="string"?n.push(i.align):"separator"in i&&i.separator==="solid"?n.push("|"):"separator"in i&&i.separator==="dashed"&&n.push(":");n.push("}")}for(let i=0;i<this.array.length;i++){for(let a=0;a<this.array[i].length;a++)a>0&&n.push(" & "),n.push(Se.serialize(this.array[i][a],t));if(i<this.array.length-1){const a=this.rowGaps[i];a!=null&&a.dimension?n.push(`\\\\[${a.dimension} ${(r=a.unit)!=null?r:"pt"}] `):n.push("\\\\ ")}}return this.environmentName==="lines"?n.push("}"):n.push(`\\end{${this.environmentName}}`),kr(n)}getCell(t,r){return this.array[t][r]}setCell(t,r,n){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.array[t][r]!==void 0);for(const a of this.array[t][r])a.parent=void 0,a.parentBranch=void 0;let i=n;(n.length===0||n[0].type!=="first")&&(i=[new Se({type:"first",mode:this.mode}),...n]),this.array[t][r]=i;for(const a of i)a.parent=this,a.parentBranch=[t,r];this.isDirty=!0}addRowBefore(t){console.assert(this.type==="array"&&Array.isArray(this.array));const r=[];for(let n=0;n<this.colCount;n++)r.push(Ll(this));this.array.splice(t,0,r);for(let n=t;n<this.rowCount;n++)for(let i=0;i<this.colCount;i++){const a=this.array[n][i];if(a)for(const s of a)s.parentBranch=[n,i]}this.isDirty=!0}addRowAfter(t){console.assert(this.type==="array"&&Array.isArray(this.array));const r=[];for(let n=0;n<this.colCount;n++)r.push(Ll(this));this.array.splice(t+1,0,r);for(let n=t+1;n<this.rowCount;n++)for(let i=0;i<this.colCount;i++){const a=this.array[n][i];if(a)for(const s of a)s.parentBranch=[n,i]}this.isDirty=!0}removeRow(t){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.rowCount>t);const r=this.array.splice(t,1);for(const n of r)for(const i of n)if(i)for(const a of i)a.parent=void 0,a.parentBranch=void 0;for(let n=t;n<this.rowCount;n++)for(let i=0;i<this.colCount;i++){const a=this.array[n][i];if(a)for(const s of a)s.parentBranch=[n,i]}this.isDirty=!0}addColumnBefore(t){console.assert(this.type==="array"&&Array.isArray(this.array));for(const r of this.array)r.splice(t,0,Ll(this));for(let r=0;r<this.rowCount;r++)for(let n=t;n<this.colCount;n++){const i=this.array[r][n];if(i)for(const a of i)a.parentBranch=[r,n]}this.isDirty=!0}addColumnAfter(t){console.assert(this.type==="array"&&Array.isArray(this.array));for(const r of this.array)r.splice(t+1,0,Ll(this));for(let r=0;r<this.rowCount;r++)for(let n=t+1;n<this.colCount;n++){const i=this.array[r][n];if(i)for(const a of i)a.parentBranch=[r,n]}this.isDirty=!0}addColumn(){this.addColumnAfter(this.colCount-1)}removeColumn(t){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.colCount>t);for(const r of this.array){const n=r.splice(t,1);for(const i of n)if(i)for(const a of i)a.parent=void 0,a.parentBranch=void 0}for(let r=0;r<this.rowCount;r++)for(let n=t;n<this.colCount;n++){const i=this.array[r][n];if(i)for(const a of i)a.parentBranch=[r,n]}this.isDirty=!0}get cells(){const t=[];for(const r of this.array)for(const n of r)n&&t.push(n.filter(i=>i.type!=="first"));return t}};function Ll(e){const t=new Se({type:"first",mode:e.mode});t.parent=e;const r=new Ta;return r.parent=e,[t,r]}function Xo(e){const t=new Ue(null,{classes:"arraycolsep"});return t.width=e,t}function Cd(e,t,r,n){if(!n)return null;const i=[];for(const a of t){const s=Se.createBox(e,n,{type:"ignore"});s&&(s.depth=a.depth,s.height=a.height,i.push({box:s,shift:a.pos-r}))}return new Ln({individualShift:i}).wrap(e)}var eo=class ap extends Se{constructor(t){super({mode:t.mode,command:t.command,style:t.style,body:t.body,type:"box"}),this.framecolor=t.framecolor,this.backgroundcolor=t.backgroundcolor,this.padding=t.padding,this.offset=t.offset,this.border=t.border}static fromJson(t){return new ap(t)}toJson(){return _(S({},super.toJson()),{framecolor:this.framecolor,backgroundcolor:this.backgroundcolor,padding:this.padding,offset:this.offset,border:this.border})}render(t){var r,n,i,a;const s=Se.createBox(t,this.body,{type:"lift"});if(!s)return null;const u=t.toEm((r=this.offset)!=null?r:{dimension:0});s.depth+=u,s.setStyle("display","inline-block"),s.setStyle("position","relative"),s.setStyle("height",Math.floor(100*s.height+s.depth)/100,"em"),s.setStyle("vertical-align",-Math.floor(100*s.height)/100,"em");const d=new Ar({parent:t},this.style),h=d.toEm((n=this.padding)!=null?n:{register:"fboxsep"}),p=new Ue(null,{classes:"ML__box"});p.height=s.height+h,p.depth=s.depth+h,p.setStyle("box-sizing","border-box"),p.setStyle("position","absolute"),p.setStyle("top",-h+.3,"em"),p.setStyle("left",0),p.setStyle("height",p.height+p.depth,"em"),p.setStyle("width","100%"),this.backgroundcolor&&p.setStyle("background-color",(i=d.toColor(this.backgroundcolor))!=null?i:"transparent"),this.framecolor&&p.setStyle("border",`${d.getRegisterAsEm("fboxrule",2)}em solid ${(a=d.toColor(this.framecolor))!=null?a:"black"}`),this.border&&p.setStyle("border",this.border);const y=new Ue([p,s],{type:"lift"});return y.setStyle("display","inline-block"),y.setStyle("position","relative"),y.setStyle("line-height",0),y.height=s.height+h+(u>0?u:0),y.depth=s.depth+h+(u<0?-u:0),y.setStyle("padding-left",h,"em"),y.setStyle("padding-right",h,"em"),y.setStyle("height",Math.floor(100*(s.height+s.depth+2*h+Math.abs(u)))/100,"em"),y.setStyle("margin-top",-h,"em"),y.setStyle("top",Math.floor(100*(s.depth-s.height+2*h-u))/100,"em"),y.setStyle("vertical-align",Math.floor(100*(s.depth+2*h))/100,"em"),this.caret&&(y.caret=this.caret),this.attachSupsub(t,{base:y})}_serialize(t){return t.skipStyles?kr([this.bodyToLatex(t),this.supsubToLatex(t)]):super._serialize(t)}},Ed=class op extends Se{constructor(t,r){var n;super({type:"composition",mode:(n=r==null?void 0:r.mode)!=null?n:"math",value:t})}static fromJson(t){return new op(t.value,t)}toJson(){return super.toJson()}get computedStyle(){return{}}render(t){const r=new Ue(this.value,{classes:"ML__composition",type:"composition"});return this.bind(t,r),this.caret&&(r.caret=this.caret),r}_serialize(t){return""}},$o=class sp extends Se{constructor(t){super({type:"error",value:t,command:t,mode:"math"}),this.verbatimLatex=t}static fromJson(t){return new sp(t.command)}toJson(){return super.toJson()}render(t){const r=this.createBox(t,{classes:"ML__error"});return this.caret&&(r.caret=this.caret),r}},kd=class lp extends Se{constructor(t,r,n){super({type:"group",mode:r,style:n}),this.body=t,this.boxType=t.length>1?"ord":"ignore",this.skipBoundary=!0,this.displayContainsHighlight=!1,t&&t.length===1&&t[0].command===","&&(this.captureSelection=!0)}static fromJson(t){return new lp(t.body,t.mode,t.style)}render(t){const r=Se.createBox(t,this.body,{type:this.boxType});return r?(this.caret&&(r.caret=this.caret),this.bind(t,r)):null}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const r=le(this.command,this.mode);return r!=null&&r.serialize?r.serialize(this,t):`{${this.bodyToLatex(t)}}`}},cn=class cp extends Se{constructor(t,r,n){super({type:"leftright",style:n.style,displayContainsHighlight:!0}),this.variant=t,this.body=r,this.leftDelim=n.leftDelim,this.rightDelim=n.rightDelim}static fromJson(t){var r;return new cp((r=t.variant)!=null?r:"",t.body,t)}toJson(){const t=super.toJson();return this.variant&&(t.variant=this.variant),this.leftDelim&&(t.leftDelim=this.leftDelim),this.rightDelim&&(t.rightDelim=this.rightDelim),t}_serialize(t){var r,n;const i=this.matchingRightDelim();return this.variant==="left...right"?kr(["\\left",(r=this.leftDelim)!=null?r:".",this.bodyToLatex(t),"\\right",i]):this.variant==="mleft...mright"?kr(["\\mleft",(n=this.leftDelim)!=null?n:".",this.bodyToLatex(t),"\\mright",i]):kr([!this.leftDelim||this.leftDelim==="."?"":this.leftDelim,this.bodyToLatex(t),i])}matchingRightDelim(){var t,r;if(this.rightDelim&&this.rightDelim!=="?")return this.rightDelim;const n=(t=this.leftDelim)!=null?t:".";return(r=El[n])!=null?r:n}render(t){var r,n;const i=new Ar({parent:t},this.style);console.assert(this.body!==void 0);const a=new Ar({parent:t,mathstyle:"textstyle"},this.style),s=(r=Se.createBox(i,this.body,{type:"inner"}))!=null?r:new Ue(null,{type:"inner"}),u=s.height/a.scalingFactor,d=s.depth/a.scalingFactor,h=[];if(this.leftDelim&&h.push(this.bind(a,qo("open",this.leftDelim,u,d,a,{isSelected:this.isSelected,classes:"ML__open"+(this.containsCaret?" ML__contains-caret":""),mode:this.mode,style:this.style}))),s&&(o(s.children,this,i,u,d),h.push(s)),this.rightDelim){let B=this.containsCaret?" ML__contains-caret":"",$=this.rightDelim;$==="?"&&(i.smartFence?($=this.matchingRightDelim(),B+=" ML__smart-fence__close"):$="."),h.push(this.bind(a,qo("close",$,u,d,a,{isSelected:this.isSelected,classes:B+" ML__close",mode:this.mode,style:this.style})))}let p=this.variant==="mleft...mright";const y=this.leftSibling;y&&(!p&&y.isFunction&&(p=!0),!p&&y.type==="subsup"&&((n=y.leftSibling)!=null&&n.isFunction)&&(p=!0));const M=new Ue(h,{type:p?"close":"inner",classes:"left-right"});return M.setStyle("margin-top",`${-s.depth}em`),M.setStyle("height",`${s.height+s.depth}em`),this.caret&&(M.caret=this.caret),this.bind(i,M.wrap(i))}};function o(e,t,r,n,i){if(e)for(let a=0;a<e.length;a++){const s=e[a];s.type==="middle"?(e[a]=t.bind(r,qo("inner",s.value,n,i,r,{isSelected:t.isSelected})),e[a].caret=s.caret,e[a].isSelected=s.isSelected,e[a].cssId=s.cssId,e[a].htmlData=s.htmlData,e[a].htmlStyle=s.htmlStyle,e[a].attributes=s.attributes,e[a].cssProperties=s.cssProperties):s.children&&o(s.children,t,r,n,i)}}var l=class up extends Se{constructor(t,r){var n;super({type:"macro",command:t,style:r.style}),this.body=r.body,r.captureSelection===void 0?r.args?this.captureSelection=!1:this.captureSelection=!0:this.captureSelection=r.captureSelection,this.macroArgs=r.args,this.expand=(n=r.expand)!=null?n:!1}static fromJson(t){return new up(t.command,t)}toJson(){const t=super.toJson();return this.expand&&(t.expand=!0),this.captureSelection!==void 0&&(t.captureSelection=this.captureSelection),this.macroArgs&&(t.args=this.macroArgs),t}_serialize(t){var r;return t.expandMacro&&this.expand?this.bodyToLatex(t):this.command+((r=this.macroArgs)!=null?r:"")}render(t){const r=Se.createBox(t,this.body);return r?(this.caret&&(r.caret=this.caret),this.bind(t,r)):null}},c=class dp extends Se{constructor(){super({type:"macro-argument"})}static fromJson(t){return new dp}toJson(){return super.toJson()}_serialize(t){return""}render(t){return null}},f=class fp extends Se{constructor(t,r,n=!1,i,a){var s;super({type:"prompt",mode:(s=a==null?void 0:a.mode)!=null?s:"math",style:a==null?void 0:a.style,command:"\\placeholder"}),this.body=i,this.correctness=r,this.placeholderId=t,this.locked=n,this.captureSelection=this.locked}static fromJson(t){return new fp(t.placeholderId,t.correctness,t.locked,t.body,t)}toJson(){const t=super.toJson();return this.placeholderId&&(t.placeholderId=this.placeholderId),this.body||delete t.body,this.body&&(t.body=this.body.filter(r=>r.type!=="first").map(r=>r.toJson())),this.correctness&&(t.correctness=this.correctness),t.locked=this.locked,t}render(t){const r=new Ar({parent:t}),n=r.getRegisterAsEm("fboxsep"),i=n,a=n,s=Se.createBox(t,this.body);if(!s)return null;s.height||(s.height=r.metrics.xHeight),s.setStyle("vertical-align",-s.height,"em"),this.correctness==="correct"?s.setStyle("color","var(--correct-color, var(--ML__correct-color))"):this.correctness==="incorrect"&&s.setStyle("color","var(--incorrect-color, var(--ML__incorrect-color))");const u=new Ue(s,{type:"ord"});u.setStyle("display","inline-block"),u.setStyle("height",s.height+s.depth,"em"),u.setStyle("vertical-align",-a,"em");let d="ML__prompt ";this.locked?d+=" ML__lockedPromptBox ":d+=" ML__editablePromptBox ",this.correctness==="correct"?d+=" ML__correctPromptBox ":this.correctness==="incorrect"&&(d+=" ML__incorrectPromptBox "),this.containsCaret&&(d+=" ML__focusedPromptBox ");const h=new Ue(null,{classes:d,attributes:{part:"prompt"}});h.height=u.height+a,h.depth=u.depth+a,h.width=u.width+2*i,h.setStyle("box-sizing","border-box"),h.setStyle("position","absolute"),h.setStyle("height",u.height+u.depth+2*a,"em"),i===0&&h.setStyle("width","100%"),i!==0&&(h.setStyle("width",`calc(100% + ${2*i}em)`),h.setStyle("top",n,"em"),h.setStyle("left",-i,"em")),(!this.body||this.body.length===1)&&(h.width=3*i,h.setStyle("width",`calc(100% + ${3*i}em)`),h.setStyle("left",-1.5*i,"em"));let p="";this.correctness==="incorrect"&&(p+='<line x1="3%" y1="97%" x2="97%" y2="3%" stroke-width="0.5" stroke="var(--incorrect-color, var(--ML__incorrect-color))" stroke-linecap="round" />'),p&&(h.svgOverlay=p);const y=new Ue([h,u],{classes:"ML__prompt-atom"});return y.setStyle("position","relative"),y.setStyle("display","inline-block"),y.setStyle("line-height",0),y.height=u.height+a+.2,y.depth=u.depth+a,y.left=i,y.right=i,y.setStyle("height",u.height+a,"em"),y.setStyle("top",u.depth-u.height,"em"),y.setStyle("vertical-align",u.depth+a,"em"),y.setStyle("margin-left",.5,"em"),y.setStyle("margin-right",.5,"em"),this.caret&&(y.caret=this.caret),this.bind(r,this.attachSupsub(t,{base:y}))}_serialize(t){var r;const n=(r=this.bodyToLatex(t))!=null?r:"";if(t.skipPlaceholders)return n;let i="\\placeholder";return this.placeholderId&&(i+=`[${this.placeholderId}]`),this.correctness==="correct"?i+="[correct]":this.correctness==="incorrect"&&(i+="[incorrect]"),this.locked&&(i+="[locked]"),sn(i,n)}},m=class hp extends Se{constructor(t){super({type:"subsup",style:t==null?void 0:t.style}),this.subsupPlacement="auto"}static fromJson(t){const r=new hp(t);for(const n of Go)t[n]&&r.setChildren(t[n],n);return r}render(t){var r;const n=new Ar({parent:t,isPhantom:!0}),i=this.leftSibling,a=(r=i.render(n))!=null?r:new Ue(null),s=new Ue(null);return s.height=a.height,s.depth=a.depth,this.attachSupsub(t,{base:s,isCharacterBox:i.isCharacterBox(),type:"ignore"})}_serialize(t){return this.supsubToLatex(t)}};function g(e){return e?!/^(<$$>|<$>|<space>|<{>|<}>|#[0-9\?]|\\.+)$/.test(e):!1}var v=class{constructor(e,t,r){this.errors=[],this.index=0,this.endCount=0;var n,i,a,s;r!=null||(r={}),this.tokens=e,this.context=t instanceof Ar&&!(r!=null&&r.parseMode)&&!r.mathstyle?t:new Ar({from:t,mathstyle:r.mathstyle},r.style),this.args=(n=r.args)!=null?n:void 0,this.smartFence=this.context.smartFence,this.parsingContext={parent:void 0,mathlist:[],style:(i=r.style)!=null?i:{},parseMode:(a=r.parseMode)!=null?a:"math",mathstyle:(s=r.mathstyle)!=null?s:"displaystyle",tabular:!1}}beginContext(e){var t,r,n;const i=this.parsingContext,a={parent:i,mathlist:[],style:S({},i.style),parseMode:(t=e==null?void 0:e.mode)!=null?t:i.parseMode,mathstyle:(r=e==null?void 0:e.mathstyle)!=null?r:i.mathstyle,tabular:(n=e==null?void 0:e.tabular)!=null?n:!1};this.parsingContext=a}endContext(){this.parsingContext=this.parsingContext.parent}onError(e){this.errors.push(S({before:Eo(this.tokens.slice(this.index,this.index+10)),after:Eo(this.tokens.slice(Math.max(0,this.index-10),this.index))},e))}get mathlist(){return this.parsingContext.mathlist}set mathlist(e){this.parsingContext.mathlist=e}get parseMode(){return this.parsingContext.parseMode}set parseMode(e){this.parsingContext.parseMode=e}get tabularMode(){return this.parsingContext.tabular}get style(){let e=this.parsingContext;for(;e;){if(e.style)return S({},e.style);e=e.parent}return{}}set style(e){this.parsingContext.style=e}end(){return this.endCount++,this.index>=this.tokens.length||this.endCount>1e3}next(){this.index+=1}get(){return this.endCount=0,this.index<this.tokens.length?this.tokens[this.index++]:""}peek(){return this.tokens[this.index]}match(e){return this.tokens[this.index]===e?(this.index++,!0):!1}lastSubsupAtom(){let e;return this.mathlist.length>0&&(e=this.mathlist[this.mathlist.length-1],e.type==="subsup"||e.subsupPlacement!==void 0)||(e=new m({style:this.style}),this.mathlist.push(e)),e}hasPattern(e){return e.test(this.tokens[this.index])}hasInfixCommand(){var e;const{index:t}=this;if(t<this.tokens.length&&this.tokens[t].startsWith("\\")){const r=le(this.tokens[t],this.parseMode);return!r||r.definitionType==="symbol"||r.ifMode&&!r.ifMode.includes(this.parseMode)?!1:(e=r.infix)!=null?e:!1}return!1}matchColumnSeparator(){return!this.tabularMode||this.peek()!=="&"?!1:(this.index++,!0)}matchRowSeparator(){if(!this.tabularMode)return!1;const e=this.peek();return e!=="\\\\"&&e!=="\\cr"&&e!=="\\tabularnewline"?!1:(this.index++,!0)}placeholder(){var e;const t=(e=this.args)==null?void 0:e.call(this,"?");return t?b(t,{parseMode:this.parseMode,mathstyle:"textstyle"}):[new Ta({mode:this.parseMode,style:this.style})]}skipWhitespace(){for(;this.match("<space>"););}skipUntilToken(e){let t=this.tokens[this.index];for(;t&&t!==e;)t=this.tokens[++this.index];t===e&&this.index++}skipFiller(){for(;this.match("\\relax")||this.match("<space>"););}matchKeyword(e){const t=this.index;let r=this.end(),n="";for(;!r;){const a=this.get();g(a)?(n+=a,r=this.end()||n.length>=e.length):r=!0}const i=e.toUpperCase()===n.toUpperCase();return i||(this.index=t),i}scanString(){let e="";for(;!this.end();){const t=this.peek();if(t==="]")return e;if(t==="<space>")e+=" ";else if(t.startsWith("\\"))this.onError({code:"unexpected-command-in-string"}),e+=t.substring(1);else if(g(t))e+=t;else return e;this.next()}return e}scanBalancedString(){let e="",t=this.end(),r=1;for(;!t;){const n=this.get();n==="<space>"?e+=" ":n==="<{>"?(e+="{",r+=1):n==="<}>"?(r-=1,r>0?e+="}":this.index-=1):n==="<$>"?e+="$":n==="<$$>"?e+="$$":e+=n,t=r===0||this.end()}return e}scanLiteralGroup(){var e;if(!this.match("<{>"))return"";let t="",r=1;for(;r>0&&!this.end();){const n=this.get();n==="<}>"?(r-=1,r>0&&(t+="}")):n==="<{>"?(r+=1,t+="{"):(/\\[a-zA-Z]+$/.test(t)&&/^[a-zA-Z]/.test(n)&&(t+=" "),t+=(e={"<space>":" ","<$$>":"$$","<$>":"$"}[n])!=null?e:n)}return t}scanNumber(e=!0){var t,r;let n=!1,i=this.peek();for(;i==="<space>"||i==="+"||i==="-";)this.get(),i==="-"&&(n=!n),i=this.peek();e=!!e;let a=10,s=/\d/;if(this.match("'"))a=8,s=/[0-7]/,e=!0;else if(this.match('"'))a=16,s=/[\dA-F]/,e=!0;else if(this.match("x"))a=16,s=/[\dA-Fa-f]/,e=!0;else if(this.match("`"))return i=this.get(),i?i.length===2&&i.startsWith("\\")?{number:(n?-1:1)*((t=i.codePointAt(1))!=null?t:0),base:"alpha"}:{number:(n?-1:1)*((r=i.codePointAt(0))!=null?r:0),base:"alpha"}:null;let u="";for(;this.hasPattern(s);)u+=this.get();if(!e&&(this.match(".")||this.match(",")))for(u+=".";this.hasPattern(s);)u+=this.get();const d=e?Number.parseInt(u,a):Number.parseFloat(u);return Number.isNaN(d)?null:{number:n?-d:d,base:a===16?"hexadecimal":a===8?"octal":"decimal"}}scanRegister(){var e;const t=this.index,r=this.scanNumber(!1);if(this.skipWhitespace(),this.match("\\relax"))return r;let n=!1;if(r===null)for(;;){const a=this.peek();if(a==="-")n=!n;else if(a!=="+")break;this.next(),this.skipWhitespace()}if(this.match("\\global")){this.skipWhitespace();const a=this.get();return a.startsWith("\\")?r?{register:a,global:!0,factor:(n?-1:1)*r.number}:n?{register:a,global:!0,factor:-1}:{register:a,global:!0}:(this.index=t,null)}let i=this.get();return i!=null&&i.startsWith("\\")?(i=i.substring(1),this.context.registers[i]?!n||r!==null?{register:i,factor:(n?-1:1)*((e=r==null?void 0:r.number)!=null?e:1)}:{register:i}:(this.index=t,null)):(this.index=t,null)}scanValue(){const e=this.scanRegister();if(e)return e;const t=this.index,r=this.scanGlueOrDimen();if(r&&("unit"in r||"glue"in r&&"unit"in r.glue))return r;this.index=t;const n=this.scanNumber();if(n)return n;if(this.end()||!g(this.peek()))return null;const i=this.scanString();return i.length>0?{string:i}:null}scanDimen(){const e=this.scanNumber(!1);if(e===null)return null;const t=e.number;this.skipWhitespace(),this.matchKeyword("true"),this.skipWhitespace();let r;return this.matchKeyword("pt")?r="pt":this.matchKeyword("mm")?r="mm":this.matchKeyword("cm")?r="cm":this.matchKeyword("ex")?r="ex":this.matchKeyword("px")?r="px":this.matchKeyword("em")?r="em":this.matchKeyword("bp")?r="bp":this.matchKeyword("dd")?r="dd":this.matchKeyword("pc")?r="pc":this.matchKeyword("in")?r="in":this.matchKeyword("mu")&&(r="mu"),r?{dimension:t,unit:r}:{dimension:t}}scanGlueOrDimen(){const e=this.scanDimen();if(e===null)return null;if(this.skipWhitespace(),this.match("\\relax"))return e;const t={glue:e};if(this.matchKeyword("plus")){const r=this.scanDimen();if(r)t.grow=r;else return t}if(this.skipWhitespace(),this.match("\\relax"))return t;if(this.skipWhitespace(),this.matchKeyword("minus")){const r=this.scanDimen();if(r)t.shrink=r;else return t}return!t.grow&&!t.shrink?e:t}scanColspec(){this.skipWhitespace();const e=[];for(;!this.end()&&!(this.peek()==="<}>"||this.peek()==="]");){const t=this.get();t==="c"||t==="r"||t==="l"?e.push({align:t}):t==="|"?e.push({separator:"solid"}):t===":"?e.push({separator:"dashed"}):t==="@"&&(this.match("<{>")&&(this.beginContext({mode:"math"}),e.push({gap:this.scan(r=>r==="<}>")}),this.endContext()),this.match("<}>")||this.onError({code:"unbalanced-braces"}))}return e}scanModeSet(){let e;if(this.match("\\(")&&(e="textstyle"),!e&&this.match("\\[")&&(e="displaystyle"),!e)return null;this.beginContext({mode:"math",mathstyle:e});const t=this.scan(r=>r===(e==="displaystyle"?"\\]":"\\)"));return this.match(e==="displaystyle"?"\\]":"\\)")||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),t}scanModeShift(){let e="";if(this.match("<$>")&&(e="<$>"),!e&&this.match("<$$>")&&(e="<$$>"),!e)return null;this.beginContext({mode:"math",mathstyle:"textstyle"});const t=this.scan(r=>r===e);return this.match(e)||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),t}scanEnvironment(){if(!this.match("\\begin"))return null;const e=this.scanArgument("string");if(!e)return null;const t=ee(e);if(!t)return this.onError({code:"unknown-environment",arg:e}),null;const r=[];if(t.params)for(const u of t.params)if(u.isOptional)r.push(this.scanOptionalArgument(u.type));else{const d=this.scanArgument(u.type);d||this.onError({code:"missing-argument",arg:e}),r.push(d)}this.beginContext({tabular:t.tabular});const n=[],i=[];let a=[],s=!1;do if(this.end()&&(this.onError({code:"unbalanced-environment",arg:e}),s=!0),!s&&this.match("\\end")&&(this.scanArgument("string")!==e&&this.onError({code:"unbalanced-environment",arg:e}),s=!0),!s)if(this.matchColumnSeparator())a.push(this.mathlist),this.mathlist=[];else if(this.matchRowSeparator()){a.push(this.mathlist),this.mathlist=[];let u=null;this.skipWhitespace(),this.match("[")&&(u=this.scanDimen(),this.skipWhitespace(),this.match("]")),i.push(u!=null?u:{dimension:0}),n.push(a),a=[]}else this.mathlist.push(...this.scan(u=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline"].includes(u)));while(!s);return a.push(this.mathlist),a.length>0&&n.push(a),this.endContext(),t.createAtom(e,n,i,r)}scanExpression(){const e=this.mathlist;if(this.mathlist=[],this.parseExpression()){const t=this.mathlist;return this.mathlist=e,t}return this.mathlist=e,null}scan(e){this.beginContext(),e||(e=s=>s==="<}>");let t="",r=null,n=[],i=null;for(;!this.end()&&!e(this.peek());)this.hasInfixCommand()&&!t?(t=this.get(),r=le(t,"math"),r&&(n=this.scanArguments(r)[1]),i=this.mathlist,this.mathlist=[]):this.parseExpression();let a;return t?(console.assert(!!r),n.unshift(this.mathlist),i&&n.unshift(i),a=[r.createAtom({command:t,args:n,style:this.style,mode:this.parseMode})]):a=this.mathlist,this.endContext(),a}scanGroup(){const e=this.index;if(!this.match("<{>"))return null;const t=this.scan(n=>n==="<}>");this.match("<}>")||this.onError({code:"unbalanced-braces"});const r=new kd(t,this.parseMode,this.style);return r.verbatimLatex=Eo(this.tokens.slice(e,this.index)),r}scanSmartFence(){if(this.skipWhitespace(),!this.match("("))return null;this.beginContext();let e=1;for(;!this.end()&&e!==0;)this.match("(")&&(e+=1),this.match(")")&&(e-=1),e!==0&&this.parseExpression();const t=new cn("",this.mathlist,{leftDelim:"(",rightDelim:e===0?")":"?"});return this.endContext(),t}scanDelim(){this.skipWhitespace();const e=this.peek();if(!e)return this.onError({code:"unexpected-end-of-string"}),null;if(!g(e)&&!e.startsWith("\\"))return null;this.next();const t=le(e,"math");return t?t.definitionType==="function"&&t.ifMode&&!t.ifMode.includes(this.parseMode)?(this.onError({code:"unexpected-delimiter",arg:e}),null):t.definitionType==="symbol"&&(t.type==="mopen"||t.type==="mclose")||/^(\.|\?|\||<|>|\\vert|\\Vert|\\\||\\surd|\\uparrow|\\downarrow|\\Uparrow|\\Downarrow|\\updownarrow|\\Updownarrow|\\mid|\\mvert|\\mVert)$/.test(e)?e:(this.onError({code:"unexpected-delimiter",arg:e}),null):(this.onError({code:"unknown-command",arg:e}),null)}scanLeftRight(){var e;if(this.match("\\right"))return this.onError({code:"unbalanced-braces"}),new $o("\\right");if(this.match("\\mright"))return this.onError({code:"unbalanced-braces"}),new $o("\\mright");let t="\\right";if(!this.match("\\left")){if(!this.match("\\mleft"))return null;t="\\mright"}const r=this.scanDelim();if(!r)return this.onError({code:"unexpected-delimiter"}),new $o(t==="\\right"?"\\left":"\\mleft");for(this.beginContext();!this.end()&&!this.match(t);)this.parseExpression();const n=this.mathlist;this.endContext();const i=(e=this.scanDelim())!=null?e:".";return new cn(t==="\\right"?"left...right":"mleft...mright",n,{leftDelim:r,rightDelim:i,style:this.style})}parseSupSub(){if(this.parseMode!=="math")return!1;let e=this.peek();if(e!=="^"&&e!=="_"&&e!=="'")return!1;const t=this.lastSubsupAtom();for(;e==="^"||e==="_"||e==="'";)this.match("'")?this.match("'")?t.addChild(new Se({type:"mord",command:"\\doubleprime",mode:"math",value:"\u2032\u2032"}),"superscript"):t.addChild(new Se({type:"mord",command:"\\prime",mode:"math",value:"\u2032"}),"superscript"):(this.match("^")||this.match("_"))&&t.addChildren(se(this.scanArgument("expression")),e==="_"?"subscript":"superscript"),e=this.peek();return!0}parseLimits(){if(this.parseMode!=="math")return!1;const e=this.match("\\limits"),t=!e&&this.match("\\nolimits"),r=!t&&!e&&this.match("\\displaylimits");if(!e&&!t&&!r)return!1;const n=this.mathlist.length>0?this.mathlist[this.mathlist.length-1]:null;return n===null?!1:(n.explicitSubsupPlacement=!0,e&&(n.subsupPlacement="over-under"),t&&(n.subsupPlacement="adjacent"),r&&(n.subsupPlacement="auto"),!0)}scanArguments(e){if(!(e!=null&&e.params))return[void 0,[]];let t;const r=[];let n=e.infix?2:0;for(;n<e.params.length;){const i=e.params[n];i.type==="rest"?r.push(this.scan(a=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline","\\right"].includes(a))):i.isOptional?r.push(this.scanOptionalArgument(i.type)):i.type.endsWith("*")?t=i.type.slice(0,-1):r.push(this.scanArgument(i.type)),n+=1}return[t,r]}scanSymbolOrLiteral(){const e=this.peek();if(!e)return null;this.next();let t;if(g(e)){const r=Ai.createAtom(this.parseMode,e,S({},this.style));return r?[r]:null}if(t=this.scanMacro(e),t)return[t];if(e.startsWith("\\")){const r=le(e,this.parseMode);if(!r)return this.onError({code:"unknown-command",arg:e}),[new $o(e)];if(r.definitionType==="symbol"){const n=S({},this.style);r.variant&&(n.variant=r.variant),t=new Se({type:r.type,command:e,style:n,value:String.fromCodePoint(r.codepoint),mode:this.parseMode,verbatimLatex:e})}else{if(r.applyMode||r.applyStyle||r.infix)return this.onError({code:"invalid-command",arg:e}),[new $o(e)];r.createAtom&&(t=r.createAtom({command:e,args:[],style:this.style,mode:this.parseMode}))}}return t?[t]:null}scanArgument(e){var t;this.skipFiller();const r=this.parseMode;if(e==="auto"&&(e=r),!this.match("<{>")){if(e==="string")return this.scanString();if(e==="value")return this.scanValue();if(e==="delim")return(t=this.scanDelim())!=null?t:".";if(e==="expression")return this.scanExpression();if(e==="math"){e!==r&&this.beginContext({mode:"math"});const i=this.scanSymbolOrLiteral();return e!==r&&this.endContext(),i}if(e==="text"){e!==r&&this.beginContext({mode:"text"});const i=this.scanSymbolOrLiteral();return e!==r&&this.endContext(),i}return e==="balanced-string"||console.assert(!1),null}if(e==="text"){this.beginContext({mode:"text"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const i=this.mathlist;return this.endContext(),{group:i}}if(e==="math"){this.beginContext({mode:"math"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const i=this.mathlist;return this.endContext(),{group:i}}let n=null;if(e==="expression"){this.beginContext({mode:"math"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const i=this.mathlist;return this.endContext(),{group:i}}return e==="string"?n=this.scanString():e==="balanced-string"?n=this.scanBalancedString():e==="colspec"?n=this.scanColspec():e==="value"&&(n=this.scanValue()),this.skipUntilToken("<}>"),n}scanOptionalArgument(e){if(e=e==="auto"?this.parseMode:e,this.skipFiller(),!this.match("["))return null;let t=null;for(;!this.end()&&!this.match("]");)if(e==="string")t=this.scanString();else if(e==="value")t=this.scanValue();else if(e==="colspec")t=this.scanColspec();else if(e==="bbox"){const r={},n=this.scanString().toLowerCase().trim().split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const i of n){const a=i.match(/^\s*([\d.]+)\s*([a-z]{2})/);if(a)r.padding={dimension:parseInt(a[1]),unit:a[2]};else{const s=i.match(/^\s*border\s*:\s*(.*)/);s?r.border=s[1]:r.backgroundcolor={string:i}}}t=r}else e==="math"&&(this.beginContext({mode:"math"}),t=this.mathlist.concat(this.scan(r=>r==="]")),this.endContext());return t}scanSymbolOrCommand(e){var t,r,n;if(e==="\\placeholder"){const u=this.scanOptionalArgument("string"),d=this.scanOptionalArgument("math"),h=Se.serialize(d,{defaultMode:"math"});let p=[],y;!y&&h==="correct"?y="correct":!y&&h==="incorrect"?y="incorrect":h!==""&&(p=d);const M=this.scanOptionalArgument("string")==="locked",B=this.scanArgument("auto");let $;return B&&Array.isArray(B)&&B.length>0?$=B:B&&typeof B=="object"&&"group"in B?$=B.group:$=p,u?[new f(u,y,M,$!=null?$:p,{mode:this.parseMode,style:this.style})]:[new Ta({mode:this.parseMode,style:this.style})]}if(e==="\\renewcommand"||e==="\\newcommand"||e==="\\providecommand"||e==="\\def"){const u=this.index,d=this.scanLiteralGroup()||this.next();if(!d)return null;if(this.context.registers[d.substring(1)]){const h=this.scanArgument("string");h!==null&&(this.context.registers[d.substring(1)]=h);const p=kr([e,Eo(this.tokens.slice(u,this.index))]);return[new Se({type:"text",value:"",verbatimLatex:p})]}}let i=this.scanMacro(e);if(i)return[i];const a=le(e,this.parseMode);if(!a)return this.parseMode==="text"?(/[a-zA-Z]/.test((t=this.peek())!=null?t:"")&&(e+=" "),[...e].map(u=>new Se({type:"text",value:u,mode:"text",style:this.style}))):(this.onError({code:"unknown-command",arg:e}),[new $o(e)]);const s=this.index;if(a.definitionType==="symbol"){const u=S({},this.style);a.variant&&(u.variant=a.variant),i=new Se({type:a.type,command:e,style:u,value:String.fromCodePoint(a.codepoint),mode:this.parseMode})}else{if(a.ifMode&&!a.ifMode.includes(this.parseMode))return[];const u=this.parseMode;a.applyMode&&(this.parseMode=a.applyMode);let d,h=[];if(a.parse?h=a.parse(this):[d,h]=this.scanArguments(a),this.parseMode=u,a.applyMode&&!a.applyStyle&&!a.createAtom)return se(h[0]);if(a.infix)return this.onError({code:"too-many-infix-commands",arg:e}),null;if(typeof a.createAtom=="function")i=a.createAtom({command:e,args:h,style:this.style,mode:this.parseMode}),d&&(i.body=se(this.scanArgument(d)));else if(typeof a.applyStyle=="function"){const p=S(S({},this.style),a.applyStyle(e,h,this.context)),y=this.parseMode;if(a.applyMode&&(this.parseMode=a.applyMode),d){const M=this.style;this.style=p;const B=this.scanArgument(d);return this.style=M,this.parseMode=y,se(B)}this.style=p}else i=new Se({type:"mord",command:(r=a.command)!=null?r:e,style:S({},this.style),value:e,mode:(n=a.applyMode)!=null?n:this.parseMode})}if(!i)return null;if(i instanceof Se&&i.verbatimLatex===void 0&&!/^\\(llap|rlap|class|cssId|htmlData)$/.test(e)){const u=kr([e,Eo(this.tokens.slice(s,this.index))]);u&&(i.verbatimLatex=u)}if(i.verbatimLatex===null&&(i.verbatimLatex=void 0),i.isFunction&&this.smartFence){const u=this.scanSmartFence();if(u)return[i,u]}return[i]}scanSymbolCommandOrLiteral(){const e=this.get();if(!e)return null;if(g(e)){const t=Ai.createAtom(this.parseMode,e,S({},this.style));if(!t)return null;if(t.isFunction&&this.smartFence){const r=this.scanSmartFence();if(r)return[t,r]}return[t]}return e.startsWith("\\")?this.scanSymbolOrCommand(e):e==="<space>"?this.parseMode==="text"?[new Ms(" "," ",this.style)]:null:(e==="<}>"?this.onError({latex:"",code:"unbalanced-braces"}):this.onError({latex:"",code:"unexpected-token",arg:e}),null)}scanMacro(e){var t;const r=this.context.getMacro(e);if(!r)return null;const n=this.index,i=r.args,a={"?":(t=this.args)==null?void 0:t.call(this,"?")};for(let s=1;s<=i;s++){let u=this.scanLiteralGroup();if(!u){const d=this.index;this.scanExpression(),u=Eo(this.tokens.slice(d,this.index))}a[s]=u}return new l(e,{expand:r.expand,captureSelection:r.captureSelection,args:n===this.index?null:Eo(this.tokens.slice(n,this.index)),style:this.parsingContext.style,body:b(r.def,{context:this.context,parseMode:this.parseMode,args:s=>a[s],mathstyle:this.parsingContext.mathstyle,style:this.parsingContext.style})})}parseExpression(){var e,t,r,n;let i=(n=(r=(t=(e=this.scanEnvironment())!=null?e:this.scanModeShift())!=null?t:this.scanModeSet())!=null?r:this.scanGroup())!=null?n:this.scanLeftRight();if(i===null){if(this.parseSupSub()||this.parseLimits())return!0;i=this.scanSymbolCommandOrLiteral()}return i?(Array.isArray(i)?this.mathlist.push(...i):this.mathlist.push(i),!0):!1}};function b(e,t){var r,n,i,a;const s=(r=t==null?void 0:t.args)!=null?r:void 0,u=new v(ml(e,s),t==null?void 0:t.context,{args:s,mathstyle:(n=t==null?void 0:t.mathstyle)!=null?n:"displaystyle",parseMode:(i=t==null?void 0:t.parseMode)!=null?i:"math",style:(a=t==null?void 0:t.style)!=null?a:{}}),d=[];for(;!u.end();)d.push(...u.scan(()=>!1));return d}function k(e,t){var r;const n=new v(ml(e,null),t==null?void 0:t.context,{mathstyle:"displaystyle",parseMode:(r=t==null?void 0:t.parseMode)!=null?r:"math"});for(;!n.end();)n.scan();return n.errors}var T=class pp extends Se{constructor(t,r){super({type:"chem"},{command:t,mode:"math"});const n=E.go(w.go(r,t==="\\pu"?"pu":"ce"),!1);this.body=b(n),this._verbatimLatex=t+"{"+r+"}",this.arg=r,this.captureSelection=!0}static fromJson(t){return new pp(t.command,t.arg)}set verbatimLatex(t){}get verbatimLatex(){return this._verbatimLatex}toJson(){return _(S({},super.toJson()),{arg:this.arg})}render(t){const r=Se.createBox(t,this.body,{type:"inner"});return this.caret&&(r.caret=this.caret),this.bind(t,r)}_serialize(t){return console.assert(this.verbatimLatex!==void 0),this.verbatimLatex}};W(["ce","pu"],"{chemformula:balanced-string}",{createAtom:e=>{var t;return new T(e.command,(t=e.args[0])!=null?t:"")}});var w={go:function(e,t){if(!e)return[];t===void 0&&(t="ce");var r="0",n={};n.parenthesisLevel=0,e=e.replace(/\n/g," "),e=e.replace(/[\u2212\u2013\u2014\u2010]/g,"-"),e=e.replace(/[\u2026]/g,"...");for(var i,a=10,s=[];;){i!==e?(a=10,i=e):a--;var u=w.stateMachines[t],d=u.transitions[r]||u.transitions["*"];e:for(var h=0;h<d.length;h++){var p=w.patterns.match_(d[h].pattern,e);if(p){for(var y=d[h].task,M=0;M<y.action_.length;M++){var B;if(u.actions[y.action_[M].type_])B=u.actions[y.action_[M].type_](n,p.match_,y.action_[M].option);else if(w.actions[y.action_[M].type_])B=w.actions[y.action_[M].type_](n,p.match_,y.action_[M].option);else throw["MhchemBugA","mhchem bug A. Please report. ("+y.action_[M].type_+")"];w.concatArray(s,B)}if(r=y.nextState||r,e.length>0){if(y.revisit||(e=p.remainder),!y.toContinue)break e}else return s}}if(a<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(e,t){if(t)if(Object.prototype.toString.call(t)==="[object Array]")for(var r=0;r<t.length;r++)e.push(t[r]);else e.push(t)},patterns:{patterns:{empty:/^$/,else:/^./,else2:/^./,space:/^\s/,"space A":/^\s(?=[A-Z\\$])/,space$:/^\s$/,"a-z":/^[a-z]/,x:/^x/,x$:/^x$/,i$:/^i$/,letters:/^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,"\\greek":/^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,"one lowercase latin letter $":/^(?:([a-z])(?:$|[^a-zA-Z]))$/,"$one lowercase latin letter$ $":/^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,"one lowercase greek letter $":/^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,digits:/^[0-9]+/,"-9.,9":/^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,"-9.,9 no missing 0":/^[+\-]?[0-9]+(?:[.,][0-9]+)?/,"(-)(9.,9)(e)(99)":function(e){var t=e.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))?(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))\))?(?:(?:([eE])|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);return t&&t[0]?{match_:t.slice(1),remainder:e.substr(t[0].length)}:null},"(-)(9)^(-9)":function(e){var t=e.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/);return t&&t[0]?{match_:t.slice(1),remainder:e.substr(t[0].length)}:null},"state of aggregation $":function(e){var t=w.patterns.findObserveGroups(e,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(t&&t.remainder.match(/^($|[\s,;\)\]\}])/))return t;var r=e.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return r?{match_:r[0],remainder:e.substr(r[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". ":/^([.\u22C5\u00B7\u2022])\s*/,"...":/^\.\.\.(?=$|[^.])/,"* ":/^([*])\s*/,"^{(...)}":function(e){return w.patterns.findObserveGroups(e,"^{","","","}")},"^($...$)":function(e){return w.patterns.findObserveGroups(e,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(e){return w.patterns.findObserveGroups(e,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(e){return w.patterns.findObserveGroups(e,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(e){return w.patterns.findObserveGroups(e,"_{","","","}")},"_($...$)":function(e){return w.patterns.findObserveGroups(e,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(e){return w.patterns.findObserveGroups(e,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(e){return w.patterns.findObserveGroups(e,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(e){return w.patterns.findObserveGroups(e,"","{","}","")},"{(...)}":function(e){return w.patterns.findObserveGroups(e,"{","","","}")},"$...$":function(e){return w.patterns.findObserveGroups(e,"","$","$","")},"${(...)}$":function(e){return w.patterns.findObserveGroups(e,"${","","","}$")},"$(...)$":function(e){return w.patterns.findObserveGroups(e,"$","","","$")},"=<>":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(e){return w.patterns.findObserveGroups(e,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(e){return w.patterns.findObserveGroups(e,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(e){return w.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(e){return w.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","")},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(e){return w.patterns.findObserveGroups(e,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(e){return w.patterns.findObserveGroups(e,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(e){return w.patterns.findObserveGroups(e,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(e){return w.patterns.findObserveGroups(e,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(e){return w.patterns.findObserveGroups(e,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(e){return w.patterns.findObserveGroups(e,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(e){return w.patterns.findObserveGroups(e,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(e){return w.patterns.findObserveGroups(e,"\\ce{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(e){var t;if(t=e.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/),t)return{match_:t[0],remainder:e.substr(t[0].length)};var r=w.patterns.findObserveGroups(e,"","$","$","");return r&&(t=r.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/),t)?{match_:t[0],remainder:e.substr(t[0].length)}:null},amount2:function(e){return this.amount(e)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(e){if(e.match(/^\([a-z]+\)$/))return null;var t=e.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return t?{match_:t[0],remainder:e.substr(t[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(e,t,r,n,i,a,s,u,d,h){var p=function(re,De){if(typeof De=="string")return re.indexOf(De)!==0?null:De;var Xe=re.match(De);return Xe?Xe[0]:null},y=function(re,De,Xe){for(var $e=0;De<re.length;){var yt=re.charAt(De),Ot=p(re.substr(De),Xe);if(Ot!==null&&$e===0)return{endMatchBegin:De,endMatchEnd:De+Ot.length};if(yt==="{")$e++;else if(yt==="}"){if($e===0)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];$e--}De++}return $e>0,null},M=p(e,t);if(M===null||(e=e.substr(M.length),M=p(e,r),M===null))return null;var B=y(e,M.length,n||i);if(B===null)return null;var $=e.substring(0,n?B.endMatchEnd:B.endMatchBegin);if(a||s){var oe=this.findObserveGroups(e.substr(B.endMatchEnd),a,s,u,d);if(oe===null)return null;var Ve=[$,oe.match_];return{match_:h?Ve.join(""):Ve,remainder:oe.remainder}}else return{match_:$,remainder:e.substr(B.endMatchEnd)}},match_:function(e,t){var r=w.patterns.patterns[e];if(r===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+e+")"];if(typeof r=="function")return w.patterns.patterns[e](t);var n=t.match(r);if(n){var i;return n[2]?i=[n[1],n[2]]:n[1]?i=n[1]:i=n[0],{match_:i,remainder:t.substr(n[0].length)}}return null}},actions:{"a=":function(e,t){e.a=(e.a||"")+t},"b=":function(e,t){e.b=(e.b||"")+t},"p=":function(e,t){e.p=(e.p||"")+t},"o=":function(e,t){e.o=(e.o||"")+t},"q=":function(e,t){e.q=(e.q||"")+t},"d=":function(e,t){e.d=(e.d||"")+t},"rm=":function(e,t){e.rm=(e.rm||"")+t},"text=":function(e,t){e.text_=(e.text_||"")+t},insert:function(e,t,r){return{type_:r}},"insert+p1":function(e,t,r){return{type_:r,p1:t}},"insert+p1+p2":function(e,t,r){return{type_:r,p1:t[0],p2:t[1]}},copy:function(e,t){return t},rm:function(e,t){return{type_:"rm",p1:t||""}},text:function(e,t){return w.go(t,"text")},"{text}":function(e,t){var r=["{"];return w.concatArray(r,w.go(t,"text")),r.push("}"),r},"tex-math":function(e,t){return w.go(t,"tex-math")},"tex-math tight":function(e,t){return w.go(t,"tex-math tight")},bond:function(e,t,r){return{type_:"bond",kind_:r||t}},"color0-output":function(e,t){return{type_:"color0",color:t[0]}},ce:function(e,t){return w.go(t)},"1/2":function(e,t){var r=[];t.match(/^[+\-]/)&&(r.push(t.substr(0,1)),t=t.substr(1));var n=t.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);return n[1]=n[1].replace(/\$/g,""),r.push({type_:"frac",p1:n[1],p2:n[2]}),n[3]&&(n[3]=n[3].replace(/\$/g,""),r.push({type_:"tex-math",p1:n[3]})),r},"9,9":function(e,t){return w.go(t,"9,9")}},createTransitions:function(e){var t,r,n,i,a={};for(t in e)for(r in e[t])for(n=r.split("|"),e[t][r].stateArray=n,i=0;i<n.length;i++)a[n[i]]=[];for(t in e)for(r in e[t])for(n=e[t][r].stateArray||[],i=0;i<n.length;i++){var s=e[t][r];if(s.action_){s.action_=[].concat(s.action_);for(var u=0;u<s.action_.length;u++)typeof s.action_[u]=="string"&&(s.action_[u]={type_:s.action_[u]})}else s.action_=[];for(var d=t.split("|"),h=0;h<d.length;h++)if(n[i]==="*")for(var p in a)a[p].push({pattern:d[h],task:s});else a[n[i]].push({pattern:d[h],task:s})}return a},stateMachines:{}};w.stateMachines={ce:{transitions:w.createTransitions({empty:{"*":{action_:"output"}},else:{"0|1|2":{action_:"beginsWithBond=false",revisit:!0,toContinue:!0}},oxidation$:{0:{action_:"oxidation-output"}},CMT:{r:{action_:"rdt=",nextState:"rt"},rd:{action_:"rqt=",nextState:"rdt"}},arrowUpDown:{"0|1|2|as":{action_:["sb=false","output","operator"],nextState:"1"}},uprightEntities:{"0|1|2":{action_:["o=","output"],nextState:"1"}},orbital:{"0|1|2|3":{action_:"o=",nextState:"o"}},"->":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{}},space:{a:{nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". |* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}0":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(e,t){var r;if((e.d||"").match(/^[0-9]+$/)){var n=e.d;e.d=void 0,r=this.output(e),e.b=n}else r=this.output(e);return w.actions["o="](e,t),r},"d= kv":function(e,t){e.d=t,e.dType="kv"},"charge or bond":function(e,t){if(e.beginsWithBond){var r=[];return w.concatArray(r,this.output(e)),w.concatArray(r,w.actions.bond(e,t,"-")),r}else e.d=t},"- after o/d":function(e,t,r){var n=w.patterns.match_("orbital",e.o||""),i=w.patterns.match_("one lowercase greek letter $",e.o||""),a=w.patterns.match_("one lowercase latin letter $",e.o||""),s=w.patterns.match_("$one lowercase latin letter$ $",e.o||""),u=t==="-"&&(n&&n.remainder===""||i||a||s);u&&!e.a&&!e.b&&!e.p&&!e.d&&!e.q&&!n&&a&&(e.o="$"+e.o+"$");var d=[];return u?(w.concatArray(d,this.output(e)),d.push({type_:"hyphen"})):(n=w.patterns.match_("digits",e.d||""),r&&n&&n.remainder===""?(w.concatArray(d,w.actions["d="](e,t)),w.concatArray(d,this.output(e))):(w.concatArray(d,this.output(e)),w.concatArray(d,w.actions.bond(e,t,"-")))),d},"a to o":function(e){e.o=e.a,e.a=void 0},"sb=true":function(e){e.sb=!0},"sb=false":function(e){e.sb=!1},"beginsWithBond=true":function(e){e.beginsWithBond=!0},"beginsWithBond=false":function(e){e.beginsWithBond=!1},"parenthesisLevel++":function(e){e.parenthesisLevel++},"parenthesisLevel--":function(e){e.parenthesisLevel--},"state of aggregation":function(e,t){return{type_:"state of aggregation",p1:w.go(t,"o")}},comma:function(e,t){var r=t.replace(/\s*$/,""),n=r!==t;return n&&e.parenthesisLevel===0?{type_:"comma enumeration L",p1:r}:{type_:"comma enumeration M",p1:r}},output:function(e,t,r){var n;if(!e.r)n=[],!e.a&&!e.b&&!e.p&&!e.o&&!e.q&&!e.d&&!r||(e.sb&&n.push({type_:"entitySkip"}),!e.o&&!e.q&&!e.d&&!e.b&&!e.p&&r!==2?(e.o=e.a,e.a=void 0):!e.o&&!e.q&&!e.d&&(e.b||e.p)?(e.o=e.a,e.d=e.b,e.q=e.p,e.a=e.b=e.p=void 0):e.o&&e.dType==="kv"&&w.patterns.match_("d-oxidation$",e.d||"")?e.dType="oxidation":e.o&&e.dType==="kv"&&!e.q&&(e.dType=void 0),n.push({type_:"chemfive",a:w.go(e.a,"a"),b:w.go(e.b,"bd"),p:w.go(e.p,"pq"),o:w.go(e.o,"o"),q:w.go(e.q,"pq"),d:w.go(e.d,e.dType==="oxidation"?"oxidation":"bd"),dType:e.dType}));else{var i;e.rdt==="M"?i=w.go(e.rd,"tex-math"):e.rdt==="T"?i=[{type_:"text",p1:e.rd||""}]:i=w.go(e.rd);var a;e.rqt==="M"?a=w.go(e.rq,"tex-math"):e.rqt==="T"?a=[{type_:"text",p1:e.rq||""}]:a=w.go(e.rq),n={type_:"arrow",r:e.r,rd:i,rq:a}}for(var s in e)s!=="parenthesisLevel"&&s!=="beginsWithBond"&&delete e[s];return n},"oxidation-output":function(e,t){var r=["{"];return w.concatArray(r,w.go(t,"oxidation")),r.push("}"),r},"frac-output":function(e,t){return{type_:"frac-ce",p1:w.go(t[0]),p2:w.go(t[1])}},"overset-output":function(e,t){return{type_:"overset",p1:w.go(t[0]),p2:w.go(t[1])}},"underset-output":function(e,t){return{type_:"underset",p1:w.go(t[0]),p2:w.go(t[1])}},"underbrace-output":function(e,t){return{type_:"underbrace",p1:w.go(t[0]),p2:w.go(t[1])}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:w.go(t[1])}},"r=":function(e,t){e.r=t},"rdt=":function(e,t){e.rdt=t},"rd=":function(e,t){e.rd=t},"rqt=":function(e,t){e.rqt=t},"rq=":function(e,t){e.rq=t},operator:function(e,t,r){return{type_:"operator",kind_:r||t}}}},a:{transitions:w.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},"$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:w.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"{text}"}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:w.createTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(e){if(e.text_){var t={type_:"text",p1:e.text_};for(var r in e)delete e[r];return t}}}},pq:{transitions:w.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"!f",revisit:!0}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(e,t){return{type_:"state of aggregation subscript",p1:w.go(t,"o")}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:w.go(t[1],"pq")}}}},bd:{transitions:w.createTransitions({empty:{"*":{}},x$:{0:{nextState:"!f",revisit:!0}},formula$:{0:{nextState:"f",revisit:!0}},else:{0:{nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(e,t){return{type_:"color",color1:t[0],color2:w.go(t[1],"bd")}}}},oxidation:{transitions:w.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(e,t){return{type_:"roman numeral",p1:t||""}}}},"tex-math":{transitions:w.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var r in e)delete e[r];return t}}}},"tex-math tight":{transitions:w.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(e,t){e.o=(e.o||"")+"{"+t+"}"},output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var r in e)delete e[r];return t}}}},"9,9":{transitions:w.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:w.createTransitions({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(e,t){var r=[];return t[0]==="+-"||t[0]==="+/-"?r.push("\\pm "):t[0]&&r.push(t[0]),t[1]&&(w.concatArray(r,w.go(t[1],"pu-9,9")),t[2]&&(t[2].match(/[,.]/)?w.concatArray(r,w.go(t[2],"pu-9,9")):r.push(t[2])),(t[3]||t[4])&&(t[3]==="e"||t[4]==="*"?r.push({type_:"cdot"}):r.push({type_:"times"}))),t[5]&&r.push("10^{"+t[5]+"}"),r},"number^":function(e,t){var r=[];return t[0]==="+-"||t[0]==="+/-"?r.push("\\pm "):t[0]&&r.push(t[0]),w.concatArray(r,w.go(t[1],"pu-9,9")),r.push("^{"+t[2]+"}"),r},operator:function(e,t,r){return{type_:"operator",kind_:r||t}},space:function(){return{type_:"pu-space-1"}},output:function(e){var t,r=w.patterns.match_("{(...)}",e.d||"");r&&r.remainder===""&&(e.d=r.match_);var n=w.patterns.match_("{(...)}",e.q||"");if(n&&n.remainder===""&&(e.q=n.match_),e.d&&(e.d=e.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.d=e.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),e.q){e.q=e.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.q=e.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var i={d:w.go(e.d,"pu"),q:w.go(e.q,"pu")};e.o==="//"?t={type_:"pu-frac",p1:i.d,p2:i.q}:(t=i.d,i.d.length>1||i.q.length>1?t.push({type_:" / "}):t.push({type_:"/"}),w.concatArray(t,i.q))}else t=w.go(e.d,"pu-2");for(var a in e)delete e[a];return t}}},"pu-2":{transitions:w.createTransitions({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(e,t){e.rm+="^{"+t+"}"},space:function(){return{type_:"pu-space-2"}},output:function(e){var t=[];if(e.rm){var r=w.patterns.match_("{(...)}",e.rm||"");r&&r.remainder===""?t=w.go(r.match_,"pu"):t={type_:"rm",p1:e.rm}}for(var n in e)delete e[n];return t}}},"pu-9,9":{transitions:w.createTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){var r=e.text_.length%3;r===0&&(r=3);for(var n=e.text_.length-3;n>0;n-=3)t.push(e.text_.substr(n,3)),t.push({type_:"1000 separator"});t.push(e.text_.substr(0,r)),t.reverse()}else t.push(e.text_);for(var i in e)delete e[i];return t},"output-o":function(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){for(var r=e.text_.length-3,n=0;n<r;n+=3)t.push(e.text_.substr(n,3)),t.push({type_:"1000 separator"});t.push(e.text_.substr(n))}else t.push(e.text_);for(var i in e)delete e[i];return t}}}};var E={go:function(e,t){if(!e)return"";for(var r="",n=!1,i=0;i<e.length;i++){var a=e[i];typeof a=="string"?r+=a:(r+=E._go2(a),a.type_==="1st-level escape"&&(n=!0))}return!t&&!n&&r&&(r="{"+r+"}"),r},_goInner:function(e){return e&&E.go(e,!0)},_go2:function(e){var t;switch(e.type_){case"chemfive":t="";var r={a:E._goInner(e.a),b:E._goInner(e.b),p:E._goInner(e.p),o:E._goInner(e.o),q:E._goInner(e.q),d:E._goInner(e.d)};r.a&&(r.a.match(/^[+\-]/)&&(r.a="{"+r.a+"}"),t+=r.a+"\\,"),(r.b||r.p)&&(t+="{\\vphantom{X}}",t+="^{\\hphantom{"+(r.b||"")+"}}_{\\hphantom{"+(r.p||"")+"}}",t+="{\\vphantom{X}}",t+="^{\\smash[t]{\\vphantom{2}}\\llap{"+(r.b||"")+"}}",t+="_{\\vphantom{2}\\llap{\\smash[t]{"+(r.p||"")+"}}}"),r.o&&(r.o.match(/^[+\-]/)&&(r.o="{"+r.o+"}"),t+=r.o),e.dType==="kv"?((r.d||r.q)&&(t+="{\\vphantom{X}}"),r.d&&(t+="^{"+r.d+"}"),r.q&&(t+="_{\\smash[t]{"+r.q+"}}")):e.dType==="oxidation"?(r.d&&(t+="{\\vphantom{X}}",t+="^{"+r.d+"}"),r.q&&(t+="{\\vphantom{X}}",t+="_{\\smash[t]{"+r.q+"}}")):(r.q&&(t+="{\\vphantom{X}}",t+="_{\\smash[t]{"+r.q+"}}"),r.d&&(t+="{\\vphantom{X}}",t+="^{"+r.d+"}"));break;case"rm":t="\\mathrm{"+e.p1+"}";break;case"text":e.p1.match(/[\^_]/)?(e.p1=e.p1.replace(" ","~").replace("-","\\text{-}"),t="\\mathrm{"+e.p1+"}"):t="\\text{"+e.p1+"}";break;case"roman numeral":t="\\mathrm{"+e.p1+"}";break;case"state of aggregation":t="\\mskip2mu "+E._goInner(e.p1);break;case"state of aggregation subscript":t="\\mskip1mu "+E._goInner(e.p1);break;case"bond":if(t=E._getBond(e.kind_),!t)throw["MhchemErrorBond","mhchem Error. Unknown bond type ("+e.kind_+")"];break;case"frac":var n="\\frac{"+e.p1+"}{"+e.p2+"}";t="\\mathchoice{\\textstyle"+n+"}{"+n+"}{"+n+"}{"+n+"}";break;case"pu-frac":var i="\\frac{"+E._goInner(e.p1)+"}{"+E._goInner(e.p2)+"}";t="\\mathchoice{\\textstyle"+i+"}{"+i+"}{"+i+"}{"+i+"}";break;case"tex-math":t=e.p1+" ";break;case"frac-ce":t="\\frac{"+E._goInner(e.p1)+"}{"+E._goInner(e.p2)+"}";break;case"overset":t="\\overset{"+E._goInner(e.p1)+"}{"+E._goInner(e.p2)+"}";break;case"underset":t="\\underset{"+E._goInner(e.p1)+"}{"+E._goInner(e.p2)+"}";break;case"underbrace":t="\\underbrace{"+E._goInner(e.p1)+"}_{"+E._goInner(e.p2)+"}";break;case"color":t="{\\color{"+e.color1+"}{"+E._goInner(e.color2)+"}}";break;case"color0":t="\\color{"+e.color+"}";break;case"arrow":var a={rd:E._goInner(e.rd),rq:E._goInner(e.rq)},s=E._getArrow(e.r);a.rd||a.rq?e.r==="<=>"||e.r==="<=>>"||e.r==="<<=>"||e.r==="<-->"?(s="\\long"+s,a.rd&&(s="\\overset{"+a.rd+"}{"+s+"}"),a.rq&&(e.r==="<-->"?s="\\underset{\\lower2mu{"+a.rq+"}}{"+s+"}":s="\\underset{\\lower6mu{"+a.rq+"}}{"+s+"}"),s=" {}\\mathrel{"+s+"}{} "):(a.rq&&(s+="[{"+a.rq+"}]"),s+="{"+a.rd+"}",s=" {}\\mathrel{\\x"+s+"}{} "):s=" {}\\mathrel{\\long"+s+"}{} ",t=s;break;case"operator":t=E._getOperator(e.kind_);break;case"1st-level escape":t=e.p1+" ";break;case"space":t=" ";break;case"entitySkip":t="~";break;case"pu-space-1":t="~";break;case"pu-space-2":t="\\mkern3mu ";break;case"1000 separator":t="\\mkern2mu ";break;case"commaDecimal":t="{,}";break;case"comma enumeration L":t="{"+e.p1+"}\\mkern6mu ";break;case"comma enumeration M":t="{"+e.p1+"}\\mkern3mu ";break;case"comma enumeration S":t="{"+e.p1+"}\\mkern1mu ";break;case"hyphen":t="\\text{-}";break;case"addition compound":t="\\,{\\cdot}\\,";break;case"electron dot":t="\\mkern1mu \\bullet\\mkern1mu ";break;case"KV x":t="{\\times}";break;case"prime":t="\\prime ";break;case"cdot":t="\\cdot ";break;case"tight cdot":t="\\mkern1mu{\\cdot}\\mkern1mu ";break;case"times":t="\\times ";break;case"circa":t="{\\sim}";break;case"^":t="uparrow";break;case"v":t="downarrow";break;case"ellipsis":t="\\ldots ";break;case"/":t="/";break;case" / ":t="\\,/\\,";break;default:throw["MhchemBugT","mhchem bug T. Please report."]}return t},_getArrow:function(e){switch(e){case"->":return"rightarrow";case"\u2192":return"rightarrow";case"\u27F6":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<-->":return"leftrightarrows";case"<=>":return"rightleftharpoons";case"\u21CC":return"rightleftharpoons";case"<=>>":return"Rightleftharpoons";case"<<=>":return"Leftrightharpoons";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(e){switch(e){case"-":return"{-}";case"1":return"{-}";case"=":return"{=}";case"2":return"{=}";case"#":return"{\\equiv}";case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\rlap{\\lower.1em{-}}\\raise.1em{\\tripledash}}";case"~=":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{\\tripledash}}-}";case"~--":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{\\tripledash}}-}";case"-~-":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{-}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(e){switch(e){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":return" {}\\approx{} ";case"$\\approx$":return" {}\\approx{} ";case"v":return" \\downarrow{} ";case"(v)":return" \\downarrow{} ";case"^":return" \\uparrow{} ";case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}};function L(e){}function P(e){}var te=class mp extends Se{constructor(t){super(_(S({},t),{type:"delim"})),this.value=t.delim,this.size=t.size}static fromJson(t){return new mp(t)}toJson(){return _(S({},super.toJson()),{delim:this.value,size:this.size})}render(t){return new Ue(this.value,{type:"middle"})}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const r=le(this.command,this.mode);return r!=null&&r.serialize?r.serialize(this,t):sn(this.command,this.value)}},He=class gp extends Se{constructor(t){super(_(S({},t),{type:"sizeddelim",value:t.delim})),this.delimType=t.delimType,this.size=t.size}static fromJson(t){return new gp(t)}toJson(){return _(S({},super.toJson()),{delim:this.value,size:this.size,delimType:this.delimType})}render(t){let r=K0(this.value,this.size,t,{classes:{open:"mopen",close:"mclose"}[this.delimType],type:this.delimType,isSelected:this.isSelected});return r?(r=this.bind(t,r),this.caret&&(r.caret=this.caret),r):null}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const r=le(this.command,this.mode);return r!=null&&r.serialize?r.serialize(this,t):sn(this.command,this.value)}},qe=class vp extends Se{constructor(t,r,n,i){var a,s;super({type:"enclose",command:t,style:i.style}),this.body=r,this.backgroundcolor=i.backgroundcolor,n.updiagonalarrow&&(n.updiagonalstrike=!1),n.box&&(n.left=!1,n.right=!1,n.bottom=!1,n.top=!1),this.notation=n,this.shadow=(a=i.shadow)!=null?a:"none",this.strokeWidth=(s=i.strokeWidth)!=null?s:"0.06em",this.strokeWidth||(this.strokeWidth="0.06em"),this.strokeStyle=i.strokeStyle,this.svgStrokeStyle=i.svgStrokeStyle,this.strokeColor=i.strokeColor,this.borderStyle=i.borderStyle,this.padding=i.padding,this.captureSelection=!1}static fromJson(t){return new vp(t.command,t.body,t.notation,t)}toJson(){return _(S({},super.toJson()),{notation:this.notation,shadow:this.shadow,strokeWidth:this.strokeWidth,strokeStyle:this.strokeStyle,svgStrokeStyle:this.svgStrokeStyle,strokeColor:this.strokeColor,borderStyle:this.borderStyle,padding:this.padding})}_serialize(t){var r;if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const n=le(this.command,this.mode);if(n!=null&&n.serialize)return n.serialize(this,t);let i=(r=this.command)!=null?r:"";if(this.command==="\\enclose"){i+="{"+Object.keys(this.notation).join(" ")+"}";let a="",s="";this.backgroundcolor&&this.backgroundcolor!=="transparent"&&(a+=s+'mathbackground="'+this.backgroundcolor+'"',s=","),this.shadow&&this.shadow!=="auto"&&(a+=s+'shadow="'+this.shadow+'"',s=","),this.strokeWidth||this.strokeStyle!=="solid"?(a+=s+this.borderStyle,s=","):this.strokeColor&&this.strokeColor!=="currentColor"&&(a+=s+'mathcolor="'+this.strokeColor+'"',s=","),a&&(i+=`[${a}]`)}return sn(i,this.bodyToLatex(t))}render(t){const r=new Ar({parent:t},this.style),n=Se.createBox(r,this.body);if(!n)return null;const i=pt(this.borderStyle),a=r.toEm(!this.padding||this.padding==="auto"?{register:"fboxsep"}:{string:this.padding});n.setStyle("position","relative"),n.setStyle("display","inline-block"),n.setStyle("top",a,"em"),n.setStyle("height",n.height+n.depth,"em"),n.setStyle("width",n.width,"em");const s=new Ue(null,{classes:"ML__notation"});let u=n.height+n.depth+2*a;const d=n.width+2*a;let h="";if(this.notation.horizontalstrike&&(h+=this.line(3,50,97,50)),this.notation.verticalstrike&&(h+=this.line(50,3,50,97)),this.notation.updiagonalstrike&&(h+=this.line(3,97,97,3)),this.notation.downdiagonalstrike&&(h+=this.line(3,3,97,97)),this.notation.updiagonalarrow){h+=this.line(a.toString(),(a+n.depth+n.height).toString(),(a+n.width).toString(),a.toString());const $=.03*Math.sqrt(d*d+u*u)*1,oe=n.width*$,Ve=(n.depth+n.height)*$,re=a+n.width;let De=a;De+Ve-.4*oe<0&&(De=.4*oe-Ve),h+='<polygon points="',h+=`${re},${De} ${re-oe-.4*Ve},${De+Ve-.4*oe} `,h+=`${re-.7*oe},${De+.7*Ve} ${re-oe+.4*Ve},${De+Ve+.4*oe} `,h+=`${re},${De}`,h+=`" stroke='none' fill="${this.strokeColor}"`,h+="/>"}let p=0;if(this.notation.phasorangle){const M=It(r),B=(n.height+n.depth+2*M+a).toString(),$=(n.height+n.depth)/2;h+=this.line(a.toString(),B,(a+$+n.width).toString(),B),h+=this.line(a.toString(),B,(a+$).toString(),(a-M).toString()),u+=M,p=$,n.left+=u/2-a}if(this.notation.longdiv){const M=It(r);u+=M,h+=this.line(a.toString(),a.toString(),(a+n.width).toString(),a.toString());const B=.3;p=B+M,n.left+=B+M,n.setTop(a+M),h+='<path d="',h+=`M ${a} ${a} a${B} ${(n.depth+n.height+2*M)/2}, 0, 1, 1, 0 ${n.depth+n.height+2*M} "`,h+=` stroke-width="${kt(r)}" stroke="${this.strokeColor}" fill="none"`,h+="/>"}if(s.width=n.width+2*a+p,s.height=n.height+a,s.depth=n.depth+a,s.setStyle("box-sizing","border-box"),s.setStyle("left",`calc(-${i} / 2 )`),s.setStyle("height",`${Math.floor(100*u)/100}em`),s.setStyle("top",`calc(${i} / 2 )`),this.backgroundcolor&&s.setStyle("background-color",this.backgroundcolor),this.notation.box&&s.setStyle("border","1px solid red"),this.notation.actuarial&&(s.setStyle("border-top",this.borderStyle),s.setStyle("border-right",this.borderStyle)),this.notation.madruwb&&(s.setStyle("border-bottom",this.borderStyle),s.setStyle("border-right",this.borderStyle)),this.notation.roundedbox&&(s.setStyle("border-radius","8px"),s.setStyle("border",this.borderStyle)),this.notation.circle&&(s.setStyle("border-radius","50%"),s.setStyle("border",this.borderStyle)),this.notation.top&&s.setStyle("border-top",this.borderStyle),this.notation.left&&s.setStyle("border-left",this.borderStyle),this.notation.right&&s.setStyle("border-right",this.borderStyle),this.notation.bottom&&s.setStyle("border-bottom",this.borderStyle),h){let M="";this.shadow==="auto"&&(M+="filter: drop-shadow(0 0 .5px rgba(255, 255, 255, .7)) drop-shadow(1px 1px 2px #333)"),this.shadow!=="none"&&(M+=`filter: drop-shadow(${this.shadow})`),M+=` stroke-width="${this.strokeWidth}" stroke="${this.strokeColor}"`,M+=' stroke-linecap="round"',this.svgStrokeStyle&&(M+=` stroke-dasharray="${this.svgStrokeStyle}"`),s.svgStyle=M,s.svgOverlay=h}const y=new Ue([s,n]);return y.setStyle("position","relative"),y.setStyle("vertical-align",a,"em"),y.setStyle("height",`${Math.floor(100*(n.height+n.depth+2*a))/100}em`),y.setStyle("display","inline-block"),y.height=s.height,y.depth=s.depth,y.width=s.width-2*a,y.left=a,y.right=a,this.caret&&(y.caret=this.caret),y.wrap(r)}line(t,r,n,i){return`<line x1="${tt(t)}" y1="${tt(r)}" x2="${tt(n)}" y2="${tt(i)}" vector-effect="non-scaling-stroke"></line>`}};function tt(e){return typeof e=="number"?`${Math.floor(100*e)/100}%`:e}function pt(e){if(!e)return"1px";const t=e.match(/([0-9][a-zA-Z\%]+)/);return t===null?"1px":t[1]}function kt(e){return(Math.floor(100*e.metrics.sqrtRuleThickness/e.scalingFactor)/100/10).toString()+"em"}function It(e){const t=e.isDisplayStyle?$a:e.metrics.defaultRuleThickness;return e.metrics.defaultRuleThickness+e.scalingFactor*t/4}var cr=class bp extends Se{constructor(t,r,n){var i,a;super(_(S({},n),{type:"genfrac",displayContainsHighlight:!0})),this.above=t,this.below=r,this.hasBarLine=(i=n==null?void 0:n.hasBarLine)!=null?i:!0,this.continuousFraction=(a=n==null?void 0:n.continuousFraction)!=null?a:!1,this.numerPrefix=n==null?void 0:n.numerPrefix,this.denomPrefix=n==null?void 0:n.denomPrefix,this.mathstyleName=n==null?void 0:n.mathstyleName,this.leftDelim=n==null?void 0:n.leftDelim,this.rightDelim=n==null?void 0:n.rightDelim,this.fractionNavigationOrder=n==null?void 0:n.fractionNavigationOrder}static fromJson(t){return new bp(t.above,t.below,t)}toJson(){const t={};return this.continuousFraction&&(t.continuousFraction=!0),this.numerPrefix&&(t.numerPrefix=this.numerPrefix),this.denomPrefix&&(t.denomPrefix=this.denomPrefix),this.leftDelim&&(t.leftDelim=this.leftDelim),this.rightDelim&&(t.rightDelim=this.rightDelim),this.hasBarLine||(t.hasBarLine=!1),this.mathstyleName&&(t.mathstyleName=this.mathstyleName),this.fractionNavigationOrder&&(t.fractionNavigationOrder=this.fractionNavigationOrder),S(S({},super.toJson()),t)}get children(){if(this._children)return this._children;const t=[];if(this.fractionNavigationOrder==="denominator-numerator"){for(const r of this.below)t.push(...r.children),t.push(r);for(const r of this.above)t.push(...r.children),t.push(r)}else{for(const r of this.above)t.push(...r.children),t.push(r);for(const r of this.below)t.push(...r.children),t.push(r)}return this._children=t,t}render(t){var r,n;const i=new Ar({parent:t,mathstyle:this.mathstyleName},this.style),a=i.metrics,s=new Ar({parent:i,mathstyle:this.continuousFraction?"":"numerator"},this.style),u=this.numerPrefix?new Ue([new Ue(this.numerPrefix),Se.createBox(s,this.above)],{isTight:s.isTight,type:"ignore"}):(r=Se.createBox(s,this.above,{type:"ignore"}))!=null?r:new Ue(null,{type:"ignore"}),d=new Ar({parent:i,mathstyle:this.continuousFraction?"":"denominator"},this.style),h=this.denomPrefix?new Ue([new Ue(this.denomPrefix),Se.createBox(d,this.below,{type:"ignore"})]):(n=Se.createBox(d,this.below,{type:"ignore"}))!=null?n:new Ue(null,{type:"ignore"}),p=this.hasBarLine?a.defaultRuleThickness:0;let y,M=0,B;i.isDisplayStyle?(y=s.metrics.num1,M=p>0?3*p:7*p,B=d.metrics.denom1):(p>0?(y=s.metrics.num2,M=p):(y=s.metrics.num3,M=3*a.defaultRuleThickness),B=d.metrics.denom2);const $=[];this.isSelected&&$.push("ML__selected");const oe=u.depth,Ve=h.height;let re;if(p<=0){const Dt=y-oe-(Ve-B);Dt<M&&(y+=(M-Dt)/2,B+=(M-Dt)/2),re=new Ln({individualShift:[{box:u,shift:-y,classes:[...$,"ML__center"]},{box:h,shift:B,classes:[...$,"ML__center"]}]}).wrap(i)}else{const Dt=new Ue(null,{classes:"ML__frac-line",mode:this.mode,style:this.style});Dt.softWidth=Math.max(u.width,h.width),Dt.height=p/2,Dt.depth=p/2;const Lr=wn+p/2;y<M+oe+Lr&&(y=M+oe+Lr);const Gr=wn-p/2;B<M+Ve-Gr&&(B=M+Ve-Gr),re=new Ln({individualShift:[{box:h,shift:B,classes:[...$,"ML__center"]},{box:Dt,shift:-Gr,classes:$},{box:u,shift:-y,classes:[...$,"ML__center"]}]}).wrap(i)}const De=i.isDisplayStyle?a.delim1:a.delim2,Xe=this.leftDelim?this.bind(t,Al("open",this.leftDelim,De,!0,t,{style:this.style,mode:this.mode,isSelected:this.isSelected})):Qa(i,"open");let $e=null;this.continuousFraction?$e=new Ue(null,{type:"close"}):this.rightDelim?$e=this.bind(t,Al("close",this.rightDelim,De,!0,t,{style:this.style,mode:this.mode,isSelected:this.isSelected})):$e=Qa(i,"close");const yt=new Ue([Xe,re,$e],{isTight:i.isTight,type:"inner",classes:"mfrac"}),Ot=this.bind(t,yt);return this.caret&&(Ot.caret=this.caret),this.attachSupsub(t,{base:Ot})}},Tt=class yp extends Se{constructor(t,r){var n;super({type:"latex",value:t,mode:"latex"}),this.isSuggestion=(n=r==null?void 0:r.isSuggestion)!=null?n:!1,this.isError=!1}static fromJson(t){const r=new yp(t.value);return t.isSuggestion&&(r.isSuggestion=!0),t.isError&&(r.isError=!0),r}toJson(){const t={};return this.isSuggestion&&(t.isSuggestion=!0),this.isError&&(t.isError=!0),S({type:"latex",value:this.value},t)}get computedStyle(){return{}}render(t){const r=new Ue(this.value,{classes:this.isSuggestion?"ML__suggestion":this.isError?"ML__error":"",type:"latex",maxFontSize:1});return r?(this.caret&&(r.caret=this.caret),this.bind(t,r)):null}},br=class xp extends Se{constructor(t){super({type:"latexgroup",mode:"latex"}),this.body=[...t].map(r=>new Tt(r)),this.skipBoundary=!1}static fromJson(t){return new xp("")}toJson(){return super.toJson()}render(t){const r=Se.createBox(t,this.body);return r?(this.caret&&(r.caret=this.caret),this.bind(t,r)):null}_serialize(t){var r,n;return(n=(r=this.body)==null?void 0:r.map(i=>i.value).join(""))!=null?n:""}},mn=class wp extends Se{constructor(t,r){super(_(S({},r),{type:"extensible-symbol",isFunction:r==null?void 0:r.isFunction})),this.value=t,this.variant=r==null?void 0:r.variant,this.subsupPlacement=r==null?void 0:r.limits}static fromJson(t){return new wp(t.symbol,t)}toJson(){const t=super.toJson();return this.variant&&(t.variant=this.variant),this.subsupPlacement&&(t.limits=this.subsupPlacement),this.isExtensibleSymbol&&(t.isExtensibleSymbol=!0),this.value&&(t.symbol=this.value),t}render(t){var r;const n=t.isDisplayStyle&&this.value!=="\\smallint",i=new Ue(this.value,{fontFamily:n?"Size2-Regular":"Size1-Regular",classes:"op-symbol "+(n?"large-op":"small-op"),type:"op",maxFontSize:t.scalingFactor,isSelected:this.isSelected});if(!i)return null;i.right=i.italic;const a=(i.height-i.depth)/2-wn*t.scalingFactor,s=i.italic;i.setTop(a);let u=i;if(this.superscript||this.subscript){const d=(r=this.subsupPlacement)!=null?r:"auto";u=d==="over-under"||d==="auto"&&t.isDisplayStyle?this.attachLimits(t,{base:i,baseShift:a,slant:s}):this.attachSupsub(t,{base:i})}return new Ue(this.bind(t,u),{type:"op",caret:this.caret,isSelected:this.isSelected,classes:"op-group"}).wrap(t)}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const r=le(this.command,this.mode);if(r!=null&&r.serialize)return r.serialize(this,t);const n=[];return n.push(this.command),this.explicitSubsupPlacement&&(this.subsupPlacement==="over-under"&&n.push("\\limits"),this.subsupPlacement==="adjacent"&&n.push("\\nolimits"),this.subsupPlacement==="auto"&&n.push("\\displaylimits")),n.push(this.supsubToLatex(t)),kr(n)}},yr=class Sp extends Se{constructor(t){const r=t.body;super(_(S({},t),{type:"overlap",body:typeof r=="string"?[new Se({value:r})]:r,style:t==null?void 0:t.style})),this.skipBoundary=!0,this.align=t==null?void 0:t.align,this.boxType=t==null?void 0:t.boxType}static fromJson(t){return new Sp(t)}toJson(){const t={};return this.align&&(t.align=this.align),this.boxType&&(t.boxType=this.boxType),S(S({},super.toJson()),t)}render(t){const r=Se.createBox(t,this.body,{classes:"inner"});return r?(this.caret&&(r.caret=this.caret),this.bind(t,new Ue([r,new Ue(null,{classes:"fix"})],{classes:this.align==="right"?"rlap":"llap",type:this.boxType}))):null}},Hr=class _p extends Se{constructor(t){var r,n,i,a;super({type:"overunder",command:t.command,style:t.style,mode:t.mode,body:t.body,skipBoundary:(r=t.skipBoundary)!=null?r:!0}),this.subsupPlacement=t.supsubPlacement,this.svgAbove=t.svgAbove,this.svgBelow=t.svgBelow,this.svgBody=t.svgBody,this.above=t.above,this.below=t.below,this.boxType=(n=t.boxType)!=null?n:"ord",this.paddedBody=(i=t.paddedBody)!=null?i:!1,this.paddedLabels=(a=t.paddedLabels)!=null?a:!1}static fromJson(t){return new _p(t)}toJson(){const t=super.toJson();return this.skipBoundary||(t.skipBoundary=!1),this.subsupPlacement&&(t.subsupPlacement=this.subsupPlacement),this.svgAbove&&(t.svgAbove=this.svgAbove),this.svgBelow&&(t.svgBelow=this.svgBelow),this.svgBody&&(t.svgBody=this.svgBody),this.boxType!=="ord"&&(t.boxType=this.boxType),this.paddedBody&&(t.paddedBody=!0),this.paddedLabels&&(t.paddedLabels=!0),t}render(t){let r=this.svgBody?bl(this.svgBody):Se.createBox(t,this.body,{type:"ignore"});const n=new Ar({parent:t,mathstyle:"scriptstyle"},this.style);let i=null;this.svgAbove?i=bl(this.svgAbove):this.above&&(i=Se.createBox(n,this.above,{type:"ignore"}));let a=null;this.svgBelow?a=bl(this.svgBelow):this.below&&(a=Se.createBox(n,this.below,{type:"ignore"})),this.paddedBody&&(r=new Ue([Qa(t,"open"),r,Qa(t,"close")],{type:"ignore"}));let s=jn(t,{base:r,above:i,below:a,type:this.boxType==="bin"||this.boxType==="rel"?this.boxType:"ord",paddedAboveBelow:this.paddedLabels});return s?(this.subsupPlacement==="over-under"?s=this.attachLimits(t,{base:s,type:s.type}):s=this.attachSupsub(t,{base:s}),this.caret&&(s.caret=this.caret),this.bind(t,s)):null}};function jn(e,t){if(!t.base)return null;if(!t.above&&!t.below){const u=new Ue(t.base,{type:t.type});return u.setStyle("position","relative"),u}let r=0;t.above&&(r=e.metrics.bigOpSpacing5);let n=null;const i=t.base,a=0,s=["ML__center"];if(t.paddedAboveBelow&&s.push("ML__label_padding"),t.below&&t.above){const u=e.metrics.bigOpSpacing5+t.below.height+t.below.depth+i.depth+a;n=new Ln({bottom:u,children:[e.metrics.bigOpSpacing5,{box:t.below,classes:s},{box:i,classes:["ML__center"]},r,{box:t.above,classes:s},e.metrics.bigOpSpacing5]})}else t.below?n=new Ln({top:i.height-a,children:[e.metrics.bigOpSpacing5,{box:t.below,classes:s},{box:i,classes:["ML__center"]}]}):t.above&&(n=new Ln({bottom:i.depth+a,children:[{box:i,classes:["ML__center"]},r,{box:t.above,classes:s},e.metrics.bigOpSpacing5]}));return new Ue(n,{type:t.type})}var Bn=class Mp extends Se{constructor(t){var r,n,i,a;super(_(S({},t),{type:"phantom"})),this.captureSelection=!0,this.isInvisible=(r=t.isInvisible)!=null?r:!1,this.smashDepth=(n=t.smashDepth)!=null?n:!1,this.smashHeight=(i=t.smashHeight)!=null?i:!1,this.smashWidth=(a=t.smashWidth)!=null?a:!1}static fromJson(t){return new Mp(t)}toJson(){const t={};return this.isInvisible&&(t.isInvisible=!0),this.smashDepth&&(t.smashDepth=!0),this.smashHeight&&(t.smashHeight=!0),this.smashWidth&&(t.smashWidth=!0),S(S({},super.toJson()),t)}render(t){const r=new Ar({parent:t,isPhantom:!0});if(!this.smashDepth&&!this.smashHeight&&!this.smashWidth)return console.assert(this.isInvisible),Se.createBox(r,this.body,{classes:"inner"});const n=Se.createBox(this.isInvisible?r:t,this.body);if(!n)return null;if(this.smashWidth){const i=new Ue(null,{classes:"fix"});return new Ue([n,i],{classes:"rlap"}).wrap(t)}if(!this.smashHeight&&!this.smashDepth)return n;if(this.smashHeight&&(n.height=0),this.smashDepth&&(n.depth=0),n.children)for(const i of n.children)this.smashHeight&&(i.height=0),this.smashDepth&&(i.depth=0);return new Ln({firstBaseline:[{box:n}]},{type:n.type}).wrap(t)}},xi=class Cp extends Se{constructor(t){var r;super(S({type:"spacing"},t)),this.width=t==null?void 0:t.width,this._braced=(r=t==null?void 0:t.braced)!=null?r:!1}static fromJson(t){return new Cp(t)}toJson(){const t=super.toJson();return this.width!==void 0&&(t.width=this.width),this._braced&&(t.braced=!0),t}render(t){var r;if(this.command==="space")return new Ue(this.mode==="math"?null:" ");let n;if(this.width!==void 0)n=new Ue(null,{classes:"mspace"}),n.left=t.toEm(this.width);else{const i=(r={"\\qquad":"qquad","\\quad":"quad","\\enspace":"enspace","\\;":"thickspace","\\:":"mediumspace","\\>":"mediumspace","\\,":"thinspace","\\!":"negativethinspace"}[this.command])!=null?r:"mediumspace";n=new Ue(null,{classes:i})}return n=this.bind(t,n),this.caret&&(n.caret=this.caret),n}_serialize(t){var r;if(!t.expandMacro&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const n=le(this.command,this.mode);if(n!=null&&n.serialize)return n.serialize(this,t);const i=(r=this.command)!=null?r:"";return this.width===void 0?i:this._braced&&!("register"in this.width)?`${i}{${Zn(this.width)}}`:`${i}${Zn(this.width)}`}},Wi=class Ep extends Se{constructor(t){var r;super(_(S({},t),{type:"surd",mode:(r=t.mode)!=null?r:"math",style:t.style,displayContainsHighlight:!0,body:t.body})),this.above=t.index}static fromJson(t){return new Ep(_(S({},t),{index:t.above}))}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const r=le(this.command,this.mode);if(r!=null&&r.serialize)return r.serialize(this,t);const n=this.command,i=this.bodyToLatex(t);return this.above&&!this.hasEmptyBranch("above")?sn(`${n}[${this.aboveToLatex(t)}]`,i):/^[0-9]$/.test(i)?`${n}${i}`:sn(n,i)}get children(){if(this._children)return this._children;const t=[];if(this.above)for(const r of this.above)t.push(...r.children),t.push(r);if(this.body)for(const r of this.body)t.push(...r.children),t.push(r);return this._children=t,t}render(t){var r;const n=new Ar({parent:t,mathstyle:"cramp"},this.style),i=(r=Se.createBox(n,this.body,{type:"inner"}))!=null?r:new Ue(null),a=n.scalingFactor,s=n.metrics.defaultRuleThickness/a,u=t.isDisplayStyle?$a:s,d=new Ue(null,{classes:"ML__sqrt-line",style:this.style});d.height=s,d.softWidth=i.width;let h=a*(s+u/4);const y=Math.max(a*2*u,i.height+i.depth)+h+s,M=new Ar({parent:t},this.style),B=this.bind(M,new Ue(Al("inner","\\surd",y,!1,M,{isSelected:this.isSelected}),{isSelected:this.isSelected,classes:"ML__sqrt-sign",style:this.style}));if(!B)return null;const $=B.height+B.depth-s;$>i.height+i.depth+h&&(h=(h+$-(i.height+i.depth))/2),B.setTop(B.height-i.height-h);const oe=this.bind(t,new Ln({firstBaseline:[{box:new Ue(i)},h-2*s,{box:d},s]})),Ve=Se.createBox(new Ar({parent:t,mathstyle:"scriptscriptstyle"}),this.above,{type:"ignore"});if(!Ve){const Xe=new Ue([B,oe],{classes:this.containsCaret?"ML__contains-caret":"",type:"inner"});return Xe.setStyle("display","inline-block"),Xe.setStyle("height",Xe.height+Xe.depth,"em"),this.caret&&(Xe.caret=this.caret),this.bind(t,Xe)}const re=new Ln({shift:-.6*(Math.max(B.height,oe.height)-Math.max(B.depth,oe.depth)),children:[{box:Ve}]}),De=new Ue([new Ue(re,{classes:"ML__sqrt-index",type:"ignore"}),B,oe],{type:"inner",classes:this.containsCaret?"ML__contains-caret":""});return De.height=B.height,De.depth=B.depth,this.caret&&(De.caret=this.caret),this.bind(t,De)}},Bi=class extends Ue{constructor(e){super(null,{type:"skip"}),this._width=e}toMarkup(){return`<span style="display:inline-block;width:${Math.ceil(this.width*100)/100}em"></span>`}};function Ii(e,t){if(!e.parent)return;const r=e.parent.children,n=r.indexOf(e);let i=n-1;for(;i>=0&&r[i].type==="ignore";)i-=1;if(i<0&&e.parent.parent&&e.parent.type==="lift"){Ii(e.parent,t);return}n>0&&r[n-1].type==="skip"?r[n-1].width+=t:r.splice(n,0,new Bi(t))}var ei={ord:{op:3,bin:4,rel:5,inner:3},op:{ord:3,op:3,rel:5,inner:3},bin:{ord:4,op:4,open:4,inner:4},rel:{ord:5,op:5,open:5,inner:5},close:{op:3,bin:4,rel:5,inner:3},punct:{ord:3,op:3,rel:3,open:3,punct:3,inner:3},inner:{ord:3,op:3,bin:4,rel:5,open:3,punct:3,inner:3}},to={ord:{op:3},op:{ord:3,op:3},close:{op:3},inner:{op:3}};function ma(e){Qi(e,(t,r)=>{r.type==="bin"&&(!t||/^(middle|bin|op|rel|open|punct)$/.test(t.type))&&(r.type="ord"),(t==null?void 0:t.type)==="bin"&&/^(rel|close|punct)$/.test(r.type)&&(t.type="ord"),r.type!=="ignore"&&(t=r)})}function Pa(e,t){if(!e.children)return e;const r=e.children;ma(r);const n=t.getRegisterAsEm("thinmuskip"),i=t.getRegisterAsEm("medmuskip"),a=t.getRegisterAsEm("thickmuskip");return Qi(r,(s,u)=>{var d,h,p;if(!s)return;const y=s.type,M=u.isTight?(d=to[y])!=null?d:null:(h=ei[y])!=null?h:null,B=(p=M==null?void 0:M[u.type])!=null?p:null;B===3&&Ii(u,n),B===4&&Ii(u,i),B===5&&Ii(u,a)}),e}function Qi(e,t,r=void 0){if(!e)return r;e=[...e];for(const n of e)n.type==="lift"?r=Qi(n.children,t,r):n.type==="ignore"?Qi(n.children,t):(t(r,n),Qi(n.children,t),r=n);return r}var ga=class kp extends Se{constructor(t){super({type:"tooltip",command:t.command,mode:t.mode,style:t.style,body:t.body,displayContainsHighlight:!0}),this.tooltip=new Se({type:"root",mode:t.content,body:t.tooltip,style:{}}),this.skipBoundary=!0,this.captureSelection=!1}static fromJson(t){return new kp(_(S({},t),{tooltip:wi(t.tooltip)}))}toJson(){var t;const r=(t=this.tooltip.body)==null?void 0:t.filter(n=>n.type!=="first").map(n=>n.toJson());return _(S({},super.toJson()),{tooltip:r})}render(t){const r=Se.createBox(new Ar,this.body);if(!r)return null;const n=new Ar({parent:t,mathstyle:"displaystyle"},{fontSize:Co}),i=gl(Pa(new Ue(this.tooltip.render(n),{classes:"ML__tooltip-content"}),n)),a=new Ue([i,r],{classes:"ML__tooltip-container"});return this.caret&&(a.caret=this.caret),this.bind(t,a)}},li=class Dp extends Se{constructor(t,r){super(_(S({},r),{type:"operator",isFunction:r==null?void 0:r.isFunction})),this.value=t,this.variant=r==null?void 0:r.variant,this.variantStyle=r==null?void 0:r.variantStyle,this.subsupPlacement=r==null?void 0:r.limits}static fromJson(t){return new Dp(t.symbol,t)}toJson(){const t=super.toJson();return this.variant&&(t.variant=this.variant),this.variantStyle&&(t.variantStyle=this.variantStyle),this.subsupPlacement&&(t.limits=this.subsupPlacement),this.value&&(t.symbol=this.value),t}render(t){var r;const n=new Ue(this.value,{type:"op",mode:"math",maxFontSize:t.scalingFactor,style:{variant:this.variant,variantStyle:this.variantStyle},isSelected:this.isSelected,letterShapeStyle:t.letterShapeStyle});let i=n;if(this.superscript||this.subscript){const a=(r=this.subsupPlacement)!=null?r:"auto";i=a==="over-under"||a==="auto"&&t.isDisplayStyle?this.attachLimits(t,{base:n}):this.attachSupsub(t,{base:n})}return new Ue(this.bind(t,i),{type:"op",caret:this.caret,isSelected:this.isSelected,classes:"op-group"}).wrap(t)}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const r=le(this.command,this.mode);if(r!=null&&r.serialize)return r.serialize(this,t);const n=[this.command];return this.explicitSubsupPlacement&&(this.subsupPlacement==="over-under"&&n.push("\\limits"),this.subsupPlacement==="adjacent"&&n.push("\\nolimits"),this.subsupPlacement==="auto"&&n.push("\\displaylimits")),n.push(this.supsubToLatex(t)),kr(n)}};function wi(e){if(A(e))return e.map(n=>wi(n));if(typeof e=="string")return Se.fromJson(e);e=S({},e);for(const n of Go)e[n]&&(e[n]=wi(e[n]));e.args&&(e.args=Bl(e.args)),e.array&&(e.array=wi(e.array));const t=e.type;let r;t==="accent"&&(r=Cl.fromJson(e)),t==="array"&&(r=jr.fromJson(e)),t==="box"&&(r=eo.fromJson(e)),t==="chem"&&(r=T.fromJson(e)),t==="composition"&&(r=Ed.fromJson(e)),t==="delim"&&(r=te.fromJson(e)),t==="enclose"&&(r=qe.fromJson(e)),t==="error"&&(r=$o.fromJson(e)),t==="extensible-symbol"&&(r=mn.fromJson(e)),t==="genfrac"&&(r=cr.fromJson(e)),t==="group"&&(r=kd.fromJson(e)),t==="latex"&&(r=Tt.fromJson(e)),t==="latexgroup"&&(r=br.fromJson(e)),t==="leftright"&&(r=cn.fromJson(e)),t==="macro"&&(r=l.fromJson(e)),t==="macro-argument"&&(r=c.fromJson(e)),t==="operator"&&(r=li.fromJson(e)),t==="overlap"&&(r=yr.fromJson(e)),t==="overunder"&&(r=Hr.fromJson(e)),t==="placeholder"&&(r=Ta.fromJson(e)),t==="prompt"&&(r=f.fromJson(e)),t==="phantom"&&(r=Bn.fromJson(e)),t==="sizeddelim"&&(r=He.fromJson(e)),t==="spacing"&&(r=xi.fromJson(e)),t==="subsup"&&(r=m.fromJson(e)),t==="surd"&&(r=Wi.fromJson(e)),t==="text"&&(r=Ms.fromJson(e)),t==="tooltip"&&(r=ga.fromJson(e)),r||(console.assert(!t||["first","mbin","mrel","mclose","minner","mop","mopen","mord","mpunct","root","space"].includes(t),`MathLive 0.98.5: an unexpected atom type "${t}" was encountered. Add new atom constructors to \`fromJson()\` in "atom.ts"`),r=Se.fromJson(e));for(const n of Go)e[n]&&r.setChildren(e[n],n);return e.verbatimLatex!==void 0&&(r.verbatimLatex=e.verbatimLatex),e.subsupPlacement&&(r.subsupPlacement=e.subsupPlacement),e.explicitSubsupPlacement&&(r.explicitSubsupPlacement=!0),e.isFunction&&(r.isFunction=!0),e.isExtensibleSymbol&&(r.isExtensibleSymbol=!0),e.skipBoundary&&(r.skipBoundary=!0),e.captureSelection&&(r.captureSelection=!0),r}function Bl(e){if(e&&Array.isArray(e))return e.map(t=>t==="<null>"?null:typeof t=="object"&&"group"in t?{group:t.group.map(r=>wi(r))}:typeof t=="object"&&"atoms"in t?t.atoms.map(r=>wi(r)):t)}var ea={main:["Main-Regular","ML__cmr"],"main-italic":["Main-Italic","ML__cmr ML__it"],"main-bold":["Main-Bold","ML__cmr ML__bold"],"main-bolditalic":["Main-BoldItalic","ML__cmr ML__bold ML__it"],normal:["Main-Regular","ML__cmr"],"normal-bold":["Main-Bold","ML__mathbf"],"normal-italic":["Math-Italic","ML__mathit"],"normal-bolditalic":["Math-BoldItalic","ML__mathbfit"],ams:["AMS-Regular","ML__ams"],"ams-bold":["AMS-Regular","ML__ams"],"ams-italic":["AMS-Regular","ML__ams"],"ams-bolditalic":["AMS-Regular","ML__ams"],"sans-serif":["SansSerif-Regular","ML__sans"],"sans-serif-bold":["SansSerif-Regular","ML__sans ML__bold"],"sans-serif-italic":["SansSerif-Regular","ML__sans"],"sans-serif-bolditalic":["SansSerif-Regular","ML__sans"],calligraphic:["Caligraphic-Regular","ML__cal"],"calligraphic-bold":["Caligraphic-Regular","ML__cal ML__bold"],"calligraphic-italic":["Caligraphic-Regular","ML__cal ML__it"],"calligraphic-bolditalic":["Caligraphic-Regular","ML__cal ML__bold ML__it"],script:["Script-Regular","ML__script"],"script-bold":["Script-Regular","ML__script ML__bold"],"script-italic":["Script-Regular","ML__script ML__it"],"script-bolditalic":["Script-Regular","ML__script ML__bold ML__it"],fraktur:["Fraktur-Regular","ML__frak"],"fraktur-bold":["Fraktur-Regular","ML__frak"],"fraktur-italic":["Fraktur-Regular","ML__frak"],"fraktur-bolditalic":["Fraktur-Regular","ML__frak"],monospace:["Typewriter-Regular","ML__tt"],"monospace-bold":["Typewriter-Regular","ML__tt ML__bold"],"monospace-italic":["Typewriter-Regular","ML__tt ML__it"],"monospace-bolditalic":["Typewriter-Regular","ML__tt ML__bold ML__it"],"double-struck":["AMS-Regular","ML__bb"],"double-struck-bold":["AMS-Regular","ML__bb"],"double-struck-italic":["AMS-Regular","ML__bb"],"double-struck-bolditalic":["AMS-Regular","ML__bb"]},To={"double-struck":/^[A-Z ]$/,script:/^[A-Z ]$/,calligraphic:/^[\dA-Z ]$/,fraktur:/^[\dA-Za-z ]$|^[!"#$%&'()*+,\-./:;=?[]^]$/,monospace:/^[\dA-Za-z ]$|^[!"&'()*+,\-./:;=?@[\]^_~\u0131\u0237\u0393\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A8\u03A9]$/,"sans-serif":/^[\dA-Za-z ]$|^[!"&'()*+,\-./:;=?@[\]^_~\u0131\u0237\u0393\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A8\u03A9]$/},ks=/^[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5]$/,Jo=/^[\u0393|\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A6\u03A8\u03A9]$/,Il=[/^[a-z]$/,/^[A-Z]$/,ks,Jo],$l={iso:["it","it","it","it"],tex:["it","it","it","up"],french:["it","up","up","up"],upright:["up","up","up","up"]},Dd=class extends Ai{constructor(){super("math")}createAtom(e,t,r){var n,i,a,s;if(t===null)return new Se({type:"mord",mode:"math",command:e,value:e,style:r});const u=window.MathfieldElement.isFunction((n=t.command)!=null?n:e);if(t.definitionType==="symbol"){const h=new Se({type:(i=t.type)!=null?i:"mord",mode:"math",command:(a=t.command)!=null?a:e,value:String.fromCodePoint(t.codepoint),style:r});return u&&(h.isFunction=!0),e.startsWith("\\")&&(h.verbatimLatex=e),h}const d=new Se({type:"mord",mode:"math",command:(s=t.command)!=null?s:e,value:e,style:r});return u&&(d.isFunction=!0),e.startsWith("\\")&&(d.verbatimLatex=e),d}serialize(e,t){const r=J0(e,_(S({},t),{defaultMode:"math"}));return r.length===0||t.defaultMode!=="text"?r:["$ ",...r," $"]}getFont(e,t){console.assert(t.variant!==void 0);let{variant:r}=t,{variantStyle:n}=t;r==="normal"&&!n&&/[\u00A3\u0131\u0237]/.test(e.value)&&(r="main",n="italic"),r==="normal"&&!n&&e.value.length===1&&Il.forEach((u,d)=>{var h;u.test(e.value)&&$l[(h=t.letterShapeStyle)!=null?h:"tex"][d]==="it"&&(n="italic")}),n==="up"&&(n=void 0);const i=n?r+"-"+n:r;console.assert(ea[i]!==void 0);const[a,s]=ea[i];return To[r]&&!To[r].test(e.value)?(e.value=Oe(e.value,r,n),null):(ks.test(e.value)&&(e.classes+=" lcGreek"),s&&(e.classes+=" "+s),a)}};function J0(e,t){const{parent:r}=e[0],n=Ds(r);return Hi(e,"variant").map(i=>{const a=Ds(i[0]);let s="";a&&a!==n&&(s={calligraphic:"\\mathcal",fraktur:"\\mathfrak","double-struck":"\\mathbb",script:"\\mathscr",monospace:"\\mathtt","sans-serif":"\\mathsf",normal:"\\mathrm","normal-italic":"\\mathnormal","normal-bold":"\\mathbf","normal-bolditalic":"\\mathbfit",ams:"","ams-italic":"\\mathit","ams-bold":"\\mathbf","ams-bolditalic":"\\mathbfit",main:"","main-italic":"\\mathit","main-bold":"\\mathbf","main-bolditalic":"\\mathbfit"}[a],console.assert(s!==void 0));const u=kr(i.map(d=>d._serialize(t)));return s?sn(s,u):u})}function Ds(e){if(!e)return"";const{style:t}=e;if(t.variant===void 0)return"";let r=t.variant;return!["calligraphic","fraktur","double-struck","script","monospace","sans-serif"].includes(t.variant)&&t.variantStyle&&t.variantStyle!=="up"&&(r+="-"+t.variantStyle),r}new Dd;function Y0(e,t){return e.map(r=>r._serialize(t))}function Ad(e,t){return Hi(e,"fontShape").map(r=>{const n=Y0(r,t),{fontShape:i}=r[0].style;let a="";return i==="it"&&(a="\\textit"),i==="sl"&&(a="\\textsl"),i==="sc"&&(a="\\textsc"),i==="n"&&(a="\\textup"),!a&&i?`{${sn("\\fontshape",i)}${kr(n)}}`:a?sn(a,kr(n)):kr(n)})}function Nc(e,t){return Hi(e,"fontSeries").map(r=>{const n=Ad(r,t),{fontSeries:i}=r[0].style;let a="";return i==="b"&&(a="\\textbf"),i==="l"&&(a="\\textlf"),i==="m"&&(a="\\textmd"),i&&!a?`{${sn("\\fontseries",i)}${kr(n)}}`:a?sn(a,kr(n)):kr(n)})}function Tl(e,t){return Hi(e,"fontSize").map(r=>{var n,i;const a=Nc(r,t),s=(i=["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][(n=r[0].style.fontSize)!=null?n:""])!=null?i:"";return s?`${s} ${kr(a)}`:kr(a)})}function Ld(e,t,r){return Hi(e,"fontFamily").map(n=>{var i,a;const s=Tl(n,t),u=(a={roman:"textrm",monospace:"texttt","sans-serif":"textsf"}[(i=n[0].style.fontFamily)!=null?i:""])!=null?a:"";return u?`\\${u}{${kr(s)}}`:n[0].style.fontFamily?`{\\fontfamily{${n[0].style.fontFamily}} ${kr(s)}}`:r?`\\text{${kr(s)}}`:kr(s)})}var Pl={roman:"","sans-serif":"ML__sans",monospace:"ML__tt"},Fc=class extends Ai{constructor(){super("text")}createAtom(e,t,r){return t&&t.definitionType==="symbol"?new Ms(e,String.fromCodePoint(t.codepoint),r!=null?r:{}):null}serialize(e,t){return Ld(e,_(S({},t),{defaultMode:"text"}),t.defaultMode!=="text")}getFont(e,t){var r,n,i,a,s;const{fontFamily:u}=t;if(Pl[u]?e.classes+=" "+Pl[u]:u&&e.setStyle("font-family",u),t.fontShape&&(e.classes+=" ",e.classes+=(r={it:"ML__it",sl:"ML__shape_sl",sc:"ML__shape_sc",ol:"ML__shape_ol"}[t.fontShape])!=null?r:""),t.fontSeries){const d=t.fontSeries.match(/(.?[lbm])?(.?[cx])?/);d&&(e.classes+=" ",e.classes+=(i={ul:"ML__series_ul",el:"ML__series_el",l:"ML__series_l",sl:"ML__series_sl",m:"",sb:"ML__series_sb",b:"ML__bold",eb:"ML__series_eb",ub:"ML__series_ub"}[(n=d[1])!=null?n:""])!=null?i:"",e.classes+=" ",e.classes+=(s={uc:"ML__series_uc",ec:"ML__series_ec",c:"ML__series_c",sc:"ML__series_sc",n:"",sx:"ML__series_sx",x:"ML__series_x",ex:"ML__series_ex",ux:"ML__series_ux"}[(a=d[2])!=null?a:""])!=null?s:"")}return"Main-Regular"}};new Fc;var Q0=class extends Ai{constructor(){super("latex")}createAtom(e){return new Tt(e)}serialize(e,t){return e.filter(r=>r instanceof Tt&&!r.isSuggestion).map(r=>r.value)}getFont(){return null}};new Q0;var As={id:"dvorak",locale:"en",displayName:"Dvorak",virtualLayout:"dvorak",platform:"",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["x","X","\u2248","\u02DB"],KeyC:["j","J","\u2206","\xD4"],KeyD:["e","E","\xB4","\xB4"],KeyE:[".",">","\u2265","\u02D8"],KeyF:["u","U","\xA8","\xA8"],KeyG:["i","I","\u02C6","\u02C6"],KeyH:["d","D","\u2202","\xCE"],KeyI:["c","C","\xE7","\xC7"],KeyJ:["h","H","\u02D9","\xD3"],KeyK:["t","T","\u2020","\u02C7"],KeyL:["n","N","\u02DC","\u02DC"],KeyM:["m","M","\xB5","\xC2"],KeyN:["b","B","\u222B","\u0131"],KeyO:["r","R","\xAE","\u2030"],KeyP:["l","L","\xAC","\xD2"],KeyQ:["'",'"',"\xE6","\xC6"],KeyR:["p","P","\u03C0","\u220F"],KeyS:["o","O","\xF8","\xD8"],KeyT:["y","Y","\xA5","\xC1"],KeyU:["g","G","\xA9","\u02DD"],KeyV:["k","K","\u02DA","\uF8FF"],KeyW:[",","<","\u2264","\xAF"],KeyX:["q","Q","\u0153","\u0152"],KeyY:["f","F","\u0192","\xCF"],KeyZ:[";",":","\u2026","\xDA"],Digit1:["1","!","\xA1","\u2044"],Digit2:["2","@","\u2122","\u20AC"],Digit3:["3","#","\xA3","\u2039"],Digit4:["4","$","\xA2","\u203A"],Digit5:["5","%","\u221E","\uFB01"],Digit6:["6","^","\xA7","\uFB02"],Digit7:["7","&","\xB6","\u2021"],Digit8:["8","*","\u2022","\xB0"],Digit9:["9","(","\xAA","\xB7"],Digit0:["0",")","\xBA","\u201A"],Space:[" "," "," "," "],Minus:["[","{","\u201C","\u201D"],Equal:["]","}","\u2018","\u2019"],BracketLeft:["/","?","\xF7","\xBF"],BracketRight:["=","+","\u2260","\xB1"],Backslash:["\\","|","\xAB","\xBB"],Semicolon:["s","S","\xDF","\xCD"],Quote:["-","_","\u2013","\u2014"],Backquote:["`","~","`","`"],Comma:["w","W","\u2211","\u201E"],Period:["v","V","\u221A","\u25CA"],Slash:["z","Z","\u03A9","\xB8"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[".",".",".","."],IntlBackslash:["\xA7","\xB1","\xA7","\xB1"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}},Ls={id:"apple.en-intl",displayName:"English (international)",virtualLayout:"qwerty",platform:"apple",locale:"en",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\u222B","\u0131"],KeyC:["c","C","\xE7","\xC7"],KeyD:["d","D","\u2202","\xCE"],KeyE:["e","E","\xB4","\xB4"],KeyF:["f","F","\u0192","\xCF"],KeyG:["g","G","\xA9","\u02DD"],KeyH:["h","H","\u02D9","\xD3"],KeyI:["i","I","\u02C6","\u02C6"],KeyJ:["j","J","\u2206","\xD4"],KeyK:["k","K","\u02DA","\uF8FF"],KeyL:["l","L","\xAC","\xD2"],KeyM:["m","M","\xB5","\xC2"],KeyN:["n","N","\u02DC","\u02DC"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\u0153","\u0152"],KeyR:["r","R","\xAE","\u2030"],KeyS:["s","S","\xDF","\xCD"],KeyT:["t","T","\u2020","\u02C7"],KeyU:["u","U","\xA8","\xA8"],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\u2211","\u201E"],KeyX:["x","X","\u2248","\u02DB"],KeyY:["y","Y","\xA5","\xC1"],KeyZ:["z","Z","\u03A9","\xB8"],Digit1:["1","!","\xA1","\u2044"],Digit2:["2","@","\u2122","\u20AC"],Digit3:["3","#","\xA3","\u2039"],Digit4:["4","$","\xA2","\u203A"],Digit5:["5","%","\u221E","\uFB01"],Digit6:["6","^","\xA7","\uFB02"],Digit7:["7","&","\xB6","\u2021"],Digit8:["8","*","\u2022","\xB0"],Digit9:["9","(","\xAA","\xB7"],Digit0:["0",")","\xBA","\u201A"],Space:[" "," "," "," "],Minus:["-","_","\u2013","\u2014"],Equal:["=","+","\u2260","\xB1"],BracketLeft:["[","{","\u201C","\u201D"],BracketRight:["]","}","\u2018","\u2019"],Backslash:["\\","|","\xAB","\xBB"],Semicolon:[";",":","\u2026","\xDA"],Quote:["'",'"',"\xE6","\xC6"],Backquote:["`","\u02DC","`","`"],Comma:[",","<","\u2264","\xAF"],Period:[".",">","\u2265","\u02D8"],Slash:["/","?","\xF7","\xBF"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[".",".",".","."],IntlBackslash:["\xA7","\xB1","\xA7","\xB1"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}},zf={id:"windows.en-intl",displayName:"English (international)",platform:"windows",virtualLayout:"qwerty",locale:"en",score:0,mapping:{KeyA:["a","A","\xE1","\xC1"],KeyB:["b","B","",""],KeyC:["c","C","\xA9","\xA2"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\xE9","\xC9"],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","\xED","\xCD"],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","\xF8","\xD8"],KeyM:["m","M","\xB5",""],KeyN:["n","N","\xF1","\xD1"],KeyO:["o","O","\xF3","\xD3"],KeyP:["p","P","\xF6","\xD6"],KeyQ:["q","Q","\xE4","\xC4"],KeyR:["r","R","\xAE",""],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\xFE","\xDE"],KeyU:["u","U","\xFA","\xDA"],KeyV:["v","V","",""],KeyW:["w","W","\xE5","\xC5"],KeyX:["x","X","",""],KeyY:["y","Y","\xFC","\xDC"],KeyZ:["z","Z","\xE6","\xC6"],Digit1:["1","!","\xA1","\xB9"],Digit2:["2","@","\xB2",""],Digit3:["3","#","\xB3",""],Digit4:["4","$","\xA4","\xA3"],Digit5:["5","%","\u20AC",""],Digit6:["6","^","\xBC",""],Digit7:["7","&","\xBD",""],Digit8:["8","*","\xBE",""],Digit9:["9","(","\u2018",""],Digit0:["0",")","\u2019",""],Space:[" "," ","",""],Minus:["-","_","\xA5",""],Equal:["=","+","\xD7","\xF7"],BracketLeft:["[","{","\xAB",""],BracketRight:["]","}","\xBB",""],Backslash:["\\","|","\xAC","\xA6"],Semicolon:[";",":","\xB6","\xB0"],Quote:["'",'"',"\xB4","\xA8"],Backquote:["`","~","",""],Comma:[",","<","\xE7","\xC7"],Period:[".",">","",""],Slash:["/","?","\xBF",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["\\","|","",""]}},Kf={id:"linux.en",displayName:"English",platform:"linux",virtualLayout:"qwerty",locale:"en",score:0,mapping:{KeyA:["a","A","a","A"],KeyB:["b","B","b","B"],KeyC:["c","C","c","C"],KeyD:["d","D","d","D"],KeyE:["e","E","e","E"],KeyF:["f","F","f","F"],KeyG:["g","G","g","G"],KeyH:["h","H","h","H"],KeyI:["i","I","i","I"],KeyJ:["j","J","j","J"],KeyK:["k","K","k","K"],KeyL:["l","L","l","L"],KeyM:["m","M","m","M"],KeyN:["n","N","n","N"],KeyO:["o","O","o","O"],KeyP:["p","P","p","P"],KeyQ:["q","Q","q","Q"],KeyR:["r","R","r","R"],KeyS:["s","S","s","S"],KeyT:["t","T","t","T"],KeyU:["u","U","u","U"],KeyV:["v","V","v","V"],KeyW:["w","W","w","W"],KeyX:["x","X","x","X"],KeyY:["y","Y","y","Y"],KeyZ:["z","Z","z","Z"],Digit1:["1","!","1","!"],Digit2:["2","@","2","@"],Digit3:["3","#","3","#"],Digit4:["4","$","4","$"],Digit5:["5","%","5","%"],Digit6:["6","^","6","^"],Digit7:["7","&","7","&"],Digit8:["8","*","8","*"],Digit9:["9","(","9","("],Digit0:["0",")","0",")"],Space:[" "," "," "," "],Minus:["-","_","-","_"],Equal:["=","+","=","+"],BracketLeft:["[","{","[","{"],BracketRight:["]","}","]","}"],Backslash:["\\","|","\\","|"],Semicolon:[";",":",";",":"],Quote:["'",'"',"'",'"'],Backquote:["`","~","`","~"],Comma:[",","<",",","<"],Period:[".",">",".",">"],Slash:["/","?","/","?"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}},$p={id:"apple.french",locale:"fr",displayName:"French",platform:"apple",virtualLayout:"azerty",score:0,mapping:{KeyA:["q","Q","\u2021","\u03A9"],KeyB:["b","B","\xDF","\u222B"],KeyC:["c","C","\xA9","\xA2"],KeyD:["d","D","\u2202","\u2206"],KeyE:["e","E","\xEA","\xCA"],KeyF:["f","F","\u0192","\xB7"],KeyG:["g","G","\uFB01","\uFB02"],KeyH:["h","H","\xCC","\xCE"],KeyI:["i","I","\xEE","\xEF"],KeyJ:["j","J","\xCF","\xCD"],KeyK:["k","K","\xC8","\xCB"],KeyL:["l","L","\xAC","|"],KeyM:[",","?","\u221E","\xBF"],KeyN:["n","N","~","\u0131"],KeyO:["o","O","\u0153","\u0152"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["a","A","\xE6","\xC6"],KeyR:["r","R","\xAE","\u201A"],KeyS:["s","S","\xD2","\u2211"],KeyT:["t","T","\u2020","\u2122"],KeyU:["u","U","\xBA","\xAA"],KeyV:["v","V","\u25CA","\u221A"],KeyW:["z","Z","\xC2","\xC5"],KeyX:["x","X","\u2248","\u2044"],KeyY:["y","Y","\xDA","\u0178"],KeyZ:["w","W","\u2039","\u203A"],Digit1:["&","1","\uF8FF","\xB4"],Digit2:["\xE9","2","\xEB","\u201E"],Digit3:['"',"3","\u201C","\u201D"],Digit4:["'","4","\u2018","\u2019"],Digit5:["(","5","{","["],Digit6:["\xA7","6","\xB6","\xE5"],Digit7:["\xE8","7","\xAB","\xBB"],Digit8:["!","8","\xA1","\xDB"],Digit9:["\xE7","9","\xC7","\xC1"],Digit0:["\xE0","0","\xF8","\xD8"],Space:[" "," "," "," "],Minus:[")","\xB0","}","]"],Equal:["-","_","\u2014","\u2013"],BracketLeft:["^","\xA8","\xF4","\xD4"],BracketRight:["$","*","\u20AC","\xA5"],Backslash:["`","\xA3","@","#"],Semicolon:["m","M","\xB5","\xD3"],Quote:["\xF9","%","\xD9","\u2030"],Backquote:["<",">","\u2264","\u2265"],Comma:[";",".","\u2026","\u2022"],Period:[":","/","\xF7","\\"],Slash:["=","+","\u2260","\xB1"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",".",",","."],IntlBackslash:["@","#","\u2022","\u0178"],NumpadEqual:["=","=","=","="]}},Tp={id:"windows.french",locale:"fr",displayName:"French",virtualLayout:"azerty",platform:"windows",score:0,mapping:{KeyA:["q","Q","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:[",","?","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["a","A","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["z","Z","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["w","W","",""],Digit1:["&","1","",""],Digit2:["\xE9","2","~",""],Digit3:['"',"3","#",""],Digit4:["'","4","{",""],Digit5:["(","5","[",""],Digit6:["-","6","|",""],Digit7:["\xE8","7","`",""],Digit8:["_","8","\\",""],Digit9:["\xE7","9","^",""],Digit0:["\xE0","0","@",""],Space:[" "," ","",""],Minus:[")","\xB0","]",""],Equal:["=","+","}",""],BracketLeft:["^","\xA8","",""],BracketRight:["$","\xA3","\xA4",""],Backslash:["*","\xB5","",""],Semicolon:["m","M","",""],Quote:["\xF9","%","",""],Backquote:["\xB2","","",""],Comma:[";",".","",""],Period:[":","/","",""],Slash:["!","\xA7","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}},Pp={id:"linux.french",locale:"fr",displayName:"French",virtualLayout:"azerty",platform:"linux",score:0,mapping:{KeyA:["q","Q","@","\u03A9"],KeyB:["b","B","\u201D","\u2019"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\xA2"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0309","\u031B"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:[",","?","\u0301","\u030B"],KeyN:["n","N","n","N"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["a","A","\xE6","\xC6"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201C","\u2018"],KeyW:["z","Z","\xAB","<"],KeyX:["x","X","\xBB",">"],KeyY:["y","Y","\u2190","\xA5"],KeyZ:["w","W","\u0142","\u0141"],Digit1:["&","1","\xB9","\xA1"],Digit2:["\xE9","2","~","\u215B"],Digit3:['"',"3","#","\xA3"],Digit4:["'","4","{","$"],Digit5:["(","5","[","\u215C"],Digit6:["-","6","|","\u215D"],Digit7:["\xE8","7","`","\u215E"],Digit8:["_","8","\\","\u2122"],Digit9:["\xE7","9","^","\xB1"],Digit0:["\xE0","0","@","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:[")","\xB0","]","\xBF"],Equal:["=","+","}","\u0328"],BracketLeft:["\u0302","\u0308","\u0308","\u030A"],BracketRight:["$","\xA3","\xA4","\u0304"],Backslash:["*","\xB5","\u0300","\u0306"],Semicolon:["m","M","\xB5","\xBA"],Quote:["\xF9","%","\u0302","\u030C"],Backquote:["\xB2","~","\xAC","\xAC"],Comma:[";",".","\u2500","\xD7"],Period:[":","/","\xB7","\xF7"],Slash:["!","\xA7","\u0323","\u0307"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"]}},Rp={id:"apple.german",locale:"de",displayName:"German",virtualLayout:"qwertz",platform:"apple",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\u222B","\u2039"],KeyC:["c","C","\xE7","\xC7"],KeyD:["d","D","\u2202","\u2122"],KeyE:["e","E","\u20AC","\u2030"],KeyF:["f","F","\u0192","\xCF"],KeyG:["g","G","\xA9","\xCC"],KeyH:["h","H","\xAA","\xD3"],KeyI:["i","I","\u2044","\xDB"],KeyJ:["j","J","\xBA","\u0131"],KeyK:["k","K","\u2206","\u02C6"],KeyL:["l","L","@","\uFB02"],KeyM:["m","M","\xB5","\u02D8"],KeyN:["n","N","~","\u203A"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\xAB","\xBB"],KeyR:["r","R","\xAE","\xB8"],KeyS:["s","S","\u201A","\xCD"],KeyT:["t","T","\u2020","\u02DD"],KeyU:["u","U","\xA8","\xC1"],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\u2211","\u201E"],KeyX:["x","X","\u2248","\xD9"],KeyY:["z","Z","\u03A9","\u02C7"],KeyZ:["y","Y","\xA5","\u2021"],Digit1:["1","!","\xA1","\xAC"],Digit2:["2",'"',"\u201C","\u201D"],Digit3:["3","\xA7","\xB6","#"],Digit4:["4","$","\xA2","\xA3"],Digit5:["5","%","[","\uFB01"],Digit6:["6","&","]","^"],Digit7:["7","/","|","\\"],Digit8:["8","(","{","\u02DC"],Digit9:["9",")","}","\xB7"],Digit0:["0","=","\u2260","\xAF"],Space:[" "," "," "," "],Minus:["\xDF","?","\xBF","\u02D9"],Equal:["\xB4","`","'","\u02DA"],BracketLeft:["\xFC","\xDC","\u2022","\xB0"],BracketRight:["+","*","\xB1","\uF8FF"],Backslash:["#","'","\u2018","\u2019"],Semicolon:["\xF6","\xD6","\u0153","\u0152"],Quote:["\xE4","\xC4","\xE6","\xC6"],Backquote:["<",">","\u2264","\u2265"],Comma:[",",";","\u221E","\u02DB"],Period:[".",":","\u2026","\xF7"],Slash:["-","_","\u2013","\u2014"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",",",".","."],IntlBackslash:["^","\xB0","\u201E","\u201C"],NumpadEqual:["=","=","=","="]}},Op={id:"windows.german",locale:"de",displayName:"German",platform:"windows",virtualLayout:"qwertz",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","\xB5",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","@",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["z","Z","",""],KeyZ:["y","Y","",""],Digit1:["1","!","",""],Digit2:["2",'"',"\xB2",""],Digit3:["3","\xA7","\xB3",""],Digit4:["4","$","",""],Digit5:["5","%","",""],Digit6:["6","&","",""],Digit7:["7","/","{",""],Digit8:["8","(","[",""],Digit9:["9",")","]",""],Digit0:["0","=","}",""],Space:[" "," ","",""],Minus:["\xDF","?","\\","\u1E9E"],Equal:["\xB4","`","",""],BracketLeft:["\xFC","\xDC","",""],BracketRight:["+","*","~",""],Backslash:["#","'","",""],Semicolon:["\xF6","\xD6","",""],Quote:["\xE4","\xC4","",""],Backquote:["^","\xB0","",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","|",""]}},Np={id:"linux.german",locale:"de",displayName:"German",platform:"windows",virtualLayout:"qwertz",score:0,mapping:{KeyA:["a","A","\xE6","\xC6"],KeyB:["b","B","\u201C","\u2018"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\u20AC"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0323","\u0307"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:["m","M","\xB5","\xBA"],KeyN:["n","N","\u201D","\u2019"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["q","Q","@","\u03A9"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\u017F","\u1E9E"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201E","\u201A"],KeyW:["w","W","\u0142","\u0141"],KeyX:["x","X","\xAB","\u2039"],KeyY:["z","Z","\u2190","\xA5"],KeyZ:["y","Y","\xBB","\u203A"],Digit1:["1","!","\xB9","\xA1"],Digit2:["2",'"',"\xB2","\u215B"],Digit3:["3","\xA7","\xB3","\xA3"],Digit4:["4","$","\xBC","\xA4"],Digit5:["5","%","\xBD","\u215C"],Digit6:["6","&","\xAC","\u215D"],Digit7:["7","/","{","\u215E"],Digit8:["8","(","[","\u2122"],Digit9:["9",")","]","\xB1"],Digit0:["0","=","}","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:["\xDF","?","\\","\xBF"],Equal:["\u0301","\u0300","\u0327","\u0328"],BracketLeft:["\xFC","\xDC","\u0308","\u030A"],BracketRight:["+","*","~","\xAF"],Backslash:["#","'","\u2019","\u0306"],Semicolon:["\xF6","\xD6","\u030B","\u0323"],Quote:["\xE4","\xC4","\u0302","\u030C"],Backquote:["\u0302","\xB0","\u2032","\u2033"],Comma:[",",";","\xB7","\xD7"],Period:[".",":","\u2026","\xF7"],Slash:["-","_","\u2013","\u2014"],PrintScreen:["","","",""],PageUp:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["","1","","1"],Numpad2:["","2","","2"],Numpad3:["","3","","3"],Numpad4:["","4","","4"],Numpad5:["","5","","5"],Numpad6:["","6","","6"],Numpad7:["","7","","7"],Numpad8:["","8","","8"],Numpad9:["","9","","9"],Numpad0:["","0","","0"],NumpadDecimal:["",",","",","],IntlBackslash:["<",">","|","\u0331"],AltRight:["\r","\r","\r","\r"],MetaRight:[".",".",".","."]}},Fp={id:"apple.spanish",locale:"es",displayName:"Spanish ISO",platform:"apple",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\xDF",""],KeyC:["c","C","\xA9"," "],KeyD:["d","D","\u2202","\u2206"],KeyE:["e","E","\u20AC","\u20AC"],KeyF:["f","F","\u0192","\uFB01"],KeyG:["g","G","\uF8FF","\uFB02"],KeyH:["h","H","\u2122"," "],KeyI:["i","I"," "," "],KeyJ:["j","J","\xB6","\xAF"],KeyK:["k","K","\xA7","\u02C7"],KeyL:["l","L"," ","\u02D8"],KeyM:["m","M","\xB5","\u02DA"],KeyN:["n","N"," ","\u02D9"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\u0153","\u0152"],KeyR:["r","R","\xAE"," "],KeyS:["s","S","\u222B"," "],KeyT:["t","T","\u2020","\u2021"],KeyU:["u","U"," "," "],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\xE6","\xC6"],KeyX:["x","X","\u2211","\u203A"],KeyY:["y","Y","\xA5"," "],KeyZ:["z","Z","\u03A9","\u2039"],Digit1:["1","!","|","\u0131"],Digit2:["2",'"',"@","\u02DD"],Digit3:["3","\xB7","#","\u2022"],Digit4:["4","$","\xA2","\xA3"],Digit5:["5","%","\u221E","\u2030"],Digit6:["6","&","\xAC"," "],Digit7:["7","/","\xF7","\u2044"],Digit8:["8","(","\u201C","\u2018"],Digit9:["9",")","\u201D","\u2019"],Digit0:["0","=","\u2260","\u2248"],Space:[" "," "," "," "],Minus:["'","?","\xB4","\xB8"],Equal:["\xA1","\xBF","\u201A","\u02DB"],BracketLeft:["`","^","[","\u02C6"],BracketRight:["+","*","]","\xB1"],Backslash:["\xE7","\xC7","}","\xBB"],Semicolon:["\xF1","\xD1","~","\u02DC"],Quote:["\xB4","\xA8","{","\xAB"],Backquote:["<",">","\u2264","\u2265"],Comma:[",",";","\u201E",""],Period:[".",":","\u2026","\u2026"],Slash:["-","_","\u2013","\u2014"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[",",",",",",","],IntlBackslash:["\xBA","\xAA","\\","\xB0"]}},zp={id:"windows.spanish",locale:"es",displayName:"Spanish",platform:"windows",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["z","Z","",""],Digit1:["1","!","|",""],Digit2:["2",'"',"@",""],Digit3:["3","\xB7","#",""],Digit4:["4","$","~",""],Digit5:["5","%","\u20AC",""],Digit6:["6","&","\xAC",""],Digit7:["7","/","",""],Digit8:["8","(","",""],Digit9:["9",")","",""],Digit0:["0","=","",""],Space:[" "," ","",""],Minus:["'","?","",""],Equal:["\xA1","\xBF","",""],BracketLeft:["`","^","[",""],BracketRight:["+","*","]",""],Backslash:["\xE7","\xC7","}",""],Semicolon:["\xF1","\xD1","",""],Quote:["\xB4","\xA8","{",""],Backquote:["\xBA","\xAA","\\",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}},Kp={id:"linux.spanish",locale:"es",displayName:"Spanish",platform:"linux",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","\xE6","\xC6"],KeyB:["b","B","\u201D","\u2019"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\xA2"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0309","\u031B"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:["m","M","\xB5","\xBA"],KeyN:["n","N","n","N"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["q","Q","@","\u03A9"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201C","\u2018"],KeyW:["w","W","\u0142","\u0141"],KeyX:["x","X","\xBB",">"],KeyY:["y","Y","\u2190","\xA5"],KeyZ:["z","Z","\xAB","<"],Digit1:["1","!","|","\xA1"],Digit2:["2",'"',"@","\u215B"],Digit3:["3","\xB7","#","\xA3"],Digit4:["4","$","~","$"],Digit5:["5","%","\xBD","\u215C"],Digit6:["6","&","\xAC","\u215D"],Digit7:["7","/","{","\u215E"],Digit8:["8","(","[","\u2122"],Digit9:["9",")","]","\xB1"],Digit0:["0","=","}","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:["'","?","\\","\xBF"],Equal:["\xA1","\xBF","\u0303","~"],BracketLeft:["\u0300","\u0302","[","\u030A"],BracketRight:["+","*","]","\u0304"],Backslash:["\xE7","\xC7","}","\u0306"],Semicolon:["\xF1","\xD1","~","\u030B"],Quote:["\u0301","\u0308","{","{"],Backquote:["\xBA","\xAA","\\","\\"],Comma:[",",";","\u2500","\xD7"],Period:[".",":","\xB7","\xF7"],Slash:["-","_","\u0323","\u0307"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadEnter:["\r","\r","\r","\r"],Numpad1:["","1","","1"],Numpad2:["","2","","2"],Numpad3:["","3","","3"],Numpad4:["","4","","4"],Numpad5:["","5","","5"],Numpad6:["","6","","6"],Numpad7:["","7","","7"],Numpad8:["","8","","8"],Numpad9:["","9","","9"],Numpad0:["","0","","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}};function Hf(e){const t=e.split("+"),r={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:t.pop()};return t.includes("shift")&&(r.shift=!0),t.includes("alt")&&(r.alt=!0),t.includes("ctrl")&&(r.ctrl=!0),t.includes("cmd")&&(r.cmd=!0),t.includes("win")&&(r.win=!0),t.includes("meta")&&(r.meta=!0),r}function Rl(e){let t="";return e.shift&&(t+="shift+"),e.alt&&(t+="alt+"),e.ctrl&&(t+="ctrl+"),e.cmd&&(t+="cmd+"),e.win&&(t+="win+"),e.meta&&(t+="meta+"),t+e.key}var Hp={enter:"[Enter]",escape:"[Escape]",backspace:"[Backspace]",tab:"[Tab]",space:"[Space]",pausebreak:"[Pause]",insert:"[Insert]",home:"[Home]",pageup:"[PageUp]",delete:"[Delete]",end:"[End]",pagedown:"[PageDown]",right:"[ArrowRight]",left:"[ArrowLeft]",down:"[ArrowDown]",up:"[ArrowUp]",numpad0:"[Numpad0]",numpad1:"[Numpad1]",numpad2:"[Numpad2]",numpad3:"[Numpad3]",numpad4:"[Numpad4]",numpad5:"[Numpad5]",numpad6:"[Numpad6]",numpad7:"[Numpad7]",numpad8:"[Numpad8]",numpad9:"[Numpad9]",numpad_divide:"[NumpadDivide]",numpad_multiply:"[NumpadMultiply]",numpad_subtract:"[NumpadSubtract]",numpad_add:"[NumpadAdd]",numpad_decimal:"[NumpadDecimal]",numpad_separator:"[NumpadComma]",capslock:"[Capslock]",f1:"[F1]",f2:"[F2]",f3:"[F3]",f4:"[F4]",f5:"[F5]",f6:"[F6]",f7:"[F7]",f8:"[F8]",f9:"[F9]",f10:"[F10]",f11:"[F11]",f12:"[F12]",f13:"[F13]",f14:"[F14]",f15:"[F15]",f16:"[F16]",f17:"[F17]",f18:"[F18]",f19:"[F19]"},zc=[],Kc;function ef(){switch(Qe()){case"macos":case"ios":return"apple";case"windows":return"windows"}return"linux"}function ta(e){(!e.platform||e.platform===ef())&&zc.push(e)}function Wp(e,t){var r;const n={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:""};if(!e)return n;for(const[i,a]of Object.entries(t.mapping)){if(a[0]===e)return n.key=`[${i}]`,n;if(a[1]===e)return n.shift=!0,n.key=`[${i}]`,n;if(a[2]===e)return n.alt=!0,n.key=`[${i}]`,n;if(a[3]===e)return n.shift=!0,n.alt=!0,n.key=`[${i}]`,n}return n.key=(r=Hp[e])!=null?r:"",n}function Vp(e){if(e.code)return e;const t=Object.entries(Hc().mapping);let r=!1,n=!1,i="";for(let a=0;a<4;a++){for(const[s,u]of t)if(u[a]===e.key){i=s,a===3?(r=!0,n=!0):a===2?r=!0:a===1&&(n=!0);break}if(i)break}return new KeyboardEvent(e.type,_(S({},e),{altKey:r,shiftKey:n,code:i}))}function Zp(e){var t,r;if(!e||e.key==="Unidentified"||e.key==="Dead")return;const n=e.shiftKey&&e.altKey?3:e.altKey?2:e.shiftKey?1:0;for(const i of zc)((t=i.mapping[e.code])==null?void 0:t[n])===e.key?i.score+=1:(r=i.mapping[e.code])!=null&&r[n]&&(i.score=0);zc.sort((i,a)=>a.score-i.score)}function jp(e){Kc=zc.find(t=>e.startsWith(t.locale))}function Hc(){return Kc!=null?Kc:zc[0]}function Up(){switch(ef()){case"apple":return Ls;case"windows":return zf;case"linux":return Kf}return Ls}switch(ef()){case"apple":ta(Ls),ta($p),ta(Fp),ta(Rp);break;case"windows":ta(zf),ta(Tp),ta(zp),ta(Op);break;case"linux":ta(Kf),ta(Pp),ta(Kp),ta(Np);break}ta(As);function tf(e){var t;const r=/macos|ios/.test(Qe()),n=e.split("+");let i="";for(const a of n)i&&(i+=r?"\u2009":'<span class="ML__shortcut-join">+</span>'),a.startsWith("[Key")?i+=a.slice(4,5):a.startsWith("Key")?i+=a.slice(3,4):a.startsWith("[Digit")?i+=a.slice(6,7):a.startsWith("Digit")?i+=a.slice(5,6):i+=(t={cmd:"\u2318",meta:r?"\u2318":"Ctrl",shift:r?"\u21E7":"Shift",alt:r?"\u2325":"Alt",ctrl:r?"\u2303":"Ctrl","\n":r?"\u23CE":"Return","[return]":r?"\u23CE":"Return","[enter]":r?"\u2324":"Enter","[tab]":r?"\u21E5":"Tab","[escape]":"Esc","[backspace]":r?"\u232B":"Backspace","[delete]":r?"\u2326":"Del","[pageup]":r?"\u21DE":"Page Up","[pagedown]":r?"\u21DF":"Page Down","[home]":r?"\u2912":"Home","[end]":r?"\u2913":"End","[space]":"Space","[equal]":"=","[minus]":"-","[comma]":",","[slash]":"/","[backslash]":"\\","[bracketleft]":"[","[bracketright]":"]",semicolon:";",period:".",comma:",",minus:"-",equal:"=",quote:"'",backslash:"\\",intlbackslash:"\\",backquote:"`",slash:"/",numpadmultiply:"* &#128290;",numpaddivide:"/ &#128290;",numpadsubtract:"- &#128290;",numpadadd:"+ &#128290;",numpaddecimal:". &#128290;",numpadcomma:", &#128290;",help:"help",left:"\u21E0",up:"\u21E1",right:"\u21E2",down:"\u21E3","[arrowleft]":"\u21E0","[arrowup]":"\u21E1","[arrowright]":"\u21E2","[arrowdown]":"\u21E3"}[a.toLowerCase()])!=null?t:a.toUpperCase();return i}function Bd(e){if(e instanceof MouseEvent||e instanceof PointerEvent)return{x:e.clientX,y:e.clientY};if(e instanceof TouchEvent){const t=[...e.touches].reduce((n,i)=>({x:n.x+i.clientX,y:n.y+i.clientY}),{x:0,y:0}),r=e.touches.length;return{x:t.x/r,y:t.y/r}}}function Bs(e){const t={alt:!1,control:!1,shift:!1,meta:!1};return(e instanceof MouseEvent||e instanceof PointerEvent||e instanceof TouchEvent||e instanceof KeyboardEvent)&&(e.altKey&&(t.alt=!0),e.ctrlKey&&(t.control=!0),e.metaKey&&(t.meta=!0),e.shiftKey&&(t.shift=!0)),t}function Gp(e,t){return!e&&t||e&&!t?!1:!e||!t?!0:e.alt===t.alt&&e.control===t.control&&e.shift===t.shift&&e.meta===t.meta}var qp=new Set(["Backquote","Digit0","Digit1","Digit2","Digit3","Digit4","Digit5","Digit6","Digit7","Digit8","Digit9","Minus","Equal","IntlYen","KeyQ","KeyW","KeyE","KeyR","KeyT","KeyY","KeyU","KeyI","KeyO","KeyP","BracketLeft","BracketRight","Backslash","KeyA","KeyS","KeyD","KeyF","KeyG","KeyH","KeyJ","KeyK","KeyL","Semicolon","Quote","IntlBackslash","KeyZ","KeyX","KeyC","KeyV","KeyB","KeyN","KeyM","Comma","Period","Slash","IntlRo","Space","Numpad0","Numpad1","Numpad2","Numpad3","Numpad4","Numpad5","Numpad6","Numpad7","Numpad8","Numpad9","NumpadAdd","NumpadComma","NumpadDecimal","NumpadDivide","NumpadEqual","NumpadHash","NumpadMultiply","NumpadParenLeft","NumpadParenRight","NumpadStar","NumpadSubstract"]);function Id(e){return e.ctrlKey||e.metaKey||["Dead","Process"].includes(e.key)?!1:e.code===""?!0:qp.has(e.code)}function $d(){var e;let t=document.activeElement;for(;(e=t==null?void 0:t.shadowRoot)!=null&&e.activeElement;)t=t.shadowRoot.activeElement;return t}var ro=class No{static get scrim(){return No._scrim||(No._scrim=new No),No._scrim}static open(t){No.scrim.open(t)}static close(){No.scrim.close()}static get state(){return No.scrim.state}static get element(){return No.scrim.element}constructor(t){var r,n;this.lightDismiss=(r=t==null?void 0:t.lightDismiss)!=null?r:!0,this.translucent=(n=t==null?void 0:t.translucent)!=null?n:!1,this.state="closed"}get element(){if(this._element)return this._element;const t=document.createElement("div");return t.setAttribute("role","presentation"),t.style.position="fixed",t.style.contain="content",t.style.top="0",t.style.left="0",t.style.right="0",t.style.bottom="0",t.style.zIndex="var(--scrim-zindex, 10099)",t.style.outline="none",this.translucent?(t.style.background="rgba(255, 255, 255, .2)",t.style.backdropFilter="contrast(40%)"):t.style.background="transparent",this._element=t,t}open(t){var r;if(this.state!=="closed")return;this.state="opening",this.onDismiss=t==null?void 0:t.onDismiss,this.savedActiveElement=$d();const{element:n}=this;((r=t==null?void 0:t.root)!=null?r:document.body).appendChild(n),n.addEventListener("click",this),document.addEventListener("touchmove",this,!1),document.addEventListener("scroll",this,!1);const i=window.innerWidth-document.documentElement.clientWidth;this.savedMarginRight=document.body.style.marginRight,this.savedOverflow=document.body.style.overflow,document.body.style.overflow="hidden";const a=Number.parseFloat(getComputedStyle(document.body).marginRight);document.body.style.marginRight=`${a+i}px`,t!=null&&t.child&&n.append(t.child),this.state="open"}close(){var t,r,n,i;if(this.state!=="open"){console.assert(this.element.parentElement!==null);return}this.state="closing",typeof this.onDismiss=="function"&&this.onDismiss(),this.onDismiss=void 0;const{element:a}=this;a.removeEventListener("click",this),document.removeEventListener("touchmove",this,!1),document.removeEventListener("scroll",this,!1),a.remove(),document.body.style.overflow=(t=this.savedOverflow)!=null?t:"",document.body.style.marginRight=(r=this.savedMarginRight)!=null?r:"",$d()!==this.savedActiveElement&&((i=(n=this.savedActiveElement)==null?void 0:n.focus)==null||i.call(n)),a.innerHTML="",this.state="closed"}handleEvent(t){this.lightDismiss&&(t.target===this._element&&t.type==="click"?(this.close(),t.preventDefault(),t.stopPropagation()):t.target===document&&(t.type==="touchmove"||t.type==="scroll")&&(this.close(),t.preventDefault(),t.stopPropagation()))}};function Xp(e,t,r){let n=null,i=null,a=!1,s=!1,u=!1;const d=new AbortController,h=d.signal;return e.addEventListener("keydown",p=>{if(a||p.key==="Process"||p.code==="CapsLock"||/(Control|Meta|Alt|Shift)(Left|Right)/.test(p.code)){n=null;return}n=p,i=null,r.onKeystroke(p)?e.textContent="":n=null},{capture:!0,signal:h}),e.addEventListener("keypress",p=>{a||(n&&i&&r.onKeystroke(n),i=p)},{capture:!0,signal:h}),e.addEventListener("compositionstart",p=>{e.textContent="",a=!0,r.onCompositionStart(p.data)},{capture:!0,signal:h}),e.addEventListener("compositionupdate",p=>{a&&r.onCompositionUpdate(p.data)},{capture:!0,signal:h}),e.addEventListener("compositionend",p=>{e.textContent="",a&&(a=!1,r.onCompositionEnd(p.data))},{capture:!0,signal:h}),e.addEventListener("beforeinput",p=>p.stopImmediatePropagation(),{signal:h}),e.addEventListener("input",p=>{var y;if(!a&&(e.textContent="",p.inputType!=="insertCompositionText")){if(p.inputType==="insertFromPaste"){p.preventDefault(),p.stopPropagation();return}r.onInput((y=p.data)!=null?y:""),p.preventDefault(),p.stopPropagation()}},{signal:h}),e.addEventListener("paste",p=>{e.focus({preventScroll:!0}),e.textContent="",r.onPaste(p)||p.preventDefault(),p.stopImmediatePropagation()},{signal:h}),e.addEventListener("cut",p=>r.onCut(p),{capture:!0,signal:h}),e.addEventListener("copy",p=>r.onCopy(p),{capture:!0,signal:h}),e.addEventListener("blur",p=>{var y,M;if(((M=(y=p.relatedTarget)==null?void 0:y._mathfield)==null?void 0:M.element)===t){e.focus({preventScroll:!0}),p.preventDefault(),p.stopPropagation();return}const B=ro.state;if(B==="open"||B==="opening"){p.preventDefault(),p.stopPropagation();return}if(p.relatedTarget===p.target.getRootNode().host){p.preventDefault(),p.stopPropagation();return}u||s||(u=!0,n=null,i=null,r.onBlur(),u=!1)},{capture:!0,signal:h}),e.addEventListener("focus",p=>{u||s||(s=!0,r.onFocus(),s=!1)},{capture:!0,signal:h}),{dispose:()=>d.abort(),cancelComposition:()=>{a&&(e.blur(),requestAnimationFrame(()=>e.focus({preventScroll:!0})))},blur:()=>{typeof e.blur=="function"&&e.blur()},focus:()=>{!s&&typeof e.focus=="function"&&e.focus({preventScroll:!0})},hasFocus:()=>$d()===e,setAriaLabel:p=>e.setAttribute("aria-label",p),setValue:p=>{var y;e.textContent=p,e.style.left="-1000px",(y=window.getSelection())==null||y.selectAllChildren(e)},moveTo:(p,y)=>{e.style.top=`${y}px`,e.style.left=`${p}px`}}}function Ol(e){var t;if(!e||!Id(e))return"";let r;return e.key==="Unidentified"&&e.target&&(r=e.target.value),r=(t=r!=null?r:e.key)!=null?t:e.code,/^(Dead|Return|Enter|Tab|Escape|Delete|PageUp|PageDown|Home|End|Help|ArrowLeft|ArrowRight|ArrowUp|ArrowDown)$/.test(r)&&(r=""),r}function Wf(e){e=Vp(e);const t=[];return e.ctrlKey&&t.push("ctrl"),e.metaKey&&t.push("meta"),e.altKey&&t.push("alt"),e.shiftKey&&t.push("shift"),t.length===0?`[${e.code}]`:(t.push(`[${e.code}]`),t.join("+"))}function Jp(e){if(Ne()){const t=Qe(),r=e.startsWith("!"),n=e.endsWith(t);if(r&&!n||!r&&n)return!0}return e==="!other"?!1:e==="other"}function Yp(e,t,r){if(e.length===0)return"";const n=Rl(Hf(Wf(r))),i=Rl({key:r.key,shift:r.shiftKey,alt:r.altKey,ctrl:r.ctrlKey,meta:r.metaKey||r.ctrlKey&&/macos|ios/.test(Qe()),cmd:!1,win:!1});for(let a=e.length-1;a>=0;a--)if((e[a].key===n||e[a].key===i)&&(!e[a].ifMode||e[a].ifMode===t))return e[a].command;return""}function Vf(e){let t=e;return A(t)&&(t=t.length>0?t[0]+"("+t.slice(1).join("")+")":""),t}function Qp(e,t){let r=[];if(typeof t=="string"){const a=ud[t];A(a)?r=a.slice():a&&r.push(a)}const n=Vf(t),i=new RegExp("^"+n.replace("\\","\\\\").replace("|","\\|").replace("*","\\*").replace("$","\\$").replace("^","\\^")+"([^*a-zA-Z]|$)");for(const a of e)i.test(Vf(a.command))&&r.push(a.key);return r.map(tf)}function em(e,t){if(e.ifPlatform&&!/^!?(macos|windows|android|ios|chromeos|other)$/.test(e.ifPlatform))throw new Error(`Unexpected platform "${e.ifPlatform}" for keybinding ${e.key}`);if(e.ifLayout!==void 0&&(t.score===0||!e.ifLayout.includes(t.id)))return;const r=Hf(e.key);let n=e.ifPlatform;if(r.cmd){if(n&&n!=="macos"&&n!=="ios")throw new Error('Unexpected "cmd" modifier with platform "'+n+`"
"cmd" modifier can only be used with macOS or iOS platform.`);n||(n=Qe()==="ios"?"ios":"macos"),r.win=!1,r.cmd=!1,r.meta=!0}if(r.win){if(n&&n!=="windows")throw new Error('Unexpected "win" modifier with platform "'+n+`"
"win" modifier can only be used with Windows platform.`);n="windows",r.win=!1,r.cmd=!1,r.meta=!0}if(n&&!Jp(n))return;if(/^\[.+\]$/.test(r.key))return _(S({},e),{key:Rl(r)});const i=Wp(r.key,t);if(!i)return _(S({},e),{key:Rl(r)});if(i.shift&&r.shift||i.alt&&r.alt)throw new Error(`The keybinding ${e.key} (${rf(e.command)}) is conflicting with the key combination ${Rl(i)} using the ${t.displayName} keyboard layout`);return i.shift=i.shift||r.shift,i.alt=i.alt||r.alt,i.meta=r.meta,i.ctrl=r.ctrl,_(S({},e),{key:Rl(i)})}function rf(e){if(Array.isArray(e)){const t=[...e];return t.shift()+"("+t.map(r=>typeof r=="string"?`"${r}"`:r.toString()).join(", ")+")"}return e}function tm(e,t){const r=[],n=[];for(const i of e)try{const a=em(i,t);if(!a)continue;const s=n.find(u=>u.key===a.key&&u.ifMode===a.ifMode);if(s)throw new Error(`Ambiguous key binding ${i.key} (${rf(i.command)}) matches ${s.key} (${rf(s.command)}) with the ${t.displayName} keyboard layout`);n.push(a)}catch(a){a instanceof Error&&r.push(a.message)}return[n,r]}var rm=class extends Qr{constructor(){super("latex")}createAtom(e){return new Tt(e)}onPaste(e,t){if(!t)return!1;const r=typeof t=="string"?t:t.getData("application/x-latex")||t.getData("text/plain");return r&&e.model.contentWillChange({inputType:"insertFromPaste",data:r})?(e.stopCoalescingUndo(),e.stopRecording(),this.insert(e.model,r)&&(e.startRecording(),e.snapshot("paste"),e.model.contentDidChange({inputType:"insertFromPaste"}),Sn(e)),e.startRecording(),!0):!1}insert(e,t,r){if(!e.contentWillChange({data:t,inputType:"insertText"}))return!1;r||(r={}),r.insertionMode||(r.insertionMode="replaceSelection"),r.selectionMode||(r.selectionMode="placeholder");const{silenceNotifications:n}=e;r.silenceNotifications&&(e.silenceNotifications=!0);const i=e.silenceNotifications;e.silenceNotifications=!0,r.insertionMode==="replaceSelection"&&!e.selectionIsCollapsed?e.deleteAtoms(Qn(e.selection)):r.insertionMode==="replaceAll"?(e.root.setChildren([],"body"),e.position=0):r.insertionMode==="insertBefore"?e.collapseSelection("backward"):r.insertionMode==="insertAfter"&&e.collapseSelection("forward");const a=[];for(const d of t)ae.test(d)&&a.push(new Tt(d));let s=e.at(e.position);if(s instanceof br&&(s=s.lastChild),!(s.parent instanceof br)){const d=new br("");s.parent.addChildAfter(d,s),s=d.firstChild}const u=s.parent.addChildrenAfter(a,s);return e.silenceNotifications=i,r.selectionMode==="before"||(r.selectionMode==="item"?e.setSelection(e.anchor,e.offsetOf(u)):u&&(e.position=e.offsetOf(u))),e.contentDidChange({data:t,inputType:"insertText"}),e.silenceNotifications=n,!0}};function nm(e){return e.atoms.find(t=>t.type==="latexgroup")}function Wc(e){var t,r;const n=e.atoms.find(i=>i.type==="latexgroup");return n?(r=(t=n.body)==null?void 0:t.filter(i=>i.type==="latex"))!=null?r:[]:[]}function Zf(e,t){var r;let n=0,i=!1;const a=Number.isFinite(t==null?void 0:t.before)?(r=t==null?void 0:t.before)!=null?r:0:e.lastOffset;for(;n<=a&&!i;){const d=e.at(n);i=d instanceof Tt&&d.isSuggestion,i||n++}if(!i)return[void 0,void 0];let s=n,u=!1;for(;s<=a&&!u;){const d=e.at(s);u=!(d instanceof Tt&&d.isSuggestion),u||s++}return[n-1,s-1]}new rm;function Td(e){const t=Wc(e.model).filter(r=>r.isSuggestion);if(t.length!==0){e.model.position=e.model.offsetOf(t[0].leftSibling);for(const r of t)r.parent.removeChild(r)}}function Vc(e,t){var r;const{model:n}=e;Td(e);for(const p of Wc(n))p.isError=!1;if(!n.selectionIsCollapsed||e.options.popoverPolicy==="off"){Fl(e);return}const i=[];let a=n.at(n.position);for(;a&&a instanceof Tt&&/^[a-zA-Z\*]$/.test(a.value);)a=a.leftSibling;if(a&&a instanceof Tt&&a.value==="\\")for(i.push(a),a=a.rightSibling;a&&a instanceof Tt&&/^[a-zA-Z\*]$/.test(a.value);)i.push(a),a=a.rightSibling;const s=i.map(p=>p.value).join(""),u=ie(e,s);if(u.length===0){if(/^\\[a-zA-Z\*]+$/.test(s))for(const p of i)p.isError=!0;Fl(e);return}const d=(r=t==null?void 0:t.atIndex)!=null?r:0;e.suggestionIndex=d<0?u.length-1:d%u.length;const h=u[e.suggestionIndex];if(h!==s){const p=i[i.length-1];p.parent.addChildrenAfter([...h.slice(s.length-h.length)].map(y=>new Tt(y,{isSuggestion:!0})),p),Is(e,{interactive:!0})}am(e,u)}function jf(e){const[t,r]=Zf(e,{before:e.position});if(t===void 0||r===void 0)return!1;let n=!1;return e.getAtoms([t,r]).forEach(i=>{i.isSuggestion&&(i.isSuggestion=!1,n=!0)}),n}function Nl(e,t="accept",r){var n,i;Fl(e);const a=nm(e.model);if(!a)return!1;if(t==="accept-suggestion"||t==="accept-all"){const h=Wc(e.model).filter(p=>p.isSuggestion);if(h.length!==0){for(const p of h)p.isSuggestion=!1;e.model.position=e.model.offsetOf(h[h.length-1])}if(t==="accept-suggestion")return h.length!==0}const u=Wc(e.model).filter(h=>!h.isSuggestion).map(h=>h.value).join(""),d=a.leftSibling;return a.parent.removeChild(a),e.model.position=e.model.offsetOf(d),e.switchMode((n=r==null?void 0:r.mode)!=null?n:"math"),t==="reject"||(Qr.insert(e.model,u,{selectionMode:(i=r==null?void 0:r.selectItem)!=null&&i?"item":"placeholder",format:"latex",mode:"math"}),e.snapshot(),e.model.announce("replacement"),e.switchMode("math")),!0}function Pd(e){var t;let r=document.getElementById(e);return r?r.dataset.refcount=Number(Number.parseInt((t=r.dataset.refcount)!=null?t:"0")+1).toString():(r=document.createElement("div"),r.setAttribute("aria-hidden","true"),r.dataset.refcount="1",r.id=e,document.body.append(r)),r}function nf(e){var t;const r=document.getElementById(e);if(!r)return;const n=Number.parseInt((t=r.getAttribute("data-refcount"))!=null?t:"0");n<=1?r.remove():r.dataset.refcount=Number(n-1).toString()}function im(e,t){const r=new Ar({from:e.context}),n=new Se({mode:"math",type:"root",body:b(t,{context:r})}),i=gl(Pa(new Ue(n.render(r),{classes:"ML__base"}),r));return vl(i,{classes:"ML__latex"}).toMarkup()}function am(e,t){var r;if(t.length===0){Fl(e);return}let n="";for(const[a,s]of t.entries()){const u=s,d=im(e,s),h=Qp(e.keybindings,u).join("<br>");n+=`<li role="button" data-command="${u}" ${a===e.suggestionIndex?"class=ML__popover__current":""}><span class="ML__popover__latex">${u}</span><span class="ML__popover__command">${d}</span>`,h&&(n+=`<span class="ML__popover__keybinding">${h}</span>`),n+="</li>"}const i=om(e,`<ul>${n}</ul>`);af()&&((r=i.querySelector(".ML__popover__current"))==null||r.scrollIntoView({block:"nearest",inline:"nearest"})),setTimeout(()=>{var a;i&&!af()&&(i.classList.add("is-visible"),Rd(e),(a=i.querySelector(".ML__popover__current"))==null||a.scrollIntoView({block:"nearest",inline:"nearest"}))},32)}function af(){const e=document.getElementById("mathlive-suggestion-popover");return e?e.classList.contains("is-visible"):!1}function Rd(e,t){var r;if(!e.element||e.element.mathfield!==e||!af())return;if(((r=e.model.at(e.model.position))==null?void 0:r.type)!=="latex"){Fl(e);return}if(t!=null&&t.deferred){setTimeout(()=>Rd(e),32);return}const n=Sl(e.field);if(!n)return;const i=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,a=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,s=window.innerWidth-document.documentElement.clientWidth,u=window.innerHeight-document.documentElement.clientHeight,d=window.mathVirtualKeyboard.boundingRect.height,h=document.getElementById("mathlive-suggestion-popover");n.x+h.offsetWidth/2>a-s?h.style.left=`${a-h.offsetWidth-s}px`:n.x-h.offsetWidth/2<0?h.style.left="0":h.style.left=`${n.x-h.offsetWidth/2}px`;const p=n.y-n.height;i-u-d-n.y<p?(h.classList.add("ML__popover--reverse-direction"),h.classList.remove("top-tip"),h.classList.add("bottom-tip"),h.style.top=`${n.y-n.height-h.offsetHeight-15}px`):(h.classList.remove("ML__popover--reverse-direction"),h.classList.add("top-tip"),h.classList.remove("bottom-tip"),h.style.top=`${n.y+15}px`)}function Fl(e){e.suggestionIndex=0;const t=document.getElementById("mathlive-suggestion-popover");t&&(t.classList.remove("is-visible"),t.innerHTML="")}function om(e,t){let r=document.getElementById("mathlive-suggestion-popover");return r||(r=Pd("mathlive-suggestion-popover"),Yi("suggestion-popover"),Yi("core"),r.addEventListener("pointerdown",n=>n.preventDefault()),r.addEventListener("click",n=>{let i=n.target;for(;i&&!i.dataset.command;)i=i.parentElement;i&&(Nl(e,"reject"),Qr.insert(e.model,i.dataset.command,{selectionMode:"placeholder",format:"latex",mode:"math"}),e.dirty=!0,e.focus())})),r.innerHTML=window.MathfieldElement.createHTML(t),r}function sm(){document.getElementById("mathlive-suggestion-popover")&&(nf("mathlive-suggestion-popover"),pa("suggestion-popover"),pa("core"))}function lm(){const e=String(new Error().stack).replace(/^Error.*\n/,"").split(`
`);if(e.length===0)return console.error(`Can't use relative paths to specify assets location because the sourcefile location could not be determined (unexpected stack trace format "${new Error().stack}").`),"";let t=e[1],r=t.match(/http.*\.ts[\?:]/);return r&&(t=e[2]),r=t.match(/(https?:.*):[0-9]+:[0-9]+/),r||(r=t.match(/at (.*(\.ts))[\?:]/),r||(r=t.match(/at (.*(\.mjs|\.js))[\?:]/))),r?r[1]:(console.error(e),console.error(`Can't use relative paths to specify assets location because the source file location could not be determined (unexpected location "${t}").`),"")}var Od=null,Uf,Gf,of=((Gf=(Uf=globalThis==null?void 0:globalThis.document)==null?void 0:Uf.currentScript)==null?void 0:Gf.src)||lm();function qf(e){return rs(this,null,function*(){if(/^(?:[a-z+]+:)?\/\//i.test(e))return new URL(e).href;if(Od===null)try{const t=yield fetch(of,{method:"HEAD"});t.status===200&&(Od=t.url)}catch(t){console.error(`Invalid URL "${e}" (relative to "${of}")`)}return new URL(e,Od!=null?Od:of).href})}function cm(e,t,r={}){return new FontFace(e,`url(${t}.woff2) format('woff2')`,r)}var ra="not-loaded";function um(){return rs(this,null,function*(){return ra="not-loaded",Nd()})}function Nd(){return rs(this,null,function*(){var e;if(ra!=="not-loaded")return;if(ra="loading",(e=getComputedStyle(document.documentElement).getPropertyValue("--ML__static-fonts"))!=null?e:!1){ra="ready";return}if(document.body.classList.remove("ML__fonts-did-not-load"),"fonts"in document){const r=["KaTeX_Main","KaTeX_Math","KaTeX_AMS","KaTeX_Caligraphic","KaTeX_Fraktur","KaTeX_SansSerif","KaTeX_Script","KaTeX_Typewriter","KaTeX_Size1","KaTeX_Size2","KaTeX_Size3","KaTeX_Size4"],n=Array.from(document.fonts).map(s=>s.family);if(r.every(s=>n.includes(s))){ra="ready";return}if(!window.MathfieldElement.fontsDirectory){ra="not-loaded";return}const i=yield qf(window.MathfieldElement.fontsDirectory);if(!i){document.body.classList.add("ML__fonts-did-not-load"),ra="error";return}const a=[["KaTeX_Main-Regular"],["KaTeX_Main-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_Main-Bold",{weight:"bold"}],["KaTeX_Main-Italic",{style:"italic"}],["KaTeX_Math-Italic",{style:"italic"}],["KaTeX_Math-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_AMS-Regular"],["KaTeX_Caligraphic-Regular"],["KaTeX_Caligraphic-Bold",{weight:"bold"}],["KaTeX_Fraktur-Regular"],["KaTeX_Fraktur-Bold",{weight:"bold"}],["KaTeX_SansSerif-Regular"],["KaTeX_SansSerif-Bold",{weight:"bold"}],["KaTeX_SansSerif-Italic",{style:"italic"}],["KaTeX_Script-Regular"],["KaTeX_Typewriter-Regular"],["KaTeX_Size1-Regular"],["KaTeX_Size2-Regular"],["KaTeX_Size3-Regular"],["KaTeX_Size4-Regular"]].map(s=>cm(s[0].replace(/-[a-zA-Z]+$/,""),`${i}/${s[0]}`,s[1]));try{(yield Promise.all(a.map(u=>{try{return u.load()}catch(d){}}))).forEach(u=>document.fonts.add(u)),ra="ready";return}catch(s){console.error(`MathLive 0.98.5: The math fonts could not be loaded from "${i}"`,{cause:s}),document.body.classList.add("ML__fonts-did-not-load")}ra="error"}})}function dm(e){let t=0;for(let r=0;r<e.length;r++)t=t*31+e.charCodeAt(r),t=t|0;return Math.abs(t)}function Sn(e,t){e&&(e.dirty||(e.dirty=!0,requestAnimationFrame(()=>{Bo(e)&&e.dirty&&(e.atomBoundsCache=new Map,Is(e,t),e.atomBoundsCache=void 0)})))}function fm(e,t){var r;t=t!=null?t:{};const n=new Ar({from:_(S({},e.context),{atomIdsSettings:{seed:t.forHighlighting?dm(Se.serialize([e.model.root],{expandMacro:!1,defaultMode:e.options.defaultMode})):"random",groupNumbers:(r=t.forHighlighting)!=null?r:!1},letterShapeStyle:e.options.letterShapeStyle}),mathstyle:e.options.defaultMode==="inline-math"?"textstyle":"displaystyle"}),i=e.model.root.render(n);return vl(Pa(i,n),{classes:e.hasEditablePrompts?"ML__latex ML__prompting":"ML__latex",attributes:{translate:"no","aria-hidden":"true"}})}function Xf(e,t){const{model:r}=e;r.root.caret=void 0,r.root.isSelected=!1,r.root.containsCaret=!0;for(const i of r.atoms)i.caret=void 0,i.isSelected=!1,i.containsCaret=!1;if(r.selectionIsCollapsed){const i=r.at(r.position);i.caret=e.model.mode;let a=i.parent;for(;a;)a.containsCaret=!0,a=a.parent}else{const i=r.getAtoms(r.selection,{includeChildren:!0});for(const a of i)a.isSelected=!0}return fm(e,t).toMarkup()}function Is(e,t){if(!Bo(e))return;t!=null||(t={});const r=e.element.querySelector("[part=virtual-keyboard-toggle]");r&&(r.style.display=e.hasEditableContent?"":"none");const n=e.field;if(!n)return;const i=e.isSelectionEditable&&e.hasFocus(),a=n.classList.contains("ML__focused");a&&!i?n.classList.remove("ML__focused"):!a&&i&&n.classList.add("ML__focused");let s=Xf(e,t);const u=e.element.querySelector("[part=menu-toggle]");if(u&&(e.model.atoms.length<=1||e.disabled||e.readOnly&&!e.hasEditableContent||e.userSelect==="none"?u.style.display="none":u.style.display=""),e.model.atoms.length<=1){const d=e.options.contentPlaceholder;d&&(s+=`<span part=placeholder class="ML__content-placeholder">${Un(d)}</span>`)}n.innerHTML=window.MathfieldElement.createHTML(s),Fd(e,t.interactive),e.dirty=!1}function Fd(e,t){const r=e.field;if(!r)return;for(const u of r.querySelectorAll(".ML__selection, .ML__contains-highlight"))u.remove();!(t!=null&&t)&&ra!=="error"&&ra!=="ready"&&setTimeout(()=>{ra==="ready"?Fd(e):setTimeout(()=>Fd(e),128)},32);const n=e.model,i=r.offsetWidth,a=r.getBoundingClientRect().width;let s=Math.floor(a)/i;if(s=isNaN(s)?1:s,n.selectionIsCollapsed){Rd(e,{deferred:!0});let u=n.at(n.position);for(;u&&u.type!=="prompt"&&!(u.containsCaret&&u.displayContainsHighlight);)u=u.parent;if(u!=null&&u.containsCaret&&u.displayContainsHighlight){const d=fd(e,Es(e,u),s);if(d){d.left/=s,d.right/=s,d.top/=s,d.bottom/=s;const h=document.createElement("div");h.classList.add("ML__contains-highlight"),h.style.position="absolute",h.style.left=`${d.left+1}px`,h.style.top=`${Math.ceil(d.top)}px`,h.style.width=`${Math.ceil(d.right-d.left)}px`,h.style.height=`${Math.ceil(d.bottom-d.top)}px`,r.insertBefore(h,r.childNodes[0])}}return}for(const u of hm(pd(e,{excludeAtomsWithBackground:!0}))){u.left/=s,u.right/=s,u.top/=s,u.bottom/=s;const d=document.createElement("div");d.classList.add("ML__selection"),d.style.position="absolute",d.style.left=`${u.left}px`,d.style.top=`${u.top}px`,d.style.width=`${Math.ceil(u.right-u.left)}px`,d.style.height=`${Math.ceil(u.bottom-u.top-1)}px`,r.insertBefore(d,r.childNodes[0])}}function hm(e){let t=[];for(const r of e){let n=!1;for(const i of t)if(r.left===i.left&&r.right===i.right&&r.top===i.top&&r.bottom===i.bottom){n=!0;break}n||t.push(r)}e=t,t=[];for(const r of e){let n=0;for(const i of e)if(r.left>=i.left&&r.right<=i.right&&r.top>=i.top&&r.bottom<=i.bottom&&(n+=1,n>1))break;n===1&&t.push(r)}return t}var Jf=3,no;function Vi(e,t){t=S({target:"mathfield",canUndo:!1,audioFeedback:void 0,changeContent:!1,changeSelection:!1},t!=null?t:{}),no||(no={});for(const r of Object.keys(e))console.assert(!no[r],"Selector already defined: ",r),no[r]=_(S({},t),{fn:e[r]})}function sf(e){let t;if(Array.isArray(e)){if(e[0]==="performWithFeedback")return sf(e[1]);t=e[0]}else t=e;return t=t.replace(/-\w/g,r=>r[1].toUpperCase()),no[t]}function zl(e){var t;return(t=sf(e))==null?void 0:t.target}function pm(e,t){var r;if(!t)return!1;let n,i=[],a=!1,s=!1;A(t)?(n=t[0],i=t.slice(1)):n=t,n=n.replace(/-\w/g,h=>h[1].toUpperCase());const u=no[n],d=u==null?void 0:u.target;if(d==="model"){if(!e.isSelectionEditable&&(u!=null&&u.changeContent))return e.model.announce("plonk"),!1;/^(delete|add)/.test(n)&&(n!=="deleteBackward"&&e.flushInlineShortcutBuffer(),e.snapshot(n)),/^complete/.test(n)||Td(e),no[n].fn(e.model,...i),Vc(e),s=!0,a=!0}else if(d==="virtual-keyboard")s=(r=window.mathVirtualKeyboard.executeCommand(t))!=null?r:!1,a=!0;else if(no[n]){if(!e.isSelectionEditable&&(u!=null&&u.changeContent))return e.model.announce("plonk"),!1;/^(undo|redo)/.test(n)&&e.flushInlineShortcutBuffer(),s=no[n].fn(e,...i),a=!0}else throw new Error(`Unknown command "${n}"`);return d!=="virtual-keyboard"&&(!e.model.selectionIsCollapsed||u!=null&&u.changeSelection&&t!=="deleteBackward")&&(e.flushInlineShortcutBuffer(),u!=null&&u.changeContent||e.stopCoalescingUndo(),e.defaultStyle={}),s&&Sn(e),a}function mm(e,t){var r;if(!e)return!1;e.focus(),jh.keypressVibration&&gt()&&navigator.vibrate(Jf);const n=sf(t);window.MathfieldElement.playSound((r=n==null?void 0:n.audioFeedback)!=null?r:"keypress");const i=e.executeCommand(t);return e.scrollIntoView(),i}Vi({performWithFeedback:(e,t)=>mm(e,t)});function gm(e){return Vc(e,{atIndex:e.suggestionIndex+1}),!1}function vm(e){return Vc(e,{atIndex:e.suggestionIndex-1}),!1}Vi({complete:Nl},{target:"mathfield",audioFeedback:"return",canUndo:!0,changeContent:!0,changeSelection:!0}),Vi({nextSuggestion:gm,previousSuggestion:vm},{target:"mathfield",audioFeedback:"keypress",changeSelection:!0});var zd="mathlive#virtual-keyboard-message";function lf(e){var t;return e.type!=="message"?!1:((t=e.data)==null?void 0:t.type)===zd}var bm=class Ap{constructor(){this.targetOrigin=window.origin,this.originValidator="none",this._boundingRect=new DOMRect(0,0,0,0),this._isShifted=!1,window.addEventListener("message",this),this.sendMessage("proxy-created"),this.listeners={}}static get singleton(){return this._singleton||(this._singleton=new Ap),this._singleton}set alphabeticLayout(t){this.sendMessage("update-setting",{alphabeticLayout:t})}set layouts(t){this.sendMessage("update-setting",{layouts:t})}get normalizedLayouts(){return[]}set editToolbar(t){this.sendMessage("update-setting",{editToolbar:t})}set actionKeycap(t){this.sendMessage("update-setting",{actionKeycap:t})}set shiftKeycap(t){this.sendMessage("update-setting",{shiftKeycap:t})}set backspaceKeycap(t){this.sendMessage("update-setting",{backspaceKeycap:t})}set tabKeycap(t){this.sendMessage("update-setting",{tabKeycap:t})}set container(t){throw new Error("Container inside an iframe cannot be changed")}show(t){this.sendMessage("show",t)}hide(t){this.sendMessage("hide",t)}get isShifted(){return this._isShifted}get visible(){return this._boundingRect.height>0}set visible(t){t?this.show():this.hide()}get boundingRect(){return this._boundingRect}executeCommand(t){return this.sendMessage("execute-command",{command:t}),!0}updateToolbar(t){this.sendMessage("update-toolbar",t)}update(t){this.sendMessage("update-setting",t)}connect(){this.sendMessage("connect")}disconnect(){this.sendMessage("disconnect")}addEventListener(t,r,n){this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].has(r)||this.listeners[t].add(r)}dispatchEvent(t){return!this.listeners[t.type]||this.listeners[t.type].size===0?!0:(this.listeners[t.type].forEach(r=>{typeof r=="function"?r(t):r==null||r.handleEvent(t)}),!t.defaultPrevented)}removeEventListener(t,r,n){this.listeners[t]&&this.listeners[t].delete(r)}handleEvent(t){if(lf(t)){if(!Tc(t.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${t.origin}) cannot be handled`,"SecurityError");this.handleMessage(t.data)}}handleMessage(t){const{action:r}=t;if(r==="execute-command"){const{command:n}=t;zl(n)==="virtual-keyboard"&&this.executeCommand(n);return}if(r==="synchronize-proxy"){this._boundingRect=t.boundingRect,this._isShifted=t.isShifted;return}if(r==="geometry-changed"){this._boundingRect=t.boundingRect,this.dispatchEvent(new Event("geometrychange"));return}}sendMessage(t,r={}){if(!window.top)throw new DOMException("A frame does not have access to the top window and can\u2018t communicate with the keyboard. Review virtualKeyboardTargetOrigin and originValidator on mathfields embedded in an iframe","SecurityError");window.top.postMessage(S({type:zd,action:t},r),this.targetOrigin)}},Yf={numeric:{label:"123",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.numeric",rows:[[{latex:"x",shift:"y",variants:["y","z","t","r","x^2","x^n","x^{#?}","x_n","x_i","x_{#?}",{latex:"f(#?)",class:"small"},{latex:"g(#?)",class:"small"}]},{latex:"n",shift:"a",variants:["i","j","p","k","a","u"]},"[separator-5]","[7]","[8]","[9]","[/]","[separator-5]",{latex:"\\exponentialE",shift:"\\ln",variants:["\\exp","\\times 10^{#?}","\\ln","\\log_{10}","\\log"]},{latex:"\\imaginaryI",variants:["\\Re","\\Im","\\imaginaryJ","\\Vert #0 \\Vert"]},{latex:"\\pi",shift:"\\sin",variants:["\\prod",{latex:"\\theta",aside:"theta"},{latex:"\\rho",aside:"rho"},{latex:"\\tau",aside:"tau"},"\\sin","\\cos","\\tan"]}],[{label:"<",latex:"<",class:"hide-shift",shift:{latex:"\\le",label:"\u2264"}},{label:">",latex:">",class:"hide-shift",shift:{latex:"\\ge",label:"\u2265"}},"[separator-5]","[4]","[5]","[6]","[*]","[separator-5]",{class:"hide-shift",latex:"#@^2}",shift:"#@^{\\prime}}"},{latex:"#@^{#0}}",class:"hide-shift",shift:"#@_{#?}"},{class:"hide-shift",latex:"\\sqrt{#0}",shift:{latex:"\\sqrt[#0]{#?}}"}}],["[(]","[)]","[separator-5]","[1]","[2]","[3]","[-]","[separator-5]",{latex:"\\int^{\\infty}_{0}\\!#?\\,\\mathrm{d}x",class:"small hide-shift",shift:"\\int",variants:[{latex:"\\int_{#?}^{#?}",class:"small"},{latex:"\\int",class:"small"},{latex:"\\iint",class:"small"},{latex:"\\iiint",class:"small"},{latex:"\\oint",class:"small"},"\\mathrm{d}x",{latex:"\\dfrac{\\mathrm{d}}{\\mathrm{d} x}",class:"small"},{latex:"\\frac{\\partial}{\\partial x}",class:"small"},"\\partial"]},{class:"hide-shift",latex:"\\forall",shift:"\\exists"},{label:"[backspace]",width:1}],[{label:"[shift]",width:2},"[separator-5]","[0]","[.]","[=]","[+]","[separator-5]","[left]","[right]",{label:"[action]",width:1}]]},greek:{label:"&alpha;&beta;&gamma;",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.greek",rows:[[{label:"<i>&#x03c6;</i>",class:"MLK__tex hide-shift",insert:"\\varphi",aside:"phi var.",shift:"\\Phi"},{label:"<i>&#x03c2;</i>",class:"MLK__tex hide-shift",insert:"\\varsigma",aside:"sigma var.",shift:"\\Sigma"},{label:"<i>&#x03f5;</i>",class:"MLK__tex hide-shift",insert:"\\epsilon",aside:"espilon",shift:'\\char"0190'},{label:"<i>&rho;</i>",class:"MLK__tex hide-shift",insert:"\\rho",aside:"rho",shift:'\\char"3A1'},{label:"<i>&tau;</i>",class:"MLK__tex hide-shift",insert:"\\tau",aside:"tau",shift:'\\char"3A4'},{label:"<i>&upsilon;</i>",class:"MLK__tex hide-shift",insert:"\\upsilon",aside:"upsilon",shift:"\\Upsilon"},{label:"<i>&theta;</i>",class:"MLK__tex hide-shift",insert:"\\theta",aside:"theta",shift:"\\Theta"},{label:"<i>&iota;</i>",class:"MLK__tex hide-shift",insert:"\\iota",aside:"iota",shift:'\\char"399'},{label:"<i>&omicron;</i>",class:"MLK__tex hide-shift",insert:"\\omicron",aside:"omicron",shift:'\\char"39F'},{label:"<i>&pi;</i>",class:"MLK__tex hide-shift",insert:"\\pi",aside:"pi",shift:"\\Pi"}],["[separator-5]",{label:"<i>&alpha;</i>",class:"MLK__tex hide-shift",insert:"\\alpha",aside:"alpha",shift:'\\char"391'},{label:"<i>&sigma;</i>",class:"MLK__tex hide-shift",insert:"\\sigma",aside:"sigma",shift:"\\Sigma"},{label:"<i>&delta;</i>",class:"MLK__tex hide-shift",insert:"\\delta",aside:"delta",shift:"\\Delta"},{latex:"\\phi",class:"MLK__tex hide-shift",insert:"\\phi",aside:"phi",shift:"\\Phi"},{label:"<i>&gamma;</i>",class:"MLK__tex hide-shift",insert:"\\gamma",aside:"gamma",shift:"\\Gamma"},{label:"<i>&eta;</i>",class:"MLK__tex hide-shift",insert:"\\eta",aside:"eta",shift:'\\char"397'},{label:"<i>&xi;</i>",class:"MLK__tex hide-shift",insert:"\\xi",aside:"xi",shift:"\\Xi"},{label:"<i>&kappa;</i>",class:"MLK__tex hide-shift",insert:"\\kappa",aside:"kappa",shift:"\\Kappa"},{label:"<i>&lambda;</i>",class:"MLK__tex hide-shift",insert:"\\lambda",aside:"lambda",shift:"\\Lambda"},"[separator-5]"],["[shift]",{label:"<i>&zeta;</i>",class:"MLK__tex hide-shift",insert:"\\zeta",aside:"zeta",shift:'\\char"396'},{label:"<i>&chi;</i>",class:"MLK__tex hide-shift",insert:"\\chi",aside:"chi",shift:'\\char"3A7'},{label:"<i>&psi;</i>",class:"MLK__tex hide-shift",insert:"\\psi",aside:"zeta",shift:"\\Psi"},{label:"<i>&omega;</i>",class:"MLK__tex hide-shift",insert:"\\omega",aside:"omega",shift:"\\Omega"},{label:"<i>&beta;</i>",class:"MLK__tex hide-shift",insert:"\\beta",aside:"beta",shift:'\\char"392'},{label:"<i>&nu;</i>",class:"MLK__tex hide-shift",insert:"\\nu",aside:"nu",shift:'\\char"39D'},{label:"<i>&mu;</i>",class:"MLK__tex hide-shift",insert:"\\mu",aside:"mu",shift:'\\char"39C'},"[backspace]"],["[separator]",{label:"<i>&#x03b5;</i>",class:"MLK__tex",insert:"\\varepsilon",aside:"espilon var."},{label:"<i>&#x03d1;</i>",class:"MLK__tex",insert:"\\vartheta",aside:"theta var."},{label:"<i>&#x3f0;</i>",class:"MLK__tex",insert:"\\varkappa",aside:"kappa var."},{label:"<i>&#x03d6;</i>",class:"MLK__tex",insert:"\\varpi",aside:"pi var."},{label:"<i>&#x03f1;</i>",class:"MLK__tex",insert:"\\varrho",aside:"rho var."},"[left]","[right]","[action]"]]},symbols:{label:"&infin;\u2260\u2208",labelClass:"MLK__tex",tooltip:"keyboard.tooltip.symbols",rows:[[{latex:"\\sin",shift:"\\sin^{-1}",variants:[{class:"small",latex:"\\sinh"},{class:"small",latex:"\\sin^{-1}"},{class:"small",latex:"\\arsinh"}]},"\\ln",{latex:"\\mathrm{abs}",insert:"\\mathrm{abs}\\left(#0\\right)"},{latex:"\\rarr",shift:"\\rArr",variants:[{latex:"\\implies",aside:"implies"},{latex:"\\to",aside:"to"},"\\dashv",{latex:"\\roundimplies",aside:"round implies"}]},{latex:"\\exists",variants:["\\nexists"],shift:"\\nexists"},{latex:"\\in",shift:"\\notin",variants:["\\notin","\\owns"]},"\\cup",{latex:"\\overrightarrow{#@}",shift:"\\overleftarrow{#@}",variants:["\\overleftarrow{#@}","\\bar{#@}","\\vec{#@}","\\hat{#@}","\\check{#@}","\\dot{#@}","\\ddot{#@}","\\mathring{#@}","\\breve{#@}","\\acute{#@}","\\tilde{#@}","\\grave{#@}"]},{class:"small",latex:"\\lim_{#?}",shift:"\\lim_{x\\to\\infty}",variants:[{class:"small",latex:"\\liminf_{#?}"},{class:"small",latex:"\\limsup_{#?}"}]},"\\exponentialE"],[{latex:"\\cos",shift:"\\cos^{-1}",variants:[{class:"small",latex:"\\cosh"},{class:"small",latex:"\\cos^{-1}"},{class:"small",latex:"\\arcosh"}]},{latex:"\\log",shift:"\\log_{10}",variants:["\\log_{#0}","\\log_{10}"]},"\\left\\vert#0\\right\\vert",{latex:"\\larr",shift:"\\lArr",variants:[{latex:"\\impliedby",aside:"implied by"},{latex:"\\gets",aside:"gets"},"\\lArr","\\vdash",{latex:"\\models",aside:"models"}]},{latex:"\\forall",shift:"\\lnot",variants:[{latex:"\\land",aside:"and"},{latex:"\\lor",aside:"or"},{latex:"\\oplus",aside:"xor"},{latex:"\\lnot",aside:"not"},{latex:"\\downarrow",aside:"nor"},{latex:"\\uparrow",aside:"nand"},{latex:"\\curlywedge",aside:"nor"},{latex:"\\bar\\curlywedge",aside:"nand"}]},{latex:"\\ni",shift:"\\not\\owns"},"\\cap",{latex:"\\overline{#@}",shift:"\\underline{#@}",variants:["\\overbrace{#@}","\\overlinesegment{#@}","\\overleftrightarrow{#@}","\\overrightarrow{#@}","\\overleftarrow{#@}","\\overgroup{#@}","\\underbrace{#@}","\\underlinesegment{#@}","\\underleftrightarrow{#@}","\\underrightarrow{#@}","\\underleftarrow{#@}","\\undergroup{#@}"]},{class:"hide-shift",latex:"\\int",shift:"\\iint",variants:[{latex:"\\int_{#?}^{#?}",class:"small"},{latex:"\\int",class:"small"},{latex:"\\smallint",class:"small"},{latex:"\\iint",class:"small"},{latex:"\\iiint",class:"small"},{latex:"\\oint",class:"small"},"\\intop","\\iiint","\\oiint","\\oiiint","\\intclockwise","\\varointclockwise","\\ointctrclockwise","\\intctrclockwise"]},{latex:"\\pi",shift:"\\tau",variants:["\\tau"]}],[{latex:"\\tan",shift:"\\tan^{-1}",variants:[{class:"small",latex:"\\tanh"},{class:"small",latex:"\\tan^{-1}"},{class:"small",latex:"\\artanh"},{class:"small",latex:"\\arctan"},{class:"small",latex:"\\arctg"},{class:"small",latex:"\\tg"}]},{latex:"\\exp",insert:"\\exp\\left(#0\\right)",variants:["\\exponentialE^{#0}"]},"\\left\\Vert#0\\right\\Vert",{latex:"\\lrArr",shift:"\\leftrightarrow",variants:[{latex:"\\iff",aside:"if and only if"},"\\leftrightarrow","\\leftrightarrows","\\Leftrightarrow",{latex:"^\\biconditional",aside:"biconditional"}]},{latex:"\\vert",shift:"!"},{latex:"#@^{\\complement}",aside:"complement",variants:[{latex:"\\setminus",aside:"set minus"},{latex:"\\smallsetminus",aside:"small set minus"}]},{latex:"\\subset",shift:"\\subseteq",variants:["\\subset","\\subseteq","\\subsetneq","\\varsubsetneq","\\subsetneqq","\\nsubset","\\nsubseteq","\\supset","\\supseteq","\\supsetneq","\\supsetneqq","\\nsupset","\\nsupseteq"]},{latex:"#@^{\\prime}",shift:"#@^{\\doubleprime}",variants:["#@^{\\doubleprime}","#@\\degree"]},{latex:"\\mathrm{d}",shift:"\\partial",variants:["\\mathrm{d}x",{latex:"\\dfrac{\\mathrm{d}}{\\mathrm{d} x}",class:"small"},{latex:"\\frac{\\partial}{\\partial x}",class:"small"},"\\partial"]},{latex:"\\infty",variants:["\\aleph_0","\\aleph_1","\\omega","\\mathfrak{m}"]}],[{label:"[shift]",width:2},{class:"box",latex:",",shift:";",variants:[";","?"]},{class:"box",latex:"\\colon",shift:"\\Colon",variants:[{latex:"\\Colon",aside:"such that",class:"box"},{latex:":",aside:"ratio",class:"box"},{latex:"\\vdots",aside:"",class:"box"},{latex:"\\ddots",aside:"",class:"box"},{latex:"\\ldotp",aside:"low dot",class:"box"},{latex:"\\cdotp",aside:"center dot",class:"box"},{latex:"\\ldots",aside:"low ellipsis",class:"box"},{latex:"\\cdots",aside:"center ellipsis",class:"box"},{latex:"\\therefore",aside:"therefore",class:"box"},{latex:"\\because",aside:"because",class:"box"}]},{class:"box",latex:"\\cdot",aside:"centered dot",shift:"\\ast",variants:["\\circ","\\bigcirc","\\bullet","\\odot","\\oslash","\\circledcirc","\\ast","\\star","\\times","\\doteq","\\doteqdot"]},"[separator]","[left]","[right]",{label:"[backspace]",width:1,class:"action hide-shift"},{label:"[action]",width:1}]]},compact:{label:"compact",rows:[["[+]","[-]","[*]","[/]","[=]","[.]","[(]","[)]","\\sqrt{#0}","#@^{#?}"],["[1]","[2]","[3]","[4]","[5]","[6]","[7]","[8]","[9]","[0]"],["[hr]"],["[undo]","[redo]","[separator]","[separator]","[separator]","[left]","[right]",{label:"[backspace]",class:"action hide-shift"},"[hide-keyboard]"]]},minimalist:{label:"minimalist",layers:[{style:`
.minimalist-backdrop {
display: flex;
justify-content: center;
}
.minimalist-container {
--keycap-height: 40px;
--keycap-max-width: 53px;
--keycap-small-font-size: 12px;
background: var(--keyboard-background);
padding: 20px;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
border: 1px solid var(--keyboard-border);
box-shadow: 0 0 32px rgb(0 0 0 / 30%);
}
`,backdrop:"minimalist-backdrop",container:"minimalist-container",rows:[["+","-","\\times",{latex:"\\frac{#@}{#0}",class:"small"},"=","[.]","(",")",{latex:"\\sqrt{#0}",class:"small"},{latex:"#@^{#?}",class:"small"}],["1","2","3","4","5","6","7","8","9","0"],["[hr]"],["[undo]","[redo]","[separator]","[separator]","[separator]","[left]","[right]",{label:"[backspace]",class:"action hide-shift"},"[hide-keyboard]"]]}]},"numeric-only":{label:"123",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.numeric",id:"numeric-only",rows:[["7","8","9","[separator]",{label:"[backspace]",width:2}],["4","5","6","[separator]","[separator]","[separator]"],["1","2","3","[separator]","[separator]","[separator]"],["0",{label:"[.]",variants:[]},"-","[separator]","[left]","[right]"]]}},Kd={0:["\\varnothing","\\infty"],1:["\\frac{1}{#@}","#@^{-1}","\\times 10^{#?}","\\phi","\\imaginaryI"],2:["\\frac{1}{2}","#@^2","\\sqrt2","\\exponentialE"],3:["\\frac{1}{3}","#@^3","\\sqrt3","\\pi"],4:["\\frac{1}{4}","#@^4"],5:["\\frac{1}{5}","#@^5","\\sqrt5"],6:["\\frac{1}{6}","#@^6"],7:["\\frac{1}{7}","#@^7"],8:["\\frac{1}{8}","#@^8"],9:["\\frac{1}{9}","#@^9"],".":[".",",",";","\\colon"],",":["{,}",".",";","\\colon"],a:[{latex:"\\aleph",aside:"aleph"},{latex:"\\forall",aside:"for all"},"\xE0","\xE1","\xE2","\xE4","\xE6"],b:[{latex:"\\beth",aside:"beth"}],c:[{latex:"\\C",aside:"set of complex numbers"},"\xE7"],d:[{latex:"\\daleth",aside:"daleth"}],e:[{latex:"\\exponentialE",aside:"exponential e"},{latex:"\\exists",aside:"there is"},{latex:"\\nexists",aside:"there isn\u2019t"},"\xE8","\xE9","\xEA","\xEB"],g:[{latex:"\\gimel",aside:"gimel"}],h:[{latex:"\\hbar",aside:"h bar"},{latex:"\\hslash",aside:"h slash"}],i:[{latex:"\\imaginaryI",aside:"imaginary i"},"\xEC","\xED","\xEE","\xEF"],j:[{latex:"\\imaginaryJ",aside:"imaginary j"}],l:[{latex:"\\ell",aside:"ell"}],n:[{latex:"\\mathbb{N}",aside:"set of natural numbers"},"\xF1"],o:["\xF8","\u0153","\xF2","\xF3","\xF4","\xF6","\u0153"],p:[{latex:"\\mathbb{P}",aside:"set of primes"}],q:[{latex:"\\mathbb{Q}",aside:"set of rational numbers"}],r:[{latex:"\\mathbb{R}",aside:"set of real numbers"}],u:["\xF9","\xFA","\xFB","\xFC"],z:[{latex:"\\mathbb{Z}",aside:"set of integers"}],y:["\xFD","\xFF"],space:[{latex:'\\char"203A\\!\\char"2039',insert:"\\!",aside:"negative thin space<br>\u207B\xB3\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\,\\char"2039',insert:"\\,",aside:"thin space<br>\xB3\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\:\\char"2039',insert:"\\:",aside:"medium space<br>\u2074\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\;\\char"2039',insert:"\\;",aside:"thick space<br>\u2075\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\ \\char"2039',insert:"\\ ",aside:"\u2153 em"},{latex:'\\char"203A\\enspace\\char"2039',insert:"\\enspace",aside:"\xBD em"},{latex:'\\char"203A\\quad\\char"2039',insert:"\\quad",aside:"1 em"},{latex:'\\char"203A\\qquad\\char"2039',insert:"\\qquad",aside:"2 em"}]},Zc;function Qf(e,t){var r,n,i;const a=Yo.singleton;if(!a)return;const s=Kl(e),u=(n=(r=a.getKeycap(s==null?void 0:s.id))==null?void 0:r.variants)!=null?n:"";if(typeof u=="string"&&!eh(u)||Array.isArray(u)&&u.length===0){t==null||t();return}const d={};let h="";for(const oe of xm(u)){const Ve=rh(oe),re=Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);d[re]=Ve;const[De,Xe]=Hd(Ve);h+=`<div id=${re} class="item ${Xe}">${De}</div>`}const p=document.createElement("div");p.setAttribute("aria-hidden","true"),p.className="MLK__variant-panel",p.style.height="auto";const y=Object.keys(d).length;let M=5;y===1?M=1:y===2||y===4?M=2:y===3||y===5||y===6?M=3:y>=7&&y<14&&(M=4),p.style.width=`calc(var(--variant-keycap-length) * ${M} + 12px)`,p.innerHTML=jh.createHTML(h),ro.open({root:(i=a==null?void 0:a.container)==null?void 0:i.querySelector(".ML__keyboard"),child:p}),Zc=new AbortController;const{signal:B}=Zc,$=e==null?void 0:e.getBoundingClientRect();if($){$.top-p.clientHeight<0&&(p.style.width="auto",y<=6?p.style.height="56px":y<=12?p.style.height="108px":y<=18?p.style.height="205px":p.classList.add("compact"));const oe=Math.max(0,Math.min(window.innerWidth-p.offsetWidth,($.left+$.right-p.offsetWidth)/2)),Ve=$.top-p.clientHeight+5;p.style.transform=`translate(${oe}px, ${Ve}px)`,p.classList.add("is-visible"),requestAnimationFrame(()=>{p.addEventListener("pointerup",re=>{const De=Kl(re.target);!(De!=null&&De.id)||!d[De.id]||(cf(d[De.id]),jc(),t==null||t(),re.preventDefault())},{capture:!0,passive:!1,signal:B}),p.addEventListener("pointerenter",re=>{const De=Kl(re.target);!(De!=null&&De.id)||!d[De.id]||De.classList.add("is-active")},{capture:!0,signal:B}),p.addEventListener("pointerleave",re=>{const De=Kl(re.target);!(De!=null&&De.id)||!d[De.id]||De.classList.remove("is-active")},{capture:!0,signal:B}),window.addEventListener("pointercancel",()=>{jc(),t==null||t()},{signal:B}),window.addEventListener("pointerup",()=>{jc(),t==null||t()},{signal:B})})}}function jc(){Zc==null||Zc.abort(),Zc=null,ro.state==="open"&&ro.close()}function ym(e){if(e==="foreground-color"){const t=[];for(const r of Object.keys(ne))t.push({class:"swatch-button",label:'<span style="border: 3px solid '+ne[r]+'"></span>',command:["applyStyle",{color:r}]});return t}if(e==="background-color"){const t=[];for(const r of Object.keys(Q))t.push({class:"swatch-button",label:'<span style="background:'+Q[r]+'"></span>',command:["applyStyle",{backgroundColor:r}]});return t}}function eh(e){return Kd[e]!==void 0}function xm(e){var t;return typeof e!="string"?e:(Kd[e]||(Kd[e]=(t=ym(e))!=null?t:[]),Kd[e])}function wm(e){return typeof e=="string"?e:Object.entries(e).map(([t,r])=>`${t}:${r} !important`).join(";")}function Sm(e){return Object.keys(e).map(t=>`${t} {${wm(e[t])}}`).join("")}function Uc(e){if(!e)return"";const t=new Ar,r=new Se({mode:"math",type:"root",body:b(e,{context:t,args:i=>i==="@"?"{\\class{ML__box-placeholder}{\\blacksquare}}":"\\placeholder{}"})}),n=gl(Pa(new Ue(r.render(t),{classes:"ML__base"}),t));return vl(n,{classes:"ML__latex"}).toMarkup()}function Gc(e){var t;if(Array.isArray(e))return e.map(n=>Gc(n)).flat();const r=typeof e=="string"?{markup:e}:e;return"rows"in r&&Array.isArray(r.rows)&&(r.rows=r.rows.map(n=>n.map(i=>rh(i)))),(t=r.id)!=null||(r.id="ML__layer_"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36)),[r]}function _m(){var e,t;let n=window.mathVirtualKeyboard.alphabeticLayout;if(n==="auto"){const u=Hc();u&&(n=u.virtualLayout),(!n||n==="auto")&&(n=(e={fr:"azerty",be:"azerty",al:"qwertz",ba:"qwertz",cz:"qwertz",de:"qwertz",hu:"qwertz",sk:"qwertz",ch:"qwertz"}[Me.locale.slice(0,2)])!=null?e:"qwerty")}const i={qwerty:["qwertyuiop"," asdfghjkl ","^zxcvbnm~"],azerty:["azertyuiop","qsdfghjklm","^ wxcvbn ~"],qwertz:["qwertzuiop"," asdfghjkl ","^yxcvbnm~"],dvorak:["^ pyfgcrl ","aoeuidhtns","qjkxbmwvz~"],colemak:[" qwfpgjluy ","arstdhneio","^zxcvbkm~"]},a=(t=i[n])!=null?t:i.qwerty,s=n==="azerty"?[[{label:"1",variants:"1"},{label:"2",shift:{latex:"\xE9"},variants:"2"},{label:"3",shift:{latex:"\xF9"},variants:"3"},{label:"4",variants:"4"},{label:"5",shift:{label:"(",latex:"("},variants:"5"},{label:"6",shift:{label:")",latex:")"},variants:"6"},{label:"7",shift:{latex:"\xE8"},variants:"7"},{label:"8",shift:{latex:"\xEA"},variants:"8"},{label:"9",shift:{latex:"\xE7"},variants:"9"},{label:"0",shift:{latex:"\xE0"},variants:"0"}]]:[[{label:"1",variants:"1"},{label:"2",variants:"2"},{label:"3",variants:"3"},{label:"4",variants:"4"},{label:"5",shift:{latex:"\\frac{#@}{#?}"},variants:"5"},{label:"6",shift:{latex:"#@^#?"},variants:"6"},{label:"7",variants:"7"},{label:"8",shift:{latex:"\\times"},variants:"8"},{label:"9",shift:{label:"(",latex:"("},variants:"9"},{label:"0",shift:{label:")",latex:")"},variants:"0"}]];for(const u of a){const d=[];for(const h of u)/[a-z]/.test(h)?d.push({label:h,class:"hide-shift",shift:{label:h.toUpperCase()},variants:eh(h)?h:void 0}):h==="~"?n!=="dvorak"?d.push("[backspace]"):d.push({label:"[backspace]",width:1}):h==="^"?d.push("[shift]"):h===" "&&d.push("[separator-5]");s.push(d)}return s.push(["[-]","[+]","[=]",{label:" ",width:1.5},{label:",",shift:";",variants:".",class:"hide-shift"},"[.]","[left]","[right]",{label:"[action]",width:1.5}]),{label:"abc",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.alphabetic",layers:Gc({rows:s})}}function th(e){if(e==="alphabetic")return _m();if(typeof e=="string")return console.assert(Yf[e]!==void 0,`MathLive 0.98.5: unknown keyboard layout "${e}"`),th(Yf[e]);let t;if("rows"in e&&Array.isArray(e.rows)){console.assert(!("layers"in e||"markup"in e),'MathLive 0.98.5: when providing a "rows" property, "layers" and "markup" are ignored');const i=e,{rows:a}=i,s=Ze(i,["rows"]);t=_(S({},s),{layers:Gc({rows:e.rows})})}else if("markup"in e&&typeof e.markup=="string"){const i=e,{markup:a}=i,s=Ze(i,["markup"]);t=_(S({},s),{layers:Gc(e.markup)})}else t=S({},e),"layers"in e?t.layers=Gc(e.layers):console.error('MathLive 0.98.5: provide either a "rows", "markup" or "layers" property');let r=!1,n=!1;for(const i of t.layers)if(i.rows)for(const a of i.rows.flat()){Hl(a)&&(r=!0);const s=a.command;typeof s=="string"&&["undo","redo","cut","copy","paste"].includes(s)&&(n=!0)}return(!("displayShiftedKeycaps"in e)||e.displayShiftedKeycaps===void 0)&&(t.displayShiftedKeycaps=r),(!("displayEditToolbar"in e)||e.displayEditToolbar===void 0)&&(t.displayEditToolbar=!n),t}function Mm(e,t){var r,n;let i='<div class="left">';if(e.normalizedLayouts.length>1)for(const[a,s]of e.normalizedLayouts.entries()){const u=s,d=[a===t?"selected":"layer-switch"];u.tooltip&&d.push("MLK__tooltip"),u.labelClass&&d.push(...u.labelClass.split(" ")),i+=`<div class="${d.join(" ")}"`,u.tooltip&&(i+=" data-tooltip='"+((r=we(u.tooltip))!=null?r:u.tooltip)+"' "),a!==t&&(i+=`data-layer="${u.layers[0].id}"`),i+=`>${(n=u.label)!=null?n:"untitled"}</div>`}return i+="</div>",i}function Cm(e,t){let r="";if(e.editToolbar==="none")return"";const i=[];t.selectionIsCollapsed?i.push("undo","redo","pasteFromClipboard"):i.push("cutToClipboard","copyToClipboard","pasteFromClipboard");const a={undo:`<div class='action ${t.canUndo===!1?"disabled":""}'
data-command='"undo"'
data-tooltip='${we("tooltip.undo")}'>
<svg><use xlink:href='#svg-undo' /></svg>
</div>`,redo:`<div class='action ${t.canRedo===!1?"disabled":""}'
data-command='"redo"'
data-tooltip='${we("tooltip.redo")}'>
<svg><use xlink:href='#svg-redo' /></svg>
</div>`,cutToClipboard:`
<div class='action'
data-command='"cutToClipboard"'
data-tooltip='${we("tooltip.cut to clipboard")}'>
<svg><use xlink:href='#svg-cut' /></svg>
</div>
`,copyToClipboard:`
<div class='action'
data-command='"copyToClipboard"'
data-tooltip='${we("tooltip.copy to clipboard")}'>
<svg><use xlink:href='#svg-copy' /></svg>
</div>
`,pasteFromClipboard:`
<div class='action'
data-command='"pasteFromClipboard"'
data-tooltip='${we("tooltip.paste from clipboard")}'>
<svg><use xlink:href='#svg-paste' /></svg>
</div>
`};return r+=i.map(s=>a[s]).join(""),r}function Em(e){for(const t of e)km(t)}function km(e){const t=Yo.singleton;if(!t)return;const r={};if(!e.id){if(e.hasAttribute("data-label")&&(r.label=e.dataset.label),e.hasAttribute("data-latex")&&(r.latex=e.dataset.latex),e.hasAttribute("data-key")&&(r.key=e.dataset.key),e.hasAttribute("data-insert")&&(r.insert=e.dataset.insert),e.hasAttribute("data-variants")&&(r.variants=e.dataset.variants),e.hasAttribute("data-aside")&&(r.aside=e.dataset.aside),e.className&&(r.class=e.className),!r.label&&!r.latex&&!r.key&&!r.insert&&(r.latex=e.innerText,r.label=e.innerHTML),e.hasAttribute("data-command"))try{r.command=JSON.parse(e.dataset.command)}catch(n){}e.id=t.registerKeycap(r)}if(!e.innerHTML){const[n,i]=Hd(r);e.innerHTML=window.MathfieldElement.createHTML(n)}}function Dm(){Yi("virtual-keyboard"),Yi("core"),Nd()}function Am(){pa("core"),pa("virtual-keyboard")}var Lm=`<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<symbol id="svg-delete-backward" viewBox="0 0 576 512">
<path d="M432.1 208.1L385.9 256L432.1 303C442.3 312.4 442.3 327.6 432.1 336.1C423.6 346.3 408.4 346.3 399 336.1L352 289.9L304.1 336.1C295.6 346.3 280.4 346.3 271 336.1C261.7 327.6 261.7 312.4 271 303L318.1 256L271 208.1C261.7 199.6 261.7 184.4 271 175C280.4 165.7 295.6 165.7 304.1 175L352 222.1L399 175C408.4 165.7 423.6 165.7 432.1 175C442.3 184.4 442.3 199.6 432.1 208.1V208.1zM512 64C547.3 64 576 92.65 576 128V384C576 419.3 547.3 448 512 448H205.3C188.3 448 172 441.3 160 429.3L9.372 278.6C3.371 272.6 0 264.5 0 256C0 247.5 3.372 239.4 9.372 233.4L160 82.75C172 70.74 188.3 64 205.3 64L512 64zM528 128C528 119.2 520.8 112 512 112H205.3C201 112 196.9 113.7 193.9 116.7L54.63 256L193.9 395.3C196.9 398.3 201 400 205.3 400H512C520.8 400 528 392.8 528 384V128z"/>
</symbol>
<symbol id="svg-shift" viewBox="0 0 384 512">
<path d="M2.438 252.3C7.391 264.2 19.06 272 32 272h80v160c0 26.51 21.49 48 48 48h64C250.5 480 272 458.5 272 432v-160H352c12.94 0 24.61-7.797 29.56-19.75c4.953-11.97 2.219-25.72-6.938-34.88l-160-176C208.4 35.13 200.2 32 192 32S175.6 35.13 169.4 41.38l-160 176C.2188 226.5-2.516 240.3 2.438 252.3zM192 86.63L313.4 224H224v208H160V224H70.63L192 86.63z"/>
</symbol>
<symbol id="svg-commit" viewBox="0 0 512 512">
<path d="M135 432.1l-128-128C2.344 300.3 0 294.2 0 288s2.344-12.28 7.031-16.97l128-128c9.375-9.375 24.56-9.375 33.94 0s9.375 24.56 0 33.94L81.94 264H464v-208C464 42.75 474.8 32 488 32S512 42.75 512 56V288c0 13.25-10.75 24-24 24H81.94l87.03 87.03c9.375 9.375 9.375 24.56 0 33.94S144.4 442.3 135 432.1z"/>
</symbol>
<symbol id="circle-plus" viewBox="0 0 512 512"><path d="M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM232 344c0 13.3 10.7 24 24 24s24-10.7 24-24V280h64c13.3 0 24-10.7 24-24s-10.7-24-24-24H280V168c0-13.3-10.7-24-24-24s-24 10.7-24 24v64H168c-13.3 0-24 10.7-24 24s10.7 24 24 24h64v64z"/></symbol>
<symbol id="svg-command" viewBox="0 0 640 512">
<path d="M34.495 36.465l211.051 211.05c4.686 4.686 4.686 12.284 0 16.971L34.495 475.535c-4.686 4.686-12.284 4.686-16.97 0l-7.071-7.07c-4.686-4.686-4.686-12.284 0-16.971L205.947 256 10.454 60.506c-4.686-4.686-4.686-12.284 0-16.971l7.071-7.07c4.686-4.687 12.284-4.687 16.97 0zM640 468v-10c0-6.627-5.373-12-12-12H300c-6.627 0-12 5.373-12 12v10c0 6.627 5.373 12 12 12h328c6.627 0 12-5.373 12-12z"/>
</symbol>
<symbol id="svg-undo" viewBox="0 0 512 512">
<path d="M20 8h10c6.627 0 12 5.373 12 12v110.625C85.196 57.047 165.239 7.715 256.793 8.001 393.18 8.428 504.213 120.009 504 256.396 503.786 393.181 392.834 504 256 504c-63.926 0-122.202-24.187-166.178-63.908-5.113-4.618-5.354-12.561-.482-17.433l7.069-7.069c4.503-4.503 11.749-4.714 16.482-.454C150.782 449.238 200.935 470 256 470c117.744 0 214-95.331 214-214 0-117.744-95.331-214-214-214-82.862 0-154.737 47.077-190.289 116H180c6.627 0 12 5.373 12 12v10c0 6.627-5.373 12-12 12H20c-6.627 0-12-5.373-12-12V20c0-6.627 5.373-12 12-12z"/>
</symbol>
<symbol id="svg-redo" viewBox="0 0 512 512">
<path d="M492 8h-10c-6.627 0-12 5.373-12 12v110.625C426.804 57.047 346.761 7.715 255.207 8.001 118.82 8.428 7.787 120.009 8 256.396 8.214 393.181 119.166 504 256 504c63.926 0 122.202-24.187 166.178-63.908 5.113-4.618 5.354-12.561.482-17.433l-7.069-7.069c-4.503-4.503-11.749-4.714-16.482-.454C361.218 449.238 311.065 470 256 470c-117.744 0-214-95.331-214-214 0-117.744 95.331-214 214-214 82.862 0 154.737 47.077 190.289 116H332c-6.627 0-12 5.373-12 12v10c0 6.627 5.373 12 12 12h160c6.627 0 12-5.373 12-12V20c0-6.627-5.373-12-12-12z"/>
</symbol>
<symbol id="svg-arrow-left" viewBox="0 0 320 512">
<path d="M206.7 464.6l-183.1-191.1C18.22 267.1 16 261.1 16 256s2.219-11.97 6.688-16.59l183.1-191.1c9.152-9.594 24.34-9.906 33.9-.7187c9.625 9.125 9.938 24.37 .7187 33.91L73.24 256l168 175.4c9.219 9.5 8.906 24.78-.7187 33.91C231 474.5 215.8 474.2 206.7 464.6z"/>
</symbol>
<symbol id="svg-arrow-right" viewBox="0 0 320 512">
<path d="M113.3 47.41l183.1 191.1c4.469 4.625 6.688 10.62 6.688 16.59s-2.219 11.97-6.688 16.59l-183.1 191.1c-9.152 9.594-24.34 9.906-33.9 .7187c-9.625-9.125-9.938-24.38-.7187-33.91l168-175.4L78.71 80.6c-9.219-9.5-8.906-24.78 .7187-33.91C88.99 37.5 104.2 37.82 113.3 47.41z"/>
</symbol>
<symbol id="svg-tab" viewBox="0 0 448 512">
<path d="M32 217.1c0-8.8 7.2-16 16-16h144v-93.9c0-7.1 8.6-10.7 13.6-5.7l143.5 143.1c6.3 6.3 6.3 16.4 0 22.7L205.6 410.4c-5 5-13.6 1.5-13.6-5.7v-93.9H48c-8.8 0-16-7.2-16-16v-77.7m-32 0v77.7c0 26.5 21.5 48 48 48h112v61.9c0 35.5 43 53.5 68.2 28.3l143.6-143c18.8-18.8 18.8-49.2 0-68L228.2 78.9c-25.1-25.1-68.2-7.3-68.2 28.3v61.9H48c-26.5 0-48 21.6-48 48zM436 64h-8c-6.6 0-12 5.4-12 12v360c0 6.6 5.4 12 12 12h8c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12z"/>
</symbol>
<symbol id="svg-paste" viewBox="0 0 512 512"><path d="M160 32c11.6 0 21.3 8.2 23.5 19.2C185 58.6 191.6 64 199.2 64H208c8.8 0 16 7.2 16 16V96H96V80c0-8.8 7.2-16 16-16h8.8c7.6 0 14.2-5.4 15.7-12.8C138.7 40.2 148.4 32 160 32zM64 64h2.7C65 69 64 74.4 64 80V96c0 17.7 14.3 32 32 32H224c17.7 0 32-14.3 32-32V80c0-5.6-1-11-2.7-16H256c17.7 0 32 14.3 32 32h32c0-35.3-28.7-64-64-64H210.6c-9-18.9-28.3-32-50.6-32s-41.6 13.1-50.6 32H64C28.7 32 0 60.7 0 96V384c0 35.3 28.7 64 64 64H192V416H64c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32zM288 480c-17.7 0-32-14.3-32-32V192c0-17.7 14.3-32 32-32h96v56c0 22.1 17.9 40 40 40h56V448c0 17.7-14.3 32-32 32H288zM416 165.3L474.7 224H424c-4.4 0-8-3.6-8-8V165.3zM448 512c35.3 0 64-28.7 64-64V235.9c0-12.7-5.1-24.9-14.1-33.9l-59.9-59.9c-9-9-21.2-14.1-33.9-14.1H288c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H448z"/></symbol>
<symbol id="svg-cut" viewBox="0 0 512 512"><path d="M485.6 444.2L333.6 314.9C326.9 309.2 326.1 299.1 331.8 292.4C337.5 285.6 347.6 284.8 354.4 290.5L506.4 419.8C513.1 425.5 513.9 435.6 508.2 442.4C502.5 449.1 492.4 449.9 485.6 444.2zM485.7 67.76C492.5 62.07 502.5 62.94 508.2 69.69C513.9 76.45 513.1 86.55 506.3 92.24L208.5 343.1C218.3 359.7 224 379.2 224 400C224 461.9 173.9 512 112 512C50.14 512 0 461.9 0 400C0 338.1 50.14 288 112 288C141.5 288 168.4 299.4 188.4 318.1L262.2 256L188.4 193.9C168.4 212.6 141.5 224 112 224C50.14 224 0 173.9 0 112C0 50.14 50.14 0 112 0C173.9 0 224 50.14 224 112C224 132.8 218.3 152.3 208.5 168.9L287 235.1L485.7 67.76zM32 112C32 156.2 67.82 192 112 192C156.2 192 192 156.2 192 112C192 67.82 156.2 32 112 32C67.82 32 32 67.82 32 112zM112 480C156.2 480 192 444.2 192 400C192 355.8 156.2 320 112 320C67.82 320 32 355.8 32 400C32 444.2 67.82 480 112 480z"/></symbol>
<symbol id="svg-copy" viewBox="0 0 512 512"><path d="M272 416C263.2 416 256 423.2 256 432V448c0 17.67-14.33 32-32 32H64c-17.67 0-32-14.33-32-32V192c0-17.67 14.33-32 32-32h112C184.8 160 192 152.8 192 144C192 135.2 184.8 128 176 128H63.99c-35.35 0-64 28.65-64 64l.0098 256C0 483.3 28.65 512 64 512h160c35.35 0 64-28.65 64-64v-16C288 423.2 280.8 416 272 416zM502.6 86.63l-77.25-77.25C419.4 3.371 411.2 0 402.7 0H288C252.7 0 224 28.65 224 64v256c0 35.35 28.65 64 64 64h160c35.35 0 64-28.65 64-64V109.3C512 100.8 508.6 92.63 502.6 86.63zM416 45.25L466.7 96H416V45.25zM480 320c0 17.67-14.33 32-32 32h-160c-17.67 0-32-14.33-32-32V64c0-17.67 14.33-32 32-32h96l.0026 64c0 17.67 14.33 32 32 32H480V320z"/>
</symbol>
<symbol id="svg-angle-double-right" viewBox="0 0 512 512"><path d="M470.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 256 265.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160zm-352 160l160-160c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L210.7 256 73.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0z"/>
</symbol>
<symbol id="svg-angle-double-left" viewBox="0 0 512 512"><path d="M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160zm352-160l-160 160c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L301.3 256 438.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0z"/>
</symbol>
<symbol id="svg-trash" viewBox="0 0 448 512">
<path d="M336 64l-33.6-44.8C293.3 7.1 279.1 0 264 0h-80c-15.1 0-29.3 7.1-38.4 19.2L112 64H24C10.7 64 0 74.7 0 88v2c0 3.3 2.7 6 6 6h26v368c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V96h26c3.3 0 6-2.7 6-6v-2c0-13.3-10.7-24-24-24h-88zM184 32h80c5 0 9.8 2.4 12.8 6.4L296 64H152l19.2-25.6c3-4 7.8-6.4 12.8-6.4zm200 432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V96h320v368zm-176-44V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12zm-80 0V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12zm160 0V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12z"/>
</symbol>
<symbol id="svg-keyboard-down" viewBox="0 0 576 512"><path d="M64 48c-8.8 0-16 7.2-16 16V240c0 8.8 7.2 16 16 16H512c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H64zM0 64C0 28.7 28.7 0 64 0H512c35.3 0 64 28.7 64 64V240c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64zM159 359c9.4-9.4 24.6-9.4 33.9 0l95 95 95-95c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L305 505c-4.5 4.5-10.6 7-17 7s-12.5-2.5-17-7L159 393c-9.4-9.4-9.4-24.6 0-33.9zm1-167c0-8.8 7.2-16 16-16H400c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V192zM120 88h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H120c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16zm64 16c0-8.8 7.2-16 16-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H200c-8.8 0-16-7.2-16-16V104zm96-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H280c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16zm64 16c0-8.8 7.2-16 16-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H360c-8.8 0-16-7.2-16-16V104zm96-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H440c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16z"/></symbol>
</svg>`;function Bm(e){e.resetKeycapRegistry(),Dm();const t=document.createElement("div");t.className="ML__keyboard";const r=document.createElement("div");r.className="MLK__plate",r.innerHTML=window.MathfieldElement.createHTML(Lm+e.normalizedLayouts.map((s,u)=>Im(e,s,u)).join(""));const n=document.createElement("div");n.className="MLK__backdrop",n.appendChild(r),t.appendChild(n),t.addEventListener("pointerdown",Tm,{passive:!1});const i=t.querySelectorAll(".ML__edit-toolbar");if(i)for(const s of i)s.addEventListener("click",u=>{var d,h;let p=u.target,y="";for(;p&&!y;)y=(d=p==null?void 0:p.getAttribute("data-command"))!=null?d:"",p=(h=p==null?void 0:p.parentElement)!=null?h:null;y&&e.executeCommand(JSON.parse(y))});Em(t.querySelectorAll(".MLK__keycap, .action, .fnbutton, .bigfnbutton"));const a=t.querySelectorAll(".MLK__layer");console.assert(a.length>0,"No virtual keyboards available");for(const s of a)s.addEventListener("pointerdown",u=>u.preventDefault());return e.currentLayer=e.latentLayer,t}function Im(e,t,r){const n=[];if(!("layers"in t))return"";for(const i of t.layers)n.push(`<div tabindex="-1" class="MLK__layer" id="${i.id}">`),(e.normalizedLayouts.length>1||t.displayEditToolbar)&&(n.push("<div class='MLK__toolbar' role='toolbar'>"),n.push(Mm(e,r)),t.displayEditToolbar&&n.push('<div class="ML__edit-toolbar right"></div>'),n.push("</div>")),n.push($m(e,i)),n.push("</div>");return n.join("")}function $m(e,t){if(typeof t=="string")return t;let r="";if(typeof t.style=="string"?r+=`<style>${t.style}</style>`:typeof t.style=="object"&&(r+=`<style>${Sm(t.style)}</style>`),t.backdrop&&(r+=`<div class='${t.backdrop}'>`),t.container&&(r+=`<div class='${t.container}'>`),t.rows){r+="<div class=MLK__rows>";for(const n of t.rows){r+="<div dir='ltr' class=MLK__row>";for(const i of n)if(i){const a=e.registerKeycap(i),[s,u]=Hd(i);/(^|\s)separator/.test(u)?r+=`<div class="${u}"`:r+=`<div tabindex="-1" id="${a}" class="${u}"`,i.tooltip&&(r+=` data-tooltip="${i.tooltip}"`),r+=`>${s}</div>`}r+="</div>"}r+="</div>"}else t.markup&&(r+=t.markup);return t.container&&(r+="</div>"),t.backdrop&&(r+="</div>"),r}function Hd(e,t={shifted:!1}){var r,n,i,a,s,u,d;let h="",p=(r=e.class)!=null?r:"";if(t.shifted&&Hl(e)&&(p+=" is-active"),t.shifted&&"shift"in e)typeof e.shift=="string"?h=Uc(e.shift):typeof e.shift=="object"&&(h=e.shift.label?e.shift.label:(n=Uc(e.shift.latex||e.shift.insert||"")||e.shift.key)!=null?n:""),typeof e.shift=="object"&&(p=(a=(i=e.shift.class)!=null?i:e.class)!=null?a:"");else{if(h=e.label?e.label:(s=Uc(e.latex||e.insert||"")||e.key)!=null?s:"",e.shift){let y;typeof e.shift=="string"?y=Uc(e.shift):e.shift.label?y=e.shift.label:y=(u=Uc(e.shift.latex||e.shift.insert||"")||e.shift.key)!=null?u:"",h+=`<span class="MLK__shift">${y}</span>`}e.aside&&(h+=`<aside>${e.aside}</aside>`)}return e.layer&&!/layer-switch/.test(p)&&(p+=" layer-switch"),/(^|\s)(separator|action|shift|fnbutton|bigfnbutton)($|\s)/.test(p)||(p+=" MLK__keycap"),!/\bw[0-9]+\b/.test(p)&&e.width&&(p+=(d={0:" w0",.5:" w5",1.5:" w15",2:" w20",5:" w50"}[e.width])!=null?d:""),[h,p||"MLK__keycap"]}var $s={"[left]":{class:"action hide-shift",label:"<svg class=svg-glyph><use xlink:href=#svg-arrow-left /></svg>",command:["performWithFeedback","moveToPreviousChar"],shift:{label:"<svg class=svg-glyph><use xlink:href=#svg-angle-double-left /></svg>",command:["performWithFeedback","extendSelectionBackward"]}},"[right]":{class:"action hide-shift",label:"<svg class=svg-glyph><use xlink:href=#svg-arrow-right /></svg>",command:["performWithFeedback","moveToNextChar"],shift:{label:"<svg class=svg-glyph><use xlink:href=#svg-angle-double-right /></svg>",command:["performWithFeedback","extendSelectionForward"]}},"[up]":{class:"action hide-shift",label:"\u2191",command:["performWithFeedback","moveUp"],shift:{label:"\u219F",command:["performWithFeedback","extendSelectionUpward"]}},"[down]":{class:"action hide-shift",label:"\u2193",command:["performWithFeedback","moveDown"],shift:{label:"\u21A1",command:["performWithFeedback","extendSelectionDownward"]}},"[return]":{class:"action hide-shift",command:["performWithFeedback","commit"],shift:{command:["performWithFeedback","addRowAfter"]},width:1.5,label:"<svg class=svg-glyph><use xlink:href=#svg-commit /></svg>"},"[action]":{class:"action hide-shift",command:["performWithFeedback","commit"],shift:{label:"<svg class=svg-glyph><use xlink:href=#circle-plus /></svg>",command:["performWithFeedback","addRowAfter"]},width:1.5,label:"<svg class=svg-glyph><use xlink:href=#svg-commit /></svg>"},"[hr]":{class:"separator horizontal-rule"},"[hide-keyboard]":{class:"action",command:["hideVirtualKeyboard"],width:1.5,label:"<svg class=svg-glyph-lg><use xlink:href=#svg-keyboard-down /></svg>"},"[.]":{variants:".",command:["performWithFeedback","insertDecimalSeparator"],shift:",",class:"big-op hide-shift",label:"."},"[,]":{variants:",",command:["performWithFeedback","insertDecimalSeparator"],shift:".",class:"big-op hide-shift",label:","},"[+]":{variants:[{latex:"\\sum_{#0}^{#0}",class:"small"},"\\oplus"],latex:"+",label:"+",class:"big-op hide-shift",shift:{latex:"\\sum",insert:"\\sum",class:"small"}},"[-]":{variants:["\\pm","\\ominus"],latex:"-",label:"&#x2212;",shift:"\\pm",class:"big-op hide-shift"},"[/]":{class:"big-op hide-shift",shift:{class:"",latex:"\\frac{1}{#@}"},variants:["/","\\div","\\%","\\oslash"],latex:"\\frac{#@}{#?}",label:"&divide;"},"[*]":{variants:[{latex:"\\prod_{#0}^{#0}",class:"small"},"\\otimes","\\cdot"],latex:"\\cdot",label:"&times;",shift:{latex:"\\times"},class:"big-op hide-shift"},"[=]":{variants:["\\neq","\\equiv","\\varpropto","\\thickapprox","\\lt","\\gt","\\le","\\ge"],latex:"=",label:"=",shift:{label:"\u2260",latex:"\\ne"},class:"big-op hide-shift"},"[backspace]":{class:"action bottom right hide-shift",width:1.5,command:["performWithFeedback","deleteBackward"],label:"<svg class=svg-glyph><use xlink:href=#svg-delete-backward /></svg>",shift:{class:"action warning",label:"<svg class=svg-glyph><use xlink:href=#svg-trash /></svg>",command:"deleteAll"}},"[undo]":{class:"ghost if-can-undo",command:"undo",label:"<svg class=svg-glyph><use xlink:href=#svg-undo /></svg>",tooltip:"tooltip.undo"},"[redo]":{class:"ghost if-can-redo",command:"redo",label:"<svg class=svg-glyph><use xlink:href=#svg-redo /></svg>",tooltip:"tooltip.redo"},"[(]":{variants:[{latex:"\\lbrack",key:"["},"\\langle","\\lfloor","\\lceil",{latex:"\\lbrace",key:"{"}],key:"(",label:"(",shift:{label:"[",key:"["},class:"hide-shift"},"[)]":{variants:[{latex:"\\rbrack",key:"]"},"\\rangle","\\rfloor","\\rceil",{latex:"\\rbrace",key:"]"}],key:")",label:")",shift:{label:"]",latex:"\\rbrack"},class:"hide-shift"},"[0]":{variants:"0",latex:"0",label:"0",shift:"\\infty",class:"hide-shift"},"[1]":{variants:"1",latex:"1",label:"1",shift:"#@^{-1}",class:"hide-shift"},"[2]":{variants:"2",latex:"2",label:"2",shift:"#@^2",class:"hide-shift"},"[3]":{variants:"3",latex:"3",label:"3",shift:"#@^3",class:"hide-shift"},"[4]":{variants:"4",latex:"4",label:"4",shift:"#@^4",class:"hide-shift"},"[5]":{variants:"5",latex:"5",label:"5",shift:"#@^5",class:"hide-shift"},"[6]":{variants:"6",latex:"6",label:"6",shift:"#@^6",class:"hide-shift"},"[7]":{variants:"7",latex:"7",label:"7",shift:"#@^7",class:"hide-shift"},"[8]":{variants:"8",latex:"8",label:"8",shift:"#@^8",class:"hide-shift"},"[9]":{variants:"9",latex:"9",label:"9",shift:"#@^9",class:"hide-shift"},"[separator-5]":{class:"separator",width:.5},"[separator]":{class:"separator"},"[separator-10]":{class:"separator"},"[separator-15]":{class:"separator",width:1.5},"[separator-20]":{class:"separator",width:2},"[separator-50]":{class:"separator",width:5},"[shift]":{class:"shift bottom left",width:1.5,label:"<span class=caps-lock-indicator></span><svg class=svg-glyph><use xlink:href=#svg-shift /></svg>"},"[foreground-color]":{variants:"foreground-color",command:["applyStyle",{color:"red"}],label:"<span style='border-radius: 50%;width:22px;height:22px; border: 3px solid #cc2428; box-sizing: border-box'>"},"[background-color]":{variants:"background-color",command:["applyStyle",{backgroundColor:"yellow"}],label:"<span style='border-radius: 50%;width:22px;height:22px; background:#fff590; box-sizing: border-box'></span>"}};function rh(e){var t;if(typeof e=="string"){if(e==="[.]"&&window.MathfieldElement.decimalSeparator===","&&(e="[,]"),!$s[e])return{latex:e};e={label:e}}let r;return"label"in e&&e.label&&$s[e.label]&&(r=_(S(S({},$s[e.label]),e),{label:$s[e.label].label})),"key"in e&&e.key&&$s[e.key]&&(r=_(S(S({},$s[e.key]),e),{key:$s[e.key].key})),r?(r.command==="insertDecimalSeparator"&&(r.label=(t=window.MathfieldElement.decimalSeparator)!=null?t:"."),e.label==="[action]"&&(r=S(S({},r),window.mathVirtualKeyboard.actionKeycap)),e.label==="[shift]"&&(r=S(S({},r),window.mathVirtualKeyboard.shiftKeycap)),e.label==="[backspace]"&&(r=S(S({},r),window.mathVirtualKeyboard.backspaceKeycap)),e.label==="[tab]"&&(r=S(S({},r),window.mathVirtualKeyboard.tabKeycap)),r):e}var qc;function Tm(e){var t;if(e.button!==0)return;const r=Yo.singleton;if(!r)return;let n=e.target;for(;n&&!n.getAttribute("data-layer");)n=n.parentElement;if(n){r.currentLayer=(t=n.getAttribute("data-layer"))!=null?t:"",e.preventDefault();return}const i=Kl(e.target);if(!(i!=null&&i.id))return;const a=r.getKeycap(i.id);if(!a)return;console.assert(e.type==="pointerdown");const s=new AbortController,u=s.signal;i.classList.add("is-pressed"),i.addEventListener("pointerenter",Wd(s),{capture:!0,signal:u}),i.addEventListener("pointerleave",Wd(s),{capture:!0,signal:u}),i.addEventListener("pointercancel",Wd(s),{signal:u}),i.addEventListener("pointerup",Wd(s),{signal:u}),Hl(a)&&(i.classList.add("is-active"),r.shiftPressCount++),a.variants&&(qc&&clearTimeout(qc),qc=setTimeout(()=>{i.classList.contains("is-pressed")&&(i.classList.remove("is-pressed"),i.classList.add("is-active"),e.target&&"releasePointerCapture"in e.target&&e.target.releasePointerCapture(e.pointerId),Qf(i,()=>{s.abort(),i==null||i.classList.remove("is-active")}))},300)),e.preventDefault()}function Wd(e){return t=>{const r=Kl(t.target);if(!(r!=null&&r.id))return;const n=Yo.singleton;if(!n)return;const i=n.getKeycap(r.id);if(i){if(t.type==="pointerenter"&&t.target===r&&t.isPrimary&&r.classList.add("is-pressed"),t.type==="pointercancel"){r.classList.remove("is-pressed"),Hl(i)&&(n.shiftPressCount--,r.classList.toggle("is-active",n.isShifted)),e.abort();return}if(t.type==="pointerleave"&&t.target===r){r.classList.remove("is-pressed"),Hl(i)&&(n.shiftPressCount--,r.classList.toggle("is-active",n.isShifted));return}if(t.type==="pointerup"){qc&&clearTimeout(qc),Hl(i)?r.classList.toggle("is-active",n.isShifted):r.classList.contains("is-pressed")&&(r.classList.remove("is-pressed"),n.isShifted&&i.shift?typeof i.shift=="string"?n.executeCommand(["insert",i.shift,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]):cf(i.shift):cf(i),n.shiftPressCount===1&&!t.shiftKey&&(n.shiftPressCount=0)),e.abort(),t.preventDefault();return}}}}function cf(e){var t;let r=e.command;!r&&e.insert&&(r=["insert",e.insert,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]),!r&&e.key&&(r=["typedText",e.key,{focus:!0,feedback:!0,simulateKeystroke:!0}]),!r&&e.latex&&(r=["insert",e.latex,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]),r||(r=["typedText",e.label,{focus:!0,feedback:!0,simulateKeystroke:!0}]),(t=Yo.singleton)==null||t.executeCommand(r)}function Pm(e){if(e.nodeType!==1)return!1;const t=e.classList;return t.contains("MLK__keycap")||t.contains("shift")||t.contains("action")||t.contains("fnbutton")||t.contains("bigfnbutton")}function Kl(e){if(!e)return;let t=e;for(;t&&!Pm(t);)t=t.parentElement;return t!=null?t:void 0}function Hl(e){return!!e.class&&/(^|\s)shift($|\s)/.test(e.class)}var Yo=class Lp{constructor(){this.originalContainerBottomPadding=null,this.keycapRegistry={},this._shiftPressCount=0;var t,r,n;this.targetOrigin=window.origin,this.originValidator="none",this._alphabeticLayout="auto",this._layouts=Object.freeze(["default"]),this._editToolbar="default",this._container=(r=(t=window.document)==null?void 0:t.body)!=null?r:null,this._visible=!1,this._rebuilding=!1,this.observer=new ResizeObserver(i=>{this.adjustBoundingRect(),this.dispatchEvent(new Event("geometrychange")),this.sendMessage("geometry-changed",{boundingRect:this.boundingRect})}),this.listeners={};try{(n=window.top)==null||n.addEventListener("message",this)}catch(i){window.addEventListener("message",this)}document.body.addEventListener("focusin",i=>{const a=i.target;a!=null&&a.isConnected&&setTimeout(()=>{const s=nh();s&&!s.readOnly&&s.mathVirtualKeyboardPolicy==="auto"&&mt()&&this.show({animate:!0})},300)}),document.addEventListener("focusout",i=>{i.target.mathVirtualKeyboardPolicy!=="manual"&&setTimeout(()=>{nh()||this.hide()},300)})}get currentLayer(){var t,r,n;return(n=(r=(t=this._element)==null?void 0:t.querySelector(".MLK__layer.is-visible"))==null?void 0:r.id)!=null?n:""}set currentLayer(t){var r;if(!this._element){this.latentLayer=t;return}let n=t?this._element.querySelector(`#${t}.MLK__layer`):null;n||(n=this._element.querySelector(".MLK__layer")),n&&((r=this._element.querySelector(".MLK__layer.is-visible"))==null||r.classList.remove("is-visible"),n.classList.add("is-visible")),this.render()}get shiftPressCount(){return this._shiftPressCount}set shiftPressCount(t){var r;this._shiftPressCount=t>2||t<0?0:t,(r=this._element)==null||r.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.render()}get isShifted(){return this._shiftPressCount>0}resetKeycapRegistry(){this.keycapRegistry={}}registerKeycap(t){const r="ML__k"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);return this.keycapRegistry[r]=t,r}getKeycap(t){return t?this.keycapRegistry[t]:void 0}getLayer(t){const r=this.normalizedLayouts;for(const n of r)for(const i of n.layers)if(i.id===t)return i}get alphabeticLayout(){return this._alphabeticLayout}set alphabeticLayout(t){this._alphabeticLayout=t,this.rebuild()}get actionKeycap(){return this._actionKeycap}set actionKeycap(t){this._actionKeycap=typeof t=="string"?{label:t}:t}get shiftKeycap(){return this._shiftKeycap}set shiftKeycap(t){this._shiftKeycap=typeof t=="string"?{label:t}:t}get backspaceKeycap(){return this._backspaceKeycap}set backspaceKeycap(t){this._backspaceKeycap=typeof t=="string"?{label:t}:t}get tabKeycap(){return this._tabKeycap}set tabKeycap(t){this._tabKeycap=typeof t=="string"?{label:t}:t}get layouts(){return this._layouts}set layouts(t){this.updateNormalizedLayouts(t),this.rebuild()}updateNormalizedLayouts(t){const r=Array.isArray(t)?[...t]:[t],n=r.findIndex(i=>i==="default");n>=0&&r.splice(n,1,"numeric","symbols","alphabetic","greek"),this._layouts=Object.freeze(r),this._normalizedLayouts=r.map(i=>th(i))}get normalizedLayouts(){return this._normalizedLayouts||this.updateNormalizedLayouts(this._layouts),this._normalizedLayouts}get editToolbar(){return this._editToolbar}set editToolbar(t){this._editToolbar=t,this.rebuild()}get container(){return this._container}set container(t){this._container=t,this.rebuild()}static get singleton(){if(this._singleton===void 0)try{this._singleton=new Lp}catch(t){this._singleton=null}return this._singleton}get style(){return this._style}addEventListener(t,r,n){this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].has(r)||this.listeners[t].add(r)}dispatchEvent(t){return!this.listeners[t.type]||this.listeners[t.type].size===0?!0:(this.listeners[t.type].forEach(r=>{typeof r=="function"?r(t):r==null||r.handleEvent(t)}),!t.defaultPrevented)}removeEventListener(t,r,n){this.listeners[t]&&this.listeners[t].delete(r)}get element(){return this._element}set element(t){var r;this._element!==t&&((r=this._element)==null||r.remove(),this._element=t)}get visible(){return this._visible}set visible(t){t?this.show():this.hide()}get boundingRect(){var t;if(!this._visible)return new DOMRect;const r=(t=this._element)==null?void 0:t.getElementsByClassName("MLK__plate")[0];return r?r.getBoundingClientRect():new DOMRect}adjustBoundingRect(){var t,r;const n=this.boundingRect.height;if(this.container===document.body){(t=this._element)==null||t.style.setProperty("--_keyboard-height",`calc(${n}px + var(--_padding-top) + var(--_padding-bottom) + env(safe-area-inset-bottom, 0))`);const i=n-1;this.container.style.paddingBottom=this.originalContainerBottomPadding?`calc(${this.originalContainerBottomPadding} + ${i}px)`:`${i}px`}else(r=this._element)==null||r.style.setProperty("--_keyboard-height",`${n}px`)}rebuild(){if(this._rebuilding||!this._element)return;this._rebuilding=!0;const t=this.currentLayer;requestAnimationFrame(()=>{this._rebuilding=!1,this._element&&(this._element.remove(),this._element=void 0),this.visible&&(this.buildAndAttachElement(),this.currentLayer=t,this.render(),this.adjustBoundingRect(),this._element.classList.add("is-visible"))})}render(){if(!this._element)return;const t=this.getLayer(this.currentLayer);this._element.classList.toggle("backdrop-is-transparent",!!(t&&(t.backdrop||t.container)));const r=this._element.querySelectorAll(".MLK__layer.is-visible .MLK__keycap, .MLK__layer.is-visible .action, .fnbutton, .MLK__layer.is-visible .bigfnbutton, .MLK__layer.is-visible .shift");if(r)for(const n of r){const i=this.getKeycap(n.id);if(i){const[a,s]=Hd(i,{shifted:this.isShifted});n.innerHTML=window.MathfieldElement.createHTML(a),n.className=s}}}show(t){var r;if(this._visible)return;const n=this.container;if(n&&window.mathVirtualKeyboard&&this.stateWillChange(!0)){if(this._element||(this.buildAndAttachElement(),this.adjustBoundingRect()),!this._visible){const i=this._element.getElementsByClassName("MLK__plate")[0];if(i&&this.observer.observe(i),n===window.document.body){const a=n.style.paddingBottom;this.originalContainerBottomPadding=a;const s=i.offsetHeight-1;n.style.paddingBottom=a?`calc(${a} + ${s}px)`:`${s}px`}window.addEventListener("mouseup",this),window.addEventListener("blur",this),window.addEventListener("keydown",this,{capture:!0}),window.addEventListener("keyup",this,{capture:!0}),(r=this._element)==null||r.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.currentLayer=this.latentLayer}this._visible=!0,t!=null&&t.animate?requestAnimationFrame(()=>{this._element&&(this._element.classList.add("animate"),this._element.addEventListener("transitionend",()=>{var i;return(i=this._element)==null?void 0:i.classList.remove("animate")},{once:!0}),this._element.classList.add("is-visible"),this.stateChanged())}):(this._element.classList.add("is-visible"),this.stateChanged())}}hide(t){var r;const n=this.container;if(n&&this._visible&&this.stateWillChange(!1)){if(this._visible=!1,this._element){this.latentLayer=this.currentLayer;const i=this._element.getElementsByClassName("MLK__plate")[0];i&&this.observer.unobserve(i),window.removeEventListener("mouseup",this),window.removeEventListener("blur",this),window.removeEventListener("keydown",this,{capture:!0}),window.removeEventListener("keyup",this,{capture:!0}),window.removeEventListener("contextmenu",this,{capture:!0}),jc(),Am(),(r=this._element)==null||r.remove(),this._element=void 0,this.originalContainerBottomPadding!==null&&(n.style.paddingBottom=this.originalContainerBottomPadding)}this.stateChanged()}}get height(){var t,r;return(r=(t=this.element)==null?void 0:t.offsetHeight)!=null?r:0}buildAndAttachElement(){var t;console.assert(!this.element),this.element=Bm(this),window.addEventListener("contextmenu",this,{capture:!0}),this.element.addEventListener("contextmenu",r=>{r.shiftKey||((r.ctrlKey||r.button===2)&&Qf(r.target),r.preventDefault(),r.stopPropagation())},{capture:!0}),(t=this.container)==null||t.appendChild(this.element)}handleEvent(t){if(lf(t)){if(!Tc(t.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${t.origin}) cannot be handled`,"SecurityError");t.data.action==="disconnect"?this.connectedMathfieldWindow=void 0:t.data.action!=="update-setting"&&t.data.action!=="proxy-created"&&t.data.action!=="execute-command"&&(console.assert(t.source!==void 0),this.connectedMathfieldWindow=t.source),this.handleMessage(t.data,t.source)}if(this._element)switch(t.type){case"mouseup":case"blur":document.body.style.userSelect="",this.shiftPressCount=0;break;case"contextmenu":t.button!==2&&t.preventDefault();break;case"keydown":{t.key==="Shift"&&!t.repeat&&(this.shiftPressCount=1);break}case"keyup":{(t.key==="Shift"||!t.getModifierState("Shift")&&this.shiftPressCount!==2)&&(this.shiftPressCount=0);break}}}handleMessage(t,r){const{action:n}=t;if(n==="execute-command"){const{command:i}=t,a=zl(i);if(window.top!==void 0&&a!=="virtual-keyboard")return;this.executeCommand(i);return}if((n==="connect"||n==="show")&&this.sendMessage("synchronize-proxy",{boundingRect:this.boundingRect,alphabeticLayout:this._alphabeticLayout,layouts:this._layouts,editToolbar:this._editToolbar},r),n!=="disconnect"&&window===window.top){if(n==="show"){typeof t.animate!="undefined"?this.show({animate:t.animate}):this.show();return}if(n==="hide"){typeof t.animate!="undefined"?this.hide({animate:t.animate}):this.hide();return}if(n==="update-setting"){t.alphabeticLayout&&(this.alphabeticLayout=t.alphabeticLayout),t.layouts&&(this.layouts=t.layouts),t.editToolbar&&(this.editToolbar=t.editToolbar);return}if(n==="proxy-created"){this.sendMessage("synchronize-proxy",{boundingRect:this.boundingRect,alphabeticLayout:this._alphabeticLayout,layouts:this._layouts,editToolbar:this._editToolbar},r);return}}}sendMessage(t,r,n){if(n||(n=this.connectedMathfieldWindow),this.targetOrigin===null||this.targetOrigin==="null"||n===window){window.dispatchEvent(new MessageEvent("message",{source:window,data:S({type:zd,action:t},r)}));return}if(n)n.postMessage(S({type:zd,action:t},r),{targetOrigin:this.targetOrigin});else if(r.command&&this.dispatchEvent(new CustomEvent("math-virtual-keyboard-command",{detail:r.command})),t==="execute-command"&&Array.isArray(r.command)&&r.command[0]==="insert"){const i=r.command[1].split("");for(const a of i)this.dispatchEvent(new KeyboardEvent("keydown",{key:a,bubbles:!0})),this.dispatchEvent(new KeyboardEvent("keyup",{key:a,bubbles:!0}))}}stateWillChange(t){return this.dispatchEvent(new CustomEvent("before-virtual-keyboard-toggle",{detail:{visible:t},bubbles:!0,cancelable:!0,composed:!0}))}stateChanged(){this.dispatchEvent(new Event("virtual-keyboard-toggle")),this._visible||(this.dispatchEvent(new Event("geometrychange")),this.sendMessage("geometry-changed",{boundingRect:this.boundingRect}))}focus(){this.sendMessage("focus",{})}blur(){this.sendMessage("blur",{})}updateToolbar(t){const r=this._element;if(!r)return;r.classList.toggle("is-math-mode",t.mode==="math"),r.classList.toggle("is-text-mode",t.mode==="text"),r.classList.toggle("can-undo",t.canUndo),r.classList.toggle("can-redo",t.canRedo),r.classList.toggle("can-copy",!t.selectionIsCollapsed),r.classList.toggle("can-copy",!t.selectionIsCollapsed),r.classList.toggle("can-paste",!0);const n=r.querySelectorAll(".ML__edit-toolbar");if(n)for(const i of n)i.innerHTML=Cm(this,t)}update(t){this._style=t.style,this.updateToolbar(t)}connect(){this.connectedMathfieldWindow=window}disconnect(){this.connectedMathfieldWindow=void 0}executeCommand(t){let r,n=[],i=zl(t);return A(t)?(r=t[0],r==="performWithFeedback"&&(t=t.slice(1),i=zl(t)),n=t.slice(1)):r=t,r=r.replace(/-\w/g,a=>a[1].toUpperCase()),i==="virtual-keyboard"?no[r].fn(void 0,...n):(this.sendMessage("execute-command",{command:t}),!1)}dispose(){window.removeEventListener("mouseup",this),window.removeEventListener("blur",this),window.removeEventListener("message",this)}};function nh(){var e,t;let r=$d(),n=null;for(;r;){if("host"in r&&((t=(e=r.host)==null?void 0:e.tagName)==null?void 0:t.toLowerCase())==="math-field"){n=r.host;break}r=r.parentNode}return n}if(Ne()&&!("mathVirtualKeyboard"in window))if(window===window.top){const e=Yo.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>e})}else Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>bm.singleton,configurable:!0});function Vd(e){const t={};for(const r of Object.keys(e))switch(r){case"scriptDepth":const n=e.scriptDepth;if(A(n))t.scriptDepth=[n[0],n[1]];else if(typeof n=="number")t.scriptDepth=[n,n];else if(typeof n=="string"){const[a,s]=n.split(",").map(u=>parseInt(u.trim()));t.scriptDepth=[a,s]}else throw new TypeError("Unexpected value for scriptDepth");break;case"mathVirtualKeyboardPolicy":let i=e.mathVirtualKeyboardPolicy.toLowerCase();if(i==="sandboxed"){if(window!==window.top){const a=Yo.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>a})}i="manual"}t.mathVirtualKeyboardPolicy=i;break;case"letterShapeStyle":e.letterShapeStyle==="auto"?Me.locale.startsWith("fr")?t.letterShapeStyle="french":t.letterShapeStyle="tex":t.letterShapeStyle=e.letterShapeStyle;break;case"defaultMode":["text","math","inline-math"].includes(e.defaultMode)?t.defaultMode=e.defaultMode:(console.error('MathLive 0.98.5: valid values for defaultMode are "text", "math" or "inline-math"'),t.defaultMode="math");break;case"macros":t.macros=J(e.macros);break;default:A(e[r])?t[r]=[...e[r]]:typeof e[r]=="object"&&!(e[r]instanceof Element)&&r!=="computeEngine"?t[r]=S({},e[r]):t[r]=e[r]}return t}function Ts(e,t){let r;typeof t=="string"?r=[t]:t===void 0?r=Object.keys(e):r=t;const n={};for(const i of r)e[i]===null?n[i]=null:A(e[i])?n[i]=[...e[i]]:typeof e[i]=="object"&&!(e[i]instanceof Element)&&i!=="computeEngine"?n[i]=S({},e[i]):n[i]=e[i];return typeof t=="string"?n[t]:n}function Zd(){return{readOnly:!1,defaultMode:"math",macros:{},registers:{},colorMap:st,backgroundColorMap:lt,letterShapeStyle:Me.locale.startsWith("fr")?"french":"tex",minFontScale:0,smartMode:!1,smartFence:!0,smartSuperscript:!0,scriptDepth:[1/0,1/0],removeExtraneousParentheses:!0,isImplicitFunction:e=>["\\sin","\\cos","\\tan","\\arcsin","\\arccos","\\arctan","\\arcsec","\\arccsc","\\arsinh","\\arcosh","\\artanh","\\arcsech","\\arccsch","\\arg","\\ch","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\sec","\\sinh","\\sh","\\tanh","\\tg","\\th","\\lg","\\lb","\\log","\\ln"].includes(e),mathModeSpace:"",placeholderSymbol:"\u25A2",contentPlaceholder:"",popoverPolicy:"auto",environmentPopoverPolicy:"off",keybindings:$0,inlineShortcuts:ad,inlineShortcutTimeout:0,mathVirtualKeyboardPolicy:"auto",virtualKeyboardTargetOrigin:window==null?void 0:window.origin,originValidator:"none",onInlineShortcut:()=>"",onScrollIntoView:null,onExport:I0,value:""}}function ih(e){return e.defaultMode==="inline-math"?"math":e.defaultMode}function Qo(e,t){!e||!t||(A(e)?e.forEach(r=>Qo(r,t)):typeof e=="object"&&!e.style.color&&!e.style.backgroundColor&&!e.style.fontFamily&&!e.style.fontShape&&!e.style.fontSeries&&!e.style.fontSize&&!e.style.variant&&!e.style.variantStyle&&(e.applyStyle(t),Qo(e.body,t),Qo(e.above,t),Qo(e.below,t),Qo(e.subscript,t),Qo(e.superscript,t)))}function uf(e,t,r,n){function i(s,u){for(const d of a)if(d.style[s]!==u)return!1;return!0}if(t=e.normalizeRange(t),t[0]===t[1])return!1;const a=e.getAtoms(t,{includeChildren:!0});n.operation==="toggle"&&(r.color&&i("color",r.color)&&(r.color="none",delete r.verbatimColor),r.backgroundColor&&i("backgroundColor",r.backgroundColor)&&(r.backgroundColor="none",delete r.verbatimBackgroundColor),r.fontFamily&&i("fontFamily",r.fontFamily)&&(r.fontFamily="none"),r.fontSeries&&i("fontSeries",r.fontSeries)&&(r.fontSeries="auto"),r.fontShape&&i("fontShape",r.fontShape)&&(r.fontShape="auto"),r.fontSize&&i("fontSize",r.fontSize)&&(r.fontSize=Co),r.variant&&i("variant",r.variant)&&(r.variant="normal"),r.variantStyle&&i("variantStyle",r.variantStyle)&&(r.variantStyle=""));for(const s of a)s.applyStyle(r);return!0}function Rm(e,t){const r=e.at(e.position);if(r.type==="composition")r.value=t;else{const{caret:n}=r;r.caret=void 0;const i=new Ed(t,{mode:r.mode});i.caret=n,r.parent.addChildAfter(i,r),e.position+=1}}function Om(e){const t=e.at(e.position);t.type==="composition"&&(t.parent.removeChild(t),e.position-=1)}Bt(["math","displaymath"],va),Bt("center",va),W("displaylines","",{parse:e=>{const t=[];let r=[];e.beginContext({tabular:!0});do{if(e.end()||e.match("<}>"))break;e.matchColumnSeparator()||e.matchRowSeparator()?(t.push([r]),r=[]):r.push(...e.scan(n=>["<}>","&","\\cr","\\\\","\\tabularnewline"].includes(n)))}while(!0);return e.endContext(),t.push([r]),t},createAtom:e=>new jr("lines",e.args,[],{leftDelim:".",rightDelim:".",columns:[{align:"l"}]})}),St("array","{columns:colspec}",(e,t,r,n)=>new jr(e,df(t),r,{columns:n[0],mathstyleName:"textstyle"})),St(["equation","equation*","subequations"],"",(e,t,r)=>new jr(e,df(t),r,{columns:[{align:"c"}]})),St(["multline","multline*"],"",va),St(["align","align*","aligned","eqnarray"],"",va),St("split","",va),St(["gather","gathered"],"",va),St(["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],"[columns:colspec]",va),St(["smallmatrix","smallmatrix*"],"[columns:colspec]",va),St(["cases","dcases","rcases"],"",va);function Nm(e){for(const t of e)for(const r of t)if(r.length>0)return!1;return!0}function df(e,t=1){return Nm(e)?Array(t).fill([[new Se({type:"first"}),new Ta]]):e.map(r=>r.length===0?[[new Se({type:"first"})]]:r.map(n=>n.length===0?[new Se({type:"first"})]:(n[0].type!=="first"&&n.unshift(new Se({type:"first"})),n)))}function va(e,t=[[[]]],r=[],n=[]){switch(t=df(t,["split","align","align*","aligned","eqnarray"].includes(e)?2:1),e){case"math":return new jr(e,t,r,{mathstyleName:"textstyle"});case"displaymath":return new jr(e,t,r,{mathstyleName:"textstyle"});case"center":return new jr(e,t,r,{columns:[{align:"c"}]});case"multline":case"multline*":return new jr(e,t,r,{columns:[{align:"m"}],leftDelim:".",rightDelim:"."});case"split":return new jr(e,t,r,{columns:[{align:"r"},{align:"l"}],minColumns:2});case"gather":case"gathered":return new jr(e,t,r,{columns:[{gap:.25},{align:"c"},{gap:0}]});case"pmatrix":case"pmatrix*":return new jr(e,t,r,{mathstyleName:"textstyle",leftDelim:"(",rightDelim:")",columns:Ps(n[0])});case"bmatrix":case"bmatrix*":return new jr(e,t,r,{mathstyleName:"textstyle",leftDelim:"[",rightDelim:"]",columns:Ps(n[0])});case"Bmatrix":case"Bmatrix*":return new jr(e,t,r,{mathstyleName:"textstyle",leftDelim:"\\lbrace",rightDelim:"\\rbrace",columns:Ps(n[0])});case"vmatrix":case"vmatrix*":return new jr(e,t,r,{mathstyleName:"textstyle",leftDelim:"\\vert",rightDelim:"\\vert",columns:Ps(n[0])});case"Vmatrix":case"Vmatrix*":return new jr(e,t,r,{mathstyleName:"textstyle",leftDelim:"\\Vert",rightDelim:"\\Vert",columns:Ps(n[0])});case"matrix":case"matrix*":return new jr(e,t,r,{mathstyleName:"textstyle",leftDelim:".",rightDelim:".",columns:Ps(n==null?void 0:n[0])});case"smallmatrix":case"smallmatrix*":return new jr(e,t,r,{mathstyleName:"scriptstyle",columns:Ps(n==null?void 0:n[0]),colSeparationType:"small",arraystretch:.5});case"cases":case"dcases":return new jr(e,t,r,{mathstyleName:e==="dcases"?"displaystyle":"textstyle",arraystretch:1.2,leftDelim:"\\lbrace",rightDelim:".",columns:[{align:"l"},{gap:1},{align:"l"}]});case"rcases":return new jr(e,t,r,{arraystretch:1.2,leftDelim:".",rightDelim:"\\rbrace",columns:[{align:"l"},{gap:1},{align:"l"}]});case"lines":return new jr(e,t,r,{leftDelim:".",rightDelim:".",columns:[{align:"l"}]});case"align":case"align*":case"aligned":case"eqnarray":{let i=0;for(const u of t)i=Math.max(i,u.length);const a=[{gap:0},{align:"r"},{gap:.25},{align:"l"}];let s=2;for(;s<i;)a.push({gap:1},{align:"r"},{gap:.25},{align:"l"}),s+=2;return a.push({gap:0}),new jr(e,t,r,{arraycolsep:0,columns:a,minColumns:2})}}return new jr(e,t,r,{mathstyleName:"textstyle"})}function Ps(e){return e!=null?e:[{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"}]}function Fm(e,t){let r=e.at(e.position);for(;r&&!(r.parent instanceof jr);)r=r.parent;if(r&&r.type==="array"&&r.environmentName,!r||!(r.parent instanceof jr)){const n=e.at(e.position);if(r=n,!r.parent.parent){let i=e.extractAtoms([e.position,e.lastOffset]),a=e.extractAtoms([0,e.position]);a.length===0&&(a=Gd()),i.length===0&&(i=Gd());let s;return t.endsWith("column")?(s=va("split",[[a,i]]),e.root=s,Rs(s,0,0)?Os(e,s,0,0):Rs(s,0,1)?Os(e,s,0,1):e.position=e.offsetOf(n)):(s=va("lines",[[a],[i]]),e.root=s,Rs(s,0,0)?Os(e,s,0,0):Rs(s,1,0)?Os(e,s,1,0):e.position=e.offsetOf(n)),[void 0,[0,0]]}if(r.parent instanceof cn){const i=r.parent;let a=e.extractAtoms([e.position,e.offsetOf(i.lastChild)]),s=e.extractAtoms([e.offsetOf(i.firstChild),e.position]);s.length===0&&(s=Gd()),a.length===0&&(a=Gd());let u="pmatrix";const d=i.leftDelim,h=i.rightDelim;d==="("&&(h===")"||h==="?")?u="pmatrix":(d==="["||d==="\\lbrack")&&(h==="]"||h==="\\rbrack"||h==="?")?u="bmatrix":d==="\\vert"&&h==="\\vert"?u="vmatrix":d==="\\Vert"&&h==="\\Vert"?u="Vmatrix":(d==="{"||d==="\\lbrace")&&(h==="."||h==="?")&&(u="cases");const p=va(u,t.endsWith("column")?[[s,a]]:[[s],[a]]);return i.parent.addChildBefore(p,i),i.parent.removeChild(i),Rs(p,0,0)?Os(e,p,0,0):t.endsWith("column")?Rs(p,0,1)?Os(e,p,0,1):e.position=e.offsetOf(r):Rs(p,1,0)?Os(e,p,1,0):e.position=e.offsetOf(r),[void 0,[0,0]]}}return r&&r.parent instanceof jr?[r.parent,r.parentBranch]:[void 0,[0,0]]}function Rs(e,t,r){const n=e.getCell(t,r);return!n||n.length!==2?!1:n[1].type==="placeholder"}function zm(e,t,r,n){const i=t.getCell(r,n);return i?[e.offsetOf(i[0]),e.offsetOf(i[i.length-1])]:-1}function Os(e,t,r,n){const i=zm(e,t,r,n);typeof i!="number"&&e.setSelection(i)}function jd(e,t,r,n,i){const a=t.getCell(r,n);a&&e.setPositionHandlingPlaceholder(e.offsetOf(a[i==="start"?0:a.length-1]))}function Ud(e,t){const[r,[n,i]]=Fm(e,t);if(r)switch(t){case"after row":r.addRowAfter(n),jd(e,r,n+1,0,"end");break;case"after column":if(r.maxColumns<=r.colCount){e.announce("plonk");return}r.addColumnAfter(i),jd(e,r,n,i+1,"end");break;case"before row":r.addRowBefore(n),jd(e,r,n,0,"start");break;case"before column":if(r.maxColumns<=r.colCount){e.announce("plonk");return}r.addColumnBefore(i),jd(e,r,n,i,"start");break}}function ah(e){return e.contentWillChange({inputType:"insertText"})?(Ud(e,"after row"),e.contentDidChange({inputType:"insertText"}),!0):!1}function Km(e){return e.contentWillChange({inputType:"insertText"})?(Ud(e,"before row"),e.contentDidChange({inputType:"insertText"}),!0):!1}function oh(e){return e.contentWillChange({inputType:"insertText"})?(Ud(e,"after column"),e.contentDidChange({inputType:"insertText"}),!0):!1}function Hm(e){return e.contentWillChange({inputType:"insertText"})?(Ud(e,"before column"),e.contentDidChange({inputType:"insertText"}),!0):!1}function sh(e,t){if(!e.contentWillChange({}))return!1;e.mathfield.snapshot();let r=".",n=".";switch(t){case"pmatrix":case"pmatrix*":r="(",n=")";break;case"bmatrix":case"bmatrix*":r="[",n="]";break;case"Bmatrix":case"Bmatrix*":r="\\lbrace",n="\\rbrace";break;case"vmatrix":case"vmatrix*":r="\\vert",n="\\vert";break;case"Vmatrix":case"Vmatrix*":r="\\Vert",n="\\Vert";break;case"matrix":case"matrix*":r=".",n=".";break;case"cases":case"dcases":r="\\lbrace";break;case"rcases":n="\\rbrace";break}const i=e.at(e.position),a=i.type==="array"?i:e.parentEnvironment;return a.environmentName=t,a.leftDelim=r,a.rightDelim=n,e.contentDidChange({}),!0}function lh(e,t){let r=e.at(e.position);for(;r&&!(Array.isArray(r.parentBranch)&&r.parent instanceof jr);)r=r.parent;if(Array.isArray(r==null?void 0:r.parentBranch)&&(r==null?void 0:r.parent)instanceof jr){const n=r.parent,i=r.parentBranch;let a;switch(t){case"row":if(n.rowCount>1){n.removeRow(i[0]);const s=n.getCell(Math.max(0,i[0]-1),i[1]);a=e.offsetOf(s[s.length-1])}break;case"column":if(n.colCount>n.minColumns){n.removeColumn(i[1]);const s=n.getCell(i[0],Math.max(0,i[1]-1));a=e.offsetOf(s[s.length-1])}break}a&&e.setPositionHandlingPlaceholder(a)}}function Wm(e){return e.contentWillChange({inputType:"deleteContent"})?(lh(e,"row"),e.contentDidChange({inputType:"deleteContent"}),!0):!1}function Vm(e){return e.contentWillChange({inputType:"deleteContent"})?(lh(e,"column"),e.contentDidChange({inputType:"deleteContent"}),!0):!1}Vi({addRowAfter:ah,addColumnAfter:oh,addRowBefore:Km,addColumnBefore:Hm,removeRow:Wm,removeColumn:Vm,setEnvironment:sh},{target:"model",canUndo:!0,changeContent:!0,changeSelection:!0});function Gd(){return[new Ta]}var ch=class Bp{constructor(t){this.recording=!1,this.model=t,this.reset()}reset(){this.stack=[],this.index=-1,this.lastOp=""}startRecording(){this.recording=!0}stopRecording(){this.recording=!1}canUndo(){return this.index-1>=0}canRedo(){return this.stack.length-1>this.index}stopCoalescing(t){t&&this.index>=0&&(this.stack[this.index].selection=t),this.lastOp=""}undo(){return this.canUndo()?(this.model.setState(this.stack[this.index-1],{silenceNotifications:!1,type:"undo"}),this.index-=1,this.lastOp="",!0):!1}redo(){return this.canRedo()?(this.index+=1,this.model.setState(this.stack[this.index],{silenceNotifications:!1,type:"redo"}),this.lastOp="",!0):!1}pop(){this.canUndo()&&(this.stack.splice(this.index,this.stack.length-this.index),this.index-=1)}snapshot(t){return this.recording?(t&&t===this.lastOp&&this.pop(),this.stack.splice(this.index+1,this.stack.length-this.index-1),this.stack.push(this.model.getState()),this.index+=1,this.stack.length>Bp.maximumDepth&&(this.stack.shift(),this.index-=1),this.lastOp=t!=null?t:"",!0):!1}};ch.maximumDepth=1e3;var Zm=ch;function ff(e,t,r){if(e.at(t).mode!=="text")return t;const n=r==="backward"?-1:1;let i;if(K.test(e.at(t).value)){let a=t,s;do s=e.at(a).mode==="text"&&K.test(e.at(a).value),a+=n;while(e.at(a)&&s);i=e.at(a)?a-2*n:a-n}else if(/\s/.test(e.at(t).value)){let a=t;for(;e.at(a)&&e.at(a).mode==="text"&&/\s/.test(e.at(a).value);)a+=n;if(!e.at(a))i=a-n;else{let s=!0;do s=e.at(a).mode==="text"&&!/\s/.test(e.at(a).value),a+=n;while(e.at(a)&&s);i=e.at(a)?a-2*n:a-n}}else{let a=t;for(;e.at(a)&&e.at(a).mode==="text"&&!/\s/.test(e.at(a).value);)a+=n;i=e.at(a)?a:a-n;let s=!0;for(;e.at(a)&&s;)s=e.at(a).mode==="text"&&/\s/.test(e.at(a).value),s&&(i=a),a+=n;i=e.at(a)?a-2*n:a-n}return i-(n>0?0:1)}function Wl(e,t,r){var n,i,a,s,u,d,h;const p=e.position;(n=r==null?void 0:r.extend)!=null&&n||e.collapseSelection(t);let y=e.at(e.position);if(t==="forward"&&(y.type==="subsup"?(y=y.rightSibling,y||(y=e.at(e.position+1))):y=e.at(e.position+1)),!y)return e.announce("plonk"),!1;let M=e.offsetOf(y);if(y instanceof Ms)M=ff(e,M,t);else if(y instanceof Tt)if(y.isSuggestion)for(console.assert(t==="forward");y&&y instanceof Tt;)y.isSuggestion=!1,M=e.offsetOf(y),y=y.rightSibling;else if(t==="forward"){if(y=y.rightSibling,!y||!(y instanceof Tt))return e.announce("plonk"),!1;for(;y&&y instanceof Tt&&/[a-zA-Z\*]/.test(y.value);)M=e.offsetOf(y),y=y.rightSibling}else{if(y=y.leftSibling,!y||!(y instanceof Tt))return e.announce("plonk"),!1;for(;y&&y instanceof Tt&&/[a-zA-Z\*]/.test(y.value);)M=e.offsetOf(y),y=y.leftSibling}else if(t==="forward"&&y.type==="mopen"){let B=0;do y.type==="mopen"?B+=1:y.type==="mclose"&&(B-=1),y=y.rightSibling;while(!y.isLastSibling&&B!==0);M=e.offsetOf(y.leftSibling)}else if(t==="backward"&&y.type==="mclose"){let B=0;do y.type==="mopen"?B+=1:y.type==="mclose"&&(B-=1),y=y.leftSibling;while(!y.isFirstSibling&&B!==0);M=e.offsetOf(y)}else if(t==="backward")if(y.type==="first")for(;M>0&&y.type==="first";)M-=1,y=e.at(M);else{const B=y.type;y.type==="subsup"&&(M=e.offsetOf(e.at(M).leftSibling)),M-=1;let $=(i=e.at(M))==null?void 0:i.type;for(;M>=0&&$===B;)((a=e.at(M))==null?void 0:a.type)==="subsup"?M=e.offsetOf(e.at(M).leftSibling):M-=1,$=e.at(M).type}else{const{type:B}=y;let $=(s=e.at(M))==null?void 0:s.type;const{lastOffset:oe}=e;for(;M<=oe&&($===B||$==="subsup");){for(;((u=e.at(M).rightSibling)==null?void 0:u.type)==="subsup";)M=e.offsetOf(e.at(M).rightSibling);M+=1,$=(d=e.at(M))==null?void 0:d.type}M-=1}if((h=r==null?void 0:r.extend)!=null&&h){if(!e.setSelection(e.anchor,M))return e.announce("plonk"),!1}else{if(M===e.position)return e.announce("plonk"),!1;e.position=M}return e.announce("move",p),e.mathfield.stopCoalescingUndo(),!0}function io(e,t,r){var n,i;if(r=r!=null?r:{extend:!1},e.mathfield.adoptStyle=t==="backward"?"right":"left",t!=="forward"){const[u,d]=Zf(e);u!==void 0&&d!==void 0&&e.deleteAtoms([u,d])}if(t==="upward")return Um(e,r);if(t==="downward")return Gm(e,r);if(r.extend){let u=qd(e,e.position,t);u<0&&(u=0),u>e.lastOffset&&(u=e.lastOffset);const d=e.setSelection(e.anchor,u);return e.mathfield.stopCoalescingUndo(),d}if(e.selectionIsPlaceholder){e.collapseSelection(t);const u=io(e,t);return e.mathfield.stopCoalescingUndo(),u}let a=e.position;const s=a;if(e.collapseSelection(t)?(a=e.position,uh(e,a)||(a=qd(e,a,t))):a=qd(e,a,t),a<0||a>e.lastOffset){let u=!0;return e.silenceNotifications||(u=(i=(n=e.mathfield.host)==null?void 0:n.dispatchEvent(new CustomEvent("move-out",{detail:{direction:t},cancelable:!0,bubbles:!0,composed:!0})))!=null?i:!0),u&&e.announce("plonk"),u}return e.setPositionHandlingPlaceholder(a),e.mathfield.stopCoalescingUndo(),e.announce("move",s),!0}function qd(e,t,r){return t=t+(r==="forward"?1:-1),t<0||t>e.lastOffset||uh(e,t)?t:qd(e,t,r)}function uh(e,t){var r;const n=e.at(t);let i=n.parent;for(;i&&!i.inCaptureSelection;)i=i.parent;return!(i!=null&&i.inCaptureSelection||(r=n.parent)!=null&&r.skipBoundary&&(!n.isFirstSibling&&n.isLastSibling||n.type==="first")||e.mathfield.hasEditablePrompts&&!n.parentPrompt)}function jm(e,t,r){let n=1/0,i=0;for(;i<t.length;i++){const a=md(e.getHTMLElement(t[i])).right,s=Math.abs(r-a);if(s<=n)n=s;else break}return t[i-1]}function Xd(e,t,r,n,i){const a=e.mathfield.hasEditablePrompts,s=a?r.filter(h=>h.type==="prompt"&&!h.captureSelection):r,u=md(e.mathfield.getHTMLElement(t)).right,d=e.offsetOf(jm(e.mathfield,s,u))-(a?1:0);if(n){const[h,p]=e.selection.ranges[0];let y;d<(i==="up"?h:p)?y={ranges:[[d,p]],direction:"backward"}:y={ranges:[[h,d]],direction:"forward"},e.setSelection(y)}else e.setPositionHandlingPlaceholder(d);e.announce(`move ${i}`)}function Um(e,t){var r,n;const i=(r=t==null?void 0:t.extend)!=null?r:!1;i||e.collapseSelection("backward");const a=()=>{var d,h;let p=!0;return e.silenceNotifications||(p=(h=(d=e.mathfield.host)==null?void 0:d.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"upward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?h:!0),e.announce(p?"plonk":"line"),p},s=e.at(e.position);let u=s;for(;u&&u.parentBranch!=="below"&&!(Array.isArray(u.parentBranch)&&u.parent instanceof jr);)u=u.parent;if(Array.isArray(u==null?void 0:u.parentBranch)&&u.parent instanceof jr){const d=u.parent;if(u.parentBranch[0]<1)return a();const h=u.parentBranch[0]-1,p=d.array[h][u.parentBranch[1]];if(!p.some(M=>M.type==="prompt"&&!M.captureSelection)&&e.mathfield.hasEditablePrompts)return a();Xd(e,s,p,i,"up")}else if(u){const d=(n=u.parent.branch("above"))!=null?n:u.parent.createBranch("above");if(!d.some(p=>p.type==="prompt"&&p.placeholderId)&&e.mathfield.hasEditablePrompts)return a();Xd(e,s,d,i,"up")}else return a();return e.mathfield.stopCoalescingUndo(),!0}function Gm(e,t){var r,n;const i=(r=t==null?void 0:t.extend)!=null?r:!1;i||e.collapseSelection("forward");const a=()=>{var d,h;let p=!0;return e.silenceNotifications||(p=(h=(d=e.mathfield.host)==null?void 0:d.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"downward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?h:!0),e.announce(p?"plonk":"line"),p},s=e.at(e.position);let u=s;for(;u&&u.parentBranch!=="above"&&!(Array.isArray(u.parentBranch)&&u.parent instanceof jr);)u=u.parent;if(Array.isArray(u==null?void 0:u.parentBranch)&&u.parent instanceof jr){const d=u.parent;if(u.parentBranch[0]+1>d.array.length-1)return a();const h=u.parentBranch[0]+1,p=d.array[h][u.parentBranch[1]];if(!p.some(M=>M.type==="prompt"&&!M.captureSelection)&&e.mathfield.hasEditablePrompts)return a();Xd(e,s,p,i,"down")}else if(u){const d=(n=u.parent.branch("below"))!=null?n:u.parent.createBranch("below");if(!d.some(p=>p.type==="prompt")&&e.mathfield.hasEditablePrompts)return a();Xd(e,s,d,i,"down")}else return a();return!0}function dh(e){const t=e.position,r=e.at(t).parent;return r!=null&&r.parent?(e.position=e.offsetOf(r),e.mathfield.stopCoalescingUndo(),e.announce("move",t),!0):(e.announce("plonk"),!1)}function qm(e){let t=0,r=e.at(e.position),n=!1;for(;r;)(!r.hasEmptyBranch("superscript")||!r.hasEmptyBranch("subscript"))&&(t+=1),r.hasEmptyBranch("superscript")?r.hasEmptyBranch("subscript")||(n=!1):n=!0,r=r.parent;return n?t:0}function Xm(e){let t=0,r=e.at(e.position),n=!1;for(;r;)(!r.hasEmptyBranch("superscript")||!r.hasEmptyBranch("subscript"))&&(t+=1),r.hasEmptyBranch("superscript")?r.hasEmptyBranch("subscript")||(n=!0):n=!1,r=r.parent;return n?t:0}function fh(e){var t;if(e.collapseSelection(),qm(e)>=e.mathfield.options.scriptDepth[1])return e.announce("plonk"),!1;let r=e.at(e.position);return r.subsupPlacement===void 0&&(((t=r.rightSibling)==null?void 0:t.type)!=="subsup"&&r.parent.addChildAfter(new m({style:r.computedStyle}),r),r=r.rightSibling),r.createBranch("superscript"),e.setSelection(e.getSiblingsRange(e.offsetOf(r.superscript[0]))),!0}function hh(e){var t;if(e.collapseSelection(),Xm(e)>=e.mathfield.options.scriptDepth[0])return e.announce("plonk"),!1;let r=e.at(e.position);return r.subsupPlacement===void 0&&(((t=e.at(e.position+1))==null?void 0:t.type)!=="subsup"&&r.parent.addChildAfter(new m({style:e.at(e.position).computedStyle}),r),r=e.at(e.position+1)),r.createBranch("subscript"),e.setSelection(e.getSiblingsRange(e.offsetOf(r.subscript[0]))),!0}function Jm(){function e(d){const h=[],p=[];return[...d.querySelectorAll(`input, select, textarea, a[href], button,
[tabindex], audio[controls], video[controls],
[contenteditable]:not([contenteditable="false"]), details>summary`)].filter(t).forEach((M,B)=>{const $=n(M);$===0?h.push(M):p.push({documentOrder:B,tabIndex:$,node:M})}),p.sort((M,B)=>M.tabIndex===B.tabIndex?M.documentOrder-B.documentOrder:M.tabIndex-B.tabIndex).map(M=>M.node).concat(h)}function t(d){return!(!r(d)||i(d)||n(d)<0)}function r(d){return!(d.disabled||d.type==="hidden"&&d.tagName.toUpperCase()==="INPUT"||u(d))}function n(d){var h;const p=Number.parseInt((h=d.getAttribute("tabindex"))!=null?h:"NaN",10);return Number.isNaN(p)?d.contentEditable==="true"||(d.nodeName==="AUDIO"||d.nodeName==="VIDEO")&&d.getAttribute("tabindex")===null?0:d.tabIndex:p}function i(d){return d.tagName.toUpperCase()==="INPUT"&&d.type==="radio"&&!s(d)}function a(d,h){for(const p of d)if(p.checked&&p.form===h)return p;return null}function s(d){var h;if(!d.name)return!0;const y=((h=d.form)!=null?h:d.ownerDocument).querySelectorAll('input[type="radio"][name="'+d.name+'"]'),M=a(y,d.form);return!M||M===d}function u(d){if(!Ne()||d===document.activeElement||d.contains(document.activeElement))return!1;if(getComputedStyle(d).visibility==="hidden")return!0;const h=d.getBoundingClientRect();if(h.width===0||h.height===0)return!0;for(;d;){if(getComputedStyle(d).display==="none")return!0;d=d.parentElement}return!1}return Ne()?e(document.body):[]}function Si(e,t,r="forward"){const n=e.position;if(Array.isArray(t)){const i=e.offsetOf(t[0]),a=e.offsetOf(t[t.length-1]);return r==="forward"?e.setSelection(i,a):e.setSelection(a,i),e.announce("move",n),e.mathfield.stopCoalescingUndo(),!0}return r==="forward"?Si(e,[t.leftSibling,t]):Si(e,[t,t.leftSibling])}function Ra(e,t){const r=e.position;if(typeof t=="number"&&(t=e.at(t)),t.type==="prompt")e.setSelection(e.offsetOf(t.firstChild),e.offsetOf(t.lastChild));else{const n=e.offsetOf(t);t.type==="placeholder"?e.setSelection(n-1,n):e.position=n}return e.announce("move",r),e.mathfield.stopCoalescingUndo(),!0}function Jd(e,t,r=!0){var n,i;const a=t==="forward"?1:-1;e.at(e.anchor).type==="placeholder"&&io(e,t);let s;const u=e.at(e.anchor).parentPrompt;u?t==="forward"?s=e.offsetOf(u)+1:s=e.offsetOf(u.leftSibling):s=Math.max(e.position+a,0);const d=hf(e,s,t);if(!d||t==="forward"&&e.offsetOf(d)<s||t==="backward"&&e.offsetOf(d)>s){if(!r||!((i=(n=e.mathfield.host)==null?void 0:n.dispatchEvent(new CustomEvent("move-out",{detail:{direction:t},cancelable:!0,bubbles:!0,composed:!0})))==null||i))return e.announce("plonk"),!1;const p=Jm();if(!document.activeElement||p.length<=1)return e.announce("plonk"),!1;let y=p.indexOf(document.activeElement)+a;return y<0&&(y=p.length-1),y>=p.length&&(y=0),p[y].focus(),e.mathfield.stopCoalescingUndo(),!0}return Ra(e,d),!0}function hf(e,t=0,r="forward"){return e.findAtom(n=>n.type==="placeholder"||n.type==="prompt"||!e.mathfield.readOnly&&n.treeDepth>2&&n.isFirstSibling&&n.isLastSibling,t,r)}Vi({moveToOpposite:e=>{const t={superscript:"subscript",subscript:"superscript",above:"below",below:"above"},r=e.at(e.position),{parent:n}=r;if(!n)return e.announce("plonk"),!1;const i=r.parentBranch;let a;if(typeof i=="string"&&(a=t[i]),!a){const u=r.subsupPlacement?hh(e):fh(e);return e.mathfield.stopCoalescingUndo(),u}n.branch(a)||n.createBranch(a);const s=e.setSelection(e.getBranchRange(e.offsetOf(n),a));return e.mathfield.stopCoalescingUndo(),s},moveBeforeParent:e=>{const{parent:t}=e.at(e.position);return t?(e.position=e.offsetOf(t),e.mathfield.stopCoalescingUndo(),!0):(e.announce("plonk"),!1)},moveAfterParent:e=>dh(e),moveToNextChar:e=>io(e,"forward"),moveToPreviousChar:e=>io(e,"backward"),moveUp:e=>io(e,"upward"),moveDown:e=>io(e,"downward"),moveToNextWord:e=>Wl(e,"forward"),moveToPreviousWord:e=>Wl(e,"backward"),moveToGroupStart:e=>{const t=e.offsetOf(e.at(e.position).firstSibling);return t===e.position?(e.announce("plonk"),!1):(e.position=t,e.mathfield.stopCoalescingUndo(),!0)},moveToGroupEnd:e=>{const t=e.offsetOf(e.at(e.position).lastSibling);return t===e.position?(e.announce("plonk"),!1):(e.position=t,e.mathfield.stopCoalescingUndo(),!0)},moveToNextGroup:e=>{var t,r,n,i;if(e.position===e.lastOffset&&e.anchor===e.lastOffset)return Jd(e,"forward");const a=e.at(e.position);if(a.mode==="text"){if(e.selectionIsCollapsed){let M=a;for(;M&&M.mode==="text";)M=M.leftSibling;let B=a;for(;((t=B.rightSibling)==null?void 0:t.mode)==="text";)B=B.rightSibling;if(M&&B)return Si(e,[M,B])}if(a.rightSibling.mode==="text"){let M=a;for(;M&&M.mode==="text";)M=M.rightSibling;return M?(Ra(e,(r=M.leftSibling)!=null?r:M),e.mathfield.switchMode("math"),!0):Ra(e,e.lastOffset)}}const u=e.at(e.anchor).parentPrompt,d=u?e.offsetOf(u)+1:Math.max(e.position+1,0),h=hf(e,d,"forward");if(h)return Ra(e,h);const p=ph(e,a,M=>M.type==="leftright"||M.type==="text","forward");if(p){if(p.mode==="text"){let M=p;for(;M&&M.mode==="text";)M=M.rightSibling;return Si(e,[(n=p.leftSibling)!=null?n:p,(i=M.leftSibling)!=null?i:M])}return Si(e,p)}const y=a.parent;if(y){if(y.type==="leftright"||y.type==="surd")return Si(e,y);if(a.parentBranch==="superscript"&&y.subscript)return Si(e,y.subscript);if(a.parentBranch==="above"&&y.below)return Si(e,y.below);if(a.parentBranch==="superscript"||a.parentBranch==="subscript")return Ra(e,y);if(a.parentBranch==="above"||a.parentBranch==="below")return Si(e,y)}return Ra(e,e.lastOffset)},moveToPreviousGroup:e=>{var t;if(e.position===0&&e.anchor===0)return Jd(e,"backward");let r=e.at(e.position);const n=r.mode;if(n==="text"){if(e.selectionIsCollapsed){let u=r;for(;u&&u.mode==="text";)u=u.leftSibling;let d=r;for(;((t=d.rightSibling)==null?void 0:t.mode)==="text";)d=d.rightSibling;if(u&&d)return Si(e,[u,d])}for(;r&&r.mode==="text";)r=r.leftSibling;return r?Ra(e,r):Ra(e,0)}const i=e.at(e.anchor).parentPrompt,a=i?e.offsetOf(i.leftSibling):Math.max(e.position-1,0),s=hf(e,a,"backward");if(s)return Ra(e,s);if(n==="math"){const u=ph(e,r,h=>h.type==="leftright"||h.type==="text","backward");if(u){if(u.mode==="text"){let h=u;for(;h&&h.mode==="text";)h=h.leftSibling;return Si(e,[u,h])}return Si(e,u)}const d=r.parent;if(d){if(d.type==="leftright"||d.type==="surd")return Si(e,d);if(r.parentBranch==="subscript"&&d.superscript)return Si(e,d.superscript);if(r.parentBranch==="below"&&d.above)return Si(e,d.above);if(r.parentBranch==="superscript"||r.parentBranch==="subscript")return Ra(e,d);if(r.parentBranch==="above"||r.parentBranch==="below")return Si(e,d)}return Ra(e,0)}return!1},moveToMathfieldStart:e=>e.selectionIsCollapsed&&e.position===0?(e.announce("plonk"),!1):(e.position=0,e.mathfield.stopCoalescingUndo(),!0),moveToMathfieldEnd:e=>e.selectionIsCollapsed&&e.position===e.lastOffset?(e.announce("plonk"),!1):(e.position=e.lastOffset,e.mathfield.stopCoalescingUndo(),!0),moveToSuperscript:fh,moveToSubscript:hh},{target:"model",changeSelection:!0}),Vi({moveToNextPlaceholder:e=>Jd(e,"forward"),moveToPreviousPlaceholder:e=>Jd(e,"backward")},{target:"model",changeSelection:!0,audioFeedback:"return"});function ph(e,t,r,n){if(n==="forward"){let a=t.rightSibling;for(;a&&!r(a);)a=a.rightSibling;return a}let i=t.leftSibling;for(;i&&!r(i);)i=i.leftSibling;return i}function Yd(e,t,r){typeof t=="function"&&(r=t,t=1/0),t===void 0&&(t=1/0);let n=e.position,i=!1,a="";for(;!i;){const s=e.at(n);i=t===0||s===void 0||s.type==="first"||s.mode!=="math"||!(s.type&&/mord|mpunct|operator/.test(s.type)||s.type==="mop"&&/[a-zA-Z ]+/.test(s.value))||!s.hasEmptyBranch("superscript")||!s.hasEmptyBranch("subscript")||typeof r=="function"&&!r(s),i||(s.mode="text",s.command=s.value,s.verbatimLatex=void 0,a+=s.value),n-=1,t-=1}e.contentDidChange({data:a,inputType:"insertText"})}function Ns(e,t,r){typeof t=="function"&&(r=t,t=1/0),t===void 0&&(t=1/0);let n=e.position,i=!1;const a=[];for(;!i;){const s=e.at(n);i=t===0||!s||s.type==="first"||s.isFirstSibling||s.mode!=="text"||s.value===" "||typeof r=="function"&&!r(s),i||(a.push(Se.serialize([s],{defaultMode:"math"})),s.mode="math"),n-=1,t-=1}pf(e),e.contentDidChange({data:kr(a),inputType:"insertText"})}function pf(e){var t;let r=e.position-1;for(;r>=0&&((t=e.at(r))==null?void 0:t.mode)==="math";)r-=1;if(!(r<0)&&e.at(r).mode==="text"&&e.at(r).value===" "&&e.at(r-1).mode==="math"){e.at(r-1).parent.removeChild(e.at(r-1));const n=e.silenceNotifications;e.silenceNotifications=!0,e.position-=1,e.silenceNotifications=n,e.contentDidChange({inputType:"deleteContent"})}}function Ym(e){let t="",r=e.position,n=!1;for(;!n;){const i=e.at(r);n=!(i&&(i.mode==="text"||i.mode==="math"&&i.type&&/mord|mpunct/.test(i.type))),n||(t=i.value+t),r-=1}return t}function Qm(e,t,r){const{model:n}=e;if(n.mode==="latex"||!n.at(n.position).isLastSibling||!r||!Id(r))return!1;const i=Ol(r);if(!n.selectionIsCollapsed)return!!(e.model.mode==="text"&&/[/_^]/.test(i));const a=Ym(n)+i;if(e.model.mode==="text"){if(t==="Esc"||/[/\\]/.test(i))return!0;if(/[\^_]/.test(i))return/(^|\s)[a-zA-Z][^_]$/.test(a)&&Ns(n,1),!0;const s={")":"(","}":"{","]":"["}[i],{parent:u}=n.at(n.position);if(s&&u instanceof cn&&u.leftDelim===s)return!0;if(/(^|[^a-zA-Z])(a|I) $/.test(a))return!1;if(/[$€£₤₺¥¤฿¢₡₧₨₹₩₱]/u.test(i))return!0;if(/(^|[^a-zA-Z'])[a-zA-Z] $/.test(a))return Ns(n,1),!1;if(/\D\.[^\d\s]$/.test(a)){Ns(n,1);const d=n.at(n.position);return d.value="\u22C5",d.style.variant="normal",d.command="\\cdot",d.verbatimLatex=void 0,n.contentDidChange({data:"\\cdot",inputType:"insertText"}),!0}if(/(^|\s)[a-zA-Z][^a-zA-Z]$/.test(a)||/\.\d$/.test(a)||/\([\d+\-.]$/.test(a))return Ns(n,1),!0;if(/\([a-z][,;]$/.test(a))return Ns(n,2),!0;if(/[\d+\-=><*|]$/.test(i))return pf(n),!0}else{if(t==="[Space]")return Yd(n,void 0,s=>/[a-z][:,;.]$/.test(s.value)),!0;if(/[a-zA-Z]{3,}$/.test(a)&&!/(dxd|abc|xyz|uvw)$/.test(a))return Yd(n,void 0,s=>/[a-zA-Z]/.test(s.value)),!0;if(/(^|\W)(if)$/i.test(a))return Yd(n,1),!0;if(/(\u0393|\u0394|\u0398|\u039B|\u039E|\u03A0|\u03A3|\u03A5|\u03A6|\u03A8|\u03A9|[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5){3,}$/u.test(a)&&!/(αβγ)$/.test(a))return Yd(n,void 0,s=>/(:|,|;|.|\u0393|\u0394|\u0398|\u039B|\u039E|\u03A0|\u03A3|\u03A5|\u03A6|\u03A8|\u03A9|[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5)/u.test(s.value)),!0;if(i==="?"||i==="."&&!/[\d-+]\.$/.test(a))return!0}return!1}function eg(e,t){if(!e.isSelectionEditable||!e.keystrokeCaptionVisible)return;const r=mh(),n=e.element.getBoundingClientRect();r.style.left=`${n.left}px`,r.style.top=`${n.top-64}px`,r.innerHTML=window.MathfieldElement.createHTML("<span>"+(tf(t)||t)+"</span>"+r.innerHTML),r.style.visibility="visible",setTimeout(()=>{r.childNodes.length>0&&r.childNodes[r.childNodes.length-1].remove(),r.childNodes.length===0&&(r.style.visibility="hidden")},3e3)}function tg(e){if(e.keystrokeCaptionVisible=!e.keystrokeCaptionVisible,e.keystrokeCaptionVisible){const t=mh();t.innerHTML=""}else{const t=Pd("mathlive-keystroke-caption-panel");t.style.visibility="hidden"}return!1}function mh(){const e=document.getElementById("mathlive-keystroke-caption-panel");return e||(Yi("keystroke-caption"),Yi("core"),Pd("mathlive-keystroke-caption-panel"))}function rg(){document.getElementById("mathlive-keystroke-caption-panel")&&(nf("mathlive-keystroke-caption-panel"),pa("core"),pa("keystroke-caption"))}function gh(e,t){var r,n,i;const{model:a}=e,s=Wf(t);if(t.isTrusted){Zp(t);const B=Hc();e.keyboardLayout!==B.id&&(e.keyboardLayout=B.id,e._keybindings=void 0)}if(clearTimeout(e.inlineShortcutBufferFlushTimer),e.inlineShortcutBufferFlushTimer=0,eg(e,s),t.isTrusted&&t.defaultPrevented)return e.flushInlineShortcutBuffer(),!1;let u,d="",h;const p=e.inlineShortcutBuffer;if(e.isSelectionEditable){if(a.mode==="math")if(s==="[Backspace]")p.pop();else if(!Id(t))e.flushInlineShortcutBuffer();else{const B=Ol(t),$=[...(n=(r=p[p.length-1])==null?void 0:r.keystrokes)!=null?n:[],B];p.push({state:a.getState(),keystrokes:$,leftSiblings:ng(e)});let oe=0,Ve="";for(;!u&&oe<$.length;)h=p.length-($.length-oe),Ve=$.slice(oe).join(""),u=Bc(p[h].leftSiblings,Ve,e.options.inlineShortcuts),!u&&/^[a-zA-Z][a-zA-Z0-9]+?([_\^][a-zA-Z0-9\*\+\-]+?)?$/.test(Ve)&&(u=e.options.onInlineShortcut(e,Ve)),oe+=1;e.flushInlineShortcutBuffer({defer:!0})}e.options.smartMode&&(u?e.switchMode("math"):Qm(e,s,t)&&(e.switchMode({math:"text",text:"math"}[a.mode]),d=""))}if(!u){if(d||(d=Yp(e.keybindings,a.mode,t)),!d&&(s==="[Enter]"||s==="[Return]")){let B=!1;return a.contentWillChange({inputType:"insertLineBreak"})&&(e.host&&(B=!e.host.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),B||t.preventDefault&&(t.preventDefault(),t.stopPropagation()),a.contentDidChange({inputType:"insertLineBreak"})),B}if((!d||s==="[Space]")&&a.mode==="math"){if(s==="[Space]"){if(e.adoptStyle="none",e.flushInlineShortcutBuffer(),e.options.mathModeSpace)return Qr.insert(a,e.options.mathModeSpace,{format:"latex",mode:"math"}),e.snapshot("insert-space"),d="",e.dirty=!0,e.scrollIntoView(),t.preventDefault&&(t.preventDefault(),t.stopPropagation()),!1;const B=a.at(a.position+1),$=a.at(a.position-1);if((B==null?void 0:B.mode)==="text"||($==null?void 0:$.mode)==="text")return Qr.insert(a," ",{mode:"text"}),e.snapshot("insert-space"),e.dirty=!0,e.scrollIntoView(),!1}(i=a.at(a.position))!=null&&i.isDigit()&&window.MathfieldElement.decimalSeparator===","&&Ol(t)===","&&(d="insertDecimalSeparator")}}if(!u&&!d){if(a.mathfield.smartFence){if(gf(a,Ol(t),e.effectiveStyle))return e.dirty=!0,e.scrollIntoView(),t.preventDefault&&t.preventDefault(),!1}else{const{parent:B}=a.at(a.position);if(B instanceof cn&&B.rightDelim==="?"&&a.at(a.position).isLastSibling&&/^[)}\]|]$/.test(s))return e.snapshot(),B.isDirty=!0,B.rightDelim=s,a.position+=1,a.selectionDidChange(),a.contentDidChange({data:Ol(t),inputType:"insertText"}),e.snapshot("insert-fence"),e.dirty=!0,e.scrollIntoView(),t.preventDefault&&t.preventDefault(),!1;if(!a.selectionIsCollapsed){const $=Ol(t);if($==="("||$==="{"||$==="["){const oe={"(":"(","{":"\\lbrace","[":"\\lbrack"}[$],Ve={"(":")","{":"\\rbrace","[":"\\rbrack"}[$],[re,De]=Qn(a.selection);return e.snapshot(),a.position=De,Qr.insert(a,Ve,{format:"latex"}),a.position=re,Qr.insert(a,oe,{format:"latex"}),a.setSelection(re+1,De+1),a.contentDidChange({data:$,inputType:"insertText"}),e.snapshot("insert-fence"),e.dirty=!0,e.scrollIntoView(),t.preventDefault&&t.preventDefault(),!1}}}return!0}const y=a.at(Math.max(a.position,a.anchor)),{parent:M}=y;if(d==="moveAfterParent"&&(M==null?void 0:M.type)==="leftright"&&y.isLastSibling&&e.options.smartFence&&gf(a,".",e.defaultStyle)&&(d="",Sn(e)),e.keyboardDelegate.cancelComposition(),d)e.executeCommand(d);else if(u){const B=e.effectiveStyle;a.setState(p[h].state);const $=p[p.length-1].keystrokes;for(const oe of $)Qr.insert(a,oe,{silenceNotifications:!0,style:B});e.snapshot("insert-shortcut"),a.setState(p[h].state),a.deferNotifications({content:!0,selection:!0,data:u,type:"insertText"},()=>(Qr.insert(a,u,{format:"latex",style:B}),pf(e.model),u.endsWith(" ")&&(e.switchMode("text"),Qr.insert(a," ",{style:B,mode:"text"})),e.snapshot(),a.selectionIsCollapsed||e.flushInlineShortcutBuffer(),!0)),e.dirty=!0,a.announce("replacement")}return e.scrollIntoView(),t.preventDefault&&t.preventDefault(),!1}function mf(e,t,r){const{model:n}=e;if(!e.isSelectionEditable){n.announce("plonk");return}r!=null||(r={}),r.focus&&e.focus(),r.feedback&&window.MathfieldElement.playSound("keypress"),typeof r.mode=="string"&&(e.switchMode(r.mode),e.snapshot());let i=ed(t);const a=window.mathVirtualKeyboard;if(a!=null&&a.isShifted&&(i=typeof i=="string"?i.toUpperCase():i.map(d=>d.toUpperCase())),r.simulateKeystroke){let d=!0;for(const h of i)gh(e,new KeyboardEvent("keypress",{key:h}))&&(d=!1);if(d)return}const s=n.at(n.position),u=S(S({},s.computedStyle),e.defaultStyle);if(n.selectionIsCollapsed||(n.deleteAtoms(Qn(n.selection)),e.snapshot("delete")),n.mode==="latex")n.deferNotifications({content:!0,selection:!0,data:t,type:"insertText"},()=>{Td(e);for(const d of i)Qr.insert(n,d);e.snapshot("insert-latex"),Vc(e)});else if(n.mode==="text"){for(const d of i)Qr.insert(n,d,{style:u});e.snapshot("insert-text")}else if(n.mode==="math")for(const d of i)ig(e,d,u,s);e.dirty=!0,e.scrollIntoView()}function ng(e){const t=e.model,r=[];let n=t.at(Math.min(t.position,t.anchor));for(;n.type!=="first";)r.push(n),n=n.leftSibling;return r}function ig(e,t,r,n){const i=e.model;let a={"^":"moveToSuperscript",_:"moveToSubscript"," ":"moveAfterParent"}[t];if(t===" "&&e.options.mathModeSpace&&(a=["insert",e.options.mathModeSpace]),a){e.executeCommand(a);return}if(/\d/.test(t)&&e.options.smartSuperscript&&n.parentBranch==="superscript"&&n.parent.type!=="mop"&&n.parent.type!=="operator"&&n.parent.type!=="extensible-symbol"&&n.hasNoSiblings){ag(i),Qr.insert(i,t,{style:r}),e.snapshot(),dh(i),e.snapshot();return}if(/[a-zA-Z0-9]/.test(t)&&e.adoptStyle!=="none"){const s=e.adoptStyle==="left"?n:n.parent?n.rightSibling:null;(s==null?void 0:s.type)==="mord"&&/[a-zA-Z0-9]/.test(s.value)&&(r=S({},r),s.style.variant&&(r.variant=s.style.variant),s.style.variantStyle&&(r.variantStyle=s.style.variantStyle))}Qr.insert(i,t,{style:r}),e.snapshot(`insert-${i.at(i.position).type}`)}function ag(e){e.selectionIsCollapsed||(e.deleteAtoms(Qn(e.selection)),e.mathfield.snapshot("delete"))}function gf(e,t,r){if(!t||e.mode!=="math")return!1;const n=e.at(e.position),{parent:i}=n,a={"(":"(",")":")","{":"\\lbrace","}":"\\rbrace","[":"\\lbrack","]":"\\rbrack","|":"|"}[t];if(!a)return!1;const s=kl[a],u=El[a];if(!e.selectionIsCollapsed){e.mathfield.snapshot();const[d,h]=Qn(e.selection),p=e.extractAtoms([d,h]),y=i.addChildrenAfter([new cn("left...right",p,{leftDelim:a,rightDelim:u})],e.at(d));return e.setSelection(e.offsetOf(y.firstChild),e.offsetOf(y.lastChild)),e.mathfield.snapshot("insert-fence"),e.contentDidChange({data:a,inputType:"insertText"}),!0}if(a==="|"){const d=i instanceof cn?i.leftDelim+i.rightDelim:"";if(d==="\\lbrace\\rbrace"||d==="\\{\\}"||d==="\\lbrace?")return e.mathfield.snapshot(),Qr.insert(e,"\\,\\middle\\vert\\,",{format:"latex",style:r}),e.mathfield.snapshot("insert-fence"),e.contentDidChange({data:a,inputType:"insertText"}),!0}if(u){if(i instanceof cn&&i.firstChild===n&&(i.leftDelim==="?"||i.leftDelim==="."))return i.leftDelim=a,i.isDirty=!0,e.mathfield.snapshot(),e.contentDidChange({data:a,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;if(!(i instanceof cn)){let y=n;for(;y&&!(y.type==="mclose"&&y.value===u);)y=y.rightSibling;if(y){e.mathfield.snapshot();const M=e.extractAtoms([e.offsetOf(n),e.offsetOf(y)]);return M.pop(),i.addChildrenAfter([new cn("left...right",M,{leftDelim:a,rightDelim:u})],n),e.position=e.offsetOf(i.firstChild)+1,e.contentDidChange({data:a,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}}const d=e.offsetOf(n.lastSibling);let h;for(h=e.position;h<=d;h++){const y=e.at(h);if(y instanceof cn&&(y.leftDelim==="?"||y.leftDelim===".")&&vh(a,y.rightDelim))break}const p=e.at(h);if(h<=d&&p instanceof cn){p.leftDelim=a,e.mathfield.snapshot();let y=e.extractAtoms([e.position,h-1]);return y=y.filter(M=>M.type!=="first"),p.addChildren(y,p.parentBranch),e.position+=1,e.contentDidChange({data:a,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}if(i instanceof cn&&(i.leftDelim==="?"||i.leftDelim===".")&&vh(a,i.rightDelim)){i.isDirty=!0,i.leftDelim=a,e.mathfield.snapshot();const y=e.extractAtoms([e.offsetOf(n.firstSibling),e.position]);for(const M of y)i.parent.addChildBefore(M,i);return e.contentDidChange({data:a,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}if(!(i instanceof cn&&i.leftDelim==="|")){if(e.mathfield.snapshot(),Qr.insert(e,`\\left${a}\\right?`,{format:"latex",style:r}),n.lastSibling.type!=="first"){const y=e.offsetOf(n.lastSibling),M=e.extractAtoms([e.position,y]);e.at(e.position).body=M,e.position-=1}return e.mathfield.snapshot("insert-fence"),!0}}if(s){let d=n;for(;d;){if(d.type==="mopen"&&d.value===s){e.mathfield.snapshot();const B=d.leftSibling,$=e.extractAtoms([e.offsetOf(d.leftSibling),e.offsetOf(n)]);$.shift();const oe=new cn("left...right",$,{leftDelim:s,rightDelim:a});return i.addChildrenAfter([oe],B),e.position=e.offsetOf(oe),e.contentDidChange({data:a,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}d=d.leftSibling}if(i instanceof cn&&n.isLastSibling&&vf(i.leftDelim,a))return e.mathfield.snapshot(),i.isDirty=!0,i.rightDelim=a,e.position+=1,e.contentDidChange({data:a,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;const h=e.offsetOf(n.firstSibling);let p;for(p=e.position;p>=h;p--){const B=e.at(p);if(B instanceof cn&&(B.rightDelim==="?"||B.rightDelim===".")&&vf(B.leftDelim,a))break}const y=e.at(p);if(p>=h&&y instanceof cn)return e.mathfield.snapshot(),y.rightDelim=a,y.addChildren(e.extractAtoms([p,e.position]),y.parentBranch),e.contentDidChange({data:a,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;if(i instanceof cn&&(i.rightDelim==="?"||i.rightDelim===".")&&vf(i.leftDelim,a))return e.mathfield.snapshot(),i.isDirty=!0,i.rightDelim=a,i.parent.addChildren(e.extractAtoms([e.position,e.offsetOf(n.lastSibling)]),i.parentBranch),e.position=e.offsetOf(i),e.contentDidChange({data:a,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;const M=i.parent;return M instanceof cn&&(M.rightDelim==="?"||M.rightDelim===".")&&e.at(e.position).isLastSibling?(e.position=e.offsetOf(M),gf(e,a,r)):!1}return!1}function vf(e,t){return e?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(e)?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(t):El[e]===t:!0}function vh(e,t){return t?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(t)?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(e):kl[t]===e:!0}Vi({undo:e=>(e.undo(),!0),redo:e=>(e.redo(),!0),scrollIntoView:e=>(e.scrollIntoView(),!0),scrollToStart:e=>(e.field.scroll(0,0),!0),scrollToEnd:e=>{const t=e.field.getBoundingClientRect();return e.field.scroll(t.left-window.scrollX,0),!0},toggleKeystrokeCaption:tg,toggleContextMenu:e=>{const t=e.toggleContextMenu();return t||e.model.announce("plonk"),t},plonk:e=>(e.model.announce("plonk"),!0),switchMode:(e,t,r,n)=>(e.switchMode(t,r,n),!0),insert:(e,t,r)=>e.insert(t,r),typedText:(e,t,r)=>(mf(e,t,r),!0),insertDecimalSeparator:e=>{const t=e.model;return t.mode==="math"&&window.MathfieldElement.decimalSeparator===","&&t.at(Math.max(t.position,t.anchor)).isDigit()?(e.insert("{,}",{format:"latex"}),e.snapshot("insert-mord"),!0):(e.insert("."),!0)},commit:e=>{var t;return e.model.contentWillChange({inputType:"insertLineBreak"})&&((t=e.host)==null||t.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),e.model.contentDidChange({inputType:"insertLineBreak"})),!0},insertPrompt:(e,t,r)=>{const n=e.getPrompts();let i="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),a=0;for(;n.includes(i)&&a<100;){if(a===99)return console.error("could not find a unique ID after 100 tries"),!1;i="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),a++}return e.insert(`\\placeholder[${t!=null?t:i}]{}`,r),!0}}),Vi({copyToClipboard:e=>(e.focus(),e.model.selectionIsCollapsed&&e.select(),"queryCommandSupported"in document&&document.queryCommandSupported("copy")?document.execCommand("copy"):e.element.querySelector(".ML__keyboard-sink").dispatchEvent(new ClipboardEvent("copy",{bubbles:!0,composed:!0})),!1)},{target:"mathfield"}),Vi({cutToClipboard:e=>(e.focus(),"queryCommandSupported"in document&&document.queryCommandSupported("cut")?document.execCommand("cut"):e.element.querySelector(".ML__keyboard-sink").dispatchEvent(new ClipboardEvent("cut",{bubbles:!0,composed:!0})),!0),pasteFromClipboard:e=>(e.focus(),"queryCommandSupported"in document&&document.queryCommandSupported("paste")?(document.execCommand("paste"),!0):(navigator.clipboard.readText().then(t=>{t&&e.model.contentWillChange({inputType:"insertFromPaste",data:t})?(e.stopCoalescingUndo(),e.stopRecording(),e.insert(t,{mode:e.model.mode})&&(Vc(e),e.startRecording(),e.snapshot("paste"),e.model.contentDidChange({inputType:"insertFromPaste"}),Sn(e))):e.model.announce("plonk"),e.startRecording()}),!0))},{target:"mathfield",canUndo:!0,changeContent:!0,changeSelection:!0});function og(e,t){e.flushInlineShortcutBuffer(),e.stopCoalescingUndo();const r=bf(e,t),{model:n}=e;return n.selectionIsCollapsed?(e.defaultStyle.fontSeries&&r.fontSeries===e.defaultStyle.fontSeries&&(r.fontSeries="auto"),r.fontShape&&r.fontShape===e.defaultStyle.fontShape&&(r.fontShape="auto"),r.color&&r.color===e.defaultStyle.color&&(r.color="none"),r.backgroundColor&&r.backgroundColor===e.defaultStyle.backgroundColor&&(r.backgroundColor="none"),r.fontSize&&r.fontSize===e.defaultStyle.fontSize&&(r.fontSize="auto"),e.defaultStyle=S(S({},e.defaultStyle),r)):e.model.deferNotifications({content:!0,type:"insertText"},()=>{n.selection.ranges.forEach(i=>uf(n,i,r,{operation:"toggle"})),e.snapshot("style-change")}),!0}Vi({applyStyle:og},{target:"mathfield",canUndo:!0,changeContent:!0});function bf(e,t){var r,n,i,a,s,u,d,h,p,y;const M={};if(typeof t.color=="string"){const $=(n=e.colorMap((r=t.color)!=null?r:t.verbatimColor))!=null?n:"none";$!==t.color&&(M.verbatimColor=(i=t.verbatimColor)!=null?i:t.color),M.color=$}if(typeof t.backgroundColor=="string"){const $=(s=e.backgroundColorMap((a=t.backgroundColor)!=null?a:t.verbatimBackgroundColor))!=null?s:"none";$!==t.backgroundColor&&(M.verbatimBackgroundColor=(u=t.verbatimBackgroundColor)!=null?u:t.backgroundColor),M.backgroundColor=$}typeof t.fontFamily=="string"&&(M.fontFamily=t.fontFamily),typeof t.series=="string"&&(M.fontSeries=t.series),typeof t.fontSeries=="string"&&(M.fontSeries=t.fontSeries.toLowerCase()),M.fontSeries&&(M.fontSeries=(d={bold:"b",medium:"m",normal:"m"}[M.fontSeries])!=null?d:M.fontSeries),typeof t.shape=="string"&&(M.fontShape=t.shape),typeof t.fontShape=="string"&&(M.fontShape=t.fontShape.toLowerCase()),M.fontShape&&(M.fontShape=(h={italic:"it",up:"n",upright:"n",normal:"n"}[M.fontShape])!=null?h:M.fontShape),t.variant&&(M.variant=t.variant.toLowerCase()),t.variantStyle&&(M.variantStyle=t.variantStyle.toLowerCase());const B=(p=t.size)!=null?p:t.fontSize;return typeof B=="number"?M.fontSize=Math.max(1,Math.min(10,B)):typeof B=="string"&&(M.fontSize=(y={size1:1,size2:2,size3:3,size4:4,size5:5,size6:6,size7:7,size8:8,size9:9,size10:10}[B.toLowerCase()])!=null?y:{tiny:1,scriptsize:2,footnotesize:3,small:4,normal:5,normalsize:5,large:6,Large:7,LARGE:8,huge:9,Huge:10}[B]),M}function yf(e){let[t,r]=Qn(e.selection);if(t=bh(e,t,"backward"),r=bh(e,r,"forward"),t===r){const n=e.at(t);if(n.type==="leftright")return e.setSelection(e.offsetOf(n.firstChild)-1,r);if(n.type==="first"&&(n.parent.type==="leftright"||n.parent.type==="surd"))return e.setSelection(t-1,e.offsetOf(n.parent.lastChild)+1);e.setSelection(t-1,r)}else e.setSelection(t,r);return!0}function bh(e,t,r){var n,i,a;let s=e.at(t);if(!s)return t;const u=r==="forward"?1:-1;if(s.mode==="text"){for(;s&&!(s.mode!=="text"||!K.test(s.value));)t+=u,s=e.at(t);return r==="backward"?t-1:t}if(s.mode==="latex"){if(/[a-zA-Z\*]/.test(s.value))if(r==="backward")for(;s&&s.mode==="latex"&&s.value!=="\\"&&/[a-zA-Z]/.test(s.value);)t+=u,s=e.at(t);else for(;s&&s.mode==="latex"&&/[a-zA-Z\*]/.test(s.value);)t+=u,s=e.at(t);else if(s.value==="{"){if(r==="forward"){for(;s&&s.mode==="latex"&&s.value!=="}";)t+=u,s=e.at(t);return t}return t-1}else if(s.value==="}"){if(r==="backward"){for(;s&&s.mode==="latex"&&s.value!=="{";)t+=u,s=e.at(t);return t-1}return t}return t-1}if(s.mode==="math"){if(s.isDigit()){for(;(n=e.at(t+u))!=null&&n.isDigit();)t+=u;return r==="backward"?t-1:t}if(s.style.variant||s.style.variantStyle){let d=(i=e.at(t))==null?void 0:i.style;for(;d&&d.variant===s.style.variant&&d.variantStyle===s.style.variantStyle;)d=(a=e.at(t+u))==null?void 0:a.style,t+=u;return r==="backward"?t-1:t}return t}return t}Vi({selectGroup:e=>{const t=yf(e);return t||e.announce("plonk"),t},selectAll:e=>e.setSelection(0,e.lastOffset),extendSelectionForward:e=>io(e,"forward",{extend:!0}),extendSelectionBackward:e=>io(e,"backward",{extend:!0}),extendToNextWord:e=>Wl(e,"forward",{extend:!0}),extendToPreviousWord:e=>Wl(e,"backward",{extend:!0}),extendSelectionUpward:e=>io(e,"upward",{extend:!0}),extendSelectionDownward:e=>io(e,"downward",{extend:!0}),extendToNextBoundary:e=>Wl(e,"forward",{extend:!0}),extendToPreviousBoundary:e=>Wl(e,"backward",{extend:!0}),extendToGroupStart:e=>{const t=e.setSelection(e.anchor,e.offsetOf(e.at(e.position).firstSibling));return t||e.announce("plonk"),t},extendToGroupEnd:e=>{const t=e.setSelection(e.anchor,e.offsetOf(e.at(e.position).lastSibling));return t||e.announce("plonk"),t},extendToMathFieldStart:e=>{const t=e.setSelection(e.anchor,0);return t||e.announce("plonk"),t},extendToMathFieldEnd:e=>{const t=e.setSelection(e.anchor,e.lastOffset);return t||e.announce("plonk"),t}},{target:"model",changeSelection:!0});var Fs=null,Xc=0,Qd=class ya{static start(t,r,n,i){var a;ya.element=t,(a=ya.controller)==null||a.abort(),ya.controller=new AbortController;const s={signal:ya.controller.signal};"PointerEvent"in window?(t.addEventListener("pointermove",n,s),t.addEventListener("pointerup",i,s),t.addEventListener("pointercancel",i,s),xf(r)&&(ya.pointerId=r.pointerId,t.setPointerCapture(r.pointerId))):(window.addEventListener("mousemove",n,s),window.addEventListener("blur",i,s),window.addEventListener("mouseup",i,s))}static stop(){var t;(t=ya.controller)==null||t.abort(),ya.controller=void 0,typeof ya.pointerId=="number"&&(ya.element.releasePointerCapture(ya.pointerId),ya.pointerId=void 0)}};function xf(e){return e!==null&&globalThis.PointerEvent!==void 0&&e instanceof PointerEvent}function yh(e,t){var r;if(t.buttons>1)return;e.atomBoundsCache=new Map;const n=e;let i,a=!1,s=!1,u="none",d=!1,h=!1;const p=t.clientX,y=t.clientY,M=Date.now(),B=n.field,$=setInterval(()=>{d?B.scroll({top:0,left:B.scrollLeft-16}):h&&B.scroll({top:0,left:B.scrollLeft+16})},32);function oe(){Qd.stop(),a=!1,clearInterval($),e.element.classList.remove("tracking"),t&&t.preventDefault()}function Ve(De){if(!n.hasFocus()){oe();return}const Xe=De.clientX,$e=De.clientY,yt=xf(De)&&De.pointerType==="touch"?20:5;if(Date.now()<M+500&&Math.abs(p-Xe)<yt&&Math.abs(y-$e)<yt){De.preventDefault(),De.stopPropagation();return}const Ot=B.getBoundingClientRect();h=Xe>Ot.right,d=Xe<Ot.left;let Dt=i;xf(De)&&(De.isPrimary||(Dt=Jc(n,De.clientX,De.clientY,{bias:0})));const Lr=Jc(n,Xe,$e,{bias:Xe<=p?Xe===p?0:-1:1});Dt>=0&&Lr>=0&&(n.model.extendSelectionTo(Dt,Lr),Sn(e)),s&&yf(n.model)}Fs&&Math.abs(Fs.x-p)<5&&Math.abs(Fs.y-y)<5&&Date.now()<Fs.time+500?(Xc+=1,Fs.time=M):(Fs={x:p,y,time:M},Xc=1);const re=B.getBoundingClientRect();if(p>=re.left&&p<=re.right&&y>=re.top&&y<=re.bottom){if(e.flushInlineShortcutBuffer(),e.adoptStyle="left",i=Jc(e,p,y,{bias:0}),i>=0){if(e.element.classList.add("tracking"),t.shiftKey){const De=e.model.selectionIsCollapsed;e.model.extendSelectionTo(e.model.anchor,i),jf(e.model)||De?u="all":u="selection"}else e.model.at(i).type==="placeholder"?(e.model.setSelection(i-1,i),u="selection"):((r=e.model.at(i).rightSibling)==null?void 0:r.type)==="placeholder"?(e.model.setSelection(i,i+1),u="selection"):(e.model.position=i,jf(e.model)?u="all":u="selection");e.defaultStyle={},t.detail===3||Xc>2?(oe(),(t.detail===3||Xc===3)&&(e.model.selection={ranges:[[0,e.model.lastOffset]]},u="all")):a||(a=!0,Qd.start(B,t,Ve,oe),(t.detail===2||Xc===2)&&(s=!0,yf(e.model),u="all"))}e.hasFocus()||(u="none",e.focus({preventScroll:!0}))}else Fs=null;e.stopCoalescingUndo(),u!=="none"&&(e.model.selectionIsCollapsed&&(u="all"),Sn(e)),t.preventDefault()}function sg(e,t,r){if(e>=r.left&&e<=r.right&&t>=r.top&&t<=r.bottom)return 0;const n=e-(r.left+r.right)/2,i=t-(r.top+r.bottom)/2;return n*n+i*i}function xh(e,t,r,n,i){if(!r.id)return[1/0,null];if(t.has(r.id))return t.get(r.id);const a=Es(e,r);if(!a)return[1/0,null];let s=[1/0,null];if(r.hasChildren&&!r.captureSelection&&n>=a.left&&n<=a.right)for(const u of r.children){const d=xh(e,t,u,n,i);d[0]<=s[0]&&(s=d)}return s[1]||(s=[sg(n,i,a),r]),t.set(r.id,s),s}function lg(e,t,r){const[,n]=xh(e,new Map,e.model.root,t,r);return n}function Jc(e,t,r,n){var i;const a=e.field.querySelector(".ML__latex").getBoundingClientRect();if(!a)return 0;if(t>a.right||r>a.bottom+8)return e.model.lastOffset;if(t<a.left||r<a.top-8)return 0;n=n!=null?n:{},n.bias=(i=n.bias)!=null?i:0;let s=lg(e,t,r);const u=[];let d=s;for(;d;)u.unshift(d),d=d.parent;for(const p of u)if(p.captureSelection){s=p;break}let h=e.model.offsetOf(s);if(h<0)return-1;if(s.leftSibling)if(n.bias===0&&s.type!=="placeholder"){const p=Es(e,s);p&&t<(p.left+p.right)/2&&(h=e.model.offsetOf(s.leftSibling))}else n.bias<0&&(h=e.model.offsetOf(s.leftSibling));return h}var cg=class extends Qr{constructor(){super("math")}onPaste(e,t){if(!t||!e.model.contentWillChange({data:typeof t=="string"?t:null,dataTransfer:typeof t=="string"?null:t,inputType:"insertFromPaste"}))return!1;let r="",n="auto",i=typeof t!="string"?t.getData("application/json+mathlive"):"";if(i)try{const a=JSON.parse(i);if(a&&Array.isArray(a)){e.snapshot();const s=wi(a),{model:u}=e;u.selectionIsCollapsed||u.deleteAtoms(Qn(u.selection));const d=u.at(u.position);if(d.parent instanceof jr){console.assert(d.parentBranch!==void 0);const h=[];let p=[];s[0].type==="first"&&s.shift(),s[s.length-1].type==="first"&&s.pop();for(const $ of s)$.type==="first"&&p.length>0?(h.push(p),p=[$]):p.push($);p.length>0&&h.push(p);let y=Number(d.parentBranch[0]),M=Number(d.parentBranch[1]);const B=d.parent.maxColumns;for(;d.parent.colCount-M<h.length&&d.parent.colCount<B;)d.parent.addColumn();d.parent.addChildrenAfter(h[0],d);for(let $=1;$<h.length;$++)M++,M>=B&&(M=0,d.parent.addRowAfter(y),y++),d.parent.setCell(y,M,h[$])}else d.parent.addChildrenAfter(s.filter(h=>h.type!=="first"),d);return u.position=u.offsetOf(s[s.length-1]),u.contentDidChange({inputType:"insertFromPaste"}),Sn(e),!0}}catch(a){}if(i=typeof t!="string"?t.getData("application/json"):"",i&&window.MathfieldElement.computeEngine)try{const a=JSON.parse(i);if(typeof a=="object"&&"latex"in a&&a.latex&&(r=a.latex),!r){const s=window.MathfieldElement.computeEngine.box(a);s&&!s.has("Error")&&(r=s.latex)}r||(n="latex")}catch(a){}if(!r&&typeof t!="string"&&(r=t.getData("application/x-latex"),r&&(n="latex")),r||(r=typeof t=="string"?t:t.getData("text/plain")),r){let a;return[a,r]=ld(r),n==="auto"&&a&&(n="latex"),e.stopCoalescingUndo(),e.stopRecording(),this.insert(e.model,r,{format:n})&&(e.startRecording(),e.snapshot("paste"),Sn(e)),e.startRecording(),!0}return!1}insert(e,t,r){var n,i;const a=typeof t=="string"?t:(i=(n=window.MathfieldElement.computeEngine)==null?void 0:n.box(t).latex)!=null?i:"";if(!r.silenceNotifications&&!e.contentWillChange({data:a,inputType:"insertText"}))return!1;r.insertionMode||(r.insertionMode="replaceSelection"),r.selectionMode||(r.selectionMode="placeholder"),r.format||(r.format="auto");const{silenceNotifications:s}=e;r.silenceNotifications&&(e.silenceNotifications=!0);const u=e.silenceNotifications;e.silenceNotifications=!0;const d={"?":"\\placeholder{}","@":"\\placeholder{}"};d[0]=r.insertionMode==="replaceAll"?"":e.getValue(e.selection,"latex-unstyled"),r.insertionMode==="replaceSelection"&&!e.selectionIsCollapsed?e.deleteAtoms(Qn(e.selection)):r.insertionMode==="replaceAll"?(e.root.setChildren([],"body"),e.position=0):r.insertionMode==="insertBefore"?e.collapseSelection("backward"):r.insertionMode==="insertAfter"&&e.collapseSelection("forward"),!e.at(e.position).isLastSibling&&e.at(e.position+1).type==="placeholder"?e.deleteAtoms([e.position,e.position+1]):e.at(e.position).type==="placeholder"&&e.deleteAtoms([e.position-1,e.position]);let h=-1;d[0]?d["@"]=d[0]:typeof t=="string"&&/(^|[^\\])#@/.test(t)&&(h=dg(e),h>=0&&(d["@"]=e.getValue(h,e.position,"latex"))),d[0]||(d[0]=d["?"]);let p=!1;const y=Xe=>(p=!0,d[Xe]);let[M,B]=wh(e,t,y,r);if(!B)return!1;const $=B.length===1&&B[0].type==="genfrac";$&&h>=0&&typeof e.mathfield.options.isImplicitFunction=="function"&&e.mathfield.options.isImplicitFunction(e.at(e.position).command)?(d["@"]=d["?"],p=!1,[M,B]=wh(e,t,y,r)):h>=0&&e.deleteAtoms([h,e.position]);const{parent:oe}=e.at(e.position),Ve=oe.hasEmptyBranch("body");if($&&M!=="latex"&&e.mathfield.options.removeExtraneousParentheses&&oe instanceof cn&&oe.leftDelim==="("&&Ve){const Xe=oe.parent,$e=oe.parentBranch;Xe.removeChild(oe),Xe.setChildren(B,$e)}const re=e.at(e.position);re.parent.addChildrenAfter(B,re),M==="latex"&&typeof t=="string"&&(oe==null?void 0:oe.type)==="root"&&Ve&&!p&&(oe.verbatimLatex=t),e.silenceNotifications=u;const De=B[B.length-1];if(r.selectionMode==="placeholder"){const Xe=B.flatMap($e=>[$e,...$e.children]).find($e=>$e.type==="placeholder");if(Xe){const $e=e.offsetOf(Xe);e.setSelection($e-1,$e),e.announce("move")}else De&&(e.position=e.offsetOf(De))}else r.selectionMode==="before"||(r.selectionMode==="after"?De&&(e.position=e.offsetOf(De)):r.selectionMode==="item"&&e.setSelection(e.anchor,e.offsetOf(De)));return e.contentDidChange({data:a,inputType:"insertText"}),e.silenceNotifications=s,!0}};function wh(e,t,r,n){var i;let a,s=[];if(typeof t!="string"||n.format==="math-json"){const u=window.MathfieldElement.computeEngine;if(!u)return["math-json",[]];[a,t]=["latex",u.box(t).latex],s=b(t,{context:e.mathfield.context})}else typeof t=="string"&&n.format==="ascii-math"?([a,t]=qa(t,{format:"ascii-math",inlineShortcuts:e.mathfield.options.inlineShortcuts}),s=b(t,{context:e.mathfield.context}),a!=="latex"&&e.mathfield.options.removeExtraneousParentheses&&e0(s)):(n.format==="auto"||(i=n.format)!=null&&i.startsWith("latex"))&&(n.format==="auto"&&([a,t]=qa(t,{format:"auto",inlineShortcuts:e.mathfield.options.inlineShortcuts})),n.format==="latex"&&([,t]=ld(t)),s=b(t,{context:e.mathfield.context,args:r}),n.format!=="latex"&&e.mathfield.options.removeExtraneousParentheses&&e0(s));return Qo(s,n.style),[a!=null?a:"latex",s]}function ug(e){if(!e||(console.assert(e[0].type==="first"),e.length>1))return null;const t=e[0];return t instanceof cn&&t.leftDelim==="("&&t.rightDelim===")"?t.removeBranch("body"):null}function e0(e){if(e){for(let t=0;e[t];t++){const r=e[t];if(r instanceof cn&&r.leftDelim==="("){let n=0,i=0,a=0;for(let s=0;r.body[s];s++)r.body[s].type==="genfrac"&&(n++,i=s),a++;a===0&&n===1&&(e[t]=r.body[i])}}for(const t of e){for(const r of t.branches)if(!t.hasEmptyBranch(r)){e0(t.branch(r));const n=ug(t.branch(r));n&&t.setChildren(n,r)}if(t instanceof jr)for(const r of t.cells)e0(r)}}}function dg(e){let t=e.at(e.position);if(t.mode==="text"){for(;!t.isFirstSibling&&t.mode==="text";)t=t.leftSibling;return e.offsetOf(t)}const r=t;let n=!1;if(t.type==="mclose"){const i=kl[t.value];for(;!t.isFirstSibling&&!(t.type==="mopen"&&t.value===i);)t=t.leftSibling;t.isFirstSibling||(t=t.leftSibling),n=!0}else t.type==="leftright"&&(t=t.leftSibling,n=!0);if(n)for(;!t.isFirstSibling&&(t.isFunction||Sh(t));)t=t.leftSibling;else{const i=[];for(;!t.isFirstSibling&&(Sh(t)||i.length>0);)t.type==="mclose"&&i.unshift(t.value),t.type==="mopen"&&i.length>0&&t.value===kl[i[0]]&&i.shift(),t=t.leftSibling}return r===t?-1:e.offsetOf(t)}function Sh(e){return e.isDigit()?!0:e.type&&/^(mord|surd|subsup|leftright|mop|mclose)$/.test(e.type)?!e.isExtensibleSymbol:!1}new cg;var fg=class extends Qr{constructor(){super("text")}onPaste(e,t){if(!t)return!1;const r=typeof t=="string"?t:t.getData("text/plain");return r&&e.model.contentWillChange({inputType:"insertFromPaste",data:r})?(e.stopCoalescingUndo(),e.stopRecording(),this.insert(e.model,r)&&(e.model.contentDidChange({inputType:"insertFromPaste"}),e.startRecording(),e.snapshot("paste"),Sn(e)),e.startRecording(),!0):!1}insert(e,t,r={}){if(!e.contentWillChange({data:t,inputType:"insertText"}))return!1;r.insertionMode||(r.insertionMode="replaceSelection"),r.selectionMode||(r.selectionMode="placeholder"),r.format||(r.format="auto");const{silenceNotifications:n}=e;r.silenceNotifications&&(e.silenceNotifications=!0);const i=e.silenceNotifications;e.silenceNotifications=!0,r.insertionMode==="replaceSelection"&&!e.selectionIsCollapsed?e.deleteAtoms(Qn(e.selection)):r.insertionMode==="replaceAll"?(e.root.setChildren([],"body"),e.position=0):r.insertionMode==="insertBefore"?e.collapseSelection("backward"):r.insertionMode==="insertAfter"&&e.collapseSelection("forward");const a=hg(t,e.mathfield.context);if(Qo(a,r.style),!a)return!1;const s=e.at(e.position),u=s.parent.addChildrenAfter(a,s);return e.silenceNotifications=i,r.selectionMode==="before"||(r.selectionMode==="item"?e.setSelection(e.anchor,e.offsetOf(u)):u&&(e.position=e.offsetOf(u))),e.contentDidChange({data:t,inputType:"insertText"}),e.silenceNotifications=n,!0}};function hg(e,t){return e=e.replace(/\\/g,"\\textbackslash "),e=e.replace(/#/g,"\\#"),e=e.replace(/\$/g,"\\$"),e=e.replace(/%/g,"\\%"),e=e.replace(/&/g,"\\&"),e=e.replace(/_/g,"\\_"),e=e.replace(/{/g,"\\textbraceleft "),e=e.replace(/}/g,"\\textbraceright "),e=e.replace(/lbrace/g,"\\textbraceleft "),e=e.replace(/rbrace/g,"\\textbraceright "),e=e.replace(/\^/g,"\\textasciicircum "),e=e.replace(/~/g,"\\textasciitilde "),e=e.replace(/£/g,"\\textsterling "),b(e,{context:t,parseMode:"text"})}new fg;function ao(e){return{value:e.model.getValue(),selectionIsCollapsed:e.model.selectionIsCollapsed,canUndo:e.canUndo(),canRedo:e.canRedo(),style:e.selectionStyle,mode:e.model.mode}}var ln=4,$i=20,$n=2*($i+ln),t0=(e,t)=>`
<line x1="${e+$i}" y1="${t+$i}"
x2="${e>t?e+$i:7*$i+10*ln}"
y2="${e<t?t+$i:7*$i+10*ln}"/>
<svg id="plus" viewBox="0 0 40 40" x="${e}" y="${t}" width="40" height="40">
<circle class="cls-2" cx="20" cy="20" r="20"/>
<path class="font" d="m33.33,20c0,1.84-1.49,3.34-3.33,3.34h-6.67v6.66c0,1.84-1.49,3.34-3.33,3.34s-3.34-1.5-3.34-3.34v-6.66h-6.66c-1.84,0-3.34-1.5-3.34-3.34s1.5-3.33,3.34-3.33h6.66v-6.67c0-1.84,1.5-3.33,3.34-3.33s3.33,1.49,3.33,3.33v6.67h6.67c1.84,0,3.33,1.49,3.33,3.33Z"/>
</svg>`,_h=(e,t)=>`
<line x1="${e+$i}" y1="${t+$i}"
x2="${e>t?e+$i:7*$i+10*ln}"
y2="${e<t?t+$i:7*$i+10*ln}"/>
<svg id="minus" viewBox="0 0 40 40" x="${e}" y="${t}" width="40" height="40">
<circle class="cls-2" cx="20" cy="20" r="20"/>
<path class="font" d="m33.33,20c0,1.84-1.49,3.33-3.33,3.33H10c-1.84,0-3.34-1.49-3.34-3.33s1.5-3.34,3.34-3.34h20c1.84,0,3.33,1.5,3.33,3.34Z"/>
</svg>`,r0=(e,t,r)=>`
<svg id="arrow" viewBox="0 0 40 40" x="${e}" y="${t}" width="40" height="40">
<circle class="cls-2" cx="20" cy="20" r="20"/>
<g transform="rotate(${r})" transform-origin="20 20">
<path class="font" d="m17.7,7.23h4.6c.52,0,.94.42.94.94v13.82c0,.52.42.94.94.94h3.39c.83,0,1.25,1.01.66,1.6l-7.56,7.56c-.37.37-.96.37-1.32,0l-7.56-7.56c-.59-.59-.17-1.6.66-1.6h3.39c.52,0,.94-.42.94-.94v-13.82c0-.52.42-.94.94-.94Z"/>
</g>
</svg>`,pg=`
<svg class="MLEP__array-buttons" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox=
"-2 -2 ${8*$i+10*ln+5} ${8*$i+10*ln+5}">
<rect
class="MLEP__array-insert-background rows"
x="0"
y="${$n+ln}"
height="${3*$n}"
width="${$n}"
rx="${$n/2}"/>
<rect
class="MLEP__array-insert-background columns"
x="${$n+ln}"
y="0"
height="${$n}"
width="${3*$n}"
rx="${$n/2}"/>
<g data-command='"moveDown"'>
${r0(2*(ln+$n),2*ln+3*$n,0)}
</g>
<g data-command='"moveUp"'>
${r0(2*(ln+$n),2*ln+$n,180)}
</g>
<g data-command='"moveToNextWord"'>
${r0(2*ln+3*$n,2*(ln+$n),-90)}
</g>
<g data-command='"moveToPreviousWord"'>
${r0(2*ln+$n,2*(ln+$n),90)}
</g>
<g>
<g data-command='"addColumnBefore"'>
${t0(2*ln+$n,ln)}
</g>
<g data-command='"removeColumn"'>
${_h(2*ln+2*$n,ln)}
</g>
<g data-command='"addColumnAfter"'>
${t0(2*ln+3*$n,ln)}
</g>
<g data-command='"addRowBefore"'>
${t0(ln,2*ln+$n)}
</g>
<g data-command='"removeRow"'>
${_h(ln,2*ln+2*$n)}
</g>
<g data-command='"addRowAfter"'>
${t0(ln,2*ln+3*$n)}
</g>
</svg>`,mg=e=>`
<svg id="matrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
data-command='["setEnvironment","matrix"]'>
<rect class="cls-1" width="28" height="24"/>
<circle cx="10" cy="8" r="1"/>
<circle cx="14" cy="12" r="1"/>
<circle cx="18" cy="16" r="1"/></svg>`,gg=e=>`
<svg id="pmatrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
data-command='["setEnvironment","pmatrix"]'>
<rect class="cls-1" width="28" height="24"/>
<path class="cls-2" d="m6,4c-3.96,4.6-3.96,11.4,0,16"/>
<path class="cls-2" d="m22,4c3.96,4.6,3.96,11.4,0,16"/>
<circle cx="10" cy="8" r="1"/>
<circle cx="14" cy="12" r="1"/>
<circle cx="18" cy="16" r="1"/></svg>`,Mh=e=>`
<svg id="Bmatrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
data-command='["setEnvironment","Bmatrix"]'>
<rect class="cls-1" width="28" height="24"/>
<path class="cls-2" d="m6,4c-1.1,0-2,.9-2,2v3c0,1.66-.9,3-2,3,1.1,0,2,1.34,2,3v3c0,1.1.9,2,2,2"/>
<path class="cls-2" d="m22,4c1.1,0,2,.9,2,2v3c0,1.66.9,3,2,3-1.1,0-2,1.34-2,3v3c0,1.1-.9,2-2,2"/>
<circle cx="10" cy="8" r="1"/>
<circle cx="14" cy="12" r="1"/>
<circle cx="18" cy="16" r="1"/>
</svg>`,vg=e=>`
<svg id="bmatrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
data-command='["setEnvironment","bmatrix"]'>
<rect class="cls-1" width="28" height="24"/>
<path class="cls-2" d="m6,4h-3v16h3"/>
<path class="cls-2" d="m22,4h3v16h-3"/>
<circle cx="10" cy="8" r="1"/>
<circle cx="14" cy="12" r="1"/>
<circle cx="18" cy="16" r="1"/>
</svg>`,bg=e=>`
<svg id="vmatrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
data-command='["setEnvironment","vmatrix"]'>
<rect class="cls-1" width="28" height="24"/>
<circle cx="10" cy="8" r="1"/>
<circle cx="14" cy="12" r="1"/>
<circle cx="18" cy="16" r="1"/>
<line class="cls-2" x1="4" y1="4" x2="4" y2="20"/>
<line class="cls-2" x1="24" y1="4" x2="24" y2="20"/>
</svg>`,yg=e=>`
<svg id="Vmatrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="-3.5 -3 35 30"
data-command='["setEnvironment","Vmatrix"]'>
<rect class="cls-1" width="28" height="24"/>
<circle cx="10" cy="8" r="1"/>
<circle cx="14" cy="12" r="1"/>
<circle cx="18" cy="16" r="1"/>
<line class="cls-2" x1="6" y1="4" x2="6" y2="20"/>
<line class="cls-2" x1="22" y1="4" x2="22" y2="20"/>
<line class="cls-2" x1="2" y1="4" x2="2" y2="20"/>
<line class="cls-2" x1="26" y1="4" x2="26" y2="20"/>
</svg>`,xg=e=>`
<svg id="cases" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
data-command='["setEnvironment","cases"]'>
<rect class="cls-1" width="28" height="24"/>
<path class="cls-2" d="m10,4c-1.1,0-2,.9-2,2v3c0,1.66-.9,3-2,3,1.1,0,2,1.34,2,3v3c0,1.1.9,2,2,2"/>
<circle cx="13" cy="8" r="1"/>
<circle cx="13" cy="16" r="1"/>
<circle cx="21" cy="8" r="1"/>
<circle cx="21" cy="16" r="1"/>
</svg>`,wg=e=>`
<svg id="rcases" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
data-command='["setEnvironment","rcases"]'>
<rect class="cls-1" width="28" height="24"/>
<path class="cls-2" d="m18,20c1.1,0,2-.9,2-2v-3c0-1.66.9-3,2-3-1.1,0-2-1.34-2-3v-3c0-1.1-.9-2-2-2"/>
<circle cx="15" cy="8" r="1"/>
<circle cx="15" cy="16" r="1"/>
<circle cx="7" cy="8" r="1"/>
<circle cx="7" cy="16" r="1"/>
</svg>`,wf={matrix:mg,pmatrix:gg,bmatrix:vg,Bmatrix:Mh,vmatrix:bg,Vmatrix:yg},Sf={cases:xg,rcases:wg,Bmatrix:Mh};function Sg(e){var t,r;const n=(t=e.model.parentEnvironment)==null?void 0:t.array;if(!n)return;let i=0;n.forEach($=>{(!i||$.length>i)&&(i=$.length)});let a=document.getElementById("mathlive-environment-popover");a||(a=Pd("mathlive-environment-popover"),Yi("environment-popover"),Yi("core"),a.setAttribute("aria-hidden","true"));let s;const u=a.querySelector(".MLEP__environment-controls");u?s=u:(s=document.createElement("div"),a.innerHTML="",a.appendChild(s)),s.className="MLEP__environment-controls",s.style.display="flex",s.style.width="100%",s.style.height="100%",s.style.boxSizing="border-box",s.innerHTML=pg;let d=[],h="";const p=e.model.parentEnvironment.environmentName;if(_d(p)){const $=Mg(p);h=wf[$]("active");const oe=wf,{[$]:Ve}=oe,re=Ze(oe,[Ge($)]);d=Object.values(re).map(De=>De("inactive"))}else if(q0(p)){const $=Cg(p);h=Sf[$]("active");const oe=Sf,{[$]:Ve}=oe,re=Ze(oe,[Ge($)]);d=Object.values(re).map(De=>De("inactive"))}else X0(p)&&(h=wf.matrix("active"),d=Object.values(Sf).map($=>$("inactive")));const y=document.createElement("div");y.className="MLEP__environment-delimiter-controls",y.style.display="flex",y.style.flexDirection="column",y.innerHTML=`
<div class='MLEP__array-delimiter-options'>
${h}
${d.join("")}
</div>`,h&&s.appendChild(y),s.querySelectorAll("[data-command]").forEach($=>{const oe=$.dataset.command;let Ve=oe;try{Ve=JSON.parse(oe)}catch(re){}$.addEventListener("mousedown",re=>re.preventDefault()),Ve&&$.addEventListener("click",()=>e.executeCommand(Ve))});const B=(r=e.field)==null?void 0:r.getBoundingClientRect();B&&(a.style.top=`${window.scrollY+(B.top-a.clientHeight-15)}px`,a.style.left=`${B.left+20}px`,a.classList.add("is-visible"))}function _f(){const e=document.getElementById("mathlive-environment-popover");e==null||e.classList.remove("is-visible")}function _g(){document.getElementById("mathlive-environment-popover")&&(nf("mathlive-environment-popover"),pa("environment-popover"),pa("core"))}function n0(e){if(!e.hasFocus())return;let t=!1;if(e.model.mode==="math"){const r=e.model.parentEnvironment;if(r!=null&&r.array&&G0(r.environmentName)){const n=e.options.environmentPopoverPolicy;t=n==="auto"||n==="on"}}t?Sg(e):_f()}function Mg(e){return e.replace("*","")}function Cg(e){return e==="dcases"?"cases":e}function Ch(e){const t=getComputedStyle(e).direction;return t==="ltr"||t==="rtl"?t:"ltr"}function Eh(e,t,r){return t==="left"||t==="leading"&&r==="ltr"||t==="trailing"&&r==="rtl"?e.left:e.right}function Mf(e,t,r,n){return r==="middle"?e-t/2:r==="start"&&n==="rtl"||r==="end"&&n==="ltr"||r==="top"||r==="right"?Math.max(0,e-t):e}function Eg(e,t,r,n){return r==="middle"?e-t/2:r==="start"&&n==="ltr"||r==="end"&&n==="rtl"||r==="top"||r==="right"?e:e-t}function kg(e,t){var r,n,i;const a=(r=Ch(e))!=null?r:"ltr";e.style.position="fixed",e.style.left="",e.style.top="",e.style.right="",e.style.bottom="",e.style.height="",e.style.width="";const s=e.getBoundingClientRect(),u=Number.isFinite(t.maxHeight)?Math.min(t.maxHeight,window.innerHeight):window.innerHeight;let d=Math.min(u,(n=t.height)!=null?n:s.height),h=Mf(t.location.y,d,t.verticalPos,a);h+d>window.innerHeight-8&&(t.alternateLocation?(h=Mf(t.alternateLocation.y,d,t.verticalPos,a),h+d>window.innerHeight-8&&(h=void 0)):h=void 0),Number.isFinite(h)||(h=Math.max(8,window.innerHeight-8-d),8+d>window.innerHeight-8&&(e.style.bottom="8px")),d=Math.min(h+d,window.innerHeight-8)-h;const p=Number.isFinite(t.maxWidth)?Math.min(t.maxWidth,window.innerWidth):window.innerWidth;let y=Math.min(p,(i=t.width)!=null?i:s.width),M=Mf(t.location.x,y,t.horizontalPos,a);M+y>window.innerWidth-8&&(t.alternateLocation?(M=Eg(t.alternateLocation.x,y,t.verticalPos,a),M+y>window.innerWidth-8&&(M=void 0)):M=void 0),Number.isFinite(M)||(M=Math.max(8,window.innerWidth-8-y),8+y>window.innerWidth-8&&(e.style.right="8px")),y=Math.min(M+y,window.innerWidth-8)-M,a==="rtl"?e.style.right=`${Math.ceil(window.innerWidth-M-y).toString()}px`:e.style.left=`${Math.ceil(M).toString()}px`,e.style.top=`${Math.ceil(h).toString()}px`,d!==s.height&&(e.style.height=`${Math.ceil(d).toString()}px`),y!==s.width&&(e.style.width=`${Math.ceil(y).toString()}px`)}function Dg(e,t){return Math.hypot(t.x-e.x,t.y-e.y)}function Vl(e){return"submenu"in e}function oo(e){return"type"in e&&e.type==="command"||"onMenuSelect"in e||"id"in e}function Cf(e){return"type"in e&&e.type==="divider"}function Ef(e){return"type"in e&&e.type==="heading"}var kh={};function kf(e){let t=kh[e];if(!t){let r;switch(e){case"checkmark":r=`<span aria-hidden="true" class="ui-checkmark"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M435.848 83.466L172.804 346.51l-96.652-96.652c-4.686-4.686-12.284-4.686-16.971 0l-28.284 28.284c-4.686 4.686-4.686 12.284 0 16.971l133.421 133.421c4.686 4.686 12.284 4.686 16.971 0l299.813-299.813c4.686-4.686 4.686-12.284 0-16.971l-28.284-28.284c-4.686-4.686-12.284-4.686-16.97 0z"></path></svg>
</span>`;break;case"trailing-chevron":r='<span aria-hidden="true" class="ui-trailing-chevron"><svg focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path fill="currentColor" d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"></path></svg></span>';break;case"mixedmark":r='<span aria-hidden="true" class="ui-mixedmark"><svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 512 512"><path fill="currentColor" d="M0 256c0-13.3 10.7-24 24-24H488c13.3 0 24 10.7 24 24s-10.7 24-24 24H24c-13.3 0-24-10.7-24-24z"/></svg></span>'}if(r){const n=document.createElement("template");n.innerHTML=r,kh[e]=n,t=n}}if(t){if("content"in t)return t.content.cloneNode(!0);const r=document.createElement("svg");return r.innerHTML=t.innerHTML,r}}var Dh=80,Ah=class{constructor(e,t){this._element=null;var r;this.parentMenu=t,this._declaration=e,Vl(e)?(this.type="submenu",this.submenu=new Lh(e.submenu,{parentMenu:t,submenuClass:e.submenuClass,columnCount:e.columnCount})):this.type=(r=e.type)!=null?r:"command",this.hasCheck=oo(e)&&e.checked!==void 0}get rootMenu(){return this.parentMenu.rootMenu}get abortController(){return this._abortController||(this._abortController=new AbortController),this._abortController}dispose(){var e,t;(e=this._abortController)==null||e.abort(),this._abortController=void 0,(t=this._element)==null||t.remove(),this._element=null,this.submenu&&this.submenu.dispose(),this.submenu=void 0}get menuItem(){return this._declaration}get label(){var e;return(e=this._label)!=null?e:""}set label(e){e===void 0&&(e=""),e!==this._label&&(this._label=e,this.dirty=!0)}get visible(){return this._visible}set visible(e){e!==this._visible&&(this._visible=e,this.dirty=!0)}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.element&&(e?this.element.removeAttribute("aria-disabled"):this.element.setAttribute("aria-disabled","true")),this.dirty=!0}get checked(){return this._checked}set checked(e){this._checked=e,this.dirty=!0}get tooltip(){return this._tooltip}set tooltip(e){e!==this._tooltip&&(this._tooltip=e,this.dirty=!0)}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){e!==this._ariaLabel&&(this._ariaLabel=e,this.dirty=!0)}get active(){var e,t;return(t=(e=this.element)==null?void 0:e.classList.contains("active"))!=null?t:!1}set active(e){this.element&&this.element.classList.toggle("active",e)}updateState(e){var t,r,n;const i=this._declaration;if(Cf(i)){this.enabled=!1,this.checked=!1;return}Ef(i)&&(this.enabled=!1,this.checked=!1,this.visible=!0),oo(i)&&(this.checked=oo(i)&&((t=Zl(i.checked,e))!=null?t:!1)),(oo(i)||Vl(i))&&(this.enabled=(r=Zl(i.enabled,e))!=null?r:!0,this.visible=(n=Zl(i.visible,e))!=null?n:!0,this.visible&&this.enabled&&this.submenu&&(this.submenu.updateState(e),this.submenu.visible||(this.visible=!1))),(oo(i)||Ef(i)||Vl(i))&&(this.label=Zl(i.label,e),this.tooltip=Zl(i.tooltip,e),this.ariaLabel=Zl(i.ariaLabel,e)),this._element&&this.updateElement()}set dirty(e){console.assert(e===!0),e&&this.parentMenu&&(this.parentMenu.dirty=!0)}updateElement(){if(!this.visible||!this.element)return;const e=this.element;e.textContent="",this.enabled?e.removeAttribute("aria-disabled"):e.setAttribute("aria-disabled","true"),this.checked===!0?(e.setAttribute("aria-checked","true"),e.append(kf("checkmark"))):this.checked==="mixed"?(e.setAttribute("aria-checked","mixed"),e.append(kf("mixedmark"))):e.removeAttribute("aria-checked"),this.ariaLabel&&e.setAttribute("aria-label",this.ariaLabel);const t=document.createElement("span");if(t.className=this.parentMenu.hasCheck?"label indent":"label",this.type==="heading"&&t.classList.add("heading"),t.innerHTML=this.label,e.append(t),this._tooltip&&e.setAttribute("data-tooltip",this._tooltip),oo(this._declaration)&&this._declaration.keyboardShortcut){const r=document.createElement("kbd");r.innerHTML=tf(this._declaration.keyboardShortcut),e.append(r)}this.type==="submenu"&&e.append(kf("trailing-chevron"))}get element(){if(this._element)return this._element;if(Cf(this._declaration)){const r=document.createElement("li");return r.setAttribute("part","menu-divider"),r.setAttribute("role","divider"),this._element=r,r}const e=document.createElement("li");this._element=e,(oo(this._declaration)||Ef(this._declaration)||Vl(this._declaration))&&this._declaration.class&&(e.className=this._declaration.class),e.setAttribute("part","menu-item"),e.setAttribute("tabindex","-1"),this.hasCheck?e.setAttribute("role","menuitemcheckbox"):e.setAttribute("role","menuitem"),this.type==="submenu"&&(e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded","false"));const t=this.abortController.signal;return e.addEventListener("pointerenter",this,{signal:t}),e.addEventListener("pointerleave",this,{signal:t}),e.addEventListener("pointerup",this,{signal:t}),e.addEventListener("click",this,{signal:t}),this._element}dispatchSelect(){if(!oo(this._declaration))return;const e=new CustomEvent("menu-select",{cancelable:!0,bubbles:!0,detail:{modifiers:this.rootMenu.modifiers,id:this._declaration.id,data:this._declaration.data}});this.parentMenu.dispatchEvent(e)&&typeof this._declaration.onMenuSelect=="function"&&this._declaration.onMenuSelect({modifiers:this.rootMenu.modifiers,id:this._declaration.id,data:this._declaration.data})}handleEvent(e){var t;if(!(!this.visible||!this.enabled)){if(e.type==="click"){this.rootMenu.state==="modal"&&this.select(),e.stopPropagation(),e.preventDefault();return}if(e.type==="pointerenter"){const r=e;this.rootMenu.cancelDelayedOperation(),this.parentMenu.isSubmenuOpen&&((t=this.parentMenu.activeMenuItem)!=null&&t.movingTowardSubmenu(r))?this.rootMenu.scheduleOperation(()=>{this.parentMenu.activeMenuItem=this,this.openSubmenu()}):(this.parentMenu.activeMenuItem=this,this.openSubmenu({withDelay:!0}));return}if(e.type==="pointerleave"){this.rootMenu.activeSubmenu===this.parentMenu&&(this.parentMenu.activeMenuItem=null);return}if(e.type==="pointerup"){this.rootMenu.state!=="modal"&&this.select(),e.stopPropagation(),e.preventDefault();return}}}select(){if(this.rootMenu.cancelDelayedOperation(),this.type==="submenu"){this.openSubmenu();return}this.active=!1,setTimeout(()=>{this.active=!0,setTimeout(()=>{this.rootMenu.hide(),this.dispatchSelect()},Dh)},Dh)}openSubmenu(e){var t;if(this.type!=="submenu"||!this.element)return;if((t=e==null?void 0:e.withDelay)!=null&&t){this.rootMenu.scheduleOperation(()=>this.openSubmenu());return}const r=this.element.getBoundingClientRect(),n=Ch(this.element);this.submenu.show({container:this.rootMenu.element.parentNode,location:{x:Eh(r,"trailing",n),y:r.top-4},alternateLocation:{x:Eh(r,"leading",n),y:r.top-4}})}movingTowardSubmenu(e){if(!this.element||this.type!=="submenu")return!1;const t=this.rootMenu.lastMoveEvent;if(!t)return!1;const r=e.timeStamp-t.timeStamp;if(r>500)return!1;const n=e.clientX-t.clientX;if(Ag(n,t.clientY-e.clientY,r)<=.2)return!1;let a="right";if(this.submenu.element){const s=this.submenu.element.getBoundingClientRect(),u=this.element.getBoundingClientRect();s.left<u.left+u.width/2&&(a="left")}return a==="right"?n>0:n<0}};function Ag(e,t,r){return Math.hypot(e,t)/r}function Zl(e,t){return e===void 0||typeof e!="function"?e:(t!=null||(t={alt:!1,control:!1,shift:!1,meta:!1}),e(t))}var Lh=class Ql{constructor(t,r){this._element=null,this._activeMenuItem=null,this._dirty=!0;var n,i;this.parentMenu=(n=r==null?void 0:r.parentMenu)!=null?n:null,this._submenuClass=r==null?void 0:r.submenuClass,this.columnCount=(i=r==null?void 0:r.columnCount)!=null?i:1,this.isSubmenuOpen=!1,this.menuItems=t}get children(){return this._menuItems}set menuItems(t){const r=this.parentMenu;this.dispose(),this.parentMenu=r,t=[...t],this._menuItems=t.map(n=>n.onCreate?n.onCreate(n,this):new Ah(n,this)),this.hasCheck=void 0,this.dirty=!0}dispose(){var t;this.hide(),this._element&&this._element.remove(),this._abortController&&this._abortController.abort(),(t=this._menuItems)==null||t.forEach(r=>r.dispose()),this._menuItems=[],this._activeMenuItem=null,this.parentMenu=null}handleEvent(t){if(t.type==="wheel"&&this._element){const r=t;this._element.scrollBy(0,r.deltaY),t.stopPropagation()}}dispatchEvent(t){return this.rootMenu.dispatchEvent(t)}get rootMenu(){return this.parentMenu.rootMenu}updateState(t){var r,n,i;this._menuItems.forEach(h=>h.updateState(t));const a=this.hasCheck;this.hasCheck=this._menuItems.some(h=>h.visible&&h.hasCheck),this.hasCheck!==a&&this._menuItems.forEach(h=>h.updateState(t));let s,u=0;for(const h of this._menuItems)h.type==="heading"?(s&&u===0&&(s.visible=!1),s=h,u=0):h.type==="divider"&&s?(s.visible=u>0,s=void 0,u=0):s&&h.visible&&(u+=1);s&&(s.visible=u>0);let d=!0;for(const h of this._menuItems)h.type==="divider"?(h.visible=!d,d=!0):h.visible&&(d=!1);(r=this.activeMenuItem)!=null&&r.visible||(this.activeMenuItem=null),!((n=this.activeMenuItem)!=null&&n.enabled)&&((i=this.activeMenuItem)==null?void 0:i.type)==="submenu"&&this._activeMenuItem.submenu.hide(),this._dirty=!1}get enabled(){return this.updateIfDirty(),this._menuItems.some(t=>t.type!=="divider"&&t.visible&&t.enabled)}get visible(){return this.updateIfDirty(),this._menuItems.some(t=>t.type!=="divider"&&t.visible)}set dirty(t){console.assert(t===!0),this._dirty!==t&&t&&this.parentMenu&&(this._dirty=!0,this.parentMenu.dirty=!0)}updateIfDirty(){this._dirty&&this.updateState(this.rootMenu.modifiers)}updateElement(){var t;if(this._element){this._element.textContent="";for(const{element:r,visible:n}of this._menuItems)r&&n&&this._element.append(r);(t=this._element.querySelector("li:first-of-type"))==null||t.setAttribute("tabindex","0")}}get element(){if(this._element)return this._element;const t=document.createElement("menu");t.setAttribute("role","menu"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-orientation","vertical"),t.setAttribute("part","ui-menu-container"),this._submenuClass&&t.classList.add(this._submenuClass),t.classList.add("ui-menu-container"),this._abortController||(this._abortController=new AbortController);const r=this._abortController.signal;return t.addEventListener("focus",this,{signal:r}),t.addEventListener("wheel",this,{passive:!0,signal:r}),this._element=t,this.updateElement(),t}get activeMenuItem(){return this._activeMenuItem}set activeMenuItem(t){var r,n,i,a;if(this.rootMenu.cancelDelayedOperation(),t!==this._activeMenuItem){if(this.activeMenuItem){const s=this.activeMenuItem;s.active=!1,(r=s.submenu)==null||r.hide()}if(!((n=t==null?void 0:t.visible)==null||n)){this._activeMenuItem=null;return}this._activeMenuItem=t,t&&(t.active=!0)}t?(i=t.element)==null||i.focus({preventScroll:!0}):(a=this._element)==null||a.focus({preventScroll:!0})}get firstMenuItem(){this.updateIfDirty();let t=0,r=!1;const n=this._menuItems;for(;!r&&t<=n.length-1;){const i=n[t];r=i.type!=="divider"&&i.visible&&i.enabled,t+=1}return r?n[t-1]:null}get lastMenuItem(){this.updateIfDirty();const t=this._menuItems;let r=t.length-1,n=!1;for(;!n&&r>=0;){const i=t[r];n=i.type!=="divider"&&i.visible&&i.enabled,r-=1}return n?t[r+1]:null}nextMenuItem(t){if(t===0)return this._activeMenuItem;if(!this._activeMenuItem)return t>0?this.firstMenuItem:this.lastMenuItem;if(!this.firstMenuItem||!this.lastMenuItem||!this._activeMenuItem)return null;this.updateIfDirty();const r=this._menuItems.indexOf(this.firstMenuItem),n=this._menuItems.indexOf(this.lastMenuItem);let i=this._menuItems.indexOf(this._activeMenuItem),a=1;for(;i>=r&&i<=n;){i+=t>0?1:-1;const s=this._menuItems[i];if(!s)break;if(s.visible&&s.enabled){if(a===Math.abs(t))return this._menuItems[i];a+=1}}return t>0?this.lastMenuItem:this.firstMenuItem}getMenuItemColumn(t){this.updateIfDirty();const n=this._menuItems.filter(i=>i.visible&&i.enabled).indexOf(t);return n<0?-1:n%this.columnCount}static get collator(){return Ql._collator||(Ql._collator=new Intl.Collator(void 0,{usage:"search",sensitivity:"base"})),Ql._collator}findMenuItem(t){var r;this.updateIfDirty();const n=this._menuItems.filter(u=>u.type!=="divider"&&u.visible&&u.enabled);if(n.length===0)return null;const i=Math.max(...n.map(u=>u.label.length))-t.length;if(i<0)return null;let a=null,s=0;for(;s<i&&!a;)a=(r=n.find(u=>Ql.collator.compare(t,u.label.substring(s,t.length))===0))!=null?r:null,s++;return a}show(t){return!this.visible||!t.container?!1:(this.updateElement(),t.container.appendChild(this.element),Ft()&&(this.element.popover="manual",this.element.showPopover()),t.location&&kg(this.element,{location:t.location,alternateLocation:t.alternateLocation,verticalPos:"bottom",horizontalPos:"start"}),this.element.focus({preventScroll:!0}),this.parentMenu&&(this.parentMenu.openSubmenu=this),!0)}hide(){var t,r,n,i,a;this.openSubmenu=null,this.activeMenuItem=null,this.parentMenu&&(this.parentMenu.openSubmenu=null),Ft()&&((t=this._element)!=null&&t.popover)&&this.element.hidePopover(),(n=(r=this.parentMenu)==null?void 0:r.element)==null||n.focus(),(a=(i=this._element)==null?void 0:i.parentNode)==null||a.removeChild(this._element)}set openSubmenu(t){var r,n,i,a;const s=t!==null;((r=this.activeMenuItem)==null?void 0:r.type)==="submenu"&&((n=this.activeMenuItem.element)==null||n.setAttribute("aria-expanded",s.toString())),(a=(i=this.activeMenuItem)==null?void 0:i.element)==null||a.classList.toggle("is-submenu-open",s),this.isSubmenuOpen=s}},Bh=class Ip extends Lh{constructor(t,r){var n;super(t),this.state="closed",this.typingBufferResetTimer=0,this.hysteresisTimer=0,this._updating=!1,this._host=(n=r==null?void 0:r.host)!=null?n:null,this.isDynamic=t.some(Ih),this._modifiers={shift:!1,control:!1,alt:!1,meta:!1},this.typingBuffer="",this.state="closed"}get modifiers(){return this._modifiers}set modifiers(t){Gp(this._modifiers,t)||(this._modifiers=t,this.dirty=!0)}get activeSubmenu(){let t=this;for(;t.isSubmenuOpen;)t=t.activeMenuItem.submenu;return t}set dirty(t){this._updating||(console.assert(t===!0),this._dirty!==t&&(this._dirty=!0,t&&setTimeout(()=>{this.updateState(this.modifiers),this.updateElement()})))}updateState(t){this._updating=!0,this.modifiers=t!=null?t:this.modifiers,super.updateState(this.modifiers),this._updating=!1}handleKeyupEvent(t){this.isDynamic&&(this.modifiers=Bs(t)),t.stopImmediatePropagation()}handleKeydownEvent(t){var r,n,i;if(t.key==="Tab"||t.key==="Escape"){this.hide();return}this.isDynamic&&(this.modifiers=Bs(t));let a=!0;const s=this.activeSubmenu,u=s.activeMenuItem;switch(t.key){case" ":case"Space":case"Return":case"Enter":u==null||u.select(Bs(t));break;case"ArrowRight":if((u==null?void 0:u.type)==="submenu")u.select(Bs(t)),this.activeSubmenu.activeMenuItem=this.activeSubmenu.firstMenuItem;else if(!u)s.activeMenuItem=s.firstMenuItem;else{const d=(r=s.getMenuItemColumn(u))!=null?r:-1;if(d>=0&&d<((n=s.columnCount)!=null?n:1)-1){const h=s.nextMenuItem(1);h&&(s.activeMenuItem=h)}}break;case"ArrowLeft":if(s===this.rootMenu)u||(s.activeMenuItem=s.firstMenuItem);else if((u&&(i=s.getMenuItemColumn(u))!=null?i:-1)<=0||!u){s.hide();const h=s.parentMenu.activeMenuItem;if(h){const{element:p}=h;p==null||p.focus(),p==null||p.classList.remove("is-submenu-open")}}else{const h=s.nextMenuItem(-1);h&&(s.activeMenuItem=h)}break;case"ArrowDown":s.activeMenuItem=s.nextMenuItem(s.columnCount);break;case"ArrowUp":s.activeMenuItem=s.nextMenuItem(-s.columnCount);break;case"Home":case"PageUp":s.activeMenuItem=s.firstMenuItem;break;case"End":case"PageDown":s.activeMenuItem=s.lastMenuItem;break;case"Backspace":if(this.typingBuffer&&(this.typingBuffer=this.typingBuffer.slice(0,-1),this.typingBuffer)){clearTimeout(this.typingBufferResetTimer);const d=s.findMenuItem(this.typingBuffer);d&&(s.activeMenuItem=d),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}break;default:if(Id(t)){isFinite(this.typingBufferResetTimer)&&clearTimeout(this.typingBufferResetTimer),this.typingBuffer+=t.key;const d=s.findMenuItem(this.typingBuffer);d&&(s.activeMenuItem=d),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}else a=!1}a&&(t.preventDefault(),t.stopPropagation())}handleEvent(t){if(t.type==="keydown")this.handleKeydownEvent(t);else if(t.type==="keyup")this.handleKeyupEvent(t);else if(t.type==="pointermove")this.lastMoveEvent=t;else if(t.type==="pointerup"&&t.target===this.scrim)Number.isFinite(this.rootMenu._openTimestamp)&&Date.now()-this.rootMenu._openTimestamp<120?this.state="modal":this.state==="modal"&&this.hide();else if(t.type==="contextmenu"){t.preventDefault(),t.stopPropagation();return}super.handleEvent(t)}dispatchEvent(t){return this._host?this._host.dispatchEvent(t):!0}get scrim(){return ro.element}connectScrim(t){const r=this.scrim;r.addEventListener("pointerup",this),r.addEventListener("contextmenu",this),r.addEventListener("keydown",this),r.addEventListener("keyup",this),r.addEventListener("pointermove",this),ro.open({root:t,onDismiss:()=>this.hide()})}disconnectScrim(){const t=this.scrim;t.removeEventListener("pointerup",this),t.removeEventListener("contextmenu",this),t.removeEventListener("keydown",this),t.removeEventListener("keyup",this),t.removeEventListener("pointermove",this),ro.state==="open"&&ro.scrim.close()}get rootMenu(){return this}show(t){return this._onDismiss=t==null?void 0:t.onDismiss,t!=null&&t.modifiers&&(this.modifiers=t.modifiers),this.updateState(),this.connectScrim(t==null?void 0:t.target),super.show(_(S({},t),{container:this.scrim}))?(this._openTimestamp=Date.now(),this.state="open",!0):(this.disconnectScrim(),!1)}hide(){this.cancelDelayedOperation(),this.state!==void 0&&(this.state!=="closed"&&(this.activeMenuItem=null,ro.element.parentElement.focus(),super.hide(),this.state="closed",this.disconnectScrim()),this._onDismiss&&(this._onDismiss(),this._onDismiss=void 0))}scheduleOperation(t){this.cancelDelayedOperation();const r=Ip.SUBMENU_DELAY;if(r<=0){t();return}this.hysteresisTimer=setTimeout(()=>{this.hysteresisTimer=0,t()},r)}cancelDelayedOperation(){this.hysteresisTimer&&(clearTimeout(this.hysteresisTimer),this.hysteresisTimer=0)}};Bh.SUBMENU_DELAY=120;var Lg=Bh;function Ih(e){return Cf(e)?!1:typeof e.label=="function"||typeof e.ariaLabel=="function"||typeof e.tooltip=="function"||(oo(e)||Vl(e))&&(typeof e.enabled=="function"||typeof e.visible=="function")||oo(e)&&typeof e.checked=="function"?!0:Vl(e)?e.submenu.some(Ih):!1}var i0=class{};i0.DELAY=300,i0.MAX_DISTANCE=10;function Bg(e){return new Promise((t,r)=>{const n=Bd(e);n||t(!1);let i=n;const a=setTimeout(()=>{s.abort(),t(Dg(i,n)<i0.MAX_DISTANCE)},i0.DELAY),s=new AbortController,u=s.signal;for(const d of["pointermove","pointerup","pointercancel"])window.addEventListener(d,h=>{if(h.type==="pointerup"||h.type==="pointercancel")clearTimeout(a),s.abort(),t(!1);else if(h.type==="pointermove"){const p=Bd(h);p&&(i=p)}},{passive:!0,signal:u})})}function $h(e,t,r){return rs(this,null,function*(){if(e.type==="contextmenu"){const n=e;if(r.show({target:t,location:Bd(n),modifiers:Bs(n)}))return e.preventDefault(),e.stopPropagation(),!0}if(e.type==="keydown"){const n=e;if(n.code==="ContextMenu"||n.code==="F10"&&n.shiftKey){const i=t==null?void 0:t.getBoundingClientRect();if(i&&r.show({target:t,location:{x:Math.ceil(i.left+i.width/2),y:Math.ceil(i.top+i.height/2)},modifiers:Bs(n)}))return e.preventDefault(),e.stopPropagation(),!0}}if(e.type==="pointerdown"&&e.pointerType!=="mouse"&&e.button===0){let n=e.target;for(;n&&t!==n;)n=n.parentNode;if(!n||!r.visible)return!1;const i=Bd(e);if(yield Bg(e))return r.state!=="closed"?!1:(r.show({target:t,location:i}),!0)}return!1})}var Th={acute:714,grave:715,dot:729,ddot:168,mathring:730,tilde:126,bar:713,breve:728,check:711,hat:94,vec:8407};W(Object.keys(Th),"{body:auto}",{createAtom:e=>new Cl(_(S({},e),{body:se(e.args[0]),accentChar:Th[e.command.slice(1)]}))}),W(["widehat","widecheck","widetilde"],"{body:auto}",{createAtom:e=>{const t=nt(se(e.args[0]));return new Cl(_(S({},e),{body:se(e.args[0]),svgAccent:e.command.slice(1)+(t.length>5?"4":["1","1","2","2","3","3"][t.length])}))}}),W(["overarc","overparen","wideparen"],"{body:auto}",{createAtom:e=>new Cl(_(S({},e),{body:se(e.args[0]),svgAccent:"overarc"}))}),W(["underarc","underparen"],"{body:auto}",{createAtom:e=>new Hr(_(S({},e),{body:se(e.args[0]),svgBelow:"underarc"}))}),W("utilde","{body:auto}",{createAtom:e=>{const t=se(e.args[0]),r=nt(t),n="widetilde"+(r.length>5?"4":["1","1","2","2","3","3"][r.length]);return new Hr(_(S({},e),{body:t,svgBelow:n,boxType:Ss(t)}))}}),W("^","{:string}",{createAtom:e=>{var t;return new Se(_(S({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={a:"\xE2",e:"\xEA",i:"\xEE",o:"\xF4",u:"\xFB",A:"\xC2",E:"\xCA",I:"\xCE",O:"\xD4",U:"\xDB"}[e.args[0]])!=null?t:"^"}))}}),W("`","{:string}",{createAtom:e=>{var t;return new Se(_(S({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={a:"\xE0",e:"\xE8",i:"\xEC",o:"\xF2",u:"\xF9",A:"\xC0",E:"\xC8",I:"\xCC",O:"\xD2",U:"\xD9"}[e.args[0]])!=null?t:"`"}))}}),W("'","{:string}",{createAtom:e=>{var t;return new Se(_(S({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={a:"\xE1",e:"\xE9",i:"\xED",o:"\xF3",u:"\xFA",A:"\xC1",E:"\xC9",I:"\xCD",O:"\xD3",U:"\xDA"}[e.args[0]])!=null?t:"'"}))}}),W('"',"{:string}",{createAtom:e=>{var t,r;return new Se(_(S({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:(t=e.args)!=null&&t[0]?(r={a:"\xE4",e:"\xEB",i:"\xEF",o:"\xF6",u:"\xFC",A:"\xC4",E:"\xCB",I:"\xCB",O:"\xD6",U:"\xDC"}[e.args[0]])!=null?r:'"'+e.args[0]:'"'}))}}),W(".","{:string}",{createAtom:e=>{var t,r;return new Se(_(S({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:(t=e.args)!=null&&t[0]?(r={a:"\u0227",e:"\u0117",i:"\u0307i",o:"\u022F",u:"\u0307u",A:"\u0226",E:"\u0116",I:"\u0130",O:"\u022E",U:"\u0307U"}[e.args[0]])!=null?r:"."+e.args[0]:"."}))}}),W("=","{:string}",{createAtom:e=>{var t,r;return new Se(_(S({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:(t=e.args)!=null&&t[0]?(r={a:"\u0101",e:"\u0113",i:"\u012B",o:"\u014D",u:"\u016B",A:"\u0100",E:"\u0112",I:"\u012A",O:"\u014C",U:"\u016A"}[e.args[0]])!=null?r:"="+e.args[0]:"="}))}}),W("~","{:string}",{createAtom:e=>{var t;return new Se(_(S({type:"mord"},e),{isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={n:"\xF1",N:"\xD1",a:"\xE3",o:"\xF5",A:"\xC3",O:"\xD5"}[e.args[0]])!=null?t:"\xB4"}))}}),W("c","{:string}",{createAtom:e=>{var t;return new Se(_(S({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={c:"\xE7",C:"\xC7"}[e.args[0]])!=null?t:""}))}}),W("enclose","{notation:string}[style:string]{body:auto}",{createAtom:e=>{var t,r;const n=e.args,i={strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",backgroundcolor:"transparent",padding:"auto",shadow:"none",svgStrokeStyle:void 0,borderStyle:void 0,style:(t=e.style)!=null?t:{}};if(n[1]){const s=n[1].split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const u of s){const d=u.match(/\s*(\S+)\s+(\S+)\s+(.*)/);if(d)i.strokeWidth=d[1],i.strokeStyle=d[2],i.strokeColor=d[3];else{const h=u.match(/\s*([a-z]*)\s*=\s*"(.*)"/);h&&(h[1]==="mathbackground"?i.backgroundcolor=h[2]:h[1]==="mathcolor"?i.strokeColor=h[2]:h[1]==="padding"?i.padding=h[2]:h[1]==="shadow"&&(i.shadow=h[2]))}}i.strokeStyle==="dashed"?i.svgStrokeStyle="5,5":i.strokeStyle==="dotted"&&(i.svgStrokeStyle="1,5")}i.borderStyle=`${i.strokeWidth} ${i.strokeStyle} ${i.strokeColor}`;const a={};return((r=n[0])!=null?r:"").split(/[, ]/).filter(s=>s.length>0).forEach(s=>{a[s.toLowerCase()]=!0}),new qe(e.command,se(n[2]),a,i)}}),W("cancel","{body:auto}",{createAtom:e=>{var t;return new qe(e.command,se(e.args[0]),{updiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(t=e.style)!=null?t:{}})}}),W("bcancel","{body:auto}",{createAtom:e=>{var t;return new qe(e.command,se(e.args[0]),{downdiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(t=e.style)!=null?t:{}})}}),W("xcancel","{body:auto}",{createAtom:e=>{var t;return new qe(e.command,se(e.args[0]),{updiagonalstrike:!0,downdiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(t=e.style)!=null?t:{}})}}),W(["overrightarrow","overleftarrow","Overrightarrow","overleftharpoon","overrightharpoon","overleftrightarrow","overlinesegment","overgroup"],"{:auto}",{createAtom:e=>{var t;return new Hr(_(S({},e),{body:se((t=e.args)==null?void 0:t[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgAbove:e.command.slice(1)}))}}),W("overbrace","{:auto}",{createAtom:e=>new Hr(_(S({},e),{body:se(e.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgAbove:e.command.slice(1)}))}),W(["underrightarrow","underleftarrow","underleftrightarrow","underlinesegment","undergroup"],"{:auto}",{createAtom:e=>new Hr(_(S({},e),{body:se(e.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgBelow:e.command.slice(1)}))}),W(["underbrace"],"{:auto}",{createAtom:e=>new Hr(_(S({},e),{body:se(e.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgBelow:e.command.slice(1)}))}),W(["xrightarrow","longrightarrow","xleftarrow","longleftarrow","xRightarrow","xLeftarrow","xleftharpoonup","xleftharpoondown","xrightharpoonup","xrightharpoondown","xlongequal","xtwoheadleftarrow","xtwoheadrightarrow","xleftrightarrow","longleftrightarrow","xLeftrightarrow","xrightleftharpoons","longrightleftharpoons","xleftrightharpoons","xhookleftarrow","xhookrightarrow","xmapsto","xtofrom","xleftrightarrows","longleftrightarrows","xRightleftharpoons","longRightleftharpoons","xLeftrightharpoons","longLeftrightharpoons"],"[:auto]{:auto}",{createAtom:e=>{var t,r,n,i,a;return new Hr(_(S({},e),{svgBody:e.command.slice(1),above:((r=se((t=e.args)==null?void 0:t[1]))==null?void 0:r.length)===0?void 0:se((n=e.args)==null?void 0:n[1]),below:(a=se((i=e.args)==null?void 0:i[0]))!=null?a:null,skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,paddedLabels:!0,boxType:"rel"}))},serialize:(e,t)=>e.command+(e.hasEmptyBranch("below")?"":`[${e.belowToLatex(t)}]`)+`{${e.aboveToLatex(t)}}${e.supsubToLatex(t)}`}),W(["arccos","arcsin","arctan","arctg","arcctg","arg","ch","cos","cosh","cot","cotg","coth","ctg","cth","csc","cosec","deg","dim","exp","gcd","hom","inf","ker","lb","lg","ln","log","Pr","sec","sh","sin","sinh","sup","tan","tanh","tg","th","arcsec","arccsc","arsinh","arcosh","artanh","arcsech","arccsch"],"",{isFunction:!0,ifMode:"math",createAtom:e=>new li(e.command.slice(1),_(S({},e),{limits:"adjacent",isFunction:!0,variant:"main",variantStyle:"up"}))}),W(["liminf","limsup"],"",{ifMode:"math",createAtom:e=>new li({"\\liminf":"lim inf","\\limsup":"lim sup"}[e.command],_(S({},e),{limits:"over-under",variant:"main"}))}),W(["lim","mod"],"",{ifMode:"math",createAtom:e=>new li(e.command.slice(1),_(S({},e),{limits:"over-under",variant:"main"}))}),W(["det","max","min"],"",{ifMode:"math",isFunction:!0,createAtom:e=>new li(e.command.slice(1),_(S({},e),{limits:"over-under",isFunction:!0,variant:"main"}))}),W(["ang"],"{:math}",{ifMode:"math",createAtom:e=>new Se(_(S({},e),{body:se(e.args[0])})),serialize:(e,t)=>`\\ang{${e.bodyToLatex(t)}}`,render:(e,t)=>{const r=e.createBox(t),n=r.caret;r.caret=void 0;const i=new Ue("\xB0",{style:_(S({},e.style),{variant:"normal",variantStyle:"up"})});return new Ue([r,i],{type:"inner",isSelected:e.isSelected,caret:n})}}),W("sqrt","[index:auto]{radicand:expression}",{ifMode:"math",createAtom:e=>new Wi(_(S({},e),{body:se(e.args[1]),index:e.args[0]?se(e.args[0]):void 0}))}),W(["frac","dfrac","tfrac","cfrac","binom","dbinom","tbinom"],"{:expression}{:expression}",{ifMode:"math",createAtom:e=>{const t=S({},e),r=e.command,n=e.args;switch(r){case"\\dfrac":case"\\frac":case"\\tfrac":t.hasBarLine=!0;break;case"\\atopfrac":t.hasBarLine=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":t.hasBarLine=!1,t.leftDelim="(",t.rightDelim=")";break;case"\\cfrac":t.hasBarLine=!0,t.continuousFraction=!0;break;default:}switch(r){case"\\dfrac":case"\\dbinom":t.mathstyleName="displaystyle";break;case"\\tfrac":case"\\tbinom":t.mathstyleName="textstyle";break;default:}return new cr(n[0]?se(n[0]):[new Ta],n[1]?se(n[1]):[new Ta],t)},serialize:(e,t)=>{const r=e.aboveToLatex(t),n=e.belowToLatex(t);return/^[0-9]$/.test(r)&&/^[0-9]$/.test(n)?`${e.command}${r}${n}`:sn(e.command,r,n)}}),W(["brace","brack"],"",{infix:!0,createAtom:e=>new cr(se(e.args[0]),se(e.args[1]),_(S({},e),{hasBarLine:!1,leftDelim:e.command==="\\brace"?"\\lbrace":"\\lbrack",rightDelim:e.command==="\\brace"?"\\rbrace":"\\rbrack"})),serialize:(e,t)=>kr([e.aboveToLatex(t),e.command,e.belowToLatex(t)])}),W(["over","atop","choose"],"",{infix:!0,createAtom:e=>{let t,r;const n=e.args;return e.command==="\\choose"&&(t="(",r=")"),new cr(se(n[0]),se(n[1]),_(S({},e),{hasBarLine:e.command==="\\over",leftDelim:t,rightDelim:r}))},serialize:(e,t)=>kr([e.aboveToLatex(t),e.command,e.belowToLatex(t)])}),W(["overwithdelims","atopwithdelims"],"{numer:auto}{denom:auto}{left-delim:delim}{right-delim:delim}",{infix:!0,createAtom:e=>{var t,r;const n=e.args;return new cr(se(n[0]),se(n[1]),_(S({},e),{leftDelim:(t=n[2])!=null?t:".",rightDelim:(r=n[3])!=null?r:".",hasBarLine:!1}))},serialize:(e,t)=>`${e.aboveToLatex(t)} ${e.command}${e.leftDelim}${e.rightDelim}${e.belowToLatex(t)}`}),W("pdiff","{numerator}{denominator}",{ifMode:"math",createAtom:e=>new cr(se(e.args[0]),se(e.args[1]),_(S({},e),{hasBarLine:!0,numerPrefix:"\u2202",denomPrefix:"\u2202"}))}),W(["sum","prod","bigcup","bigcap","coprod","bigvee","bigwedge","biguplus","bigotimes","bigoplus","bigodot","bigsqcup","intop"],"",{ifMode:"math",createAtom:e=>new mn({coprod:"\u2210",bigvee:"\u22C1",bigwedge:"\u22C0",biguplus:"\u2A04",bigcap:"\u22C2",bigcup:"\u22C3",intop:"\u222B",prod:"\u220F",sum:"\u2211",bigotimes:"\u2A02",bigoplus:"\u2A01",bigodot:"\u2A00",bigsqcup:"\u2A06",smallint:"\u222B"}[e.command.slice(1)],_(S({},e),{limits:"auto",variant:"main"}))}),W("smallint","",{ifMode:"math",createAtom:e=>new li("\u222B",_(S({},e),{limits:"adjacent",variant:"main"}))});var Ph={int:"\u222B",iint:"\u222C",iiint:"\u222D",oint:"\u222E",oiint:"\u222F",oiiint:"\u2230",intclockwise:"\u2231",varointclockwise:"\u2232",ointctrclockwise:"\u2233",intctrclockwise:"\u2A11",sqcup:"\u2294",sqcap:"\u2293",uplus:"\u228E",wr:"\u2240",amalg:"\u2A3F",Cap:"\u22D2",Cup:"\u22D3",doublecap:"\u22D2",doublecup:"\u22D3"};W(Object.keys(Ph),"",{ifMode:"math",createAtom:e=>{const t=e.command,r=Ph[t.slice(1)];return new mn(r,_(S({},e),{limits:"adjacent",variant:{"\u22D2":"ams","\u22D3":"ams"}[r]}))}}),W(["Re","Im"],"",{ifMode:"math",createAtom:e=>new li({"\\Re":"\u211C","\\Im":"\u2111"}[e.command],_(S({},e),{limits:"adjacent",isFunction:!0,variant:"fraktur"}))}),W("middle","{:delim}",{ifMode:"math",createAtom:e=>{var t;return new te(_(S({},e),{delim:(t=e.args[0])!=null?t:"|",size:1}))}}),W("the","{:value}",{createAtom:e=>new Se(_(S({},e),{captureSelection:!0,verbatimLatex:null})),render:(e,t)=>{var r;const n=new Ar({parent:t},e.style);let i="";e.isSelected&&(i+=" ML__selected");const a=n.evaluate(e.args[0]);return new Ue(((r=Zn(a))!=null?r:"").split("").map(s=>new Ue(s,{type:"ord",classes:i,mode:e.mode,isSelected:e.isSelected,style:S({variant:"main"},e.style)})),{type:"lift",style:e.style,caret:e.caret,isSelected:e.isSelected,classes:i}).wrap(n)},serialize:e=>{var t;return`\\the${(t=Zn(e.args[0]))!=null?t:"\\relax"}`}}),W("mathtip","{:auto}{:math}",{createAtom:e=>new ga(_(S({},e),{body:se(e.args[0]),tooltip:se(e.args[1]),content:"math"})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`\\texttip{${e.bodyToLatex(t)}}{${Se.serialize([e.tooltip],_(S({},t),{defaultMode:"math"}))}}`}),W("texttip","{:auto}{:text}",{createAtom:e=>new ga(_(S({},e),{body:se(e.args[0]),tooltip:se(e.args[1]),content:"text"})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`\\texttip{${e.bodyToLatex(t)}}{${Se.serialize([e.tooltip],_(S({},t),{defaultMode:"text"}))}}`}),W("error","{:math}",{createAtom:e=>new Se(_(S({},e),{body:se(e.args[0])})),serialize:(e,t)=>`\\error{${e.bodyToLatex(t)}}`,render:(e,t)=>e.createBox(t,{classes:"ML__error"})}),W("ensuremath","{:math}",{createAtom:e=>new Se(_(S({},e),{body:se(e.args[0])})),serialize:(e,t)=>`${e.command}{${e.bodyToLatex(_(S({},t),{defaultMode:"math"}))}}`}),W("color","{:value}",{applyStyle:(e,t,r)=>{var n,i;return{verbatimColor:(n=Zn(t[0]))!=null?n:void 0,color:r.toColor((i=t[0])!=null?i:{string:"red"})}}}),W("textcolor","{:value}{content:auto*}",{applyStyle:(e,t,r)=>{var n,i;return{verbatimColor:(n=Zn(t[0]))!=null?n:void 0,color:r.toColor((i=t[0])!=null?i:{string:"red"})}}}),W("boxed","{content:math}",{createAtom:e=>new eo(_(S({},e),{body:se(e.args[0]),framecolor:{string:"black"}}))}),W("colorbox","{:value}{:text*}",{applyStyle:(e,t,r)=>{var n,i;return{verbatimBackgroundColor:(n=Zn(t[0]))!=null?n:void 0,backgroundColor:r.toBackgroundColor((i=t[0])!=null?i:{string:"yellow"})}}}),W("fcolorbox","{frame-color:value}{background-color:value}{content:text}",{applyMode:"text",createAtom:e=>{var t,r;return new eo(_(S({},e),{body:se(e.args[2]),framecolor:(t=e.args[0])!=null?t:{string:"blue"},backgroundcolor:(r=e.args[1])!=null?r:{string:"yellow"}}))},serialize:(e,t)=>{var r,n;return t.skipStyles?e.bodyToLatex(_(S({},t),{defaultMode:"text"})):sn(e.command,(r=Zn(e.framecolor))!=null?r:"",(n=Zn(e.backgroundcolor))!=null?n:"",e.bodyToLatex(_(S({},t),{defaultMode:"text"})))}}),W("bbox","[:bbox]{body:auto}",{createAtom:e=>{var t;const r=e.args[0],n=se(e.args[1]);return r?new eo(_(S({},e),{body:n,padding:r.padding,border:r.border,backgroundcolor:(t=r.backgroundcolor)!=null?t:void 0})):new eo(_(S({},e),{body:n}))},serialize:(e,t)=>{var r,n;if(t.skipStyles)return e.bodyToLatex(t);let i=e.command;if(Number.isFinite(e.padding)||e.border!==void 0||e.backgroundcolor!==void 0){const a=[];e.padding&&a.push((r=Zn(e.padding))!=null?r:""),e.border&&a.push(`border: ${e.border}`),e.backgroundcolor&&a.push((n=Zn(e.backgroundcolor))!=null?n:""),i+=`[${a.join(",")}]`}return sn(i,e.bodyToLatex(t))}}),W(["displaystyle","textstyle","scriptstyle","scriptscriptstyle"],"{:rest}",{createAtom:e=>new Se(_(S({},e),{body:se(e.args[0])})),render:(e,t)=>{const r=new Ar({parent:t,mathstyle:e.command.slice(1)},e.style),n=Se.createBox(r,e.body,{type:"lift"});return e.caret&&(n.caret=e.caret),e.bind(t,n)},serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`{${kr([e.command,e.bodyToLatex(t)])}}`}),W(["tiny","scriptsize","footnotesize","small","normalsize","large","Large","LARGE","huge","Huge"],"",{applyStyle:e=>({fontSize:{"\\tiny":1,"\\scriptsize":2,"\\footnotesize":3,"\\small":4,"\\normalsize":5,"\\large":6,"\\Large":7,"\\LARGE":8,"\\huge":9,"\\Huge":10}[e]})}),W("fontseries","{:string}",{ifMode:"text",applyStyle:(e,t)=>{var r;return{fontSeries:(r=t[0])!=null?r:"auto"}}}),W("fontshape","{:string}",{ifMode:"text",applyStyle:(e,t)=>{var r;return{fontShape:(r=t[0])!=null?r:"auto"}}}),W("fontfamily","{:string}",{ifMode:"text",applyStyle:(e,t)=>{var r;return{fontFamily:(r=t[0])!=null?r:"roman"}}}),W("selectfont","",{ifMode:"text",applyStyle:()=>({})}),W("bf","{:rest}",{applyStyle:()=>({fontSeries:"b",fontShape:"n",fontFamily:"roman"})}),W(["boldsymbol","bm"],"{:math}",{applyMode:"math",createAtom:e=>new Se(_(S({},e),{body:se(e.args[0])})),serialize:(e,t)=>`${e.command}{${e.bodyToLatex(t)}}`,render:(e,t)=>e.createBox(t,{classes:"ML__boldsymbol"})}),W("bold","{:math*}",{applyMode:"math",applyStyle:()=>({variantStyle:"bold"})}),W("bfseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),W("mdseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),W("upshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),W("slshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),W("scshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),W("textbf","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),W("textmd","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),W("textup","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),W("textnormal","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n",fontSeries:"m"})}),W("textsl","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),W("textit","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"it"})}),W("textsc","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),W("textrm","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"roman"})}),W("textsf","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"sans-serif"})}),W("texttt","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"monospace"})}),W("mathbf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"bold"})}),W("mathit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"italic"})}),W("mathnormal","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"italic"})}),W("mathbfit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"bolditalic"})}),W("mathrm","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"up"})}),W("mathsf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"sans-serif",variantStyle:"up"})}),W("mathtt","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"monospace",variantStyle:"up"})}),W("it","{:rest}",{applyStyle:()=>({fontSeries:"m",fontShape:"it",fontFamily:"roman",variantStyle:"italic"})}),W("rmfamily","",{applyStyle:()=>({fontFamily:"roman"})}),W("sffamily","",{applyStyle:()=>({fontFamily:"sans-serif"})}),W("ttfamily","",{applyStyle:()=>({fontFamily:"monospace"})}),W(["Bbb","mathbb"],"{:math*}",{applyStyle:()=>({variant:"double-struck",variantStyle:"up"})}),W(["frak","mathfrak"],"{:math*}",{applyStyle:()=>({variant:"fraktur",variantStyle:"up"})}),W("mathcal","{:math*}",{applyStyle:()=>({variant:"calligraphic",variantStyle:"up"})}),W("mathscr","{:math*}",{applyStyle:()=>({variant:"script",variantStyle:"up"})}),W("mbox","{:text}",{ifMode:"math",createAtom:e=>new Se(_(S({},e),{type:"mord",body:se(e.args[0]),mode:"math"})),serialize:(e,t)=>sn("\\mbox",e.bodyToLatex(_(S({},t),{defaultMode:"text"})))}),W("text","{:text}",{ifMode:"math",applyMode:"text"}),W(["class","htmlClass"],"{name:string}{content:auto}",{createAtom:e=>new Se(_(S({},e),{body:se(e.args[1])})),serialize:(e,t)=>!e.args[0]||t.skipStyles?e.bodyToLatex(t):`${e.command}{${e.args[0]}}{${e.bodyToLatex(t)}}`,render:(e,t)=>{var r;return e.createBox(t,{classes:(r=e.args[0])!=null?r:""})}}),W(["cssId","htmlId"],"{id:string}{content:auto}",{createAtom:e=>new Se(_(S({},e),{body:se(e.args[1])})),serialize:(e,t)=>{var r;return!((r=e.args)!=null&&r[0])||t.skipStyles?e.bodyToLatex(t):`${e.command}{${e.args[0]}}{${e.bodyToLatex(t)}}`},render:(e,t)=>{var r;const n=e.createBox(t);return n.cssId=(r=e.args[0])!=null?r:"",n}}),W("htmlData","{data:string}{content:auto}",{createAtom:e=>new Se(_(S({},e),{body:se(e.args[1])})),serialize:(e,t)=>{var r;return!((r=e.args)!=null&&r[0])||t.skipStyles?e.bodyToLatex(t):`\\htmlData{${e.args[0]}}{${e.bodyToLatex(t)}}`},render:(e,t)=>{var r;const n=e.createBox(t);return n.htmlData=(r=e.args[0])!=null?r:"",n}}),W(["style","htmlStyle"],"{data:string}{content:auto}",{createAtom:e=>new Se(_(S({},e),{body:se(e.args[1])})),serialize:(e,t)=>{var r;return!((r=e.args)!=null&&r[0])||t.skipStyles?e.bodyToLatex(t):`${e.command}{${e.args[0]}}{${e.bodyToLatex(t)}}`},render:(e,t)=>{var r;const n=e.createBox(t);return n.htmlStyle=(r=e.args[0])!=null?r:"",n}}),W("em","{:rest}",{createAtom:e=>new Se(_(S({},e),{body:se(e.args[0])})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`{\\em ${e.bodyToLatex(t)}}`,render:(e,t)=>e.createBox(t,{classes:"ML__emph",boxType:"lift"})}),W("emph","{:auto}",{createAtom:e=>new Se(_(S({},e),{body:se(e.args[1])})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`\\emph{${e.bodyToLatex(t)}}`,render:(e,t)=>e.createBox(t,{classes:"ML__emph",boxType:"lift"})});var Rh={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}};W(["bigl","Bigl","biggl","Biggl","bigr","Bigr","biggr","Biggr","bigm","Bigm","biggm","Biggm","big","Big","bigg","Bigg"],"{:delim}",{createAtom:e=>{var t;return new He(_(S({},e),{delim:(t=e.args[0])!=null?t:".",size:Rh[e.command].size,delimType:Rh[e.command].mclass}))}}),W(["hspace","hspace*"],"{width:value}",{createAtom:e=>{var t;return new xi(_(S({},e),{width:(t=e.args[0])!=null?t:{dimension:0}}))}}),W(["mkern","kern","mskip","hskip","mspace"],"{width:value}",{createAtom:e=>{var t;return new xi(_(S({},e),{width:(t=e.args[0])!=null?t:{dimension:0}}))}}),W("mathchoice","{:math}{:math}{:math}{:math}",{createAtom:e=>new Se(e),render:(e,t)=>{let r=0;const n=t.mathstyle.id;(n===Do||n===Va)&&(r=1),(n===Ao||n===Li)&&(r=2),(n===Za||n===si)&&(r=3);const i=se(e.args[r]);return Se.createBox(t,i)},serialize:(e,t)=>`\\mathchoice{${Se.serialize(e.args[0],t)}}{${Se.serialize(e.args[1],t)}}{${Se.serialize(e.args[2],t)}}{${Se.serialize(e.args[3],t)}}`}),W("mathop","{:auto}",{createAtom:e=>new Se(_(S({},e),{type:"mop",body:se(e.args[0]),limits:"over-under",isFunction:!0,captureSelection:!0})),render:(e,t)=>{var r;let n=Se.createBox(t,e.body);if(e.superscript||e.subscript){const i=(r=e.subsupPlacement)!=null?r:"auto";n=i==="over-under"||i==="auto"&&t.isDisplayStyle?e.attachLimits(t,{base:n}):e.attachSupsub(t,{base:n})}return new Ue(e.bind(t,n),{type:"op",isSelected:e.isSelected,classes:"op-group"})},serialize:(e,t)=>{const r=[sn(e.command,e.bodyToLatex(t))];return e.explicitSubsupPlacement&&(e.subsupPlacement==="over-under"&&r.push("\\limits"),e.subsupPlacement==="adjacent"&&r.push("\\nolimits"),e.subsupPlacement==="auto"&&r.push("\\displaylimits")),r.push(e.supsubToLatex(t)),kr(r)}}),W(["mathbin","mathrel","mathopen","mathclose","mathpunct","mathord","mathinner"],"{:auto}",{createAtom:e=>new Se(_(S({},e),{type:{"\\mathbin":"mbin","\\mathrel":"mrel","\\mathopen":"mopen","\\mathclose":"mclose","\\mathpunct":"mpunct","\\mathord":"mord","\\mathinner":"minner"}[e.command],body:se(e.args[0])}))}),W(["operatorname","operatorname*"],"{operator:math}",{createAtom:e=>{const t=se(e.args[0]).map(r=>{var n;return r.type!=="first"&&(r.type="mord",r.value=(n={"\u2217":"*","\u2212":"-"}[r.value])!=null?n:r.value,r.isFunction=!1,!r.style.variant&&!r.style.variantStyle&&(r.style.variant="main",r.style.variantStyle="up")),r});return new Se(_(S({},e),{type:"mop",body:t,isFunction:!0,limits:e.command==="\\operatorname"?"adjacent":"over-under"}))},render:(e,t)=>{var r;let n=Se.createBox(t,e.body);if(e.superscript||e.subscript){const i=(r=e.subsupPlacement)!=null?r:"auto";n=i==="over-under"||i==="auto"&&t.isDisplayStyle?e.attachLimits(t,{base:n}):e.attachSupsub(t,{base:n})}return e.caret&&(n.caret=e.caret),new Ue(e.bind(t,n),{type:"op",isSelected:e.isSelected,classes:"op-group"})},serialize:(e,t)=>{const r=[sn(e.command,e.bodyToLatex(t))];return e.explicitSubsupPlacement&&(e.subsupPlacement==="over-under"&&r.push("\\limits"),e.subsupPlacement==="adjacent"&&r.push("\\nolimits"),e.subsupPlacement==="auto"&&r.push("\\displaylimits")),r.push(e.supsubToLatex(t)),kr(r)}}),W(["char","unicode"],"{charcode:value}",{createAtom:e=>new Se(_(S({},e),{type:e.mode==="text"?"text":"mord"})),serialize:e=>{var t;return`${e.command}${Zn((t=e.args[0])!=null?t:{number:10067,base:"hexadecimal"})}`},render:(e,t)=>{let r=t.evaluate(e.args[0]);return(!r||!("number"in r))&&(r={number:10067,base:"hexadecimal"}),e.value=String.fromCodePoint(r.number),e.createBox(t)}}),W("rule","[raise:value]{width:value}{thickness:value}",{createAtom:e=>new Se(e),render:(e,t)=>{var r,n,i;const a=new Ar({parent:t,mathstyle:"textstyle"},e.style),s=a.toEm((r=e.args[0])!=null?r:{dimension:0}),u=a.toEm((n=e.args[1])!=null?n:{dimension:10}),d=a.toEm((i=e.args[2])!=null?i:{dimension:10}),h=new Ue(null,{classes:"rule",type:"ord"});return h.width=u,h.height=d+s,h.depth=-s,h.setStyle("border-right-width",u,"em"),h.setStyle("border-top-width",d,"em"),h.setStyle("border-color",e.style.color),h.setStyle("vertical-align",s,"em"),e.isSelected&&h.setStyle("opacity","50%"),e.bind(a,h),e.caret&&(h.caret=e.caret),h.wrap(t)},serialize:e=>`\\rule${e.args[0]?`[${Zn(e.args[0])}]`:""}{${Zn(e.args[1])}}{${Zn(e.args[2])}}`}),W(["overline","underline"],"{:auto}",{createAtom:e=>new Se(_(S({},e),{body:se(e.args[0])})),render:(e,t)=>{const r=e.command.substring(1),n=new Ar({parent:t,mathstyle:"cramp"},e.style),i=Se.createBox(n,e.body);if(!i)return null;const a=n.metrics.defaultRuleThickness/n.scalingFactor,s=new Ue(null,{classes:r+"-line"});s.height=a,s.maxFontSize=a*1.125*n.scalingFactor;let u;return r==="overline"?u=new Ln({shift:0,children:[{box:i},3*a,{box:s},a]}):u=new Ln({top:i.height,children:[a,{box:s},3*a,{box:i}]}),e.caret&&(u.caret=e.caret),new Ue(u,{classes:r,type:"ignore"})}}),W("overset","{:auto}{base:auto}",{createAtom:e=>{const t=se(e.args[1]);return new Hr(_(S({},e),{above:se(e.args[0]),body:t,skipBoundary:!1,boxType:Ss(t)}))},serialize:(e,t)=>sn(e.command,e.aboveToLatex(t),e.bodyToLatex(t))}),W("underset","{:auto}{base:auto}",{createAtom:e=>{const t=se(e.args[1]);return new Hr(_(S({},e),{below:se(e.args[0]),body:t,skipBoundary:!1,boxType:Ss(t)}))},serialize:(e,t)=>sn(e.command,e.belowToLatex(t),e.bodyToLatex(t))}),W("overunderset","{above:auto}{below:auto}{base:auto}",{createAtom:e=>{const t=se(e.args[2]);return new Hr(_(S({},e),{above:se(e.args[0]),below:se(e.args[1]),body:t,skipBoundary:!1,boxType:Ss(t)}))},serialize:(e,t)=>sn(e.command,e.belowToLatex(t),e.bodyToLatex(t))}),W(["stackrel","stackbin"],"[below:auto]{above:auto}{base:auto}",{createAtom:e=>new Hr(_(S({},e),{body:se(e.args[2]),above:se(e.args[1]),below:se(e.args[0]),skipBoundary:!1,boxType:e.command==="\\stackrel"?"rel":"bin"})),serialize:(e,t)=>sn(e.command,e.aboveToLatex(t),e.bodyToLatex(t))}),W("smash","[:string]{:auto}",{createAtom:e=>{var t,r,n,i;return new Bn(_(S({},e),{body:se(e.args[1]),smashHeight:(r=(t=e.args[0])==null?void 0:t.includes("t"))!=null?r:!0,smashDepth:(i=(n=e.args[0])==null?void 0:n.includes("b"))!=null?i:!0}))}}),W(["vphantom"],"{:auto}",{createAtom:e=>new Bn(_(S({},e),{body:se(e.args[0]),isInvisible:!0,smashWidth:!0}))}),W(["hphantom"],"{:auto}",{createAtom:e=>new Bn(_(S({},e),{body:se(e.args[0]),isInvisible:!0,smashHeight:!0,smashDepth:!0}))}),W(["phantom"],"{:auto}",{createAtom:e=>new Bn(_(S({},e),{body:se(e.args[0]),isInvisible:!0}))}),W("not","{:math}",{createAtom:e=>{const t=se(e.args[0]);return t.length===0?new Se(_(S({},e),{type:"mrel",value:"\uE020"})):new Se(_(S({},e),{body:[new yr(_(S({},e),{body:"\uE020",align:"right"})),...t],captureSelection:!0}))},serialize:(e,t)=>{const r=e.args[0],n=r&&typeof r=="object"&&"group"in r;return e.value!=="\uE020"?n?`\\not{${Se.serialize(r.group,t)}}`:`\\not${Se.serialize(r,t)}`:n?"\\not{}":"\\not"},render:(e,t)=>{if(e.value)return e.createBox(t);const n=e.args[0]&&typeof e.args[0]=="object"&&"group"in e.args[0]?"ord":Ss(se(e.args[0])),i=Se.createBox(t,e.body,{type:n});return e.caret&&(i.caret=e.caret),e.bind(t,i)}}),W(["ne","neq"],"",{createAtom:e=>new Se(_(S({},e),{type:"mrel",body:[new yr(_(S({},e),{body:"\uE020",align:"right",boxType:"rel"})),new Se(_(S({},e),{value:"="}))],captureSelection:!0})),serialize:e=>e.command}),W("rlap","{:auto}",{createAtom:e=>new yr(_(S({},e),{body:se(e.args[0]),align:"right"}))}),W("llap","{:auto}",{createAtom:e=>new yr(_(S({},e),{body:se(e.args[0]),align:"left"}))}),W("mathrlap","{:math}",{createAtom:e=>new yr(_(S({},e),{body:se(e.args[0]),align:"left"}))}),W("mathllap","{:math}",{createAtom:e=>new yr(_(S({},e),{body:se(e.args[0]),align:"left"}))}),W("raisebox","{:value}{:text}",{createAtom:e=>{var t;return new eo(_(S({},e),{body:se(e.args[1]),padding:{dimension:0},offset:(t=e.args[0])!=null?t:{dimension:0}}))},serialize:(e,t)=>{var r;return sn("\\raisebox",(r=Zn(e.offset))!=null?r:"0pt",e.bodyToLatex(t))}}),W("raise","{:value}{:auto}",{createAtom:e=>{var t;return new eo(_(S({},e),{body:se(e.args[1]),padding:{dimension:0},offset:(t=e.args[0])!=null?t:{dimension:0}}))},serialize:(e,t)=>{var r;return sn("\\raise",(r=Zn(e.offset))!=null?r:"0pt",e.bodyToLatex(t))}}),W("lower","{:value}{:auto}",{createAtom:e=>{var t;return new eo(_(S({},e),{body:se(e.args[1]),padding:{dimension:0},offset:(t=fa(e.args[0],-1))!=null?t:{dimension:0}}))},serialize:(e,t)=>{var r,n;return sn("\\lower",(n=Zn(fa((r=e.offset)!=null?r:{dimension:0},-1)))!=null?n:"0pt",e.bodyToLatex(t))}}),ue("0123456789/@.?!"),Fe(65,90),Fe(97,122),ue([["\\forall",8704],["\\exists",8707],["\\nexists",8708,"mord","ams"],["\\mid",8739,"mrel"],["\\top",8868],["\\bot",8869]]),ue([["\\#",35],["\\&",38],["\\parallelogram",9649],["\\spadesuit",9824],["\\heartsuit",9825],["\\diamondsuit",9826],["\\clubsuit",9827],["\\flat",9837],["\\natural",9838],["\\sharp",9839]]),ue([["\\backslash",92],["\\nabla",8711],["\\partial",8706],["\\ell",8467],["\\hbar",8463],["\\Q",81,"mord","double-struck"],["\\C",67,"mord","double-struck"],["\\P",80,"mord","double-struck"],["\\pounds",163],["\\euro",8364]]),ue([["\\rightarrow",8594],["\\to",8594],["\\leftarrow",8592],["\\gets",8592],["\\Rightarrow",8658],["\\Leftarrow",8656],["\\longrightarrow",10230],["\\longleftarrow",10229],["\\Longrightarrow",10233],["\\implies",10233],["\\Longleftarrow",10232],["\\impliedby",10232],["\\longleftrightarrow",10231],["\\biconditional",10231],["\\Longleftrightarrow",10234],["\\mapsto",8614],["\\longmapsto",10236],["\\uparrow",8593],["\\downarrow",8595],["\\Uparrow",8657],["\\Downarrow",8659],["\\updownarrow",8597],["\\Updownarrow",8661],["\\hookrightarrow",8618],["\\hookleftarrow",8617],["\\rightharpoonup",8640],["\\leftharpoonup",8636],["\\rightharpoondown",8641],["\\leftharpoondown",8637],["\\searrow",8600],["\\nearrow",8599],["\\swarrow",8601],["\\nwarrow",8598],["\\originalof",8886],["\\laplace",8886],["\\imageof",8887],["\\Laplace",8887]],"mrel"),ue([["\\mapsfrom",8612,"mrel"],["\\Mapsfrom",10502,"mrel"],["\\MapsTo",10503,"mrel"],["\\Yup",8516,"mord"],["\\lightning",8623,"mrel"],["\\leftarrowtriangle",8701,"mrel"],["\\rightarrowtriangle",8702,"mrel"],["\\leftrightarrowtriangle",8703,"mrel"],["\\boxdot",8865,"mbin"],["\\bigtriangleup",9651,"mbin"],["\\bigtriangledown",9661,"mbin"],["\\boxbar",9707,"mbin"],["\\Lbag",10181,"mopen"],["\\Rbag",10182,"mclose"],["\\llbracket",10214,"mopen"],["\\rrbracket",10215,"mclose"],["\\longmapsfrom",10235,"mrel"],["\\Longmapsfrom",10237,"mrel"],["\\Longmapsto",10238,"mrel"],["\\boxslash",10692,"mbin"],["\\boxbslash",10693,"mbin"],["\\boxast",10694,"mbin"],["\\boxcircle",10695,"mbin"],["\\boxbox",10696,"mbin"],["\\fatsemi",10783,"mop"],["\\leftslice",10918,"mrel"],["\\rightslice",10919,"mrel"],["\\interleave",10996,"mbin"],["\\biginterleave",11004,"mop"],["\\sslash",11005,"mbin"],["\\talloblong",11006,"mbin"]]),ue([["\\lbrace",123,"mopen"],["\\rbrace",125,"mclose"],["\\lparen",40,"mopen"],["\\rparen",41,"mclose"],["\\langle",10216,"mopen"],["\\rangle",10217,"mclose"],["\\lfloor",8970,"mopen"],["\\rfloor",8971,"mclose"],["\\lceil",8968,"mopen"],["\\rceil",8969,"mclose"],["\\vert",8739],["\\lvert",8739,"mopen"],["\\rvert",8739,"mclose"],["\\|",8741],["\\Vert",8741],["\\mVert",8741],["\\lVert",8741,"mopen"],["\\rVert",8741,"mclose"],["\\lbrack",91,"mopen"],["\\rbrack",93,"mclose"],["\\{",123,"mopen"],["\\}",125,"mclose"],["(",40,"mopen"],[")",41,"mclose"],["[",91,"mopen"],["]",93,"mclose"],["\\ulcorner",9484,"mopen","ams"],["\\urcorner",9488,"mclose","ams"],["\\llcorner",9492,"mopen","ams"],["\\lrcorner",9496,"mclose","ams"],["\\lgroup",10222,"mopen"],["\\rgroup",10223,"mclose"],["\\lmoustache",9136,"mopen"],["\\rmoustache",9137,"mclose"]]),ue([["\\dashrightarrow",8674],["\\dashleftarrow",8672],["\\Rrightarrow",8667],["\\Lleftarrow",8666],["\\leftrightarrows",8646],["\\rightleftarrows",8644],["\\curvearrowright",8631],["\\curvearrowleft",8630],["\\rightrightarrows",8649],["\\leftleftarrows",8647],["\\upuparrows",8648],["\\downdownarrows",8650],["\\vartriangle",9651],["\\triangleq",8796],["\\vartriangleleft",8882],["\\trianglelefteq",8884],["\\ntriangleleft",8938],["\\ntrianglelefteq",8940],["\\vartriangleright",8883],["\\trianglerighteq",8885],["\\ntriangleright",8939],["\\ntrianglerighteq",8941],["\\blacktriangleleft",9664],["\\blacktriangleright",9654],["\\leftarrowtail",8610],["\\rightarrowtail",8611],["\\looparrowright",8620],["\\looparrowleft",8619],["\\twoheadleftarrow",8606],["\\twoheadrightarrow",8608],["\\twoheadrightarrowtail",10518],["\\rightleftharpoons",8652],["\\leftrightharpoons",8651],["\\Rsh",8625],["\\Lsh",8624],["\\circlearrowright",8635],["\\circlearrowleft",8634],["\\restriction",8638],["\\upharpoonright",8638],["\\upharpoonleft",8639],["\\downharpoonright",8642],["\\downharpoonleft",8643],["\\rightsquigarrow",8669],["\\leadsto",8669],["\\leftrightsquigarrow",8621],["\\multimap",8888],["\\nleftarrow",8602],["\\nrightarrow",8603],["\\nRightarrow",8655],["\\nLeftarrow",8653],["\\nleftrightarrow",8622],["\\nLeftrightarrow",8654],["\\nvrightarrow",8696],["\\nvtwoheadrightarrow",10496],["\\nvrightarrowtail",10516],["\\nvtwoheadrightarrowtail",10519],["\\shortparallel",8741],["\\nless",8814],["\\nleqslant",57360],["\\lneq",10887],["\\lneqq",8808],["\\nleqq",57361],["\\lvertneqq",57356],["\\lnsim",8934],["\\lnapprox",10889],["\\nprec",8832],["\\npreceq",8928],["\\precnsim",8936],["\\precnapprox",10937],["\\nsim",8769],["\\nshortmid",57350],["\\nmid",8740],["\\nvdash",8876],["\\nvDash",8877],["\\ngtr",8815],["\\ngeqslant",57359],["\\ngeqq",57358],["\\gneq",10888],["\\gneqq",8809],["\\gvertneqq",57357],["\\gnsim",8935],["\\gnapprox",10890],["\\nsucc",8833],["\\nsucceq",8929],["\\succnsim",8937],["\\succnapprox",10938],["\\ncong",8774],["\\nshortparallel",57351],["\\nparallel",8742],["\\nVDash",8879],["\\nsupseteqq",57368],["\\supsetneq",8843],["\\varsupsetneq",57371],["\\supsetneqq",10956],["\\varsupsetneqq",57369],["\\nVdash",8878],["\\precneqq",10933],["\\succneqq",10934],["\\nsubseteqq",57366],["\\leqslant",10877],["\\geqslant",10878],["\\gtrsim",8819],["\\approxeq",8778],["\\thickapprox",8776],["\\lessapprox",10885],["\\gtrapprox",10886],["\\precapprox",10935],["\\succapprox",10936],["\\thicksim",8764],["\\succsim",8831],["\\precsim",8830],["\\backsim",8765],["\\eqsim",8770],["\\backsimeq",8909],["\\lesssim",8818],["\\nleq",8816],["\\ngeq",8817],["\\smallsmile",8995],["\\smallfrown",8994],["\\leqq",8806],["\\eqslantless",10901],["\\lll",8920],["\\lessgtr",8822],["\\lesseqgtr",8922],["\\lesseqqgtr",10891],["\\risingdotseq",8787],["\\fallingdotseq",8786],["\\subseteqq",10949],["\\Subset",8912],["\\sqsubset",8847],["\\preccurlyeq",8828],["\\curlyeqprec",8926],["\\vDash",8872],["\\Vvdash",8874],["\\bumpeq",8783],["\\Bumpeq",8782],["\\geqq",8807],["\\eqslantgtr",10902],["\\ggg",8921],["\\gtrless",8823],["\\gtreqless",8923],["\\gtreqqless",10892],["\\supseteqq",10950],["\\Supset",8913],["\\sqsupset",8848],["\\succcurlyeq",8829],["\\curlyeqsucc",8927],["\\Vdash",8873],["\\shortmid",8739],["\\between",8812],["\\pitchfork",8916],["\\varpropto",8733],["\\backepsilon",8717],["\\llless",8920],["\\gggtr",8921],["\\doteqdot",8785],["\\Doteq",8785],["\\eqcirc",8790],["\\circeq",8791],["\\therefore",8756],["\\because",8757]],"mrel","ams"),ue([["+",43],["-",8722],["\u2212",8722],["\\pm",177],["\\mp",8723],["*",8727],["\\times",215],["\\div",247],["\\divides",8739],["\\cdot",8901],["\\cap",8745],["\\cup",8746],["\\setminus",8726],["\\land",8743],["\\wedge",8743],["\\lor",8744],["\\vee",8744],["\\circ",8728],["\\bigcirc",9711],["\\bullet",8729],["\\oplus",8853],["\\ominus",8854],["\\otimes",8855],["\\odot",8857],["\\oslash",8856],["\\bigtriangleup",9651],["\\bigtriangledown",9661],["\\triangleleft",9667],["\\triangleright",9657],["\\And",38],["\\dagger",8224],["\\dag",8224],["\\ddag",8225],["\\ddagger",8225],["\\ast",8727],["\\star",8902],["\\bigstar",9733],["\\diamond",8900]],"mbin"),ue([["\\lhd",8882],["\\rhd",8883],["\\lessdot",8918],["\\gtrdot",8919],["\\ltimes",8905],["\\rtimes",8906],["\\leftthreetimes",8907],["\\rightthreetimes",8908],["\\intercal",8890],["\\dotplus",8724],["\\doublebarwedge",10846],["\\divideontimes",8903],["\\centerdot",8901],["\\smallsetminus",8726],["\\barwedge",8892],["\\veebar",8891],["\\nor",8891],["\\curlywedge",8911],["\\curlyvee",8910],["\\boxminus",8863],["\\boxplus",8862],["\\boxtimes",8864],["\\boxdot",8865],["\\circleddash",8861],["\\circledast",8859],["\\circledcirc",8858],["\\unlhd",8884],["\\unrhd",8885]],"mbin","ams"),ue([["\\surd",8730],["\\infty",8734],["\\prime",8242],["\\doubleprime",8243],["\\angle",8736],["`",8216],["\\$",36],["\\%",37],["\\_",95],["\\alpha",945],["\\beta",946],["\\gamma",947],["\\delta",948],["\\epsilon",1013],["\\varepsilon",949],["\\zeta",950],["\\eta",951],["\\theta",952],["\\vartheta",977],["\\iota",953],["\\kappa",954],["\\varkappa",1008,"mord","ams"],["\\lambda",955],["\\mu",956],["\\nu",957],["\\xi",958],["\\omicron",111],["\\pi",960],["\\varpi",982],["\\rho",961],["\\varrho",1009],["\\sigma",963],["\\varsigma",962],["\\tau",964],["\\phi",981],["\\varphi",966],["\\upsilon",965],["\\chi",967],["\\psi",968],["\\omega",969],["\\Gamma",915],["\\Delta",916],["\\Theta",920],["\\Lambda",923],["\\Xi",926],["\\Pi",928],["\\Sigma",931],["\\Upsilon",933],["\\Phi",934],["\\Psi",936],["\\Omega",937],["\\digamma",989,"mord","ams"],["\\emptyset",8709]]),ue([["=",61],["<",60],["\\lt",60],[">",62],["\\gt",62],["\\le",8804],["\\leq",8804],["\\ge",8805],["\\geq",8805],["\\ll",8810],["\\gg",8811],["\\coloneq",8788],["\\coloneqq",8788],["\\colonequals",8788],["\\measeq",8797],["\\eqdef",8798],["\\questeq",8799],[":",58],["\\cong",8773],["\\equiv",8801],["\\prec",8826],["\\preceq",10927],["\\succ",8827],["\\succeq",10928],["\\perp",8869],["\\propto",8733],["\\Colon",8759],["\\smile",8995],["\\frown",8994],["\\sim",8764],["\\doteq",8784],["\\bowtie",8904],["\\Join",8904],["\\asymp",8781],["\\sqsubseteq",8849],["\\sqsupseteq",8850],["\\approx",8776],["\\~",126],["\\leftrightarrow",8596],["\\Leftrightarrow",8660],["\\models",8872],["\\vdash",8866],["\\dashv",8867],["\\roundimplies",10608],["\\in",8712],["\\notin",8713],["\\ni",8715],["\\owns",8715],["\\subset",8834],["\\supset",8835],["\\subseteq",8838],["\\supseteq",8839],["\\differencedelta",8710],["\\mvert",8739],["\\parallel",8741],["\\simeq",8771]],"mrel"),ue([["\\lnot",172],["\\neg",172],["\\triangle",9651],["\\subsetneq",8842],["\\varsubsetneq",57370],["\\subsetneqq",10955],["\\varsubsetneqq",57367],["\\nsubset",8836],["\\nsupset",8837],["\\nsubseteq",8840],["\\nsupseteq",8841]],"mrel","ams"),ue([["\\wp",8472],["\\aleph",8501]]),ue([["\\blacktriangle",9650],["\\hslash",8463],["\\Finv",8498],["\\Game",8513],["\\eth",240],["\\mho",8487],["\\Bbbk",107],["\\yen",165],["\\square",9633],["\\Box",9633],["\\blacksquare",9632],["\\circledS",9416],["\\circledR",174],["\\triangledown",9661],["\\blacktriangledown",9660],["\\checkmark",10003],["\\diagup",9585],["\\measuredangle",8737],["\\sphericalangle",8738],["\\backprime",8245],["\\backdoubleprime",8246],["\\Diamond",9674],["\\lozenge",9674],["\\blacklozenge",10731],["\\varnothing",8709],["\\complement",8705],["\\maltese",10016],["\\beth",8502],["\\daleth",8504],["\\gimel",8503]],"mord","ams"),ue([["\\ ",160],["~",160]],"space"),W(["!",",",":",";",">","enskip","enspace","quad","qquad"],"",{createAtom:e=>new xi(e)}),W("space","",{createAtom:e=>new xi(e)}),ue([["\\colon",58],["\\cdotp",8901],["\\vdots",8942,"mord"],["\\ldotp",46],[",",44],[";",59]],"mpunct"),ue([["\\cdots",8943],["\\ddots",8945],["\\ldots",8230],["\\mathellipsis",8230]],"minner"),ue([["\\/",47],["|",8739,"mord"],["\\imath",305],["\\jmath",567],["\\degree",176],["'",8242],['"',8221]]);var Oh="<mo>&#x2061;</mo>",a0="<mo>&#8290;</mo>";function o0(e){return e.replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function en(e,t){return!e||!t.generateID?"":` extid="${e}"`}function Ig(e,t,r){var n,i,a,s,u,d,h,p,y,M,B;let $=!1;t=t!=null?t:e.atoms.length;let oe="",Ve="",re=e.atoms[e.index];const De=(i=(n=re.style)==null?void 0:n.variant)!=null?i:"",Xe=(s=(a=re.style)==null?void 0:a.variantStyle)!=null?s:"";let $e="";if(De||Xe){const Ot=Oe(re.value,(u=re.style)==null?void 0:u.variant,(d=re.style)==null?void 0:d.variantStyle);if(Ot!==re.value)return e.index+=1,oe=`<mi${en(re.id,r)}>${Ot}</mi>`,Po(oe,e,r)||(e.mathML+=oe,e.lastType="mi"),!0;$e=(h={upnormal:"normal",boldnormal:"bold",italicmain:"italic",bolditalicmain:"bold-italic","updouble-struck":"double-struck","double-struck":"double-struck",boldfraktur:"bold-fraktur",calligraphic:"script",upcalligraphic:"script",script:"script",boldscript:"bold-script",boldcalligraphic:"bold-script",fraktur:"fraktur","upsans-serif":"sans-serif","boldsans-serif":"bold-sans-serif","italicsans-serif":"sans-serif-italic","bolditalicsans-serif":"sans-serif-bold-italic",monospace:"monospace"}[Xe+De])!=null?h:"",$e=` mathvariant="${$e}"`}const yt={"\\exponentialE":"&#x02147;","\\imaginaryI":"&#x2148;","\\differentialD":"&#x2146;","\\capitalDifferentialD":"&#x2145;","\\alpha":"&#x03b1;","\\pi":"&#x03c0;","\\infty":"&#x221e;","\\forall":"&#x2200;","\\nexists":"&#x2204;","\\exists":"&#x2203;","\\hbar":"\u210F","\\cdotp":"\u22C5","\\ldots":"\u2026","\\cdots":"\u22EF","\\ddots":"\u22F1","\\vdots":"\u22EE","\\ldotp":"."};if(re.command==="!")return e.index+=1,oe="<mo>!</mo>",Po(oe,e,r)||(e.mathML+=oe,e.lastType="mo"),!0;if(yt[re.command]){e.index+=1;let Ot=`<mi${en(re.id,r)}${$e}>${yt[re.command]}</mi>`;return(e.lastType==="mi"||e.lastType==="mn"||e.lastType==="mtext"||e.lastType==="fence")&&(Ot=a0+Ot),Po(Ot,e,r)||(e.mathML+=Ot,e.lastType="mi"),!0}if(re.command==="\\operatorname")Ve=jl(re.body),e.index+=1;else if(De||Xe)for(;e.index<t&&(re.type==="mord"||re.type==="macro")&&!re.isDigit()&&De===((y=(p=re.style)==null?void 0:p.variant)!=null?y:"")&&Xe===((B=(M=re.style)==null?void 0:M.variantStyle)!=null?B:"");)Ve+=jl([re]),e.index+=1,re=e.atoms[e.index];else(re.type==="mord"||re.type==="macro")&&!re.isDigit()&&(Ve+=jl([re]),e.index+=1);if(Ve.length>0){$=!0,oe=`<mi${$e}>${Ve}</mi>`;const Ot=e.lastType;oe.endsWith(">f</mi>")||oe.endsWith(">g</mi>")?(oe+=Oh,e.lastType="applyfunction"):e.lastType=/^<mo>(.*)<\/mo>$/.test(oe)?"mo":"mi",Po(oe,e,r)||((Ot==="mi"||Ot==="mn"||Ot==="mtext"||Ot==="fence")&&(oe=a0+oe),e.mathML+=oe)}return $}function $g(e){return e.index<e.atoms.length&&e.atoms[e.index].superscript&&e.atoms[e.index].type==="subsup"}function Tg(e){let t=-1,r=e.index,n=!1,i=!1;for(;r<e.atoms.length&&!n&&!i;){const a=e.atoms[r];n=!a.isDigit(),i=!n&&a.superscript!==void 0,r++}return i&&(t=r-1),t}function Po(e,t,r){var n;let i=t.atoms[t.index-1];if(!i)return!1;if(!i.superscript&&!i.subscript)if(((n=t.atoms[t.index])==null?void 0:n.type)==="subsup")i=t.atoms[t.index],t.index+=1;else return!1;const a=t.lastType;t.lastType="";const s=Wr(i.superscript,r);t.lastType="";const u=Wr(i.subscript,r);if(t.lastType=a,!s&&!u)return!1;let d="";return s&&u?d=`<msubsup>${e}${u}${s}</msubsup>`:s?d=`<msup>${e}${s}</msup>`:u&&(d=`<msub>${e}${u}</msub>`),t.mathML+=d,t.lastType="",!0}function Pg(e,t,r){t=t!=null?t:e.atoms.length;const n=e.index;let i="";for(;e.index<t&&e.atoms[e.index].mode==="text";)i+=e.atoms[e.index].value?e.atoms[e.index].value:" ",e.index+=1;return i.length>0?(e.mathML+=`<mtext ${en(e.atoms[n].id,r)}>${i}</mtext>`,e.lastType="mtext",!0):!1}function Rg(e,t,r){t=t!=null?t:e.atoms.length;const n=e.index;let i="",a=Tg(e);for(a>=0&&a<t&&(t=a);e.index<t&&e.atoms[e.index].isDigit();)i+=e.atoms[e.index].asDigit(),e.index+=1;return i.length<=0?!1:(i="<mn"+en(e.atoms[n].id,r)+">"+i+"</mn>",a<0&&$g(e)&&(a=e.index,e.index+=1),Po(i,e,r)||(e.mathML+=i,e.lastType="mn"),!0)}function Og(e,t,r){let n=!1;t=t!=null?t:e.atoms.length;let i="",a="";if(e.index<t&&e.atoms[e.index].type==="mopen"){let s=!1,u=0;const d=e.index;let h=-1,p=d+1;for(;p<t&&!s;)e.atoms[p].type==="mopen"?u+=1:e.atoms[p].type==="mclose"&&(u-=1),u===-1&&(s=!0,h=p),p+=1;s&&(i="<mrow>",i+=zs(e.atoms[d],r),i+=Wr(e.atoms,r,d+1,h),i+=zs(e.atoms[h],r),i+="</mrow>",e.index=h+1,(e.lastType==="mi"||e.lastType==="mn"||e.lastType==="mfrac"||e.lastType==="fence")&&(e.mathML+=a0),Po(i,e,r)&&(n=!0,e.lastType="",i=""),a="fence")}return i.length>0&&(n=!0,e.mathML+=i,e.lastType=a),n}function Ng(e,t,r){let n=!1;t=t!=null?t:e.atoms.length;let i="",a="";const s=e.atoms[e.index];if(!s)return!1;const u={"\\ne":"&ne;","\\neq":"&neq;","\\pm":"&#177;","\\times":"&#215;","\\colon":":","\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lbrack":"[","\\rbrack":"]","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"};if(u[s.command]){e.index+=1;const d=`<mo${en(s.id,r)}>${u[s.command]}</mo>`;return Po(d,e,r)||(e.mathML+=d,e.lastType="mo"),!0}if(e.index<t&&(s.type==="mbin"||s.type==="mrel"))i+=Df(e.atoms[e.index],r),e.index+=1,a="mo";else if(e.index<t&&(s.type==="mop"||s.type==="operator"||s.type==="extensible-symbol")){if(s.subsupPlacement==="over-under"&&(s.superscript||s.subscript)){const d=zs(s,r);return s.superscript&&s.subscript?(i+="<munderover>"+d,i+=Wr(s.subscript,r),i+=Wr(s.superscript,r),i+="</munderover>"):s.superscript?(i+="<mover>"+d,i+=Wr(s.superscript,r),i+="</mover>"):s.subscript&&(i+="<munder>"+d,i+=Wr(s.subscript,r),i+="</munder>"),e.mathML+=i,e.lastType="mo",e.index+=1,!0}{const d=e.atoms[e.index],h=d.value==="\\operatorname",p=h?'<mi class="MathML-Unit"'+en(d.id,r)+">"+jl(d.value)+"</mi>":zs(d,r);i+=p,!h&&!/^<mo>(.*)<\/mo>$/.test(p)?(i+=Oh,a="applyfunction"):a=h?"mi":"mo"}(e.lastType==="mi"||e.lastType==="mn")&&!/^<mo>(.*)<\/mo>$/.test(i)&&(i=a0+i),e.index+=1}return i.length>0&&(n=!0,Po(i,e,r)||(e.mathML+=i,e.lastType=a)),n}function Wr(e,t,r,n){t!=null||(t={});const i={atoms:[],index:r!=null?r:0,mathML:"",lastType:""};if(typeof e=="number"||typeof e=="boolean")i.mathML=e.toString();else if(typeof e=="string")i.mathML=e;else if(e instanceof Se)i.mathML=Df(e,t);else if(Array.isArray(e)){i.atoms=e;let a=0;for(n=n||(e?e.length:0);i.index<n;)if(Pg(i,n,t)||Rg(i,n,t)||Ig(i,n,t)||Ng(i,n,t)||Og(i,n,t))a+=1;else if(i.index<n){let s=Df(i.atoms[i.index],t);i.lastType==="mn"&&s.length>0&&i.atoms[i.index].type==="genfrac"&&(s="<mo>&#x2064;</mo>"+s),i.atoms[i.index].type==="genfrac"?i.lastType="mfrac":i.lastType="",i.index+=1,Po(s,i,t)?a+=1:s.length>0&&(i.mathML+=s,a+=1)}a>1&&(i.mathML="<mrow>"+i.mathML+"</mrow>")}return i.mathML}function zs(e,t){let r="";const n=jl(e.value);return n&&(r="<mo"+en(e.id,t)+">"+n+"</mo>"),r}function jl(e){if(!e)return"";if(typeof e=="string")return o0(e);if(!Array.isArray(e)&&typeof e.body=="string")return o0(e.body);let t="";for(const r of e)typeof r.value=="string"&&(t+=r.value);return o0(t)}function Df(e,t){var r,n,i,a,s,u,d,h,p,y,M,B,$,oe,Ve,re,De,Xe,$e,yt,Ot,Dt;if(e.mode==="text")return`<mi${en(e.id,t)}>${e.value}</mi>`;const Lr={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",longleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",longrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",longrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xleftrightarrows:"\u21C4",xRightleftharpoons:"\u21CC",longRightleftharpoons:"\u21CC",xLeftrightharpoons:"\u21CB",longLeftrightharpoons:"\u21CB"},Gr={"\\!":-3/18,"\\ ":6/18,"\\,":3/18,"\\:":4/18,"\\>":4/18,"\\;":5/18,"\\enspace":.5,"\\quad":1,"\\qquad":2,"\\enskip":.5};let it="",na="",lo,ba,Gn,ia,Ti,tn;const{command:En}=e;if(e.command==="\\error")return`<merror${en(e.id,t)}>${Wr(e.body,t)}</merror>`;const qn={"\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\lbrack":"[","\\rbrack":"]","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"},co={"\\vec":"&#x20d7;","\\acute":"&#x00b4;","\\grave":"&#x0060;","\\dot":"&#x02d9;","\\ddot":"&#x00a8;","\\tilde":"&#x007e;","\\bar":"&#x00af;","\\breve":"&#x02d8;","\\check":"&#x02c7;","\\hat":"&#x005e;"};switch(e.type){case"first":break;case"group":case"root":it=Wr(e.body,t);break;case"array":if((e.leftDelim&&e.leftDelim!=="."||e.rightDelim&&e.rightDelim!==".")&&(it+="<mrow>",e.leftDelim&&e.leftDelim!=="."&&(it+="<mo>"+(qn[e.leftDelim]||e.leftDelim)+"</mo>")),it+="<mtable",e.colFormat){for(it+=' columnalign="',Gn=0;Gn<e.colFormat.length;Gn++)e.colFormat[Gn].align&&(it+={l:"left",c:"center",r:"right"}[e.colFormat[Gn].align]+" ");it+='"'}for(it+=">",ba=0;ba<e.array.length;ba++){for(it+="<mtr>",lo=0;lo<e.array[ba].length;lo++)it+="<mtd>"+Wr(e.array[ba][lo],t)+"</mtd>";it+="</mtr>"}it+="</mtable>",(e.leftDelim&&e.leftDelim!=="."||e.rightDelim&&e.rightDelim!==".")&&(e.rightDelim&&e.rightDelim!=="."&&(it+="<mo>"+(qn[e.leftDelim]||e.rightDelim)+"</mo>"),it+="</mrow>");break;case"genfrac":(e.leftDelim||e.rightDelim)&&(it+="<mrow>"),e.leftDelim&&e.leftDelim!=="."&&(it+="<mo"+en(e.id,t)+">"+(qn[e.leftDelim]||e.leftDelim)+"</mo>"),e.hasBarLine?(it+="<mfrac>",it+=Wr(e.above,t)||"<mi>&nbsp;</mi>",it+=Wr(e.below,t)||"<mi>&nbsp;</mi>",it+="</mfrac>"):(it+="<mtable"+en(e.id,t)+">",it+="<mtr>"+Wr(e.above,t)+"</mtr>",it+="<mtr>"+Wr(e.below,t)+"</mtr>",it+="</mtable>"),e.rightDelim&&e.rightDelim!=="."&&(it+="<mo"+en(e.id,t)+">"+(qn[e.rightDelim]||e.rightDelim)+"</mo>"),(e.leftDelim||e.rightDelim)&&(it+="</mrow>");break;case"surd":e.hasEmptyBranch("above")?(it+="<msqrt"+en(e.id,t)+">",it+=Wr(e.body,t),it+="</msqrt>"):(it+="<mroot"+en(e.id,t)+">",it+=Wr(e.body,t),it+=Wr(e.above,t),it+="</mroot>");break;case"leftright":const uo=e,fo=uo.leftDelim;it="<mrow>",fo&&fo!=="."&&(it+=`<mo${en(e.id,t)}>${(r=qn[fo])!=null?r:fo}</mo>`),e.body&&(it+=Wr(e.body,t));const ho=uo.matchingRightDelim();ho&&ho!=="."&&(it+=`<mo${en(e.id,t)}>${(n=qn[ho])!=null?n:ho}</mo>`),it+="</mrow>";break;case"sizeddelim":case"delim":it+=`<mo${en(e.id,t)}>${qn[e.value]||e.value}</mo>`;break;case"accent":it+='<mover accent="true"'+en(e.id,t)+">",it+=Wr(e.body,t),it+="<mo>"+(co[En]||e.accent)+"</mo>",it+="</mover>";break;case"line":case"overlap":break;case"overunder":Ti=e.above,ia=e.below,(e.svgAbove||Ti)&&(e.svgBelow||ia)?tn=e.body:Ti&&Ti.length>0?(tn=e.body,(a=(i=e.body)==null?void 0:i[0])!=null&&a.below?(ia=e.body[0].below,tn=e.body[0].body):((u=(s=e.body)==null?void 0:s[0])==null?void 0:u.type)==="first"&&((h=(d=e.body)==null?void 0:d[1])!=null&&h.below)&&(ia=e.body[1].below,tn=e.body[1].body)):ia&&ia.length>0&&(tn=e.body,(y=(p=e.body)==null?void 0:p[0])!=null&&y.above?(Ti=e.body[0].above,tn=e.body[0].body):((B=(M=e.body)==null?void 0:M[0])==null?void 0:B.type)==="first"&&((oe=($=e.body)==null?void 0:$[1])!=null&&oe.above)&&(Ti=e.body[1].overscript,tn=e.body[1].body)),(e.svgAbove||Ti)&&(e.svgBelow||ia)?(it+=`<munderover ${en(e.id,t)}>`,it+=(Ve=Lr[e.svgBody])!=null?Ve:Wr(tn,t),it+=(re=Lr[e.svgBelow])!=null?re:Wr(ia,t),it+=(De=Lr[e.svgAbove])!=null?De:Wr(Ti,t),it+="</munderover>"):e.svgAbove||Ti?(it+=`<mover ${en(e.id,t)}>`+((Xe=Lr[e.svgBody])!=null?Xe:Wr(tn,t)),it+=($e=Lr[e.svgAbove])!=null?$e:Wr(Ti,t),it+="</mover>"):(e.svgBelow||ia)&&(it+=`<munder ${en(e.id,t)}>`+((yt=Lr[e.svgBody])!=null?yt:Wr(tn,t)),it+=(Ot=Lr[e.svgBelow])!=null?Ot:Wr(ia,t),it+="</munder>");break;case"placeholder":it+="?";break;case"mord":{it=typeof e.value=="string"?e.value:En,En==="\\char"?it="&#x"+("000000"+e.args[0].number.toString(16)).slice(-4)+";":it.length>0&&it.startsWith("\\")&&(typeof e.value=="string"&&e.value.charCodeAt(0)>255?it="&#x"+("000000"+e.value.charCodeAt(0).toString(16)).slice(-4)+";":typeof e.value=="string"?it=e.value.charAt(0):(console.error("Did not expect this"),it=""));const Oa=/\d/.test(it)?"mn":"mi";it=`<${Oa}${en(e.id,t)}>${o0(it)}</${Oa}>`;break}case"mbin":case"mrel":case"minner":it=zs(e,t);break;case"mpunct":it='<mo separator="true"'+en(e.id,t)+">"+En+"</mo>";break;case"mop":case"operator":case"extensible-symbol":e.body!=="\u200B"&&(it="<mo"+en(e.id,t)+">",it+=En==="\\operatorname"?e.body:En||e.body,it+="</mo>");break;case"box":it='<menclose notation="box"',e.backgroundcolor&&(it+=' mathbackground="'+e.backgroundcolor+'"'),it+=en(e.id,t)+">"+Wr(e.body,t)+"</menclose>";break;case"spacing":it+='<mspace width="'+((Dt=Gr[En])!=null?Dt:0)+'em"/>';break;case"enclose":it='<menclose notation="';for(const Oa in e.notation)Object.prototype.hasOwnProperty.call(e.notation,Oa)&&e.notation[Oa]&&(it+=na+Oa,na=" ");it+=en(e.id,t)+'">'+Wr(e.body,t)+"</menclose>";break;case"prompt":it='<menclose notation="roundexbox""">'+Wr(e.body,t)+"</menclose>";break;case"space":it+="&nbsp;";break;case"subsup":break;case"phantom":break;case"composition":break;case"rule":break;case"chem":break;case"mopen":it+=zs(e,t);break;case"mclose":it+=zs(e,t);break;case"macro":{const Oa=e.command+jl(e.macroArgs);Oa&&(it+=`<mo ${en(e.id,t)}>${Oa}</mo>`)}break;case"latexgroup":it+=Wr(e.body,t);break;case"latex":it+="<mtext"+en(e.id,t)+">"+e.value+"</mtext>";break;case"tooltip":it+=Wr(e.body,t);break;case"text":it+=`<mtext ${en(e.id,t)}x>${e.value}</mtext>`;break;default:if(e.command==="\\displaystyle")return`<mrow ${en(e.id,t)} displaystyle="true">${Wr(e.body,t)}</mrow>`;if(e.command==="\\textstyle")return`<mrow ${en(e.id,t)} displaystyle="false">${Wr(e.body,t)}</mrow>`;console.info("Unexpected element in conversion to MathML:",e)}return it}var Ul={"\\alpha":"alpha ","\\mu":"mew ","\\sigma":"sigma ","\\pi":"pie ","\\imaginaryI":"imaginary eye ","\\imaginaryJ":"imaginary jay ","\\sum":"Summation ","\\prod":"Product ","+":"plus ","-":"minus ",";":'<break time="150ms"/> semi-colon <break time="150ms"/>',",":'<break time="150ms"/> comma <break time="150ms"/>',"|":'<break time="150ms"/>Vertical bar<break time="150ms"/>',"(":'<break time="150ms"/>Open paren. <break time="150ms"/>',")":'<break time="150ms"/> Close paren. <break time="150ms"/>',"=":"equals ","<":"is less than ","\\lt":"is less than ","<=":"is less than or equal to ","\\le":"is less than or equal to ","\\gt":"is greater than ",">":"is greater than ","\\pm":"plus or minus","\\mp":"minus or plus","\\ge":"is greater than or equal to ","\\geq":"is greater than or equal to ","\\leq":"is less than or equal to ","\\ne":"is not equal to ","\\neq":"is not equal to ","!":"factorial ","\\sin":"sine ","\\cos":"cosine ","\u200B":"","\u2212":"minus ",":":'<break time="150ms"/> such that <break time="200ms"/> ',"\\colon":'<break time="150ms"/> such that <break time="200ms"/> ',"\\hbar":"etch bar ","\\iff":'<break time="200ms"/>if, and only if, <break time="200ms"/>',"\\Longleftrightarrow":'<break time="200ms"/>if, and only if, <break time="200ms"/>',"\\land":"and ","\\lor":"or ","\\neg":"not ","\\div":"divided by ","\\forall":"for all ","\\exists":"there exists ","\\nexists":"there does not exists ","\\in":"element of ","\\N":'the set <break time="150ms"/><say-as interpret-as="character">n</say-as>',"\\C":'the set <break time="150ms"/><say-as interpret-as="character">c</say-as>',"\\Z":'the set <break time="150ms"/><say-as interpret-as="character">z</say-as>',"\\Q":'the set <break time="150ms"/><say-as interpret-as="character">q</say-as>',"\\infty":"infinity ","\\nabla":"nabla ","\\partial":"partial derivative of ","\\cdot":"times ","\\cdots":"dot dot dot ","\\Rightarrow":"implies ","\\lparen":'<break time="150ms"/>open paren<break time="150ms"/>',"\\rparen":'<break time="150ms"/>close paren<break time="150ms"/>',"\\lbrace":'<break time="150ms"/>open brace<break time="150ms"/>',"\\{":'<break time="150ms"/>open brace<break time="150ms"/>',"\\rbrace":'<break time="150ms"/>close brace<break time="150ms"/>',"\\}":'<break time="150ms"/>close brace<break time="150ms"/>',"\\langle":'<break time="150ms"/>left angle bracket<break time="150ms"/>',"\\rangle":'<break time="150ms"/>right angle bracket<break time="150ms"/>',"\\lfloor":'<break time="150ms"/>open floor<break time="150ms"/>',"\\rfloor":'<break time="150ms"/>close floor<break time="150ms"/>',"\\lceil":'<break time="150ms"/>open ceiling<break time="150ms"/>',"\\rceil":'<break time="150ms"/>close ceiling<break time="150ms"/>',"\\vert":'<break time="150ms"/>vertical bar<break time="150ms"/>',"\\mvert":'<break time="150ms"/>divides<break time="150ms"/>',"\\lvert":'<break time="150ms"/>left vertical bar<break time="150ms"/>',"\\rvert":'<break time="150ms"/>right vertical bar<break time="150ms"/>',"\\lbrack":'<break time="150ms"/> open square bracket <break time="150ms"/>',"\\rbrack":'<break time="150ms"/> close square bracket <break time="150ms"/>',mm:"millimeters",cm:"centimeters",km:"kilometers",kg:"kilograms"},Af={array:"array",matrix:"matrix",pmatrix:"parenthesis matrix",bmatrix:"square brackets matrix",Bmatrix:"braces matrix",vmatrix:"bars matrix",Vmatrix:"double bars matrix","matrix*":"matrix",smallmatrix:"small matrix"};function Fg(e){let t="";return e.startsWith("\\")&&(t=" "+e.replace("\\","")+" "),t}function Yc(e){let t=0;if(A(e))for(const r of e)r.type!=="first"&&(t+=1);return t===1}function zg(e){if(A(e)){for(const t of e)if(t.type!=="first"&&t.id)return t.id.toString()}return""}function Nh(e){let t="";if(A(e))for(const r of e)r.type!=="first"&&typeof r.value=="string"&&(t+=r.value);return t}function Kg(e){return e?e.map(t=>t.value).join(""):""}function _r(e,t){var r,n,i,a,s;function u(p){return window.MathfieldElement.textToSpeechMarkup?/[a-z]/.test(p)?` <say-as interpret-as="character">${p}</say-as>`:/[A-Z]/.test(p)?`capital <say-as interpret-as="character">${p.toLowerCase()}</say-as>`:p:/[a-z]/.test(p)?" '"+p.toUpperCase()+"'":/[A-Z]/.test(p)?" 'capital "+p.toUpperCase()+"'":p}function d(p){return"<emphasis>"+p+"</emphasis>"}if(!t)return"";let h="";if(A(t)){let p=!1,y=!1;for(let M=0;M<t.length;M++)t[M].type!=="first"&&(t[M].mode!=="text"&&(y=!1),M<t.length-2&&t[M].type==="mopen"&&t[M+2].type==="mclose"&&t[M+1].type==="mord"?(h+=" of ",h+=d(_r(e,t[M+1])),M+=2):t[M].mode==="text"?y?h+=(r=t[M].value)!=null?r:" ":(y=!0,h+=_r("text",t[M])):t[M].isDigit()?p?h+=t[M].asDigit():(p=!0,h+=_r(e,t[M])):(p=!1,h+=_r(e,t[M])))}else if(t.mode==="text")t.id&&e==="math"&&(h+='<mark name="'+t.id.toString()+'"/>'),h+=t.value;else{t.id&&e==="math"&&(h+='<mark name="'+t.id.toString()+'"/>');let p="",y="",M="",B=!1;const{command:$}=t;switch($){case"\\vec":return"vector "+_r(e,t.body);case"\\acute":return _r(e,t.body)+" acute";case"\\grave":return _r(e,t.body)+" grave";case"\\dot":return"dot over"+_r(e,t.body);case"\\ddot":return"double dot over"+_r(e,t.body);case"\\mathring":return"ring over"+_r(e,t.body);case"\\tilde":case"\\widetilde":return"tilde over"+_r(e,t.body);case"\\bar":return _r(e,t.body)+" bar";case"\\breve":return _r(e,t.body)+" breve";case"\\check":case"\\widecheck":return"check over "+_r(e,t.body);case"\\hat":case"\\widehat":return"hat over"+_r(e,t.body);case"\\overarc":case"\\overparen":case"\\wideparen":return"arc over "+_r(e,t.body);case"\\underarc":case"\\underparen":return"arc under "+_r(e,t.body)}switch(t.type){case"prompt":const oe=t.body.length>1?'start input . <break time="500ms"/> '+_r(e,t.body)+'. <break time="500ms"/> end input':"blank";h+=' <break time="300ms"/> '+oe+'. <break time="700ms"/>'+((n=t.correctness)!=null?n:"")+' . <break time="700ms"/> ';break;case"array":const Ve=t.array,re=t.environmentName;if(Object.keys(Af).includes(re)){h+=` begin ${Af[re]} `;for(let $e=0;$e<Ve.length;$e++){$e>0&&(h+=","),h+=` row ${$e+1} `;for(let yt=0;yt<Ve[$e].length;yt++)yt>0&&(h+=","),h+=` column ${yt+1}: `,h+=_r("math",Ve[$e][yt])}h+=` end ${Af[re]} `}break;case"group":$==="\\ne"?h+=" not equal ":($==="\\not"&&(h+=" not "),h+=_r("math",t.body));break;case"root":h+=_r("math",t.body);break;case"genfrac":if(p=_r("math",t.above),y=_r("math",t.below),Yc(t.above)&&Yc(t.below)){const yt={"1/2":" half ","1/3":" one third ","2/3":" two third","1/4":" one quarter ","3/4":" three quarter ","1/5":" one fifth ","2/5":" two fifths ","3/5":" three fifths ","4/5":" four fifths ","1/6":" one sixth ","5/6":" five sixths ","1/8":" one eight ","3/8":" three eights ","5/8":" five eights ","7/8":" seven eights ","1/9":" one ninth ","2/9":" two ninths ","4/9":" four ninths ","5/9":" five ninths ","7/9":" seven ninths ","8/9":" eight ninths "}[Nh(t.above)+"/"+Nh(t.below)];yt?h=yt:h+=p+" over "+y}else h+=' the fraction <break time="150ms"/>'+p+' over <break time="150ms"/>'+y+'.<break time="150ms"/> End fraction.<break time="150ms"/>';break;case"surd":if(M=_r("math",t.body),t.hasEmptyBranch("above"))h+=Yc(t.body)?" the square root of "+M+" , ":' the square root of <break time="200ms"/>'+M+'. <break time="200ms"/> End square root';else{let $e=_r("math",t.above);$e=$e.trim();const yt=$e.replace(/<mark([^/]*)\/>/g,"");yt==="3"?h+=' the cube root of <break time="200ms"/>'+M+'. <break time="200ms"/> End cube root':yt==="n"?h+=' the nth root of <break time="200ms"/>'+M+'. <break time="200ms"/> End root':h+=' the root with index: <break time="200ms"/>'+$e+', of <break time="200ms"/>'+M+'. <break time="200ms"/> End root'}break;case"leftright":{const $e=t;h+=(i=$e.leftDelim?Ul[$e.leftDelim]:void 0)!=null?i:$e.leftDelim,h+=_r("math",t.body),h+=(a=$e.rightDelim?Ul[$e.rightDelim]:void 0)!=null?a:$e.rightDelim}break;case"rule":break;case"overunder":break;case"overlap":break;case"macro":const De=$.replace(/^\\/g,""),Xe=bt()[De];Xe&&(Xe!=null&&Xe.expand?h+=_r("math",t.body):h+=`${De} `);break;case"placeholder":h+="placeholder ";break;case"delim":case"sizeddelim":case"mord":case"minner":case"mbin":case"mrel":case"mpunct":case"mopen":case"mclose":{if($==="\\mathbin"||$==="\\mathrel"||$==="\\mathopen"||$==="\\mathclose"||$==="\\mathpunct"||$==="\\mathord"||$==="\\mathinner"){h=_r(e,t.body);break}let $e=t.isDigit()?t.asDigit():t.value,yt=t.command;if((t.type==="delim"||t.type==="sizeddelim")&&(yt=t.value,$e=yt),e==="text")h+=$e;else{if(t.type==="mbin"&&(h+='<break time="150ms"/>'),$e){const Ot=Ul[$e]||(yt?Ul[yt.trim()]:"");if(Ot)h+=" "+Ot;else{const Dt=yt?Fg(yt.trim()):"";h+=Dt||u($e)}}else h+=_r("math",t.body);t.type==="mbin"&&(h+='<break time="150ms"/>')}break}case"mop":case"operator":case"extensible-symbol":if(t.value!=="\u200B"){const $e=t.command;if($e==="\\sum")if(!t.hasEmptyBranch("superscript")&&!t.hasEmptyBranch("subscript")){let yt=_r("math",t.superscript);yt=yt.trim();let Ot=_r("math",t.subscript);Ot=Ot.trim(),h+=' the summation from <break time="200ms"/>'+Ot+'<break time="200ms"/> to <break time="200ms"/>'+yt+'<break time="200ms"/> of <break time="150ms"/>',B=!0}else if(t.hasEmptyBranch("subscript"))h+=" the summation of";else{let yt=_r("math",t.subscript);yt=yt.trim(),h+=' the summation from <break time="200ms"/>'+yt+'<break time="200ms"/> of <break time="150ms"/>',B=!0}else if($e==="\\prod")if(!t.hasEmptyBranch("superscript")&&!t.hasEmptyBranch("subscript")){let yt=_r("math",t.superscript);yt=yt.trim();let Ot=_r("math",t.subscript);Ot=Ot.trim(),h+=' the product from <break time="200ms"/>'+Ot+'<break time="200ms"/> to <break time="200ms"/>'+yt+'<break time="200ms"/> of <break time="150ms"/>',B=!0}else if(t.hasEmptyBranch("subscript"))h+=" the product of ";else{let yt=_r("math",t.subscript);yt=yt.trim(),h+=' the product from <break time="200ms"/>'+yt+'<break time="200ms"/> of <break time="150ms"/>',B=!0}else if($e==="\\int")if(!t.hasEmptyBranch("superscript")&&!t.hasEmptyBranch("subscript")){let yt=_r("math",t.superscript);yt=yt.trim();let Ot=_r("math",t.subscript);Ot=Ot.trim(),h+=' the integral from <break time="200ms"/>'+d(Ot)+'<break time="200ms"/> to <break time="200ms"/>'+d(yt)+' <break time="200ms"/> of ',B=!0}else h+=' the integral of <break time="200ms"/> ';else if(typeof t.value=="string"){const yt=(s=Ul[t.value])!=null?s:t.command?Ul[t.command]:void 0;h+=yt||" "+t.value}else t.command&&(t.command==="\\mathop"?h+=_r("math",t.body):t.command==="\\operatorname"?h+=Kg(t.body):h+=t.command.startsWith("\\")?" "+t.command.slice(1):" "+t.command)}break;case"enclose":M=_r("math",t.body),h+=" crossed out "+M+". End crossed out.";break;case"space":case"spacing":break}if(!B&&!t.hasEmptyBranch("superscript")){let oe=_r(e,t.superscript);oe=oe.trim();const Ve=oe.replace(/<[^>]*>/g,"");if(Yc(t.superscript)){if(e==="math"){const re=zg(t.superscript);re&&(h+='<mark name="'+re+'"/>')}Ve==="\u2032"?h+=" prime ":Ve==="2"?h+=" squared ":Ve==="3"?h+=" cubed ":Number.isNaN(Number.parseInt(Ve))?h+=" to the "+oe+"; ":h+=' to the <say-as interpret-as="ordinal">'+Ve+"</say-as> power; "}else Number.isNaN(Number.parseInt(Ve))?h+=" raised to the "+oe+"; ":h+=' raised to the <say-as interpret-as="ordinal">'+Ve+"</say-as> power; "}if(!B&&!t.hasEmptyBranch("subscript")){let oe=_r("math",t.subscript);oe=oe.trim(),h+=Yc(t.subscript)?" sub "+oe:" subscript "+oe+". End subscript. "}}return h}function Gl(e){var t,r;if(window.MathfieldElement.textToSpeechRules==="sre"&&("sre"in window||"SRE"in window)){const i=Wr(e);if(i){window.MathfieldElement.textToSpeechMarkup&&(window.MathfieldElement.textToSpeechRulesOptions=(t=window.MathfieldElement.textToSpeechRulesOptions)!=null?t:{},window.MathfieldElement.textToSpeechRulesOptions=_(S({},window.MathfieldElement.textToSpeechRulesOptions),{markup:window.MathfieldElement.textToSpeechMarkup}),window.MathfieldElement.textToSpeechRulesOptions.markup==="ssml"&&(window.MathfieldElement.textToSpeechRulesOptions=_(S({},window.MathfieldElement.textToSpeechRulesOptions),{markup:"ssml_step"})),window.MathfieldElement.textToSpeechRulesOptions=_(S({},window.MathfieldElement.textToSpeechRulesOptions),{rate:window.MathfieldElement.speechEngineRate}));const a=(r=window.SRE)!=null?r:window.sre.System.getInstance();window.MathfieldElement.textToSpeechRulesOptions&&a.setupEngine(window.MathfieldElement.textToSpeechRulesOptions);let s="";try{s=a.toSpeech(i)}catch(u){console.error("MathLive 0.98.5: `SRE.toSpeech()` runtime error",u)}return s}return""}let n=_r("math",e);if(window.MathfieldElement.textToSpeechMarkup==="ssml"){let i="";window.MathfieldElement.speechEngineRate&&(i='<prosody rate="'+window.MathfieldElement.speechEngineRate+'">'),n='<?xml version="1.0"?><speak version="1.1" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-US"><amazon:auto-breaths>'+i+"<p><s>"+n+"</s></p>"+(i?"</prosody>":"")+"</amazon:auto-breaths></speak>"}else window.MathfieldElement.textToSpeechMarkup==="mac"&&Qe()==="macos"?n=n.replace(/<mark([^/]*)\/>/g,"").replace(/<emphasis>/g,"[[emph+]]").replace(/<\/emphasis>/g,"").replace(/<break time="(\d*)ms"\/>/g,"[[slc $1]]").replace(/<say-as[^>]*>/g,"").replace(/<\/say-as>/g,""):n=n.replace(/<[^>]*>/g,"").replace(/\s{2,}/g," ");return n}var Qc={"\\ne":"\u2260","\\neq":"\u2260","\u2212":"-","-":"-","\\alpha":"alpha","\\beta":"beta","\\gamma":"gamma","\\delta":"delta","\\epsilon":"epsilon","\\varepsilon":"varepsilon","\\zeta":"zeta","\\eta":"eta","\\theta":"theta","\\vartheta":"vartheta","\\iota":"iota","\\kappa":"kappa","\\lambda":"lambda","\\mu":"mu","\\nu":"nu","\\xi":"xi","\\pi":"pi","\\rho":"rho","\\sigma":"sigma","\\tau":"tau","\\upsilon":"upsilon","\\phi":"phi","\\varphi":"varphi","\\chi":"chi","\\psi":"psi","\\omega":"omega","\\Gamma":"Gamma","\\Delta":"Delta","\\Theta":"Theta","\\Lambda":"Lambda","\\Xi":"Xi","\\Pi":"Pi","\\Sigma":"Sigma","\\Phi":"Phi","\\Psi":"Psi","\\Omega":"Omega","\\exponentialE":"e","\\imaginaryI":"i","\\imaginaryJ":"j","\\!":" ","\\,":" ","\\:":" ","\\>":" ","\\;":" ","\\enskip":" ","\\enspace":" ","\\qquad":" ","\\quad":" ","\\infty":"oo"},eu={"\\pm":"+-","\\colon":":","\\vert":"|","\\Vert":"||","\\mid":"|","\\lbrack":"[","\\rbrack":"]","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"(:","\\rangle":":)","\\sum":" sum ","\\prod":" prod ","\\bigcap":" nnn ","\\bigcup":" uuu ","\\int":" int ","\\oint":" oint ","\\ge":">=","\\le":"<=","\\ne":"!=","\\neq":"!=","\\lt":"<","\\gt":">","\\gets":"<-","\\to":"->","\\land":" and ","\\lor":" or ","\\lnot":" not ","\\forall":" AA ","\\exists":" EE ","\\in":" in ","\\notin":" !in ","\\mapsto":"|->","\\implies":"=>","\\iff":"<=>","\\cdot":"*","\\ast":"**","\\star":"***","\\times":"xx","\\div":"-:","\\ltimes":"|><","\\rtimes":"><|","\\bowtie":"|><|","\\circ":"@"};function Hg(e){let t="";for(const r of e){const n=t[t.length-1];n!==void 0&&/\d/.test(n)&&/^\d/.test(r)&&(t+=" "),t+=r}return t}function Cn(e){var t,r,n,i,a,s,u,d,h,p,y,M,B;if(!e)return"";if(A(e)){if(e.length===0)return"";if(e[0].mode==="latex")return e.map(Cn).join("");if(e[0].mode==="text"){let Xe=0,$e="";for(;((t=e[Xe])==null?void 0:t.mode)==="text";)$e+=e[Xe].body?Cn(e[Xe].body):e[Xe].value,Xe++;return`"${$e}" ${Cn(e.slice(Xe))}`}let re=0;const De=[];for(;e[re]&&e[re].mode==="math";){let Xe="";for(;e[re]&&e[re].type==="mord"&&/\d/.test(e[re].value);)Xe+=e[re++].value;Xe?De.push(Xe):De.push(Cn(e[re++]))}return De.push(Cn(e.slice(re))),Hg(De)}if(e.mode==="text")return`"${e.value}"`;let $="";const{command:oe}=e;let Ve;if(oe==="\\placeholder")return`(${Cn(e.body)})`;switch(e.type){case"accent":const re={"\\vec":"vec","\\dot":"dot","\\ddot":"ddot","\\bar":"bar","\\hat":"hat","\\acute":"acute;","\\grave":"grave","\\tilde":"tilde","\\breve":"breave","\\check":"check"}[oe];$=`${re!=null?re:""} ${Cn(e.body)} `;break;case"first":return"";case"latexgroup":return e.body.map(Dt=>Dt.value).join("");case"group":case"root":$=(r=Qc[oe])!=null?r:Cn(e.body);break;case"genfrac":{const Dt=e;(Dt.leftDelim||Dt.rightDelim)&&($=Dt.leftDelim==="."||!Dt.leftDelim?"{:":Dt.leftDelim),Dt.hasBarLine?($+="(",$+=Cn(Dt.above),$+=")/(",$+=Cn(Dt.below),$+=")"):($+="("+Cn(Dt.above)+"),",$+="("+Cn(Dt.below)+")"),(Dt.leftDelim||Dt.rightDelim)&&($+=Dt.rightDelim==="."||!Dt.rightDelim?"{:":Dt.rightDelim)}break;case"surd":$+=e.hasEmptyBranch("above")?"sqrt("+Cn(e.body)+")":"root("+Cn(e.above)+")("+Cn(e.body)+")";break;case"latex":$=e.value;break;case"leftright":{const Dt=e,Lr=Dt.leftDelim;$+=Lr==="."||!Lr?"{:":Lr,$+=Cn(Dt.body);const Gr=Dt.matchingRightDelim();$+=Gr==="."||!Gr?":}":Gr}break;case"sizeddelim":case"delim":$=e.value;break;case"overlap":break;case"overunder":break;case"mord":$=(i=(n=Qc[oe])!=null?n:oe)!=null?i:typeof e.value=="string"?e.value:"",$.startsWith("\\")&&($+=" "),Ve=oe?oe.match(/{?\\char"([\dabcdefABCDEF]+)}?/):null,Ve?$=String.fromCodePoint(Number.parseInt("0x"+Ve[1])):$.length>0&&$.startsWith("\\")&&($=typeof e.value=="string"?e.value.charAt(0):e.command),$=Wg($,e.style);break;case"mbin":case"mrel":case"minner":$=(s=(a=Qc[oe])!=null?a:eu[oe])!=null?s:e.value;break;case"mopen":case"mclose":$=e.value;break;case"mpunct":$=(u=eu[oe])!=null?u:oe;break;case"mop":case"operator":case"extensible-symbol":e.value!=="\u200B"&&(eu[oe]?$=eu[oe]:$=oe==="\\operatorname"?Cn(e.body):(d=e.value)!=null?d:oe,$+=" ");break;case"array":const De=e.array,Xe=e.environmentName,$e=(h={bmatrix:["[","]"],"bmatrix*":["[","]"]}[Xe])!=null?h:["(",")"],yt=[];for(const Dt of De){const Lr=[];for(const Gr of Dt)Lr.push($e[0]+Cn(Gr)+$e[1]);yt.push(Lr.join(","))}const Ot=(p={bmatrix:["[","]"],"bmatrix*":["[","]"],cases:["{",":}"]}[Xe])!=null?p:["(",")"];$=Ot[0]+yt.join(",")+Ot[1];break;case"box":break;case"spacing":$=(y=Qc[oe])!=null?y:" ";break;case"enclose":$="("+Cn(e.body)+")";break;case"space":$=" ";break;case"subsup":$="";break;case"macro":$=(B=(M=Qc[oe])!=null?M:eu[oe])!=null?B:Cn(e.body);break}if(!e.hasEmptyBranch("subscript")){$+="_";const re=Cn(e.subscript);$+=re.length!==1?`(${re})`:re}if(!e.hasEmptyBranch("superscript")){$+="^";const re=Cn(e.superscript);$+=re.length!==1?`(${re})`:re}return $}function Wg(e,t){if(!t)return e;let r=e;return t.variant==="double-struck"&&(r=`bbb "${r}"`),t.variant==="script"&&(r=`cc "${r}"`),t.variant==="fraktur"&&(r=`fr "${r}"`),t.variant==="sans-serif"&&(r=`sf "${r}"`),t.variant==="monospace"&&(r=`tt "${r}"`),t.variantStyle==="bold"&&(r=`bb "${r}"`),t.color?`color({${t.color}})(${r})`:r}function Un(e,t){var r,n;t!=null||(t={}),t.mathstyle=(r=t.mathstyle)!=null?r:"displaystyle";const i=new Ar({from:_(S({},Lc()),{renderPlaceholder:()=>new Ue(160,{maxFontSize:1}),letterShapeStyle:(n=t==null?void 0:t.letterShapeStyle)!=null?n:"tex"}),mathstyle:t.mathstyle}),s=new Se({mode:"math",type:"root",body:b(e,{context:i,parseMode:"math",mathstyle:t.mathstyle})}).render(i);return s?(gl(Pa(s,i)),vl(s,{classes:"ML__latex"}).toMarkup()):""}function $v(e){return k(e,{context:Lc()})}function Vg(e,t={}){return Wr(b(e,{parseMode:"math",args:()=>"",mathstyle:"displaystyle"}),t)}function Zg(e){const t=b(e,{parseMode:"math",mathstyle:"displaystyle"});return Gl(t)}var s0;function jg(e){var t,r;if(!s0){const n=(t=globalThis[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:t.ComputeEngine;n?s0=new n:console.error(`MathLive 0.98.5: The CortexJS Compute Engine library is not available.
Load the library, for example with:
import "https://unpkg.com/@cortex-js/compute-engine?module"`)}return(r=s0==null?void 0:s0.box(e).latex)!=null?r:""}function Tv(e,t="math"){return Cn(new Se({type:"root",body:b(e,{parseMode:t})}))}function Pv(e){return qa(e,{format:"ascii-math"})[1]}function Lf(e){if(typeof e=="string"){const t=Ug(e);if(!t)throw new Error(`Invalid color: ${e}`);return t}return"C"in e?qg(e):"a"in e?Fh(e):e}function ql(e){return e<0?0:e>255?255:Math.round(e)}function Ug(e){if(!e||e[0]!=="#")return;e=e.slice(1);let t;return e.length<=4?(t={r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16)},e.length===4&&(t.a=parseInt(e[3]+e[3],16)/255)):(t={r:parseInt(e[0]+e[1],16),g:parseInt(e[2]+e[3],16),b:parseInt(e[4]+e[5],16)},e.length===8&&(t.a=parseInt(e[6]+e[7],16)/255)),t&&typeof t.a=="undefined"&&(t.a=1),t}function Bf(e){const[t,r,n]=[e.L,e.C,e.H],i=n*Math.PI/180,a={L:t,a:r*Math.cos(i),b:r*Math.sin(i)};return e.alpha!==void 0&&(a.alpha=e.alpha),a}function Gg(e){const[t,r,n]=[e.L,e.a,e.b],i=Math.sqrt(r*r+n*n),s=Math.atan2(n,r)*180/Math.PI,u={L:t,C:i,H:s};return e.alpha!==void 0&&(u.alpha=e.alpha),u}function If(e){const[t,r,n]=[e.L,e.a,e.b],i=Math.pow(.9999999984505198*t+.39633779217376786*r+.2158037580607588*n,3),a=Math.pow(1.00000000888176*t-.10556134232365635*r-.0638541747717059*n,3),s=Math.pow(t*1.000000054672411-.0894841820949657*r-1.2914855378640917*n,3),u=4.076741661347994*i-3.307711590408193*a+.230969928729428*s,d=-1.2684380040921763*i+2.6097574006633715*a-.3413193963102197*s,h=-.004196086541837188*i-.7034186144594493*a+1.7076147009309444*s,p=y=>{const M=Math.abs(y);return M<=.0031308?y*12.92:(Math.sign(y)||1)*(1.055*Math.pow(M,1/2.4)-.055)};return[p(u),p(d),p(h)]}function $f(e){const[t,r,n]=e;return t>=0&&t<=1&&r>=0&&r<=1&&n>=0&&n<=1}function Tf(e,t){let[r,n,i]=e;return r=ql(r*255),n=ql(n*255),i=ql(i*255),t!==void 0?{r,g:n,b:i,alpha:t}:{r,g:n,b:i}}function Fh(e){let[t,r,n]=If(e);if($f([t,r,n]))return Tf([t,r,n],e.alpha);const i=Gg(e);if(i.C=0,[t,r,n]=If(Bf(i)),!$f([t,r,n]))return Tf([t,r,n],e.alpha);let a=0,s=e.L,u=(a+s)/2;i.C=u;const d=.36/Math.pow(2,12);for(;s-a>d;)u=(a+s)/2,i.C=u,[t,r,n]=If(Bf(i)),$f([t,r,n])?a=u:s=u;return Tf([t,r,n],e.alpha)}function qg(e){return Fh(Bf(e))}function zh(e,t){const r=Lf(e),n=Lf(t),i=.56,a=.57,s=.62,u=.65,d=.022,h=1.414,p=.1,y=5e-4,M=1.14,B=.027,$=1.14,oe=.027;function Ve(Dt){return Dt>=d?Dt:Dt+po(d-Dt,h)}function re(Dt){return(Dt<0?-1:1)*Math.pow(Math.abs(Dt),2.4)}const De=Ve(re(n.r/255)*.2126729+re(n.g/255)*.7151522+re(n.b/255)*.072175),Xe=Ve(re(r.r/255)*.2126729+re(r.g/255)*.7151522+re(r.b/255)*.072175);let $e,yt,Ot;return Math.abs(Xe-De)<y?yt=0:Xe>De?($e=po(Xe,i)-po(De,a),yt=$e*M):($e=po(Xe,u)-po(De,s),yt=$e*$),Math.abs(yt)<p?Ot=0:yt>0?Ot=yt-oe:Ot=yt+B,Ot*100}function Kh(e,t,r){r!=null||(r="#fff"),t!=null||(t="#000");const n=zh(e,r),i=zh(e,t);return Math.abs(n)>Math.abs(i)?r:t}function Xg(e){const t=Lf(e);let r=((1<<24)+(ql(t.r)<<16)+(ql(t.g)<<8)+ql(t.b)).toString(16).slice(1);return t.alpha!==void 0&&t.alpha<1&&(r+=("00"+Math.round(t.alpha*255).toString(16)).slice(-2)),r[0]===r[1]&&r[2]===r[3]&&r[4]===r[5]&&r[6]===r[7]&&(r=r[0]+r[2]+r[4]+(t.alpha!==void 0&&t.alpha<1?r[6]:"")),"#"+r}function un(e){const t=Hh(e);let r="";for(const n of t){if(typeof n.value!="string")return"";r+=n.value}return r}function Hh(e){const r=e.model.selection.ranges;return r.length!==1?[]:e.model.getAtoms(r[0])}function Jg(e,t){const r=Hh(e);if(r.length!==1)return!1;const n=To[t];return n?!!n.test(r[0].value):!1}function Yg(e,t){return un(e).length>0}function Qg(e){return[Pf(e,"double-struck","mathbb","tooltip.blackboard"),Pf(e,"fraktur","mathfrak","tooltip.fraktur"),Pf(e,"calligraphic","mathcal","tooltip.caligraphic"),Rf(e,"up","mathrm","tooltip.roman-upright"),Rf(e,"bold","mathbf","tooltip.bold"),Rf(e,"italic","mathit","tooltip.italic")]}function ev(e){return[{label:()=>Un(`\\vec{${un(e)}}`),visible:()=>un(e).length===1,onMenuSelect:()=>e.insert("\\vec{#@}",{selectionMode:"item"})},{label:()=>Un(`\\overrightarrow{${un(e)}}`),visible:()=>un(e).length>0,onMenuSelect:()=>e.insert("\\overrightarrow{#@}",{selectionMode:"item"})},{label:()=>Un(`\\overleftarrow{${un(e)}}`),visible:()=>un(e).length>0,onMenuSelect:()=>e.insert("\\overleftarrow{#@}",{selectionMode:"item"})},{label:()=>Un(`\\dot{${un(e)}}`),visible:()=>un(e).length===1,onMenuSelect:()=>e.insert("\\dot{#@}",{selectionMode:"item"})},{label:()=>Un(`\\ddot{${un(e)}}`),visible:()=>un(e).length===1,onMenuSelect:()=>e.insert("\\ddot{#@}",{selectionMode:"item"})},{label:()=>Un(`\\bar{${un(e)}}`),visible:()=>un(e).length===1,onMenuSelect:()=>e.insert("\\bar{#@}",{selectionMode:"item"})},{label:()=>Un(`\\overline{${un(e)}}`),visible:()=>un(e).length>0,onMenuSelect:()=>e.insert("\\overline{#@}",{selectionMode:"item"})},{label:()=>Un(`\\overgroup{${un(e)}}`),visible:()=>un(e).length>0,onMenuSelect:()=>e.insert("\\overgroup{#@}",{selectionMode:"item"})},{label:()=>Un(`\\overbrace{${un(e)}}`),visible:()=>un(e).length>0,onMenuSelect:()=>e.insert("\\overbrace{#@}",{selectionMode:"item"})},{label:()=>Un(`\\underline{${un(e)}}`),visible:()=>un(e).length>0,onMenuSelect:()=>e.insert("\\underline{#@}",{selectionMode:"item"})},{label:()=>Un(`\\undergroup{${un(e)}}`),visible:()=>un(e).length>0,onMenuSelect:()=>e.insert("\\undergroup{#@}",{selectionMode:"item"})},{label:()=>Un(`\\underbrace{${un(e)}}`),visible:()=>un(e).length>0,onMenuSelect:()=>e.insert("\\underbrace{#@}",{selectionMode:"item"})}]}function tv(e){return[{label:()=>Un(`\\boxed{${e.getValue(e.model.selection)}}}`),onMenuSelect:()=>e.insert("\\boxed{#@}",{selectionMode:"item"})},{label:()=>Un(`\\bbox[5px, border: 2px solid red]{${e.getValue(e.model.selection)}}`),onMenuSelect:()=>e.insert("\\bbox[5px, border: 2px solid red]{#@}",{selectionMode:"item"})},{label:()=>Un(`\\bbox[5px, border: 2px dashed black]{${e.getValue(e.model.selection)}}`),onMenuSelect:()=>e.insert("\\bbox[5px, border: 2px dashed black]{#@}",{selectionMode:"item"})}]}function rv(e){const t=[];for(const r of Object.keys(Q))t.push({class:(Xg(Kh(Q[r]))==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${Q[r]} "></span>`,ariaLabel:()=>{var n;return(n=we(r))!=null?n:r},checked:()=>{var n;return{some:"mixed",all:!0}[(n=e.queryStyle({backgroundColor:r}))!=null?n:!1]},onMenuSelect:()=>{e.applyStyle({backgroundColor:r},{operation:"toggle"}),e.adoptStyle="none"}});return t}function nv(e){const t=[];for(const r of Object.keys(ne))t.push({class:(Kh(ne[r])==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${ne[r]} "></span>`,ariaLabel:()=>{var n;return(n=we(r))!=null?n:r},checked:()=>{var n;return{some:"mixed",all:!0}[(n=e.queryStyle({color:r}))!=null?n:!1]},onMenuSelect:()=>{e.applyStyle({color:r},{operation:"toggle"}),e.adoptStyle="none"}});return t}var iv=class extends Ah{constructor(e,t,r,n){super(e,t),this.row=r,this.col=n}set active(e){const t=this.parentMenu.children;if(e)for(const r of t)r.element.classList.toggle("active",r.row<=this.row&&r.col<=this.col);else for(const r of t)r.element.classList.remove("active")}};function av(e){const t=[];for(let r=1;r<=5;r++)for(let n=1;n<=5;n++)t.push({onCreate:(i,a)=>new iv(i,a,r,n),label:"\u2610",tooltip:()=>we("tooltip.row-by-col",r,n),data:{row:r,col:n},onMenuSelect:()=>{e.insert(`\\begin{pmatrix}${Array(r).fill(Array(n).fill("#?").join(" & ")).join("\\\\")}\\end{pmatrix}`,{selectionMode:"item"})}});return t}function ov(e){return[{label:()=>we("menu.array.add row above"),id:"add-row-above",onMenuSelect:()=>e.executeCommand("addRowBefore"),visible:()=>Ks(e)},{label:()=>we("menu.array.add row below"),id:"add-row-below",onMenuSelect:()=>e.executeCommand("addRowAfter"),visible:()=>Ks(e)},{label:()=>we("menu.array.add column before"),id:"add-column-before",onMenuSelect:()=>e.executeCommand("addColumnBefore"),visible:()=>Ks(e),enabled:()=>{const t=e.model.parentEnvironment;if(!t)return!1;const[r,n]=lv(e);return r<t.maxColumns}},{label:()=>we("menu.array.add column after"),id:"add-column-after",onMenuSelect:()=>e.executeCommand("addColumnAfter"),visible:()=>Ks(e)},{type:"divider"},{label:()=>we("menu.array.delete row"),id:"delete-row",onMenuSelect:()=>e.executeCommand("removeRow"),visible:()=>Ks(e)},{label:()=>we("menu.array.delete column"),id:"delete-column",onMenuSelect:()=>e.executeCommand("removeColumn"),visible:()=>Ks(e)},{type:"divider"},{label:()=>we("menu.borders"),visible:()=>(sv(e)||Ks(e))&&e.isSelectionEditable,submenu:[{label:" \u22F1 ",id:"environment-no-border",onMenuSelect:()=>tu(e,"matrix")},{label:"(\u22F1)",id:"environment-parentheses",onMenuSelect:()=>tu(e,"pmatrix")},{label:"[\u22F1]",id:"environment-brackets",onMenuSelect:()=>tu(e,"bmatrix")},{label:"|\u22F1|",id:"environment-bar",onMenuSelect:()=>tu(e,"vmatrix")},{label:"{\u22F1}",id:"environment-braces",onMenuSelect:()=>tu(e,"Bmatrix")}],submenuClass:"border-submenu"},{type:"divider"},{label:()=>we("menu.insert matrix"),id:"insert-matrix",visible:()=>e.isSelectionEditable,submenu:av(e),submenuClass:"insert-matrix-submenu",columnCount:5},{label:()=>we("menu.mode"),id:"mode",visible:()=>e.isSelectionEditable&&e.model.selectionIsCollapsed,submenu:[{label:()=>we("menu.mode-math"),id:"mode-math",onMenuSelect:()=>{Nl(e,"accept-all"),e.executeCommand(["switchMode","math"])},checked:()=>e.model.mode==="math"},{label:()=>we("menu.mode-text"),id:"mode-text",onMenuSelect:()=>{Nl(e,"accept-all"),e.executeCommand(["switchMode","text"])},checked:()=>e.model.mode==="text"},{label:()=>we("menu.mode-latex"),id:"mode-latex",onMenuSelect:()=>e.executeCommand(["switchMode","latex"]),checked:()=>e.model.mode==="latex"}]},{type:"divider"},{label:()=>we("menu.font-style"),id:"variant",visible:()=>e.isSelectionEditable,submenu:Qg(e),submenuClass:"variant-submenu"},{label:()=>we("menu.color"),id:"color",visible:()=>e.isSelectionEditable,submenu:nv(e),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>we("menu.background-color"),id:"background-color",visible:()=>e.isSelectionEditable,submenu:rv(e),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>we("menu.accent"),id:"accent",visible:()=>e.isSelectionEditable,submenu:ev(e),submenuClass:"variant-submenu"},{label:()=>we("menu.decoration"),id:"decoration",visible:()=>e.isSelectionEditable&&un(e).length>0,submenu:tv(e),submenuClass:"variant-submenu"},{type:"divider"},{label:()=>we("menu.evaluate"),id:"ce-evaluate",visible:()=>e.isSelectionEditable&&window.MathfieldElement.computeEngine!==null,onMenuSelect:()=>{const t=cv(e);if(!t){e.model.announce("plonk");return}e.model.selectionIsCollapsed?(e.model.position=e.model.lastOffset,e.insert(`=${t}`,{insertionMode:"insertAfter",selectionMode:"item"})):e.insert(t,{insertionMode:"replaceSelection",selectionMode:"item"})}},{label:()=>we("menu.simplify"),id:"ce-simplify",visible:()=>e.isSelectionEditable&&window.MathfieldElement.computeEngine!==null,onMenuSelect:()=>{var t,r;if(e.model.selectionIsCollapsed){const n=(t=e.expression)==null?void 0:t.simplify();if(e.model.position=e.model.lastOffset,!n){e.model.announce("plonk");return}e.insert(`=${n.latex}`,{insertionMode:"insertAfter",selectionMode:"item"})}else{const n=(r=window.MathfieldElement.computeEngine)==null?void 0:r.parse(e.getValue(e.model.selection)).simplify();if(!n){e.model.announce("plonk");return}e.insert(n.latex,{insertionMode:"replaceSelection",selectionMode:"item"})}}},{label:()=>{var t;if(window.MathfieldElement.computeEngine===null)return"";const r=(t=e.expression)==null?void 0:t.unknowns[0];return r?we("menu.solve-for",Un(r)):we("menu.solve")},id:"ce-solve",visible:()=>{var t;return e.isSelectionEditable&&window.MathfieldElement.computeEngine!==null&&((t=e.expression)==null?void 0:t.unknowns.length)===1&&e.expression.unknowns[0]!=="Nothing"},onMenuSelect:()=>{var t;const r=e.expression,n=r==null?void 0:r.unknowns[0],i=(t=r.solve(n))==null?void 0:t.map(a=>{var s;return(s=a.simplify().latex)!=null?s:""});if(!i){e.model.announce("plonk");return}e.insert(`${n}=${i.length===1?i[0]:"\\left\\lbrace"+(i==null?void 0:i.join(", "))+"\\right\\rbrace"}`,{insertionMode:"replaceAll",selectionMode:"item"})}},{type:"divider"},{label:()=>we("menu.cut"),onMenuSelect:()=>e.executeCommand("cutToClipboard"),visible:()=>!e.options.readOnly&&e.isSelectionEditable,keyboardShortcut:"meta+X"},{label:()=>we("menu.copy"),id:"copy",submenu:[{label:()=>we("menu.copy-as-latex"),id:"copy-latex",onMenuSelect:()=>Qr.copyToClipboard(e,"latex"),keyboardShortcut:"meta+C"},{label:()=>we("menu.copy-as-ascii-math"),id:"copy-ascii-math",onMenuSelect:()=>Qr.copyToClipboard(e,"ascii-math")},{label:()=>we("menu.copy-as-mathml"),id:"copy-math-ml",onMenuSelect:()=>Qr.copyToClipboard(e,"math-ml")}]},{label:()=>we("menu.paste"),id:"paste",onMenuSelect:()=>e.executeCommand("pasteFromClipboard"),visible:()=>e.hasEditableContent,keyboardShortcut:"meta+V"},{label:()=>we("menu.select-all"),id:"select-all",keyboardShortcut:"meta+A",onMenuSelect:()=>e.executeCommand("selectAll")}]}function Ks(e){var t;return!!((t=e.model.parentEnvironment)!=null&&t.array)}function sv(e){return e.model.at(e.model.position).type==="array"}function lv(e){var t;const r=(t=e.model.parentEnvironment)==null?void 0:t.array;return r?[r.length,r.reduce((n,i)=>Math.max(n,i.length),0)]:[0,0]}function tu(e,t){Td(e),e.flushInlineShortcutBuffer(),sh(e.model,t),Sn(e)}function cv(e){var t,r;let n;if(e.model.selectionIsCollapsed?n=(t=window.MathfieldElement.computeEngine)==null?void 0:t.parse(e.getValue(),{canonical:!1}):n=(r=window.MathfieldElement.computeEngine)==null?void 0:r.parse(e.getValue(e.model.selection),{canonical:!1}),!n)return"";let i=n.evaluate();return i.isSame(n)&&(i=n.N()),i.latex}function Pf(e,t,r,n){return{label:()=>Un(`\\${r}{${un(e)}}`),tooltip:()=>{var i;return(i=we(n))!=null?i:n},visible:()=>Jg(e,t),checked:()=>{var i;return{some:"mixed",all:!0}[(i=e.queryStyle({variant:t}))!=null?i:!1]},onMenuSelect:()=>{e.applyStyle({variant:t},{operation:"toggle"}),e.adoptStyle="none"}}}function Rf(e,t,r,n){return{label:()=>Un(`\\${r}{${un(e)}}`),tooltip:()=>{var i;return(i=we(n))!=null?i:n},visible:()=>Yg(e,t),checked:()=>{var i;return{some:"mixed",all:!0}[(i=e.queryStyle({variantStyle:t}))!=null?i:!1]},onMenuSelect:()=>{e.applyStyle({variantStyle:t},{operation:"toggle"}),e.adoptStyle="none"}}}function Xl(e,t){return e+Gl(t)}Vi({speak:(e,t,r)=>uv(e,t,r)},{target:"mathfield"});function uv(e,t,r){var n,i;r=r!=null?r:{withHighlighting:!1};const{model:a}=e;function s(p){let y=null;switch(p){case"all":y=a.root;break;case"selection":y=a.getAtoms(a.selection);break;case"left":{y=a.getAtoms(a.offsetOf(a.at(a.position).leftSibling),a.position);break}case"right":{y=a.getAtoms(a.position,a.offsetOf(a.at(a.position).rightSibling));break}case"group":y=a.getAtoms(a.getSiblingsRange(a.position));break;case"parent":{const{parent:M}=a.at(a.position);M!=null&&M.parent?y=M:y=a.root;break}default:y=a.root}return y}function u(p){let y="";switch(p){case"all":console.log("Internal failure: speak all failed");break;case"selection":y="no selection";break;case"left":y="at start";break;case"right":y="at end";break;case"group":console.log("Internal failure: speak group failed");break;case"parent":y="no parent";break;default:console.log('unknown speak_ param value: "'+p+'"');break}return y}const d=s(t);if(d===null)return(i=(n=window.MathfieldElement).speakHook)==null||i.call(n,u(t)),!1;(r.withHighlighting||window.MathfieldElement.speechEngine==="amazon")&&(window.MathfieldElement.textToSpeechMarkup=window.sre&&window.MathfieldElement.textToSpeechRules==="sre"?"ssml_step":"ssml");const h=Gl(d);return Ne()&&r.withHighlighting?(ts().readAloudMathfield=e,Is(e,{forHighlighting:!0}),window.MathfieldElement.readAloudHook&&window.MathfieldElement.readAloudHook(e.field,h)):window.MathfieldElement.speakHook&&window.MathfieldElement.speakHook(h),!1}function dv(e){var t,r;if(!Ne()){console.log("Speak:",e);return}if(!window.MathfieldElement.speechEngine||window.MathfieldElement.speechEngine==="local"){const n=new SpeechSynthesisUtterance(e);window.speechSynthesis.speak(n)}else if(window.MathfieldElement.speechEngine==="amazon")if(!("AWS"in window))console.error("MathLive 0.98.5: AWS SDK not loaded. See https://www.npmjs.com/package/aws-sdk");else{const n=new window.AWS.Polly({apiVersion:"2016-06-10"}),i={OutputFormat:"mp3",VoiceId:(t=window.MathfieldElement.speechEngineVoice)!=null?t:"Joanna",Engine:["Amy","Emma","Brian","Ivy","Joanna","Kendra","Kimberly","Salli","Joey","Justin","Matthew"].includes((r=window.MathfieldElement.speechEngineVoice)!=null?r:"Joanna")?"neural":"standard",Text:e,TextType:"ssml"};n.synthesizeSpeech(i,(a,s)=>{if(a)console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech()\` error: ${a}`);else if(s!=null&&s.AudioStream){const u=new Uint8Array(s.AudioStream),d=new Blob([u.buffer],{type:"audio/mpeg"}),h=URL.createObjectURL(d);new Audio(h).play().catch(y=>console.log(y))}else console.log("polly.synthesizeSpeech():",s)})}else window.MathfieldElement.speechEngine==="google"&&console.error("MathLive 0.98.5: The Google speech engine is not supported yet. Please come again.")}function Wh(e){var t;let r;if(e.parent.type==="prompt")e.parentBranch==="body"&&(r="prompt");else if(e.parentBranch==="body")r=e.type&&(t={enclose:"cross out",leftright:"delimiter",surd:"square root",root:"math field",mop:"operator",first:"first"}[e.type])!=null?t:"parent";else if(e.parent.type==="genfrac"){if(e.parentBranch==="above")return"numerator";if(e.parentBranch==="below")return"denominator"}else e.parent.type==="surd"?e.parentBranch==="above"&&(r="index"):e.parentBranch==="superscript"?r="superscript":e.parentBranch==="subscript"&&(r="subscript");return r||console.log("unknown relationship"),r!=null?r:"parent"}function fv(e,t,r,n){let i="";if(t==="plonk")window.MathfieldElement.playSound("plonk"),e.flushInlineShortcutBuffer();else if(t==="delete")i=Xl("deleted: ",n);else if(t==="focus"||t.includes("move"))i=hv(e.model,r)+(e.model.selectionIsCollapsed?"":"selected: ")+pv(e.model);else if(t==="replacement")i=Xl("",e.model.at(e.model.position));else if(t==="line"){const a=Xl("",e.model.root);e.keyboardDelegate.setAriaLabel(a)}else i=n?Xl(t+" ",n):t;if(i){const a=e.ariaLiveText.textContent.includes("\xA0")?" \u202F ":" \xA0 ";e.ariaLiveText.textContent=i+a}}function hv(e,t){if(Number.isNaN(t))return"";const r=e.at(t);if(!r||r.treeDepth<=e.at(e.position).treeDepth)return"";let n="",i=r.parent;const a=e.at(e.position).parent;for(;i!==e.root&&i!==a;)n+=`out of ${Wh(i)};`,i=i.parent;return n}function pv(e){if(!e.selectionIsCollapsed)return Xl("",e.getAtoms(e.selection));let t="";const r=e.at(e.position),n=Wh(r);return r.isFirstSibling&&(t=(n?"start of "+n:"unknown")+": "),r.isLastSibling?r.isFirstSibling||(t+=n?"end of "+n:"unknown"):t+=Xl("",r),t}var mv=class{constructor(e,t,r){this.mathfield=e,this.mode=t,this.silenceNotifications=!1,this._selection={ranges:[[0,0]],direction:"none"},this._anchor=0,this._position=0,this.root=r}dispose(){this.mathfield=void 0}getState(){const e={ranges:[...this._selection.ranges]};return this.selection.direction&&this.selection.direction!=="none"&&(e.direction=this.selection.direction),{content:this.root.toJson(),selection:e,mode:this.mode}}setState(e,t){var r;const n=this.silenceNotifications;this.silenceNotifications=(r=t==null?void 0:t.silenceNotifications)!=null?r:!0;let i={};if((t==null?void 0:t.type)==="undo"&&(i={inputType:"historyUndo"}),(t==null?void 0:t.type)==="redo"&&(i={inputType:"historyRedo"}),this.contentWillChange(i)){const a=this.silenceNotifications;this.silenceNotifications=!0,this.mode=e.mode,this.root=wi(e.content),this.selection=e.selection,this.silenceNotifications=a,this.contentDidChange(i)}this.silenceNotifications=n}get atoms(){return this.root.children}get selection(){return this._selection}set selection(e){this.setSelection(e)}setSelection(e,t){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0},()=>{var r,n,i;const a=this.normalizeSelection(e,t);if(a===void 0)throw new TypeError("Invalid selection");if(a.ranges.length===1&&a.ranges[0][0]===a.ranges[0][1]){const p=a.ranges[0][0];if(!this.mathfield.dirty&&!((r=this.at(p))!=null&&r.parentPrompt)&&this.mathfield.hasEditablePrompts){if((n=this.at(p-1))!=null&&n.parentPrompt){this._anchor=this.normalizeOffset(p-1),this._position=this._anchor,this._selection=this.normalizeSelection(this._anchor);return}if((i=this.at(p+1))!=null&&i.parentPrompt){this._anchor=this.normalizeOffset(p+1),this._position=this._anchor,this._selection=this.normalizeSelection(this._anchor);return}this._anchor=0,this._position=0,this._selection={ranges:[[0,0]]};return}this._anchor=p,this._position=p,this._selection=a;return}const s=Qn(a);a.direction==="backward"?[this._position,this._anchor]=s:[this._anchor,this._position]=s;const u=this.at(s[0]+1),d=this.at(s[1]),h=Se.commonAncestor(u,d);(h==null?void 0:h.type)==="array"&&u.parent===h&&d.parent===h?this._selection={ranges:[s],direction:a.direction}:this._selection={ranges:[s],direction:a.direction},console.assert(this._position>=0&&this._position<=this.lastOffset)})}setPositionHandlingPlaceholder(e){var t;const r=this.at(e);(r==null?void 0:r.type)==="placeholder"?this.setSelection(e-1,e):((t=r==null?void 0:r.rightSibling)==null?void 0:t.type)==="placeholder"?this.setSelection(e,e+1):this.position=e,r instanceof Tt&&r.isSuggestion&&(r.isSuggestion=!1),this.mathfield.stopCoalescingUndo()}get position(){return this._position}set position(e){this.setSelection(e,e)}get anchor(){return this._anchor}get selectionIsCollapsed(){return this._anchor===this._position}get selectionIsPlaceholder(){return Math.abs(this._anchor-this._position)===1?this.at(Math.max(this._anchor,this._position)).type==="placeholder":!1}collapseSelection(e="forward"){return this._anchor===this._position?!1:(e==="backward"?this.position=Math.min(this._anchor,this._position):this.position=Math.max(this._anchor,this._position),!0)}get lastOffset(){return this.atoms.length-1}at(e){return this.atoms[e]}offsetOf(e){return this.atoms.indexOf(e)}getSiblingsRange(e){const t=this.at(e),{parent:r}=t;if(!r)return[0,this.lastOffset];const n=t.parent.branch(t.parentBranch);return[this.offsetOf(n[0]),this.offsetOf(n[n.length-1])]}getBranchRange(e,t){const r=this.at(e).branch(t);return[this.offsetOf(r[0]),this.offsetOf(r[r.length-1])]}getAtoms(e,t,r){let n=r!=null?r:{};if(Cs(e)){if(n=t!=null?t:{},e.ranges.length>1)return e.ranges.reduce((h,p)=>[...h,...this.getAtoms(p,n)],[]);e=e.ranges[0]}let i,a;if(Ga(e)){if(i=e,!Ga(t))return[];a=t}else[i,a]=e,n=t!=null?t:{};if(!Number.isFinite(i))return[];n.includeChildren===void 0&&(n.includeChildren=!1),i<0&&(i=this.lastOffset-i+1),a<0&&(a=this.lastOffset-a+1);const s=Math.min(i,a)+1,u=Math.max(i,a);if(!n.includeChildren&&s===1&&u===this.lastOffset)return[this.root];let d=[];for(let h=s;h<=u;h++){const p=this.atoms[h];Vh(this,p,s,u)&&d.push(p)}return n.includeChildren||(d=d.filter(h=>{let p=!1,{parent:y}=h;for(;y&&!p;)p=Vh(this,y,s,u),y=y.parent;return!p})),d}getAllAtoms(e=0){const t=[],r=this.lastOffset;for(let n=e;n<=r;n++)t.push(this.atoms[n]);for(let n=0;n<e;n++)t.push(this.atoms[n]);return t}findAtom(e,t=0,r="forward"){let n;const i=this.lastOffset;if(r==="forward"){for(let a=t;a<=i;a++)if(n=this.atoms[a],e(n))return n;for(let a=0;a<t;a++)if(n=this.atoms[a],e(n))return n;return}for(let a=t;a>=0;a--)if(n=this.atoms[a],e(n))return n;for(let a=i;a>t;a--)if(n=this.atoms[a],e(n))return n}extractAtoms(e){let t=this.getAtoms(e);if(t.length===1&&!t[0].parent)if(t[0].type==="root")t=[...t[0].body],t.shift();else return t=this.root.cells.flat(),this.root=new Se({type:"root",body:[]}),t;for(const r of t)r.parent.removeChild(r);return t}deleteAtoms(e){this.extractAtoms(e),this.position=e[0]}atomToString(e,t){const r=t!=null?t:"latex";if(r.startsWith("latex"))return Se.serialize([e],{expandMacro:r==="latex-expanded",skipStyles:r==="latex-unstyled",skipPlaceholders:r==="latex-without-placeholders",defaultMode:this.mathfield.options.defaultMode});if(r==="math-ml")return Wr(e);if(r==="spoken")return Gl(e);if(r==="spoken-text"){const n=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="";const i=Gl(e);return window.MathfieldElement.textToSpeechMarkup=n,i}if(r==="spoken-ssml"||r==="spoken-ssml-with-highlighting"){const n=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="ssml";const i=Gl(e);return window.MathfieldElement.textToSpeechMarkup=n,i}return r==="ascii-math"?Cn(e):(console.error(`MathLive 0.98.5: Unexpected format "${r}`),"")}getValue(e,t,r){if(e===void 0)return this.atomToString(this.root,"latex");if(typeof e=="string"&&e!=="math-json")return this.atomToString(this.root,e);let n,i;if(Ga(e)&&Ga(t)?(n=[this.normalizeRange([e,t])],i=r):Lo(e)?(n=[this.normalizeRange(e)],i=t):Cs(e)?(n=e.ranges,i=t):(n=[this.normalizeRange([0,-1])],i=e),i!=null||(i="latex"),i==="math-json"){if(!window.MathfieldElement.computeEngine)return window[Symbol.for("io.cortexjs.compute-engine")]||console.error(`The CortexJS Compute Engine library is not available.
Load the library, for example with:
import "https://unpkg.com/@cortex-js/compute-engine?module"`),'["Error", "compute-engine-not-available"]';const a=this.getValue({ranges:n},"latex-unstyled");try{const s=window.MathfieldElement.computeEngine.parse(a);return JSON.stringify(s.json)}catch(s){return JSON.stringify(["Error",`'${s.toString()}'`])}}if(i.startsWith("latex")){const a={expandMacro:i==="latex-expanded",skipStyles:i==="latex-unstyled",skipPlaceholders:i==="latex-without-placeholders",defaultMode:this.mathfield.options.defaultMode};return kr(n.map(s=>Se.serialize(this.getAtoms(s),a)))}return n.map(a=>this.getAtoms(a).map(s=>this.atomToString(s,i)).join("")).join("")}extendSelectionTo(e,t){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0},()=>{const r=this.normalizeRange([e,t]);let[n,i]=r,{parent:a}=this.at(i);if(a&&(a.type==="genfrac"||a.type==="subsup"))for(;a!==this.root&&Of(this,a,[n,i]);)i=this.offsetOf(a),a=a.parent;for(a=this.at(n).parent;a!==this.root&&Of(this,a,[n,i]);)n=this.offsetOf(a.leftSibling),a=a.parent;if(a=this.at(i).parent,(a==null?void 0:a.type)==="genfrac")for(;a!==this.root&&Of(this,a,[n,i]);)i=this.offsetOf(a),console.assert(i>=0),a=a.parent;this._position=this.normalizeOffset(t),this._selection={ranges:[[n,i]],direction:"none"}})}announce(e,t,r=[]){var n,i;((i=(n=this.mathfield.host)==null?void 0:n.dispatchEvent(new CustomEvent("announce",{detail:{command:e,previousPosition:t,atoms:r},cancelable:!0,bubbles:!0,composed:!0})))!=null?i:!0)&&fv(this.mathfield,e,t,r)}deferNotifications(e,t){const r=this._selection,n=this._anchor,i=this._position,a=this.silenceNotifications;this.silenceNotifications=!0;const s=this.root.changeCounter;t();const u=this.root.changeCounter!==s,d=n!==this._anchor||i!==this._position||E0(this._selection,r)==="different";return this.silenceNotifications=a,e.content&&u&&this.contentDidChange({inputType:e.type}),e.selection&&d&&this.selectionDidChange(),u||d}normalizeOffset(e){return e>0?e=Math.min(e,this.lastOffset):e<0&&(e=this.lastOffset+e+1),e}normalizeRange(e){let[t,r]=e;return t=this.normalizeOffset(t),r=this.normalizeOffset(r),t<r?[t,r]:[r,t]}normalizeSelection(e,t){var r;let n;if(Ga(e)){const i=this.normalizeOffset(e);if(Ga(t)){const a=this.normalizeOffset(t);n=i<=a?{ranges:[[i,a]],direction:"none"}:{ranges:[[a,i]],direction:"backward"}}else n={ranges:[[i,i]],direction:"none"}}else if(Lo(e)){const i=this.normalizeOffset(e[0]),a=this.normalizeOffset(e[1]);n=i<=a?{ranges:[[i,a]],direction:"none"}:{ranges:[[a,i]],direction:"backward"}}else Cs(e)&&(n={ranges:e.ranges.map(i=>this.normalizeRange(i)),direction:(r=e.direction)!=null?r:"none"});return console.assert(n!==void 0),n}get parentEnvironment(){let e=this.at(this.position).parent;if(e){for(;e.parent&&e.type!=="array";)e=e.parent;if(e.type==="array")return e}}get cell(){var e;let t=this.at(this.position);if(t){for(;t&&((e=t.parent)==null?void 0:e.type)!=="array";)t=t.parent;if(!(!(t!=null&&t.parent)||t.parent.type!=="array"))return t.parentBranch}}contentWillChange(e={}){if(this.silenceNotifications||!this.mathfield)return!0;const t=this.silenceNotifications;this.silenceNotifications=!0;const r=this.mathfield.onContentWillChange(e);return this.silenceNotifications=t,r}contentDidChange(e){var t;if(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(ao(this.mathfield)),this.silenceNotifications||!this.mathfield.host||!this.mathfield)return;const r=this.silenceNotifications;this.silenceNotifications=!0,this.mathfield.host.dispatchEvent(new InputEvent("input",_(S({},e),{data:e.data?e.data:(t=e.inputType)!=null?t:"",bubbles:!0,composed:!0}))),this.silenceNotifications=r}selectionDidChange(){if(!this.mathfield||(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(ao(this.mathfield)),this.silenceNotifications))return;const e=this.silenceNotifications;this.silenceNotifications=!0,this.mathfield.onSelectionDidChange(),this.silenceNotifications=e}};function Vh(e,t,r,n){const i=e.offsetOf(t);if(i<r||i>n)return!1;if(!t.hasChildren)return!0;const a=e.offsetOf(t.firstChild);if(a>=r&&a<=n){const s=e.offsetOf(t.lastChild);if(s>=r&&s<=n)return!0}return!1}function Of(e,t,r){if(!(t!=null&&t.hasChildren))return!1;const[n,i]=r,a=e.offsetOf(t.firstChild),s=e.offsetOf(t.lastChild);return a>=n&&a<=i&&s>=a&&s<=i}function ru(e,t,r,n){var i,a,s,u,d,h;const p=r.parent;if(p&&r instanceof cn){const y=!n&&t==="forward"||n==="body"&&t==="backward";let M=y?e.offsetOf(r.firstChild):e.offsetOf(r.lastChild);return y?r.rightDelim!=="?"&&r.rightDelim!=="."?(r.leftDelim=".",r.isDirty=!0):(p.addChildrenAfter(r.removeBranch("body"),r),p.removeChild(r),M--):r.leftDelim!=="?"&&r.leftDelim!=="."?(r.rightDelim=".",r.isDirty=!0):(p.addChildrenAfter(r.removeBranch("body"),r),p.removeChild(r),M--),e.position=M,!0}if(p&&r.type==="surd"){if(t==="forward"&&!n||t==="backward"&&n==="body"){const y=r.leftSibling;r.hasChildren&&p.addChildrenAfter(r.removeBranch("body"),r),p.removeChild(r),e.position=e.offsetOf(y)}else t==="forward"&&n==="body"?e.position=e.offsetOf(r):!n&&t==="backward"?r.hasChildren?e.position=e.offsetOf(r.lastChild):(e.position=Math.max(0,e.offsetOf(r)-1),p.removeChild(r)):n==="above"&&(r.hasEmptyBranch("above")&&r.removeBranch("above"),t==="backward"?e.position=e.offsetOf(r.leftSibling):e.position=e.offsetOf(r.body[0]));return!0}if(p&&(r.type==="box"||r.type==="enclose")){const y=n&&t==="backward"||!n&&t==="forward"?r.leftSibling:r.lastChild;return p.addChildrenAfter(r.removeBranch("body"),r),p.removeChild(r),e.position=e.offsetOf(y),!0}if(r.type==="genfrac"||r.type==="overunder"){if(!n)return r.type==="overunder"&&r.hasEmptyBranch("body")||r.type==="genfrac"&&r.hasEmptyBranch("below")&&r.hasEmptyBranch("above")?!1:(e.position=e.offsetOf(t==="forward"?r.firstChild:r.lastChild),!0);const y=nu.fractionNavigationOrder==="numerator-denominator"?"above":"below",M=y==="above"?"below":"above";if(p&&(t==="forward"&&n===y||t==="backward"&&n===M)){const B=r.removeBranch(y),$=r.removeBranch(M);return p.addChildrenAfter([...B,...$],r),p.removeChild(r),e.position=e.offsetOf(B.length>0?B[B.length-1]:$[0]),!0}return t==="backward"?e.position=e.offsetOf(r.leftSibling):e.position=e.offsetOf(r),!0}if(r.isExtensibleSymbol||r.type==="subsup"){if(!n&&t==="forward")return!1;if(!n){if(r.subscript||r.superscript){const y=t==="forward"?(s=(i=r.superscript)==null?void 0:i[0])!=null?s:(a=r.subscript)==null?void 0:a[0]:(h=(u=r.subscript)==null?void 0:u[0].lastSibling)!=null?h:(d=r.superscript)==null?void 0:d[0].lastSibling;return y&&(e.position=e.offsetOf(y)),!0}return!1}if(!r.hasChildren&&r.type==="subsup"){const y=t==="forward"?e.offsetOf(r):Math.max(0,e.offsetOf(r)-1);return r.parent.removeChild(r),e.position=y,!0}if(n==="superscript")if(t==="backward"){const y=e.offsetOf(r.firstChild)-1;console.assert(y>=0),e.position=y}else r.subscript?e.position=e.offsetOf(r.subscript[0]):e.position=e.offsetOf(r);else n==="subscript"&&(t==="backward"&&r.superscript?e.position=e.offsetOf(r.superscript[0].lastSibling):t==="backward"?e.position=e.offsetOf(r.firstChild)-1:e.position=e.offsetOf(r));if(n&&r.hasEmptyBranch(n)&&(r.removeBranch(n),r.type==="subsup"&&!r.subscript&&!r.superscript)){const y=t==="forward"?e.offsetOf(r):Math.max(0,e.offsetOf(r)-1);r.parent.removeChild(r),e.position=y}return!0}if((p==null?void 0:p.type)==="genfrac"&&!n&&r.type!=="first"){let y=e.offsetOf(r.leftSibling);return p.removeChild(r),p.hasEmptyBranch("above")&&p.hasEmptyBranch("below")?(y=e.offsetOf(p.leftSibling),p.parent.removeChild(p),e.announce("delete",void 0,[p]),e.position=y,!0):(e.announce("delete",void 0,[r]),e.position=y,!0)}if(t==="backward"&&((p==null?void 0:p.command)==="\\ln"||(p==null?void 0:p.command)==="\\log")&&r.parentBranch!=="body"){const y=e.offsetOf(p.leftSibling);return p.parent.removeChild(p),e.announce("delete",void 0,[p]),e.position=y,!0}return!1}function gv(e){return!e.mathfield.isSelectionEditable||!e.contentWillChange({inputType:"deleteContentBackward"})?!1:e.selectionIsCollapsed?e.deferNotifications({content:!0,selection:!0,type:"deleteContentBackward"},()=>{let t=e.at(e.position);if(!(t&&ru(e,"backward",t))){if(t!=null&&t.isFirstSibling){if(ru(e,"backward",t.parent,t.parentBranch))return;t=null}if(!t){e.announce("plonk");return}e.position=e.offsetOf(t.leftSibling),t.parent.removeChild(t),e.announce("delete",void 0,[t])}}):so(e,Qn(e.selection),"deleteContentBackward")}function vv(e){return!e.mathfield.isSelectionEditable||!e.contentWillChange({inputType:"deleteContentForward"})?!1:e.selectionIsCollapsed?e.deferNotifications({content:!0,selection:!0,type:"deleteContentForward"},()=>{var t,r;let n=e.at(e.position).rightSibling;if(n&&ru(e,"forward",n))return;if(n){if(e.at(e.position).isLastSibling&&ru(e,"forward",n.parent,n.parentBranch))return}else{if(n=e.at(e.position),n.isLastSibling&&ru(e,"forward",n.parent,n.parentBranch))return;n=void 0}if(e.position===e.lastOffset||!n){e.announce("plonk");return}n.parent.removeChild(n);let i=(t=e.at(e.position))==null?void 0:t.rightSibling;for(;(i==null?void 0:i.type)==="subsup";)i.parent.removeChild(i),i=(r=e.at(e.position))==null?void 0:r.rightSibling;e.announce("delete",void 0,[n])}):so(e,Qn(e.selection),"deleteContentForward")}function so(e,t,r){const n=e.getAtoms(t);if(n.length>0&&n[0].parent){let i=n[0].parent.firstChild;i.type==="first"&&(i=i.rightSibling);const a=n[n.length-1].parent.lastChild;let s=n[0];s.type==="first"&&(s=s.rightSibling);const u=n[n.length-1];if(s===i&&u===a){const d=n[0].parent;d.parent&&d.type!=="prompt"&&(t=[e.offsetOf(d.leftSibling),e.offsetOf(d)])}if(n.length===1&&n[0].type==="placeholder"&&n[0].parent.type==="genfrac"){const d=n[0].parent,h=n[0].parentBranch==="below"?"above":"below",p=e.offsetOf(d.leftSibling);return e.deferNotifications({content:!0,selection:!0,type:r},()=>{var y,M;const B=d.removeBranch(h);if(B.length===1&&B[0].type==="placeholder")(M=d.parent)==null||M.removeChild(d),e.position=Math.max(0,p);else{const $=d.parent.addChildrenAfter(B,d);(y=d.parent)==null||y.removeChild(d),e.position=e.offsetOf($)}})}}return e.deferNotifications({content:!0,selection:!0,type:r},()=>e.deleteAtoms(t))}Vi({deleteAll:e=>e.contentWillChange({inputType:"deleteContent"})&&so(e,[0,-1],"deleteContent"),deleteForward:e=>vv(e),deleteBackward:e=>gv(e),deleteNextWord:e=>e.contentWillChange({inputType:"deleteWordForward"})&&so(e,[e.anchor,ff(e,e.position,"forward")],"deleteWordForward"),deletePreviousWord:e=>e.contentWillChange({inputType:"deleteWordBackward"})&&so(e,[e.anchor,ff(e,e.position,"backward")],"deleteWordBackward"),deleteToGroupStart:e=>e.contentWillChange({inputType:"deleteSoftLineBackward"})&&so(e,[e.anchor,e.offsetOf(e.at(e.position).firstSibling)],"deleteSoftLineBackward"),deleteToGroupEnd:e=>e.contentWillChange({inputType:"deleteSoftLineForward"})&&so(e,[e.anchor,e.offsetOf(e.at(e.position).lastSibling)],"deleteSoftLineForward"),deleteToMathFieldStart:e=>e.contentWillChange({inputType:"deleteHardLineBackward"})&&so(e,[e.anchor,0],"deleteHardLineBackward"),deleteToMathFieldEnd:e=>e.contentWillChange({inputType:"deleteHardLineForward"})&&so(e,[e.anchor,-1],"deleteHardLineForward")},{target:"model",audioFeedback:"delete",canUndo:!0,changeContent:!0,changeSelection:!0});var bv=`<svg xmlns="http://www.w3.org/2000/svg" style="width: 21px;" viewBox="0 0 576 512" role="img" aria-label="${we("tooltip.toggle virtual keyboard")}"><path d="M528 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h480c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm16 336c0 8.823-7.177 16-16 16H48c-8.823 0-16-7.177-16-16V112c0-8.823 7.177-16 16-16h480c8.823 0 16 7.177 16 16v288zM168 268v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm-336 80v-24c0-6.627-5.373-12-12-12H84c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm384 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zM120 188v-24c0-6.627-5.373-12-12-12H84c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm-96 152v-8c0-6.627-5.373-12-12-12H180c-6.627 0-12 5.373-12 12v8c0 6.627 5.373 12 12 12h216c6.627 0 12-5.373 12-12z"/></svg>`,yv=`<svg xmlns="http://www.w3.org/2000/svg" style="height: 18px;" viewBox="0 0 448 512" role="img" aria-label="${we("tooltip.menu")}"><path d="M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"/></svg>`,xv=class{constructor(e,t){this.focusBlurInProgress=!1;var r,n,i;this.options=S(_(S({},Zd()),{macros:bt(),registers:id()}),Vd(t)),this.eventController=new AbortController;const a=this.eventController.signal;t.eventSink&&(this.host=t.eventSink),this.element=e,e.mathfield=this,this.blurred=!0,this.keystrokeCaptionVisible=!1,this.suggestionIndex=0,this.inlineShortcutBuffer=[],this.inlineShortcutBufferFlushTimer=0,this.defaultStyle={},this.adoptStyle="left",this.options.defaultMode==="inline-math"?this.element.classList.add("ML__is-inline"):this.element.classList.remove("ML__is-inline"),this.dirty=!1;let s=(n=(r=t.value)!=null?r:this.element.textContent)!=null?n:"";s=s.trim();const u=ih(this.options),d=new Se({type:"root",mode:u,body:b(s,{context:this.context})});this.model=new mv(this,u,d),this.undoManager=new Zm(this.model);const h=[];if(h.push("<span contenteditable=true aria-multiline=false part=keyboard-sink class=ML__keyboard-sink autocapitalize=off autocomplete=off autocorrect=off spellcheck=false inputmode=none tabindex=0></span>"),h.push('<span part=container class=ML__container aria-hidden=true style="visibility:hidden">'),h.push("<span part=content class=ML__content>"),h.push(Xf(this)),h.push("</span>"),window.mathVirtualKeyboard&&(h.push(`<div part=virtual-keyboard-toggle class=ML__virtual-keyboard-toggle role=button ${this.hasEditableContent?"":'style="display:none;"'} data-l10n-tooltip="tooltip.toggle virtual keyboard">`),h.push(bv),h.push("</div>")),h.push('<div part=menu-toggle class=ML__menu-toggle role=button data-l10n-tooltip="tooltip.menu">'),h.push(yv),h.push("</div>"),h.push("</span>"),h.push("<span class=ML__sr-only>"),h.push("<span role=status aria-live=assertive aria-atomic=true></span>"),h.push("</span>"),this.element.innerHTML=window.MathfieldElement.createHTML(h.join("")),!this.element.children){console.error("%cMathLive 0.98.5: Something went wrong and the mathfield could not be created.%c\nIf you are using Vue, this may be because you are using the runtime-only build of Vue. Make sure to include `runtimeCompiler: true` in your Vue configuration. There may a warning from Vue in the log above.","color:red;font-family:system-ui;font-size:1.2rem;font-weight:bold","color:inherit;font-family:system-ui;font-size:inherit;font-weight:inherit");return}this._l10Subscription=Me.subscribe(()=>Me.update(this.element)),Me.update(this.element),this.field=this.element.querySelector("[part=content]"),this.field.addEventListener("click",y=>y.stopImmediatePropagation(),{capture:!1,signal:a}),this.field.addEventListener("wheel",this,{passive:!1,signal:a}),"PointerEvent"in window?this.field.addEventListener("pointerdown",this,{signal:a}):this.field.addEventListener("mousedown",this,{signal:a}),(i=this.element.querySelector("[part=virtual-keyboard-toggle]"))==null||i.addEventListener("click",()=>{window.mathVirtualKeyboard.visible?window.mathVirtualKeyboard.hide():(window.mathVirtualKeyboard.show({animate:!0}),window.mathVirtualKeyboard.update(ao(this)))},{signal:a}),this._menu=new Lg(ov(this),{host:this.host}),this.field.addEventListener("contextmenu",this,{signal:a});const p=this.element.querySelector("[part=menu-toggle]");p==null||p.addEventListener("pointerdown",y=>{if(y.currentTarget!==p||this._menu.state!=="closed")return;this.element.classList.add("tracking");const M=p.getBoundingClientRect();this._menu.modifiers=Bs(y),this._menu.show({target:p,location:{x:M.left,y:M.bottom},onDismiss:()=>this.element.classList.remove("tracking")}),y.preventDefault(),y.stopPropagation()},{signal:a}),(this.model.atoms.length<=1||this.disabled||this.readOnly&&!this.hasEditableContent||this.userSelect==="none")&&(p.style.display="none"),this.ariaLiveText=this.element.querySelector("[role=status]"),this.keyboardDelegate=Xp(this.element.querySelector(".ML__keyboard-sink"),this.element,this),window.addEventListener("resize",this,{signal:a}),document.addEventListener("scroll",this,{signal:a}),this.resizeObserver=new ResizeObserver(()=>Sn(this)),this.resizeObserver.observe(this.field),window.mathVirtualKeyboard.addEventListener("virtual-keyboard-toggle",this,{signal:a}),Kc&&!Me.locale.startsWith(Kc.locale)&&jp(Me.locale),ra!=="ready"&&document.fonts.ready.then(()=>Fd(this)),e.querySelector("[part=container]").style.removeProperty("visibility"),this.undoManager.startRecording(),this.undoManager.snapshot("set-value")}get defaultStyle(){return this._defaultStyle}set defaultStyle(e){this._defaultStyle=e}get effectiveStyle(){if(this.adoptStyle==="none")return this.defaultStyle;const e=this.model.at(this.model.position),t=this.adoptStyle==="right"?e.rightSibling:e;if(!t)return this.defaultStyle;if(t.type==="group"){const r=t.branch("body");return!r||r.length<2?{}:this.adoptStyle==="right"?r[1].computedStyle:r[r.length-1].computedStyle}return t.computedStyle}connectToVirtualKeyboard(){this.connectedToVirtualKeyboard||(this.connectedToVirtualKeyboard=!0,window.addEventListener("message",this,{signal:this.eventController.signal}),window.mathVirtualKeyboard.connect(),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(ao(this)),n0(this))}disconnectFromVirtualKeyboard(){this.connectedToVirtualKeyboard&&(window.removeEventListener("message",this),window.mathVirtualKeyboard.disconnect(),this.connectedToVirtualKeyboard=!1,_f())}showMenu(e){var t,r;const n=(r=(t=e==null?void 0:e.location)!=null?t:Sl(this.field))!=null?r:void 0,i=e==null?void 0:e.modifiers,a=this.element.querySelector("[part=container]");return this._menu.show({target:a,location:n,modifiers:i})}get colorMap(){return e=>{var t,r,n;return(n=(r=(t=this.options).colorMap)==null?void 0:r.call(t,e))!=null?n:st(e)}}get backgroundColorMap(){return e=>{var t,r,n,i,a,s;return(s=(a=(r=(t=this.options).backgroundColorMap)==null?void 0:r.call(t,e))!=null?a:(i=(n=this.options).colorMap)==null?void 0:i.call(n,e))!=null?s:lt(e)}}get smartFence(){var e;return(e=this.options.smartFence)!=null?e:!1}get readOnly(){var e;return(e=this.options.readOnly)!=null?e:!1}get disabled(){var e,t;return(t=(e=this.host)==null?void 0:e.disabled)!=null?t:!1}get contentEditable(){return this.host?this.host.getAttribute("contenteditable")!=="false":!1}get userSelect(){if(!this.host)return"";const e=getComputedStyle(this.host);return e.getPropertyValue("user-select")||e.getPropertyValue("-webkit-user-select")}get hasEditableContent(){return this.disabled||!this.contentEditable?!1:!this.readOnly||this.hasEditablePrompts}get hasEditablePrompts(){return this.readOnly&&!this.disabled&&this.contentEditable&&this.model.findAtom(e=>e.type==="prompt"&&!e.locked)!==void 0}get isSelectionEditable(){if(this.disabled||!this.contentEditable)return!1;if(!this.readOnly)return!0;const e=this.model.at(this.model.anchor),t=this.model.at(this.model.position),r=Se.commonAncestor(e,t);return!!((r==null?void 0:r.type)==="prompt"||r!=null&&r.parentPrompt)}get letterShapeStyle(){var e;return(e=this.options.letterShapeStyle)!=null?e:"tex"}get minFontScale(){return this.options.minFontScale}get selectionStyle(){if(this.model.selectionIsCollapsed)return this.effectiveStyle;const e=this.model.getAtoms(this.model.selection);if(e.length===0)return{};const t=S({},e[0].style);for(const r of e)for(const[n,i]of Object.entries(r.style))t[n]!==i&&delete t[n];return t}queryStyle(e){const t=bf(this,e);"verbatimColor"in t&&delete t.verbatimColor,"verbatimBackgroundColor"in t&&delete t.verbatimBackgroundColor;const r=Object.keys(t).length;if(r===0)return"all";if(r>1){for(const d of Object.keys(t)){const h=this.queryStyle({[d]:t[d]});if(h==="none")return"none";if(h==="some")return"some"}return"all"}const n=Object.keys(t)[0],i=t[n];if(this.model.selectionIsCollapsed)return this.effectiveStyle[n]===i?"all":"none";const a=this.model.getAtoms(this.model.selection,{includeChildren:!0});let s=a.length;if(s===0)return"none";let u=0;for(const d of a){if(d.type==="first"){s-=1;continue}d.style[n]===i&&(u+=1)}return u===0?"none":u===s?"all":"some"}get keybindings(){var e,t;if(this._keybindings)return this._keybindings;const[r,n]=tm(this.options.keybindings,(e=Hc())!=null?e:Up());return((t=Hc())==null?void 0:t.score)>0&&(this._keybindings=r,n.length>0&&console.error("MathLive 0.98.5: Invalid keybindings for current keyboard layout",n)),r}get menu(){return this._menu}setOptions(e){var t;this.options=S(S({},this.options),Vd(e)),this._keybindings=void 0,this.options.defaultMode==="inline-math"?this.element.classList.add("ML__is-inline"):this.element.classList.remove("ML__is-inline");let r=this.options.defaultMode;r==="inline-math"&&(r="math"),((t=this.model.root.firstChild)==null?void 0:t.mode)!==r&&(this.model.root.firstChild.mode=r),this.options.readOnly&&this.hasFocus()&&window.mathVirtualKeyboard.visible&&this.executeCommand("hideVirtualKeyboard");const n=Se.serialize([this.model.root],{expandMacro:!1,defaultMode:this.options.defaultMode});("macros"in e||this.model.getValue()!==n)&&Qr.insert(this.model,n,{insertionMode:"replaceAll",selectionMode:"after",format:"latex",silenceNotifications:!0,mode:"math"}),("value"in e||"macros"in e||"registers"in e||"colorMap"in e||"backgroundColorMap"in e||"letterShapeStyle"in e||"minFontScale"in e||"readOnly"in e||"placeholderSymbol"in e)&&Sn(this)}getOptions(e){return Ts(this.options,e)}getOption(e){return Ts(this.options,e)}handleEvent(e){return rs(this,null,function*(){var t;if(Bo(this)){if(lf(e)){if(!Tc(e.origin,(t=this.options.originValidator)!=null?t:"none"))throw new DOMException(`Message from unknown origin (${e.origin}) cannot be handled`,"SecurityError");const{action:r}=e.data;if(r==="execute-command"){const n=e.data.command;if(zl(n)==="virtual-keyboard")return;this.executeCommand(n)}else r==="update-state"||(r==="focus"?this.focus({preventScroll:!0}):r==="blur"&&this.blur());return}switch(e.type){case"focus":this.onFocus();break;case"blur":this.onBlur();break;case"mousedown":this.userSelect!=="none"&&yh(this,e);break;case"pointerdown":this.userSelect!=="none"&&(yh(this,e),e.shiftKey===!1&&(yield $h(e,this.element.querySelector("[part=container]"),this._menu))&&Qd.stop());break;case"contextmenu":this.userSelect!=="none"&&e.shiftKey===!1&&(yield $h(e,this.element.querySelector("[part=container]"),this._menu))&&Qd.stop();break;case"virtual-keyboard-toggle":this.hasFocus()&&n0(this);break;case"resize":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Bo(this)&&this.onGeometryChange());break;case"scroll":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Bo(this)&&this.onGeometryChange());break;case"wheel":this.onWheel(e);break;default:console.warn("Unexpected event type",e.type)}}})}dispose(){if(!Bo(this))return;Me.unsubscribe(this._l10Subscription),this.keyboardDelegate.dispose(),this.keyboardDelegate=void 0,this.eventController.abort(),this.eventController=void 0,this.resizeObserver.disconnect(),window.mathVirtualKeyboard.removeEventListener("virtual-keyboard-toggle",this),this.disconnectFromVirtualKeyboard(),this.model.dispose();const e=this.element;delete e.mathfield,this.element=void 0,this.host=void 0,this.field=void 0,this.ariaLiveText=void 0,rg(),sm(),_g()}flushInlineShortcutBuffer(e){if(e!=null||(e={defer:!1}),!e.defer){this.inlineShortcutBuffer=[],clearTimeout(this.inlineShortcutBufferFlushTimer),this.inlineShortcutBufferFlushTimer=0;return}this.options.inlineShortcutTimeout>0&&(clearTimeout(this.inlineShortcutBufferFlushTimer),this.inlineShortcutBufferFlushTimer=setTimeout(()=>this.flushInlineShortcutBuffer(),this.options.inlineShortcutTimeout))}executeCommand(e){return zl(e)==="virtual-keyboard"?(this.focus({preventScroll:!0}),window.mathVirtualKeyboard.executeCommand(e),requestAnimationFrame(()=>window.mathVirtualKeyboard.update(ao(this))),!1):pm(this,e)}get errors(){return k(this.model.getValue(),{context:this.context})}getValue(e,t,r){return this.model.getValue(e,t,r)}setValue(e,t){var r;t=t!=null?t:{mode:"math"},t.insertionMode===void 0&&(t.insertionMode="replaceAll"),(t.format===void 0||t.format==="auto")&&(t.format="latex"),(t.mode===void 0||t.mode==="auto")&&(t.mode=(r=D0(this.model,this.model.position))!=null?r:"math");const n=this.undoManager.canUndo();Qr.insert(this.model,e,t)&&(Sn(this),n||this.undoManager.reset(),this.undoManager.snapshot("set-value"))}get expression(){const e=window.MathfieldElement.computeEngine;return e?e.box(e.parse(this.model.getValue("latex-unstyled"))):(console.error("MathLive 0.98.5: no compute engine available. Make sure the Compute Engine library is loaded."),null)}scrollIntoView(){var e;if(!this.element)return;if(this.host){if(this.options.onScrollIntoView)this.options.onScrollIntoView(this);else if(this.host.scrollIntoView({block:"nearest",inline:"nearest"}),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.container===window.document.body){const n=window.mathVirtualKeyboard.boundingRect,i=this.host.getBoundingClientRect();i.bottom>n.top&&((e=window.document.scrollingElement)==null||e.scrollBy(0,i.bottom-n.top+8))}}this.dirty&&Is(this,{interactive:!0});const t=this.field.getBoundingClientRect();let r=null;if(this.model.selectionIsCollapsed)r=Sl(this.field);else{const n=pd(this);if(n.length>0){let i=-1/0,a=-1/0;for(const s of n)s.right>i&&(i=s.right),s.top<a&&(a=s.top);r={x:i+t.left-this.field.scrollLeft,y:a+t.top-this.field.scrollTop,height:0}}}if(this.host&&r){const n=this.host.getBoundingClientRect(),i=r.y;let a=this.host.scrollTop;i<n.top?a=i-n.top+this.host.scrollTop:i>n.bottom&&(a=i-n.bottom+this.host.scrollTop+r.height),this.host.scroll({top:a,left:0})}if(r){const n=r.x-window.scrollX;let i=this.field.scrollLeft;n<t.left?i=n-t.left+this.field.scrollLeft-20:n>t.right&&(i=n-t.right+this.field.scrollLeft+20),this.field.scroll({top:this.field.scrollTop,left:i})}}insert(e,t){return typeof e!="string"||e.length===0&&((t==null?void 0:t.insertionMode)==="insertBefore"||(t==null?void 0:t.insertionMode)==="insertAfter")||e.length===0&&this.model.selectionIsCollapsed?!1:(this.flushInlineShortcutBuffer(),t=t!=null?t:{mode:"math"},t.focus&&this.focus(),t.feedback&&(window.MathfieldElement.keypressVibration&&gt()&&navigator.vibrate(Jf),window.MathfieldElement.playSound("keypress")),e==="\\\\"?ah(this.model):e==="&"?oh(this.model):this.model.selectionIsCollapsed?Qr.insert(this.model,e,S({style:this.model.at(this.model.position).computedStyle},t)):Qr.insert(this.model,e,t),this.snapshot(`insert-${this.model.at(this.model.position).type}`),Sn(this),t.scrollIntoView&&this.scrollIntoView(),!0)}switchMode(e,t="",r=""){var n;if(this.model.mode===e||!this.hasEditableContent||!this.contentEditable||this.disabled)return;const i=this.model.mode;if(this.model.mode=e,!((n=this.host)!=null&&n.dispatchEvent(new Event("mode-change",{bubbles:!0,composed:!0,cancelable:!0})))){this.model.mode=i;return}const a=this.model.mode,{model:s}=this;s.deferNotifications({content:!!r||!!t,selection:!0,type:"insertText"},()=>{let u=!1;if(this.flushInlineShortcutBuffer(),this.stopCoalescingUndo(),t&&e!=="latex"){const d=b(t,{context:this.context,parseMode:e});s.collapseSelection("forward");const h=s.at(s.position);s.position=s.offsetOf(h.parent.addChildrenAfter(d,h)),u=!0}if(this.model.mode=e,e==="latex"){let d=s.selectionIsCollapsed;Nl(this,"accept");let h,p=s.at(s.position);if(d)h="\\";else{const M=Qn(s.selection);h=this.model.getValue(M,"latex");const B=this.model.extractAtoms(M);B.length===1&&B[0].type==="placeholder"&&(h=t,d=!0),p=s.at(M[0])}const y=new br(h);p.parent.addChildAfter(y,p),d?s.position=s.offsetOf(y.lastChild):s.setSelection(s.offsetOf(y.firstChild),s.offsetOf(y.lastChild))}else Wc(s).forEach(d=>{d.isError=!1});if(r){const d=b(r,{context:this.context,parseMode:a});s.collapseSelection("forward");const h=s.at(s.position);s.position=s.offsetOf(h.parent.addChildrenAfter(d,h)),u=!0}return Sn(this),this.undoManager.snapshot(e==="latex"?"insert-latex":"insert"),u}),this.model.mode=e,window.mathVirtualKeyboard.update(ao(this))}hasFocus(){return!this.blurred}focus(e){var t;this.hasFocus()||(this.keyboardDelegate.focus(),this.connectToVirtualKeyboard(),this.onFocus(),this.model.announce("line")),(t=e==null?void 0:e.preventScroll)!=null&&t||this.scrollIntoView()}blur(){this.disconnectFromVirtualKeyboard(),this.hasFocus()&&this.keyboardDelegate.blur()}select(){this.model.selection={ranges:[[0,this.model.lastOffset]]},this.focus()}applyStyle(e,t={}){var r,n;const i={operation:"set",silenceNotifications:!1};Lo(t)?i.range=t:(t.operation==="toggle"&&(i.operation="toggle"),i.range=t.range,i.silenceNotifications=(r=t.silenceNotifications)!=null?r:!1);const a=bf(this,e),s=(n=i.operation)!=null?n:"set";if(i.range===void 0&&this.model.selectionIsCollapsed){if(s==="set"){this.defaultStyle=S(S({},this.defaultStyle),a);return}const u=S({},this.defaultStyle);for(const d of Object.keys(a))u[d]===a[d]?(d==="color"&&delete u.verbatimColor,d==="backgroundColor"&&delete u.verbatimBackgroundColor,delete u[d]):u[d]=a[d];this.defaultStyle=u;return}this.model.deferNotifications({content:!i.silenceNotifications,type:"insertText"},()=>{if(i.range===void 0)for(const u of this.model.selection.ranges)uf(this.model,u,a,{operation:s});else uf(this.model,i.range,a,{operation:s})}),Sn(this)}toggleContextMenu(){var e;return this._menu.visible?this._menu.state==="open"?(this._menu.hide(),!0):(this._menu.show({target:this.element.querySelector("[part=container]"),location:(e=this.getCaretPoint())!=null?e:void 0,onDismiss:()=>{var t;return(t=this.element)==null?void 0:t.focus()}}),!0):!1}getCaretPoint(){const e=Sl(this.field);return e?{x:e.x,y:e.y}:null}setCaretPoint(e,t){const r=Jc(this,e,t,{bias:0});if(r<0)return!1;const n=this.model.position;return this.model.position=r,this.model.announce("move",n),Sn(this),!0}getPrompt(e){const t=this.model.findAtom(r=>r.type==="prompt"&&r.placeholderId===e);return console.assert(t!==void 0,"MathLive 0.98.5: no prompts with matching ID found"),t}getPromptValue(e,t){const r=this.getPrompt(e);if(!r)return"";const n=this.model.offsetOf(r.firstChild),i=this.model.offsetOf(r.lastChild);return this.model.getValue(n,i,t)}getPrompts(e){return this.model.getAllAtoms().filter(t=>t.type!=="prompt"?!1:e?!(e.id&&t.placeholderId!==e.id||e.locked&&t.locked!==e.locked||e.correctness==="undefined"&&t.correctness||e.correctness&&t.correctness!==e.correctness):!0).map(t=>t.placeholderId)}setPromptValue(e,t,r){if(t!==void 0){const n=this.getPrompt(e);if(!n){console.error(`MathLive 0.98.5: unknown prompt ${e}`);return}const i=this.model.getBranchRange(this.model.offsetOf(n),"body");this.model.setSelection(i),this.insert(t,_(S({},r),{insertionMode:"replaceSelection"}))}r!=null&&r.silenceNotifications&&(this.valueOnFocus=this.getValue()),Sn(this)}setPromptState(e,t,r){const n=this.getPrompt(e);if(!n){console.error(`MathLive 0.98.5: unknown prompt ${e}`);return}t==="undefined"?n.correctness=void 0:typeof t=="string"&&(n.correctness=t),typeof r=="boolean"&&(n.locked=r,n.captureSelection=r),Sn(this)}getPromptState(e){const t=this.getPrompt(e);return t?[t.correctness,t.locked]:(console.error(`MathLive 0.98.5: unknown prompt ${e}`),[void 0,!0])}getPromptRange(e){const t=this.getPrompt(e);return t?this.model.getBranchRange(this.model.offsetOf(t),"body"):(console.error(`MathLive 0.98.5: unknown prompt ${e}`),[0,0])}canUndo(){return this.undoManager.canUndo()}canRedo(){return this.undoManager.canRedo()}popUndoStack(){this.undoManager.pop()}snapshot(e){var t;this.undoManager.snapshot(e)&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(ao(this)),(t=this.host)==null||t.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"snapshot"}})))}stopCoalescingUndo(){this.undoManager.stopCoalescing(this.model.selection)}stopRecording(){this.undoManager.stopRecording()}startRecording(){this.undoManager.startRecording()}undo(){var e;this.undoManager.undo()&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(ao(this)),(e=this.host)==null||e.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"undo"}})))}redo(){var e;this.undoManager.redo()&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(ao(this)),(e=this.host)==null||e.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"undo"}})))}resetUndo(){var e;(e=this.undoManager)==null||e.reset()}onSelectionDidChange(){var e,t;const r=this.model;this.keyboardDelegate.setValue(r.getValue(this.model.selection,"latex-expanded"));{const n=r.at(r.position),i=(e=n.mode)!=null?e:ih(this.options);this.model.mode!==i&&(this.model.mode==="latex"?(Nl(this,"accept",{mode:i}),r.position=r.offsetOf(n)):this.switchMode(i))}(t=this.host)==null||t.dispatchEvent(new Event("selection-change",{bubbles:!0,composed:!0})),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(ao(this)),n0(this)}onContentWillChange(e){var t,r,n;return(n=(r=this.host)==null?void 0:r.dispatchEvent(new InputEvent("beforeinput",_(S({},e),{data:e.data?e.data:(t=e.inputType)!=null?t:"",cancelable:!0,bubbles:!0,composed:!0}))))!=null?n:!0}onFocus(){this.focusBlurInProgress||!this.blurred||(this.focusBlurInProgress=!0,this.blurred=!1,this.keyboardDelegate.focus(),this.stopCoalescingUndo(),Is(this,{interactive:!0}),this.valueOnFocus=this.model.getValue(),this.hasEditablePrompts&&!this.model.at(this.model.anchor).parentPrompt&&this.executeCommand("moveToNextPlaceholder"),this.focusBlurInProgress=!1)}onBlur(){var e,t,r;if(this.focusBlurInProgress||this.blurred)return;this.focusBlurInProgress=!0,this.stopCoalescingUndo(),this.blurred=!0,this.ariaLiveText.textContent="",Fl(this),this.model.getValue()!==this.valueOnFocus&&((e=this.host)==null||e.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),this.disconnectFromVirtualKeyboard(),(t=this.host)==null||t.dispatchEvent(new Event("blur",{bubbles:!1,composed:!0})),(r=this.host)==null||r.dispatchEvent(new UIEvent("focusout",{bubbles:!0,composed:!0})),Sn(this),this.focusBlurInProgress=!1,_f();const n=new AbortController,i=n.signal;document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&document.addEventListener("visibilitychange",()=>{Bo(this)&&document.visibilityState==="visible"&&this.focus({preventScroll:!0})},{once:!0,signal:i})},{once:!0,signal:i}),setTimeout(()=>n.abort(),100)}onInput(e){mf(this,e)}onKeystroke(e){return gh(this,e)}onCompositionStart(e){this.model.deleteAtoms(Qn(this.model.selection));const t=Sl(this.field);t&&requestAnimationFrame(()=>{Is(this),this.keyboardDelegate.moveTo(t.x,t.y-t.height)})}onCompositionUpdate(e){Rm(this.model,e),Sn(this)}onCompositionEnd(e){Om(this.model),mf(this,e,{simulateKeystroke:!0})}onCut(e){if(!this.isSelectionEditable){this.model.announce("plonk");return}this.model.contentWillChange({inputType:"deleteByCut"})&&(this.stopCoalescingUndo(),Qr.onCopy(this,e),so(this.model,Qn(this.model.selection),"deleteByCut"),this.snapshot("cut"),Sn(this))}onCopy(e){Qr.onCopy(this,e)}onPaste(e){let t=this.isSelectionEditable;return t&&(t=Qr.onPaste(this.model.at(this.model.position).mode,this,e.clipboardData)),t||this.model.announce("plonk"),e.preventDefault(),e.stopPropagation(),t}onGeometryChange(){this._menu.hide(),Rd(this),n0(this)}onWheel(e){const t=5*e.deltaX;if(!Number.isFinite(t)||t===0)return;const r=this.field;t<0&&r.scrollLeft===0||t>0&&r.offsetWidth+r.scrollLeft>=r.scrollWidth||(r.scrollBy({top:0,left:t}),e.preventDefault(),e.stopPropagation())}getHTMLElement(e){let t=e;for(;!t.id&&t.hasChildren;)t=e.children[0];return this.field.querySelector(`[data-atom-id="${t.id}"]`)}get context(){var e,t;return{registers:(e=this.options.registers)!=null?e:{},smartFence:this.smartFence,letterShapeStyle:this.letterShapeStyle,minFontScale:this.minFontScale,placeholderSymbol:(t=this.options.placeholderSymbol)!=null?t:"\u25A2",colorMap:r=>this.colorMap(r),backgroundColorMap:r=>this.backgroundColorMap(r),getMacro:r=>ot(r,this.options.macros),atomIdsSettings:{seed:"random",groupNumbers:!1}}}};function Zh(e){if(e&&(e.classList.remove("ML__highlight"),e.children))for(const t of e.children)Zh(t)}function Nf(e,t){var r;e&&(!t||((r=e.dataset)==null?void 0:r.atomId)===t?(e.classList.add("ML__highlight"),e.children&&e.children.length>0&&[...e.children].forEach(n=>{n instanceof HTMLElement&&Nf(n)})):(e.classList.remove("ML__highlight"),e.children&&e.children.length>0&&[...e.children].forEach(n=>{n instanceof HTMLElement&&Nf(n,t)})))}function wv(e,t){var r;if(!Ne())return;if(window.MathfieldElement.speechEngine!=="amazon"){console.error("MathLive 0.98.5: Use Amazon TTS Engine for synchronized highlighting"),typeof window.MathfieldElement.speakHook=="function"&&window.MathfieldElement.speakHook(t);return}if(!window.AWS){console.error("MathLive 0.98.5: AWS SDK not loaded. See https://www.npmjs.com/package/aws-sdk");return}const n=new window.AWS.Polly({apiVersion:"2016-06-10"}),i={OutputFormat:"json",VoiceId:(r=window.MathfieldElement.speechEngineVoice)!=null?r:"Joanna",Engine:"standard",Text:t,TextType:"ssml",SpeechMarkTypes:["ssml"]};ts().readAloudElement=e,n.synthesizeSpeech(i,(a,s)=>{if(a){console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech()\` error: ${a}`);return}if(!(s!=null&&s.AudioStream)){console.log("polly.synthesizeSpeech():",s);return}const u=new TextDecoder("utf-8").decode(new Uint8Array(s.AudioStream));ts().readAloudMarks=u.split(`
`).map(d=>d?JSON.parse(d):{}),ts().readAloudTokens=[];for(const d of ts().readAloudMarks)d.value&&ts().readAloudTokens.push(d.value);ts().readAloudCurrentMark="",i.OutputFormat="mp3",i.SpeechMarkTypes=[],n.synthesizeSpeech(i,(d,h)=>{if(d){console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech("${t}") error:${d}`);return}if(!(h!=null&&h.AudioStream))return;const p=new Uint8Array(h.AudioStream),y=new Blob([p.buffer],{type:"audio/mpeg"}),M=URL.createObjectURL(y),B=ts();B.readAloudAudio?B.readAloudAudio.pause():(B.readAloudAudio=new Audio,B.readAloudAudio.addEventListener("ended",()=>{const $=B.readAloudMathfield;B.readAloudStatus="ended",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),$?(Is($),B.readAloudElement=null,B.readAloudMathfield=null,B.readAloudTokens=[],B.readAloudMarks=[],B.readAloudCurrentMark=""):Zh(B.readAloudElement)}),B.readAloudAudio.addEventListener("timeupdate",()=>{let $="";const oe=B.readAloudAudio.currentTime*1e3+100;for(const Ve of B.readAloudMarks)Ve.time<oe&&($=Ve.value);B.readAloudCurrentMark!==$&&(B.readAloudCurrentToken=$,$&&$===B.readAloudFinalToken?B.readAloudAudio.pause():(B.readAloudCurrentMark=$,Nf(B.readAloudElement,B.readAloudCurrentMark)))})),B.readAloudAudio.src=M,B.readAloudStatus="playing",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),B.readAloudAudio.play()})})}Ne()||console.error('MathLive 0.98.5: this version of the MathLive library is for use in the browser. A subset of the API is available on the server side in the "mathlive-ssr" library. If using server side rendering (with React for example) you may want to do a dynamic import of the MathLive library inside a `useEffect()` call.');var Or=new WeakMap,Sv=.5,es={letterShapeStyle:"mf.letterShapeStyle = ...",horizontalSpacingScale:'Removed. Use `"thinmuskip"`, `"medmuskip"`, and `"thickmuskip"` registers ',macros:"mf.macros = ...",registers:"mf.registers = ...",backgroundColorMap:"mf.backgroundColorMap = ...",colorMap:"mf.colorMap = ...",enablePopover:"mf.popoverPolicy = ...",mathModeSpace:"mf.mathModeSpace = ...",placeholderSymbol:"mf.placeholderSymbol = ...",readOnly:"mf.readOnly = ...",removeExtraneousParentheses:"mf.removeExtraneousParentheses = ...",scriptDepth:"mf.scriptDepth = ...",smartFence:"mf.smartFence = ...",smartMode:"mf.smartMode = ...",smartSuperscript:"mf.smartSuperscript = ...",inlineShortcutTimeout:"mf.inlineShortcutTimeout = ...",inlineShortcuts:"mf.inlineShortcuts = ...",keybindings:"mf.keybindings = ...",virtualKeyboardMode:"mf.mathVirtualKeyboardPolicy = ...",customVirtualKeyboardLayers:"mathVirtualKeyboard.layers = ...",customVirtualKeyboards:"mathVirtualKeyboard.layouts = ...",keypressSound:"mathVirtualKeyboard.keypressSound = ...",keypressVibration:"mathVirtualKeyboard.keypressVibration = ...",plonkSound:"mathVirtualKeyboard.plonkSound = ...",virtualKeyboardContainer:"mathVirtualKeyboard.container = ...",virtualKeyboardLayout:"mathVirtualKeyboard.alphabeticLayout = ...",virtualKeyboardTheme:"No longer supported",virtualKeyboardToggleGlyph:"No longer supported",virtualKeyboardToolbar:"mathVirtualKeyboard.editToolbar = ...",virtualKeyboards:"Use `mathVirtualKeyboard.layouts`",speechEngine:"`MathfieldElement.speechEngine`",speechEngineRate:"`MathfieldElement.speechEngineRate`",speechEngineVoice:"`MathfieldElement.speechEngineVoice`",textToSpeechMarkup:"`MathfieldElement.textToSpeechMarkup`",textToSpeechRules:"`MathfieldElement.textToSpeechRules`",textToSpeechRulesOptions:"`MathfieldElement.textToSpeechRulesOptions`",readAloudHook:"`MathfieldElement.readAloudHook`",speakHook:"`MathfieldElement.speakHook`",computeEngine:"`MathfieldElement.computeEngine`",fontsDirectory:"`MathfieldElement.fontsDirectory`",soundsDirectory:"`MathfieldElement.soundsDirectory`",createHTML:"`MathfieldElement.createHTML`",onExport:"`MathfieldElement.onExport`",onInlineShortcut:"`MathfieldElement.onInlineShortcut`",onScrollIntoView:"`MathfieldElement.onScrollIntoView`",locale:"MathfieldElement.locale = ...",strings:"MathfieldElement.strings = ...",decimalSeparator:"MathfieldElement.decimalSeparator = ...",fractionNavigationOrder:"MathfieldElement.fractionNavigationOrder = ..."},ti=class Hs extends HTMLElement{static get formAssociated(){return Jl()}static get optionsAttributes(){return{"default-mode":"string","letter-shape-style":"string","min-font-scale":"number","popover-policy":"string","math-mode-space":"string","read-only":"boolean","remove-extraneous-parentheses":"on/off","smart-fence":"on/off","smart-mode":"on/off","smart-superscript":"on/off","inline-shortcut-timeout":"string","script-depth":"string",placeholder:"string","virtual-keyboard-target-origin":"string","math-virtual-keyboard-policy":"string"}}static get observedAttributes(){return[...Object.keys(this.optionsAttributes),"contenteditable","disabled","readonly","read-only"]}static get fontsDirectory(){return this._fontsDirectory}static set fontsDirectory(t){t!==this._fontsDirectory&&(this._fontsDirectory=t,um())}get fontsDirectory(){throw new Error("Use MathfieldElement.fontsDirectory instead")}set fontsDirectory(t){throw new Error("Use MathfieldElement.fontsDirectory instead")}static get soundsDirectory(){return this._soundsDirectory}static set soundsDirectory(t){this._soundsDirectory=t,this.audioBuffers={}}get soundsDirectory(){throw new Error("Use MathfieldElement.soundsDirectory instead")}set soundsDirectory(t){throw new Error("Use MathfieldElement.soundsDirectory instead")}static get keypressSound(){return this._keypressSound}static set keypressSound(t){var r,n,i;this.audioBuffers={},t===null?this._keypressSound={spacebar:null,return:null,delete:null,default:null}:typeof t=="string"?this._keypressSound={spacebar:t,return:t,delete:t,default:t}:typeof t=="object"&&"default"in t&&(this._keypressSound={spacebar:(r=t.spacebar)!=null?r:t.default,return:(n=t.return)!=null?n:t.default,delete:(i=t.delete)!=null?i:t.default,default:t.default})}static get plonkSound(){return this._plonkSound}static set plonkSound(t){this.audioBuffers={},this._plonkSound=t}static get audioContext(){return this._audioContext||(this._audioContext=new AudioContext),this._audioContext}static get speechEngine(){return this._speechEngine}static set speechEngine(t){this._speechEngine=t}static get speechEngineRate(){return this._speechEngineRate}static set speechEngineRate(t){this._speechEngineRate=t}static get speechEngineVoice(){return this._speechEngineVoice}static set speechEngineVoice(t){this._speechEngineVoice=t}static get textToSpeechMarkup(){return this._textToSpeechMarkup}static set textToSpeechMarkup(t){this._textToSpeechMarkup=t}static get textToSpeechRules(){return this._textToSpeechRules}static set textToSpeechRules(t){this._textToSpeechRules=t}static get textToSpeechRulesOptions(){return this._textToSpeechRulesOptions}static set textToSpeechRulesOptions(t){this._textToSpeechRulesOptions=t}static get locale(){return Me.locale}static set locale(t){t==="auto"&&(t=navigator.language.slice(0,5)),Me.locale=t}get locale(){throw new Error("Use MathfieldElement.locale instead")}set locale(t){throw new Error("Use MathfieldElement.locale instead")}static get strings(){return Me.strings}static set strings(t){Me.merge(t)}get strings(){throw new Error("Use MathfieldElement.strings instead")}set strings(t){throw new Error("Use MathfieldElement.strings instead")}static get decimalSeparator(){return this._decimalSeparator}static set decimalSeparator(t){this._decimalSeparator=t,this._computeEngine&&(this._computeEngine.latexOptions.decimalMarker=this.decimalSeparator===","?"{,}":".")}get decimalSeparator(){throw new Error("Use MathfieldElement.decimalSeparator instead")}set decimalSeparator(t){throw new Error("Use MathfieldElement.decimalSeparator instead")}static get computeEngine(){var t,r;if(this._computeEngine===void 0){const n=(t=window[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:t.ComputeEngine;if(!n)return null;this._computeEngine=new n,this._computeEngine&&this.decimalSeparator===","&&(this._computeEngine.latexOptions.decimalMarker="{,}")}return(r=this._computeEngine)!=null?r:null}static set computeEngine(t){this._computeEngine=t}get computeEngine(){throw new Error("Use MathfieldElement.computeEngine instead")}set computeEngine(t){throw new Error("Use MathfieldElement.computeEngine instead")}static get isFunction(){return typeof this._isFunction!="function"?()=>!1:this._isFunction}static set isFunction(t){this._isFunction=t}static loadSound(t){return rs(this,null,function*(){delete this.audioBuffers[t];let r="";switch(t){case"keypress":r=this._keypressSound.default;break;case"return":r=this._keypressSound.return;break;case"spacebar":r=this._keypressSound.spacebar;break;case"delete":r=this._keypressSound.delete;break;case"plonk":r=this.plonkSound;break}if(typeof r!="string")return;r=r.trim();const n=this.soundsDirectory;if(!(n==null||n==="null"||r==="none"||r==="null"))try{const a=yield(yield fetch(yield qf(`${n}/${r}`))).arrayBuffer(),s=yield this.audioContext.decodeAudioData(a);this.audioBuffers[t]=s}catch(i){}})}static playSound(t){return rs(this,null,function*(){if((this.audioContext.state==="suspended"||this.audioContext.state==="interrupted")&&(yield this.audioContext.resume()),this.audioBuffers[t]||(yield this.loadSound(t)),!this.audioBuffers[t])return;const r=this.audioContext.createBufferSource();r.buffer=this.audioBuffers[t];const n=this.audioContext.createGain();n.gain.value=Sv,r.connect(n).connect(this.audioContext.destination),r.start()})}constructor(t){if(super(),t){const r=[];for(const n of Object.keys(t))if(es[n])if(es[n].startsWith("mf."))if(es[n].startsWith(`mf.${n}`))r.push(`Option \`${n}\` cannot be used as a constructor option. Use ${es[n]}`);else{const i=es[n].match(/([a-zA-Z]+) =/);r.push(`Option \`${n}\` has been renamed \`${i[1]}\``)}else r.push(`Option \`${n}\` cannot be used as a constructor option. Use ${es[n]}`);if(r.length>0){console.group("%cMathLive 0.98.5: %cInvalid Options","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),console.warn("Some of the options passed to `new MathfieldElement(...)` are invalid. \n See https://cortexjs.io/mathlive/changelog/ for details.");for(const n of r)console.warn(n);console.groupEnd()}}if(Jl()&&(this._internals=this.attachInternals(),this._internals.role="math",this._internals.ariaLabel="math input field",this._internals.ariaMultiLine="false"),this.attachShadow({mode:"open",delegatesFocus:!0}),this.shadowRoot&&"adoptedStyleSheets"in this.shadowRoot){this.shadowRoot.adoptedStyleSheets=[Ya("core"),Ya("mathfield"),Ya("mathfield-element"),Ya("ui"),Ya("menu")],this.shadowRoot.appendChild(document.createElement("span"));const r=document.createElement("slot");r.style.display="none",this.shadowRoot.appendChild(r)}else this.shadowRoot.innerHTML="<style>"+Io("core")+Io("mathfield")+Io("mathfield-element")+Io("ui")+Io("menu")+'</style><span></span><slot style="display:none"></slot>';t&&this._setOptions(t),this.shadowRoot.addEventListener("slotchange",()=>{var r;const n=this.shadowRoot.querySelector("slot:not([name])");this.value=(r=n==null?void 0:n.assignedNodes().map(i=>i.nodeType===3?i.textContent:"").join("").trim())!=null?r:""})}showMenu(t){var r,n;return(n=(r=this._mathfield)==null?void 0:r.showMenu(t))!=null?n:!1}get mathVirtualKeyboard(){throw new Error("The `mathVirtualKeyboard` property is not available on the MathfieldElement. Use `window.mathVirtualKeyboard` instead.")}onPointerDown(){window.addEventListener("pointerup",t=>{var r;t.target===this&&!((r=this._mathfield)!=null&&r.disabled)&&this.dispatchEvent(new MouseEvent("click",{altKey:t.altKey,button:t.button,buttons:t.buttons,clientX:t.clientX,clientY:t.clientY,ctrlKey:t.ctrlKey,metaKey:t.metaKey,movementX:t.movementX,movementY:t.movementY,relatedTarget:t.relatedTarget,screenX:t.screenX,screenY:t.screenY,shiftKey:t.shiftKey}))},{once:!0})}getPromptValue(t,r){var n,i;return(i=(n=this._mathfield)==null?void 0:n.getPromptValue(t,r))!=null?i:""}setPromptValue(t,r,n){var i;(i=this._mathfield)==null||i.setPromptValue(t,r,n)}getPromptRange(t){var r,n;return(n=(r=this._mathfield)==null?void 0:r.getPromptRange(t))!=null?n:null}getPrompts(t){var r,n;return(n=(r=this._mathfield)==null?void 0:r.getPrompts(t))!=null?n:[]}get form(){var t;return(t=this._internals)==null?void 0:t.form}get name(){var t;return(t=this.getAttribute("name"))!=null?t:""}get type(){return this.localName}get mode(){var t,r;return(r=(t=this._mathfield)==null?void 0:t.model.mode)!=null?r:this.defaultMode==="text"?"text":"math"}set mode(t){var r;(r=this._mathfield)==null||r.switchMode(t)}get expression(){if(this._mathfield)return window[Symbol.for("io.cortexjs.compute-engine")]?this._mathfield.expression:(console.error(`MathLive 0.98.5: The CortexJS Compute Engine library is not available.
Load the library, for example with:
import "https://unpkg.com/@cortex-js/compute-engine?module"`),null)}set expression(t){var r,n;if(!this._mathfield)return;const i=(n=(r=Hs.computeEngine)==null?void 0:r.box(t).latex)!=null?n:null;i!==null&&this._mathfield.setValue(i),window[Symbol.for("io.cortexjs.compute-engine")]||console.error(`MathLive 0.98.5: The CortexJS Compute Engine library is not available.
Load the library, for example with:
import "https://unpkg.com/@cortex-js/compute-engine?module"`)}get errors(){var t,r;return(r=(t=this._mathfield)==null?void 0:t.errors)!=null?r:[]}_getOptions(t){return this._mathfield?Ts(this._mathfield.options,t):Or.has(this)?S({},Ts(S(S({},Zd()),Vd(Or.get(this).options)),t)):null}getOptions(t){return console.warn("%cMathLive 0.98.5: %cDeprecated Usage%c\n `mf.getOptions()` is deprecated. Read the property directly on the mathfield instead.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem","color: inherit, font-size: 1rem"),this._mathfield?Ts(this._mathfield.options,t):Or.has(this)?Ts(S(S({},Zd()),Vd(Or.get(this).options)),t):null}reflectAttributes(){const t=Zd(),r=this._getOptions();Object.keys(Hs.optionsAttributes).forEach(n=>{const i=Ro(n);Hs.optionsAttributes[n]==="on/off"?t[i]!==r[i]?this.setAttribute(n,r[i]?"on":"off"):this.removeAttribute(n):t[i]!==r[i]&&(Hs.optionsAttributes[n]==="boolean"?r[i]?this.setAttribute(n,""):this.removeAttribute(n):(typeof r[i]=="string"||typeof r[i]=="number")&&this.setAttribute(n,r[i].toString()))})}getOption(t){return console.warn("%cMathLive 0.98.5: %cDeprecated Usage%c\n `mf.getOption()` is deprecated. Read the property directly on the mathfield instead.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem","color: inherit, font-size: 1rem"),this._getOptions([t])[t]}_getOption(t){return this._getOptions([t])[t]}_setOptions(t){if(this._mathfield)this._mathfield.setOptions(t);else if(Or.has(this)){const r=S(S({},Or.get(this).options),t);Or.set(this,_(S({},Or.get(this)),{selection:{ranges:r.readOnly?[[0,0]]:[[0,-1]]},options:r}))}else Or.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:t,menuItems:void 0});this.reflectAttributes()}setOptions(t){console.group("%cMathLive 0.98.5: %cDeprecated Usage","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),console.warn(" `mf.setOptions()` is deprecated. Set the property directly on the mathfield instead.\n See https://cortexjs.io/mathlive/changelog/ for details.");for(const r of Object.keys(t))es[r]&&console.warn(`\`mf.setOptions({${r}:...})\` -> ${es[r]}`);console.groupEnd(),this._setOptions(t)}executeCommand(t){var r,n;return(n=(r=this._mathfield)==null?void 0:r.executeCommand(t))!=null?n:!1}getValue(t,r,n){var i,a;if(this._mathfield)return this._mathfield.model.getValue(t,r,n);if(Or.has(this)){let s,u,d;if(Cs(t)?([s,u]=t.ranges[0],d=r):Lo(t)?([s,u]=t,d=r):Ga(t)&&Ga(r)?(s=t,u=r,d=n):(s=0,u=-1,d=t),(d===void 0||d==="latex")&&s===0&&u===-1)return(a=(i=Or.get(this).value)!=null?i:this.textContent)!=null?a:""}return""}setValue(t,r){if(this._mathfield&&t!==void 0){r!=null||(r={silenceNotifications:!0,mode:"math"}),this._mathfield.setValue(t,r);return}if(Or.has(this)){const i=Or.get(this).options;Or.set(this,{value:t,selection:{ranges:[[-1,-1]],direction:"forward"},options:i,menuItems:void 0});return}const n=iu(this);Or.set(this,{value:t,selection:{ranges:[[-1,-1]],direction:"forward"},options:n,menuItems:void 0})}hasFocus(){var t,r;return(r=(t=this._mathfield)==null?void 0:t.hasFocus())!=null?r:!1}focus(){var t;(t=this._mathfield)==null||t.focus()}blur(){var t;(t=this._mathfield)==null||t.blur()}select(){var t;(t=this._mathfield)==null||t.select()}insert(t,r){var n,i;return(i=(n=this._mathfield)==null?void 0:n.insert(t,r))!=null?i:!1}applyStyle(t,r){var n;return(n=this._mathfield)==null?void 0:n.applyStyle(t,r)}queryStyle(t){var r,n;return(n=(r=this._mathfield)==null?void 0:r.queryStyle(t))!=null?n:"none"}get caretPoint(){var t,r;return(r=(t=this._mathfield)==null?void 0:t.getCaretPoint())!=null?r:null}set caretPoint(t){var r;t&&((r=this._mathfield)==null||r.setCaretPoint(t.x,t.y))}setCaretPoint(t,r){var n,i;return(i=(n=this._mathfield)==null?void 0:n.setCaretPoint(t,r))!=null?i:!1}offsetFromPoint(t,r,n){return this._mathfield?Jc(this._mathfield,t,r,n):-1}hitboxFromOffset(t){if(!this._mathfield)return null;const r=this._mathfield.model.at(t);if(!r)return null;const n=Es(this._mathfield,r);return n?new DOMRect(n.left,n.top,n.right-n.left,n.bottom-n.top):null}resetUndo(){var t;(t=this._mathfield)==null||t.resetUndo()}canUndo(){return this._mathfield?this._mathfield.canUndo():!1}canRedo(){return this._mathfield?this._mathfield.canRedo():!1}handleEvent(t){var r,n,i,a;ro.state==="closed"&&((n=(r=this._mathfield)==null?void 0:r.menu)==null?void 0:n.state)==="closed"&&(t.type==="pointerdown"&&this.onPointerDown(),t.type==="focus"&&((i=this._mathfield)==null||i.focus()),t.type==="blur"&&((a=this._mathfield)==null||a.blur()))}connectedCallback(){var t,r,n,i;const a=window.getComputedStyle(this),s=this.shadowRoot,u=a.userSelect!=="none";if(u)s.host.addEventListener("pointerdown",this,!0);else{const p=s.querySelector("span");p.style.pointerEvents="none"}s.host.addEventListener("focus",this,!0),s.host.addEventListener("blur",this,!0),Jl()||(this.hasAttribute("role")||this.setAttribute("role","math"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","math input field"),this.setAttribute("aria-multiline","false")),u&&!this.hasAttribute("contenteditable")&&this.setAttribute("contenteditable","true"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0");const d=s.querySelector("slot:not([name])");if(d)try{this._style=d.assignedElements().filter(p=>p.tagName.toLowerCase()==="style").map(p=>p.textContent).join("")}catch(p){console.error(p)}if(this._style){const p=document.createElement("style");p.textContent=this._style,s.appendChild(p)}let h="";if(this.hasAttribute("value")?h=this.getAttribute("value"):h=(t=d==null?void 0:d.assignedNodes().map(p=>p.nodeType===3?p.textContent:"").join("").trim())!=null?t:"",this._mathfield=new xv(s.querySelector(":host > span"),_(S({},(n=(r=Or.get(this))==null?void 0:r.options)!=null?n:iu(this)),{eventSink:this,value:h})),!Or.has(this)){this.upgradeProperty("disabled"),this.upgradeProperty("readonly");for(const p of Object.keys(Hs.optionsAttributes))this.upgradeProperty(Ro(p))}if(!((i=this._mathfield)!=null&&i.model)){this._mathfield=null;return}if(Or.has(this)){const p=this._mathfield,y=Or.get(this),M=y.menuItems;p.model.deferNotifications({content:!1,selection:!1},()=>{const B=y.value;B!==void 0&&p.setValue(B),p.model.selection=y.selection,Or.delete(this)}),M&&(this.menuItems=M)}window.queueMicrotask(()=>{this.isConnected&&this.dispatchEvent(new Event("mount",{cancelable:!1,bubbles:!0,composed:!0}))}),Nd()}disconnectedCallback(){var t,r;if(this.shadowRoot.host.removeEventListener("pointerdown",this,!0),!this._mathfield)return;window.queueMicrotask(()=>this.dispatchEvent(new Event("unmount",{cancelable:!1,bubbles:!0,composed:!0})));const n=Ts(this._mathfield.options,Object.keys(Hs.optionsAttributes).map(i=>Ro(i)));Or.set(this,{value:this._mathfield.getValue(),selection:this._mathfield.model.selection,menuItems:(r=(t=this._mathfield.menu)==null?void 0:t.menuItems)!=null?r:void 0,options:n}),this._mathfield.dispose(),this._mathfield=null}upgradeProperty(t){if(this.hasOwnProperty(t)){const r=this[t];delete this[t],(t==="readonly"||t==="read-only")&&(t="readOnly"),this[t]=r}}attributeChangedCallback(t,r,n){if(r===n)return;const i=n!==null;switch(t){case"contenteditable":Sn(this._mathfield);break;case"disabled":this.disabled=i;break;case"read-only":case"readonly":this.readOnly=i;break;default:}}get readonly(){return this.hasAttribute("readonly")||this.hasAttribute("read-only")}set readonly(t){const r=!!t;r?(this.setAttribute("readonly",""),Jl()?this._internals.ariaReadOnly="true":this.setAttribute("aria-readonly","true"),this.setAttribute("aria-readonly","true")):(Jl()?this._internals.ariaReadOnly="false":this.removeAttribute("aria-readonly"),this.removeAttribute("readonly"),this.removeAttribute("read-only")),this._setOptions({readOnly:r})}get disabled(){return this.hasAttribute("disabled")}set disabled(t){var r;const n=!!t;n?this.setAttribute("disabled",""):this.removeAttribute("disabled"),Jl()?this._internals.ariaDisabled=n?"true":"false":this.setAttribute("aria-disabled",n?"true":"false"),n&&((r=this._mathfield)!=null&&r.hasFocus)&&window.mathVirtualKeyboard.visible&&this._mathfield.executeCommand("hideVirtualKeyboard")}get value(){return this.getValue()}set value(t){this.setValue(t)}get defaultMode(){return this._getOption("defaultMode")}set defaultMode(t){this._setOptions({defaultMode:t})}get macros(){return this._getOption("macros")}set macros(t){this._setOptions({macros:t})}get registers(){const t=this;return new Proxy({},{get:(r,n)=>{if(typeof n=="string")return t._getOption("registers")[n]},set(r,n,i){return typeof n!="string"?!1:(t._setOptions({registers:_(S({},t._getOption("registers")),{[n]:i})}),!0)}})}set registers(t){this._setOptions({registers:t})}get colorMap(){return this._getOption("colorMap")}set colorMap(t){this._setOptions({colorMap:t})}get backgroundColorMap(){return this._getOption("backgroundColorMap")}set backgroundColorMap(t){this._setOptions({backgroundColorMap:t})}get letterShapeStyle(){return this._getOption("letterShapeStyle")}set letterShapeStyle(t){this._setOptions({letterShapeStyle:t})}get minFontScale(){return this._getOption("minFontScale")}set minFontScale(t){this._setOptions({minFontScale:t})}get smartMode(){return this._getOption("smartMode")}set smartMode(t){this._setOptions({smartMode:t})}get smartFence(){return this._getOption("smartFence")}set smartFence(t){this._setOptions({smartFence:t})}get smartSuperscript(){return this._getOption("smartSuperscript")}set smartSuperscript(t){this._setOptions({smartSuperscript:t})}get scriptDepth(){return this._getOption("scriptDepth")}set scriptDepth(t){this._setOptions({scriptDepth:t})}get removeExtraneousParentheses(){return this._getOption("removeExtraneousParentheses")}set removeExtraneousParentheses(t){this._setOptions({removeExtraneousParentheses:t})}get mathModeSpace(){return this._getOption("mathModeSpace")}set mathModeSpace(t){this._setOptions({mathModeSpace:t})}get placeholderSymbol(){return this._getOption("placeholderSymbol")}set placeholderSymbol(t){this._setOptions({placeholderSymbol:t})}get popoverPolicy(){return this._getOption("popoverPolicy")}set popoverPolicy(t){this._setOptions({popoverPolicy:t})}get environmentPopoverPolicy(){return this._getOption("environmentPopoverPolicy")}set environmentPopoverPolicy(t){this._setOptions({environmentPopoverPolicy:t})}get menuItems(){var t,r,n;return this._mathfield?(t=this._mathfield.menu._menuItems.map(i=>i.menuItem))!=null?t:[]:(n=(r=Or.get(this))==null?void 0:r.menuItems)!=null?n:[]}set menuItems(t){var r;if(this._mathfield){const n=(r=this._mathfield.element)==null?void 0:r.querySelector("[part=menu-toggle]");n&&(n.style.display=t.length===0?"none":""),this._mathfield.menu.menuItems=t}Or.has(this)?Or.set(this,_(S({},Or.get(this)),{menuItems:t})):Or.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:iu(this),menuItems:t})}get mathVirtualKeyboardPolicy(){return this._getOption("mathVirtualKeyboardPolicy")}set mathVirtualKeyboardPolicy(t){this._setOptions({mathVirtualKeyboardPolicy:t})}get inlineShortcuts(){return this._getOption("inlineShortcuts")}set inlineShortcuts(t){this._setOptions({inlineShortcuts:t})}get inlineShortcutTimeout(){return this._getOption("inlineShortcutTimeout")}set inlineShortcutTimeout(t){this._setOptions({inlineShortcutTimeout:t})}get keybindings(){return this._getOption("keybindings")}set keybindings(t){this._setOptions({keybindings:t})}get onInlineShortcut(){return this._getOption("onInlineShortcut")}set onInlineShortcut(t){this._setOptions({onInlineShortcut:t})}get onScrollIntoView(){return this._getOption("onScrollIntoView")}set onScrollIntoView(t){this._setOptions({onScrollIntoView:t})}get onExport(){return this._getOption("onExport")}set onExport(t){this._setOptions({onExport:t})}get readOnly(){return this._getOption("readOnly")}set readOnly(t){this._setOptions({readOnly:t})}get isSelectionEditable(){var t,r;return(r=(t=this._mathfield)==null?void 0:t.isSelectionEditable)!=null?r:!1}setPromptState(t,r,n){var i;(i=this._mathfield)==null||i.setPromptState(t,r,n)}getPromptState(t){var r,n;return(n=(r=this._mathfield)==null?void 0:r.getPromptState(t))!=null?n:[void 0,!0]}get virtualKeyboardTargetOrigin(){return this._getOption("virtualKeyboardTargetOrigin")}set virtualKeyboardTargetOrigin(t){this._setOptions({virtualKeyboardTargetOrigin:t})}get selection(){return this._mathfield?this._mathfield.model.selection:Or.has(this)?Or.get(this).selection:{ranges:[[0,0]],direction:"forward"}}set selection(t){if(typeof t=="number"&&(t={ranges:[[t,t]]}),this._mathfield){this._mathfield.model.selection=t,Sn(this._mathfield);return}if(Or.has(this)){Or.set(this,_(S({},Or.get(this)),{selection:t}));return}Or.set(this,{value:void 0,selection:t,options:iu(this),menuItems:void 0})}get selectionIsCollapsed(){const t=this.selection;return t.ranges.length===1&&t.ranges[0][0]===t.ranges[0][1]}get position(){return this._mathfield?this._mathfield.model.position:Or.has(this)?Or.get(this).selection.ranges[0][0]:0}set position(t){if(this._mathfield&&(this._mathfield.model.position=t,Sn(this._mathfield)),Or.has(this)){Or.set(this,_(S({},Or.get(this)),{selection:{ranges:[[t,t]]}}));return}Or.set(this,{value:void 0,selection:{ranges:[[t,t]]},options:iu(this),menuItems:void 0})}getOffsetDepth(t){var r,n;return this._mathfield?((n=(r=this._mathfield.model.at(t))==null?void 0:r.treeDepth)!=null?n:2)-2:0}get lastOffset(){var t,r;return(r=(t=this._mathfield)==null?void 0:t.model.lastOffset)!=null?r:-1}};ti.version="0.98.5",ti._fontsDirectory="./fonts",ti._soundsDirectory="./sounds",ti.keypressVibration=!0,ti._keypressSound={spacebar:"keypress-spacebar.wav",return:"keypress-return.wav",delete:"keypress-delete.wav",default:"keypress-standard.wav"},ti._plonkSound="plonk.wav",ti.audioBuffers={},ti.createHTML=e=>e,ti._speechEngineRate="100%",ti._speechEngineVoice="Joanna",ti._textToSpeechMarkup="",ti._textToSpeechRules="mathlive",ti._textToSpeechRulesOptions={},ti.speakHook=dv,ti.readAloudHook=wv,ti._decimalSeparator=".",ti.fractionNavigationOrder="numerator-denominator",ti._isFunction=e=>{var t,r;const n=window.MathfieldElement.computeEngine;return(r=(t=n==null?void 0:n.parse(e).domain)==null?void 0:t.isFunction)!=null?r:!1};var nu=ti;function Ro(e){return e.replace(/[^a-zA-Z\d]+(.)/g,(t,r)=>r.toUpperCase())}function iu(e){const t={readOnly:!1},r=nu.optionsAttributes;return Object.keys(r).forEach(n=>{if(e.hasAttribute(n)){const i=e.getAttribute(n);n==="placeholder"?t.contentPlaceholder=i!=null?i:"":r[n]==="boolean"?t[Ro(n)]=!0:r[n]==="on/off"?i==="on"?t[Ro(n)]=!0:i==="off"?t[Ro(n)]=!1:t[Ro(n)]=void 0:r[n]==="number"?t[Ro(n)]=Number.parseFloat(i!=null?i:"0"):t[Ro(n)]=i}}),t}function Jl(){return!(!("ElementInternals"in window)||!HTMLElement.prototype.attachInternals||!("role"in window.ElementInternals.prototype))}var jh=nu,Uh,Gh,qh,Xh;if(Ne()&&!((Uh=window.customElements)!=null&&Uh.get("math-field"))){(qh=window[Gh=Symbol.for("io.cortexjs.mathlive")])!=null||(window[Gh]={});const e=window[Symbol.for("io.cortexjs.mathlive")];e.version="0.98.5",window.MathfieldElement=nu,(Xh=window.customElements)==null||Xh.define("math-field",nu)}function _v(e,t,r){let n=r,i=0;const a=e.length;for(;n<t.length;){const s=t[n];if(i<=0&&t.slice(n,n+a)===e)return n;s==="\\"?n++:s==="{"?i++:s==="}"&&i--,n++}return-1}function l0(e,t,r,n,i="latex"){const a=[];for(const s of e)if(s.type==="text"){const u=s.data;let d=!0,h=0,p;p=u.indexOf(t),p!==-1&&(h=p,h>0&&a.push({type:"text",data:u.slice(0,h)}),d=!1);let y=!1;for(;!y;){if(d){if(p=u.indexOf(t,h),p===-1){y=!0;break}h!==p&&a.push({type:"text",data:u.slice(h,p)}),h=p}else{if(p=_v(r,u,h+t.length),p===-1){y=!0;break}let M=u.slice(h+t.length,p);i==="ascii-math"&&([,M]=qa(M,{format:"ascii-math"})),a.push({type:"math",data:M,rawData:u.slice(h,p+r.length),mathstyle:n}),h=p+r.length}d=!d}h<u.length&&a.push({type:"text",data:u.slice(h)})}else a.push(s);return a}function Jh(e,t,r){let n=[{type:"text",data:e}];return t!=null&&t.inline&&t.inline.forEach(([i,a])=>{n=l0(n,i,a,"textstyle")}),t!=null&&t.display&&t.display.forEach(([i,a])=>{n=l0(n,i,a,"displaystyle")}),r!=null&&r.inline&&r.inline.forEach(([i,a])=>{n=l0(n,i,a,"textstyle","ascii-math")}),r!=null&&r.display&&r.display.forEach(([i,a])=>{n=l0(n,i,a,"displaystyle","ascii-math")}),n}function Mv(e,t){const r=document.createElement("span");r.setAttribute("translate","no");try{const n="<math xmlns='http://www.w3.org/1998/Math/MathML'>"+t.renderToMathML(e)+"</math>";r.innerHTML=window.MathfieldElement.createHTML(n)}catch(n){console.error(`MathLive 0.98.5: Could not convert "${e}"' to MathML with ${n}`),r.textContent=e}return r.className="ML__sr-only",r}function Cv(e,t,r,n){try{const i=t.renderToMarkup(e,{mathstyle:r,format:"html"}),a=document.createElement("span");return a.dataset.latex=e,a.style.display=r==="displaystyle"?"flex":"inline-flex",a.setAttribute("aria-hidden","true"),a.setAttribute("translate","no"),a.innerHTML=window.MathfieldElement.createHTML(i),a}catch(i){if(console.error("Could not parse'"+e+"' with ",i),n)return document.createTextNode(e)}return null}function Yl(e,t,r,n){var i;const a=Cv(e,r,t||"textstyle",n),s=(i=r.renderAccessibleContent)!=null?i:"";if(a&&/\b(mathml|speakable-text)\b/i.test(s)){const u=document.createElement("span");if(/\bmathml\b/i.test(s)&&r.renderToMathML&&u.append(Mv(e,r)),/\bspeakable-text\b/i.test(s)&&r.renderToSpeakableText){const d=document.createElement("span");d.setAttribute("translate","no");const h=r.renderToSpeakableText(e);d.innerHTML=window.MathfieldElement.createHTML(h),d.className="ML__sr-only",u.append(d)}return u.append(a),u}return a}function Ev(e,t){var r,n,i;let a=null;if((r=t.TeX)!=null&&r.processEnvironments&&/^\s*\\begin/.test(e)){a=document.createDocumentFragment();const s=Yl(e,"",t,!0);s&&a.appendChild(s)}else{if(!e.trim())return null;const s=Jh(e,(n=t.TeX)==null?void 0:n.delimiters,(i=t.asciiMath)==null?void 0:i.delimiters);if(s.length===1&&s[0].type==="text")return null;a=document.createDocumentFragment();for(const u of s)if(u.type==="text")a.appendChild(document.createTextNode(u.data));else{const d=Yl(u.data,u.mathstyle==="textstyle"?"textstyle":"displaystyle",t,!0);d&&a.appendChild(d)}}return a}function Yh(e,t){var r,n,i,a,s,u,d,h,p,y,M,B,$,oe,Ve,re;if(e.childNodes.length===1&&e.childNodes[0].nodeType===3){const De=(r=e.childNodes[0].textContent)!=null?r:"";if((n=t.TeX)!=null&&n.processEnvironments&&/^\s*\\begin/.test(De)){e.textContent="";const $e=Yl(De,"",t,!0);$e&&e.append($e);return}const Xe=Jh(De,(i=t.TeX)==null?void 0:i.delimiters,(a=t.asciiMath)==null?void 0:a.delimiters);if(Xe.length===1&&Xe[0].type==="math"){e.textContent="";const $e=Yl(Xe[0].data,Xe[0].mathstyle==="textstyle"?"textstyle":"displaystyle",t,!0);$e&&e.append($e);return}if(Xe.length===1&&Xe[0].type==="text")return}for(let De=e.childNodes.length-1;De>=0;De--){const Xe=e.childNodes[De];if(Xe.nodeType===3){const $e=Ev((s=Xe.textContent)!=null?s:"",t);$e&&(De+=$e.childNodes.length-1,Xe.replaceWith($e))}else if(Xe.nodeType===1){const $e=Xe,yt=Xe.nodeName.toLowerCase();if(yt==="script"){const Ot=Xe;let Dt;if((u=t.processScriptTypePattern)!=null&&u.test(Ot.type))Dt=(d=Ot.textContent)!=null?d:"";else if((h=t.processMathJSONScriptTypePattern)!=null&&h.test(Ot.type))try{Dt=(y=t.serializeToLatex)==null?void 0:y.call(t,JSON.parse((p=Ot.textContent)!=null?p:""))}catch(Lr){console.error(Lr)}if(Dt){let Lr="textstyle";for(const it of Ot.type.split(";")){const[na,lo]=it.toLowerCase().split("=");na.trim()==="mode"&&(Lr=lo.trim()==="display"?"displaystyle":"textstyle")}const Gr=Yl(Dt,Lr,t,!0);Gr&&Ot.parentNode.replaceChild(Gr,Ot)}}else if(((B=(M=t.processClassPattern)==null?void 0:M.test($e.className))!=null?B:!1)||!((oe=($=t.skipTags)==null?void 0:$.includes(yt))!=null&&oe||(re=(Ve=t.ignoreClassPattern)==null?void 0:Ve.test($e.className))!=null&&re))if(e.childNodes.length===1&&e.childNodes[0].nodeType===3){const Dt=e.textContent;e.textContent="";const Lr=Yl(Dt!=null?Dt:"","displaystyle",t,!0);Lr&&e.append(Lr)}else Yh($e,t)}}}var kv={skipTags:["math-field","noscript","style","textarea","pre","code","annotation","annotation-xml"],processScriptType:"math/tex",processMathJSONScriptType:"math/json",ignoreClass:"tex2jax_ignore",processClass:"tex2jax_process",renderAccessibleContent:"mathml",asciiMath:{delimiters:{inline:[["`","`"]]}},TeX:{processEnvironments:!0,delimiters:{inline:[["\\(","\\)"]],display:[["$$","$$"],["\\[","\\]"]]}}};function Dv(e,t){var r,n,i,a;try{const s=S(S({},kv),t);s.ignoreClassPattern=new RegExp((r=s.ignoreClass)!=null?r:""),s.processClassPattern=new RegExp((n=s.processClass)!=null?n:""),s.processScriptTypePattern=new RegExp((i=s.processScriptType)!=null?i:""),s.processMathJSONScriptTypePattern=new RegExp((a=s.processMathJSONScriptType)!=null?a:""),Nd(),Yi("core"),Yh(e,s)}catch(s){s instanceof Error?console.error("renderMathInElement(): "+s.message):console.error("renderMathInElement(): Could not render math for element",e)}}function Av(e,t){const r=Yo.singleton;return r?(r.show(),jc(),r.currentLayer=t,r.render(),r.focus(),!0):!1}function Lv(){const e=window.mathVirtualKeyboard;return e.visible?e.hide({animate:!0}):e.show({animate:!0}),!1}Vi({switchKeyboardLayer:Av,toggleVirtualKeyboard:Lv,hideVirtualKeyboard:()=>(window.mathVirtualKeyboard.hide({animate:!0}),!1),showVirtualKeyboard:()=>(window.mathVirtualKeyboard.show({animate:!0}),!1)},{target:"virtual-keyboard"});function ts(){var e,t;return(t=globalThis[e=Symbol.for("io.cortexjs.mathlive")])!=null||(globalThis[e]={}),globalThis[Symbol.for("io.cortexjs.mathlive")]}function Rv(){return console.warn("%cMathLive 0.98.5: %cmakeSharedVirtualKeyboard() is deprecated. \n Use `window.mathVirtualKeyboard` to access the virtual keyboard instance.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),window.mathVirtualKeyboard}function Ov(e){Iv(document.body,e)}function Bv(e){if(typeof e=="string"){const t=document.getElementById(e);if(t===null)throw new Error(`The element with ID "${e}" could not be found.`);return t}return typeof e=="string"?null:e}function Iv(e,t){var r,n,i,a;const s=Bv(e);if(!s)return;const u=t!=null?t:{};(r=u.renderToMarkup)!=null||(u.renderToMarkup=Un),(n=u.renderToMathML)!=null||(u.renderToMathML=Vg),(i=u.renderToSpeakableText)!=null||(u.renderToSpeakableText=Zg),(a=u.serializeToLatex)!=null||(u.serializeToLatex=jg),Dv(s,u)}var Nv={mathlive:"0.98.5"}}}]);
}());