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/22262.496ad425.async.js

747 lines
29 KiB

"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[22262],{
/***/ 22262:
/*!********************************************************!*\
!*** ./src/components/MathsLatexKeybords/keybords.tsx ***!
\********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! antd */ 95237);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! antd */ 43604);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! antd */ 99313);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! antd */ 3113);
/* harmony import */ var _components_RenderHtml__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components/RenderHtml */ 8292);
/* harmony import */ var _index_less_modules__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.less?modules */ 26021);
/* harmony import */ var mathlatex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! mathlatex */ 48136);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
var MathsLatex = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (_ref, ref) {
var callback = _ref.callback,
showSaveButton = _ref.showSaveButton,
_ref$value = _ref.value,
value = _ref$value === void 0 ? "" : _ref$value;
var GraphicsRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
var datas = [{
name: "分数得分",
value: "\\frac{x}{y}",
children: [{
name: "分数 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: "导数 Derivative",
data: [{
value: "\\dot{a} "
}, {
value: "\\ddot{a}"
}, {
"value": "{f}^{\\prime}"
}, {
"value": "{f}^{\\prime\\prime}"
}, {
"value": "{f}^{(n)}"
}]
}, {
name: "模算术 Modular arithmetic",
data: [{
value: "a \\bmod b"
}, {
value: "a \\equiv b \\pmod{m} "
}, {
value: "\\gcd(m, n) "
}, {
value: "\\operatorname{lcm}(m, n) "
}]
}]
}, {
name: "根式角标",
value: "\\sqrt{x}",
children: [{
name: "根式 Radicals",
data: [{
value: "\\sqrt{x}"
}, {
value: "\\sqrt[y]{x}"
}]
}, {
name: "上下标 Sub&Super",
data: [{
value: "x^{a}"
}, {
value: "x_{a}"
}, {
value: "x_{a}^{b} "
}, {
value: "_{a}^{b} x"
}, {
value: "x_{a}^{b} "
}]
}, {
name: "重音符及其他 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: "极限对数",
value: "\\lim_{x \\to 0}",
children: [{
name: "极限 Limits",
data: [{
value: "\\lim a"
}, {
value: "\\lim_{x \\to 0}"
}, {
value: "\\lim_{x \\to \\infty}"
}, {
value: "\\max_b{a}"
}, {
value: "\\min_a{b}"
}]
}, {
name: "对数指数 Logarithms and exponentials",
data: [{
value: "\\log_{a}{b}"
}, {
value: "\\lg_{a}{b}"
}, {
value: "\\ln_{a}{b}"
}, {
value: "\\exp a"
}]
}, {
name: "界限 Bounds",
data: [{
value: "\\min x"
}, {
value: "\\sup t"
}, {
value: "\\inf s"
}, {
value: "\\lim u"
}, {
value: "\\limsup w"
}, {
value: "\\dim p"
}, {
value: "\\ker\\phi "
}]
}]
}, {
name: "三角函数",
value: "\\sin a",
children: [{
name: "三角函数 Trigonometric functions",
data: [{
value: "\\sin a"
}, {
value: "\\cos a"
}, {
value: "\\tan a"
}, {
value: "\\cot a "
}, {
value: "\\sec a "
}, {
value: "\\csc a "
}]
}, {
name: "反三角函数 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: "双曲函数 Hyperblic functions",
data: [{
value: "\\sinh a"
}, {
value: "\\cosh a"
}, {
value: "\\tanh a"
}, {
value: "\\coth a"
}, {
value: "\\operatorname{sech} a"
}, {
value: "\\operatorname{csch} a"
}]
}, {
name: "反双曲函数 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: "积分运算",
value: "\\int_{a}^{b}",
children: [{
name: "积分 Integral",
data: [{
value: "\\int"
}, {
value: "\\int_{a}^{b}"
}, {
value: "\\int\\limits_{a}^{b}"
}]
}, {
name: "双重积分 Double integral",
data: [{
value: "\\iint"
}, {
value: "\\iint_{a}^{b} "
}, {
value: "\\iint\\limits_{a}^{b} "
}]
}, {
name: "三重积分 Triple integral",
data: [{
value: "\\iiint"
}, {
value: "\\iiint_{a}^{b}"
}, {
value: "\\iiint\\limits_{a}^{b} "
}]
}, {
name: "曲线积分 Closed line or path integral",
data: [{
value: "\\oint"
}, {
value: "\\oint_{a}^{b} "
}]
}]
}, {
name: "大型运算",
value: "\\sum_{a}^{b}",
children: [{
name: "求和 Summation",
data: [{
value: "\\sum"
}, {
value: "\\sum_{a}^{b}"
}, {
value: "{\\textstyle \\sum_{a}^{b}} "
}]
}, {
name: "乘积余积 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: "并集交集 Union and intersection",
data: [{
value: "\\bigcup"
}, {
value: "\\bigcup_{a}^{b}"
}, {
value: "{\\textstyle \\bigcup_{a}^{b}}"
}, {
value: "\\bigcap"
}, {
value: "\\bigcap_{a}^{b}"
}]
}, {
name: "析取合取 Disjunction and conjunction",
data: [{
"value": "\\bigvee"
}, {
"value": "\\bigvee_{a}^{b}"
}, {
"value": "\\bigwedge"
}, {
"value": "\\bigwedge_{a}^{b}"
}]
}]
}, {
name: "括号取整",
value: "\\left [ \\left ( \\right ) \\right ] ",
children: [{
name: "括号 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 "
}]
}]
}];
var datasLatex = [{
name: "代数",
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\n x=a + r\\text{cos}\\theta \\ \r\n y=b + r\\text{sin}\\theta \r\n\\end{matrix}\\right. "
}, {
value: "\\begin{array}{l} \r\n \\text{对于方程形如:}x^{3}-1=0 \\ \r\n \\text{设}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r\n x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r\n x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r\n\\end{array} "
}, {
value: "\\begin{array}{l} \r\n a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r\n \\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r\n \\left\\{\\begin{matrix} \r\n \\Delta \\gt 0\\text{方程有两个不相等的实根} \\ \r\n \\Delta = 0\\text{方程有两个相等的实根} \\ \r\n \\Delta \\lt 0\\text{方程无实根} \r\n\\end{matrix}\\right. \r\n\\end{array} "
}, {
value: "\\begin{array}{l} \r\n a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r\n \\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r\n \\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r\n \\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r\n \\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r\n \\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r\n\\end{array} "
}]
}]
}, {
name: "几何",
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\n a \\perp \\alpha \\ \r\n b \\perp \\alpha \r\n\\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\n \\Rightarrow a \\perp \\beta "
}, {
"value": "\\left.\\begin{matrix} \r\n a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r\n a \\parallel \\partial ,b \\parallel \\partial \r\n\\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\n m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r\n a \\perp m,a \\perp n \r\n\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha "
}, {
"value": "\\begin{array}{c} \r\n \\text{直角三角形中,直角边长a,b,斜边边长c} \\ \r\n a^{2}+b^{2}=c^{2} \r\n\\end{array}"
}]
}]
}, {
name: "不等式",
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\n a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r\n a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r\n\\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\n a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r\n \\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r\n\\end{array}"
}, {
"value": "\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r\n\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) "
}, {
"value": "\\begin{array}{c} \r\n a,b \\in R^{+} \\ \r\n \\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r\n \\left( \\text{当且仅当}a=b\\text{时取“}=\\text{”号}\\right) \r\n\\end{array}"
}, {
"value": "\\begin{array}{c} \r\n a,b \\in R \\ \r\n \\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r\n \\left( \\text{当且仅当}a=b\\text{时取“}=\\text{”号}\\right) \r\n\\end{array}"
}, {
"value": "\\begin{array}{c} \r\n 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\n\\end{array}"
}]
}]
}, {
name: "积分",
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: "矩阵",
// value: "\\begin{pmatrix} \r\n 1 & 0 \\\\ \r\n 0 & 1 \r\n\\end{pmatrix} ",
// children: [{
// data: [
// { "value": "\\begin{pmatrix} \r\n 1 & 0 \\\\ \r\n 0 & 1 \r\n\\end{pmatrix} " }, { "value": "\\begin{pmatrix} \r\n a_{11} & a_{12} & a_{13} \\ \r\n a_{21} & a_{22} & a_{23} \\ \r\n a_{31} & a_{32} & a_{33} \r\n\\end{pmatrix} " }, { "value": "\\begin{pmatrix} \r\n a_{11} & \\cdots & a_{1n} \\ \r\n \\vdots & \\ddots & \\vdots \\ \r\n a_{m1} & \\cdots & a_{mn} \r\n\\end{pmatrix} " }, { "value": "\\begin{array}{c} \r\n A=A^{T} \\ \r\n A=-A^{T} \r\n\\end{array}" }, { "value": "O = \\begin{bmatrix} \r\n 0 & 0 & \\cdots & 0 \\ \r\n 0 & 0 & \\cdots & 0 \\ \r\n \\vdots & \\vdots & \\ddots & \\vdots \\ \r\n 0 & 0 & \\cdots & 0 \r\n\\end{bmatrix} " }, { "value": "A_{m\\times n}= \r\n\\begin{bmatrix} \r\n a_{11}& a_{12}& \\cdots & a_{1n} \\ \r\n a_{21}& a_{22}& \\cdots & a_{2n} \\ \r\n \\vdots & \\vdots & \\ddots & \\vdots \\ \r\n a_{m1}& a_{m2}& \\cdots & a_{mn} \r\n\\end{bmatrix} \r\n=\\left [ a_{ij}\\right ] " }, { "value": "\\begin{array}{c} \r\n A={\\left[ a_{ij}\\right]_{m \\times n}},B={\\left[ b_{ij}\\right]_{n \\times s}} \\ \r\n c_{ij}= \\sum \\limits_{k=1}^{{n}}a_{ik}b_{kj} \\ \r\n C=AB=\\left[ c_{ij}\\right]_{m \\times s} \r\n = \\left[ \\sum \\limits_{k=1}^{n}a_{ik}b_{kj}\\right]_{m \\times s} \r\n\\end{array}" }, { "value": "\\mathbf{V}_1 \\times \\mathbf{V}_2 = \r\n\\begin{vmatrix} \r\n \\mathbf{i}& \\mathbf{j}& \\mathbf{k} \\ \r\n \\frac{\\partial X}{\\partial u}& \\frac{\\partial Y}{\\partial u}& 0 \\ \r\n \\frac{\\partial X}{\\partial v}& \\frac{\\partial Y}{\\partial v}& 0 \\ \r\n\\end{vmatrix} " }
// ]
// }]
// },
{
name: "三角",
value: "e^{i \\theta}",
children: [{
name: "求和 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: "统计",
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\n \\text{若}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r\n \\text{则}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r\n\\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\n P \\left( \\emptyset \\right) =0 \\\\ \r\n P \\left( S \\right) =1 \r\n\\end{array}"
}, {
"value": "\\begin{array}{c} \r\n \\forall A \\in S \\\\ \r\n P \\left( A \\right) \\ge 0 \r\n\\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\n S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r\n P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r\n\\end{array}"
}, {
"value": "\\begin{array}{c} \r\n P_{n}=n! \\\\ \r\n A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r\n\\end{array}"
}]
}]
}];
var setValue = function setValue(item) {
GraphicsRef.current.setValue(GraphicsRef.current.getValue() + " " + item.value + " ");
};
var items = [{
key: '1',
label: '快捷模板',
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(antd__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, {
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z.lists,
gutter: [10, 10],
children: datas.map(function (data, key) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, {
flex: "110px",
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z.item,
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_components_RenderHtml__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, {
value: "$$".concat(data.value, "$$")
}), data.name]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z.children,
children: data.children.map(function (data, key) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("h1", {
children: data.name
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(antd__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, {
gutter: [10, 10],
children: data.data.map(function (item, k) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(antd__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, {
onClick: function onClick() {
return setValue(item);
},
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z.diamond,
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_components_RenderHtml__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, {
value: "`$$" + item.value + "$$`"
})
}, k);
})
})]
}, key);
})
})]
});
})
})
}, {
key: '2',
label: '公式模板',
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(antd__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, {
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z.lists,
gutter: [10, 10],
children: datasLatex.map(function (data, key) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, {
flex: "110px",
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z.item,
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_components_RenderHtml__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, {
value: "`$$" + data.value + "$$`"
}), data.name]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z.children,
children: data.children.map(function (item, key) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
children: [item.name && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("h1", {
children: item.name
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(antd__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, {
gutter: [10, 10],
children: item.data.map(function (item, k) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(antd__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, {
onClick: function onClick() {
return setValue(item);
},
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z.diamond,
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_components_RenderHtml__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, {
value: "`$$" + item.value + "$$`"
})
}, k);
})
})]
}, key);
})
})]
});
})
})
}];
var getData = function getData() {
var dom = document.createElement("div");
dom.innerHTML = GraphicsRef.current.getValue();
var str = dom.innerText;
callback && callback(str);
return str;
};
(0,react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(ref, function () {
return {
getData: getData
};
});
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
if (GraphicsRef.current) GraphicsRef.current.menuItems = GraphicsRef.current.menuItems.filter(function (item) {
return item.id !== "copy" && item.id !== "paste" && item.keyboardShortcut !== "meta+X";
});
}, [GraphicsRef.current]);
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z.mathWrap,
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(antd__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z, {
defaultActiveKey: "1",
items: items
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("math-field", {
locale: "zh_cn",
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z.mathField,
placeholder: "\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",
ref: GraphicsRef,
style: {
width: 800,
marginTop: 30,
fontSize: 18
},
children: value || ""
}), showSaveButton && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z.button,
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(antd__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .ZP, {
size: "large",
onClick: getData,
style: {
zIndex: 8,
marginTop: 10
},
type: "primary",
children: "\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"
})
})]
});
});
/* harmony default export */ __webpack_exports__.Z = (MathsLatex);
/***/ }),
/***/ 26021:
/*!**************************************************************!*\
!*** ./src/components/MathsLatexKeybords/index.less?modules ***!
\**************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__) {
// extracted by mini-css-extract-plugin
/* harmony default export */ __webpack_exports__.Z = ({"lists":"lists___xhHyq","item":"item___pWJAA","children":"children___sDG61","diamond":"diamond___FwgzD","button":"button___WPN6r","mathWrap":"mathWrap___FmnMJ","mathFillWrap":"mathFillWrap___PmY3H"});
/***/ })
}]);