d7d5423420647a19bbbb65af5f1fd68e0eb63daa63d4e62f6167440a4b6f12a6.json 15 KB

1
  1. {"ast":null,"code":"\"use strict\";\n\nvar __extends = this && this.__extends || function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.SVGxml = exports.SVGannotationXML = exports.SVGannotation = exports.SVGsemantics = void 0;\nvar Wrapper_js_1 = require(\"../Wrapper.js\");\nvar semantics_js_1 = require(\"../../common/Wrappers/semantics.js\");\nvar semantics_js_2 = require(\"../../../core/MmlTree/MmlNodes/semantics.js\");\nvar MmlNode_js_1 = require(\"../../../core/MmlTree/MmlNode.js\");\nvar SVGsemantics = function (_super) {\n __extends(SVGsemantics, _super);\n function SVGsemantics() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SVGsemantics.prototype.toSVG = function (parent) {\n var svg = this.standardSVGnode(parent);\n if (this.childNodes.length) {\n this.childNodes[0].toSVG(svg);\n }\n };\n SVGsemantics.kind = semantics_js_2.MmlSemantics.prototype.kind;\n return SVGsemantics;\n}((0, semantics_js_1.CommonSemanticsMixin)(Wrapper_js_1.SVGWrapper));\nexports.SVGsemantics = SVGsemantics;\nvar SVGannotation = function (_super) {\n __extends(SVGannotation, _super);\n function SVGannotation() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SVGannotation.prototype.toSVG = function (parent) {\n _super.prototype.toSVG.call(this, parent);\n };\n SVGannotation.prototype.computeBBox = function () {\n return this.bbox;\n };\n SVGannotation.kind = semantics_js_2.MmlAnnotation.prototype.kind;\n return SVGannotation;\n}(Wrapper_js_1.SVGWrapper);\nexports.SVGannotation = SVGannotation;\nvar SVGannotationXML = function (_super) {\n __extends(SVGannotationXML, _super);\n function SVGannotationXML() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SVGannotationXML.kind = semantics_js_2.MmlAnnotationXML.prototype.kind;\n SVGannotationXML.styles = {\n 'foreignObject[data-mjx-xml]': {\n 'font-family': 'initial',\n 'line-height': 'normal',\n overflow: 'visible'\n }\n };\n return SVGannotationXML;\n}(Wrapper_js_1.SVGWrapper);\nexports.SVGannotationXML = SVGannotationXML;\nvar SVGxml = function (_super) {\n __extends(SVGxml, _super);\n function SVGxml() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SVGxml.prototype.toSVG = function (parent) {\n var xml = this.adaptor.clone(this.node.getXML());\n var em = this.jax.math.metrics.em * this.jax.math.metrics.scale;\n var scale = this.fixed(1 / em);\n var _a = this.getBBox(),\n w = _a.w,\n h = _a.h,\n d = _a.d;\n this.element = this.adaptor.append(parent, this.svg('foreignObject', {\n 'data-mjx-xml': true,\n y: this.jax.fixed(-h * em) + 'px',\n width: this.jax.fixed(w * em) + 'px',\n height: this.jax.fixed((h + d) * em) + 'px',\n transform: \"scale(\".concat(scale, \") matrix(1 0 0 -1 0 0)\")\n }, [xml]));\n };\n SVGxml.prototype.computeBBox = function (bbox, _recompute) {\n if (_recompute === void 0) {\n _recompute = false;\n }\n var _a = this.jax.measureXMLnode(this.node.getXML()),\n w = _a.w,\n h = _a.h,\n d = _a.d;\n bbox.w = w;\n bbox.h = h;\n bbox.d = d;\n };\n SVGxml.prototype.getStyles = function () {};\n SVGxml.prototype.getScale = function () {};\n SVGxml.prototype.getVariant = function () {};\n SVGxml.kind = MmlNode_js_1.XMLNode.prototype.kind;\n SVGxml.autoStyle = false;\n return SVGxml;\n}(Wrapper_js_1.SVGWrapper);\nexports.SVGxml = SVGxml;","map":{"version":3,"names":["__extends","extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","prototype","hasOwnProperty","call","TypeError","String","__","constructor","create","defineProperty","exports","value","SVGxml","SVGannotationXML","SVGannotation","SVGsemantics","Wrapper_js_1","require","semantics_js_1","semantics_js_2","MmlNode_js_1","_super","apply","arguments","toSVG","parent","svg","standardSVGnode","childNodes","length","kind","MmlSemantics","CommonSemanticsMixin","SVGWrapper","computeBBox","bbox","MmlAnnotation","MmlAnnotationXML","styles","overflow","xml","adaptor","clone","node","getXML","em","jax","math","metrics","scale","fixed","_a","getBBox","w","h","element","append","y","width","height","transform","concat","_recompute","measureXMLnode","getStyles","getScale","getVariant","XMLNode","autoStyle"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/mathjax-full/js/output/svg/Wrappers/semantics.js"],"sourcesContent":["\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SVGxml = exports.SVGannotationXML = exports.SVGannotation = exports.SVGsemantics = void 0;\nvar Wrapper_js_1 = require(\"../Wrapper.js\");\nvar semantics_js_1 = require(\"../../common/Wrappers/semantics.js\");\nvar semantics_js_2 = require(\"../../../core/MmlTree/MmlNodes/semantics.js\");\nvar MmlNode_js_1 = require(\"../../../core/MmlTree/MmlNode.js\");\nvar SVGsemantics = (function (_super) {\n __extends(SVGsemantics, _super);\n function SVGsemantics() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SVGsemantics.prototype.toSVG = function (parent) {\n var svg = this.standardSVGnode(parent);\n if (this.childNodes.length) {\n this.childNodes[0].toSVG(svg);\n }\n };\n SVGsemantics.kind = semantics_js_2.MmlSemantics.prototype.kind;\n return SVGsemantics;\n}((0, semantics_js_1.CommonSemanticsMixin)(Wrapper_js_1.SVGWrapper)));\nexports.SVGsemantics = SVGsemantics;\nvar SVGannotation = (function (_super) {\n __extends(SVGannotation, _super);\n function SVGannotation() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SVGannotation.prototype.toSVG = function (parent) {\n _super.prototype.toSVG.call(this, parent);\n };\n SVGannotation.prototype.computeBBox = function () {\n return this.bbox;\n };\n SVGannotation.kind = semantics_js_2.MmlAnnotation.prototype.kind;\n return SVGannotation;\n}(Wrapper_js_1.SVGWrapper));\nexports.SVGannotation = SVGannotation;\nvar SVGannotationXML = (function (_super) {\n __extends(SVGannotationXML, _super);\n function SVGannotationXML() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SVGannotationXML.kind = semantics_js_2.MmlAnnotationXML.prototype.kind;\n SVGannotationXML.styles = {\n 'foreignObject[data-mjx-xml]': {\n 'font-family': 'initial',\n 'line-height': 'normal',\n overflow: 'visible'\n }\n };\n return SVGannotationXML;\n}(Wrapper_js_1.SVGWrapper));\nexports.SVGannotationXML = SVGannotationXML;\nvar SVGxml = (function (_super) {\n __extends(SVGxml, _super);\n function SVGxml() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SVGxml.prototype.toSVG = function (parent) {\n var xml = this.adaptor.clone(this.node.getXML());\n var em = this.jax.math.metrics.em * this.jax.math.metrics.scale;\n var scale = this.fixed(1 / em);\n var _a = this.getBBox(), w = _a.w, h = _a.h, d = _a.d;\n this.element = this.adaptor.append(parent, this.svg('foreignObject', {\n 'data-mjx-xml': true,\n y: this.jax.fixed(-h * em) + 'px',\n width: this.jax.fixed(w * em) + 'px',\n height: this.jax.fixed((h + d) * em) + 'px',\n transform: \"scale(\".concat(scale, \") matrix(1 0 0 -1 0 0)\")\n }, [xml]));\n };\n SVGxml.prototype.computeBBox = function (bbox, _recompute) {\n if (_recompute === void 0) { _recompute = false; }\n var _a = this.jax.measureXMLnode(this.node.getXML()), w = _a.w, h = _a.h, d = _a.d;\n bbox.w = w;\n bbox.h = h;\n bbox.d = d;\n };\n SVGxml.prototype.getStyles = function () { };\n SVGxml.prototype.getScale = function () { };\n SVGxml.prototype.getVariant = function () { };\n SVGxml.kind = MmlNode_js_1.XMLNode.prototype.kind;\n SVGxml.autoStyle = false;\n return SVGxml;\n}(Wrapper_js_1.SVGWrapper));\nexports.SVGxml = SVGxml;\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAI,IAAI,IAAI,IAAI,CAACA,SAAS,IAAM,YAAY;EACrD,IAAIC,aAAa,GAAG,SAAAA,CAAUC,CAAC,EAAEC,CAAC,EAAE;IAChCF,aAAa,GAAGG,MAAM,CAACC,cAAc,IAChC;MAAEC,SAAS,EAAE;IAAG,CAAC,YAAYC,KAAK,IAAI,UAAUL,CAAC,EAAEC,CAAC,EAAE;MAAED,CAAC,CAACI,SAAS,GAAGH,CAAC;IAAE,CAAE,IAC5E,UAAUD,CAAC,EAAEC,CAAC,EAAE;MAAE,KAAK,IAAIK,CAAC,IAAIL,CAAC,EAAE,IAAIC,MAAM,CAACK,SAAS,CAACC,cAAc,CAACC,IAAI,CAACR,CAAC,EAAEK,CAAC,CAAC,EAAEN,CAAC,CAACM,CAAC,CAAC,GAAGL,CAAC,CAACK,CAAC,CAAC;IAAE,CAAC;IACrG,OAAOP,aAAa,CAACC,CAAC,EAAEC,CAAC,CAAC;EAC9B,CAAC;EACD,OAAO,UAAUD,CAAC,EAAEC,CAAC,EAAE;IACnB,IAAI,OAAOA,CAAC,KAAK,UAAU,IAAIA,CAAC,KAAK,IAAI,EACrC,MAAM,IAAIS,SAAS,CAAC,sBAAsB,GAAGC,MAAM,CAACV,CAAC,CAAC,GAAG,+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