/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 13);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Resources = function () {\n function Resources() {\n _classCallCheck(this, Resources);\n }\n\n _createClass(Resources, [{\n key: 'loadImage',\n value: function loadImage(url) {\n return new Promise(function (resolve, reject) {\n var img = new Image();\n img.onload = function () {\n return resolve(img);\n };\n img.onerror = reject;\n img.src = url;\n });\n }\n }, {\n key: 'onload',\n value: function onload(callback) {\n var _this = this;\n\n var pr = [];\n\n var source = {\n // abort: \"images/abort.gif\",\n // abortBig: \"images/abort_big.gif\",\n auto: 'images/ic_auto.png',\n // autoBig: \"images/auto_big.gif\",\n complete: 'images/ic_complate.png',\n // completeBig: \"images/complete_big.gif\",\n manual: 'images/ic_manual.png',\n // manualBig: \"images/manual_big.gif\",\n // start: 'images/start.gif',\n start: 'images/ic_start.png',\n // startBig: \"images/start_big.gif\",\n subflow: 'images/ic_subflow.png',\n // subflowBig: \"images/subflow_big.gif\",\n // suspend: \"images/suspend.gif\",\n // suspendBig: \"images/suspend_big.gif\",\n // terminate: \"images/terminate.gif\",\n // terminateBig: \"images/terminate_big.gif\",\n gateway: 'images/ic_gateway.png'\n };\n\n var _loop = function _loop(key) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n var url = source[key];\n var p = _this.loadImage(url).then(function (img) {\n switch (key) {\n case 'start':\n Resources.IMG_START_NODE = img;\n break;\n case 'complete':\n Resources.IMG_COMPLETE_NODE = img;\n break;\n case 'gateway':\n Resources.IMG_GATEWAY_NODE = img;\n break;\n case 'auto':\n Resources.IMG_AUTO_NODE = img;\n break;\n case 'manual':\n Resources.IMG_MANUAL_NODE = img;\n break;\n case 'subflow':\n Resources.IMG_SUBFLOW_NODE = img;\n break;\n default:\n break;\n }\n return img;\n }).catch(function (err) {\n return console.log(err);\n });\n pr.push(p);\n }\n };\n\n for (var key in source) {\n _loop(key);\n }\n\n Promise.all(pr).then(function () {\n callback();\n });\n }\n }]);\n\n return Resources;\n}();\n\nResources.IMG_START_NODE = null;\nResources.IMG_COMPLETE_NODE = null;\nResources.IMG_AUTO_NODE = null;\nResources.IMG_MANUAL_NODE = null;\nResources.IMG_SUBFLOW_NODE = null;\nResources.IMG_GATEWAY_NODE = null;\n\nResources.FONT_METRICS = {\n width: 12,\n height: 12,\n ascent: 1\n};\n\nResources.COLOR = {\n white: 'rgb(255, 255, 255)',\n lightGray: 'rgb(229, 229, 229)',\n black: 'rgb(0, 0, 0)',\n lightYellow: '#FFFFE1',\n blue: 'blue'\n};\n\nexports.default = Resources;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy9zcmMvdXRpbGl0eS9SZXNvdXJjZXMuanM/NmEyZSJdLCJzb3VyY2VzQ29udGVudCI6WyJjbGFzcyBSZXNvdXJjZXMge1xyXG4gIGxvYWRJbWFnZSh1cmwpIHtcclxuICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XHJcbiAgICAgIGNvbnN0IGltZyA9IG5ldyBJbWFnZSgpO1xyXG4gICAgICBpbWcub25sb2FkID0gKCkgPT4gcmVzb2x2ZShpbWcpO1xyXG4gICAgICBpbWcub25lcnJvciA9IHJlamVjdDtcclxuICAgICAgaW1nLnNyYyA9IHVybDtcclxuICAgIH0pO1xyXG4gIH1cclxuXHJcbiAgb25sb2FkKGNhbGxiYWNrKSB7XHJcbiAgICBjb25zdCBwciA9IFtdO1xyXG5cclxuICAgIGNvbnN0IHNvdXJjZSA9IHtcclxuICAgICAgLy8gYWJvcnQ6IFwiaW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clxuICAgIH07XHJcblxyXG4gICAgZm9yIChjb25zdCBrZXkgaW4gc291cmNlKSB7XHJcbiAgICAgIGlmIChPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoc291cmNlLCBrZXkpKSB7XHJcbiAgICAgICAgY29uc3QgdXJsID0gc291cmNlW2tleV07XHJcbiAgICAgICAgY29uc3QgcCA9IHRoaXMubG9hZEltYWdlKHVybCkudGhlbigoaW1nKSA9PiB7XHJcbiAgICAgICAgICBzd2l0Y2ggKGtleSkge1xyXG4gICAgICAgICAgICBjYXNlICdzdGFydCc6XHJcbiAgICAgICAgICAgICAgUmVzb3VyY2VzLklNR19TVEFSVF9OT0RFID0gaW1nO1xyXG4gICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICBjYXNlICdjb21wbGV0ZSc6XHJcbiAgICAgICAgICAgICAgUmVzb3VyY2VzLklNR19DT01QTEVURV9OT0RFID0gaW1nO1xyXG4gICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICBjYXNlICdnYXRld2F5JzpcclxuICAgICAgICAgICAgICBSZXNvdXJjZXMuSU1HX0dBVEVXQVlfTk9ERSA9IGltZztcclxuICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgY2FzZSAnYXV0byc6XHJcbiAgICAgICAgICAgICAgUmVzb3VyY2VzLklNR19BVVRPX05PREUgPSBpbWc7XHJcbiAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIGNhc2UgJ21hbnVhbCc6XHJcbiAgICAgICAgICAgICAgUmVzb3VyY2VzLklNR19NQU5VQUxfTk9ERSA9IGltZztcclxuICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgY2FzZSAnc3ViZmxvdyc6XHJcbiAgICAgICAgICAgICAgUmVzb3VyY2VzLklNR19TVUJGTE9XX05PREUgPSBpbWc7XHJcbiAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIGRlZmF1bH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XBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBOzs7Ozs7O0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7OztBQUVBO0FBQUE7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQWxCQTtBQUNBO0FBSkE7QUF5QkE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBcEJBO0FBc0JBO0FBQ0E7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQXJEQTtBQUNBO0FBdUJBO0FBQUE7QUE4QkE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7Ozs7QUFHQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBSEE7QUFDQTtBQUtBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUxBO0FBQ0E7QUFPQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///0\n");
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _Element2 = __webpack_require__(14);\n\nvar _Element3 = _interopRequireDefault(_Element2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PaintElement = function (_Element) {\n _inherits(PaintElement, _Element);\n\n function PaintElement(diagram) {\n _classCallCheck(this, PaintElement);\n\n var _this = _possibleConstructorReturn(this, (PaintElement.__proto__ || Object.getPrototypeOf(PaintElement)).call(this, diagram));\n\n _this.bgcolor = PaintElement.DEF_BGCOLOR; // 元素的背景色\n\n _this.color = PaintElement.DEF_COLOR; // 元素使用的默认颜色\n\n _this.font = PaintElement.DEF_FONT; // 元素使用的默认字体\n\n _this.scale = 0;\n\n _this.note = \"\"; // 备注\n return _this;\n }\n\n _createClass(PaintElement, [{\n key: \"toXML\",\n value: function toXML() {\n var str = \"\";\n\n str += _get(PaintElement.prototype.__proto__ || Object.getPrototypeOf(PaintElement.prototype), \"toXML\", this).call(this);\n str += \"\" + this.scale + \"\\n\";\n str += \"\" + this.replaceCharacter(this.note) + \"\\n\";\n\n return str;\n }\n }]);\n\n return PaintElement;\n}(_Element3.default);\n\nPaintElement.DEF_BGCOLOR = \"white\";\nPaintElement.DEF_PASSCOLOR = \"green\";\nPaintElement.DEF_COLOR = \"black\";\nPaintElement.DEF_SELECTEDCOLOR = \"pink\";\nPaintElement.DEF_CURREDITCOLOR = \"orange\";\nPaintElement.DEF_PASSEDCOLOR = \"green\";\nPaintElement.DEF_FONT = '12px -apple-system, \"Microsoft YaHei\", Arial, sans-serif';\n\nexports.default = PaintElement;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy9zcmMvZWxlbWVudC9QYWludEVsZW1lbnQuanM/NGM5ZCJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgRWxlbWVudCBmcm9tIFwiLi9FbGVtZW50XCJcclxuXHJcbmNsYXNzIFBhaW50RWxlbWVudCBleHRlbmRzIEVsZW1lbnQge1xyXG4gICAgY29uc3RydWN0b3IoZGlhZ3JhbSl7XHJcbiAgICAgICAgc3VwZXIoZGlhZ3JhbSk7XHJcblxyXG4gICAgICAgIHRoaXMuYmdjb2xvciA9IFBhaW50RWxlbWVudC5ERUZfQkdDT0xPUjsgLy8g5YWD57Sg55qE6IOM5pmv6ImyXHJcblxyXG4gICAgICAgIHRoaXMuY29sb3IgPSBQYWludEVsZW1lbnQuREVGX0NPTE9SOyAvLyDlhYPntKDkvb/nlKjnmoTpu5jorqTpopzoibJcclxuXHJcbiAgICAgICAgdGhpcy5mb250ID0gUGFpbnRFbGVtZW50LkRFRl9GT05UOyAvLyDlhYPntKDkvb/nlKjnmoTpu5jorqTlrZfkvZNcclxuXHJcbiAgICAgIC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ozs7OztBQUNBOzs7QUFDQTtBQUFBO0FBQ0E7QUFEQTtBQUNBO0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBWEE7QUFZQTtBQUNBOzs7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7QUF2QkE7QUFDQTtBQXlCQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///1\n");
/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar StringUtil = function () {\n function StringUtil() {\n _classCallCheck(this, StringUtil);\n }\n\n _createClass(StringUtil, [{\n key: 'replaceXML',\n value: function replaceXML(str) {\n if (str != null) {\n while (str.indexOf('\"') != -1) {\n str = str.replace(/\\\"/g, '@quot;');\n }\n return str;\n }\n return '';\n }\n }]);\n\n return StringUtil;\n}();\n\nStringUtil.encodeHTML = function (t) {\n var text = t;\n if (text != null) {\n text = text.replace(/#/g, '%23');\n text = text.replace(/&/g, '&');\n text = text.replace(/\"/g, '@quot;');\n text = text.replace(//g, '@gt;');\n text = text.replace(/'/g, '@#146;');\n text = text.replace(/ /g, '@nbsp;');\n text = text.replace(/\\r/g, '
');\n text = text.replace(/\\n/g, '
');\n }\n return text;\n};\n\nStringUtil.dencodeHTML = function (t) {\n var text = t;\n if (text != null) {\n text = text.replace(/&/g, '&');\n text = text.replace(/@amp;/g, '&');\n text = text.replace(/"/g, '\"');\n text = text.replace(/@quot;/g, '\"');\n text = text.replace(/</g, '<');\n text = text.replace(/@lt;/g, '<');\n text = text.replace(/>/g, '>');\n text = text.replace(/@gt;/g, '>');\n text = text.replace(//g, \"'\");\n text = text.replace(/@#146;/g, \"'\");\n text = text.replace(/ /g, ' ');\n text = text.replace(/@nbsp;/g, ' ');\n text = text.replace(/
/g, '\\r');\n text = text.replace(/
/g, '\\n');\n text = text.replace(/ /g, ' ');\n text = text.replace(/%23/g, '#');\n\n text = text.replace('\\n\\r', '\\n');\n text = text.replace('\\r\\n', '\\n');\n }\n return text;\n};\n\nexports.default = StringUtil;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMi5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy9zcmMvdXRpbGl0eS9TdHJpbmdVdGlsLmpzP2NkMWMiXSwic291cmNlc0NvbnRlbnQiOlsiY2xhc3MgU3RyaW5nVXRpbCB7XHJcbiAgcmVwbGFjZVhNTChzdHIpIHtcclxuICAgIGlmIChzdHIgIT0gbnVsbCkge1xyXG4gICAgICB3aGlsZSAoc3RyLmluZGV4T2YoJ1wiJykgIT0gLTEpIHtcclxuICAgICAgICBzdHIgPSBzdHIucmVwbGFjZSgvXFxcIi9nLCAnQHF1b3Q7Jyk7XHJcbiAgICAgIH1cclxuICAgICAgcmV0dXJuIHN0cjtcclxuICAgIH1cclxuICAgIHJldHVybiAnJztcclxuICB9XHJcbn1cclxuXHJcblN0cmluZ1V0aWwuZW5jb2RlSFRNTCA9ICh0KSA9PiB7XHJcbiAgbGV0IHRleHQgPSB0O1xyXG4gIGlmICh0ZXh0ICE9IG51bGwpIHtcclxuICAgIH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BO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///2\n");
/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _PaintElement2 = __webpack_require__(1);\n\nvar _PaintElement3 = _interopRequireDefault(_PaintElement2);\n\nvar _Rectangle = __webpack_require__(5);\n\nvar _Rectangle2 = _interopRequireDefault(_Rectangle);\n\nvar _Resources = __webpack_require__(0);\n\nvar _Resources2 = _interopRequireDefault(_Resources);\n\nvar _Relation = __webpack_require__(6);\n\nvar _Relation2 = _interopRequireDefault(_Relation);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Node = function (_PaintElement) {\n\t_inherits(Node, _PaintElement);\n\n\tfunction Node(diagram) {\n\t\t_classCallCheck(this, Node);\n\n\t\tvar _this = _possibleConstructorReturn(this, (Node.__proto__ || Object.getPrototypeOf(Node)).call(this, diagram));\n\n\t\t_this._img = null;\n\n\t\t_this._txtrect = null;\n\n\t\t_this._iconrect = null;\n\n\t\t_this._imgrect = null;\n\n\t\t_this.x = 0;\n\n\t\t_this.y = 0;\n\n\t\t_this.width = Node.WIDTH;\n\n\t\t_this.height = Node.HEIGHT;\n\n\t\t_this.m_width = Node.M_WIDTH;\n\n\t\t_this.m_height = Node.M_HEIGHT;\n\n\t\t_this.prenodeid = \"\";\n\n\t\t_this.statelabel = \"\";\n\n\t\t_this.backnodeid = \"\"; // 回退至节点id\n\n\t\t_this.formname = \"\"; // 节点对应表单名\n\n\t\t_this.fieldpermlist = \"\"; // 节点表单域权限对应,形如@a;#b;$c格式,代码含义详见PermissionType.java类\n\n\t\t_this.isstartandnext = false; // 启动时是否送下一人\n\n\t\t_this._iscurrent = false;\n\n\t\t_this._handlePoint = {\n\t\t\tx: 0,\n\t\t\ty: 0\n\t\t};\n\n\t\t_this.orderNum = 0; //排序号\n\n\t\t_this.resize();\n\t\treturn _this;\n\t}\n\n\t_createClass(Node, [{\n\t\tkey: 'getShape',\n\t\tvalue: function getShape() {\n\t\t\tif (_shape == null) {\n\t\t\t\tvar area = new _Rectangle2.default();\n\t\t\t\tif (_imgrect != null) area.add(_imgrect);\n\t\t\t\tif (_txtrect != null) area.add(_txtrect);\n\t\t\t\tif (_iconrect != null) area.add(_iconrect);\n\n\t\t\t\t_shape = area;\n\t\t\t}\n\t\t\treturn _shape;\n\t\t}\n\n\t\t/**\r\n * @param path\r\n * @return java.awt.Image\r\n * @roseuid 3E046AF60136\r\n */\n\n\t}, {\n\t\tkey: 'getImage',\n\t\tvalue: function getImage(path) {\n\t\t\tvar tk = Toolkit.getDefaultToolkit();\n\t\t\tvar img = tk.getImage(path);\n\t\t\treturn img;\n\t\t}\n\n\t\t/**\r\n * @param x\r\n * @param y\r\n * @param width\r\n * @param height\r\n * @roseuid 3E0475DE000F\r\n */\n\n\t}, {\n\t\tkey: 'resize',\n\t\tvalue: function resize() {\n\t\t\tif (this._imgrect == null) {\n\t\t\t\tthis._imgrect = new _Rectangle2.default();\n\t\t\t}\n\t\t\tif (this._txtrect == null) {\n\t\t\t\tthis._txtrect = new _Rectangle2.default();\n\t\t\t}\n\t\t\tif (this._iconrect == null) {\n\t\t\t\tthis._iconrect = new _Rectangle2.default();\n\t\t\t}\n\t\t\tif (this._noderect == null) {\n\t\t\t\tthis._noderect = new _Rectangle2.default();\n\t\t\t}\n\n\t\t\tthis._imgrect.setBounds(this.x + Node.PAD, this.y + Node.PAD, 48, 48);\n\t\t\tthis._txtrect.setBounds(this.x + Node.PAD, this.y + Node.PAD * 2, this.width, _Resources2.default.FONT_METRICS.height);\n\t\t\tthis._iconrect.setBounds(this.x + this.width, this.y, 11, 12);\n\t\t\tthis._noderect.setBounds(this.x, this.y, this.width, this.height);\n\t\t}\n\n\t\t/**\r\n * @param x\r\n * @param y\r\n * @return boolean\r\n * @roseuid 3E0A6E190080\r\n */\n\n\t}, {\n\t\tkey: 'isSelected',\n\t\tvalue: function isSelected(x, y) {\n\t\t\t// Rectangle rc = new Rectangle();\n\t\t\treturn this._noderect.contains(x, y);\n\t\t}\n\n\t\t/**\r\n * @param x\r\n * @param y\r\n * @roseuid 3E0A6E19009E\r\n */\n\n\t}, {\n\t\tkey: 'moveTo',\n\t\tvalue: function moveTo(x, y) {\n\t\t\tthis.x = x - this._handlePoint.x;\n\t\t\tthis.y = y - this._handlePoint.y;\n\n\t\t\tthis.resize();\n\t\t}\n\n\t\t/**\r\n * yx 获取对应的属性值\r\n */\n\n\t}, {\n\t\tkey: 'getProp',\n\t\tvalue: function getProp(prop) {\n\t\t\treturn this[prop];\n\t\t}\n\n\t\t/**\r\n * yx获取元素连接的点\r\n */\n\n\t}, {\n\t\tkey: 'getElementConnectionPoint',\n\t\tvalue: function getElementConnectionPoint(elems, target) {\n\t\t\tvar point = {};\n\n\t\t\tif (elems.length > 0) {\n\n\t\t\t\tfor (var i = 0, len = elems.length; i < len; i++) {\n\t\t\t\t\tif (elems[i].getProp('id') == target.getProp('id')) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!(elems[i] instanceof _Relation2.default)) {\n\t\t\t\t\t\t// 横坐标\n\t\t\t\t\t\tvar abscissa = elems[i].getAbscissaConnectionPoint(target);\n\t\t\t\t\t\t// 纵坐标\n\t\t\t\t\t\tvar ordinate = elems[i].getOrdinateConnectionPoint(target);\n\t\t\t\t\t\t// 中线\n\t\t\t\t\t\tvar middle = elems[i].getMiddleConnectionPoint(target);\n\n\t\t\t\t\t\tif (point.abscissa && point.ordinate) {\n\t\t\t\t\t\t\treturn point;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (abscissa && !point.abscissa) {\n\t\t\t\t\t\t\tpoint.abscissa = abscissa;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (ordinate && !point.ordinate) {\n\t\t\t\t\t\t\tpoint.ordinate = ordinate;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (middle && !point.middle) {\n\t\t\t\t\t\t\tpoint.middle = middle;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn point;\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\t/**\r\n * yx 获取纵向的连接点\r\n */\n\n\t}, {\n\t\tkey: 'getAbscissaConnectionPoint',\n\t\tvalue: function getAbscissaConnectionPoint(target) {\n\t\t\tif (parseInt(target.x) == parseInt(this.x) && target.y >= this.y) {\n\t\t\t\treturn { beginPoint: { x: this.x, y: this.y }, endPoint: { x: target.x, y: target.y + target.height } };\n\t\t\t} else if (parseInt(target.x) == parseInt(this.x) && target.y <= this.y) {\n\t\t\t\treturn { beginPoint: { x: target.x, y: target.y }, endPoint: { x: this.x, y: this.y + this.height } };\n\t\t\t} else if (parseInt(target.x) == parseInt(this.x + this.width) && target.y >= this.y) {\n\t\t\t\treturn { beginPoint: { x: this.x + this.width, y: this.y }, endPoint: { x: target.x, y: target.y + target.height } };\n\t\t\t} else if (parseInt(target.x) == parseInt(this.x + this.width) && target.y <= this.y) {\n\t\t\t\treturn { beginPoint: { x: target.x, y: target.y }, endPoint: { x: this.x + this.width, y: this.y + this.height } };\n\t\t\t} else if (parseInt(target.x + target.width) == parseInt(this.x) && target.y >= this.y) {\n\t\t\t\treturn { beginPoint: { x: this.x, y: this.y }, endPoint: { x: target.x + target.width, y: target.y + target.height } };\n\t\t\t} else if (parseInt(target.x + target.width) == parseInt(this.x) && target.y <= this.y) {\n\t\t\t\treturn { beginPoint: { x: target.x + target.width, y: target.y }, endPoint: { x: this.x, y: this.y + this.height } };\n\t\t\t} else if (parseInt(target.x + target.width) == parseInt(this.x + this.width) && target.y >= this.y) {\n\t\t\t\treturn { beginPoint: { x: this.x + this.width, y: this.y }, endPoint: { x: target.x + target.width, y: target.y + target.height } };\n\t\t\t} else if (parseInt(target.x + target.width) == parseInt(this.x + this.width) && target.y <= this.y) {\n\t\t\t\treturn { beginPoint: { x: target.x + target.width, y: target.y }, endPoint: { x: this.x + this.width, y: this.y + this.height } };\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\t/**\r\n * yx 获取横向链接点\r\n */\n\n\t}, {\n\t\tkey: 'getOrdinateConnectionPoint',\n\t\tvalue: function getOrdinateConnectionPoint(target) {\n\t\t\tif (parseInt(target.y) == parseInt(this.y) && target.x >= this.x) {\n\t\t\t\treturn { beginPoint: { x: this.x, y: this.y }, endPoint: { x: target.x + target.width, y: target.y } };\n\t\t\t} else if (parseInt(target.y) == parseInt(this.y) && target.x <= this.x) {\n\t\t\t\treturn { beginPoint: { x: target.x, y: target.y }, endPoint: { x: this.x + this.width, y: this.y } };\n\t\t\t} else if (parseInt(target.y) == parseInt(this.y + this.height) && target.x >= this.x) {\n\t\t\t\treturn { beginPoint: { x: this.x, y: this.y + this.height }, endPoint: { x: target.x + target.width, y: target.y } };\n\t\t\t} else if (parseInt(target.y) == parseInt(this.y + this.height) && target.x <= this.x) {\n\t\t\t\treturn { beginPoint: { x: target.x, y: target.y }, endPoint: { x: this.x + this.width, y: this.y + this.height } };\n\t\t\t} else if (parseInt(target.y + target.height) == parseInt(this.y) && target.x >= this.x) {\n\t\t\t\treturn { beginPoint: { x: this.x, y: this.y }, endPoint: { x: target.x + target.width, y: target.y + target.height } };\n\t\t\t} else if (parseInt(target.y + target.height) == parseInt(this.y) && target.x <= this.x) {\n\t\t\t\treturn { beginPoint: { x: target.x, y: target.y + target.height }, endPoint: { x: this.x + this.width, y: this.y } };\n\t\t\t} else if (parseInt(target.y + target.height) == parseInt(this.y + this.height) && target.x >= this.x) {\n\t\t\t\treturn { beginPoint: { x: this.x, y: this.y + this.height }, endPoint: { x: target.x + target.width, y: target.y + target.height } };\n\t\t\t} else if (parseInt(target.y + target.height) == parseInt(this.y + this.height) && target.x <= this.x) {\n\t\t\t\treturn { beginPoint: { x: target.x, y: target.y + target.height }, endPoint: { x: this.x + this.width, y: this.y + this.height } };\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\t/**\r\n * yx 获取中线坐标的连接点\r\n * @returns \r\n */\n\n\t}, {\n\t\tkey: 'getMiddleConnectionPoint',\n\t\tvalue: function getMiddleConnectionPoint(target) {\n\t\t\tif (parseInt(target.x) >= parseInt(this.x) && target.y + target.height == this.y + this.height && target.height == this.height) {\n\t\t\t\t//target和this都为大节点\n\t\t\t\treturn { beginPoint: { x: this.x, y: this.y + this.height / 2 }, endPoint: { x: target.x + target.width, y: target.y + target.height / 2 } };\n\t\t\t} else if (parseInt(target.x) <= parseInt(this.x) && target.y + target.height == this.y + this.height && target.height == this.height) {\n\t\t\t\treturn { beginPoint: { x: target.x, y: target.y + target.height / 2 }, endPoint: { x: this.x + this.width, y: this.y + this.height / 2 } };\n\t\t\t} else if (target.x <= this.x && target.y + target.height / 2 == this.y + this.height / 2) {\n\t\t\t\treturn { beginPoint: { x: target.x, y: target.y + target.height / 2 - 1 }, endPoint: { x: this.x + this.width, y: this.y + this.height / 2 } };\n\t\t\t} else if (target.x >= this.x && target.y + target.height / 2 == this.y + this.height / 2) {\n\t\t\t\treturn { beginPoint: { x: this.x, y: this.y + this.height / 2 - 1 }, endPoint: { x: target.x + target.width, y: target.y + target.height / 2 } };\n\t\t\t} else if (this.x + (target.width - this.width) / 2 + this.width / 2 == target.x + target.width / 2 && this.y >= target.y) {\n\t\t\t\treturn { beginPoint: { x: target.x + target.width / 2, y: target.y }, endPoint: { x: this.x + this.width / 2, y: this.y + this.height } };\n\t\t\t} else if (this.x == target.x && this.y >= target.y && this.height == target.height) {\n\t\t\t\treturn { beginPoint: { x: this.x, y: this.y + this.height / 2 }, endPoint: { x: target.x + this.width, y: this.y + this.height / 2 } };\n\t\t\t} else if (this.x == target.x && this.y <= target.y && this.height == target.height) {\n\t\t\t\treturn { beginPoint: { x: this.x + this.width / 2, y: this.y }, endPoint: { x: target.x + target.width / 2, y: target.y + target.height } };\n\t\t\t} else if (target.y <= this.y && target.x + target.width / 2 == this.x + this.width / 2) {\n\t\t\t\treturn { beginPoint: { x: target.x + target.width / 2 - 1, y: target.y }, endPoint: { x: this.x + this.width / 2, y: this.y + this.height } };\n\t\t\t} else if (target.y >= this.y && target.x + target.width / 2 == this.x + this.width / 2) {\n\t\t\t\treturn { beginPoint: { x: this.x + this.width / 2 - 1, y: this.y }, endPoint: { x: target.x + target.width / 2, y: target.y + target.height } };\n\t\t\t}\n\t\t}\n\n\t\t/**\r\n * @return java.awt.Rectangle\r\n * @roseuid 3E0A6E1900C6\r\n */\n\n\t}, {\n\t\tkey: 'getRepaintRect',\n\t\tvalue: function getRepaintRect() {\n\t\t\tvar rct = new _Rectangle2.default(x - 20, y - 20, width + 20, height + 20);\n\t\t\treturn rct;\n\t\t}\n\t}, {\n\t\tkey: 'removeSubElement',\n\t\tvalue: function removeSubElement(id) {\n\t\t\tif (_subelems == null) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tfor (var e = _subelems.elements(); e.hasMoreElements();) {\n\t\t\t\tvar em = e.nextElement();\n\n\t\t\t\tif (em.id != null && em.id.equals(id)) {\n\t\t\t\t\tem.removeAllSubElement();\n\t\t\t\t\t_subelems.removeElement(em);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\t}, {\n\t\tkey: 'removeAllSubElement',\n\t\tvalue: function removeAllSubElement() {\n\t\t\tthis._subelems.removeAllElements();\n\t\t}\n\n\t\t//拼装XML\n\n\t}, {\n\t\tkey: 'toXML',\n\t\tvalue: function toXML() {\n\t\t\t//检验节点名称与状态标签是否为空\n\t\t\tvar str = \"\";\n\n\t\t\tstr += _get(Node.prototype.__proto__ || Object.getPrototypeOf(Node.prototype), 'toXML', this).call(this);\n\n\t\t\tstr += \"\" + this.x + \"\\n\";\n\t\t\tstr += \"\" + this.y + \"\\n\";\n\t\t\tstr += \"\" + this.width + \"\\n\";\n\t\t\tstr += \"\" + this.height + \"\\n\";\n\t\t\tstr += \"\" + this.m_width + \"\\n\";\n\t\t\tstr += \"\" + this.m_height + \"\\n\";\n\t\t\tstr += \"\" + this.replaceCharacter(this.prenodeid) + \"\\n\";\n\t\t\tstr += \"\" + this.replaceCharacter(this.statelabel) + \"\\n\";\n\t\t\tstr += \"\" + this.replaceCharacter(this.orderNum) + \"\\n\";\n\n\t\t\tstr += \"\" + this.replaceCharacter(this.backnodeid) + \"\\n\";\n\t\t\tstr += \"\" + this.replaceCharacter(this.formname) + \"\\n\";\n\t\t\tstr += \"\" + this.replaceCharacter(this.fieldpermlist) + \"\\n\";\n\t\t\tstr += \"\" + this.isstartandnext + \"\\n\";\n\t\t\tstr += \"<_iscurrent>\" + this._iscurrent + \"\\n\";\n\n\t\t\treturn str;\n\t\t}\n\n\t\t//xh\n\t\t// 验证器\n\n\t}, {\n\t\tkey: 'check',\n\t\tvalue: function check() {\n\t\t\tif (!this.name || !this.statelabel) {\n\t\t\t\talert('请输入节点名称和状态标签!');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (this.orderNum !== 0 && (this.orderNum < 0 || this.orderNum == \"\")) {\n\t\t\t\tif (this.orderNum == \"\") {\n\t\t\t\t\tthis.orderNum = 0;\n\t\t\t\t} else {\n\t\t\t\t\talert(\"请为\" + this.name + \"节点在基本信息中指定排序号!\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// yx\n\t\t\tvar regText = /^[\\u4e00-\\u9fa5_a-zA-Z0-9]+$/g;\n\t\t\tif (!regText.test(this.name)) {\n\t\t\t\talert(this.name + \"节点名称不能有特殊符号\");\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\t//xh\n\n\t}, {\n\t\tkey: 'hasRelation',\n\t\tvalue: function hasRelation(relation) {\n\t\t\tvar inputCount = 0,\n\t\t\t outputCount = 0;\n\n\t\t\tfor (var i = 0; i < relation.length; i++) {\n\t\t\t\tif (this.id == relation[i].startnodeid) {\n\t\t\t\t\toutputCount++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (var j = 0; j < relation.length; j++) {\n\t\t\t\tif (this.id == relation[j].endnodeid) {\n\t\t\t\t\tinputCount++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn { input: inputCount, output: outputCount };\n\t\t}\n\t}, {\n\t\tkey: 'drawTips',\n\t\tvalue: function drawTips(g, tips) {\n\n\t\t\tif (tips != null && tips != '') {\n\t\t\t\tvar tiplist = tips.split(\"\\n\");\n\n\t\t\t\tvar tipWidth = 0;\n\t\t\t\tfor (var i = 0; i < tiplist.length; i++) {\n\t\t\t\t\tif (g.stringWidth(tiplist[i]) > tipWidth) {\n\t\t\t\t\t\ttipWidth = g.stringWidth(tiplist[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tg.setColor(_Resources2.default.COLOR.lightYellow);\n\t\t\t\tg.fillRect(this.x + this.width / 2, this.y + this.height, tipWidth + 10, (_Resources2.default.FONT_METRICS.height + 5) * tiplist.length + 10);\n\t\t\t\tg.setColor(_Resources2.default.COLOR.black);\n\t\t\t\tg.drawRect(this.x + this.width / 2, this.y + this.height, tipWidth + 10, (_Resources2.default.FONT_METRICS.height + 5) * tiplist.length + 10);\n\t\t\t\tfor (var _i = 0; _i < tiplist.length; _i++) {\n\t\t\t\t\tg.drawString(tiplist[_i], this.x + this.width / 2 + 5, this.y + this.height + (_i + 1) * (_Resources2.default.FONT_METRICS.height + 5));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}]);\n\n\treturn Node;\n}(_PaintElement3.default);\n\nNode.WIDTH = 150;\nNode.M_WIDTH = 50;\nNode.HEIGHT = 70;\nNode.M_HEIGHT = 50;\nNode.TXTH = 10;\nNode.IMGX = 50;\nNode.PAD = 10; //默认边距10\n\nexports.default = Node;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy9zcmMvZWxlbWVudC9Ob2RlLmpzP2FmYWEiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFBhaW50RWxlbWVudCBmcm9tICcuL1BhaW50RWxl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0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///3\n");
/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _StartNode = __webpack_require__(8);\n\nvar _StartNode2 = _interopRequireDefault(_StartNode);\n\nvar _AutoNode = __webpack_require__(9);\n\nvar _AutoNode2 = _interopRequireDefault(_AutoNode);\n\nvar _ManualNode = __webpack_require__(10);\n\nvar _ManualNode2 = _interopRequireDefault(_ManualNode);\n\nvar _Relation = __webpack_require__(6);\n\nvar _Relation2 = _interopRequireDefault(_Relation);\n\nvar _CompleteNode = __webpack_require__(11);\n\nvar _CompleteNode2 = _interopRequireDefault(_CompleteNode);\n\nvar _Node = __webpack_require__(3);\n\nvar _Node2 = _interopRequireDefault(_Node);\n\nvar _PaintElement = __webpack_require__(1);\n\nvar _PaintElement2 = _interopRequireDefault(_PaintElement);\n\nvar _SubFlow = __webpack_require__(12);\n\nvar _SubFlow2 = _interopRequireDefault(_SubFlow);\n\nvar _GatewayNode = __webpack_require__(17);\n\nvar _GatewayNode2 = _interopRequireDefault(_GatewayNode);\n\nvar _Point = __webpack_require__(7);\n\nvar _Point2 = _interopRequireDefault(_Point);\n\nvar _Resources = __webpack_require__(0);\n\nvar _Resources2 = _interopRequireDefault(_Resources);\n\nvar _Graphics = __webpack_require__(18);\n\nvar _Graphics2 = _interopRequireDefault(_Graphics);\n\nvar _Sequence = __webpack_require__(19);\n\nvar _Sequence2 = _interopRequireDefault(_Sequence);\n\nvar _FlowType = __webpack_require__(20);\n\nvar _FlowType2 = _interopRequireDefault(_FlowType);\n\nvar _AuxiliaryLine = __webpack_require__(21);\n\nvar _AuxiliaryLine2 = _interopRequireDefault(_AuxiliaryLine);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar FlowDiagram = function () {\n function FlowDiagram(canvas) {\n _classCallCheck(this, FlowDiagram);\n\n this.canvas = canvas;\n this.g = new _Graphics2.default(canvas.getContext(\"2d\"));\n this._elems = [];\n this._statues = FlowDiagram.ACTION_NORMAL;\n this._currToEdit = null;\n this._changed = false;\n this._drag = false;\n this._selected = null; // **\n this.flowstatus = _FlowType2.default.FLOWSTATUS_OPEN_NOSTART;\n this.flowpath = \"\";\n this.deleteMSG = null;\n this.width = 10000;\n this.height = 1536;\n this._applicationid = null;\n this._sessionid = null;\n this._changed = false;\n this._zoomrate = 1;\n this.win = null;\n this.id = null;\n this.scaleNum = 1;\n this.scalePreNum;\n this.scaleStep = 0.2;\n this.ctrlDown = false; // 有无按下ctrl键\n this.selectArr = []; // 按ctrl键选下的节点值\n this.ctrlEle = null; // 先按下鼠标然后再按下ctrl要记录的元素\n }\n\n _createClass(FlowDiagram, [{\n key: \"getImageResource\",\n value: function getImageResource(filename) {\n var obj = IMG_RESOURCE.get(filename);\n var img = null;\n if (obj == null) {\n try {\n var icon = new ImageIcon(BFApplet.class.getResource(filename));\n obj = icon.getImage();\n } catch (e) {\n obj = Toolkit.getDefaultToolkit().createImage(new byte[0]());\n }\n IMG_RESOURCE.put(filename, obj);\n }\n img = obj;\n return img;\n }\n }, {\n key: \"setJSObject\",\n value: function setJSObject(win) {\n this.win = win;\n }\n }, {\n key: \"get_statues\",\n value: function get_statues() {\n return this._statues;\n }\n }, {\n key: \"getLocationWithCanvas\",\n value: function getLocationWithCanvas(canvas, x, y) {\n var bbox = canvas.getBoundingClientRect();\n return {\n x: (x - bbox.left) * (canvas.width / bbox.width),\n y: (y - bbox.top) * (canvas.height / bbox.height)\n };\n }\n\n // 编辑时用到的接口\n\n }, {\n key: \"getCurrToEdit\",\n value: function getCurrToEdit() {\n return this._currToEdit;\n }\n }, {\n key: \"setCurrToEdit\",\n value: function setCurrToEdit(_currToEdit) {\n this._currToEdit = _currToEdit;\n }\n }, {\n key: \"getChanged\",\n value: function getChanged() {\n return this._changed;\n }\n }, {\n key: \"getScaleNum\",\n value: function getScaleNum(option) {\n if (option == \"big\") {\n this.scaleNum += this.scaleStep;\n } else {\n if (this.scaleNum.toFixed(1) == 0.2) {\n alert('已缩放到最小值');\n } else {\n this.scaleNum -= this.scaleStep;\n }\n }\n return this.scaleNum.toFixed(1);\n }\n }, {\n key: \"editManualNode\",\n value: function editManualNode(grp, opts) {\n console.log(grp, opts);\n\n grp.id = opts.id || _Sequence2.default.getSequence() + \"\";\n grp.name = opts.name;\n grp.scale = opts.scale;\n grp.note = opts.note;\n grp.x = opts.x;\n grp.y = opts.y;\n grp.width = opts.width;\n grp.height = opts.height;\n grp.m_width = opts.m_width;\n grp.m_height = opts.m_height;\n grp.prenodeid = opts.prenodeid;\n grp.statelabel = opts.statelabel;\n grp.orderNum = opts.orderNum;\n grp.backnodeid = opts.backnodeid;\n grp.formname = opts.formname;\n grp.fieldpermlist = opts.fieldpermlist;\n grp.isstartandnext = opts.isstartandnext;\n grp._iscurrent = opts._iscurrent;\n grp.actorListScript = opts.actorListScript;\n\n grp.jumpNameScript = opts.jumpNameScript;\n grp.jump = opts.jump;\n grp.jumpTo = opts.jumpTo;\n\n grp.actorEditMode = opts.actorEditMode;\n grp.deptlist = opts.deptlist;\n grp.namelist = opts.namelist;\n grp.realnamelist = opts.realnamelist;\n grp.passcondition = opts.passcondition;\n grp.approverNumType = opts.approverNumType;\n\n grp.isApproverEdit = opts.isApproverEdit;\n grp.approverEditScript = opts.approverEditScript;\n grp.isCoApproverEdit = opts.isCoApproverEdit; //彩生活\n grp.coApproverEditScript = opts.coApproverEditScript; //彩生活\n grp.isSupplementComments = opts.isSupplementComments;\n grp.exceedaction = opts.exceedaction;\n grp.issetcurruser = opts.issetcurruser;\n grp.inputform = opts.inputform;\n grp.isgather = opts.isgather;\n grp.issplit = opts.issplit;\n grp.cBack = opts.cBack;\n grp.splitStartNode = opts.splitStartNode;\n grp.isFrontEdit = opts.isFrontEdit;\n grp.backType = opts.backType;\n grp.isToPerson = opts.isToPerson;\n grp.checkedOnSinglePerson = opts.checkedOnSinglePerson;\n grp.checkedOnMultiplePerson = opts.checkedOnMultiplePerson;\n\n grp.bnodelist = opts.bnodelist;\n grp.retracementEditMode = opts.retracementEditMode;\n grp.cRetracement = opts.cRetracement;\n grp.retracementScript = opts.retracementScript;\n grp.notificationStrategyJSON = opts.notificationStrategyJSON;\n grp.isCarbonCopy = opts.isCarbonCopy;\n grp.isSelectCirculator = opts.isSelectCirculator;\n grp.circulatorEditMode = opts.circulatorEditMode;\n grp.circulatorListScript = opts.circulatorListScript;\n grp.circulatorNamelist = opts.circulatorNamelist;\n grp.userList = opts.userList;\n grp.circulatorNamelistByUser = opts.circulatorNamelistByUser;\n grp.orgField = opts.orgField;\n grp.orgScope = opts.orgScope;\n grp.orgRoleCondition = opts.orgRoleCondition;\n grp.isLimited = opts.isLimited;\n grp.timeLimitEditMode = opts.timeLimitEditMode;\n grp.timeLimitDay = opts.timeLimitDay;\n grp.timeLimitHour = opts.timeLimitHour;\n grp.timeLimitMinute = opts.timeLimitMinute;\n grp.timeLimitScript = opts.timeLimitScript;\n grp.isUsbKeyVerify = opts.isUsbKeyVerify;\n grp.roleCondition = opts.roleCondition;\n grp.handupEditMode = opts.handupEditMode;\n grp.isHandup = opts.isHandup;\n grp.handupScript = opts.handupScript;\n grp.isAllowEditAuditor = opts.isAllowEditAuditor;\n grp.allowEditAuditorScript = opts.allowEditAuditorScript;\n grp.isAllowTermination = opts.isAllowTermination;\n grp.activityPermList = opts.activityPermList;\n grp.urge2ApprovalEditMode = opts.urge2ApprovalEditMode;\n grp.allowUrge2Approval = opts.allowUrge2Approval;\n grp.allowUrge2ApprovalScript = opts.allowUrge2ApprovalScript;\n grp.isAllowSkip = opts.isAllowSkip;\n grp.nextNodeCheckedStatus = opts.nextNodeCheckedStatus;\n\n //彩生活\n grp.isAssist = opts.isAssist; //是否开启协办\n grp.isSelectAssistUser = opts.isSelectAssistUser; //允许上一步流程处理人指定本节点的协办人\n grp.assistEditMode = opts.assistEditMode; //指定方式\n grp.assistListScript = opts.assistListScript; //按脚本指定范围\n grp.assistNamelist = opts.assistNamelist; //按角色指定范围\n grp.assistNamelistByUser = opts.assistNamelistByUser;\n\n this._selected = grp;\n }\n\n // the StartNode edit Process method\n\n }, {\n key: \"editStartNode\",\n value: function editStartNode(sn, id, name, statelabel, x, y) {\n sn.id = id;\n sn.name = name;\n sn.statelabel = statelabel;\n sn.x = x;\n sn.y = y;\n\n this._selected = sn;\n }\n }, {\n key: \"editCompleteNode\",\n value: function editCompleteNode(sn, id, name, statelabel, orderNum, x, y, isgather, splitStartNode, isAutoArchive) {\n sn.id = id;\n sn.name = name;\n sn.statelabel = statelabel;\n sn.orderNum = orderNum;\n sn.x = x;\n sn.y = y;\n sn.isgather = isgather;\n sn.splitStartNode = splitStartNode;\n sn.isAutoArchive = isAutoArchive;\n\n this._selected = sn;\n }\n\n // yx 编辑网关节点\n\n }, {\n key: \"editGatewayNode\",\n value: function editGatewayNode(sn, id, name, statelabel, x, y, issplit, isgather, splitStartNode) {\n sn.id = id;\n sn.name = name;\n sn.statelabel = statelabel;\n sn.x = x;\n sn.y = y;\n sn.isgather = isgather;\n sn.issplit = issplit;\n sn.splitStartNode = splitStartNode;\n this._selected = sn;\n }\n }, {\n key: \"editSuspendNode\",\n value: function editSuspendNode(sn, id, name, statelabel, x, y) {\n sn.id = id;\n sn.name = name;\n sn.statelabel = statelabel;\n sn.x = x;\n sn.y = y;\n\n this._selected = sn;\n }\n\n // the AutoNode class process method\n\n }, {\n key: \"editAutoNode\",\n value: function editAutoNode(an, id, name, statelabel, orderNum, issplit, isgather, autoAuditType, delayDay, delayHour, delayMinute, auditDateTime, x, y, splitStartNode, autoAuditTimeEditMode, auditDateTimeScript) {\n an.id = id;\n an.name = name;\n an.statelabel = statelabel;\n an.orderNum = orderNum;\n an.auditDateTime = auditDateTime;\n an.isgather = isgather;\n an.issplit = issplit;\n an.autoAuditType = autoAuditType;\n an.delayDay = delayDay;\n an.delayHour = delayHour;\n an.delayMinute = delayMinute;\n an.x = x;\n an.y = y;\n an.splitStartNode = splitStartNode;\n an.autoAuditTimeEditMode = autoAuditTimeEditMode;\n an.auditDateTimeScript = auditDateTimeScript;\n\n this._selected = an;\n }\n }, {\n key: \"editSubFlow\",\n value: function editSubFlow(an, opts) {\n an.subFlowDefiType = opts.subFlowDefiType;\n an.subflowid = opts.subflowid;\n an.subflowname = opts.subflowname;\n an.subflowScript = opts.subflowScript;\n an.paramPassingType = opts.paramPassingType;\n an.parentFlowFormId = opts.parentFlowFormId;\n an.parentFlowFormName = opts.parentFlowFormName;\n an.subFlowFormId = opts.subFlowFormId;\n an.subFlowFormName = opts.subFlowFormName;\n an.fieldMappingXML = opts.fieldMappingXML;\n an.shareDocument = opts.shareDocument;\n an.paramPassingScript = opts.paramPassingScript;\n an.numberSetingType = opts.numberSetingType;\n an.numberSetingContent = opts.numberSetingContent;\n an.callback = opts.callback;\n an.callbackScript = opts.callbackScript;\n an.iscurrent = opts.iscurrent;\n an.ispassed = opts.ispassed;\n an.crossform = opts.crossform;\n an.startupScript = opts.startupScript;\n an.isgather = opts.isgather;\n an.splitStartNode = opts.splitStartNode;\n an.issplit = opts.issplit;\n an.isToPerson = opts.isToPerson;\n an.checkedOnSinglePerson = opts.checkedOnSinglePerson;\n an.checkedOnMultiplePerson = opts.checkedOnMultiplePerson;\n\n an.id = opts.id;\n an.name = opts.name;\n an.scale = opts.scale;\n an.note = opts.note;\n an.x = opts.x;\n an.y = opts.y;\n an.width = opts.width;\n an.height = opts.height;\n an.m_width = opts.m_width;\n an.m_height = opts.m_height;\n an.prenodeid = opts.prenodeid;\n an.statelabel = opts.statelabel;\n an.orderNum = opts.orderNum;\n an.backnodeid = opts.backnodeid;\n an.formname = opts.formname;\n an.fieldpermlist = opts.fieldpermlist;\n an.isstartandnext = opts.isstartandnext;\n an._iscurrent = opts._iscurrent;\n\n this._selected = an;\n }\n\n /**\r\n * @param id\r\n * @param name\r\n * @param note\r\n * @roseuid 3E0406A90239\r\n */\n\n }, {\n key: \"editRelation\",\n value: function editRelation(rlt, id, name, condition, note, action, validateScript, filtercondition, editMode, processDescription, formlist) {\n rlt.id = id;\n rlt.name = name;\n rlt.condition = condition;\n rlt.note = note;\n rlt.action = action;\n rlt.validateScript = validateScript;\n rlt.filtercondition = filtercondition;\n rlt.editMode = editMode;\n rlt.processDescription = processDescription;\n rlt.formlist = formlist;\n this._selected = rlt;\n }\n }, {\n key: \"isCurrentSelected\",\n value: function isCurrentSelected(em) {\n if (em != null && this._selected != null && Object.is(em, this._selected)) {\n return true;\n } else {\n return false;\n }\n }\n\n /**\r\n * yx 选中的数组中有无当前的元素\r\n */\n\n }, {\n key: \"isInZoom\",\n value: function isInZoom(em) {\n if (em) {\n // 在\n for (var i = 0; i < this.selectArr.length; i++) {\n if (Object.is(em.id, this.selectArr[i].id)) return true;\n }\n return false;\n } else {\n return false;\n }\n }\n\n /**\r\n * yx 看selectArr中有无数据\r\n */\n\n }, {\n key: \"checkSelectArr\",\n value: function checkSelectArr() {\n if (this.selectArr.length > 0) return true;else return false;\n }\n }, {\n key: \"isCurrentToEdit\",\n value: function isCurrentToEdit(em) {\n if (em != null && this._currToEdit != null && Object.is(em, this._currToEdit)) {\n return true;\n } else {\n return false;\n }\n }\n\n //全部分散节点\n\n }, {\n key: \"getAllSplitNode\",\n value: function getAllSplitNode(currentNode) {\n var arrayColleaction = [];\n var relation = [],\n node = [],\n nodeRelation = {};\n var obja = {\n name: \"---select---\",\n id: \"\"\n };\n arrayColleaction.push(obja);\n\n for (var i = 0; i < this._elems.length; i++) {\n var element = this._elems[i];\n // console.log(element.hasSomeRelation)\n if (!(element instanceof _Relation2.default)) {\n if (element instanceof _ManualNode2.default) {\n var manualNode = element;\n if (manualNode.issplit) {\n // if (id != manualNode.id) {\n var obj = {\n name: element.name,\n id: element.id\n };\n arrayColleaction.push(obj);\n // }\n }\n } else if (element instanceof _AutoNode2.default) {\n var autoNode = element;\n if (autoNode.issplit) {\n // if (id != autoNode.id) {\n var obj1 = {\n name: element.name,\n id: element.id\n };\n arrayColleaction.push(obj1);\n // }\n }\n } else if (element instanceof _SubFlow2.default) {\n var subFlow = element;\n if (subFlow.issplit) {\n // if (id != subFlow.id) {\n var obj2 = {\n name: element.name,\n id: element.id\n };\n arrayColleaction.push(obj2);\n // }\n }\n }\n } else {\n relation.push(element);\n }\n }\n\n if (!(currentNode instanceof _Relation2.default)) {\n nodeRelation = currentNode.hasSomeRelation(relation);\n }\n return _extends({ arrayColleaction: arrayColleaction }, nodeRelation);\n }\n\n /*\r\n * 获取指定结点前的所有结点(踢除指定结点)\r\n */\n\n }, {\n key: \"getAllBeforeNode\",\n value: function getAllBeforeNode(node, ispassed) {\n var all = this.getAllNodeBeforeNode(null, node, ispassed);\n if (this.isContain(all, node)) {\n all = this._removeElementFromArray(all, node);\n }\n return all;\n }\n\n /*\r\n * 获取指定结点前的所有结点\r\n */\n\n }, {\n key: \"getAllNodeBeforeNode\",\n value: function getAllNodeBeforeNode(allnode, node, ispassed) {\n if (allnode == null) {\n allnode = [];\n }\n if (node == null || node instanceof _StartNode2.default) {\n return allnode;\n }\n\n var allrelation = this.getNodeBeforeRelation(node, ispassed);\n\n for (var i = 0; i < allrelation.length; i++) {\n var item = allrelation[i];\n if (item instanceof _Relation2.default) {\n var r = item;\n var beforeNode = this.getStartNode(r);\n\n if (!this.isContain(allnode, beforeNode)) {\n if (beforeNode instanceof _ManualNode2.default) {\n var tmp = beforeNode;\n if (tmp.namelist.indexOf(\"*\") == -1) {\n allnode.push(beforeNode);\n }\n }\n allnode = this.getAllNodeBeforeNode(allnode, beforeNode, ispassed);\n }\n }\n }\n\n return allnode;\n }\n }, {\n key: \"isContain\",\n value: function isContain(all, beforeNode) {\n if (all != null) {\n for (var i = 0; i < all.length; i++) {\n var item = all[i];\n if (item instanceof _Node2.default) {\n var n = item;\n if (n.id == beforeNode.id) {\n return true;\n }\n }\n }\n }\n return false;\n }\n }, {\n key: \"addManualNode\",\n value: function addManualNode(name, statelabel, orderNum, x, y) {\n var grp = new _ManualNode2.default(this);\n var opts = {\n id: _Sequence2.default.getSequence() + \"\",\n name: \"\",\n scale: 0,\n note: \"\",\n x: x,\n y: y,\n width: 75,\n height: 80,\n m_width: 50,\n m_height: 50,\n prenodeid: \"\",\n statelabel: statelabel,\n orderNum: orderNum,\n backnodeid: \"\",\n formname: \"\",\n fieldpermlist: \"\",\n isstartandnext: false,\n _iscurrent: false,\n actorListScript: \"\",\n actorEditMode: 0,\n namelist: \"\",\n deptlist: \"\",\n realnamelist: \"\",\n approverNumType: 0,\n passcondition: \"\",\n isApproverEdit: false,\n approverEditScript: '',\n isCoApproverEdit: false, //彩生活\n coApproverEditScript: '',\n isSupplementComments: false,\n exceedaction: \"\",\n issetcurruser: false,\n inputform: \"\",\n isgather: false,\n issplit: false,\n cBack: true,\n splitStartNode: \"\",\n isFrontEdit: false,\n backType: 0,\n isToPerson: false,\n checkedOnSinglePerson: false,\n checkedOnMultiplePerson: false,\n\n bnodelist: \"\",\n retracementEditMode: 0,\n cRetracement: false,\n retracementScript: \"\",\n notificationStrategyJSON: \"\",\n isCarbonCopy: false,\n isSelectCirculator: false,\n circulatorEditMode: 0,\n circulatorListScript: \"\",\n circulatorNamelist: \"\",\n userList: \"\",\n circulatorNamelistByUser: \"\",\n orgField: \"\",\n orgScope: \"self\",\n orgRoleCondition: \"\",\n isLimited: false,\n timeLimitEditMode: 0,\n timeLimitDay: \"\",\n timeLimitHour: \"\",\n timeLimitMinute: \"\",\n timeLimitScript: \"\",\n isUsbKeyVerify: false,\n roleCondition: \"\",\n handupEditMode: 0,\n isHandup: false,\n handupScript: \"\",\n isAllowEditAuditor: false,\n allowEditAuditorScript: '',\n isAllowTermination: false,\n activityPermList: \"\",\n urge2ApprovalEditMode: 0,\n allowUrge2Approval: false,\n allowUrge2ApprovalScript: \"\",\n isAllowSkip: false,\n nextNodeCheckedStatus: 0,\n //彩生活\n isAssist: false, //是否开启协办\n isSelectAssistUser: false, //允许上一步流程处理人指定本节点的协办人\n assistEditMode: 0, //指定方式\n assistListScript: \"\", //按脚本指定范围\n assistNamelist: \"\", //按角色指定范围\n assistNamelistByUser: \"\"\n };\n\n this.editManualNode(grp, opts);\n\n this._elems.push(grp);\n return grp;\n }\n }, {\n key: \"createManualNode\",\n value: function createManualNode() {\n var mn = new _ManualNode2.default(this);\n return mn;\n }\n\n // the StartNode add process method\n\n }, {\n key: \"addStartNode\",\n value: function addStartNode(name, statelabel, x, y) {\n var cn = new _StartNode2.default(this);\n this.editStartNode(cn, _Sequence2.default.getSequence(), name, statelabel, x, y);\n this._elems.push(cn);\n return cn;\n }\n }, {\n key: \"addCompleteNode\",\n value: function addCompleteNode(name, statelabel, orderNum, x, y) {\n var cn = new _CompleteNode2.default(this);\n this.editCompleteNode(cn, _Sequence2.default.getSequence(), name, statelabel, orderNum, x, y, false, \"\", false);\n this._elems.push(cn);\n return cn;\n }\n // yx\n\n }, {\n key: \"addGatewayNode\",\n value: function addGatewayNode(name, statelabel, x, y) {\n var cn = new _GatewayNode2.default(this);\n this.editGatewayNode(cn, _Sequence2.default.getSequence(), name, statelabel, x, y, false, false, \"\");\n this._elems.push(cn);\n return cn;\n }\n }, {\n key: \"addSuspendNode\",\n value: function addSuspendNode(name, statelabel, x, y) {\n var cn = new SuspendNode(this);\n this.editSuspendNode(cn, _Sequence2.default.getSequence(), name, statelabel, x, y);\n this._elems.push(cn);\n return cn;\n }\n\n // the AutoNode process method\n\n }, {\n key: \"addAutoNode\",\n value: function addAutoNode(name, statelabel, orderNum, x, y) {\n var an = new _AutoNode2.default(this);\n this.editAutoNode(an, _Sequence2.default.getSequence(), name, statelabel, orderNum, false, false, 1, \"\", \"\", \"\", \"\", x, y, \"\", 1, \"\");\n this._elems.push(an);\n return an;\n }\n\n /**\r\n * 添加子流程节点\r\n *\r\n * @param name\r\n * @param statelabel\r\n * @param x\r\n * @param y\r\n * @return\r\n */\n\n }, {\n key: \"addSubFlow\",\n value: function addSubFlow(name, statelabel, orderNum, x, y) {\n var an = new _SubFlow2.default(this);\n var opts = {\n subFlowDefiType: \"01\",\n subflowid: \"\",\n subflowname: \"\",\n subflowScript: \"\",\n paramPassingType: \"01\",\n parentFlowFormId: \"\",\n parentFlowFormName: \"\",\n subFlowFormId: \"\",\n subFlowFormName: \"\",\n fieldMappingXML: \"\",\n shareDocument: false,\n paramPassingScript: \"\",\n numberSetingType: \"01\",\n numberSetingContent: \"1\",\n callback: false,\n callbackScript: \"\",\n iscurrent: false,\n ispassed: false,\n crossform: false,\n startupScript: \"\",\n isgather: false,\n splitStartNode: \"\",\n issplit: true,\n isToPerson: false,\n checkedOnSinglePerson: false,\n checkedOnMultiplePerson: false,\n\n id: _Sequence2.default.getSequence() + \"\",\n name: name,\n scale: 0,\n note: \"\",\n x: x,\n y: y,\n width: 75,\n height: 80,\n m_width: 20,\n m_height: 20,\n prenodeid: \"\",\n statelabel: statelabel,\n orderNum: orderNum,\n backnodeid: \"\",\n formname: \"\",\n fieldpermlist: \"\",\n isstartandnext: false,\n _iscurrent: false\n };\n\n this.editSubFlow(an, opts);\n this._elems.push(an);\n return an;\n }\n }, {\n key: \"addRelation\",\n value: function addRelation(name, condition, note, action, validateScript, filtercondition, editMode, processDescription) {\n var rlt = new _Relation2.default(this);\n this.editRelation(rlt, _Sequence2.default.getSequence(), name, condition, note, action, validateScript, filtercondition, editMode, processDescription);\n this._elems.push(rlt);\n }\n\n /**\r\n * @param id\r\n * @roseuid 3E0406950172\r\n */\n\n }, {\n key: \"delActor\",\n value: function delActor(id) {\n delElement(id);\n }\n\n /**\r\n * @param id\r\n * @roseuid 3E0406B003D4\r\n */\n\n }, {\n key: \"delRelation\",\n value: function delRelation(id) {\n delElement(id);\n }\n\n /**\r\n * 改变鼠标状态\r\n *\r\n * @param statues\r\n * @roseuid 3E0A6E1A0258\r\n */\n\n }, {\n key: \"changeStatues\",\n value: function changeStatues(statues) {\n this._statues = statues;\n switch (this._statues) {\n case FlowDiagram.ACTION_NORMAL:\n this.canvas.style.cursor = \"pointer\";\n break;\n case FlowDiagram.ACTION_REMOVE:\n this.canvas.style.cursor = \"pointer\";\n break;\n case FlowDiagram.ACTION_ADD_ABORTNODE:\n this.canvas.style.cursor = \"pointer\";\n break;\n case FlowDiagram.ACTION_ADD_AUTONODE:\n this.canvas.style.cursor = \"pointer\";\n break;\n case FlowDiagram.ACTION_ADD_COMPLETENODE:\n this.canvas.style.cursor = \"pointer\";\n break;\n case FlowDiagram.ACTION_ADD_MANUALNODE:\n this.canvas.style.cursor = \"pointer\";\n break;\n case FlowDiagram.ACTION_ADD_STARTNODE:\n this.canvas.style.cursor = \"pointer\";\n break;\n case FlowDiagram.ACTION_ADD_GATEWAYNODE:\n this.canvas.style.cursor = \"pointer\";\n break;\n case FlowDiagram.ACTION_ADD_SUSPENDNODE:\n this.canvas.style.cursor = \"pointer\";\n break;\n case FlowDiagram.ACTION_ADD_TERMINATENODE:\n this.canvas.style.cursor = \"pointer\";\n break;\n case FlowDiagram.ACTION_ADD_SUBFLOW:\n this.canvas.style.cursor = \"pointer\";\n break;\n case FlowDiagram.ACTION_BREAK_LINE:\n // add by gusd\n this.canvas.style.cursor = \"pointer\";\n break; // end\n\n default:\n this.canvas.style.cursor = \"initial\";\n }\n }\n }, {\n key: \"zoomIn\",\n value: function zoomIn() {\n if (_zoomrate * 0.9 < 0.5) {\n return;\n }\n\n _zoomrate *= 0.9;\n\n this.getGraphics().clearRect(0, 0, width, height);\n\n this.setSize(int(width / _zoomrate), int(height / _zoomrate));\n }\n }, {\n key: \"zoomOut\",\n value: function zoomOut() {\n if (_zoomrate / 0.9 > 2) {\n return;\n }\n _zoomrate /= 0.9;\n\n this.getGraphics().clearRect(0, 0, width, height);\n\n this.setSize(int(width / _zoomrate), int(height / _zoomrate));\n }\n\n /**\r\n * @param id\r\n * @roseuid 3E0A6E1A03DF\r\n */\n\n }, {\n key: \"delElement\",\n value: function delElement(id) {\n for (var e = _elems.elements(); e.hasMoreElements();) {\n var em = e.nextElement();\n if (em.id != null && em.id.equals(id)) {\n _elems.removeElement(em);\n }\n }\n }\n }, {\n key: \"repaint\",\n value: function repaint() {\n this.paint();\n }\n }, {\n key: \"paintTo\",\n value: function paintTo(og, fillBackground) {\n // 清除背景\n if (fillBackground) {\n og.setColor(_Resources2.default.COLOR.white);\n og.setFont(_PaintElement2.default.DEF_FONT);\n\n og.fillRect(0, 0, this.width / this.scaleNum, this.height / this.scaleNum);\n\n // 画背景网格\n og.setColor(_Resources2.default.COLOR.lightGray);\n\n for (var i = 0; i < this.width / this.scaleNum / 50; i++) {\n og.drawLine(i * 50, 0, i * 50, this.height / this.scaleNum);\n }\n\n for (var _i = 0; _i < this.width / this.scaleNum / 5; _i++) {\n og.drawLine(_i * 5, 0, _i * 5, 5);\n }\n\n for (var _i2 = 0; _i2 < this.width / this.scaleNum / 25; _i2++) {\n og.drawLine(_i2 * 25, 0, _i2 * 25, 10);\n }\n\n for (var _i3 = 0; _i3 < this.width / this.scaleNum / 50; _i3++) {\n og.drawLine(0, _i3 * 50, this.width / this.scaleNum, _i3 * 50);\n }\n\n for (var _i4 = 0; _i4 < this.width / this.scaleNum / 5; _i4++) {\n og.drawLine(0, _i4 * 5, 5, _i4 * 5);\n }\n\n for (var _i5 = 0; _i5 < this.width / this.scaleNum / 25; _i5++) {\n og.drawLine(0, _i5 * 25, 10, _i5 * 25);\n }\n } else {\n og.setColor(_Resources2.default.COLOR.lightGray);\n og.fillRect(0, 0, this.width / this.scaleNum, this.height / this.scaleNum);\n }\n\n // 画元素\n\n this._elems.forEach(function (elem) {\n if (elem instanceof _PaintElement2.default) {\n //console.log(elem)\n elem.paint(og);\n }\n });\n\n //绘制辅助线\n if (_AuxiliaryLine2.default.getInstance().getProp('points')) {\n _AuxiliaryLine2.default.getInstance().paint(og);\n }\n }\n\n /**\r\n * yx获取绘画辅助线的点\r\n * @target 当前画布中被选中的元素,以此元素的顶点作为基准寻找画辅助线的点\r\n * @return 绘画辅助线的点,找不到时为空\r\n */\n\n }, {\n key: \"getDrawAuxiliaryLinePoint\",\n value: function getDrawAuxiliaryLinePoint(target) {\n var point = {};\n\n if (!target) {\n return false;\n }\n\n for (var i = 0, len = this._elems.length; i < len; i++) {\n if (!(this._elems[i] instanceof _Relation2.default)) {\n var result = this._elems[i].getElementConnectionPoint(this._elems, target);\n\n if (point.abscissa && point.ordinate) {\n return point;\n }\n\n if (result && result.middle) {\n point.middle = result.middle;\n }\n\n if (result && result.abscissa && !point.abscissa) {\n point.abscissa = result.abscissa;\n }\n\n if (result && result.ordinate && !point.ordinate) {\n point.ordinate = result.ordinate;\n }\n }\n }\n\n if (!point.abscissa && !point.ordinate && !point.middle) {\n return null;\n } else {\n return point;\n }\n }\n\n /**\r\n * yx 靠近其他其他元素時自動修改x,y(辅助线)\r\n */\n\n }, {\n key: \"closeEleChange\",\n value: function closeEleChange(target) {\n console.log(target, 'targettttttttt');\n var tempArr = [];\n for (var a = 0; a < this._elems.length; a++) {\n if (!(this._elems[a] instanceof _Relation2.default)) {\n // 剔除原来的元素\n if (target.id == this._elems[a].id) {\n continue;\n } else {\n tempArr.push(this._elems[a]);\n }\n }\n }\n // 用新的数组判断是否相距5\n for (var b = 0; b < tempArr.length; b++) {\n if (Math.abs(target.x - tempArr[b].x) <= 5 && Math.abs(target.y - tempArr[b].y) <= 5) {\n target.x = tempArr[b].x;\n target.y = tempArr[b].y;\n break;\n }\n }\n }\n }, {\n key: \"getMaxRect\",\n value: function getMaxRect() {\n // OGraphics og = new OGraphics();\n // og.setCompressRate(0.5);\n // paintMobile(og);\n\n // ///////////////\n // 画元素\n\n var maxRect = new Rectangle(0, 0, 1, 1);\n for (var e = _elems.elements(); e.hasMoreElements();) {\n var te = e.nextElement();\n if (te instanceof _PaintElement2.default) {\n var em = te;\n maxRect.add(em.getRepaintRect());\n }\n }\n\n maxRect.setSize(maxRect.width + 50, maxRect.height + 50);\n\n return maxRect;\n }\n\n /**\r\n * @param g\r\n * @roseuid 3E0A6E1B0065\r\n */\n\n }, {\n key: \"paint\",\n value: function paint() {\n this.paintTo(this.g, true);\n }\n\n /**\r\n * @param e\r\n * @roseuid 3E0A6E1B0079\r\n */\n\n }, {\n key: \"appendElement\",\n value: function appendElement(e) {\n _elems.push(e);\n }\n }, {\n key: \"toXML\",\n value: function toXML() {\n var rslt = \"\";\n try {\n var tagNames = [\"flowstatus\", \"flowpath\", \"deleteMSG\", \"width\", \"height\", \"_applicationid\", \"_sessionid\"];\n var cls = this;\n rslt = \"\\n\";\n for (var key in cls) {\n if (tagNames.indexOf(key) >= 0) {\n var clsValue = cls[key] == null ? \"\" : cls[key];\n rslt += \"<\" + key + \">\" + clsValue + \"\" + key + \">\\n\";\n }\n }\n var flds = this._elems;\n for (var i = 0; i < flds.length; i++) {\n rslt += flds[i].toXML();\n }\n rslt += \"\\n\";\n } catch (e) {}\n\n return rslt;\n }\n\n //xh\n //验证器\n\n }, {\n key: \"check\",\n value: function check() {\n var elems = this._elems;\n var result = \"\";\n var startNodeCount = 0,\n endNodeCount = 0,\n relationCount = 0;\n var relation = [],\n node = [];\n\n if (elems.length > 0) {\n for (var i = 0; i < elems.length; i++) {\n if (elems[i] instanceof _StartNode2.default) {\n startNodeCount++;\n node.push(elems[i]);\n } else if (elems[i] instanceof _CompleteNode2.default) {\n endNodeCount++;\n node.push(elems[i]);\n } else if (elems[i] instanceof _Relation2.default) {\n relationCount++;\n relation.push(elems[i]);\n } else {\n node.push(elems[i]);\n }\n }\n\n for (var j = 0; j < node.length; j++) {\n result = node[j].check();\n if (!result) {\n return false;\n }\n }\n\n if (startNodeCount == 0 || endNodeCount == 0) {\n alert(\"请创建开始和完成节点!\");\n return false;\n } else if (node.length < 3) {\n alert(\"请为流程至少创建一个发起者和审批人!\");\n return false;\n }\n\n if (relationCount == 0) {\n alert(\"请创建节点之间的关联线!\");\n return false;\n } else {\n for (var nl = 0; nl < node.length; nl++) {\n if (!node[nl].hasRelation(relation)) {\n return false;\n }\n }\n }\n\n return true;\n }\n\n alert(\"请创建节点元素!\");\n return false;\n }\n\n /**\r\n * yx 元素垂直居中\r\n */\n\n }, {\n key: \"alignVerticalCenter\",\n value: function alignVerticalCenter() {\n if (this.selectArr.length < 2) {\n alert('请按下Ctrl并至少选择两个节点(节点不包括关连线)');\n } else {\n // 获取被选中元素的最大x值和最小x值,y值不变,x取两者的中间值\n var maxX = Math.max.apply(Math, this.selectArr.map(function (item) {\n return item.x;\n }));\n var minX = Math.min.apply(Math, this.selectArr.map(function (item) {\n return item.x;\n }));\n var maxW = Math.max.apply(Math, this.selectArr.map(function (item) {\n return item.width;\n }));\n var minW = Math.min.apply(Math, this.selectArr.map(function (item) {\n return item.width;\n }));\n var averageValue = (maxX + minX) / 2;\n var averageWidth = (maxW - minW) / 2;\n this.abscissaChange(averageValue, maxW, averageWidth);\n }\n }\n /**\r\n * yx 左对齐\r\n */\n\n }, {\n key: \"alignLeft\",\n value: function alignLeft() {\n if (this.selectArr.length < 2) {\n alert('请按下Ctrl并至少选择两个节点(节点不包括关连线)');\n } else {\n // 获取被选中元素的最小x值,y值不变\n var minX = Math.min.apply(Math, this.selectArr.map(function (item) {\n return item.x;\n }));\n this.abscissaChange(minX);\n }\n }\n /**\r\n * yx 右对齐\r\n */\n\n }, {\n key: \"alignRight\",\n value: function alignRight() {\n if (this.selectArr.length < 2) {\n alert('请按下Ctrl并至少选择两个节点(节点不包括关连线)');\n } else {\n // 获取被选中元素的最小x值,y值不变\n var maxX = Math.max.apply(Math, this.selectArr.map(function (item) {\n return item.x;\n }));\n var maxW = Math.max.apply(Math, this.selectArr.map(function (item) {\n return item.width;\n }));\n var minW = Math.min.apply(Math, this.selectArr.map(function (item) {\n return item.width;\n }));\n var averageWidth = maxW - minW;\n this.abscissaChange(maxX, maxW, averageWidth);\n }\n }\n /**\r\n * yx 元素水平居中\r\n */\n\n }, {\n key: \"alignHorizontalCenter\",\n value: function alignHorizontalCenter() {\n if (this.selectArr.length < 2) {\n alert('请按下Ctrl并至少选择两个节点(节点不包括关连线)');\n } else {\n // 获取被选中元素的最大x值和最小x值,y值不变,x取两者的中间值\n var maxX = Math.max.apply(Math, this.selectArr.map(function (item) {\n return item.y;\n }));\n var minX = Math.min.apply(Math, this.selectArr.map(function (item) {\n return item.y;\n }));\n var maxH = Math.max.apply(Math, this.selectArr.map(function (item) {\n return item.height;\n }));\n var minH = Math.min.apply(Math, this.selectArr.map(function (item) {\n return item.height;\n }));\n var averageValue = (maxX + minX) / 2;\n var averageHeight = (maxH - minH) / 2;\n this.ordinateChange(averageValue, maxH, averageHeight);\n }\n }\n /**\r\n * yx 元素顶部对齐\r\n */\n\n }, {\n key: \"alignTop\",\n value: function alignTop() {\n if (this.selectArr.length < 2) {\n alert('请按下Ctrl并至少选择两个节点(节点不包括关连线)');\n } else {\n // 获取被选中元素的最大x值和最小x值,y值不变,x取两者的中间值\n var minX = Math.min.apply(Math, this.selectArr.map(function (item) {\n return item.y;\n }));\n this.ordinateChange(minX);\n }\n }\n /**\r\n * yx 元素底部对齐\r\n */\n\n }, {\n key: \"alignBottom\",\n value: function alignBottom() {\n if (this.selectArr.length < 2) {\n alert('请按下Ctrl并至少选择两个节点(节点不包括关连线)');\n } else {\n // 获取被选中元素的最大x值和最小x值,y值不变,x取两者的中间值\n var maxX = Math.max.apply(Math, this.selectArr.map(function (item) {\n return item.y;\n }));\n var maxH = Math.max.apply(Math, this.selectArr.map(function (item) {\n return item.height;\n }));\n var minH = Math.min.apply(Math, this.selectArr.map(function (item) {\n return item.height;\n }));\n var averageHeight = maxH - minH;\n this.ordinateChange(maxX, maxH, averageHeight);\n }\n }\n\n /**\r\n * yx 原元素的横坐标修改(在selectArr中找到elems的所有节点)\r\n * @param {横坐标} cx \r\n */\n\n }, {\n key: \"abscissaChange\",\n value: function abscissaChange(cx, maxX) {\n var width = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n\n for (var i = 0; i < this.selectArr.length; i++) {\n for (var j = 0; j < this._elems.length; j++) {\n if (Object.is(this.selectArr[i], this._elems[j])) {\n if (maxX && maxX > this.selectArr[i].width) {\n this._elems[j].x = cx + width;\n break;\n } else {\n this._elems[j].x = cx;\n break;\n }\n }\n }\n }\n this.repaint();\n }\n\n /**\r\n * yx 原元素纵坐标的修改\r\n * @param {纵坐标} cy \r\n */\n\n }, {\n key: \"ordinateChange\",\n value: function ordinateChange(cy, maxH) {\n var height = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n\n for (var i = 0; i < this.selectArr.length; i++) {\n for (var j = 0; j < this._elems.length; j++) {\n if (Object.is(this.selectArr[i], this._elems[j])) {\n if (maxH && maxH > this.selectArr[i].height) {\n this._elems[j].y = cy + height;\n break;\n } else {\n this._elems[j].y = cy;\n break;\n }\n }\n }\n }\n this.repaint();\n }\n\n /**\r\n * @param e\r\n * @roseuid 3E0A6E1B0097\r\n */\n\n }, {\n key: \"removeElement\",\n value: function removeElement(emn) {\n if (emn != null) {\n if (emn instanceof _Node2.default) {\n var v = this.getAllElements();\n for (var i = 0; i < v.length; i++) {\n var elem = v[i];\n if (elem instanceof _Relation2.default) {\n var r = elem;\n if (r.startnodeid != null && r.startnodeid == emn.id || r.endnodeid != null && r.endnodeid == emn.id) {\n this._elems = this._removeElementFromArray(this._elems, r);\n }\n }\n }\n this._elems = this._removeElementFromArray(this._elems, emn);\n } else {\n this._elems = this._removeElementFromArray(this._elems, emn);\n }\n }\n this._currToEdit = null;\n }\n }, {\n key: \"_removeElementFromArray\",\n value: function _removeElementFromArray(array, element) {\n for (var i = 0; i < array.length; i++) {\n var em = array[i];\n if (em.id != null && em.id == element.id) {\n return [].concat(_toConsumableArray(array.slice(0, i)), _toConsumableArray(array.slice(i + 1)));\n }\n }\n }\n\n /**\r\n * @param id\r\n * @roseuid 3E0A6E1B00AB\r\n */\n\n }, {\n key: \"removeElementById\",\n value: function removeElementById(id) {\n var elems = this._elems;\n for (var i = 0; i < elems.length; i++) {\n var em = elems[i];\n if (em.id != null && em.id == id) {\n this._elems = [].concat(_toConsumableArray(this._elems.slice(0, i)), _toConsumableArray(this._elems.slice(i + 1)));\n }\n }\n }\n\n /**\r\n * @param x\r\n * @param y\r\n * @return cn.myapps.runtime.workflow.Element\r\n * @roseuid 3E0A6E1B00C9\r\n */\n\n }, {\n key: \"chkSelectedElement\",\n value: function chkSelectedElement(x, y) {\n var elems = this._elems;\n for (var i = 0; i < elems.length; i++) {\n if (elems[i] instanceof _PaintElement2.default) {\n if (elems[i].isSelected(x, y)) {\n return elems[i];\n }\n }\n }\n return null;\n }\n }, {\n key: \"getFlowstatus\",\n value: function getFlowstatus() {\n return this.flowstatus;\n }\n\n /**\r\n * 设置流程运转路径\r\n *\r\n * @param\r\n */\n\n }, {\n key: \"setFlowpath\",\n value: function setFlowpath(path) {\n if (this.flowpath == null || this.flowpath.trim().length <= 0) {\n this.flowpath = path;\n } else {\n this.flowpath = this.flowpath + \";\" + path;\n }\n }\n\n /**\r\n * 获取流程运转路径\r\n *\r\n * @param\r\n */\n\n }, {\n key: \"getFlowpath\",\n value: function getFlowpath() {\n var colls = [];\n if (flowpath != null && flowpath.trim().length > 0) {\n var path = this.flowpath.split(\";\");\n for (var i = 0; i < path.length; i++) {\n var t = path[i].split(\",\");\n colls.add(t);\n }\n }\n return colls;\n }\n\n /**\r\n * 获取流程运转路径最后审核结点\r\n *\r\n * @param\r\n */\n\n }, {\n key: \"getFlowpathLastNode\",\n value: function getFlowpathLastNode() {\n var colls = getFlowpath();\n var obj = colls.toArray();\n var nodeid = \"\";\n var node = null;\n if (obj.length >= 1) {\n var path = obj[obj.length - 1];\n nodeid = path[0];\n }\n if (nodeid != null && nodeid.trim().length > 0) {\n node = getElementByID(nodeid);\n }\n return node;\n }\n\n /**\r\n * 设置流程状态\r\n *\r\n * @param\r\n */\n\n }, {\n key: \"setFlowstatus\",\n value: function setFlowstatus(status) {\n // if (this.flowstatus == FLOWSTATUS_OPEN_NOSTART &&\n // ( (status & FLOWSTATUS_OPEN_START) > 0)) {\n // this.flowstatus = status;\n // Node n = getFirstNode(); //设起始点\n // setCurrentNode(n);\n // }\n // else\n if (this.flowstatus == _FlowType2.default.FLOWSTATUS_OPEN_NOSTART && (status & (_FlowType2.default.FLOWSTATUS_OPEN_RUN_RUNNING | _FlowType2.default.FLOWSTATUS_CLOSE_TERMINAT)) > 0) {\n this.flowstatus = status;\n } else if (this.flowstatus == _FlowType2.default.FLOWSTATUS_OPEN_RUN_RUNNING && (status & (_FlowType2.default.FLOWSTATUS_OPEN_RUN_SUSPEND | _FlowType2.default.FLOWSTATUS_CLOSE_COMPLETE | _FlowType2.default.FLOWSTATUS_CLOSE_TERMINAT | _FlowType2.default.FLOWSTATUS_OPEN_RUN_RUNNING)) > 0) {\n this.flowstatus = status;\n } else if (this.flowstatus == _FlowType2.default.FLOWSTATUS_OPEN_RUN_SUSPEND && (status & (_FlowType2.default.FLOWSTATUS_OPEN_RUN_RUNNING | _FlowType2.default.FLOWSTATUS_OPEN_RUN_SUSPEND | _FlowType2.default.FLOWSTATUS_CLOSE_ABORT)) > 0) {\n this.flowstatus = status;\n } else {\n throw new OBPMValidateException(\"{*[core.workflow.status.error]*}\");\n }\n // //保存流程流转路径\n // if (this.flowstatus == FLOWSTATUS_OPEN_START) {\n // setFlowpath(getCurrentNode().id + \",\" + START);\n // }else if (this.flowstatus == FLOWSTATUS_OPEN_RUN_RUNNING){\n // setFlowpath(getCurrentNode().id + \",\" + PASS);\n // }else if (this.flowstatus == FLOWSTATUS_OPEN_RUN_SUSPEND){\n // setFlowpath(getCurrentNode().id + \",\" + SUSPEND);\n // }else if (this.flowstatus == FLOWSTATUS_CLOSE_TERMINAT){\n // setFlowpath(getCurrentNode().id + \",\" + TERMINATE);\n // }else if (this.flowstatus == FLOWSTATUS_CLOSE_ABORT){\n // setFlowpath(getCurrentNode().id + \",\" + ABORT);\n // }else if (this.flowstatus == FLOWSTATUS_CLOSE_COMPLETE){\n // setFlowpath(getCurrentNode().id + \",\" + COMPLETE);\n // }\n }\n\n /**\r\n * 获取当前结点\r\n *\r\n * @param\r\n */\n\n }, {\n key: \"getFirstCurrentNode\",\n value: function getFirstCurrentNode() {\n var ems = getAllElements();\n var enum11 = ems.elements();\n while (enum11.hasMoreElements()) {\n var item = enum11.nextElement();\n if (item instanceof _Node2.default) {\n var nd = item;\n if (nd._iscurrent) {\n return nd;\n }\n }\n }\n\n return null;\n }\n\n /**\r\n * 获取流程的第一个结点\r\n *\r\n * @param\r\n */\n\n }, {\n key: \"getFirstNode\",\n value: function getFirstNode() {\n var ems = getAllElements();\n var enum11 = ems.elements();\n while (enum11.hasMoreElements()) {\n var item = enum11.nextElement();\n if (item instanceof _Node2.default) {\n var nd = item;\n if (nd instanceof _StartNode2.default) {\n return nd;\n }\n }\n }\n return null;\n }\n\n /**\r\n * 获取所有开始节点\r\n *\r\n * @return\r\n */\n\n }, {\n key: \"getStartNodeList\",\n value: function getStartNodeList() {\n var ems = getAllElements();\n var enum11 = ems.elements();\n var colls = [];\n while (enum11.hasMoreElements()) {\n var item = num11.nextElement();\n if (item instanceof _Node2.default) {\n var nd = item;\n if (nd instanceof _StartNode2.default) {\n colls.add(nd);\n }\n }\n }\n return colls;\n }\n\n /**\r\n * 获取当前结点的所有下一个Relation即步骤\r\n *\r\n * @param\r\n */\n\n }, {\n key: \"getNodeNextRelation\",\n value: function getNodeNextRelation(nd) {\n if (nd == null) {\n return null;\n }\n var rv = [];\n var enum11 = this._elems.elements();\n while (enum11.hasMoreElements()) {\n var item = enum11.nextElement();\n // 添加子元素\n if (item instanceof _Node2.default) {\n var node = item;\n var subElements = node.getSubelems();\n for (var iterator = subElements.iterator(); iterator.hasNext();) {\n var subElment = iterator.next();\n if (subElment instanceof _Relation2.default) {\n var r = subElment;\n if (r.startnodeid != null && r.startnodeid.equals(nd.id)) {\n rv.push(r);\n }\n }\n }\n }\n\n if (item instanceof _Relation2.default) {\n var _r = item;\n if (_r.startnodeid != null && _r.startnodeid.equals(nd.id)) {\n rv.push(item);\n }\n }\n }\n\n return rv;\n }\n\n /**\r\n * 获取当前结点的所有上一个Relation即步骤\r\n *\r\n * @param\r\n */\n\n }, {\n key: \"getNodeBeforeRelation\",\n value: function getNodeBeforeRelation(nd, ispassed) {\n if (nd == null) {\n return null;\n }\n var rv = [];\n for (var i = 0; i < this._elems.length; i++) {\n var em = this._elems[i];\n if (em instanceof _Relation2.default) {\n var relation = em;\n if (relation.id != null && relation.endnodeid == nd.id) {\n if (ispassed) {\n if (relation.ispassed) {\n rv.push(relation);\n }\n } else {\n rv.push(relation);\n }\n }\n }\n }\n return rv;\n }\n\n /**\r\n * 根据当前relation获取下一结点\r\n *\r\n * @param\r\n * @throws Exception\r\n */\n\n }, {\n key: \"getNextNode\",\n value: function getNextNode(r, doc, params, user) {\n var end = null;\n var runner = JavaScriptFactory.getInstance(_sessionid, _applicationid);\n try {\n if (doc != null) {\n runner.initBSFManager(doc, params, user, []);\n }\n } catch (e1) {\n e1.printStackTrace();\n }\n var flag = new Boolean(true);\n\n var condition = r.condition;\n var filtercondition = r.filtercondition; // marky\n condition = StringUtil.dencodeHTML(condition);\n filtercondition = StringUtil.dencodeHTML(filtercondition); // marky\n try {\n var labelId = getId() + \"-\" + r.id + \"-\" + r.startnodeid + \"-\" + r.endnodeid;\n if (r.editMode != null && r.editMode.equals(_Relation2.default.EDITMODE_VIEW)) {\n // '00':view\n if (!filtercondition.equals(\"\") && filtercondition != null) {\n // marky\n filtercondition.replaceAll(\"\\n\", \" \");\n\n var label = new StringBuffer();\n\n label.append(\"RELATION(\").append(labelId).append(r.name + \")\").append(\".filtercondition\");\n\n var obj = runner.run(label.toString(), filtercondition);\n if (obj instanceof Boolean) {\n flag = obj;\n }\n }\n } else {\n if (!condition.equals(\"\") && condition != null) {\n condition.replaceAll(\"\\n\", \" \");\n\n var _label = new StringBuffer();\n _label.append(\"RELATION(\").append(labelId).append(r.name + \")\").append(\".condition\");\n\n var _obj = runner.run(_label.toString(), condition);\n if (_obj instanceof Boolean) {\n flag = _obj;\n }\n }\n }\n } catch (e) {\n e.printStackTrace();\n }\n\n if (flag.booleanValue()) {\n end = r.getEndnode();\n }\n\n return end;\n }\n\n /**\r\n * 获取当前任一relation中上一结点\r\n *\r\n * @param\r\n */\n\n }, {\n key: \"getStartNode\",\n value: function getStartNode(r) {\n var end = r.getStartnode();\n return end;\n }\n\n /**\r\n * 将结点设为当前结点\r\n *\r\n * @param\r\n */\n\n }, {\n key: \"setCurrentNode\",\n value: function setCurrentNode(current) {\n if (current == null) {\n return;\n }\n // Vector ems = getAllElements();\n // Enumeration enum1 = ems.elements();\n // while (enum1.hasMoreElements()) {\n // Element item = (Element) enum1.nextElement();\n // if (item instanceof Node) {\n // Node nd = (Node) item;\n // if (nd.iscurrent) {\n // nd.iscurrent = false;\n // }\n // if (nd.id != null && current.id !=null && nd.id.equals(current.id)) {\n // nd.iscurrent = true;\n // }\n // }\n // }\n current._iscurrent = true;\n }\n\n /**\r\n * @return java.util.Vector\r\n * @roseuid 3E0A6E1B00E7\r\n */\n\n }, {\n key: \"getAllElements\",\n value: function getAllElements() {\n var vct = [];\n var elems = this._elems;\n for (var i = 0; i < elems.length; i++) {\n vct.push(elems[i]);\n\n if (elems[i]._subelems != null) {\n var _subelems = elems[i]._subelems;\n for (var j = 0; j < _subelems.length; j++) {\n vct.push(_subelems[j]);\n }\n }\n }\n return vct;\n }\n }, {\n key: \"getAllNodes\",\n value: function getAllNodes() {\n var rtn = [];\n var elements = getAllElements();\n for (var iterator = elements.iterator(); iterator.hasNext();) {\n var element = iterator.next();\n if (element instanceof _Node2.default) {\n rtn.add(element);\n }\n }\n return rtn;\n }\n\n /**\r\n * 根据开始节点和结束接点获取关系\r\n *\r\n * @return\r\n */\n\n }, {\n key: \"getRelation\",\n value: function getRelation(startnodeid, endnodeid) {\n var colls = this.getAllElements();\n for (var iter = colls.iterator(); iter.hasNext();) {\n var element = iter.next();\n if (element instanceof _Relation2.default) {\n var relation = element;\n if (startnodeid.equals(relation.startnodeid) && endnodeid.equals(relation.endnodeid)) {\n return relation;\n }\n }\n }\n return null;\n }\n }, {\n key: \"validate\",\n value: function validate(runner, startnodeid, endnodeid) {\n var relation = this.getRelation(startnodeid, endnodeid);\n if (relation != null) {\n var relationId = getId() + startnodeid + endnodeid;\n var script = StringUtil.dencodeHTML(relation.validateScript);\n if (script != null && !script.equals(\"\")) {\n var label = new StringBuffer();\n label.append(\"RELATION(\").append(relationId).append(relation.name + \")\").append(\".Validate\");\n var rtn = runner.run(label.toString(), script);\n return rtn;\n }\n }\n return null;\n }\n }, {\n key: \"runAction\",\n value: function runAction(runner, startnodeid, endnodeid) {\n var relation = this.getRelation(startnodeid, endnodeid);\n if (relation != null) {\n var action = relation.action;\n if (action != null && action.trim().length > 0) {\n action = StringUtil.dencodeHTML(action);\n\n var label = new StringBuffer();\n // relationId = flowid + startnodeid + endnodeid 标识流程线段唯一\n var relationId = getId() + \"-\" + startnodeid + \"-\" + endnodeid;\n label.append(\"RELATION(\").append(relationId).append(\").\");\n label.append(relation.name).append(\".Action\");\n var rtn = runner.run(label.toString(), action);\n if (rtn instanceof String && !StringUtil.isBlank(rtn)) {\n throw new OBPMValidateException(rtn, new RunActionException(rtn));\n }\n }\n }\n }\n //xh 待分析\n\n }, {\n key: \"informationCheck\",\n value: function informationCheck() {\n var errorStr = \"\";\n var elems = this._elems;\n for (var i = 0; i < elems.length; i++) {\n errorStr += elems[i].errorCheck();\n }\n return errorStr;\n }\n\n /**\r\n * @param id\r\n * @return cn.myapps.runtime.workflow.Element\r\n * @roseuid 3E0A6E1B00F1\r\n */\n\n }, {\n key: \"getElementByID\",\n value: function getElementByID(id) {\n if (id == null || id.trim().length == 0) {\n return null;\n }\n\n var elems = this._elems;\n for (var i = 0; i < elems.length; i++) {\n var em = elems[i];\n if (em && em.id != null && em.id == id) {\n return em;\n }\n\n if (em && em.getSubelems() != null) {\n for (var j = 0; j < em.getSubelems().length; j++) {\n var subem = em.getSubelems()[j];\n if (subem.id != null && subem.id == id) {\n return subem;\n }\n }\n }\n }\n return null;\n }\n }, {\n key: \"getNodeByID\",\n value: function getNodeByID(id) {\n var element = getElementByID(id);\n if (element instanceof _Node2.default) {\n return element;\n }\n return null;\n }\n\n /**\r\n * 根据当前节点获取上一步所有节点 happy\r\n *\r\n * @param node\r\n * @return\r\n */\n\n }, {\n key: \"getBackSetpNode\",\n value: function getBackSetpNode(node) {\n var nodes = [];\n var allrelation = getNodeBackStepRelation(node);\n for (var iter = allrelation.iterator(); iter.hasNext();) {\n var re = iter.next();\n if (re.endnodeid.equals(node.id)) {\n var n = getStartNode(re);\n if (!(n instanceof _AutoNode2.default) && !(n instanceof _StartNode2.default)) {\n nodes.add(n);\n }\n }\n }\n return nodes;\n }\n\n /**\r\n * 根据当前节点获取上一步所有节点(包含所有类型的节点)happy\r\n *\r\n * @param node\r\n * @return\r\n */\n\n }, {\n key: \"getBackSetpElement\",\n value: function getBackSetpElement(node) {\n var nodes = [];\n var allrelation = getNodeBackStepRelation(node);\n for (var iter = allrelation.iterator(); iter.hasNext();) {\n var re = iter.next();\n if (re.endnodeid.equals(node.id)) {\n var n = getStartNode(re);\n nodes.add(n);\n }\n }\n return nodes;\n }\n\n /**\r\n * 根据当前节点获取所有上一步Relation happy\r\n *\r\n * @param nd\r\n * @return\r\n */\n\n }, {\n key: \"getNodeBackStepRelation\",\n value: function getNodeBackStepRelation(nd) {\n if (nd == null) {\n return null;\n }\n var rv = [];\n for (var iter = _elems.iterator(); iter.hasNext();) {\n var subem = iter.next();\n if (subem instanceof _Relation2.default) {\n var relation = subem;\n if (relation.id != null && relation.endnodeid.equals(nd.id)) {\n rv.add(relation);\n }\n }\n }\n return rv;\n }\n\n /**\r\n * 获取流程流转Relation\r\n *\r\n * @param\r\n */\n\n }, {\n key: \"getElementByBeginEndNodeID\",\n value: function getElementByBeginEndNodeID(startid, endid) {\n if (startid == null || startid.trim().length == 0 || endid == null || endid.trim().length == 0) {\n return null;\n }\n\n for (var e = _elems.elements(); e.hasMoreElements();) {\n var em = e.nextElement();\n if (em.getSubelems() != null) {\n for (var sube = em.getSubelems().elements(); sube.hasMoreElements();) {\n var subem = sube.nextElement();\n if (subem instanceof _Relation2.default) {\n var relation = subem;\n if (relation.id != null && relation.startnodeid.equals(startid) && relation.endnodeid.equals(endid)) {\n return subem;\n }\n }\n }\n }\n }\n return null;\n }\n\n /**\r\n * @throws java.lang.Exception\r\n * @roseuid 3E0A6E1B010F\r\n */\n\n }, {\n key: \"jbInit\",\n value: function jbInit(e) {\n var _this = this;\n\n this.canvas.onmousemove = function (e) {\n _this.mouseMove(e);\n };\n\n this.canvas.onclick = function (e) {\n _this.mouseClick(e);\n };\n this.canvas.onmousedown = function (e) {\n _this.mouseDown(e);\n };\n this.canvas.onmouseup = function (e) {\n _this.mouseUp(e);\n };\n document.onkeydown = function (e) {\n _this.handleKeyDown(e);\n };\n document.onkeyup = function (e) {\n _this.handleKeyUp(e);\n };\n this.canvas.onmouseover = function (e) {\n //this_mouseEntered(e);\n };\n this.canvas.ondrop = function (e) {\n _this.mouseDown(e);\n };\n }\n\n /**\r\n * @param e\r\n * @roseuid 3E0A6E1B0123\r\n */\n\n }, {\n key: \"mouseClick\",\n value: function mouseClick(e) {\n var x = e.clientX;\n var y = e.clientY;\n x = x / this.scaleNum;\n y = y / this.scaleNum;\n var em = this.chkSelectedElement(x, y);\n if (em != null) {\n console.log(\"选中em \", em);\n }\n\n // yx判断不是中文才重新执行\n if (getCookie(\"designerLanguage\") != \"zh\") {\n // 重新渲染多语言\n jQuery(document).ready(function () {\n var lang = getCookie(\"designerLanguage\");\n // clearTimeout(timer)\n jQuery.i18n.properties({\n //加载资浏览器语言对应的资源文件\n name: \"strings\", //资源文件名称\n path: \"i18n/\", //资源文件路径\n language: lang,\n cache: false,\n mode: \"map\", //用Map的方式使用资源文件中的值\n callback: function callback() {\n //加载成功后设置显示内容\n for (var i in $.i18n.map) {\n $('[data-lang=\"' + i + '\"]').text($.i18n.map[i]);\n }\n // document.title = $.i18n.map['title'];\n }\n });\n });\n }\n }\n\n /**\r\n * @param e\r\n * @roseuid 3E0A6E1B0137\r\n */\n\n }, {\n key: \"mouseDown\",\n value: function mouseDown(e) {\n var _getLocationWithCanva = this.getLocationWithCanvas(this.canvas, e.clientX, e.clientY),\n x = _getLocationWithCanva.x,\n y = _getLocationWithCanva.y;\n\n x = x / this.scaleNum;\n y = y / this.scaleNum;\n switch (this._statues) {\n case FlowDiagram.ACTION_ADD_AUTONODE:\n this.addAutoNode(\"\", \"\", 0, x, y);\n break;\n case FlowDiagram.ACTION_ADD_COMPLETENODE:\n this.addCompleteNode(\"\", \"\", 0, x, y);\n break;\n case FlowDiagram.ACTION_ADD_MANUALNODE:\n this.addManualNode(\"\", \"\", 0, x, y);\n break;\n case FlowDiagram.ACTION_ADD_RELATION:\n this.addRelation(\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\");\n break;\n case FlowDiagram.ACTION_ADD_STARTNODE:\n this.addStartNode(\"\", \"\", x, y);\n break;\n case FlowDiagram.ACTION_ADD_GATEWAYNODE:\n this.addGatewayNode(\"\", \"\", x, y);\n break;\n case FlowDiagram.ACTION_ADD_SUSPENDNODE:\n this.addSuspendNode(\"\", \"\", x, y);\n break;\n case FlowDiagram.ACTION_ADD_SUBFLOW:\n this.addSubFlow(\"\", \"\", 0, x, y);\n break;\n default:\n break;\n }\n\n var isChangeCursor = false;\n\n var em = this.chkSelectedElement(x, y);\n if (em != null) {\n if (em instanceof _Node2.default) {\n // 设置抓取点\n em._handlePoint.x = x - em.x;\n em._handlePoint.y = y - em.y;\n }\n\n this._changed = true;\n if (this._statues == FlowDiagram.ACTION_REMOVE) {\n // deleteMSG = null;\n if (em instanceof _Relation2.default) {\n var r = em;\n if (r.ispassed) {\n this.deleteMSG = \"相关流程已处理,不能删除!\";\n }\n }\n if (em instanceof _Node2.default) {\n var nd = em;\n if (em.id != null && nd._iscurrent) {\n this.deleteMSG = \"当前节点在处理中,不能删除!\";\n } else {\n var ems = this.getAllElements();\n for (var i = 0; i < ems.length && this.deleteMSG == \"null\"; i++) {\n var elem = ems[i];\n if (elem instanceof _Relation2.default) {\n var rl = elem;\n if ((rl.startnodeid != null && rl.startnodeid == em.id || rl.endnodeid != null && rl.endnodeid == em.id) && rl.ispassed) {\n this.deleteMSG = \"相关流程已处理,不能删除!\";\n }\n }\n }\n }\n }\n if (this.deleteMSG == \"null\" || this.deleteMSG == null || this.deleteMSG == \"\") {\n this.removeElement(em);\n } else {\n alert(this.deleteMSG);\n }\n } else if (this._statues == FlowDiagram.ACTION_BREAK_LINE) {\n // add by gusd\n\n if (em instanceof _Relation2.default) {\n this._selected = em;\n var relation = this._selected;\n relation.setBreakpoint(new _Point2.default(x, y));\n isChangeCursor = true;\n }\n } // add by gusd\n else {\n if (this._selected instanceof _Relation2.default && em instanceof _Node2.default) {\n var _r2 = this._selected;\n if (_r2.getStartnode() == null && em != null) {\n _r2.setStartnode(em);\n var node = em;\n var point = new _Point2.default(node.x, node.y);\n _r2.addVector(point);\n }\n } else if (em instanceof _Relation2.default) {\n this.changeStatues(FlowDiagram.ACTION_BREAK_LINE);\n this._selected = em;\n var _relation = this._selected;\n // yx 如果按下时在原有点就改变changevector这个值\n var press = _relation.checkPressBreakPoint(_relation.vector, x, y);\n // 有按下点的位置\n if (press) {\n _relation.setChangevector(1);\n } else {\n _relation.setChangevector(-1);\n _relation.setBreakpoint(new _Point2.default(x, y));\n }\n\n _relation.setCurrentselect(true);\n isChangeCursor = true;\n } else {\n this._selected = em;\n this._selected.moveTo(x, y);\n }\n }\n this.repaint();\n } else {\n // em == null\n if (this._statues == FlowDiagram.ACTION_ADD_RELATION && this._selected instanceof _Relation2.default) {\n var _r3 = this._selected;\n if (_r3.getStartnode() == null) {\n this.removeElement(_r3);\n _r3 = null;\n this._selected = null;\n }\n } else {\n if (this._selected instanceof _Node2.default) {\n // ((Node)_selected).\n }\n this._selected = null;\n this._currToEdit = null;\n }\n this.repaint();\n }\n if (!isChangeCursor) {\n // isChangeCursor为true时,用户准备拖拉流程线,不释放鼠标指针的拖拉样式\n this.changeStatues(FlowDiagram.ACTION_NORMAL);\n isChangeCursor = false;\n }\n }\n\n /**\r\n * @param e\r\n * @roseuid 3E0A6E1B0155\r\n */\n\n }, {\n key: \"mouseUp\",\n value: function mouseUp(e) {\n // yx 清空辅助线\n _AuxiliaryLine2.default.getInstance().setProps({ points: null });\n\n var _getLocationWithCanva2 = this.getLocationWithCanvas(this.canvas, e.clientX, e.clientY),\n x = _getLocationWithCanva2.x,\n y = _getLocationWithCanva2.y;\n\n x = x / this.scaleNum;\n y = y / this.scaleNum;\n var em = this.chkSelectedElement(x, y);\n if (this._selected != null && this._selected instanceof _Relation2.default && (em == null || em instanceof _Node2.default)) {\n var r = this._selected;\n r.setCurrentselect(false);\n if (r.getEndnode() == null) {\n if (em != null) {\n var have = false;\n var that = this;\n var haveNum = 0;\n this._elems.forEach(function (val, ind) {\n if (val instanceof _Relation2.default) {\n if (val.startnodeid == r.startnodeid && val.endnodeid == em.id) {\n haveNum = ind;\n have = true;\n }\n }\n });\n if (have) {\n this._elems = this._removeElementFromArray(this._elems, r);\n alert(\"同方向关联线有且仅有一条\");\n } else {\n this._changed = true;\n r.setEndnode(em);\n var node = em;\n\n var point = new _Point2.default(node.x, node.y);\n r.addVector(point);\n }\n }\n if (em == null) {\n //|| (false && r.getStartnode().id.equals(r.getEndnode().id))) {\n this._elems = this._removeElementFromArray(this._elems, r);\n }\n } else {\n var nx = x;\n var ny = y;\n console.log('mouseup');\n var pos = r.getChangevector();\n r.setCurrentselect(false);\n if (pos == -1) {\n // 原先按下的点不是原有折点\n var bool = r.checkDistance(new _Point2.default(nx, ny));\n if (!bool) {\n console.log('检查鼠标释放的点拖拉的距离是否小于一个常量,如果是,则当作没有拖拉');\n r.addVector(new _Point2.default(nx, ny)); // 如果鼠标释放的点拖拉的距离大于一个常量,则当作一个新的折点\n }\n } else {\n if (r.delVector) {\n console.log('mouseupadd', x, y);\n // 记录原来的折点位置用于添加的时候才做修改\n r.addChangeVector(new _Point2.default(nx, ny), r.delIndex);\n } else {\n // 原先按下的点为原有折点,鼠标释放后要改变原有折点的坐标\n console.log('原先按下的点为原有折点,鼠标释放后要改变原有折点的坐标');\n r.changeVector(r.vector, new _Point2.default(nx, ny));\n r.setChangevector(-1);\n }\n }\n }\n }\n // 设置当前选中\n if (this._selected != null && em != null && Object.is(this._selected, em)) {\n this._currToEdit = em;\n\n if (em instanceof _Node2.default) {\n var nd = em;\n\n var p = new _Point2.default(nd.x + nd._imgrect.width / 2, nd.y + nd._imgrect.height / 2);\n\n // 忽略掉10个像素差异\n var _nx = p.x;\n var _ny = p.y;\n\n //nx = Math.round((nx + 10) / 20) * 20;\n //ny = Math.round((ny + 10) / 20) * 20;\n\n em.x = _nx - nd._imgrect.width / 2;\n em.y = _ny - nd._imgrect.height / 2;\n }\n\n // yx\n if (this.ctrlDown) {\n /*如果按下了ctrl*/\n var flag = this.isInZoom(this._selected);\n if (!flag) {\n // 如果不在数组中那么就添加到选中的数据\n // 判断当前的元素是否为线,如果为线就不添加到数组中\n if (!(this._selected instanceof _Relation2.default)) {\n this.selectArr.push(this._selected);\n }\n } else {\n // 如果在原来的数据那么就从原来的数组中移除\n this.selectArr = this._removeElementFromArray(this.selectArr, this._selected);\n }\n console.log('如果点中元素不在selected里,就添加,否则从selected里删除,并清空当前元素');\n } else {\n /*如果没有按下ctrl,直接清空selected,保留当前元素*/\n this.selectArr = [];\n console.log('没有按下ctrl,直接清空selected');\n }\n }\n\n // yx 如果没有选中ctrl数组那么就置为空\n if (this._selected == null) {\n this.selectArr = [];\n this.ctrlEle = null;\n }\n this.ctrlEle = this._selected;\n\n this.changeStatues(FlowDiagram.ACTION_NORMAL);\n this._selected = null;\n\n this.repaint();\n }\n\n /**\r\n * @param e\r\n * @roseuid 3E0A6E1B0169\r\n */\n\n }, {\n key: \"mouseMove\",\n value: function mouseMove(e) {\n //console.log(\"mouseMove\");\n var _getLocationWithCanva3 = this.getLocationWithCanvas(this.canvas, e.clientX, e.clientY),\n x = _getLocationWithCanva3.x,\n y = _getLocationWithCanva3.y;\n\n x = x / this.scaleNum;\n y = y / this.scaleNum;\n if (e.buttons <= 0) {\n if (this._statues == FlowDiagram.ACTION_BREAK_LINE) {} else {\n var tg = this.g;\n tg.setColor(_Resources2.default.COLOR.black);\n var em = this.chkSelectedElement(x, y);\n if (em != null && !(em instanceof _Relation2.default)) {\n this.changeStatues(this._statues);\n // if(this._statues == ACTION_REMOVE){\n\n // }\n var nd = em;\n if (em.isSelected(x, y)) {\n var snote = \"\";\n if (nd.note == null || nd.note == \"null\") {\n snote = \"\";\n } else if (nd.note.length <= 9) {\n snote = nd.note;\n } else {\n snote = nd.note.substring(0, 9) + \"...\";\n }\n\n nd.showTips(tg); // 显示注释\n }\n } else {\n this.repaint();\n }\n }\n } else {\n this.mouseDrag(e);\n }\n }\n\n /**\r\n * @param e\r\n * @roseuid 3E0A6E1B0187\r\n */\n\n }, {\n key: \"mouseDrag\",\n value: function mouseDrag(e) {\n var _getLocationWithCanva4 = this.getLocationWithCanvas(this.canvas, e.clientX, e.clientY),\n x = _getLocationWithCanva4.x,\n y = _getLocationWithCanva4.y;\n\n x = x / this.scaleNum;\n y = y / this.scaleNum;\n if (this._selected != null && this._statues != FlowDiagram.ACTION_BREAK_LINE && this._selected instanceof _Relation2.default) {\n // 从一个结点到另一个结点画流程的拖拉过程中\n if (this._selected.getEndnode() == null) {\n this._selected.moveTo(x, y);\n this.repaint();\n }\n } else if (this._selected != null && this._statues != FlowDiagram.ACTION_BREAK_LINE) {\n // 接近其他元素的時候自動靠過去\n this.closeEleChange(this._selected);\n\n // yx 画辅助线\n var auxiliaryLinePoints = _AuxiliaryLine2.default.getInstance().getProp('points');\n var movedX = Math.abs(this._selected.getProp('x') - x);\n var movedY = Math.abs(this._selected.getProp('y') - y);\n if (auxiliaryLinePoints && auxiliaryLinePoints.abscissa && !auxiliaryLinePoints.ordinate && movedX < 3) {\n // this._selected.setProps({y: y});\n } else if (auxiliaryLinePoints && !auxiliaryLinePoints.abscissa && auxiliaryLinePoints.ordinate && movedY < 3) {\n // this._selected.setProps({x: x});\n } else if (auxiliaryLinePoints && auxiliaryLinePoints.abscissa && auxiliaryLinePoints.ordinate && movedY < 3 && movedX < 3) {\n return false;\n } else {\n // this._selected.setProps({x: x, y: y});\n }\n\n var points = this.getDrawAuxiliaryLinePoint(this._selected);\n\n if (points) {\n _AuxiliaryLine2.default.getInstance().setProps({ points: points });\n } else {\n _AuxiliaryLine2.default.getInstance().setProps({ points: null });\n }\n\n this._selected.moveTo(x, y);\n this.repaint();\n } else if (this._selected != null && this._selected instanceof _Relation2.default && this._statues == FlowDiagram.ACTION_BREAK_LINE) {\n // 拖拉流程线产生折点的过程\n console.log('drag', this._selected.delVector);\n var pos = this._selected.getChangevector(); // 检查拖拉点是否原有折点\n console.log('pos', pos);\n this._selected.setCurrentselect(true);\n if (pos == -1) {\n // 拖拉点不是原有折点,把鼠标移动点作为临时的_movepoint\n this._selected.setMovepoint({ x: x, y: y });\n } else {\n // 拖拉点是原有折点,鼠标移动点当作原有折点的新位置\n console.log('drag添加的');\n this._selected.changeVector(this._selected.vector, { x: x, y: y });\n }\n if (this.delActor) {\n this._selected.setMovepoint({ x: x, y: y });\n }\n this.repaint();\n } // end\n }\n\n /**\r\n * yx 键盘按下\r\n */\n\n }, {\n key: \"handleKeyDown\",\n value: function handleKeyDown(e) {\n switch (e.keyCode) {\n case 17:\n this.ctrlDown = true;\n // 如果是第一个就加上,如果不是第一个就只执行下面的函数\n if (this.selectArr.length == 0 && this._currToEdit && !(this._currToEdit instanceof _Relation2.default)) {\n this.selectArr.push(this._currToEdit);\n }\n break;\n default:\n break;\n }\n }\n\n /**\r\n * yx 键盘抬起\r\n */\n\n }, {\n key: \"handleKeyUp\",\n value: function handleKeyUp(e) {\n switch (e.keyCode) {\n case 17:\n this.ctrlDown = false;\n break;\n default:\n break;\n }\n }\n }, {\n key: \"isAssignBack\",\n value: function isAssignBack(node) {\n // 删除节点时判断此节点是否为指定回退节点\n var isAssignBack = false;\n for (var e = this.getAllElements().elements(); e.hasMoreElements();) {\n var em = e.nextElement();\n if (em != null && em instanceof _ManualNode2.default) {\n var nd = em;\n if (nd.exceedaction != null && nd.exceedaction.trim() == _FlowType2.default.DOBACKTONODE && nd.backnodeid.equals(node.id)) {\n return true;\n }\n }\n }\n return isAssignBack;\n }\n\n /**\r\n * 获取当前节点关联的所有下一个节点\r\n *\r\n * @param currnodeid\r\n * 当前节点\r\n * @return 当前节点关联的所有下一个节点\r\n */\n\n }, {\n key: \"getNextNodeList\",\n value: function getNextNodeList(currnodeid, doc, params, user) {\n var em = this.getElementByID(currnodeid);\n if (em instanceof _Node2.default) {\n var node = em;\n var relations = this.getNodeNextRelation(node);\n var colls = [];\n if (relations != null) {\n var it = relations.iterator();\n\n while (it.hasNext()) {\n var nextNode = this.getNextNode(it.next(), doc, params, user);\n if (nextNode != null) {\n colls.add(nextNode);\n }\n }\n }\n return colls;\n }\n return Collections.EMPTY_LIST;\n }\n\n /**\r\n * 获取结点列表\r\n */\n\n }, {\n key: \"getNodeListByIds\",\n value: function getNodeListByIds(ids) {\n var rtn = [];\n if (ids != null) {\n for (var i = 0; i < ids.length; i++) {\n var em = this.getElementByID(ids[i]);\n if (em instanceof _Node2.default) {\n rtn.add(em);\n }\n }\n }\n return rtn;\n }\n\n /**\r\n * 获取子流程ID列表\r\n *\r\n * @return Collection\r\n */\n\n }, {\n key: \"getSubFlowNodeList\",\n value: function getSubFlowNodeList() {\n var rtn = [];\n var elements = getAllElements();\n\n try {\n for (var iterator = elements.iterator(); iterator.hasNext();) {\n var elemnt = iterator.next();\n if (elemnt instanceof _SubFlow2.default) {\n rtn.add(elemnt);\n }\n }\n } catch (e) {\n e.printStackTrace();\n }\n\n return rtn;\n }\n }]);\n\n return FlowDiagram;\n}();\n\nFlowDiagram.ACTION_NORMAL = 0x00000000;\nFlowDiagram.ACTION_REMOVE = 0x00000001;\nFlowDiagram.ACTION_ADD_ABORTNODE = 0x00000010;\nFlowDiagram.ACTION_ADD_AUTONODE = 0x00000011;\nFlowDiagram.ACTION_ADD_COMPLETENODE = 0x00000012;\nFlowDiagram.ACTION_ADD_MANUALNODE = 0x00000013;\nFlowDiagram.ACTION_ADD_STARTNODE = 0x00000014;\nFlowDiagram.ACTION_ADD_SUSPENDNODE = 0x00000015;\nFlowDiagram.ACTION_ADD_TERMINATENODE = 0x00000016;\nFlowDiagram.ACTION_ADD_SUBFLOW = 0x00000017;\nFlowDiagram.ACTION_ADD_GATEWAYNODE = 0x00000018;\nFlowDiagram.ACTION_ADD_RELATION = 0x00001000;\nFlowDiagram.ACTION_EDIT_NODE = 0x10000010;\nFlowDiagram.ACTION_EDIT_RELATION = 0x10001000;\nFlowDiagram.ACTION_BREAK_LINE = 0x00100000;\n\nexports.default = FlowDiagram;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy9zcmMvZWxlbWVudC9GbG93RGlhZ3JhbS5qcz9jMGVmIl0sInNvdXJjZ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b2YgQXV0b05vZGUpIHtcclxuICAgICAgICAgIGxldCBhdXRvTm9kZSA9IGVsZW1lbnQ7XHJcbiAgICAgICAgICBpZiAoYXV0b05vZGUuaXNzcGxpdCkge1xyXG4gICAgICAgICAgICAvLyBpZiAoaWQgIT0gYXV0b05vZGUuaWQpIHtcclxuICAgICAgICAgICAgdmFyIG9iajEgPSB7XHJcbiAgICAgICAgICAgICAgbmFtZTogZWxlbWVudC5uYW1lLFxyXG4gICAgICAgICAgICAgIGlkOiBlbGVtZW50LmlkXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIGFycmF5Q29sbGVhY3Rpb24ucHVzaChvYmoxKTtcclxuICAgICAgICAgICAgLy8gfVxyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH0gZWxzZSBpZiAoZWxlbWVudCBpbnN0YW5jZW9mIFN1YkZsb3cpIHtcclxuICAgICAgICAgIHZhciBzdWJGbG93ID0gZWxlbWVudDtcclxuICAgICAgICAgIGlmIChzdWJGbG93Lmlzc3BsaXQpIHtcclxuICAgICAgICAgICAgLy8gaWYgKGlkICE9IHN1YkZsb3cuaWQpIHtcclxuICAgICAgICAgICAgdmFyIG9iajIgPSB7XHJcbiAgICAgICAgICAgICAgbmFtZTogZWxlbWVudC5uYW1lLFxyXG4gICAgICAgICAgICAgIGlkOiBlbGVtZW50LmlkXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIGFycmF5Q29sbGVhY3Rpb24ucHVzaChvYmoyKTtcclxuICAgICAgICAgICAgLy8gfVxyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgfSBlbHNlIHtcclxuICAgICAgICByZWxhdGlvbi5wdXNoKGVsZW1lbnQpXHJcbiAgICAgIH1cclxuXHJcbiAgICB9XHJcblxyXG4gICAgaWYoIShjdXJyZW50Tm9kZSBpbnN0YW5jZW9mIFJlbGF0aW9uKSl7XHJcbiAgICAgIG5vZGVSZWxhdGlvbiA9IGN1cnJlbnROb2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pKyspIHtcclxuICAgICAgbGV0IGl0ZW0gPSBhbGxyZWxhdGlvbltpXTtcclxuICAgICAgaWYgKGl0ZW0gaW5zdGFuY2VvZiBSZWxhdGlvbikge1xyXG4gICAgICAgIGxldCByID0gaXRlbTtcclxuICAgICAgICBsZXQgYmVmb3JlTm9kZSA9IHRoaXMuZ2V0U3RhcnROb2RlKHIpO1xyXG5cclxuICAgICAgICBpZiAoIXRoaXMuaXNDb250YWluKGFsbG5vZGUsIGJlZm9yZU5vZGUpKSB7XHJcbiAgICAgICAgICBpZiAoYmVmb3JlTm9kZSBpbnN0YW5jZW9mIE1hbnVhbE5vZGUpIHtcclxuICAgICAgICAgICAgbGV0IHRtcCA9IGJlZm9yZU5vZGU7XHJcbiAgICAgICAgICAgIGlmICh0bXAubmFtZWxpc3QuaW5kZXhPZihcIipcIikgPT0gLTEpIHtcclxuICAgICAgICAgICAgICBhbGxub2RlLnB1c2goYmVmb3JlTm9kZSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgIH1cclxuICAgICAgICAgIGFsbG5vZGUgPSB0aGlzLmdldEFsbE5vZGVCZWZvcmVOb2RlKGFsbG5vZGUsIGJlZm9yZU5vZGUsIGlzcGFzc2VkKTtcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICByZXR1cm4gYWxsbm9kZTtcclxuICB9XHJcblxyXG4gIGlzQ29udGFpbihhbGwsIGJlZm9yZU5vZGUpIHtcclxuICAgIGlmIChhbGwgIT0gbnVsbCkge1xyXG4gICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGFsbC5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgIGxldCBpdGVtID0gYWxsW2ldO1xyXG4gICAgICAgIGlmIChpdGVtIGluc3RhbmNlb2YgTm9kZSkge1xyXG4gICAgICAgICAgbGV0IG4gPSBpdGVtO1xyXG4gICAgICAgICAgaWYgKG4uaWQgPT0gYmVmb3JlTm9kZS5pZCkge1xyXG4gICAgIC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AvL+e7mOWItui+heWKqee6v1xyXG5cdFx0aWYoQXV4aWxpYXJ5TGluZS5nZXRJbnN0YW5jZSgpLmdldFByb3AoJ3BvaW50cycpKSB7XHJcblx0XHRcdEF1eGlsaWFyeUxpbmUuZ2V0SW5zdGFuY2UoKS5wYWludChvZyk7XHJcblx0XHR9XHJcbiAgfVxyXG5cclxuICAvKipcclxuICAgICAqIHl46I635Y+W57uY55S76L6F5Yqp57q/55qE54K5XHJcbiAgICAgKiBAdGFyZ2V0IOW9k+WJjeeUu+W4g+S4reiiq+mAieS4reeahOWFg+e0oO+8jOS7peatpOWFg+e0oOeahOmhtueCueS9nOS4uuWfuuWHhuWvu+aJvueUu+i+heWKqee6v+eahOeCuVxyXG4gICAgICogQHJldHVybiDnu5jnlLvovoXliqnnur/nmoTngrnvvIzmib7kuI3liLDml7bkuLrnqbpcclxuICAgICAqL1xyXG5cdGdldERyYXdBdXhpbGlhcnlMaW5lUG9pbnQodGFyZ2V0KSB7XHJcblx0XHRsZXQgcG9pbnQgPSB7fTtcclxuXHRcdFxyXG5cdFx0aWYoIXRhcmdldCkge1xyXG5cdFx0XHRyZXR1cm4gZmFsc2U7XHJcblx0XHR9XHJcblx0XHRcclxuICAgICAgZm9yKGxldCBpID0gMCwgbGVuID0gdGhpcy5fZWxlbXMubGVuZ3RoOyBpIDwgbGVuOyBpKyspIHtcclxuXHRcdFx0XHRpZighKHRoaXMuX2VsZW1zW2ldIGluc3RhbmNlb2YgUmVsYXRpb24pKXtcclxuICAgICAgICAgIGNvbnN0IHJlc3VsdCA9IHRoaXMuX2VsZW1zW2ldLmdldEVsZW1lbnRDb25uZWN0aW9uUG9pbnQodGhpcy5fZWxlbXMsIHRhcmdldCk7XHJcbiAgICAgICAgICBcclxuICAgICAgICAgIGlmKHBvaW50LmFic2Npc3NhICYmIHBvaW50Lm9yZGluYXRlKSB7XHJcbiAgICAgICAgICAgIHJldHVybiBwb2ludDtcclxuICAgICAgICAgIH1cclxuXHJcbiAgICAgIC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xuICAgICAgICAgIHN0YXJ0Tm9kZUNvdW50Kys7XHJcbiAgICAgICAgICBub2RlLnB1c2goZWxlbXNbaV0pO1xyXG4gICAgICAgIH0gZWxzZSBpZiAoZWxlbXNbaV0gaW5zdGFuY2VvZiBDb21wbGV0ZU5vZGUpIHtcclxuICAgICAgICAgIGVuZE5vZGVDb3VudCsrO1xyXG4gICAgICAgICAgbm9kZS5wdXNoKGVsZW1zW2ldKTtcclxuICAgICAgICB9IGVsc2UgaWYgKGVsZW1zW2ldIGluc3RhbmNlb2YgUmVsYXRpb24pIHtcclxuICAgICAgICAgIHJlbGF0aW9uQ291bnQrKztcclxuICAgICAgICAgIHJlbGF0aW9uLnB1c2goZWxlbXNbaV0pO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICBub2RlLnB1c2goZWxlbXNbaV0pO1xyXG4gICAgICAgIH1cclxuICAgICAgfVxyXG5cclxuICAgICAgZm9yIChsZXQgaiA9IDA7IGogPCBub2RlLmxlbmd0aDsgaisrKSB7XHJcbiAgICAgICAgcmVzdWx0ID0gbm9kZVtqXS5jaGVjaygpO1xyXG4gICAgICAgIGlmICghcmVzdWx0KSB7XHJcbiAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcblxyXG4gICAgICBpZiAoc3RhcnROb2RlQ291bnQgPT0gMCB8fCBlbmROb2RlQ291bnQgPT0gMCkge1xyXG4gICAgICAgIGFsZXJ0KFwi6K+35Yib5bu65byA5aeL5ZKM5a6M5oiQ6IqC54K577yBXCIpO1xyXG4gICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgfSBlbHNlIGlmIChub2RlLmxlbmd0aCA8IDMpIHtcclxuICAgICAgICBhbGVydChcIuivt+S4uua1geeoi+iHs+WwkeWIm+W7uuS4gOS4quWPkei1t+iAheWSjOWuoeaJueS6uu+8gVwiKTtcclxuICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgIH1cclxuXHJcbiAgICAgIGlmIChyZWxhdGlvbkNvdW50ID09IDApIHtcclxuICAgICAgICBhbGVydChcIuivt+WIm+W7uuiKgueCueS5i+mXtOeahOWFs+iBlOe6v++8gVwiKTtcclxuICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgZm9yIChsZXQgbmwgPSAwOyBubCA8IG5vZGUubGVuZ3RoOyBubCsrKSB7XHJcbiAgICAgICAgICBpZiAoIW5vZGVbbmxdLmhhc1JlbGF0aW9uKHJlbGF0aW9uKSkge1xyXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcblxyXG4gICAgICByZXR1cm4gdHJ1ZTtcclxuICAgIH1cclxuXHJcbiAgICBhbGVydChcIuivt+WIm+W7uuiKgueCueWFg+e0oO+8gVwiKTtcclxuICAgIHJldHVybiBmYWxzZTtcclxuICB9XHJcblxyXG4gIC8qKlxyXG4gICAqIHl4IOWFg+e0oOWeguebtOWxheS4rVxyXG4gICAqL1xyXG4gIGFsaWduVmVydGljYWxDZW50ZXIoKXtcclxuICAgIGlmKHRoaXMuc2VsZWN0QXJyLmxlbmd0aCA8IDIpe1xyXG4gICAgICBhbGVydCgn6K+35oyJ5LiLQ3RybOW5tuiHs+WwkemAieaLqeS4pOS4quiKgueCuSjoioLngrnkuI3ljIXmi6zlhbPov57nur8pJylcclxuICAgIH1lbHNleyAvLyDojrflj5booqvpgInkuK3lhYPntKDnmoTmnIDlpKd45YC85ZKM5pyA5bCPeOWAvO+8jHnlgLzkuI3lj5jvvIx45Y+W5Lik6ICF55qE5Lit6Ze05YC8XHJcbiAgICAgIGNvbnN0IG1heFggPSAgTWF0aC5tYXguYXBwbHkoTWF0aCx0aGlzLnNlbGVjdEFyci5tYXAoaXRlbSA9PiB7IHJldHVybiBpdGVtLnggfSkpXHJcbiAgICAgIGNvbnN0IG1pblggPSAgTWF0aC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SCwgaGVpZ2h0PTApe1xyXG4gICAgZm9yKGxldCBpID0gMDsgaSA8IHRoaXMuc2VsZWN0QXJyLmxlbmd0aDsgaSsrKXtcclxuICAgICAgZm9yKGxldCBqID0gMDsgaiA8IHRoaXMuX2VsZW1zLmxlbmd0aDsgaisrKXtcclxuICAgICAgICBpZihPYmplY3QuaXModGhpcy5zZWxlY3RBcnJbaV0sIHRoaXMuX2VsZW1zW2pdKSl7XHJcbiAgICAgICAgICBpZihtYXhIICYmIG1heEggPiB0aGlzLnNlbGVjdEFycltpXS5oZWlnaHQpe1xyXG4gICAgICAgICAgICB0aGlzLl9lbGVtc1tqXS55ID0gY3kraGVpZ2h0O1xyXG4gICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgIH1lbHNle1xyXG4gICAgICAgICAgICB0aGlzLl9lbGVtc1tqXS55ID0gY3k7XHJcbiAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgfVxyXG4gICAgfVxyXG4gICAgdGhpcy5yZXBhaW50KClcclxuICB9XHJcblxyXG4gIC8qKlxyXG4gICAqIEBwYXJhbSBlXHJcbiAgICogQHJvc2V1aWQgM0UwQTZFMUIwMDk3XHJcbiAgICovXHJcbiAgcmVtb3ZlRWxlbWVudChlbW4pIHtcclxuICAgIGlmIChlbW4gIT0gbnVsbCkge1xyXG4gICAgICBpZiAoZW1uIGluc3RhbmNlb2YgTm9kZSkge1xyXG4gICAgICAgIGxldCB2ID0gdGhpcy5nZXRBbGxFbGVtZW50cygpO1xyXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgdi5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgbGV0IGVsZW0gPSB2W2ldO1xyXG4gICAgICAgICAgaWYgKGVsZW0gaW5zdGFuY2VvZiBSZWxhdGlvbikge1xyXG4gICAgICAgICAgICBsZXQgciA9IGVsZW07XHJcbiAgICAgICAgICAgIGlmICgoci5zdGFydG5vZGVpZC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iAgICB3aGlsZSAoZW51bTExLmhhc01vcmVFbGVtZW50cygpKSB7XHJcbiAgICAgIGxldCBpdGVtID0gZW51bTExLm5leHRFbGVtZW50KCk7XHJcbiAgICAgIGlmIChpdGVtIGluc3RhbmNlb2YgTm9kZSkge1xyXG4gICAgICAgIGxldCBuZCA9IGl0ZW07XHJcbiAgICAgICAgaWYgKG5kLl9pc2N1cnJlbnQpIHtcclxuICAgICAgICAgIHJldHVybiBuZDtcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICByZXR1cm4gbnVsbDtcclxuICB9XHJcblxyXG4gIC8qKlxyXG4gICAqIOiOt+WPlua1geeoi+eahOesrOS4gOS4que7k+eCuVxyXG4gICAqXHJcbiAgICogQHBhcmFtXHJcbiAgICovXHJcbiAgZ2V0Rmlyc3ROb2RlKCkge1xyXG4gICAgbGV0IGVtcyA9IGdldEFsbEVsZW1lbnRzKCk7XHJcbiAgICBsZXQgZW51bTExID0gZW1zLmVsZW1lbnRzKCk7XHJcbiAgICB3aGlsZSAoZW51bTExLmhhc01vcmVFbGVtZW50cygpKSB7XHJcbiAgICAgIGxldCBpdGVtID0gZW51bTExLm5leHRFbGVtZW50KCk7XHJcbiAgICAgIGlmIChpdGVtIGluc3RhbmNlb2YgTm9kZSkge1xyXG4gICAgICAgIGxldCBuZCA9IGl0ZW07XHJcbiAgICAgICAgaWYgKG5kIGluc3RhbmNlb2YgU3RhcnROb2RlKSB7XHJcbiAgICAgICAgICByZXR1cm4gbmQ7XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgICByZXR1cm4gbnVsbDtcclxuICB9XHJcblxyXG4gIC8qKlxyXG4gICAqIOiOt+WPluaJgOacieW8gOWni+iKgueCuVxyXG4gICAqXHJcbiAgICogQHJldHVyblxyXG4gICAqL1xyXG4gIGdldFN0YXJ0Tm9kZUxpc3QoKSB7XHJcbiAgICBsZXQgZW1zID0gZ2V0QWxsRWxlbWVudHMoKTtcclxuICAgIGxldCBlbnVtMTEgPSBlbXMuZWxlbWVudHMoKTtcclxuICAgIGxldCBjb2xscyA9IFtdO1xyXG4gICAgd2hpbGUgKGVudW0xMS5oYXNNb3JlRWxlbWVudHMoKSkge1xyXG4gICAgICBsZXQgaXRlbSA9IG51bTExLm5leHRFbGVtZW50KCk7XHJcbiAgICAgIGlmIChpdGVtIGluc3RhbmNlb2YgTm9kZSkge1xyXG4gICAgICAgIGxldCBuZCA9IGl0ZW07XHJcbiAgICAgICAgaWYgKG5kIGluc3RhbmNlb2YgU3RhcnROb2RlKSB7XHJcbiAgICAgICAgICBjb2xscy5hZGQobmQpO1xyXG4gICAgICAgIH1cclxuICAgICAgfVxyXG4gICAgfVxyXG4gICAgcmV0dXJuIGNvbGxzO1xyXG4gIH1cclxuXHJcbiAgLyoqXHJcbiAgICog6I635Y+W5b2T5YmN57uT54K555qE5omA5pyJ5LiL5LiA5LiqUmVsYXRpb27ljbPmraXpqqRcclxuICAgKlxyXG4gICAqIEBwYXJhbVxyXG4gICAqL1xyXG4gIGdldE5vZGVOZXh0UmVsYXRpb24obmQpIHtcclxuICAgIGlmIChuZCA9PSBudWxsKSB7XHJcbiAgICAgIHJldHVybiBudWxsO1xyXG4gICAgfVxyXG4gICAgbGV0IHJ2ID0gW107XHJcbiAgICBsZXQgZW51bTExID0gdGhpcy5fZWxlbXMuZWxlbWVudHMoKTtcclxuICAgIHdoaWxlIChlbnVtMTEuaGFzTW9yZUVsZW1lbnRzKCkpIHtcclxuICAgICAgbGV0IGl0ZW0gPSBlbnVtMTEubmV4dEVsZW1lbnQoKTtcclxuICAgICAgLy8g5re75Yqg5a2Q5YWD57SgXHJcbiAgICAgIGlmIChpdGVtIGluc3RhbmNlb2YgTm9kZSkge1xyXG4gICAgICAgIGxldCBub2RlID0gaXRlbTtcclxuICAgICAgICBsZXQgc3ViRWxlbWVudHMgPSBub2RlLmdldFN1YmVsZW1zKCk7XHJcbiAgICAgICAgZm9yIChsZXQgaXRlcmF0b3IgPSBzdWJFbGVtZW50cy5pdGVyYXRvcigpOyBpdGVyYXRvci5oYXNOZXh0KCk7ICkge1xyXG4gICAgICAgICAgbGV0IHN1YkVsbWVudCA9IGl0ZXJhdG9yLm5leHQoKTtcclxuICAgICAgICAgIGlmIChzdWJFbG1lbnQgaW5zdGFuY2VvZiBSZWxhdGlvbikge1xyXG4gICAgICAgICAgICBsZXQgciA9IHN1YkVsbWVudDtcclxuICAgICAgICAgICAgaWYgKHIuc3RhcnRub2RlaWQgIT0gbnVsbCAmJiByLnN0YXJ0bm9kZWlkLmVxdWFscyhuZC5pZCkpIHtcclxuICAgICAgICAgICAgICBydi5wdXNoKHIpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcblxyXG4gICAgICBpZiAoaXRlbSBpbnN0YW5jZW9mIFJlbGF0aW9uKSB7XHJcbiAgICAgICAgbGV0IHIgPSBpdGVtO1xyXG4gICAgICAgIGlmIChyLnN0YXJ0bm9kZWlkICE9IG51bGwgJiYgci5zdGFydG5vZGVpZC5lcXVhbHMobmQuaWQpKSB7XHJcbiAgICAgICAgICBydi5wdXNoKGl0ZW0pO1xyXG4gICAgICAgIH1cclxuICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHJldHVybiBydjtcclxuICB9XHJcblxyXG4gIC8qKlxyXG4gICAqIOiOt+WPluW9k+WJjee7k+eCueeahOaJgOacieS4iuS4gOS4qlJlbGF0aW9u5Y2z5q2l6aqkXHJcbiAgICpcclxuICAgKiBAcGFyYW1cclxuICAgKi9cclxuICBnZXROb2RlQmVmb3JlUmVsYXRpb24obmQsIGlzcGFzc2VkKSB7XHJcbiAgICBpZiAobmQgPT0gbnVsbCkge1xyXG4gICAgICByZXR1cm4gbnVsbDtcclxuICAgIH1cclxuICAgIGxldCBydiA9IFtdO1xyXG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPCB0aGlzLl9lbGVtcy5sZW5ndGg7IGkrKykge1xyXG4gICAgICBsZXQgZW0gPSB0aGlzLl9lbGVtc1tpXTtcclxuICAgICAgaWYgKGVtIGluc3RhbmNlb2YgUmVsYXRpb24pIHtcclxuICAgICAgICBsZXQgcmVsYXRpb24gPSBlbTtcclxuICAgICAgICBpZiAocmVsYXRpb24uaWQgIT0gbnVsbCAmJiByZWxhdGlvbi5lbmRub2RlaWQgPT0gbmQuaWQpIHtcclxuICAgICAgICAgIGlmIChpc3Bhc3NlZCkge1xyXG4gICAgICAgICAgICBpZiAocmVsYXRpb24uaXNwYXNzZWQpIHtcclxuICAgICAgICAgICAgICBydi5wdXNoKHJlbGF0aW9uKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgcnYucHVzaChyZWxhdGlvbik7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgICByZXR1cm4gcnY7XHJcbiAgfVxyXG5cclxuICAvKipcclxuICAgKiDmoLnmja7lvZPliY1yZWxhdGlvbuiOt+WPluS4i+S4gOe7k+eCuVxyXG4gICAqXHJcbiAgICogQHBhcmFtXHJcbiAgICogQHRocm93cyBFeGNlcHRpb25cclxuICAgKi9cclxuICBnZXROZXh0Tm9kZShyLCBkb2MsIHBhcmFtcywgdXNlcikge1xyXG4gICAgbGV0IGVuZCA9IG51bGw7XHJcbiAgICBsZXQgcnVubmVyID0gSmF2YVNjcmlwdEZhY3RvcnkuZ2V0SW5zdGFuY2UoX3Nlc3Npb25pZCwgX2FwcGxpY2F0aW9uaWQpO1xyXG4gICAgdHJ5IHtcclxuICAgICAgaWYgKGRvYyAhPSBudWxsKSB7XHJcbiAgICAgICAgcnVubmVyLmluaXRCU0ZNYW5hZ2VyKGRvYywgcGFyYW1zLCB1c2VyLCBbXSk7XHJcbiAgICAgIH1cclxuICAgIH0gY2F0Y2ggKGUxKSB7XHJcbiAgICAgIGUxLnByaW50U3R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xuICAgICAgICAgICAgLmFwcGVuZChcIi5maWx0ZXJjb25kaXRpb25cIik7XHJcblxyXG4gICAgICAgICAgbGV0IG9iaiA9IHJ1bm5lci5ydW4obGFiZWwudG9TdHJpbmcoKSwgZmlsdGVyY29uZGl0aW9uKTtcclxuICAgICAgICAgIGlmIChvYmogaW5zdGFuY2VvZiBCb29sZWFuKSB7XHJcbiAgICAgICAgICAgIGZsYWcgPSBvYmo7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICB9IGVsc2Uge1xyXG4gICAgICAgIGlmICghY29uZGl0aW9uLmVxdWFscyhcIlwiKSAmJiBjb25kaXRpb24gIT0gbnVsbCkge1xyXG4gICAgICAgICAgY29uZGl0aW9uLnJlcGxhY2VBbGwoXCJcXG5cIiwgXCIgXCIpO1xyXG5cclxuICAgICAgICAgIGxldCBsYWJlbCA9IG5ldyBTdHJpbmdCdWZmZXIoKTtcclxuICAgICAgICAgIGxhYmVsXHJcbiAgICAgICAgICAgIC5hcHBlbmQoXCJSRUxBVElPTihcIilcclxuICAgICAgICAgICAgLmFwcGVuZChsYWJlbElkKVxyXG4gICAgICAgICAgICAuYXBwZW5kKHIubmFtZSArIFwiKVwiKVxyXG4gICAgICAgICAgICAuYXBwZW5kKFwiLmNvbmRpdGlvblwiKTtcclxuXHJcbiAgICAgICAgICBsZXQgb2JqID0gcnVubmVyLnJ1bihsYWJlbC50b1N0cmluZygpLCBjb25kaXRpb24pO1xyXG4gICAgICAgICAgaWYgKG9iaiBpbnN0YW5jZW9mIEJvb2xlYW4pIHtcclxuICAgICAgICAgICAgZmxhZyA9IG9iajtcclxuICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgIH0gY2F0Y2ggKGUpIHtcclxuICAgICAgZS5wcmludFN0YWNrVHJhY2UoKTtcclxuICAgIH1cclxuXHJcbiAgICBpZiAoZmxhZy5ib29sZWFuVmFsdWUoKSkge1xyXG4gICAgICBlbmQgPSByLmdld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G5cclxuICAvKipcclxuICAgKiBAdGhyb3dzIGphdmEubGFuZy5FeGNlcHRpb25cclxuICAgKiBAcm9zZXVpZCAzRTBBNkUxQjAxMEZcclxuICAgKi9cclxuICBqYkluaXQoZSkge1xyXG4gICAgdGhpcy5jYW52YXMub25tb3VzZW1vdmUgPSAoZSkgPT4ge1xyXG4gICAgICB0aGlzLm1vdXNlTW92ZShlKTtcclxuICAgIH07XHJcblxyXG4gICAgdGhpcy5jYW52YXMub25jbGljayA9IChlKSA9PiB7XHJcbiAgICAgIHRoaXMubW91c2VDbGljayhlKTtcclxuICAgIH07XHJcbiAgICB0aGlzLmNhbnZhcy5vbm1vdXNlZG93biA9IChlKSA9PiB7XHJcbiAgICAgIHRoaXMubW91c2VEb3duKGUpO1xyXG4gICAgfTtcclxuICAgIHRoaXMuY2FudmFzLm9ubW91c2V1cCA9IChlKSA9PiB7XHJcbiAgICAgIHRoaXMubW91c2VVcChlKTtcclxuICAgIH07XHJcbiAgICBkb2N1bWVudC5vbmtleWRvd24gPSAoZSkgPT4ge1xyXG4gICAgICB0aGlzLmhhbmRsZUtleURvd24oZSk7XHJcbiAgICB9O1xyXG4gICAgZG9jdW1lbnQub25rZXl1cCA9IChlKSA9PiB7XHJcbiAgICAgIHRoaXMuaGFuZGxlS2V5VXAoZSk7XHJcbiAgICB9O1xyXG4gICAgdGhpcy5jYW52YXMub25tb3VzZW92ZXIgPSAoZSkgPT4ge1xyXG4gICAgICAvL3RoaXNfbW91c2VFbnRlcmVkKGUpO1xyXG4gICAgfTtcclxuICAgIHRoaXMuY2FudmFzLm9uZHJvcD0oZSk9PntcclxuICAgICAgdGhpcy5tb3VzZURvd24oZSk7XHJcbiAgICB9XHJcbiAgfVxyXG5cclxuICAvKipcclxuICAgKiBAcGFyYW0gZVxyXG4gICAqIEByb3NldWlkIDNFMEE2RTFCMDEyM1xyXG4gICAqL1xyXG4gIG1vdXNlQ2xpY2soZSkge1xyXG4gICAgbGV0IHggPSBlLmNsaWVudFg7XHJcbiAgICBsZXQgeSA9IGUuY2xpZW50WTtcclxuICAgIHggPSB4IC8gdGhpcy5zY2FsZU51bTtcclxuICAgIHkgPSB5IC8gdGhpcy5zY2FsZU51bTtcclxuICAgIGxldCBlbSA9IHRoaXMuY2hrU2VsZWN0ZWRFbGVtZW50KHgsIHkpO1xyXG4gICAgaWYgKGVtICE9IG51bGwpIHtcclxuICAgICAgY29uc29sZS5sb2coXCLpgInkuK1lbSBcIiwgZW0pO1xyXG4gICAgfVxyXG5cclxuICAgIC8vIHl45Yik5pat5LiN5piv5Lit5paH5omN6YeN5paw5omn6KGMXHJcbiAgICBpZiAoZ2V0Q29va2llKFwiZGVzaWduZXJMYW5ndWFnZVwiKSAhPSBcInpoXCIpIHtcclxuICAgICAgLy8g6YeN5paw5riy5p+T5aSa6K+t6KiAXHJcbiAgICAgIGpRdWVyeShkb2N1bWVudCkucmVhZHkoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgIGxldCBsYW5nID0gZ2V0Q29va2llKFwiZGVzaWduZXJMYW5ndWFnZVwiKTtcclxuICAgICAgICAvLyBjbGVhclRpbWVvdXQodGltZXIpXHJcbiAgICAgICAgalF1ZXJ5LmkxOG4ucHJvcGVydGllcyh7XHJcbiAgICAgICAgICAvL+WKoOi9vei1hOa1j+iniOWZqOivreiogOWvueW6lOeahOi1hOa6kOaWh+S7tlxyXG4gICAgICAgICAgbmFtZTogXCJzdHJpbmdzXCIsIC8v6LWE5rqQ5paH5Lu25ZCN56ewXHJcbiAgICAgICAgICBwYXRoOiBcImkxOG4vXCIsIC8v6LWE5rqQ5paH5Lu26Lev5b6EXHJcbiAgICAgICAgICBsYW5ndWFnZTogbGFuZyxcclxuICAgICAgICAgIGNhY2hlOiBmYWxzZSxcclxuICAgICAgICAgIG1vZGU6IFwibWFwXCIsIC8v55SoTWFw55qE5pa55byP5L2/55So6LWE5rqQ5paH5Lu25Lit55qE5YC8XHJcbiAgICAgICAgICBjYWxsYmFjazogZnVuY3Rpb24g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KHgsIHkpO1xyXG4gICAgaWYgKGVtICE9IG51bGwpIHtcclxuICAgICAgaWYgKGVtIGluc3RhbmNlb2YgTm9kZSkge1xyXG4gICAgICAgIC8vIOiuvue9ruaKk+WPlueCuVxyXG4gICAgICAgIGVtLl9oYW5kbGVQb2ludC54ID0geCAtIGVtLng7XHJcbiAgICAgICAgZW0uX2hhbmRsZVBvaW50LnkgPSB5IC0gZW0ueTtcclxuICAgICAgfVxyXG5cclxuICAgICAgdGhpcy5fY2hhbmdlZCA9IHRydWU7XHJcbiAgICAgIGlmICh0aGlzLl9zdGF0dWVzID09IEZsb3dEaWFncmFtLkFDVElPTl9SRU1PVkUpIHtcclxuICAgICAgICAvLyBkZWxldGVNU0cgPSBudWxsO1xyXG4gICAgICAgIGlmIChlbSBpbnN0YW5jZW9mIFJlbGF0aW9uKSB7XHJcbiAgICAgICAgICBsZXQgciA9IGVtO1xyXG4gICAgICAgICAgaWYgKHIuaXNwYXNzZWQpIHtcclxuICAgICAgICAgICAgdGhpcy5kZWxldGVNU0cgPSBcIuebuOWFs+a1geeoi+W3suWkhOeQhizkuI3og73liKDpmaQhXCI7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGlmIChlbSBpbnN0YW5jZW9mIE5vZGUpIHtcclxuICAgICAgICAgIGxldCBuZCA9IGVtO1xyXG4gICAgICAgICAgaWYgKGVtLmlkICE9IG51bGwgJiYgbmQuX2lzY3VycmVudCkge1xyXG4gICAgICAgICAgICB0aGlzLmRlbGV0ZU1TRyA9IFwi5b2T5YmN6IqC54K55Zyo5aSE55CG5LitLOS4jeiDveWIoOmZpCFcIjtcclxuICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIGxldCBlbXMgPSB0aGlzLmdldEFsbEVsZW1lbnRzKCk7XHJcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZW1zLmxlbmd0aCAmJiB0aGlzLmRlbGV0ZU1TRyA9PSBcIm51bGxcIjsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgbGV0IGVsZW0gPSBlbXNbaV07XHJcbiAgICAgICAgICAgICAgaWYgKGVsZW0gaW5zdGFuY2VvZiBSZWxhdGlvbikge1xyXG4gICAgICAgICAgICAgICAgbGV0IHJsID0gZWxlbTtcclxuICAgICAgICAgICAgICAgIGlmICgoKHJsLnN0YXJ0bm9kZWlkICE9IG51bGwgJiYgcmwuc3RhcnRub2RlaWQgPT0gZW0uaWQpIHx8IChybC5lbmRub2RlaWQgIT0gbnVsbCAmJiBybC5lbmRub2RlaWQgPT0gZW0uaWQpKSAmJiBybC5pc3Bhc3NlZCkge1xyXG4gICAgICAgICAgICAgICAgICB0aGlzLmRlbGV0ZU1TRyA9IFwi55u45YWz5rWB56iL5bey5aSE55CGLOS4jeiDveWIoOmZpCFcIjtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKHRoaXMuZGVsZXRlTVNHID09IFwibnVsbFwiIHx8IHRoaXMuZGVsZXRlTVNHID09IG51bGwgfHwgdGhpcy5kZWxldGVNU0cgPT0gXCJcIikge1xyXG4gICAgICAgICAgdGhpcy5yZW1vdmVFbGVtZW50KGVtKTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgYWxlcnQodGhpcy5kZWxldGVNU0cpO1xyXG4gICAgICAgIH1cclxuICAgICAgfSBlbHNlIGlmICh0aGlzLl9zdGF0dWVzID09IEZsb3dEaWFncmFtLkFDVElPTl9CUkVBS19MSU5FKSB7XHJcbiAgICAgICAgLy8gYWRkIGJ5IGd1c2RcclxuXHJcbiAgICAgICAgaWYgKGVtIGluc3RhbmNlb2YgUmVsYXRpb24pIHtcclxuICAgICAgICAgIHRoaXMuX3NlbGVjdGVkID0gZW07XHJcbiAgICAgICAgICBsZXQgcmVsYXRpb24gPSB0aGlzLl9zZW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gICAgICAgICAgLy8g5pyJ5oyJ5LiL54K555qE5L2N572uXHJcbiAgICAgICAgICBpZiAocHJlc3MpIHtcclxuICAgICAgICAgICAgcmVsYXRpb24uc2V0Q2hhbmdldmVjdG9yKDEpO1xyXG4gICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgcmVsYXRpb24uc2V0Q2hhbmdldmVjdG9yKC0xKTtcclxuICAgICAgICAgICAgcmVsYXRpb24uc2V0QnJlYWtwb2ludChuZXcgUG9pbnQoeCwgeSkpO1xyXG4gICAgICAgICAgfVxyXG5cclxuICAgICAgICAgIHJlbGF0aW9uLnNldEN1cnJlbnRzZWxlY3QodHJ1ZSk7XHJcbiAgICAgICAgICBpc0NoYW5nZUN1cnNvciA9IHRydWU7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgIHRoaXMuX3NlbGVjdGVkID0gZW07XHJcbiAgICAgICAgICB0aGlzLl9zZWxlY3RlZC5tb3ZlVG8oeCwgeSk7XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcbiAgICAgIHRoaXMucmVwYWludCgpO1xyXG4gICAgfSBlbHNlIHtcclxuICAgICAgLy8gZW0gPT0gbnVsbFxyXG4gICAgICBpZiAodGhpcy5fc3RhdHVlcyA9PSBGbG93RGlhZ3JhbS5BQ1RJT05fQUREX1JFTEFUSU9OICYmIHRoaXMuX3NlbGVjdGVkIGluc3RhbmNlb2YgUmVsYXRpb24pIHtcclxuICAgICAgICBsZXQgciA9IHRoaXMuX3NlbGVjdGVkO1xyXG4gICAgICAgIGlmIChyLmdldFN0YXJ0bm9kZSgpID09IG51bGwpIHtcclxuICAgICAgICAgIHRoaXMucmVtb3ZlRWxlbWVudChyKTtcclxuICAgICAgICAgIHIgPSBudWxsO1xyXG4gICAgICAgICAgdGhpcy5fc2VsZWN0ZWQgPSBudWxsO1xyXG4gICAgICAgIH1cclxuICAgICAgfSBlbHNlIHtcclxuICAgICAgICBpZiAodGhpcy5fc2VsZWN0ZWQ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gbnVsbCAmJiB0aGlzLl9zZWxlY3RlZCBpbnN0YW5jZW9mIFJlbGF0aW9uICYmIChlbSA9PSBudWxsIHx8IGVtIGluc3RhbmNlb2YgTm9kZSkpIHtcclxuICAgICAgbGV0IHIgPSB0aGlzLl9zZWxlY3RlZDtcclxuICAgICAgci5zZXRDdXJyZW50c2VsZWN0KGZhbHNlKTtcclxuICAgICAgaWYgKHIuZ2V0RW5kbm9kZSgpID09IG51bGwpIHtcclxuICAgICAgICBpZiAoZW0gIT0gbnVsbCkge1xyXG4gICAgICAgICAgbGV0IGhhdmUgPSBmYWxzZTtcclxuICAgICAgICAgIGxldCB0aGF0ID0gdGhpcztcclxuICAgICAgICAgIGxldCBoYXZlTnVtID0gMDtcclxuICAgICAgICAgIHRoaXMuX2VsZW1zLmZvckVhY2goZnVuY3Rpb24gKHZhbCwgaW5kKSB7XHJcbiAgICAgICAgICAgIGlmICh2YWwgaW5zdGFuY2VvZiBSZWxhdGlvbikge1xyXG4gICAgICAgICAgICAgIGlmICh2YWwuc3RhcnRub2RlaWQgPT0gci5zdGFydG5vZGVpZCAmJiB2YWwuZW5kbm9kZWlkID09IGVtLmlkKSB7XHJcbiAgICAgICAgICAgICAgICBoYXZlTnVtID0gaW5kO1xyXG4gICAgICAgICAgICAgICAgaGF2ZSA9IHRydWU7XHJcbiAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICB9KTtcclxuICAgICAgICAgIGlmIChoYXZlKSB7XHJcbiAgICAgICAgICAgIHRoaXMuX2VsZW1zID0gdGhpcy5fcmVtb3ZlRWxlbWVudEZyb21BcnJheSh0aGlzLl9lbGVtcywgcik7XHJcbiAgICAgICAgICAgIGFsZXJ0KFwi5ZCM5pa55ZCR5YWz6IGU57q/5pyJ5LiU5LuF5pyJ5LiA5p2hXCIpO1xyXG4gICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgdGhpcy5fY2hhbmdlZCA9IHRydWU7XHJcbiAgICAgICAgICAgIHIuc2V0RW5kbm9kZShlbSk7XHJcbiAgICAgICAgICAgIGxldCBub2RlID0gZW07XHJcblxyXG4gICAgICAgICAgICBsZXQgcG9pbnQgPSBuZXcgUG9pbnQobm9kZS54LCBub2RlLnkpO1xyXG4gICAgICAgICAgICByLmFkZFZlY3Rvcihwb2ludCk7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGlmIChlbSA9PSBudWxsKSB7XHJcbiAgICAgICAgICAvL3x8IChmYWxzZSAmJiByLmdldFN0YXJ0bm9kZSgpLmlkLmVxdWFscyhyLmdldEVuZG5vZGUoKS5pZCkpKSB7XHJcbiAgICAgICAgICB0aGlzLl9lbGVtcyA9IHRoaXMuX3JlbW92ZUVsZW1lbnRGcm9tQXJyYXkodGhpcy5fZWxlbXMsIHIpO1xyXG4gICAgICAgIH1cclxuICAgICAgfSBlbHNlIHtcclxuICAgICAgICBsZXQgbnggPSB4O1xyXG4gICAgICAgIGxldCBueSA9IHk7XHJcbiAgICAgICAgY29uc29sZS5sb2coJ21vdXNldXAnKVxyXG4gICAgICAgIGxldCBwb3MgPSByLmdldENoYW5nZXZlY3RvcigpO1xyXG4gICAgICAgIHIuc2V0Q3VycmVudHNlbGVjdChmYWxzZSk7XHJcbiAgICAgICAgaWYgKHBvcyA9PSAtMSkge1xyXG4gICAgICAgICAgLy8g5Y6f5YWI5oyJ5LiL55qE54K55LiN5piv5Y6f5pyJ5oqY54K5XHJcbiAgICAgICAgICBsZXQgYm9vbCA9IHIuY2hlY2tEaXN0YW5jZShuZXcgUG9pbnQobngsIG55KSk7XHJcbiAgICAgICAgICBpZiAoIWJvb2wpIHtcclxuICAgICAgICAgICAgY29uc29sZS5sb2coJ+ajgOafpem8oOagh+mHiuaUvueahOeCueaLluaLieeahOi3neemu+aYr+WQpuWwj+S6juS4gOS4quW4uOmHj++8jOWmguaenOaYr++8jOWImeW9k+S9nOayoeacieaLluaLiScpXHJcbiAgICAgICAgICAgIHIuYWRkVmVjdG9yKG5ldyBQb2ludChueCwgbnkpKTsgLy8g5aaC5p6c6byg5qCH6YeK5pS+55qE54K55ouW5ouJ55qE6Led56a75aSn5LqO5LiA5Liq5bi46YeP77yM5YiZ5b2T5L2c5LiA5Liq5paw55qE5oqY54K5XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgIGlmKHIuZGVsVmVjdG9yKXtcclxuICAgICAgICAgICAgY29uc29sZS5sb2coJ21vdXNldXBhZGQnLCB4LCB5KVxyXG4gICAgICAgICAgICAvLyDorrDlvZXljp/mnaXnmoTmipjngrnkvY3nva7nlKjkuo7mt7vliqDnmoTml7blgJnmiY3lgZrkv67mlLlcclxuICAgICAgICAgICAgci5hZGRDaGFuZ2VWZWN0b3IobmV3IFBvaW50KG54LCBueSksIHIuZGVsSW5kZXgpO1xyXG4gICAgICAgICAgfWVsc2V7XHJcbiAgICAgICAgICAgIC8vIOWOn+WFiOaMieS4i+eahOeCueS4uuWOn+acieaKmOeCue+8jOm8oOagh+mHiuaUvuWQjuimgeaUueWPmOWOn+acieaKmOeCueeahOWdkOagh1xyXG4gICAgICAgICAgICBjb25zb2xlLmxvZygn5Y6f5YWI5oyJ5LiL55qE54K55Li65Y6f5pyJ5oqY54K577yM6byg5qCH6YeK5pS+5ZCO6KaB5pS55Y+Y5Y6f5pyJ5oqY54K555qE5Z2Q5qCHJylcclxuICAgICAgICAgICAgci5jaGFuZ2VWZWN0b3Ioci52ZWN0b3IsIG5ldyBQb2ludChueCwgbnkpKTtcclxuICAgICAgICAgICAgci5zZXRDaGFuZ2V2ZWN0b3IoLTEpO1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgfVxyXG4gICAgfVxyXG4gICAgLy8g6K6+572u5b2T5YmN6YCJ5LitXHJcbiAgICBpZiAodGhpcy5fc2VsZWN0ZWQgIT0gbnVsbCAmJiBlbSAhPSBudWxsICYmIE9iamVjdC5pcyh0aGlzLl9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ICAgIHRoaXMuX3NlbGVjdGVkLnNldE1vdmVwb2ludCh7IHg6IHgsIHk6IHkgfSk7XHJcbiAgICAgIH1cclxuICAgICAgdGhpcy5yZXBhaW50KCk7XHJcbiAgICB9IC8vIGVuZFxyXG4gIH1cclxuXHJcbiAgLyoqXHJcbiAgICogeXgg6ZSu55uY5oyJ5LiLXHJcbiAgICovXHJcbiAgaGFuZGxlS2V5RG93bihlKSB7XHJcbiAgICBzd2l0Y2ggKGUua2V5Q29kZSkge1xyXG4gICAgICBjYXNlIDE3OlxyXG4gICAgICAgIHRoaXMuY3RybERvd24gPSB0cnVlO1xyXG4gICAgICAgIC8vIOWmguaenOaYr+esrOS4gOS4quWwseWKoOS4iu+8jOWmguaenOS4jeaYr+esrOS4gOS4quWwseWPquaJp+ihjOS4i+mdoueahOWHveaVsFxyXG4gICAgICAgIGlmKHRoaXMuc2VsZWN0QXJyLmxlbmd0aCA9PSAwICYmIHRoaXMuX2N1cnJUb0VkaXQgJiYgISh0aGlzLl9jdXJyVG9FZGl0IGluc3RhbmNlb2YgUmVsYXRpb24pKXtcclxuICAgICAgICAgIHRoaXMuc2VsZWN0QXJyLnB1c2godGhpcy5fY3VyclRvRWRpdClcclxuICAgICAgICB9XHJcbiAgICAgICAgYnJlYWs7XHJcbiAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgYnJlYWs7XHJcbiAgICB9XHJcbiAgfVxyXG5cclxuICAvKipcclxuICAgKiB5eCDplK7nm5jmiqzotbdcclxuICAgKi9cclxuICBoYW5kbGVLZXlVcChlKSB7XHJcbiAgICBzd2l0Y2ggKGUua2V5Q29kZSkge1xyXG4gICAgICBjYXNlIDE3OlxyXG4gICAgICAgIHRoaXMuY3RybERvd24gPSBmYWxzZTtcclxuICAgICAgICBicmVhaztcclxuICAgICAgZGVmYXVsdDpcclxuICAgICAgICBicmVhaztcclxuICAgIH1cclxuICB9XHJcblxyXG4gIGlzQXNzaWduQmFjayhub2RlKSB7XHJcbiAgICAvLyDliKDpmaToioLngrnml7bliKTmlq3mraToioLngrnmmK/lkKbkuLrmjIflrprlm57pgIDoioLngrlcclxuICAgIGxldCBpc0Fzc2lnbkJhY2sgPSBmYWxzZTtcclxuICAgIGZvciAobGV0IGUgPSB0aGlzLmdldEFsbEVsZW1lbnRzKCkuZWxlbWVudHMoKTsgZS5oYXNNb3JlRWxlbWVudHMoKTsgKSB7XHJcbiAgICAgIGxldCBlbSA9IGUubmV4dEVsZW1lbnQoKTtcclxuICAgICAgaWYgKGVtICE9IG51bGwgJiYgZW0gaW5zdGFuY2VvZiBNYW51YWxOb2RlKSB7XHJcbiAgICAgICAgbGV0IG5kID0gZW07XHJcbiAgICAgICAgaWYgKG5kLmV4Y2VlZGFjdGlvbiAhPSBudWxsICYmIG5kLmV4Y2VlZGFjdGlvbi50cmltKCkgPT0gRmxvd1R5cGUuRE9CQUNLVE9OT0RFICYmIG5kLmJhY2tub2RlaWQuZXF1YWxzKG5vZGUuaWQpKSB7XHJcbiAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiBpc0Fzc2lnbkJhY2s7XHJcbiAgfVxyXG5cclxuICAvKipcclxuICAgKiDojrflj5blvZPliY3oioLngrnlhbPogZTnmoTmiYDmnInkuIvkuIDkuKroioLngrlcclxuICAgKlxyXG4gICAqIEBwYXJhbSBjdXJybm9kZWlkXHJcbiAgICogICAgICAgICAgICDlvZPliY3oioLngrlcclxuICAgKiBAcmV0dXJuIOW9k+WJjeiKgueCueWFs+iBlOeahOaJgOacieS4i+S4gOS4quiKgueCuVxyXG4gICAqL1xyXG4gIGdldE5leHROb2RlTGlzdChjdXJybm9kZWlkLCBkb2MsIHBhcmFtcywgdXNlcikge1xyXG4gICAgbGV0IGVtID0gdGhpcy5nZXRFbGVtZW50QnlJRChjdXJybm9kZWlkKTtcclxuICAgIGlmIChlbSBpbnN0YW5jZW9mIE5vZGUpIHtcclxuICAgICAgb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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7Ozs7QUFHQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7Ozs7OztBQUtBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7OztBQUdBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///4\n");
/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Rectangle = function () {\n function Rectangle() {\n _classCallCheck(this, Rectangle);\n\n this.x = 0;\n this.y = 0;\n this.width = 0;\n this.height = 0;\n }\n\n _createClass(Rectangle, [{\n key: \"setBounds\",\n value: function setBounds(x, y, width, height) {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n }\n }, {\n key: \"contains\",\n value: function contains(x, y) {\n if (x >= this.x && x <= this.x + this.width && y >= this.y && y <= this.y + this.height) {\n return true;\n }\n return false;\n }\n }]);\n\n return Rectangle;\n}();\n\nexports.default = Rectangle;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy9zcmMvdXRpbGl0eS9SZWN0YW5nbGUuanM/ZDBiNCJdLCJzb3VyY2VzQ29udGVudCI6WyJjbGFzcyBSZWN0YW5nbGUge1xyXG4gICAgY29uc3RydWN0b3IoKXtcclxuICAgICAgICB0aGlzLnggPSAwO1xyXG4gICAgICAgIHRoaXMueSA9IDA7XHJcbiAgICAgICAgdGhpcy53aWR0aCA9IDA7XHJcbiAgICAgICAgdGhpcy5oZWlnaHQgPSAwO1xyXG4gICAgfVxyXG5cclxuICAgIHNldEJvdW5kcyh4LCB5LCB3aWR0aCwgaGVpZ2h0KXtcclxuICAgICAgICB0aGlzLnggPSB4O1xyXG4gICAgICAgIHRoaXMueSA9IHk7XHJcbiAgICAgICAgdGhpcy53aWR0aCA9IHdpZHRoO1xyXG4gICAgICAgIHRoaXMuaGVpZ2h0ID0gaGVpZ2h0O1xyXG4gICAgfVxyXG5cclxuICAgIGNvbnRhaW5zKHgsIHkpe1xyXG4gICAgICAgIGlmKHggPj0gdGhpcy54ICYmIHggPD0gdGhpcy54ICsgdGhpcy53aWR0aCAmJiB5ID49IHRoaXMueSAmJiB5IDw9IHRoaXMueSArIHRoaXMuaGVpZ2h0KXtcclxuICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgIH1cclxufVxyXG5cclxuZXhwb3J0IGRlZmF1bHQgUmVjdGFuZ2xlO1xuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyBzcmMvdXRpbGl0eS9SZWN0YW5nbGUuanMiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQTtBQUNBO0FBQUE7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7OztBQUdBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///5\n");
/***/ }),
/* 6 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _PaintElement2 = __webpack_require__(1);\n\nvar _PaintElement3 = _interopRequireDefault(_PaintElement2);\n\nvar _Resources = __webpack_require__(0);\n\nvar _Resources2 = _interopRequireDefault(_Resources);\n\nvar _Point = __webpack_require__(7);\n\nvar _Point2 = _interopRequireDefault(_Point);\n\nvar _Polygon = __webpack_require__(15);\n\nvar _Polygon2 = _interopRequireDefault(_Polygon);\n\nvar _StringUtil = __webpack_require__(2);\n\nvar _StringUtil2 = _interopRequireDefault(_StringUtil);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Relation = function (_PaintElement) {\n _inherits(Relation, _PaintElement);\n\n function Relation(diagram) {\n _classCallCheck(this, Relation);\n\n var _this = _possibleConstructorReturn(this, (Relation.__proto__ || Object.getPrototypeOf(Relation)).call(this, diagram));\n\n _this.state = \"\";\n\n _this.i = 0;\n\n _this.startnodeid = \"\";\n\n _this.endnodeid = null;\n\n _this.ispassed = false;\n\n _this.isreturn = false; // 是否是返回路径\n /**\r\n * 线路显示条件, 在(FlowDiagram.getNextNode)中使用\r\n */\n _this.condition = \"\";\n\n _this.formlist = \"\";\n\n _this.filtercondition = \"\";\n\n _this.editMode = \"\";\n\n _this.processDescription = \"\";\n\n _this.action = \"\";\n\n _this.pointstack = \"\";\n\n _this._endpoint = null;\n\n _this._startnode = null;\n\n _this._endnode = null;\n\n _this._mousepoint = null;\n\n _this._movepoint = null; // 拖拉时鼠标的移动点\n\n _this.breakpoint = null; // 按下鼠标时的点\n\n _this.relationName = null;\n\n _this.vector = [];\n\n _this.changevector = -1; // 当鼠标按下时恰好是流程线原有折点时的折点位置\n\n _this.currentselect = false;\n\n _this.initstart = true; // 由于该流程图用xml文件保存,所以当装载流程图时要构造保存流程线的折点位置的vector\n\n _this.validateScript = \"\";\n\n _this.contentmenu1 = null;\n\n _this.nameText = \"\";\n\n _this.txtH = 20;\n\n _this.changeFlowCc = false;\n _this.changeFlowOperator = false;\n _this.disableFlowNode = false;\n _this.newRelation = false;\n\n _this.radius = 3;\n\n _this.delVector = false; // 是否有删除折点\n\n _this.delIndex = ''; // 删除折点的下标\n return _this;\n }\n\n _createClass(Relation, [{\n key: \"getClassName\",\n value: function getClassName() {\n return \"cn.myapps.runtime.workflow.element.Relation\";\n }\n }, {\n key: \"paint\",\n value: function paint(graphics) {\n var g = graphics;\n\n var old = this.color; // 保存当前颜色\n var hasMergPoint = false;\n\n var startPoint = this.getStartPoint();\n var endPoint = this.getEndPoint();\n\n if (this.initstart) {\n // 如果流程图是第一次画,则要从原有xml文件中读取折点的坐标\n this.initVector(this.pointstack); // pointstack是与xml文件打交道的用于存储流程线的折点坐标的public\n // String型变量\n }\n this.drawSelfCycle(startPoint, endPoint); // 画自循环线\n this.initstart = false;\n if (startPoint != null && endPoint != null) {\n this.mergPoint(); // 合并折点\n var d2 = 0,\n h2 = 0;\n var d3 = 0,\n h3 = 0;\n if (this.ispassed) {\n this.color = _PaintElement3.default.DEF_PASSCOLOR;\n } else if (this.currentselect) {\n this.color = _PaintElement3.default.DEF_SELECTEDCOLOR;\n this.currentselect = false;\n } else if (this._owner.isCurrentToEdit(this)) {\n this.color = _PaintElement3.default.DEF_CURREDITCOLOR;\n } else {\n this.color = _PaintElement3.default.DEF_COLOR;\n }\n if (this.vector.length < 2) {\n d2 = 0;\n h2 = 0;\n } else {\n var node = this.getEndnode();\n\n d2 = node.width;\n h2 = node.height;\n var startNode = this.getStartnode();\n\n d3 = startNode.width;\n h3 = startNode.height;\n }\n\n g.setColor(this.color);\n\n var sPoint = null;\n\n sPoint = this.getArrowhead(new _Point2.default(endPoint.x, endPoint.y), new _Point2.default(startPoint.x, startPoint.y), d3, h3); // 得到流程线箭头的坐标\n\n var ePoint = null;\n\n ePoint = this.getArrowhead(new _Point2.default(startPoint.x, startPoint.y), new _Point2.default(endPoint.x, endPoint.y), d2, h2); // 得到流程线箭头的坐标\n\n if (this.vector.length < 3) {\n // 鼠标从开始结点拖拉到结尾结点的过程中,鼠标当前移动点作为暂时的尾结点\n\n if (this._movepoint != null) {\n sPoint = this.getArrowhead(new _Point2.default(this._movepoint.x, this._movepoint.y), new _Point2.default(startPoint.x, startPoint.y), d3, h3);\n g.drawLine(sPoint.x, sPoint.y, this._movepoint.x, this._movepoint.y);\n\n startPoint.x = this._movepoint.x;\n startPoint.y = this._movepoint.y;\n\n ePoint = this.getArrowhead(new _Point2.default(startPoint.x, startPoint.y), new _Point2.default(endPoint.x, endPoint.y), d2, h2);\n g.drawLine(this._movepoint.x, this._movepoint.y, ePoint.x, ePoint.y);\n this._movepoint = null;\n } else {\n g.drawLine(sPoint.x, sPoint.y, ePoint.x, ePoint.y);\n }\n } else {\n if (this._movepoint != null) {\n // 画流程线折点时拖拉鼠标的情况(检查点击的是不是原来的折点)\n var whichLine = this.getWhichLine(this.getBreakpoint());\n for (var j = 0; j < this.vector.length - 1; j++) {\n var obj1 = this.vector[j];\n var obj2 = this.vector[j + 1];\n\n startPoint.x = obj1.x;\n startPoint.y = obj1.y;\n\n if (j == 0) {\n obj1 = this.getStartPoint();\n }\n if (j == this.vector.length - 2) {\n ePoint = this.getArrowhead(new _Point2.default(startPoint.x, startPoint.y), new _Point2.default(endPoint.x, endPoint.y), d2, h2);\n obj2 = ePoint;\n }\n if (j == whichLine) {\n g.drawLine(obj1.x, obj1.y, this._movepoint.x, this._movepoint.y);\n startPoint.x = this._movepoint.x;\n startPoint.y = this._movepoint.y;\n if (j == this.vector.length - 2) {\n sPoint = this.getArrowhead(new _Point2.default(endPoint.x, endPoint.y), new _Point2.default(startPoint.x, startPoint.y), d3, h3);\n obj1 = sPoint;\n\n ePoint = this.getArrowhead(new _Point2.default(startPoint.x, startPoint.y), new _Point2.default(endPoint.x, endPoint.y), d2, h2);\n obj2 = ePoint;\n }\n g.drawLine(this._movepoint.x, this._movepoint.y, obj2.x, obj2.y);\n } else {\n g.drawLine(obj1.x, obj1.y, obj2.x, obj2.y);\n }\n }\n this._movepoint = null;\n } else {\n // 鼠标释放点设为新折点\n for (var k = 0; k < this.vector.length - 1; k++) {\n // 需要生成锚点\n hasMergPoint = true;\n var obj3 = this.vector[k];\n var obj4 = this.vector[k + 1];\n startPoint.x = obj3.x;\n startPoint.y = obj3.y;\n if (k == 0) {\n hasMergPoint = false;\n obj3 = this.getStartPoint();\n obj3 = this.getArrowhead(new _Point2.default(obj4.x, obj4.y), new _Point2.default(obj3.x, obj3.y), d3, h3);\n // obj3 = sPoint;\n }\n if (k == this.vector.length - 2) {\n ePoint = this.getArrowhead(new _Point2.default(startPoint.x, startPoint.y), new _Point2.default(endPoint.x, endPoint.y), d2, h2);\n obj4 = ePoint;\n }\n g.drawLine(obj3.x, obj3.y, obj4.x, obj4.y);\n if (hasMergPoint) {\n g.save();\n g.drawArc(obj3.x, obj3.y, this.radius, '#F0F0F0', '#000000');\n g.restore();\n }\n }\n }\n }\n ePoint = this.getArrowhead(new _Point2.default(startPoint.x, startPoint.y), new _Point2.default(endPoint.x, endPoint.y), d2, h2);\n\n this.drawArrow(g, endPoint.x, endPoint.y, startPoint.x, startPoint.y, ePoint); // 画箭头\n\n g.setColor(_Resources2.default.COLOR.black);\n\n this.drawRelationText(g, endPoint.x, endPoint.y, startPoint.x, startPoint.y); // 画“名称”\n }\n this.color = old; // 恢复当前颜色\n this.setPointStack(this.vector); // 把vector里的折点坐标存储在pointstack里,跟xml文件打交道\n }\n }, {\n key: \"drawRelationText\",\n value: function drawRelationText(g, x1, y1, x2, y2) {\n var mx = void 0,\n my = void 0;\n if (this.name != null) {\n mx = (x2 + x1) / 2;\n my = (y2 + y1) / 2;\n\n var rx = mx - 10;\n var ry = my + _Resources2.default.FONT_METRICS.height; // 比线段中间位低\n\n g.setColor(_Resources2.default.COLOR.blue);\n\n g.drawString(_StringUtil2.default.dencodeHTML(this.name), rx, ry);\n\n g.setColor(_Resources2.default.COLOR.black);\n }\n }\n }, {\n key: \"drawArrow\",\n value: function drawArrow(g, x1, y1, x2, y2, arrowhead) {\n var hx = void 0,\n hy = void 0;\n var sina = void 0,\n cosa = void 0;\n sina = Math.abs(Math.sqrt((y2 - y1) * (y2 - y1)) / Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)));\n cosa = Math.abs(Math.sqrt((x2 - x1) * (x2 - x1)) / Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)));\n // 第一象限\n var arrowstart1 = new _Point2.default();\n var arrowstart2 = new _Point2.default();\n if (x2 < arrowhead.x && y2 < arrowhead.y) {\n // 求箭头线的开始点,有两个,分别在流程线的两侧\n arrowstart1.x = arrowhead.x + (Relation.ARROW_WIDTH * sina - Relation.ARROW_LONG * cosa);\n arrowstart1.y = arrowhead.y - (Relation.ARROW_LONG * sina + Relation.ARROW_WIDTH * cosa);\n arrowstart2.x = arrowhead.x - (Relation.ARROW_LONG * cosa + Relation.ARROW_WIDTH * sina);\n arrowstart2.y = arrowhead.y + (Relation.ARROW_WIDTH * cosa - Relation.ARROW_LONG * sina);\n } else if (x2 == arrowhead.x && y2 < arrowhead.y) {\n arrowstart1.x = arrowhead.x + Relation.ARROW_WIDTH;\n arrowstart1.y = arrowhead.y - Relation.ARROW_LONG;\n arrowstart2.x = arrowhead.x - Relation.ARROW_WIDTH;\n arrowstart2.y = arrowhead.y - Relation.ARROW_LONG;\n } else if (x2 > arrowhead.x && y2 < arrowhead.y) {\n arrowstart1.x = arrowhead.x + (Relation.ARROW_LONG * cosa + Relation.ARROW_WIDTH * sina);\n arrowstart1.y = arrowhead.y + (Relation.ARROW_WIDTH * cosa - Relation.ARROW_LONG * sina);\n arrowstart2.x = arrowhead.x + (Relation.ARROW_LONG * cosa - Relation.ARROW_WIDTH * sina);\n arrowstart2.y = arrowhead.y - (Relation.ARROW_LONG * sina + Relation.ARROW_WIDTH * cosa);\n } else if (x2 > arrowhead.x && y2 == arrowhead.y) {\n arrowstart1.x = arrowhead.x + Relation.ARROW_LONG;\n arrowstart1.y = arrowhead.y + Relation.ARROW_WIDTH;\n arrowstart2.x = arrowhead.x + Relation.ARROW_LONG;\n arrowstart2.y = arrowhead.y - Relation.ARROW_WIDTH;\n } else if (x2 > arrowhead.x && y2 > arrowhead.y) {\n arrowstart1.x = arrowhead.x + (Relation.ARROW_LONG * cosa - Relation.ARROW_WIDTH * sina);\n arrowstart1.y = arrowhead.y + (Relation.ARROW_LONG * sina + Relation.ARROW_WIDTH * cosa);\n arrowstart2.x = arrowhead.x + (Relation.ARROW_LONG * cosa + Relation.ARROW_WIDTH * sina);\n arrowstart2.y = arrowhead.y + (Relation.ARROW_LONG * sina - Relation.ARROW_WIDTH * cosa);\n } else if (x2 == arrowhead.x && y2 > arrowhead.y) {\n arrowstart1.x = arrowhead.x - Relation.ARROW_WIDTH;\n arrowstart1.y = arrowhead.y + Relation.ARROW_LONG;\n arrowstart2.x = arrowhead.x + Relation.ARROW_WIDTH;\n arrowstart2.y = arrowhead.y + Relation.ARROW_LONG;\n } else if (x2 < arrowhead.x && y2 > arrowhead.y) {\n arrowstart1.x = arrowhead.x - (Relation.ARROW_LONG * cosa + Relation.ARROW_WIDTH * sina);\n arrowstart1.y = arrowhead.y + (Relation.ARROW_LONG * sina - Relation.ARROW_WIDTH * cosa);\n arrowstart2.x = arrowhead.x + (Relation.ARROW_WIDTH * sina - Relation.ARROW_LONG * cosa);\n arrowstart2.y = arrowhead.y + (Relation.ARROW_LONG * sina + Relation.ARROW_WIDTH * cosa);\n } else {\n arrowstart1.x = arrowhead.x - Relation.ARROW_LONG;\n arrowstart1.y = arrowhead.y - Relation.ARROW_WIDTH;\n arrowstart2.x = arrowhead.x - Relation.ARROW_LONG;\n arrowstart2.y = arrowhead.y + Relation.ARROW_WIDTH;\n }\n hx = arrowhead.x;\n\n hy = arrowhead.y;\n // g.setColor(Color.red);\n var arrow = new _Polygon2.default();\n arrow.addPoint(hx, hy);\n arrow.addPoint(arrowstart1.x, arrowstart1.y);\n arrow.addPoint(arrowstart2.x, arrowstart2.y);\n g.fillPolygon(arrow);\n }\n\n /**\r\n * 合并折点\r\n */\n\n }, {\n key: \"mergPoint\",\n value: function mergPoint() {\n // 重置有没有合并到折点\n // this.delVector = false\n if (this.vector.length >= 3) {\n while (true) {\n // 把相邻的两个距离小于10的折点合并为一个点\n if (this.vector.length >= 3) {\n var distance = -1;\n var m = 0;\n var size = this.vector.length - 1;\n for (m = 0; m < size; m++) {\n var obj1 = this.vector[m];\n var obj2 = this.vector[m + 1];\n if (m == 0) {\n obj1 = this.getStartPoint();\n }\n if (m == this.vector.lenght - 2) {\n obj2 = this.getEndPoint();\n }\n\n distance = this.getDistance(obj1, obj2);\n\n if (distance <= 10) {\n // 若两点相邻且距离小于10,则删去其中一个点\n if (m == this.vector.length - 2) {\n // 从数组中移除\n this.vector = this.removeElementAt(this.vector, m);\n this.delVector = true;\n } else {\n this.vector = this.removeElementAt(this.vector, m + 1);\n this.delVector = true;\n }\n break;\n }\n }\n if (m == size) {\n break;\n }\n } else {\n break;\n }\n }\n while (true) {\n // 把相邻的两条夹角小于5度的直线合并为一条直线\n if (this.vector.length >= 3) {\n var remove = false;\n var n = 0;\n var _size = this.vector.length - 2;\n for (n = 0; n < _size; n++) {\n var _obj = this.vector[n];\n var _obj2 = this.vector[n + 1];\n var obj3 = this.vector[n + 2];\n if (n == 0) {\n _obj = this.getStartPoint();\n }\n if (n == this.vector.length - 3) {\n obj3 = this.getEndPoint();\n }\n\n remove = this.lineTolineAngle(_obj, _obj2, obj3); // 判断两线夹角是否小于5度\n if (remove) {\n this.vector = [].concat(_toConsumableArray(this.vector.slice(0, n)), _toConsumableArray(this.vector.slice(n + 1)));\n this.delVector = true;\n console.log('夹角小于5', this.vector);\n break;\n }\n }\n if (n == _size) {\n break;\n }\n } else {\n break;\n }\n }\n }\n }\n }, {\n key: \"isRealtion\",\n value: function isRealtion() {\n var arr = [];\n for (var o = 0; o < this._owner._elems.length; o++) {\n if (this._owner._elems[o] instanceof Relation) {\n arr.push(this._owner._elems[o]);\n }\n }\n return arr;\n }\n\n /**\r\n * 从元素组中删除\r\n * @param {*} array \r\n * @param {*} element \r\n * @returns \r\n */\n\n }, {\n key: \"removeElementAt\",\n value: function removeElementAt(array, index) {\n var arr = [];\n for (var i = 0; i < array.length; i++) {\n if (i == index) {\n continue;\n } else {\n arr.push(array[i]);\n }\n }\n return arr;\n }\n /**\r\n * 画自循环的圆\r\n * @param {*} startPoint \r\n * @param {*} endPoint \r\n */\n\n }, {\n key: \"drawSelfCycle\",\n value: function drawSelfCycle(startPoint, endPoint) {\n // 如果开始坐标与结束坐标点重合,则生成自连接线\n if (!this.getCurrentselect() && this.getStartnode() == this.getEndnode()) {\n if (startPoint != null) {\n this.vector = [];\n this.vector.push(startPoint);\n var point = new _Point2.default(startPoint.x + 30, startPoint.y);\n this.vector.push(point);\n point = new _Point2.default(point.x, point.y - 50);\n this.vector.push(point);\n point = new _Point2.default(point.x - 30, point.y);\n this.vector.push(point);\n this.vector.push(endPoint);\n }\n }\n }\n\n /**\r\n * Access method for the Startnode property.\r\n *\r\n * @return the current value of the Startnode property\r\n * @roseuid 3E0A6E1B0318\r\n */\n\n }, {\n key: \"getChangevector\",\n value: function getChangevector() {\n return this.changevector;\n }\n }, {\n key: \"setChangevector\",\n value: function setChangevector(change) {\n this.changevector = change;\n }\n }, {\n key: \"setPointStack\",\n value: function setPointStack(vector) {\n var strTemp = \"\";\n if (this.vector != null) {\n for (var i = 0; i < this.vector.length; i++) {\n var point = this.vector[i];\n strTemp = strTemp + point.x + \";\" + point.y;\n if (i < this.vector.length - 1) {\n strTemp = strTemp + \";\"; // 例如: \"123;234;456;444\"形式\n }\n }\n }\n this.pointstack = strTemp;\n }\n\n /**\r\n * 把pointstack里的x,y坐标转换成vector里的Point对象\r\n *\r\n * @param pointstack\r\n */\n\n }, {\n key: \"initVector\",\n value: function initVector(pointstack) {\n var str = \"\";\n str = pointstack;\n var length = 0;\n if (str == null || str == \"\") {} else {\n var x = 0;\n var y = 0;\n var position = 0;\n length = str.length;\n var strTemp = \"\";\n while (true) {\n try {\n position = str.indexOf(\";\");\n if (position <= 0) {\n break;\n }\n strTemp = str.substring(0, position);\n x = parseInt(strTemp);\n str = str.substring(position + 1, str.length);\n position = str.indexOf(\";\");\n if (position <= 0) {\n strTemp = str;\n y = parseInt(strTemp);\n this.vector.push(new _Point2.default(x, y));\n break;\n }\n strTemp = str.substring(0, position);\n y = parseInt(strTemp);\n this.vector.push(new _Point2.default(x, y));\n str = str.substring(position + 1, str.length);\n } catch (e) {}\n }\n }\n }\n }, {\n key: \"setCurrentselect\",\n value: function setCurrentselect(curSelect) {\n this.currentselect = curSelect;\n }\n }, {\n key: \"getCurrentselect\",\n value: function getCurrentselect() {\n return this.currentselect;\n }\n }, {\n key: \"getBreakpoint\",\n value: function getBreakpoint() {\n return this.breakpoint;\n }\n }, {\n key: \"setBreakpoint\",\n value: function setBreakpoint(point) {\n this.breakpoint = point;\n }\n }, {\n key: \"setProps\",\n value: function setProps(newProps) {\n Object.assign(this, newProps);\n }\n\n /**\r\n * 得到箭头坐标\r\n *\r\n * @param p1\r\n * @param p2\r\n * @param d2\r\n * @param h2\r\n * @return\r\n */\n\n }, {\n key: \"getArrowhead\",\n value: function getArrowhead(p1, p2, d2, h2) {\n var k = Math.abs((p2.y - p1.y) / (p2.x - p1.x));\n var k2 = h2 / d2;\n var arrowhead = new _Point2.default();\n if (p2.y > p1.y && p2.x > p1.x) {\n if (k2 >= k) {\n arrowhead.x = p2.x - d2 / 2;\n arrowhead.y = p2.y - k * d2 / 2;\n } else {\n arrowhead.x = p2.x - h2 / 2 / k;\n arrowhead.y = p2.y - h2 / 2;\n }\n } else if (p2.y == p1.y && p2.x > p1.x) {\n arrowhead.x = p2.x - d2 / 2;\n arrowhead.y = p2.y;\n } else if (p2.y < p1.y && p2.x > p1.x) {\n if (k2 >= k) {\n arrowhead.y = p2.y + d2 / 2 * k;\n arrowhead.x = p2.x - d2 / 2;\n } else {\n arrowhead.x = p2.x - h2 / 2 / k;\n arrowhead.y = p2.y + h2 / 2;\n }\n } else if (p2.y < p1.y && p2.x == p1.x) {\n arrowhead.x = p2.x;\n arrowhead.y = p2.y + h2 / 2;\n } else if (p2.y < p1.y && p2.x < p1.x) {\n if (k2 >= k) {\n arrowhead.x = p2.x + d2 / 2;\n arrowhead.y = p2.y + k * d2 / 2;\n } else {\n arrowhead.x = p2.x + h2 / 2 / k;\n arrowhead.y = p2.y + h2 / 2;\n }\n } else if (p2.y == p1.y && p2.x < p1.x) {\n arrowhead.x = p2.x + d2 / 2;\n arrowhead.y = p2.y;\n } else if (p2.y > p1.y && p2.x < p1.x) {\n if (k2 >= k) {\n arrowhead.x = p2.x + d2 / 2;\n arrowhead.y = p2.y - d2 * k / 2;\n } else {\n arrowhead.x = p2.x + h2 / 2 / k;\n arrowhead.y = p2.y - h2 / 2;\n }\n } else {\n arrowhead.x = p2.x;\n arrowhead.y = p2.y - h2 / 2;\n }\n\n return arrowhead;\n }\n }, {\n key: \"getVector\",\n value: function getVector() {\n return this.vector;\n }\n }, {\n key: \"addVector\",\n value: function addVector(obj) {\n console.log(\"Relation.addVector.1->\", this.vector, obj);\n if (this.vector.lenght < 2) {\n this.vector.addElement(obj);\n } else {\n // 把新折点插入vector\n var i = this.getWhichLine(this.getBreakpoint());\n this.vector = [].concat(_toConsumableArray(this.vector.slice(0, i + 1)), [obj], _toConsumableArray(this.vector.slice(i + 1)));\n }\n console.log(\"Relation.addVector.2->\", this.vector);\n this.mergPoint();\n console.log(\"Relation.addVector.3->\", this.vector);\n }\n }, {\n key: \"addChangeVector\",\n value: function addChangeVector(obj, i) {\n // 把新折点插入vector\n this.vector = [].concat(_toConsumableArray(this.vector.slice(0, i + 1)), [obj], _toConsumableArray(this.vector.slice(i + 1)));\n this.mergPoint();\n console.log(\"Relation.addVector.3->\", this.vector);\n }\n\n /**\r\n * 检查点到点的距离是否小于一个给定常数\r\n *\r\n * @param point\r\n * @return\r\n */\n\n }, {\n key: \"checkDistance\",\n value: function checkDistance(point) {\n var x = point.x;\n var y = point.y;\n var lx = 0;\n var ly = 0;\n var hx = 0;\n var hy = 0;\n var i = this.getWhichLine(this.getBreakpoint());\n if (i >= 0) {\n var obj1 = this.vector[i];\n var obj2 = this.vector[i + 1];\n if (i == 0) {\n obj1 = this.getStartPoint();\n }\n if (i == this.vector.length - 2) {\n obj2 = this.getEndPoint();\n }\n\n if (obj1 && obj2) {\n if (obj1.x == obj2.x) {\n // selected = Math.abs(x - obj1.x) < 5\n // && ((y > obj1.y && y < obj2.y) || (y > obj2.y && y <\n // obj1.y));\n return Math.abs(obj1.y - obj2.y) < 15;\n } else {}\n\n if (obj1.x < obj2.x) {\n lx = obj1.x;\n hx = obj2.x;\n } else {\n hx = obj1.x;\n lx = obj2.x;\n }\n if (obj1.y < obj2.y) {\n ly = obj1.y;\n hy = obj2.y;\n } else {\n hy = obj1.y;\n ly = obj2.y;\n }\n var k = (obj2.y - obj1.y) / (obj2.x - obj1.x);\n\n var z = obj1.y - k * obj1.x;\n var py = k * x + z;\n var px = (y - z) / k;\n if (k > 1 || k < -1) {\n if (ly <= y && y <= hy && x - px >= -15 && x - px <= 15) {\n return true;\n } else {}\n } else {\n if (lx <= x && x <= hx && y - py >= -15 && y - py <= 15) {\n return true;\n } else {}\n }\n }\n }\n return false;\n }\n }, {\n key: \"changeVector\",\n value: function changeVector(vector, point) {\n var pos = this.getChangevector();\n if (pos != -1) {\n console.log('vector', this.vector);\n // 在原有的折点中查找然后修改折点的值\n this.delIndex = '';\n for (var j = 0; j < vector.length; j++) {\n // 判断选择的是哪个折点\n if (Math.abs(vector[j].x - point.x) < 50 && Math.abs(vector[j].y - point.y) < 50) {\n this.delIndex = j;\n break;\n }\n }\n // for (let j = 0; j < vector.length; j++) {\n // \t// 判断选择的是哪个折点\n // \tif (Math.abs(vector[j].x - point.x) < 50 && Math.abs(vector[j].y - point.y) < 50) {\n // \t\tvector[j].x = point.x;\n // \t\tvector[j].y = point.y;\n // \t}\n // }\n vector.map(function (item) {\n if (Math.abs(item.x - point.x) < 50 && Math.abs(item.y - point.y) < 50) {\n item.x = point.x;\n item.y = point.y;\n }\n });\n console.log('vector', vector, this.delIndex);\n }\n }\n\n /**\r\n * yx 检查是否按下原来的折点\r\n */\n\n }, {\n key: \"checkPressBreakPoint\",\n value: function checkPressBreakPoint(vectors, x, y) {\n var press = false;\n for (var i = 0; i < vectors.length; i++) {\n if (Math.abs(vectors[i].x - x) < 5 && Math.abs(vectors[i].y - y) < 5) {\n // 按下的是折点位置\n press = true;\n break;\n }\n }\n return press;\n }\n\n /**\r\n * 检查新折点应该插入哪条折线之间\r\n *\r\n * @param point\r\n * @return\r\n */\n\n }, {\n key: \"getWhichLine\",\n value: function getWhichLine(point) {\n if (point == null) {\n return -1;\n } else {}\n var x = point.x;\n var y = point.y;\n var lx = 0;\n var ly = 0;\n var hx = 0;\n var hy = 0;\n var i = 0;\n if (this.endnodeid != null && !this.getStartnode().isSelected(x, y) && !this.getEndnode().isSelected(x, y)) {\n for (i = 0; i < this.vector.length - 1; i++) {\n var obj1 = this.vector[i];\n var obj2 = this.vector[i + 1];\n if (i == 0) {\n obj1 = this.getStartPoint();\n }\n if (i == this.vector.length - 2) {\n obj2 = this.getEndPoint();\n }\n\n if (obj1.x == obj2.x) {\n break;\n } else {\n if (obj1.x < obj2.x) {\n lx = obj1.x;\n hx = obj2.x;\n } else {\n hx = obj1.x;\n lx = obj2.x;\n }\n if (obj1.y < obj2.y) {\n ly = obj1.y;\n hy = obj2.y;\n } else {\n hy = obj1.y;\n ly = obj2.y;\n }\n var k = (obj2.y - obj1.y) / (obj2.x - obj1.x);\n var z = obj1.y - k * obj1.x;\n var py = k * x + z;\n var px = (y - z) / k;\n if (k > 1 || k < -1) {\n if (ly <= y && y <= hy && x - px >= -5 && x - px <= 5) {\n break;\n } else {}\n } else {\n if (lx <= x && x <= hx && y - py >= -5 && y - py <= 5) {\n break;\n } else {}\n }\n }\n }\n }\n return i;\n }\n\n /**\r\n * 返回开始结点\r\n *\r\n * @return\r\n */\n\n }, {\n key: \"getStartnode\",\n value: function getStartnode() {\n if (this.startnodeid != null && this.startnodeid.trim().length > 0) {\n if (this._startnode == null) {\n var sn = this._owner.getElementByID(this.startnodeid);\n this._startnode = sn;\n }\n\n return this._startnode;\n }\n return null;\n }\n\n /**\r\n * Sets the value of the Startnode property.\r\n *\r\n * @param aStartnode\r\n * the new value of the Startnode property@param nd\r\n * @roseuid 3E0A6E1B0322\r\n */\n\n }, {\n key: \"setStartnode\",\n value: function setStartnode(nd) {\n this.startnodeid = nd.id;\n }\n\n /**\r\n * Access method for the Endnode property.\r\n *\r\n * @return the current value of the Endnode property\r\n * @roseuid 3E0A6E1B0336\r\n */\n\n }, {\n key: \"getEndnode\",\n value: function getEndnode() {\n if (this.endnodeid != null && this.endnodeid.trim().length > 0) {\n if (this._endnode == null) {\n var en = this._owner.getElementByID(this.endnodeid);\n this._endnode = en;\n }\n\n return this._endnode;\n }\n return null;\n }\n\n /**\r\n * Sets the value of the Endnode property.\r\n *\r\n * @param aEndnode\r\n * the new value of the Endnode property@param nd\r\n * @roseuid 3E0A6E1B034A\r\n */\n\n }, {\n key: \"setEndnode\",\n value: function setEndnode(nd) {\n this.endnodeid = nd.id;\n }\n\n /**\r\n * @param x\r\n * @param y\r\n * @roseuid 3E0A6E1B035E\r\n */\n\n }, {\n key: \"moveTo\",\n value: function moveTo(x, y) {\n if (this._mousepoint == null) {\n this._mousepoint = new _Point2.default(x, y);\n } else {\n this._mousepoint.move(x, y);\n }\n if (this._startpoint == null) {\n this._startpoint = this._mousepoint;\n }\n\n if (this._endpoint == null) {\n this._endpoint = this._mousepoint;\n }\n }\n\n /**\r\n * @param x\r\n * @param y\r\n * @return boolean\r\n * @roseuid 3E0A6E1B037C\r\n */\n\n }, {\n key: \"isSelected\",\n value: function isSelected(x, y) {\n var selected = false;\n var lx = 0;\n var ly = 0;\n var hx = 0;\n var hy = 0;\n\n var startNode = this.getStartnode();\n var endNode = this.getEndnode();\n\n if (this.endnodeid != null && startNode != null && endNode != null && !startNode.isSelected(x, y) && !endNode.isSelected(x, y)) {\n for (var i = 0; i < this.vector.length - 1; i++) {\n var obj1 = this.vector[i];\n var obj2 = this.vector[i + 1];\n if (i == 0) {\n obj1 = this.getStartPoint();\n }\n if (i == this.vector.length - 2) {\n obj2 = this.getEndPoint();\n }\n\n if (obj1.x == obj2.x) {\n selected = Math.abs(x - obj1.x) < 5 && (y > obj1.y && y < obj2.y || y > obj2.y && y < obj1.y);\n break;\n } else {\n if (obj1.x < obj2.x) {\n lx = obj1.x;\n hx = obj2.x;\n } else {\n hx = obj1.x;\n lx = obj2.x;\n }\n if (obj1.y < obj2.y) {\n ly = obj1.y;\n hy = obj2.y;\n } else {\n hy = obj1.y;\n ly = obj2.y;\n }\n var k = (obj2.y - obj1.y) / (obj2.x - obj1.x);\n var z = obj1.y - k * obj1.x;\n\n // 斜率大于1时比较x方向的差距,否则比较y方向的差距\n\n var py = k * x + z;\n var px = (y - z) / k;\n if (k > 1 || k < -1) {\n if (ly <= y && y <= hy && x - px >= -5 && x - px <= 5) {\n selected = true;\n break;\n } else {\n selected = false;\n }\n } else {\n if (lx <= x && x <= hx && y - py >= -5 && y - py <= 5) {\n selected = true;\n break;\n } else {\n selected = false;\n }\n }\n }\n }\n }\n if (selected) {\n if (this._owner.get_statues() == 0x00000001) {} else {\n this._owner.canvas.style.cursor = \"pointer\";\n }\n } else {\n if (this._owner.get_statues() == 0x00000001) {} else {\n this._owner.canvas.style.cursor = \"initial\";\n }\n }\n\n return selected;\n }\n\n /**\r\n * yx 获取对应的属性值\r\n */\n\n }, {\n key: \"getProp\",\n value: function getProp(prop) {\n return this[prop];\n }\n\n /**\r\n * @return java.awt.Rectangle\r\n * @roseuid 3E0A6E1B039A\r\n */\n\n }, {\n key: \"getRepaintRect\",\n value: function getRepaintRect() {\n var rct = new Rectangle();\n return rct;\n }\n\n /**\r\n * 检查新折点与哪个原有折点距离最近\r\n *\r\n * @param point\r\n * @return\r\n */\n\n }, {\n key: \"checkWhichpoint\",\n value: function checkWhichpoint(point) {\n var d = 0;\n var i = 0;\n var position = -1;\n for (i = 0; i < this.vector.length; i++) {\n var obj = this.vector[i];\n d = Math.abs(Math.sqrt((point.y - obj.y) * (point.y - obj.y) + (point.x - obj.x) * (point.x - obj.x)));\n if (d <= 10) {\n position = i;\n this.changevector = i;\n break;\n }\n }\n\n return position;\n }\n\n /**\r\n * 得到点到点之间的距离\r\n *\r\n * @param point1\r\n * @param point2\r\n * @return\r\n */\n\n }, {\n key: \"getDistance\",\n value: function getDistance(point1, point2) {\n var d = -1;\n d = Math.abs(Math.sqrt((point2.y - point1.y) * (point2.y - point1.y) + (point2.x - point1.x) * (point2.x - point1.x)));\n return d;\n }\n\n /**\r\n * 检查线与线的夹角是否小于一个给定值\r\n *\r\n * @param point1\r\n * @param point2\r\n * @param point3\r\n * @return\r\n */\n\n }, {\n key: \"lineTolineAngle\",\n value: function lineTolineAngle(point1, point2, point3) {\n var k1 = 0;\n var k2 = 0;\n var a = 0;\n if (point2.x == point1.x && point3.x == point2.x) {\n return true;\n } else if (point2.x == point1.x) {\n k1 = 0;\n k2 = (point3.y - point2.y) / (point3.x - point2.x);\n a = Math.abs((k2 - k1) / (1 + k1 * k2));\n if (a >= Math.tan(85 / 180 * Math.PI)) {\n return true;\n } else {}\n } else {\n if (point3.x == point2.x) {\n k2 = 0;\n k1 = (point2.y - point1.y) / (point2.x - point1.x);\n a = Math.abs((k2 - k1) / (1 + k1 * k2));\n if (a >= Math.tan(85 / 180 * Math.PI)) {\n return true;\n } else {}\n } else {\n k1 = (point2.y - point1.y) / (point2.x - point1.x);\n k2 = (point3.y - point2.y) / (point3.x - point2.x);\n a = Math.abs((k2 - k1) / (1 + k1 * k2));\n if (a <= Math.tan(5 / 180 * Math.PI)) {\n return true;\n } else {}\n }\n }\n return false;\n }\n\n /**\r\n * @return java.awt.Point\r\n * @roseuid 3E0A6E1B03B8\r\n */\n\n }, {\n key: \"getMovepoint\",\n value: function getMovepoint() {\n return this._movepoint;\n }\n }, {\n key: \"setMovepoint\",\n value: function setMovepoint(p) {\n this._movepoint = p;\n }\n\n /**\r\n * 返回开始结点的坐标\r\n *\r\n * @return\r\n */\n\n }, {\n key: \"getStartPoint\",\n value: function getStartPoint() {\n var nd = this.getStartnode();\n if (nd != null) {\n var p = new _Point2.default(nd.x + nd.width / 2, nd.y + nd.height / 2);\n\n this._startpoint = p;\n return p;\n }\n return this._startpoint;\n }\n\n /**\r\n * 返回结束结点的坐标\r\n *\r\n * @return java.awt.Point\r\n * @roseuid 3E0A6E1B03CC\r\n */\n\n }, {\n key: \"getEndPoint\",\n value: function getEndPoint() {\n var nd = this.getEndnode();\n if (nd != null) {\n var p = new _Point2.default(nd.x + nd.width / 2, nd.y + nd.height / 2);\n\n this._endpoint = p;\n return p;\n } else {\n return this._endpoint;\n }\n }\n }, {\n key: \"removeSubElement\",\n value: function removeSubElement(id) {\n return false;\n }\n }, {\n key: \"removeAllSubElement\",\n value: function removeAllSubElement() {}\n\n //拼装XML\n\n }, {\n key: \"toXML\",\n value: function toXML() {\n var str = \"\\n\";\n\n str += \"\" + this.replaceCharacter(this.state) + \"\\n\";\n str += \"\" + this.replaceCharacter(this.startnodeid) + \"\\n\";\n str += \"\" + this.replaceCharacter(this.endnodeid) + \"\\n\";\n str += \"\" + this.ispassed + \"\\n\";\n str += \"\" + this.isreturn + \"\\n\";\n str += \"\" + this.replaceCharacter(this.condition) + \"\\n\";\n str += \"\" + this.replaceCharacter(this.filtercondition) + \"\\n\";\n str += \"\" + this.replaceCharacter(this.editMode) + \"\\n\";\n str += \"\" + this.replaceCharacter(this.processDescription) + \"\\n\";\n str += \"\" + this.formlist + \"\\n\";\n str += \"\" + this.replaceCharacter(this.action) + \"\\n\";\n str += \"\" + this.replaceCharacter(this.pointstack) + \"\\n\";\n str += \"\\n\";\n str += _get(Relation.prototype.__proto__ || Object.getPrototypeOf(Relation.prototype), \"toXML\", this).call(this);\n\n str += \"\\n\";\n\n return str;\n }\n }]);\n\n return Relation;\n}(_PaintElement3.default);\n\nRelation.ARROW_LONG = 14;\nRelation.ARROW_WIDTH = 4;\nRelation.EDITMODE_VIEW = \"00\"; // 流程条件视图编辑模式\nRelation.EDITMODE_CODE = \"01\"; // 流程条件代码编辑模式\nRelation.PAI = 3.1415926525;\n\nexports.default = Relation;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNi5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy9zcmMvZWxlbWVudC9SZWxhdGlvbi5qcz9jYmJjIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBQYWludEVsZW1lbnQgZnJvbSBcIi4vUGFpbnRFbGVtZW50XCI7XHJcbmltcG9ydCBSZXNvdXJjZXMgZnJvbSBcIi4uL3V0aWxpdHkvUmVzb3VyY2VzXCI7XHJcbmltcG9ydCBQb2ludCBmcm9tIFwiLi4vdXRpbGl0eS9Qb2ludFwiO1xyXG5pbXBvcnQgUG9seWdvbiBmcm9tIFwiLi4vdXRpbGl0eS9Qb2x5Z29uXCI7XHJcbmltcG9ydCBTdHJpbmdVdGlsIGZyb20gXCIuLi91dGlsaXR5L1N0cmluZ1V0aWxcIjtcclxuXHJcbmNsYXNzIFJlbGF0aW9uIGV4dGVuZHMgUGFpbnRFbGVtZW50IHtcclxuICBjb25zdHJ1Y3RvcihkaWFncmFtKSB7XHJcbiAgICBzdXBlcihkaWFncmFtKTtcclxuXHJcbiAgICB0aGlzLnN0YXRlID0gXCJcIjtcclxuXHJcbiAgICB0aGlzLmkgPSAwO1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50LngsIGVuZFBvaW50LnkpLCBuZXcgUG9pbnQoc3RhcnRQb2ludC54LCBzdGFydFBvaW50LnkpLCBkMywgaDMpOyAvLyDlvpfliLDmtYHnqIvnur/nrq3lpLTnmoTlnZDmoIdcclxuXHJcbiAgICAgIGxldCBlUG9pbnQgPSBudWxsO1xyXG5cclxuICAgICAgZVBvaW50ID0gdGhpcy5nZXRBcnJvd2hlYWQobmV3IFBvaW50KHN0YXJ0UG9pbnQueCwgc3RhcnRQb2ludC55KSwgbmV3IFBvaW50KGVuZFBvaW50LngsIGVuZFBvaW50LnkpLCBkMiwgaDIpOyAvLyDlvpfliLDmtYHnqIvnur/nrq3lpLTnmoTlnZDmoIdcclxuXHJcbiAgICAgIGlmICh0aGlzLnZlY3Rvci5sZW5ndGggPCAzKSB7XHJcbiAgICAgICAgLy8g6byg5qCH5LuO5byA5aeL57uT54K55ouW5ouJ5Yiw57uT5bC+57uT54K555qE6L+H56iL5Lit77yM6byg5qCH5b2T5YmN56e75Yqo54K55L2c5Li65pqC5pe255qE5bC+57uT54K5XHJcblxyXG4gICAgICAgIGlmICh0aGlzLl9tb3ZlcG9pbnQgIT0gbnVsbCkge1xyXG4gICAgICAgICAgc1BvaW50ID0gdGhpcy5nZXRBcnJvd2hlYWQobmV3IFBvaW50KHRoaXMuX21vdmVwb2ludC54LCB0aGlzLl9tb3ZlcG9pbnQueSksIG5ldyBQb2ludChzdGFydFBvaW50LngsIHN0YXJ0UG9pbnQueSksIGQzLCBoMyk7XHJcbiAgICAgICAgICBnLmRyYXdMaW5lKHNQb2ludC54LCBzUG9pbnQueSwgdGhpcy5fbW92ZXBvaW50LngsIHRoaXMuX21vdmVwb2ludC55KTtcclxuXHJcbiAgICAgICAgICBzdGFydFBvaW50LnggPSB0aGlzLl9tb3ZlcG9pbnQueDtcclxuICAgICAgICAgIHN0YXJ0UG9pbnQueSA9IHRoaXMuX21vdmVwb2ludC55O1xyXG5cclxuICAgICAgICAgIGVQb2ludCA9IHRoaXMuZ2V0QXJyb3doZWFkKG5ldyBQb2ludChzdGFydFBvaW50LngsIHN0YXJ0UG9pbnQueSksIG5ldyBQb2ludChlbmRQb2ludC54LCBlbmRQb2ludC55KSwgZDIsIGgyKTtcclxuICAgICAgICAgIGcuZHJhd0xpbmUodGhpcy5fbW92ZXBvaW50LngsIHRoaXMuX21vdmVwb2ludC55LCBlUG9pbnQueCwgZVBvaW50LnkpO1xyXG4gICAgICAgICAgdGhpcy5fbW92ZXBvaW50ID0gbnVsbDtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgZy5kcmF3TGluZShzUG9pbnQueCwgc1BvaW50LnksIGVQb2ludC54LCBlUG9pbnQueSk7XHJcbiAgICAgICAgfVxyXG4gICAgICB9IGVsc2Uge1xyXG4gICAgICAgIGlmICh0aGlzLl9tb3ZlcG9pbnQgIT0gbnVsbCkge1xyXG4gICAgICAgICAgLy8g55S75rWB56iL57q/5oqY54K55pe25ouW5ouJ6byg5qCH55qE5oOF5Ya1KOajgOafpeeCueWHu+eahOaYr+S4jeaYr+WOn+adpeeahOaKmOeCuSlcclxuICAgICAgICAgIGxldCB3aGljaExpbmUgPSB0aGlzLmdldFdoaWNoTGluZSh0aGlzLmdldEJyZWFrcG9pbnQoKSk7XHJcbiAgICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8IHRoaXMudmVjdG9yLmxlbmd0aCAtIDE7IGorKykge1xyXG4gICAgICAgICAgICBsZXQgb2JqMSA9IHRoaXMudmVjdG9yW2pdO1xyXG4gICAgICAgICAgICBsZXQgb2JqMiA9IHRoaXMudmVjdG9yW2ogKyAxXTtcclxuXHJcbiAgICAgICAgICAgIHN0YXJ0UG9pbnQueCA9IG9iajEueDtcclxuICAgICAgICAgICAgc3RhcnRQb2ludC55ID0gb2JqMS55O1xyXG5cclxuICAgICAgICAgICAgaWYgKGogPT0gMCkge1xyXG4gICAgICAgICAgICAgIG9iajEgPSB0aGlzLmdldFN0YXJ0UG9pbnQoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAoaiA9PSB0aGlzLnZlY3Rvci5sZW5ndGggLSAyKSB7XHJcbiAgICAgICAgICAgICAgZVBvaW50ID0gdGhpcy5nZXRBcnJvd2hlYWQobmV3IFBvaW50KHN0YXJ0UG9pbnQueCwgc3RhcnRQb2ludC55KSwgbmV3IFBvaW50KGVuZFBvaW50LngsIGVuZFBvaW50LnkpLCBkMiwgaDIpO1xyXG4gICAgICAgICAgICAgIG9iajIgPSBlUG9pbnQ7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgaWYgKGogPT0gd2hpY2hMaW5lKSB7XHJcbiAgICAgICAgICAgICAgZy5kcmF3TGluZShvYmoxLngsIG9iajEueSwgdGhpcy5fbW92ZXBvaW50LngsIHRoaXMuX21vdmVwb2ludC55KTtcclxuICAgICAgICAgICAgICBzdGFydFBvaW50LnggPSB0aGlzLl9tb3ZlcG9pbnQueDtcclxuICAgICAgICAgICAgICBzdGFydFBvaW50LnkgPSB0aGlzLl9tb3ZlcG9pbnQueTtcclxuICAgICAgICAgICAgICBpZiAoaiA9PSB0aGlzLnZlY3Rvci5sZW5ndGggLSAyKSB7XHJcbiAgICAgICAgICAgICAgICBzUG9pbnQgPSB0aGlzLmdldEFycm93aGVhZChuZXcgUG9pbnQoZW5kUG9pbnQueCwgZW5kUG9pbnQueSksIG5ldyBQb2ludChzdGFydFBvaW50LngsIHN0YXJ0UG9pbnQueSksIGQzLCBoMyk7XHJcbiAgICAgICAgICAgICAgICBvYmoxID0gc1BvaW50O1xyXG5cclxuICAgICAgICAgICAgICAgIGVQb2ludCA9IHRoaXMuZ2V0QXJyb3doZWFkKG5ldyBQb2ludChzdGFydFBvaW50LngsIHN0YXJ0UG9pbnQueSksIG5ldyBQb2ludChlbmRQb2ludC54LCBlbmRQb2ludC55KSwgZDIsIGgyKTtcclxuICAgICAgICAgICAgICAgIG9iajIgPSBlUG9pbnQ7XHJcbiAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgIGcuZHJhd0xpbmUodGhpcy5fbW92ZXBvaW50LngsIHRoaXMuX21vdmVwb2ludC55LCBvYmoyLngsIG9iajIueSk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgZy5kcmF3TGluZShvYmoxLngsIG9iajEueSwgb2JqMi54LCBvYmoyLnkpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgICB0aGlzLl9tb3ZlcG9pbnQgPSBudWxsO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAvLyDpvKDmoIfph4rmlL7ngrnorr7kuLrmlrDmipjngrlcclxuICAgICAgICAgIGZvciAobGV0IGsgPSAwOyBrIDwgdGhpcy52ZWN0b3IubGVuZ3RoIC0gMTsgaysrKSB7XHJcblx0XHRcdFx0XHRcdC8vIOmcgOimgeeUn+aIkOmUmueCuVxyXG5cdFx0XHRcdFx0XHRoYXNNZXJnUG9pbnQgPSB0cnVlO1xyXG4gICAgICAgICAgICBsZXQgb2JqMyA9IHRoaXMudmVjdG9yW2tdO1xyXG4gICAgICAgICAgICBsZXQgb2JqNCA9IHRoaXMudmVjdG9yW2sgKyAxXTtcclxuICAgICAgICAgICAgc3RhcnRQb2ludC54ID0gb2JqMy54O1xyXG4gICAgICAgICAgICBzdGFydFBvaW50LnkgPSBvYmozLnk7XHJcbiAgICAgICAgICAgIGlmIChrID09IDApIHtcclxuXHRcdFx0XHRcdFx0XHRoYXNNZXJnUG9pbnQgPSBmYWxzZTtcclxuICAgICAgICAgICAgICBvYmozID0gdGhpcy5nZXRTdGFydFBvaW50KCk7XHJcbiAgICAgICAgICAgICAgb2JqMyA9IHRoaXMuZ2V0QXJyb3doZWFkKG5ldyBQb2ludChvYmo0LngsIG9iajQueSksIG5ldyBQb2ludChvYmozLngsIG9iajMueSksIGQzLCBoMyk7XHJcbiAgICAgICAgICAgICAgLy8gb2JqMyA9IHNQb2ludDtcclx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QxLnggPSBhcnJvd2hlYWQueCArIFJlbGF0aW9uLkFSUk9XX0xPTkc7XHJcbiAgICAgIGFycm93c3RhcnQxLnkgPSBhcnJvd2hlYWQueSArIFJlbGF0aW9uLkFSUk9XX1dJRFRIO1xyXG4gICAgICBhcnJvd3N0YXJ0Mi54ID0gYXJyb3doZWFkLnggKyBSZWxhdGlvbi5BUlJPV19MT05HO1xyXG4gICAgICBhcnJvd3N0YXJ0Mi55ID0gYXJyb3doZWFkLnkgLSBSZWxhdGlvbi5BUlJPV19XSURUSDtcclxuICAgIH0gZWxzZSBpZiAoeDIgPiBhcnJvd2hlYWQueCAmJiB5MiA+IGFycm93aGVhZC55KSB7XHJcbiAgICAgIGFycm93c3RhcnQxLnggPSBhcnJvd2hlYWQueCArIChSZWxhdGlvbi5BUlJPV19MT05HICogY29zYSAtIFJlbGF0aW9uLkFSUk9XX1dJRFRIICogc2luYSk7XHJcbiAgICAgIGFycm93c3RhcnQxLnkgPSBhcnJvd2hlYWQueSArIChSZWxhdGlvbi5BUlJPV19MT05HICogc2luYSArIFJlbGF0aW9uLkFSUk9XX1dJRFRIICogY29zYSk7XHJcbiAgICAgIGFycm93c3RhcnQyLnggPSBhcnJvd2hlYWQueCArIChSZWxhdGlvbi5BUlJPV19MT05HICogY29zYSArIFJlbGF0aW9uLkFSUk9XX1dJRFRIICogc2luYSk7XHJcbiAgICAgIGFycm93c3RhcnQyLnkgPSBhcnJvd2hlYWQueSArIChSZWxhdGlvbi5BUlJPV19MT05HICogc2luYSAtIFJlbGF0aW9uLkFSUk9XX1dJRFRIICogY29zYSk7XHJcbiAgICB9IGVsc2UgaWYgKHgyID09IGFycm93aGVhZC54ICYmIHkyID4gYXJyb3doZWFkLnkpIHtcclxuICAgICAgYXJyb3dzdGFydDEueCA9IGFycm93aGVhZC54IC0gUmVsYXRpb24uQVJST1dfV0lEVEg7XHJcbiAgICAgIGFycm93c3RhcnQxLnkgPSBhcnJvd2hlYWQueSArIFJlbGF0aW9uLkFS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GxldCBvYmoyID0gdGhpcy52ZWN0b3JbbSArIDFdO1xyXG4gICAgICAgICAgICBpZiAobSA9PSAwKSB7XHJcbiAgICAgICAgICAgICAgb2JqMSA9IHRoaXMuZ2V0U3RhcnRQb2ludCgpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmIChtID09IHRoaXMudmVjdG9yLmxlbmdodCAtIDIpIHtcclxuICAgICAgICAgICAgICBvYmoyID0gdGhpcy5nZXRFbmRQb2ludCgpO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBkaXN0YW5jZSA9IHRoaXMuZ2V0RGlzdGFuY2Uob2JqMSwgb2JqMik7XHJcblxyXG4gICAgICAgICAgICBpZiAoZGlzdGFuY2UgPD0gMTApIHtcclxuICAgICAgICAgICAgICAvLyDoi6XkuKTngrnnm7jpgrvkuJTot53nprvlsI/kuo4xMO+8jOWImeWIoOWOu+WFtuS4reS4gOS4queCuVxyXG4gICAgICAgICAgICAgIGlmIChtID09IHRoaXMudmVjdG9yLmxlbmd0aCAtIDIpIHtcclxuXHRcdFx0XHRcdFx0XHRcdC8vIOS7juaVsOe7hOS4reenu+mZpFxyXG4gICAgICAgICAgICAgICAgdGhpcy52ZWN0b3IgPSB0aGlzLnJlbW92ZUVsZW1lbnRBdCh0aGlzLnZlY3RvciwgbSk7XHJcblx0XHRcdFx0XHRcdFx0XHR0aGlzLmRlbFZlY3RvciA9IHRydWU7XHJcbiAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIHRoaXMudmVjdG9yID0gdGhpcy5yZW1vdmVFbGVtZW50QXQodGhpcy52ZWN0b3IsIG0rMSk7XHJcblx0XHRcdFx0XHRcdFx0XHR0aGlzLmRlbFZlY3RvciA9IHRydWU7XHJcbiAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgICBpZiAobSA9PSBzaXplKSB7XHJcbiAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICBicmVhaztcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgICAgd2hpbGUgKHRydWUpIHtcclxuICAgICAgICAvLyDmiornm7jpgrvnmoTkuKTmnaHlpLnop5LlsI/kuo415bqm55qE55u057q/5ZCI5bm25Li65LiA5p2h55u057q/XHJcbiAgICAgICAgaWYgKHRoaXMudmVjdG9yLmxlbmd0aCA+PSAzKSB7XHJcbiAgICAgICAgICBsZXQgcmVtb3ZlID0gZmFsc2U7XHJcbiAgICAgICAgICBsZXQgbiA9IDA7XHJcbiAgICAgICAgICBsZXQgc2l6ZSA9IHRoaXMudmVjdG9yLmxlbmd0aCAtIDI7XHJcbiAgICAgICAgICBmb3IgKG4gPSAwOyBuIDwgc2l6ZTsgbisrKSB7XHJcbiAgICAgICAgICAgIGxldCBvYmoxID0gdGhpcy52ZWN0b3Jbbl07XHJcbiAgICAgICAgICAgIGxldCBvYmoyID0gdGhpcy52ZWN0b3JbbiArIDFdO1xyXG4gICAgICAgICAgICBsZXQgb2JqMyA9IHRoaXMudmVjdG9yW24gKyAyXTtcclxuICAgICAgICAgICAgaWYgKG4gPT0gMCkge1xyXG4gICAgICAgICAgICAgIG9iajEgPSB0aGlzLmdldFN0YXJ0UG9pbnQoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAobiA9PSB0aGlzLnZlY3Rvci5sZW5ndGggLSAzKSB7XHJcbiAgICAgICAgICAgICAgb2JqMyA9IHRoaXMuZ2V0RW5kUG9pbnQoKTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgcmVtb3ZlID0gdGhpcy5saW5lVG9saW5lQW5nbGUob2JqMSwgb2JqMiwgb2JqMyk7IC8vIOWIpOaWreS4pOe6v+WkueinkuaYr+WQpuWwj+S6jjXluqZcclxuICAgICAg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ICAgKiBAcGFyYW0gcDJcclxuICAgKiBAcGFyYW0gZDJcclxuICAgKiBAcGFyYW0gaDJcclxuICAgKiBAcmV0dXJuXHJcbiAgICovXHJcbiAgZ2V0QXJyb3doZWFkKHAxLCBwMiwgZDIsIGgyKSB7XHJcbiAgICBsZXQgayA9IE1hdGguYWJzKChwMi55IC0gcDEueSkgLyAocDIueCAtIHAxLngpKTtcclxuICAgIGxldCBrMiA9IGgyIC8gZDI7XHJcbiAgICBsZXQgYXJyb3doZWFkID0gbmV3IFBvaW50KCk7XHJcbiAgICBpZiAocDIueSA+IHAxLnkgJiYgcDIueCA+IHAxLngpIHtcclxuICAgICAgaWYgKGsyID49IGspIHtcclxuICAgICAgICBhcnJvd2hlYWQueCA9IHAyLnggLSBkMiAvIDI7XHJcbiAgICAgICAgYXJyb3doZWFkLnkgPSBwMi55IC0gKGsgKiBkMikgLyAyO1xyXG4gICAgICB9IGVsc2Uge1xyXG4gICAgICAgIGFycm93aGVhZC54ID0gcDIueCAtIGgyIC8gMiAvIGs7XHJcbiAgICAgICAgYXJyb3doZWFkLnkgPSBwMi55IC0gaDIgLyAyO1xyXG4gICAgICB9XHJcbiAgICB9IGVsc2UgaWYgKHAyLnkgPT0gcDEueSAmJiBwMi54ID4gcDEueCkge1xyXG4gICAgICBhcnJvd2hlYWQueCA9IHAyLnggLSBkMiAvIDI7XHJcbiAgICAgIGFycm93aGVhZC55ID0gcDIueTtcclxuICAgIH0gZWxzZSBpZiAocDIueSA8IHAxLnkgJiYgcDIueCA+IHAxLngpIHtcclxuICAgICAgaWYgKGsyID49IGspIHtcclxuICAgICAgICBhcnJvd2hlYWQueSA9IHAyLnkgKyAoZDIgLyAyKSAqIGs7XHJcbiAgICAgICAgYXJyb3doZWFkLnggPSBwMi54IC0gZDIgLyAyO1xyXG4gICAgICB9IGVsc2Uge1xyXG4gICAgICAgIGFycm93aGVhZC54ID0gcDIueCAtIGgyIC8gMiAvIGs7XHJcbiAgICAgICAgYXJyb3doZWFkLnkgPSBwMi55ICsgaDIgLyAyO1xyXG4gICAgICB9XHJcbiAgICB9IGVsc2UgaWYgKHAyLnkgPCBwMS55ICYmIHAyLnggPT0gcDEueCkge1xyXG4gICAgICBhcnJvd2hlYWQueCA9IHAyLng7XHJcbiAgICAgIGFycm93aGVhZC55ID0gcDIueSArIGgyIC8gMjtcclxuICAgIH0gZWxzZSBpZiAocDIueSA8IHAxLnkgJiYgcDIueCA8IHAxLngpIHtcclxuICAgICAgaWYgKGsyID49IGspIHtcclxuICAgICAgICBhcnJvd2hlYWQueCA9IHAyLnggKyBkMiAvIDI7XHJcbiAgICAgICAgYXJyb3doZWFkLnkgPSBwMi55ICsgKGsgKiBkMikgLyAyO1xyXG4gICAgICB9IGVsc2Uge1xyXG4gICAgICAgIGFycm93aGVhZC54ID0gcDIueCArIGgyIC8gMiAvIGs7XHJcbiAgICAgICAgYXJyb3doZWFkLnkgPSBwMi55ICsgaDIgLyAyO1xyXG4gICAgICB9XHJcbiAgICB9IGVsc2UgaWYgKHAyLnkgPT0gcDEueSAmJiBwMi54IDwgcDEueCkge1xyXG4gICAgICBhcnJvd2hlYWQueCA9IHAyLnggKyBkMiAvIDI7XHJcbiAgICAgIGFycm93aGVhZC55ID0gcDIueTtcclxuICAgIH0gZWxzZSBpZiAocDIueSA+IHAxLnkgJiYgcDIueCA8IHAxLngpIHtcclxuICAgICAgaWYgKGsyID49IGspIHtcclxuICAgICAgICBhcnJvd2hlYWQueCA9IHAyLnggKyBkMiAvIDI7XHJcbiAgICAgICAgYXJyb3doZWFkLnkgPSBwMi55IC0gKGQyICogaykgLyAyO1xyXG4gICAgICB9IGVsc2Uge1xyXG4gICAgICAgIGFycm93aGVhZC54ID0gcDIueCArIGgyIC8gMiAvIGs7XHJcbiAgICAgICAgYXJyb3doZWFkLnkgPSBwMi55IC0gaDIgLyAyO1xyXG4gICAgICB9XHJcbiAgICB9IGVsc2Uge1xyXG4gICAgICBhcnJvd2hlYWQueCA9IHAyLng7XHJcbiA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pcy5nZXRFbmRQb2ludCgpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaWYgKG9iajEueCA9PSBvYmoyLngpIHtcclxuICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICBpZiAob2JqMS54IDwgb2JqMi54KSB7XHJcbiAgICAgICAgICAgIGx4ID0gb2JqMS54O1xyXG4gICAgICAgICAgICBoeCA9IG9iajIueDtcclxuICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIGh4ID0gb2JqMS54O1xyXG4gICAgICAgICAgICBseCA9IG9iajIueDtcclxuICAgICAgICAgIH1cclxuICAgICAgICAgIGlmIChvYmoxLnkgPCBvYmoyLnkpIHtcclxuICAgICAgICAgICAgbHkgPSBvYmoxLnk7XHJcbiAgICAgICAgICAgIGh5ID0gb2JqMi55O1xyXG4gICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgaHkgPSBvYmoxLnk7XHJcbiAgICAgICAgICAgIGx5ID0gb2JqMi55O1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgICAgbGV0IGsgPSAob2JqMi55IC0gb2JqMS55KSAvIChvYmoyLnggLSBvYmoxLngpO1xyXG4gICAgICAgICAgbGV0IHogPSBvYmoxLnkgLSBrICogb2JqMS54O1xyXG4gICAgICAgICAgbGV0IHB5ID0gayAqIHggKyB6O1xyXG4gICAgICAgICAgbGV0IHB4ID0gKHkgLSB6KSAvIGs7XHJcbiAgICAgICAgICBpZiAoayA+IDEgfHwgayA8IC0xKSB7XHJcbiAgICAgICAgICAgIGlmIChseSA8PSB5ICYmIHkgPD0gaHkgJiYgeCAtIHB4ID49IC01ICYmIHggLSBweCA8PSA1KSB7XHJcbiAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIGlmIChseCA8PSB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uaXNTZWxlY3RlZCh4LCB5KSkge1xyXG4gICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHRoaXMudmVjdG9yLmxlbmd0aCAtIDE7IGkrKykge1xyXG4gICAgICAgIGxldCBvYmoxID0gdGhpcy52ZWN0b3JbaV07XHJcbiAgICAgICAgbGV0IG9iajIgPSB0aGlzLnZlY3RvcltpICsgMV07XHJcbiAgICAgICAgaWYgKGkgPT0gMCkge1xyXG4gICAgICAgICAgb2JqMSA9IHRoaXMuZ2V0U3RhcnRQb2ludCgpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAoaSA9PSB0aGlzLnZlY3Rvci5sZW5ndGggLSAyKSB7XHJcbiAgICAgICAgICBvYmoyID0gdGhpcy5nZXRFbmRQb2ludCgpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaWYgKG9iajEueCA9PSBvYmoyLngpIHtcclxuICAgICAgICAgIHNlbGVjdGVkID0gTWF0aC5hYnMoeCAtIG9iajEueCkgPCA1ICYmICgoeSA+IG9iajEueSAmJiB5IDwgb2JqMi55KSB8fCAoeSA+IG9iajIueSAmJiB5IDwgb2JqMS55KSk7XHJcbiAgICAgICAgICBicmVhaztcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgaWYgKG9iajEueCA8IG9iajIueCkge1xyXG4gICAgICAgICAgICBseCA9IG9iajEueDtcclxuICAgICAgICAgICAgaHggPSBvYmoyLng7XHJcbiAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBoeCA9IG9iajEueDtcclxuICAgICAgICAgICAgbHggPSBvYmoyLng7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgICBpZiAob2JqMS55IDwgb2JqMi55KSB7XHJcbiAgICAgICAgICAgIGx5ID0gb2JqMS55O1xyXG4gICAgICAgICAgICBoeSA9IG9iajIueTtcclxuICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIGh5ID0gb2JqMS55O1xyXG4gICAgICAgICAgICBseSA9IG9iajIueTtcclxuICAgICAgICAgIH1cclxuICAgICAgICAgIGxldCBrID0gKG9iajIueSAtIG9iajEueSkgLyAob2JqMi54IC0gb2JqMS54KTtcclxuICAgICAgICAgIGxldCB6ID0gb2JqMS55IC0gayAqIG9iajEueDtcclxuXHJcbiAgICAgICAgICAvLyDmlpznjoflpKfkuo4x5pe25q+U6L6DeOaWueWQkeeahOW3rui3nSzlkKbliJnmr5TovoN55pa55ZCR55qE5beu6LedXHJcblxyXG4gICAgICAgICAgbGV0IHB5ID0gayAqIHggKyB6O1xyXG4gICAgICAgICAgbGV0IHB4ID0gKHkgLSB6KSAvIGs7XHJcbiAgICAgICAgICBpZiAoayA+IDEgfHwgayA8IC0xKSB7XHJcbiAgICAgICAgICAgIGlmIChseSA8PSB5ICYmIHkgPD0gaHkgJiYgeCAtIHB4ID49IC01ICYmIHggLSBweCA8PSA1KSB7XHJcbiAgICAgICAgICAgICAgc2VsZWN0ZWQgPSB0cnVlO1xyXG4gICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgIHNlbGVjdGVkID0gZmFsc2U7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIGlmIChseCA8PSB4ICYmIHggPD0gaHggJiYgeSAtIHB5ID49IC01ICYmIHkgLSBweSA8PSA1KSB7XHJcbiAgICAgICAgICAgICAgc2VsZWN0ZWQgPSB0cnVlO1xyXG4gICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgIHNlbGVjdGVkID0gZmFsc2U7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgIH1cclxuICAgIGlmIChzZWxlY3RlZCkge1xyXG4gICAgICBpZiAodGhpcy5fb3duZXIuZ2V0X3N0YXR1ZXMoK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dGhpcy52ZWN0b3IubGVuZ3RoOyBpKyspIHtcclxuICAgICAgbGV0IG9iaiA9IHRoaXMudmVjdG9yW2ldO1xyXG4gICAgICBkID0gTWF0aC5hYnMoTWF0aC5zcXJ0KChwb2ludC55IC0gb2JqLnkpICogKHBvaW50LnkgLSBvYmoueSkgKyAocG9pbnQueCAtIG9iai54KSAqIChwb2ludC54IC0gb2JqLngpKSk7XHJcbiAgICAgIGlmIChkIDw9IDEwKSB7XHJcbiAgICAgICAgcG9zaXRpb24gPSBpO1xyXG4gICAgICAgIHRoaXMuY2hhbmdldmVjdG9yID0gaTtcclxuICAgICAgICBicmVhaztcclxuICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHJldHVybiBwb3NpdGlvbjtcclxuICB9XHJcblxyXG4gIC8qKlxyXG4gICAqIOW+l+WIsOeCueWIsOeCueS5i+mXtOeahOi3neemu1xyXG4gICAqXHJcbiAgICogQHBhcmFtIHBvaW50MVxyXG4gICAqIEBwYXJhbSBwb2ludDJcclxuICAgKiBAcmV0dXJuXHJcbiAgICovXHJcbiAgZ2V0RGlzdGFuY2UocG9pbnQxLCBwb2ludDIpIHtcclxuICAgIGxldCBkID0gLTE7XHJcbiAgICBkID0gTWF0aC5hYnMoTWF0aC5zcXJ0KChwb2ludDIueSAtIHBvaW50MS55KSAqIChwb2ludDIueSAtIHBvaW50MS55KSArIChwb2ludDIueCAtIHBvaW50MS54KSAqIChwb2ludDIueCAtIHBvaW50MS54KSkpO1xyXG4gICAgcmV0dXJuIGQ7XHJcbiAgfVxyXG5cclxuICAvKipcclxuICAgKiDmo4Dmn6Xnur/kuI7nur/nmoTlpLnop5LmmK/lkKblsI/kuo7kuIDkuKrnu5nlrprlgLxcclxuICAgKlxyXG4gICAqIEBwYXJhbSBwb2ludDFcclxuICAgKiBAcGFyYW0gcG9pbnQyXHJcbiAgICogQHBhcmFtIHBvaW50M1xyXG4gICAqIEByZXR1cm5cclxuICAgKi9cclxuICBsaW5lVG9saW5lQW5nbGUocG9pbnQxLCBwb2ludDIsIHBvaW50Mykge1xyXG4gICAgbGV0IGsxID0gMDtcclxuICAgIGxldCBrMiA9IDA7XHJcbiAgICBsZXQgYSA9IDA7XHJcbiAgICBpZiAocG9pbnQyLnggPT0gcG9pbnQxLnggJiYgcG9pbnQzLnggPT0gcG9pbnQyLngpIHtcclxuICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICB9IGVsc2UgaWYgKHBvaW50Mi54ID09IHBvaW50MS54KSB7XHJcbiAgICAgIGsxID0gMDtcclxuICAgICAgazIgPSAocG9pbnQzLnkgLSBwb2ludDIueSkgLyAocG9pbnQzLnggLSBwb2ludDIueCk7XHJcbiAgICAgIGEgPSBNYXRoLmFicygoazIgLSBrMSkgLyAoMSArIGsxICogazIpKTtcclxuICAgICAgaWYgKGEgPj0gTWF0aC50YW4oKDg1IC8gMTgwKSAqIE1hdGguUEkpKSB7XHJcbiAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgIH0gZWxzZSB7XHJcbiAgICAgIH1cclxuICAgIH0gZWxzZSB7XHJcbiAgICAgIGlmIChwb2ludDMueCA9PSBwb2ludDIueCkge1xyXG4gICAgICAgIGsyID0gMDtcclxuICAgICAgICBrMSA9IChwb2ludDIueSAtIHBvaW50MS55KSAvIChwb2ludDIueCAtIHBvaW50MS54KTtcclxuICAgICAgICBhID0gTWF0aC5hYnMoKGsyIC0gazEpIC8gKDEgKyBrMSAqIGsyKSk7XHJcbiAgICAgICAgaWYgKGEgPj0gTWF0aC50YW4oKDg1IC8gMTgwKSAqIE1hdGguUEkpKSB7XHJcbiAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgIH1cclxuICAgICAgfSBlbHNlIHtcclxuICAgICAgICBrMSA9IChwb2ludDIueSAtIHBvaW50MS55KSAvIChwb2ludDIueCAtIHBvaW50MS54KTtcclxuICAgICAgICBrMiA9IChwb2ludDMueSAtIHBvaW50Mi55KSAv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=webpack-internal:///6\n");
/***/ }),
/* 7 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Point = function () {\n function Point() {\n var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n _classCallCheck(this, Point);\n\n this.x = x;\n this.y = y;\n }\n\n _createClass(Point, [{\n key: \"move\",\n value: function move(x, y) {\n this.x = x;\n this.y = y;\n }\n }]);\n\n return Point;\n}();\n\nexports.default = Point;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy9zcmMvdXRpbGl0eS9Qb2ludC5qcz8xNGY3Il0sInNvdXJjZXNDb250ZW50IjpbImNsYXNzIFBvaW50ICB7XHJcbiAgICBjb25zdHJ1Y3Rvcih4ID0gMCwgeSA9IDApe1xyXG4gICAgICAgIHRoaXMueCA9IHg7XHJcbiAgICAgICAgdGhpcy55ID0geTtcclxuICAgIH1cclxuXHJcbiAgICBtb3ZlKHgsIHkpe1xyXG4gICAgICAgIHRoaXMueCA9IHg7XHJcbiAgICAgICAgdGhpcy55ID0geTtcclxuICAgIH1cclxufVxyXG5cclxuZXhwb3J0IGRlZmF1bHQgUG9pbnQ7XG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHNyYy91dGlsaXR5L1BvaW50LmpzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUE7QUFDQTtBQUFBO0FBQUE7QUFDQTtBQURBO0FBQ0E7QUFBQTtBQUNBO0FBQ0E7QUFDQTs7O0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7OztBQUdBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///7\n");
/***/ }),
/* 8 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _Node2 = __webpack_require__(3);\n\nvar _Node3 = _interopRequireDefault(_Node2);\n\nvar _FlowDiagram = __webpack_require__(4);\n\nvar _FlowDiagram2 = _interopRequireDefault(_FlowDiagram);\n\nvar _PaintElement = __webpack_require__(1);\n\nvar _PaintElement2 = _interopRequireDefault(_PaintElement);\n\nvar _Rectangle = __webpack_require__(5);\n\nvar _Rectangle2 = _interopRequireDefault(_Rectangle);\n\nvar _Resources = __webpack_require__(0);\n\nvar _Resources2 = _interopRequireDefault(_Resources);\n\nvar _StringUtil = __webpack_require__(2);\n\nvar _StringUtil2 = _interopRequireDefault(_StringUtil);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar StartNode = function (_Node) {\n _inherits(StartNode, _Node);\n\n function StartNode(diagram) {\n _classCallCheck(this, StartNode);\n\n return _possibleConstructorReturn(this, (StartNode.__proto__ || Object.getPrototypeOf(StartNode)).call(this, diagram));\n }\n\n _createClass(StartNode, [{\n key: \"getClassName\",\n value: function getClassName() {\n return \"cn.myapps.runtime.workflow.element.StartNode\";\n }\n }, {\n key: \"paint\",\n value: function paint(g) {\n if (this._img == null) {\n this._img = _Resources2.default.IMG_START_NODE;\n }\n\n // Call All Sub Elements PAINT METHOD.\n // 保存当前背景颜色...\n var old = this.bgcolor;\n\n // yx 判断Ctrl数组是否有值\n if (this._owner.checkSelectArr()) {\n // yx 判断是否在ctrl数据中\n if (this._owner.isInZoom(this)) {\n this.bgcolor = _PaintElement2.default.DEF_CURREDITCOLOR;\n }\n } else {\n if (this._owner.isCurrentToEdit(this)) {\n this.bgcolor = _PaintElement2.default.DEF_CURREDITCOLOR;\n }\n\n if (this._owner.isCurrentSelected(this)) {\n this.bgcolor = _PaintElement2.default.DEF_SELECTEDCOLOR;\n }\n }\n\n for (var i = 0; i < this._subelems.length; i++) {\n var te = this._subelems[i];\n if (te instanceof _PaintElement2.default) {\n var se = te;\n se.paint(g);\n }\n }\n\n // Fill background\n this.width = _Node3.default.M_WIDTH;\n this.m_width = _Node3.default.M_WIDTH;\n this.m_height = _Node3.default.M_HEIGHT;\n this.height = _Node3.default.M_HEIGHT;\n this.resize();\n g.setColor(this.bgcolor);\n g.fillRect(this.x - 3, this.y - 2, this.m_width + 2, this.height + 2);\n // g.setColor(\"#000\");\n // g.drawOvalBorder(this.x, this.y, this.width + Node.PAD * 3, this.height, Node.PAD);\n\n\n // Draw Image\n g.drawImage(this._img, this.x, this.y, this._imgrect.width, this._imgrect.height);\n\n // g.setColor(Resources.COLOR.lightGray);\n // g.fillRect(this._txtrect.x,this._txtrect.y,this._txtrect.width,10 + this._txtrect.height);\n // g.setColor(Resources.COLOR.black);\n // g.strokeRect(this._txtrect.x,this._txtrect.y,this._txtrect.width,10 + this._txtrect.height);\n\n // yx 给节点添加默认名称\n if (this.name == '' || this.name == null) {\n this.name = '开始';\n }\n\n if (this.name != null && this.name != \"\") {\n // yx 判断字体过多是绘画是否一直在中间\n var tx = this._txtrect.x;\n var ty = this._txtrect.y + 1.5 * this._txtrect.height;\n\n if (this._iscurrent) {\n // g.drawImage(Resources.IMG_CURRENT_NODE, this._txtrect.x,\n // this._txtrect.y, this._txtrect.width, 10 + this._txtrect.height);\n } else {\n // g.drawImage(Resources.IMG_BACKGROUND_NODE,\n // this._txtrect.x, this._txtrect.y, this._txtrect.width,\n // \t\t10 + this._txtrect.height);\n }\n\n g.setColor(_Resources2.default.COLOR.black);\n // g.drawString(StringUtil.dencodeHTML(this.name), tx + this.name.length, ty - 10);\n if (g.stringWidth(this.name) > 24) {\n g.drawText(_StringUtil2.default.dencodeHTML(this.name), tx - 8, ty - 18, 20);\n } else {\n g.drawText(_StringUtil2.default.dencodeHTML(this.name), tx - 8, ty - 10, 20);\n }\n }\n\n // 恢复当前背景颜色\n this.bgcolor = old;\n }\n }, {\n key: \"toXML\",\n value: function toXML(fieldName, fields) {\n var str = \"\\n\";\n str += _get(StartNode.prototype.__proto__ || Object.getPrototypeOf(StartNode.prototype), \"toXML\", this).call(this);\n str += \"\\n\";\n return str;\n }\n\n //xh\n // 验证器\n\n }, {\n key: \"check\",\n value: function check() {\n var result = _get(StartNode.prototype.__proto__ || Object.getPrototypeOf(StartNode.prototype), \"check\", this).call(this);\n\n if (!result) {\n return false;\n }\n\n return true;\n }\n\n //xh\n\n }, {\n key: \"hasRelation\",\n value: function hasRelation(relation) {\n var _get$call = _get(StartNode.prototype.__proto__ || Object.getPrototypeOf(StartNode.prototype), \"hasRelation\", this).call(this, relation),\n input = _get$call.input,\n output = _get$call.output;\n\n if (output == 0) {\n alert(\"请创建\" + this.name + \"节点的关联线!\");\n return false;\n } else if (input > 0) {\n alert(\"不能有其他节点指向\" + this.name + \"节点!\");\n return false;\n } else {\n return true;\n }\n }\n\n // yx\n\n }, {\n key: \"hasSomeRelation\",\n value: function hasSomeRelation(relation) {\n return _get(StartNode.prototype.__proto__ || Object.getPrototypeOf(StartNode.prototype), \"hasRelation\", this).call(this, relation);\n }\n }, {\n key: \"showTips\",\n value: function showTips(g) {\n this.drawTips(g, this.name);\n }\n }]);\n\n return StartNode;\n}(_Node3.default);\n\nexports.default = StartNode;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy9zcmMvZWxlbWVudC9TdGFydE5vZGUuanM/ODM3OCJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgTm9kZSBmcm9tIFwiLi9Ob2RlXCI7XHJcbmltcG9ydCBGbG93RGlhZ3JhbSBmcm9tIFwiLi9GbG93RGlhZ3JhbVwiO1xyXG5pbXBvcnQgUGFpbnRFbGVtZW50IGZyb20gXCIuL1BhaW50RWxlbWVudFwiO1xyXG5pbXBvcnQgUmVjdGFuZ2xlIGZyb20gXCIuLi91dGlsaXR5L1JlY3RhbmdsZV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O0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7OztBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFBQTtBQUNBO0FBQ0E7OztBQUVBO0FBQ0E7QUFDQTs7OztBQXZJQTtBQUNBO0FBeUlBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///8\n");
/***/ }),
/* 9 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _Node2 = __webpack_require__(3);\n\nvar _Node3 = _interopRequireDefault(_Node2);\n\nvar _PaintElement = __webpack_require__(1);\n\nvar _PaintElement2 = _interopRequireDefault(_PaintElement);\n\nvar _Resources = __webpack_require__(0);\n\nvar _Resources2 = _interopRequireDefault(_Resources);\n\nvar _StringUtil = __webpack_require__(2);\n\nvar _StringUtil2 = _interopRequireDefault(_StringUtil);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar AutoNode = function (_Node) {\n _inherits(AutoNode, _Node);\n\n function AutoNode(diagram) {\n _classCallCheck(this, AutoNode);\n\n /**\r\n * 自动审批时间编辑模式(默认为设计模式)\r\n */\n var _this = _possibleConstructorReturn(this, (AutoNode.__proto__ || Object.getPrototypeOf(AutoNode)).call(this, diagram));\n\n _this.autoAuditTimeEditMode = AutoNode.AUTO_AUDIT_EDIT_MODE_DESIGN;\n\n /**\r\n * 指定自动审批日期脚本\r\n */\n _this.auditDateTimeScript = \"\";\n\n /**\r\n * 是否聚合节点\r\n */\n _this.isgather = false;\n\n /**\r\n * 是否分散节点\r\n */\n _this.issplit = false;\n\n /**\r\n * 自动审批类型\r\n */\n _this.autoAuditType = 0;\n\n /**\r\n * 指定自动审批日期\r\n */\n _this.auditDateTime = \"\";\n\n /**\r\n * 滞后时间(到达以后多少时间之后自动审批)\r\n */\n _this.delayTime = \"\";\n\n /**\r\n * 滞后天数\r\n */\n _this.delayDay = \"\";\n\n /**\r\n * 滞后小时数\r\n */\n _this.delayHour = \"\";\n\n /**\r\n * 滞后分钟数\r\n */\n _this.delayMinute = \"\";\n\n _this.splitStartNode = \"\"; // 分散节点\n return _this;\n }\n\n _createClass(AutoNode, [{\n key: \"getClassName\",\n value: function getClassName() {\n return \"cn.myapps.runtime.workflow.element.AutoNode\";\n }\n }, {\n key: \"getAuditDateTime\",\n value: function getAuditDateTime(runner) {\n var calendar = Calendar.getInstance();\n\n if (autoAuditTimeEditMode == AUTO_AUDIT_EDIT_MODE_CODE && !_StringUtil2.default.isBlank(auditDateTimeScript)) {\n var obj = runner.run(\"AutoNode [name=\" + name + \"] [id=\" + id + \"] auditDateTimeScript\", _StringUtil2.default.dencodeHTML(auditDateTimeScript));\n if (obj instanceof Date) {\n calendar.setTime(obj);\n } else if (obj instanceof String) {\n var date = DateUtil.parseDate(obj, \"yyyy-MM-dd HH:mm:ss\");\n calendar.setTime(date);\n }\n } else {\n switch (autoAuditType) {\n case AUTO_AUDIT_TYPE_IMMEDIATELY:\n break;\n case AUTO_AUDIT_TYPE_SPECIFY:\n var _date = DateUtil.parseDate(this.auditDateTime, \"yyyy-MM-dd HH:mm:ss\");\n calendar.setTime(_date);\n break;\n case AUTO_AUDIT_TYPE_DELAY:\n if (!_StringUtil2.default.isBlank(delayDay)) {\n calendar.add(Calendar.DATE, Integer.parseInt(delayDay));\n }\n if (!_StringUtil2.default.isBlank(delayHour)) {\n calendar.add(Calendar.HOUR, Integer.parseInt(delayHour));\n }\n if (!_StringUtil2.default.isBlank(delayMinute)) {\n calendar.add(Calendar.MINUTE, Integer.parseInt(delayMinute));\n }\n\n break;\n default:\n break;\n }\n }\n\n return calendar.getTime();\n }\n }, {\n key: \"paint\",\n value: function paint(g) {\n if (this._img == null) {\n this._img = _Resources2.default.IMG_AUTO_NODE;\n }\n\n // Call All Sub Elements PAINT METHOD.\n // 保存当前背景颜色...\n var old = this.bgcolor;\n // yx 判断Ctrl数组是否有值\n if (this._owner.checkSelectArr()) {\n // yx 判断是否在ctrl数据中\n if (this._owner.isInZoom(this)) {\n this.bgcolor = _PaintElement2.default.DEF_CURREDITCOLOR;\n }\n } else {\n if (this._owner.isCurrentToEdit(this)) {\n this.bgcolor = _PaintElement2.default.DEF_CURREDITCOLOR;\n }\n\n if (this._owner.isCurrentSelected(this)) {\n this.bgcolor = _PaintElement2.default.DEF_SELECTEDCOLOR;\n }\n }\n\n for (var i = 0; i < this._subelems.length; i++) {\n var te = this._subelems[i];\n if (te instanceof _PaintElement2.default) {\n var se = te;\n se.paint(g);\n }\n }\n\n // Fill background\n this.width = _Node3.default.WIDTH;\n this.m_width = _Node3.default.M_WIDTH;\n this.m_height = _Node3.default.M_HEIGHT;\n this.height = _Node3.default.HEIGHT;\n this.resize();\n if (this._owner.isCurrentToEdit(this) || this._owner.isInZoom(this)) {\n g.setColor(this.bgcolor);\n g.fillRect(this.x - 3, this.y - 3, this.width + 6, this.height + 6);\n g.setColor(\"#000\");\n g.drawOvalBorder(this.x, this.y, this.width, this.height, _Node3.default.PAD, this.bgcolor);\n } else {\n g.setColor(\"#000\");\n g.drawOvalBorder(this.x, this.y, this.width, this.height, _Node3.default.PAD);\n }\n\n // Draw Image\n g.drawImage(this._img, this._imgrect.x, this._imgrect.y, this._imgrect.width, this._imgrect.height);\n\n // g.setColor(Resources.COLOR.lightGray);\n // g.fillRect(this._txtrect.x, this._txtrect.y, this._txtrect.width, 10 + this._txtrect.height);\n // g.setColor(Resources.COLOR.black);\n // g.strokeRect(this._txtrect.x, this._txtrect.y, this._txtrect.width, 10 + this._txtrect.height);\n\n if (this.name != null && this.name != \"\") {\n var nameWidthMax = g.stringWidth(this.name) > 86 ? 100 : g.stringWidth(this.name); // 86:即七个汉字\n var tx = this._txtrect.x + (this._txtrect.width - nameWidthMax) / 2;\n\n var ty = this._txtrect.y + 2 * this._txtrect.height;\n if (this._iscurrent) {\n // g.drawImage(Resources.IMG_CURRENT_NODE, this._txtrect.x,\n // this._txtrect.y, this._txtrect.width, 10 + this._txtrect.height);\n } else {\n // g.drawImage(Resources.IMG_BACKGROUND_NODE,\n // this._txtrect.x, this._txtrect.y, this._txtrect.width,\n // \t\t10 + this._txtrect.height);\n }\n g.setColor(_Resources2.default.COLOR.black);\n // g.drawString(StringUtil.dencodeHTML(this.name), tx + this.name.length, ty - 10);\n g.drawText(_StringUtil2.default.dencodeHTML(this.name), tx + 10, ty - 10, 80);\n }\n\n // 恢复当前背景颜色\n this.bgcolor = old;\n }\n }, {\n key: \"toXML\",\n value: function toXML() {\n var str = \"\\n\";\n\n str += \"\" + this.isgather + \"\\n\";\n str += \"\" + this.issplit + \"\\n\";\n str += \"\" + this.autoAuditType + \"\\n\";\n str += \"\" + this.autoAuditTimeEditMode + \"\\n\";\n str += \"\" + this.replaceCharacter(this.auditDateTime) + \"\\n\";\n str += \"\\n\";\n str += \"\" + this.replaceCharacter(this.delayTime) + \"\\n\";\n str += \"\" + this.replaceCharacter(this.delayDay) + \"\\n\";\n str += \"\" + this.replaceCharacter(this.delayHour) + \"\\n\";\n str += \"\" + this.replaceCharacter(this.delayMinute) + \"\\n\";\n str += \"\" + this.replaceCharacter(this.splitStartNode) + \"\\n\";\n str += _get(AutoNode.prototype.__proto__ || Object.getPrototypeOf(AutoNode.prototype), \"toXML\", this).call(this);\n\n str += \"\\n\";\n return str;\n }\n //xh\n\n }, {\n key: \"check\",\n value: function check() {\n var result = _get(AutoNode.prototype.__proto__ || Object.getPrototypeOf(AutoNode.prototype), \"check\", this).call(this);\n //节点状态标签和名称填写校验\n if (!result) {\n return false;\n }\n //聚合选项校验\n if (this.isgather) {\n if (!this.splitStartNode) {\n alert(\"请为\" + this.name + \"节点选择聚合审批节点(若选择聚合选项,则流程中至少要有一个节点开启并行)!\");\n return false;\n }\n }\n //触发时机选项校验\n if (this.autoAuditTimeEditMode) {\n if (this.autoAuditTimeEditMode == 1) {\n if (this.autoAuditType) {\n if (this.autoAuditType == 2) {\n if (!this.auditDateTime) {\n alert(\"请为\" + this.name + \"节点填写指定触发时间(格式为:xxxx年xx月xx日 xx时:xx分)!\");\n return false;\n }\n }\n\n if (this.autoAuditType == 3) {\n if (Number(this.delayMinute) == 0 && Number(this.delayDay) == 0 && Number(this.delayHour) == 0) {\n alert(\"请为\" + this.name + \"节点填写触发的滞后时间!\");\n return false;\n }\n\n if (Number(this.delayMinute) < 0 || isNaN(Number(this.delayMinute)) || Number(this.delayDay) < 0 || isNaN(Number(this.delayDay)) || Number(this.delayHour) < 0 || isNaN(Number(this.delayHour))) {\n alert(this.name + \"节点触发的滞后时间格式有误!\");\n return false;\n }\n }\n } else {\n alert(\"请为\" + this.name + \"节点选择设计时触发的时机!\");\n return false;\n }\n }\n\n if (this.autoAuditTimeEditMode == 2) {\n if (!this.auditDateTimeScript.trim()) {\n alert(\"请为\" + this.name + \"节点填写触发时的脚本!\");\n return false;\n }\n }\n } else {\n alert(\"请为\" + this.name + \"节点选择设计或脚本中的任一模式!\");\n return false;\n }\n\n return true;\n }\n //xh\n\n }, {\n key: \"hasRelation\",\n value: function hasRelation(relation) {\n var _get$call = _get(AutoNode.prototype.__proto__ || Object.getPrototypeOf(AutoNode.prototype), \"hasRelation\", this).call(this, relation),\n input = _get$call.input,\n output = _get$call.output;\n\n if (input == 0 && output == 0) {\n alert(\"请创建\" + this.name + \"节点的关联线!\");\n return false;\n } else if (output > 0 && input == 0) {\n alert(this.name + \"节点缺少接入节点!\");\n return false;\n } else if (input > 0 && output == 0) {\n alert(\"请为\" + this.name + \"节点连接其他节点!\");\n return false;\n } else {\n return true;\n }\n }\n\n // yx\n\n }, {\n key: \"hasSomeRelation\",\n value: function hasSomeRelation(relation) {\n return _get(AutoNode.prototype.__proto__ || Object.getPrototypeOf(AutoNode.prototype), \"hasRelation\", this).call(this, relation);\n }\n }, {\n key: \"showTips\",\n value: function showTips(g) {\n this.drawTips(g, this.name);\n }\n }, {\n key: \"errorCheck\",\n value: function errorCheck() {\n var errorStr = _get(AutoNode.prototype.__proto__ || Object.getPrototypeOf(AutoNode.prototype), \"errorCheck\", this).call(this);\n if (this.name != \"\") {\n if (this.isgather && this.splitStartNode == \"\") {\n errorStr += this.name + \" node.error.choosesplitstartnode\" + \";\";\n }\n }\n return errorStr;\n }\n }]);\n\n return AutoNode;\n}(_Node3.default);\n\n/**\r\n * 马上审批\r\n */\n\n\nAutoNode.AUTO_AUDIT_TYPE_IMMEDIATELY = 1;\n/**\r\n * 指定时间审批\r\n */\nAutoNode.AUTO_AUDIT_TYPE_SPECIFY = 2;\n/**\r\n * 滞后一段时间审批\r\n */\nAutoNode.AUTO_AUDIT_TYPE_DELAY = 3;\n\n/**\r\n * 自动审批编辑模式-设计\r\n */\nAutoNode.AUTO_AUDIT_EDIT_MODE_DESIGN = 1;\n\n/**\r\n * 自动审批编辑模式-代码\r\n */\nAutoNode.AUTO_AUDIT_EDIT_MODE_CODE = 2;\n\nexports.default = AutoNode;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy9zcmMvZWxlbWVudC9BdXRvTm9kZS5qcz9hYmMyIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBOb2RlIGZyb20gXCIuL05vZGVcIjtcclxuaW1wb3J0IFBhaW50RWxlbWVudCBmcm9tIFwiLi9QYWludEVsZW1lbnRcIjtcclxuaW1wb3J0IFJlc291cmNlcyBmcm9tIFwiLi4vdXRpbGl0eS9SZXNvdXJjZXNcIjtcclxuaW1wb3J0IFN0cmluZ1V0aWwgZnJvbSBcIi4uL3V0aWxpdHkvU3RyaW5nVXRpbFwiO1xyXG5cclxuY2xhc3MgQXV0b05vZGUgZXh0ZW5kcyBOb2RlIHtcclxuICBjb25zdHJ1Y3RvcihkaWFncmFtKSB7XHJcbiAgICBzdXBlcihkaWFncmFtKTtcclxuXHJcbiAgICAvKipcclxuICAgICAqIOiHquWKqOWuoeaJueaXtumXtOe8lui+keaooeW8jyjpu5jorqTkuLrorr7orqHmqKHlvI8pXHJcbiAgICAgKi9cclxuICAgIHRoaXMuYXV0b0F1ZGl0VGltZUVkaXRNb2RlID0gQXV0b05vZGUuQVVUT19BVURJVF9FRElUX01PREVfREVTSUdOO1xyXG5cclxuICAgIC8qKlxyXG4gICAgICog5oyH5a6a6Ieq5Yqo5a6h5om55pel5pyf6ISa5pysXHJcbiAgICAgKi9cclxuICAgIHRoaXMuYXVkaXREYXRlVGltZVNjcmlwdCA9IFwiXCI7XHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiDmmK/lkKbogZrlkIjoioLngrlcclxuICAgICAqL1xyXG4gICAgdGhpcy5pc2dhdGhlciA9IGZhbHNlO1xyXG5cclxuICAgIC8qKlxyXG4gICAgICog5piv5ZCm5YiG5pWj6IqC54K5XHJcbiAgICAgKi9cclxuICAgIHRoaXMuaXNzcGxpdCA9IGZhbHNlO1xyXG5cclxuICAgIC8qKlxyXG4gICAgICog6Ieq5Yqo5a6h5om557G75Z6LXHJcbiAgICAgKi9cclxuICAgIHRoaXMuYXV0b0F1ZGl0VHlwZSA9IDA7XHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiDmjIflrproh6rliqjlrqHmibnml6XmnJ9cclxuICAgICAqL1xyXG4gICAgdGhpcy5hdWRpdERhdGVUaW1lID0gXCJcIjtcclxuXHJcbiAgICAvKipcclxuICAgICAqIOa7nuWQjuaXtumXtCjliLDovr7ku6XlkI7lpJrlsJHml7bpl7TkuYvlkI7oh6rliqjlrqHmibkpXHJcbiAgICAgKi9cclxuICAgIHRoaXMuZGVsYXlUaW1lID0gXCJcIjtcclxuXHJcbiAgICAvKipcclxuICAgICAqIOa7nuWQjuWkqeaVsFxyXG4gICAgICovXHJcbiAgICB0aGlzLmRlbGF5RGF5ID0gXCJcIjtcclxuXHJcbiAgICAvKipcclxuICAgICAqIOa7nuWQjuWwj+aXtuaVsFxyXG4gICAgICovXHJcbiAgICB0aGlzLmRlbG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2V0VGltZShkYXRlKTtcclxuICAgICAgfVxyXG4gICAgfSBlbHNlIHtcclxuICAgICAgc3dpdGNoIChhdXRvQXVkaXRUeXBlKSB7XHJcbiAgICAgICAgY2FzZSBBVVRPX0FVRElUX1RZUEVfSU1NRURJQVRFTFk6XHJcbiAgICAgICAgICBicmVhaztcclxuICAgICAgICBjYXNlIEFVVE9fQVVESVRfVFlQRV9TUEVDSUZZOlxyXG4gICAgICAgICAgY29uc3QgZGF0ZSA9IERhdGVVdGlsLnBhcnNlRGF0ZSh0aGlzLmF1ZGl0RGF0ZVRpbWUsIFwieXl5eS1NTS1kZCBISDptbTpzc1wiKTtcclxuICAgICAgICAgIGNhbGVuZGFyLnNldFRpbWUoZGF0ZSk7XHJcbiAgICAgICAgICBicmVhaztcclxuICAgICAgICBjYXNlIEFVVE9fQVVESVRfVFlQRV9ERUxBWTpcclxuICAgICAgICAgIGlmICghU3RyaW5nVXRpbC5pc0JsYW5rKGRlbGF5RGF5KSkge1xyXG4gICAgICAgICAgICBjYWxlbmRhci5hZGQoQ2FsZW5kYXIuREFURSwgSW50ZWdlci5wYXJzZUludChkZWxheURheSkpO1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgICAgaWYgKCFTdHJpbmdVdGlsLmlzQmxhbmsoZGVsYXlIb3VyKSkge1xyXG4gICAgICAgICAgICBjYWxlbmRhci5hZGQoQ2FsZW5kYXIuSE9VUiwgSW50ZWdlci5wYXJzZUludChkZWxheUhvdXIpKTtcclxuICAgICAgICAgIH1cclxuICAgICAgICAgIGlmICghU3RyaW5nVXRpbC5pc0JsYW5rKGRlbGF5TWludXRlKSkge1xyXG4gICAgICAgICAgICBjYWxlbmRhci5hZGQoQ2FsZW5kYXIuTUlOVVRFLCBJbnRlZ2VyLnBhcnNlSW50KGRlbGF5TWludXRlKSk7XHJcbiAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgZGVmYXVsdDpcclxuICAgICAgICAgIGJyZWF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dW1iZXIodGhpcy5kZWxheUhvdXIpKSkge1xyXG4gICAgICAgICAgICAgIGFsZXJ0KHRoaXMubmFtZSArIFwi6IqC54K56Kem5Y+R55qE5rue5ZCO5pe26Ze05qC85byP5pyJ6K+v77yBXCIpO1xyXG4gICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICBhbGVydChcIuivt+S4ulwiICsgdGhpcy5uYW1lICsgXCLoioLngrnpgInmi6norr7orqHml7bop6blj5HnmoTml7bmnLrvvIFcIik7XHJcbiAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcblxyXG4gICAgICBpZiAodGhpcy5hdXRvQXVkaXRUaW1lRWRpdE1vZGUgPT0gMikge1xyXG4gICAgICAgIGlmICghdGhpcy5hdWRpdERhdGVUaW1lU2NyaXB0LnRyaW0oKSkge1xyXG4gICAgICAgICAgYWxlcnQoXCLor7fkuLpcIiArIHRoaXMubmFtZSArIFwi6IqC54K55aGr5YaZ6Kem5Y+R5pe255qE6ISa5pys77yBXCIpO1xyXG4gICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgIH1cclxuICAgICAgfVxyXG4gICAgfSBlbHNlIHtcclxuICAgICAgYWxlcnQoXCLor7fkuLpcIiArIHRoaXMubmFtZSArIFwi6IqC54K56YCJ5oup6K6+6K6h5oiW6ISa5pys5Lit55qE5Lu75LiA5qih5byP77yBXCIpO1xyXG4gICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICB9XHJcblxyXG4gICAgcmV0dXJuIHRydWU7XHJcbiAgfVxyXG4gIC8veGhcclxuICBoYXNSZWxhdGlvbihyZWxhdGlvbikge1xyXG4gICAgbGV0IHsgaW5wdXQsIG91dHB1dCB9ID0gc3VwZXIuaGFzUmVsYXRpb24ocmVsYXRpb24pO1xyXG5cclxuICAgIGlmI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true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _Node2 = __webpack_require__(3);\n\nvar _Node3 = _interopRequireDefault(_Node2);\n\nvar _PaintElement = __webpack_require__(1);\n\nvar _PaintElement2 = _interopRequireDefault(_PaintElement);\n\nvar _Resources = __webpack_require__(0);\n\nvar _Resources2 = _interopRequireDefault(_Resources);\n\nvar _StringUtil = __webpack_require__(2);\n\nvar _StringUtil2 = _interopRequireDefault(_StringUtil);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ManualNode = function (_Node) {\n _inherits(ManualNode, _Node);\n\n function ManualNode(diagram) {\n _classCallCheck(this, ManualNode);\n\n var _this = _possibleConstructorReturn(this, (ManualNode.__proto__ || Object.getPrototypeOf(ManualNode)).call(this, diagram));\n\n _this.actorListScript = \"\"; // 获取角色列表的脚本\n\n _this.jumpNameScript = \"\"; //节点跳转名称的脚本\n _this.jump = \"false\";\n _this.jumpTo = 1;\n\n _this.actorEditMode = ManualNode.ACTOR_EDIT_MODE_DESIGN; // 角色编辑模式(0:角色定制, 1:脚本,2:用户定制)\n // 详见FlowType.java类\n _this.namelist = \"\"; // actor选择\n _this.deptlist = \"\"; // dept选择\n /**\r\n * 组织字段(auditor:流程提交者|author:表单作者|initiator:流程发起人)\r\n */\n _this.orgField = ManualNode.ORG_AUDITOR;\n /**\r\n * 作用范围\r\n */\n _this.orgScope = \"self\";\n /**\r\n * 组织中的角色筛选条件\r\n */\n _this.orgRoleCondition = \"\";\n /**\r\n * 审批人\r\n * \t\t数据规则:(U11e0-7c45-c6138387-a878-afad62721f2a|用户名称1;U11e0-7c45-c3be48e6-a878-afad62721f2a|用户名称2;)\r\n */\n _this.userList = \"\";\n\n _this.realnamelist = \"\"; // 当前结点真正审核者,形如{U|admin;D-05-02|副总师;},“与”条件及代理人已转成具体处理人ID\n\n _this.approverNumType = 0; //上一节点允许用户指定下一步审批人,再选择此节点审批人时\n\n /**\r\n * 审批模式\r\n */\n _this.passcondition = \"0\"; // 审核通过条件 0->或 1->与 2->强制与 3->自定义(与或混合)\n // 详见FlowType.java类\n _this.exceedaction = \"\"; // 超时处理类型\n // 0为不处理,1为自动流转,2为自动终止,3为自动回退,4为自动回退至指定结节\n // 详见FlowType.java类\n _this.issetcurruser = false; // 流程转入时是否将writers强制设为当前用户\n /**\r\n * 使用完整名, 如:11000|赛百威公司/开发部/部门经理 多项值之间使用分号隔开,\r\n * 如:11000|赛百威公司/开发部/部门经理;12001|赛百威公司/市场部/部门经理\r\n */\n // this.namelist;\n _this.inputform = \"\";\n // 角色列表,使用完整名,多项值之间使用分号隔开,如:11000|赛百威公司/开发部/部门经理;12001|赛百威公司/市场部/部门经理\n // this.actorlist;\n // 人员列表,使用完整名,多项值之间使用分号隔开,如:11000|赛百威公司/开发部/周志军;12001|赛百威公司/市场部/刘永勤\n // this.personlist;\n /**\r\n * @param owner\r\n * @roseuid 3E0428DB0132\r\n */\n // private Vector temp = new Vector(); //\n // 临时保存NodeActivity;\n _this.isgather = false; // 是否聚合节点\n\n _this.issplit = false; // 是否分散节点\n\n _this.cBack = false; // 可否回退\n\n _this.backType = 0; // 回退模式\n\n _this.isToPerson = false; // 是否指的审批人\n _this.checkedOnSinglePerson = false; // 一个审批人时是否默认选中该人\n _this.checkedOnMultiplePerson = false; // 上一步提交该节点默认选中所有人\n\n _this.bnodelist = \"\"; // 回退定制的节点\n\n _this.retracementEditMode = 0; // 回撤编辑模式\n\n _this.cRetracement = false; // 可否回撤\n\n _this.retracementScript = \"\"; // 回撤条件脚本\n /**\r\n * 超时编辑模式\r\n */\n _this.overrideTimeEditMode = 0;\n /**\r\n * 超时脚本\r\n */\n _this.overrideTimeLimitScript = \"\";\n\n _this.handupEditMode = 0; //挂起编辑模式\n\n _this.isHandup = false; //可否挂起\n\n _this.handupScript = \"\"; //挂起条件脚本\n /**\r\n * 流程提醒策略, 分为三种Arrive, OverDue, Reject,
\r\n * 数据结构如下:
\r\n * {
\r\n * arrive: {sendModeCodes:[0, 1, 2], template:reminderId, smsApproval:0or1},
\r\n * overdue: {sendModeCodes:[0, 1, 2], limittimecount:12, timeunit:0,\r\n * isnotifysuperior:true, template:reminderId},
\r\n * reject: {sendModeCodes:[0, 1, 2], responsibleType:256,\r\n * template:reminderId}
\r\n * }\r\n */\n _this.notificationStrategyJSON = \"\";\n /**\r\n * 分散起始节点\r\n * @return\r\n */\n _this.splitStartNode = \"\";\n\n _this.isFrontEdit = false; //可否允许前台手动调整流程\n /**\r\n * 是否开启抄送功能\r\n */\n _this.isCarbonCopy = false;\n /**\r\n * 是否指定抄送人\r\n */\n _this.isSelectCirculator = false;\n /**\r\n * 抄送人编辑模式(0:角色定制, 1:脚本 ,2:用户定制)\r\n */\n _this.circulatorEditMode = ManualNode.CIRCULATOR_EDIT_MODE_DESIGN;\n /**\r\n * 抄送人脚本\r\n */\n _this.circulatorListScript = \"\"; // 获取角色列表的脚本\n /**\r\n * 抄送人按角色设计模式的数据模型\r\n */\n _this.circulatorNamelist = \"\";\n /**\r\n * 抄送人按用户设计模式的数据模型\r\n *\r\n * 数据规则:(U11e0-7c45-c6138387-a878-afad62721f2a|用户名称1;U11e0-7c45-c3be48e6-a878-afad62721f2a|用户名称2;)\r\n */\n _this.circulatorNamelistByUser = \"\";\n /**\r\n * 是否为审批时限节点\r\n */\n _this.isLimited = false;\n /**\r\n * 审批时限编辑模式(0:设计模式|1:脚本模式)\r\n */\n _this.timeLimitEditMode = ManualNode.TIMELIMIT_EDIT_MODE_DESIGN;\n /**\r\n * 时限天数\r\n */\n _this.timeLimitDay = \"\";\n /**\r\n * 时限小时数\r\n */\n _this.timeLimitHour = \"\";\n /**\r\n * 时限分钟数\r\n */\n _this.timeLimitMinute = \"\";\n /**\r\n * 时限脚本\r\n */\n _this.timeLimitScript = \"\";\n /**\r\n *是否允许加签\r\n */\n _this.isApproverEdit = false;\n /**\r\n * 允许加签主办人脚本\r\n */\n _this.approverEditScript = '';\n /**\r\n *是否允许加签(协办人) 彩生活\r\n */\n _this.isCoApproverEdit = false;\n /**\r\n * 允许加签协办人脚本\r\n */\n _this.coApproverEditScript = '';\n /**\r\n *是否允许添加/补签意见\r\n */\n _this.isSupplementComments = false;\n /**\r\n *是否开启USBKEY授权提交 (本节点流转到下一步需要USBKEY身份认证)\r\n */\n _this.isUsbKeyVerify = false;\n /**\r\n * 筛选条件\r\n */\n _this.roleCondition = \"\";\n /**\r\n * 是否允许编辑当前节点的审批人\r\n */\n _this.isAllowEditAuditor = false;\n /**\r\n * 允许编辑当前审批人脚本\r\n */\n _this.allowEditAuditorScript = '';\n /**\r\n * 是否允许审批人终止此节点\r\n */\n _this.isAllowTermination = false;\n /**\r\n * 是否允许跳过此节点(当此节点审批人为上一步提交人时,允许跳过此节点直接流转到下一步)\r\n */\n _this.isAllowSkip = false;\n /**\r\n * 下一步节点的默认选中状态\r\n */\n _this.nextNodeCheckedStatus = ManualNode.NEXT_NODE_CHECKED_STATUS_CHECKED;\n\n _this.urge2ApprovalEditMode = 0; // 是否支持催办编辑模式\n\n _this.allowUrge2Approval = false; // 是否允许催办\n\n _this.allowUrge2ApprovalScript = \"\"; // 催办条件脚本\n\n _this.activityPermList = \"\"; // 节点表单域操作按钮权限对应\n\n /**\r\n * 彩生活\r\n */\n _this.isAssist = false; //是否开启协办\n\n _this.isSelectAssistUser = false; //允许上一步流程处理人指定本节点的协办人\n\n _this.assistEditMode = 0; //指定方式\n\n _this.assistListScript = \"\"; //按脚本指定范围\n\n _this.assistNamelist = \"\"; //按角色指定范围\n\n _this.assistNamelistByUser = \"\";\n return _this;\n }\n\n _createClass(ManualNode, [{\n key: \"getClassName\",\n value: function getClassName() {\n return \"cn.myapps.runtime.workflow.element.ManualNode\";\n }\n }, {\n key: \"getDeadlineDataTime\",\n value: function getDeadlineDataTime(runner, nodert) {\n var calendar = Calendar.getInstance();\n\n switch (timeLimitEditMode) {\n case ManualNode.TIMELIMIT_EDIT_MODE_CODE:\n var obj = runner.run(\"ManualNode [name=\" + name + \"] [id=\" + id + \"] timeLimitScript\", _StringUtil2.default.dencodeHTML(timeLimitScript));\n if (obj instanceof Date) {\n calendar.setTime(obj);\n } else if (obj instanceof String) {\n var date = null;\n try {\n date = DateUtil.parseDate(obj, \"yyyy-MM-dd HH:mm:ss\");\n } catch (e) {\n try {\n date = DateUtil.parseDate(obj, \"yyyy-MM-dd HH:mm\");\n } catch (e2) {\n e2.printStackTrace();\n throw new OBPMValidateException(\"审批时限格式异常,请参照格式'yyyy-MM-dd HH:mm:ss'或'yyyy-MM-dd HH:mm'\", new WorkflowException(\"审批时限格式异常,请参照格式'yyyy-MM-dd HH:mm:ss'或'yyyy-MM-dd HH:mm'\"));\n }\n }\n calendar.setTime(date);\n } else if (obj == null) {\n return null;\n }\n break;\n case ManualNode.TIMELIMIT_EDIT_MODE_DESIGN:\n if (!_StringUtil2.default.isBlank(timeLimitDay)) {\n calendar.add(Calendar.DATE, Integer.parseInt(timeLimitDay));\n }\n if (!_StringUtil2.default.isBlank(timeLimitHour)) {\n calendar.add(Calendar.HOUR, Integer.parseInt(timeLimitHour));\n }\n if (!_StringUtil2.default.isBlank(timeLimitMinute)) {\n calendar.add(Calendar.MINUTE, Integer.parseInt(timeLimitMinute));\n }\n\n var calendarProcess = ProcessFactory.createProcess(CalendarProcess.class);\n var actor = nodert.getActorrts().iterator().next();\n if (actor != null) {\n var userProcess = ProcessFactory.createProcess(UserProcess.class);\n var user = userProcess.doView(actor.getActorid());\n if (user != null) {\n var from = System.currentTimeMillis();\n var to = calendar.getTimeInMillis();\n var minutes = (to - from) / (1000 * 60);\n var deadlineData = calendarProcess.getNextDateByMinuteCount(new Date(), minutes, user.getCalendarType());\n calendar.setTime(deadlineData);\n }\n }\n break;\n default:\n break;\n }\n\n return calendar.getTime();\n }\n\n /**\r\n * 是否允许催办\r\n * @param doc\r\n * \t\t文档对象\r\n * @param params\r\n * \t\t参数表\r\n * @param user\r\n * \t\t当前操作用户\r\n * @return\r\n *\r\n * @throws Exception\r\n */\n\n }, {\n key: \"isAllowUrge2Approval\",\n value: function isAllowUrge2Approval(doc, params, user) {\n if (ManualNode.URGE_TO_APPROVAL_EDIT_MODE_DESIGN == this.urge2ApprovalEditMode) {\n return this.allowUrge2Approval;\n } else {\n var runner = JavaScriptFactory.getInstance(params.getSessionid(), doc.getApplicationid());\n runner.initBSFManager(doc, params, user, []);\n var label = \"\";\n label = label + \"Node name:\" + this.name + \" [\" + this.id + \"].allowUrge2ApprovalScript\";\n var result = runner.run(label.toString(), this.allowUrge2ApprovalScript);\n if (result != null && result instanceof Boolean) {\n return result.booleanValue();\n }\n }\n\n return false;\n }\n }, {\n key: \"toNameList\",\n value: function toNameList() {\n // 经解释后的nameList对象\n var nameList = new NameList().parser(this.namelist);\n return nameList;\n }\n }, {\n key: \"toUserList\",\n value: function toUserList() {\n var nameList = new NameList().parser(this.userList);\n return nameList;\n }\n\n /**\r\n * 经解释后的nameList对象\r\n * @return\r\n */\n\n }, {\n key: \"toCirculatorNameList\",\n value: function toCirculatorNameList() {\n var nameList = new NameList().parser(this.circulatorNamelist);\n return nameList;\n }\n }, {\n key: \"toCirculatorNameListByUser\",\n value: function toCirculatorNameListByUser() {\n var nameList = new NameList().parser(this.circulatorNamelistByUser);\n return nameList;\n }\n }, {\n key: \"addNodeActivity\",\n value: function addNodeActivity(name) {\n var act = new NodeActivity(_owner);\n act.id = Sequence.getSequence();\n act.name = name;\n this.getSubelems().add(act);\n }\n }, {\n key: \"getShortNameListStr\",\n value: function getShortNameListStr() {\n var shortName = \"\";\n\n if (this.namelist != null && this.namelist != \"()\") {\n var nls = this.namelist.substring(1, this.namelist.length - 1).split(\";\");\n nls.forEach(function (nl) {\n if (nl != null && nl != \"\") {\n var names = nl.split(\"|\");\n shortName += names[1] + \";\";\n }\n });\n }\n return shortName;\n }\n }, {\n key: \"getFormatShortNameListStr\",\n value: function getFormatShortNameListStr() {\n var str = this.getShortNameListStr();\n var rtn = \"\";\n var pos = 0;\n while (pos <= str.length) {\n if (pos + 10 > str.length) {\n rtn += str.substring(pos, str.length);\n } else {\n rtn += str.substring(pos, pos + 10);\n rtn += \"\\n\";\n }\n pos += 10;\n }\n return rtn;\n }\n\n /**\r\n * @param g\r\n * @roseuid 3E043760021D\r\n */\n\n }, {\n key: \"paint\",\n value: function paint(g) {\n if (this._img == null) {\n this._img = _Resources2.default.IMG_MANUAL_NODE;\n }\n\n // Call All Sub Elements PAINT METHOD.\n // 保存当前背景颜色...\n var old = this.bgcolor;\n // yx 判断Ctrl数组是否有值\n if (this._owner.checkSelectArr()) {\n // yx 判断是否在ctrl数据中\n if (this._owner.isInZoom(this)) {\n this.bgcolor = _PaintElement2.default.DEF_CURREDITCOLOR;\n }\n } else {\n if (this._owner.isCurrentToEdit(this)) {\n this.bgcolor = _PaintElement2.default.DEF_CURREDITCOLOR;\n }\n\n if (this._owner.isCurrentSelected(this)) {\n this.bgcolor = _PaintElement2.default.DEF_SELECTEDCOLOR;\n }\n }\n\n for (var i = 0; i < this._subelems.length; i++) {\n var te = this._subelems[i];\n if (te instanceof _PaintElement2.default) {\n var se = te;\n se.paint(g);\n }\n }\n\n // Fill background\n this.width = _Node3.default.WIDTH;\n this.m_width = _Node3.default.M_WIDTH;\n this.m_height = _Node3.default.M_HEIGHT;\n this.height = _Node3.default.HEIGHT;\n this.resize();\n if (this._owner.isCurrentToEdit(this) || this._owner.isInZoom(this)) {\n g.setColor(this.bgcolor);\n g.fillRect(this.x - 3, this.y - 3, this.width + 6, this.height + 6);\n g.setColor(\"#000\");\n g.drawOvalBorder(this.x, this.y, this.width, this.height, _Node3.default.PAD, this.bgcolor);\n } else {\n g.setColor(\"#000\");\n g.drawOvalBorder(this.x, this.y, this.width, this.height, _Node3.default.PAD);\n }\n\n // Draw Image\n g.drawImage(this._img, this._imgrect.x, this._imgrect.y, this._imgrect.width, this._imgrect.height);\n\n // g.setColor(Resources.COLOR.lightGray);\n // g.fillRect(this._txtrect.x,this._txtrect.y,this._txtrect.width,10 + this._txtrect.height);\n // g.setColor(Resources.COLOR.black);\n // g.strokeRect(this._txtrect.x,this._txtrect.y,this._txtrect.width,10 + this._txtrect.height);\n\n if (this.name != null && this.name != \"\") {\n // 文字显示最大的长度\n var nameWidthMax = g.stringWidth(this.name) > 86 ? 100 : g.stringWidth(this.name);\n var tx = this._txtrect.x + (this._txtrect.width - nameWidthMax) / 2;\n var ty = this._txtrect.y + 2 * this._txtrect.height;\n if (this._iscurrent) {\n // g.drawImage(Resources.IMG_CURRENT_NODE, this._txtrect.x,\n // this._txtrect.y, this._txtrect.width, 10 + this._txtrect.height);\n } else {\n // g.drawImage(Resources.IMG_BACKGROUND_NODE,\n // this._txtrect.x, this._txtrect.y, this._txtrect.width,\n // \t\t10 + this._txtrect.height);\n }\n g.setColor(_Resources2.default.COLOR.black);\n // 字体多换行,再多久显示。。。\n // g.drawString(StringUtil.dencodeHTML(this.name), tx + this.name.length, ty - 10);\n g.drawText(_StringUtil2.default.dencodeHTML(this.name), tx + 10, ty - 10, 80);\n }\n\n // 恢复当前背景颜色\n this.bgcolor = old;\n }\n }, {\n key: \"toXML\",\n value: function toXML() {\n var str = \"\\n\";\n\n str += \"\\n\";\n\n str += \"\\n\";\n str += \"\" + this.jump + \"\\n\";\n str += \"\" + this.jumpTo + \"\\n\";\n\n str += \"\" + this.actorEditMode + \"\\n\";\n str += \"\" + this.replaceCharacter(this.deptlist) + \"\\n\";\n str += \"\" + this.replaceCharacter(this.namelist) + \"\\n\";\n str += \"\" + this.replaceCharacter(this.realnamelist) + \"\\n\";\n //审批人通过条件不需要转字符串\n str += \"\" + (this.passcondition == \"\" ? \"0\" : this.passcondition) + \"\\n\";\n str += \"\" + this.isApproverEdit + \"\\n\";\n str += \"\\n\"; //彩生活\n str += \"\" + this.isCoApproverEdit + \"\\n\"; //彩生活\n str += \"\\n\"; //彩生活\n str += \"\" + this.isSupplementComments + \"\\n\"; //彩生活\n str += \"\" + this.replaceCharacter(this.exceedaction) + \"\\n\";\n str += \"\" + this.issetcurruser + \"\\n\";\n str += \"\" + this.replaceCharacter(this.inputform) + \"\\n\";\n str += \"\" + this.isgather + \"\\n\";\n str += \"\" + this.issplit + \"\\n\";\n str += \"\" + this.cBack + \"\\n\";\n str += \"\" + this.replaceCharacter(this.splitStartNode) + \"\\n\";\n str += \"\" + this.isFrontEdit + \"\\n\";\n str += \"\" + this.backType + \"\\n\";\n str += \"\" + this.isToPerson + \"\\n\";\n str += \"\" + this.checkedOnSinglePerson + \"\\n\";\n str += \"\" + this.checkedOnMultiplePerson + \"\\n\";\n\n str += \"\" + this.replaceCharacter(this.bnodelist) + \"\\n\";\n str += \"\" + this.retracementEditMode + \"\\n\";\n str += \"\" + this.cRetracement + \"\\n\";\n str += \"\\n\";\n str += \"\" + this.replaceCharacter(this.notificationStrategyJSON) + \"\\n\";\n str += \"\" + this.isCarbonCopy + \"\\n\";\n str += \"\" + this.isSelectCirculator + \"\\n\";\n str += \"\" + this.circulatorEditMode + \"\\n\";\n str += \"\\n\";\n str += \"\" + this.replaceCharacter(this.circulatorNamelist) + \"\\n\";\n str += \"\" + this.replaceCharacter(this.userList) + \"\\n\";\n str += \"\" + this.approverNumType + \"\\n\";\n str += \"\" + this.replaceCharacter(this.circulatorNamelistByUser) + \"\\n\";\n str += \"\" + this.orgField + \"\\n\";\n str += \"\" + this.orgScope + \"\\n\";\n str += \"\" + this.replaceCharacter(this.orgRoleCondition) + \"\\n\";\n str += \"\" + this.isLimited + \"\\n\";\n str += \"\" + this.timeLimitEditMode + \"\\n\";\n str += \"\" + this.timeLimitDay + \"\\n\";\n str += \"\" + this.timeLimitHour + \"\\n\";\n str += \"\" + this.timeLimitMinute + \"\\n\";\n str += \"\\n\";\n str += \"\" + this.isUsbKeyVerify + \"\\n\";\n str += \"\" + this.roleCondition + \"\\n\";\n str += \"\" + this.handupEditMode + \"\\n\";\n str += \"\" + this.isHandup + \"\\n\";\n str += \"\\n\";\n str += \"\" + this.isAllowEditAuditor + \"\\n\";\n str += \"\\n\";\n str += \"\" + this.isAllowTermination + \"\\n\";\n str += \"\" + this.replaceCharacter(this.activityPermList) + \"\\n\";\n str += \"\" + this.urge2ApprovalEditMode + \"\\n\";\n str += \"\" + this.allowUrge2Approval + \"\\n\";\n str += \"\\n\";\n str += \"\" + this.isAllowSkip + \"\\n\";\n str += \"\" + this.nextNodeCheckedStatus + \"\\n\";\n\n //彩生活\n str += \"\" + this.isAssist + \"\\n\";\n str += \"\" + this.isSelectAssistUser + \"\\n\";\n str += \"\" + this.assistEditMode + \"\\n\";\n str += \"\\n\";\n str += \"\" + this.assistNamelist + \"\\n\";\n str += \"\" + this.assistNamelistByUser + \"\\n\";\n\n str += _get(ManualNode.prototype.__proto__ || Object.getPrototypeOf(ManualNode.prototype), \"toXML\", this).call(this);\n\n str += \"\\n\";\n\n return str;\n }\n\n //xh\n\n }, {\n key: \"check\",\n value: function check() {\n var result = _get(ManualNode.prototype.__proto__ || Object.getPrototypeOf(ManualNode.prototype), \"check\", this).call(this);\n //判断节点是否填写了状态标签和名称\n if (!result) {\n return false;\n }\n //人工节点角色范围校验\n if (!this.actorEditMode) {\n if (!this.namelist) {\n alert(\"请为\" + this.name + \"节点在审批人设置里选择角色范围!\");\n return false;\n }\n }\n //人工节点审批人脚本选项校验\n if (this.actorEditMode == 1) {\n if (!this.actorListScript) {\n alert(\"请为\" + this.name + \"节点在审批人设置里填写脚本!\");\n return false;\n }\n }\n if (this.actorEditMode == 0 && !this.namelist && !this.deptlist) {\n alert(\"请为\" + this.name + \"节点在审批人设置里选择部门和角色,部门和角色必须填写其中一个!\");\n return false;\n }\n if (this.deptlist) {\n var patt1 = new RegExp(/(([A-Za-z0-9\\u4e00-\\u9fa5]{1,}\\/)|(([*]{1,}\\/)(?=([A-Za-z0-9\\u4e00-\\u9fa5]{1,}\\/)))|((?<=([A-Za-z0-9\\u4e00-\\u9fa5]{1,}\\/))([*]{1}\\/)$))/g);\n // let patt2=new RegExp(/[*]{1,}\\//);\n if (this.deptlist.indexOf(\";\") != -1) {\n if (this.deptlist.replace(patt1, \"\") == \"\") {\n // if(this.deptlist.replace(patt2,\"\")==\"\"){\n // \tlert('请为'+this.name+'节点在审批人设置里填写正确的部门!');\n // \treturn false;\n // }\n } else {\n alert(\"请为\" + this.name + \"节点在审批人设置里填写正确的部门!\");\n return false;\n }\n this.deptlist = this.deptlist.slice(0, -1);\n }\n var arr = this.deptlist.split(\";\");\n for (var i = 0; i < arr.length; i++) {\n arr[i] += \"/\";\n if (arr[i].replace(patt1, \"\") == \"\") {\n // if(arr[i].replace(patt2,\"\")==\"\"){\n // \tlert('请为'+this.name+'节点在审批人设置里填写正确的部门!');\n // \treturn false;\n // }\n } else {\n alert(\"请为\" + this.name + \"节点在审批人设置里填写正确的部门!\");\n return false;\n }\n arr[i] = arr[i].slice(0, -1);\n }\n this.deptlist = arr.join(\";\");\n }\n\n //人工节点组织选项校验\n // if(this.actorEditMode == 3) {\n // \t//当组织选项为提交者自己时,可以不选择角色范围\n // \tif(this.orgField != 'curruser' && this.orgField != 'initiator') {\n // \t\tif(!this.orgRoleCondition) {\n // \t\t\talert('请为'+this.name+'节点在审批人设置里选择角色范围!');\n // \t\t \treturn false;\n // \t\t}\n // \t}\n // }\n //人工节点审批时限校验\n if (this.isLimited) {\n if (this.timeLimitEditMode == 0) {\n //非空校验,Number()会把空字符串转为0\n if (Number(this.timeLimitDay) == 0 && Number(this.timeLimitHour) == 0 && Number(this.timeLimitMinute) == 0) {\n alert(\"请为\" + this.name + \"节点填写大于0的审批时限!\");\n return false;\n }\n //合法性校验\n if (Number(this.timeLimitDay) < 0 || isNaN(Number(this.timeLimitDay)) || Number(this.timeLimitHour) < 0 || isNaN(Number(this.timeLimitHour)) || Number(this.timeLimitMinute) < 0 || isNaN(Number(this.timeLimitMinute))) {\n alert(this.name + \"节点审批时限填写不符合要求!\");\n return false;\n }\n }\n\n if (this.timeLimitEditMode == 1) {\n if (!this.timeLimitScript) {\n alert(\"请为\" + this.name + \"节点填写审批时限脚本!\");\n return false;\n }\n }\n }\n //人工节点协办人校验\n if (this.isAssist) {\n if (this.assistEditMode == 0) {\n if (!this.assistNamelist) {\n alert(\"请为\" + this.name + \"节点选择协办人角色范围!\");\n return false;\n }\n }\n\n if (this.assistEditMode == 1) {\n if (!this.assistListScript) {\n alert(\"请为\" + this.name + \"节点填写协办人脚本!\");\n return false;\n }\n }\n }\n //人工节点抄送校验\n if (this.isCarbonCopy) {\n if (this.circulatorEditMode == 0) {\n if (!this.circulatorNamelist) {\n alert(\"请为\" + this.name + \"节点选择抄送角色范围!\");\n return false;\n }\n }\n\n if (this.circulatorEditMode == 1) {\n if (!this.circulatorListScript) {\n alert(\"请为\" + this.name + \"节点填写抄送脚本!\");\n return false;\n }\n }\n }\n //聚合节点校验\n if (this.isgather) {\n if (!this.splitStartNode) {\n alert(\"请为\" + this.name + \"节点选择聚合审批节点(若选择聚合选项,则流程中至少要有一个节点开启并行)!\");\n return false;\n }\n }\n //回退时校验\n if (this.cBack) {\n if (this.backType == 1) {\n if (!this.bnodelist) {\n alert(\"请为\" + this.name + \"节点选择指定回退节点!\");\n return false;\n }\n }\n }\n //回撤时校验\n if (this.retracementEditMode == 1) {\n if (!this.retracementScript) {\n alert(\"请为\" + this.name + \"节点填写回撤脚本!\");\n return false;\n }\n }\n //挂起时校验\n if (this.handupEditMode == 1) {\n if (!this.handupScript) {\n alert(\"请为\" + this.name + \"节点填写挂起脚本!\");\n return false;\n }\n }\n //催办校验\n if (this.urge2ApprovalEditMode == 1) {\n if (!this.allowUrge2ApprovalScript) {\n alert(\"请为\" + this.name + \"节点填写催办脚本!\");\n return false;\n }\n }\n //通知校验\n if (this.notificationStrategyJSON) {\n var _notificationStrategyJSON = JSON.parse(_StringUtil2.default.dencodeHTML(this.notificationStrategyJSON));\n\n if (_notificationStrategyJSON.send) {\n if (_notificationStrategyJSON.send.receiverTypes.length == 0 || _notificationStrategyJSON.send.sendModeCodes.length == 0 || !_notificationStrategyJSON.send.template) {\n alert(\"请为\" + this.name + \"节点选择提交时的接收对象、发送方式和发送内容!\");\n return false;\n }\n }\n\n if (_notificationStrategyJSON.arrive) {\n if (_notificationStrategyJSON.arrive.sendModeCodes.length == 0 || !_notificationStrategyJSON.arrive.template) {\n alert(\"请为\" + this.name + \"节点选择到达时的发送方式和发送内容!\");\n return false;\n }\n }\n\n if (_notificationStrategyJSON.reject) {\n if (!_notificationStrategyJSON.reject.responsibleType || _notificationStrategyJSON.reject.sendModeCodes.length == 0 || !_notificationStrategyJSON.reject.template) {\n alert(\"请为\" + this.name + \"节点选择回退时的接收对象、发送方式和发送内容!\");\n return false;\n }\n }\n\n if (_notificationStrategyJSON.overdue) {\n if (_notificationStrategyJSON.overdue.editMode == 0) {\n if (Number(_notificationStrategyJSON.overdue.limittimecount) == 0 || !_notificationStrategyJSON.overdue.timeunit) {\n alert(\"请为\" + this.name + \"节点在过期时设计脚本中填写时限和选择单位!\");\n return false;\n }\n\n if (Number(_notificationStrategyJSON.overdue.limittimecount) < 0 || isNaN(Number(_notificationStrategyJSON.overdue.limittimecount))) {\n alert(this.name + \"节点在过期时设计脚本中时限填写格式有误!\");\n return false;\n }\n }\n\n if (_notificationStrategyJSON.overdue.editMode == 1) {\n if (!_notificationStrategyJSON.overdue.limittimeScript) {\n alert(\"请为\" + this.name + \"节点在过期时iscript脚本名称中填写脚本!\");\n return false;\n }\n }\n\n if (_notificationStrategyJSON.overdue.sendModeCodes.length == 0 || !_notificationStrategyJSON.overdue.template) {\n alert(\"请为\" + this.name + \"节点选择过期时的发送方式、发送内容!\");\n return false;\n }\n }\n\n if (_notificationStrategyJSON.reminder) {\n if (_notificationStrategyJSON.reminder.sendModeCodes.length == 0) {\n alert(\"请为\" + this.name + \"节点选择催办时的发送方式!\");\n return false;\n }\n }\n\n if (_notificationStrategyJSON.assist) {\n if (_notificationStrategyJSON.assist.sendModeCodes.length == 0 || !_notificationStrategyJSON.assist.template) {\n alert(\"请为\" + this.name + \"节点选择到达协办时的发送方式和发送内容!\");\n return false;\n }\n }\n\n if (_notificationStrategyJSON.carbonCopy) {\n if (_notificationStrategyJSON.carbonCopy.sendModeCodes.length == 0 || !_notificationStrategyJSON.carbonCopy.template) {\n alert(\"请为\" + this.name + \"节点选择抄送时的发送方式和发送内容!\");\n return false;\n }\n }\n }\n\n return true;\n }\n\n //xh\n\n }, {\n key: \"hasRelation\",\n value: function hasRelation(relation) {\n var _get$call = _get(ManualNode.prototype.__proto__ || Object.getPrototypeOf(ManualNode.prototype), \"hasRelation\", this).call(this, relation),\n input = _get$call.input,\n output = _get$call.output;\n\n if (input == 0 && output == 0) {\n alert(\"请创建\" + this.name + \"节点的关联线!\");\n return false;\n } else if (output > 0 && input == 0) {\n alert(this.name + \"节点缺少接入节点!\");\n return false;\n } else if (input > 0 && output == 0) {\n alert(\"请为\" + this.name + \"节点连接其他节点!\");\n return false;\n } else {\n return true;\n }\n }\n\n // yx\n\n }, {\n key: \"hasSomeRelation\",\n value: function hasSomeRelation(relation) {\n return _get(ManualNode.prototype.__proto__ || Object.getPrototypeOf(ManualNode.prototype), \"hasRelation\", this).call(this, relation);\n }\n }, {\n key: \"showTips\",\n value: function showTips(g) {\n var tips = \"\";\n // yx 如果是【部门和角色】显示相关内容,如果是脚本操作者显示脚本,如果是组织操作者显示组织\n if (this.actorEditMode == 0) {\n var shortname = this.getFormatShortNameListStr();\n if (shortname != null && shortname.trim() != \"\" && shortname.trim() != \"null\") {\n tips += \"操作者:\" + shortname;\n tips += \"\\n\";\n }\n } else if (this.actorEditMode == 1) {\n tips += \"操作者:脚本\";\n } else if (this.actorEditMode == 3) {\n tips += \"操作者:组织\";\n }\n this.drawTips(g, tips);\n }\n }, {\n key: \"getPassCondition\",\n value: function getPassCondition() {\n try {\n return Integer.parseInt(passcondition);\n } catch (e) {\n return 0;\n }\n }\n }, {\n key: \"getNotificationStrategyMap\",\n value: function getNotificationStrategyMap() {\n try {\n // 测试数据\n // notificationStrategyJSON = \"{\"\n // + \"arrive: {sendModeCodes:[0, 1]}, \"\n // + \"overdue: {sendModeCodes:[0, 1], limittimecount:12, timeunit:0,\n // isnotifysuperior:true},\"\n // + \"reject: {sendModeCodes:[0, 1], responsibleType: 256}\"\n // + \"}\";\n var jsonStr = \"\";\n if (!_StringUtil2.default.isBlank(notificationStrategyJSON)) {\n jsonStr = _StringUtil2.default.dencodeHTML(notificationStrategyJSON);\n }\n //jsonStr = \"{\\\"overdue\\\":{\\\"editMode\\\":\\\"1\\\",\\\"limittimeScript\\\":\\\"IjIwMTMtOC0yMyAxNDowMDowMCI7 \\\",\\\"sendModeCodes\\\":[2],\\\"limittimecount\\\":\\\"1\\\",\\\"timeunit\\\":\\\"0\\\",\\\"isnotifysuperior\\\":\\\"false\\\",\\\"template\\\":\\\"11e1-73c9-2a559d21-b25e-b1c3fd11d730\\\"}}\";\n return JsonUtil.toMap(jsonStr);\n } catch (e) {\n return e;\n }\n }\n }]);\n\n return ManualNode;\n}(_Node3.default);\n\n/**\r\n * 审批人编辑模式, 角色设计\r\n */\n\n\nManualNode.ACTOR_EDIT_MODE_DESIGN = 0;\n/**\r\n * 审批人编辑模式, 脚本\r\n */\nManualNode.ACTOR_EDIT_MODE_CODE = 1;\n/**\r\n * 审批人编辑模式, 用户设计\r\n */\nManualNode.ACTOR_EDIT_MODE_USER_DESIGN = 2;\n\n/**\r\n * 审批人编辑模式, 组织\r\n */\nManualNode.ACTOR_EDIT_MODE_ORGANIZATION_DESIGN = 3;\n/**\r\n * 是否可催办编辑模式-设计模式\r\n */\nManualNode.URGE_TO_APPROVAL_EDIT_MODE_DESIGN = 0;\n/**\r\n * 是否可催办编辑模式-脚本模式\r\n */\nManualNode.URGE_TO_APPROVAL_EDIT_MODE_CODE = 1;\n/**\r\n * 抄送人编辑模式, 角色设计\r\n */\nManualNode.CIRCULATOR_EDIT_MODE_DESIGN = 0;\n/**\r\n * 抄送人编辑模式, 脚本\r\n */\nManualNode.CIRCULATOR_EDIT_MODE_CODE = 1;\n\n/**\r\n * 抄送人编辑模式, 用户设计\r\n */\nManualNode.CIRCULATOR_EDIT_MODE_USER_DESIGN = 2;\n\n/**\r\n * 任意, 任意一个负责人处理后通过\r\n */\nManualNode.PASS_CONDITION_OR = 0;\n/**\r\n * 会签, 每个负责人处理后通过\r\n */\nManualNode.PASS_CONDITION_AND = 1;\n/**\r\n * 有顺序的会签, 每个负责人按顺序处理后通过\r\n */\nManualNode.PASS_CONDITION_ORDERLY_AND = 2;\n\n/**\r\n * 组织-作者\r\n */\nManualNode.ORG_AUTHOR = \"author\";\n\n/**\r\n * 组织-提交者\r\n */\nManualNode.ORG_AUDITOR = \"auditor\";\n\n/**\r\n * 组织-发起人\r\n */\nManualNode.ORG_INITIATOR = \"initiator\";\n/**\r\n * 组织-当前登录用户\r\n */\nManualNode.ORG_CURRUSER = \"curruser\";\n\n/**\r\n * 上级用户\r\n */\nManualNode.ORG_SCOPE_SUPERIOR = \"superior\";\n\n/**\r\n * 下级用户\r\n */\nManualNode.ORG_SCOPE_LOWER = \"lower\";\n\n/**\r\n * 本级默认部门\r\n */\nManualNode.ORG_SCOPE_DEPT_DEFAULT = \"default\";\n\n/**\r\n * 直属上级部门\r\n */\nManualNode.ORG_SCOPE_DEPT_LINE_SUPERIOR = \"lineSuperior\";\n\n/**\r\n * 直属下级部门\r\n */\nManualNode.ORG_SCOPE_DEPT_LINE_LOWER = \"lineLower\";\n/**\r\n * 所有上级部门\r\n */\nManualNode.ORG_SCOPE_DEPT_ALL_SUPERIOR = \"allSuperior\";\n\n/**\r\n * 所有下级部门\r\n */\nManualNode.ORG_SCOPE_DEPT_ALL_LOWER = \"allLower\";\n\n/**\r\n * 自身\r\n */\nManualNode.ORG_SCOPE_SELF = \"self\";\n\n/**\r\n * 审批时限编辑模式, 设计\r\n */\nManualNode.TIMELIMIT_EDIT_MODE_DESIGN = 0;\n/**\r\n * 审批时限编辑模式, 脚本\r\n */\nManualNode.TIMELIMIT_EDIT_MODE_CODE = 1;\n\n/**\r\n * 流程发起人上级\r\n */\nManualNode.ROLE_CONDITION_INITIATOR_SUPERIOR = \"initiator_superior\";\n\n/**\r\n * 流程发起人所属部门上级\r\n */\nManualNode.ROLE_CONDITION_INITIATOR_DEP_SUPERIOR = \"initiator_dep_superior\";\n\n/**\r\n * 审批人部门为提交人默认部门\r\n */\nManualNode.ROLE_CONDITION_CURRUSER_DEFAULT_DEPT = \"curruser_default_dept\";\n\n/**下一步节点的选中状态为选中**/\nManualNode.NEXT_NODE_CHECKED_STATUS_CHECKED = 0;\n/**下一步节点的选中状态为不选中**/\nManualNode.NEXT_NODE_CHECKED_STATUS_UNCHECKED = 1;\n/**下一步节点的选中状态为选中且锁定**/\nManualNode.NEXT_NODE_CHECKED_STATUS_CHECKED_AND_LOCKED = 2;\n\nexports.default = ManualNode;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(16)))//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL2VsZW1lbnQvTWFudWFsTm9kZS5qcz85ZDE3Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBOb2RlIGZyb20gXCIuL05vZGVcIjtcclxuaW1wb3J0IFBhaW50RWxlbWVudCBmcm9tIFwiLi9QYWludEVsZW1lbnRcIjtcclxuaW1wb3J0IFJlc291cmNlcyBmcm9tIFwiLi4vdXRpbGl0eS9SZXNvdXJjZXNcIjtcclxuaW1wb3J0IFN0cmluZ1V0aWwgZnJvbSBcIi4uL3V0aWxpdHkvU3RyaW5nVXRpbFwiO1xyXG5cclxuY2xhc3MgTWFudWFsTm9kZSBleHRlbmRzIE5vZGUge1xyXG4gIGNvbnN0cnVjdG9yKGRpYWdyYW0pIHtcclxuICAgIHN1cGVyKGRpYWdyYW0pO1xyXG5cclxuICAgIHRoaXMuYWN0b3JMaXN0U2NyaXB0ID0gXCJcIjsgLy8g6I635Y+W6KeS6Imy5YiX6KGo55qE6ISa5pysXHJcblxyXG4gICAgdGhpcy5qdW1wTmFtZVNjcmlwdCA9IFwiXCI7IC8v6IqC54K56Lez6L2s5ZCN56ew55qE6ISa5pysXHJcbiAgICB0aGlzLmp1bXAgPSBcImZhbHNlXCI7XHJcbiAgICB0aGlzLmp1bXBUbyA9IDE7XHJcblxyXG4gICAgdGhpcy5hY3RvckVkaXRNb2RlID0gTWFudWFsTm9kZS5BQ1RPUl9FRElUX01PREVfREVTSUdOOyAvLyDop5LoibLnvJbovpHmqKHlvI8oMDrop5LoibLlrprliLYsIDE66ISa5pysLDI655So5oi35a6a5Yi2KVxyXG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lcclxuICAgICAqL1xyXG4gICAgdGhpcy5pc0xpbWl0ZWQgPSBmYWxzZTtcclxuICAgIC8qKlxyXG4gICAgICog5a6h5om55pe26ZmQ57yW6L6R5qih5byPKDA66K6+6K6h5qih5byPfDE66ISa5pys5qih5byPKVxyXG4gICAgICovXHJcbiAgICB0aGlzLnRpbWVMaW1pdEVkaXRNb2RlID0gTWFudWFsTm9kZS5USU1FTElNSVRfRURJVF9NT0RFX0RFU0lHTjtcclxuICAgIC8qKlxyXG4gICAgICog5pe26ZmQ5aSp5pWwXHJcbiAgICAgKi9cclxuICAgIHRoaXMudGltZUxpbWl0RGF5ID0gXCJcIjtcclxuICAgIC8qKlxyXG4gICAgICog5pe26ZmQ5bCP5pe25pWwXHJcbiAgICAgKi9cclxuICAgIHRoaXMudGltZUxpbWl0SG91ciA9IFwiXCI7XHJcbiAgICAvKipcclxuICAgICAqIOaXtumZkOWIhumSn+aVsFxyXG4gICAgICovXHJcbiAgICB0aGlzLnRpbWVMaW1pdE1pbnV0ZSA9IFwiXCI7XHJcbiAgICAvKipcclxuICAgICAqIOaXtumZkOiEmuacrFxyXG4gICAgICovXHJcbiAgICB0aGlzLnRpbWVMaW1pdFNjcmlwdCA9IFwiXCI7XHJcbiAgICAvKipcclxuICAgICAq5piv5ZCm5YWB6K645Yqg562+XHJcbiAgICAgKi9cclxuICAgIHRoaXMuaXNBcHByb3ZlckVkaXQgPSBmYWxzZTtcclxuICAgIC8qKlxyXG5cdFx0ICog5YWB6K645Yqg562+5Li75Yqe5Lq66ISa5pysXHJcblx0XHQgKi9cclxuXHRcdHRoaXMuYXBwcm92ZXJFZGl0U2NyaXB0ID0gJyc7XHJcbiAgICAvKipcclxuICAgICAq5piv5ZCm5YWB6K645Yqg562+KOWNj+WKnuS6uikg5b2p55Sf5rS7XHJcbiAgICAgKi9cclxuICAgIHRoaXMuaXNDb0FwcHJvdmVyRWRpdCA9IGZhbHNlO1xyXG4gICAgLyoqXHJcblx0XHQgKiDlhYHorrj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gICAgIH0gY2F0Y2ggKGUpIHtcclxuICAgICAgICAgICAgdHJ5IHtcclxuICAgICAgICAgICAgICBkYXRlID0gRGF0ZVV0aWwucGFyc2VEYXRlKG9iaiwgXCJ5eXl5LU1NLWRkIEhIOm1tXCIpO1xyXG4gICAgICAgICAgICB9IGNhdGNoIChlMikge1xyXG4gICAgICAgICAgICAgIGUyLnByaW50U3RhY2tUcmFjZSgpO1xyXG4gICAgICAgICAgICAgIHRocm93IG5ldyBPQlBNVmFsaWRhdGVFeGNlcHRpb24oXCLlrqHmibnml7bpmZDmoLzlvI/lvILluLgs6K+35Y+C54Wn5qC85byPJ3l5eXktTU0tZGQgSEg6bW06c3Mn5oiWJ3l5eXktTU0tZGQgSEg6bW0nXCIsIG5ldyBXb3JrZmxvd0V4Y2VwdGlvbihcIuWuoeaJueaXtumZkOagvOW8j+W8guW4uCzor7flj4LnhafmoLzlvI8neXl5eS1NTS1kZCBISDptbTpzcyfmiJYneXl5eS1NTS1kZCBISDptbSdcIikpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgICBjYWxlbmRhci5zZXRUaW1lKGRhdGUpO1xyXG4gICAgICAgIH0gZWxzZSBpZiAob2JqID09IG51bGwpIHtcclxuICAgICAgICAgIHJldHVybiBudWxsO1xyXG4gICAgICAgIH1cclxuICAgICAgICBicmVhaztcclxuICAgICAgY2FzZSBNYW51YWxOb2RlLlRJTUVMSU1JVF9FRElUX01PREVfREVTSUdOOlxyXG4gICAgICAgIGlmICghU3RyaW5nVXRpbC5pc0JsYW5rKHRpbWVMaW1pdERheSkpIHtcclxuICAgICAgICAgIGNhbGVuZGFyLmFkZChDYWxlbmRhci5EQVRFLCBJbnRlZ2VyLnBhcnNlSW50KHRpbWVMaW1pdERheSkpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAoIVN0cmluZ1V0aWwuaXNCbGFuayh0aW1lTGltaXRIb3VyKSkge1xyXG4gICAgICAgICAgY2FsZW5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cy50aW1lTGltaXRIb3VyKSA8IDAgfHxcclxuICAgICAgICAgIGlzTmFOKE51bWJlcih0aGlzLnRpbWVMaW1pdEhvdXIpKSB8fFxyXG4gICAgICAgICAgTnVtYmVyKHRoaXMudGltZUxpbWl0TWludXRlKSA8IDAgfHxcclxuICAgICAgICAgIGlzTmFOKE51bWJlcih0aGlzLnRpbWVMaW1pdE1pbnV0ZSkpXHJcbiAgICAgICAgKSB7XHJcbiAgICAgICAgICBhbGVydCh0aGlzLm5hbWUgKyBcIuiKgueCueWuoeaJueaXtumZkOWhq+WGmeS4jeespuWQiOimgeaxgu+8gVwiKTtcclxuICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuXHJcbiAgICAgIGlmICh0aGlzLnRpbWVMaW1pdEVkaXRNb2RlID09IDEpIHtcclxuICAgICAgICBpZiAoIXRoaXMudGltZUxpbWl0U2NyaXB0KSB7XHJcbiAgICAgICAgICBhbGVydChcIuivt+S4ulwiICsgdGhpcy5uYW1lICsgXCLoioLngrnloavlhpnlrqHmibnml7bpmZDohJrmnKzvvIFcIik7XHJcbiAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgICAvL+S6uuW3peiKgueCueWNj+WKnuS6uuagoemqjFxyXG4gICAgaWYgKHRoaXMuaXNBc3Npc3QpIHtcclxuICAgICAgaWYgKHRoaXMuYXNzaXN0RWRpdE1vZGUgPT0gMCkge1xyXG4gICAgICAgIGlmICghdGhpcy5hc3Npc3ROYW1lbGlzdCkge1xyXG4gICAgICAgICAgYWxlcnQoXCLor7fkuLpcIiArIHRoaXMubmFtZSArIFwi6IqC54K56YCJ5oup5Y2P5Yqe5Lq66KeS6Imy6IyD5Zu077yBXCIpO1xyXG4gICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgIH1cclxuICAgICAgfVxyXG5cclxuICAgICAgaWYgKHRoaXMuYXNzaXN0RWRpdE1vZGUgPT0gMSkge1xyXG4gICAgICAgIGlmICghdGhpcy5hc3Npc3RMaXN0U2NyaXB0KSB7XHJcbiAgICAgICAgICBhbGVydChcIuivt+S4ulwiICsgdGhpcy5uYW1lICsgXCLoioLngrnloavlhpnljY/lip7kurrohJrmnKzvvIFcIik7XHJcbiAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgICAvL+S6uuW3peiKgueCueaKhOmAgeagoemqjFxyXG4gICAgaWYgKHRoaXMuaXNDYXJib25Db3B5KSB7XHJcbiAgICAgIGlmICh0aGlzLmNpcmN1bGF0b3JFZGl0TW9kZSA9PSAwKSB7XHJcbiAgICAgICAgaWYgKCF0aGlzLmNpcmN1bGF0b3JOYW1lbGlzdCkge1xyXG4gICAgICAgICAgYWxlcnQoXCLor7fkuLpcIiArIHRoaXMubmFtZSArIFwi6IqC54K56YCJ5oup5oqE6YCB6KeS6Imy6IyD5Zu077yBXCIpO1xyXG4gICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgIH1cclxuICAgICAgfVxyXG5cclxuICAgICAgaWYgKHRoaXMuY2lyY3VsYXRvckVkaXRNb2RlID09IDEpIHtcclxuICAgICAgICBpZiAoIXRoaXMuY2lyY3VsYXRvckxpc3RTY3JpcHQpIHtcclxuICAgICAgICAgIGFsZXJ0KFwi6K+35Li6XCIgKyB0aGlzLm5hbWUgKyBcIuiKgueCueWhq+WGmeaKhOmAgeiEmuacrO+8gVwiKTtcclxuICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgIH1cclxuICAgIC8v6IGa5ZCI6IqC54K55qCh6aqMXHJcbiAgICBpZiAodGhpcy5pc2dhdGhlcikge1xyXG4gICAgICBpZiAoIXRoaXMuc3BsaXRTdGFydE5vZGUpIHtcclxuICAgICAgICBhbGVydChcIuivt+S4ulwiICsgdGhpcy5uYW1lICsgXCLoioLngrnpgInmi6nogZrlkIjlrqHmibnoioLngrko6Iul6YCJ5oup6IGa5ZCI6YCJ6aG577yM5YiZ5rWB56iL5Lit6Iez5bCR6KaB5pyJ5LiA5Liq6IqC54K55byA5ZCv5bm26KGMKe+8gVwiKTtcclxuICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgIH1cclxuICAgIH1cclxuICAgIC8v5Zue6YCA5pe25qCh6aqMXHJcbiAgICBpZiAodGhpcy5jQmFjaykge1xyXG4gICAgICBpZiAodGhpcy5iYWNrVHlwZSA9PSAxKSB7XHJcbiAgICAgICAgaWYgKCF0aGlzLmJub2RlbGlzdCkge1xyXG4gICAgICAgICAgYWxlcnQoXCLor7fkuLpcIiArIHRoaXMubmFtZSArIFwi6IqC54K56YCJ5oup5oyH5a6a5Zue6YCA6IqC54K577yBXCIpO1xyXG4gICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgIH1cclxuICAgICAgfVxyXG4gICAgfVxyXG4gICAgLy/lm57mkqTml7bmoKHpqoxcclxuICAgIGlmICh0aGlzLnJldHJhY2VtZW50RWRpdE1vZGUgPT0gMSkge1xyXG4gICAgICBpZiAoIXRoaXMucmV0cmFjZW1lbnRTY3JpcHQpIHtcclxuICAgICAgICBhbGVydChcIuivt+S4ulwiICsgdGhpcy5uYW1lICsgXCLoioLngrnloavlhpnlm57mkqTohJrmnKzvvIFcIik7XHJcbiAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgICAvL+aMgui1t+aXtuagoemqjFxyXG4gICAgaWYgKHRoaXMuaGFuZHVwRWRpdE1vZGUgPT0gMSkge1xyXG4gICAgICBpZiAoIXRoaXMuaGFuZHVwU2NyaXB0KSB7XHJcbiAgICAgICAgYWxlcnQoXCLor7fkuLpcIiArIHRoaXMubmFtZSArIFwi6IqC54K55aGr5YaZ5oyC6LW36ISa5pys77yBXCIpO1xyXG4gICAgICAgIH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yXG4gICAgICBpZiAobm90aWZpY2F0aW9uU3RyYXRlZ3lKU09OLmFycml2ZSkge1xyXG4gICAgICAgIGlmIChub3RpZmljYXRpb25TdHJhdGVneUpTT04uYXJyaXZlLnNlbmRNb2RlQ29kZXMubGVuZ3RoID09IDAgfHwgIW5vdGlmaWNhdGlvblN0cmF0ZWd5SlNPTi5hcnJpdmUudGVtcGxhdGUpIHtcclxuICAgICAgICAgIGFsZXJ0KFwi6K+35Li6XCIgKyB0aGlzLm5hbWUgKyBcIuiKgueCuemAieaLqeWIsOi+vuaXtueahOWPkemAgeaWueW8j+WSjOWPkemAgeWGheWuue+8gVwiKTtcclxuICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuXHJcbiAgICAgIGlmIChub3RpZmljYXRpb25TdHJhdGVneUpTT04ucmVqZWN0KSB7XHJcbiAgICAgICAgaWYgKCFub3RpZmljYXRpb25TdHJhdGVneUpTT04ucmVqZWN0LnJlc3BvbnNpYmxlVHlwZSB8fCBub3RpZmljYXRpb25TdHJhdGVneUpTT04ucmVqZWN0LnNlbmRNb2RlQ29kZXMubGVuZ3RoID09IDAgfHwgIW5vdGlmaWNhdGlvblN0cmF0ZWd5SlNPTi5yZWplY3QudGVtcGxhdGUpIHtcclxuICAgICAgICAgIGFsZXJ0KFwi6K+35Li6XCIgKyB0aGlzLm5hbWUgKyBcIuiKgueCuemAieaLqeWbnumAgOaXtueahOaOpeaUtuWvueixoeOAgeWPkemAgeaWueW8j+WSjOWPkemAgeWGheWuue+8gVwiKTtcclxuICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuXHJcbiAgICAgIGlmIChub3RpZmljYXRpb25TdHJhdGVneUpTT04ub3ZlcmR1ZSkge1xyXG4gICAgICAgIGlmIChub3RpZmljYXRpb25TdHJhdGVneUpTT04ub3ZlcmR1ZS5lZGl0TW9kZSA9PSAwKSB7XHJcbiAgICAgICAgICBpZiAoTnVtYmVyKG5vdGlmaWNhdGlvblN0cmF0ZWd5SlNPTi5vdmVyZHVlLmxpbWl0dGltZWNvdW50KSA9PSAwIHx8ICFub3RpZmljYXRpb25TdHJhdGVneUpTT04ub3ZlcmR1ZS50aW1ldW5pdCkge1xyXG4gICAgICAgICAgICBhbGVydChcIuivt+S4ulwiICsgdGhpcy5uYW1lICsgXCLoioLngrnlnKjov4fmnJ/ml7borr7orqHohJrmnKzkuK3loavlhpnml7bpmZDlkozpgInmi6nljZXkvY3vvIFcIik7XHJcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICBpZiAoTnVtYmVyKG5vdGlmaWNhdGlvblN0cmF0ZWd5SlNPTi5vdmVyZHVlLmxpbWl0dGltZWNvdW50KSA8IDAgfHwgaXNOYU4oTnVtYmVyKG5vdGlmaWNhdGlvblN0cmF0ZWd5SlNPTi5vdmVyZHVlLmxpbWl0dGltZWNvdW50KSkpIHtcclxuICAgICAgICAgICAgYWxlcnQodGhpcy5uYW1lICsgXCLoioLngrnlnKjov4fmnJ/ml7borr7orqHohJrmnKzkuK3ml7bpmZDloavlhpnmoLzlvI/mnInor6/vvIFcIik7XHJcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGlmIChub3RpZmljYXRpb25TdHJhdGVneUpTT04ub3ZlcmR1ZS5lZGl0TW9kZSA9PSAxKSB7XHJcbiAgICAgICAgICBpZiAoIW5vdGlmaWNhdGlvblN0cmF0ZWd5SlNPTi5vdmVyZHVlLmxpbWl0dGltZVNjcmlwdCkge1xyXG4gICAgICAgICAgICBhbGVydChcIuivt+S4ulwiICsgdGhpcy5uYW1lICsgXCLoioLngrnlnKjov4fmnJ/ml7Zpc2NyaXB06ISa5pys5ZCN56ew5Lit5aGr5YaZ6ISa5pys77yBXCIpO1xyXG4gICAgICAgICAgICByZXR1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NBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7QUFqMkJBO0FBQ0E7QUFtMkJBOzs7OztBQUdBO0FBQ0E7OztBQUdBO0FBQ0E7OztBQUdBO0FBQ0E7QUFDQTs7O0FBR0E7QUFDQTs7O0FBR0E7QUFDQTs7O0FBR0E7QUFDQTs7O0FBR0E7QUFDQTs7O0FBR0E7QUFDQTtBQUNBOzs7QUFHQTtBQUNBO0FBQ0E7OztBQUdBO0FBQ0E7OztBQUdBO0FBQ0E7OztBQUdBO0FBQ0E7QUFDQTs7O0FBR0E7QUFDQTtBQUNBOzs7QUFHQTtBQUNBO0FBQ0E7OztBQUdBO0FBQ0E7OztBQUdBO0FBQ0E7QUFDQTs7O0FBR0E7QUFDQTtBQUNBOzs7QUFHQTtBQUNBO0FBQ0E7OztBQUdBO0FBQ0E7QUFDQTs7O0FBR0E7QUFDQTtBQUNBOzs7QUFHQTtBQUNBOzs7QUFHQTtBQUNBO0FBQ0E7OztBQUdBO0FBQ0E7QUFDQTs7O0FBR0E7QUFDQTtBQUNBOzs7QUFHQTtBQUNBOzs7QUFHQTtBQUNBO0FBQ0E7OztBQUdBO0FBQ0E7QUFDQTs7O0FBR0E7QUFDQTtBQUNBOzs7QUFHQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///10\n");
/***/ }),
/* 11 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _Node2 = __webpack_require__(3);\n\nvar _Node3 = _interopRequireDefault(_Node2);\n\nvar _FlowDiagram = __webpack_require__(4);\n\nvar _FlowDiagram2 = _interopRequireDefault(_FlowDiagram);\n\nvar _PaintElement = __webpack_require__(1);\n\nvar _PaintElement2 = _interopRequireDefault(_PaintElement);\n\nvar _Rectangle = __webpack_require__(5);\n\nvar _Rectangle2 = _interopRequireDefault(_Rectangle);\n\nvar _Resources = __webpack_require__(0);\n\nvar _Resources2 = _interopRequireDefault(_Resources);\n\nvar _StringUtil = __webpack_require__(2);\n\nvar _StringUtil2 = _interopRequireDefault(_StringUtil);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar CompleteNode = function (_Node) {\n _inherits(CompleteNode, _Node);\n\n function CompleteNode(diagram) {\n _classCallCheck(this, CompleteNode);\n\n /**\r\n * 是否聚合节点\r\n */\n var _this = _possibleConstructorReturn(this, (CompleteNode.__proto__ || Object.getPrototypeOf(CompleteNode)).call(this, diagram));\n\n _this.isgather = false;\n\n /**\r\n * 分散起始节点\r\n */\n _this.splitStartNode = \"\";\n\n /**\r\n * 是否自动归档\r\n */\n _this.isAutoArchive = false;\n return _this;\n }\n\n _createClass(CompleteNode, [{\n key: \"getClassName\",\n value: function getClassName() {\n return \"cn.myapps.runtime.workflow.element.CompleteNode\";\n }\n }, {\n key: \"paint\",\n value: function paint(g) {\n if (this._img == null) {\n this._img = _Resources2.default.IMG_COMPLETE_NODE;\n }\n\n // Call All Sub Elements PAINT METHOD.\n // 保存当前背景颜色...\n var old = this.bgcolor;\n // yx 判断Ctrl数组是否有值\n if (this._owner.checkSelectArr()) {\n // yx 判断是否在ctrl数据中\n if (this._owner.isInZoom(this)) {\n this.bgcolor = _PaintElement2.default.DEF_CURREDITCOLOR;\n }\n } else {\n if (this._owner.isCurrentToEdit(this)) {\n this.bgcolor = _PaintElement2.default.DEF_CURREDITCOLOR;\n }\n\n if (this._owner.isCurrentSelected(this)) {\n this.bgcolor = _PaintElement2.default.DEF_SELECTEDCOLOR;\n }\n }\n\n for (var i = 0; i < this._subelems.length; i++) {\n var te = this._subelems[i];\n if (te instanceof _PaintElement2.default) {\n var se = te;\n se.paint(g);\n }\n }\n\n // Fill background\n this.width = _Node3.default.M_WIDTH;\n this.m_width = _Node3.default.M_WIDTH;\n this.m_height = _Node3.default.M_HEIGHT;\n this.height = _Node3.default.M_HEIGHT;\n this.resize();\n g.setColor(this.bgcolor);\n g.fillRect(this.x - 3, this.y - 2, this.m_width + 2, this.height + 2);\n\n // Draw Image\n g.drawImage(this._img, this.x, this.y, this._imgrect.width, this._imgrect.height);\n\n // g.setColor(Resources.COLOR.lightGray);\n // g.fillRect(this._txtrect.x,this._txtrect.y,this._txtrect.width,10 + this._txtrect.height);\n // g.setColor(Resources.COLOR.black);\n // g.strokeRect(this._txtrect.x,this._txtrect.y,this._txtrect.width,10 + this._txtrect.height);\n\n // yx 给节点添加默认名称\n if (this.name == \"\" || this.name == null) {\n this.name = \"结束\";\n }\n\n if (this.name != null && this.name != \"\") {\n // yx 判断字体过多是绘画是否一直在中间\n var tx = this._txtrect.x;\n var ty = this._txtrect.y + 1.5 * this._txtrect.height;\n\n if (this._iscurrent) {\n // g.drawImage(Resources.IMG_CURRENT_NODE, this._txtrect.x,\n // this._txtrect.y, this._txtrect.width, 10 + this._txtrect.height);\n } else {\n // g.drawImage(Resources.IMG_BACKGROUND_NODE,\n // this._txtrect.x, this._txtrect.y, this._txtrect.width,\n // \t\t10 + this._txtrect.height);\n }\n g.setColor(_Resources2.default.COLOR.black);\n // g.drawString(StringUtil.dencodeHTML(this.name), tx + this.name.length, ty - 10);\n if (g.stringWidth(this.name) > 24) {\n g.drawText(_StringUtil2.default.dencodeHTML(this.name), tx - 8, ty - 18, 20);\n } else {\n g.drawText(_StringUtil2.default.dencodeHTML(this.name), tx - 8, ty - 10, 20);\n }\n }\n\n // 恢复当前背景颜色\n this.bgcolor = old;\n }\n }, {\n key: \"toXML\",\n value: function toXML() {\n var str = \"\\n\";\n\n str += \"\" + this.isgather + \"\\n\";\n str += \"\" + this.replaceCharacter(this.splitStartNode) + \"\\n\";\n str += \"\" + this.replaceCharacter(this.isAutoArchive.toString()) + \"\\n\";\n str += _get(CompleteNode.prototype.__proto__ || Object.getPrototypeOf(CompleteNode.prototype), \"toXML\", this).call(this);\n\n str += \"\\n\";\n\n return str;\n }\n\n // 验证器\n\n }, {\n key: \"check\",\n value: function check() {\n var result = _get(CompleteNode.prototype.__proto__ || Object.getPrototypeOf(CompleteNode.prototype), \"check\", this).call(this);\n\n if (!result) {\n return false;\n }\n\n if (this.isgather) {\n if (!this.splitStartNode) {\n alert(\"请为\" + this.name + \"节点选择聚合审批节点(若选择聚合选项,则流程中至少要有一个节点开启并行)!\");\n return false;\n }\n }\n\n return true;\n }\n //xh\n\n }, {\n key: \"hasRelation\",\n value: function hasRelation(relation) {\n var _get$call = _get(CompleteNode.prototype.__proto__ || Object.getPrototypeOf(CompleteNode.prototype), \"hasRelation\", this).call(this, relation),\n input = _get$call.input,\n output = _get$call.output;\n\n if (input == 0) {\n alert(\"请创建\" + this.name + \"节点的关联线!\");\n return false;\n } else if (output > 0) {\n alert(this.name + \"节点不能指向其他节点!\");\n return false;\n } else {\n return true;\n }\n }\n\n // yx\n\n }, {\n key: \"hasSomeRelation\",\n value: function hasSomeRelation(relation) {\n return _get(CompleteNode.prototype.__proto__ || Object.getPrototypeOf(CompleteNode.prototype), \"hasRelation\", this).call(this, relation);\n }\n }, {\n key: \"showTips\",\n value: function showTips(g) {\n this.drawTips(g, this.name);\n }\n }]);\n\n return CompleteNode;\n}(_Node3.default);\n\nexports.default = CompleteNode;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL2VsZW1lbnQvQ29tcGxldGVOb2RlLmpzPzhlMTYiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IE5vZGUgZnJvbSBcIi4vTm9kZVwiO1xyXG5pbXBvcnQgRmxvd0RpYWdyYW0gZnJvbSBcIi4vRmxvd0RpYWdyYW1cIjtcclxuaW1wb3J0IFBhaW50RWxlbWVudCBmcm9tIFwiLi9QYWludEVsZW1lbnRcIjtcclxuaW1wb3J0IFJlY3RhbmdsZSBmcm9tIFwiLi4vdXRpbGl0eS9SZWN0YW5nbGVcIjtcclxuaW1wb3J0IFJlc291cmNlcyBmcm9tIFwiLi4vdXRpbGl0eS9SZXNvdXJjZXNcIjtcclxuaW1wb3J0IFN0cmluZ1V0aWwgZnJvbSBcIi4uL3V0aWxpdHkvU3RyaW5nVXRpbFwiO1xyXG5cclxuY2xhc3MgQ29tcGxldGVOb2RlIGV4dGVuZHMgTm9kZSB7XHJcbiAgY29uc3RydWN0b3IoZGlhZ3JhbSkge1xyXG4gICAg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QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBQUE7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7Ozs7QUEzSkE7QUFDQTtBQTZKQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///11\n");
/***/ }),
/* 12 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _Node2 = __webpack_require__(3);\n\nvar _Node3 = _interopRequireDefault(_Node2);\n\nvar _FlowDiagram = __webpack_require__(4);\n\nvar _FlowDiagram2 = _interopRequireDefault(_FlowDiagram);\n\nvar _PaintElement = __webpack_require__(1);\n\nvar _PaintElement2 = _interopRequireDefault(_PaintElement);\n\nvar _Rectangle = __webpack_require__(5);\n\nvar _Rectangle2 = _interopRequireDefault(_Rectangle);\n\nvar _Resources = __webpack_require__(0);\n\nvar _Resources2 = _interopRequireDefault(_Resources);\n\nvar _StringUtil = __webpack_require__(2);\n\nvar _StringUtil2 = _interopRequireDefault(_StringUtil);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SubFlow = function (_Node) {\n _inherits(SubFlow, _Node);\n\n function SubFlow(diagram) {\n _classCallCheck(this, SubFlow);\n\n /**\r\n * 绑定子流程定义的类型\r\n */\n var _this = _possibleConstructorReturn(this, (SubFlow.__proto__ || Object.getPrototypeOf(SubFlow)).call(this, diagram));\n\n _this.subFlowDefiType = \"\";\n /**\r\n * 子流程定义id\r\n */\n _this.subflowid = \"\";\n\n /**\r\n * 子流程名称\r\n */\n _this.subflowname = \"\";\n\n /**\r\n * 通过脚本返回值设置流程(返回流程ID)\r\n */\n _this.subflowScript = \"\";\n\n /**\r\n * 参数传递设置方式\r\n */\n _this.paramPassingType = \"\";\n\n /**\r\n * 父流程关联表单ID\r\n */\n _this.parentFlowFormId = \"\";\n\n /**\r\n * 父流程关联表单名称\r\n */\n _this.parentFlowFormName = \"\";\n\n /**\r\n * 子流程关联表单ID\r\n */\n _this.subFlowFormId = \"\";\n\n /**\r\n * 子流程关联表单名称\r\n */\n _this.subFlowFormName = \"\";\n\n /**\r\n * 表单字段映射(XML格式)\r\n */\n _this.fieldMappingXML = \"\";\n\n /**\r\n * 是否共享主流程文档\r\n */\n _this.shareDocument = false;\n\n /**\r\n * 参数传递脚本\r\n */\n _this.paramPassingScript = \"\";\n\n /**\r\n * 流程实例启动数量设置方式\r\n */\n _this.numberSetingType = \"\";\n\n /**\r\n * 流程实例启动数量设置内容 (可以是数字、字段名和脚本)\r\n */\n _this.numberSetingContent = \"\";\n\n /**\r\n * 是否回调\r\n */\n _this.callback = false;\n\n /**\r\n * 回调脚本\r\n */\n _this.callbackScript = \"\";\n\n _this.iscurrent = false;\n\n _this.ispassed = false; // 是否审核\n\n /**\r\n * 是否为聚合节点\r\n */\n _this.isgather = false; // 是否聚合节点\n\n /**\r\n * 分散起始节点\r\n */\n _this.splitStartNode = \"\";\n\n /**\r\n * 是否为分散节点(默认为true)\r\n */\n _this.issplit = true;\n\n /**\r\n * 是否指的审批人\r\n */\n _this.isToPerson = false;\n //当审批人只有一个人时,默认选中该人\n _this.checkedOnSinglePerson = false;\n // 只有一个审批人的时候,是否默认选中审批人\n\n _this.checkedOnMultiplePerson = false;\n\n _this.subflowFormid = \"\"; // 子流程表单ID\n\n _this.subflowFormname = \"\"; // 子流程表单名称\n\n /**\r\n * @deprecated since 2.6\r\n */\n _this.crossform = false; // 跨表单\n\n /**\r\n * 子流程启动时执行的脚本\r\n * @deprecated since 2.6\r\n */\n _this.startupScript = \"\";\n return _this;\n }\n\n _createClass(SubFlow, [{\n key: \"getClassName\",\n value: function getClassName() {\n return \"cn.myapps.runtime.workflow.element.SubFlow\";\n }\n }, {\n key: \"paint\",\n value: function paint(g) {\n if (this._img == null) {\n this._img = _Resources2.default.IMG_SUBFLOW_NODE;\n }\n\n var old = this.bgcolor;\n // yx 判断Ctrl数组是否有值\n if (this._owner.checkSelectArr()) {\n // yx 判断是否在ctrl数据中\n if (this._owner.isInZoom(this)) {\n this.bgcolor = _PaintElement2.default.DEF_CURREDITCOLOR;\n }\n } else {\n if (this._owner.isCurrentToEdit(this)) {\n this.bgcolor = _PaintElement2.default.DEF_CURREDITCOLOR;\n }\n\n if (this._owner.isCurrentSelected(this)) {\n this.bgcolor = _PaintElement2.default.DEF_SELECTEDCOLOR;\n }\n }\n\n for (var i = 0; i < this._subelems.length; i++) {\n var te = this._subelems[i];\n if (te instanceof _PaintElement2.default) {\n var se = te;\n se.paint(g);\n }\n }\n\n // Fill background\n this.width = _Node3.default.WIDTH;\n this.m_width = _Node3.default.M_WIDTH;\n this.m_height = _Node3.default.M_HEIGHT;\n this.height = _Node3.default.HEIGHT;\n this.resize();\n if (this._owner.isCurrentToEdit(this) || this._owner.isInZoom(this)) {\n g.setColor(this.bgcolor);\n g.fillRect(this.x - 3, this.y - 3, this.width + 6, this.height + 6);\n g.setColor(\"#000\");\n g.drawOvalBorder(this.x, this.y, this.width, this.height, _Node3.default.PAD, this.bgcolor);\n } else {\n g.setColor(\"#000\");\n g.drawOvalBorder(this.x, this.y, this.width, this.height, _Node3.default.PAD);\n }\n\n // Draw Image\n g.drawImage(this._img, this._imgrect.x, this._imgrect.y, this._imgrect.width, this._imgrect.height);\n\n // g.setColor(Resources.COLOR.lightGray);\n // g.fillRect(this._txtrect.x,this._txtrect.y,this._txtrect.width,10 + this._txtrect.height);\n // g.setColor(Resources.COLOR.black);\n // g.strokeRect(this._txtrect.x,this._txtrect.y,this._txtrect.width,10 + this._txtrect.height);\n\n if (this.name != null && this.name != \"\") {\n var nameWidthMax = g.stringWidth(this.name) > 86 ? 100 : g.stringWidth(this.name);\n var tx = this._txtrect.x + (this._txtrect.width - nameWidthMax) / 2;\n var ty = this._txtrect.y + 2 * this._txtrect.height;\n if (this._iscurrent) {\n // g.drawImage(Resources.IMG_CURRENT_NODE, this._txtrect.x,\n // this._txtrect.y, this._txtrect.width, 10 + this._txtrect.height);\n } else {\n // g.drawImage(Resources.IMG_BACKGROUND_NODE,\n // this._txtrect.x, this._txtrect.y, this._txtrect.width,\n // \t\t10 + this._txtrect.height);\n }\n g.setColor(_Resources2.default.COLOR.black);\n //g.font = \"12px serif\";\n // g.drawString(StringUtil.dencodeHTML(this.name), tx + this.name.length, ty - 10);\n g.drawText(_StringUtil2.default.dencodeHTML(this.name), tx + 10, ty - 10, 80);\n }\n\n // 恢复当前背景颜色\n this.bgcolor = old;\n }\n }, {\n key: \"toXML\",\n value: function toXML() {\n var str = \"\\n\";\n\n if (this.subFlowDefiType == \"\") this.subFlowDefiType = \"01\";\n str += \"\" + this.subFlowDefiType + \"\\n\";\n str += \"\" + this.replaceCharacter(this.subflowid) + \"\\n\";\n str += \"\" + this.replaceCharacter(this.subflowname) + \"\\n\";\n str += \"\\n\";\n str += \"\" + this.replaceCharacter(this.paramPassingType == \"\" ? \"01\" : this.paramPassingType) + \"\\n\";\n str += \"\" + this.replaceCharacter(this.parentFlowFormId) + \"\\n\";\n str += \"\" + this.replaceCharacter(this.parentFlowFormName) + \"\\n\";\n str += \"\" + this.replaceCharacter(this.subFlowFormId) + \"\\n\";\n str += \"\" + this.replaceCharacter(this.subFlowFormName) + \"\\n\";\n if (this.fieldMappingXML.indexOf(\"\" + this.replaceXML(this.fieldMappingXML) + \"\\n\";\n } else {\n str += \"\\n\";\n }\n str += \"\" + this.shareDocument + \"\\n\";\n str += \"\\n\";\n str += \"\" + this.replaceCharacter(this.numberSetingType == \"\" ? \"01\" : this.numberSetingType) + \"\\n\";\n str += \"\" + this.replaceCharacter(this.numberSetingContent) + \"\\n\";\n str += \"\" + this.callback + \"\\n\";\n str += \"\\n\";\n str += \"\" + this.iscurrent + \"\\n\";\n str += \"\" + this.ispassed + \"\\n\";\n str += \"\" + this.crossform + \"\\n\";\n str += \"\\n\";\n str += \"\" + this.isgather + \"\\n\";\n str += \"\" + this.splitStartNode + \"\\n\";\n str += \"\" + this.issplit + \"\\n\";\n str += \"\" + this.isToPerson + \"\\n\";\n str += \"\" + this.checkedOnSinglePerson + \"\\n\";\n str += \"\" + this.checkedOnMultiplePerson + \"\\n\";\n\n str += _get(SubFlow.prototype.__proto__ || Object.getPrototypeOf(SubFlow.prototype), \"toXML\", this).call(this);\n\n str += \"\\n\";\n return str;\n }\n\n //xh\n\n }, {\n key: \"check\",\n value: function check() {\n var result = _get(SubFlow.prototype.__proto__ || Object.getPrototypeOf(SubFlow.prototype), \"check\", this).call(this);\n //节点状态标签和名称填写校验\n if (!result) {\n return false;\n }\n //指定子流程校验\n if (this.subFlowDefiType) {\n if (this.subFlowDefiType == 1) {\n if (!this.subflowid || !this.subflowname) {\n alert(\"请为\" + this.name + \"节点指定子流程!\");\n return false;\n }\n }\n\n if (this.subFlowDefiType == 2) {\n if (!this.subflowScript) {\n alert(\"请为\" + this.name + \"节点指定子流程脚本!\");\n return false;\n }\n }\n } else {\n alert(\"请为\" + this.name + \"节点选择指定子流程的方式!\");\n return false;\n }\n //子流程启动选项校验\n if (this.numberSetingType) {\n if (this.numberSetingType == 1) {\n if (Number(this.numberSetingContent) <= 0 || Number(this.numberSetingContent) % 1 != 0 || isNaN(Number(this.numberSetingContent))) {\n console.log(Number(this.numberSetingContent));\n alert(\"请为\" + this.name + \"节点在启动时填写预定义启动的实例数(实例数必须是正整数)!\");\n return false;\n }\n }\n\n if (this.numberSetingType == 2) {\n if (!this.parentFlowFormId || !this.parentFlowFormName || this.numberSetingContent == \"undefined\" || this.numberSetingContent == \"--select--\") {\n alert(\"请为\" + this.name + \"节点在启动时选择父流程表单和父表单字段值(若没有选择的字段值则代表该父表单无字段)!\");\n return false;\n }\n }\n\n if (this.numberSetingType == 3) {\n if (!this.numberSetingContent) {\n alert(\"请为\" + this.name + \"节点在启动时填写启动脚本!\");\n return false;\n }\n }\n } else {\n alert(\"请为\" + this.name + \"节点选择启动实例数的方式\");\n return false;\n }\n //聚合选项校验\n if (this.isgather) {\n if (!this.splitStartNode) {\n alert(\"请为\" + this.name + \"节点选择聚合审批节点(若选择聚合选项,则流程中至少要有一个节点开启并行)!\");\n return false;\n }\n }\n //流程等待校验\n if (this.callback) {\n if (!this.callbackScript) {\n alert(\"请为\" + this.name + \"节点在流程等待里填写流程回调时执行的iscript脚本!\");\n return false;\n }\n }\n\n return true;\n }\n\n //xh\n\n }, {\n key: \"hasRelation\",\n value: function hasRelation(relation) {\n var _get$call = _get(SubFlow.prototype.__proto__ || Object.getPrototypeOf(SubFlow.prototype), \"hasRelation\", this).call(this, relation),\n input = _get$call.input,\n output = _get$call.output;\n\n if (input == 0 && output == 0) {\n alert(\"请创建\" + this.name + \"节点的关联线!\");\n return false;\n } else if (output > 0 && input == 0) {\n alert(this.name + \"节点缺少接入节点!\");\n return false;\n } else if (input > 0 && output == 0) {\n alert(\"请为\" + this.name + \"节点连接其他节点!\");\n return false;\n } else {\n return true;\n }\n }\n\n // yx\n\n }, {\n key: \"hasSomeRelation\",\n value: function hasSomeRelation(relation) {\n return _get(SubFlow.prototype.__proto__ || Object.getPrototypeOf(SubFlow.prototype), \"hasRelation\", this).call(this, relation);\n }\n }, {\n key: \"showTips\",\n value: function showTips(g) {\n var tips = \"\";\n if (this.subflowname != null && !this.subflowname.trim() == \"\" && !this.subflowname.trim() == \"null\") {\n tips += \"子流程名称:\" + this.subflowname;\n tips += \"\\n\";\n }\n this.drawTips(g, tips);\n }\n }, {\n key: \"getSubelems\",\n value: function getSubelems() {\n return this._subelems;\n }\n\n /**\r\n * 获取子流程参数映射信息\r\n * @return\r\n * @throws Exception\r\n */\n\n }, {\n key: \"getFieldMappingInfo\",\n value: function getFieldMappingInfo() {\n if (PARAM_PASSING_SHARE == paramPassingType || fieldMappingXML == \"\" || fieldMappingXML == null) return null;\n\n return XmlUtil.toOjbect(fieldMappingXML);\n }\n }]);\n\n return SubFlow;\n}(_Node3.default);\n\n/**\r\n * 子流程绑定方式-自定义值\r\n */\n\n\nSubFlow.SUBFLOW_DEFINITION_CUSTOM = \"01\";\n/**\r\n * 子流程绑定方式-脚本返回值\r\n */\nSubFlow.SUBFLOW_DEFINITION_SCRIPT = \"02\";\n/**\r\n * 参数传递方式-共享父流程文档\r\n */\nSubFlow.PARAM_PASSING_SHARE = \"01\";\n\n/**\r\n * 参数传递方式-表单映射\r\n */\nSubFlow.PARAM_PASSING_MAPPING = \"02\";\n\n/**\r\n * 参数传递方式-脚本\r\n */\nSubFlow.PARAM_PASSING_SCRIPT = \"03\";\n\n/**\r\n * 实例启动次数设置方式-预定义值\r\n */\nSubFlow.NUMBER_SETING_CUSTOM = \"01\";\n\n/**\r\n * 实例启动次数设置方式-父流程表单字段值\r\n */\nSubFlow.NUMBER_SETING_FIEDL = \"02\";\n\n/**\r\n * 实例启动次数设置方式-脚本返回值\r\n */\nSubFlow.NUMBER_SETING_SCRIPT = \"03\";\n\n/**\r\n * 实例启动次数设置方式-审批人分组总数\r\n */\nSubFlow.NUMBER_SETING_GROUP_TOTAL = \"04\";\n\nexports.default = SubFlow;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL2VsZW1lbnQvU3ViRmxvdy5qcz9kYWMwIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBOb2RlIGZyb20gXCIuL05vZGVcIjtcclxuaW1wb3J0IEZsb3dEaWFncmFtIGZyb20gXCIuL0Zsb3dEaWFncmFtXCI7XHJcbmltcG9ydCBQYWludEVsZW1lbnQgZnJvbSBcIi4vUGFpbnRFbGVtZW50XCI7XHJcbmltcG9ydCBSZWN0YW5nbGUgZnJvbSBcIi4uL3V0aWxpdHkvUmVjdGFuZ2xlXCI7XHJcbmltcG9ydCBSZXNvdXJjZXMgZnJvbSBcIi4uL3V0aWxpdHkvUmVzb3VyY2VzXCI7XHJcbmltcG9ydCBTdHJpbmdVdGlsIGZyb20gXCIuLi91dGlsaXR5L1N0cmluZ1V0aWxcIjtcclxuXHJcbmNsYXNzIFN1YkZsb3cgZXh0ZW5kcyBOb2RlIHtcclxuICBjb25zdHJ1Y3RvcihkaWFncmFtKSB7XHJcbiAgICBzdXBlcihkaWFncmFtKTtcclxuICAgIC8qKlxyXG4gICAgICog57uR5a6a5a2Q5rWB56iL5a6a5LmJ55qE57G75Z6LXHJcbiAgICAgKi9cclxuICAgIHRoaXMuc3ViRmxvd0RlZmlUeXBlID0gXCJcIjtcclxuICAgIC8qKlxyXG4gICAgICog5a2Q5rWB56iL5a6a5LmJaWRcclxuICAgICAqL1xyXG4gICAgdGhpcy5zdWJmbG93aWQgPSBcIlwiO1xyXG5cclxuICAgIC8qKlxyXG4gICAgICog5a2Q5rWB56iL5ZCN56ewXHJcbiAgICAgKi9cclxuICAgIHRoaXMuc3ViZmxvd25hbWUgPSBcIlwiO1xyXG5cclxuICAgIC8qKlxyXG4gICAgICog6YCa6L+H6ISa5pys6L+U5Zue5YC86K6+572u5rWB56iL77yI6L+U5Zue5rWB56iLSUTvvIlcclxuICAgICAqL1xyXG4gICAgdGhpcy5zdWJmbG93U2NyaXB0ID0gXCJcIjtcclxuXHJcbiAgICAvKipcclxuICAgICAqIOWPguaVsOS8oOmAkuiuvue9ruaWueW8j1xyXG4gICAgICovXHJcbiAgICB0aGlzLnBhcmFtUGFzc2luZ1R5cGUgPSBcIlwiO1xyXG5cclxuICAgIC8qKlxyXG4gICAgICog54i25rWB56iL5YWz6IGU6KGo5Y2VSURcclxuICAgICAqL1xyXG4gICAgdGhpcy5wYXJlbnRGbG93Rm9ybUlkID0gXCJcIjtcclxuXHJcbiAgICAvKipcclxuICAgICAqIOeItua1geeoi+WFs+iBlOihqOWNleWQjeensFxyXG4gICAgICovXHJcbiAgICB0aGlzLnBhcmVudEZsb3dGb3JtTmFtZSA9IFwiXCI7XHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiDlrZDmtYHnqIvlhbPogZTooajljZVJRFxyXG4gICAgICovXHJcbiAgICB0aGlzLnN1YkZsb3dGb3JtSWQgPSBcIlwiO1xyXG5cclxuICAgIC8qKlxyXG4gICAgICog5a2Q5rWB56iL5YWz6IGU6KGo5Y2V5ZCN56ewXHJcbiAgICAgKi9cclxuICAgIHRoaXMuc3ViRmxvd0Zvcm1OYW1lID0gXCJcIjtcclxuXHJcbiAgICAvKipcclxuICAgICAqIOihqOWNleWtl+auteaYoOWwhO+8iFhNTO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2F0aGVyID0gZmFsc2U7IC8vIOaYr+WQpuiBmuWQiOiKgueCuVxyXG5cclxuICAgIC8qKlxyXG4gICAgICog5YiG5pWj6LW35aeL6IqC54K5XHJcbiAgICAgKi9cclxuICAgIHRoaXMuc3BsaXRTdGFydE5vZGUgPSBcIlwiO1xyXG5cclxuICAgIC8qKlxyXG4gICAgICog5piv5ZCm5Li65YiG5pWj6IqC54K5KOm7mOiupOS4unRydWUpXHJcbiAgICAgKi9cclxuICAgIHRoaXMuaXNzcGxpdCA9IHRydWU7XHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiDmmK/lkKbmjIfnmoTlrqHmibnkurpcclxuICAgICAqL1xyXG4gICAgdGhpcy5pc1RvUGVyc29uID0gZmFsc2U7XHJcbiAgICAvL+W9k+WuoeaJueS6uuWPquacieS4gOS4quS6uuaXtu+8jOm7mOiupOmAieS4reivpeS6ulxyXG4gICAgdGhpcy5jaGVja2VkT25TaW5nbGVQZXJzb24gPSBmYWxzZTtcclxuICAgICAgICAvLyDlj6rmnInkuIDkuKrlrqHmibnkurrnmoTml7blgJnvvIzmmK/lkKbpu5jorqTpgInkuK3lrqHmibnkurpcclxuXHJcbiAgICB0aGlzLmNoZWNrZWRPbk11bHRpcGxlUGVyc29uID0gZmFsc2U7XHJcblxyXG5cclxuICAgIHRoaXMuc3ViZmxvd0Zvcm1pZCA9IFwiXCI7IC8vIOWtkOa1geeoi+ihqOWNlUlEXHJcblxyXG4gICAgdGhpcy5zdWJmbG93Rm9ybW5hbWUgPSBcIlwiOyAvLyDlrZDmtYHnqIvooajljZXlkI3np7BcclxuXHJcbiAgICAvKipcclxuICAgICAqIEBkZXByZWNhdGVkIHNpbmNlIDIuNlxyXG4gICAgICovXHJcbiAgICB0aGlzLmNyb3NzZm9ybSA9IGZhbHNlOyAvLyDot6jooajljZVcclxuXHJcbiAgICAvKipcclxuICAgICAqIOWtkOa1geeoi+WQr+WKqOaXtuaJp+ihjOeahOiEmuacrFxyXG4gICAgICogQGR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0aGlzLnN1YmZsb3duYW1lKSB7XHJcbiAgICAgICAgICBhbGVydChcIuivt+S4ulwiICsgdGhpcy5uYW1lICsgXCLoioLngrnmjIflrprlrZDmtYHnqIvvvIFcIik7XHJcbiAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcblxyXG4gICAgICBpZiAodGhpcy5zdWJGbG93RGVmaVR5cGUgPT0gMikge1xyXG4gICAgICAgIGlmICghdGhpcy5zdWJmbG93U2NyaXB0KSB7XHJcbiAgICAgICAgICBhbGVydChcIuivt+S4ulwiICsgdGhpcy5uYW1lICsgXCLoioLngrnmjIflrprlrZDmtYHnqIvohJrmnKzvvIFcIik7XHJcbiAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcbiAgICB9IGVsc2Uge1xyXG4gICAgICBhbGVydChcIuivt+S4ulwiICsgdGhpcy5uYW1lICsgXCLoioLngrnpgInmi6nmjIflrprlrZDmtYHnqIvnmoTmlrnlvI/vvIFcIik7XHJcbiAgICAgIHJldHVybiBmYWxzZTtcclxuICAgIH1cclxuICAgIC8v5a2Q5rWB56iL5ZCv5Yqo6YCJ6aG55qCh6aqMXHJcbiAgICBpZiAodGhpcy5udW1iZXJTZXRpbmdUeXBlKSB7XHJcbiAgICAgIGlmICh0aGlzLm51bWJlclNldGluZ1R5cGUgPT0gMSkge1xyXG4gICAgICAgIGlmIChOdW1iZXIodGhpcy5udW1iZXJTZXRpbmdDb250ZW50KSA8PSAwIHx8IE51bWJlcih0aGlzLm51bWJlclNldGluZ0NvbnRlbnQpICUgMSAhPSAwIHx8IGlzTmFOKE51bWJlcih0aGlzLm51bWJlclNldGluZ0NvbnRlbnQpKSkge1xyXG4gICAgICAgICAgY29uc29sZS5sb2coTnVtYmVyKHRoaXMubnVtYmVyU2V0aW5nQ29udGVudCkpO1xyXG4gICAgICAgICAgYWxlcnQoXCLor7fkuLpcIiArIHRoaXMubmFtZSArIFwi6IqC54K55Zyo5ZCv5Yqo5pe25aGr5YaZ6aKE5a6a5LmJ5ZCv5Yqo55qE5a6e5L6L5pWwKOWunuS+i+aVsOW/hemhu+aYr+ato+aVtOaVsCnvvIFcIik7XHJcbiAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcblxyXG4gICAgICBpZiAodGhpcy5udW1iZXJTZXRpbmdUeXBlID09IDIpIHtcclxuICAgICAgICBpZiAoIXRoaXMucGFyZW50Rmxvd0Zvcm1JZCB8fCAhdGhpcy5wYXJlbnRGbG93Rm9ybU5hbWUgfHwgdGhpcy5udW1iZXJTZXRpbmdDb250ZW50ID09IFwidW5kZWZpbmVkXCIgfHwgdGhpcy5udW1iZXJTZXRpbmdDb250ZW50ID09IFwiLS1zZWxlY3QtLVwiKSB7XHJcbiAgICAgICAgICBhbGVydChcIuivt+S4ulwiICsgdGhpcy5uYW1lICsgXCLoioLngrnlnKjlkK/liqjml7bpgInmi6nniLbmtYHnqIvooajljZXlkozniLbooajljZXlrZfmrrXlgLwo6Iul5rKh5pyJ6YCJ5oup55qE5a2X5q615YC85YiZ5Luj6KGo6K+l54i26KGo5Y2V5peg5a2X5q61Ke+8gVwiKTtcclxuICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuXHJcbiAgICAgIGlmICh0aGlzLm51bWJlclNldGluZ1R5cGUgPT0gMykge1xyXG4gICAgICAgIGlmICghdGhpcy5udW1iZXJTZXRpbmdDb250ZW50KSB7XHJcbiAgICAgICAgICBhbGVydChcIuivt+S4ulwiICsgdGhpcy5uYW1lICsgXCLoioLngrnlnKjlkK/liqjml7bloavlhpnlkK/liqjohJrmnKzvvIFcIik7XHJcbiAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcbiAgICB9IGVsc2Uge1xyXG4gICAgICBhbGVydChcIuivt+S4ulwiICsgdGhpcy5uYW1lICsgXCLoioLngrnpgInmi6nlkK/liqjlrp7kvovmlbDnmoTmlrnlvI9cIik7XHJcbiAgICAgIHJldHVybiBmYWxzZTtcclxuICAgIH1cclxuICAgIC8v6IGa5ZCI6YCJ6aG55qCh6aqMXHJcbiAgICBpZiAodGhpcy5pc2dhdGhlcikge1xyXG4gICAgICBpZiAoIXRoaXMuc3BsaXRTdGFydE5vZGUpIHtcclxuICAgICAgICBhbGVydChcIuivt+S4ulwiICsgdGhpcy5uYW1lICsgXCLoioLngrnpgInmi6nogZrlkIjlrqHmibnoioLngrko6Iul6YCJ5oup6IGa5ZCI6YCJ6aG577yM5YiZ5rWB56iL5Lit6Iez5bCR6KaB5pyJ5LiA5Liq6IqC54K55byA5ZCv5bm26KGMKe+8gVwiKTtcclxuICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgIH1cclxuICAgIH1cclxuICAgIC8v5rWB56iL562J5b6F5qCh6aqMXHJcbiAgICBpZiAodGhpcy5jYWxsYmFjaykge1xyXG4gICAgICBpZiAoIXRoaXMuY2FsbGJhY2tTY3JpcHQpIHtcclxuICAgICAgICBhbGVydChcIuivt+S4ulwiICsgdGhpcy5uYW1lICsgXCLoioLngrnlnKjmtYHnqIvnrYnlvoXph4zloavlhpnmtYHnqIvlm57osIPml7bmiafooYznmoRpc2NyaXB06ISa5pys77yBXCIpO1xyXG4gICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHJldHVybiB0cnVlO1xyXG4gIH1cclxuXHJcbiAgLy94aFxyXG4gIGhhc1JlbGF0aW9uKHJlbGF0aW9uKSB7XHJcbiAgICBsZXQgeyBpbnB1dCwgb3V0cHV0IH0gPSBzdXBlci5oYXNSZWxhdGlvbihyZWxhdGlvbik7XHJcblxyXG4gICAgaWYgKGlucHV0ID09IDAgJiYgb3V0cHV0ID09IDApIHtcclxuICAgICAgYWxlcnQoXCLor7fliJvlu7pcIiArIHRoaXMubmF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BRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7Ozs7QUFLQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7O0FBN1dBO0FBQ0E7QUErV0E7Ozs7O0FBR0E7QUFDQTs7O0FBR0E7QUFDQTs7O0FBR0E7QUFDQTtBQUNBOzs7QUFHQTtBQUNBO0FBQ0E7OztBQUdBO0FBQ0E7QUFDQTs7O0FBR0E7QUFDQTtBQUNBOzs7QUFHQTtBQUNBO0FBQ0E7OztBQUdBO0FBQ0E7QUFDQTs7O0FBR0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///12\n");
/***/ }),
/* 13 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _FlowDiagram = __webpack_require__(4);\n\nvar _FlowDiagram2 = _interopRequireDefault(_FlowDiagram);\n\nvar _Resources = __webpack_require__(0);\n\nvar _Resources2 = _interopRequireDefault(_Resources);\n\nvar _XMLOperate2 = __webpack_require__(22);\n\nvar _XMLOperate3 = _interopRequireDefault(_XMLOperate2);\n\nvar _StringUtil = __webpack_require__(2);\n\nvar _StringUtil2 = _interopRequireDefault(_StringUtil);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Canvas = function () {\n function Canvas(canvas) {\n _classCallCheck(this, Canvas);\n\n this.canvas = canvas;\n this.diagram = null;\n this.scalePreNum = 1;\n }\n\n _createClass(Canvas, [{\n key: \"Init\",\n value: function Init() {\n var _this = this;\n\n if (this.canvas.getContext) {\n new _Resources2.default().onload(function () {\n _this.diagram = new _FlowDiagram2.default(_this.canvas);\n _this.diagram.jbInit();\n _this.diagram.paint();\n });\n }\n }\n }, {\n key: \"getCurrToEdit\",\n value: function getCurrToEdit() {\n return this.diagram.getCurrToEdit();\n }\n }, {\n key: \"addStartNode\",\n value: function addStartNode() {\n this.diagram.changeStatues(_FlowDiagram2.default.ACTION_ADD_STARTNODE);\n }\n }, {\n key: \"editStartNode\",\n value: function editStartNode(cn, id, name, statelabel, x, y) {\n this.diagram.editStartNode(cn, id, name, statelabel, x, y);\n }\n }, {\n key: \"addCompleteNode\",\n value: function addCompleteNode() {\n this.diagram.changeStatues(_FlowDiagram2.default.ACTION_ADD_COMPLETENODE);\n }\n }, {\n key: \"editCompleteNode\",\n value: function editCompleteNode(cn, id, name, statelabel, orderNum, x, y, isgather, splitStartNode, isAutoArchive) {\n this.diagram.editCompleteNode(cn, id, name, statelabel, orderNum, x, y, isgather, splitStartNode, isAutoArchive);\n }\n }, {\n key: \"addGatewayNode\",\n value: function addGatewayNode() {\n this.diagram.changeStatues(_FlowDiagram2.default.ACTION_ADD_GATEWAYNODE);\n }\n }, {\n key: \"editGatewayNode\",\n value: function editGatewayNode(cn, id, name, statelabel, x, y, issplit, isgather, splitStartNode) {\n this.diagram.editGatewayNode(cn, id, name, statelabel, x, y, issplit, isgather, splitStartNode);\n }\n }, {\n key: \"addManualNode\",\n value: function addManualNode() {\n this.diagram.changeStatues(_FlowDiagram2.default.ACTION_ADD_MANUALNODE);\n }\n }, {\n key: \"editManualNode\",\n value: function editManualNode(node, opts) {\n this.diagram.editManualNode(node, opts);\n }\n }, {\n key: \"addAutoNode\",\n value: function addAutoNode() {\n this.diagram.changeStatues(_FlowDiagram2.default.ACTION_ADD_AUTONODE);\n }\n }, {\n key: \"editAutoNode\",\n value: function editAutoNode(an, id, name, statelabel, orderNum, issplit, isgather, autoAuditType, delayDay, delayHour, delayMinute, auditDateTime, x, y, splitStartNode, autoAuditTimeEditMode, auditDateTimeScript) {\n this.diagram.editAutoNode(an, id, name, statelabel, orderNum, issplit, isgather, autoAuditType, delayDay, delayHour, delayMinute, auditDateTime, x, y, splitStartNode, autoAuditTimeEditMode, auditDateTimeScript);\n }\n }, {\n key: \"addSubFlow\",\n value: function addSubFlow() {\n this.diagram.changeStatues(_FlowDiagram2.default.ACTION_ADD_SUBFLOW);\n }\n }, {\n key: \"editSubFlow\",\n value: function editSubFlow(an, opts) {\n this.diagram.editSubFlow(an, opts);\n }\n }, {\n key: \"addRelation\",\n value: function addRelation() {\n this.diagram.changeStatues(_FlowDiagram2.default.ACTION_ADD_RELATION);\n }\n }, {\n key: \"editRelation\",\n value: function editRelation(rlt, id, name, condition, note, action, validateScript, filtercondition, editMode, processDescription, formlist) {\n this.diagram.editRelation(rlt, id, name, condition, note, action, validateScript, filtercondition, editMode, processDescription, formlist);\n }\n }, {\n key: \"bigCanvas\",\n value: function bigCanvas() {\n var scalePreNum1 = 1 / this.scalePreNum;\n this.canvas.getContext(\"2d\").scale(scalePreNum1, scalePreNum1);\n var scaleNum = this.diagram.getScaleNum(\"big\");\n console.log(scaleNum + \"big\");\n\n this.canvas.getContext(\"2d\").scale(scaleNum, scaleNum);\n this.diagram.repaint();\n this.scalePreNum = scaleNum;\n }\n }, {\n key: \"smallCanvas\",\n value: function smallCanvas() {\n var scalePreNum1 = 1 / this.scalePreNum;\n this.canvas.getContext(\"2d\").scale(scalePreNum1, scalePreNum1);\n var scaleNum = this.diagram.getScaleNum(\"small\");\n console.log(scaleNum + \"small\");\n\n this.canvas.getContext(\"2d\").scale(scaleNum, scaleNum);\n this.diagram.repaint();\n this.scalePreNum = scaleNum;\n }\n }, {\n key: \"removeElement\",\n value: function removeElement() {\n this.diagram.changeStatues(_FlowDiagram2.default.ACTION_REMOVE);\n }\n\n // yx\n\n }, {\n key: \"alignVerticalCenter\",\n value: function alignVerticalCenter() {\n this.diagram.alignVerticalCenter();\n }\n // yx \n\n }, {\n key: \"alignLeft\",\n value: function alignLeft() {\n this.diagram.alignLeft();\n }\n // yx \n\n }, {\n key: \"alignRight\",\n value: function alignRight() {\n this.diagram.alignRight();\n }\n // yx\n\n }, {\n key: \"alignHorizontalCenter\",\n value: function alignHorizontalCenter() {\n this.diagram.alignHorizontalCenter();\n }\n // yx\n\n }, {\n key: \"alignTop\",\n value: function alignTop() {\n this.diagram.alignTop();\n }\n // yx\n\n }, {\n key: \"alignBottom\",\n value: function alignBottom() {\n this.diagram.alignBottom();\n }\n\n // yx\n\n }, {\n key: \"getAllSplitNode\",\n value: function getAllSplitNode(currentNode) {\n return this.diagram.getAllSplitNode(currentNode);\n }\n }, {\n key: \"getAllBeforeNode\",\n value: function getAllBeforeNode(node, ispassed) {\n return this.diagram.getAllBeforeNode(node, ispassed);\n }\n }, {\n key: \"getElementByID\",\n value: function getElementByID(id) {\n return this.diagram.getElementByID(id);\n }\n }, {\n key: \"informationCheck\",\n value: function informationCheck() {\n return this.diagram.informationCheck();\n }\n }, {\n key: \"toXML\",\n value: function toXML() {\n return this.diagram.toXML();\n }\n\n //xh\n\n }, {\n key: \"check\",\n value: function check() {\n return this.diagram.check();\n }\n }, {\n key: \"XMLOperate\",\n value: function XMLOperate(xml) {\n var parse = new DOMParser();\n var xmldoc = parse.parseFromString(new _StringUtil2.default().replaceXML(xml), \"text/xml\");\n\n new _XMLOperate3.default(xmldoc, this.diagram).parserXML();\n this.diagram.paint();\n }\n }]);\n\n return Canvas;\n}();\n\nvar OBPM = window.OBPM || {};\n\nOBPM.FlowDiagram = Canvas;\n\nwindow.OBPM = OBPM;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL2FwcC5qcz9iZDljIl0sInNvdXJjZXNDb250ZW50IjpbImltcG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QUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7OztBQUFBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7OztBQUVBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFBQTtBQUNBO0FBQ0E7OztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7Ozs7QUFHQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///13\n");
/***/ }),
/* 14 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Element = function () {\n function Element(diagram) {\n _classCallCheck(this, Element);\n\n this._owner = diagram;\n this._subelems = [];\n }\n\n // 拼装XML\n\n\n _createClass(Element, [{\n key: 'toXML',\n value: function toXML() {\n var str = '';\n\n str += '' + this.replaceCharacter(this.id) + '\\n';\n str += '' + this.replaceCharacter(this.name) + '\\n';\n\n return str;\n }\n\n // 替换特殊字符\n\n }, {\n key: 'replaceCharacter',\n value: function replaceCharacter(str) {\n if (str != null) {\n if (typeof str != 'string') {\n str += '';\n }\n while (str.indexOf('&') != -1 || str.indexOf('\"') != -1 || str.indexOf('<') != -1 || str.indexOf('>') != -1) {\n str = str.replace(/&/g, '@amp;');\n str = str.replace(/\\\"/g, '@quot;');\n str = str.replace(//g, '@gt;');\n }\n return str;\n }\n return '';\n }\n }, {\n key: 'replaceXML',\n value: function replaceXML(str) {\n if (str != null) {\n if (typeof str != 'string') {\n str += '';\n }\n while (str.indexOf('\"') != -1) {\n str = str.replace(/\\\"/g, '@quot;');\n }\n return str;\n }\n return '';\n }\n\n /**\r\n * @param e\r\n * @roseuid 3E0A6E170254\r\n */\n\n }, {\n key: 'appendElement',\n value: function appendElement(e) {\n _subelems.addElement(e);\n }\n }, {\n key: 'getSubelems',\n value: function getSubelems() {\n return this._subelems;\n }\n }]);\n\n return Element;\n}();\n\nexports.default = Element;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL2VsZW1lbnQvRWxlbWVudC5qcz9lZjljIl0sInNvdXJjZXNDb250ZW50IjpbImNsYXNzIEVsZW1lbnQge1xyXG4gIGNvbnN0cnVjdG9yKGRpYWdyYW0pIHtcclxuICAgIHRoaXMuX293bmVyID0gZGlhZ3JhbTtcclxuICAgIHRoaXMuX3N1YmVsZW1zID0gW107XHJcbiAgfVxyXG5cclxuICAvLyDmi7zoo4VYTUxcclxuICB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7QUFDQTtBQUNBOzs7Ozs7QUFHQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///14\n");
/***/ }),
/* 15 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _Point = __webpack_require__(7);\n\nvar _Point2 = _interopRequireDefault(_Point);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Polygon = function () {\n function Polygon() {\n _classCallCheck(this, Polygon);\n\n this.points = [];\n }\n\n _createClass(Polygon, [{\n key: 'addPoint',\n value: function addPoint(x, y) {\n this.points.push(new _Point2.default(x, y));\n }\n }]);\n\n return Polygon;\n}();\n\nexports.default = Polygon;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL3V0aWxpdHkvUG9seWdvbi5qcz9hMGVjIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBQb2ludCBmcm9tICcuL1BvaW50JztcclxuXHJcbmNsYXNzIFBvbHlnb24ge1xyXG4gICAgY29uc3RydWN0b3IoKXtcclxuICAgICAgICB0aGlzLnBvaW50cyA9IFtdXHJcbiAgICB9XHJcblxyXG4gICAgYWRkUG9pbnQoeCwgeSl7XHJcbiAgICAgICAgdGhpcy5wb2ludHMucHVzaChuZXcgUG9pbnQoeCwgeSkpXHJcbiAgICB9XHJcbn1cclxuXHJcbmV4cG9ydCBkZWZhdWx0IFBvbHlnb247XG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHNyYy91dGlsaXR5L1BvbHlnb24uanMiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7O0FBQUE7QUFDQTs7Ozs7OztBQUNBO0FBQ0E7QUFBQTtBQUNBO0FBQUE7QUFDQTtBQUNBOzs7QUFDQTtBQUNBO0FBQ0E7Ozs7OztBQUdBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///15\n");
/***/ }),
/* 16 */
/***/ (function(module, exports) {
eval("// Provide a \"System\" global.\r\nmodule.exports = {\r\n\t// Make sure import is only used as \"System.import\"\r\n\timport: function() {\r\n\t\tthrow new Error(\"System.import cannot be used indirectly\");\r\n\t}\r\n};\r\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vKHdlYnBhY2spL2J1aWxkaW4vc3lzdGVtLmpzPzA4ZmMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gUHJvdmlkZSBhIFwiU3lzdGVtXCIgZ2xvYmFsLlxyXG5tb2R1bGUuZXhwb3J0cyA9IHtcclxuXHQvLyBNYWtlIHN1cmUgaW1wb3J0IGlzIG9ubHkgdXNlZCBhcyBcIlN5c3RlbS5pbXBvcnRcIlxyXG5cdGltcG9ydDogZnVuY3Rpb24oKSB7XHJcblx0XHR0aHJvdyBuZXcgRXJyb3IoXCJTeXN0ZW0uaW1wb3J0IGNhbm5vdCBiZSB1c2VkIGluZGlyZWN0bHlcIik7XHJcblx0fVxyXG59O1xyXG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAod2VicGFjaykvYnVpbGRpbi9zeXN0ZW0uanNcbi8vIG1vZHVsZSBpZCA9IDE2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///16\n");
/***/ }),
/* 17 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _Node2 = __webpack_require__(3);\n\nvar _Node3 = _interopRequireDefault(_Node2);\n\nvar _PaintElement = __webpack_require__(1);\n\nvar _PaintElement2 = _interopRequireDefault(_PaintElement);\n\nvar _Resources = __webpack_require__(0);\n\nvar _Resources2 = _interopRequireDefault(_Resources);\n\nvar _StringUtil = __webpack_require__(2);\n\nvar _StringUtil2 = _interopRequireDefault(_StringUtil);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar GatewayNode = function (_Node) {\n _inherits(GatewayNode, _Node);\n\n function GatewayNode(diagram) {\n _classCallCheck(this, GatewayNode);\n\n /**\r\n * 是否聚合节点\r\n */\n var _this = _possibleConstructorReturn(this, (GatewayNode.__proto__ || Object.getPrototypeOf(GatewayNode)).call(this, diagram));\n\n _this.isgather = false;\n\n /**\r\n * 是否分散节点\r\n */\n _this.issplit = false;\n\n /**\r\n * 分散节点\r\n */\n _this.splitStartNode = \"\";\n return _this;\n }\n\n _createClass(GatewayNode, [{\n key: \"getClassName\",\n value: function getClassName() {\n return \"cn.myapps.runtime.workflow.element.GatewayNode\";\n }\n }, {\n key: \"paint\",\n value: function paint(g) {\n if (this._img == null) {\n this._img = _Resources2.default.IMG_GATEWAY_NODE;\n }\n\n // Call All Sub Elements PAINT METHOD.\n // 保存当前背景颜色...\n var old = this.bgcolor;\n // yx 判断Ctrl数组是否有值\n if (this._owner.checkSelectArr()) {\n // yx 判断是否在ctrl数据中\n if (this._owner.isInZoom(this)) {\n this.bgcolor = _PaintElement2.default.DEF_CURREDITCOLOR;\n }\n } else {\n if (this._owner.isCurrentToEdit(this)) {\n this.bgcolor = _PaintElement2.default.DEF_CURREDITCOLOR;\n }\n\n if (this._owner.isCurrentSelected(this)) {\n this.bgcolor = _PaintElement2.default.DEF_SELECTEDCOLOR;\n }\n }\n\n for (var i = 0; i < this._subelems.length; i++) {\n var te = this._subelems[i];\n if (te instanceof _PaintElement2.default) {\n var se = te;\n se.paint(g);\n }\n }\n\n // Fill background\n this.width = _Node3.default.WIDTH;\n this.m_width = _Node3.default.M_WIDTH;\n this.m_height = _Node3.default.M_HEIGHT;\n this.height = _Node3.default.HEIGHT;\n this.resize();\n g.setColor(this.bgcolor);\n g.fillRect(this.x - 2, this.y - 2, this.width + 4, this.height + 4);\n // Draw Image\n g.setColor(\"#000\");\n g.drawDiamondBorder(this.x, this.y, this.width, this.height);\n\n // Draw Image\n // g.drawImage(this._img, this._imgrect.x, this._imgrect.y, this._imgrect.width, this._imgrect.height);\n\n // yx 给节点添加默认名称\n if (this.name == \"\" || this.name == null) {\n this.name = \"网关节点\";\n }\n\n if (this.name != null && this.name != \"\") {\n // yx 判断字体过多是绘画是否一直在中间\n // let tx = this._txtrect.x;\n // const ty = this._txtrect.y + 1.5 * this._txtrect.height;\n var tx = this._txtrect.x + this._txtrect.width / 4;\n\n var ty = this._txtrect.y;\n\n g.setColor(_Resources2.default.COLOR.black);\n g.drawText(_StringUtil2.default.dencodeHTML(this.name), tx - 10, ty + 20, 80);\n }\n\n // 恢复当前背景颜色\n this.bgcolor = old;\n }\n }, {\n key: \"toXML\",\n value: function toXML() {\n var str = \"\\n\";\n str += \"\" + this.isgather + \"\\n\";\n str += \"\" + this.issplit + \"\\n\";\n str += \"\" + this.replaceCharacter(this.splitStartNode) + \"\\n\";\n str += _get(GatewayNode.prototype.__proto__ || Object.getPrototypeOf(GatewayNode.prototype), \"toXML\", this).call(this);\n str += \"\\n\";\n return str;\n }\n\n //xh\n // 验证器\n\n }, {\n key: \"check\",\n value: function check() {\n var result = _get(GatewayNode.prototype.__proto__ || Object.getPrototypeOf(GatewayNode.prototype), \"check\", this).call(this);\n\n if (!result) {\n return false;\n }\n\n //聚合选项校验\n if (this.isgather) {\n if (!this.splitStartNode) {\n alert(\"请为\" + this.name + \"节点选择聚合审批节点(若选择聚合选项,则流程中至少要有一个节点开启并行)!\");\n return false;\n }\n }\n\n return true;\n }\n\n //xh\n\n }, {\n key: \"hasRelation\",\n value: function hasRelation(relation) {\n var _get$call = _get(GatewayNode.prototype.__proto__ || Object.getPrototypeOf(GatewayNode.prototype), \"hasRelation\", this).call(this, relation),\n input = _get$call.input,\n output = _get$call.output;\n\n if (input == 0 && output == 0) {\n alert(\"请创建\" + this.name + \"节点的关联线!\");\n return false;\n } else if (output > 0 && input == 0) {\n alert(this.name + \"节点缺少接入节点!\");\n return false;\n } else if (input > 0 && output == 0) {\n alert(\"请为\" + this.name + \"节点连接其他节点!\");\n return false;\n } else {\n return true;\n }\n }\n\n // yx\n\n }, {\n key: \"hasSomeRelation\",\n value: function hasSomeRelation(relation) {\n return _get(GatewayNode.prototype.__proto__ || Object.getPrototypeOf(GatewayNode.prototype), \"hasRelation\", this).call(this, relation);\n }\n }, {\n key: \"showTips\",\n value: function showTips(g) {\n this.drawTips(g, this.name);\n }\n }, {\n key: \"errorCheck\",\n value: function errorCheck() {\n var errorStr = _get(GatewayNode.prototype.__proto__ || Object.getPrototypeOf(GatewayNode.prototype), \"errorCheck\", this).call(this);\n if (this.name != \"\") {\n if (this.isgather && this.splitStartNode == \"\") {\n errorStr += this.name + \" node.error.choosesplitstartnode\" + \";\";\n }\n }\n return errorStr;\n }\n }]);\n\n return GatewayNode;\n}(_Node3.default);\n\nexports.default = GatewayNode;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL2VsZW1lbnQvR2F0ZXdheU5vZGUuanM/YjA0ZCJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgTm9kZSBmcm9tIFwiLi9Ob2RlXCI7XHJcbmltcG9ydCBQYWludEVsZW1lbnQgZnJvbSBcIi4vUGFpbnRFbGVtZW50XCI7XHJcbmltcG9ydCBSZXNvdXJjZXMgZnJvbSBcIi4uL3V0aWxpdHkvUmVzb3VyY2VzXCI7XHJcbmltcG9ydCBTdHJpbmdVdGlsIGZyb20gXCI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webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Graphics = function () {\n function Graphics(ctx) {\n _classCallCheck(this, Graphics);\n\n this.ctx = ctx;\n this.ctx.translate(0.5, 0.5);\n }\n\n _createClass(Graphics, [{\n key: \"setColor\",\n value: function setColor(color) {\n this.ctx.fillStyle = color;\n this.ctx.strokeStyle = color;\n }\n }, {\n key: \"setFont\",\n value: function setFont(font) {\n this.ctx.font = font;\n }\n }, {\n key: \"textAlign\",\n value: function textAlign(align) {\n this.ctx.textAlign = align;\n }\n }, {\n key: \"stringWidth\",\n value: function stringWidth(txt) {\n return this.ctx.measureText(txt).width;\n }\n }, {\n key: \"strokeRect\",\n value: function strokeRect(x, y, width, height) {\n this.ctx.strokeRect(x, y, width, height);\n }\n //xh画一个椭圆边框\n\n }, {\n key: \"drawOvalBorder\",\n value: function drawOvalBorder(x, y, width, height, p) {\n var color = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : \"#000\";\n\n var ctx = this.ctx;\n ctx.beginPath();\n ctx.moveTo(x + p, y);\n ctx.lineTo(x + width - 2 * p, y);\n ctx.quadraticCurveTo(x + width, y, x + width, y + p);\n ctx.lineTo(x + width, y + height - 2 * p);\n ctx.quadraticCurveTo(x + width, y + height, x + width - p, y + height);\n ctx.lineTo(x + p, y + height);\n ctx.quadraticCurveTo(x, y + height, x, y + height - p);\n ctx.lineTo(x, y + p);\n ctx.quadraticCurveTo(x, y, x + p, y);\n this.setColor(color);\n ctx.stroke();\n this.setColor(\"#fff\");\n ctx.fill();\n }\n\n // yx画菱形\n\n }, {\n key: \"drawDiamondBorder\",\n value: function drawDiamondBorder(x, y) {\n var width = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 150;\n var height = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 70;\n\n var ctx = this.ctx;\n ctx.beginPath();\n ctx.moveTo(x + width / 2, y);\n ctx.lineTo(x + width, y + height / 2);\n ctx.lineTo(x + width / 2, y + height);\n ctx.lineTo(x, y + height / 2);\n ctx.closePath();\n // this.setColor(\"#000\");\n // ctx.stroke();\n this.setColor(\"#ebcafe\");\n ctx.fill();\n }\n }, {\n key: \"translate\",\n value: function translate(x, y) {\n this.ctx.translate(x, y);\n }\n }, {\n key: \"fillText\",\n value: function fillText(text, x, y) {\n //console.log(text,x,y);\n this.ctx.fillText(text, x, y);\n }\n\n // yx 计算长度再显示文字[超出第二行显示省略号]\n /**\r\n * \r\n * @param {文字} t \r\n * @param {横坐标} x \r\n * @param {文字高度} y \r\n * @param {显示的文字宽度} w \r\n */\n\n }, {\n key: \"drawText\",\n value: function drawText(t, x, y) {\n var w = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 80;\n var shape = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : \"rect\";\n\n var chr = t.split(\"\");\n var temp = \"\";\n var row = [];\n for (var a = 0; a < chr.length; a++) {\n if (this.ctx.measureText(temp).width < w) {\n ;\n } else {\n row.push(temp);\n temp = \"\";\n }\n temp += chr[a];\n }\n\n row.push(temp);\n\n // 判断小于2行全部画出来,大于两行显示省略号\n if (row.length < 3) {\n for (var b = 0; b < row.length; b++) {\n this.ctx.fillText(row[b], x + 10, y + b * 16); // 16: 字体大小\n }\n } else {\n row[1] = row[1] + '...';\n this.ctx.fillText(row[0], x + 10, y);\n this.ctx.fillText(row[1], x + 10, y + 16);\n }\n }\n }, {\n key: \"fillRect\",\n value: function fillRect(x, y, width, height) {\n this.ctx.fillRect(x, y, width, height);\n }\n }, {\n key: \"fillPolygon\",\n value: function fillPolygon(polygon) {\n this.ctx.beginPath();\n for (var i = 0; i < polygon.points.length; i++) {\n if (i == 0) {\n this.ctx.moveTo(polygon.points[i].x, polygon.points[i].y);\n } else {\n this.ctx.lineTo(polygon.points[i].x, polygon.points[i].y);\n }\n }\n this.ctx.fill();\n }\n }, {\n key: \"drawLine\",\n value: function drawLine(x1, y1, x2, y2) {\n this.ctx.beginPath();\n this.ctx.moveTo(x1, y1);\n this.ctx.lineTo(x2, y2);\n this.ctx.closePath();\n this.ctx.stroke();\n }\n }, {\n key: \"drawImage\",\n value: function drawImage(image, x, y, width, height) {\n this.ctx.drawImage(image, x, y, width, height);\n }\n }, {\n key: \"drawRect\",\n value: function drawRect(x, y, width, height) {\n this.ctx.strokeRect(x, y, width, height);\n }\n }, {\n key: \"drawString\",\n value: function drawString(text, x, y) {\n this.ctx.fillText(text, x, y);\n }\n\n // yx画圆\n\n }, {\n key: \"drawArc\",\n value: function drawArc(x, y, r, color, borderColor) {\n var staAngle = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;\n var endAngle = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : Math.PI * 2;\n var antiClockWise = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : false;\n\n this.ctx.beginPath();\n this.ctx.arc(x, y, r, staAngle, endAngle, antiClockWise);\n this.ctx.closePath();\n this.setColor(borderColor);\n this.setLineWidth(1);\n this.ctx.stroke();\n this.setColor(color);\n this.ctx.fill();\n }\n }, {\n key: \"setLineWidth\",\n value: function setLineWidth(width) {\n this.ctx.lineWidth = width;\n }\n }, {\n key: \"save\",\n value: function save() {\n this.ctx.save();\n }\n }, {\n key: \"restore\",\n value: function restore() {\n this.ctx.restore();\n }\n }]);\n\n return Graphics;\n}();\n\nexports.default = Graphics;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2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XApLndpZHRoIDwgdyApe1xyXG4gICAgICAgICAgICAgICAgO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGVsc2V7XHJcbiAgICAgICAgICAgICAgICByb3cucHVzaCh0ZW1wKTtcclxuICAgICAgICAgICAgICAgIHRlbXAgPSBcIlwiO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHRlbXAgKz0gY2hyW2FdO1xyXG4gICAgICAgIH1cclxuICAgICAgICBcclxuICAgICAgICByb3cucHVzaCh0ZW1wKTtcclxuICAgICAgICBcclxuICAgICAgICAvLyDliKTmlq3lsI/kuo4y6KGM5YWo6YOo55S75Ye65p2l77yM5aSn5LqO5Lik6KGM5pi+56S655yB55Wl5Y+3XHJcbiAgICAgICAgaWYocm93Lmxlbmd0aCA8IDMpe1xyXG4gICAgICAgICAgICBmb3IobGV0IGIgPSAwOyBiIDwgcm93Lmxlbmd0aDsgYisrKXtcclxuICAgICAgICAgICAgICAgIHRoaXMuY3R4LmZpbGxUZXh0KHJvd1tiXSx4ICsgMTAseStiKjE2KTsgLy8gMTbvvJog5a2X5L2T5aSn5bCPXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9ZWxzZXtcclxuICAgICAgICAgICAgcm93WzFdID0gcm93WzFdICsgJy4uLidcclxuICAgICAgICAgICAgdGhpcy5jdHguZmlsbFRleHQocm93WzBdLHggKyAxMCx5KTtcclxuICAgICAgICAgICAgdGhpcy5jdHguZmlsbFRleHQocm93WzFdLHggKyAxMCx5KzE2KTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgZmlsbFJlY3QoeCwgeSwgd2lkdGgsIGhlaWdodCl7XHJcbiAgICAgICAgdGhpcy5jdHguZmlsbFJlY3QoeCwgeSwgd2lkdGgsIGhlaWdodCk7XHJcbiAgICB9XHJcblxyXG4gICAgZmlsbFBvbHlnb24ocG9seWdvbil7XHJcbiAgICAgICAgdGhpcy5jdHguYmVnaW5QYXRoKCk7XHJcbiA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QTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7OztBQUVBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7Ozs7OztBQUdBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///18\n");
/***/ }),
/* 19 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Sequence = function Sequence() {\n _classCallCheck(this, Sequence);\n};\n\nSequence.getSequence = function () {\n var date = new Date();\n var s = \"\" + date.getTime();\n return s;\n};\n\nexports.default = Sequence;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL3V0aWxpdHkvU2VxdWVuY2UuanM/MTdhMyJdLCJzb3VyY2VzQ29udGVudCI6WyJjbGFzcyBTZXF1ZW5jZSB7XHJcblxyXG59XHJcblxyXG5TZXF1ZW5jZS5nZXRTZXF1ZW5jZSA9ICgpID0+IHtcclxuICBjb25zdCBkYXRlID0gbmV3IERhdGUoKTtcclxuICBjb25zdCBzID0gYCR7ZGF0ZS5nZXRUaW1lKCl9YDtcclxuICByZXR1cm4gcztcclxufTtcclxuXHJcbmV4cG9ydCBkZWZhdWx0IFNlcXVlbmNlO1xyXG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gc3JjL3V0aWxpdHkvU2VxdWVuY2UuanMiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7O0FBQUE7Ozs7QUFJQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///19\n");
/***/ }),
/* 20 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar FlowType = function () {\n function FlowType() {\n _classCallCheck(this, FlowType);\n }\n\n _createClass(FlowType, null, [{\n key: 'getActionName',\n value: function getActionName(code) {\n if (code == null || code.trim().length <= 0) {\n return FlowType.ACTIONCODES[0];\n }\n\n for (var i = 0; i < FlowType.ACTIONCODES.length; i += 1) {\n if (code === FlowType.ACTIONCODES[i]) {\n return FlowType.ACTIONNAMES[i];\n }\n }\n\n return '';\n }\n }, {\n key: 'getActionCode',\n value: function getActionCode(name) {\n if (name == null || name.trim().length <= 0) {\n return FlowType.ACTIONNAMES[0];\n }\n\n for (var i = 0; i < FlowType.ACTIONNAMES.length; i += 1) {\n if (name === FlowType.ACTIONCODES[i]) {\n return FlowType.ACTIONCODES[i];\n }\n }\n\n return '';\n }\n }]);\n\n return FlowType;\n}();\n\n// 流程状态\n// FlowType.CLOSE_END = 0x10000000;\n\n\nFlowType.FLOWSTATUS_OPEN_NOSTART = 0x00000010; // 流程初始状态第一个结点为当前结点\nFlowType.FLOWSTATUS_OPEN_RUN_RUNNING = 0x00000100; // 流程运转状态\nFlowType.FLOWSTATUS_OPEN_RUN_SUSPEND = 0x00001000; // 流程挂起状态\nFlowType.FLOWSTATUS_CLOSE_ABORT = 0x00010000; // 流程拒绝状态\nFlowType.FLOWSTATUS_CLOSE_COMPLETE = 0x00100000; // 流程完成状态\nFlowType.FLOWSTATUS_CLOSE_TERMINAT = 0x01000000; // 流程终止状态\n\n// 流程处理动作\nFlowType.START2RUNNING = '1'; // 开始\nFlowType.START2TERMINATE = '2'; // 终止1\nFlowType.SUSPEND2RUNNING = '3'; // 恢复\nFlowType.RUNNING2SUSPEND = '4'; // 挂起1\nFlowType.SUSPEND2ABORT = '5'; // 取消\nFlowType.RUNNING2COMPLETE = '6'; // 完成\nFlowType.RUNNING2TERMIATE = '7'; // 终止2\nFlowType.RUNNING2RUNNING_NEXT = '80'; // 运行/下一步\nFlowType.RUNNING2RUNNING_BACK = '81'; // 退回\nFlowType.RUNNING2RUNNING_SELF = '82'; // 自循环\nFlowType.SUSPEND2SUSPEND = '9'; // 挂起2\n\n// 自动处理类型\nFlowType.NOTDO = '0'; // 不处理\nFlowType.DONEXT = '1'; // 自动流转\nFlowType.DOTERMINAT = '2'; // 自动终止\nFlowType.DOBACK = '3'; // 自动回退\nFlowType.DOBACKTONODE = '4'; // 自动回退至指定节点\n\n// 审核通过条件\nFlowType.ORCONDITION = '0'; // 审核通过条件--或--任一审核通过\nFlowType.GROUPANDCNDT = '1'; // 审核通过条件--与--每组(分号隔开)须至少有一人审核才可通过\nFlowType.ANDCONDITION = '2'; // 审核通过条件--与--每组所有人均需审核才可通过\nFlowType.ORAND = '3'; // 审核通过条件--自定义--“与”“或”混合\n\n// 提醒策略\nFlowType.REMAINDER_NOT = '0'; // 不提醒\nFlowType.REMAINDER_AFTER = '1'; // 到达后提醒\nFlowType.REMAINDER_BEFORE = '2'; // 提前提醒\n\nFlowType.ACTIONCODES = ['1', '2', '3', '4', '5', '6', '7', '80', '81', '82', '9'];\nFlowType.ACTIONNAMES = ['{*[Start]*}', '{*[Terminate]*}', '{*[Running]*}', '{*[Suspend]*}', '{*[Cancel]*}', '{*[Complete]*}', '{*[Terminate]*}', '{*[Running_Next]*}', '{*[Running_Back]*}', '{*[Loop_Self]*}', '{*[Suspend]*}'];\n\nexports.default = FlowType;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL3V0aWxpdHkvRmxvd1R5cGUuanM/N2IzNSJdLCJzb3VyY2VzQ29udGVudCI6WyJjbGFzcyBGbG93VHlwZSB7XHJcbiAgc3RhdGljIGdldEFjdGlvbk5hbWUoY29kZSkge1xyXG4gICAgaWYgKGNvZGUgPT0gbnVsbCB8fCBjb2RlLnRyaW0oKS5sZW5ndGggPD0gMCkge1xyXG4gICAgICByZXR1cm4gRmxvd1R5cGUuQUNUSU9OQ09ERVNbMF07XHJcbiAgICB9XHJcblxyXG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPCBGbG93VHlwZS5BQ1RJT05DT0RFUy5sZW5ndGg7IGkgKz0gMSkge1xyXG4gICAgICBpZiAoY29kZSA9PT0gRmxvd1R5cGUuQUNUSU9OQ09ERVNbaV0pIHtcclxuICAgICAgICByZXR1cm4gRmxvd1R5cGUuQUNUSU9OTkFNRVNbaV07XHJcbiAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICByZXR1cm4gJyc7XHJcbiAgfVxyXG5cclxuICBzdGF0aWMgZ2V0QWN0aW9uQ29kZShuYW1lKSB7XHJcbiAgICBpZiAobmFtZSA9PSBudWxsIHx8IG5hbWUudHJpbSgpLmxlbmd0aCA8PSAwKSB7XHJcbiAgICAgIHJldHVybiBGbG93VHlwZS5BQ1RJT05OQU1FU1swXTtcclxuICAgIH1cclxuXHJcbiAgICBmb3IgKGxldCBpID0gMDsgaSA8IEZsb3dUeXBlLkFDVElPTk5BTUVTLmxlbmd0aDsgaSArPSAxKSB7XHJcbiAgICAgIGlmIChuYW1lID09PSBGbG93VHlwZS5BQ1RJT05DT0RFU1tpXSkge1xyXG4gICAgICAgIHJldHVybiBGbG93VHlwZS5BQ1RJT05DT0RFU1tpXTtcclxuICAg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5ncyI6Ijs7Ozs7Ozs7OztBQUFBOzs7Ozs7O0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7OztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7Ozs7QUFHQTtBQUNBO0FBQ0E7QUFDQTtBQURBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///20\n");
/***/ }),
/* 21 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar AuxiliaryLine = function () {\n\t_createClass(AuxiliaryLine, null, [{\n\t\tkey: 'getInstance',\n\t\tvalue: function getInstance() {\n\t\t\tif (!AuxiliaryLine.instance || !(AuxiliaryLine.instance instanceof AuxiliaryLine)) {\n\t\t\t\tAuxiliaryLine.instance = new AuxiliaryLine();\n\t\t\t}\n\n\t\t\treturn AuxiliaryLine.instance;\n\t\t}\n\t}]);\n\n\tfunction AuxiliaryLine() {\n\t\t_classCallCheck(this, AuxiliaryLine);\n\n\t\tthis.points = null;\n\t\tthis.color = AuxiliaryLine.DEF_COLOR;\n\t}\n\n\t_createClass(AuxiliaryLine, [{\n\t\tkey: 'paint',\n\t\tvalue: function paint(g) {\n\t\t\tg.save();\n\t\t\tg.setLineWidth(2);\n\t\t\tg.setColor(this.color);\n\t\t\tif (this.points) {\n\t\t\t\tif (this.points.abscissa) {\n\t\t\t\t\tg.drawLine(this.points.abscissa.beginPoint.x, this.points.abscissa.beginPoint.y, this.points.abscissa.endPoint.x, this.points.abscissa.endPoint.y);\n\t\t\t\t}\n\n\t\t\t\tif (this.points.ordinate) {\n\t\t\t\t\tg.drawLine(this.points.ordinate.beginPoint.x, this.points.ordinate.beginPoint.y, this.points.ordinate.endPoint.x, this.points.ordinate.endPoint.y);\n\t\t\t\t}\n\n\t\t\t\tif (this.points.middle) {\n\t\t\t\t\tg.drawLine(this.points.middle.beginPoint.x, this.points.middle.beginPoint.y, this.points.middle.endPoint.x, this.points.middle.endPoint.y);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tg.restore();\n\t\t}\n\t}, {\n\t\tkey: 'getProp',\n\t\tvalue: function getProp(prop) {\n\t\t\treturn this[prop];\n\t\t}\n\t}, {\n\t\tkey: 'setProps',\n\t\tvalue: function setProps(newProps) {\n\t\t\tObject.assign(this, newProps);\n\t\t}\n\t}]);\n\n\treturn AuxiliaryLine;\n}();\n\nAuxiliaryLine.instance = null;\n\n\nAuxiliaryLine.DEF_COLOR = '#9AFF9A';\n\nexports.default = AuxiliaryLine;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJz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ozs7Ozs7O0FBQUE7OztBQUdBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFFQTtBQUFBO0FBQ0E7QUFBQTtBQUNBO0FBQ0E7QUFDQTs7O0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBRUE7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7Ozs7OztBQTlDQTtBQUNBO0FBQ0E7QUErQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///21\n");
/***/ }),
/* 22 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _AutoNode = __webpack_require__(9);\n\nvar _AutoNode2 = _interopRequireDefault(_AutoNode);\n\nvar _CompleteNode = __webpack_require__(11);\n\nvar _CompleteNode2 = _interopRequireDefault(_CompleteNode);\n\nvar _ManualNode = __webpack_require__(10);\n\nvar _ManualNode2 = _interopRequireDefault(_ManualNode);\n\nvar _Relation = __webpack_require__(6);\n\nvar _Relation2 = _interopRequireDefault(_Relation);\n\nvar _StartNode = __webpack_require__(8);\n\nvar _StartNode2 = _interopRequireDefault(_StartNode);\n\nvar _SubFlow = __webpack_require__(12);\n\nvar _SubFlow2 = _interopRequireDefault(_SubFlow);\n\nvar _StringUtil = __webpack_require__(2);\n\nvar _StringUtil2 = _interopRequireDefault(_StringUtil);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar XMLOperate = function () {\n function XMLOperate(xml, diagram) {\n _classCallCheck(this, XMLOperate);\n\n this.xml = xml;\n this.flowDiagram = diagram;\n this.flowDiagram._elems = [];\n }\n\n _createClass(XMLOperate, [{\n key: 'setElementProps',\n value: function setElementProps(xmlNode, element) {\n var tagName = xmlNode.tagName;\n // console.log(tagName)\n // let parentTagName = xmlNode.parentElement.tagName;\n\n var tagValue = xmlNode.childNodes[0] ? xmlNode.childNodes[0].nodeValue : '';\n\n // switch(parentTagName){\n // //FlowDiagram\n // case 'cn.myapps.runtime.workflow.element.FlowDiagram':\n // if((tagName == 'width' && tagValue > element.width)\n // || (tagName == 'height' && tagValue > element.height)){\n // element[tagName] = tagValue\n // }\n // break;\n // default:\n // element[tagName] = tagValue;\n // break;\n // }\n var elementObj = element;\n var type = _typeof(elementObj[tagName]);\n var value = _StringUtil2.default.dencodeHTML(tagValue);\n if (type === 'number') {\n elementObj[tagName] = parseInt(value, 10);\n } else if (type === 'boolean') {\n elementObj[tagName] = value === 'true';\n } else {\n elementObj[tagName] = value;\n }\n }\n }, {\n key: 'parserXML',\n value: function parserXML() {\n var _this = this;\n\n var traversalNode = function traversalNode(xmlNode, element) {\n var tagName = xmlNode.tagName;\n\n if (xmlNode.hasChildNodes() && xmlNode.children.length > 0) {\n // 节点时\n var subElement = null;\n var isFlowDiagramElem = true;\n switch (tagName) {\n // FlowDiagram\n case 'cn.myapps.runtime.workflow.element.FlowDiagram':\n // subElement = new FlowDiagram(canvas);\n subElement = element;\n break;\n // 开始\n case 'cn.myapps.runtime.workflow.element.StartNode':\n subElement = new _StartNode2.default(_this.flowDiagram);\n break;\n // 手动\n case 'cn.myapps.runtime.workflow.element.ManualNode':\n subElement = new _ManualNode2.default(_this.flowDiagram);\n break;\n // 完成\n case 'cn.myapps.runtime.workflow.element.CompleteNode':\n subElement = new _CompleteNode2.default(_this.flowDiagram);\n break;\n // 自动\n case 'cn.myapps.runtime.workflow.element.AutoNode':\n subElement = new _AutoNode2.default(_this.flowDiagram);\n break;\n // 子流程\n case 'cn.myapps.runtime.workflow.element.SubFlow':\n console.log(_this.flowDiagram);\n subElement = new _SubFlow2.default(_this.flowDiagram);\n break;\n // 线\n case 'cn.myapps.runtime.workflow.element.Relation':\n subElement = new _Relation2.default(_this.flowDiagram);\n break;\n\n default:\n isFlowDiagramElem = false;\n break;\n }\n if (isFlowDiagramElem && tagName !== 'cn.myapps.runtime.workflow.element.FlowDiagram') {\n element._elems.push(subElement);\n }\n\n if (isFlowDiagramElem) {\n for (var i = 0; i < xmlNode.children.length; i += 1) {\n if (xmlNode.nodeName == 'cn.myapps.runtime.workflow.element.SubFlow' && xmlNode.children[i].nodeName == \"fieldMappingXML\") {\n var text = xmlNode.children[i].innerHTML.replace(/^$/, \"\");\n xmlNode.children[i].innerHTML = text;\n subElement.fieldMappingXML = xmlNode.children[i].innerHTML;\n } else {\n traversalNode(xmlNode.children[i], subElement);\n }\n }\n }\n } else {\n // 属性时\n _this.setElementProps(xmlNode, element);\n }\n };\n\n traversalNode(this.xml.children[0], this.flowDiagram);\n\n return this.flowDiagram;\n }\n }]);\n\n return XMLOperate;\n}();\n\nexports.default = XMLOperate;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL3V0aWxpdHkvWE1MT3Blc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