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}();\nvar __importDefault = this && this.__importDefault || function (mod) {\n return mod && mod.__esModule ? mod : {\n \"default\": mod\n };\n};\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.AutoOpen = void 0;\nvar StackItem_js_1 = require(\"../StackItem.js\");\nvar ParseUtil_js_1 = __importDefault(require(\"../ParseUtil.js\"));\nvar NodeUtil_js_1 = __importDefault(require(\"../NodeUtil.js\"));\nvar TexParser_js_1 = __importDefault(require(\"../TexParser.js\"));\nvar AutoOpen = function (_super) {\n __extends(AutoOpen, _super);\n function AutoOpen() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.openCount = 0;\n return _this;\n }\n Object.defineProperty(AutoOpen.prototype, \"kind\", {\n get: function () {\n return 'auto open';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AutoOpen.prototype, \"isOpen\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n AutoOpen.prototype.toMml = function () {\n var parser = this.factory.configuration.parser;\n var right = this.getProperty('right');\n if (this.getProperty('smash')) {\n var mml_1 = _super.prototype.toMml.call(this);\n var smash = parser.create('node', 'mpadded', [mml_1], {\n height: 0,\n depth: 0\n });\n this.Clear();\n this.Push(parser.create('node', 'TeXAtom', [smash]));\n }\n if (right) {\n this.Push(new TexParser_js_1.default(right, parser.stack.env, parser.configuration).mml());\n }\n var mml = ParseUtil_js_1.default.fenced(this.factory.configuration, this.getProperty('open'), _super.prototype.toMml.call(this), this.getProperty('close'), this.getProperty('big'));\n NodeUtil_js_1.default.removeProperties(mml, 'open', 'close', 'texClass');\n return mml;\n };\n AutoOpen.prototype.checkItem = function (item) {\n if (item.isKind('mml') && item.Size() === 1) {\n var mml = item.toMml();\n if (mml.isKind('mo') && mml.getText() === this.getProperty('open')) {\n this.openCount++;\n }\n }\n var close = item.getProperty('autoclose');\n if (close && close === this.getProperty('close') && !this.openCount--) {\n if (this.getProperty('ignore')) {\n this.Clear();\n return [[], true];\n }\n return [[this.toMml()], true];\n }\n return _super.prototype.checkItem.call(this, item);\n };\n AutoOpen.errors = Object.assign(Object.create(StackItem_js_1.BaseItem.errors), {\n 'stop': ['ExtraOrMissingDelims', 'Extra open or missing close delimiter']\n });\n return AutoOpen;\n}(StackItem_js_1.BaseItem);\nexports.AutoOpen = AutoOpen;","map":{"version":3,"names":["__extends","extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","prototype","hasOwnProperty","call","TypeError","String","__","constructor","create","__importDefault","mod","__esModule","defineProperty","exports","value","AutoOpen","StackItem_js_1","require","ParseUtil_js_1","NodeUtil_js_1","TexParser_js_1","_super","_this","apply","arguments","openCount","get","enumerable","configurable","toMml","parser","factory","configuration","right","getProperty","mml_1","smash","height","depth","Clear","Push","default","stack","env","mml","fenced","removeProperties","checkItem","item","isKind","Size","getText","close","errors","assign","BaseItem"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/mathjax-full/js/input/tex/physics/PhysicsItems.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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AutoOpen = void 0;\nvar StackItem_js_1 = require(\"../StackItem.js\");\nvar ParseUtil_js_1 = __importDefault(require(\"../ParseUtil.js\"));\nvar NodeUtil_js_1 = __importDefault(require(\"../NodeUtil.js\"));\nvar TexParser_js_1 = __importDefault(require(\"../TexParser.js\"));\nvar AutoOpen = (function (_super) {\n __extends(AutoOpen, _super);\n function AutoOpen() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.openCount = 0;\n return _this;\n }\n Object.defineProperty(AutoOpen.prototype, \"kind\", {\n get: function () {\n return 'auto open';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AutoOpen.prototype, \"isOpen\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n AutoOpen.prototype.toMml = function () {\n var parser = this.factory.configuration.parser;\n var right = this.getProperty('right');\n if (this.getProperty('smash')) {\n var mml_1 = _super.prototype.toMml.call(this);\n var smash = parser.create('node', 'mpadded', [mml_1], { height: 0, depth: 0 });\n this.Clear();\n this.Push(parser.create('node', 'TeXAtom', [smash]));\n }\n if (right) {\n this.Push(new TexParser_js_1.default(right, parser.stack.env, parser.configuration).mml());\n }\n var mml = ParseUtil_js_1.default.fenced(this.factory.configuration, this.getProperty('open'), _super.prototype.toMml.call(this), this.getProperty('close'), this.getProperty('big'));\n NodeUtil_js_1.default.removeProperties(mml, 'open', 'close', 'texClass');\n return mml;\n };\n AutoOpen.prototype.checkItem = function (item) {\n if (item.isKind('mml') && item.Size() === 1) {\n var mml = item.toMml();\n if (mml.isKind('mo') && mml.getText() === this.getProperty('open')) {\n this.openCount++;\n }\n }\n var close = item.getProperty('autoclose');\n if (close && close === this.getProperty('close') && !this.openCount--) {\n if (this.getProperty('ignore')) {\n this.Clear();\n return [[], true];\n }\n return [[this.toMml()], true];\n }\n return _super.prototype.checkItem.call(this, item);\n };\n AutoOpen.errors = Object.assign(Object.create(StackItem_js_1.BaseItem.errors), {\n 'stop': ['ExtraOrMissingDelims', 'Extra open or missing close delimiter']\n });\n return AutoOpen;\n}(StackItem_js_1.BaseItem));\nexports.AutoOpen = AutoOpen;\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,+BAA+B,CAAC;IAC7FF,aAAa,CAACC,CAAC,EAAEC,CAAC,CAAC;IACnB,SAASW,EAAEA,CAAA,EAAG;MAAE,IAAI,C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